@openscout/scout 0.2.107 → 0.2.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -16
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/conversation-motion-features-PYM3Yx_M.js +1 -0
- package/dist/client/assets/index-DGR8nSEY.js +88 -0
- package/dist/client/assets/index-rA7f7Rt0.css +1 -0
- package/dist/client/index.html +3 -3
- package/dist/main.mjs +1 -1
- package/package.json +26 -4
- package/server.json +2 -2
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +0 -1
- package/dist/client/assets/AddProjectForm-CusDRiVO.js +0 -1
- package/dist/client/assets/AdventureEvidence-CyegKk1V.js +0 -5
- package/dist/client/assets/AdventureReader-X-hbTOi0.js +0 -4
- package/dist/client/assets/AdventureScenery-LPXSVP67.js +0 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +0 -1
- package/dist/client/assets/AgentAvatar-CrP1eXxk.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +0 -1
- package/dist/client/assets/AgentDetailCard-C4WVeJvJ.css +0 -1
- package/dist/client/assets/AgentDetailCard-DtHT3sCo.js +0 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +0 -1
- package/dist/client/assets/AgentFloorWorld-CjoIa6jA.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +0 -1
- package/dist/client/assets/AgentLaneCard-BaZ2g-f8.js +0 -1
- package/dist/client/assets/AgentLaneChrome-TF1SlJSc.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-EzEPsn3g.js +0 -4
- package/dist/client/assets/AgentLaneSummaryResize-dpp7YvrX.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +0 -1
- package/dist/client/assets/AgentLanesPreflight-Ry-aqDTr.js +0 -1
- package/dist/client/assets/AgentLanesView-BJi9xXz6.js +0 -2
- package/dist/client/assets/AgentLiveActions-CGS-Bxb7.css +0 -1
- package/dist/client/assets/AgentLiveActions-CfTupTEl.js +0 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +0 -1
- package/dist/client/assets/AgentSessions-B1gOhDBf.js +0 -6
- package/dist/client/assets/AgentsConsole-BjSTs-TV.css +0 -1
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +0 -1
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +0 -1
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +0 -1
- package/dist/client/assets/AstronautSuit-Cchnc4Ug.js +0 -1
- package/dist/client/assets/AtopView-gkEp4y__.js +0 -1
- package/dist/client/assets/BackToPicker-CUkjnoVk.js +0 -1
- package/dist/client/assets/BackToPicker-CdgVu-to.css +0 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +0 -1
- package/dist/client/assets/BriefingsScreen-B1HlBMGZ.js +0 -1
- package/dist/client/assets/BrokerMetadataPanel-Dk242Yh_.js +0 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +0 -8
- package/dist/client/assets/Canvas-X9pVSkw3.js +0 -1
- package/dist/client/assets/CastPicker-BXUtPAGC.js +0 -1
- package/dist/client/assets/CastPicker-zXsnkTIy.css +0 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +0 -1
- package/dist/client/assets/ChannelSidebar-e9DOPulb.js +0 -1
- package/dist/client/assets/CharacterFamilyPreview-BniL8sEL.css +0 -1
- package/dist/client/assets/CharacterFamilyPreview-DMfw7UM_.js +0 -1
- package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +0 -1
- package/dist/client/assets/ChatBits-CsvxbToF.js +0 -1
- package/dist/client/assets/ChatCollapsedStrip-FEmQ_G9J.js +0 -1
- package/dist/client/assets/ChatRichInput-DhtwFxQE.js +0 -31
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +0 -1
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +0 -1
- package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +0 -1
- package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +0 -1
- package/dist/client/assets/CodeDiffPane-DuQRwpgK.js +0 -1
- package/dist/client/assets/CodeProjectPicker-ZQ6gSBpg.js +0 -2
- package/dist/client/assets/CodeScreen-BXyKeL5T.js +0 -1
- package/dist/client/assets/CommsCanvas-BR2YS76H.css +0 -1
- package/dist/client/assets/CommsCanvas-THp0r_U8.js +0 -1
- package/dist/client/assets/CommsDeck-BVmSMV2V.js +0 -1
- package/dist/client/assets/CommsFlowGraph-DxoOaLF_.js +0 -1
- package/dist/client/assets/CommsFlowGraph-vQucylxF.css +0 -1
- package/dist/client/assets/CommsFlowMap-Vi8ziCPg.js +0 -1
- package/dist/client/assets/CommsSelection-BUoRbu9o.js +0 -1
- package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +0 -1
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +0 -1
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +0 -1
- package/dist/client/assets/ConversationPanels-D9oC0xG5.js +0 -6
- package/dist/client/assets/ConversationScreen-9MlMnEo4.css +0 -1
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +0 -2
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +0 -1
- package/dist/client/assets/CrewAvatar-BnIPIn_Z.css +0 -1
- package/dist/client/assets/CrewAvatar-kTznzqcO.js +0 -1
- package/dist/client/assets/CrewSprite-Dhryjx2c.js +0 -1
- package/dist/client/assets/CrewSprite-DsQJdu3Z.css +0 -1
- package/dist/client/assets/CrewStage-vdO0qm3D.js +0 -1
- package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +0 -1
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +0 -1
- package/dist/client/assets/DataTable-aH-jCyDq.js +0 -1
- package/dist/client/assets/DispatchAftermath-66uQAorV.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-BSC_JwVE.css +0 -1
- package/dist/client/assets/DocumentFocusViewer-DJr0v0D_.js +0 -1
- package/dist/client/assets/EmbeddableSurfacesLab-BBa70EhJ.js +0 -1
- package/dist/client/assets/EmptyState-CZlrHXy-.js +0 -1
- package/dist/client/assets/FileViewerPane-BAO6mtjD.js +0 -3
- package/dist/client/assets/FleetRollCallHud-C5q2567n.js +0 -1
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +0 -1
- package/dist/client/assets/FloorContextSheet-2_NVPQor.js +0 -1
- package/dist/client/assets/FloorExchangePanel-B3TFhjLk.css +0 -1
- package/dist/client/assets/FloorExchangePanel-BU1pPu8K.js +0 -1
- package/dist/client/assets/FloorMessagePasses-cLW2UGNP.js +0 -1
- package/dist/client/assets/FloorMessagePasses-nxwwiUom.css +0 -1
- package/dist/client/assets/FloorReplay-VFzA6Kxc.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +0 -1
- package/dist/client/assets/FloorSavedWork-BeHDejWz.js +0 -1
- package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +0 -1
- package/dist/client/assets/FollowScreen-CFfkIbc6.js +0 -1
- package/dist/client/assets/HarnessMark-C4naWc16.js +0 -1
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +0 -1
- package/dist/client/assets/HerdrSession-_t7yM8vX.js +0 -4
- package/dist/client/assets/HomeHero-7JwycwFY.css +0 -1
- package/dist/client/assets/HomeHero-DouPyNmz.js +0 -1
- package/dist/client/assets/HostAdvisorView-CnM1i8hW.js +0 -1
- package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +0 -1
- package/dist/client/assets/InviteSheet-CwxZtWCl.js +0 -1
- package/dist/client/assets/JumpPalette-O1aJE9gR.js +0 -1
- package/dist/client/assets/KnowledgeSearchInspector-32n9baT-.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +0 -1
- package/dist/client/assets/LaneToolHoverCard-CJa110yk.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +0 -1
- package/dist/client/assets/LaneTraceEventFocus-TbrNHRj_.js +0 -1
- package/dist/client/assets/MeshCanvas-DWZHYh1A.js +0 -3
- package/dist/client/assets/MeshCanvasMinimap-Dv7nMbl5.css +0 -1
- package/dist/client/assets/MeshCanvasMinimap-iswYFpIb.js +0 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +0 -1
- package/dist/client/assets/MeshTopologyView-BVvtqI8q.js +0 -2
- package/dist/client/assets/MessageEmbeds-ksPazAKH.js +0 -1
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +0 -1
- package/dist/client/assets/MissionContextRail-D62-Wis8.js +0 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-C1zys3Jv.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +0 -1
- package/dist/client/assets/MissionLogPane-B19lYSY9.js +0 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +0 -1
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +0 -1
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +0 -1
- package/dist/client/assets/NewAgentModal-Bh-L-emz.js +0 -1
- package/dist/client/assets/NewAgentModal-ru8u5YdJ.css +0 -1
- package/dist/client/assets/NewChatComposer-C5LT7MF7.css +0 -1
- package/dist/client/assets/NewChatComposer-C97-iTMK.js +0 -19
- package/dist/client/assets/NewChatOrigin-DFbF_XvR.js +0 -1
- package/dist/client/assets/NodeDetailPanel-CElOEpCh.js +0 -1
- package/dist/client/assets/NodeMenu-B-jjHf1c.js +0 -1
- package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +0 -2
- package/dist/client/assets/ObserveTextFlow-PFnG_10h.js +0 -2
- package/dist/client/assets/ObservedTopologyPanel-BsBsvVPL.css +0 -1
- package/dist/client/assets/ObservedTopologyPanel-CUTIoLZJ.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +0 -31
- package/dist/client/assets/OpenScoutAppShell-Bh6FnEJO.css +0 -1
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +0 -1
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +0 -1
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +0 -1
- package/dist/client/assets/ProjectAgentProfileBar-DHuMKJj-.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +0 -1
- package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +0 -1
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +0 -2
- package/dist/client/assets/ProjectsRail-CDWocin_.js +0 -1
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +0 -1
- package/dist/client/assets/Provider-C35yu29I.js +0 -5
- package/dist/client/assets/Provider-CCzjtkda.css +0 -1
- package/dist/client/assets/RailRow-B25zKEub.css +0 -1
- package/dist/client/assets/RailRow-BjmWK420.js +0 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +0 -16
- package/dist/client/assets/RenderedWorkerSprite-Dhlyg89J.js +0 -1
- package/dist/client/assets/RenderedWorkerSprite-qnTfkd_4.css +0 -1
- package/dist/client/assets/ReplayClock-348f17bW.js +0 -1
- package/dist/client/assets/ReplayLog-CBnAM3ui.js +0 -1
- package/dist/client/assets/ReplayOutpost-DyRPfNFx.js +0 -1
- package/dist/client/assets/ReplayOutpost-Y1DvZgeu.css +0 -1
- package/dist/client/assets/RepoDiffEmbedScreen-BWxvRDrS.js +0 -1
- package/dist/client/assets/RepoDiffPageScreen-DN94irmY.js +0 -1
- package/dist/client/assets/RepoDiffViewer-_4JVXBIW.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +0 -2
- package/dist/client/assets/ReposScreen-uMCpt0e9.js +0 -6
- package/dist/client/assets/RiggedWorkerCharacter-BpYECnyK.css +0 -1
- package/dist/client/assets/RiggedWorkerCharacter-q6QRc7_o.js +0 -1
- package/dist/client/assets/SageModelStudio-768dRQr4.css +0 -1
- package/dist/client/assets/SageModelStudio-CNDhZhgD.js +0 -4108
- package/dist/client/assets/ScoutDeckSurface-CUaU4R6T.js +0 -1
- package/dist/client/assets/ScoutDeckSurface-uhmuZRzC.css +0 -1
- package/dist/client/assets/ScoutSurface-3_25USO_.js +0 -1
- package/dist/client/assets/ScoutbotFxLab-CRqhYe0a.js +0 -4
- package/dist/client/assets/SecondaryNav-D7dbV2qo.js +0 -1
- package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +0 -1
- package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +0 -1
- package/dist/client/assets/SessionEmbedScreen-D0zFmou-.js +0 -1
- package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +0 -1
- package/dist/client/assets/SessionObserve-CDdJ7fAE.css +0 -1
- package/dist/client/assets/SessionObserve-DXxBvejJ.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +0 -1
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +0 -1
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +0 -1
- package/dist/client/assets/SettingsDrawer-R8a0TlJD.css +0 -1
- package/dist/client/assets/SettingsDrawer-juCpnbH6.js +0 -3
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +0 -1
- package/dist/client/assets/SharedFloorCharacter-Bi5_md4R.css +0 -1
- package/dist/client/assets/SharedFloorCharacter-DNEiaOUh.js +0 -1
- package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +0 -1
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +0 -2
- package/dist/client/assets/ShikiPane-CRtTYkMj.js +0 -15
- package/dist/client/assets/SlidePanel-Bg5dVaIa.css +0 -1
- package/dist/client/assets/SlidePanel-_CHAQdOa.js +0 -1
- package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +0 -1
- package/dist/client/assets/SpriteAvatar-CpZWf54-.js +0 -1
- package/dist/client/assets/SproutActionSprite-BSiTS4en.js +0 -1
- package/dist/client/assets/StatusPill-2gCP6H7A.js +0 -1
- package/dist/client/assets/TailView-CYSijNTy.js +0 -2
- package/dist/client/assets/TailView-Mj3AU2u0.css +0 -1
- package/dist/client/assets/Terminal-Bi97yb5s.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +0 -1
- package/dist/client/assets/TerminalHeaderMount-Cq4OD_xN.js +0 -1
- package/dist/client/assets/TerminalRelay-DrikpUSJ.js +0 -46
- package/dist/client/assets/TextDocumentSurface-D52m7Vd8.js +0 -4
- package/dist/client/assets/TmuxPeek-CXFeweMg.js +0 -1
- package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +0 -1
- package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +0 -1
- package/dist/client/assets/VoicePermissionsPanel-Ok2nfxHw.js +0 -1
- package/dist/client/assets/VoicePermissionsPanel-RijAZ1gP.css +0 -1
- package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +0 -8
- package/dist/client/assets/VoiceTurnStage-edoJalLV.js +0 -1
- package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +0 -1
- package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +0 -5
- package/dist/client/assets/WorkFilesViewer-vNt01sDd.js +0 -1
- package/dist/client/assets/WorkRunView-BDkR7Edq.js +0 -1
- package/dist/client/assets/WorkRunView-CxwAZ2QQ.css +0 -1
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +0 -1
- package/dist/client/assets/WorldCharacter-CIIlutQq.js +0 -1
- package/dist/client/assets/WorldMinimap-B6HNgcDe.js +0 -1
- package/dist/client/assets/WorldSky-Jm2Z6dfW.js +0 -1
- package/dist/client/assets/activity-CIlFrfPJ.js +0 -1
- package/dist/client/assets/addon-fit-dFpj9Kfq.js +0 -1
- package/dist/client/assets/addon-webgl-BFCGRtGh.js +0 -82
- package/dist/client/assets/adventure-evidence-DgQbBmfa.css +0 -1
- package/dist/client/assets/adventure-habitats-v1-CVMbdB_Z.png +0 -0
- package/dist/client/assets/adventure-habitats-v1-M1lcpTJh.js +0 -1
- package/dist/client/assets/adventure-playback-DTfkhIc0.js +0 -3
- package/dist/client/assets/adventure-reader-DM5UDDm9.css +0 -1
- package/dist/client/assets/agent-adventures-DZtWpj6k.css +0 -1
- package/dist/client/assets/agent-definitions-CymTYqvo.css +0 -1
- package/dist/client/assets/agent-directory-studio-injection-Bc8590z5.css +0 -1
- package/dist/client/assets/agent-essentials-BGGvT5G6.js +0 -1
- package/dist/client/assets/agent-floor-Dmr9hZHL.css +0 -1
- package/dist/client/assets/agent-floor-actor-DW8zLht0.js +0 -1
- package/dist/client/assets/agent-floor-world-Bnd1AtwK.css +0 -1
- package/dist/client/assets/agent-floor-world-layout-hfMjuoui.js +0 -1
- package/dist/client/assets/agent-lane-card-BkWVDYM8.css +0 -1
- package/dist/client/assets/agent-lane-card-model-CeqQGp-8.js +0 -1
- package/dist/client/assets/agent-lane-detail-Ti3trpfH.js +0 -2
- package/dist/client/assets/agent-lane-preview-Dpa3DuOn.js +0 -4
- package/dist/client/assets/agent-lanes-DmgipV9D.css +0 -1
- package/dist/client/assets/agent-lanes-model-DMAdqCmK.js +0 -4
- package/dist/client/assets/agent-master-THmq-1k8.css +0 -1
- package/dist/client/assets/agent-master-model-Bk_yuUXJ.js +0 -1
- package/dist/client/assets/agent-specialization-DDc7mLCW.js +0 -1
- package/dist/client/assets/agent-state-DDhnFEEP.js +0 -1
- package/dist/client/assets/agents-detail-redesign-h34ROjOW.css +0 -1
- package/dist/client/assets/agents-project-DgbqDc65.css +0 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +0 -1
- package/dist/client/assets/api-BQYTwoz6.js +0 -1
- package/dist/client/assets/api-DSqpVKC7.js +0 -1
- package/dist/client/assets/arc.es-C1SQHJ3k.js +0 -188
- package/dist/client/assets/arrow-left-MVUKauwQ.js +0 -1
- package/dist/client/assets/arrow-right-Bp-FpE5V.js +0 -1
- package/dist/client/assets/arrow-up-right-BPedAgxO.js +0 -1
- package/dist/client/assets/bash-format-BRV5C6Gv.js +0 -1
- package/dist/client/assets/book-open-CV98WMSp.js +0 -1
- package/dist/client/assets/bot-B4zLQ4IN.js +0 -1
- package/dist/client/assets/briefings-BwuAFQK6.css +0 -1
- package/dist/client/assets/broker-display-BkBzyvbR.js +0 -2
- package/dist/client/assets/cache-DGBo3vIf.js +0 -2
- package/dist/client/assets/chat-api-DSJMBYoT.js +0 -2
- package/dist/client/assets/chat-message-markup-91DIry6R.js +0 -1
- package/dist/client/assets/chat-space-model-aW3Fd8_U.js +0 -4
- package/dist/client/assets/chat-transport-DNS5CB2I.js +0 -1
- package/dist/client/assets/check-lrJ3a73a.js +0 -1
- package/dist/client/assets/chevron-down-l1mrh5S9.js +0 -1
- package/dist/client/assets/chevron-right-DrfqcerI.js +0 -1
- package/dist/client/assets/chevron-up-CETZJzjV.js +0 -1
- package/dist/client/assets/chunk-HRAB3GC3-DbVLgbWX.js +0 -1
- package/dist/client/assets/clipboard-e3fSpeo7.js +0 -1
- package/dist/client/assets/clock-BV1aqPkK.js +0 -1
- package/dist/client/assets/code-screen-DrKinCyh.css +0 -1
- package/dist/client/assets/code-xml-BhcNbLWU.js +0 -1
- package/dist/client/assets/coffee-D7EAOdCk.js +0 -1
- package/dist/client/assets/collapsed-strip-raJWthAH.css +0 -1
- package/dist/client/assets/colors-CFlbwC25.js +0 -1
- package/dist/client/assets/comms-deck-C8nVeMBh.css +0 -1
- package/dist/client/assets/comms-deck-CBhsXnY-.js +0 -2
- package/dist/client/assets/comms-gesture-_aGFo6g3.js +0 -2
- package/dist/client/assets/compass-63TUaz5_.js +0 -1
- package/dist/client/assets/console-B1IBqLI_.css +0 -1
- package/dist/client/assets/content-B1lgE8qr.js +0 -1
- package/dist/client/assets/content-B5l11YyQ.js +0 -1
- package/dist/client/assets/content-BNZOZEpX.js +0 -1
- package/dist/client/assets/content-BRIxP155.js +0 -1
- package/dist/client/assets/content-BWd8gt8L.js +0 -1
- package/dist/client/assets/content-BfwS2jAK.js +0 -1
- package/dist/client/assets/content-C4p43_eT.js +0 -1
- package/dist/client/assets/content-CINHz-rZ.css +0 -1
- package/dist/client/assets/content-CdYfaoDV.js +0 -1
- package/dist/client/assets/content-CzldLxw0.js +0 -1
- package/dist/client/assets/content-D-olnc4U.js +0 -1
- package/dist/client/assets/content-DTioimq4.js +0 -1
- package/dist/client/assets/content-LOebm3_d.js +0 -1
- package/dist/client/assets/content-nGlEZhUI.js +0 -1
- package/dist/client/assets/content-oyzDM-LK.js +0 -1
- package/dist/client/assets/content-x1PHxED7.js +0 -1
- package/dist/client/assets/content-zX3ZY3T9.js +0 -1
- package/dist/client/assets/context-budget-8qFKqM-j.js +0 -1
- package/dist/client/assets/conversation-icons-Tqba2d56.js +0 -1
- package/dist/client/assets/conversation-model-FxDeWlle.js +0 -1
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +0 -1
- package/dist/client/assets/conversation-prefs-DNre-Lcx.js +0 -1
- package/dist/client/assets/conversations-DoAAO6kA.js +0 -1
- package/dist/client/assets/copy-xKeM5ZtU.js +0 -1
- package/dist/client/assets/cpu-BOTa_WLr.js +0 -1
- package/dist/client/assets/createLucideIcon-zZ8Hx7er.js +0 -1
- package/dist/client/assets/credentials-OeoF-VKJ.js +0 -1
- package/dist/client/assets/ctx-panel-BC8fpcWJ.css +0 -1
- package/dist/client/assets/direct-voice-BbLPuJ04.js +0 -2
- package/dist/client/assets/direct-voice-DbO7CSv_.css +0 -1
- package/dist/client/assets/discover-DJFxyV1k.js +0 -2
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +0 -2
- package/dist/client/assets/embed-navigation-DayfkQau.js +0 -1
- package/dist/client/assets/external-link-CUObqmgX.js +0 -1
- package/dist/client/assets/eye-LrO-cXQt.js +0 -1
- package/dist/client/assets/file-code-corner-CsU7jJpu.js +0 -1
- package/dist/client/assets/file-text-CnISiiw6.js +0 -1
- package/dist/client/assets/flag-C4wl8z2-.js +0 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +0 -1
- package/dist/client/assets/flight-observe-GFg9L8ft.css +0 -1
- package/dist/client/assets/floor-character-name-CqJPOlXb.js +0 -1
- package/dist/client/assets/floor-context-model-rWKqaKmV.js +0 -1
- package/dist/client/assets/floor-context-sheet-BFnkFiY3.css +0 -1
- package/dist/client/assets/floor-memory-YMM8AlLY.js +0 -1
- package/dist/client/assets/floor-message-passes-CO3Ix_wR.js +0 -1
- package/dist/client/assets/floor-preview-text-HrORUJ7D.js +0 -1
- package/dist/client/assets/floor-replay-CccYqE-f.css +0 -1
- package/dist/client/assets/floor-tactical-hud-HL5Vja5Y.css +0 -1
- package/dist/client/assets/folder-D5prSkzz.js +0 -1
- package/dist/client/assets/follow-route-BvcGtBIL.js +0 -1
- package/dist/client/assets/fx-z37u1o2z.js +0 -1
- package/dist/client/assets/gauge-D9_5iJEm.js +0 -1
- package/dist/client/assets/gestures-QZub3Ot9.js +0 -1
- package/dist/client/assets/git-branch-B0_fPLO7.js +0 -1
- package/dist/client/assets/go-shortcuts-DicR7sUf.js +0 -1
- package/dist/client/assets/harnesses-screen-2z36fJKE.css +0 -1
- package/dist/client/assets/home-live-action-BkqGLVRY.js +0 -1
- package/dist/client/assets/home-moving-signal-DMguaRWR.css +0 -1
- package/dist/client/assets/home-moving-signal-rpMhsOJB.js +0 -1
- package/dist/client/assets/home-now-card-ByE6Umcx.js +0 -1
- package/dist/client/assets/home-now-card-nano-B5Dv3-pb.js +0 -1
- package/dist/client/assets/hooks-D787lBmm.css +0 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +0 -2
- package/dist/client/assets/host-advisor-B2Fqs5Dd.css +0 -1
- package/dist/client/assets/inbox-thread-redesign-B_1ocqaX.css +0 -1
- package/dist/client/assets/index-724SdE6r.js +0 -1
- package/dist/client/assets/index-BWHgHrtv.js +0 -1
- package/dist/client/assets/index-CHD0qcfL.js +0 -1
- package/dist/client/assets/index-CN4rBB_s.css +0 -1
- package/dist/client/assets/index-D1d98iYf.js +0 -1
- package/dist/client/assets/index-EsrkGBcv.js +0 -10
- package/dist/client/assets/index-gGHPA-By.js +0 -1
- package/dist/client/assets/index-wLwc74Pu.css +0 -1
- package/dist/client/assets/inspector-panel-BkgUDn6G.js +0 -2
- package/dist/client/assets/keyboard-nav-DDHegDbx.js +0 -1
- package/dist/client/assets/knowledge-search-BNdQweGz.css +0 -1
- package/dist/client/assets/lane-ask-display-BTVSakyo.js +0 -18
- package/dist/client/assets/lane-edit-display-BjdT9oZl.js +0 -9
- package/dist/client/assets/lane-observe-CteDwdD-.js +0 -7
- package/dist/client/assets/lane-roster-store-D-RSWjb-.js +0 -1
- package/dist/client/assets/lane-tool-detail-Czggx8oM.js +0 -9
- package/dist/client/assets/layers-C8PDiMul.js +0 -1
- package/dist/client/assets/layout-grid-Cor2frzj.js +0 -1
- package/dist/client/assets/left-BV9yMiTL.css +0 -1
- package/dist/client/assets/left-Bn5X7x2o.js +0 -2
- package/dist/client/assets/left-BqS0fYX1.js +0 -1
- package/dist/client/assets/left-CAaRBK9S.css +0 -1
- package/dist/client/assets/left-CTCeeeD3.js +0 -1
- package/dist/client/assets/left-DhtVPVux.js +0 -1
- package/dist/client/assets/left-K39b-Wvx.js +0 -2
- package/dist/client/assets/left-KGmueNPt.js +0 -1
- package/dist/client/assets/left-P_GOYB-s.js +0 -1
- package/dist/client/assets/left-R2OOE7VG.css +0 -1
- package/dist/client/assets/left-advisor-B0N47De2.js +0 -1
- package/dist/client/assets/left-agents-CsSNc51Y.js +0 -1
- package/dist/client/assets/left-default-BlO5LP2T.js +0 -1
- package/dist/client/assets/left-lanes-C4PhaJE6.js +0 -1
- package/dist/client/assets/left-mission-BjTE5vPa.js +0 -1
- package/dist/client/assets/left-mission-DENnfshd.css +0 -1
- package/dist/client/assets/library-CkWNPHRp.js +0 -1
- package/dist/client/assets/loader-circle-OvccU82H.js +0 -1
- package/dist/client/assets/local-agents-BqnoxJrq.js +0 -1
- package/dist/client/assets/log-in-7SnYqW5w.js +0 -1
- package/dist/client/assets/machine-children-DxcqCLmd.js +0 -1
- package/dist/client/assets/machine-scope-DJt9RZ2w.js +0 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +0 -1
- package/dist/client/assets/mentions-ByUvhS-v.js +0 -1
- package/dist/client/assets/mesh-ops-B1kDjizF.css +0 -1
- package/dist/client/assets/mesh-ops-CiZ8xSAx.js +0 -1
- package/dist/client/assets/mesh-screen-DjA4mOaN.css +0 -1
- package/dist/client/assets/mesh-view-store-DZvJC4KU.js +0 -1
- package/dist/client/assets/message-circle-CxRVKNE-.js +0 -1
- package/dist/client/assets/message-markup-BQW5jdJw.js +0 -15
- package/dist/client/assets/message-markup-Zwo3t4cI.js +0 -1
- package/dist/client/assets/message-square-BxesYglW.js +0 -1
- package/dist/client/assets/message-visibility-DwxgcgYK.js +0 -1
- package/dist/client/assets/mission-control-CsX3Yc58.css +0 -1
- package/dist/client/assets/mission-control-model-BpJHDV5D.js +0 -1
- package/dist/client/assets/mission-control-store-elEEsIvb.js +0 -1
- package/dist/client/assets/mission-wall-CAo4BKfa.js +0 -1
- package/dist/client/assets/model-CBkMvT1w.js +0 -1
- package/dist/client/assets/monitor-DTTYEb73.js +0 -1
- package/dist/client/assets/nav-destinations-uorRqFxf.js +0 -1
- package/dist/client/assets/observe-BJqERJVj.js +0 -1
- package/dist/client/assets/openAgent-Dbv5wfuL.js +0 -1
- package/dist/client/assets/openContent-C6XO6kr5.js +0 -1
- package/dist/client/assets/operator-attention-DBaRg5ep.js +0 -1
- package/dist/client/assets/ops-agents-BOYxzPTm.css +0 -1
- package/dist/client/assets/ops-atop-BB4B4JdE.css +0 -1
- package/dist/client/assets/ops-screen-CxYM0VOW.css +0 -1
- package/dist/client/assets/page-status-BswZLqvA.js +0 -1
- package/dist/client/assets/page-status-bar-ByUD7VPM.css +0 -1
- package/dist/client/assets/panel-right-Bv7sP_fc.js +0 -1
- package/dist/client/assets/paperclip-BjcuP_Hx.js +0 -1
- package/dist/client/assets/pause-C2XTlkjs.js +0 -1
- package/dist/client/assets/persistent-state-KRk_yb0q.js +0 -1
- package/dist/client/assets/pin-C2mFOV1l.js +0 -1
- package/dist/client/assets/pip-idle-v1-Tt-CZsRG.png +0 -0
- package/dist/client/assets/pip-thinking-v1-BoHWSEye.png +0 -0
- package/dist/client/assets/pip-waiting-v1-DkuvJ-dN.png +0 -0
- package/dist/client/assets/pip-working-v1-wWQLRS1z.png +0 -0
- package/dist/client/assets/play-FT6K3It1.js +0 -1
- package/dist/client/assets/plus-DFDDeGKu.js +0 -1
- package/dist/client/assets/profile-DTmzN16I.js +0 -1
- package/dist/client/assets/project-overview-helpers-BQTc_Ous.js +0 -1
- package/dist/client/assets/projects-inbox-C0FUCv_p.js +0 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +0 -1
- package/dist/client/assets/provider-Dojd8quC.js +0 -1
- package/dist/client/assets/proxy-AJsmwA6h.js +0 -1
- package/dist/client/assets/radio-DRoOZsws.js +0 -1
- package/dist/client/assets/refresh-cw-BmVr7sCD.js +0 -1
- package/dist/client/assets/repo-diff-DyYmQMSA.css +0 -1
- package/dist/client/assets/resizable-columns-C7ygvLt8.css +0 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +0 -1
- package/dist/client/assets/right-49kO-6nD.js +0 -1
- package/dist/client/assets/right-APtItA8A.js +0 -1
- package/dist/client/assets/right-BJwhPqtn.js +0 -1
- package/dist/client/assets/right-BPqrf4ek.js +0 -1
- package/dist/client/assets/right-D7djOy6K.js +0 -1
- package/dist/client/assets/right-DKOUCRob.js +0 -1
- package/dist/client/assets/right-DMNrVzg7.js +0 -1
- package/dist/client/assets/right-DWPVB-nK.js +0 -2
- package/dist/client/assets/right-DppeMCy4.js +0 -1
- package/dist/client/assets/right-GAL5Mw1v.js +0 -1
- package/dist/client/assets/rocket-CGl4RTV7.js +0 -1
- package/dist/client/assets/router-DCtl8wqb.js +0 -1
- package/dist/client/assets/runtime-picker-C3JwrDKP.css +0 -1
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +0 -1
- package/dist/client/assets/scope-views-4khCg2_z.css +0 -1
- package/dist/client/assets/scope-views-RUWwCVAr.js +0 -1
- package/dist/client/assets/scout-voice-CZx60X6E.js +0 -1
- package/dist/client/assets/scoutbot-Bk3nyrkj.js +0 -3
- package/dist/client/assets/scoutbot-markdown-BKEBSbG0.js +0 -6
- package/dist/client/assets/scroll-text-DNjxhyO2.js +0 -1
- package/dist/client/assets/search-DT42oyRW.js +0 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +0 -1
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +0 -1
- package/dist/client/assets/selection-bridge-x3wFUjxj.js +0 -1
- package/dist/client/assets/send-horizontal-CH0-fbZE.js +0 -1
- package/dist/client/assets/send-to-agent-session-DoKCDBJ4.js +0 -1
- package/dist/client/assets/server-QfsgMLk1.js +0 -1
- package/dist/client/assets/session-catalog-CvSdPHPe.js +0 -1
- package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +0 -1
- package/dist/client/assets/session-recap-queue-41l2XVkI.js +0 -1
- package/dist/client/assets/session-ref-lookup-state-SATH_jAP.js +0 -1
- package/dist/client/assets/session-table-L-pns6Zl.js +0 -1
- package/dist/client/assets/sessionRead-CvFz2RHv.js +0 -1
- package/dist/client/assets/sessions-view-Dc-QAa7O.js +0 -1
- package/dist/client/assets/settings-BVh7kldq.js +0 -1
- package/dist/client/assets/shared-work-artifacts-DfNl9KTo.js +0 -1
- package/dist/client/assets/sliders-horizontal-782VC_yy.js +0 -1
- package/dist/client/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png +0 -0
- package/dist/client/assets/sparkles-BjHq_DNK.js +0 -1
- package/dist/client/assets/sprout-action-sprite-DZ8C0fTl.css +0 -1
- package/dist/client/assets/sprout-actions-proof-v1-BzUdc812.png +0 -0
- package/dist/client/assets/sse-BCPRocpq.js +0 -1
- package/dist/client/assets/status-tone-BM_zuRy1.js +0 -1
- package/dist/client/assets/surface-activity-B1rgWB1i.js +0 -1
- package/dist/client/assets/synthetic-agent-routing-aduMYO7P.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +0 -1
- package/dist/client/assets/tail-display-DHSNmvor.js +0 -2
- package/dist/client/assets/tail-events-d0yAYxR0.js +0 -1
- package/dist/client/assets/terminal-hQKQygcf.js +0 -1
- package/dist/client/assets/terminal-relay-Bxs1hp-j.js +0 -1
- package/dist/client/assets/terminal-screen-Bpb2SZrn.css +0 -1
- package/dist/client/assets/terminal-sessions-3RfJpen8.js +0 -1
- package/dist/client/assets/terminal-takeover-Ay5C2c-M.js +0 -1
- package/dist/client/assets/theme-vars-DNK0nn3k.js +0 -1
- package/dist/client/assets/time-Dhsh_2EG.js +0 -1
- package/dist/client/assets/triangle-alert-CHoRGdVO.js +0 -1
- package/dist/client/assets/types-B0PlfpKc.js +0 -1
- package/dist/client/assets/ui-LM8pS8qE.js +0 -1
- package/dist/client/assets/use-beside-DoRC1nt0.js +0 -1
- package/dist/client/assets/use-conversation-list-CY4JciOV.js +0 -1
- package/dist/client/assets/use-fleet-active-asks-CymmXWH4.js +0 -1
- package/dist/client/assets/use-mesh-node-state-BvaqtODo.js +0 -1
- package/dist/client/assets/use-mesh-ops-items-BSYaqH_0.js +0 -1
- package/dist/client/assets/use-reduced-motion-3gMYZNIp.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +0 -1
- package/dist/client/assets/useAgentHoverCard-BANmpjMh.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +0 -1
- package/dist/client/assets/useEmbedHeadline-D6pJRxUg.js +0 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +0 -1
- package/dist/client/assets/usePierreRuntime-BAQdiN0L.js +0 -50
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +0 -1
- package/dist/client/assets/users-BUjx36gx.js +0 -1
- package/dist/client/assets/voice-levels-Dcr3jglk.js +0 -1
- package/dist/client/assets/voice-paths-CJUuBPh3.css +0 -1
- package/dist/client/assets/voice-turn-DftA0iIb.css +0 -1
- package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +0 -1
- package/dist/client/assets/worker-rendered-v1-DmGVMlVi.png +0 -0
- package/dist/client/assets/worker-thinking-v1-ujakpzrK.png +0 -0
- package/dist/client/assets/worker-waiting-v1-DbTSsfJJ.png +0 -0
- package/dist/client/assets/worker-working-v1-BROAvJ_z.png +0 -0
- package/dist/client/assets/world-outposts-v1-DOt0i98W.png +0 -0
- package/dist/client/assets/wrench-DR0i5BU7.js +0 -1
- package/dist/client/assets/x-DAehov0E.js +0 -1
- package/dist/client/assets/xterm-BXQiLVnI.js +0 -34
- package/dist/client/assets/zap-CEjZNZbI.js +0 -1
- package/dist/client/characters/sage/sage.glb +0 -0
- package/dist/highlights-eq9cgrbb.scm +0 -604
- package/dist/highlights-ghv9g403.scm +0 -205
- package/dist/highlights-hk7bwhj4.scm +0 -284
- package/dist/highlights-r812a2qc.scm +0 -150
- package/dist/highlights-x6tmsnaa.scm +0 -115
- package/dist/injections-73j83es3.scm +0 -27
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,j as s}from"./index-EsrkGBcv.js";/* empty css */import{H as ds}from"./HarnessMark-C4naWc16.js";import{a as b}from"./api-DSqpVKC7.js";import{u as hs}from"./sse-BCPRocpq.js";import{t as C}from"./time-Dhsh_2EG.js";import{C as ms}from"./compass-63TUaz5_.js";import{F as us}from"./file-text-CnISiiw6.js";import{L as ps}from"./layout-grid-Cor2frzj.js";import{R as xs}from"./refresh-cw-BmVr7sCD.js";import{A as H}from"./arrow-up-right-BPedAgxO.js";import{C as Ns}from"./cpu-BOTa_WLr.js";import{G as fs,D as js}from"./gauge-D9_5iJEm.js";import{c as gs}from"./createLucideIcon-zZ8Hx7er.js";import"./index-BWHgHrtv.js";const bs=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],ks=gs("folder-git-2",bs),vs=.8,ws=20,F="░",T="·",Ss=["▏","▎","▍","▌","▋","▊","▉"];function ys(a,r=ws){const o=Number.isFinite(a)?Math.min(1,Math.max(0,a)):0,d=Math.round(o*100);if(o<=0)return{filled:"",rest:T.repeat(r),cells:r,percent:0};const i=o*r;let h=Math.floor(i),m=Math.round((i-h)*8);return m===8&&(h+=1,m=0),h>=r?{filled:F.repeat(r),rest:"",cells:r,percent:d}:m===0?h===0?{filled:"▏",rest:T.repeat(r-1),cells:r,percent:d}:{filled:F.repeat(h),rest:T.repeat(r-h),cells:r,percent:d}:{filled:F.repeat(h)+Ss[m-1],rest:T.repeat(r-h-1),cells:r,percent:d}}function S(a){return a.kind==="status"||typeof a.fill!="number"||!Number.isFinite(a.fill)?null:Math.min(1,Math.max(0,a.fill))}function _(a){const r=S(a);return r!==null&&r>=vs}function J(a){return S(a)===0}function $s(a){if(a===null)return{verdict:"Reading",figures:"provider budgets still arriving",showGauges:!1,near:[],unused:0,configured:0,peakPercent:null};if(a.length===0)return{verdict:"All clear",figures:"no provider budgets reported",showGauges:!1,near:[],unused:0,configured:0,peakPercent:null};const r=[...a].filter(_).sort((v,D)=>(S(D)??0)-(S(v)??0)),o=a.filter(J).length,d=a.map(S).filter(v=>v!==null),i=d.length>0?Math.round(Math.max(...d)*100):null,h=a.length-o;let m;r.length>0?m=`${r.length} near ceiling`:h===0?m="Unused":m=`Peak ${i??0}%`;const f=[r.length>0?r.map(v=>`${v.label} ${Math.round((S(v)??0)*100)}%`).join(" · "):null,`${a.length} configured`,o>0&&h>0?`${o} unused`:null].filter(Boolean).join(" · ");return{verdict:m,figures:f,showGauges:!0,near:r,unused:o,configured:a.length,peakPercent:i}}function Es(a,r){if(!a)return r||"process";if(a.includes("--append-system-prompt")){const o=a.match(/session-[a-zA-Z0-9_-]+/);return o?`${r||"harness"} (relay ${o[0]})`:`${r||"harness"} (prompted relay)`}return a.length>70?`${a.slice(0,67)}...`:a}function I(a){if(!a)return"workspace";const r=a.replace(/\/+$/,"").split("/");return r[r.length-1]||a}function Rs(a){if(!a)return;const[r,o]=a.includes("-")?a.split("-"):["0",a],d=o.split(":").map(f=>Number.parseInt(f,10));if(d.length<2||d.some(f=>!Number.isFinite(f)))return;const[i,h,m]=d.length===3?d:[0,d[0],d[1]];return((Number.parseInt(r,10)||0)*24+i)*3600+h*60+m}function Z(a){if(a<60)return`${Math.round(a)}s`;const r=Math.floor(a/60);if(r<60)return`${r}m`;const o=Math.floor(r/60),d=r%60;return o<24?d?`${o}h${String(d).padStart(2,"0")}m`:`${o}h`:`${Math.floor(o/24)}d${o%24}h`}function As(a){const r=a.split("/").filter(Boolean);return r[r.length-1]||a}const X={stalled_relay:"relay",idle_process:"process",uncommitted_branch:"branch",unresumed_session:"session"};function Ps({gauge:a}){const r=S(a),o=_(a),d=J(a),i=ys(r??0),h=r!==null,m=o?"warn":d||!h?"unused":"ok",f=d?"UNUSED":a.resetAt?`RESET ${C(a.resetAt)}`:a.statusLabel||a.usedLabel||"";return s.jsxs("div",{className:`s-host-rack-row ${o?"s-host-rack-row--warn":""} ${d||!h?"s-host-rack-row--unused":""}`,children:[s.jsx("span",{className:"s-host-rack-name font-mono",children:a.label}),s.jsxs("span",{className:`s-host-gauge s-host-gauge--${m}`,role:"meter","aria-label":h?`${a.label} ${i.percent} percent`:`${a.label} ${a.statusLabel||"no quota"}`,"aria-valuemin":h?0:void 0,"aria-valuemax":h?100:void 0,"aria-valuenow":h?i.percent:void 0,children:[s.jsx("span",{className:"s-host-gauge-chrome","aria-hidden":"true",children:"["}),s.jsx("span",{className:"s-host-gauge-fill","aria-hidden":"true",children:i.filled}),s.jsx("span",{className:"s-host-gauge-rest","aria-hidden":"true",children:i.rest}),s.jsx("span",{className:"s-host-gauge-chrome","aria-hidden":"true",children:"]"})]}),s.jsx("span",{className:`s-host-rack-right font-mono ${o?"s-host-rack-age--warn":""} ${d||!h?"s-host-rack-dim":""}`,children:h?`${i.percent}%`:"—"}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono s-host-rack-truncate",children:f})]})}function Js({navigate:a,agents:r}){const[o,d]=c.useState(null),[i,h]=c.useState(null),[m,f]=c.useState(null),[v,D]=c.useState(null),[z,ss]=c.useState(null),[L,es]=c.useState(null),[O,ts]=c.useState([]),[Ms,as]=c.useState(null),[V,ns]=c.useState([]),[Ts,rs]=c.useState([]),[Is,K]=c.useState(!0),[E,W]=c.useState(!1),[Cs,os]=c.useState(Date.now()),[G,Y]=c.useState("inquiry"),[ls,Ds]=c.useState(!1),[Ls,Os]=c.useState({"q-attention":!0,"q-dropped":!0,"q-quotas":!0,"q-posture":!0}),R=c.useCallback(async(e=!1)=>{e?W(!0):K(!0);try{const[t,n,l,k,P,p,N,M,B,q]=await Promise.allSettled([b("/.host-info"),b("/api/build"),b("/api/service-budgets"),b("/api/tail/discover"),b("/api/knowledge/status"),b("/api/pairing-state"),b("/api/terminal-sessions"),b("/api/fleet"),b("/api/sessions"),b("/api/activity")]);t.status==="fulfilled"&&d(t.value),n.status==="fulfilled"&&h(n.value),l.status==="fulfilled"?f(l.value?.gauges??[]):l.status==="rejected"&&f([]),k.status==="fulfilled"&&D(k.value),P.status==="fulfilled"&&ss(P.value),p.status==="fulfilled"&&es(p.value),N.status==="fulfilled"&&N.value?.sessions&&ts(N.value.sessions),M.status==="fulfilled"&&as(M.value),B.status==="fulfilled"&&Array.isArray(B.value)&&ns(B.value),q.status==="fulfilled"&&Array.isArray(q.value)&&rs(q.value),os(Date.now())}finally{K(!1),W(!1)}},[]);c.useEffect(()=>{R()},[R]),hs(()=>{R(!0)});const x=v?.processes??[],is=ls?x:x.slice(0,5);c.useMemo(()=>{const e={};for(const t of r){const n=t.harness||"other";e[n]||(e[n]={total:0,active:0}),e[n].total+=1,t.state==="working"&&(e[n].active+=1)}for(const t of x){const n=t.harness||"other";e[n]||(e[n]={total:0,active:0}),e[n].total=Math.max(e[n].total,1),e[n].active=Math.max(e[n].active,1)}return e},[r,x]);const $=c.useMemo(()=>{const e=new Map;for(const t of r){const n=t.projectRoot||t.cwd||"unknown";e.has(n)||e.set(n,{root:n,name:I(n),agents:[],branches:new Set,processes:[]});const l=e.get(n);l.agents.push(t),t.branch&&l.branches.add(t.branch)}for(const t of x)if(t.cwd)for(const[n,l]of e.entries())(t.cwd.startsWith(n)||n.startsWith(t.cwd))&&l.processes.push(t);return Array.from(e.values())},[r,x]),w=c.useMemo(()=>{const e=$.reduce((p,N)=>p+Math.max(1,N.agents.length+N.processes.length*3),0),t=$.map(p=>{const N=Math.max(1,p.agents.length+p.processes.length*3),M=e>0?Math.round(N/e*100):0;return{...p,weight:N,percent:M,primaryBranch:Array.from(p.branches)[0]||p.name==="openscout"&&i?.gitBranch||"main"}}).sort((p,N)=>N.weight-p.weight),n=t.slice(0,5),l=t[0],k=t.slice(5),P=k.reduce((p,N)=>p+N.percent,0);return{ranked:t,topProjects:n,topProject:l,otherProjects:k,otherPercent:P,totalProjects:t.length}},[$,i]),j=c.useMemo(()=>{const e=[];for(const t of x)if(t.command&&t.command.includes("--append-system-prompt")){const n=t.command.match(/session-[a-zA-Z0-9_-]+/),l=n?n[0]:`PID ${t.pid}`;e.push({id:`relay-${t.pid}`,kind:"stalled_relay",title:l,subtitle:`Launched in ${I(t.cwd)} · PID ${t.pid} · Runtime ${t.etime||"active"}`,ageLabel:t.etime||"active",ageSeconds:Rs(t.etime),projectRoot:t.cwd||void 0,harness:t.harness,pid:t.pid,severity:"warn",actionLabel:"Tail Process",actionRoute:{view:"ops",mode:"mission"}})}i?.gitBranch&&i.gitBranch!=="main"&&e.push({id:"branch-divergence",kind:"uncommitted_branch",title:i.gitBranch,subtitle:`Local worktree is ahead with uncommitted edits on ${i.runtime?.platform||"darwin"}`,ageLabel:"Unmerged",projectRoot:"/Users/art/dev/openscout",severity:"neutral",actionLabel:"Inspect Repos",actionRoute:{view:"repos"}});for(const t of V.slice(0,4))t.lastMessageAt&&Date.now()-t.lastMessageAt>3600*1e3&&e.push({id:`session-${t.id}`,kind:"unresumed_session",title:t.title||t.id,subtitle:`Last turn recorded ${C(t.lastMessageAt)} · ${t.messageCount} messages · ${I(t.workspaceRoot)}`,ageLabel:C(t.lastMessageAt),ageSeconds:(Date.now()-t.lastMessageAt)/1e3,conversationId:t.id,projectRoot:t.workspaceRoot||void 0,harness:t.harness||void 0,severity:"info",actionLabel:"Open Chat",actionRoute:{view:"conversation",conversationId:t.id}});return e},[x,i,V]),g=c.useMemo(()=>m?.length?[...m].sort((e,t)=>(t.fill??0)-(e.fill??0))[0]:null,[m]),u=c.useMemo(()=>{const e=w.ranked;if(e.length===0)return null;const t=e[0].percent,n=w.otherProjects;return{verdict:t>=50?"Concentrated":t>=25?"Weighted":"Scattered",topPercent:t,tailPercent:w.otherPercent,tailCount:n.length,tailAgents:n.reduce((l,k)=>l+k.agents.length,0),tailProcesses:n.reduce((l,k)=>l+k.processes.length,0),aboveTen:e.filter(l=>l.percent>=10).length}},[w]),y=c.useMemo(()=>{const e=j.reduce((n,l)=>(n[l.kind]=(n[l.kind]??0)+1,n),{}),t=j.map(n=>n.ageSeconds).filter(n=>typeof n=="number").sort((n,l)=>l-n)[0];return{verdict:j.length===0?"Nothing unattended":`${j.length} unattended`,byKind:e,oldestLabel:t?Z(t):null}},[j]),U=c.useMemo(()=>$s(m),[m]),A=c.useMemo(()=>{const e=O.length,t=z?.indexedSessions??0,n=L?.trustedPeerCount??0,l=o?.brokerUrl||(o?.ports?.broker?`127.0.0.1:${o.ports.broker}`:null);return[{key:"broker",label:"broker",detail:l?[l,o?.brokerSocketPath?As(o.brokerSocketPath):null].filter(Boolean).join(" · "):"endpoint not reported",state:l?"UP":"UNKNOWN",tone:l?"ok":"unknown"},{key:"pty",label:"pty relay",detail:e>0?`${e} socket${e===1?"":"s"}`:"0 sockets · latency unmeasured",state:e>0?"ACTIVE":"IDLE",tone:e>0?"ok":"idle"},{key:"knowledge",label:"knowledge",detail:t>0?`${t.toLocaleString()} transcript${t===1?"":"s"} indexed`:"0 transcripts indexed",state:t>0?"INDEXED":"EMPTY",tone:t>0?"ok":"warn",action:t>0?void 0:{label:"Index",route:{view:"search"}}},{key:"mesh",label:"mesh",detail:n>0?`${n} trusted peer${n===1?"":"s"} · scope ${o?.advertiseScope||"mesh"}`:`no trusted peers · scope ${o?.advertiseScope||"mesh"}`,state:n>0?"PAIRED":"UNPAIRED",tone:n>0?"ok":"idle"}]},[o,O,z,L]),Q=c.useMemo(()=>{const e=A.reduce((n,l)=>(n[l.tone]=(n[l.tone]??0)+1,n),{}),t=A.filter(n=>n.tone==="warn");return{verdict:t.length>0?`${t.length} ${t.length===1?"needs":"need"} attention`:"All nominal",figures:[e.ok?`${e.ok} up`:null,e.idle?`${e.idle} idle`:null,e.warn?`${e.warn} empty`:null,e.unknown?`${e.unknown} unknown`:null].filter(Boolean).join(" · ")}},[A]);o?.nodeName||o?.hostName;const cs=i?.runtime?`${i.runtime.platform} ${i.runtime.arch} · ${i.runtime.engine} ${i.runtime.engineVersion}`:"Darwin arm64";return s.jsxs("div",{className:"s-host-view",children:[s.jsxs("header",{className:"s-host-header",children:[s.jsxs("div",{className:"s-host-header-left",children:[s.jsxs("div",{className:"s-host-header-status-line",children:[s.jsx("span",{className:"dot dot--sm dot--working dot--pulse","aria-hidden":"true"}),s.jsxs("span",{className:"label-xs s-host-mono-dim",children:["NODE: ",o?.nodeId||"local"]}),s.jsx("span",{className:"s-host-header-divider",children:"/"}),s.jsx("span",{className:"label-xs s-host-mono-dim",children:cs}),i?.gitHash&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"s-host-header-divider",children:"/"}),s.jsxs("span",{className:"label-xs s-host-mono-dim",children:["git:",i.gitHash.slice(0,7)]})]})]}),s.jsxs("h1",{className:"s-host-title",children:[s.jsx(ms,{size:22,className:"s-host-title-icon"}),s.jsx("span",{children:"Host Advisor"})]})]}),s.jsxs("div",{className:"s-host-header-right",children:[s.jsxs("div",{className:"s-host-mode-toggle",role:"group","aria-label":"Advisor Format",children:[s.jsxs("button",{type:"button",className:`s-host-mode-btn ${G==="inquiry"?"s-host-mode-btn--active":""}`,onClick:()=>Y("inquiry"),title:"Formatted Executive Inquiries & Operator Answers",children:[s.jsx(us,{size:12}),s.jsx("span",{children:"Inquiries"})]}),s.jsxs("button",{type:"button",className:`s-host-mode-btn ${G==="matrix"?"s-host-mode-btn--active":""}`,onClick:()=>Y("matrix"),title:"Compact Infrastructure Matrix",children:[s.jsx(ps,{size:12}),s.jsx("span",{children:"Matrix"})]})]}),s.jsxs("button",{type:"button",className:`btn btn--sm ${E?"btn--accent":""}`,disabled:E,onClick:()=>{R(!0)},children:[s.jsx(xs,{size:12,className:E?"s-spin":""}),s.jsx("span",{children:E?"Scanning...":"Refresh"})]})]})]}),s.jsxs("section",{className:"s-host-readouts","aria-label":"Host Readouts",children:[s.jsxs("div",{className:"s-host-readout",children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"AGENTS"}),s.jsx("span",{className:"s-host-readout-figure",children:r.length}),s.jsxs("span",{className:"label-xs s-host-readout-qual",children:[x.length," PROCESS",x.length===1?"":"ES"]})]}),s.jsxs("div",{className:"s-host-readout",children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"ROOTS"}),s.jsx("span",{className:"s-host-readout-figure",children:$.length}),s.jsx("span",{className:"label-xs s-host-readout-qual",children:u?`TOP SHARE ${u.topPercent}%`:"NONE ACTIVE"})]}),s.jsxs("div",{className:`s-host-readout ${g&&_(g)?"s-host-readout--warn":""}`,children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"PEAK BUDGET"}),s.jsx("span",{className:"s-host-readout-figure",children:g?`${Math.round((g.fill??0)*100)}%`:"—"}),s.jsx("span",{className:"label-xs s-host-readout-qual",children:g?`${g.label}${g.resetAt?` · RESET ${C(g.resetAt)}`:""}`:"NO PROVIDERS CONFIGURED"})]}),s.jsxs("div",{className:`s-host-readout ${j.length>0?"s-host-readout--flag":""}`,children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"UNATTENDED"}),s.jsx("span",{className:"s-host-readout-figure",children:j.length}),s.jsx("span",{className:"label-xs s-host-readout-qual",children:y.oldestLabel?`OLDEST ${y.oldestLabel}`:"NONE OPEN"})]}),s.jsxs("div",{className:"s-host-readout",children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"MESH PEERS"}),s.jsx("span",{className:"s-host-readout-figure",children:L?.trustedPeerCount??0}),s.jsxs("span",{className:"label-xs s-host-readout-qual",children:["SCOPE ",(o?.advertiseScope||"mesh").toUpperCase()]})]})]}),G==="inquiry"?s.jsxs("div",{className:"s-host-readings","aria-label":"Host Readings",children:[s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"01 // ATTENTION"}),s.jsx("span",{className:"s-host-reading-verdict",children:u?.verdict??"No active roots"}),s.jsx("span",{className:"s-host-reading-figures",children:u?s.jsxs(s.Fragment,{children:["top ",u.topPercent,"%",s.jsx("span",{className:"s-host-sep",children:"·"}),"tail ",u.tailPercent,"%",s.jsx("span",{className:"s-host-sep",children:"·"}),u.aboveTen," root",u.aboveTen===1?"":"s"," above 10%"]}):s.jsx(s.Fragment,{children:"no agents or processes bound to a workspace"})}),s.jsxs("button",{type:"button",className:"btn btn--sm",onClick:()=>a({view:"repos"}),children:[s.jsx("span",{children:"Repos"}),s.jsx(H,{size:10})]})]}),w.ranked.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"s-host-share-bar",children:[w.topProjects.map((e,t)=>s.jsx("div",{className:`s-host-share-seg s-host-share-seg--${Math.min(t,4)}`,style:{width:`${e.percent}%`},title:`${e.name} ${e.percent}%`,children:s.jsxs("span",{className:"s-host-share-seg-label font-mono text-2xs",children:[e.name," ",e.percent,"%"]})},e.root)),u&&u.tailCount>0&&s.jsx("div",{className:"s-host-share-seg s-host-share-seg--tail",style:{flex:1},children:s.jsxs("span",{className:"s-host-share-seg-label font-mono text-2xs",children:[u.tailCount," OTHER ROOTS — ",u.tailPercent,"%"]})})]}),s.jsxs("div",{className:"s-host-rack s-host-rack--roots",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs",children:"ROOT"}),s.jsx("span",{className:"label-xs",children:"SHARE"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"PCT"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"AGENTS"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"PROCS"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"BRANCH"})]}),w.topProjects.map(e=>s.jsxs("div",{className:"s-host-rack-row",children:[s.jsx("span",{className:"s-host-rack-name font-mono",children:e.name}),s.jsx("span",{className:"s-host-rack-track",children:s.jsx("span",{className:"s-host-rack-fill",style:{width:`${u&&u.topPercent>0?Math.round(e.percent/u.topPercent*100):0}%`}})}),s.jsxs("span",{className:"s-host-rack-right font-mono",children:[e.percent,"%"]}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:e.agents.length}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:e.processes.length}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono s-host-rack-truncate",children:e.primaryBranch})]},e.root)),u&&u.tailCount>0&&s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--tail",children:[s.jsxs("span",{className:"s-host-rack-name font-mono",children:["tail — ",u.tailCount," roots"]}),s.jsx("span",{className:"s-host-rack-track s-host-rack-track--hatch"}),s.jsxs("span",{className:"s-host-rack-right font-mono",children:[u.tailPercent,"%"]}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:u.tailAgents}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:u.tailProcesses}),s.jsxs("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:["each below ",w.topProjects.at(-1)?.percent??0,"%"]})]})]})]})]}),s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"02 // UNATTENDED"}),s.jsx("span",{className:"s-host-reading-verdict",children:y.verdict}),s.jsx("span",{className:"s-host-reading-figures",children:j.length>0?s.jsxs(s.Fragment,{children:[y.oldestLabel&&s.jsxs(s.Fragment,{children:["oldest ",y.oldestLabel,s.jsx("span",{className:"s-host-sep",children:"·"})]}),Object.entries(y.byKind).map(([e,t])=>`${t} ${X[e]??e}`).join(" · "),s.jsx("span",{className:"s-host-sep",children:"·"}),"of ",x.length," processes"]}):s.jsx(s.Fragment,{children:"no idle relays, diverged branches or stale conversations"})})]}),j.length>0&&s.jsxs("div",{className:"s-host-rack s-host-rack--unattended",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs"}),s.jsx("span",{className:"label-xs",children:"SIGNAL"}),s.jsx("span",{className:"label-xs",children:"ROOT"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"REF"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"AGE"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"ACTION"})]}),j.map(e=>s.jsxs("div",{className:"s-host-rack-row",children:[s.jsx("span",{className:`dot dot--sm ${e.severity==="warn"?"dot--warning":"dot--neutral"}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-host-rack-name font-mono s-host-rack-truncate",children:e.title}),s.jsx("span",{className:"s-host-rack-dim font-mono s-host-rack-truncate",children:e.projectRoot?I(e.projectRoot):"—"}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:e.pid?`pid ${e.pid}`:X[e.kind]??e.kind}),s.jsx("span",{className:`s-host-rack-right font-mono s-host-rack-age ${e.severity==="warn"?"s-host-rack-age--warn":""}`,children:e.ageSeconds?Z(e.ageSeconds):e.ageLabel}),s.jsx("span",{className:"s-host-rack-right s-host-rack-actions",children:e.actionRoute&&s.jsx("button",{type:"button",className:"btn btn--sm",onClick:()=>e.actionRoute&&a(e.actionRoute),children:e.actionLabel})})]},e.id))]})]}),s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"03 // BUDGETS"}),s.jsx("span",{className:"s-host-reading-verdict",children:U.verdict}),s.jsx("span",{className:"s-host-reading-figures",children:U.figures}),s.jsxs("button",{type:"button",className:"btn btn--sm",onClick:()=>a({view:"harnesses"}),children:[s.jsx("span",{children:"Providers"}),s.jsx(H,{size:10})]})]}),U.showGauges&&m&&s.jsxs("div",{className:"s-host-rack s-host-rack--budgets",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs",children:"PROVIDER"}),s.jsx("span",{className:"label-xs",children:"GAUGE"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"PCT"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"NOTE"})]}),m.map(e=>s.jsx(Ps,{gauge:e},e.id))]})]}),s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"04 // SUBSYSTEMS"}),s.jsx("span",{className:"s-host-reading-verdict",children:Q.verdict}),s.jsx("span",{className:"s-host-reading-figures",children:Q.figures})]}),s.jsxs("div",{className:"s-host-rack s-host-rack--subsystems",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs"}),s.jsx("span",{className:"label-xs",children:"SUBSYSTEM"}),s.jsx("span",{className:"label-xs",children:"DETAIL"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"STATE"})]}),A.map(e=>s.jsxs("div",{className:"s-host-rack-row",children:[s.jsx("span",{className:`dot dot--sm s-host-dot--${e.tone}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-host-rack-name font-mono",children:e.label}),s.jsx("span",{className:"s-host-rack-dim font-mono s-host-rack-truncate",children:e.detail}),s.jsxs("span",{className:"s-host-rack-right s-host-rack-actions",children:[e.action&&s.jsx("button",{type:"button",className:"btn btn--sm s-host-btn-accent",onClick:()=>e.action&&a(e.action.route),children:e.action.label}),s.jsx("span",{className:`chip chip--sm chip--mono s-host-state s-host-state--${e.tone}`,children:e.state})]})]},e.key))]})]})]}):s.jsxs("div",{className:"s-host-matrix-container",children:[s.jsxs("section",{className:"s-host-telemetry-grid","aria-label":"Host Telemetry Overview",children:[s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"REGISTERED AGENTS"}),s.jsx(Ns,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:r.length}),s.jsxs("span",{className:"s-host-stat-kicker",children:[x.length," background processes"]})]})]}),s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"SERVICE QUOTA RADAR"}),s.jsx(fs,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:g?`${Math.round((g.fill??0)*100)}%`:"Nominal"}),s.jsx("span",{className:"s-host-stat-kicker",children:"peak token consumption"})]})]}),s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"WORKSPACES & REPOS"}),s.jsx(ks,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:$.length}),s.jsx("span",{className:"s-host-stat-kicker",children:"registered project roots"})]})]}),s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"SUBSYSTEM RELAYS"}),s.jsx(js,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:O.length}),s.jsx("span",{className:"s-host-stat-kicker",children:"live terminal relays"})]})]})]}),s.jsxs("section",{className:"s-host-block","aria-label":"Active Processes",children:[s.jsx("div",{className:"s-host-block-head",children:s.jsxs("span",{className:"label-xs",children:["ACTIVE HARNESS PROCESSES (",x.length,")"]})}),s.jsx("div",{className:"s-host-table-box",children:s.jsx("div",{className:"s-host-table",children:is.map(e=>s.jsxs("div",{className:"s-host-table-row",children:[s.jsxs("div",{className:"s-host-table-cell-main",children:[s.jsx("span",{className:"dot dot--sm dot--working dot--pulse","aria-hidden":"true"}),s.jsx(ds,{harness:e.harness,size:13}),s.jsx("span",{className:"font-semibold text-xs font-mono",children:Es(e.command,e.harness)}),s.jsxs("span",{className:"chip chip--sm chip--ghost chip--mono",children:["PID ",e.pid]}),e.etime&&s.jsx("span",{className:"chip chip--sm chip--ghost chip--mono",children:e.etime})]}),s.jsx("div",{className:"s-host-table-cell-action",children:s.jsxs("button",{type:"button",className:"btn btn--sm",onClick:()=>a({view:"ops",mode:"mission"}),children:[s.jsx("span",{children:"Tail"}),s.jsx(H,{size:10})]})})]},e.pid))})})]})]})]})}export{Js as HostAdvisorView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,j as e}from"./index-EsrkGBcv.js";import{c as p,C}from"./chat-api-DSJMBYoT.js";import{useScoutStandaloneTheme as J,ChatSpaceTheme as v}from"./ChatSpaceTheme-CUH8bTZc.js";import{i as L,r as F}from"./chat-space-model-aW3Fd8_U.js";import"./api-DSqpVKC7.js";import"./theme-vars-DNK0nn3k.js";const E="scout.chat.invite.displayName";function M(){try{return window.localStorage.getItem(E)??""}catch{return""}}function P(s){try{window.localStorage.setItem(E,s)}catch{}}function q({token:s}){const o=J(),[t,T]=a.useState(null),[j,I]=a.useState(null),[k,f]=a.useState(null),[R,x]=a.useState(!0),[r,$]=a.useState(()=>M()),[b,d]=a.useState(null),[N,g]=a.useState(!1);a.useEffect(()=>{let n=!1;return x(!0),Promise.allSettled([p.invitePreview(s),p.me()]).then(c=>{if(n)return;const[u,y]=c;if(u.status==="fulfilled")T(u.value),f(null);else{const S=u.reason;f(S instanceof C?S.message:"This invitation link could not be checked.")}y.status==="fulfilled"&&I(y.value.member),x(!1)}),()=>{n=!0}},[s]);const h=a.useCallback(n=>{window.location.href=`/chat?channel=${encodeURIComponent(n)}`},[]),w=a.useCallback(async()=>{if(!t)return;const n=r.trim();if(!n){d("A name is required to join.");return}g(!0),d(null);try{const c=await p.joinInvite(s,n);P(n),h(c.conversationId)}catch(c){d(c instanceof C?c.message:"Joining did not work. Try again."),g(!1)}},[r,h,t,s]);if(R)return e.jsx(v,{theme:o,className:"chat-centered",children:e.jsx("p",{className:"chat-card-meta",children:"Checking this invitation…"})});if(!t)return e.jsx(v,{theme:o,className:"chat-centered",children:e.jsxs("div",{className:"chat-card",children:[e.jsx("span",{className:"chat-card-eyebrow",children:"Scout Chat"}),e.jsx("h1",{children:"This invitation is not valid"}),e.jsx("p",{children:k??"This invitation link is not valid."})]})});const A=!!(j&&j.channelIds.includes(t.channel.id)),m=t.inviter?.displayName?.trim()||null,i=L({channelTitle:t.channel.title,invite:t.invite,inviterName:m,alreadyMember:A}),l=F(t.invite.route,t.reachability??null);return e.jsx(v,{theme:o,className:"chat-centered",children:e.jsxs("div",{className:"chat-card",children:[e.jsx("span",{className:"chat-card-eyebrow",children:`Scout Chat on ${t.invite.route.host}`}),e.jsx("h1",{children:i.channelTitle??t.channel.title}),t.channel.topic?e.jsx("p",{children:t.channel.topic}):null,e.jsx("p",{className:"chat-card-meta",children:[m?`Invited by ${m}`:null,`${t.channel.memberCount} in this channel`].filter(Boolean).join(" · ")}),i.mode==="closed"?e.jsx("p",{children:i.message}):i.mode==="open"?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn--accent",onClick:()=>h(t.channel.id),children:i.cta}),e.jsx("p",{className:"chat-card-note",children:i.note})]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"chat-card-field",children:[e.jsx("span",{className:"label-md",children:"Join as"}),e.jsx("input",{className:"chat-input",value:r,autoFocus:!0,placeholder:"Your name","aria-label":"Your name",onChange:n=>$(n.target.value),onKeyDown:n=>{n.key==="Enter"&&(n.preventDefault(),w())}})]}),b?e.jsx("p",{className:"chat-card-error",children:b}):null,e.jsx("button",{type:"button",className:"btn btn--accent",disabled:N||r.trim().length===0,onClick:()=>{w()},children:N?"Joining…":i.cta}),e.jsx("p",{className:"chat-card-note",children:i.note})]}),e.jsx("p",{className:"chat-card-note",children:`${l.state} — ${l.line}`}),l.caveat?e.jsx("p",{className:"chat-card-note",children:l.caveat}):null]})})}export{q as InviteLandingScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p,j as e}from"./index-EsrkGBcv.js";import{u as S}from"./keyboard-nav-DDHegDbx.js";import{C as U}from"./chat-api-DSJMBYoT.js";import{a as A,u as E}from"./chat-transport-DNS5CB2I.js";import{CopyAction as P}from"./ChatBits-CsvxbToF.js";import{c as w,D as _,j as F,r as z}from"./chat-space-model-aW3Fd8_U.js";import{U as D,C as O}from"./users-BUjx36gx.js";import{B as C}from"./bot-B4zLQ4IN.js";import{c as f}from"./createLucideIcon-zZ8Hx7er.js";import{M as B}from"./monitor-DTTYEb73.js";import"./api-DSqpVKC7.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-ksPazAKH.js";import"./chat-message-markup-91DIry6R.js";import"./message-markup-BQW5jdJw.js";import"./ChatAvatar-C3a_o5Hj.js";import"./SpriteAvatar-CpZWf54-.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],R=f("globe",K);const q=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],H=f("link-2",q);const $=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],L=f("webhook",$),W={teammate:{ariaLabel:"Teammate invitation",heading:"Make room for a teammate",explain:"Share a link. They join in their browser and can bring their own agent.",mintLabel:"Create invite link",preMintNote:"They choose their own name when they join.",copyLabel:"Copy invite link",copiedLabel:"Link copied",postCopyNote:"Send it to your teammate.",metaFacts:"Reusable link",previewLabel:"Preview invite link"},agent:{ariaLabel:"Agent invitation",heading:"Bring your agent into the conversation",explain:"Bring an agent you already have running. Its session and workspace stay right where they are.",mintLabel:"Create agent invitation",preMintNote:"You’ll get instructions to paste into your agent’s chat.",copyLabel:"Copy agent instructions",copiedLabel:"Instructions copied",postCopyNote:"Paste into your agent’s current chat.",metaFacts:"One agent · Joins as yours",previewLabel:"Preview agent instructions"},api:{ariaLabel:"No-install agent invitation",heading:"Invite an agent with nothing installed",explain:"For an agent that can make HTTP requests and nothing else. It joins over plain HTTP, reads the room by polling, and posts its replies — it can’t be woken or sent tracked asks.",mintLabel:"Create no-install invitation",preMintNote:"You’ll get one instruction to paste into any agent’s chat.",copyLabel:"Copy no-install instructions",copiedLabel:"Instructions copied",postCopyNote:"Paste into the agent’s chat. It joins over HTTP — nothing to install.",metaFacts:"One agent · Reads by polling",previewLabel:"Preview no-install instructions"}};function Y({invite:a}){const n=z(a.invite.route,a.reachability??null),r=a.invite.route.reachability,s=n.remoteUsable?R:r==="local_only"?B:O,c=n.remoteUsable?"Works through your Scout network.":r==="local_only"?"Use this link on this Mac. It cannot be opened on another machine.":r==="lan"?"Use this link on the same local network.":"Other machines may not be able to open this link.";return e.jsxs("div",{className:"chat-invite-connection","data-restricted":!n.remoteUsable,children:[e.jsx(s,{size:16,"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("p",{className:"chat-invite-connection-title",children:n.remoteUsable?"Network invitation":r==="local_only"?"This Mac only":r==="lan"?"Same network only":"Connection not verified"}),e.jsx("p",{children:c}),e.jsxs("details",{className:"chat-invite-details",children:[e.jsx("summary",{children:"Connection details"}),e.jsxs("p",{children:[n.state," — ",n.line]}),n.caveat?e.jsx("p",{children:n.caveat}):null]})]})]})}function V({kind:a,channel:n,inviterName:r,invite:s,error:c,pending:d,onMint:y}){const b=Date.now(),[h,l]=p.useState(!1),i=W[a],x=a==="teammate"?H:a==="agent"?C:L,g=s?_({kind:a,channelTitle:n.title,channelTopic:n.topic??null,inviterName:r,inviteUrl:s.inviteUrl,agentInstructionsUrl:s.agentInstructionsUrl}):null,u=a==="teammate"?s?.inviteUrl:g;return e.jsxs("section",{className:"chat-sheet-sec","aria-label":i.ariaLabel,children:[e.jsx("h3",{className:"chat-invite-heading",children:i.heading}),e.jsx("p",{className:"chat-sheet-explain",children:i.explain}),c?e.jsx("p",{className:"chat-sheet-error",role:"alert",children:c}):null,s&&g&&u?e.jsxs(e.Fragment,{children:[e.jsx(Y,{invite:s}),e.jsxs("div",{className:"chat-invite-primary",children:[e.jsx(P,{value:u,label:i.copyLabel,copiedLabel:i.copiedLabel,className:"btn btn--accent chat-invite-copy",onCopyFailed:()=>l(!0)}),e.jsx("p",{className:"chat-invite-next",children:i.postCopyNote})]}),e.jsxs("p",{className:"chat-invite-meta",children:[F(s.invite.expiresAt,b)," · ",i.metaFacts]}),e.jsxs("details",{className:"chat-invite-preview",open:h,onToggle:j=>l(j.currentTarget.open),children:[e.jsx("summary",{children:i.previewLabel}),e.jsx("div",{className:"surface-card--inset chat-copy-block",tabIndex:0,children:u}),e.jsx("p",{className:"chat-invite-meta",children:"Copy before closing. This invitation is not shown again."})]})]}):e.jsxs("div",{className:"chat-invite-primary",children:[e.jsxs("button",{type:"button",className:"btn btn--accent chat-invite-copy",onClick:y,disabled:d,children:[e.jsx(x,{size:16,"aria-hidden":"true"}),d?"Creating invitation…":i.mintLabel]}),e.jsx("p",{className:"chat-invite-next",children:i.preMintNote})]})]})}function ue({channel:a,space:n,viewerActorId:r,viewerName:s,onClose:c,onInvitesChanged:d}){const y=A(),b=E(),h=b.inviteKinds,[l,i]=p.useState(()=>h[0]??"teammate"),{ref:x}=S(),[g,u]=p.useState({teammate:null,agent:null,api:null}),[j,k]=p.useState({teammate:null,agent:null,api:null}),[T,N]=p.useState(null),I=p.useCallback(async t=>{N(t),k(o=>({...o,[t]:null}));try{const o=await y.createInvite(a.id,{kind:t,space:n,createdByActorId:r,...t==="agent"?{inviteeDisplayName:s,inviteeActorId:r}:{}});u(m=>({...m,[t]:o})),d()}catch(o){const m=o instanceof U?o.message:"Could not create this invitation.";k(v=>({...v,[t]:m}))}finally{N(null)}},[a.id,y,n,d,r,s]);return p.useEffect(()=>{const t=o=>{o.key==="Escape"&&c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[c]),e.jsx("div",{className:"chat-scrim",role:"presentation",onClick:t=>{t.target===t.currentTarget&&c()},children:e.jsxs("div",{ref:x,onKeyDown:t=>{if(t.key!=="Tab")return;const o=Array.from(t.currentTarget.querySelectorAll('button:not([disabled]), a[href], summary, [tabindex="0"]')).filter(M=>M.getClientRects().length>0),m=o[0],v=o[o.length-1];t.shiftKey&&document.activeElement===m?(t.preventDefault(),v?.focus()):!t.shiftKey&&document.activeElement===v&&(t.preventDefault(),m?.focus())},tabIndex:-1,className:"chat-sheet",role:"dialog","aria-modal":"true","aria-label":`Invite to ${w(a.title)}`,children:[e.jsxs("div",{className:"chat-sheet-title",children:[e.jsx("h2",{children:`Invite to ${w(a.title)}`}),e.jsx("button",{type:"button",className:"chat-rpanel-close",style:{marginLeft:"auto"},onClick:c,"aria-label":"Close invite sheet",children:"×"})]}),h.length>1?e.jsxs("div",{className:"chat-invite-switch",role:"group","aria-label":"Who are you inviting?",children:[h.includes("teammate")?e.jsxs("button",{type:"button","aria-pressed":l==="teammate",onClick:()=>i("teammate"),children:[e.jsx(D,{size:16,"aria-hidden":"true"})," Teammate"]}):null,h.includes("agent")?e.jsxs("button",{type:"button","aria-pressed":l==="agent",onClick:()=>i("agent"),children:[e.jsx(C,{size:16,"aria-hidden":"true"})," Agent"]}):null,h.includes("api")?e.jsxs("button",{type:"button","aria-pressed":l==="api",onClick:()=>i("api"),children:[e.jsx(L,{size:16,"aria-hidden":"true"})," No install"]}):null]}):null,e.jsx(V,{kind:l,channel:a,inviterName:s,invite:g[l],error:j[l],pending:T!==null,onMint:()=>{I(l)}},l),b.inviteList?e.jsx("p",{className:"chat-sheet-foot",children:"Manage or revoke invitations in Members."}):null]})})}export{ue as InviteSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,j as r}from"./index-EsrkGBcv.js";import{MemberAvatar as f}from"./ChatAvatar-C3a_o5Hj.js";import{c as x,b}from"./chat-space-model-aW3Fd8_U.js";import"./SpriteAvatar-CpZWf54-.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";function E({channels:c,members:p,onPick:m,onClose:u}){const[n,h]=s.useState(""),[i,o]=s.useState(0),d=s.useRef(null);s.useEffect(()=>{d.current?.focus()},[]);const l=s.useMemo(()=>{const e=n.trim().toLowerCase(),a=[...c.map(t=>({kind:"channel",id:t.id,label:x(t.title)})),...p.map(t=>({kind:"member",id:t.actorId,label:b(t),member:t}))];return e?a.filter(t=>t.label.toLowerCase().includes(e)).slice(0,20):a.slice(0,20)},[c,p,n]);return s.useEffect(()=>{o(0)},[n]),r.jsx("div",{className:"chat-scrim",role:"presentation",onClick:e=>{e.target===e.currentTarget&&u()},children:r.jsxs("div",{className:"chat-palette",role:"dialog","aria-modal":"true","aria-label":"Jump to a channel or person",children:[r.jsx("input",{ref:d,value:n,placeholder:"Jump to a channel or person","aria-label":"Jump to a channel or person",onChange:e=>h(e.target.value),onKeyDown:e=>{if(e.key==="ArrowDown"){e.preventDefault(),o(a=>(a+1)%Math.max(1,l.length));return}if(e.key==="ArrowUp"){e.preventDefault(),o(a=>(a-1+l.length)%Math.max(1,l.length));return}if(e.key==="Enter"){e.preventDefault();const a=l[i];a&&m(a);return}e.key==="Escape"&&(e.preventDefault(),u())}}),r.jsx("div",{className:"chat-palette-list",role:"listbox",children:l.length===0?r.jsx("div",{className:"chat-palette-empty",children:"Nothing matches that."}):l.map((e,a)=>r.jsxs("button",{type:"button",role:"option","aria-selected":a===i,"data-active":a===i,className:"chat-palette-option",onMouseDown:t=>{t.preventDefault(),m(e)},children:[e.kind==="member"?r.jsx(f,{member:e.member,size:18}):r.jsx("span",{className:"chat-hash",children:"#"}),e.kind==="member"?e.label:e.label.replace(/^#/u,"")]},`${e.kind}:${e.id}`))})]})})}export{E as JumpPalette};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as e}from"./index-EsrkGBcv.js";/* empty css */import{a as re}from"./api-DSqpVKC7.js";import{J as te,aw as ae,ax as A,I as ie,ay as ce,az as de,aA as B,aB as oe,aC as J,aD as le,aE as he,aF as pe,P as ue}from"./router-DCtl8wqb.js";import{u as xe}from"./Provider-C35yu29I.js";import{c as P}from"./createLucideIcon-zZ8Hx7er.js";import{X as me}from"./x-DAehov0E.js";import{C as V}from"./check-lrJ3a73a.js";import{C as D}from"./copy-xKeM5ZtU.js";import{E as je}from"./external-link-CUObqmgX.js";import{L as fe}from"./loader-circle-OvccU82H.js";const ye=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],ve=P("file-braces",ye);const ge=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],U=P("message-square-text",ge);const ke=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],we=P("radio-tower",ke);function N({text:i,query:n}){return e.jsx(e.Fragment,{children:ue(i,n).map((h,c)=>h.match?e.jsx("mark",{children:h.text},c):e.jsx("span",{children:h.text},c))})}function X(i){return i.renderedText||i.summary||i.raw}function be({record:i,role:n,query:h,expanded:c,onToggle:w}){const j=t.useRef(null),[b,f]=t.useState(!1),u=X(i),y=t.useCallback(()=>{const d=j.current;!d||c||f(d.scrollHeight>d.clientHeight+1)},[c]);return t.useEffect(()=>{y();const d=j.current;if(!d||c||typeof ResizeObserver>"u")return;const v=new ResizeObserver(y);return v.observe(d),()=>v.disconnect()},[c,y,h,u]),e.jsxs("article",{className:`ks-excerpt-turn${i.matched?" ks-excerpt-turn--matched":""}`,children:[e.jsxs("header",{children:[e.jsx("span",{children:String(i.index).padStart(4,"0")}),e.jsx("strong",{children:n}),i.matched?e.jsx("em",{children:"match"}):null]}),e.jsx("p",{ref:j,className:c?"is-expanded":void 0,children:e.jsx(N,{text:u,query:h})}),b?e.jsx("button",{type:"button",className:"ks-excerpt-turn-expand","aria-expanded":c,onClick:w,children:c?"Collapse turn":"Show full turn"}):null]})}function G({navigate:i}={}){const{selectedKnowledgeHit:n,selectedKnowledgeQuery:h,clearKnowledgeHit:c,openFilePreview:w,navigate:j}=xe(),b=i??j,[f,u]=t.useState(null),[y,d]=t.useState(!1),[v,_]=t.useState(null),[W,I]=t.useState(!1),[C,M]=t.useState(!1),[Y,K]=t.useState({}),[Z,$]=t.useState({}),o=f&&f.hitId===n?.id?f.value:null,r=n?te(n):null,g=n?ae(n):null,F=n?A(n,"project"):"",L=n?A(n,"harness"):"",p=h.trim(),z=ie(r),T=ce(r),q=r?.path??g?.path,x=n?de(n):"",E=t.useMemo(()=>o?.records.filter(s=>s.matched).sort((s,l)=>{const a=B(s)-B(l);return a!==0?a:(l.matchCount??0)-(s.matchCount??0)}).at(0)??null,[o]),R=t.useMemo(()=>oe(o?.records??[],{contextRadius:4,maxTurns:6,centerRecordIndex:E?.index}),[o,E?.index]),O=t.useMemo(()=>{const s=R.flatMap(l=>l.kind==="turn"?[l.record.index]:l.records.map(a=>a.index));return s.length>0?[Math.min(...s),Math.max(...s)]:null},[R]),ee=o?.records.find(s=>s.matched)?.index??r?.recordRange?.[0];t.useEffect(()=>{K({}),$({}),M(!1),I(!1)},[n?.id]),t.useEffect(()=>{let s=!1;return(async()=>{if(u(null),_(null),!n||!r){d(!1);return}d(!0);try{const a=await re("/api/knowledge/source-preview",{method:"POST",body:JSON.stringify({sourceRef:r,contextRecords:4,maxRecords:80,q:p})});s||u({hitId:n.id,value:a})}catch(a){s||(u(null),_(a instanceof Error?a.message:String(a)))}finally{s||d(!1)}})(),()=>{s=!0}},[n?.id,r?.recordRange?.[0],r?.recordRange?.[1],p]);const se=t.useCallback(()=>{const s=r??g;s&&w(J(s.path))},[r,g,w]),H=t.useCallback(async()=>{if(x)try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(x);else if(typeof document<"u"){const s=document.createElement("textarea");s.value=x,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}M(!0),window.setTimeout(()=>M(!1),1600)}catch{}},[x]);return e.jsxs("div",{className:"ks-inspector",children:[v?e.jsx("div",{className:"ks-inspector-error",role:"alert",children:v}):null,e.jsx("section",{className:"ks-preview-panel","aria-label":"Selected search result preview",children:n?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"ks-preview-head",children:[e.jsxs("div",{children:[e.jsx("span",{className:"ks-panel-eyebrow",children:"Result"}),e.jsx("h2",{children:n.title})]}),e.jsx("button",{type:"button","aria-label":"Clear selected result",onClick:c,className:"ks-preview-close",children:e.jsx(me,{size:14,"aria-hidden":"true"})})]}),e.jsxs("div",{className:"ks-preview-meta",children:[F?e.jsx("span",{children:F}):null,L?e.jsx("span",{children:L}):null,n.freshness&&n.freshness!=="unknown"&&e.jsx("span",{children:n.freshness}),r?.recordRange?e.jsxs("span",{children:["records ",r.recordRange[0],"..",r.recordRange[1]]}):null]}),z||T||r||g||x?e.jsxs("div",{className:"ks-preview-actions","aria-label":"Selected result actions",children:[z?e.jsxs("button",{type:"button",className:"ks-action-primary",onClick:()=>b({view:"sessions",sessionId:z}),children:[e.jsx(U,{size:13,"aria-hidden":"true"}),"Open conversation"]}):null,T?e.jsxs("button",{type:"button",onClick:()=>b({view:"ops",mode:"tail",tailQuery:T}),children:[e.jsx(we,{size:13,"aria-hidden":"true"}),"Observe window"]}):null,x?e.jsxs("button",{type:"button",onClick:()=>{H()},children:[C?e.jsx(V,{size:13,"aria-hidden":"true"}):e.jsx(D,{size:13,"aria-hidden":"true"}),C?"Copied":"Copy ref"]}):null,r||g?e.jsxs("button",{type:"button",onClick:se,children:[e.jsx(je,{size:13,"aria-hidden":"true"}),"Open file"]}):null]}):null,e.jsxs("details",{className:"ks-why-matched",children:[e.jsxs("summary",{children:[e.jsx("span",{children:le(n,p,E)}),e.jsx("em",{children:he(n)})]}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Index signal"}),e.jsx("dd",{children:n.scoreSource||"fts"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Origin"}),e.jsxs("dd",{children:[n.origin," · ",n.ownership]})]}),r?.recordRange?e.jsxs("div",{children:[e.jsx("dt",{children:"Records"}),e.jsxs("dd",{children:[r.recordRange[0],"…",r.recordRange[1]]})]}):null]})]}),y?e.jsxs("div",{className:"ks-preview-loading",children:[e.jsx(fe,{size:15,className:"ks-spin","aria-hidden":"true"}),"Loading conversation…"]}):R.length>0?e.jsxs("section",{className:"ks-conversation-excerpt","aria-label":"Conversation excerpt",children:[e.jsxs("div",{className:"ks-rendered-head",children:[e.jsx(U,{size:14,"aria-hidden":"true"}),e.jsx("strong",{children:"Conversation"}),O?e.jsxs("span",{children:["records ",O[0],"…",O[1]]}):null]}),R.map((s,l)=>{if(s.kind==="folded"){const k=s.records[0]?.index??l,S=Y[k]===!0;return e.jsxs("div",{className:"ks-excerpt-fold",children:[e.jsxs("button",{type:"button",className:"ks-excerpt-fold-toggle","aria-expanded":S,onClick:()=>K(m=>({...m,[k]:!S})),children:[e.jsx("span",{"aria-hidden":"true",children:S?"▾":"▸"}),s.summary]}),S?e.jsx("div",{className:"ks-excerpt-fold-body",children:s.records.map(m=>e.jsxs("article",{className:"ks-excerpt-turn ks-excerpt-turn--muted",children:[e.jsxs("header",{children:[e.jsx("span",{children:String(m.index).padStart(4,"0")}),e.jsx("strong",{children:pe(m)})]}),e.jsx("p",{tabIndex:0,children:e.jsx(N,{text:X(m),query:p})})]},`fold-record:${m.index}`))}):null]},`fold:${k}`)}const{record:a,role:ne}=s,Q=Z[a.index]===!0;return e.jsx(be,{record:a,role:ne,query:p,expanded:Q,onToggle:()=>$(k=>({...k,[a.index]:!Q}))},`turn:${a.index}`)})]}):e.jsxs("section",{className:"ks-indexed-snippet","aria-label":"Match snippet",children:[e.jsx("span",{children:"Match"}),e.jsx("p",{children:e.jsx(N,{text:n.snippet,query:p})})]}),q?e.jsxs("div",{className:"ks-preview-source",children:[e.jsx("span",{children:"Source"}),e.jsx("code",{children:J(q)}),e.jsxs("button",{type:"button",onClick:()=>{H()},"aria-label":"Copy source reference",children:[C?e.jsx(V,{size:12,"aria-hidden":"true"}):e.jsx(D,{size:12,"aria-hidden":"true"}),C?"Copied":"Copy ref"]})]}):null,o?e.jsxs("details",{className:"ks-jsonl-window",open:W,onToggle:s=>I(s.target.open),children:[e.jsxs("summary",{className:"ks-jsonl-window-head",children:[e.jsx("strong",{children:"Raw evidence (advanced)"}),e.jsxs("span",{children:["records ",o.previewRange[0],"..",o.previewRange[1]]})]}),o.records.map(s=>e.jsxs("details",{className:`ks-jsonl-record${s.matched?" ks-jsonl-record--matched":""}`,open:s.index===ee,children:[e.jsxs("summary",{children:[e.jsx("span",{children:String(s.index).padStart(4,"0")}),e.jsx("strong",{children:s.kind||s.role||s.type||"record"}),e.jsx("em",{children:e.jsx(N,{text:s.summary||"no summary",query:p})})]}),e.jsx("pre",{children:s.raw})]},`${o.path}:${s.index}`))]}):null]}):e.jsxs("div",{className:"ks-inspector-empty",children:[e.jsx(ve,{size:18,"aria-hidden":"true"}),e.jsx("strong",{children:"Select a result"}),e.jsx("span",{children:"Pick a match to see the conversation moment, jump to the session, or open the file."}),e.jsxs("span",{className:"ks-inspector-empty-hint",children:["Use ",e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," to walk the list, ",e.jsx("kbd",{children:"↵"})," to pick, ",e.jsx("kbd",{children:"⌘↵"})," to open the session."]})]})})]})}const Ie=Object.freeze(Object.defineProperty({__proto__:null,KnowledgeSearchInspector:G},Symbol.toStringTag,{value:"Module"})),Ke=Object.freeze(Object.defineProperty({__proto__:null,KnowledgeSearchInspector:G},Symbol.toStringTag,{value:"Module"}));export{G as K,Ke as a,Ie as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,j as e}from"./index-EsrkGBcv.js";/* empty css */import{a as _}from"./api-DSqpVKC7.js";import{d as Pe}from"./time-Dhsh_2EG.js";import{u as We}from"./Provider-C35yu29I.js";import{x as $e,y as Se,z as Oe,A as _e,B as Ue,C as Ne,K as k,D as ze,E as Ae,F as Be,G as Ge,H as Je,I as be,J as we,L as Xe,M as Qe,N as Ve,O as Ye,P as Ze,Q as es}from"./router-DCtl8wqb.js";import{S as ss}from"./search-DT42oyRW.js";import{X as ts}from"./x-DAehov0E.js";import{L as ve}from"./loader-circle-OvccU82H.js";import{c as ns}from"./createLucideIcon-zZ8Hx7er.js";import{S as as}from"./sparkles-BjHq_DNK.js";import{C as is}from"./chevron-down-l1mrh5S9.js";import{C as rs}from"./clock-BV1aqPkK.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";const ls=[["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"}]],os=ns("funnel",ls);function cs(t){return!!t.query.trim()&&t.hasIndex&&t.filterKey!==t.settledFilterKey&&t.filterKey!==t.failedFilterKey}const us=5*6e4;function y(t){return $e(t).toString()}let ae={status:null,results:[],lastFilterKey:"",facets:null,indexedAt:null};function Ce(){return ae}function I(t){ae={...ae,...t}}const ds=220;function N(t){return new Intl.NumberFormat("en-US").format(t||0)}function hs({text:t,query:a}){return e.jsx(e.Fragment,{children:Ze(t,a).map((c,u)=>c.match?e.jsx("mark",{children:c.text},u):e.jsx("span",{children:c.text},u))})}function ms(t,a){t.target===t.currentTarget&&(t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),a()))}async function ps(){return _("/api/knowledge/status")}async function fs(t){const a=new URLSearchParams;for(const c of t)a.append("key",c);return a.set("limit","200"),_(`/api/knowledge/search-primitives?${a.toString()}`)}async function ne(t,a){const c=new URLSearchParams({q:t,limit:String(k.hitLimit)});if(a.sourceKinds.length>0)for(const m of a.sourceKinds)c.append("sourceKind",m);for(const m of a.harness)c.append("harness",m);for(const m of a.project)c.append("project",m);const u=Ye(a.timeWindow);return u!=null&&c.set("updatedAfterMs",String(u)),_(`/api/knowledge/search?${c.toString()}`)}async function Ke(t=!1){return _("/api/knowledge/sessions/index",{method:"POST",body:JSON.stringify({days:k.days,limit:k.sessionLimit,force:t})})}const ks=Be;function R({active:t,onClick:a,count:c,label:u,ariaLabel:m}){return e.jsxs("button",{type:"button",className:`ks-chip${t?" ks-chip--active":""}`,onClick:a,"aria-pressed":t,"aria-label":m??u,children:[e.jsx("span",{className:"ks-chip-label",children:u}),typeof c=="number"?e.jsx("span",{className:"ks-chip-count","aria-hidden":"true",children:N(c)}):null]})}function qe(t){return t&&t.split(/[\s_-]+/u).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function Ee(t,a,c=6){return t?t.filter(u=>u.key===a&&u.value.length>0).sort((u,m)=>m.count-u.count||u.value.localeCompare(m.value)).slice(0,c):[]}function Fe(t){return t.sourceKinds.length>0||t.harness.length>0||t.project.length>0||t.timeWindow!=="all"}function xs(t){const a=[];return t.sourceKinds.length>0&&a.push(t.sourceKinds.map(c=>Ae[c]??c).join(" + ")),t.harness.length>0&&a.push(t.harness.map(qe).join(" + ")),t.project.length>0&&a.push(t.project.join(" + ")),t.timeWindow!=="all"&&a.push(es(t.timeWindow)),a.length>0?`Filters: ${a.join(" · ")}`:""}function mt({navigate:t,mode:a,hitId:c,routeFilters:u}){const{selectedKnowledgeHit:m,inspectKnowledgeHit:b,clearKnowledgeHit:E}=We(),D=r.useMemo(()=>u||(typeof window>"u"?Se():Oe(window.location.search)),[u]),[g]=r.useState(()=>Ce()),[q,H]=r.useState(g.status),[ie,Le]=r.useState(g.facets),[i,U]=r.useState(D),[F,re]=r.useState(()=>g.lastFilterKey&&g.lastFilterKey===y(D)?g.results:[]),[z,B]=r.useState(!1),[le,oe]=r.useState(!1),[Te,ce]=r.useState(()=>g.lastFilterKey===y(D)?y(D):null),[G,M]=r.useState(null),J=r.useRef(0),[L,P]=r.useState(!1),[X,w]=r.useState(null),[Ie,W]=r.useState(g.status!==null),[ue,de]=r.useState(g.facets!==null),v=r.useRef(i);v.current=i;const f=(q?.chunks??0)>0,$=q?.activeJobs[0]??null,C=r.useMemo(()=>_e(F),[F]),he=L||!!$,K=i.query.trim(),Q=y(i),me=cs({query:K,hasIndex:f,filterKey:Q,settledFilterKey:Te,failedFilterKey:G}),V=!!K&&(me||z),Y=Ue(i);r.useEffect(()=>{u&&U(s=>Ne(s,u)?s:u)},[u]);const x=r.useMemo(()=>{const s=[];for(const n of C)s.push(...n.moments);return s},[C]),A=r.useCallback((s,n)=>{const l=y(s);if(l!==y(v.current))return;re(n.hits),ce(l),M(null),H(n.status),I({results:n.hits,status:n.status,lastFilterKey:y(s)});const o=(c?n.hits.find(d=>d.id===c):void 0)??n.hits[0];o?b(o,s.query,s):E()},[c,b,E]),Z=r.useCallback(async s=>{const n=++J.current,l=y(s),h=()=>n===J.current&&l===y(v.current),o=s.query.trim();if(!o){re([]),ce(l),M(null),B(!1),E();return}B(!0),M(null);try{w(null);const d=await ne(o,s);h()&&A(s,d)}catch(d){h()&&(M(l),w(d instanceof Error?d.message:String(d)))}finally{n===J.current&&B(!1)}},[A,E]),pe=r.useCallback(async(s=!1)=>{P(!0);try{w(null);const n=await Ke(s);H(n.status),W(!0),I({status:n.status,indexedAt:Date.now()});const l=v.current;n.status.chunks>0&&l.query.trim()&&A(l,await ne(l.query.trim(),l))}catch(n){w(n instanceof Error?n.message:String(n))}finally{P(!1)}},[A]);r.useEffect(()=>{let s=!1;return(async()=>{let n=null;try{const o=await ps();if(s)return;n=o,H(o),W(!0),I({status:o}),w(null)}catch{}if(s)return;const{indexedAt:l}=Ce();if(!(l!==null&&Date.now()-l<us&&(n?.chunks??0)>0)){P(!0);try{w(null);const o=await Ke(!1);if(s)return;H(o.status),W(!0),I({status:o.status,indexedAt:Date.now()});const d=v.current;o.status.chunks>0&&d.query.trim()&&A(d,await ne(d.query.trim(),d))}catch(o){s||(w(o instanceof Error?o.message:String(o)),W(!0))}finally{s||P(!1)}}})(),()=>{s=!0}},[A]),r.useEffect(()=>{if(!f||ue)return;let s=!1;return(async()=>{try{const n=await fs(["harness","project","sourceKind"]);s||(Le(n),de(!0),I({facets:n}))}catch{s||de(!0)}})(),()=>{s=!0}},[f,ue]),r.useEffect(()=>{if(!V){oe(!1);return}const s=window.setTimeout(()=>oe(!0),ds);return()=>window.clearTimeout(s)},[V]),r.useEffect(()=>{if(!f)return;const s=window.setTimeout(()=>{Z(i)},k.debounceMs);return()=>window.clearTimeout(s)},[i,f,Z]);const Re=s=>{if(s.preventDefault(),!f&&!L){pe(!1);return}Z(i)},S=r.useCallback(s=>{U(n=>{const l={...n,...s};return Ne(n,l)?n:(t({view:"search",...a?{mode:a}:{},filters:l},{replace:!0}),l)})},[a,t]),T=r.useCallback(()=>{const s=Se();U(s),t({view:"search",...a?{mode:a}:{},filters:s},{replace:!0})},[a,t]),De=r.useCallback(()=>{x[0]&&b(x[0],v.current.query)},[x,b]);r.useEffect(()=>{function s(n){const l=n.target,h=l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable);if(n.key==="/"&&!h){n.preventDefault();const o=document.querySelector(".ks-search-input");o?.focus(),o?.select()}else if(n.key==="Escape"&&!h)x.length>0?E():T();else if(!h&&(n.key==="j"||n.key==="k")){if(x.length===0)return;n.preventDefault();const o=m?x.findIndex(ee=>ee.id===m.id):-1,d=n.key==="j"?Math.min(x.length-1,o+1):Math.max(0,o-1),O=x[d];O&&b(O,v.current.query)}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[x,b,E,m,T]);const He=q?Pe(q.generatedAt)||"just now":"—",Me=he?$?`Indexing ${N($.progress.indexed??0)} of ${N($.progress.discovered??0)}`:f?`Refreshing last ${k.days} days in the background`:`Building last ${k.days} days of sessions`:f?`${N(q?.chunks??0)} moments · last ${k.days} days · updated ${He}`:Ie?"No index yet":"Loading index",fe=Ee(ie?.facets,"harness"),ke=Ee(ie?.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 ",k.days," days."]})]})}),e.jsxs("form",{className:"ks-search-form",onSubmit:Re,role:"search",children:[e.jsx(ss,{size:17,strokeWidth:1.75,"aria-hidden":"true"}),e.jsx("input",{value:i.query,onChange:s=>S({query:s.target.value}),placeholder:"Search topics, files, decisions, agents…",className:"ks-search-input",spellCheck:!1,autoFocus:!0,"aria-label":"Search OpenScout knowledge"}),i.query?e.jsx("button",{type:"button",className:"ks-search-clear",onClick:()=>S({query:""}),"aria-label":"Clear search",children:e.jsx(ts,{size:14,"aria-hidden":"true"})}):e.jsx("span",{className:"ks-search-hint","aria-hidden":"true",children:"/"}),le?e.jsx(ve,{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(os,{size:12,"aria-hidden":"true"}),"Source"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Source kind filters",children:ze.map(s=>e.jsx(R,{active:i.sourceKinds.includes(s),onClick:()=>S({sourceKinds:i.sourceKinds.includes(s)?i.sourceKinds.filter(n=>n!==s):[...i.sourceKinds,s]}),label:Ae[s]??s},s))})]}),fe.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(as,{size:12,"aria-hidden":"true"}),"Agent"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Harness filters",children:fe.map(s=>e.jsx(R,{active:i.harness.includes(s.value),onClick:()=>S({harness:i.harness.includes(s.value)?i.harness.filter(n=>n!==s.value):[...i.harness,s.value]}),label:qe(s.value),count:s.count},`harness:${s.value}`))})]}):null,ke.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(is,{size:12,"aria-hidden":"true"}),"Project"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Project filters",children:ke.map(s=>e.jsx(R,{active:i.project.includes(s.value),onClick:()=>S({project:i.project.includes(s.value)?i.project.filter(n=>n!==s.value):[...i.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(rs,{size:12,"aria-hidden":"true"}),"Time"]}),e.jsxs("div",{className:"ks-chip-row",role:"group","aria-label":"Time window filter",children:[e.jsx(R,{active:i.timeWindow==="all",onClick:()=>S({timeWindow:"all"}),label:"Any time"}),ks.map(s=>e.jsx(R,{active:i.timeWindow===s.value,onClick:()=>S({timeWindow:s.value}),label:s.label},s.value))]}),Fe(i)?e.jsx("button",{type:"button",className:"ks-clear-all",onClick:T,children:"Clear filters"}):null]})]}),X?e.jsx("section",{className:"ks-error",role:"alert",children:X}):null,!f&&!X?e.jsxs("div",{className:"ks-empty-state",children:[e.jsx("strong",{children:L?"Preparing your session index":"Preparing search"}),e.jsxs("span",{children:["First load builds the last ",k.days," days"," ","(up to ",N(k.sessionLimit)," sessions). You can keep this page open — results appear as soon as the index is ready."]})]}):null,f?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:G===Q?"Search failed":V?"Searching…":K?`${N(C.length)} session${C.length===1?"":"s"}`:"Ready"}),K&&F.length>0?e.jsxs("span",{className:"ks-hit-list-meta",children:[N(F.length)," moment",F.length===1?"":"s",Y?e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"ks-text-action",onClick:T,children:"Clear filters"})]}):null]}):null]}),le&&C.length===0?e.jsx("div",{className:"ks-skeleton","aria-hidden":"true",children:[0,1,2].map(s=>e.jsxs("section",{className:"ks-skeleton-session",children:[e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--meta"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--goal"}),e.jsxs("div",{className:"ks-skeleton-moments",children:[e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--title"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--snippet"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--snippet-short"})]})]},s))}):null,K&&C.length===0&&!me&&!z&&G!==Q?e.jsxs("div",{className:"ks-empty-hit",children:[e.jsxs("strong",{children:["No matches for “",K,"”"]}),e.jsxs("span",{children:["Try a project name, file path, or topic from recent work",Y?", 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:()=>S({query:""}),children:"Clear query"}),Y?e.jsx("button",{type:"button",className:"ks-text-action",onClick:T,children:"Clear all filters"}):null]})]}):null,K?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:De,disabled:F.length===0,children:"Pick the first result automatically"})]}),e.jsx("div",{className:"ks-hit-list-body","aria-busy":z,children:C.map((s,n)=>{const l=s.best,h=Ge(l),o=Je(l),d=be(we(l)),O=()=>{d&&t({view:"sessions",sessionId:d})},ee=s.moments.some(j=>m?.id===j.id);return e.jsxs("section",{className:`ks-session${ee?" ks-session--selected":""}`,"aria-label":`Session ${n+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:[h.agent?e.jsx("span",{className:"ks-hit-chip",children:h.agent}):null,h.project?e.jsx("span",{children:h.project}):null,h.session?e.jsxs("span",{className:"ks-hit-session",title:d??h.session,children:["session ",h.session]}):null,e.jsxs("span",{className:"ks-session-count",children:[N(s.moments.length)," match",s.moments.length===1?"":"es"]})]}),h.when?e.jsx("time",{className:"ks-hit-when",children:h.when}):null]}),e.jsx("button",{type:"button",className:"ks-session-goal",onClick:O,title:d?"Open session":void 0,children:o})]}),e.jsx("div",{className:"ks-session-moments",children:s.moments.map(j=>{const xe=Xe(j,i.query),je=m?.id===j.id,se=Qe(j,i.query,200),ye=Ve(j),te=()=>b(j,i.query),ge=()=>{const p=be(we(j))??d;if(!p){te();return}t({view:"sessions",sessionId:p})};return e.jsx("article",{className:`ks-hit${je?" ks-hit--selected":""}`,role:"option","aria-selected":je,tabIndex:0,onClick:te,onDoubleClick:ge,onKeyDown:p=>{if(p.key==="Enter"&&(p.metaKey||p.ctrlKey)){p.preventDefault(),ge();return}ms(p,te)},children:e.jsxs("div",{className:"ks-hit-body",children:[ye.length>0?e.jsx("div",{className:"ks-hit-details ks-hit-details--moment","aria-label":"Turn",children:ye.map(p=>e.jsx("span",{className:"ks-hit-details-strong",children:p},p))}):null,e.jsx("h3",{className:"ks-hit-title",children:xe}),se&&se!==xe?e.jsx("p",{className:"ks-hit-snippet",children:e.jsx(hs,{text:se,query:i.query})}):null]})},j.id)})})]},s.collectionId)})})]}):null]}),e.jsx("footer",{className:"ks-foot-status","aria-live":"polite",children:e.jsxs("div",{className:"ks-foot-status-shell",children:[e.jsxs("span",{className:"ks-foot-status-facts",children:[he?e.jsx(ve,{size:12,className:"ks-spin","aria-hidden":"true"}):null,Me,Fe(i)?e.jsxs(e.Fragment,{children:[" · ",xs(i)]}):null]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>{pe(!0)},disabled:L,children:L?"Updating…":"Update index"})]})})]})}export{mt as KnowledgeSearchScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as T}from"./index-EsrkGBcv.js";import{r as j}from"./index-724SdE6r.js";import{b as D,l as N}from"./lane-tool-detail-Czggx8oM.js";import"./lane-edit-display-BjdT9oZl.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,j as t}from"./index-EsrkGBcv.js";import{S as L}from"./SlidePanel-_CHAQdOa.js";import{A as j}from"./AgentAvatar-CrP1eXxk.js";import{H as S}from"./HarnessMark-C4naWc16.js";import{t as N}from"./time-Dhsh_2EG.js";import{o as g,f as k,a as y}from"./lane-observe-CteDwdD-.js";import{S as A}from"./SessionObserve-DXxBvejJ.js";import{LaneTraceEventFocus as E}from"./LaneTraceEventFocus-TbrNHRj_.js";import{b as T}from"./agent-lane-detail-Ti3trpfH.js";import{l as I,a as z}from"./agent-lanes-model-DMAdqCmK.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-CJa110yk.js";import"./lane-ask-display-BTVSakyo.js";import"./mentions-ByUvhS-v.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./SessionHopMenu-E6VJZrE0.js";import"./external-link-CUObqmgX.js";import"./ObservedTopologyPanel-CUTIoLZJ.js";import"./ObserveTextFlow-PFnG_10h.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./SessionObserveEvidence-Cuj_KHxR.js";import"./SessionContextStrip-CXfs9hUD.js";import"./message-circle-CxRVKNE-.js";import"./wrench-DR0i5BU7.js";import"./context-budget-8qFKqM-j.js";const M={think:"Thought",tool:"Tool",ask:"Request",message:"Message",note:"Note",system:"System",boot:"Boot"};function re({target:d,onClose:n}){const{lane:i,event:e}=d,{agent:o,observe:p,source:r,lastActiveAt:a}=i,l=f.useMemo(()=>T(i),[i]),c=I(o,r),v=z(o,r),h=M[e.kind]??e.kind,u=p?.metadata?.session?.sessionStart,s=g(e,u),b=s!=null?k(s,a):void 0,x=s!=null?y(s):void 0,m=e.kind==="tool"||e.kind==="ask"?e:void 0;return t.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:[t.jsxs("div",{className:"s-slide-header s-lane-trace-sheet-header",children:[t.jsx(j,{agent:o,placement:"row",size:28,presence:!1,className:"s-agent-lane-avatar"}),t.jsxs("div",{className:"s-lane-trace-sheet-header-copy",children:[t.jsx("div",{className:"s-lane-trace-sheet-title",children:c}),t.jsxs("div",{className:"s-lane-trace-sheet-sub",children:[v," · ",h,a?` · ${N(a)}`:""]})]}),t.jsx("span",{className:"s-slide-spacer"}),t.jsx(S,{harness:o.harness??l.harness,size:18,className:"s-lane-trace-sheet-hmark"}),t.jsx("button",{type:"button",className:"s-slide-close",onClick:n,"aria-label":"Close",children:"×"})]}),t.jsx("div",{className:"s-slide-body s-lane-trace-sheet-body",children:t.jsx(A,{data:p??void 0,agentId:r==="scout"?o.id:void 0,sessionId:o.harnessSessionId??l.sessionId,showRail:!0,variant:"default",initialCursorT:e.t,focusEventId:e.id,inlineFocusEventId:m?.id,inlineFocusContent:m?t.jsx(E,{event:m,wallLabel:b,wallTitle:x,variant:"inline"}):void 0})})]})}export{re as LaneTraceDetailSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as o}from"./index-EsrkGBcv.js";import{i as x,l as h}from"./lane-edit-display-BjdT9oZl.js";import{b as p}from"./lane-ask-display-BTVSakyo.js";import{f as m,b as j}from"./lane-tool-detail-Czggx8oM.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 +0,0 @@
|
|
|
1
|
-
import{r as u,j as s}from"./index-EsrkGBcv.js";import{C as pe}from"./Canvas-X9pVSkw3.js";import{u as ne,t as oe,a as D,b as ue,c as fe,d as xe,e as ye,f as we}from"./mesh-view-store-DZvJC4KU.js";import{NodeMenu as ge,nodeMenuRowProps as be}from"./NodeMenu-B-jjHf1c.js";import{c as ve,b as Ne}from"./machine-children-DxcqCLmd.js";import{u as je,s as Ce,r as Me}from"./use-mesh-node-state-BvaqtODo.js";import{n as T}from"./agent-state-DDhnFEEP.js";import{s as z}from"./colors-CFlbwC25.js";import{t as Z}from"./time-Dhsh_2EG.js";import{u as Ie}from"./Provider-C35yu29I.js";import{u as He}from"./useAgentHoverCard-BANmpjMh.js";import"./index-724SdE6r.js";import"./api-DSqpVKC7.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";function $e(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:d,cx:o,cy:f}=t,p=(i-o)/e.scale-e.pan.x,y=(d-f)/e.scale-e.pan.y;return{scale:n,pan:{x:(i-o)/n-p,y:(d-f)/n-y}}}return e}const re="openscout.mesh.canvas.viewport.v1";function Se(){const e={pan:{x:0,y:0},scale:1};if(typeof window>"u")return e;try{const t=window.sessionStorage.getItem(re);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 ke(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 Ee(e){const t=new Map;for(const n of e){const{key:i,label:d}=ke(n);let o=t.get(i);o||(o={key:i,label:d,instances:[]},t.set(i,o)),o.instances.push(n)}return Array.from(t.values()).map(n=>(n.instances.sort((i,d)=>i.id.localeCompare(d.id)),n)).sort((n,i)=>{const d=n.label.localeCompare(i.label);return d!==0?d:i.instances.length-n.instances.length})}function Ae(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 _e(e,t){return Math.max(1,Math.round(Math.sqrt(e*t)))}function Ye(e,t,n){if(e.length===0)return[];const i=e.map(h=>{const I=h.instances.length,r=_e(I,Math.max(.6,Math.min(n,2))),H=Math.ceil(I/r),C=r*t.stepX-(t.stepX-t.instanceW),E=H*t.stepY-(t.stepY-t.instanceH);return{cluster:h,cols:r,width:C+t.clusterPadX*2,height:E+t.clusterPadY*2+t.labelH}}),d=i.reduce((h,I)=>h+I.width*I.height,0),o=Math.max(Math.max(...i.map(h=>h.width)),Math.sqrt(d*n)),f=t.clusterGap,p=[];let y=0,M=0,g=0;for(const h of i)y>0&&y+h.width>o&&(M+=g+f,y=0,g=0),p.push({cluster:h.cluster,x:y,y:M,width:h.width,height:h.height,cols:h.cols}),y+=h.width+f,g=Math.max(g,h.height);const b=Math.min(...p.map(h=>h.x)),l=Math.max(...p.map(h=>h.x+h.width)),v=Math.min(...p.map(h=>h.y)),j=Math.max(...p.map(h=>h.y+h.height)),c=-((b+l)/2),x=-((v+j)/2);return p.map(h=>({...h,x:h.x+c,y:h.y+x}))}function Pe(e,t,n){const i=e%t,d=Math.floor(e/t);return{x:n.clusterPadX+i*n.stepX,y:n.labelH+n.clusterPadY+d*n.stepY}}function ee(e){const t=e.harness?.trim(),n=e.model?.trim();return t&&n?`${t}/${n}`:t||n||"—"}function se(e){const t=e.project?.trim(),n=e.branch?.trim();return t&&n?`${t}/${n}`:t||n||"—"}function B(e){return e.cwd||e.projectRoot||"—"}function te({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 Oe({agent:e,onOpen:t,bindings:n,active:i}){const d=T(e.state),o=e.agentClass==="organic",f=e.updatedAt?Z(e.updatedAt):"",p=ee(e),y=se(e);return s.jsxs("div",{...n??{},className:`mesh-instance-spec mesh-instance-spec--${d}${o?" mesh-instance-spec--organic":""}${i?" mesh-instance--active":""}`,style:{"--state-stripe":z(e.state)},title:`${p} — ${y}`,children:[s.jsxs("span",{className:"mesh-instance-spec-row",children:[s.jsx("span",{className:"mesh-instance-spec-primary",children:p}),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:y}),s.jsx(te,{onClick:t})]})]})}function Xe({agent:e,onOpen:t,bindings:n,active:i}){const d=T(e.state),o=e.agentClass==="organic",f=e.updatedAt?Z(e.updatedAt):"—",p=`${ee(e)} · ${se(e)}`;return s.jsxs("div",{...n??{},className:`mesh-instance-sheet mesh-instance-sheet--${d}${o?" mesh-instance-sheet--organic":""}${i?" mesh-instance--active":""}`,style:{"--state-stripe":z(e.state)},title:`${p}
|
|
2
|
-
${B(e)}`,children:[s.jsxs("span",{className:"mesh-sheet-line mesh-sheet-line--head",children:[s.jsx("span",{className:"mesh-sheet-id",children:p}),s.jsx("span",{className:"mesh-sheet-time",children:f}),s.jsx(te,{onClick:t})]}),s.jsxs("span",{className:"mesh-sheet-line",children:[s.jsx("span",{className:"mesh-sheet-path",children:B(e)}),s.jsxs("span",{className:"mesh-sheet-ctx",children:[s.jsx("span",{className:"mesh-sheet-ctx-label",children:"CTX"})," —"]})]})]})}function Le({agent:e,onOpen:t,bindings:n,active:i}){const d=T(e.state),o=e.agentClass==="organic",f=e.updatedAt?Z(e.updatedAt):"—",p=`${ee(e)} · ${se(e)}`,y=e.agentClass?.trim();return s.jsxs("div",{...n??{},className:`mesh-instance-sheet mesh-instance-sheet--spacious mesh-instance-sheet--${d}${o?" mesh-instance-sheet--organic":""}${i?" mesh-instance--active":""}`,style:{"--state-stripe":z(e.state)},title:`${p}
|
|
3
|
-
${B(e)}`,children:[s.jsxs("span",{className:"mesh-sheet-line mesh-sheet-line--head",children:[s.jsx("span",{className:"mesh-sheet-id",children:p}),s.jsx("span",{className:"mesh-sheet-time",children:f}),s.jsx(te,{onClick:t})]}),s.jsx("span",{className:"mesh-sheet-line",children:s.jsx("span",{className:"mesh-sheet-path",children:B(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"})," —"]}),y&&s.jsx("span",{className:"mesh-sheet-tag",children:y})]})]})}function Re({layout:e,metrics:t,onAgentOpen:n,bindFor:i,activeId:d}){const{cluster:o,x:f,y:p,width:y,height:M,cols:g}=e,b=u.useMemo(()=>{const l={working:0,ready:0,notReady:0};for(const v of o.instances){const j=T(v.state);j==="in_turn"||j==="in_flight"?l.working+=1:j==="callable"?l.ready+=1:l.notReady+=1}return l},[o.instances]);return s.jsxs("div",{className:"mesh-cluster",style:{position:"absolute",left:f,top:p,width:y,height:M},children:[s.jsxs("div",{className:"mesh-cluster-header",style:{height:t.labelH},children:[s.jsx("span",{className:"mesh-cluster-name",children:o.label}),s.jsx("span",{className:"mesh-cluster-count",children:o.instances.length}),s.jsxs("span",{className:"mesh-cluster-states",children:[b.working>0&&s.jsxs("span",{className:"mesh-cluster-state mesh-cluster-state--working",children:[s.jsx("span",{className:"mesh-cluster-state-dot"}),b.working]}),b.ready>0&&s.jsxs("span",{className:"mesh-cluster-state mesh-cluster-state--available",children:[s.jsx("span",{className:"mesh-cluster-state-dot"}),b.ready]}),b.notReady>0&&s.jsxs("span",{className:"mesh-cluster-state mesh-cluster-state--offline",children:[s.jsx("span",{className:"mesh-cluster-state-dot"}),b.notReady]})]})]}),o.instances.map((l,v)=>{const j=Pe(v,g,t);return s.jsx("div",{style:{position:"absolute",left:j.x,top:j.y,width:t.instanceW,height:t.instanceH},children:t.density==="compact"?s.jsx(Oe,{agent:l,onOpen:()=>n(l),bindings:i(l.id),active:d===l.id}):t.density==="spacious"?s.jsx(Le,{agent:l,onOpen:()=>n(l),bindings:i(l.id),active:d===l.id}):s.jsx(Xe,{agent:l,onOpen:()=>n(l),bindings:i(l.id),active:d===l.id})},l.id)})]})}const Q=34,le=22,Te=6,ae=28,ie=10,F=12,ce=380,Ge=240,J=38;function We(e,t,n,i,d,o){const f=[],p=[],y=[];for(const c of e)i[c.machineId]?y.push(c):p.push(c);let M=0,g=ce;const b=(c,x)=>{const I=t.has(c.machineId)||!c.online,r=n.has(c.machineId);let H=0,C=0,E=0;for(const R of c.agents){const k=T(R.state);k==="in_turn"||k==="in_flight"?H+=1:k==="callable"?C+=1:E+=1}const G=c.online?H>0?"working":C>0?"available":"offline":"offline";if(I)return{machineId:c.machineId,machineLabel:c.machineLabel,reachability:c.reachability,online:c.online,agentCount:c.agents.length,workingCount:H,availableCount:C,offlineCount:E,dominantState:G,host:c.host,collapsed:!1,ghost:!0,pinned:x,x:0,y:0,width:Ge,height:J,headerHeight:J,chromeHeight:J,layouts:[]};const Y=r?[]:Ee(c.agents),S=r?[]:Ye(Y,d,o),V=r?Ve():0,A=r?he+V*le+Te:0,P=Q+A;let O=0,X=0;if(!r&&S.length>0){const R=Math.min(...S.map(m=>m.x)),k=Math.max(...S.map(m=>m.x+m.width)),_=Math.min(...S.map(m=>m.y)),K=Math.max(...S.map(m=>m.y+m.height));O=k-R,X=K-_;const U=-R+F,a=-_+P+ie;for(const m of S)m.x+=U,m.y+=a}const L=Math.max(ce,O+F*2),q=r?P:P+ie+X+F+(c.kind==="this"?0:64);return{machineId:c.machineId,machineLabel:c.machineLabel,reachability:c.reachability,online:c.online,agentCount:c.agents.length,workingCount:H,availableCount:C,offlineCount:E,dominantState:G,host:c.host,collapsed:r,ghost:!1,pinned:x,x:0,y:0,width:L,height:q,headerHeight:Q,chromeHeight:P,layouts:S}};for(const c of p){const x=b(c,!1);x.x=0,x.y=M,f.push(x),g=Math.max(g,x.width),M+=x.height+ae}const l=Math.max(0,M-ae),v=-g/2,j=-l/2;for(const c of f)c.ghost||(c.width=g),c.x=v,c.y+=j;for(const c of y){const x=b(c,!0),h=i[c.machineId];x.x=h.x,x.y=h.y,f.push(x)}return f}function De({section:e,metrics:t,onAgentOpen:n,bindFor:i,activeId:d,anyHidden:o,machineIds:f,onHeaderPointerDown:p,onHeaderClick:y,onGhostActivate:M}){const g=u.useRef(null),b=je(e.machineId),l=b?.view??null,v=Ce(l),j=s.jsx(ge,{ref:g,machineLabel:e.machineLabel,className:"mesh-machine-menu-btn",actions:Ne({machineId:e.machineId,machineLabel:e.machineLabel,nodeId:l?.node?.id??null,brokerUrl:l?.node?.brokerUrl??null,hidden:e.ghost,anyHidden:o,positioned:e.pinned,canCopy:typeof navigator<"u"&&!!navigator.clipboard,checking:b?.loading??!1,on:{select:r=>D(r,"node"),refresh:r=>{Me(r)},focus:r=>{we(r,f),D(r,"node")},toggleHidden:r=>oe(r),showAll:()=>ye(),clearPosition:r=>xe(r),copy:r=>{navigator.clipboard?.writeText(r)}}})}),c=be(g),x=e.reachability==="this"?"this node":e.reachability==="peer"?"peer":e.reachability==="tailnet"?"tailnet":"",h=l?v.label.toLowerCase():e.online?"not checked":"unreachable";if(e.ghost)return s.jsxs("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} · ${h} — click to show`,...c,children:[j,s.jsxs("button",{type:"button",className:"mesh-machine-ghost-body",onPointerDown:r=>p(r,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:h}),x&&s.jsx("span",{className:`mesh-machine-chip mesh-machine-chip--${e.reachability} mesh-machine-chip--ghost`,children:x}),s.jsxs("span",{className:"mesh-machine-ghost-counts",children:[s.jsx("span",{className:"mesh-machine-count",children:e.reachability==="this"?e.agentCount:l?.workload?.total??"—"}),e.workingCount>0&&s.jsxs("span",{className:"mesh-machine-count mesh-machine-count--working",children:[e.workingCount,"W"]})]})]})]});const I=e.collapsed?Be(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"},...c,children:[j,s.jsxs("button",{type:"button",className:"mesh-machine-header",style:{height:e.headerHeight},onPointerDown:r=>p(r,e),onClick:()=>y(e.machineId),"aria-expanded":!e.collapsed,children:[s.jsx("span",{className:`mesh-machine-led mesh-machine-led--${e.dominantState}`,style:{color:z(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}),x&&s.jsx("span",{className:`mesh-machine-chip mesh-machine-chip--${e.reachability}`,children:x}),s.jsx("span",{className:`mesh-machine-reach mesh-node-reach--${v.tone}`,title:v.detail??v.label,children:v.label})]}),e.collapsed&&s.jsxs("div",{className:"mesh-machine-spec",children:[s.jsxs("div",{className:"mesh-machine-state-strip",style:{height:he},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.reachability==="this"?e.workingCount:l?.workload?.working??"—"}),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.reachability==="this"?e.availableCount:l?.workload?.available??"—"}),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.reachability==="this"?e.agentCount:l?.workload?.total??"—"}),s.jsx("span",{className:"mesh-machine-state-label",children:"total"})]})]}),I.map(r=>s.jsxs("div",{className:"mesh-machine-spec-row",style:{height:le},children:[s.jsx("span",{className:"mesh-machine-spec-label",children:r.label}),s.jsx("span",{className:"mesh-machine-spec-value",title:r.value,children:r.value})]},r.label))]}),!e.collapsed&&e.reachability!=="this"&&s.jsx("button",{type:"button",className:"mesh-machine-detail-link",onClick:()=>D(e.machineId,"node"),children:l?.workload?`${l.workload.total} registered here${l.stale?" · last known":""} — view agents and activity`:"View this node’s agents and activity"}),!e.collapsed&&e.layouts.map(r=>s.jsx(Re,{layout:r,metrics:t,onAgentOpen:n,bindFor:i,activeId:d},r.cluster.key))]})}function Be(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 ze=7,he=54;function Ve(e,t,n,i){return ze}function Js({mesh:e,agents:t=[]}){const n=u.useRef(null),[i,d]=u.useState({w:0,h:0}),[o,f]=u.useReducer($e,void 0,Se);u.useEffect(()=>{if(!(typeof window>"u"))try{window.sessionStorage.setItem(re,JSON.stringify({pan:o.pan,scale:o.scale}))}catch{}},[o.pan,o.scale]);const{density:p,query:y,agentStateFilters:M,hiddenMachineIds:g,collapsedMachineIds:b,scrollTargetMachineId:l}=ne(),{navigate:v}=Ie();u.useLayoutEffect(()=>{const a=n.current;if(!a)return;const m=()=>d({w:a.clientWidth,h:a.clientHeight});m();const N=new ResizeObserver(m);return N.observe(a),()=>N.disconnect()},[]),u.useLayoutEffect(()=>{const a=n.current;if(!a)return;const m=N=>{N.preventDefault();const w=N.deltaY<0?1.12:1/1.12,$=a.getBoundingClientRect();f({type:"zoom",factor:w,mx:N.clientX-$.left,my:N.clientY-$.top,cx:$.width/2,cy:$.height/2})};return a.addEventListener("wheel",m,{passive:!1}),()=>a.removeEventListener("wheel",m)},[]);const{machinePositions:j}=ne(),c=u.useMemo(()=>Ae(p),[p]),x=u.useMemo(()=>{const a=y.trim().toLowerCase();return t.filter(m=>{const w=T(m.state);return M.has(w)?a?`${m.name??""} ${m.handle??""} ${m.harness??""} ${m.project??""} ${m.branch??""}`.toLowerCase().includes(a):!0:!1})},[t,y,M]),h=u.useMemo(()=>ve(x,e),[x,e]),I=i.w>0&&i.h>0?i.w/i.h:1.6,r=u.useMemo(()=>We(h,g,b,j,c,I),[h,g,b,j,c,I]),H=u.useRef(null),[C,E]=u.useState(null),G=u.useCallback((a,m)=>{if(a.button!==0)return;a.stopPropagation(),a.currentTarget.setPointerCapture(a.pointerId),H.current={machineId:m.machineId,startClientX:a.clientX,startClientY:a.clientY,startSectionX:m.x,startSectionY:m.y,pointerId:a.pointerId,moved:!1}},[]);u.useEffect(()=>{const a=N=>{const w=H.current;if(!w||N.pointerId!==w.pointerId)return;const $=N.clientX-w.startClientX,W=N.clientY-w.startClientY;if(!w.moved&&Math.hypot($,W)<4)return;w.moved=!0;const me=$/o.scale,de=W/o.scale;E({machineId:w.machineId,x:w.startSectionX+me,y:w.startSectionY+de})},m=N=>{const w=H.current;if(!(!w||N.pointerId!==w.pointerId)){if(H.current=null,w.moved){const $=(N.clientX-w.startClientX)/o.scale,W=(N.clientY-w.startClientY)/o.scale;fe(w.machineId,{x:w.startSectionX+$,y:w.startSectionY+W})}E(null)}};return window.addEventListener("pointermove",a),window.addEventListener("pointerup",m),window.addEventListener("pointercancel",m),()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m)}},[o.scale]);const Y=u.useRef(!1);u.useEffect(()=>{if(C)Y.current=!0;else{const a=setTimeout(()=>{Y.current=!1},50);return()=>clearTimeout(a)}},[C]);const S=u.useCallback(a=>{Y.current||oe(a)},[]),V=u.useCallback(a=>{Y.current||(D(a,"node"),ue(a))},[]),A=u.useMemo(()=>C?r.map(a=>a.machineId===C.machineId?{...a,x:C.x,y:C.y,pinned:!0}:a):r,[r,C]);u.useEffect(()=>{if(!l)return;const a=A.find(m=>m.machineId===l);a&&f({type:"pan",delta:{x:-a.x-o.pan.x-a.width/2,y:-a.y-o.pan.y+i.h/4-Q}})},[l,A,o.pan.x,o.pan.y,i.h]);const P=u.useCallback(a=>{a.agentClass!=="organic"&&v({view:"agents-v2",agentId:a.id})},[v]),O=u.useMemo(()=>x.filter(a=>a.agentClass!=="organic"),[x]),X=u.useMemo(()=>O.map(a=>a.id),[O]),L=He({agents:O,orderedIds:X,navigate:v,selectMode:"preview"}),q=u.useCallback(a=>X.includes(a)?L.bind(a):null,[L,X]),R=L.activeAgent?.id??null,{pan:k,scale:_}=o,K=i.w/2,U=i.h/2;return s.jsxs("div",{ref:n,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},children:[i.w>0&&s.jsx(pe,{panOffset:k,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(${K}px, ${U}px) translate(${k.x*_}px, ${k.y*_}px) scale(${_})`,transformOrigin:"0 0",pointerEvents:"none"},children:A.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"})}):A.map(a=>s.jsx(De,{section:a,metrics:c,onAgentOpen:P,bindFor:q,activeId:R,anyHidden:g.size>0,machineIds:A.map(m=>m.machineId),onHeaderPointerDown:G,onHeaderClick:V,onGhostActivate:S},a.machineId))}),s.jsx("div",{className:"mesh-canvas-hint",children:"scroll to zoom · drag to pan"}),L.card]})}export{Js as MeshCanvas};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.mesh-rail{display:flex;flex-direction:column;height:100%;min-height:0;padding:var(--space-sm);background:transparent;font-family:var(--font-mono)}.mesh-rail-head,.mesh-rail-foot{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-sm);background:linear-gradient(180deg,color-mix(in srgb,var(--ink) 7%,transparent),color-mix(in srgb,var(--ink) 1%,transparent));border:1px solid color-mix(in srgb,var(--border) 70%,transparent);border-bottom:0;border-radius:var(--radius-sm) var(--radius-sm) 0 0;box-shadow:inset 0 1px color-mix(in srgb,var(--ink) 6%,transparent)}.mesh-rail-foot{border-top:0;border-bottom:1px solid color-mix(in srgb,var(--border) 70%,transparent);border-radius:0 0 var(--radius-sm) var(--radius-sm);justify-content:space-between;padding:var(--space-2xs) var(--space-sm);box-shadow:inset 0 -1px color-mix(in srgb,var(--ink) 6%,transparent),0 4px 12px -8px #0006}.mesh-rail-ear{flex:0 0 auto;width:4px;height:12px;border-radius:1px;background:radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--ink) 18%,transparent) 0%,transparent 70%),color-mix(in srgb,var(--ink) 10%,transparent);box-shadow:inset 0 1px color-mix(in srgb,var(--ink) 14%,transparent),inset 0 -1px color-mix(in srgb,var(--border) 60%,transparent)}.mesh-rail-title{font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-xl);color:color-mix(in srgb,var(--ink) 78%,transparent)}.mesh-rail-title-count{margin-left:auto;padding:1px var(--space-xs);border-radius:var(--radius-sm);background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--muted);font-size:var(--text-2xs);font-weight:700}.mesh-rail-mode{display:inline-flex;align-items:stretch;border:1px solid color-mix(in srgb,var(--border) 50%,transparent);border-radius:var(--radius-sm);overflow:hidden}.mesh-rail-mode-btn{padding:var(--space-3xs) var(--space-sm);border:0;background:transparent;font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-xl);text-transform:uppercase;color:color-mix(in srgb,var(--ink) 45%,transparent);cursor:pointer;transition:background .12s,color .12s}.mesh-rail-mode-btn+.mesh-rail-mode-btn{border-left:1px solid color-mix(in srgb,var(--border) 50%,transparent)}.mesh-rail-mode-btn:hover{color:var(--ink);background:color-mix(in srgb,var(--ink) 4%,transparent)}.mesh-rail-mode-btn--active{color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}.mesh-rail-body--map{background:transparent;border-left:1px solid color-mix(in srgb,var(--border) 35%,transparent);border-right:1px solid color-mix(in srgb,var(--border) 35%,transparent);padding:var(--space-sm)}.mesh-mini-map{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:var(--space-2xs)}.mesh-mini-node{display:inline-flex;align-items:center;gap:var(--space-2xs);padding:var(--space-2xs) var(--space-xs);border:1px solid color-mix(in srgb,var(--border) 45%,transparent);border-radius:var(--radius-sm);background:color-mix(in srgb,var(--surface) 65%,transparent);cursor:pointer;font-family:var(--font-mono);font-size:var(--text-2xs);color:var(--ink);text-align:left;min-width:0;transition:background .12s,border-color .12s}.mesh-mini-node:hover{border-color:color-mix(in srgb,var(--accent) 35%,transparent);background:color-mix(in srgb,var(--accent) 6%,transparent)}.mesh-mini-node--active{border-color:color-mix(in srgb,var(--accent) 50%,transparent);background:color-mix(in srgb,var(--accent) 14%,transparent)}.mesh-mini-node--off{opacity:.55}.mesh-mini-led{flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:color-mix(in srgb,var(--ink) 25%,transparent)}.mesh-mini-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mesh-mini-count{flex:0 0 auto;color:color-mix(in srgb,var(--ink) 55%,transparent);font-variant-numeric:tabular-nums}.mesh-rail-body{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:repeating-linear-gradient(0deg,color-mix(in srgb,var(--ink) 5%,transparent) 0px,color-mix(in srgb,var(--ink) 5%,transparent) 1px,transparent 1px,transparent 3px);border-left:1px solid color-mix(in srgb,var(--border) 70%,transparent);border-right:1px solid color-mix(in srgb,var(--border) 70%,transparent)}.mesh-rail-unit{position:relative;display:flex;align-items:stretch;background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 70%,transparent),color-mix(in srgb,var(--bg) 78%,transparent));border-bottom:1px solid color-mix(in srgb,var(--border) 55%,transparent);box-shadow:inset 0 1px color-mix(in srgb,var(--ink) 4%,transparent),inset 0 -1px color-mix(in srgb,var(--ink) 10%,transparent)}.mesh-rail-unit:last-child{border-bottom:0}.mesh-rail-unit-body{flex:1 1 auto;display:flex;align-items:center;gap:var(--space-sm);min-width:0;padding:var(--space-sm) var(--space-md) var(--space-sm);border:0;background:transparent;cursor:pointer;text-align:left;font-family:inherit;color:inherit;transition:background .12s}.mesh-rail-unit-body:hover{background:color-mix(in srgb,var(--accent) 6%,transparent)}.mesh-rail-unit-body:focus-visible{outline:1px solid color-mix(in srgb,var(--accent) 70%,transparent);outline-offset:-1px}.mesh-rail-unit--off .mesh-rail-unit-body{background:linear-gradient(180deg,color-mix(in srgb,var(--bg) 70%,transparent),color-mix(in srgb,var(--bg) 84%,transparent));filter:saturate(.4)}.mesh-rail-unit--off .mesh-rail-unit-name{color:color-mix(in srgb,var(--ink) 38%,transparent)}.mesh-rail-unit--unreachable .mesh-rail-unit-stamp{color:color-mix(in srgb,var(--amber) 80%,transparent)}.mesh-rail-unit--active{box-shadow:inset 2px 0 0 0 var(--accent)}.mesh-rail-unit--active .mesh-rail-unit-name{color:var(--accent)}.mesh-rail-slot{flex:0 0 auto;font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-md);color:color-mix(in srgb,var(--ink) 32%,transparent);width:16px}.mesh-rail-led{flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:color-mix(in srgb,var(--ink) 14%,transparent);box-shadow:inset 0 1px color-mix(in srgb,var(--ink) 12%,transparent),inset 0 -1px color-mix(in srgb,var(--border) 80%,transparent)}.mesh-rail-led--on{box-shadow:inset 0 1px color-mix(in srgb,var(--ink) 24%,transparent),0 0 6px 0 currentColor,0 0 14px -2px currentColor}.mesh-rail-unit-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:var(--space-3xs)}.mesh-rail-unit-name{font-size:var(--text-sm);font-weight:600;color:var(--ink);letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mesh-rail-unit-sub{display:inline-flex;align-items:center;gap:var(--space-xs);font-size:var(--text-2xs);color:color-mix(in srgb,var(--ink) 45%,transparent)}.mesh-rail-reach{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;border-radius:var(--radius-xs);font-size:var(--text-3xs);font-weight:800;background:color-mix(in srgb,var(--ink) 8%,transparent);border:1px solid color-mix(in srgb,var(--border) 70%,transparent);color:var(--muted)}.mesh-rail-reach--this{background:color-mix(in srgb,var(--accent) 18%,transparent);border-color:color-mix(in srgb,var(--accent) 45%,transparent);color:var(--accent)}.mesh-rail-reach--peer{background:color-mix(in srgb,var(--green, #4ade80) 14%,transparent);border-color:color-mix(in srgb,var(--green, #4ade80) 32%,transparent);color:var(--green, #4ade80)}.mesh-rail-reach--tailnet{background:color-mix(in srgb,var(--amber) 16%,transparent);border-color:color-mix(in srgb,var(--amber) 40%,transparent);color:var(--amber)}.mesh-rail-unit-stamp{font-variant-numeric:tabular-nums}.mesh-rail-unit-count{flex:0 0 auto;font-size:var(--text-xs);font-weight:600;color:color-mix(in srgb,var(--ink) 55%,transparent);font-variant-numeric:tabular-nums}.mesh-rail-unit-actions{flex:0 0 auto;display:flex;align-items:center;gap:var(--space-2xs);padding-right:var(--space-sm)}.mesh-rail-unit-eye{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--border) 60%,transparent);background:color-mix(in srgb,var(--ink) 4%,transparent);color:color-mix(in srgb,var(--ink) 60%,transparent);font-size:var(--text-2xs);cursor:pointer;border-radius:var(--radius-xs);transition:background .12s,color .12s,border-color .12s}.mesh-rail-unit-eye:hover{background:color-mix(in srgb,var(--accent) 14%,transparent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);color:var(--accent)}.mesh-rail-unit-eye--off{color:color-mix(in srgb,var(--ink) 30%,transparent)}.mesh-rail-vent{position:absolute;right:0;top:50%;transform:translateY(-50%);width:5px;height:60%;background:repeating-linear-gradient(0deg,color-mix(in srgb,var(--ink) 14%,transparent) 0px,color-mix(in srgb,var(--ink) 14%,transparent) 1px,transparent 1px,transparent 3px);pointer-events:none;opacity:.45}.mesh-rail-foot-mark{flex:0 0 auto;width:4px;height:10px;border-radius:1px;background:color-mix(in srgb,var(--ink) 10%,transparent);box-shadow:inset 0 1px color-mix(in srgb,var(--ink) 12%,transparent)}.mesh-rail-foot-meta{font-size:var(--text-2xs);font-weight:600;letter-spacing:var(--tracking-xl);text-transform:uppercase;color:color-mix(in srgb,var(--ink) 45%,transparent)}.mesh-rail-foot-reset{padding:var(--space-3xs) var(--space-xs);border:1px solid color-mix(in srgb,var(--border) 70%,transparent);background:transparent;color:var(--muted);font-family:var(--font-mono);font-size:var(--text-3xs);font-weight:700;letter-spacing:var(--tracking-xl);text-transform:uppercase;cursor:pointer;border-radius:var(--radius-xs)}.mesh-rail-foot-reset:hover{background:color-mix(in srgb,var(--accent) 12%,transparent);border-color:color-mix(in srgb,var(--accent) 40%,transparent);color:var(--accent)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as g,j as e}from"./index-EsrkGBcv.js";import{u as I,g as S,t as k,a as b,r as B}from"./mesh-view-store-DZvJC4KU.js";import{u as L}from"./Provider-C35yu29I.js";import{a as N,e as P}from"./agent-state-DDhnFEEP.js";import{a as v}from"./use-mesh-node-state-BvaqtODo.js";import{c as R,m as y}from"./machine-children-DxcqCLmd.js";import{s as w}from"./colors-CFlbwC25.js";function D(){const[i,m]=g.useState("rack"),{agents:c}=L(),{meshSnapshot:t,selectedId:h,selectedType:a,hiddenMachineIds:s,machinePositions:r}=I(),n=g.useMemo(()=>t?R(c,t):[],[c,t]);if(!t||n.length===0)return null;const u=n.filter(p=>!s.has(p.machineId)).length,l=n.length,d=Object.keys(r).length,o=p=>{b(p,"node"),B(p)};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:()=>m("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:()=>m("rack"),"aria-pressed":i==="rack",children:"rack"})]}),e.jsx("span",{className:"mesh-rail-title-count",children:l}),e.jsx("span",{className:"mesh-rail-ear","aria-hidden":!0})]}),i==="rack"?e.jsx(A,{buckets:n,hiddenMachineIds:s,selectedId:h,selectedType:a,onFocus:o}):e.jsx(F,{buckets:n,selectedId:h,selectedType:a,onFocus:o}),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"?`${l} machines`:`${u}/${l} shown`}),d>0&&i==="rack"?e.jsx("button",{type:"button",className:"mesh-rail-foot-reset",onClick:()=>S(),title:"Reset machine layout",children:"reset"}):e.jsx("span",{className:"mesh-rail-foot-mark","aria-hidden":!0})]})]})}function A({buckets:i,hiddenMachineIds:m,selectedId:c,selectedType:t,onFocus:h}){const{entries:a}=v();return e.jsx("div",{className:"mesh-rail-body",children:i.map((s,r)=>{const n=m.has(s.machineId),u=c===s.machineId&&t==="node",l=s.agents.filter(x=>N(x.state)).length;s.agents.filter(x=>P(x.state)).length;const d=s.online?s.agents.length===0?"offline":l>0?"working":"available":"offline",o=n||!s.online?void 0:w(d),p=s.reachability==="this"?"L":s.reachability==="peer"?"P":s.reachability==="tailnet"?"T":"·",M=String(r+1).padStart(2,"0"),f=a[s.machineId],j=f?.view??null,C=y(s,j,f?.loading??!1),$=s.kind==="this"?s.agents.length:j?.workload?.total??"—";return e.jsxs("div",{className:["mesh-rail-unit",n&&"mesh-rail-unit--off",!s.online&&"mesh-rail-unit--unreachable",u&&"mesh-rail-unit--active"].filter(Boolean).join(" "),children:[e.jsxs("button",{type:"button",className:"mesh-rail-unit-body",onClick:()=>h(s.machineId),title:`Focus ${s.machineLabel} on the map`,children:[e.jsx("span",{className:"mesh-rail-slot",children:M}),e.jsx("span",{className:`mesh-rail-led${n||!s.online?"":" mesh-rail-led--on"}`,style:o?{background:o,color:o}:void 0,"aria-hidden":!0}),e.jsxs("span",{className:"mesh-rail-unit-text",children:[e.jsx("span",{className:"mesh-rail-unit-name",title:s.machineLabel,children:s.machineLabel}),e.jsxs("span",{className:"mesh-rail-unit-sub",children:[e.jsx("span",{className:`mesh-rail-reach mesh-rail-reach--${s.reachability}`,children:p}),e.jsx("span",{className:"mesh-rail-unit-stamp",children:C})]})]}),e.jsx("span",{className:"mesh-rail-unit-count",children:$})]}),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:x=>{x.stopPropagation(),k(s.machineId)},title:n?"Show in workspace":"Hide from workspace","aria-pressed":!n,children:n?"○":"●"})}),e.jsx("span",{className:"mesh-rail-vent","aria-hidden":!0})]},s.machineId)})})}function F({buckets:i,selectedId:m,selectedType:c,onFocus:t}){const{entries:h}=v();return e.jsx("div",{className:"mesh-rail-body mesh-rail-body--map",children:e.jsx("div",{className:"mesh-mini-map",children:i.map(a=>{const s=h[a.machineId],r=a.kind==="this"?a.agents.length:s?.view?.workload?.total,n=m===a.machineId&&c==="node",u=a.agents.filter(o=>N(o.state)).length,l=a.online?a.agents.length===0?"offline":u>0?"working":"available":"offline",d=a.online?w(l):void 0;return e.jsxs("button",{type:"button",className:`mesh-mini-node mesh-mini-node--${l}${n?" mesh-mini-node--active":""}${a.online?"":" mesh-mini-node--off"}`,onClick:()=>t(a.machineId),title:`${a.machineLabel} — ${y(a,s?.view??null,s?.loading??!1)}`,children:[e.jsx("span",{className:"mesh-mini-led",style:d?{background:d}:void 0,"aria-hidden":!0}),e.jsx("span",{className:"mesh-mini-label",children:a.machineLabel}),r!==void 0&&r>0&&e.jsx("span",{className:"mesh-mini-count",children:r})]},a.machineId)})})})}export{D as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as e}from"./index-EsrkGBcv.js";import{a as z}from"./api-DSqpVKC7.js";import{b as E}from"./use-mesh-node-state-BvaqtODo.js";import{t as A}from"./time-Dhsh_2EG.js";import{n as _,b as F,c as H}from"./agent-state-DDhnFEEP.js";import{b as K}from"./machine-scope-DJt9RZ2w.js";import{u as q,g as U}from"./Provider-C35yu29I.js";import{d as V}from"./router-DCtl8wqb.js";import{MeshCanvas as Q}from"./MeshCanvas-DWZHYh1A.js";import{s as J}from"./colors-CFlbwC25.js";import{u as W}from"./useAgentHoverCard-BANmpjMh.js";import{u as X}from"./local-agents-BqnoxJrq.js";import{u as Y,a as Z,s as G,h as T,i as R,j as ee,k as L}from"./mesh-view-store-DZvJC4KU.js";import{u as se}from"./useContentSecondaryNav-C6OBu-3_.js";import{OpsSubnav as te}from"./OpsSubnav-BOOYShHE.js";/* empty css *//* empty css */import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./Canvas-X9pVSkw3.js";import"./NodeMenu-B-jjHf1c.js";import"./machine-children-DxcqCLmd.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./SecondaryNav-D7dbV2qo.js";import"./secondaryNavConfig-CS1svh6n.js";import"./nav-destinations-uorRqFxf.js";import"./message-square-BxesYglW.js";import"./compass-63TUaz5_.js";import"./settings-BVh7kldq.js";import"./git-branch-B0_fPLO7.js";import"./scroll-text-DNjxhyO2.js";/* empty css */function ne(c){const p=new Map,f=new Map;for(const a of c){const o=a.project??"Unassigned",i=o.toLowerCase(),h=a.branch??"—";let r=p.get(i);r||(r=new Map,p.set(i,r));const u=r.get(h)??[];u.push(a),r.set(h,u);let s=f.get(i);s||(s=new Map,f.set(i,s)),s.set(o,(s.get(o)??0)+1)}const g=a=>{const o=f.get(a);if(!o)return a;let i=null,h=-1;for(const[r,u]of o)u>h&&(i=r,h=u);return i??a},j=[];for(const[a,o]of p){const i=g(a),h=[];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((d,x)=>(x.updatedAt??0)-(d.updatedAt??0)),y=t.reduce((d,x)=>Math.max(d,x.updatedAt??0),0);r=Math.max(r,y);for(const d of t)u[_(d.state)]+=1,s.push(d);h.push({branch:l,agents:t,latest:y})}h.sort((l,n)=>n.latest-l.latest),j.push({project:i,branches:h,agents:s,latest:r,counts:u})}return j.sort((a,o)=>o.latest-a.latest),j}function P(c){return c?c.replace(/^\/Users\/[^/]+/,"~"):null}function ae({agents:c,emptyTitle:p="No agents registered",emptyBody:f="Agents connected to this broker will appear here.",selectMode:g="preview"}){const{navigate:j}=q(),a=m.useMemo(()=>ne(c),[c]),[o,i]=m.useState(()=>new Set),h=m.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=W({agents:c,orderedIds:h,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:f})]});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),d=F(t.state),x=t.agentClass==="organic",k=r.getState(t.id),M=P(t.cwd)??P(t.projectRoot),C=t.harnessSessionId?t.harnessSessionId.slice(0,8):null,b=[];M&&b.push({kind:"cwd",text:M}),t.harness&&b.push({kind:"harness",text:t.harness}),t.model&&b.push({kind:"model",text:t.model}),C&&b.push({kind:"sess",text:`sess:${C}`});const $=r.bind(t.id);return e.jsxs("button",{type:"button",className:`mesh-tree-agent${x?" mesh-tree-agent--organic":""}${k.isActive?" mesh-tree-agent--active":""}${k.isPinned?" mesh-tree-agent--pinned":""}`,title:x?`${t.harness??t.name} · organic session`:void 0,...$,children:[e.jsx("span",{className:`mesh-tree-agent-dot mesh-tree-agent-dot--${d}`,style:{background:J(t.state)}}),e.jsx("span",{className:"mesh-tree-agent-name",children:t.handle??t.name}),x&&e.jsx("span",{className:"mesh-tree-agent-organic","aria-label":"organic session",children:"○"}),e.jsx("span",{className:"mesh-tree-agent-inline",children:b.map((S,I)=>e.jsxs("span",{className:`mesh-tree-agent-inline-part mesh-tree-agent-inline-part--${S.kind}`,children:[I>0&&e.jsx("span",{className:"mesh-tree-agent-inline-sep",children:"·"}),S.text]},S.kind))}),e.jsx("span",{className:`mesh-tree-agent-state mesh-tree-agent-state--${d}`,children:H(y)}),e.jsx("span",{className:"mesh-tree-agent-time",children:t.updatedAt?A(t.updatedAt):""})]},t.id)})})]},n.branch))})]},s.project)}),r.card]})}function O({mode:c,density:p,query:f,stateFilter:g,loading:j,refreshing:a,error:o,lastLoadedAt:i,hasMesh:h,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:()=>T("map"),children:"Map"}),e.jsx("button",{type:"button",className:`mesh-mode-btn${c==="tree"?" mesh-mode-btn--active":""}`,onClick:()=>T("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:()=>R("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:()=>R("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:()=>R("spacious"),disabled:c!=="map",title:"Spacious — cards",children:"Spacious"})]})]}),h&&e.jsxs("div",{className:"mesh-hud-filters",children:[e.jsx("input",{type:"search",className:"mesh-hud-search",placeholder:"Filter agents…",value:f,onChange:u=>ee(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&&h?`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 Cs({navigate:c}){const[p,f]=m.useState(!0),[g,j]=m.useState(!1),[a,o]=m.useState(null),[i,h]=m.useState(null),{mode:r,density:u,query:s,stateFilter:l,meshSnapshot:n}=Y(),{agents:t}=X(),{route:y}=q(),d=V(y),x=m.useMemo(()=>U(t),[t]),k=m.useMemo(()=>K(x,d,n?.localNode?.id),[x,d,n?.localNode?.id]),M=m.useRef(null),C=m.useRef(0);m.useEffect(()=>{M.current=n},[n]),m.useEffect(()=>{d&&Z(d,"node")},[d]);const b=m.useCallback(async(v="initial")=>{const N=++C.current;!(M.current!==null)&&v!=="background"?(f(!0),o(null)):j(!0);try{const w=await z("/api/mesh");if(N!==C.current)return;G(w),o(null),h(Date.now())}catch(w){if(N!==C.current)return;o(w instanceof Error?w.message:String(w))}finally{N===C.current&&(f(!1),j(!1))}},[]);m.useEffect(()=>{b("initial")},[b]),m.useEffect(()=>{const v=setInterval(()=>{b("background")},1e4);return()=>clearInterval(v)},[b]),m.useEffect(()=>{E();const v=setInterval(()=>{E()},15e3);return()=>clearInterval(v)},[]);const $=m.useMemo(()=>{const v=s.trim().toLowerCase();return k.filter(N=>l!=="all"&&_(N.state)!==l?!1:v?`${N.name??""} ${N.handle??""} ${N.harness??""} ${N.project??""} ${N.branch??""}`.toLowerCase().includes(v):!0)},[s,k,l]),S={mode:r,density:u,query:s,stateFilter:l,loading:p,refreshing:g,error:a,lastLoadedAt:i,hasMesh:!!n,onRefresh:()=>{b("manual")}},I=r==="map"?e.jsxs("div",{className:"mesh-map-canvas",children:[n&&e.jsx(Q,{mesh:n,agents:$}),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:()=>{b("manual")},children:"Try again"})]}),e.jsx(O,{...S})]}):e.jsxs("div",{className:"mesh-tree-page",children:[e.jsx(O,{...S}),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:()=>{b("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(ae,{agents:$,emptyTitle:k.length===0?d?"No agents on this machine":"No agents registered":"No agents match your filter",emptyBody:k.length===0?"Agents connected to this broker will appear here.":"Try clearing the search or switching the state pill back to All."})]})]}),B=se();return e.jsxs("div",{className:"s-ops",children:[B?e.jsx("div",{className:"s-ops-header",children:e.jsx(te,{activeRoute:y,navigate:c})}):null,e.jsx("div",{className:"s-ops-body",children:I})]})}export{Cs as MeshScreen};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/arc.es-C1SQHJ3k.js","assets/index-EsrkGBcv.js","assets/index-CN4rBB_s.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as g,j as d,_ as j}from"./index-EsrkGBcv.js";const E=g.lazy(()=>j(()=>import("./arc.es-C1SQHJ3k.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 +0,0 @@
|
|
|
1
|
-
import{j as a,r as b}from"./index-EsrkGBcv.js";const N=/\.(?:apng|avif|gif|jpe?g|png|svg|webp)(?:$|[?#])/iu,x=/\bhttps?:\/\/[^\s<>"')\]]+/giu;function o(e){if(typeof e!="string")return null;try{const t=new URL(e.trim());return t.protocol==="http:"||t.protocol==="https:"?t.toString():null}catch{return null}}function i(e,t){const n=e?.[t];return typeof n=="string"&&n.trim()?n.trim():null}function j(e){return e.mediaType.toLowerCase().startsWith("image/")}function y(e){return N.test(e)}function U(e){try{const t=new URL(e),n=[t.pathname==="/"?"":t.pathname,t.search].join("").trim();return{host:t.hostname.replace(/^www\./iu,""),detail:n||t.hostname}}catch{return{host:e,detail:e}}}function E(e){const t=new Set,n=[];for(const r of e.matchAll(x)){const l=r[0]?.replace(/[.,;:!?]+$/u,""),m=o(l);!m||t.has(m)||(t.add(m),n.push(m))}return n}const T=/^\/api\/blobs\/[^/]+$/u;function g(e){try{const t=new URL(e);return T.test(t.pathname)?`${t.pathname}${t.search}`:e}catch{return e}}function u(e){return o(e.url)??o(i(e.metadata,"url"))??o(i(e.metadata,"href"))}function k(e){const t=e.metadata??null,n=i(t,"kind")??i(t,"type"),r=u(e);if(!r||n!=="link_preview"&&n!=="link-preview"&&e.mediaType!=="text/x-uri")return null;const l=U(r);return{id:e.id,url:r,title:i(t,"title")??l.host,description:i(t,"description"),imageUrl:o(i(t,"imageUrl")??i(t,"image")),siteName:i(t,"siteName")??l.host}}function w({src:e,alt:t}){const[n,r]=b.useState(!1);return n?a.jsxs("a",{className:"s-message-embed s-message-embed--file",href:e,target:"_blank",rel:"noreferrer",children:[a.jsx("span",{className:"s-message-embed-title",children:t}),a.jsx("span",{className:"s-message-embed-description",children:"Preview unavailable"})]}):a.jsx("a",{className:"s-message-embed s-message-embed--image",href:e,target:"_blank",rel:"noreferrer",children:a.jsx("img",{src:e,alt:t,loading:"lazy",decoding:"async",onError:()=>r(!0)})})}function A({preview:e}){return a.jsxs("a",{className:"s-message-embed s-message-embed--link",href:e.url,target:"_blank",rel:"noreferrer",children:[e.imageUrl&&a.jsx("span",{className:"s-message-embed-thumb",children:a.jsx("img",{src:e.imageUrl,alt:"",loading:"lazy",decoding:"async"})}),a.jsxs("span",{className:"s-message-embed-copy",children:[e.siteName&&a.jsx("span",{className:"s-message-embed-site",children:e.siteName}),a.jsx("span",{className:"s-message-embed-title",children:e.title}),e.description&&a.jsx("span",{className:"s-message-embed-description",children:e.description})]})]})}function L({message:e}){const t=e.attachments??[],n=new Set,r=[],l=[];for(const s of t){const c=u(s);if(c&&j(s)){n.add(s.id),r.push({id:s.id,src:g(c),alt:s.fileName??"Image attachment"});continue}const d=k(s);d&&(n.add(s.id),l.push(d))}const m=new Set(l.map(s=>s.url)),f=new Set(t.map(u).filter(s=>!!s));for(const s of E(e.body))f.has(s)||m.has(s)||y(s)&&r.push({id:s,src:g(s),alt:"Embedded image"});const p=t.filter(s=>!n.has(s.id));return r.length===0&&l.length===0&&p.length===0?null:a.jsxs("div",{className:"s-message-embeds",children:[r.map(s=>a.jsx(w,{src:s.src,alt:s.alt},s.id)),l.slice(0,1).map(s=>a.jsx(A,{preview:s},s.id)),p.map(s=>{const c=u(s),d=c?g(c):null,h=s.fileName??i(s.metadata,"title")??s.mediaType;return d?a.jsxs("a",{className:"s-message-embed s-message-embed--file",href:d,target:"_blank",rel:"noreferrer",children:[a.jsx("span",{className:"s-message-embed-title",children:h}),a.jsx("span",{className:"s-message-embed-description",children:s.mediaType})]},s.id):a.jsxs("div",{className:"s-message-embed s-message-embed--file",children:[a.jsx("span",{className:"s-message-embed-title",children:h}),a.jsx("span",{className:"s-message-embed-description",children:s.mediaType})]},s.id)})]})}export{L as M,g as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as c}from"./index-EsrkGBcv.js";import{a as w,c as b}from"./conversations-DoAAO6kA.js";import{m as M,c as A}from"./machine-scope-DJt9RZ2w.js";import{u as B,f as L}from"./use-fleet-active-asks-CymmXWH4.js";import{u as I,g as R,d as E}from"./router-DCtl8wqb.js";import{l as D,i as F,s as T}from"./sessionRead-CvFz2RHv.js";import{u as $}from"./use-conversation-list-CY4JciOV.js";import{u as C}from"./Provider-C35yu29I.js";import{AgentMasterScreen as O}from"./AgentMasterScreen-EJhmuKgl.js";import{CommsDeck as P}from"./CommsDeck-BVmSMV2V.js";import{ConversationScreen as S}from"./ConversationScreen-CUfsQ4MR.js";import{u as V,a as Y}from"./use-beside-DoRC1nt0.js";/* empty css */import{P as z}from"./plus-DFDDeGKu.js";import"./time-Dhsh_2EG.js";import"./api-DSqpVKC7.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./AgentAvatar-CrP1eXxk.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./sessions-view-Dc-QAa7O.js";import"./message-visibility-DwxgcgYK.js";import"./CommsFlowGraph-DxoOaLF_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-THp0r_U8.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Vi8ziCPg.js";import"./CommsSelection-BUoRbu9o.js";/* empty css */import"./agent-master-model-Bk_yuUXJ.js";import"./panel-right-Bv7sP_fc.js";import"./arrow-up-right-BPedAgxO.js";import"./ComposerAttachments-DW0AIb8k.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./operator-attention-DBaRg5ep.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-ksPazAKH.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-C-ZWscKj.js";import"./BackToPicker-CUkjnoVk.js";import"./AstronautSuit-Cchnc4Ug.js";import"./ConversationComposer-CUQyArlk.js";import"./zap-CEjZNZbI.js";import"./ConversationFeedRows-DWiOfT-y.js";import"./ConversationPanels-D9oC0xG5.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./activity-CIlFrfPJ.js";import"./message-circle-CxRVKNE-.js";import"./tail-events-d0yAYxR0.js";import"./ConversationStatus--IPm2nGh.js";import"./check-lrJ3a73a.js";import"./sparkles-BjHq_DNK.js";import"./triangle-alert-CHoRGdVO.js";import"./SessionContextStrip-CXfs9hUD.js";function _t({conversationId:s,agentId:l,threadId:x,machineId:m,navigate:r}){const t=V(),d=Y(r,m);let n;return l?n=e.jsx(O,{agentId:l,threadId:x,machineId:m,navigate:r}):s?n=e.jsx(U,{conversationId:s,navigate:r,beside:t}):n=e.jsx(_,{}),e.jsxs("div",{className:"amv",children:[e.jsx("section",{className:"amv-main",children:n}),e.jsx(P,{ids:t.ids,onClose:t.remove,onStage:o=>{d(o),t.remove(o)},renderConversation:o=>e.jsx(S,{conversationId:o,navigate:r,embedded:!0,showBackNav:!1},o)})]})}function U({conversationId:s,navigate:l,beside:x}){const{agents:m}=C(),r=I(),t=c.useMemo(()=>R(r.state),[r.state]),d=c.useMemo(()=>!t||t.view!=="messages"||!t.agentId?void 0:`Back to ${m.find(o=>o.id===t.agentId)?.name??t.agentId.split(".")[0]??t.agentId}`,[t,m]);return e.jsx(S,{conversationId:s,navigate:l,showBackNav:!!t,backLabel:d,beside:x},s)}function _(){const{onlineCount:s,apiConnection:l,reload:x,route:m,agents:r,openContextCapture:t,navigate:d}=C(),{sessions:n,loading:o,loadError:a}=$(),[h]=c.useState(()=>D()),g=B(),i=l.status==="offline",u=E(m),j=c.useRef(!1),N=c.useMemo(()=>{const y=M(r,u);return[...A(n,y,u)].sort((k,p)=>(p.lastMessageAt??0)-(k.lastMessageAt??0))},[n,r,u]),v=c.useMemo(()=>{const y=N.filter(p=>!w(p));return y.find(p=>L(g,p)?.status==="needs_attention"&&F(p.lastMessageAt,p.id,h))??y[0]},[N,g,h]);c.useEffect(()=>{j.current||o||a||i||v&&(j.current=!0,T(v.id),d({view:"messages",conversationId:v.id,...u?{machineId:u}:{}},{replace:!0}))},[v,o,a,i,u,d]);const f=!i&&!a&&(o||!!v);return e.jsx("div",{className:`s-conv-empty${i?" s-conv-empty--offline":""}`,children:e.jsxs("div",{className:"s-conv-empty-inner",children:[e.jsx(G,{}),e.jsx("div",{className:"s-conv-empty-eyebrow",children:i?"Connection":"Conversations"}),e.jsx("p",{className:"s-conv-empty-title",children:i?"Scout server offline":f?"Opening your latest conversation":a?"Chats unavailable":"Nothing open yet"}),e.jsx("p",{className:"s-conv-empty-detail",children:i?"Start or restart Scout services. Chats and context will appear when the server responds.":f?q(v):a||"Start a chat by choosing an agent and sending the first message."}),i||a?e.jsx("button",{type:"button",className:"s-conv-empty-action",onClick:()=>{x()},children:"Retry connection"}):f?null:e.jsxs("button",{type:"button",className:"s-conv-empty-new",onClick:()=>t(),children:[e.jsx(z,{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"}),i?"waiting for server":`${s} ${s===1?"agent":"agents"} active`]})]})})}function q(s){return s?b(s):"Finding where you left off."}function G(){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{_t as MessagesScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as h,j as s}from"./index-EsrkGBcv.js";import{H as A}from"./HarnessMark-C4naWc16.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-8qFKqM-j.js";import{s as b}from"./page-status-BswZLqvA.js";import{t as T}from"./time-Dhsh_2EG.js";import{b as y,a as B,l as O}from"./agent-lane-detail-Ti3trpfH.js";import{b as _}from"./agent-lane-preview-Dpa3DuOn.js";import{m as F}from"./mission-wall-CAo4BKfa.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-BTVSakyo.js";import"./mission-control-model-BpJHDV5D.js";import"./colors-CFlbwC25.js";import"./agent-state-DDhnFEEP.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 os({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{os as MissionContextRail};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as a}from"./index-EsrkGBcv.js";import{s as Ae}from"./send-to-agent-session-DoKCDBJ4.js";/* empty css */import{a as de}from"./api-DSqpVKC7.js";import{u as Se,e as Me,f as Ee,m as je,M as ke,b as Ne,t as z,g as A,d as me}from"./mission-control-store-elEEsIvb.js";import{u as Le}from"./observe-BJqERJVj.js";import{h as Te}from"./NewChatComposer-C97-iTMK.js";import{i as Ce,c as Fe}from"./keyboard-nav-DDHegDbx.js";import{f as Oe}from"./tail-display-DHSNmvor.js";import{u as Pe}from"./tail-events-d0yAYxR0.js";import{u as De}from"./Provider-C35yu29I.js";import{MissionContextRail as _e}from"./MissionContextRail-D62-Wis8.js";import{FocusOverlay as We}from"./MissionFocusOverlay-C1zys3Jv.js";import{MissionLogPane as $e}from"./MissionLogPane-B19lYSY9.js";import{o as Ke}from"./agent-lanes-model-DMAdqCmK.js";import{a as Ve,A as qe}from"./mission-control-model-BpJHDV5D.js";import{b as He,s as Be,f as Qe,c as ze,n as Ue,d as Ge,m as Ye,W as Je}from"./mission-wall-CAo4BKfa.js";import"./agent-state-DDhnFEEP.js";import"./surface-activity-B1rgWB1i.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./lane-edit-display-BjdT9oZl.js";import"./index-BWHgHrtv.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./bash-format-BRV5C6Gv.js";import"./context-budget-8qFKqM-j.js";import"./page-status-BswZLqvA.js";import"./agent-lane-detail-Ti3trpfH.js";import"./lane-observe-CteDwdD-.js";import"./agent-lane-preview-Dpa3DuOn.js";import"./lane-ask-display-BTVSakyo.js";function Xe(t,o,i,p){if(o<=0)return-1;const v=o-1,k=Math.max(1,Math.floor(i));if(t<0||t>v)return p==="left"||p==="up"||p==="last"?v:0;switch(p){case"first":return 0;case"last":return v;case"left":return Math.max(0,t-1);case"right":return Math.min(v,t+1);case"up":{const h=t-k;return h>=0?h:t}case"down":{const h=t+k;return h<=v?h:v}}}function Ze(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"Home":return"first";case"G":case"End":return"last";default:return null}}const $=4e3,et=250,tt=3e4,st=1800;function nt(t,o){return t.map(i=>({id:i.id,name:i.name,handle:i.handle,state:i.state,project:i.project,branch:i.branch,harness:i.harness,model:i.model,sessionIds:o.get(i.id)??[]}))}function rt(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 it(t){return t.agentClass==="native-session"||t.id.startsWith("native:")}function fe(t,o){if(t.agent){const i=o.find(p=>p.id===t.agent.id);if(i)return i}return rt(t)}function at(t,o){const i=o.find(p=>p.sessionId?.trim()===t.sessionId);return i||{source:t.source,transcriptPath:t.logPath??"",sessionId:t.sessionId,cwd:t.cwd,project:t.project,harness:t.attribution,mtimeMs:t.lastActiveAt,size:0}}function ot(t,o,i){return t.live?"active":t.lastActiveAt>0&&o-t.lastActiveAt<=i?"recent":"idle"}function ys({navigate:t,agents:o}){const i=Se(),{openFilePreview:p}=De(),{activityFilter:v,sourceFilter:k,activityWindowMs:h,groupMode:U,query:G,focusedId:F,revealRequest:y}=i,[Y,J]=n.useState([]),[O,pe]=n.useState(null),[g,he]=n.useState(()=>Date.now()),N=Le(o),P=n.useRef([]);Pe(e=>{P.current.push(e)}),n.useEffect(()=>{const e=setInterval(()=>{if(P.current.length===0)return;const s=P.current;P.current=[],J(r=>{const c=new Set(r.map(d=>d.id)),I=s.filter(d=>!d.id||!c.has(d.id));if(I.length===0)return r;const u=r.concat(I);return u.length>$?u.slice(u.length-$):u})},et);return()=>clearInterval(e)},[]),n.useEffect(()=>{const e=setInterval(()=>he(Date.now()),1e4);return()=>clearInterval(e)},[]),n.useEffect(()=>{let e=!1;return de(Ve()).then(s=>{if(e)return;const r=s.events??[];J(c=>{const I=new Set(c.map(d=>d.id)),u=r.filter(d=>!I.has(d.id)).concat(c);return u.length>$?u.slice(u.length-$):u})}).catch(()=>{}),()=>{e=!0}},[]),n.useEffect(()=>{let e=!1;const s=async()=>{try{const c=await de("/api/tail/discover");e||pe(c)}catch{}};s();const r=setInterval(()=>{s()},tt);return()=>{e=!0,clearInterval(r)}},[]);const X=n.useMemo(()=>{const e=new Map;for(const s of o){const r=N[s.id],c=[s.harnessSessionId,r?.sessionId,r?.data.metadata?.session?.externalSessionId].map(I=>I?.trim()).filter(I=>!!I);e.set(s.id,[...new Set(c)])}return e},[o,N]),b=n.useMemo(()=>He({events:Oe(Y),transcripts:O?.transcripts??[],agents:nt(o,X),now:g,liveWindowMs:qe}),[o,O?.transcripts,g,X,Y]),[R,K]=n.useState(null),w=n.useMemo(()=>{const e=Be(Qe(b,{sourceFilter:k,activityFilter:v,query:G,now:g,activeWindowMs:h}),U);if(!R)return e;const s=e.find(r=>r.id===R);return s?[s,...e.filter(r=>r.id!==R)]:e},[v,h,U,b,g,R,G,k]),Z=n.useRef(null),ee=n.useRef(null),V=n.useRef({w:0,h:0}),te=n.useRef(0);te.current=w.length;const[m,ve]=n.useState(()=>ze(0,{w:0,h:0})),q=n.useRef(m),D=n.useCallback((e,s)=>{const r=Ue(q.current,e,s);r!==q.current&&(q.current=r,ve(r))},[]);n.useEffect(()=>{const e=ee.current;if(!e)return;const s=new ResizeObserver(([r])=>{V.current={w:r.contentRect.width,h:r.contentRect.height},D(te.current,V.current)});return s.observe(e),()=>s.disconnect()},[D]),n.useLayoutEffect(()=>{D(w.length,V.current)},[w.length,D]);const S=n.useMemo(()=>w.slice(0,m.shown),[w,m.shown]),se=n.useRef(1);se.current=Math.max(1,m.cols),n.useEffect(()=>{Me(w.map(e=>({id:e.id,name:e.agent?.name??Ye(e),handle:e.agent?.handle??Ge(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:ot(e,g,h),lastActiveAt:e.lastActiveAt})))},[h,g,w]);const[we,ne]=n.useState(null),re=n.useRef(null),L=n.useRef(null);n.useEffect(()=>{y&&re.current!==y.serial&&(re.current=y.serial,K(y.id),ne(y.id),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>ne(null),st),Ee(y.serial))},[y]),n.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const T=F?b.find(e=>e.id===F)??null:null,f=n.useMemo(()=>T?fe(T,o):null,[o,T]),Ie=T?.agent?N[T.agent.id]?.data??null:null,[x,C]=n.useState(null),[M,_]=n.useState(!1),ge=x?S.findIndex(e=>e.id===x):-1,ie=n.useRef({index:-1,ids:[]});ie.current={index:ge,ids:S.map(e=>e.id)};const H=x?b.find(e=>e.id===x)??null:null,l=M?H:null;n.useEffect(()=>{M&&!H&&_(!1)},[H,M]);const B=n.useRef(new Map),xe=n.useCallback((e,s)=>{s?B.current.set(e,s):B.current.delete(e)},[]);n.useEffect(()=>{x&&B.current.get(x)?.focus({preventScroll:!0})},[x]);const ae=n.useMemo(()=>{if(!l)return null;const e=fe(l,o),s=(l.agent?N[l.agent.id]?.data??null:null)??Ke(at(l,O?.transcripts??[]),l.lines,l.live,{now:g});return{id:l.id,agent:e,source:l.agent?"scout":"native",observe:s,lastActiveAt:l.lastActiveAt,current:l.live}},[o,O?.transcripts,g,N,l]),oe=n.useCallback(e=>{t({view:"ops",mode:"tail",tailQuery:e.sessionId})},[t]),Q=n.useCallback(e=>{C(e),_(!0)},[]),le=n.useRef({focusedId:F,railOpen:M,pinnedId:R,selectedIds:i.selectedIds,visibleAgents:i.visibleAgents});le.current={focusedId:F,railOpen:M,pinnedId:R,selectedIds:i.selectedIds,visibleAgents:i.visibleAgents},n.useEffect(()=>{const e=s=>{if(Ce(s.target))return;const r=le.current;if(r.focusedId){s.key==="Escape"&&A(null);return}if(Fe())return;if(s.key==="Escape"){r.railOpen?_(!1):r.selectedIds.length>0?me():r.pinnedId?K(null):C(null);return}if((s.metaKey||s.ctrlKey)&&s.key==="a"){if(r.visibleAgents.length===0)return;s.preventDefault();const W=r.visibleAgents.map(j=>j.id);if(W.every(j=>r.selectedIds.includes(j))){me();return}for(const j of W)r.selectedIds.includes(j)||z(j);return}if(s.metaKey||s.ctrlKey||s.altKey||s.defaultPrevented)return;const c=s.target instanceof Node?s.target:null;if(!(!c||c===document.body||c===document.documentElement)&&!Z.current?.contains(c))return;const{index:u,ids:d}=ie.current;if(d.length===0)return;const ue=Ze(s.key);if(ue){s.preventDefault();const W=Xe(u,d.length,se.current,ue);C(d[W]??null);return}if(c instanceof Element&&c.closest("button, a, [role='button'], [role='link']"))return;const Re=u<0?0:u,E=d[Re];if(E){if(s.key==="Enter"||s.key==="i"){s.preventDefault(),Q(E);return}if(s.key==="o"){s.preventDefault(),C(E),A(E);return}(s.key==="x"||s.key===" ")&&(s.preventDefault(),C(E),z(E))}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[Q]);const ye=S.reduce((e,s)=>e+s.lines.length,0),ce=b.length-w.length,be=je(i);return a.jsxs("div",{className:"s-wall",ref:Z,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,"/",w.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:ye}),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"]}),a.jsxs("span",{className:"s-wall-status-filter",role:"group","aria-label":"Show logs active within",children:[a.jsx("span",{className:"s-wall-status-key",children:"within"}),ke.map(e=>{const s=be===e.id;return a.jsx("button",{type:"button",className:`s-wall-status-chip${s?" s-wall-status-chip--active":""}`,"aria-pressed":s,onClick:()=>Ne(e.id),children:e.label},e.id)})]}),S.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"]}),R&&a.jsx("button",{type:"button",className:"s-wall-status-pin",onClick:()=>K(null),children:"unpin"})]}),a.jsx("div",{ref:ee,className:`s-wall-grid${M?" 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:Je},children:S.length===0?a.jsxs("div",{className:"s-wall-empty",children:[a.jsx("div",{className:"s-wall-empty-title",children:b.length===0?"No logs on the wire":"No matching logs"}),a.jsx("div",{className:"s-wall-empty-sub",children:b.length===0?"Panes appear as sessions start writing to their transcripts.":"Widen the activity window or clear the filter."})]}):S.map(e=>a.jsx($e,{log:e,selected:i.selectedIds.includes(e.id),revealed:we===e.id,cursor:x===e.id,paneRef:s=>xe(e.id,s),onOpen:()=>Q(e.id),onToggleSelected:()=>z(e.id),onOpenLog:()=>oe(e)},e.id))}),l&&ae&&a.jsx(_e,{log:l,lane:ae,onClose:()=>_(!1),onExpand:()=>A(l.id),onTail:()=>oe(l),onOpenLog:()=>t({view:"sessions",sessionId:l.sessionId}),onOpenFile:p}),f&&a.jsx(We,{agent:f,observe:Ie,onClose:()=>A(null),onSend:async e=>{await Ae(f,e)},onOpenConversation:()=>{if(A(null),it(f)&&f.harnessSessionId){t({view:"sessions",sessionId:f.harnessSessionId});return}Te(f).then(e=>t({view:"conversation",conversationId:e})).catch(()=>t({view:"agents-v2",agentId:f.id,tab:"message"}))},onTail:()=>{A(null),t({view:"ops",mode:"tail",tailQuery:f.harnessSessionId??f.handle??f.name})},onProfile:()=>{A(null),t({view:"agents-v2",agentId:f.id})}})]})}export{ys as MissionControlView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,j as e}from"./index-EsrkGBcv.js";import{a as w}from"./colors-CFlbwC25.js";import{c as N,n as $}from"./agent-state-DDhnFEEP.js";import{u as C}from"./keyboard-nav-DDHegDbx.js";import{t as j}from"./time-Dhsh_2EG.js";import{M,f as S}from"./runtime-picker-DXu2bOTh.js";import{s as v}from"./page-status-BswZLqvA.js";import"./api-DSqpVKC7.js";import"./index-724SdE6r.js";import{K as k}from"./mission-control-model-BpJHDV5D.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";function g({agent:s,observe:a,onClose:l,onSend:o,onOpenConversation:r,onTail:d,onProfile:p}){const h=w(s.name),{ref:m,onKeyDown:u}=C(),[i,n]=f.useState("profile"),c=t=>{if(u(t),t.defaultPrevented)return;const y=t.target;y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||(y?.isContentEditable??!1)||(t.key==="1"?(t.preventDefault(),n("profile")):t.key==="2"?(t.preventDefault(),n("activity")):t.key==="3"&&(t.preventDefault(),n("message")))};return e.jsx("div",{className:"s-mission-overlay",onClick:l,children:e.jsxs("div",{ref:m,role:"dialog","aria-modal":"true","aria-labelledby":"mission-overlay-title",onClick:t=>t.stopPropagation(),onKeyDown:c,tabIndex:-1,className:"s-mission-overlay-dialog",children:[e.jsxs("div",{className:"s-mission-overlay-header",children:[e.jsx("div",{className:"s-ops-avatar",style:{"--size":"28px",background:h},children:s.name[0]?.toUpperCase()}),e.jsxs("div",{className:"s-mission-overlay-identity",children:[e.jsxs("div",{className:"s-mission-overlay-name",id:"mission-overlay-title",children:[s.name," ",e.jsx("span",{className:"s-mission-overlay-handle",children:s.handle?`@${s.handle}`:""})]}),e.jsxs("div",{className:"s-mission-overlay-meta",children:[s.project??"—"," · ",s.branch??"main"," · ",N(s.state)]})]}),e.jsx("button",{className:"s-mission-overlay-close",onClick:l,"aria-label":"Close (Esc)",title:"Close (Esc)",children:"✕"})]}),e.jsxs("div",{className:"s-mission-overlay-tabs",role:"tablist",children:[e.jsxs("div",{className:"s-mission-overlay-tabs-group",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":i==="profile",className:`s-mission-overlay-tab${i==="profile"?" s-mission-overlay-tab--active":""}`,onClick:()=>n("profile"),children:"Profile"}),e.jsx("button",{type:"button",role:"tab","aria-selected":i==="activity",className:`s-mission-overlay-tab${i==="activity"?" s-mission-overlay-tab--active":""}`,onClick:()=>n("activity"),children:"Activity"}),e.jsx("button",{type:"button",role:"tab","aria-selected":i==="message",className:`s-mission-overlay-tab${i==="message"?" s-mission-overlay-tab--active":""}`,onClick:()=>n("message"),children:"Message"})]}),e.jsxs("div",{className:"s-mission-overlay-tabs-action",children:[i==="profile"&&e.jsx("button",{type:"button",className:"s-mission-overlay-jump",onClick:p,...v({label:`Open profile · ${s.handle??s.name}`,route:`/agents/${s.id}`}),children:"Open profile ↗"}),i==="activity"&&e.jsx("button",{type:"button",className:"s-mission-overlay-jump",onClick:d,...v({label:`Tail · ${s.handle??s.name}`,route:`/ops/tail?q=${encodeURIComponent(s.handle??s.name)}`}),children:"Open in Tail ↗"}),i==="message"&&e.jsx("button",{type:"button",className:"s-mission-overlay-jump",onClick:r,...v({label:`Open conversation with ${s.handle??s.name}`,...s.conversationId?{route:`/c/${s.conversationId}`}:{}}),children:"Open conversation ↗"})]})]}),e.jsxs("div",{className:"s-mission-overlay-body",children:[i==="profile"&&e.jsx(E,{agent:s}),i==="activity"&&e.jsx(D,{agent:s,observe:a,onOpenConversation:r,onMessage:()=>n("message")}),i==="message"&&e.jsx(O,{agent:s,onSend:o,onOpenConversation:r})]})]})})}function E({agent:s}){const a=[["MODEL",[s.harness,s.model].filter(Boolean).join("/")||"—"],["AT",[s.project,s.branch].filter(Boolean).join("/")||"—"],["CWD",s.cwd||s.projectRoot||"—"],["AGENT",s.agentClass||"—"],["ROLE",s.role||s.transport||"—"],["MACHINE",s.authorityNodeName??s.homeNodeName??s.authorityNodeId??s.homeNodeId??"—"],["OWNER",s.ownerHandle??s.ownerName??s.ownerId??"—"],["SPAWNED",s.createdAt?j(s.createdAt):"—"],["STATE",N(s.state)]];return e.jsx("div",{className:"s-focus-tab",children:e.jsx("dl",{className:"s-focus-spec",children:a.map(([l,o])=>e.jsxs("div",{className:"s-focus-spec-row",children:[e.jsx("dt",{className:"s-focus-spec-label",children:l}),e.jsx("dd",{className:"s-focus-spec-value",title:o,children:o})]},l))})})}const T={tool:"▸",think:"·",ask:"?",message:"✉",note:"•",system:"◇",boot:"↑"};function A(s,a){if(a){const o=Date.now()-(a+s*1e3);return o<6e4?`${Math.max(0,Math.round(o/1e3))}s`:o<36e5?`${Math.round(o/6e4)}m`:o<864e5?`${Math.round(o/36e5)}h`:`${Math.round(o/864e5)}d`}const l=Math.max(0,Math.round(s));return l<60?`${l}s`:l<3600?`${Math.round(l/60)}m`:`${Math.round(l/3600)}h`}function I(s){if(s.kind==="tool"){const a=s.tool??"tool";return s.arg?`${a} · ${s.arg}`:a}return s.kind==="ask"?s.text||"request received":s.text||s.detail||k[s.kind]||s.kind}function D({agent:s,observe:a,onOpenConversation:l,onMessage:o}){const r=a?.events??[],d=a?.metadata?.usage,p=typeof a?.metadata?.session?.sessionStart=="number"?(a?.metadata?.session).sessionStart:null,h=r.slice(-14).reverse(),m=d?.assistantMessages??r.filter(t=>t.kind==="message").length,u=r.filter(t=>t.kind==="tool").length,i=r.filter(t=>t.kind==="tool"&&(t.tool==="edit"||t.tool==="write")).length,n=a?.contextUsage&&a.contextUsage.length>0?Math.round(a.contextUsage[a.contextUsage.length-1]*100):null,c=n!==null?`${n}%`:d?.contextWindowTokens&&d?.contextInputTokens?`${Math.round(d.contextInputTokens/d.contextWindowTokens*100)}%`:"—";return e.jsxs("div",{className:"s-focus-tab s-focus-tab--activity-preview",children:[e.jsxs("dl",{className:"s-focus-stats",children:[e.jsx(b,{label:"Turns",value:m||"—"}),e.jsx(b,{label:"Tools",value:u||"—"}),e.jsx(b,{label:"Edits",value:i||"—"}),e.jsx(b,{label:"Context",value:c})]}),h.length===0?e.jsx(L,{agent:s,onOpenConversation:l,onMessage:o}):e.jsx("ul",{className:"s-focus-activity-list",children:h.map(t=>e.jsxs("li",{className:`s-focus-activity-row s-focus-activity-row--${t.kind}`,children:[e.jsx("span",{className:"s-focus-activity-time",children:A(t.t,p)}),e.jsx("span",{className:"s-focus-activity-glyph","aria-hidden":!0,children:T[t.kind]??"·"}),e.jsx("span",{className:"s-focus-activity-kind",children:k[t.kind]??t.kind}),e.jsx("span",{className:"s-focus-activity-text",children:I(t)})]},t.id))})]})}function L({agent:s,onOpenConversation:a,onMessage:l}){const o=S(s.role),r=[s.harness,s.model].filter(Boolean).join("/"),d=[s.project,s.branch].filter(Boolean).join("/"),p=$(s.state),h=N(p),m=s.createdAt?j(s.createdAt):null,u=s.updatedAt?j(s.updatedAt):null,i=s.homeNodeName??s.homeNodeId,n=s.ownerHandle??s.ownerName??s.ownerId,c=[];return o&&c.push({label:"Role",value:o}),r&&c.push({label:"Stack",value:r}),d&&c.push({label:"At",value:d}),i&&c.push({label:"Home",value:i}),n&&c.push({label:"Owner",value:n}),m&&c.push({label:"Spawned",value:m}),c.push({label:"State",value:h}),u&&c.push({label:"Last seen",value:u}),e.jsxs("div",{className:"s-focus-activity-empty s-focus-activity-empty--rich",children:[e.jsxs("div",{className:"s-focus-activity-empty-head",children:[e.jsx("span",{className:"s-focus-activity-empty-eyebrow",children:"No tool or turn events recorded"}),e.jsx("span",{className:"s-focus-activity-empty-title",children:s.handle??s.name})]}),e.jsx("dl",{className:"s-focus-activity-empty-facts",children:c.map(t=>e.jsxs("div",{className:"s-focus-activity-empty-fact",children:[e.jsx("dt",{children:t.label}),e.jsx("dd",{title:t.value,children:t.value})]},t.label))}),e.jsxs("div",{className:"s-focus-activity-empty-actions",children:[e.jsx("button",{type:"button",className:"s-focus-activity-empty-btn",onClick:a,...v({label:`Open conversation with ${s.handle??s.name}`,...s.conversationId?{route:`/c/${s.conversationId}`}:{}}),children:"Open conversation ↗"}),e.jsx("button",{type:"button",className:"s-focus-activity-empty-btn s-focus-activity-empty-btn--primary",onClick:l,...v({label:`Compose message · ${s.handle??s.name}`}),children:"Send a message"})]})]})}function b({label:s,value:a}){return e.jsxs("div",{className:"s-focus-stat",children:[e.jsx("dt",{className:"s-focus-stat-label",children:s}),e.jsx("dd",{className:"s-focus-stat-value",children:a})]})}function O({agent:s,onSend:a,onOpenConversation:l}){const[o,r]=f.useState(""),[d,p]=f.useState(!1),[h,m]=f.useState(!1),[u,i]=f.useState(null),n=f.useRef(null);f.useEffect(()=>{n.current?.focus()},[]);const c=async()=>{const y=o.trim();if(!(!y||d)){p(!0),i(null);try{await a(y),r(""),m(!0),setTimeout(()=>m(!1),1800)}catch(x){i(x instanceof Error?x.message:String(x))}finally{p(!1)}}},t=s.handle??s.name;return e.jsx("div",{className:"s-focus-tab",children:e.jsx("div",{className:"s-focus-compose",children:e.jsx(M,{density:"panel",value:o,onChange:r,onSend:()=>{c()},sending:d,placeholder:`Message @${t}…`,textareaRef:n,rows:4,"aria-label":`Message @${t}`,header:e.jsxs("div",{className:"s-focus-compose-label",children:["Message ",e.jsxs("span",{className:"s-focus-compose-target",children:["@",t]})]}),tools:e.jsx("div",{className:"s-focus-compose-hint",children:u?e.jsxs("span",{className:"s-focus-compose-error",children:["Send failed: ",u]}):h?e.jsxs("span",{className:"s-focus-compose-ok",children:["Sent ↗"," ",e.jsx("button",{type:"button",className:"s-focus-compose-link",onClick:l,children:"Open Chat"})]}):e.jsx("span",{children:"Send starts a Run, or steers the active Run when this agent is already working."})})})})})}export{g as FocusOverlay};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-EsrkGBcv.js";import{c as j}from"./agent-state-DDhnFEEP.js";import{s as x}from"./page-status-BswZLqvA.js";import{t as l}from"./time-Dhsh_2EG.js";import{R as b}from"./RailRow-BjmWK420.js";import"./colors-CFlbwC25.js";import"./AgentAvatar-CrP1eXxk.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";function jt({agent:t,state:r,isExpanded:e,isSelected:p,tabIndex:s,onToggle:a,onReveal:n,onOpen:c}){const m=x({label:`Focus ${t.handle??t.name}`,route:`/ops/control · ${t.id}`}),d=o.jsxs(o.Fragment,{children:[o.jsxs("dl",{className:"rr-spec-list",children:[o.jsx(i,{label:"MODEL",value:[t.harness,t.model].filter(Boolean).join("/")||"—"}),o.jsx(i,{label:"AT",value:[t.project,t.branch].filter(Boolean).join("/")||"—"}),o.jsx(i,{label:"STATE",value:j(r)}),o.jsx(i,{label:"ACTIVITY",value:t.activity}),o.jsx(i,{label:"SOURCE",value:t.source})]}),o.jsxs("div",{className:"ml-detail-actions",children:[o.jsx("button",{type:"button",className:"ml-detail-btn",onClick:n,children:"Reveal on wall"}),o.jsx("button",{type:"button",className:"ml-detail-btn ml-detail-btn--primary",onClick:c,children:"Open ↗"})]})]});return o.jsx(b,{name:t.handle??t.name,meta:t.lastActiveAt?l(t.lastActiveAt):t.updatedAt?l(t.updatedAt):void 0,tone:r,caret:e?"open":"closed",selected:p,expanded:e,detail:d,tabIndex:s,onClick:u=>a(u),onPointerEnter:m.onPointerEnter,onPointerLeave:m.onPointerLeave})}function i({label:t,value:r}){return o.jsxs("div",{className:"rr-spec",children:[o.jsx("dt",{className:"rr-spec-label",children:t}),o.jsx("dd",{className:"rr-spec-value",title:r,children:r})]})}export{jt as MissionLeftAgentRow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,j as l}from"./index-EsrkGBcv.js";import{H as k}from"./HarnessMark-C4naWc16.js";import{n as y}from"./agent-state-DDhnFEEP.js";import{s as P}from"./page-status-BswZLqvA.js";import{c as T,b as I,T as C,d as H}from"./tail-display-DHSNmvor.js";import{d as A}from"./time-Dhsh_2EG.js";import{s as E}from"./mission-control-model-BpJHDV5D.js";import{m as R,a as K}from"./mission-wall-CAo4BKfa.js";import"./lane-edit-display-BjdT9oZl.js";import"./colors-CFlbwC25.js";const _=24;function U({log:s,selected:f,revealed:h,cursor:i=!1,onOpen:c,onToggleSelected:w,onOpenLog:v,paneRef:j}){const o=a.useRef(null),m=a.useRef(!0),r=a.useMemo(()=>T(s.lines.map(e=>({event:e,meta:void 0}))).map(e=>({...e,outcome:e.event.kind==="tool-result"?I(e.event).result?.outcome??null:null})),[s.lines]),x=a.useCallback(()=>{const e=o.current;if(!e)return;const n=e.scrollHeight-e.scrollTop-e.clientHeight;m.current=n<=_},[]);a.useEffect(()=>{const e=o.current;!e||!m.current||(e.scrollTop=e.scrollHeight)},[r.length,s.lastActiveAt]);const N=y(s.agent?.state??null),t=R(s),b=K(s),p=[s.project,s.agent?.branch].filter(Boolean).join("/")||s.cwd||"—",d=a.useMemo(()=>P({label:`Tail · ${t}`,route:`/ops/tail?q=${encodeURIComponent(s.sessionId)}`}),[s.sessionId,t]),L=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey){w();return}c()};return l.jsxs("div",{ref:j,className:["s-wall-pane",s.live?"s-wall-pane--live":null,f?"s-wall-pane--selected":null,h?"s-wall-pane--revealed":null,i?"s-wall-pane--cursor":null].filter(Boolean).join(" "),"data-cursor":i?!0:void 0,tabIndex:i?0:-1,onClick:L,children:[l.jsxs("div",{className:"s-wall-pane-head",children:[l.jsx("span",{className:"s-wall-pane-dot",style:{background:s.agent?E(N):"var(--dim)"},"aria-hidden":!0}),l.jsx(k,{harness:s.source,size:11,title:null}),l.jsx("button",{type:"button",className:"s-wall-pane-title",title:s.agent?.name??s.sessionId,"aria-label":`Focus ${t}`,onClick:e=>{e.stopPropagation(),c()},children:t}),l.jsx("span",{className:"s-wall-pane-where",title:s.cwd??p,children:p}),l.jsx("span",{className:"s-wall-pane-spacer"}),s.live&&l.jsx("span",{className:"s-wall-pane-live",children:"live"}),l.jsx("button",{type:"button",className:"s-wall-pane-file",title:s.logPath??`session ${s.sessionId}`,"aria-label":"Open raw tail",onClick:e=>{e.stopPropagation(),v()},onPointerEnter:d.onPointerEnter,onPointerLeave:d.onPointerLeave,children:b})]}),l.jsx("div",{className:"s-wall-pane-body",ref:o,onScroll:x,children:r.length===0?l.jsx("div",{className:"s-wall-pane-idle",children:"no output since page load"}):r.map(({event:e,repeatCount:n,outcome:u})=>l.jsxs("div",{className:["s-wall-line",`s-wall-line--${e.kind}`,u==="success"?"s-wall-line--result-ok":null,u==="error"?"s-wall-line--result-error":null].filter(Boolean).join(" "),children:[l.jsx("span",{className:"s-wall-line-time",children:A(e.ts,{milliseconds:!1})||"—"}),l.jsx("span",{className:"s-wall-line-glyph",title:H[e.kind],children:C[e.kind]}),l.jsxs("span",{className:"s-wall-line-text",children:[e.summary,n>1&&l.jsxs("span",{className:"s-wall-line-repeat",title:`${n} identical events`,children:[" ","×",n]})]})]},e.id))})]})}export{U as MissionLogPane};
|