@openscout/scout 0.2.86 → 0.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/{ActivityScreen-C7AwUogt.js → ActivityScreen-DRHTQIxu.js} +1 -1
- package/dist/client/assets/{AddProjectForm-BNRpRPod.js → AddProjectForm-Dw2oyCcz.js} +1 -1
- package/dist/client/assets/AgentAvatar-CQqJcwOQ.js +1 -0
- package/dist/client/assets/AgentAvatar-CUZZARWG.css +1 -0
- package/dist/client/assets/{AgentConfigurationScreen-BoBQpyz5.js → AgentConfigurationScreen-C3OI6JmZ.js} +1 -1
- package/dist/client/assets/{AgentDefinitionsWorkspace-rw3vh8Lm.js → AgentDefinitionsWorkspace-D0LDEqfl.js} +1 -1
- package/dist/client/assets/{AgentDetailCard-FelCxQrT.js → AgentDetailCard-2DZQahiN.js} +1 -1
- package/dist/client/assets/{AgentFloorView-Crdw8Uo5.js → AgentFloorView-CoGh2q5f.js} +1 -1
- package/dist/client/assets/{AgentInfoScreen-Cge7HHbV.js → AgentInfoScreen-5ybfIL9p.js} +1 -1
- package/dist/client/assets/{AgentLaneCard-CRDG74C1.js → AgentLaneCard-CeSjWWwh.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CWFqUdch.js → AgentLaneChrome-Do7CXwin.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-DCIIg3Zp.js → AgentLaneDetailSheet-BD8B51ka.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-yTM4GQAJ.js → AgentLaneSummaryResize--lHgnncr.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-FRTVASPw.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-DJeDRTAN.js → AgentLanesPreflight-BwkGk8JH.js} +1 -1
- package/dist/client/assets/{AgentLanesView-CbY9qD0z.js → AgentLanesView-Bm85ittm.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-Bn3zeZBN.js → AgentLiveActions-BmXDRxER.js} +1 -1
- package/dist/client/assets/{AgentSessions-czl5zT7A.js → AgentSessions-C_tAfGN2.js} +1 -1
- package/dist/client/assets/{AgentsConsole-CoT2crwq.js → AgentsConsole-DsHWsaOJ.js} +1 -1
- package/dist/client/assets/{AgentsScreen-BcPM-z1T.js → AgentsScreen-Bod6AHlA.js} +1 -1
- package/dist/client/assets/AgentsSubnav-CsvYzzQ-.js +1 -0
- package/dist/client/assets/{AstronautSuit-BADl7m8x.js → AstronautSuit-C05Ezxl9.js} +1 -1
- package/dist/client/assets/{AtopView-DymBCiXv.js → AtopView-DOKJbiJL.js} +1 -1
- package/dist/client/assets/{BackToPicker-CqYhOaLB.js → BackToPicker-CXsbxbHM.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-DDfZ8ci1.js → BriefingDetailScreen-Uvnk3t0v.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-CLvSOJjy.js → BriefingsScreen-DLIJ8eYj.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-DFAH-NO6.js → BrokerMetadataPanel-C8WERmHF.js} +1 -1
- package/dist/client/assets/{BrokerScreen-Bkvu92jk.js → BrokerScreen-LZ3T7hGG.js} +1 -1
- package/dist/client/assets/{Canvas-KyTsDJlB.js → Canvas-BO9mx5_P.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-Bjjqa30K.js → ChatCollapsedStrip-CtLPTLTY.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-C9HT1dCT.js → CodeDiffPane-CtgqIuS0.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-5Y3GvXkM.js → CodeProjectPicker-C4W_udc7.js} +1 -1
- package/dist/client/assets/{CodeScreen-DpN9kQvm.js → CodeScreen-WhTvVUKY.js} +1 -1
- package/dist/client/assets/{ConversationComposer-Ce7Byw48.js → ConversationComposer-DPWu3HvK.js} +1 -1
- package/dist/client/assets/{ConversationFeedRows-DygDfQn_.js → ConversationFeedRows-MhcPfxUr.js} +1 -1
- package/dist/client/assets/{ConversationHeader-C3sg0ULI.js → ConversationHeader-Ce7TENb9.js} +1 -1
- package/dist/client/assets/{ConversationPanels-Dg4Y2GgX.js → ConversationPanels-D-b5SLO-.js} +2 -2
- package/dist/client/assets/ConversationScreen-C5HnXd5w.css +1 -0
- package/dist/client/assets/{ConversationScreen-CjWWmuuh.js → ConversationScreen-D77SoLos.js} +1 -1
- package/dist/client/assets/{ConversationStatus-BhVIYQza.js → ConversationStatus-lIvSKRic.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CdojnRMG.js +1 -0
- package/dist/client/assets/{DataTable-oJP339bX.js → DataTable-DFacT2uu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CH02HAVw.js → DispatchAftermath-D797PbCe.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DmtFisY9.js → DocumentFocusViewer-CetjnYut.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-84b9I3fy.js → EmbeddableSurfacesLab-JczLmmF-.js} +1 -1
- package/dist/client/assets/{EmptyState-BnDda92b.js → EmptyState-uQbB-bvP.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Dg7_88pv.js → FileViewerPane-ebbCtnHE.js} +1 -1
- package/dist/client/assets/{FlightObserveScreen-DL3Xhl0h.js → FlightObserveScreen-sqvt7HUO.js} +1 -1
- package/dist/client/assets/{FollowScreen-DcFBqr6l.js → FollowScreen-Bfu2_KtU.js} +1 -1
- package/dist/client/assets/{HarnessMark-DGZ6o6Ct.js → HarnessMark-CEzmPFHC.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-DTDL-XaA.js → HarnessesScreen-CGhRsqD5.js} +1 -1
- package/dist/client/assets/{HerdrSession-DV2hD6Yh.js → HerdrSession-BDLa_rrK.js} +1 -1
- package/dist/client/assets/{HomeHero-CENwVZ45.js → HomeHero-DdxTQ-6a.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-PgiZUkd_.js → HostAdvisorView-BAUi5ZxX.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-DNQjeWZO.js → KnowledgeSearchInspector-GjmxYBi_.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchScreen-Bj80IgR0.js → KnowledgeSearchScreen-CRei9pyl.js} +1 -1
- package/dist/client/assets/{LaneToolHoverCard-197xYmRp.js → LaneToolHoverCard-DCY-m0JK.js} +1 -1
- package/dist/client/assets/{LaneTraceDetailSheet-BztwvOv9.js → LaneTraceDetailSheet-CFsCvKa3.js} +1 -1
- package/dist/client/assets/{LaneTraceEventFocus-C9cmqxnK.js → LaneTraceEventFocus-BfKZ7G5c.js} +1 -1
- package/dist/client/assets/{MeshCanvas-C3_2p9B6.js → MeshCanvas-CZYHLTvw.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-ZTjYWXTZ.js → MeshCanvasMinimap-D3mJ78CM.js} +1 -1
- package/dist/client/assets/{MeshScreen-lJKaOyGB.js → MeshScreen-dxNxRtKm.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-CBjHbAZw.js → MeshTopologyView-A-wh0Ad1.js} +2 -2
- package/dist/client/assets/{MessagesScreen-D6MVLvdg.js → MessagesScreen-CR5v-WIE.js} +1 -1
- package/dist/client/assets/{MissionContextRail-DXkrbcnZ.js → MissionContextRail-MTL2EAnr.js} +1 -1
- package/dist/client/assets/{MissionControlView-BCH-Zsp4.js → MissionControlView-BGj1qnI2.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-DbAliOSF.js → MissionFocusOverlay-hWi6y87j.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-Bx6Pg8_O.js → MissionLeftAgentRow-BSRRiiig.js} +1 -1
- package/dist/client/assets/{MissionLogPane-D06c29Y8.js → MissionLogPane-bbG_pM9B.js} +1 -1
- package/dist/client/assets/{NewAgentModal-C18Ajovd.js → NewAgentModal-Ctixol4_.js} +1 -1
- package/dist/client/assets/{NewChatComposer-Bgqes0UQ.js → NewChatComposer-BPsg8shF.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-DpHS2Wmt.js → NewChatOrigin-CCiPg_WR.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-Cmhwai4X.js → ObserveEmbedScreen-Be87Chod.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-C1f5oize.js → ObserveTextFlow-CKYltTPJ.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-D85P6RAk.js → ObservedTopologyPanel-CfHYu-4Z.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-IDI4fuUE.js → OpenScoutAppShell-DPeP1vtK.js} +2 -2
- package/dist/client/assets/{OpsAgentsView-yt0JavoB.js → OpsAgentsView-dEtw9yt-.js} +1 -1
- package/dist/client/assets/OpsScreen-QXRJY8Vf.js +1 -0
- package/dist/client/assets/OpsSubnav-BK9Fj3gU.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BjykZ2Xd.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-IDEpKZvI.js → ProjectAgentProfileBar-B4RqrI0Q.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-Bh_aISs-.js → ProjectAgentProfileHero-Bc0g8rhW.js} +1 -1
- package/dist/client/assets/{ProjectsInbox-B8Srlklk.js → ProjectsInbox--ZIqo-IE.js} +1 -1
- package/dist/client/assets/{ProjectsRail-DqAbdvCf.js → ProjectsRail-CzS0qTCI.js} +1 -1
- package/dist/client/assets/ProjectsScreen-0gx7f30h.js +1 -0
- package/dist/client/assets/{ProjectsThreadAside-DpkjYLL2.js → ProjectsThreadAside-BsQRFbdy.js} +1 -1
- package/dist/client/assets/{Provider-Ve8yXaWR.js → Provider-Cd-QZltN.js} +1 -1
- package/dist/client/assets/{RailRow-C4GNGR80.js → RailRow-BY6fxePa.js} +1 -1
- package/dist/client/assets/{RawSessionsTable-Co3vzwsf.js → RawSessionsTable-CbopOF34.js} +1 -1
- package/dist/client/assets/{RealtimeVoiceScreen-DMd1CBAf.js → RealtimeVoiceScreen-CU4uXz4C.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-C97Euf4s.js → RepoDiffEmbedScreen-Cr1SL5ht.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DUKLzkrW.js → RepoDiffPageScreen-DeC8fsh_.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-CovKjSgb.js → RepoDiffViewer-CiTOWK_Z.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-zIiEmh-e.js → RepoDiffViewerLazy-BU3V7Kwq.js} +2 -2
- package/dist/client/assets/{ReposScreen-BR1LqTf1.js → ReposScreen-BQwIShXf.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-BGsVicc2.js → ScoutDeckSurface-BncYKicb.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BMKW7hSu.js → ScoutSurface-DdVzN3DA.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-0O2iDRrF.js → ScoutbotFxLab-sLjfSKtS.js} +1 -1
- package/dist/client/assets/{SecondaryNav-cYTw2p39.js → SecondaryNav-CCQqTT3e.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-mNjT0R6j.js → SessionEmbedScreen-BrLMZJ3N.js} +1 -1
- package/dist/client/assets/{SessionObserve-zAlFbwFn.js → SessionObserve-pbozyqVv.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-BVawzqoE.js → SessionObserveEvidence-C54Xvbps.js} +1 -1
- package/dist/client/assets/{SessionRefScreen-BmKhf29o.js → SessionRefScreen-UVNVrwAf.js} +1 -1
- package/dist/client/assets/SessionsScreen-KeDb5gz4.js +1 -0
- package/dist/client/assets/SettingsDrawer-CWdj0VvN.js +3 -0
- package/dist/client/assets/SettingsDrawer-J-8x1eII.css +1 -0
- package/dist/client/assets/SettingsScreen-C7zJgZzj.js +1 -0
- package/dist/client/assets/{ShikiPane-DyEJdcvb.js → ShikiPane-CiVH-45m.js} +1 -1
- package/dist/client/assets/{SlidePanel-Dg8_styW.js → SlidePanel-BLrLF9dt.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-DMrSssNZ.js → SpriteAvatar-vpHO-rXs.js} +1 -1
- package/dist/client/assets/{StatusPill-NFFnphtx.js → StatusPill-a3XBw1GG.js} +1 -1
- package/dist/client/assets/{TailView-BfObcZu3.js → TailView-C3rjOV7i.js} +1 -1
- package/dist/client/assets/{Terminal-Dr-M9U4u.js → Terminal-CMQFmHnn.js} +1 -1
- package/dist/client/assets/{TerminalEmbedScreen-BmyZkonh.js → TerminalEmbedScreen-GvpoGERN.js} +1 -1
- package/dist/client/assets/{TerminalRelay-lJ2KdMCW.js → TerminalRelay-CIHlLVf1.js} +3 -3
- package/dist/client/assets/{TextDocumentSurface-C7fGlzY8.js → TextDocumentSurface-B29xZNlI.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BSeKIjnX.js → TmuxPeek-eVfqPB4m.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-BkIGTzgw.js → VoicePermissionsPanel-DpInOlVq.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Cwe-KWK4.js → WorkDetailScreen-DYwgGaJs.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-BBtKRBPv.js → WorkFilesViewer-C7H5fXaZ.js} +1 -1
- package/dist/client/assets/{activity-D4W2XZY2.js → activity-DTqqWiyV.js} +1 -1
- package/dist/client/assets/{addon-fit-Celjj2yn.js → addon-fit-CcaylYTX.js} +1 -1
- package/dist/client/assets/{addon-webgl-Cu4tJ21-.js → addon-webgl-B37iuzOG.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-Dv-_9dAw.js → agent-autocomplete-cOPLtuhM.js} +1 -1
- package/dist/client/assets/{agent-essentials-CngjUhQj.js → agent-essentials-DbbJm3ne.js} +1 -1
- package/dist/client/assets/{agent-identity-DzHGhLdJ.js → agent-identity-CIMT7oV6.js} +1 -1
- package/dist/client/assets/{agent-specialization-CNrsRbKA.js → agent-specialization-D3-sqwhU.js} +1 -1
- package/dist/client/assets/{arc.es-DNT50Y-_.js → arc.es-BRPqOKIx.js} +1 -1
- package/dist/client/assets/{archive-DH49QqFG.js → archive-DPMdoW_D.js} +1 -1
- package/dist/client/assets/{arrow-left-i-h6JAgs.js → arrow-left-B0CdJdAC.js} +1 -1
- package/dist/client/assets/{arrow-right-B0Yi01Zr.js → arrow-right-YRBoTTyf.js} +1 -1
- package/dist/client/assets/{arrow-up-right-RBC6k8nn.js → arrow-up-right-CilNLf4t.js} +1 -1
- package/dist/client/assets/{bot-r2IuAuJd.js → bot-Ba3gcRVa.js} +1 -1
- package/dist/client/assets/{check-Bfs7hMb1.js → check-BdovFDz8.js} +1 -1
- package/dist/client/assets/{chevron-down-Da5tV19_.js → chevron-down-Jh540uf3.js} +1 -1
- package/dist/client/assets/{chevron-right-BMqtBds_.js → chevron-right-CV7sEVBS.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-BUVYXXAp.js → chunk-HRAB3GC3-BYQZ1LOn.js} +1 -1
- package/dist/client/assets/{clock-DaKLp6Xd.js → clock-DpfYdWcr.js} +1 -1
- package/dist/client/assets/{code-xml-ByQsfOI_.js → code-xml-CPzpZkhu.js} +1 -1
- package/dist/client/assets/{compass-BepM5iWH.js → compass-D5Io6BIV.js} +1 -1
- package/dist/client/assets/{content-Bgl_X3ao.js → content-3b_jmxEx.js} +1 -1
- package/dist/client/assets/content-B-i0XY-t.js +1 -0
- package/dist/client/assets/content-BD-DNFmb.js +1 -0
- package/dist/client/assets/content-BGeo5tgd.js +1 -0
- package/dist/client/assets/content-BMvXPLiQ.js +1 -0
- package/dist/client/assets/content-BWTbfMDg.js +1 -0
- package/dist/client/assets/content-BwCmeUmF.js +1 -0
- package/dist/client/assets/content-C1K3NcZa.js +1 -0
- package/dist/client/assets/{content-Cv2tSAbv.js → content-C34J5_Af.js} +1 -1
- package/dist/client/assets/content-CGRtIS2m.js +1 -0
- package/dist/client/assets/content-CIJo_-JS.js +1 -0
- package/dist/client/assets/content-CvqIqVAV.js +1 -0
- package/dist/client/assets/content-DRnwm-Vu.js +1 -0
- package/dist/client/assets/{content-5hnDC9WE.js → content-Dh39SSvP.js} +1 -1
- package/dist/client/assets/content-DoypqDj5.js +1 -0
- package/dist/client/assets/content-n3mvc6NQ.js +1 -0
- package/dist/client/assets/{conversation-icons-C4amK8Sa.js → conversation-icons-bHIIZ9z3.js} +1 -1
- package/dist/client/assets/{conversation-model-CigSPlKA.js → conversation-model-CIzM7aXT.js} +1 -1
- package/dist/client/assets/conversation-motion-features-CrP5K-dk.js +1 -0
- package/dist/client/assets/{copy-De4s38o2.js → copy-DQAM0eSY.js} +1 -1
- package/dist/client/assets/{cpu-Bc268H9Q.js → cpu-CtQc0Z9D.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DLlxGjKt.js → createLucideIcon-Da0lq809.js} +1 -1
- package/dist/client/assets/discover-DdkMhTAV.js +2 -0
- package/dist/client/assets/embed-entry-DoSM1GZB.js +2 -0
- package/dist/client/assets/{external-link-BGHC_naA.js → external-link-BheHazeW.js} +1 -1
- package/dist/client/assets/{eye-BeCSqJn1.js → eye-B908WSFH.js} +1 -1
- package/dist/client/assets/{file-code-corner-CX53Cd9y.js → file-code-corner-C5Pc6znt.js} +1 -1
- package/dist/client/assets/{file-text-BVhkMWyC.js → file-text-BGVkHS4_.js} +1 -1
- package/dist/client/assets/{gauge-CPcEPmNt.js → gauge-sc_gb5Zw.js} +1 -1
- package/dist/client/assets/{gestures-BXIGYk_p.js → gestures-AzPBSf20.js} +1 -1
- package/dist/client/assets/{git-branch-q8Ayc8py.js → git-branch-CdJU49Af.js} +1 -1
- package/dist/client/assets/{home-moving-signal-Dm2Z2x0p.js → home-moving-signal-CZo2bYBi.js} +1 -1
- package/dist/client/assets/{home-now-card-xU5LGP7q.js → home-now-card-DgxfZHcR.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-Djhy6ax0.js → home-now-card-nano-iwd10r9G.js} +1 -1
- package/dist/client/assets/{hooks-CdKx1CxP.js → hooks-CeCCO6Yg.js} +1 -1
- package/dist/client/assets/{index-DhfOMK0D.js → index-BIiI9gfa.js} +1 -1
- package/dist/client/assets/index-CD2foMB8.js +1 -0
- package/dist/client/assets/{index-D7UEHxaY.js → index-DReHD_4U.js} +1 -1
- package/dist/client/assets/{index-Bli6bTLU.js → index-NRbRrZw-.js} +6 -6
- package/dist/client/assets/{inspector-panel-B8pigRsg.js → inspector-panel-CBf8pW7s.js} +1 -1
- package/dist/client/assets/{keyboard-nav-7iEtvu9P.js → keyboard-nav-feLCB3Zm.js} +1 -1
- package/dist/client/assets/{lane-roster-store-pHT3TAVs.js → lane-roster-store-BAmj273z.js} +1 -1
- package/dist/client/assets/{layers-BiZA-Clc.js → layers-D9fblkql.js} +1 -1
- package/dist/client/assets/{layout-grid-DMpv9CZM.js → layout-grid-Vd1chalc.js} +1 -1
- package/dist/client/assets/left-41_3QKk1.js +1 -0
- package/dist/client/assets/{left-Dy403II2.js → left-B3ofA1Pr.js} +2 -2
- package/dist/client/assets/{left-BhgU6NOA.js → left-BWBZQhxQ.js} +1 -1
- package/dist/client/assets/{left-CY_FGnN7.js → left-BhA6essi.js} +1 -1
- package/dist/client/assets/{left-Cq8mjamr.js → left-BmTKCv4f.js} +1 -1
- package/dist/client/assets/{left-Dnqla0b5.js → left-CCGR6tIF.js} +1 -1
- package/dist/client/assets/{left-BhZhSrS2.js → left-Dfwzkwh_.js} +1 -1
- package/dist/client/assets/{left-advisor-oOAtJ9YE.js → left-advisor-yrzW1Kwz.js} +1 -1
- package/dist/client/assets/{left-agents-TIKe8vW8.js → left-agents-Bgahk0FF.js} +1 -1
- package/dist/client/assets/{left-default-owH0Lwxo.js → left-default-CtkfAquc.js} +1 -1
- package/dist/client/assets/{left-lanes-BE_co2lP.js → left-lanes-CpujaVN3.js} +1 -1
- package/dist/client/assets/{left-mission-C_nWUtfA.js → left-mission-Bbd-fW6W.js} +1 -1
- package/dist/client/assets/{library-BSVrjn_m.js → library-Dx14WNGd.js} +1 -1
- package/dist/client/assets/{loader-circle-DoT8gpw6.js → loader-circle-Be0T8xv2.js} +1 -1
- package/dist/client/assets/{local-agents-BMadXuP1.js → local-agents-Q6KQ12B9.js} +1 -1
- package/dist/client/assets/{mentions-Cd6XticV.js → mentions-KNASbAjG.js} +1 -1
- package/dist/client/assets/{mesh-ops-C0zCLTR8.js → mesh-ops-C-i8OMiM.js} +1 -1
- package/dist/client/assets/{mesh-view-store-Cpqil_2D.js → mesh-view-store-B0lqpw8M.js} +1 -1
- package/dist/client/assets/{message-circle-44KSmbvQ.js → message-circle-2v9Udia0.js} +1 -1
- package/dist/client/assets/{message-markup-DAnnGpWr.js → message-markup-BP2nH9kQ.js} +1 -1
- package/dist/client/assets/{message-square-DlY4EneU.js → message-square-DURSOrUr.js} +1 -1
- package/dist/client/assets/{mission-control-store-DtjtRs9Z.js → mission-control-store-HeCy97KT.js} +1 -1
- package/dist/client/assets/{observe-DL5_8-Zj.js → observe-DkAhvkfn.js} +1 -1
- package/dist/client/assets/{page-status-CW8co39E.js → page-status-CEP5pGf3.js} +1 -1
- package/dist/client/assets/{persistent-state-DYjP8lqN.js → persistent-state-Bm_0TmZL.js} +1 -1
- package/dist/client/assets/{plus-64n9qucr.js → plus-ZReaTFF-.js} +1 -1
- package/dist/client/assets/{profile-BkmuseW7.js → profile-Y0X7HZHc.js} +1 -1
- package/dist/client/assets/{projects-inbox-C0umZMSY.js → projects-inbox-Cbfj4Hx7.js} +1 -1
- package/dist/client/assets/{provider-CX9EWecp.js → provider-Bq0ScH3v.js} +1 -1
- package/dist/client/assets/{proxy-C35W-YHZ.js → proxy-DtC2iXnT.js} +1 -1
- package/dist/client/assets/{radio-BjpQTKT0.js → radio-BC9TO5Pl.js} +1 -1
- package/dist/client/assets/{refresh-cw-IgN2fZLM.js → refresh-cw-C4E58VJK.js} +1 -1
- package/dist/client/assets/resolve-panes-BI3WdDS-.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-_g0pIxOr.js +1 -0
- package/dist/client/assets/{right-B3PQUHd5.js → right-BA0F8fPI.js} +1 -1
- package/dist/client/assets/{right-B96CBzrV.js → right-BarpRgcv.js} +1 -1
- package/dist/client/assets/{right-BPirlFC8.js → right-C4GXB45w.js} +1 -1
- package/dist/client/assets/{right-DqiVyo8v.js → right-CIzaNH58.js} +1 -1
- package/dist/client/assets/{right-C2aOC2li.js → right-CXetlD8X.js} +1 -1
- package/dist/client/assets/{right-CtPJjgOV.js → right-CnRcQS_I.js} +1 -1
- package/dist/client/assets/{right-BVWYPIFX.js → right-D2_rmbAH.js} +1 -1
- package/dist/client/assets/{right-SfSu0zHC.js → right-Dqp--KwX.js} +1 -1
- package/dist/client/assets/{right-BUP2Ro_M.js → right-HJJzRuGD.js} +1 -1
- package/dist/client/assets/{right-BoAJxwA3.js → right-WCMb8YXJ.js} +1 -1
- package/dist/client/assets/{rocket-DnmN_YOD.js → rocket-BahfIwFz.js} +1 -1
- package/dist/client/assets/{router-B0YclXYg.js → router-Bx1tiwVe.js} +1 -1
- package/dist/client/assets/{scope-views-Z8aoAmtU.js → scope-views-CmG2X_S0.js} +1 -1
- package/dist/client/assets/{scout-voice-DvG_3stJ.js → scout-voice-BT3gYDhU.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-BJJyaPu2.js → scoutbot-markdown-DIhLsYxz.js} +1 -1
- package/dist/client/assets/{scroll-text-DRidbcse.js → scroll-text-uulNqrf7.js} +1 -1
- package/dist/client/assets/{search-BbgsEMXa.js → search-HmdKXdtR.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-DyC_P9Wx.js → secondaryNavConfig-BVQiyAXu.js} +1 -1
- package/dist/client/assets/{selection-bridge-CpzFGx3-.js → selection-bridge-n4wNTm1B.js} +1 -1
- package/dist/client/assets/{send-horizontal-BXo2uz3Z.js → send-horizontal-DOjHkZCD.js} +1 -1
- package/dist/client/assets/{server-Dt3tpiBj.js → server-CX-xQjJA.js} +1 -1
- package/dist/client/assets/{session-catalog-CUQ8LUJY.js → session-catalog-b7B1Sof1.js} +1 -1
- package/dist/client/assets/{session-table-B4JOKevn.js → session-table-Djain1Qr.js} +1 -1
- package/dist/client/assets/{settings-BzWCF3NF.js → settings-BpKRzxOD.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-7V8B3xsf.js → sliders-horizontal-D2O6QiDN.js} +1 -1
- package/dist/client/assets/{sparkles-ytTwpCbZ.js → sparkles-CgTby-ap.js} +1 -1
- package/dist/client/assets/{sse-CSozY6mp.js → sse-QSbhyq9A.js} +1 -1
- package/dist/client/assets/{tail-events-CrN-Rmxj.js → tail-events-B7BrDaFi.js} +1 -1
- package/dist/client/assets/{terminal-BiNIXhna.js → terminal-DNZTCr6a.js} +1 -1
- package/dist/client/assets/{terminal-relay-pSm7_An6.js → terminal-relay-C2TUIuh1.js} +1 -1
- package/dist/client/assets/{terminal-takeover-CtA3wcXh.js → terminal-takeover-BArLfNtd.js} +1 -1
- package/dist/client/assets/{text-BR9Bap0E.js → text-B2UZi3l9.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C0bEXFeH.js → use-conversation-list-htp0Ui63.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-CK4aw-3G.js → use-fleet-active-asks-BhuTn5mV.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-QixBijmT.js → use-mesh-ops-items-CD-qsvNX.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-BLn59zLn.js → use-reduced-motion-0fAsybdo.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-JKb1EhFh.js → use-scout-dev-flags-DV_I6URU.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-6N8b7qsU.js → useAgentHoverCard-BIrm8esH.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-4atpGgFw.js +1 -0
- package/dist/client/assets/{usePersistentState-DOEahRlt.js → usePersistentState-InmPXIN4.js} +1 -1
- package/dist/client/assets/{usePierreRuntime-Bq6mXrgd.js → usePierreRuntime-CVTMzChM.js} +1 -1
- package/dist/client/assets/{wrench-CQvdf7KT.js → wrench-DwFKomxg.js} +1 -1
- package/dist/client/assets/{x-BJyPzFnn.js → x-DuzAbpk5.js} +1 -1
- package/dist/client/assets/{xterm-D6dE_wMr.js → xterm-xQGYNyB-.js} +1 -1
- package/dist/client/assets/{zap-rw7uwZht.js → zap-CocRNtyr.js} +1 -1
- package/dist/client/crew/brik-bust.webp +0 -0
- package/dist/client/crew/brik-chip-id.webp +0 -0
- package/dist/client/crew/lulu-bust.webp +0 -0
- package/dist/client/crew/milo-bust.webp +0 -0
- package/dist/client/crew/milo-chip-id.webp +0 -0
- package/dist/client/crew/nori-bust.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/blink-half.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/rest.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-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/crew/sprout-bust.webp +0 -0
- package/dist/client/crew/sprout-chip-id.webp +0 -0
- package/dist/client/crew/vex-bust.webp +0 -0
- package/dist/client/crew/vex-chip-id.webp +0 -0
- package/dist/client/crew/wrench-bust.webp +0 -0
- package/dist/client/crew/wrench-chip-id.webp +0 -0
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AgentAvatar-B1xvQ7ej.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BJLwXSNp.js +0 -1
- package/dist/client/assets/AgentsSubnav-3_vpn2bT.js +0 -1
- package/dist/client/assets/ConversationScreen-BP5tdz2k.css +0 -1
- package/dist/client/assets/CrewWorkspaces-B6YIyw1z.css +0 -1
- package/dist/client/assets/CrewWorkspaces-CDU-wy1Y.js +0 -1
- package/dist/client/assets/OpsScreen-C3yNQqJE.js +0 -1
- package/dist/client/assets/OpsSubnav-BijKI3yG.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-DnIeC16r.js +0 -1
- package/dist/client/assets/ProjectsScreen-DKHQ2iEv.js +0 -1
- package/dist/client/assets/SessionsScreen-CsSqjIY2.js +0 -1
- package/dist/client/assets/SettingsDrawer-Dsj-On_x.css +0 -1
- package/dist/client/assets/SettingsDrawer-DwYQTGi8.js +0 -3
- package/dist/client/assets/SettingsScreen-Btaku7YM.js +0 -1
- package/dist/client/assets/content-BRFZ-a6m.js +0 -1
- package/dist/client/assets/content-BYykncDo.js +0 -1
- package/dist/client/assets/content-Be6yyWbJ.js +0 -1
- package/dist/client/assets/content-BopJW1Zx.js +0 -1
- package/dist/client/assets/content-Bv2sfg0w.js +0 -1
- package/dist/client/assets/content-CMBiIZTg.js +0 -1
- package/dist/client/assets/content-CPVqvf5o.js +0 -1
- package/dist/client/assets/content-CbwyFqdI.js +0 -1
- package/dist/client/assets/content-ClQjAWYi.js +0 -1
- package/dist/client/assets/content-DFFe3-Ot.js +0 -1
- package/dist/client/assets/content-DY5hwBmm.js +0 -1
- package/dist/client/assets/content-_IXoxGno.js +0 -1
- package/dist/client/assets/content-j_tewJdE.js +0 -1
- package/dist/client/assets/conversation-motion-features-_95aZx_1.js +0 -1
- package/dist/client/assets/discover-DOlk1hG7.js +0 -2
- package/dist/client/assets/embed-entry-BqDJfa87.js +0 -2
- package/dist/client/assets/index-DFdlQs_c.js +0 -1
- package/dist/client/assets/left-BayK4ocL.js +0 -1
- package/dist/client/assets/resolve-panes-CCqRkQdM.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-JkxY8qsV.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-D-hVKzM9.js +0 -1
package/dist/client/assets/{KnowledgeSearchScreen-Bj80IgR0.js → KnowledgeSearchScreen-CRei9pyl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-Bli6bTLU.js";/* empty css */import{a as F}from"./api-DEHEgJ9m.js";import{d as we}from"./time-Dhsh_2EG.js";import{u as ve}from"./Provider-Ve8yXaWR.js";import{o as le,p as Ce,q as Ee,t as Ke,v as oe,K as m,S as qe,x as fe,y as Le,z as Ae,A as Ie,B as ce,C as ue,D as Te,E as He,F as Re,G as $e,H as De,I as Fe}from"./router-B0YclXYg.js";import{S as Me}from"./search-BbgsEMXa.js";import{X as We}from"./x-BJyPzFnn.js";import{L as de}from"./loader-circle-DoT8gpw6.js";import{c as Oe}from"./createLucideIcon-DLlxGjKt.js";import{S as Pe}from"./sparkles-ytTwpCbZ.js";import{C as Ue}from"./chevron-down-Da5tV19_.js";import{C as ze}from"./clock-DaKLp6Xd.js";import"./provider-CX9EWecp.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";const _e=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Be=Oe("funnel",_e);function y(i){return new Intl.NumberFormat("en-US").format(i||0)}function Ge({text:i,query:a}){return e.jsx(e.Fragment,{children:De(i,a).map((o,c)=>o.match?e.jsx("mark",{children:o.text},c):e.jsx("span",{children:o.text},c))})}function Je(i,a){i.target===i.currentTarget&&(i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),a()))}async function Xe(){return F("/api/knowledge/status")}async function Qe(i){const a=new URLSearchParams;for(const o of i)a.append("key",o);return a.set("limit","200"),F(`/api/knowledge/search-primitives?${a.toString()}`)}async function G(i,a){const o=new URLSearchParams({q:i,limit:String(m.hitLimit)});if(a.sourceKinds.length>0)for(const u of a.sourceKinds)o.append("sourceKind",u);for(const u of a.harness)o.append("harness",u);for(const u of a.project)o.append("project",u);const c=$e(a.timeWindow);return c!=null&&o.set("updatedAfterMs",String(c)),F(`/api/knowledge/search?${o.toString()}`)}async function he(i=!1){return F("/api/knowledge/sessions/index",{method:"POST",body:JSON.stringify({days:m.days,limit:m.sessionLimit,force:i})})}const Ve=Le;function I({active:i,onClick:a,count:o,label:c,ariaLabel:u}){return e.jsxs("button",{type:"button",className:`ks-chip${i?" ks-chip--active":""}`,onClick:a,"aria-pressed":i,"aria-label":u??c,children:[e.jsx("span",{className:"ks-chip-label",children:c}),typeof o=="number"?e.jsx("span",{className:"ks-chip-count","aria-hidden":"true",children:y(o)}):null]})}function xe(i){return i&&i.split(/[\s_-]+/u).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function me(i,a,o=6){return i?i.filter(c=>c.key===a&&c.value.length>0).sort((c,u)=>u.count-c.count||c.value.localeCompare(u.value)).slice(0,o):[]}function pe(i){return i.sourceKinds.length>0||i.harness.length>0||i.project.length>0||i.timeWindow!=="all"}function Ye(i){const a=[];return i.sourceKinds.length>0&&a.push(i.sourceKinds.map(o=>fe[o]??o).join(" + ")),i.harness.length>0&&a.push(i.harness.map(xe).join(" + ")),i.project.length>0&&a.push(i.project.join(" + ")),i.timeWindow!=="all"&&a.push(Fe(i.timeWindow)),a.length>0?`Filters: ${a.join(" · ")}`:""}function Fs({navigate:i,mode:a,hitId:o,routeFilters:c}){const{selectedKnowledgeHit:u,inspectKnowledgeHit:g,clearKnowledgeHit:S}=ve(),ke=l.useMemo(()=>c||(typeof window>"u"?le():Ce(window.location.search)),[c]),[E,T]=l.useState(null),[J,je]=l.useState(null),[n,M]=l.useState(ke),[w,X]=l.useState([]),[W,Q]=l.useState(!1),[K,H]=l.useState(!1),[O,b]=l.useState(null),[ye,R]=l.useState(!1),[V,Y]=l.useState(!1),q=l.useRef(n);q.current=n;const p=(E?.chunks??0)>0,$=E?.activeJobs[0]??null,v=l.useMemo(()=>Ee(w),[w]),Z=K||!!$,L=n.query.trim(),P=Ke(n);l.useEffect(()=>{c&&M(s=>oe(s,c)?s:c)},[c]);const f=l.useMemo(()=>{const s=[];for(const t of v)s.push(...t.moments);return s},[v]),C=l.useCallback((s,t)=>{X(t.hits),T(t.status);const d=(o?t.hits.find(x=>x.id===o):void 0)??t.hits[0];d?g(d,s.query,s):S()},[o,g,S]),U=l.useCallback(async s=>{const t=s.query.trim();if(!t){X([]),S();return}Q(!0);try{b(null),C(s,await G(t,s))}catch(r){b(r instanceof Error?r.message:String(r))}finally{Q(!1)}},[C,S]),ee=l.useCallback(async(s=!1)=>{H(!0);try{b(null);const t=await he(s);T(t.status),R(!0);const r=q.current;t.status.chunks>0&&r.query.trim()&&C(r,await G(r.query.trim(),r))}catch(t){b(t instanceof Error?t.message:String(t))}finally{H(!1)}},[C]);l.useEffect(()=>{let s=!1;return(async()=>{try{const t=await Xe();if(s)return;T(t),R(!0),b(null)}catch{}if(!s){H(!0);try{b(null);const t=await he(!1);if(s)return;T(t.status),R(!0);const r=q.current;t.status.chunks>0&&r.query.trim()&&C(r,await G(r.query.trim(),r))}catch(t){s||(b(t instanceof Error?t.message:String(t)),R(!0))}finally{s||H(!1)}}})(),()=>{s=!0}},[C]),l.useEffect(()=>{if(!p||V)return;let s=!1;return(async()=>{try{const t=await Qe(["harness","project","sourceKind"]);s||(je(t),Y(!0))}catch{s||Y(!0)}})(),()=>{s=!0}},[p,V]),l.useEffect(()=>{if(!p)return;const s=window.setTimeout(()=>{U(n)},m.debounceMs);return()=>window.clearTimeout(s)},[n,p,U]);const ge=s=>{if(s.preventDefault(),!p&&!K){ee(!1);return}U(n)},j=l.useCallback(s=>{M(t=>{const r={...t,...s};return oe(t,r)?t:(i({view:"search",...a?{mode:a}:{},filters:r},{replace:!0}),r)})},[a,i]),A=l.useCallback(()=>{const s=le();M(s),i({view:"search",...a?{mode:a}:{},filters:s},{replace:!0})},[a,i]),be=l.useCallback(()=>{f[0]&&g(f[0],q.current.query)},[f,g]);l.useEffect(()=>{function s(t){const r=t.target,d=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);if(t.key==="/"&&!d){t.preventDefault();const x=document.querySelector(".ks-search-input");x?.focus(),x?.select()}else if(t.key==="Escape"&&!d)f.length>0?S():A();else if(!d&&(t.key==="j"||t.key==="k")){if(f.length===0)return;t.preventDefault();const x=u?f.findIndex(z=>z.id===u.id):-1,N=t.key==="j"?Math.min(f.length-1,x+1):Math.max(0,x-1),D=f[N];D&&g(D,q.current.query)}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[f,g,S,u,A]);const Ne=E?we(E.generatedAt)||"just now":"—",Se=Z?$?`Indexing ${y($.progress.indexed??0)} of ${y($.progress.discovered??0)}`:p?`Refreshing last ${m.days} days in the background`:`Building last ${m.days} days of sessions`:p?`${y(E?.chunks??0)} moments · last ${m.days} days · updated ${Ne}`:ye?"No index yet":"Loading index",se=me(J?.facets,"harness"),te=me(J?.facets,"project");return e.jsxs("main",{className:"ks-page",children:[e.jsxs("div",{className:"ks-shell",children:[e.jsx("header",{className:"ks-header",children:e.jsxs("div",{className:"ks-header-titles",children:[e.jsx("span",{className:"ks-eyebrow",children:"Search"}),e.jsx("h1",{children:"Find anything you ran, opened, or decided"}),e.jsxs("p",{children:["Search across sessions, skills, MCP tools, codebase, and context packs from the last ",m.days," days."]})]})}),e.jsxs("form",{className:"ks-search-form",onSubmit:ge,role:"search",children:[e.jsx(Me,{size:17,strokeWidth:1.75,"aria-hidden":"true"}),e.jsx("input",{value:n.query,onChange:s=>j({query:s.target.value}),placeholder:"Search topics, files, decisions, agents…",className:"ks-search-input",spellCheck:!1,autoFocus:!0,"aria-label":"Search OpenScout knowledge"}),n.query?e.jsx("button",{type:"button",className:"ks-search-clear",onClick:()=>j({query:""}),"aria-label":"Clear search",children:e.jsx(We,{size:14,"aria-hidden":"true"})}):e.jsx("span",{className:"ks-search-hint","aria-hidden":"true",children:"/"}),W?e.jsx(de,{size:15,className:"ks-spin","aria-hidden":"true"}):null]}),e.jsxs("section",{className:"ks-filterbar","aria-label":"Search filters",children:[e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(Be,{size:12,"aria-hidden":"true"}),"Source"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Source kind filters",children:qe.map(s=>e.jsx(I,{active:n.sourceKinds.includes(s),onClick:()=>j({sourceKinds:n.sourceKinds.includes(s)?n.sourceKinds.filter(t=>t!==s):[...n.sourceKinds,s]}),label:fe[s]??s},s))})]}),se.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(Pe,{size:12,"aria-hidden":"true"}),"Agent"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Harness filters",children:se.map(s=>e.jsx(I,{active:n.harness.includes(s.value),onClick:()=>j({harness:n.harness.includes(s.value)?n.harness.filter(t=>t!==s.value):[...n.harness,s.value]}),label:xe(s.value),count:s.count},`harness:${s.value}`))})]}):null,te.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(Ue,{size:12,"aria-hidden":"true"}),"Project"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Project filters",children:te.map(s=>e.jsx(I,{active:n.project.includes(s.value),onClick:()=>j({project:n.project.includes(s.value)?n.project.filter(t=>t!==s.value):[...n.project,s.value]}),label:s.value,count:s.count},`project:${s.value}`))})]}):null,e.jsxs("div",{className:"ks-filterbar-row ks-filterbar-row--inline",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(ze,{size:12,"aria-hidden":"true"}),"Time"]}),e.jsxs("div",{className:"ks-chip-row",role:"group","aria-label":"Time window filter",children:[e.jsx(I,{active:n.timeWindow==="all",onClick:()=>j({timeWindow:"all"}),label:"Any time"}),Ve.map(s=>e.jsx(I,{active:n.timeWindow===s.value,onClick:()=>j({timeWindow:s.value}),label:s.label},s.value))]}),pe(n)?e.jsx("button",{type:"button",className:"ks-clear-all",onClick:A,children:"Clear filters"}):null]})]}),O?e.jsx("section",{className:"ks-error",role:"alert",children:O}):null,!p&&!O?e.jsxs("div",{className:"ks-empty-state",children:[e.jsx("strong",{children:K?"Preparing your session index":"Preparing search"}),e.jsxs("span",{children:["First load builds the last ",m.days," days"," ","(up to ",y(m.sessionLimit)," sessions). You can keep this page open — results appear as soon as the index is ready."]})]}):null,p?e.jsxs("div",{className:"ks-hit-list",role:"listbox","aria-label":"Search results",children:[e.jsxs("div",{className:"ks-hit-list-head","aria-live":"polite",children:[e.jsx("span",{children:W?"Searching…":L?`${y(v.length)} session${v.length===1?"":"s"}`:"Ready"}),L&&w.length>0?e.jsxs("span",{className:"ks-hit-list-meta",children:[y(w.length)," moment",w.length===1?"":"s",P?e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"ks-text-action",onClick:A,children:"Clear filters"})]}):null]}):null]}),L&&v.length===0&&!W?e.jsxs("div",{className:"ks-empty-hit",children:[e.jsxs("strong",{children:["No matches for “",L,"”"]}),e.jsxs("span",{children:["Try a project name, file path, or topic from recent work",P?", or clear one of the filters above.":"."]}),e.jsxs("div",{className:"ks-empty-hit-actions",children:[e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>j({query:""}),children:"Clear query"}),P?e.jsx("button",{type:"button",className:"ks-text-action",onClick:A,children:"Clear all filters"}):null]})]}):null,L?null:e.jsxs("div",{className:"ks-empty-hit ks-empty-hit--quiet",children:[e.jsx("strong",{children:"Start with a query"}),e.jsxs("span",{children:["Type a topic, file path, agent, or session hint. Use"," ",e.jsx("kbd",{children:"/"})," to focus this field, ",e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," to walk results, ",e.jsx("kbd",{children:"↵"})," to select, ",e.jsx("kbd",{children:"⌘↵"})," to open the session."]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:be,disabled:w.length===0,children:"Pick the first result automatically"})]}),e.jsx("div",{className:"ks-hit-list-body",children:v.map((s,t)=>{const r=s.best,d=Ae(r),x=Ie(r),N=ce(ue(r)),D=()=>{N&&i({view:"sessions",sessionId:N})},z=s.moments.some(k=>u?.id===k.id);return e.jsxs("section",{className:`ks-session${z?" ks-session--selected":""}`,"aria-label":`Session ${t+1}`,children:[e.jsxs("header",{className:"ks-session-head",children:[e.jsxs("div",{className:"ks-session-topline",children:[e.jsxs("div",{className:"ks-session-meta",children:[d.agent?e.jsx("span",{className:"ks-hit-chip",children:d.agent}):null,d.project?e.jsx("span",{children:d.project}):null,d.session?e.jsxs("span",{className:"ks-hit-session",title:N??d.session,children:["session ",d.session]}):null,e.jsxs("span",{className:"ks-session-count",children:[y(s.moments.length)," match",s.moments.length===1?"":"es"]})]}),d.when?e.jsx("time",{className:"ks-hit-when",children:d.when}):null]}),e.jsx("button",{type:"button",className:"ks-session-goal",onClick:D,title:N?"Open session":void 0,children:x})]}),e.jsx("div",{className:"ks-session-moments",children:s.moments.map(k=>{const ie=Te(k,n.query),ae=u?.id===k.id,_=He(k,n.query,200),ne=Re(k),B=()=>g(k,n.query),re=()=>{const h=ce(ue(k))??N;if(!h){B();return}i({view:"sessions",sessionId:h})};return e.jsx("article",{className:`ks-hit${ae?" ks-hit--selected":""}`,role:"option","aria-selected":ae,tabIndex:0,onClick:B,onDoubleClick:re,onKeyDown:h=>{if(h.key==="Enter"&&(h.metaKey||h.ctrlKey)){h.preventDefault(),re();return}Je(h,B)},children:e.jsxs("div",{className:"ks-hit-body",children:[ne.length>0?e.jsx("div",{className:"ks-hit-details ks-hit-details--moment","aria-label":"Turn",children:ne.map(h=>e.jsx("span",{className:"ks-hit-details-strong",children:h},h))}):null,e.jsx("h3",{className:"ks-hit-title",children:ie}),_&&_!==ie?e.jsx("p",{className:"ks-hit-snippet",children:e.jsx(Ge,{text:_,query:n.query})}):null]})},k.id)})})]},s.collectionId)})})]}):null]}),e.jsxs("footer",{className:"ks-foot-status","aria-live":"polite",children:[e.jsxs("span",{className:"ks-foot-status-facts",children:[Z?e.jsx(de,{size:12,className:"ks-spin","aria-hidden":"true"}):null,Se,pe(n)?e.jsxs(e.Fragment,{children:[" · ",Ye(n)]}):null]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>{ee(!0)},disabled:K,children:K?"Updating…":"Update index"})]})]})}export{Fs as KnowledgeSearchScreen};
|
|
1
|
+
import{r as l,j as e}from"./index-NRbRrZw-.js";/* empty css */import{a as F}from"./api-DEHEgJ9m.js";import{d as we}from"./time-Dhsh_2EG.js";import{u as ve}from"./Provider-Cd-QZltN.js";import{o as le,p as Ce,q as Ee,t as Ke,v as oe,K as m,S as qe,x as fe,y as Le,z as Ae,A as Ie,B as ce,C as ue,D as Te,E as He,F as Re,G as $e,H as De,I as Fe}from"./router-Bx1tiwVe.js";import{S as Me}from"./search-HmdKXdtR.js";import{X as We}from"./x-DuzAbpk5.js";import{L as de}from"./loader-circle-Be0T8xv2.js";import{c as Oe}from"./createLucideIcon-Da0lq809.js";import{S as Pe}from"./sparkles-CgTby-ap.js";import{C as Ue}from"./chevron-down-Jh540uf3.js";import{C as ze}from"./clock-DpfYdWcr.js";import"./provider-Bq0ScH3v.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";const _e=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Be=Oe("funnel",_e);function y(i){return new Intl.NumberFormat("en-US").format(i||0)}function Ge({text:i,query:a}){return e.jsx(e.Fragment,{children:De(i,a).map((o,c)=>o.match?e.jsx("mark",{children:o.text},c):e.jsx("span",{children:o.text},c))})}function Je(i,a){i.target===i.currentTarget&&(i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),a()))}async function Xe(){return F("/api/knowledge/status")}async function Qe(i){const a=new URLSearchParams;for(const o of i)a.append("key",o);return a.set("limit","200"),F(`/api/knowledge/search-primitives?${a.toString()}`)}async function G(i,a){const o=new URLSearchParams({q:i,limit:String(m.hitLimit)});if(a.sourceKinds.length>0)for(const u of a.sourceKinds)o.append("sourceKind",u);for(const u of a.harness)o.append("harness",u);for(const u of a.project)o.append("project",u);const c=$e(a.timeWindow);return c!=null&&o.set("updatedAfterMs",String(c)),F(`/api/knowledge/search?${o.toString()}`)}async function he(i=!1){return F("/api/knowledge/sessions/index",{method:"POST",body:JSON.stringify({days:m.days,limit:m.sessionLimit,force:i})})}const Ve=Le;function I({active:i,onClick:a,count:o,label:c,ariaLabel:u}){return e.jsxs("button",{type:"button",className:`ks-chip${i?" ks-chip--active":""}`,onClick:a,"aria-pressed":i,"aria-label":u??c,children:[e.jsx("span",{className:"ks-chip-label",children:c}),typeof o=="number"?e.jsx("span",{className:"ks-chip-count","aria-hidden":"true",children:y(o)}):null]})}function xe(i){return i&&i.split(/[\s_-]+/u).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function me(i,a,o=6){return i?i.filter(c=>c.key===a&&c.value.length>0).sort((c,u)=>u.count-c.count||c.value.localeCompare(u.value)).slice(0,o):[]}function pe(i){return i.sourceKinds.length>0||i.harness.length>0||i.project.length>0||i.timeWindow!=="all"}function Ye(i){const a=[];return i.sourceKinds.length>0&&a.push(i.sourceKinds.map(o=>fe[o]??o).join(" + ")),i.harness.length>0&&a.push(i.harness.map(xe).join(" + ")),i.project.length>0&&a.push(i.project.join(" + ")),i.timeWindow!=="all"&&a.push(Fe(i.timeWindow)),a.length>0?`Filters: ${a.join(" · ")}`:""}function Fs({navigate:i,mode:a,hitId:o,routeFilters:c}){const{selectedKnowledgeHit:u,inspectKnowledgeHit:g,clearKnowledgeHit:S}=ve(),ke=l.useMemo(()=>c||(typeof window>"u"?le():Ce(window.location.search)),[c]),[E,T]=l.useState(null),[J,je]=l.useState(null),[n,M]=l.useState(ke),[w,X]=l.useState([]),[W,Q]=l.useState(!1),[K,H]=l.useState(!1),[O,b]=l.useState(null),[ye,R]=l.useState(!1),[V,Y]=l.useState(!1),q=l.useRef(n);q.current=n;const p=(E?.chunks??0)>0,$=E?.activeJobs[0]??null,v=l.useMemo(()=>Ee(w),[w]),Z=K||!!$,L=n.query.trim(),P=Ke(n);l.useEffect(()=>{c&&M(s=>oe(s,c)?s:c)},[c]);const f=l.useMemo(()=>{const s=[];for(const t of v)s.push(...t.moments);return s},[v]),C=l.useCallback((s,t)=>{X(t.hits),T(t.status);const d=(o?t.hits.find(x=>x.id===o):void 0)??t.hits[0];d?g(d,s.query,s):S()},[o,g,S]),U=l.useCallback(async s=>{const t=s.query.trim();if(!t){X([]),S();return}Q(!0);try{b(null),C(s,await G(t,s))}catch(r){b(r instanceof Error?r.message:String(r))}finally{Q(!1)}},[C,S]),ee=l.useCallback(async(s=!1)=>{H(!0);try{b(null);const t=await he(s);T(t.status),R(!0);const r=q.current;t.status.chunks>0&&r.query.trim()&&C(r,await G(r.query.trim(),r))}catch(t){b(t instanceof Error?t.message:String(t))}finally{H(!1)}},[C]);l.useEffect(()=>{let s=!1;return(async()=>{try{const t=await Xe();if(s)return;T(t),R(!0),b(null)}catch{}if(!s){H(!0);try{b(null);const t=await he(!1);if(s)return;T(t.status),R(!0);const r=q.current;t.status.chunks>0&&r.query.trim()&&C(r,await G(r.query.trim(),r))}catch(t){s||(b(t instanceof Error?t.message:String(t)),R(!0))}finally{s||H(!1)}}})(),()=>{s=!0}},[C]),l.useEffect(()=>{if(!p||V)return;let s=!1;return(async()=>{try{const t=await Qe(["harness","project","sourceKind"]);s||(je(t),Y(!0))}catch{s||Y(!0)}})(),()=>{s=!0}},[p,V]),l.useEffect(()=>{if(!p)return;const s=window.setTimeout(()=>{U(n)},m.debounceMs);return()=>window.clearTimeout(s)},[n,p,U]);const ge=s=>{if(s.preventDefault(),!p&&!K){ee(!1);return}U(n)},j=l.useCallback(s=>{M(t=>{const r={...t,...s};return oe(t,r)?t:(i({view:"search",...a?{mode:a}:{},filters:r},{replace:!0}),r)})},[a,i]),A=l.useCallback(()=>{const s=le();M(s),i({view:"search",...a?{mode:a}:{},filters:s},{replace:!0})},[a,i]),be=l.useCallback(()=>{f[0]&&g(f[0],q.current.query)},[f,g]);l.useEffect(()=>{function s(t){const r=t.target,d=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);if(t.key==="/"&&!d){t.preventDefault();const x=document.querySelector(".ks-search-input");x?.focus(),x?.select()}else if(t.key==="Escape"&&!d)f.length>0?S():A();else if(!d&&(t.key==="j"||t.key==="k")){if(f.length===0)return;t.preventDefault();const x=u?f.findIndex(z=>z.id===u.id):-1,N=t.key==="j"?Math.min(f.length-1,x+1):Math.max(0,x-1),D=f[N];D&&g(D,q.current.query)}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[f,g,S,u,A]);const Ne=E?we(E.generatedAt)||"just now":"—",Se=Z?$?`Indexing ${y($.progress.indexed??0)} of ${y($.progress.discovered??0)}`:p?`Refreshing last ${m.days} days in the background`:`Building last ${m.days} days of sessions`:p?`${y(E?.chunks??0)} moments · last ${m.days} days · updated ${Ne}`:ye?"No index yet":"Loading index",se=me(J?.facets,"harness"),te=me(J?.facets,"project");return e.jsxs("main",{className:"ks-page",children:[e.jsxs("div",{className:"ks-shell",children:[e.jsx("header",{className:"ks-header",children:e.jsxs("div",{className:"ks-header-titles",children:[e.jsx("span",{className:"ks-eyebrow",children:"Search"}),e.jsx("h1",{children:"Find anything you ran, opened, or decided"}),e.jsxs("p",{children:["Search across sessions, skills, MCP tools, codebase, and context packs from the last ",m.days," days."]})]})}),e.jsxs("form",{className:"ks-search-form",onSubmit:ge,role:"search",children:[e.jsx(Me,{size:17,strokeWidth:1.75,"aria-hidden":"true"}),e.jsx("input",{value:n.query,onChange:s=>j({query:s.target.value}),placeholder:"Search topics, files, decisions, agents…",className:"ks-search-input",spellCheck:!1,autoFocus:!0,"aria-label":"Search OpenScout knowledge"}),n.query?e.jsx("button",{type:"button",className:"ks-search-clear",onClick:()=>j({query:""}),"aria-label":"Clear search",children:e.jsx(We,{size:14,"aria-hidden":"true"})}):e.jsx("span",{className:"ks-search-hint","aria-hidden":"true",children:"/"}),W?e.jsx(de,{size:15,className:"ks-spin","aria-hidden":"true"}):null]}),e.jsxs("section",{className:"ks-filterbar","aria-label":"Search filters",children:[e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(Be,{size:12,"aria-hidden":"true"}),"Source"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Source kind filters",children:qe.map(s=>e.jsx(I,{active:n.sourceKinds.includes(s),onClick:()=>j({sourceKinds:n.sourceKinds.includes(s)?n.sourceKinds.filter(t=>t!==s):[...n.sourceKinds,s]}),label:fe[s]??s},s))})]}),se.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(Pe,{size:12,"aria-hidden":"true"}),"Agent"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Harness filters",children:se.map(s=>e.jsx(I,{active:n.harness.includes(s.value),onClick:()=>j({harness:n.harness.includes(s.value)?n.harness.filter(t=>t!==s.value):[...n.harness,s.value]}),label:xe(s.value),count:s.count},`harness:${s.value}`))})]}):null,te.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(Ue,{size:12,"aria-hidden":"true"}),"Project"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Project filters",children:te.map(s=>e.jsx(I,{active:n.project.includes(s.value),onClick:()=>j({project:n.project.includes(s.value)?n.project.filter(t=>t!==s.value):[...n.project,s.value]}),label:s.value,count:s.count},`project:${s.value}`))})]}):null,e.jsxs("div",{className:"ks-filterbar-row ks-filterbar-row--inline",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(ze,{size:12,"aria-hidden":"true"}),"Time"]}),e.jsxs("div",{className:"ks-chip-row",role:"group","aria-label":"Time window filter",children:[e.jsx(I,{active:n.timeWindow==="all",onClick:()=>j({timeWindow:"all"}),label:"Any time"}),Ve.map(s=>e.jsx(I,{active:n.timeWindow===s.value,onClick:()=>j({timeWindow:s.value}),label:s.label},s.value))]}),pe(n)?e.jsx("button",{type:"button",className:"ks-clear-all",onClick:A,children:"Clear filters"}):null]})]}),O?e.jsx("section",{className:"ks-error",role:"alert",children:O}):null,!p&&!O?e.jsxs("div",{className:"ks-empty-state",children:[e.jsx("strong",{children:K?"Preparing your session index":"Preparing search"}),e.jsxs("span",{children:["First load builds the last ",m.days," days"," ","(up to ",y(m.sessionLimit)," sessions). You can keep this page open — results appear as soon as the index is ready."]})]}):null,p?e.jsxs("div",{className:"ks-hit-list",role:"listbox","aria-label":"Search results",children:[e.jsxs("div",{className:"ks-hit-list-head","aria-live":"polite",children:[e.jsx("span",{children:W?"Searching…":L?`${y(v.length)} session${v.length===1?"":"s"}`:"Ready"}),L&&w.length>0?e.jsxs("span",{className:"ks-hit-list-meta",children:[y(w.length)," moment",w.length===1?"":"s",P?e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"ks-text-action",onClick:A,children:"Clear filters"})]}):null]}):null]}),L&&v.length===0&&!W?e.jsxs("div",{className:"ks-empty-hit",children:[e.jsxs("strong",{children:["No matches for “",L,"”"]}),e.jsxs("span",{children:["Try a project name, file path, or topic from recent work",P?", or clear one of the filters above.":"."]}),e.jsxs("div",{className:"ks-empty-hit-actions",children:[e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>j({query:""}),children:"Clear query"}),P?e.jsx("button",{type:"button",className:"ks-text-action",onClick:A,children:"Clear all filters"}):null]})]}):null,L?null:e.jsxs("div",{className:"ks-empty-hit ks-empty-hit--quiet",children:[e.jsx("strong",{children:"Start with a query"}),e.jsxs("span",{children:["Type a topic, file path, agent, or session hint. Use"," ",e.jsx("kbd",{children:"/"})," to focus this field, ",e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," to walk results, ",e.jsx("kbd",{children:"↵"})," to select, ",e.jsx("kbd",{children:"⌘↵"})," to open the session."]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:be,disabled:w.length===0,children:"Pick the first result automatically"})]}),e.jsx("div",{className:"ks-hit-list-body",children:v.map((s,t)=>{const r=s.best,d=Ae(r),x=Ie(r),N=ce(ue(r)),D=()=>{N&&i({view:"sessions",sessionId:N})},z=s.moments.some(k=>u?.id===k.id);return e.jsxs("section",{className:`ks-session${z?" ks-session--selected":""}`,"aria-label":`Session ${t+1}`,children:[e.jsxs("header",{className:"ks-session-head",children:[e.jsxs("div",{className:"ks-session-topline",children:[e.jsxs("div",{className:"ks-session-meta",children:[d.agent?e.jsx("span",{className:"ks-hit-chip",children:d.agent}):null,d.project?e.jsx("span",{children:d.project}):null,d.session?e.jsxs("span",{className:"ks-hit-session",title:N??d.session,children:["session ",d.session]}):null,e.jsxs("span",{className:"ks-session-count",children:[y(s.moments.length)," match",s.moments.length===1?"":"es"]})]}),d.when?e.jsx("time",{className:"ks-hit-when",children:d.when}):null]}),e.jsx("button",{type:"button",className:"ks-session-goal",onClick:D,title:N?"Open session":void 0,children:x})]}),e.jsx("div",{className:"ks-session-moments",children:s.moments.map(k=>{const ie=Te(k,n.query),ae=u?.id===k.id,_=He(k,n.query,200),ne=Re(k),B=()=>g(k,n.query),re=()=>{const h=ce(ue(k))??N;if(!h){B();return}i({view:"sessions",sessionId:h})};return e.jsx("article",{className:`ks-hit${ae?" ks-hit--selected":""}`,role:"option","aria-selected":ae,tabIndex:0,onClick:B,onDoubleClick:re,onKeyDown:h=>{if(h.key==="Enter"&&(h.metaKey||h.ctrlKey)){h.preventDefault(),re();return}Je(h,B)},children:e.jsxs("div",{className:"ks-hit-body",children:[ne.length>0?e.jsx("div",{className:"ks-hit-details ks-hit-details--moment","aria-label":"Turn",children:ne.map(h=>e.jsx("span",{className:"ks-hit-details-strong",children:h},h))}):null,e.jsx("h3",{className:"ks-hit-title",children:ie}),_&&_!==ie?e.jsx("p",{className:"ks-hit-snippet",children:e.jsx(Ge,{text:_,query:n.query})}):null]})},k.id)})})]},s.collectionId)})})]}):null]}),e.jsxs("footer",{className:"ks-foot-status","aria-live":"polite",children:[e.jsxs("span",{className:"ks-foot-status-facts",children:[Z?e.jsx(de,{size:12,className:"ks-spin","aria-hidden":"true"}):null,Se,pe(n)?e.jsxs(e.Fragment,{children:[" · ",Ye(n)]}):null]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>{ee(!0)},disabled:K,children:K?"Updating…":"Update index"})]})]})}export{Fs as KnowledgeSearchScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as T}from"./index-
|
|
1
|
+
import{r as n,j as T}from"./index-NRbRrZw-.js";import{r as j}from"./index-CD2foMB8.js";import{b as D,l as N}from"./lane-tool-detail-0WhMf4Vj.js";import"./lane-edit-display-C_Aujldz.js";const _=140,k=100,p=320,v=4,u=8,S=7;function y(e){return(e.querySelector(".s-observe-tool")??e).getBoundingClientRect()}function F(){return document.querySelector("[data-scout-theme]")??document.body}function q(e,t){return e===t?!0:!e||!t?!1:e.top===t.top&&e.left===t.left&&e.side===t.side&&e.caretTop===t.caretTop}function W(e,t){const l=window.innerWidth,f=window.innerHeight,E=e.top+e.height/2,d=l-e.right-u,m=e.left-u,R=d>=p+v,a=m>=p+v;let c="right",s=e.right+v,o=e.top;R?(c="right",s=e.right+v):a?(c="left",s=e.left-v-p):(c="right",s=Math.max(u,Math.min(e.right+v,l-p-u)),o=e.bottom+v),o+t>f-u&&(o=Math.max(u,e.top-t+e.height)),o=Math.max(u,Math.min(o,f-t-u)),s=Math.max(u,Math.min(s,l-p-u));const x=Math.max(S+4,Math.min(E-o,t-S-4));return{top:o,left:s,side:c,caretTop:x}}function G({model:e,position:t,cardRef:l,onMouseEnter:f,onMouseLeave:E}){const d=N(e),m=e.hoverFields.find(a=>a.label==="when"),R={position:"fixed",top:t.top,left:t.left,width:p,maxWidth:p,"--hover-caret-top":`${t.caretTop}px`};return T.jsxs("div",{ref:l,className:`s-observe-tool-hover-card s-observe-tool-hover-card--side-${t.side}`,style:R,onMouseEnter:f,onMouseLeave:E,role:"tooltip",children:[T.jsx("div",{className:"s-observe-tool-hover-card-cmd",children:e.command}),m&&T.jsx("div",{className:"s-observe-tool-hover-card-meta",children:m.value}),d.slice(1).map((a,c)=>T.jsx("div",{className:"s-observe-tool-hover-card-line",children:a},c)),T.jsx("div",{className:"s-observe-tool-hover-card-hint",children:"Click row for full detail"})]})}function $(e=!0){const[t,l]=n.useState(null),[f,E]=n.useState(null),d=n.useRef(new Map),m=n.useRef(new Map),R=n.useRef(new Map),a=n.useRef(new Map),c=n.useRef(null),s=n.useRef(null),o=n.useRef(null),x=n.useRef(null);c.current=t;const L=n.useCallback(()=>{s.current&&clearTimeout(s.current),o.current&&clearTimeout(o.current),s.current=null,o.current=null},[]),I=n.useMemo(()=>{if(!e||!t)return null;const r=R.current.get(t);if(!r)return null;const i=m.current.get(t);return D(r,i)},[e,t]),M=n.useCallback(r=>{E(i=>q(i,r)?i:r)},[]),g=n.useCallback(()=>{const r=c.current;if(!r){M(null);return}const i=d.current.get(r);if(!i)return;const w=y(i),h=x.current?.offsetHeight??132;M(W(w,h))},[M]);n.useEffect(()=>()=>L(),[L]),n.useLayoutEffect(()=>{if(!t){M(null);return}g();const r=requestAnimationFrame(g);return()=>cancelAnimationFrame(r)},[t,M,g]),n.useEffect(()=>{if(!t)return;const r=()=>g();return window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[t,g]);const C=n.useCallback(r=>{e&&(o.current&&clearTimeout(o.current),o.current=null,c.current!==r&&(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{l(r),s.current=null},_)))},[e]),b=n.useCallback(()=>{s.current&&clearTimeout(s.current),s.current=null,c.current&&(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{l(null),o.current=null},k))},[]),A=n.useCallback((r,i)=>{R.current.set(r.id,r),m.current.set(r.id,i);let w=a.current.get(r.id);if(!w){const h=r.id;w={ref:P=>{P?d.current.set(h,P):d.current.delete(h)},onMouseEnter:()=>C(h),onMouseLeave:b,onFocus:()=>C(h),onBlur:b},a.current.set(h,w)}return w},[C,b]),H=e&&I&&f&&typeof document<"u"?j.createPortal(T.jsx(G,{model:I,position:f,cardRef:x,onMouseEnter:()=>{const r=c.current;r&&C(r)},onMouseLeave:b}),F()):null;return{bind:A,card:H,hoveredEventId:t}}export{$ as useLaneToolHoverCard};
|
package/dist/client/assets/{LaneTraceDetailSheet-BztwvOv9.js → LaneTraceDetailSheet-CFsCvKa3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as e}from"./index-
|
|
1
|
+
import{r as f,j as e}from"./index-NRbRrZw-.js";import{S as L}from"./SlidePanel-BLrLF9dt.js";import{A as j}from"./AgentAvatar-CQqJcwOQ.js";import{H as S}from"./HarnessMark-CEzmPFHC.js";import{t as N}from"./time-Dhsh_2EG.js";import{o as g,f as k,b as y}from"./lane-observe-vfyACHi0.js";import{S as A}from"./SessionObserve-pbozyqVv.js";import{LaneTraceEventFocus as E}from"./LaneTraceEventFocus-BfKZ7G5c.js";import{b as T}from"./agent-lane-detail-D5EIlX7_.js";import{l as I,a as z}from"./agent-lanes-model-BKOs_32K.js";import"./Provider-Cd-QZltN.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./api-DEHEgJ9m.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DCY-m0JK.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-KNASbAjG.js";import"./AgentDetailCard-2DZQahiN.js";import"./AgentLiveActions-BmXDRxER.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./message-markup-BP2nH9kQ.js";import"./ObservedTopologyPanel-CfHYu-4Z.js";import"./ObserveTextFlow-CKYltTPJ.js";import"./use-reduced-motion-0fAsybdo.js";import"./proxy-DtC2iXnT.js";import"./SessionObserveEvidence-C54Xvbps.js";import"./message-circle-2v9Udia0.js";import"./wrench-DwFKomxg.js";import"./external-link-BheHazeW.js";import"./context-budget-DX_fwUs3.js";const M={think:"Thought",tool:"Tool",ask:"Request",message:"Message",note:"Note",system:"System",boot:"Boot"};function Ve({target:d,onClose:n}){const{lane:i,event:t}=d,{agent:s,observe:l,source:r,lastActiveAt:a}=i,p=f.useMemo(()=>T(i),[i]),c=I(s,r),v=z(s,r),h=M[t.kind]??t.kind,u=l?.metadata?.session?.sessionStart,o=g(t,u),b=o!=null?k(o,a):void 0,x=o!=null?y(o):void 0,m=t.kind==="tool"||t.kind==="ask"?t:void 0;return e.jsxs(L,{open:!0,onClose:n,side:"right",owner:"openscout.lane-trace",layer:"elevated",resizable:!0,defaultSize:980,minSize:560,maxSize:1280,scrollLock:!0,ariaLabel:`${c} session trace`,className:"s-lane-trace-sheet",children:[e.jsxs("div",{className:"s-slide-header s-lane-trace-sheet-header",children:[e.jsx(j,{agent:s,placement:"row",size:28,presence:!1,className:"s-agent-lane-avatar"}),e.jsxs("div",{className:"s-lane-trace-sheet-header-copy",children:[e.jsx("div",{className:"s-lane-trace-sheet-title",children:c}),e.jsxs("div",{className:"s-lane-trace-sheet-sub",children:[v," · ",h,a?` · ${N(a)}`:""]})]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsx(S,{harness:s.harness??p.harness,size:18,className:"s-lane-trace-sheet-hmark"}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:n,"aria-label":"Close",children:"×"})]}),e.jsx("div",{className:"s-slide-body s-lane-trace-sheet-body",children:e.jsx(A,{data:l??void 0,agentId:r==="scout"?s.id:void 0,sessionId:s.harnessSessionId??p.sessionId,showRail:!0,variant:"default",initialCursorT:t.t,focusEventId:t.id,inlineFocusEventId:m?.id,inlineFocusContent:m?e.jsx(E,{event:m,wallLabel:b,wallTitle:x,variant:"inline"}):void 0})})]})}export{Ve as LaneTraceDetailSheet};
|
package/dist/client/assets/{LaneTraceEventFocus-C9cmqxnK.js → LaneTraceEventFocus-BfKZ7G5c.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as o}from"./index-
|
|
1
|
+
import{j as e,r as o}from"./index-NRbRrZw-.js";import{i as x,l as h}from"./lane-edit-display-C_Aujldz.js";import{b as p}from"./lane-ask-display-B6iCAVcd.js";import{f as m,b as j}from"./lane-tool-detail-0WhMf4Vj.js";const N=new Set(["detail","output","result","diff","change"]);function f({text:c,label:t}){return e.jsx("button",{type:"button",className:"s-lane-trace-focus-copy",onClick:()=>{navigator.clipboard?.writeText(c)},title:t,"aria-label":t,children:"Copy"})}function q({event:c,wallLabel:t,wallTitle:r,variant:n="sheet"}){return c.kind==="ask"?e.jsx(v,{event:c,wallLabel:t,wallTitle:r,variant:n}):e.jsx(y,{event:c,wallLabel:t,wallTitle:r,variant:n})}function y({event:c,wallLabel:t,wallTitle:r,variant:n}){const s=o.useMemo(()=>j(c,{wallLabel:t,wallTitle:r,sessionOffset:`${m(c.t)} from start`}),[c,t,r]),{primarySection:i,secondarySections:d}=o.useMemo(()=>{if(!s)return{primarySection:null,secondarySections:[]};const a=s.sections.find(u=>N.has(u.title))??s.sections[0]??null,l=a?s.sections.filter(u=>u!==a):s.sections;return{primarySection:a,secondarySections:l}},[s]);return s?e.jsxs("section",{className:`s-lane-trace-focus${n==="inline"?" s-lane-trace-focus--inline":""}`,"aria-label":"Selected trace event",children:[e.jsxs("div",{className:"s-lane-trace-focus-eyebrow",children:[e.jsx("span",{className:"s-lane-trace-focus-eyebrow-dot","aria-hidden":!0}),n==="inline"?"Expanded at this step":"Selected command"]}),e.jsxs("div",{className:"s-lane-trace-focus-head",children:[e.jsxs("div",{className:"s-lane-trace-focus-head-copy",children:[e.jsx("div",{className:"s-lane-trace-focus-cmd",children:s.command}),x(c.tool)&&c.arg?.trim()&&(()=>{const a=h(c.arg.trim()),l=a.split("/").pop()??a;return a===l?null:e.jsx("div",{className:"s-lane-trace-focus-path",title:c.arg.trim(),children:a})})()]}),e.jsx(f,{text:s.copyText,label:"Copy event detail"})]}),s.hoverFields.length>0&&e.jsx("dl",{className:"s-lane-trace-focus-meta",children:s.hoverFields.map(a=>e.jsxs("div",{className:"s-lane-trace-focus-meta-row",children:[e.jsx("dt",{children:a.label}),e.jsx("dd",{title:a.value,children:a.value})]},a.label))}),i&&e.jsxs("div",{className:"s-lane-trace-focus-section s-lane-trace-focus-section--primary",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:i.title}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:i.content})]}),d.map(a=>e.jsxs("div",{className:"s-lane-trace-focus-section",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:a.title}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:a.content})]},a.title))]}):null}function v({event:c,wallLabel:t,wallTitle:r,variant:n}){const s=o.useMemo(()=>p(c),[c]),i=o.useMemo(()=>{const l=[...s.fields];return t&&l.unshift({label:"when",value:r?`${t} · ${r}`:t}),l.push({label:"offset",value:`${m(c.t)} from start`}),l},[s.fields,c.t,t,r]),d=s.preview&&s.preview!==s.fullText,a=s.requestText&&s.requestText!==s.fullText&&s.requestText!==s.preview;return e.jsxs("section",{className:`s-lane-trace-focus s-lane-trace-focus--ask${n==="inline"?" s-lane-trace-focus--inline":""}`,"aria-label":"Selected request",children:[e.jsxs("div",{className:"s-lane-trace-focus-eyebrow",children:[e.jsx("span",{className:"s-lane-trace-focus-eyebrow-dot","aria-hidden":!0}),n==="inline"?"Expanded at this request":"Selected request"]}),e.jsxs("div",{className:"s-lane-trace-focus-head",children:[e.jsxs("div",{className:"s-lane-trace-focus-head-copy",children:[e.jsx("div",{className:"s-lane-trace-focus-cmd",children:s.title}),d?e.jsx("div",{className:"s-lane-trace-focus-ask-preview",children:s.preview}):null]}),e.jsx(f,{text:s.copyText,label:"Copy full request"})]}),i.length>0&&e.jsx("dl",{className:"s-lane-trace-focus-meta",children:i.map(l=>e.jsxs("div",{className:"s-lane-trace-focus-meta-row",children:[e.jsx("dt",{children:l.label}),e.jsx("dd",{title:l.value,children:l.value})]},`${l.label}:${l.value}`))}),e.jsxs("div",{className:"s-lane-trace-focus-section s-lane-trace-focus-section--primary",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:"full request"}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:s.fullText})]}),a?e.jsxs("div",{className:"s-lane-trace-focus-section",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:"request preview"}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:s.requestText})]}):null,s.answer?e.jsxs("div",{className:"s-lane-trace-focus-section",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:s.answer.label}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:s.answer.text})]}):null]})}export{q as LaneTraceEventFocus};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as x,j as s}from"./index-
|
|
1
|
+
import{r as x,j as s}from"./index-NRbRrZw-.js";import{C as me}from"./Canvas-BO9mx5_P.js";import{u as te,t as de,b as pe,c as ue}from"./mesh-view-store-B0lqpw8M.js";import{n as T,s as B}from"./colors-BtO5_zlx.js";import{t as Q}from"./time-Dhsh_2EG.js";import{u as fe}from"./Provider-Cd-QZltN.js";import{u as xe}from"./useAgentHoverCard-BIrm8esH.js";import{b as ye}from"./mesh-buckets-CfAukILK.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./api-DEHEgJ9m.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./AgentDetailCard-2DZQahiN.js";import"./AgentLiveActions-BmXDRxER.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";function ge(e,t){if(t.type==="pan")return{...e,pan:{x:e.pan.x+t.delta.x,y:e.pan.y+t.delta.y}};if(t.type==="zoom"){const n=Math.max(.25,Math.min(4,e.scale*t.factor)),{mx:i,my:h,cx:c,cy:f}=t,m=(i-c)/e.scale-e.pan.x,d=(h-f)/e.scale-e.pan.y;return{scale:n,pan:{x:(i-c)/n-m,y:(h-f)/n-d}}}return e}const ce="openscout.mesh.canvas.viewport.v1";function we(){const e={pan:{x:0,y:0},scale:1};if(typeof window>"u")return e;try{const t=window.sessionStorage.getItem(ce);if(!t)return e;const n=JSON.parse(t);if(n&&typeof n=="object"&&typeof n.scale=="number"&&n.pan&&typeof n.pan.x=="number"&&typeof n.pan.y=="number")return{pan:{x:n.pan.x,y:n.pan.y},scale:n.scale}}catch{}return e}function ve(e){const t=e.name&&e.name.trim()||e.handle&&e.handle.trim()||e.harness&&e.harness.trim()||"agent";return{key:t.toLowerCase(),label:t}}function be(e){const t=new Map;for(const n of e){const{key:i,label:h}=ve(n);let c=t.get(i);c||(c={key:i,label:h,instances:[]},t.set(i,c)),c.instances.push(n)}return Array.from(t.values()).map(n=>(n.instances.sort((i,h)=>i.id.localeCompare(h.id)),n)).sort((n,i)=>{const h=n.label.localeCompare(i.label);return h!==0?h:i.instances.length-n.instances.length})}function je(e){switch(e){case"compact":return{density:e,instanceW:138,instanceH:32,stepX:144,stepY:38,clusterPadX:12,clusterPadY:12,labelH:22,clusterGap:16};case"spacious":return{density:e,instanceW:260,instanceH:68,stepX:268,stepY:76,clusterPadX:14,clusterPadY:14,labelH:26,clusterGap:16};default:return{density:"comfortable",instanceW:210,instanceH:52,stepX:218,stepY:60,clusterPadX:12,clusterPadY:12,labelH:24,clusterGap:14}}}function Ne(e,t){return Math.max(1,Math.round(Math.sqrt(e*t)))}function Ce(e,t,n){if(e.length===0)return[];const i=e.map(l=>{const H=l.instances.length,b=Ne(H,Math.max(.6,Math.min(n,2))),I=Math.ceil(H/b),N=b*t.stepX-(t.stepX-t.instanceW),A=I*t.stepY-(t.stepY-t.instanceH);return{cluster:l,cols:b,width:N+t.clusterPadX*2,height:A+t.clusterPadY*2+t.labelH}}),h=i.reduce((l,H)=>l+H.width*H.height,0),c=Math.max(Math.max(...i.map(l=>l.width)),Math.sqrt(h*n)),f=t.clusterGap,m=[];let d=0,j=0,v=0;for(const l of i)d>0&&d+l.width>c&&(j+=v+f,d=0,v=0),m.push({cluster:l.cluster,x:d,y:j,width:l.width,height:l.height,cols:l.cols}),d+=l.width+f,v=Math.max(v,l.height);const p=Math.min(...m.map(l=>l.x)),u=Math.max(...m.map(l=>l.x+l.width)),M=Math.min(...m.map(l=>l.y)),C=Math.max(...m.map(l=>l.y+l.height)),r=-((p+u)/2),g=-((M+C)/2);return m.map(l=>({...l,x:l.x+r,y:l.y+g}))}function Me(e,t,n){const i=e%t,h=Math.floor(e/t);return{x:n.clusterPadX+i*n.stepX,y:n.labelH+n.clusterPadY+h*n.stepY}}function Z(e){const t=e.harness?.trim(),n=e.model?.trim();return t&&n?`${t}/${n}`:t||n||"—"}function ee(e){const t=e.project?.trim(),n=e.branch?.trim();return t&&n?`${t}/${n}`:t||n||"—"}function D(e){return e.cwd||e.projectRoot||"—"}function se({onClick:e}){return s.jsx("button",{type:"button",className:"mesh-sheet-open",title:"Open agent view","aria-label":"Open agent view",onClick:t=>{t.stopPropagation(),e()},children:"↗"})}function Ie({agent:e,onOpen:t,bindings:n,active:i}){const h=T(e.state),c=e.agentClass==="organic",f=e.updatedAt?Q(e.updatedAt):"",m=Z(e),d=ee(e);return s.jsxs("div",{...n??{},className:`mesh-instance-spec mesh-instance-spec--${h}${c?" mesh-instance-spec--organic":""}${i?" mesh-instance--active":""}`,style:{"--state-stripe":B(e.state)},title:`${m} — ${d}`,children:[s.jsxs("span",{className:"mesh-instance-spec-row",children:[s.jsx("span",{className:"mesh-instance-spec-primary",children:m}),f&&s.jsx("span",{className:"mesh-instance-spec-time",children:f})]}),s.jsxs("span",{className:"mesh-instance-spec-row",children:[s.jsx("span",{className:"mesh-instance-spec-secondary",children:d}),s.jsx(se,{onClick:t})]})]})}function He({agent:e,onOpen:t,bindings:n,active:i}){const h=T(e.state),c=e.agentClass==="organic",f=e.updatedAt?Q(e.updatedAt):"—",m=`${Z(e)} · ${ee(e)}`;return s.jsxs("div",{...n??{},className:`mesh-instance-sheet mesh-instance-sheet--${h}${c?" mesh-instance-sheet--organic":""}${i?" mesh-instance--active":""}`,style:{"--state-stripe":B(e.state)},title:`${m}
|
|
2
2
|
${D(e)}`,children:[s.jsxs("span",{className:"mesh-sheet-line mesh-sheet-line--head",children:[s.jsx("span",{className:"mesh-sheet-id",children:m}),s.jsx("span",{className:"mesh-sheet-time",children:f}),s.jsx(se,{onClick:t})]}),s.jsxs("span",{className:"mesh-sheet-line",children:[s.jsx("span",{className:"mesh-sheet-path",children:D(e)}),s.jsxs("span",{className:"mesh-sheet-ctx",children:[s.jsx("span",{className:"mesh-sheet-ctx-label",children:"CTX"})," —"]})]})]})}function $e({agent:e,onOpen:t,bindings:n,active:i}){const h=T(e.state),c=e.agentClass==="organic",f=e.updatedAt?Q(e.updatedAt):"—",m=`${Z(e)} · ${ee(e)}`,d=e.agentClass?.trim();return s.jsxs("div",{...n??{},className:`mesh-instance-sheet mesh-instance-sheet--spacious mesh-instance-sheet--${h}${c?" mesh-instance-sheet--organic":""}${i?" mesh-instance--active":""}`,style:{"--state-stripe":B(e.state)},title:`${m}
|
|
3
3
|
${D(e)}`,children:[s.jsxs("span",{className:"mesh-sheet-line mesh-sheet-line--head",children:[s.jsx("span",{className:"mesh-sheet-id",children:m}),s.jsx("span",{className:"mesh-sheet-time",children:f}),s.jsx(se,{onClick:t})]}),s.jsx("span",{className:"mesh-sheet-line",children:s.jsx("span",{className:"mesh-sheet-path",children:D(e)})}),s.jsxs("span",{className:"mesh-sheet-line",children:[s.jsxs("span",{className:"mesh-sheet-ctx",children:[s.jsx("span",{className:"mesh-sheet-ctx-label",children:"CTX"})," —"]}),d&&s.jsx("span",{className:"mesh-sheet-tag",children:d})]})]})}function Ee({layout:e,metrics:t,onAgentOpen:n,bindFor:i,activeId:h}){const{cluster:c,x:f,y:m,width:d,height:j,cols:v}=e,p=x.useMemo(()=>{const u={working:0,ready:0,notReady:0};for(const M of c.instances){const C=T(M.state);C==="in_turn"||C==="in_flight"?u.working+=1:C==="callable"?u.ready+=1:u.notReady+=1}return u},[c.instances]);return s.jsxs("div",{className:"mesh-cluster",style:{position:"absolute",left:f,top:m,width:d,height:j},children:[s.jsxs("div",{className:"mesh-cluster-header",style:{height:t.labelH},children:[s.jsx("span",{className:"mesh-cluster-name",children:c.label}),s.jsx("span",{className:"mesh-cluster-count",children:c.instances.length}),s.jsxs("span",{className:"mesh-cluster-states",children:[p.working>0&&s.jsxs("span",{className:"mesh-cluster-state mesh-cluster-state--working",children:[s.jsx("span",{className:"mesh-cluster-state-dot"}),p.working]}),p.ready>0&&s.jsxs("span",{className:"mesh-cluster-state mesh-cluster-state--available",children:[s.jsx("span",{className:"mesh-cluster-state-dot"}),p.ready]}),p.notReady>0&&s.jsxs("span",{className:"mesh-cluster-state mesh-cluster-state--offline",children:[s.jsx("span",{className:"mesh-cluster-state-dot"}),p.notReady]})]})]}),c.instances.map((u,M)=>{const C=Me(M,v,t);return s.jsx("div",{style:{position:"absolute",left:C.x,top:C.y,width:t.instanceW,height:t.instanceH},children:t.density==="compact"?s.jsx(Ie,{agent:u,onOpen:()=>n(u),bindings:i(u.id),active:h===u.id}):t.density==="spacious"?s.jsx($e,{agent:u,onOpen:()=>n(u),bindings:i(u.id),active:h===u.id}):s.jsx(He,{agent:u,onOpen:()=>n(u),bindings:i(u.id),active:h===u.id})},u.id)})]})}const U=34,re=22,Se=6,ne=28,ae=10,F=12,ie=380,Ae=240,J=38;function _e(e,t,n,i,h,c){const f=[],m=[],d=[];for(const r of e)i[r.machineId]?d.push(r):m.push(r);let j=0,v=ie;const p=(r,g)=>{const H=t.has(r.machineId)||!r.online,b=n.has(r.machineId);let I=0,N=0,A=0;for(const L of r.agents){const S=T(L.state);S==="in_turn"||S==="in_flight"?I+=1:S==="callable"?N+=1:A+=1}const G=r.online?I>0?"working":N>0?"available":"offline":"offline";if(H)return{machineId:r.machineId,machineLabel:r.machineLabel,reachability:r.reachability,online:r.online,agentCount:r.agents.length,workingCount:I,availableCount:N,offlineCount:A,dominantState:G,host:r.host,collapsed:!1,ghost:!0,pinned:g,x:0,y:0,width:Ae,height:J,headerHeight:J,chromeHeight:J,layouts:[]};const Y=b?[]:be(r.agents),E=b?[]:Ce(Y,h,c),z=b?ke():0,O=b?oe+z*re+Se:0,X=U+O;let k=0,P=0;if(!b&&E.length>0){const L=Math.min(...E.map(o=>o.x)),S=Math.max(...E.map(o=>o.x+o.width)),_=Math.min(...E.map(o=>o.y)),q=Math.max(...E.map(o=>o.y+o.height));k=S-L,P=q-_;const K=-L+F,a=-_+X+ae;for(const o of E)o.x+=K,o.y+=a}const R=Math.max(ie,k+F*2),V=b?X:X+ae+P+F;return{machineId:r.machineId,machineLabel:r.machineLabel,reachability:r.reachability,online:r.online,agentCount:r.agents.length,workingCount:I,availableCount:N,offlineCount:A,dominantState:G,host:r.host,collapsed:b,ghost:!1,pinned:g,x:0,y:0,width:R,height:V,headerHeight:U,chromeHeight:X,layouts:E}};for(const r of m){const g=p(r,!1);g.x=0,g.y=j,f.push(g),v=Math.max(v,g.width),j+=g.height+ne}const u=Math.max(0,j-ne),M=-v/2,C=-u/2;for(const r of f)r.ghost||(r.width=v),r.x=M,r.y+=C;for(const r of d){const g=p(r,!0),l=i[r.machineId];g.x=l.x,g.y=l.y,f.push(g)}return f}function Ye({section:e,metrics:t,onAgentOpen:n,bindFor:i,activeId:h,onHeaderPointerDown:c,onHeaderClick:f,onGhostActivate:m}){const d=e.reachability==="this"?"this node":e.reachability==="peer"?"peer":e.reachability==="tailnet"?"tailnet":"",j=e.online?e.agentCount===0?"idle":"standby":"unreachable";if(e.ghost)return s.jsx("div",{"data-machine-id":e.machineId,className:"mesh-machine-ghost",style:{position:"absolute",left:e.x,top:e.y,width:e.width,height:e.height,pointerEvents:"all"},title:`${e.machineLabel} · ${j} — click to show`,children:s.jsxs("button",{type:"button",className:"mesh-machine-ghost-body",onPointerDown:p=>c(p,e),onClick:()=>m(e.machineId),children:[s.jsx("span",{className:"mesh-machine-ghost-led","aria-hidden":!0}),s.jsx("span",{className:"mesh-machine-ghost-name",children:e.machineLabel}),s.jsx("span",{className:"mesh-machine-ghost-stamp",children:j}),d&&s.jsx("span",{className:`mesh-machine-chip mesh-machine-chip--${e.reachability} mesh-machine-chip--ghost`,children:d}),s.jsxs("span",{className:"mesh-machine-ghost-counts",children:[s.jsx("span",{className:"mesh-machine-count",children:e.agentCount}),e.workingCount>0&&s.jsxs("span",{className:"mesh-machine-count mesh-machine-count--working",children:[e.workingCount,"W"]})]})]})});const v=e.collapsed?Oe(e):[];return s.jsxs("div",{"data-machine-id":e.machineId,className:`mesh-machine-section${e.collapsed?" mesh-machine-section--collapsed":""}${e.pinned?" mesh-machine-section--pinned":""}`,style:{position:"absolute",left:e.x,top:e.y,width:e.width,height:e.height,pointerEvents:"all"},children:[s.jsxs("button",{type:"button",className:"mesh-machine-header",style:{height:e.headerHeight},onPointerDown:p=>c(p,e),onClick:()=>f(e.machineId),"aria-expanded":!e.collapsed,children:[s.jsx("span",{className:`mesh-machine-led mesh-machine-led--${e.dominantState}`,style:{color:B(e.dominantState)},"aria-hidden":!0}),s.jsx("span",{className:"mesh-machine-caret","aria-hidden":!0,children:e.collapsed?"▸":"▾"}),s.jsx("span",{className:"mesh-machine-grip","aria-hidden":!0,children:"⠿"}),s.jsx("span",{className:"mesh-machine-name",children:e.machineLabel}),d&&s.jsx("span",{className:`mesh-machine-chip mesh-machine-chip--${e.reachability}`,children:d})]}),e.collapsed&&s.jsxs("div",{className:"mesh-machine-spec",children:[s.jsxs("div",{className:"mesh-machine-state-strip",style:{height:oe},children:[s.jsxs("div",{className:"mesh-machine-state-cell mesh-machine-state-cell--working",children:[s.jsx("span",{className:"mesh-machine-state-num",children:e.workingCount}),s.jsx("span",{className:"mesh-machine-state-label",children:"working"})]}),s.jsxs("div",{className:"mesh-machine-state-cell",children:[s.jsx("span",{className:"mesh-machine-state-num",children:e.availableCount}),s.jsx("span",{className:"mesh-machine-state-label",children:"ready"})]}),s.jsxs("div",{className:"mesh-machine-state-cell",children:[s.jsx("span",{className:"mesh-machine-state-num",children:e.agentCount}),s.jsx("span",{className:"mesh-machine-state-label",children:"total"})]})]}),v.map(p=>s.jsxs("div",{className:"mesh-machine-spec-row",style:{height:re},children:[s.jsx("span",{className:"mesh-machine-spec-label",children:p.label}),s.jsx("span",{className:"mesh-machine-spec-value",title:p.value,children:p.value})]},p.label))]}),!e.collapsed&&e.layouts.map(p=>s.jsx(Ee,{layout:p,metrics:t,onAgentOpen:n,bindFor:i,activeId:h},p.cluster.key))]})}function Oe(e){const t=e.host;return[{label:"os",value:t?.os??"—"},{label:"arch",value:t?.arch??"—"},{label:"cpu",value:t?.cpuCores?`${t.cpuCores}c`:"—"},{label:"ram",value:t?.memoryGb?`${t.memoryGb} G`:"—"},{label:"disk",value:t?.storageCapacityGb?`${t.storageCapacityGb} G`:"—"},{label:"network",value:t?.network??"—"},{label:"scout",value:t?.scoutVersion?`v${t.scoutVersion}`:"—"}]}const Xe=7,oe=54;function ke(e,t,n,i){return Xe}function Es({mesh:e,agents:t=[]}){const n=x.useRef(null),[i,h]=x.useState({w:0,h:0}),[c,f]=x.useReducer(ge,void 0,we);x.useEffect(()=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(ce,JSON.stringify({pan:c.pan,scale:c.scale}))}catch{}},[c.pan,c.scale]);const{density:m,query:d,agentStateFilters:j,hiddenMachineIds:v,collapsedMachineIds:p,scrollTargetMachineId:u}=te(),{navigate:M}=fe();x.useLayoutEffect(()=>{const a=n.current;if(!a)return;const o=()=>h({w:a.clientWidth,h:a.clientHeight});o();const w=new ResizeObserver(o);return w.observe(a),()=>w.disconnect()},[]),x.useLayoutEffect(()=>{const a=n.current;if(!a)return;const o=w=>{w.preventDefault();const y=w.deltaY<0?1.12:1/1.12,$=a.getBoundingClientRect();f({type:"zoom",factor:y,mx:w.clientX-$.left,my:w.clientY-$.top,cx:$.width/2,cy:$.height/2})};return a.addEventListener("wheel",o,{passive:!1}),()=>a.removeEventListener("wheel",o)},[]);const{machinePositions:C}=te(),r=x.useMemo(()=>je(m),[m]),g=x.useMemo(()=>{const a=d.trim().toLowerCase();return t.filter(o=>{const y=T(o.state);return j.has(y)?a?`${o.name??""} ${o.handle??""} ${o.harness??""} ${o.project??""} ${o.branch??""}`.toLowerCase().includes(a):!0:!1})},[t,d,j]),l=x.useMemo(()=>ye(g,e),[g,e]),H=i.w>0&&i.h>0?i.w/i.h:1.6,b=x.useMemo(()=>_e(l,v,p,C,r,H),[l,v,p,C,r,H]),I=x.useRef(null),[N,A]=x.useState(null),G=x.useCallback((a,o)=>{if(a.button!==0)return;a.stopPropagation(),a.currentTarget.setPointerCapture(a.pointerId),I.current={machineId:o.machineId,startClientX:a.clientX,startClientY:a.clientY,startSectionX:o.x,startSectionY:o.y,pointerId:a.pointerId,moved:!1}},[]);x.useEffect(()=>{const a=w=>{const y=I.current;if(!y||w.pointerId!==y.pointerId)return;const $=w.clientX-y.startClientX,W=w.clientY-y.startClientY;if(!y.moved&&Math.hypot($,W)<4)return;y.moved=!0;const le=$/c.scale,he=W/c.scale;A({machineId:y.machineId,x:y.startSectionX+le,y:y.startSectionY+he})},o=w=>{const y=I.current;if(!(!y||w.pointerId!==y.pointerId)){if(I.current=null,y.moved){const $=(w.clientX-y.startClientX)/c.scale,W=(w.clientY-y.startClientY)/c.scale;ue(y.machineId,{x:y.startSectionX+$,y:y.startSectionY+W})}A(null)}};return window.addEventListener("pointermove",a),window.addEventListener("pointerup",o),window.addEventListener("pointercancel",o),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o)}},[c.scale]);const Y=x.useRef(!1);x.useEffect(()=>{if(N)Y.current=!0;else{const a=setTimeout(()=>{Y.current=!1},50);return()=>clearTimeout(a)}},[N]);const E=x.useCallback(a=>{Y.current||de(a)},[]),z=x.useCallback(a=>{Y.current||pe(a)},[]),O=x.useMemo(()=>N?b.map(a=>a.machineId===N.machineId?{...a,x:N.x,y:N.y,pinned:!0}:a):b,[b,N]);x.useEffect(()=>{if(!u)return;const a=O.find(o=>o.machineId===u);a&&f({type:"pan",delta:{x:-a.x-c.pan.x-a.width/2,y:-a.y-c.pan.y+i.h/4-U}})},[u,O,c.pan.x,c.pan.y,i.h]);const X=x.useCallback(a=>{a.agentClass!=="organic"&&M({view:"agents-v2",agentId:a.id})},[M]),k=x.useMemo(()=>g.filter(a=>a.agentClass!=="organic"),[g]),P=x.useMemo(()=>k.map(a=>a.id),[k]),R=xe({agents:k,orderedIds:P,navigate:M,selectMode:"preview"}),V=x.useCallback(a=>P.includes(a)?R.bind(a):null,[R,P]),L=R.activeAgent?.id??null,{pan:S,scale:_}=c,q=i.w/2,K=i.h/2;return s.jsxs("div",{ref:n,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:[i.w>0&&s.jsx(me,{panOffset:S,scale:_,onPan:a=>f({type:"pan",delta:a}),gridOpacity:.7}),s.jsx("div",{style:{position:"absolute",left:0,top:0,width:0,height:0,transform:`translate(${q}px, ${K}px) translate(${S.x*_}px, ${S.y*_}px) scale(${_})`,transformOrigin:"0 0",pointerEvents:"none"},children:O.length===0?s.jsx("div",{style:{position:"absolute",left:-120,top:-20,width:240,textAlign:"center",pointerEvents:"none"},children:s.jsx("div",{className:"mesh-empty-pill",children:"no machines visible"})}):O.map(a=>s.jsx(Ye,{section:a,metrics:r,onAgentOpen:X,bindFor:V,activeId:L,onHeaderPointerDown:G,onHeaderClick:z,onGhostActivate:E},a.machineId))}),s.jsx("div",{className:"mesh-canvas-hint",children:"scroll to zoom · drag to pan"}),R.card]})}export{Es as MeshCanvas};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as e}from"./index-
|
|
1
|
+
import{r as x,j as e}from"./index-NRbRrZw-.js";import{u as v,d as $,t as C,a as M,r as b}from"./mesh-view-store-B0lqpw8M.js";import{u as w}from"./Provider-Cd-QZltN.js";import{b as I}from"./mesh-buckets-CfAukILK.js";import{a as j,f as S,s as f}from"./colors-BtO5_zlx.js";function T(){const[i,o]=x.useState("rack"),{agents:r}=w(),{meshSnapshot:l,selectedId:s,selectedType:a,hiddenMachineIds:m,machinePositions:n}=v(),t=x.useMemo(()=>l?I(r,l):[],[r,l]);if(!l||t.length===0)return null;const h=t.filter(d=>!m.has(d.machineId)).length,p=t.length,g=Object.keys(n).length,c=d=>{M(d,"node"),b(d)};return e.jsxs("div",{className:"mesh-rail",children:[e.jsxs("div",{className:"mesh-rail-head",children:[e.jsx("span",{className:"mesh-rail-ear","aria-hidden":!0}),e.jsxs("div",{className:"mesh-rail-mode",role:"group","aria-label":"Bottom view",children:[e.jsx("button",{type:"button",className:`mesh-rail-mode-btn${i==="map"?" mesh-rail-mode-btn--active":""}`,onClick:()=>o("map"),"aria-pressed":i==="map",children:"map"}),e.jsx("button",{type:"button",className:`mesh-rail-mode-btn${i==="rack"?" mesh-rail-mode-btn--active":""}`,onClick:()=>o("rack"),"aria-pressed":i==="rack",children:"rack"})]}),e.jsx("span",{className:"mesh-rail-title-count",children:p}),e.jsx("span",{className:"mesh-rail-ear","aria-hidden":!0})]}),i==="rack"?e.jsx(k,{buckets:t,hiddenMachineIds:m,selectedId:s,selectedType:a,onFocus:c}):e.jsx(B,{buckets:t,selectedId:s,selectedType:a,onFocus:c}),e.jsxs("div",{className:"mesh-rail-foot",children:[e.jsx("span",{className:"mesh-rail-foot-mark","aria-hidden":!0}),e.jsx("span",{className:"mesh-rail-foot-meta",children:i==="map"?`${p} machines`:`${h}/${p} shown`}),g>0&&i==="rack"?e.jsx("button",{type:"button",className:"mesh-rail-foot-reset",onClick:()=>$(),title:"Reset machine layout",children:"reset"}):e.jsx("span",{className:"mesh-rail-foot-mark","aria-hidden":!0})]})]})}function k({buckets:i,hiddenMachineIds:o,selectedId:r,selectedType:l,onFocus:s}){return e.jsx("div",{className:"mesh-rail-body",children:i.map((a,m)=>{const n=o.has(a.machineId),t=r===a.machineId&&l==="node",h=a.agents.filter(u=>j(u.state)).length,p=a.agents.filter(u=>S(u.state)).length,g=a.online?a.agents.length===0?"offline":h>0?"working":"available":"offline",c=n||!a.online?void 0:f(g),d=a.reachability==="this"?"L":a.reachability==="peer"?"P":a.reachability==="tailnet"?"T":"·",N=String(m+1).padStart(2,"0"),y=a.online?a.agents.length===0?"idle":`${h}w · ${p}r`:"unreachable";return e.jsxs("div",{className:["mesh-rail-unit",n&&"mesh-rail-unit--off",!a.online&&"mesh-rail-unit--unreachable",t&&"mesh-rail-unit--active"].filter(Boolean).join(" "),children:[e.jsxs("button",{type:"button",className:"mesh-rail-unit-body",onClick:()=>s(a.machineId),title:`Focus ${a.machineLabel} on the map`,children:[e.jsx("span",{className:"mesh-rail-slot",children:N}),e.jsx("span",{className:`mesh-rail-led${n||!a.online?"":" mesh-rail-led--on"}`,style:c?{background:c,color:c}:void 0,"aria-hidden":!0}),e.jsxs("span",{className:"mesh-rail-unit-text",children:[e.jsx("span",{className:"mesh-rail-unit-name",title:a.machineLabel,children:a.machineLabel}),e.jsxs("span",{className:"mesh-rail-unit-sub",children:[e.jsx("span",{className:`mesh-rail-reach mesh-rail-reach--${a.reachability}`,children:d}),e.jsx("span",{className:"mesh-rail-unit-stamp",children:y})]})]}),e.jsx("span",{className:"mesh-rail-unit-count",children:a.agents.length})]}),e.jsx("div",{className:"mesh-rail-unit-actions",children:e.jsx("button",{type:"button",className:`mesh-rail-unit-eye${n?" mesh-rail-unit-eye--off":""}`,onClick:u=>{u.stopPropagation(),C(a.machineId)},title:n?"Show in workspace":"Hide from workspace","aria-pressed":!n,children:n?"○":"●"})}),e.jsx("span",{className:"mesh-rail-vent","aria-hidden":!0})]},a.machineId)})})}function B({buckets:i,selectedId:o,selectedType:r,onFocus:l}){return e.jsx("div",{className:"mesh-rail-body mesh-rail-body--map",children:e.jsx("div",{className:"mesh-mini-map",children:i.map(s=>{const a=o===s.machineId&&r==="node",m=s.agents.filter(h=>j(h.state)).length,n=s.online?s.agents.length===0?"offline":m>0?"working":"available":"offline",t=s.online?f(n):void 0;return e.jsxs("button",{type:"button",className:`mesh-mini-node mesh-mini-node--${n}${a?" mesh-mini-node--active":""}${s.online?"":" mesh-mini-node--off"}`,onClick:()=>l(s.machineId),title:`${s.machineLabel} — ${s.agents.length} agents`,children:[e.jsx("span",{className:"mesh-mini-led",style:t?{background:t}:void 0,"aria-hidden":!0}),e.jsx("span",{className:"mesh-mini-label",children:s.machineLabel}),s.agents.length>0&&e.jsx("span",{className:"mesh-mini-count",children:s.agents.length})]},s.machineId)})})})}export{T as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-Bli6bTLU.js";import{a as B}from"./api-DEHEgJ9m.js";import{t as A}from"./time-Dhsh_2EG.js";import{n as _,b as D,s as z,c as F}from"./colors-BtO5_zlx.js";import{u as O,d as H}from"./Provider-Ve8yXaWR.js";import{d as K}from"./router-B0YclXYg.js";import{MeshCanvas as U}from"./MeshCanvas-C3_2p9B6.js";import{u as V}from"./useAgentHoverCard-6N8b7qsU.js";import{u as Q}from"./local-agents-BMadXuP1.js";import{u as J,a as W,s as X,e as E,f as I,g as Y,h as L}from"./mesh-view-store-Cpqil_2D.js";import{u as Z}from"./useContentSecondaryNav-D-hVKzM9.js";import{OpsSubnav as G}from"./OpsSubnav-BijKI3yG.js";/* empty css *//* empty css */import"./provider-CX9EWecp.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./Canvas-KyTsDJlB.js";import"./mesh-buckets-CfAukILK.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";import"./SecondaryNav-cYTw2p39.js";import"./secondaryNavConfig-DyC_P9Wx.js";import"./message-square-DlY4EneU.js";import"./compass-BepM5iWH.js";import"./settings-BzWCF3NF.js";import"./git-branch-q8Ayc8py.js";import"./scroll-text-DRidbcse.js";/* empty css */function ee(c){const p=new Map,x=new Map;for(const a of c){const o=a.project??"Unassigned",i=o.toLowerCase(),m=a.branch??"—";let r=p.get(i);r||(r=new Map,p.set(i,r));const u=r.get(m)??[];u.push(a),r.set(m,u);let s=x.get(i);s||(s=new Map,x.set(i,s)),s.set(o,(s.get(o)??0)+1)}const g=a=>{const o=x.get(a);if(!o)return a;let i=null,m=-1;for(const[r,u]of o)u>m&&(i=r,m=u);return i??a},j=[];for(const[a,o]of p){const i=g(a),m=[];let r=0;const u={in_turn:0,in_flight:0,needs_attention:0,callable:0,blocked:0},s=[];for(const[l,n]of o){const t=[...n].sort((h,b)=>(b.updatedAt??0)-(h.updatedAt??0)),y=t.reduce((h,b)=>Math.max(h,b.updatedAt??0),0);r=Math.max(r,y);for(const h of t)u[_(h.state)]+=1,s.push(h);m.push({branch:l,agents:t,latest:y})}m.sort((l,n)=>n.latest-l.latest),j.push({project:i,branches:m,agents:s,latest:r,counts:u})}return j.sort((a,o)=>o.latest-a.latest),j}function T(c){return c?c.replace(/^\/Users\/[^/]+/,"~"):null}function se({agents:c,emptyTitle:p="No agents registered",emptyBody:x="Agents connected to this broker will appear here.",selectMode:g="preview"}){const{navigate:j}=O(),a=d.useMemo(()=>ee(c),[c]),[o,i]=d.useState(()=>new Set),m=d.useMemo(()=>{const s=[];for(const l of a)if(!o.has(l.project))for(const n of l.branches)for(const t of n.agents)s.push(t.id);return s},[a,o]),r=V({agents:c,orderedIds:m,navigate:j,selectMode:g});if(c.length===0)return e.jsxs("div",{className:"sys-list-empty",children:[e.jsx("h3",{children:p}),e.jsx("p",{children:x})]});const u=s=>{i(l=>{const n=new Set(l);return n.has(s)?n.delete(s):n.add(s),n})};return e.jsxs("div",{className:"mesh-tree",ref:r.containerRef,children:[a.map(s=>{const l=o.has(s.project);return e.jsxs("div",{className:`mesh-tree-group${l?" mesh-tree-group--collapsed":""}`,children:[e.jsxs("button",{type:"button",className:"mesh-tree-project",onClick:()=>u(s.project),"aria-expanded":!l,children:[e.jsx("span",{className:`mesh-tree-caret${l?"":" mesh-tree-caret--open"}`,"aria-hidden":!0,children:"›"}),e.jsx("span",{className:"mesh-tree-project-name",children:s.project}),e.jsx("span",{className:"mesh-tree-project-count",children:s.agents.length}),e.jsxs("span",{className:"mesh-tree-counts",children:[s.counts.in_turn+s.counts.in_flight+s.counts.needs_attention>0&&e.jsxs("span",{className:"mesh-tree-count mesh-tree-count--working",children:[e.jsx("span",{className:"mesh-tree-count-dot"}),s.counts.in_turn+s.counts.in_flight+s.counts.needs_attention]}),s.counts.callable>0&&e.jsxs("span",{className:"mesh-tree-count mesh-tree-count--available",children:[e.jsx("span",{className:"mesh-tree-count-dot"}),s.counts.callable]}),s.counts.blocked>0&&e.jsxs("span",{className:"mesh-tree-count mesh-tree-count--offline",children:[e.jsx("span",{className:"mesh-tree-count-dot"}),s.counts.blocked]})]}),e.jsx("span",{className:"mesh-tree-project-time",children:s.latest?A(s.latest):""})]}),!l&&e.jsx("div",{className:"mesh-tree-branches",children:s.branches.map(n=>e.jsxs("div",{className:"mesh-tree-branch",children:[e.jsxs("div",{className:"mesh-tree-branch-head",children:[e.jsx("span",{className:"mesh-tree-branch-elbow","aria-hidden":!0,children:"└"}),e.jsx("span",{className:"mesh-tree-branch-name",children:n.branch})]}),e.jsx("div",{className:"mesh-tree-agents",children:n.agents.map(t=>{const y=_(t.state),h=D(t.state),b=t.agentClass==="organic",S=r.getState(t.id),k=T(t.cwd)??T(t.projectRoot),f=t.harnessSessionId?t.harnessSessionId.slice(0,8):null,v=[];k&&v.push({kind:"cwd",text:k}),t.harness&&v.push({kind:"harness",text:t.harness}),t.model&&v.push({kind:"model",text:t.model}),f&&v.push({kind:"sess",text:`sess:${f}`});const $=r.bind(t.id);return e.jsxs("button",{type:"button",className:`mesh-tree-agent${b?" mesh-tree-agent--organic":""}${S.isActive?" mesh-tree-agent--active":""}${S.isPinned?" mesh-tree-agent--pinned":""}`,title:b?`${t.harness??t.name} · organic session`:void 0,...$,children:[e.jsx("span",{className:`mesh-tree-agent-dot mesh-tree-agent-dot--${h}`,style:{background:z(t.state)}}),e.jsx("span",{className:"mesh-tree-agent-name",children:t.handle??t.name}),b&&e.jsx("span",{className:"mesh-tree-agent-organic","aria-label":"organic session",children:"○"}),e.jsx("span",{className:"mesh-tree-agent-inline",children:v.map((w,R)=>e.jsxs("span",{className:`mesh-tree-agent-inline-part mesh-tree-agent-inline-part--${w.kind}`,children:[R>0&&e.jsx("span",{className:"mesh-tree-agent-inline-sep",children:"·"}),w.text]},w.kind))}),e.jsx("span",{className:`mesh-tree-agent-state mesh-tree-agent-state--${h}`,children:F(y)}),e.jsx("span",{className:"mesh-tree-agent-time",children:t.updatedAt?A(t.updatedAt):""})]},t.id)})})]},n.branch))})]},s.project)}),r.card]})}function P({mode:c,density:p,query:x,stateFilter:g,loading:j,refreshing:a,error:o,lastLoadedAt:i,hasMesh:m,onRefresh:r}){return e.jsxs("div",{className:`mesh-hud mesh-hud--${c}`,children:[e.jsxs("div",{className:"mesh-hud-left",children:[e.jsxs("div",{className:"mesh-mode-toggle",children:[e.jsx("button",{type:"button",className:`mesh-mode-btn${c==="map"?" mesh-mode-btn--active":""}`,onClick:()=>E("map"),children:"Map"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${c==="tree"?" mesh-mode-btn--active":""}`,onClick:()=>E("tree"),children:"Tree"})]}),e.jsxs("div",{className:"mesh-mode-toggle mesh-density-toggle",role:"group","aria-label":"Density","aria-hidden":c!=="map","data-mode-only":"map",children:[e.jsx("button",{type:"button",className:`mesh-mode-btn${p==="compact"?" mesh-mode-btn--active":""}`,onClick:()=>I("compact"),disabled:c!=="map",title:"Compact — dots",children:"Compact"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${p==="comfortable"?" mesh-mode-btn--active":""}`,onClick:()=>I("comfortable"),disabled:c!=="map",title:"Comfortable — chips",children:"Comfortable"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${p==="spacious"?" mesh-mode-btn--active":""}`,onClick:()=>I("spacious"),disabled:c!=="map",title:"Spacious — cards",children:"Spacious"})]})]}),m&&e.jsxs("div",{className:"mesh-hud-filters",children:[e.jsx("input",{type:"search",className:"mesh-hud-search",placeholder:"Filter agents…",value:x,onChange:u=>Y(u.target.value),spellCheck:!1,autoCorrect:"off",autoCapitalize:"off"}),e.jsxs("div",{className:"mesh-mode-toggle",role:"group","aria-label":"State",children:[e.jsx("button",{type:"button",className:`mesh-mode-btn${g==="all"?" mesh-mode-btn--active":""}`,onClick:()=>L("all"),children:"All"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${g==="in_turn"?" mesh-mode-btn--active":""}`,onClick:()=>L("in_turn"),children:"In turn"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${g==="callable"?" mesh-mode-btn--active":""}`,onClick:()=>L("callable"),children:"Callable"})]})]}),e.jsxs("div",{className:"mesh-hud-right",children:[e.jsx("span",{className:"mesh-hud-sync",children:j?"Loading…":o&&m?`Last sync old — ${i?A(i):"unknown"}`:i?A(i):"—"}),e.jsx("button",{type:"button",className:"s-btn",disabled:j||a,onClick:r,children:a?"Refreshing…":"Refresh"})]})]})}function is({navigate:c}){const[p,x]=d.useState(!0),[g,j]=d.useState(!1),[a,o]=d.useState(null),[i,m]=d.useState(null),{mode:r,density:u,query:s,stateFilter:l,meshSnapshot:n}=J(),{agents:t}=Q(),{route:y}=O(),h=K(y),b=d.useMemo(()=>H(t,h,n?.localNode?.id),[t,h,n?.localNode?.id]),S=d.useRef(null),k=d.useRef(0);d.useEffect(()=>{S.current=n},[n]),d.useEffect(()=>{h&&W(h,"node")},[h]);const f=d.useCallback(async(C="initial")=>{const N=++k.current;!(S.current!==null)&&C!=="background"?(x(!0),o(null)):j(!0);try{const M=await B("/api/mesh");if(N!==k.current)return;X(M),o(null),m(Date.now())}catch(M){if(N!==k.current)return;o(M instanceof Error?M.message:String(M))}finally{N===k.current&&(x(!1),j(!1))}},[]);d.useEffect(()=>{f("initial")},[f]),d.useEffect(()=>{const C=setInterval(()=>{f("background")},1e4);return()=>clearInterval(C)},[f]);const v=d.useMemo(()=>{const C=s.trim().toLowerCase();return b.filter(N=>l!=="all"&&_(N.state)!==l?!1:C?`${N.name??""} ${N.handle??""} ${N.harness??""} ${N.project??""} ${N.branch??""}`.toLowerCase().includes(C):!0)},[s,b,l]),$={mode:r,density:u,query:s,stateFilter:l,loading:p,refreshing:g,error:a,lastLoadedAt:i,hasMesh:!!n,onRefresh:()=>{f("manual")}},w=r==="map"?e.jsxs("div",{className:"mesh-map-canvas",children:[n&&e.jsx(U,{mesh:n,agents:v}),p&&!n&&e.jsx("div",{className:"mesh-canvas-center",children:e.jsx("p",{className:"mesh-canvas-center-label",children:"Loading mesh…"})}),!p&&!n&&a&&e.jsxs("div",{className:"mesh-canvas-center",children:[e.jsx("p",{className:"mesh-canvas-center-label",children:a}),e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{f("manual")},children:"Try again"})]}),e.jsx(P,{...$})]}):e.jsxs("div",{className:"mesh-tree-page",children:[e.jsx(P,{...$}),p&&!n&&e.jsxs("div",{className:"sys-panel sys-state-card mesh-tree-state",children:[e.jsx("h3",{className:"sys-state-title",children:"Loading mesh status"}),e.jsx("p",{className:"sys-state-body",children:"Inspecting broker reachability and peer discovery inputs."})]}),!p&&!n&&a&&e.jsxs("div",{className:"sys-panel sys-state-card sys-state-card-error mesh-tree-state",children:[e.jsx("h3",{className:"sys-state-title",children:"Mesh status is unavailable"}),e.jsx("p",{className:"sys-state-body",children:a}),e.jsx("div",{className:"sys-inline-actions",children:e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{f("manual")},children:"Try again"})})]}),n&&e.jsxs("section",{className:"mesh-tree-panel",children:[e.jsxs("div",{className:"mesh-tree-hint","aria-hidden":!0,children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"}),e.jsx("span",{children:"navigate"}),e.jsx("span",{className:"mesh-tree-hint-sep",children:"·"}),e.jsx("kbd",{children:"enter"}),e.jsx("span",{children:"pin"}),e.jsx("span",{className:"mesh-tree-hint-sep",children:"·"}),e.jsx("kbd",{children:"o"}),e.jsx("span",{children:"open"}),e.jsx("span",{className:"mesh-tree-hint-sep",children:"·"}),e.jsx("kbd",{children:"esc"}),e.jsx("span",{children:"clear"})]}),e.jsx(se,{agents:v,emptyTitle:b.length===0?h?"No agents on this machine":"No agents registered":"No agents match your filter",emptyBody:b.length===0?"Agents connected to this broker will appear here.":"Try clearing the search or switching the state pill back to All."})]})]}),R=Z();return e.jsxs("div",{className:"s-ops",children:[R?e.jsx("div",{className:"s-ops-header",children:e.jsx(G,{activeRoute:y,navigate:c})}):null,e.jsx("div",{className:"s-ops-body",children:w})]})}export{is as MeshScreen};
|
|
1
|
+
import{r as d,j as e}from"./index-NRbRrZw-.js";import{a as B}from"./api-DEHEgJ9m.js";import{t as A}from"./time-Dhsh_2EG.js";import{n as _,b as D,s as z,c as F}from"./colors-BtO5_zlx.js";import{u as O,c as H}from"./Provider-Cd-QZltN.js";import{d as K}from"./router-Bx1tiwVe.js";import{MeshCanvas as U}from"./MeshCanvas-CZYHLTvw.js";import{u as V}from"./useAgentHoverCard-BIrm8esH.js";import{u as Q}from"./local-agents-Q6KQ12B9.js";import{u as J,a as W,s as X,e as E,f as I,g as Y,h as L}from"./mesh-view-store-B0lqpw8M.js";import{u as Z}from"./useContentSecondaryNav-4atpGgFw.js";import{OpsSubnav as G}from"./OpsSubnav-BK9Fj3gU.js";/* empty css *//* empty css */import"./provider-Bq0ScH3v.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./Canvas-BO9mx5_P.js";import"./mesh-buckets-CfAukILK.js";import"./AgentDetailCard-2DZQahiN.js";import"./AgentLiveActions-BmXDRxER.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./SecondaryNav-CCQqTT3e.js";import"./secondaryNavConfig-BVQiyAXu.js";import"./message-square-DURSOrUr.js";import"./compass-D5Io6BIV.js";import"./settings-BpKRzxOD.js";import"./git-branch-CdJU49Af.js";import"./scroll-text-uulNqrf7.js";/* empty css */function ee(c){const p=new Map,x=new Map;for(const a of c){const o=a.project??"Unassigned",i=o.toLowerCase(),m=a.branch??"—";let r=p.get(i);r||(r=new Map,p.set(i,r));const u=r.get(m)??[];u.push(a),r.set(m,u);let s=x.get(i);s||(s=new Map,x.set(i,s)),s.set(o,(s.get(o)??0)+1)}const g=a=>{const o=x.get(a);if(!o)return a;let i=null,m=-1;for(const[r,u]of o)u>m&&(i=r,m=u);return i??a},j=[];for(const[a,o]of p){const i=g(a),m=[];let r=0;const u={in_turn:0,in_flight:0,needs_attention:0,callable:0,blocked:0},s=[];for(const[l,n]of o){const t=[...n].sort((h,b)=>(b.updatedAt??0)-(h.updatedAt??0)),y=t.reduce((h,b)=>Math.max(h,b.updatedAt??0),0);r=Math.max(r,y);for(const h of t)u[_(h.state)]+=1,s.push(h);m.push({branch:l,agents:t,latest:y})}m.sort((l,n)=>n.latest-l.latest),j.push({project:i,branches:m,agents:s,latest:r,counts:u})}return j.sort((a,o)=>o.latest-a.latest),j}function T(c){return c?c.replace(/^\/Users\/[^/]+/,"~"):null}function se({agents:c,emptyTitle:p="No agents registered",emptyBody:x="Agents connected to this broker will appear here.",selectMode:g="preview"}){const{navigate:j}=O(),a=d.useMemo(()=>ee(c),[c]),[o,i]=d.useState(()=>new Set),m=d.useMemo(()=>{const s=[];for(const l of a)if(!o.has(l.project))for(const n of l.branches)for(const t of n.agents)s.push(t.id);return s},[a,o]),r=V({agents:c,orderedIds:m,navigate:j,selectMode:g});if(c.length===0)return e.jsxs("div",{className:"sys-list-empty",children:[e.jsx("h3",{children:p}),e.jsx("p",{children:x})]});const u=s=>{i(l=>{const n=new Set(l);return n.has(s)?n.delete(s):n.add(s),n})};return e.jsxs("div",{className:"mesh-tree",ref:r.containerRef,children:[a.map(s=>{const l=o.has(s.project);return e.jsxs("div",{className:`mesh-tree-group${l?" mesh-tree-group--collapsed":""}`,children:[e.jsxs("button",{type:"button",className:"mesh-tree-project",onClick:()=>u(s.project),"aria-expanded":!l,children:[e.jsx("span",{className:`mesh-tree-caret${l?"":" mesh-tree-caret--open"}`,"aria-hidden":!0,children:"›"}),e.jsx("span",{className:"mesh-tree-project-name",children:s.project}),e.jsx("span",{className:"mesh-tree-project-count",children:s.agents.length}),e.jsxs("span",{className:"mesh-tree-counts",children:[s.counts.in_turn+s.counts.in_flight+s.counts.needs_attention>0&&e.jsxs("span",{className:"mesh-tree-count mesh-tree-count--working",children:[e.jsx("span",{className:"mesh-tree-count-dot"}),s.counts.in_turn+s.counts.in_flight+s.counts.needs_attention]}),s.counts.callable>0&&e.jsxs("span",{className:"mesh-tree-count mesh-tree-count--available",children:[e.jsx("span",{className:"mesh-tree-count-dot"}),s.counts.callable]}),s.counts.blocked>0&&e.jsxs("span",{className:"mesh-tree-count mesh-tree-count--offline",children:[e.jsx("span",{className:"mesh-tree-count-dot"}),s.counts.blocked]})]}),e.jsx("span",{className:"mesh-tree-project-time",children:s.latest?A(s.latest):""})]}),!l&&e.jsx("div",{className:"mesh-tree-branches",children:s.branches.map(n=>e.jsxs("div",{className:"mesh-tree-branch",children:[e.jsxs("div",{className:"mesh-tree-branch-head",children:[e.jsx("span",{className:"mesh-tree-branch-elbow","aria-hidden":!0,children:"└"}),e.jsx("span",{className:"mesh-tree-branch-name",children:n.branch})]}),e.jsx("div",{className:"mesh-tree-agents",children:n.agents.map(t=>{const y=_(t.state),h=D(t.state),b=t.agentClass==="organic",S=r.getState(t.id),k=T(t.cwd)??T(t.projectRoot),f=t.harnessSessionId?t.harnessSessionId.slice(0,8):null,v=[];k&&v.push({kind:"cwd",text:k}),t.harness&&v.push({kind:"harness",text:t.harness}),t.model&&v.push({kind:"model",text:t.model}),f&&v.push({kind:"sess",text:`sess:${f}`});const $=r.bind(t.id);return e.jsxs("button",{type:"button",className:`mesh-tree-agent${b?" mesh-tree-agent--organic":""}${S.isActive?" mesh-tree-agent--active":""}${S.isPinned?" mesh-tree-agent--pinned":""}`,title:b?`${t.harness??t.name} · organic session`:void 0,...$,children:[e.jsx("span",{className:`mesh-tree-agent-dot mesh-tree-agent-dot--${h}`,style:{background:z(t.state)}}),e.jsx("span",{className:"mesh-tree-agent-name",children:t.handle??t.name}),b&&e.jsx("span",{className:"mesh-tree-agent-organic","aria-label":"organic session",children:"○"}),e.jsx("span",{className:"mesh-tree-agent-inline",children:v.map((w,R)=>e.jsxs("span",{className:`mesh-tree-agent-inline-part mesh-tree-agent-inline-part--${w.kind}`,children:[R>0&&e.jsx("span",{className:"mesh-tree-agent-inline-sep",children:"·"}),w.text]},w.kind))}),e.jsx("span",{className:`mesh-tree-agent-state mesh-tree-agent-state--${h}`,children:F(y)}),e.jsx("span",{className:"mesh-tree-agent-time",children:t.updatedAt?A(t.updatedAt):""})]},t.id)})})]},n.branch))})]},s.project)}),r.card]})}function P({mode:c,density:p,query:x,stateFilter:g,loading:j,refreshing:a,error:o,lastLoadedAt:i,hasMesh:m,onRefresh:r}){return e.jsxs("div",{className:`mesh-hud mesh-hud--${c}`,children:[e.jsxs("div",{className:"mesh-hud-left",children:[e.jsxs("div",{className:"mesh-mode-toggle",children:[e.jsx("button",{type:"button",className:`mesh-mode-btn${c==="map"?" mesh-mode-btn--active":""}`,onClick:()=>E("map"),children:"Map"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${c==="tree"?" mesh-mode-btn--active":""}`,onClick:()=>E("tree"),children:"Tree"})]}),e.jsxs("div",{className:"mesh-mode-toggle mesh-density-toggle",role:"group","aria-label":"Density","aria-hidden":c!=="map","data-mode-only":"map",children:[e.jsx("button",{type:"button",className:`mesh-mode-btn${p==="compact"?" mesh-mode-btn--active":""}`,onClick:()=>I("compact"),disabled:c!=="map",title:"Compact — dots",children:"Compact"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${p==="comfortable"?" mesh-mode-btn--active":""}`,onClick:()=>I("comfortable"),disabled:c!=="map",title:"Comfortable — chips",children:"Comfortable"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${p==="spacious"?" mesh-mode-btn--active":""}`,onClick:()=>I("spacious"),disabled:c!=="map",title:"Spacious — cards",children:"Spacious"})]})]}),m&&e.jsxs("div",{className:"mesh-hud-filters",children:[e.jsx("input",{type:"search",className:"mesh-hud-search",placeholder:"Filter agents…",value:x,onChange:u=>Y(u.target.value),spellCheck:!1,autoCorrect:"off",autoCapitalize:"off"}),e.jsxs("div",{className:"mesh-mode-toggle",role:"group","aria-label":"State",children:[e.jsx("button",{type:"button",className:`mesh-mode-btn${g==="all"?" mesh-mode-btn--active":""}`,onClick:()=>L("all"),children:"All"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${g==="in_turn"?" mesh-mode-btn--active":""}`,onClick:()=>L("in_turn"),children:"In turn"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${g==="callable"?" mesh-mode-btn--active":""}`,onClick:()=>L("callable"),children:"Callable"})]})]}),e.jsxs("div",{className:"mesh-hud-right",children:[e.jsx("span",{className:"mesh-hud-sync",children:j?"Loading…":o&&m?`Last sync old — ${i?A(i):"unknown"}`:i?A(i):"—"}),e.jsx("button",{type:"button",className:"s-btn",disabled:j||a,onClick:r,children:a?"Refreshing…":"Refresh"})]})]})}function is({navigate:c}){const[p,x]=d.useState(!0),[g,j]=d.useState(!1),[a,o]=d.useState(null),[i,m]=d.useState(null),{mode:r,density:u,query:s,stateFilter:l,meshSnapshot:n}=J(),{agents:t}=Q(),{route:y}=O(),h=K(y),b=d.useMemo(()=>H(t,h,n?.localNode?.id),[t,h,n?.localNode?.id]),S=d.useRef(null),k=d.useRef(0);d.useEffect(()=>{S.current=n},[n]),d.useEffect(()=>{h&&W(h,"node")},[h]);const f=d.useCallback(async(C="initial")=>{const N=++k.current;!(S.current!==null)&&C!=="background"?(x(!0),o(null)):j(!0);try{const M=await B("/api/mesh");if(N!==k.current)return;X(M),o(null),m(Date.now())}catch(M){if(N!==k.current)return;o(M instanceof Error?M.message:String(M))}finally{N===k.current&&(x(!1),j(!1))}},[]);d.useEffect(()=>{f("initial")},[f]),d.useEffect(()=>{const C=setInterval(()=>{f("background")},1e4);return()=>clearInterval(C)},[f]);const v=d.useMemo(()=>{const C=s.trim().toLowerCase();return b.filter(N=>l!=="all"&&_(N.state)!==l?!1:C?`${N.name??""} ${N.handle??""} ${N.harness??""} ${N.project??""} ${N.branch??""}`.toLowerCase().includes(C):!0)},[s,b,l]),$={mode:r,density:u,query:s,stateFilter:l,loading:p,refreshing:g,error:a,lastLoadedAt:i,hasMesh:!!n,onRefresh:()=>{f("manual")}},w=r==="map"?e.jsxs("div",{className:"mesh-map-canvas",children:[n&&e.jsx(U,{mesh:n,agents:v}),p&&!n&&e.jsx("div",{className:"mesh-canvas-center",children:e.jsx("p",{className:"mesh-canvas-center-label",children:"Loading mesh…"})}),!p&&!n&&a&&e.jsxs("div",{className:"mesh-canvas-center",children:[e.jsx("p",{className:"mesh-canvas-center-label",children:a}),e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{f("manual")},children:"Try again"})]}),e.jsx(P,{...$})]}):e.jsxs("div",{className:"mesh-tree-page",children:[e.jsx(P,{...$}),p&&!n&&e.jsxs("div",{className:"sys-panel sys-state-card mesh-tree-state",children:[e.jsx("h3",{className:"sys-state-title",children:"Loading mesh status"}),e.jsx("p",{className:"sys-state-body",children:"Inspecting broker reachability and peer discovery inputs."})]}),!p&&!n&&a&&e.jsxs("div",{className:"sys-panel sys-state-card sys-state-card-error mesh-tree-state",children:[e.jsx("h3",{className:"sys-state-title",children:"Mesh status is unavailable"}),e.jsx("p",{className:"sys-state-body",children:a}),e.jsx("div",{className:"sys-inline-actions",children:e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{f("manual")},children:"Try again"})})]}),n&&e.jsxs("section",{className:"mesh-tree-panel",children:[e.jsxs("div",{className:"mesh-tree-hint","aria-hidden":!0,children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"}),e.jsx("span",{children:"navigate"}),e.jsx("span",{className:"mesh-tree-hint-sep",children:"·"}),e.jsx("kbd",{children:"enter"}),e.jsx("span",{children:"pin"}),e.jsx("span",{className:"mesh-tree-hint-sep",children:"·"}),e.jsx("kbd",{children:"o"}),e.jsx("span",{children:"open"}),e.jsx("span",{className:"mesh-tree-hint-sep",children:"·"}),e.jsx("kbd",{children:"esc"}),e.jsx("span",{children:"clear"})]}),e.jsx(se,{agents:v,emptyTitle:b.length===0?h?"No agents on this machine":"No agents registered":"No agents match your filter",emptyBody:b.length===0?"Agents connected to this broker will appear here.":"Try clearing the search or switching the state pill back to All."})]})]}),R=Z();return e.jsxs("div",{className:"s-ops",children:[R?e.jsx("div",{className:"s-ops-header",children:e.jsx(G,{activeRoute:y,navigate:c})}):null,e.jsx("div",{className:"s-ops-body",children:w})]})}export{is as MeshScreen};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/arc.es-
|
|
2
|
-
import{r as g,j as d,_ as j}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/arc.es-BRPqOKIx.js","assets/index-NRbRrZw-.js","assets/index-DzlEgstl.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as g,j as d,_ as j}from"./index-NRbRrZw-.js";const E=g.lazy(()=>j(()=>import("./arc.es-BRPqOKIx.js"),__vite__mapDeps([0,1,2])).then(t=>({default:t.ArcDiagram})));function i(t){if(!t)return"";const e=t.replace(/^https?:\/\//,"").split("/")[0],[o]=e.split(":");return o.split(".")[0]}function S(t){const e=t.hostName?.trim();if(e&&e.toLowerCase()!=="localhost")return i(e)||e;const o=t.dnsName?.trim().replace(/\.$/,"");return o?i(o)||o:i(t.name)||t.name}function y(t){if(!t)return"";const e=t.replace(/^https?:\/\//,"").split("/")[0],[o]=e.split(":");return o.replace(/\.$/,"").toLowerCase()}function l(t){const e=y(t);return e?e.split(".")[0]??e:""}function B(t){return t.brokerUrl?i(t.brokerUrl):t.hostName?i(t.hostName):t.id.slice(0,10)}function I(t,e){return Math.abs(t)>=Math.abs(e)?t>=0?["right","left"]:["left","right"]:e>=0?["bottom","top"]:["top","bottom"]}function W(t,e){const o=l(e.hostName||e.name),c=l(t.localNode?.hostName||t.localNode?.name);return!!c&&o===c}function C(t,e){const o=new Set([l(t.hostName),l(t.name),...t.addresses.map(n=>y(n)),...t.addresses.map(n=>l(n))].filter(Boolean)),c=new Set([l(e.hostName),l(e.name),y(e.brokerUrl),l(e.brokerUrl)].filter(Boolean));for(const n of o)if(c.has(n))return!0;return!1}function L(t){if(!t.localNode)return null;const e=t.localNode.id,o=Object.values(t.nodes).filter(s=>s.id!==e),c=t.tailscale.peers.filter(s=>!W(t,s)).filter(s=>!o.some(u=>C(s,u))),n=[...o.map(s=>({kind:"mesh",peer:s})),...c.map(s=>({kind:"tailnet",peer:s}))],M=800,_=300,h=M/2,m=_/2,f={[e]:{x:h,y:m,size:"m"}},p={[e]:{icon:"Database",name:i(t.localNode.hostName)||t.localNode.name||"broker",subtitle:"this node",color:"violet"}},N=[];if(n.length===0)f.__placeholder={x:h+220,y:m,size:"m"},p.__placeholder={icon:"CircleDashed",name:"No peers yet",subtitle:"awaiting discovery",color:"zinc"},N.push({from:e,to:"__placeholder",fromAnchor:"right",toAnchor:"left",style:"pending"});else{const s=n.length,u=Math.min(170,100+s*10);n.forEach(({kind:r,peer:a},z)=>{const v=z/s*Math.PI*2-Math.PI/2,x=Math.round(h+u*Math.cos(v)),k=Math.round(m+u*Math.sin(v)),b=r==="mesh"?a.id:`tailnet:${a.id}`,A=r==="mesh"?i(a.hostName)||a.name||"peer":S(a)||"tailnet",D=r==="mesh"?B(a):a.online?a.addresses[0]??"tailnet only":"tailnet offline";f[b]={x,y:k,size:r==="mesh"?"m":"s"},p[b]={icon:r==="mesh"?"Database":"CircleDashed",name:A,subtitle:D,color:r==="mesh"?a.advertiseScope==="mesh"?"emerald":"zinc":a.online?"sky":"zinc"};const[w,P]=I(x-h,k-m);N.push({from:e,to:b,fromAnchor:w,toAnchor:P,style:r==="mesh"?a.advertiseScope==="mesh"?"mesh":"local":a.online?"tailnet":"tailnet-offline"})})}return{layout:{width:M,height:_},nodes:f,nodeData:p,connectors:N,connectorStyles:{mesh:{color:"emerald",strokeWidth:2,label:"mesh"},local:{color:"zinc",strokeWidth:1.5},tailnet:{color:"sky",strokeWidth:1.5,dashed:!0,label:"tailnet"},"tailnet-offline":{color:"zinc",strokeWidth:1.25,dashed:!0,label:"tailnet"},pending:{color:"zinc",strokeWidth:1.5,dashed:!0}}}}function U({mesh:t}){const e=g.useMemo(()=>L(t),[t]);return e?d.jsx("div",{className:"s-mesh-topology",children:d.jsx(g.Suspense,{fallback:d.jsx("div",{className:"s-mesh-topology-fallback"}),children:d.jsx(E,{data:e,className:"s-mesh-topology-canvas",mode:"light",theme:"cool",interactive:!0,showArcToggle:!1,defaultZoom:"fit",maxFitZoom:.95,hoverEffects:{dim:!0,lift:!0,glow:!0,highlightEdges:!0}})})}):null}export{U as MeshTopologyView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as a}from"./index-
|
|
1
|
+
import{j as e,r as a}from"./index-NRbRrZw-.js";import{i as w,a as C}from"./conversation-model-CIzM7aXT.js";import{u as M,m as S,d as b}from"./Provider-Cd-QZltN.js";import{d as A}from"./router-Bx1tiwVe.js";import{l as I,i as B,s as E}from"./sessionRead-CvFz2RHv.js";import{u as L}from"./use-conversation-list-htp0Ui63.js";import{u as R}from"./use-fleet-active-asks-BhuTn5mV.js";import{ConversationScreen as D}from"./ConversationScreen-D77SoLos.js";import{P as O}from"./plus-ZReaTFF-.js";import"./createLucideIcon-Da0lq809.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./provider-Bq0ScH3v.js";import"./api-DEHEgJ9m.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./ConversationComposer-DPWu3HvK.js";import"./AgentAvatar-CQqJcwOQ.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./zap-CocRNtyr.js";import"./message-markup-BP2nH9kQ.js";import"./mentions-KNASbAjG.js";import"./AgentDetailCard-2DZQahiN.js";import"./AgentLiveActions-BmXDRxER.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./message-visibility-kJM8XcSG.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Ce7TENb9.js";import"./BackToPicker-CXsbxbHM.js";import"./AstronautSuit-C05Ezxl9.js";import"./ConversationFeedRows-MhcPfxUr.js";import"./ConversationPanels-D-b5SLO-.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-0fAsybdo.js";import"./proxy-DtC2iXnT.js";import"./activity-DTqqWiyV.js";import"./message-circle-2v9Udia0.js";import"./tail-events-B7BrDaFi.js";import"./ConversationStatus-lIvSKRic.js";import"./check-BdovFDz8.js";import"./sparkles-CgTby-ap.js";function it({conversationId:s,navigate:c}){return s?e.jsx(D,{conversationId:s,navigate:c,showBackNav:!1}):e.jsx(P,{})}function P(){const{onlineCount:s,apiConnection:c,reload:j,route:N,agents:d,openContextCapture:k,navigate:u}=M(),{sessions:y,loading:p,loadError:n}=L(),[x]=a.useState(()=>I()),v=R(),t=c.status==="offline",i=A(N),f=a.useRef(!1),h=a.useMemo(()=>{const m=S(d,i);return[...b(y,m,i)].sort((g,o)=>(o.lastMessageAt??0)-(g.lastMessageAt??0))},[y,d,i]),r=a.useMemo(()=>{const m=h.filter(o=>!w(o));return m.find(o=>o.agentId?v.get(o.agentId)?.status==="needs_attention"&&B(o.lastMessageAt,o.id,x):!1)??m[0]},[h,v,x]);a.useEffect(()=>{f.current||p||n||t||r&&(f.current=!0,E(r.id),u({view:"messages",conversationId:r.id,...i?{machineId:i}:{}},{replace:!0}))},[r,p,n,t,i,u]);const l=!t&&!n&&(p||!!r);return e.jsx("div",{className:`s-conv-empty${t?" s-conv-empty--offline":""}`,children:e.jsxs("div",{className:"s-conv-empty-inner",children:[e.jsx($,{}),e.jsx("div",{className:"s-conv-empty-eyebrow",children:t?"Connection":"Conversations"}),e.jsx("p",{className:"s-conv-empty-title",children:t?"Scout server offline":l?"Opening your latest conversation":n?"Chats unavailable":"Nothing open yet"}),e.jsx("p",{className:"s-conv-empty-detail",children:t?"Start or restart Scout services. Chats and context will appear when the server responds.":l?V(r):n||"Start a chat by choosing an agent and sending the first message."}),t||n?e.jsx("button",{type:"button",className:"s-conv-empty-action",onClick:()=>{j()},children:"Retry connection"}):l?null:e.jsxs("button",{type:"button",className:"s-conv-empty-new",onClick:()=>k(),children:[e.jsx(O,{size:16,"aria-hidden":"true"}),"New chat"]}),e.jsxs("div",{className:"s-conv-empty-ambient",children:[e.jsx("span",{className:"s-conv-empty-ambient-dot","aria-hidden":"true"}),t?"waiting for server":`${s} ${s===1?"agent":"agents"} active`]})]})})}function V(s){return s?C(s):"Finding where you left off."}function $(){return e.jsxs("svg",{className:"s-conv-empty-mesh",viewBox:"0 0 72 72",fill:"none","aria-hidden":"true",children:[e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"14",y1:"20",x2:"36",y2:"12"}),e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"36",y1:"12",x2:"58",y2:"24"}),e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"14",y1:"20",x2:"24",y2:"46"}),e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"24",y1:"46",x2:"36",y2:"12"}),e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"24",y1:"46",x2:"50",y2:"54"}),e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"50",y1:"54",x2:"58",y2:"24"}),e.jsx("line",{className:"s-conv-empty-mesh-link",x1:"36",y1:"12",x2:"50",y2:"54"}),e.jsx("circle",{className:"s-conv-empty-mesh-node",cx:"14",cy:"20",r:"2.5"}),e.jsx("circle",{className:"s-conv-empty-mesh-node",cx:"58",cy:"24",r:"2.5"}),e.jsx("circle",{className:"s-conv-empty-mesh-node",cx:"24",cy:"46",r:"2.5"}),e.jsx("circle",{className:"s-conv-empty-mesh-node",cx:"50",cy:"54",r:"2.5"}),e.jsx("circle",{className:"s-conv-empty-mesh-node s-conv-empty-mesh-node--accent",cx:"36",cy:"12",r:"3.5"})]})}export{it as MessagesScreen};
|
package/dist/client/assets/{MissionContextRail-DXkrbcnZ.js → MissionContextRail-MTL2EAnr.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as s}from"./index-
|
|
1
|
+
import{r as h,j as s}from"./index-NRbRrZw-.js";import{H as A}from"./HarnessMark-CEzmPFHC.js";import{s as C,t as M,b as k}from"./bash-format-BRV5C6Gv.js";import{d as E,c as S}from"./context-budget-DX_fwUs3.js";import{s as b}from"./page-status-CEP5pGf3.js";import{t as T}from"./time-Dhsh_2EG.js";import{b as y,a as B,l as O}from"./agent-lane-detail-D5EIlX7_.js";import{b as _}from"./agent-lane-preview-BhplDYGf.js";import{m as F}from"./mission-wall-CocIM1cF.js";import"./lane-observe-vfyACHi0.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-ask-display-B6iCAVcd.js";import"./mission-control-model-C0fByIjm.js";import"./colors-BtO5_zlx.js";const P=/^\[[a-z][a-z-]*\]$/i;function H(a,e){const l=w=>w.replace(/[…\s]+$/u,""),n=l(a),i=l(e);if(!n)return!0;const r=n.slice(0,Math.min(n.length,i.length));return i.startsWith(r)||n.startsWith(i)}function D(a,e){const l=a?.headline.trim();if(l&&!P.test(l)){const i=a?.detail?.trim(),r=a?.headFull??l;return i&&H(l,i)?{headline:i.length>l.length?i:l,full:r,detail:null}:{headline:l,full:r,detail:i??null}}const n=[...e?.events??[]].reverse().find(i=>i.kind==="tool");if(n){const i=n.arg?C(M(n.arg)).rest||n.arg:null,r=[n.tool,i].filter(Boolean).join(" · ").trim()||"Running tool";return{headline:r,full:r,detail:null}}return l?{headline:l,full:a?.headFull??l,detail:null}:null}const W=8,z=6,G={created:"+",modified:"~",read:"○"};function f(a,e=42){return a?a.length<=e?a:`…${a.slice(-(e-1))}`:"—"}function K(a){const e=a.replace(/\\/g,"/"),l=e.lastIndexOf("/");return l<0?{dir:"",base:e}:{dir:e.slice(0,l+1),base:e.slice(l+1)}}function ds({log:a,lane:e,onClose:l,onExpand:n,onTail:i,onOpenLog:r,onOpenFile:w}){const{agent:j,observe:o}=e,t=h.useMemo(()=>y(e),[e]),v=h.useMemo(()=>_(o,j,{isLive:a.live}),[o,j,a.live]),m=h.useMemo(()=>D(v,o),[v,o]),u=h.useMemo(()=>B(o,W),[o]),p=h.useMemo(()=>O(o,z),[o]),d=h.useMemo(()=>E(t.usage,{model:t.model,adapterType:t.harness}),[t.usage,t.model,t.harness]),N=F(a),g=[a.project,j.branch].filter(Boolean).join("/")||a.cwd||"—",L=u.filter(c=>c.state!=="read").length,$=[["MODEL",[t.harness,t.model].filter(Boolean).join("/")||"—",null],["BRANCH",t.branch??"—",null],["CWD",f(t.cwd),t.cwd],["SESSION",f(t.sessionId,30),t.sessionId],["LOG",f(a.logPath,30),a.logPath]];return s.jsxs("aside",{className:"s-wall-rail","aria-label":`${N} context`,children:[s.jsxs("div",{className:"s-wall-rail-head",children:[s.jsx("span",{className:`s-wall-rail-dot${a.live?" s-wall-rail-dot--live":""}`,"aria-hidden":"true"}),s.jsx(A,{harness:a.source,size:12,title:null}),s.jsxs("div",{className:"s-wall-rail-identity",children:[s.jsx("div",{className:"s-wall-rail-title",title:j.name,children:N}),s.jsxs("div",{className:"s-wall-rail-sub",title:a.cwd??g,children:[g," · ",a.lastActiveAt?T(a.lastActiveAt):"idle"]})]}),s.jsx("button",{type:"button",className:"s-wall-rail-close",onClick:l,"aria-label":"Close context (Esc)",title:"Close context (Esc)",children:"✕"})]}),s.jsxs("div",{className:"s-wall-rail-body",children:[s.jsxs("section",{className:"s-wall-rail-sec",children:[s.jsxs("div",{className:"s-wall-rail-sechead",children:[s.jsx("span",{className:"s-wall-rail-seclabel",children:a.live?"executing now":"last action"}),s.jsx("span",{className:"s-wall-rail-secrule","aria-hidden":"true"})]}),m?s.jsxs("div",{className:"s-wall-rail-now",children:[s.jsx("div",{className:"s-wall-rail-headline",title:m.full,children:m.headline}),m.detail&&s.jsx("div",{className:"s-wall-rail-detail",title:m.detail,children:m.detail})]}):s.jsx("div",{className:"s-wall-rail-empty",children:"No interpreted trace yet — the pane is streaming raw output."}),s.jsxs("dl",{className:"s-wall-rail-stats",children:[s.jsx(x,{label:"events",value:t.events}),s.jsx(x,{label:"tools",value:t.tools}),s.jsx(x,{label:"edits",value:t.edits}),s.jsx(x,{label:"reads",value:t.reads}),s.jsx(x,{label:"files",value:t.files})]}),d&&s.jsxs("div",{className:`s-wall-rail-gauge${d.overLimit?" s-wall-rail-gauge--over":""}`,children:[s.jsxs("div",{className:"s-wall-rail-gauge-line",children:[s.jsx("span",{className:"s-wall-rail-gauge-label",children:"context"}),s.jsxs("span",{className:"s-wall-rail-gauge-value",children:[d.usedLabel,s.jsxs("span",{className:"s-wall-rail-gauge-of",children:[" / ",d.budgetLabel]})]}),s.jsxs("span",{className:"s-wall-rail-gauge-pct",children:[d.pct,"%",d.overLimit?" over":""]})]}),s.jsx("div",{className:"s-wall-rail-gauge-bar",role:"progressbar","aria-label":"Context budget","aria-valuenow":d.pct,"aria-valuemin":0,"aria-valuemax":Math.max(100,d.pct),children:s.jsx("span",{className:"s-wall-rail-gauge-fill",style:{width:`${S(d)}%`}})})]})]}),s.jsxs("section",{className:"s-wall-rail-sec",children:[s.jsxs("div",{className:"s-wall-rail-sechead",children:[s.jsx("span",{className:"s-wall-rail-seclabel",children:"runtime"}),s.jsx("span",{className:"s-wall-rail-secrule","aria-hidden":"true"})]}),s.jsx("dl",{className:"s-wall-rail-facts",children:$.map(([c,R,I])=>s.jsxs("div",{className:"s-wall-rail-fact",children:[s.jsx("dt",{className:"s-wall-rail-fact-label",children:c}),s.jsx("dd",{className:"s-wall-rail-fact-value",title:I??R,children:R})]},c))})]}),s.jsxs("section",{className:"s-wall-rail-sec",children:[s.jsxs("div",{className:"s-wall-rail-sechead",children:[s.jsx("span",{className:"s-wall-rail-seclabel",children:"files"}),u.length>0&&s.jsxs("span",{className:"s-wall-rail-seccount",children:[L," changed · ",u.length-L," read"]}),s.jsx("span",{className:"s-wall-rail-secrule","aria-hidden":"true"})]}),u.length===0?s.jsx("div",{className:"s-wall-rail-empty",children:"No files touched in this window."}):s.jsx("div",{className:"s-wall-rail-files",children:u.map(c=>s.jsx(U,{file:c,onOpen:w},`${c.path}:${c.lastT}`))})]}),s.jsxs("section",{className:"s-wall-rail-sec",children:[s.jsxs("div",{className:"s-wall-rail-sechead",children:[s.jsx("span",{className:"s-wall-rail-seclabel",children:"commands"}),p.length>0&&s.jsx("span",{className:"s-wall-rail-seccount",children:p.length}),s.jsx("span",{className:"s-wall-rail-secrule","aria-hidden":"true"})]}),p.length===0?s.jsx("div",{className:"s-wall-rail-empty",children:"No shell commands in this window."}):s.jsx("div",{className:"s-wall-rail-cmds",children:p.map(c=>s.jsx(q,{entry:c},c.id))})]})]}),s.jsxs("div",{className:"s-wall-rail-foot",children:[s.jsx("button",{type:"button",className:"s-wall-rail-act",onClick:n,...b({label:`Expand ${N}`}),children:"Expand"}),s.jsx("button",{type:"button",className:"s-wall-rail-act",onClick:i,...b({label:`Tail · ${N}`,route:`/ops/tail?q=${encodeURIComponent(a.sessionId)}`}),children:"Tail ↗"}),s.jsx("button",{type:"button",className:"s-wall-rail-act",onClick:r,...b({label:`Session · ${a.sessionId}`,route:`/sessions/${a.sessionId}`}),children:"Session ↗"}),s.jsxs("span",{className:"s-wall-rail-keys",children:[s.jsx("kbd",{children:"hjkl"})," move · ",s.jsx("kbd",{children:"esc"})," close"]})]})]})}function x({label:a,value:e}){return s.jsxs("div",{className:"s-wall-rail-stat",children:[s.jsx("dt",{className:"s-wall-rail-stat-label",children:a}),s.jsx("dd",{className:"s-wall-rail-stat-value",children:e>0?e.toLocaleString():"—"})]})}function U({file:a,onOpen:e}){const{dir:l,base:n}=K(a.path);return s.jsxs("button",{type:"button",className:"s-wall-rail-frow",title:a.path,onClick:()=>e(a.path),children:[s.jsx("span",{className:`s-wall-rail-fstate s-wall-rail-fstate--${a.state}`,"aria-hidden":"true",children:G[a.state]??"○"}),s.jsxs("span",{className:"s-wall-rail-fpath",children:[l&&s.jsx("span",{className:"s-wall-rail-fdir",children:l}),s.jsx("span",{className:"s-wall-rail-fbase",children:n})]})]})}function q({entry:a}){const{dir:e,rest:l}=C(M(a.command)),n=k(l||a.command);return s.jsxs("div",{className:"s-wall-rail-crow",title:a.command,children:[s.jsx("span",{className:"s-wall-rail-cmark","aria-hidden":"true",children:"❯"}),s.jsxs("span",{className:"s-wall-rail-ctext",children:[e&&s.jsxs("span",{className:"s-wall-rail-bash-dir",children:[e,"/"]}),n.map((i,r)=>s.jsxs("span",{className:`s-wall-rail-bash-${i.tier}${i.flag?" s-wall-rail-bash-flag":""}`,children:[r>0?" ":"",i.text]},r))]}),a.outcome&&s.jsx("span",{className:"s-wall-rail-cresult",children:a.outcome})]})}export{ds as MissionContextRail};
|
package/dist/client/assets/{MissionControlView-BCH-Zsp4.js → MissionControlView-BGj1qnI2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as a}from"./index-Bli6bTLU.js";/* empty css */import{a as K}from"./api-DEHEgJ9m.js";import{u as Ae,f as Re,g as ge,t as U,h as b,e as ue}from"./mission-control-store-DtjtRs9Z.js";import{u as be}from"./observe-DL5_8-Zj.js";import{h as me}from"./NewChatComposer-Bgqes0UQ.js";import{i as Ee,c as je}from"./keyboard-nav-7iEtvu9P.js";import{g as Me}from"./tail-display-DcliDVkW.js";import{u as Le}from"./tail-events-CrN-Rmxj.js";import{u as Te}from"./Provider-Ve8yXaWR.js";import{MissionContextRail as ke}from"./MissionContextRail-DXkrbcnZ.js";import{FocusOverlay as Ne}from"./MissionFocusOverlay-DbAliOSF.js";import{MissionLogPane as Ce}from"./MissionLogPane-D06c29Y8.js";import{o as Fe}from"./agent-lanes-model-BKOs_32K.js";import{A as Oe}from"./mission-control-model-C0fByIjm.js";import{b as Pe,s as _e,f as De,c as We,n as $e,d as Ke,m as Ve,W as qe}from"./mission-wall-CocIM1cF.js";import"./colors-BtO5_zlx.js";import"./surface-activity-B1rgWB1i.js";import"./text-BR9Bap0E.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./createLucideIcon-DLlxGjKt.js";import"./conversation-model-CigSPlKA.js";import"./time-Dhsh_2EG.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./x-BJyPzFnn.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./file-text-BVhkMWyC.js";import"./lane-edit-display-C_Aujldz.js";import"./index-BWHgHrtv.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./bash-format-BRV5C6Gv.js";import"./context-budget-DX_fwUs3.js";import"./page-status-CW8co39E.js";import"./agent-lane-detail-D5EIlX7_.js";import"./lane-observe-vfyACHi0.js";import"./agent-lane-preview-BhplDYGf.js";import"./lane-ask-display-B6iCAVcd.js";function He(t,o,r,c){if(o<=0)return-1;const d=o-1,x=Math.max(1,Math.floor(r));if(t<0||t>d)return c==="left"||c==="up"||c==="last"?d:0;switch(c){case"first":return 0;case"last":return d;case"left":return Math.max(0,t-1);case"right":return Math.min(d,t+1);case"up":{const v=t-x;return v>=0?v:t}case"down":{const v=t+x;return v<=d?v:d}}}function Be(t){switch(t){case"h":case"ArrowLeft":return"left";case"l":case"ArrowRight":return"right";case"k":case"ArrowUp":return"up";case"j":case"ArrowDown":return"down";case"g":case"Home":return"first";case"G":case"End":return"last";default:return null}}const $=4e3,Qe=250,ze=3e4,Ue=1500,Ge=1800;function Je(t,o){return t.map(r=>({id:r.id,name:r.name,handle:r.handle,state:r.state,project:r.project,branch:r.branch,harness:r.harness,model:r.model,sessionIds:o.get(r.id)??[]}))}function Ye(t){return{id:`native:${t.source}:${t.sessionId}`,definitionId:`native:${t.source}:${t.sessionId}`,name:`${t.source} · ${t.project}`,handle:t.sessionId.slice(0,8),agentClass:"native-session",harness:t.source,state:t.live?"working":"ready",projectRoot:t.cwd,cwd:t.cwd,updatedAt:t.lastActiveAt,createdAt:null,transport:"tail",selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:t.project,branch:t.attribution==="unattributed"?"native session":t.attribution,role:"native session",model:null,harnessSessionId:t.sessionId,terminalSurface:null,harnessLogPath:t.logPath,conversationId:null,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null}}function fe(t){return t.agentClass==="native-session"||t.id.startsWith("native:")}function de(t,o){if(t.agent){const r=o.find(c=>c.id===t.agent.id);if(r)return r}return Ye(t)}function Xe(t,o){const r=o.find(c=>c.sessionId?.trim()===t.sessionId);return r||{source:t.source,transcriptPath:t.logPath??"",sessionId:t.sessionId,cwd:t.cwd,project:t.project,harness:t.attribution,mtimeMs:t.lastActiveAt,size:0}}function Ze(t,o){const r=t.harnessSessionId?.trim();if(!r)throw new Error("This native session has no session id to continue.");const c=t.projectRoot?.trim()||t.cwd?.trim();if(!c)throw new Error("This native session has no project path to route from.");const d=t.harness?.trim(),x=t.model?.trim();return{target:{projectPath:c},execution:{session:"existing",targetSessionId:r,...d?{harness:d}:{},...x?{model:x}:{}},agent:{persistence:"one_time",...t.handle?.trim()?{handle:t.handle.trim()}:{}},seed:{instructions:o}}}async function et(t,o){if(fe(t)){await K("/api/sessions",{method:"POST",body:JSON.stringify(Ze(t,o))});return}const r=await me(t);await K("/api/send",{method:"POST",body:JSON.stringify({body:o,chatId:r,execution:{...t.harness?.trim()?{harness:t.harness.trim()}:{},...t.model?.trim()?{model:t.model.trim()}:{}}})})}function tt(t,o,r){return t.live?"active":t.lastActiveAt>0&&o-t.lastActiveAt<=r?"recent":"idle"}function rs({navigate:t,agents:o}){const r=Ae(),{openFilePreview:c}=Te(),{activityFilter:d,sourceFilter:x,activityWindowMs:v,groupMode:G,query:J,focusedId:F,revealRequest:A}=r,[Y,X]=n.useState([]),[O,pe]=n.useState(null),[y,he]=n.useState(()=>Date.now()),T=be(o),P=n.useRef([]);Le(e=>{P.current.push(e)}),n.useEffect(()=>{const e=setInterval(()=>{if(P.current.length===0)return;const s=P.current;P.current=[],X(i=>{const p=new Set(i.map(w=>w.id)),u=s.filter(w=>!w.id||!p.has(w.id));if(u.length===0)return i;const h=i.concat(u);return h.length>$?h.slice(h.length-$):h})},Qe);return()=>clearInterval(e)},[]),n.useEffect(()=>{const e=setInterval(()=>he(Date.now()),1e4);return()=>clearInterval(e)},[]),n.useEffect(()=>{let e=!1;return K(`/api/tail/recent?limit=${Ue}`).then(s=>{if(e)return;const i=s.events??[];X(p=>{const u=new Set(p.map(w=>w.id)),h=i.filter(w=>!u.has(w.id)).concat(p);return h.length>$?h.slice(h.length-$):h})}).catch(()=>{}),()=>{e=!0}},[]),n.useEffect(()=>{let e=!1;const s=async()=>{try{const p=await K("/api/tail/discover");e||pe(p)}catch{}};s();const i=setInterval(()=>{s()},ze);return()=>{e=!0,clearInterval(i)}},[]);const Z=n.useMemo(()=>{const e=new Map;for(const s of o){const i=T[s.id],p=[s.harnessSessionId,i?.sessionId,i?.data.metadata?.session?.externalSessionId].map(u=>u?.trim()).filter(u=>!!u);e.set(s.id,[...new Set(p)])}return e},[o,T]),R=n.useMemo(()=>Pe({events:Me(Y),transcripts:O?.transcripts??[],agents:Je(o,Z),now:y,liveWindowMs:Oe}),[o,O?.transcripts,y,Z,Y]),[g,V]=n.useState(null),I=n.useMemo(()=>{const e=_e(De(R,{sourceFilter:x,activityFilter:d,query:J,now:y,activeWindowMs:v}),G);if(!g)return e;const s=e.find(i=>i.id===g);return s?[s,...e.filter(i=>i.id!==g)]:e},[d,v,G,R,y,g,J,x]),ee=n.useRef(null),q=n.useRef({w:0,h:0}),te=n.useRef(0);te.current=I.length;const[m,ve]=n.useState(()=>We(0,{w:0,h:0})),H=n.useRef(m),_=n.useCallback((e,s)=>{const i=$e(H.current,e,s);i!==H.current&&(H.current=i,ve(i))},[]);n.useEffect(()=>{const e=ee.current;if(!e)return;const s=new ResizeObserver(([i])=>{q.current={w:i.contentRect.width,h:i.contentRect.height},_(te.current,q.current)});return s.observe(e),()=>s.disconnect()},[_]),n.useLayoutEffect(()=>{_(I.length,q.current)},[I.length,_]);const E=n.useMemo(()=>I.slice(0,m.shown),[I,m.shown]),se=n.useRef(1);se.current=Math.max(1,m.cols),n.useEffect(()=>{Re(I.map(e=>({id:e.id,name:e.agent?.name??Ve(e),handle:e.agent?.handle??Ke(e),harness:e.source,branch:e.agent?.branch??null,project:e.project,model:e.agent?.model??null,state:e.agent?.state??null,agentClass:e.agent?"agent":"native-session",updatedAt:e.lastActiveAt,source:e.agent||e.attribution==="scout-managed"?"scout":"native",activity:tt(e,y,v),lastActiveAt:e.lastActiveAt})))},[v,y,I]);const[we,ne]=n.useState(null),re=n.useRef(null),k=n.useRef(null);n.useEffect(()=>{A&&re.current!==A.serial&&(re.current=A.serial,V(A.id),ne(A.id),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>ne(null),Ge),ge(A.serial))},[A]),n.useEffect(()=>()=>{k.current&&clearTimeout(k.current)},[]);const N=F?R.find(e=>e.id===F)??null:null,f=n.useMemo(()=>N?de(N,o):null,[o,N]),Ie=N?.agent?T[N.agent.id]?.data??null:null,[S,C]=n.useState(null),[j,D]=n.useState(!1),xe=S?E.findIndex(e=>e.id===S):-1,ie=n.useRef({index:-1,ids:[]});ie.current={index:xe,ids:E.map(e=>e.id)};const B=S?R.find(e=>e.id===S)??null:null,l=j?B:null;n.useEffect(()=>{j&&!B&&D(!1)},[B,j]);const Q=n.useRef(new Map),ye=n.useCallback((e,s)=>{s?Q.current.set(e,s):Q.current.delete(e)},[]);n.useEffect(()=>{S&&Q.current.get(S)?.focus({preventScroll:!0})},[S]);const oe=n.useMemo(()=>{if(!l)return null;const e=de(l,o),s=(l.agent?T[l.agent.id]?.data??null:null)??Fe(Xe(l,O?.transcripts??[]),l.lines,l.live,{now:y});return{id:l.id,agent:e,source:l.agent?"scout":"native",observe:s,lastActiveAt:l.lastActiveAt,current:l.live}},[o,O?.transcripts,y,T,l]),ae=n.useCallback(e=>{t({view:"ops",mode:"tail",tailQuery:e.sessionId})},[t]),z=n.useCallback(e=>{C(e),D(!0)},[]),le=n.useRef({focusedId:F,railOpen:j,pinnedId:g,selectedIds:r.selectedIds,visibleAgents:r.visibleAgents});le.current={focusedId:F,railOpen:j,pinnedId:g,selectedIds:r.selectedIds,visibleAgents:r.visibleAgents},n.useEffect(()=>{const e=s=>{if(Ee(s.target))return;const i=le.current;if(i.focusedId){s.key==="Escape"&&b(null);return}if(je())return;if(s.key==="Escape"){i.railOpen?D(!1):i.selectedIds.length>0?ue():i.pinnedId?V(null):C(null);return}if((s.metaKey||s.ctrlKey)&&s.key==="a"){if(i.visibleAgents.length===0)return;s.preventDefault();const W=i.visibleAgents.map(L=>L.id);if(W.every(L=>i.selectedIds.includes(L))){ue();return}for(const L of W)i.selectedIds.includes(L)||U(L);return}if(s.metaKey||s.ctrlKey||s.altKey)return;const{index:p,ids:u}=ie.current;if(u.length===0)return;const h=Be(s.key);if(h){s.preventDefault();const W=He(p,u.length,se.current,h);C(u[W]??null);return}const w=p<0?0:p,M=u[w];if(M){if(s.key==="Enter"||s.key==="i"){s.preventDefault(),z(M);return}if(s.key==="o"){s.preventDefault(),C(M),b(M);return}(s.key==="x"||s.key===" ")&&(s.preventDefault(),C(M),U(M))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[z]);const Se=E.reduce((e,s)=>e+s.lines.length,0),ce=R.length-I.length;return a.jsxs("div",{className:"s-wall",children:[a.jsxs("div",{className:"s-wall-status",children:[a.jsx("span",{className:"s-wall-status-key",children:"logs"}),a.jsxs("span",{className:"s-wall-status-value",children:[m.shown,"/",I.length]}),a.jsx("span",{className:"s-wall-status-key",children:"grid"}),a.jsx("span",{className:"s-wall-status-value",children:m.cols>0?`${m.cols}×${m.rows}`:"—"}),a.jsx("span",{className:"s-wall-status-key",children:"lines"}),a.jsx("span",{className:"s-wall-status-value",children:Se}),m.hidden>0&&a.jsxs("span",{className:"s-wall-status-hidden",title:"Least recently active logs are withheld to keep panes readable",children:[m.hidden," withheld"]}),ce>0&&a.jsxs("span",{className:"s-wall-status-hidden",title:"Sessions discovery knows of that have produced no output to tail",children:[ce," quiet"]}),E.length>0&&a.jsxs("span",{className:"s-wall-status-keys",children:[a.jsx("kbd",{children:"hjkl"})," move · ",a.jsx("kbd",{children:"⏎"})," context · ",a.jsx("kbd",{children:"o"})," expand"]}),g&&a.jsx("button",{type:"button",className:"s-wall-status-pin",onClick:()=>V(null),children:"unpin"})]}),a.jsx("div",{ref:ee,className:`s-wall-grid${j?" s-wall-grid--railed":""}`,style:{gridTemplateColumns:`repeat(${Math.max(1,m.cols)}, minmax(0, 1fr))`,gridTemplateRows:`repeat(${Math.max(1,m.rows)}, minmax(0, 1fr))`,gap:qe},children:E.length===0?a.jsxs("div",{className:"s-wall-empty",children:[a.jsx("div",{className:"s-wall-empty-title",children:R.length===0?"No logs on the wire":"No matching logs"}),a.jsx("div",{className:"s-wall-empty-sub",children:R.length===0?"Panes appear as sessions start writing to their transcripts.":"Widen the activity window or clear the filter."})]}):E.map(e=>a.jsx(Ce,{log:e,selected:r.selectedIds.includes(e.id),revealed:we===e.id,cursor:S===e.id,paneRef:s=>ye(e.id,s),onOpen:()=>z(e.id),onToggleSelected:()=>U(e.id),onOpenLog:()=>ae(e)},e.id))}),l&&oe&&a.jsx(ke,{log:l,lane:oe,onClose:()=>D(!1),onExpand:()=>b(l.id),onTail:()=>ae(l),onOpenLog:()=>t({view:"sessions",sessionId:l.sessionId}),onOpenFile:c}),f&&a.jsx(Ne,{agent:f,observe:Ie,onClose:()=>b(null),onSend:e=>et(f,e),onOpenConversation:()=>{if(b(null),fe(f)&&f.harnessSessionId){t({view:"sessions",sessionId:f.harnessSessionId});return}me(f).then(e=>t({view:"conversation",conversationId:e})).catch(()=>t({view:"agents-v2",agentId:f.id,tab:"message"}))},onTail:()=>{b(null),t({view:"ops",mode:"tail",tailQuery:f.harnessSessionId??f.handle??f.name})},onProfile:()=>{b(null),t({view:"agents-v2",agentId:f.id})}})]})}export{rs as MissionControlView};
|
|
1
|
+
import{r as n,j as a}from"./index-NRbRrZw-.js";/* empty css */import{a as K}from"./api-DEHEgJ9m.js";import{u as Ae,f as Re,g as ge,t as U,h as b,e as ue}from"./mission-control-store-HeCy97KT.js";import{u as be}from"./observe-DkAhvkfn.js";import{h as me}from"./NewChatComposer-BPsg8shF.js";import{i as Ee,c as je}from"./keyboard-nav-feLCB3Zm.js";import{g as Me}from"./tail-display-DcliDVkW.js";import{u as Le}from"./tail-events-B7BrDaFi.js";import{u as Te}from"./Provider-Cd-QZltN.js";import{MissionContextRail as ke}from"./MissionContextRail-MTL2EAnr.js";import{FocusOverlay as Ne}from"./MissionFocusOverlay-hWi6y87j.js";import{MissionLogPane as Ce}from"./MissionLogPane-bbG_pM9B.js";import{o as Fe}from"./agent-lanes-model-BKOs_32K.js";import{A as Oe}from"./mission-control-model-C0fByIjm.js";import{b as Pe,s as _e,f as De,c as We,n as $e,d as Ke,m as Ve,W as qe}from"./mission-wall-CocIM1cF.js";import"./colors-BtO5_zlx.js";import"./surface-activity-B1rgWB1i.js";import"./text-B2UZi3l9.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./createLucideIcon-Da0lq809.js";import"./conversation-model-CIzM7aXT.js";import"./time-Dhsh_2EG.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./x-DuzAbpk5.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./file-text-BGVkHS4_.js";import"./lane-edit-display-C_Aujldz.js";import"./index-BWHgHrtv.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-QSbhyq9A.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./TextDocumentSurface-B29xZNlI.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./bash-format-BRV5C6Gv.js";import"./context-budget-DX_fwUs3.js";import"./page-status-CEP5pGf3.js";import"./agent-lane-detail-D5EIlX7_.js";import"./lane-observe-vfyACHi0.js";import"./agent-lane-preview-BhplDYGf.js";import"./lane-ask-display-B6iCAVcd.js";function He(t,o,r,c){if(o<=0)return-1;const d=o-1,x=Math.max(1,Math.floor(r));if(t<0||t>d)return c==="left"||c==="up"||c==="last"?d:0;switch(c){case"first":return 0;case"last":return d;case"left":return Math.max(0,t-1);case"right":return Math.min(d,t+1);case"up":{const v=t-x;return v>=0?v:t}case"down":{const v=t+x;return v<=d?v:d}}}function Be(t){switch(t){case"h":case"ArrowLeft":return"left";case"l":case"ArrowRight":return"right";case"k":case"ArrowUp":return"up";case"j":case"ArrowDown":return"down";case"g":case"Home":return"first";case"G":case"End":return"last";default:return null}}const $=4e3,Qe=250,ze=3e4,Ue=1500,Ge=1800;function Je(t,o){return t.map(r=>({id:r.id,name:r.name,handle:r.handle,state:r.state,project:r.project,branch:r.branch,harness:r.harness,model:r.model,sessionIds:o.get(r.id)??[]}))}function Ye(t){return{id:`native:${t.source}:${t.sessionId}`,definitionId:`native:${t.source}:${t.sessionId}`,name:`${t.source} · ${t.project}`,handle:t.sessionId.slice(0,8),agentClass:"native-session",harness:t.source,state:t.live?"working":"ready",projectRoot:t.cwd,cwd:t.cwd,updatedAt:t.lastActiveAt,createdAt:null,transport:"tail",selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:t.project,branch:t.attribution==="unattributed"?"native session":t.attribution,role:"native session",model:null,harnessSessionId:t.sessionId,terminalSurface:null,harnessLogPath:t.logPath,conversationId:null,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null}}function fe(t){return t.agentClass==="native-session"||t.id.startsWith("native:")}function de(t,o){if(t.agent){const r=o.find(c=>c.id===t.agent.id);if(r)return r}return Ye(t)}function Xe(t,o){const r=o.find(c=>c.sessionId?.trim()===t.sessionId);return r||{source:t.source,transcriptPath:t.logPath??"",sessionId:t.sessionId,cwd:t.cwd,project:t.project,harness:t.attribution,mtimeMs:t.lastActiveAt,size:0}}function Ze(t,o){const r=t.harnessSessionId?.trim();if(!r)throw new Error("This native session has no session id to continue.");const c=t.projectRoot?.trim()||t.cwd?.trim();if(!c)throw new Error("This native session has no project path to route from.");const d=t.harness?.trim(),x=t.model?.trim();return{target:{projectPath:c},execution:{session:"existing",targetSessionId:r,...d?{harness:d}:{},...x?{model:x}:{}},agent:{persistence:"one_time",...t.handle?.trim()?{handle:t.handle.trim()}:{}},seed:{instructions:o}}}async function et(t,o){if(fe(t)){await K("/api/sessions",{method:"POST",body:JSON.stringify(Ze(t,o))});return}const r=await me(t);await K("/api/send",{method:"POST",body:JSON.stringify({body:o,chatId:r,execution:{...t.harness?.trim()?{harness:t.harness.trim()}:{},...t.model?.trim()?{model:t.model.trim()}:{}}})})}function tt(t,o,r){return t.live?"active":t.lastActiveAt>0&&o-t.lastActiveAt<=r?"recent":"idle"}function rs({navigate:t,agents:o}){const r=Ae(),{openFilePreview:c}=Te(),{activityFilter:d,sourceFilter:x,activityWindowMs:v,groupMode:G,query:J,focusedId:F,revealRequest:A}=r,[Y,X]=n.useState([]),[O,pe]=n.useState(null),[y,he]=n.useState(()=>Date.now()),T=be(o),P=n.useRef([]);Le(e=>{P.current.push(e)}),n.useEffect(()=>{const e=setInterval(()=>{if(P.current.length===0)return;const s=P.current;P.current=[],X(i=>{const p=new Set(i.map(w=>w.id)),u=s.filter(w=>!w.id||!p.has(w.id));if(u.length===0)return i;const h=i.concat(u);return h.length>$?h.slice(h.length-$):h})},Qe);return()=>clearInterval(e)},[]),n.useEffect(()=>{const e=setInterval(()=>he(Date.now()),1e4);return()=>clearInterval(e)},[]),n.useEffect(()=>{let e=!1;return K(`/api/tail/recent?limit=${Ue}`).then(s=>{if(e)return;const i=s.events??[];X(p=>{const u=new Set(p.map(w=>w.id)),h=i.filter(w=>!u.has(w.id)).concat(p);return h.length>$?h.slice(h.length-$):h})}).catch(()=>{}),()=>{e=!0}},[]),n.useEffect(()=>{let e=!1;const s=async()=>{try{const p=await K("/api/tail/discover");e||pe(p)}catch{}};s();const i=setInterval(()=>{s()},ze);return()=>{e=!0,clearInterval(i)}},[]);const Z=n.useMemo(()=>{const e=new Map;for(const s of o){const i=T[s.id],p=[s.harnessSessionId,i?.sessionId,i?.data.metadata?.session?.externalSessionId].map(u=>u?.trim()).filter(u=>!!u);e.set(s.id,[...new Set(p)])}return e},[o,T]),R=n.useMemo(()=>Pe({events:Me(Y),transcripts:O?.transcripts??[],agents:Je(o,Z),now:y,liveWindowMs:Oe}),[o,O?.transcripts,y,Z,Y]),[g,V]=n.useState(null),I=n.useMemo(()=>{const e=_e(De(R,{sourceFilter:x,activityFilter:d,query:J,now:y,activeWindowMs:v}),G);if(!g)return e;const s=e.find(i=>i.id===g);return s?[s,...e.filter(i=>i.id!==g)]:e},[d,v,G,R,y,g,J,x]),ee=n.useRef(null),q=n.useRef({w:0,h:0}),te=n.useRef(0);te.current=I.length;const[m,ve]=n.useState(()=>We(0,{w:0,h:0})),H=n.useRef(m),_=n.useCallback((e,s)=>{const i=$e(H.current,e,s);i!==H.current&&(H.current=i,ve(i))},[]);n.useEffect(()=>{const e=ee.current;if(!e)return;const s=new ResizeObserver(([i])=>{q.current={w:i.contentRect.width,h:i.contentRect.height},_(te.current,q.current)});return s.observe(e),()=>s.disconnect()},[_]),n.useLayoutEffect(()=>{_(I.length,q.current)},[I.length,_]);const E=n.useMemo(()=>I.slice(0,m.shown),[I,m.shown]),se=n.useRef(1);se.current=Math.max(1,m.cols),n.useEffect(()=>{Re(I.map(e=>({id:e.id,name:e.agent?.name??Ve(e),handle:e.agent?.handle??Ke(e),harness:e.source,branch:e.agent?.branch??null,project:e.project,model:e.agent?.model??null,state:e.agent?.state??null,agentClass:e.agent?"agent":"native-session",updatedAt:e.lastActiveAt,source:e.agent||e.attribution==="scout-managed"?"scout":"native",activity:tt(e,y,v),lastActiveAt:e.lastActiveAt})))},[v,y,I]);const[we,ne]=n.useState(null),re=n.useRef(null),k=n.useRef(null);n.useEffect(()=>{A&&re.current!==A.serial&&(re.current=A.serial,V(A.id),ne(A.id),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>ne(null),Ge),ge(A.serial))},[A]),n.useEffect(()=>()=>{k.current&&clearTimeout(k.current)},[]);const N=F?R.find(e=>e.id===F)??null:null,f=n.useMemo(()=>N?de(N,o):null,[o,N]),Ie=N?.agent?T[N.agent.id]?.data??null:null,[S,C]=n.useState(null),[j,D]=n.useState(!1),xe=S?E.findIndex(e=>e.id===S):-1,ie=n.useRef({index:-1,ids:[]});ie.current={index:xe,ids:E.map(e=>e.id)};const B=S?R.find(e=>e.id===S)??null:null,l=j?B:null;n.useEffect(()=>{j&&!B&&D(!1)},[B,j]);const Q=n.useRef(new Map),ye=n.useCallback((e,s)=>{s?Q.current.set(e,s):Q.current.delete(e)},[]);n.useEffect(()=>{S&&Q.current.get(S)?.focus({preventScroll:!0})},[S]);const oe=n.useMemo(()=>{if(!l)return null;const e=de(l,o),s=(l.agent?T[l.agent.id]?.data??null:null)??Fe(Xe(l,O?.transcripts??[]),l.lines,l.live,{now:y});return{id:l.id,agent:e,source:l.agent?"scout":"native",observe:s,lastActiveAt:l.lastActiveAt,current:l.live}},[o,O?.transcripts,y,T,l]),ae=n.useCallback(e=>{t({view:"ops",mode:"tail",tailQuery:e.sessionId})},[t]),z=n.useCallback(e=>{C(e),D(!0)},[]),le=n.useRef({focusedId:F,railOpen:j,pinnedId:g,selectedIds:r.selectedIds,visibleAgents:r.visibleAgents});le.current={focusedId:F,railOpen:j,pinnedId:g,selectedIds:r.selectedIds,visibleAgents:r.visibleAgents},n.useEffect(()=>{const e=s=>{if(Ee(s.target))return;const i=le.current;if(i.focusedId){s.key==="Escape"&&b(null);return}if(je())return;if(s.key==="Escape"){i.railOpen?D(!1):i.selectedIds.length>0?ue():i.pinnedId?V(null):C(null);return}if((s.metaKey||s.ctrlKey)&&s.key==="a"){if(i.visibleAgents.length===0)return;s.preventDefault();const W=i.visibleAgents.map(L=>L.id);if(W.every(L=>i.selectedIds.includes(L))){ue();return}for(const L of W)i.selectedIds.includes(L)||U(L);return}if(s.metaKey||s.ctrlKey||s.altKey)return;const{index:p,ids:u}=ie.current;if(u.length===0)return;const h=Be(s.key);if(h){s.preventDefault();const W=He(p,u.length,se.current,h);C(u[W]??null);return}const w=p<0?0:p,M=u[w];if(M){if(s.key==="Enter"||s.key==="i"){s.preventDefault(),z(M);return}if(s.key==="o"){s.preventDefault(),C(M),b(M);return}(s.key==="x"||s.key===" ")&&(s.preventDefault(),C(M),U(M))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[z]);const Se=E.reduce((e,s)=>e+s.lines.length,0),ce=R.length-I.length;return a.jsxs("div",{className:"s-wall",children:[a.jsxs("div",{className:"s-wall-status",children:[a.jsx("span",{className:"s-wall-status-key",children:"logs"}),a.jsxs("span",{className:"s-wall-status-value",children:[m.shown,"/",I.length]}),a.jsx("span",{className:"s-wall-status-key",children:"grid"}),a.jsx("span",{className:"s-wall-status-value",children:m.cols>0?`${m.cols}×${m.rows}`:"—"}),a.jsx("span",{className:"s-wall-status-key",children:"lines"}),a.jsx("span",{className:"s-wall-status-value",children:Se}),m.hidden>0&&a.jsxs("span",{className:"s-wall-status-hidden",title:"Least recently active logs are withheld to keep panes readable",children:[m.hidden," withheld"]}),ce>0&&a.jsxs("span",{className:"s-wall-status-hidden",title:"Sessions discovery knows of that have produced no output to tail",children:[ce," quiet"]}),E.length>0&&a.jsxs("span",{className:"s-wall-status-keys",children:[a.jsx("kbd",{children:"hjkl"})," move · ",a.jsx("kbd",{children:"⏎"})," context · ",a.jsx("kbd",{children:"o"})," expand"]}),g&&a.jsx("button",{type:"button",className:"s-wall-status-pin",onClick:()=>V(null),children:"unpin"})]}),a.jsx("div",{ref:ee,className:`s-wall-grid${j?" s-wall-grid--railed":""}`,style:{gridTemplateColumns:`repeat(${Math.max(1,m.cols)}, minmax(0, 1fr))`,gridTemplateRows:`repeat(${Math.max(1,m.rows)}, minmax(0, 1fr))`,gap:qe},children:E.length===0?a.jsxs("div",{className:"s-wall-empty",children:[a.jsx("div",{className:"s-wall-empty-title",children:R.length===0?"No logs on the wire":"No matching logs"}),a.jsx("div",{className:"s-wall-empty-sub",children:R.length===0?"Panes appear as sessions start writing to their transcripts.":"Widen the activity window or clear the filter."})]}):E.map(e=>a.jsx(Ce,{log:e,selected:r.selectedIds.includes(e.id),revealed:we===e.id,cursor:S===e.id,paneRef:s=>ye(e.id,s),onOpen:()=>z(e.id),onToggleSelected:()=>U(e.id),onOpenLog:()=>ae(e)},e.id))}),l&&oe&&a.jsx(ke,{log:l,lane:oe,onClose:()=>D(!1),onExpand:()=>b(l.id),onTail:()=>ae(l),onOpenLog:()=>t({view:"sessions",sessionId:l.sessionId}),onOpenFile:c}),f&&a.jsx(Ne,{agent:f,observe:Ie,onClose:()=>b(null),onSend:e=>et(f,e),onOpenConversation:()=>{if(b(null),fe(f)&&f.harnessSessionId){t({view:"sessions",sessionId:f.harnessSessionId});return}me(f).then(e=>t({view:"conversation",conversationId:e})).catch(()=>t({view:"agents-v2",agentId:f.id,tab:"message"}))},onTail:()=>{b(null),t({view:"ops",mode:"tail",tailQuery:f.harnessSessionId??f.handle??f.name})},onProfile:()=>{b(null),t({view:"agents-v2",agentId:f.id})}})]})}export{rs as MissionControlView};
|