@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{j as t}from"./index-EsrkGBcv.js";import{u as h}from"./Provider-C35yu29I.js";import{o as j}from"./openAgent-Dbv5wfuL.js";import{n as v,i as u,c as d}from"./agent-state-DDhnFEEP.js";import{A as b}from"./AgentAvatar-CrP1eXxk.js";import{t as g}from"./time-Dhsh_2EG.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"./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"./openContent-C6XO6kr5.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";function vt(){const{agents:r,agentsLoaded:s,apiConnection:o,navigate:a,route:f}=h(),n=e=>j(a,e,{returnTo:f});if(!s)return t.jsx("div",{className:"flex h-full flex-col justify-center","aria-busy":"true",children:t.jsxs("div",{className:"base-rail-loading",role:"status","aria-label":"Loading agent roster",children:[t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"})]})});if(r.length===0)return t.jsxs("div",{className:"flex h-full flex-col items-center justify-center px-4 text-center font-mono text-sm leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:[t.jsx("div",{className:"mb-1 uppercase tracking-[0.15em]",children:o.status==="offline"?"Roster unavailable":"No agents"}),t.jsx("div",{children:o.status==="offline"?o.message:"Connect an agent to see your roster here."})]});const i=r.filter(e=>{const x=v(e.state,e);return x==="in_turn"||x==="in_flight"}),l=r.filter(e=>u(e.state,e)&&!i.includes(e)),m=r.filter(e=>!u(e.state,e));return t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[i.length>0&&t.jsx(c,{label:"In progress",count:i.length,children:i.map(e=>t.jsx(p,{agent:e,onOpen:n,subLabel:d(e.state,e)},e.id))}),l.length>0&&t.jsx(c,{label:"Callable",count:l.length,children:l.map(e=>t.jsx(p,{agent:e,onOpen:n},e.id))}),m.length>0&&t.jsx(c,{label:"Blocked",count:m.length,children:m.map(e=>t.jsx(p,{agent:e,onOpen:n,subLabel:d(e.state,e),dim:!0},e.id))})]})}function c({label:r,count:s,children:o}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsxs("div",{className:"flex items-baseline justify-between mb-1.5",children:[t.jsx("span",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),t.jsx("span",{className:"text-2xs font-mono tabular-nums text-[var(--scout-chrome-ink-ghost)]",children:s})]}),t.jsx("div",{className:"flex flex-col gap-0.5",children:o})]})}function p({agent:r,onOpen:s,subLabel:o,dim:a}){return t.jsxs("button",{onClick:()=>s(r),className:`group flex items-center gap-2.5 px-2 py-1.5 rounded-sm text-left transition-colors ${a?"opacity-60 hover:opacity-100 hover:bg-[var(--scout-chrome-hover)]":"hover:bg-[var(--scout-chrome-hover)]"}`,children:[t.jsx(b,{agent:r,placement:"row"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"truncate font-medium text-[var(--scout-chrome-ink)]",children:r.name}),o?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:o}):r.updatedAt?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-ghost)]",children:g(r.updatedAt)}):null]})]})}export{vt as HomeRight};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as s}from"./index-EsrkGBcv.js";import{u as C,s as j}from"./mesh-view-store-DZvJC4KU.js";import{NodeDetailPanel as L}from"./NodeDetailPanel-CElOEpCh.js";import{u as O}from"./local-agents-BqnoxJrq.js";import{a as $,s as E}from"./use-mesh-node-state-BvaqtODo.js";import{t as J}from"./time-Dhsh_2EG.js";import{g as R}from"./Provider-C35yu29I.js";import{n as T,a as P}from"./agent-state-DDhnFEEP.js";import{a as N}from"./api-DSqpVKC7.js";/* empty css *//* empty css */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"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";function B(a){return a.localNode?.advertiseScope==="mesh"}function _(a){const n=new Map;for(const t of a){const r=(t.harness??t.agentClass??"agent").toLowerCase(),o=n.get(r)??{total:0,working:0};o.total+=1,P(t.state)&&(o.working+=1),n.set(r,o)}return Array.from(n.entries()).map(([t,r])=>({label:t,total:r.total,working:r.working})).sort((t,r)=>r.total-t.total).slice(0,6)}function I(a){return a?a.replace(/^https?:\/\//,"").split("/")[0]??a:"Unavailable"}function U(a){return new Promise(n=>window.setTimeout(n,a))}async function z(a,n){let t=null,r=null;for(let o=0;o<=n.attempts;o+=1){try{if(t=await N("/api/mesh"),j(t),a(t))return t}catch(c){r=c}o<n.attempts&&await U(n.intervalMs)}if(t)return t;throw r instanceof Error?r:new Error("Mesh status is temporarily unavailable.")}function D(a){return a.issues.find(n=>n.code==="local_only"||n.code==="mesh_loopback"||n.code==="tailscale_stopped")?.summary??null}function Ds(){const{meshSnapshot:a,selectedId:n,selectedType:t}=C(),{agents:r}=O(),o=$(),c=d.useMemo(()=>R(r),[r]),[w,p]=d.useState(!1),[x,h]=d.useState(null),k=d.useCallback(async()=>{p(!0),h({tone:"info",text:"Joining mesh — announcing broker and syncing peers…"});try{const e=await N("/api/mesh/join",{method:"POST",body:"{}"});j(e);const l=e.identity.discoverable?e:await z(i=>i.identity.discoverable,{attempts:6,intervalMs:750});if(l.identity.discoverable){const i=e.discovery,A=i?.discoveredCount!=null?` Found ${i.discoveredCount} peer node${i.discoveredCount===1?"":"s"}.`:"";h(i.error?{tone:"warning",text:`On mesh, but the initial peer sync failed: ${i.error}`}:{tone:"success",text:`On mesh at ${I(l.identity.announceUrl??l.brokerUrl)}.${A}`})}else h({tone:"warning",text:D(l)??"Joined, but this broker is not peer-reachable yet."})}catch(e){h({tone:"error",text:e instanceof Error?e.message:String(e)})}finally{p(!1)}},[]),M=d.useCallback(async()=>{p(!0),h({tone:"info",text:"Leaving mesh…"});try{const e=await N("/api/mesh/leave",{method:"POST",body:"{}"});j(e),h({tone:"success",text:"Local only — peers will no longer discover this broker."})}catch(e){h({tone:"error",text:e instanceof Error?e.message:String(e)})}finally{p(!1)}},[]),y=d.useMemo(()=>{const e={total:c.length,working:0,ready:0,notReady:0};for(const l of c){const i=T(l.state);i==="in_turn"||i==="in_flight"?e.working+=1:i==="callable"?e.ready+=1:e.notReady+=1}return e},[c]),v=d.useMemo(()=>_(c),[c]);if(!a)return s.jsx("div",{className:"sys-inspector-empty",children:s.jsx("p",{children:"Loading mesh…"})});if(n&&t==="node")return s.jsx(L,{machineId:n,mesh:a,issues:a.issues});const m=a,g=Object.values(m.nodes).filter(e=>e.id!==m.localNode?.id).length,S=m.tailscale.onlineCount??0,f=m.localNode?.hostName?.split(".")[0]??m.localNode?.name??m.identity.name??"this broker",b=Object.values(o.entries),u=b.reduce((e,l)=>{const i=E(l.view??null).tone;return!l.view||l.view.broker==="unknown"?e.unchecked+=1:i==="ok"?e.responding+=1:i==="warn"?e.partial+=1:e.silent+=1,e},{responding:0,partial:0,silent:0,unchecked:0});return s.jsxs("div",{className:"sys-inspector-content mesh-summary",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:"Network"}),s.jsx("span",{className:"mesh-summary-mode",children:m.identity.modeLabel})]}),s.jsxs("section",{className:"mesh-summary-section",children:[s.jsxs("div",{className:"mesh-summary-counts",children:[s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:b.length||g+1}),s.jsx("span",{className:"mesh-summary-count-label",children:"machines"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--working",children:[s.jsx("span",{className:"mesh-summary-count-value",children:u.responding}),s.jsx("span",{className:"mesh-summary-count-label",children:"responding"})]}),u.partial>0&&s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:u.partial}),s.jsx("span",{className:"mesh-summary-count-label",children:"partial"})]}),u.silent>0&&s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--offline",children:[s.jsx("span",{className:"mesh-summary-count-value",children:u.silent}),s.jsx("span",{className:"mesh-summary-count-label",children:"no answer"})]}),u.unchecked>0&&s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:u.unchecked}),s.jsx("span",{className:"mesh-summary-count-label",children:"not checked"})]})]}),s.jsx("p",{className:"mesh-summary-hint",children:o.updatedAt?`Machines last swept ${J(o.updatedAt)}. Select one to see what is running on it.`:"Select a machine to see what is running on it."})]}),s.jsxs("section",{className:"mesh-summary-section",children:[s.jsxs("div",{className:"sys-inspector-section-label",children:["On ",f]}),s.jsxs("div",{className:"mesh-summary-counts",children:[s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.total}),s.jsx("span",{className:"mesh-summary-count-label",children:"agents"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--working",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.working}),s.jsx("span",{className:"mesh-summary-count-label",children:"working"})]}),s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.ready}),s.jsx("span",{className:"mesh-summary-count-label",children:"ready"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--offline",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.notReady}),s.jsx("span",{className:"mesh-summary-count-label",children:"not ready"})]})]})]}),v.length>0&&s.jsxs("section",{className:"mesh-summary-section",children:[s.jsxs("div",{className:"sys-inspector-section-label",children:["By harness, on ",f]}),s.jsx("div",{className:"mesh-summary-harness",children:v.map(e=>s.jsxs("div",{className:"mesh-summary-harness-row",children:[s.jsx("span",{className:"mesh-summary-harness-name",children:e.label}),s.jsx("span",{className:"mesh-summary-harness-count",children:e.total}),e.working>0&&s.jsxs("span",{className:"mesh-summary-harness-working",children:[e.working," working"]})]},e.label))})]}),s.jsxs("section",{className:"mesh-summary-section",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Peers"}),s.jsxs("div",{className:"mesh-summary-peers",children:[s.jsxs("div",{className:"mesh-summary-peer-row",children:[s.jsx("span",{className:"mesh-summary-peer-label",children:"Mesh"}),s.jsx("span",{className:"mesh-summary-peer-value",children:g})]}),m.tailscale.available&&s.jsxs("div",{className:"mesh-summary-peer-row",children:[s.jsx("span",{className:"mesh-summary-peer-label",children:"Tailnet"}),s.jsx("span",{className:`mesh-summary-peer-value${m.tailscale.running?"":" mesh-summary-peer-value--dim"}`,children:m.tailscale.running?`${S} online`:"stopped"})]})]})]}),s.jsxs("section",{className:"mesh-summary-section mesh-summary-reach",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Mesh"}),s.jsx(F,{joined:B(m),busy:w,tailscaleAvailable:m.tailscale.available,onJoin:()=>{k()},onLeave:()=>{M()}}),x&&s.jsx("div",{className:`sys-banner mesh-action-message sys-banner-${x.tone}`,children:s.jsx("span",{children:x.text})})]})]})}function F({joined:a,busy:n,tailscaleAvailable:t,onJoin:r,onLeave:o}){return s.jsxs("div",{className:"mesh-reach",children:[s.jsxs("label",{className:"mesh-join-toggle",children:[s.jsx("input",{type:"checkbox",checked:a,disabled:n,onChange:()=>{a?o():r()}}),s.jsx("span",{className:"mesh-join-toggle-copy",children:n?"Working…":a?"On mesh":"Join mesh"})]}),!t&&!a&&s.jsx("p",{className:"mesh-join-hint",children:"Tailscale can add automatic discovery; explicit seeds and LAN peers still work."}),a&&s.jsx("p",{className:"mesh-join-hint",children:"Mesh membership is on. Reachability is reported separately above."})]})}export{Ds as MeshInspectorPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,j as e}from"./index-EsrkGBcv.js";import{u as j}from"./Provider-C35yu29I.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-DSqpVKC7.js";import{u as w}from"./sse-BCPRocpq.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-l1mrh5S9.js";import{C as I}from"./chevron-right-DrfqcerI.js";import{M as C}from"./message-square-BxesYglW.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"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./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"./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"./index-BWHgHrtv.js";const M=5;function Le(){const{route:t,navigate:s}=j(),a=t.view==="work"?t.workId:null,[r,o]=u.useState(null),i=u.useCallback(async()=>{if(!a){o(null);return}try{o(await N(`/api/work/${encodeURIComponent(a)}`))}catch{o(null)}},[a]);if(u.useEffect(()=>{i()},[i]),w(()=>{a&&i()}),t.view!=="work")return null;if(!r)return e.jsx("div",{className:"flex h-full items-center justify-center px-4 text-center text-sm font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-ghost)]",children:"Loading work item…"});const d=O(r.state),m=T(r.attention),f=r.ownerName??r.ownerId??"Unassigned",l=r.nextMoveOwnerName??r.nextMoveOwnerId??null,h=l!==null&&(r.ownerId??null)!==(r.nextMoveOwnerId??null)&&l!==f,k=1+(h?1:0)+(r.priority?1:0)+2+(r.parentId?1:0)+(r.conversationId?1:0);return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar text-sm",children:[e.jsx("div",{className:"sticky top-0 z-10 border-b border-[var(--scout-chrome-border-soft)] bg-black/55 px-4 py-2 backdrop-blur",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.dot}`}),e.jsx("span",{className:`font-mono text-xs uppercase tracking-[0.15em] ${d.text}`,children:L(r.state)}),e.jsxs("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:f}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"px-1 text-[var(--scout-chrome-ink-ghost)]",children:"→"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:l})]})]}),m&&e.jsx("span",{className:"shrink-0 rounded border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-amber-300/90",children:m})]})}),e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[e.jsxs(c,{label:"Case facts",children:[e.jsx(n,{label:"Phase",value:r.currentPhase}),e.jsx(n,{label:"Acceptance",value:r.acceptanceState.replace(/_/g," ")}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority})]}),e.jsx(c,{label:"Timeline",children:r.timeline.length===0?e.jsx("div",{className:"text-xs text-[var(--scout-chrome-ink-faint)]",children:"No activity yet."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:r.timeline.slice(0,M).map(x=>e.jsx(W,{item:x,onOpen:x.conversationId?()=>b(s,{view:"conversation",conversationId:x.conversationId},{returnTo:t}):void 0},x.id))})}),e.jsxs(c,{label:"Routing",collapsible:!0,defaultOpen:!1,count:k,children:[e.jsx(n,{label:"Owner",value:f}),h&&l&&e.jsx(n,{label:"Next move",value:l}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority}),e.jsx(n,{label:"Children",value:`${r.activeChildWorkCount}`}),e.jsx(n,{label:"Flights",value:`${r.activeFlightCount}`}),r.lastMeaningfulAt&&e.jsx(n,{label:"Last update",value:g(r.lastMeaningfulAt)}),(r.conversationId||r.parentId)&&e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.conversationId&&e.jsx(v,{label:"Open thread",onClick:()=>b(s,{view:"conversation",conversationId:r.conversationId},{returnTo:t})}),r.parentId&&r.parentTitle&&e.jsx(v,{label:r.parentTitle,eyebrow:"Parent",onClick:()=>b(s,{view:"work",workId:r.parentId},{returnTo:t})})]})]}),e.jsxs(c,{label:"Record",collapsible:!0,defaultOpen:!1,children:[e.jsx(n,{label:"Case ID",value:r.id}),e.jsx(n,{label:"Created",value:p(r.createdAt)}),e.jsx(n,{label:"Updated",value:p(r.updatedAt)}),e.jsx(n,{label:"Last activity",value:p(r.lastMeaningfulAt)})]}),r.lastMeaningfulSummary&&e.jsxs(c,{label:"Hudson context",collapsible:!0,defaultOpen:!1,children:[e.jsx("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:r.lastMeaningfulSummary}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Plan"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Docs"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Code"})]})]})]})]})}function L(t){switch(t){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return t.replace(/_/g," ")}}function T(t){switch(t){case"badge":return"Noteworthy";case"interrupt":return"Blocked";default:return null}}function O(t){return/complete|done|finished/i.test(t)?{dot:"bg-emerald-400",text:"text-emerald-300/90"}:/fail|error/i.test(t)?{dot:"bg-red-400",text:"text-red-300/90"}:/block|wait|pause/i.test(t)?{dot:"bg-amber-400",text:"text-amber-300/90"}:/active|working|in[_-]?progress/i.test(t)?{dot:"bg-cyan-400",text:"text-cyan-300/90"}:{dot:"bg-[var(--scout-chrome-ink-faint)]",text:"text-[var(--scout-chrome-ink)]"}}function c({label:t,children:s,collapsible:a=!1,defaultOpen:r=!0,count:o}){const[i,d]=u.useState(r);return a?e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("button",{type:"button",onClick:()=>d(m=>!m),className:"flex items-center gap-1.5 text-left text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink)]",children:[i?e.jsx(y,{"aria-hidden":"true",size:10,strokeWidth:2}):e.jsx(I,{"aria-hidden":"true",size:10,strokeWidth:2}),e.jsx("span",{children:t}),typeof o=="number"&&o>0&&e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0 font-mono text-3xs tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:o})]}),i&&e.jsx("div",{className:"mt-1.5",children:s})]}):e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),s]})}function v({label:t,eyebrow:s,onClick:a}){return e.jsxs("button",{type:"button",onClick:a,className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-white/[0.025] px-2 py-1.5 text-left hover:border-cyan-400/25 hover:bg-cyan-400/10",children:[e.jsxs("span",{className:"min-w-0",children:[s&&e.jsx("span",{className:"block font-mono text-2xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:s}),e.jsx("span",{className:"block truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:t})]}),e.jsx(C,{"aria-hidden":"true",size:11,strokeWidth:1.8,className:"shrink-0 text-cyan-300/75"})]})}function W({item:t,onOpen:s}){const a=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`mt-1 h-1.5 w-1.5 shrink-0 rounded-full ${A(t)}`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(t.at)}),e.jsx("span",{className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:_(t)})]}),e.jsx("span",{className:"mt-0.5 block truncate text-xs font-semibold text-[var(--scout-chrome-ink-strong)]",children:t.actorName??"system"}),t.title&&e.jsx("span",{className:"mt-0.5 block truncate text-xs leading-snug text-[var(--scout-chrome-ink)]",children:t.title}),t.summary&&e.jsx("span",{className:"mt-0.5 block text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"},children:t.summary})]})]}),r="flex gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-1.5 first:border-t-0 first:pt-0",o=p(t.at);return s?e.jsx("button",{type:"button",onClick:s,title:o,className:`${r} text-left hover:text-cyan-300/90`,children:a}):e.jsx("div",{className:r,title:o,children:a})}function _(t){switch(t.kind){case"flight_started":return"flight started";case"flight_completed":return t.detailKind?`flight ${t.detailKind}`:"flight ended";case"message":return"message";default:return t.title??t.detailKind??"event"}}function A(t){return t.kind==="message"?"bg-cyan-400":t.kind==="flight_started"?"bg-lime-400":t.kind==="flight_completed"?t.detailKind?.includes("fail")?"bg-red-400":"bg-emerald-400":t.detailKind?.includes("interrupt")||t.detailKind?.includes("block")?"bg-amber-400":"bg-[var(--scout-chrome-ink-faint)]"}function n({label:t,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:s})]})}export{Le as WorkInspector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-EsrkGBcv.js";import{u as k}from"./Provider-C35yu29I.js";import{c as y}from"./agent-state-DDhnFEEP.js";import{A as S}from"./AgentAvatar-CrP1eXxk.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./runtime-picker-DXu2bOTh.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-3RfJpen8.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"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./loader-circle-OvccU82H.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./voice-levels-Dcr3jglk.js";function Ae(){const{route:t,agents:o,navigate:s}=k();if(t.view!=="terminal")return null;const r=t.agentId?o.find(i=>i.id===t.agentId)??null:null,l=t.mode??"takeover",[f,p]=d.useState(null);d.useEffect(()=>{if(t.view!=="terminal"||t.agentId||!t.terminalSurfaceKey){p(null);return}let i=!1;return T().then(g=>{i||p(C(g,t.terminalSessionId,t.terminalSurfaceKey))}).catch(()=>{i||p(null)}),()=>{i=!0}},[t.agentId,t.terminalSessionId,t.terminalSurfaceKey,t.view]);const j=f?R(f.surface):null,n=(r?$(r):null)??j,c=d.useMemo(()=>n?A(n):null,[n]);return r?e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsx(D,{agent:r}),e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),e.jsx(a,{label:"Backend",value:n?.backend??"pty"}),n&&e.jsx(a,{label:"Session",value:n.sessionName}),n?.paneId&&e.jsx(a,{label:"Pane",value:n.paneId}),e.jsx(a,{label:"State",value:y(r.state)})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c}),e.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[n&&e.jsx(m,{active:l==="observe",label:"Observe",onClick:()=>s(b(r.id,"observe"))}),e.jsx(m,{active:l==="takeover",label:"Takeover",onClick:()=>s(b(r.id,"takeover"))}),e.jsx(m,{label:"Profile",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"profile"})}),e.jsx(m,{label:"Trace",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"observe"})})]}),e.jsxs(u,{label:"Agent",children:[e.jsx(a,{label:"Harness",value:r.harness??"-"}),e.jsx(a,{label:"Transport",value:r.transport??"-"}),r.role&&e.jsx(a,{label:"Role",value:w(r.role)??r.role}),r.handle&&e.jsx(a,{label:"Handle",value:`@${r.handle}`}),r.updatedAt&&e.jsx(a,{label:"Updated",value:N(r.updatedAt)})]}),(r.project||r.branch||r.cwd||r.projectRoot)&&e.jsxs(u,{label:"Workspace",children:[r.project&&e.jsx(a,{label:"Name",value:r.project}),r.branch&&e.jsx(a,{label:"Branch",value:r.branch}),r.cwd&&e.jsx(a,{label:"Cwd",value:r.cwd}),!r.cwd&&r.projectRoot&&e.jsx(a,{label:"Root",value:r.projectRoot})]})]}):e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),t.agentId&&e.jsx(a,{label:"Agent",value:t.agentId}),n&&e.jsx(a,{label:"Backend",value:n.backend}),n&&e.jsx(a,{label:"Session",value:n.sessionName})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c})]})}function x(t){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(t)?t:`'${t.replace(/'/gu,"'\\''")}'`}function A(t){return t.backend==="tmux"?`tmux attach -t ${x(t.sessionName)}`:`${t.socketDir?`ZELLIJ_SOCKET_DIR=${x(t.socketDir)} `:""}zellij attach ${x(t.sessionName)}`}function b(t,o){return{view:"terminal",agentId:t,mode:o}}function $(t){return t.terminalSurface?t.terminalSurface:t.transport==="tmux"&&t.harnessSessionId?{backend:"tmux",sessionName:t.harnessSessionId,paneId:null,socketDir:null}:null}function v(t){return t==="observe"?"Read-only observe":"Interactive takeover"}function D({agent:t}){return e.jsx("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(S,{agent:t,placement:"row",size:32,presence:!1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.name}),t.handle&&e.jsxs("div",{className:"truncate font-mono text-xs text-cyan-400/70",children:["@",t.handle]})]})]})})}function m({active:t,label:o,onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:`h-7 rounded border px-2 font-mono text-2xs uppercase tracking-[0.1em] transition-colors ${t?"border-cyan-400/35 bg-cyan-400/[0.12] text-cyan-200":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] text-[var(--scout-chrome-ink-soft)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]"}`,children:o})}function h({label:t,command:o}){const[s,r]=d.useState(!1);return e.jsxs("details",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2",children:[e.jsx("summary",{className:"cursor-pointer select-none font-mono text-2xs uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mb-1.5 mt-2 flex items-center justify-end gap-2",children:e.jsx("button",{type:"button",className:"rounded border border-cyan-400/20 bg-cyan-400/[0.08] px-2 py-1 font-mono text-2xs uppercase tracking-[0.1em] text-cyan-100/80 hover:bg-cyan-400/[0.14]",onClick:()=>{I(o).then(l=>{l&&(r(!0),window.setTimeout(()=>r(!1),1200))})},children:s?"Copied":"Copy"})}),e.jsx("code",{className:"block select-text break-all rounded bg-black/25 p-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink)]",children:o})]})}function u({label:t,children:o}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),o]})}function a({label:t,value:o}){return e.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-right text-sm font-mono text-[var(--scout-chrome-ink)]",children:o})]})}export{Ae as TerminalInspector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-EsrkGBcv.js";import{u as P}from"./Provider-C35yu29I.js";import{a as g}from"./api-DSqpVKC7.js";import{u as A}from"./sse-BCPRocpq.js";import{t as b}from"./time-Dhsh_2EG.js";import{o as k}from"./openContent-C6XO6kr5.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"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./index-BWHgHrtv.js";function f(t){const r=t.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return r[r.length-1]??t}function N(t){const n=t?.trim();if(!n)return null;const r=f(n);return r.endsWith(".jsonl")?r.slice(0,-6):r}function C(t){return t.workspaceRoot?f(t.workspaceRoot):t.agentName??"unassigned"}function L(t){return t.harness?.trim()||t.kind?.trim()||"scout"}function w(t){return t.project?.trim()||(t.cwd?f(t.cwd):null)||"unknown"}function y(t,n=4){const r=new Map;for(const i of t){const a=i.trim()||"unknown";r.set(a,(r.get(a)??0)+1)}return[...r.entries()].map(([i,a])=>({label:i,count:a})).sort((i,a)=>a.count-i.count||i.label.localeCompare(a.label)).slice(0,n)}function Se(){const{route:t,navigate:n}=P(),[r,i]=l.useState([]),[a,h]=l.useState(null),x=l.useCallback(async()=>{const[u,d]=await Promise.allSettled([g("/api/sessions"),g("/api/tail/discover")]);u.status==="fulfilled"&&i(u.value),d.status==="fulfilled"&&h(d.value)},[]);if(l.useEffect(()=>{x()},[x]),A(()=>{x()}),t.view!=="sessions")return null;const s=t.sessionId?r.find(u=>u.id===t.sessionId)??null:null;return s?e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:[e.jsx("div",{className:"text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:s.title}),e.jsx("div",{className:"text-xs font-mono uppercase tracking-wider text-cyan-400/70 mt-1",children:s.kind})]}),s.agentName&&e.jsxs(m,{label:"Agent",children:[e.jsx(p,{label:"Name",value:s.agentName}),s.harness&&e.jsx(p,{label:"Harness",value:s.harness})]}),(s.currentBranch||s.workspaceRoot)&&e.jsxs(m,{label:"Workspace",children:[s.currentBranch&&e.jsx(p,{label:"Branch",value:s.currentBranch}),s.workspaceRoot&&e.jsx(p,{label:"Root",value:s.workspaceRoot})]}),e.jsxs(m,{label:"Activity",children:[e.jsx(p,{label:"Messages",value:`${s.messageCount}`}),s.lastMessageAt&&e.jsx(p,{label:"Last",value:b(s.lastMessageAt)}),(s.participantCount??s.participantIds.length)>0&&e.jsx(p,{label:"Participants",value:`${s.participantCount??s.participantIds.length}`})]}),s.preview&&e.jsx(m,{label:"Preview",children:e.jsxs("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:['"',s.preview,'"']})})]}):e.jsx($,{sessions:r,discovery:a,navigate:n,route:t})}function $({sessions:t,discovery:n,navigate:r,route:i}){const a=n?.transcripts??[],h=l.useMemo(()=>y([...t.map(L),...a.map(o=>o.source||"unknown")],5),[t,a]),x=l.useMemo(()=>y([...t.map(C),...a.map(w)],5),[t,a]),s=l.useMemo(()=>a.slice().sort((o,c)=>c.mtimeMs-o.mtimeMs).slice(0,5),[a]),u=l.useMemo(()=>t.filter(o=>o.lastMessageAt).slice().sort((o,c)=>(c.lastMessageAt??0)-(o.lastMessageAt??0)).slice(0,5),[t]),d=n?.processes?.length??0,S=n?.totals.transcripts??a.length,R=d>0?"Live harness activity":"Quiet session surface";return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5",children:[e.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:"Sessions context"}),e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(v,{label:"Scout",value:`${t.length}`}),e.jsx(v,{label:"Raw",value:`${S}`}),e.jsx(v,{label:"Live",value:`${d}`})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-2 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{children:R}),e.jsxs("span",{children:[h.length," sources"]})]})]}),e.jsx(m,{label:"Sources",children:e.jsx(M,{items:h,empty:"No sources visible"})}),e.jsx(m,{label:"Project mix",children:e.jsx(M,{items:x,empty:"No projects visible"})}),e.jsx(m,{label:"Recent raw",children:s.length===0?e.jsx(j,{children:"No raw transcripts discovered."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:s.map(o=>{const c=N(o.sessionId)??N(o.transcriptPath);return e.jsxs("button",{type:"button",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5 text-left transition-colors hover:border-[var(--scout-chrome-border)]",onClick:()=>{c&&k(r,{view:"sessions",sessionId:c},{returnTo:i})},disabled:!c,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-bg)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:o.source||"raw"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:w(o)}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:b(o.mtimeMs)})]}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:c??f(o.transcriptPath)})]},`${o.source}:${o.transcriptPath}`)})})}),e.jsx(m,{label:"Recent Scout sessions",children:u.length===0?e.jsx(j,{children:"No recent Scout session messages."}):e.jsx("div",{className:"flex flex-col gap-1",children:u.map(o=>e.jsxs("button",{type:"button",className:"flex items-center gap-2 bg-transparent px-0 py-0.5 text-left",onClick:()=>k(r,{view:"sessions",sessionId:o.id},{returnTo:i}),children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink-soft)]",children:o.title}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:o.lastMessageAt?b(o.lastMessageAt):"-"})]},o.id))})})]})}function v({label:t,value:n}){return e.jsxs("div",{className:"min-w-0 rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-bg)] px-1.5 py-1",children:[e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:n})]})}function M({items:t,empty:n}){return t.length===0?e.jsx(j,{children:n}):e.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>e.jsxs("span",{className:"rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 font-mono text-xs text-[var(--scout-chrome-ink-soft)]",title:`${r.count} ${r.label}`,children:[r.label," ",r.count]},r.label))})}function j({children:t}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:t})}function m({label:t,children:n}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),n]})}function p({label:t,value:n}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:n})]})}export{Se as SessionsInspector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as y,j as e}from"./index-EsrkGBcv.js";import{a as O}from"./api-DSqpVKC7.js";import{a as r,t as f}from"./time-Dhsh_2EG.js";import{u as M,j as R}from"./mesh-ops-CiZ8xSAx.js";import{u as L}from"./mesh-view-store-DZvJC4KU.js";import{u as H}from"./Provider-C35yu29I.js";/* empty css */import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";function E(o){return o.state==="waiting"&&o.nextMoveOwnerId==="operator"&&o.waitingOn?.label==="Held by operator"}function t({label:o,value:c}){return c?e.jsxs("div",{className:"mesh-ops-detail-row",children:[e.jsx("span",{className:"mesh-ops-detail-label",children:o}),e.jsx("span",{className:"mesh-ops-detail-value",children:c})]}):null}function Me(){const{navigate:o}=H(),{items:c,hosts:h,selectedItemId:w,lab:A}=M(),{meshSnapshot:p}=L(),[i,x]=y.useState(null),[v,j]=y.useState(null),s=c.find(l=>l.id===w)??null,u=async l=>{if(!(!s||i)){x(l),j(null);try{await O(`/api/mesh-ops/items/${encodeURIComponent(s.id)}/${l}`,{method:"POST",body:"{}"}),R()}catch(d){j(d instanceof Error?d.message:String(d))}finally{x(null)}}};if(!s){const l=new Map;for(const n of c)n.hostNodeId&&l.set(n.hostNodeId,(l.get(n.hostNodeId)??0)+1);const d=p?.localNode?.id??null;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Mesh"}),h.map(n=>e.jsx(t,{label:n.nodeId===d?"this host":"peer",value:`${n.label} · ${l.get(n.nodeId)??0} items${n.liveSessionCount>0?` · ${n.liveSessionCount} live`:""}`},n.nodeId)),h.length===0&&e.jsx("div",{className:"ctx-panel-empty",children:"No hosts yet."})]}),e.jsx("div",{className:"ctx-panel-section",children:e.jsx("p",{className:"mesh-ops-inspector-note",children:"Select an item to inspect it. Counts are items attributed to each host; the map stays in the mesh screen."})})]})}if(s.kind==="session"&&s.session){const l=s.session;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"mesh-ops-inspector-header",children:[e.jsx("div",{className:"mesh-ops-inspector-title",children:s.title}),e.jsxs("div",{className:"mesh-ops-inspector-summary",children:[l.live?`Live ${l.harness} session`:l.endedAt!==null?`Ended ${l.harness} session`:`Lost ${l.harness} session — no end marker, last seen ${r(l.lastSeenAt)}`,l.alias?` · ${l.alias}`:""]})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsx(t,{label:"harness",value:l.harness}),e.jsx(t,{label:"state",value:l.endedAt!==null?"ended":l.state}),e.jsx(t,{label:"agent",value:s.ownerId}),e.jsx(t,{label:"started",value:l.startedAt!==null?r(l.startedAt):null}),e.jsx(t,{label:"last seen",value:r(l.lastSeenAt)}),e.jsx(t,{label:"ended",value:l.endedAt!==null?r(l.endedAt):null})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Venue"}),e.jsx(t,{label:"host",value:s.hostLabel}),e.jsx(t,{label:"project",value:s.projectRoot}),e.jsx(t,{label:"cwd",value:l.cwd})]})]})}const S=E(s),I=s.state==="done"||s.state==="cancelled",$=s.state==="open"||s.state==="working",C=S,m=s.state==="review",a=s.latestFlight,k=a!==null&&(a.state==="running"||a.state==="queued"),b=p?.localNode?.hostName?.split(".")[0]??p?.localNode?.name??"here",N=s.hostLabel??"unattributed",g=N===b||s.hostNodeId===null;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"mesh-ops-inspector-header",children:[e.jsx("div",{className:"mesh-ops-inspector-title",children:s.title}),s.summary&&e.jsx("div",{className:"mesh-ops-inspector-summary",children:s.summary})]}),A.routeStrip&&e.jsx("div",{className:"mesh-ops-routestrip","aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 260 40",className:"mesh-ops-routestrip-svg",children:[e.jsx("line",{x1:"24",y1:"18",x2:"236",y2:"18",className:`mesh-ops-routestrip-line${k&&!g?" mesh-ops-routestrip-line--moving":""}`}),e.jsx("rect",{x:"14",y:"12",width:"12",height:"12",rx:"2",className:"mesh-ops-routestrip-node"}),e.jsx("rect",{x:"234",y:"12",width:"12",height:"12",rx:"2",className:"mesh-ops-routestrip-node"}),e.jsx("text",{x:"20",y:"36",textAnchor:"middle",className:"mesh-ops-routestrip-label",children:b}),e.jsx("text",{x:"246",y:"36",textAnchor:"end",className:"mesh-ops-routestrip-label",children:g?"(same host)":N})]})}),!I&&e.jsxs("div",{className:"mesh-ops-actions",children:[C?e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u("release")},children:i==="release"?"Releasing…":"Release"}):$?e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u("hold")},children:i==="hold"?"Holding…":"Hold"}):null,(s.state==="review"||s.attention!=="silent")&&e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u(m?"accept":"clear")},title:m?"Accept this work item":"Dismiss this item from the attention queue",children:i==="accept"||i==="clear"?m?"Accepting…":"Clearing…":m?"Accept":"Clear"}),e.jsx("button",{type:"button",className:"mesh-ops-button",onClick:()=>o({view:"work",workId:s.id}),title:"Open the full work item",children:"Open item"})]}),v&&e.jsx("div",{className:"ctx-panel-empty","data-tone":"error",children:v}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"State"}),e.jsx(t,{label:"phase",value:s.currentPhase}),e.jsx(t,{label:"state",value:s.state}),e.jsx(t,{label:"attention",value:s.attention==="silent"?null:s.attention}),e.jsx(t,{label:"waiting on",value:s.waitingOn?.label??null}),e.jsx(t,{label:"acceptance",value:s.acceptanceState==="none"?null:s.acceptanceState}),e.jsx(t,{label:"priority",value:s.priority}),e.jsx(t,{label:"labels",value:s.labels.length>0?s.labels.join(", "):null})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Venue"}),e.jsx(t,{label:"owner",value:s.ownerName??s.ownerId}),e.jsx(t,{label:"host",value:s.hostLabel??(s.hostNodeId?s.hostNodeId:null)}),e.jsx(t,{label:"project",value:s.projectRoot})]}),a&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Latest flight"}),e.jsx(t,{label:"state",value:a.state}),e.jsx(t,{label:"summary",value:a.summary}),e.jsx(t,{label:"started",value:a.startedAt!==null?r(a.startedAt):null}),e.jsx(t,{label:"completed",value:a.completedAt!==null?r(a.completedAt):null}),s.activeFlightCount>0&&e.jsx(t,{label:"active",value:`${s.activeFlightCount} in flight`})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsx(t,{label:"last",value:s.lastMeaningfulSummary}),e.jsx(t,{label:"updated",value:`${f(s.updatedAt)} · created ${f(s.createdAt)}`})]})]})}export{Me as MeshOpsInspector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,r as h}from"./index-EsrkGBcv.js";import{u as V,a as he}from"./Provider-C35yu29I.js";import{o as Z}from"./openAgent-Dbv5wfuL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{i as pe,c as ee,n as D}from"./agent-state-DDhnFEEP.js";import{s as te}from"./colors-CFlbwC25.js";import{t as O,c as se}from"./time-Dhsh_2EG.js";import{f as ne}from"./runtime-picker-DXu2bOTh.js";import{a as R}from"./api-DSqpVKC7.js";import{u as L}from"./sse-BCPRocpq.js";import{r as E}from"./terminal-relay-Bxs1hp-j.js";import{q as oe}from"./terminal-takeover-Ay5C2c-M.js";import{r as fe,s as ve,a as be,b as je,c as ke}from"./session-catalog-CvSdPHPe.js";import{p as re}from"./NewChatComposer-C97-iTMK.js";import{p as ge,r as Ne,s as we}from"./SessionHopMenu-E6VJZrE0.js";import{A as ye}from"./AgentAvatar-CrP1eXxk.js";import{A as Ce}from"./AgentLiveActions-CfTupTEl.js";import{T as H}from"./TmuxPeek-CXFeweMg.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"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./createLucideIcon-zZ8Hx7er.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./file-text-CnISiiw6.js";import"./x-DAehov0E.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./keyboard-nav-DDHegDbx.js";import"./media-blobs-Bi8pxr1u.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./index-BWHgHrtv.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./external-link-CUObqmgX.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";/* empty css */import"./refresh-cw-BmVr7sCD.js";const Se=new Intl.NumberFormat("en-US"),Ie=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function M(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?Se.format(e):Ie.format(e).toLowerCase()}function Ae(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const s=Math.round(e),a=Math.floor(s/3600),n=Math.floor(s%3600/60),i=s%60;return a>0?`${a}h ${n}m`:n>=10||i===0?`${n}m`:`${n}m ${i}s`}function Re(e){return e.replace(/\.local$/i,"").replace(/-local-openscout$/i,"")}function Y(e){const s=e?.trim();return s?s.toLowerCase()==="a2a"?"A2A":s:null}function X(e){const s=e?.trim();return s?s==="claude_stream_json"?"Claude stream-json worker":s==="codex_app_server"?"Codex app server":s==="pi_rpc"?"Pi RPC":s==="tmux"?"tmux terminal":s:null}function ae(e){return!!(e.providerName||Y(e.protocol)||(e.skills?.length??0)>0)}async function $e(e){await R("/api/local-path/reveal",{method:"POST",body:JSON.stringify({path:e.path,agentId:e.agentId,...e.basePath?{basePath:e.basePath}:{},...e.sessionId?{sessionId:e.sessionId}:{}})})}function ie(e){$e(e).catch(s=>{console.warn("Failed to reveal local path",s)})}function Gt(){const{route:e,agents:s,navigate:a}=V();if(e.view==="agent-info")return t.jsx(Te,{conversationId:e.conversationId,agents:s,navigate:a,route:e});if(e.view==="agents-v2"){if(!e.agentId)return null;const n=s.find(i=>i.id===e.agentId)??null;return n?t.jsx(ce,{agent:n,agents:s,navigate:a,route:e,observeMode:e.tab==="observe",showStaticIdentity:!1}):null}return null}function Te({conversationId:e,agents:s,navigate:a,route:n}){const[i,m]=h.useState(null),[x,v]=h.useState(null),[p,f]=h.useState(!1),r=h.useCallback(async()=>{const o=await R(`/api/session/${encodeURIComponent(e)}`).catch(()=>null);m(o),f(!0)},[e]);h.useEffect(()=>{f(!1),r()},[r]),L(()=>{r()});const d=i?.agentId??null;h.useEffect(()=>{if(!d||s.some(c=>c.id===d)){v(null);return}let o=!1;return R(`/api/agents/${encodeURIComponent(d)}`).then(c=>{o||v(c)}).catch(()=>{o||v(null)}),()=>{o=!0}},[s,d]);const u=h.useMemo(()=>d?s.find(o=>o.id===d)??(x?.id===d?x:null):null,[x,s,d]);return p?u?t.jsx(ce,{agent:u,agents:s,navigate:a,route:n,observeMode:!1}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[t.jsx(C,{label:"Conversation",value:e}),t.jsx("div",{className:"mt-2 text-xs font-mono uppercase tracking-[0.15em] leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"No live agent registration matches this profile."})]}):t.jsx("div",{className:"flex h-full items-center justify-center p-4 text-center text-sm italic text-[var(--scout-chrome-ink-faint)]",children:"Loading agent context..."})}function ce({agent:e,agents:s,navigate:a,route:n,observeMode:i,showStaticIdentity:m=!0}){const x=pe(e.state),[v,p]=h.useState(null),[f,r]=h.useState(null),[d,u]=h.useState(null),o=e.skills??[],c=Y(e.protocol),j=ae(e),S=h.useCallback(async()=>{const[g,ue,xe]=await Promise.all([R("/api/fleet").catch(()=>null),R(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null),R(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null)]);g&&p(g),r(ue),u(xe)},[e.id]);h.useEffect(()=>{S()},[S]),h.useEffect(()=>{r(null),u(null)},[e.id]),L(()=>{S()});const{focusedSession:l,focusSession:w}=V(),k=fe(e,f),y=h.useMemo(()=>ve(f?.sessions??[],k),[f?.sessions,k]),$=n.view==="agents-v2"&&n.agentId===e.id?n.sessionId:null,I=be(e.id,l,k,y,$),P=je($,y);h.useEffect(()=>{P&&(l?.agentId===e.id&&l.sessionId===P||w(e.id,P))},[e.id,l?.agentId,l?.sessionId,w,P]);const b=y.find(g=>g.id===I)??null,_=!!(b&&k&&b.id===k),z=d?.sessionId?.trim()||d?.data.metadata?.session?.externalSessionId?.trim()||d?.data.metadata?.session?.threadId?.trim()||null,T=b&&_&&z?z:b?.id??null,U=b&&T&&T!==b.id?b.id:null,W=b?ke(e,f,b,_):{canObserve:!1,canTakeover:!1},de=()=>F(a,{view:"terminal",agentId:e.id,mode:"observe"},{returnTo:n}),B=()=>F(a,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:n}),me=()=>{if(E(e)){B();return}const g=f?.resumeCommand;if(g){oe({command:g,cwd:f?.resumeCwd,agentId:e.id}).then(()=>B());return}B()};return m?t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--scout-chrome-border-soft)] pb-3",children:[t.jsx(ye,{agent:e,placement:"inspector"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"truncate text-lg text-[var(--scout-chrome-ink-strong)]",children:e.name}),e.handle&&t.jsxs("span",{className:"truncate text-md font-mono text-[var(--scout-chrome-ink-faint)]",title:e.handle,children:["@",e.handle.replace(/^@+/,"")]})]})]}),t.jsx(Ce,{agent:e,catalog:f,navigate:a,returnTo:n,variant:"compact"}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsxs(N,{label:"State",children:[t.jsxs("div",{className:"flex items-baseline gap-2",children:[t.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:te(e.state),opacity:x?1:.4}}),t.jsx("span",{className:"text-md capitalize text-[var(--scout-chrome-ink)]",children:ee(e.state)})]}),e.updatedAt&&t.jsxs("div",{className:"mt-1 text-xs font-mono text-[var(--scout-chrome-ink-faint)]",children:["Updated ",O(e.updatedAt)]})]}),t.jsx(N,{label:"Presence",children:t.jsx(Fe,{focusAgent:e,agents:s,onOpenAgent:g=>Z(a,g,{returnTo:n})})}),i&&t.jsx(q,{agentId:e.id}),v&&t.jsx(Q,{asks:v.activeAsks,agentId:e.id,navigate:a}),t.jsxs(N,{label:"Identity",children:[e.providerName&&t.jsx(C,{label:"Provider",value:e.providerName}),c&&t.jsx(C,{label:"Protocol",value:c}),!j&&t.jsx(C,{label:"Class",value:e.agentClass}),!j&&e.role&&t.jsx(C,{label:"Role",value:ne(e.role)??e.role}),!j&&e.harness&&t.jsx(C,{label:"Harness",value:e.harness}),!j&&e.transport&&t.jsx(C,{label:"Transport",value:X(e.transport)??e.transport}),(e.homeNodeName||e.homeNodeId)&&t.jsx(C,{label:"Host",value:Re(e.homeNodeName??e.homeNodeId??"")})]}),o.length>0&&t.jsx(N,{label:`Skills · ${o.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:o.map(g=>t.jsx("span",{className:"rounded-sm bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 text-xs font-mono text-[var(--scout-chrome-ink-soft)]",children:g},g))})}),(e.project||e.branch||e.cwd)&&t.jsxs(N,{label:"Project",children:[e.project&&t.jsx(C,{label:"Name",value:e.project}),e.branch&&t.jsx(C,{label:"Branch",value:e.branch}),e.cwd&&t.jsx(C,{label:"Cwd",value:e.cwd})]}),e.capabilities.length>0&&t.jsx(N,{label:`Capabilities · ${e.capabilities.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:e.capabilities.map(g=>t.jsx("span",{className:"rounded-sm bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 text-xs font-mono text-[var(--scout-chrome-ink-soft)]",children:g},g))})}),t.jsx(Oe,{agent:e,catalog:f,navigate:a,returnTo:n})]}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[b&&t.jsxs(N,{label:"Session",children:[t.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t.jsx("span",{className:"truncate font-mono text-md text-[var(--scout-chrome-ink)]",title:T??b.id,children:le(T??b.id)}),t.jsx("span",{className:"shrink-0 font-mono text-2xs uppercase tracking-[0.12em]",style:{color:_?"var(--accent)":"var(--scout-chrome-ink-faint)"},children:_?"now":b.endedAt?`ended · ${O(b.endedAt)||"recent"}`:O(b.startedAt)||"recent"})]}),b.cwd&&t.jsx("div",{className:"mt-1 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",title:b.cwd,children:b.cwd}),T&&t.jsxs("div",{className:"mt-1 break-all font-mono text-2xs leading-snug text-[var(--scout-chrome-ink-faint)]",title:T,children:[t.jsx("span",{className:"uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:"id"})," ",T]}),U&&t.jsxs("div",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",title:U,children:["profile ",U]}),t.jsx("div",{className:"mt-2.5 flex flex-col gap-1.5",children:t.jsxs(Pe,{label:"Terminal",children:[t.jsx(G,{onClick:de,disabled:!W.canObserve,title:W.canObserve?"Watch the live terminal, read-only":"No live terminal to observe",children:"Observe"}),t.jsx(G,{onClick:me,disabled:!W.canTakeover,title:W.canTakeover?"Grab the keyboard and drive it":"Can't take over this session",children:"Take over"})]})})]}),!i&&b&&t.jsx(We,{agentId:e.id,navigate:a,cwd:b.cwd??e.cwd,route:n}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsx(N,{label:"Runtime",children:t.jsx(Me,{agent:e})}),i&&t.jsx(q,{agentId:e.id}),v&&t.jsx(Q,{asks:v.activeAsks,agentId:e.id,navigate:a})]})}function Me({agent:e}){const s=[],a=(m,x)=>{x&&x.trim()&&s.push({label:m,value:x.trim()})},n=Y(e.protocol);return ae(e)?a("Protocol",n):(a("Role",ne(e.role)),a("Class",e.agentClass)),s.length===0?null:t.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-2",children:s.map(m=>t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:m.label}),t.jsx("div",{className:"truncate font-mono text-sm text-[var(--scout-chrome-ink)]",children:m.value})]},m.label))})}function Pe({label:e,children:s}){return t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"w-[56px] shrink-0 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("div",{className:"flex gap-1.5",children:s})]})}function G({onClick:e,disabled:s,title:a,children:n}){return t.jsx("button",{type:"button",onClick:e,disabled:s,title:a,className:"rounded-[4px] border border-[var(--scout-chrome-border-soft)] px-2.5 py-1 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-soft)] transition-colors hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-[var(--scout-chrome-ink-soft)]",children:n})}function Oe({agent:e,catalog:s,navigate:a,returnTo:n}){const i=he(),m=E(e),x=s?.activeSessionId??(m?e.harnessSessionId??m.sessionName:null),p=h.useMemo(()=>Ee(e,s,x),[e,s,x]).filter(c=>c.id===x||!c.endedAt),f=p.slice(0,5);if(f.length===0)return null;const r=c=>F(a,{view:"terminal",agentId:e.id,mode:c},{returnTo:n}),d=()=>{if(m){r("takeover");return}s?.resumeCommand&&oe({command:s.resumeCommand,cwd:s.resumeCwd,agentId:e.id}).then(()=>r("takeover"))},u=c=>F(a,{view:"sessions",sessionId:c},{returnTo:n}),o=(c,j,S)=>{const l=[];j&&l.push({kind:"action",label:"Observe in terminal",onSelect:()=>r("observe")}),S&&l.push({kind:"action",label:"Takeover terminal",onSelect:d});const w=ge(),k=w?Ne(w,{agentId:e.id,sessionRefs:[c.id,e.harnessSessionId]}):null,y=we({target:k,agentId:e.id,navigate:a,returnTo:n,includeWeb:!1,emptyFallback:!1});return y.length>0&&l.push({kind:"separator"},...y),l.length>0&&l.push({kind:"separator"}),l.push({kind:"action",label:"Open session detail",onSelect:()=>u(c.id)}),l.push({kind:"action",label:"Open agent profile",onSelect:()=>Z(a,e,{returnTo:n})}),l};return t.jsx(N,{label:`Running sessions · ${p.length}`,children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.map(c=>{const j=c.id===x,S=j&&!!m,l=j&&(!!m||!!s?.resumeCommand),w=O(c.startedAt)||"recent",k=X(c.transport)??c.harness??X(e.transport)??e.harness??"session",y=j?w:c.endedAt?`${O(c.endedAt)||w} ended`:k,$=o(c,S,l);return t.jsxs("div",{onContextMenu:I=>i(I,$),className:`rounded border px-2 py-1.5 transition-colors ${j?"border-[color-mix(in_srgb,var(--accent)_40%,transparent)] bg-[color-mix(in_srgb,var(--accent)_8%,transparent)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)]"}`,children:[t.jsxs("button",{type:"button",title:S?`Observe terminal ${c.id}`:`Open session ${c.id}`,onClick:()=>S?r("observe"):u(c.id),className:"flex w-full items-center justify-between gap-2 bg-transparent p-0 text-left",children:[t.jsxs("span",{className:"flex min-w-0 flex-col",children:[t.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[j&&t.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[var(--accent)]"}),t.jsx("span",{className:"truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:le(c.id)}),t.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-hover)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:k})]}),t.jsx("span",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:c.cwd?re(c.cwd):"workspace"})]}),t.jsxs("span",{className:"flex shrink-0 flex-col items-end",children:[t.jsx("span",{className:"font-mono text-2xs uppercase tracking-[0.12em] text-[var(--accent)]",children:j?"active":"running"}),t.jsx("span",{className:"mt-0.5 max-w-[78px] truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:y})]})]}),t.jsx("button",{type:"button",title:"Session actions",onClick:I=>i(I,$),className:"mt-1.5 h-5 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]",children:"..."})]},c.id)}),p.length>f.length&&t.jsxs("div",{className:"px-1 pt-0.5 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[p.length-f.length," more running"]})]})})}function Ee(e,s,a){const n=[...s?.sessions??[]],i=E(e);return i&&a&&!n.some(m=>m.id===a)&&n.unshift({id:a,startedAt:e.createdAt??e.updatedAt??Date.now(),cwd:e.cwd??e.projectRoot??".",...e.harness?{harness:e.harness}:{},transport:i.backend,model:e.model}),n.sort((m,x)=>{const v=m.endedAt??m.startedAt,p=x.endedAt??x.startedAt;return se(v,p)})}function le(e){const s=e.replace(/^session[_:-]?/i,"");return s.length>10?s.slice(0,8):s}function q({agentId:e}){const[s,a]=h.useState(null),n=h.useCallback(async()=>{const i=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);a(i)},[e]);return h.useEffect(()=>{n()},[n]),L(()=>{n()}),s?.data?t.jsx(_e,{agentId:e,data:s.data,sessionId:s.sessionId}):t.jsx(N,{label:"Trace",children:t.jsx("div",{className:"text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Resolving session trace."})})}function _e({agentId:e,data:s,sessionId:a}){const n=s.metadata?.session,i=s.events,m=s.files,x=i.filter(o=>o.kind==="tool").length,v=i.filter(o=>o.kind==="think").length,p=i.filter(o=>o.kind==="ask").length,f=i.filter(o=>o.kind==="tool"&&o.tool==="read").length,r=i.filter(o=>o.kind==="tool"&&(o.tool==="edit"||o.tool==="write")).length,d=i.length>0?i[i.length-1].t:0,u=n?.threadPath;return t.jsxs(t.Fragment,{children:[t.jsxs(N,{label:"Session",children:[a&&t.jsx(C,{label:"Active",value:a}),u&&t.jsx(K,{label:"Source",path:u,basePath:n?.cwd??null,value:re(u),agentId:e,sessionId:a}),n?.cwd&&t.jsx(K,{label:"Workspace",path:n.cwd,value:n.cwd,agentId:e,sessionId:a})]}),t.jsx(N,{label:"Trace stats",children:t.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[t.jsx(A,{label:"Turns",value:M(n?.turnCount)}),t.jsx(A,{label:"Tools",value:M(x)}),t.jsx(A,{label:"Thinks",value:M(v)}),t.jsx(A,{label:"Requests",value:M(p)}),t.jsx(A,{label:"Reads",value:M(f)}),t.jsx(A,{label:"Edits",value:M(r)}),t.jsx(A,{label:"Files",value:M(m.length)}),t.jsx(A,{label:"Window",value:Ae(d)})]})}),m.length>0&&t.jsx(N,{label:`Files touched · ${m.length}`,children:t.jsx("div",{className:"flex flex-col gap-1",children:m.slice(0,8).map(o=>t.jsxs("button",{type:"button",title:o.path,onClick:()=>ie({path:o.path,basePath:n?.cwd??null,agentId:e,sessionId:a}),className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1 text-left hover:border-[var(--accent)]",children:[t.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-[var(--scout-chrome-ink-soft)]",children:o.path}),t.jsxs("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:["x",o.touches]})]},o.path))})})]})}function J(e,s){return e?.view==="agents-v2"?{...e,view:"agents-v2",agentId:s,tab:"observe"}:{view:"agents-v2",agentId:s,tab:"observe"}}function We({agentId:e,navigate:s,cwd:a,route:n}){const[i,m]=h.useState(null),x=h.useCallback(async()=>{const l=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);m(l)},[e]);h.useEffect(()=>{x()},[x]),L(()=>{x()});const v=i?.data;if(!v||v.files.length===0)return null;const p=v.files,r=[...p].sort((l,w)=>{const k=l.state==="read"?0:1,y=w.state==="read"?0:1;return k!==y?y-k:w.touches-l.touches}).slice(0,6),d=p.length-r.length,u=p.filter(l=>l.state!=="read").length,o=v.metadata?.session?.cwd??a??null,c=i.sessionId??v.metadata?.session?.externalSessionId??void 0,j=()=>s(o?{view:"repo-diff",path:o,agentId:e,include:"changed",...c?{sessionId:c}:{}}:J(n,e)),S=()=>s(o?{view:"repo-diff",path:o}:J(n,e));return t.jsxs(N,{label:"Files changed",children:[t.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between font-mono text-3xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:[t.jsx("span",{children:u>0?`${u} changed`:"touched"}),t.jsx("span",{className:"tabular-nums",children:p.length})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[r.map(l=>{const w=l.path.replace(/\/+$/,"").split("/"),k=w.pop()??l.path,y=w.pop(),$=y?`${y}/`:"",I=l.state!=="read",P=l.state==="created"?"+":l.state==="modified"?"~":"·";return t.jsxs("div",{className:"flex items-baseline justify-between gap-2 font-mono text-xs leading-tight",title:`${l.path} · ${l.state}`,children:[t.jsxs("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[t.jsx("span",{className:"flex-none tabular-nums",style:{color:I?"var(--accent)":"var(--scout-chrome-ink-ghost)"},children:P}),t.jsxs("span",{className:"flex min-w-0 items-baseline",children:[t.jsx("span",{className:"truncate text-[var(--scout-chrome-ink-ghost)]",children:$}),t.jsx("span",{className:"flex-none",style:{color:I?"var(--scout-chrome-ink-soft)":"var(--scout-chrome-ink-faint)"},children:k})]})]}),t.jsxs("span",{className:"shrink-0 tabular-nums text-2xs text-[var(--scout-chrome-ink-faint)]",children:["×",l.touches]})]},l.path)}),t.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1",children:[t.jsxs("button",{type:"button",onClick:j,className:"w-fit cursor-pointer font-mono text-2xs uppercase tracking-[0.1em] text-[var(--accent)] hover:underline",children:["Session diff",d>0?` · +${d}`:""," →"]}),t.jsx("button",{type:"button",onClick:S,className:"w-fit cursor-pointer font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--accent)] hover:underline",children:"Worktree diff →"})]})]})]})}function K({label:e,path:s,basePath:a,value:n,agentId:i,sessionId:m}){return t.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[t.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("button",{type:"button",title:`Reveal ${s}`,onClick:()=>ie({path:s,basePath:a,agentId:i,sessionId:m}),className:"min-w-0 truncate bg-transparent p-0 text-right font-mono text-sm text-[var(--accent)] hover:text-[var(--scout-chrome-ink)] hover:underline",children:n})]})}function A({label:e,value:s}){return t.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5",children:[t.jsx("div",{className:"font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("div",{className:"mt-0.5 font-mono text-md text-[var(--scout-chrome-ink)]",children:s})]})}function Fe({focusAgent:e,agents:s,onOpenAgent:a}){const p=h.useMemo(()=>{const r=s.filter(u=>u.id!==e.id),d=u=>{const o=D(u);return o==="in_turn"?0:o==="in_flight"?1:2};return r.slice().sort((u,o)=>{const c=d(u.state??""),j=d(o.state??"");return c!==j?c-j:se(u.updatedAt,o.updatedAt)}).slice(0,8)},[s,e.id]),f=h.useMemo(()=>{const r=[{agent:e,x:120,y:90,focused:!0}];return p.forEach((d,u)=>{const o=2*Math.PI*u/Math.max(p.length,1)-Math.PI/2;r.push({agent:d,x:120+68*Math.cos(o),y:90+68*Math.sin(o),focused:!1})}),r},[e,p,120,90,68]);return t.jsxs("div",{className:"@container flex flex-wrap items-start gap-3",children:[t.jsxs("svg",{viewBox:"0 0 240 180",className:"block mx-auto shrink-0 w-full",style:{maxWidth:240},xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("defs",{children:t.jsxs("radialGradient",{id:"inspMeshGlow",cx:"50%",cy:"50%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--accent)",stopOpacity:"0.06"}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:"0"})]})}),t.jsx("circle",{cx:120,cy:90,r:82,fill:"url(#inspMeshGlow)"}),t.jsx("circle",{cx:120,cy:90,r:68,fill:"none",stroke:"var(--border)",strokeDasharray:"2 4"}),f.slice(1).map((r,d)=>t.jsxs("g",{children:[t.jsx("line",{x1:120,y1:90,x2:r.x,y2:r.y,stroke:"var(--accent)",strokeWidth:1,opacity:.6}),t.jsx("circle",{r:2,fill:"var(--accent)",children:t.jsx("animateMotion",{dur:`${2+d*.3}s`,repeatCount:"indefinite",path:`M 120,90 L ${r.x},${r.y}`})})]},`e-${r.agent.id}`)),f.map(r=>{const d=D(r.agent.state),u=d==="in_turn"||d==="in_flight"||d==="callable",o=r.focused?14:9;return t.jsxs("g",{style:{cursor:"pointer"},onClick:()=>a(r.agent),children:[u&&t.jsxs("circle",{cx:r.x,cy:r.y,r:o+5,fill:"none",stroke:"var(--accent)",strokeWidth:.8,opacity:.3,children:[t.jsx("animate",{attributeName:"r",values:`${o};${o+8};${o}`,dur:"2.5s",repeatCount:"indefinite"}),t.jsx("animate",{attributeName:"opacity",values:"0.3;0;0.3",dur:"2.5s",repeatCount:"indefinite"})]}),t.jsx("circle",{cx:r.x,cy:r.y,r:o,fill:"var(--hud-surface)",stroke:r.focused?"var(--accent)":"var(--surface)",strokeWidth:r.focused?1.5:1}),t.jsx("text",{x:r.x,y:r.y,dy:"0.35em",textAnchor:"middle",fontFamily:"var(--hud-font-sans)",fontSize:r.focused?10:8,fontWeight:600,fill:"var(--scout-chrome-ink-strong)",children:r.agent.name[0].toUpperCase()}),t.jsx("text",{x:r.x,y:r.y+o+10,textAnchor:"middle",fontFamily:"var(--hud-font-sans)",fontSize:8,fill:"var(--dim)",letterSpacing:"0.04em",children:r.agent.name.length>9?r.agent.name.slice(0,8)+"...":r.agent.name})]},r.agent.id)})]}),p.length>0&&t.jsx("ul",{className:"@max-[380px]:hidden flex-1 min-w-[120px] flex flex-col gap-1 m-0 p-0 list-none",children:p.map(r=>{const d=D(r.state);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>a(r),className:"w-full flex items-center gap-2 py-1 px-1.5 rounded hover:bg-[var(--surface-hover)] text-left",children:[t.jsx("span",{"aria-hidden":!0,className:"shrink-0 w-2 h-2 rounded-full",style:{background:"var(--scout-chrome-ink-faint)"}}),t.jsx("span",{className:"flex-1 truncate text-md font-sans text-[var(--scout-chrome-ink)]",children:r.name}),t.jsx("span",{"aria-hidden":!0,title:ee(r.state),className:"shrink-0 w-1.5 h-1.5 rounded-full",style:{background:te(d)}})]})},r.id)})})]})}function Q({asks:e,agentId:s,navigate:a}){const n=e.filter(i=>i.agentId===s&&(i.status==="needs_attention"||i.status==="queued"));return n.length===0?null:t.jsx(N,{label:`Incoming requests · ${n.length}`,children:t.jsx("div",{className:"flex flex-col gap-2",children:n.map(i=>t.jsxs("div",{className:"p-2.5 rounded-md border border-amber-500/30 bg-amber-500/[0.04] cursor-pointer hover:bg-amber-500/[0.08] transition-colors",onClick:()=>{i.conversationId&&a({view:"agents-v2",agentId:s,conversationId:i.conversationId})},children:[t.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.12em] text-amber-500/80 mb-1",children:"awaiting"}),t.jsx("div",{className:"line-clamp-2 text-sm leading-relaxed text-[var(--scout-chrome-ink)]",children:i.summary??i.task}),t.jsxs("div",{className:"mt-1.5 text-2xs font-mono text-[var(--scout-chrome-ink-ghost)]",children:[i.harness??"operator"," → ",i.agentName??"agent"]})]},i.invocationId))})})}function N({label:e,children:s}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"mb-1.5 text-md font-sans font-medium text-[var(--scout-chrome-ink-faint)]",children:e}),s]})}function C({label:e,value:s}){return t.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[t.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",title:s,children:s})]})}export{Gt as AgentsInspector};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as d,j as s}from"./index-EsrkGBcv.js";/* empty css */import{a as P}from"./api-DSqpVKC7.js";import{u as U,a as $,b as M,c as H,r as X,w as V,f as o,d as Y,e as _,t as z,g as Q,h as Z,i as ss,s as es}from"./ui-LM8pS8qE.js";import{B as as,u as ns}from"./selection-bridge-x3wFUjxj.js";function ts(n){return n.error!=null?{label:"SCAN ERR",cls:"err"}:n.status.conflicts>0?{label:"CONFLICT",cls:"conflict"}:n.status.clean?{label:"CLEAN",cls:"clean"}:{label:"DIRTY",cls:"dirty"}}function cs(n){const t=(n.state??"").toLowerCase();return t==="active"?"ACTIVE":t==="idle"?"IDLE":t==="waiting"?"WAITING":"—"}function ls(n){const t=n.lastIndexOf("/");return t<0?{dir:"",file:n}:{dir:n.slice(0,t+1),file:n.slice(t+1)}}function is(n){return n.status.clean?"clean":`staged ${n.status.staged}, unstaged ${n.status.unstaged}, untracked ${n.status.untracked}, conflicts ${n.status.conflicts}, changed files ${n.status.changedFiles}`}function rs(n,t,u){const l=["Operator request:",n,"","Repo Watch context:",`- Project: ${u.name}`,`- Project root: ${u.root}`,`- Project attention: ${u.attention}`,`- Worktree: ${t.path}`,`- Branch: ${t.branch.name??t.branch.head??"detached"}`];t.branch.upstream&&l.push(`- Upstream: ${t.branch.upstream}`),l.push(`- Drift: ahead ${t.branch.ahead}, behind ${t.branch.behind}`,`- Status: ${is(t)}`);const p=M(t),i=H(t);if(p.has&&l.push(`- Branch churn: +${p.add} -${p.del}`),i.has&&l.push(`- Working-tree churn: +${i.add} -${i.del}`),t.attentionReasons.length>0&&l.push(`- Attention reasons: ${t.attentionReasons.join("; ")}`),t.status.files.length>0){const T=t.status.files.slice(0,8).map(h=>`${h.status}: ${h.path}`).join(", ");l.push(`- Changed files: ${T}`)}return l.join(`
|
|
2
|
-
`)}function ds({worktree:n,project:t,generatedAt:u}){const[l,p]=d.useState(""),[i,T]=d.useState("scout"),[h,k]=d.useState(!1),[R,g]=d.useState(null),[O,A]=d.useState(null),[B,K]=d.useState(!1),x=d.useMemo(()=>n?U(n):[],[n]),E=d.useMemo(()=>x.slice(0,8),[x]),I=d.useMemo(()=>{if(i==="scout")return"Scout";const e=i.replace(/^agent:/,""),c=E.find(m=>m.id===e);return c?$(c):"Agent"},[E,i]);async function w(){const e=l.trim();if(!(!e||h||!n||!t)){k(!0),g(null),A(null);try{const c=rs(e,n,t);if(i==="scout")await P("/api/send",{method:"POST",body:JSON.stringify({body:c})}),g("Sent to Scout");else{const m=i.replace(/^agent:/,"");await P("/api/ask",{method:"POST",body:JSON.stringify({body:c,targetAgentId:m,targetLabel:m,metadata:{source:"repo-watch",originSurface:"repo-watch",handoffKind:"repo-watch-agent-ask",targetAgentId:m}})}),g(`Sent to ${I}`)}p("")}catch(c){A(c instanceof Error?c.message:String(c))}finally{k(!1)}}}if(!n||!t)return s.jsx("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:s.jsxs("div",{className:"rw-ctx-empty",children:[s.jsx("span",{className:"eb",children:"CONTEXT · WORKTREE"}),s.jsx("span",{className:"msg",children:"Select a worktree to inspect"})]})});const a=n,r=a.branch,N=5,f=x.length+a.sessions.length,b=!B&&f>N,y=b?x.slice(0,N):x,D=b?a.sessions.slice(0,Math.max(0,N-y.length)):a.sessions,q=f-y.length-D.length,L=ts(a),j=M(a),v=H(a),{add:S,del:C,has:G}=X(a),W=S+C||1,F=[{label:"staged",n:a.status.staged},{label:"unstaged",n:a.status.unstaged},{label:"untracked",n:a.status.untracked},{label:"conflicts",n:a.status.conflicts,cls:"conf"}].filter(e=>e.n>0);return s.jsxs("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:[s.jsxs("div",{className:"ctx-h",children:[s.jsx("div",{className:"ctx-eyebrow",children:s.jsx("span",{children:"CONTEXT · WORKTREE"})}),s.jsxs("div",{className:"ctx-repo",children:[s.jsx("span",{className:"dot "+V(a)}),s.jsx("span",{className:"rn",children:t.name}),s.jsx("span",{className:"ctx-state "+L.cls,children:L.label})]}),s.jsx("div",{className:"ctx-branch",children:s.jsx(as,{branch:r,fallback:a.name})}),s.jsxs("div",{className:"ctx-path",children:[a.path,r.upstream?s.jsxs("span",{className:"ref",children:[" · ",r.upstream]}):null]})]}),s.jsxs("div",{className:"ctx-stats",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.ahead>0?" mint":" dim"),children:["↑",r.ahead]}),s.jsx("div",{className:"k",children:"AHEAD"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.behind>0?" amber":" dim"),children:["↓",r.behind]}),s.jsx("div",{className:"k",children:"BEHIND"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"v"+(a.status.changedFiles>0?"":" dim"),children:a.status.changedFiles}),s.jsx("div",{className:"k",children:"FILES"})]})]}),F.length>0?s.jsx("div",{className:"ctx-breakdown",children:F.map(e=>s.jsxs("span",{className:"ctx-chip"+(e.cls?" "+e.cls:""),children:[s.jsx("span",{className:"n",children:e.n}),e.label]},e.label))}):null,s.jsxs("div",{className:"ctx-body",children:[a.attentionReasons.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTENTION"}),s.jsx("span",{className:"n",children:a.attentionReasons.length})]}),s.jsx("div",{className:"ctx-why",children:a.attentionReasons.map((e,c)=>s.jsx("span",{className:"pill",children:e},c))})]}):null,a.error?s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"SCAN ERROR"})}),s.jsx("div",{className:"ctx-err",children:a.error})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"CHURN"}),s.jsx("span",{className:"n",children:j.has?"reviewable":"working tree"})]}),G?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ctx-churn",children:[s.jsxs("span",{className:"nums",children:[s.jsxs("span",{className:"add",children:["+",o(S)]}),s.jsx("span",{className:"sl",children:"/"}),s.jsxs("span",{className:"del",children:["−",o(C)]})]}),s.jsxs("span",{className:"cbar",title:`+${o(S)} −${o(C)}`,children:[s.jsx("span",{className:"g",style:{width:S/W*100+"%"}}),s.jsx("span",{className:"r",style:{width:C/W*100+"%"}})]})]}),s.jsxs("span",{className:"ctx-churn-clean",children:[j.has?`branch +${o(j.add)} −${o(j.del)}`:null,j.has&&v.has?" · ":null,v.has?`working tree +${o(v.add)} −${o(v.del)}`:null]})]}):s.jsx("div",{className:"ctx-churn-clean",children:a.status.clean?"working tree clean":"no line changes"})]}),a.status.files.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"FILES CHANGED"}),s.jsx("span",{className:"n",children:a.status.files.length})]}),a.status.files.map(e=>{const c=Y(e.status),{dir:m,file:J}=ls(e.path);return s.jsxs("div",{className:"ctx-fchg",children:[s.jsx("span",{className:"badge",style:{color:Q(c),background:z(c)},title:e.status,children:_(e.status)}),s.jsxs("span",{className:"fp",title:e.path,children:[s.jsx("span",{className:"dir",children:m}),J]})]},e.path)})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"LAST COMMIT"})}),s.jsx("div",{className:"ctx-commit",children:a.lastCommitAt!=null||r.head?s.jsxs(s.Fragment,{children:[r.head?s.jsx("span",{className:"hash",children:r.head.slice(0,7)}):null,s.jsxs("span",{className:"t",children:[Z(a.lastCommitAt,u)," ago"]})]}):s.jsx("span",{className:"none",children:"no commit data"})})]}),s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTACHED SESSIONS"}),s.jsxs("span",{className:"n",children:[x.length," handle",x.length===1?"":"s",a.sessions.length>0?` · ${a.sessions.length} session${a.sessions.length===1?"":"s"}`:""]})]}),f>0?s.jsxs(s.Fragment,{children:[y.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d "+(ss(e)?"on":"off")}),s.jsx("span",{className:"h",children:$(e)}),s.jsx("span",{className:"role",children:cs(e)})]},$(e))),D.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d off"}),s.jsx("span",{className:"h",children:es(e)}),s.jsx("span",{className:"role",children:"SESSION"})]},e.id)),f>N?s.jsx("button",{type:"button",className:"ctx-more",onClick:()=>K(e=>!e),"aria-expanded":!b,children:b?`+${q} more`:"Show less"}):null]}):s.jsx("div",{className:"ctx-none",children:"no attached sessions"})]})]}),s.jsxs("div",{className:"ctx-ask",children:[s.jsx("textarea",{value:l,onChange:e=>{p(e.currentTarget.value),g(null),A(null)},onKeyDown:e=>{e.stopPropagation(),(e.metaKey||e.ctrlKey)&&e.key==="Enter"&&(e.preventDefault(),w())},disabled:h,rows:3,placeholder:i==="scout"?"Message Scout about this worktree":"Message this agent about the worktree"}),s.jsxs("div",{className:"ctx-ask-bar",children:[s.jsxs("select",{value:i,onChange:e=>T(e.currentTarget.value),onKeyDown:e=>e.stopPropagation(),disabled:h,"aria-label":"Message target",children:[s.jsx("option",{value:"scout",children:"Scout"}),E.map(e=>s.jsx("option",{value:`agent:${e.id}`,children:$(e)},e.id))]}),s.jsx("button",{className:"ctx-btn primary",type:"button",disabled:h||l.trim().length===0,onClick:()=>{w()},children:h?"Sending":"Send"})]}),s.jsxs("div",{className:"ctx-ask-foot",children:[O?s.jsx("span",{className:"err",children:O}):R?s.jsx("span",{className:"ok",children:R}):s.jsxs("span",{children:["Repo Watch context included · ",I]}),s.jsx("button",{type:"button",title:"Copy worktree path",onClick:()=>{navigator.clipboard?.writeText(a.path)},children:"Copy path"})]})]})]})}function ps(){const{worktree:n,project:t,generatedAt:u,tone:l}=ns();return s.jsx("div",{className:"rw-scope rw-ctx-rail-scope tone-"+l,children:s.jsx(ds,{worktree:n,project:t,generatedAt:u})})}export{ps as ReposInspector,ps as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as i}from"./index-EsrkGBcv.js";import{u as w}from"./Provider-C35yu29I.js";import{a as C}from"./api-DSqpVKC7.js";import{u as B}from"./sse-BCPRocpq.js";import{t as g}from"./time-Dhsh_2EG.js";import{B as E,b as M}from"./BrokerScreen-DwOF6bMA.js";import{b as S}from"./broker-display-BkBzyvbR.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"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./index-BWHgHrtv.js";import"./EmptyState-CZlrHXy-.js";import"./clipboard-e3fSpeo7.js";import"./status-tone-BM_zuRy1.js";import"./openContent-C6XO6kr5.js";import"./BrokerMetadataPanel-Dk242Yh_.js";import"./DispatchAftermath-66uQAorV.js";import"./follow-route-BvcGtBIL.js";import"./arrow-up-right-BPedAgxO.js";import"./ShikiPane-CRtTYkMj.js";import"./types-B0PlfpKc.js";import"./useEmbedHeadline-D6pJRxUg.js";/* empty css */import"./refresh-cw-BmVr7sCD.js";import"./external-link-CUObqmgX.js";import"./message-square-BxesYglW.js";import"./paperclip-BjcuP_Hx.js";import"./plus-DFDDeGKu.js";import"./send-horizontal-CH0-fbZE.js";import"./check-lrJ3a73a.js";import"./copy-xKeM5ZtU.js";import"./radio-DRoOZsws.js";function $(r){return`${Math.round(r*100)}%`}function R(r){switch(r){case"success":return"sent";case"failed_query":return"query";case"failed_delivery":return"delivery";default:return"attempt"}}function q(r){switch(r){case"dm":return"direct";case"channel":return"channel";case"broadcast":return"broadcast";case null:return"no route";default:return r}}function A(r){const t=new Map;for(const o of r){const n=q(o.route);t.set(n,(t.get(n)??0)+1)}return[...t.entries()].map(([o,n])=>({label:o,count:n})).sort((o,n)=>n.count-o.count||o.label.localeCompare(n.label)).slice(0,5)}function D(r){const t={sent:0,query:0,delivery:0,failures:0};for(const o of r)o.kind==="success"?t.sent+=1:o.kind==="failed_query"?t.query+=1:(o.kind==="failed_delivery"||o.kind==="delivery_attempt")&&(t.delivery+=1),S(o)&&(t.failures+=1);return t}function L(){const{inspectBrokerAttempt:r}=w(),[t,o]=i.useState(null),[n,f]=i.useState(null),l=i.useCallback(async()=>{try{const s=await C(M());o(s),f(null)}catch(s){f(s instanceof Error?s.message:String(s))}},[]);i.useEffect(()=>{l()},[l]),B(s=>{(s.kind==="message.posted"||s.kind==="delivery.planned"||s.kind==="delivery.attempted"||s.kind==="delivery.state.changed"||s.kind==="scout.dispatched")&&l()});const h=i.useMemo(()=>t?[...t.failedQueries,...t.failedDeliveries].sort((s,m)=>m.ts-s.ts).slice(0,4):[],[t]),v=i.useMemo(()=>t?t.attempts.slice().sort((s,m)=>m.ts-s.ts).slice(0,5):[],[t]),j=i.useMemo(()=>t?A(t.attempts):[],[t]),a=i.useMemo(()=>t?D(t.attempts):null,[t]),b=i.useCallback(s=>{r(s),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:420}}))},[r]);if(!t&&!n)return e.jsx("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:e.jsx(u,{title:"Dispatch context",status:"Loading broker ledger..."})});if(!t)return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsx(u,{title:"Dispatch context",status:"Broker diagnostics unavailable"}),e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5 text-sm leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:n})]});const c=t.attempts.length,y=t.ledger.hasMore.attempts?"+":"",N=c>0&&a?a.failures/c:0;return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs(u,{title:"Dispatch context",status:`${c}${y} latest route${c===1?"":"s"}`,children:[e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(d,{label:"Sent",value:`${a?.sent??0}`}),e.jsx(d,{label:"Query",value:`${a?.query??0}`}),e.jsx(d,{label:"Delivery",value:`${a?.delivery??0}`})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-2 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsxs("span",{children:[$(N)," failed"]}),e.jsx("span",{children:g(t.generatedAt)})]})]}),e.jsx(p,{label:"Route mix",children:e.jsx(_,{items:j,empty:"No route records visible"})}),e.jsx(p,{label:"Needs attention",children:h.length===0?e.jsx(x,{children:"No failed routes in history."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:h.map(s=>e.jsx(k,{attempt:s,onOpen:b},s.id))})}),e.jsx(p,{label:"Recent dispatch",children:v.length===0?e.jsx(x,{children:"No recent dispatch rows."}):e.jsx("div",{className:"flex flex-col gap-1",children:v.map(s=>e.jsx(k,{attempt:s,onOpen:b,compact:!0},s.id))})})]})}function u({title:r,status:t,children:o}){return e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5",children:[e.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),e.jsx("div",{className:"mt-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-soft)]",children:t}),o]})}function d({label:r,value:t}){return e.jsxs("div",{className:"min-w-0 rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-bg)] px-1.5 py-1",children:[e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:r}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:t})]})}function p({label:r,children:t}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),t]})}function _({items:r,empty:t}){return r.length===0?e.jsx(x,{children:t}):e.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(o=>e.jsxs("span",{className:"rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 font-mono text-xs text-[var(--scout-chrome-ink-soft)]",title:`${o.count} ${o.label}`,children:[o.label," ",o.count]},o.label))})}function x({children:r}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:r})}function k({attempt:r,onOpen:t,compact:o=!1}){return e.jsxs("button",{type:"button",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5 text-left transition-colors hover:border-[var(--scout-chrome-border)]",onClick:()=>t(r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-bg)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:R(r.kind)}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:r.detail}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(r.ts)})]}),!o&&e.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{className:"truncate",children:r.actorName??"unknown"}),e.jsx("span",{className:"shrink-0",children:"->"}),e.jsx("span",{className:"truncate",children:r.target??"none"})]})]})}function Ye({selectedAttempt:r,navigate:t,onClose:o}){return r?e.jsx(E,{attempt:r,navigate:t,onClose:o}):e.jsx(L,{})}export{Ye as BrokerRight};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-EsrkGBcv.js";import{u as xt}from"./Provider-C35yu29I.js";import{o as pe}from"./openContent-C6XO6kr5.js";import{a as W}from"./api-DSqpVKC7.js";import{u as ft}from"./sse-BCPRocpq.js";import{u as jt}from"./tail-events-d0yAYxR0.js";import{n as gt,a as Nt,c as Ue}from"./agent-state-DDhnFEEP.js";import{s as Oe}from"./colors-CFlbwC25.js";import{A as It}from"./AgentLiveActions-CfTupTEl.js";import{i as yt,a as wt,c as St}from"./message-visibility-DwxgcgYK.js";import{d as bt,b as Tt,e as kt,g as Ct,m as At,c as Ve,s as Rt,a as Lt}from"./conversation-model-FxDeWlle.js";import{c as Et,e as Pt,t as F,f as he}from"./time-Dhsh_2EG.js";import{b as $t}from"./conversations-DoAAO6kA.js";import{d as Mt}from"./router-DCtl8wqb.js";import{T as _t}from"./TmuxPeek-CXFeweMg.js";import{S as Bt}from"./scroll-text-DNjxhyO2.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.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"./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"./index-BWHgHrtv.js";import"./terminal-takeover-Ay5C2c-M.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";/* empty css */import"./refresh-cw-BmVr7sCD.js";const Wt=20;function ve(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.split(/[\\/]/).filter(Boolean).at(-1)??n:null}function xe(t){const n=t?.trim();return n?n.length>18?`${n.slice(0,8)}...${n.slice(-6)}`:n:null}function C(t){const n=new Set,a=[];for(const r of t){const m=r?.trim();if(!m)continue;const h=m.toLowerCase();n.has(h)||(n.add(h),a.push(m))}return a}function De(t,n){const a=t?.trim().replace(/[\\/]+$/,""),r=n.trim().replace(/[\\/]+$/,"");if(!a||!r)return!1;if(a===r)return!0;if(r.startsWith("~/")){const m=r.slice(1);if(a.endsWith(m)||a.includes(`${m}/`))return!0}if(a.startsWith("~/")){const m=a.slice(1);if(r.endsWith(m)||r.includes(`${m}/`))return!0}return a.startsWith(`${r}/`)||r.startsWith(`${a}/`)}function Ke(t,n){const a=t?.trim().toLowerCase(),r=n.trim().toLowerCase();return!a||!r?!1:a.includes(r)||r.includes(a)}function Je(t,n){const a=t?.trim().toLowerCase(),r=n.trim().toLowerCase();return!a||!r?!1:a===r}function Ft(t){const{activeSessionId:n,agent:a,sessionMeta:r}=t,m=C([n,a?.harnessSessionId]),h=C([a?.cwd,a?.projectRoot,r?.workspaceRoot]),c=C([a?.project,ve(a?.cwd),ve(a?.projectRoot),ve(r?.workspaceRoot)]).filter(U=>U.length>2),o=C([...m.slice(0,2),...c.slice(0,2)]).join("|");return{sessionIds:m,paths:h,projects:c,query:o}}function ge(t,n){return!!(n.sessionIds.some(a=>Ke(t.sessionId,a))||n.paths.some(a=>De(t.cwd,a))||n.projects.some(a=>Je(t.project,a)))}function zt(t,n){const a=n.filter(c=>ge(c,t)),r=C(a.filter(c=>t.sessionIds.some(o=>Ke(c.sessionId,o))).map(c=>c.sessionId));if(r[0])return r[0];const m=C(a.filter(c=>t.paths.some(o=>De(c.cwd,o))).map(c=>c.sessionId));if(m[0])return m[0];const h=C(a.filter(c=>t.projects.some(o=>Je(c.project,o))).map(c=>c.sessionId));return h[0]?h[0]:t.paths[0]?t.paths[0]:t.sessionIds[0]?t.sessionIds[0]:t.projects[0]?t.projects[0]:t.query}function te(t,n){const a=new Map;for(const r of[...n,...t])a.set(r.id,r);return[...a.values()].sort((r,m)=>Et(r.ts,m.ts)).slice(0,Wt)}function Ut(t){return t==="tool-result"?"tool result":t}function Ot(t){const n=t.replace(/\s+/g," ").trim();return n.length<=180?n:`${n.slice(0,177)}...`}const Vt={direct:"Conversation",channel:"Conversation",group_direct:"Conversation",thread:"Thread"},Ht=1800,qt=4800,He=2,Dt=120,Kt=650,Jt=1800;function fe(t,n){try{return JSON.stringify(t)===JSON.stringify(n)?t:n}catch{return n}}function qe(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.split(/[\\/]/).filter(Boolean).at(-1)??n:null}function Qt(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.replace(/^\/Users\/[^/]+(?=\/|$)/,"~"):null}function z(t){switch(t){case"queued":return"Queued";case"waking":return"Waking";case"waiting":return"Thinking";case"running":return"Working";case"completed":return"Completed";case"failed":return"Failed";case"cancelled":return"Cancelled";default:return t.replace(/_/g," ")}}function rn(){const{route:t,agents:n,navigate:a,apiConnection:r,reload:m}=xt(),h=Mt(t),c=t.view==="conversation"||t.view==="messages"?t.conversationId??null:null,[o,U]=i.useState(null),[S,Ne]=i.useState([]),[E,Ie]=i.useState(null),[Qe,O]=i.useState(!1),ye=i.useRef(c);ye.current=c;const V=i.useCallback(async()=>{if(!c){U(null),Ne([]),Ie(null),O(!0);return}try{const[s,l,f]=await Promise.all([W(`/api/session/${encodeURIComponent(c)}`).catch(()=>null),W(`/api/flights?conversationId=${encodeURIComponent(c)}&active=false`).catch(()=>[]),W(`/api/messages?conversationId=${encodeURIComponent(c)}&limit=8`).catch(()=>[])]);if(ye.current!==c)return;U(p=>fe(p,s)),Ne(p=>fe(p,l??[])),Ie(p=>fe(p,f?.filter(B=>!yt(B)).sort((B,vt)=>Pt(B.createdAt,vt.createdAt)).at(-1)??null)),O(!0)}catch{O(!0)}},[c]);i.useEffect(()=>{O(!1),V()},[V]);const j=o?.agentId??null,d=i.useMemo(()=>j?n.find(s=>s.id===j)??null:null,[n,j]),H=d?.id??null,q=bt(o),D=Tt(o),se=kt({resolvedAgentId:H,sessionId:q,machineId:h}),[we,Se]=i.useState(null),[P,ne]=i.useState([]),[b,ae]=i.useState([]),be=i.useRef([]),T=i.useRef(null),K=i.useRef(null),x=i.useRef([]),g=i.useRef(null),N=i.useRef(null),$=i.useRef(new Set),J=i.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null),K.current=null},[]),M=i.useCallback(()=>{if(!c)return;const s=Date.now(),l=K.current??s;K.current=l;const p=s-l>=qt?0:Ht;T.current!==null&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,K.current=null,V()},p)},[c,V]);i.useEffect(()=>J,[J]),i.useEffect(()=>{if(Se(null),!H)return;let s=!1;return W(`/api/agents/${encodeURIComponent(H)}/session-catalog`).then(l=>{s||Se(l)}).catch(()=>{}),()=>{s=!0}},[H]);const Ye=Ct({name:d?.name,agentName:o?.agentName,id:j,title:o?.title}),Te=d?At(d)??Ve(d.id)??d.id:j?Ve(j)??j:null,u=i.useMemo(()=>S.filter($t).sort((s,l)=>(l.startedAt??0)-(s.startedAt??0))[0]??null,[S]),Ze=i.useMemo(()=>Rt(S),[S]);i.useEffect(()=>{$.current=new Set(S.map(s=>s.invocationId))},[S]),i.useEffect(()=>{J(),$.current.clear()},[J,c]),ft(s=>{if(c){if(s.kind==="message.posted"){s.payload?.message?.conversationId===c&&M();return}if(s.kind==="conversation.upserted"){s.payload?.conversation?.id===c&&M();return}if(s.kind==="invocation.requested"){const l=s.payload?.invocation;if(l?.conversationId===c){$.current.add(l.id),M();return}!l?.conversationId&&j&&l?.targetAgentId===j&&($.current.add(l.id),M());return}if(s.kind==="flight.updated"){const l=s.payload?.flight;if(!l)return;(u?.id===l.id||u?.invocationId===l.invocationId||$.current.has(l.invocationId)||S.some(p=>p.id===l.id||p.invocationId===l.invocationId))&&M()}}});const v=q??we?.activeSessionId??d?.harnessSessionId??o?.harnessSessionId??null,w=d?.harnessSessionId??o?.harnessSessionId??null,A=d?.harnessLogPath??null,I=i.useMemo(()=>Ft({activeSessionId:v,agent:d,sessionMeta:o}),[v,d,o]),ie=JSON.stringify({sessionIds:I.sessionIds,paths:I.paths,projects:I.projects}),_=I.sessionIds.length>0||I.paths.length>0||I.projects.length>0,Q=i.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),N.current!==null&&(window.clearInterval(N.current),N.current=null),x.current=[]},[]),Y=i.useCallback(()=>{Q()},[Q]),ke=i.useCallback(()=>{if(N.current!==null||(g.current!==null&&(window.clearTimeout(g.current),g.current=null),x.current.length===0))return;const l=()=>{const f=x.current.slice(0,He);x.current=x.current.slice(He),f.length>0&&ae(p=>te(p,f)),!(x.current.length>0)&&N.current!==null&&(window.clearInterval(N.current),N.current=null)};l(),x.current.length>0&&(N.current=window.setInterval(l,Dt))},[]),Ce=i.useCallback(s=>{N.current===null&&g.current===null&&(g.current=window.setTimeout(()=>{g.current=null,ke()},s))},[ke]);i.useEffect(()=>{be.current=b},[b]),i.useEffect(()=>Q,[Q]),i.useEffect(()=>{Y(),ne([]),ae([])},[Y,ie]),i.useEffect(()=>{if(!_)return;let s=!1;const l=new URLSearchParams({limit:"180",transcripts:"true"});return W(`/api/tail/recent?${l.toString()}`).then(f=>{if(s)return;const p=(f.events??[]).filter(B=>ge(B,I));ne(te([],p))}).catch(()=>{}),()=>{s=!0}},[_,ie]),jt(i.useCallback(s=>{_&&ge(s,I)&&ne(l=>te(l,[s]))},[_,ie])),i.useEffect(()=>{if(P.length===0){Y(),ae([]);return}const s=be.current,l=new Set([...s.map(p=>p.id),...x.current.map(p=>p.id)]),f=P.filter(p=>!l.has(p.id));f.length!==0&&(x.current=te(x.current,f),x.current.length>0&&Ce(s.length===0?Kt:Jt))},[Ce,Y,P]);const ce=i.useMemo(()=>b.flatMap(Xt).slice(0,5),[b]);if(!c)return e.jsx(Yt,{apiOffline:r.status==="offline",onRetry:()=>{m()}});if(!Qe)return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading conversation…"})})});const Xe=o?.kind?Vt[o.kind]??o.kind:"Conversation",Ge=D?o?.participants?.find(s=>s.sessionId===D||s.kind==="session"&&s.actorId===D)??null:null,et=!q||d?.harnessSessionId===q,Z=o?.workspaceRoot?.trim()||Ge?.workspaceRoot?.trim()||et&&(d?.projectRoot?.trim()||d?.cwd?.trim())||null||null,re=qe(Z),X=Qt(Z),Ae=o?.currentBranch??null,le=d?.harness??o?.harness??null,G=o?.lastMessageAt??E?.createdAt??null,Re=o?.messageCount??null,Le=o?o.participantCount??o.participantIds.filter(s=>s!=="operator").length+1:null,R=d?.state??null,tt=gt(R),st=E?wt(E):null,Ee=E?.body?.trim()||o?.preview?.trim()||null,Pe=Ee?St(Ee):null,$e=st?null:E?.actorName??null,Me=xe(v),y=D??v??w,oe=xe(y),nt=xe(w),_e=!!(w&&w!==y),Be=[le,d?.transport].filter(Boolean).join(" · "),at=!!(v||w||A),k=!!(d?.terminalSurface?.backend==="tmux"||d?.transport==="tmux"&&d.harnessSessionId),L=!!(u||Nt(R,d)),de=u??Ze,it=de?z(de.state):L?"In motion":"At rest",ct=de?.summary?.trim()??(G?`Last update ${F(G)??"recently"}`:"No recent activity recorded"),ue=[Ae?`branch ${Ae}`:null,le,d?.transport].filter(Boolean),rt=!!(re||X||ue.length>0),lt=L?"Live activity":k?"Terminal":"Activity",me=u?.summary?.trim()??(v&&!k?"Session linked.":b.length>0&&!k?"Streaming matching Tail events.":null),ee=zt(I,P),ot=!!(d&&(u||v||P.length>0||k)),dt=!k,ut=v?k?"Terminal session":"Trace session":u?"Session starting":"Session context",mt=v?oe??v:u?z(u.state):"Waiting for a session id",We=v?[le,d?.transport,u?z(u.state):null].filter(Boolean).join(" · "):u?.summary?.trim()??me??null,Fe=Lt({sessionId:y,machineId:h}),ze=Fe?()=>{pe(a,Fe,{returnTo:t})}:void 0,pt=()=>{se&&pe(a,se,{returnTo:t})},ht=()=>{pe(a,{view:"ops",mode:"tail",...ee?{tailQuery:ee}:{}},{returnTo:t})};return e.jsxs("div",{className:"ctx-panel ctx-panel--conversation",children:[e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:Xe}),e.jsxs("div",{className:"ctx-panel-conversation-card",children:[e.jsx("div",{className:"ctx-panel-conversation-title",children:Ye}),Te&&e.jsxs("div",{className:"ctx-panel-conversation-handle",children:["@",Te]}),e.jsxs("div",{className:"ctx-panel-conversation-state",children:[e.jsx("span",{className:"ctx-panel-conversation-state-dot",style:{background:Oe(R)}}),e.jsx("span",{children:Ue(R)})]})]})]}),u&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Now"}),e.jsxs("div",{className:"ctx-panel-conversation-flight",children:[e.jsxs("div",{className:"ctx-panel-conversation-flight-row",children:[e.jsx("span",{className:"ctx-panel-conversation-flight-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-conversation-flight-time",children:F(u.startedAt)})]}),u.summary&&e.jsx("div",{className:"ctx-panel-conversation-flight-summary",children:u.summary})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Workspace"}),rt?e.jsxs("div",{className:"ctx-panel-workspace-card",children:[e.jsxs("div",{className:"ctx-panel-workspace-head",children:[e.jsx("div",{className:"ctx-panel-workspace-kicker",children:"Project"}),e.jsx("div",{className:"ctx-panel-workspace-title",title:Z??re??void 0,children:re??"Unscoped workspace"})]}),X&&e.jsx("div",{className:"ctx-panel-workspace-path",title:Z??X,children:X}),ue.length>0&&e.jsx("div",{className:"ctx-panel-workspace-strip",children:ue.map(s=>e.jsx("span",{className:"ctx-panel-workspace-chip",children:s},s))})]}):e.jsx("div",{className:"ctx-panel-empty",children:"No workspace metadata yet"})]}),at&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsxs("div",{className:"ctx-panel-session-card",children:[e.jsx("div",{className:"ctx-panel-session-head",children:e.jsxs("div",{className:"ctx-panel-session-primary",children:[Be&&e.jsx("div",{className:"ctx-panel-session-kind",children:Be}),y&&(ze?e.jsxs("button",{type:"button",className:"btn btn--ghost ctx-panel-session-id ctx-panel-session-id--button","aria-label":`Open session ${y}`,title:y,onClick:ze,children:[e.jsx("span",{children:oe??y}),e.jsx("span",{className:"ctx-panel-session-id-action",children:"Open session"})]}):e.jsx("div",{className:"ctx-panel-session-id",title:y,children:oe??y}))]})}),(_e||A)&&e.jsxs("div",{className:"ctx-panel-session-meta",children:[_e&&w&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness session"}),e.jsx("strong",{title:w,children:nt??w})]}),A&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness log"}),e.jsx("strong",{title:A,children:qe(A)??A})]})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsxs("div",{className:`ctx-panel-activity-card${L?" ctx-panel-activity-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-activity-head",children:[e.jsx("span",{className:"ctx-panel-activity-dot",style:{background:L?"var(--green)":Oe(R)}}),e.jsxs("div",{className:"ctx-panel-activity-main",children:[e.jsx("div",{className:"ctx-panel-activity-title",children:it}),e.jsx("div",{className:"ctx-panel-activity-sub",title:G?he(G):void 0,children:ct})]})]}),u&&e.jsxs("div",{className:"ctx-panel-activity-ledger",children:[e.jsx("span",{className:"ctx-panel-activity-ledger-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-activity-ledger-time",title:he(u.startedAt),children:F(u.startedAt)})]}),e.jsxs("div",{className:"ctx-panel-activity-facts",children:[typeof Re=="number"&&e.jsx(je,{label:"Messages",value:`${Re}`}),typeof Le=="number"&&e.jsx(je,{label:"People",value:`${Le}`}),tt&&e.jsx(je,{label:"Agent",value:Ue(R)})]})]})]}),Pe&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-preview",children:[e.jsx("div",{className:"ctx-panel-section-label",children:$e?`Latest · ${$e}`:"Latest"}),e.jsx("div",{className:"ctx-panel-conversation-preview-body",children:Pe})]}),ot&&d&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-live-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:[e.jsx("span",{children:lt}),Me&&e.jsx("span",{className:"ctx-panel-live-session",title:v??void 0,children:Me})]}),e.jsxs("div",{className:`ctx-panel-live-card${L?" ctx-panel-live-card--active":""}`,children:[e.jsxs("div",{className:`ctx-panel-live-session-card${L?" ctx-panel-live-session-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-live-session-copy",children:[e.jsx("span",{children:ut}),e.jsx("strong",{title:v??void 0,children:mt}),We&&e.jsx("small",{children:We})]}),e.jsx("div",{className:"ctx-panel-live-session-pulse","aria-hidden":"true",children:e.jsx("span",{})})]}),e.jsx(It,{agent:d,catalog:we,navigate:a,returnTo:t,variant:"compact",className:"ctx-panel-live-actions"}),me&&e.jsx("div",{className:"ctx-panel-live-summary",children:me}),k&&e.jsx(_t,{agentId:d.id,lines:24,columns:132,className:"ctx-panel-tmux-peek--conversation"}),ce.length>0&&e.jsxs("div",{className:"ctx-panel-live-files","aria-live":"polite",children:[e.jsxs("div",{className:"ctx-panel-live-files-label",children:[e.jsx("span",{children:"Files"}),e.jsx("strong",{children:ce.length})]}),e.jsx("ol",{className:"ctx-panel-live-file-list",children:ce.map(s=>e.jsxs("li",{className:`ctx-panel-live-file ctx-panel-live-file--${s.tone}`,title:`${s.path} · ${s.verb}`,children:[e.jsx("span",{className:"ctx-panel-live-file-mark",children:s.mark}),e.jsx("span",{className:"ctx-panel-live-file-path",children:ss(s.path)}),e.jsx("span",{className:"ctx-panel-live-file-time",children:F(s.ts)})]},`${s.eventId}:${s.path}`))})]}),dt&&e.jsx("div",{className:"ctx-panel-live-stream","aria-live":"polite",children:b.length>0?e.jsx("ol",{className:"ctx-panel-live-events",children:b.map(s=>e.jsxs("li",{className:"ctx-panel-live-event",children:[e.jsx("span",{className:"ctx-panel-live-event-kind",children:Ut(s.kind)}),e.jsx("span",{className:"ctx-panel-live-event-summary",children:Ot(s.summary)}),e.jsx("span",{className:"ctx-panel-live-event-time",title:he(s.ts),children:F(s.ts)})]},s.id))}):e.jsx("div",{className:"ctx-panel-live-stream-empty",children:"Waiting for matching Tail events"})}),_&&e.jsxs("button",{type:"button",className:"ctx-panel-live-tail-button",onClick:ht,title:ee?`Tail filter: ${ee}`:"Open Tail",children:[e.jsx(Bt,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Tail"})]})]})]}),se&&e.jsx("section",{className:"ctx-panel-section ctx-panel-conversation-profile-section",children:e.jsxs("button",{type:"button",className:"ctx-panel-roster-button ctx-panel-conversation-profile-button",onClick:pt,children:[e.jsx("span",{className:"ctx-panel-roster-label",children:d?"Open agent profile":"Open session trace"}),e.jsx("span",{className:"ctx-panel-roster-count",children:e.jsx("span",{children:"→"})})]})})]})}function Yt({apiOffline:t,onRetry:n}){return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsxs("div",{className:"ctx-panel-empty-card","data-tone":t?"error":"neutral",children:[e.jsx("div",{className:"ctx-panel-empty-card-title",children:t?"Context unavailable":"No conversation selected"}),e.jsx("div",{className:"ctx-panel-empty-card-detail",children:t?"Scout context will load after the server reconnects.":"Select a chat to inspect participants, sessions, and recent activity."}),t&&e.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:n,children:"Retry"})]})})})}function je({label:t,value:n}){return e.jsxs("div",{className:"ctx-panel-fact",children:[e.jsx("span",{className:"ctx-panel-fact-value",children:n}),e.jsx("span",{className:"ctx-panel-fact-label",children:t})]})}const Zt=/(?:["'`])?((?:~|\/|\.{1,2}\/|[A-Za-z0-9_.-]+\/)[^\s"'`),;]+?\.(?:ts|tsx|js|jsx|mjs|cjs|css|scss|swift|md|json|jsonc|yml|yaml|toml|sql|py|rs|go|sh|html|m|mm))(?:["'`])?/gi;function Xt(t){const n=new Set,a=[],r=Gt(t.summary);for(const m of t.summary.matchAll(Zt)){const h=m[1]?.trim();if(!h)continue;const c=h.toLowerCase();n.has(c)||(n.add(c),a.push({eventId:t.id,path:h,verb:r,mark:ts(r),tone:es(r),ts:t.ts}))}return a}function Gt(t){return/\b(created|create|wrote|write|edited|edit|modified|modify|updated|update|changed|change|patched|patch)\b/i.test(t)?"changed":/\b(read|opened|viewed|cat|sed)\b/i.test(t)?"read":"touched"}function es(t){return t==="changed"?"changed":t==="read"?"read":"touched"}function ts(t){return t==="changed"?"+":t==="read"?"r":"·"}function ss(t){const n=t.replace(/[\\/]+$/g,""),a=n.split(/[\\/]/).filter(Boolean);return a.length<=2?n:`${a.at(-2)}/${a.at(-1)}`}export{rn as ConversationInspector};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-zZ8Hx7er.js";const e=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],t=c("rocket",e);export{t as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{X as ie,Y as Dn,Z as Ne,$ as Be,L as On,a0 as xn,N as k,O as h,a1 as jn,a2 as Z,a3 as Nn,a4 as Bn,r as C}from"./index-EsrkGBcv.js";import{b as Mn}from"./api-DSqpVKC7.js";import{n as ce}from"./synthetic-agent-routing-aduMYO7P.js";import{g as zn,h as Me,j as Wn,k as Kn}from"./terminal-sessions-3RfJpen8.js";const ze=["local","url","sharedConfig","env"];function Gn(e){const n=Vn(e),t=e.audienceIncludes??Hn(e.audienceOrder),s=new Set;function o(a){!e.warnOnUnknown||s.has(a)||(s.add(a),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[hudsonkit/flags] Unknown feature flag "${a}" resolved false.`))}const r=e.registry;function i(a){const u=r[a];if(!u)return o(a),{key:a,enabled:!1,value:!1,layer:"default",audience:n,reason:"unknown-flag"};const d=Yn(e.layers,a);return d?{key:a,enabled:d.value,value:d.value,layer:d.layer,audience:n,requiredTier:u.tier,reason:"override",definition:u}:u.defaultEnabled?u.tier&&!t(n,u.tier)?{key:a,enabled:!1,value:!1,layer:"default",audience:n,requiredTier:u.tier,reason:"audience-denied",definition:u}:{key:a,enabled:!0,value:!0,layer:"default",audience:n,requiredTier:u.tier,reason:"default",definition:u}:{key:a,enabled:!1,value:!1,layer:"default",audience:n,requiredTier:u.tier,reason:"default",definition:u}}return{registry:e.registry,isEnabled:a=>i(String(a)).enabled,explain:a=>i(String(a)),all:()=>Object.keys(e.registry).sort().map(i),audience:()=>n}}function Vn(e){let n=e.audience.tier;for(const t of ze.slice().reverse()){const s=e.layers?.[t]?.audience;s&&(n=s)}return{...e.audience,tier:n}}function Hn(e){return(n,t)=>{if(n.tier===t)return!0;if(!e||e.length===0)return!1;const s=e.indexOf(n.tier),o=e.indexOf(t);return s<0||o<0?!1:s>=o}}function Yn(e,n){for(const t of ze){const s=qn(e?.[t]?.flags?.[n]);if(s!==null)return{layer:t,value:s}}return null}function qn(e){return e===!0||e==="on"?!0:e===!1||e==="off"?!1:null}function Qn(e){if(e===!0||e===!1)return e;if(typeof e=="number"){if(e===1)return!0;if(e===0)return!1}if(typeof e!="string")return;const n=e.trim().toLowerCase();if(["1","true","on","yes","enabled","enable"].includes(n))return!0;if(["0","false","off","no","disabled","disable"].includes(n))return!1;if(["default","null","unset","clear"].includes(n))return"default"}function Xn(e,n={}){const t=n.paramPrefix??"ff.",s=n.audienceParam??"ffAudience",o=typeof e=="string"?new URL(e,"http://hudson.local"):e,r={};let i;for(const[a,u]of o.searchParams.entries()){if(a===s&&u.trim()&&(i=u.trim()),!a.startsWith(t))continue;const d=a.slice(t.length),f=Qn(u);d&&f!==void 0&&(r[d]=f)}return{flags:r,audience:i}}const F=1;function Zn(e){if(typeof window>"u")return{version:F};try{const n=window.localStorage?.getItem(e);return Jn(n)}catch{return{version:F}}}function Fs(e,n){if(typeof window>"u")return;const t=We(n),s=JSON.stringify(t);try{window.localStorage?.setItem(e,s)}catch{}et(e,s)}function Jn(e){if(!e)return{version:F};try{const n=JSON.parse(e);return!n||typeof n!="object"?{version:F}:We(n)}catch{return{version:F}}}function We(e){const n={version:F};if(e.audience&&(n.audience=e.audience),e.flags&&typeof e.flags=="object"){n.flags={};for(const[t,s]of Object.entries(e.flags))(s===!0||s===!1)&&(n.flags[t]=s);Object.keys(n.flags).length===0&&delete n.flags}return n}function et(e,n){if(!(typeof document>"u"))try{const t=encodeURIComponent(n);document.cookie=`${encodeURIComponent(e)}=${t}; Path=/; SameSite=Lax; Max-Age=31536000`}catch{}}const nt=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal"],tt=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.scoutbot","surface.workflows"];function ye(e,n){return Object.fromEntries(e.map(t=>[t,n]))}const Ke={label:"Surface · Scope",description:`Scope presentation on Scout infra — lean lanes/tail/sessions/agents at ${Dn}/*.`,defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","scope","observability"]},st={...Ke,label:"Surface · Scope (legacy alias)",description:`Legacy alias for ${ie}. Prefer the primary flag; ${Ne} remains for old dev links.`},Ds=ie;function ot(){return{audience:"everyone",flags:{"ops.control":!0,"ops.lanes":!0,...ye(nt,!1),...ye(tt,!1)}}}const Ge=["ffBundle","ffVariant","scoutBundle","scoutExperience","ab"],Ve=["ffGlobal","scoutGlobalBundle"],He=["ffPersist","persistBundle"],rt=new Set(["no-ops","ffAudience",...Ge,...Ve,...He]);function Os(e){for(const n of[...e.searchParams.keys()])(rt.has(n)||n.startsWith("ff."))&&e.searchParams.delete(n);return e}const at=["everyone","internal","power"],it="openscout.flags",J="openscout.flagBundle",ct={tier:"power"},Ee=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal","ops.lanes"],$e=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.mesh-ops","surface.scoutbot","surface.workflows"],ut={"nav.sidebar":{label:"Nav · Sidebar",description:"Classic sidebar chrome (8 primary areas + icon rail). Default on since sco-083 soak; opt out with ?ff.nav.sidebar=off. Not included in max-pro.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["nav","chrome"]},"ops.control":{label:"Ops · Control",description:"Mission control, issues, and the Ops section shell.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops","nav"]},"ops.mesh":{label:"Ops · Network",description:"Mesh topology and peer status.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.runtime":{label:"Ops · Runtime",description:"Runtime / atop process telemetry.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.plans":{label:"Ops · Plans",description:"Plan documents and plan-mode review.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.terminal":{label:"Ops · Terminal",description:"Observe / takeover terminal sessions.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.lanes":{label:"Ops · Agent Lanes",description:"One column per local agent — follow live harness work in power-user mode.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"surface.search":{label:"Surface · Search",description:"Knowledge + indexer search as a top-level nav entry.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","nav"]},"surface.sessions":{label:"Surface · Sessions",description:"Standalone top-level Sessions entry (still reachable under Agents).",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","nav"]},"surface.briefings":{label:"Surface · Briefings",description:"Briefings list + detail.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.work":{label:"Surface · Work",description:"Work item detail.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.activity":{label:"Surface · Activity",description:"Activity stream.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.follow":{label:"Surface · Follow",description:"Follow view.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.mesh-ops":{label:"Surface · Mesh Ops",description:"Mesh Ops — work-item triage over the mesh (hosts rail, item list, inspector).",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","ops"]},"surface.scoutbot":{label:"Surface · Scoutbot",description:"Scoutbot assistant — the inspector panel, the status-bar broadcast chip, and the Message-Scout command-palette actions.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["surface","assistant"]},"surface.realtime-voice":{label:"Surface · Realtime voice",description:"Live WebRTC voice conversations with Scoutbot through OpenAI Realtime. Operator enablement lives in Settings → Voice; this flag is a build-level kill switch.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["surface","assistant","voice"]},"surface.workflows":{label:"Surface · Workflows",description:"Observed harness families / workflow topology telemetry on the Agents directory. Off in the lean view — the directory is just the project-grouped agent board.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","observability"]},[ie]:Ke,[Ne]:st},lt={a:"light-prod",control:"light-prod",light:"light-prod","light-prod":"light-prod",prod:"light-prod",production:"light-prod",b:"max-pro",max:"max-pro","max-pro":"max-pro",pro:"max-pro",treatment:"max-pro",...xn},Re=new Set(["clear","default","none","reset","unset"]);function K(e,n){return Object.fromEntries(e.map(t=>[t,n]))}function Ye(...e){const n={};for(const t of e)t.audience&&(n.audience=t.audience),t.flags&&Object.keys(t.flags).length>0&&(n.flags={...n.flags??{},...t.flags});return n}function ue(e){switch(e){case"light-prod":return{audience:"everyone",flags:{...K(Ee,!1),...K($e,!1)}};case"max-pro":return{audience:"power",flags:{...K(Ee,!0),...K($e,!0)}};case On:return ot()}}function O(e){return e?lt[e.trim().toLowerCase()]??null:null}function ee(e,n){for(const t of n){const s=e.get(t);if(s!==null)return s}return null}function qe(e){const n=ee(e,Ge);return O(n)}function dt(e){const n=ee(e,Ve);if(n){const i=n.trim().toLowerCase();if(Re.has(i))return{action:"clear"};const a=O(n);return a?{action:"set",bundle:a}:null}const t=ee(e,He);if(!t)return null;const s=t.trim().toLowerCase();if(Re.has(s))return{action:"clear"};if(["0","false","no"].includes(s))return null;const o=O(t);if(o)return{action:"set",bundle:o};const r=qe(e);return r?{action:"set",bundle:r}:null}function Qe(){if(typeof window>"u")return null;try{return O(window.localStorage.getItem(J))}catch{return null}}function ft(e){if(!(typeof window>"u"))try{e.action==="clear"?window.localStorage.removeItem(J):window.localStorage.setItem(J,e.bundle)}catch{}}function xs(){return Qe()??O(Be())??Ze}function Xe(){const e=Qe();return e?ue(e):{}}const Ze="light-prod";function Je(){const e=O(Be())??Ze;return ue(e)}function mt(e){const n=dt(e);n&&ft(n)}function en(e=new URLSearchParams(window.location.search)){const n=Xn(window.location.href),t=qe(e),s=t?ue(t):{},o={audience:n.audience??s.audience,flags:{...s.flags??{},...n.flags??{}}};return e.has("no-ops")&&(o.flags={...o.flags,"ops.control":!1}),o}function pt(){const e=Zn(it);return{flags:e.flags,audience:e.audience??void 0}}function js(){if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return mt(e),{sharedConfig:Ye(Je(),Xe()),url:en(e)}}function ht(e){const n=typeof window>"u"?{}:{sharedConfig:Ye(Je(),Xe()),url:en(),local:pt()};return Gn({registry:ut,audience:ct,audienceOrder:at,layers:n,warnOnUnknown:!1}).isEnabled(e)}function nn(){return ht("ops.control")}const ne={sm:408,md:512,lg:616},tn=240,sn=640,gt=24,on="openscout:lane-deck:v1",wt=new Set(["web.ops","macos.lanes","hud.tail","web.embed"]),le=new Set(["sm","md","lg"]),rn={"web.ops":{defaultLaneWidth:"lg",showAutoLanes:!0},"macos.lanes":{defaultLaneWidth:"md",showAutoLanes:!0},"hud.tail":{defaultLaneWidth:"sm",showAutoLanes:!0,defaultHorizon:"30m"},"web.embed":{defaultLaneWidth:"md",showAutoLanes:!0}},It=rn["web.ops"];function de(e){return an(e)?rn[e]:It}const V={pinned_left:0,main:1,pinned_right:2};function an(e){return wt.has(e)}function Ns(e=window.location.search,n=window.location.pathname){const t=new URLSearchParams(e),s=t.get("profile")?.trim().toLowerCase();if(s&&an(s))return s;const o=t.get("embed")?.trim().toLowerCase();return o==="hud"?"hud.tail":o==="app"?"macos.lanes":n.includes("/lanes/embed")?"web.embed":(n.includes("/ops/lanes"),"web.ops")}function Bs(e=window.location.search){const n=new URLSearchParams(e),t=(n.get("lanes")??n.get("size"))?.trim().toLowerCase();return t&&le.has(t)?t:"lg"}function Ms(e,n){if(typeof e=="number"&&Number.isFinite(e))return Math.min(sn,Math.max(tn,Math.round(e)));const t=typeof e=="string"&&le.has(e)?e:n;return ne[t]}function zs(e){const n=Math.min(sn,Math.max(tn,Math.round(e)));let t=null,s=Number.POSITIVE_INFINITY;for(const[o,r]of Object.entries(ne)){const i=Math.abs(r-n);i<s&&(s=i,t=o)}return t&&s<=gt?{px:ne[t],tier:t}:{px:n,tier:null}}function fe(e,n,t){return{version:1,profileId:e,defaultLaneWidth:n??t.defaultLaneWidth,defaultHorizon:t.defaultHorizon,laneWidths:{},laneDefs:[],slots:[],showAutoLanes:t.showAutoLanes,updatedAt:Date.now()}}function Pe(e,n){const t=de(e);return fe(e,n,t)}function te(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&le.has(e))return e}function vt(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.id!="string"||!n.id.trim()||n.kind!=="session"&&n.kind!=="harness"&&n.kind!=="project"&&n.kind!=="attention"||typeof n.title!="string"||!n.title.trim()?null:{id:n.id.trim(),kind:n.kind,title:n.title.trim(),sessionId:typeof n.sessionId=="string"?n.sessionId.trim():void 0,harness:typeof n.harness=="string"?n.harness.trim():void 0,projectPath:typeof n.projectPath=="string"?n.projectPath.trim():void 0}}function St(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.id!="string"||!n.id.trim()||typeof n.laneDefId!="string"||!n.laneDefId.trim()||n.zone!=="pinned_left"&&n.zone!=="main"&&n.zone!=="pinned_right"||typeof n.position!="number"||!Number.isFinite(n.position)?null:{id:n.id.trim(),laneDefId:n.laneDefId.trim(),zone:n.zone,position:n.position,width:te(n.width)}}function cn(e,n,t,s){if(!e||typeof e!="object")return fe(n,t,s);const o=e,r=Array.isArray(o.laneDefs)?o.laneDefs.map(vt).filter(d=>d!==null):[],i=Array.isArray(o.slots)?o.slots.map(St).filter(d=>d!==null):[],a={};if(o.laneWidths&&typeof o.laneWidths=="object")for(const[d,f]of Object.entries(o.laneWidths)){const v=te(f);v!==void 0&&(a[d]=v)}const u=te(o.defaultLaneWidth);return{version:1,profileId:n,defaultLaneWidth:(typeof u=="string"?u:void 0)??t??s.defaultLaneWidth,defaultHorizon:typeof o.defaultHorizon=="string"?o.defaultHorizon:s.defaultHorizon,laneWidths:a,laneDefs:r,slots:i,showAutoLanes:typeof o.showAutoLanes=="boolean"?o.showAutoLanes:s.showAutoLanes,updatedAt:typeof o.updatedAt=="number"?o.updatedAt:Date.now()}}function bt(e,n,t){return cn(e,n,t,de(n))}function Ws(e,n){const t=de(e),s=n??t.defaultLaneWidth;try{const o=localStorage.getItem(`${on}:${e}`);return o?bt(JSON.parse(o),e,s):Pe(e,s)}catch{return Pe(e,s)}}function Lt(e){try{localStorage.setItem(`${on}:${e.profileId}`,JSON.stringify({...e,updatedAt:Date.now()}))}catch{}}function Ks(e){return[...e].sort((n,t)=>{const s=V[n.zone]-V[t.zone];return s!==0?s:n.position-t.position})}function Gs(e,n){return V[e]-V[n]}function un(){return`slot:${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function me(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Y(e){return`session:${e}`}function yt(e){return`harness:${me(e)}`}function Et(e){return`project:${me(e)}`}const $t="attention:needs-input";function ln(e,n){const t=e.filter(s=>s.zone===n);return t.length===0?0:Math.max(...t.map(s=>s.position))+1}function dn(e,n){const t=e.laneDefs.some(s=>s.id===n.id);return{...e,laneDefs:t?e.laneDefs.map(s=>s.id===n.id?n:s):[...e.laneDefs,n]}}function fn(e,n){const t=e.slots.some(s=>s.id===n.id);return{...e,slots:t?e.slots.map(s=>s.id===n.id?n:s):[...e.slots,n]}}function mn(e,n){return{...e,slots:e.slots.filter(t=>t.laneDefId!==n)}}function Rt(e,n){const t=Y(n);return{...mn(e,t),laneDefs:e.laneDefs.filter(s=>s.id!==t)}}function Vs(e,n){const t=Y(n);return e.slots.some(s=>s.laneDefId===t&&s.zone!=="main")}function Hs(e,n){const t=Y(n),s=e.slots.find(o=>o.laneDefId===t);return!s||s.zone==="main"?null:s.zone}function Ys(e,n){const t=n.zone??"pinned_left",s=Y(n.laneId),o=Rt(e,n.laneId),r=dn(o,{id:s,kind:"session",title:n.title,sessionId:n.laneId});return fn(r,{id:un(),laneDefId:s,zone:t,position:ln(r.slots,t),width:n.width})}function qs(e,n){const t=n.zone??"pinned_left",s=n.kind==="attention"?$t:n.kind==="harness"&&n.harness?yt(n.harness):n.kind==="project"&&n.projectPath?Et(n.projectPath):`${n.kind}:${me(n.title)}`,o=mn(e,s),r=dn(o,{id:s,kind:n.kind,title:n.title,harness:n.harness,projectPath:n.projectPath});return fn(r,{id:un(),laneDefId:s,zone:t,position:ln(r.slots,t),width:n.width})}function Qs(e,n,t){return{...e,laneWidths:{...e.laneWidths,[n]:t},updatedAt:Date.now()}}function Xs(e,n){return{...e,defaultLaneWidth:n,updatedAt:Date.now()}}function Zs(e){const n=new Set(e.slots.filter(t=>t.zone!=="main").map(t=>t.laneDefId));return{...e,slots:e.slots.filter(t=>t.zone==="main"),laneDefs:e.laneDefs.filter(t=>!n.has(t.id))}}const H="scope.lanes",se={defaultLaneWidth:"md",showAutoLanes:!0,defaultHorizon:"30m"},Pt="openscout:lane-deck:v1";function Ce(e){return fe(H,e,se)}function Js(e){const n=e??se.defaultLaneWidth;try{const t=localStorage.getItem(`${Pt}:${H}`);return t?cn(JSON.parse(t),H,n,se):Ce(n)}catch{return Ce(n)}}function eo(e){Lt(e)}const Ct=[h.lanes,h.tail,h.sessions,h.agents];function _t(e){return Ct.includes(e)}function At(e){return e===Nn||e===Bn}function pn(e){return jn(e)}function q(e,n={}){switch(e){case h.tail:{const t=new URLSearchParams;n.tailQuery&&t.set("q",n.tailQuery);const s=t.toString();return k(e,s?`?${s}`:"")}case h.sessions:return n.sessionId?k(e,`/${encodeURIComponent(n.sessionId)}`):k(e);case h.lanes:return k(Z);case h.agents:return k(e);default:return k(Z)}}function hn(e){switch(e.view){case"ops":return!e.mode||e.mode==="lanes"?h.lanes:e.mode==="tail"?h.tail:null;case"sessions":return e.agentId?null:h.sessions;case"agents-v2":return e.agentId||e.projectSlug||e.sessionId||e.conversationId?null:h.agents;default:return null}}function Ut(e){const n=hn(e);return n?n===h.tail&&e.view==="ops"?q(n,{tailQuery:e.tailQuery}):n===h.sessions&&e.view==="sessions"?q(n,{sessionId:e.sessionId}):q(n):null}function kt(e,n,t){if(!At(e[0]))return null;const s=e[1]??Z;if(!_t(s))return{view:"ops",mode:"lanes"};switch(s){case h.tail:{const o=n.searchParams.get("q")?.trim();return{view:"ops",mode:"tail",...o?{tailQuery:o}:{}}}case h.sessions:return e[2]?t({view:"sessions",sessionId:decodeURIComponent(e[2])}):t({view:"sessions"});case h.agents:return t({view:"agents-v2"});case h.lanes:default:return{view:"ops",mode:"lanes"}}}const Tt=new Set(["no-ops","ffBundle","ffVariant","scoutBundle","scoutExperience","ab","ffGlobal","scoutGlobalBundle","ffPersist","persistBundle","ffAudience","studio","studioInjection","studioMode"]),Ft=["ff.","studio.","studioMode."];function Dt(e){return Tt.has(e)||Ft.some(n=>e.startsWith(n))}const Ot=[{key:"open",prefix:"/messages"}];function xt(e,n){return Ot.some(t=>t.key===e&&(n===t.prefix||n.startsWith(`${t.prefix}/`)))}function gn(e,n=""){const t=new URL(e,"http://scout.local");new URLSearchParams(n).forEach((r,i)=>{!Dt(i)&&!xt(i,t.pathname)||t.searchParams.has(i)||t.searchParams.set(i,r)});const o=t.searchParams.toString();return`${t.pathname}${o?`?${o}`:""}`}function no(e){switch(e){case h.tail:return{view:"ops",mode:"tail"};case h.sessions:return{view:"sessions"};case h.agents:return{view:"agents-v2"};case h.lanes:default:return{view:"ops",mode:"lanes"}}}function jt(e=typeof window<"u"?window.location.pathname:""){return pn(e)}function to(){return H}function so(e=jt()){return e?{"data-scope-presentation":!0}:void 0}function wn(e,n=typeof window<"u"?window.location.pathname:""){return pn(n)?Ut(e):null}function Nt(e,n=typeof window<"u"?window.location.pathname:""){return wn(e,n)!==null}function oo(e,n=typeof window<"u"?window.location.pathname:""){return Nt(e,n)?hn(e):null}const ro={days:3,sessionLimit:200,hitLimit:60,debounceMs:180};function oe(e){return e.root==="HOME"?`~/${e.relPath}`:e.root==="ABSOLUTE"?e.relPath:`$${e.root}/${e.relPath}`}function _e(e){const n=e?.trim();if(!n)return null;const t=n.replace(/[\\/]+$/,""),s=t.split(/[\\/]/).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function A(e){return e.sourceRefs.find(n=>n.kind==="harness_transcript")??null}function In(e){return e.sourceRefs.find(n=>n.kind==="file")??null}function pe(e){return e?_e(e.sessionId)??_e(oe(e.path)):null}function ao(e){const n=pe(e);if(!n)return null;const t=e?.recordRange;return t?`${n}|records ${t[0]}..${t[1]}`:n}function M(e,n){const t=e.facets[n];return Array.isArray(t)?t.filter(Boolean).join(", "):typeof t=="string"?t:""}function N(e){const n=new Set;return e.split(/[^A-Za-z0-9_./-]+/u).map(t=>t.trim()).filter(t=>t.length>1).filter(t=>{const s=t.toLowerCase();return n.has(s)?!1:(n.add(s),!0)}).slice(0,12)}const Bt=/^(events?\s+window(\s+\d+)?|files?\s+touched|tool\s+calls?|indexed\s+snippet|manifest|summary|decisions?|context\s+pack)\b/iu,Ae=/^(claude|codex|kimi|cursor|gpt|gemini)\b/iu,Ue=/^(?:claude|codex|kimi|cursor|gpt|gemini)?\s*[a-z0-9._/-]*\s*(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\s+\d{1,2}(?:\s+at\s+\d{1,2}:\d{2}\s*(?:am|pm)?)?\s*[-–—:]\s*/iu;function vn(e){return Bt.test(e.replace(/\s+/g," ").trim())}function Mt(e){let n=e.replace(/\s+/g," ").trim();if(!n)return"";if(n=n.replace(/<[^>\n]+>/g," ").replace(/\s+/g," ").trim(),Ue.test(n))n=n.replace(Ue,"").trim();else{const t=n.match(/^(.{6,72}?)\s[-–—]\s+(.+)$/u);if(t){const s=t[1]??"",o=t[2]??"";(Ae.test(s)||/\b(?:am|pm|\d{1,2}:\d{2}|plugin|session|openscout)\b/iu.test(s))&&(n=o.trim())}}return n=n.replace(Ae,"").replace(/^\s*[-–—:]\s*/,"").trim(),n=n.replace(/\s{2,}/g," ").trim(),n.length>72&&(n=`${n.slice(0,69).replace(/\s+\S*$/u,"").trimEnd()}…`),n}function zt(e){const n=M(e,"project"),t=e.title.replace(/\s+/g," ").trim();if(t&&!vn(t)){const o=Mt(t);if(o&&o.toLowerCase()!==n.toLowerCase()||o)return o}if(n)return n;const s=pe(A(e));return s?s.length>18?`${s.slice(0,16)}…`:s:"Session match"}function Sn(e){const n=B(e,"recordKind",8).map(s=>s.toLowerCase());if(n.length===0&&n.push(...B(e,"recordTag",8).map(s=>s.toLowerCase())),n.some(s=>s.includes("assistant")))return"assistant";if(n.some(s=>s.includes("user")))return"user";if(n.some(s=>s.includes("tool")||s.includes("command")||s.includes("response")))return"tool";const t=ge(e);return t==="tool activity"?"tool":t==="overview"?"overview":""}function io(e,n){const t=we(e.snippet,n),s=Sn(e),o=he(e);let r="";if(t){const i=N(n).map(d=>d.toLowerCase()),a=t.split(new RegExp("(?<=[.!?])\\s+|\\s+[–—]\\s+|\\s+·\\s+","u")).map(d=>d.replace(/^…+|…+$/gu,"").trim()).filter(d=>d.length>12);r=((i.length>0?a.find(d=>i.some(f=>re(d,f)>=0)):void 0)??a[0]??t).replace(/^…+|…+$/gu,"").trim()}return r?(r.length>78&&(r=`${r.slice(0,75).replace(/\s+\S*$/u,"").trimEnd()}…`),r):s&&o?`${s} · ${o}`:o||s||zt(e)}function Wt(e){return e.freshness&&e.freshness!=="unknown"?e.freshness:e.title.replace(/\s+/g," ").trim().match(/\b((?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\s+\d{1,2}(?:\s+at\s+\d{1,2}:\d{2}\s*(?:AM|PM)?)?)\b/iu)?.[1]??""}function ke(e){const n=e.trim().toLowerCase();return n?n==="events"||n.startsWith("events")?"conversation":n==="overview"||n==="summary"?"overview":n==="tool-calls"||n==="tools"?"tool activity":n==="files"||n==="files-touched"?"files touched":n==="manifest"?"session index":n.replace(/[-_]+/g," "):""}function Kt(e){const n=e.trim();return n?n.charAt(0).toUpperCase()+n.slice(1):""}function Gt(e){const n=M(e,"harness")||A(e)?.harness||"";if(!n)return"";const t=n.toLowerCase();return t==="claude"?"Claude":t==="codex"?"Codex":t==="kimi"?"Kimi":t==="cursor"?"Cursor":Kt(n)}function Vt(e){const n=M(e,"sessionId").trim(),t=pe(A(e)),s=(n||t||"").trim();return s?s.length>14?s.slice(0,8):s:""}function he(e){const n=A(e)?.recordRange;if(n){const[s,o]=n;return s===o?`turn ${s}`:o-s<=1?`turns ${s}–${o}`:`turns ${s}–${o}`}const t=e.title.match(/events?\s+window\s+(\d+)/iu);return t?`window ${Number(t[1])}`:""}function Ht(e){const n=B(e,"recordKind",8).map(s=>s.toLowerCase());n.length===0&&n.push(...B(e,"recordTag",8).map(s=>s.toLowerCase()));const t=[];return n.some(s=>s.includes("user"))&&t.push("user"),n.some(s=>s.includes("assistant"))&&t.push("assistant"),n.some(s=>s.includes("tool")||s.includes("command")||s.includes("response"))&&t.push("tool"),t.length===0?"":t.join(" · ")}function ge(e){const n=M(e,"documentKind");if(n){const s=n.split(",")[0]?.trim()??n;return ke(s)}return vn(e.title)?ke(e.title):In(e)?"file":A(e)?"conversation":""}function B(e,n,t=3){const s=e.facets[n];return(Array.isArray(s)?s:typeof s=="string"?s.split(","):[]).map(r=>r.trim()).filter(Boolean).slice(0,t)}function co(e){return{agent:Gt(e),project:M(e,"project"),session:Vt(e),when:Wt(e),turn:he(e),role:Ht(e),where:ge(e)}}function uo(e){const n=[],t=he(e);t&&n.push(t);const s=Sn(e);s&&n.push(s);const o=ge(e);o&&o!=="conversation"&&n.push(o);const r=B(e,"toolName",2);r.length===1&&n.push(r[0]),r.length>1&&n.push(r.join(", "));const i=new Set;return n.filter(a=>{const u=a.toLowerCase();return i.has(u)?!1:(i.add(u),!0)})}function re(e,n){return new RegExp(`(?<![A-Za-z0-9_./~-])${yn(n)}(?![A-Za-z0-9_./~-])`,"iu").exec(e)?.index??-1}function we(e,n=""){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(t=t.replace(/\s*-\s*\[\d{3,}\]\s*`[^`]+`(?:\s*\([^)]*\))?\s*-\s*/gu," "),t=t.replace(/\[\d{3,}\]\s*`[^`]+`\s*/gu,""),t=t.replace(/\*\*/gu,""),t=t.replace(/\b(?:assistant_turn|user_turn|agent_reasoning|command_or_tool|response_item|system_record)\b/giu," "),t=t.replace(/(?:~\/|\.\.?\/|\/(?:Users|home|var|tmp|opt)\/)\S+/gu," "),t=t.replace(/https?:\/\/\S+/gu," "),t=t.replace(/\b[\w.-]+\.(?:com|net|org|io|dev|app)(?:\/\S*)?/giu," "),t=t.replace(/\{[^{}]{0,160}\}/gu," "),t=t.replace(/`[^`]{0,64}`/gu,r=>{const i=r.slice(1,-1);return N(n).some(a=>re(i,a)>=0)||/^[A-Za-z][\w.-]{0,24}$/u.test(i)?i:" "}),t=t.replace(/\s{2,}/g," ").trim(),t=t.replace(/^[\s,;:.\-–—|/]+/u,"").trim(),t.includes("{")||t.includes("[")){const r=t.search(/[\[{]/u);if(r>18){const i=t.slice(0,r).trim().replace(/[-–—,:;]+$/u,"").trim();i&&(t=i)}}const s=N(n),o=200;if(s.length>0&&t.length>o){let r=-1;for(const i of s){const a=re(t,i);a>=0&&(r<0||a<r)&&(r=a)}if(r<0)for(const i of s){if(i.length<4)continue;const a=t.toLowerCase().indexOf(i.toLowerCase());a>=0&&(r<0||a<r)&&(r=a)}if(r>=0){const a=Math.max(0,r-48),u=Math.min(t.length,a+o),d=t.slice(a,u).trim();t=`${a>0?"…":""}${d}${u<t.length?"…":""}`}else t=`${t.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`}else t.length>o&&(t=`${t.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`);return t.replace(/\s{2,}/g," ").trim()}function lo(e,n,t){const s=we(e.snippet,n);return s.length<=t?s:`${s.slice(0,t-1).replace(/\s+\S*$/u,"").trimEnd()}…`}function Yt(e,n){return N(n).filter(t=>{const s=t.toLowerCase();return e.title.toLowerCase().includes(s)||e.snippet.toLowerCase().includes(s)||we(e.snippet,n).toLowerCase().includes(s)})}function bn(e){const n=(e.kind||e.role||e.type||"record").toLowerCase();return n==="assistant_turn"||n==="assistant"?"assistant":n==="user_turn"||n==="user"?"user":n==="system_record"||n==="system"?"system":n==="command_or_tool"||n==="tool_use"?"tool":n==="response_item"?"tool output":n==="agent_reasoning"||n==="reasoning"?"reasoning":n.replace(/_/gu," ")}function Ln(e){const n=(e.kind||e.role||e.type||"").toLowerCase();return n==="assistant"||n==="assistant_turn"||n==="user"||n==="user_turn"||n==="last-prompt"||n==="ai-title"?0:n==="system"||n==="system_record"||n.includes("reasoning")?1:2}function fo(e){return e.scoreSource==="hybrid"?"Words and meaning":e.scoreSource==="vector"?"Similar in meaning":"Exact words"}function mo(e,n,t){const s=Yt(e,n),o=s.length===1?`Matched “${s[0]}”`:s.length>1?`Matched ${s.length} terms`:"Matched in this session";if(!t?.matched)return o;const r=[t.renderedText,t.summary].filter(Boolean).join(" ").toLowerCase(),i=s.filter(d=>r.includes(d.toLowerCase()));if(i.length===0)return o;const a=bn(t),u=a==="assistant"?"an assistant reply":a==="user"?"your message":a==="tool"?"a tool call":a==="tool output"?"tool output":a==="system"?"a system record":a==="reasoning"?"agent reasoning":`a ${a} record`;return i.length===1?`Matched “${i[0]}” in ${u}`:`Matched ${i.length} terms in ${u}`}function po(e){const n=A(e);if(n){const s=oe(n.path),o=n.recordRange;return o?`${s}#R${o[0]}-R${o[1]}`:s}const t=In(e);if(t){const s=oe(t.path),o=t.lineRange;return o?`${s}#L${o[0]}-L${o[1]}`:s}return e.id}function qt(e){const n=e.filter(o=>Ln(o)===2).length,t=e.length-n,s=e.some(o=>o.matched)?" · match inside":"";return n>0&&t===0?`${n} tool step${n===1?"":"s"}${s}`:n===0?`${t} process step${t===1?"":"s"}${s}`:`${n} tool + ${t} process step${e.length===1?"":"s"}${s}`}function Qt(e){return`${e.length} more conversation turn${e.length===1?"":"s"}`}function ho(e,n={}){if(e.length===0)return[];const t=n.contextRadius??3,s=n.maxTurns??6,o=n.centerRecordIndex===void 0?-1:e.findIndex(g=>g.index===n.centerRecordIndex),r=e.findIndex(g=>g.matched),i=o>=0?o:r>=0?r:0,a=e.slice(Math.max(0,i-t),Math.min(e.length,i+t+1)),u=[];let d=[],f=[],v=0;const P=()=>{d.length!==0&&(u.push({kind:"folded",records:d,summary:qt(d)}),d=[])},y=()=>{f.length!==0&&(u.push({kind:"folded",records:f,summary:Qt(f)}),f=[])};for(const g of a){if(Ln(g)>0){y(),d.push(g);continue}if(P(),v>=s){f.push(g);continue}u.push({kind:"turn",record:g,role:bn(g)}),v+=1}return P(),y(),u}function Te(e){const n=A(e)?.recordRange;return n?n[0]:Number.MAX_SAFE_INTEGER}function go(e){const n=[],t=new Map;for(const s of e){const o=s.collectionId||s.id,r=t.get(o);r?r.push(s):(n.push(o),t.set(o,[s]))}return n.map(s=>{const o=[...t.get(s)??[]].sort((i,a)=>{const u=Te(i)-Te(a);return u!==0?u:i.score-a.score}),r=t.get(s)?.[0]??o[0];return{collectionId:s,best:r,moments:o}})}function yn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wo(e,n){const t=N(n);if(t.length===0||e.length===0)return[{text:e,match:!1}];const s=t.map(a=>`(?<![A-Za-z0-9_./~-])${yn(a)}(?![A-Za-z0-9_./~-])`),o=new RegExp(`(${s.join("|")})`,"giu"),r=[];let i=0;for(const a of e.matchAll(o)){const u=a.index??0;u>i&&r.push({text:e.slice(i,u),match:!1}),r.push({text:a[0],match:!0}),i=u+a[0].length}return i<e.length&&r.push({text:e.slice(i),match:!1}),r.length>0?r:[{text:e,match:!1}]}const Io={sessions:"Sessions",skills:"Skills",mcp:"MCP",codebase:"Codebase",context_pack:"Context packs",mixed:"Mixed"},En=[{value:"1",label:"Last 24h"},{value:"3",label:"Last 3 days"},{value:"7",label:"Last 7 days"},{value:"30",label:"Last 30 days"}],vo=["sessions","skills","mcp","codebase","context_pack"];function So(){return{query:"",sourceKinds:[],harness:[],project:[],timeWindow:"all"}}function Xt(e){return e?En.some(n=>n.value===e):!1}function Q(e){return e?e.split(",").map(n=>n.trim()).filter(n=>n.length>0):[]}function Zt(e){const n=e==null?new URLSearchParams:typeof e=="string"?new URLSearchParams(e):e,t=n.get("time"),s=Xt(t)?t:"all";return{query:n.get("q")?.trim()??"",sourceKinds:Q(n.get("source")),harness:Q(n.get("harness")),project:Q(n.get("project")),timeWindow:s}}function Jt(e,n={}){const t=new URLSearchParams,s=e.query.trim();return s&&t.set("q",s),e.sourceKinds.length>0&&t.set("source",e.sourceKinds.join(",")),e.harness.length>0&&t.set("harness",e.harness.join(",")),e.project.length>0&&t.set("project",e.project.join(",")),e.timeWindow!=="all"&&t.set("time",e.timeWindow),n.hitId&&t.set("hit",n.hitId),t}function bo(e,n){return e.query.trim()===n.query.trim()&&e.timeWindow===n.timeWindow&&X(e.sourceKinds,n.sourceKinds)&&X(e.harness,n.harness)&&X(e.project,n.project)}function X(e,n){if(e.length!==n.length)return!1;const t=[...e].map(o=>o.trim().toLowerCase()).sort(),s=[...n].map(o=>o.trim().toLowerCase()).sort();return t.every((o,r)=>o===s[r])}function es(e){return e.query.trim().length>0||e.sourceKinds.length>0||e.harness.length>0||e.project.length>0||e.timeWindow!=="all"}function Lo(e){if(e==="all")return null;const n=Number.parseInt(e,10);return!Number.isFinite(n)||n<=0?null:Date.now()-n*24*60*60*1e3}function yo(e){return e==="all"?"Any time":En.find(t=>t.value===e)?.label??e}const $n=typeof window<"u"?window.location.href:"http://scout.local/";function Rn(e){const n=e.toString();return new URL(n,$n)}function ns(e){switch(e){case"profile":case"config":case"definitions":return e==="definitions"?"config":e;case"observe":case"message":return e;default:return}}function ts(e){const n=e.trim().replace(/^#/,"");if(!n.startsWith("msg-"))return null;const t=n.slice(4).trim();if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}function ss(e){switch(e){case"control":case"mission":case"command":case"warroom":case"conduct":case"conductor":return"mission";case"plan":case"advisor":return"advisor";case"issues":case"errors":case"warnings":return"issues";case"agents":case"tail":case"atop":case"lanes":case"world":return e;default:return}}function os(e){return e==="delivered"||e==="failed"||e==="all"?e:void 0}function rs(e){return e==="indexer"||e==="knowledge"?e:void 0}function as(e){switch(e){case"pairing":case"agents":case"appearance":case"operator":case"comms":case"credentials":case"voice":case"devices":case"about":return e;case"communications":return"comms";default:return}}function is(e){switch(e){case"tail":case"session":case"chat":case"work":return e;default:return}}function cs(e){const n=e?.trim().replace(/\.+$/u,"");return n==="observe"||n==="takeover"?n:void 0}function us(e){const n=e?.trim().toLowerCase();return n==="pty"||n==="tmux"||n==="zellij"||n==="herdr"?n:void 0}function ls(e){const n=e?.trim().toLowerCase();return n==="shell"||n==="claude"||n==="codex"||n==="pi"?n:void 0}function ds(e){return e==="all"||e==="touched"?"all":e==="changed"?"changed":void 0}function Fe(e){if(!e)return;const n=Number.parseInt(e,10);return Number.isSafeInteger(n)&&n>0?n:void 0}function De(e){return e==="mission"?"control":e}function fs(e){return e.searchParams.has("no-ops")?!1:typeof window>"u"?!0:nn()}function ms(e){return e==="tail"}function ps(e){return e==="lanes"||e==="world"}function Pn(e){return ms(e)||ps(e)}const Ie="machineId",Cn=new Set(["inbox","conversation","agents-v2","messages","sessions","repos","harnesses","mesh","mesh-ops","activity","work","follow"]);function hs(e){return e.searchParams.get(Ie)?.trim()||void 0}function gs(e,n){return!n||!Cn.has(e.view)?e:{...e,machineId:n}}function ve(e){return Cn.has(e.view)}function ws(e){return"machineId"in e&&e.machineId?e.machineId:null}function Oe(e,n){if(!ve(e))return e;const t={...e},s=n?.trim();return s?t.machineId=s:delete t.machineId,t}function Eo(e){return ve(e)?{...e,machineId:""}:e}function Is(e,n){return ve(e)?"machineId"in e?Oe(e,e.machineId??null):Oe(e,ws(n)):e}function _(e,n){"machineId"in n&&n.machineId&&e.set(Ie,n.machineId)}function I(e){const n=e.toString();return n?`?${n}`:""}function T(e,n){const t=new URLSearchParams;return _(t,n),`${e}${I(t)}`}function vs(e){return"machineId"in e&&e.machineId?`:machine:${e.machineId}`:""}function Se(e){const n=Rn(e),t=n.pathname.replace(/^\/+/,"").split("/").filter(Boolean);if(t[0]==="embed"&&["home","search","ops"].includes(t[1]??"")){const c=new URL(n),l=t[1],m=n.searchParams.get("mode");c.pathname=l==="home"?"/":`/${l}${m?`/${encodeURIComponent(m)}`:""}`,c.searchParams.delete("mode");const p=Se(c);return l==="ops"&&p.view==="inbox"?{...p,view:"ops",mode:"tail"}:p}const s=hs(n),o=c=>gs(c,s),r=kt(t,n,o);if(r)return r;const i=ts(n.hash),a=ns(n.searchParams.get("tab"))??(i?"message":void 0),u=n.searchParams.get("project")?.trim()||void 0,d=n.searchParams.get("agentId")?.trim()||void 0;if(t[0]==="agent"&&t[1])return{view:"agent-info",conversationId:decodeURIComponent(t[1])};const f=n.searchParams.get("project")?.trim()||void 0,v=n.searchParams.get("harness")?.trim()||void 0,P=n.searchParams.get("node")?.trim()||void 0,y=n.searchParams.get("set")?.trim(),g=y==="live"||y==="ephemeral"||y==="archived"?y:void 0,x=n.searchParams.get("view")?.trim(),z=x==="sessions"||x==="agents"?x:void 0,U=n.searchParams.get("state")?.trim(),be=U==="needs"||U==="live"||U==="idle"?U:void 0,Fn=n.searchParams.get("ephemeral")==="1",W=n.searchParams.get("session")?.trim()||void 0,b=n.searchParams.get("select")?.trim()||void 0,E={...v?{harness:v}:{},...P?{node:P}:{},...g?{set:g}:{},...z?{indexView:z}:{},...be?{stateFilter:be}:{},...Fn?{showEphemeral:!0}:{}};if(t[0]==="projects"){const c=t[1]?decodeURIComponent(t[1]):void 0;if(!c)return o({view:"agents-v2",...b?{selectedAgentId:b}:{},...E});if(t[2]==="agents"){const l=t[3]?decodeURIComponent(t[3]):void 0;if(l){if(t[4]==="c"&&t[5])return o({view:"agents-v2",projectSlug:c,agentId:l,conversationId:decodeURIComponent(t[5]),tab:a??"message",...E});const m=t[4]==="sessions"&&t[5]?decodeURIComponent(t[5]):W;return o({view:"agents-v2",projectSlug:c,agentId:l,...m?{sessionId:m}:{},...a?{tab:a}:{},...E})}return o({view:"agents-v2",projectSlug:c,indexView:"agents",...b?{selectedAgentId:b}:{},...E})}return t[2]==="sessions"?o({view:"agents-v2",projectSlug:c,indexView:"sessions",...t[3]?{sessionId:decodeURIComponent(t[3])}:{},...b?{selectedAgentId:b}:{},...E}):o({view:"agents-v2",projectSlug:c,...b?{selectedAgentId:b}:{},...E})}if(t[0]==="agents-v2"&&t[1]==="sessions"&&t[2])return o({view:"agents-v2",sessionId:decodeURIComponent(t[2]),...b?{selectedAgentId:b}:{},...f?{projectSlug:f}:{},...E});if(t[0]==="agents-v2"&&t[1]){const c=decodeURIComponent(t[1]);return o({view:"agents-v2",agentId:c,...a?{tab:a}:{},...W?{sessionId:W}:{},...f?{projectSlug:f}:{},...E})}if(t[0]==="agents-v2")return o({view:"agents-v2",...b?{selectedAgentId:b}:{},...f?{projectSlug:f}:{},...E});if(t[0]==="agents"&&t[1]){const c=decodeURIComponent(t[1]),l=t[2]==="sessions"&&t[3]?decodeURIComponent(t[3]):W;return t[2]==="c"&&t[3]?o({view:"agents-v2",agentId:c,conversationId:decodeURIComponent(t[3]),tab:a??"message",...E}):o({view:"agents-v2",agentId:c,...l?{sessionId:l}:{},...a?{tab:a}:{},...E})}if(t[0]==="agents")return o({view:"agents-v2",...b?{selectedAgentId:b}:{},...f?{projectSlug:f}:{},...E});if(t[0]==="agents.deprecated"&&t[1]&&t[2]==="sessions"&&t[3])return o({view:"sessions",agentId:decodeURIComponent(t[1]),sessionId:decodeURIComponent(t[3])});if(t[0]==="agents.deprecated"&&t[1]&&t[2]==="c"&&t[3])return o({view:"agents-v2",agentId:decodeURIComponent(t[1]),conversationId:decodeURIComponent(t[3]),tab:a??"message"});if(t[0]==="agents.deprecated"&&t[1]){const c=decodeURIComponent(t[1]);return o({view:"agents-v2",agentId:c,...a?{tab:a}:{},...!a&&u?{projectSlug:u}:{}})}if(t[0]==="agents.deprecated")return o({view:"agents-v2",...u?{projectSlug:u}:{}});if(t[0]==="fleet")return o({view:"inbox"});if(t[0]==="c"&&t[1])return o({view:"conversation",conversationId:decodeURIComponent(t[1])});if(t[0]==="flights"&&t[1]&&t[2]==="observe"){const c=n.searchParams.get("session")?.trim()||void 0,l=n.searchParams.get("compare")?.trim()||void 0;return o({view:"sessions",flightId:decodeURIComponent(t[1]),...c?{sessionId:c}:{},...l?{compareSessionId:l}:{}})}if(t[0]==="sessions"&&t[1])return o({view:"sessions",sessionId:decodeURIComponent(t[1]),...d?{agentId:d}:{}});if(t[0]==="conversations")return o({view:"messages"});if(t[0]==="messages"){if(t[1]==="agent"&&t[2]){const l=n.searchParams.get("thread")?.trim()||void 0;return o({view:"messages",agentId:decodeURIComponent(t[2]),...l?{threadId:l}:{}})}const c={view:"messages",...t[1]?{conversationId:decodeURIComponent(t[1])}:{}};return o(c)}if(t[0]==="sessions")return o({view:"sessions",...d?{agentId:d}:{}});if(t[0]==="repos"){const c=n.searchParams.get("root")?.trim()||void 0;return o({view:"repos",...c?{root:c}:{}})}if(t[0]==="providers"||t[0]==="harnesses")return o({view:"harnesses"});if(t[0]==="repo-diff"){const c=n.searchParams.get("path")?.trim();if(c){const l=n.searchParams.getAll("layer").filter(w=>w==="unstaged"||w==="staged"||w==="branch"),m=n.searchParams.getAll("file").map(w=>w.trim()).filter(Boolean),p=n.searchParams.get("sessionId")?.trim()||void 0,S=n.searchParams.get("agentId")?.trim()||void 0,L=ds(n.searchParams.get("include"));return{view:"repo-diff",path:c,...l.length>0?{layers:l}:{},...m.length>0?{files:m}:{},...p?{sessionId:p}:{},...S?{agentId:S}:{},...L?{include:L}:{}}}}if(t[0]==="search"){const c=rs(t[1]),l=n.searchParams.get("hit")?.trim()||void 0,m=Zt(n.searchParams);return{view:"search",...c&&c!=="knowledge"?{mode:c}:{},...l?{hitId:l}:{},...es(m)?{filters:m}:{}}}if(t[0]==="channels"&&t[1])return o({view:"messages",conversationId:decodeURIComponent(t[1])});if(t[0]==="channels")return o({view:"messages"});if(t[0]==="network"||t[0]==="mesh")return o({view:"mesh"});if(t[0]==="mesh-ops")return o({view:"mesh-ops",...t[1]?{itemId:decodeURIComponent(t[1])}:{}});if(t[0]==="dispatch"||t[0]==="broker"){const c=n.searchParams.get("attempt")?.trim()||void 0,l=os(n.searchParams.get("filter"));return{view:"broker",...c?{attemptId:c}:{},...l&&l!=="all"?{filter:l}:{}}}if(t[0]==="code"){const c=n.searchParams.get("wt")?.trim()||void 0,l=n.searchParams.get("fromConversation")?.trim()||void 0,m=Fe(n.searchParams.get("line")),p=Fe(n.searchParams.get("endLine")),S=m&&p&&p>=m?p:void 0;if(t[1]){const R=decodeURIComponent(t[1]),$=t.length>2?t.slice(2).map(decodeURIComponent).join("/"):void 0;return{view:"code",project:R,...$?{path:$}:{},...c?{wt:c}:{},...m?{line:m}:{},...S?{endLine:S}:{},...l?{returnConversationId:l}:{}}}const L=n.searchParams.get("root")?.trim()||void 0,w=n.searchParams.get("file")?.trim()||void 0;return{view:"code",...L?{root:L}:{},...w?{file:w}:{},...c?{wt:c}:{},...m?{line:m}:{},...S?{endLine:S}:{},...l?{returnConversationId:l}:{}}}if(t[0]==="briefings"&&t[1])return{view:"briefings",briefingId:decodeURIComponent(t[1])};if(t[0]==="briefings")return{view:"briefings"};if(t[0]==="activity")return o({view:"activity"});if(t[0]==="voice")return{view:"voice"};if(t[0]==="work"&&t[1])return o({view:"work",workId:decodeURIComponent(t[1])});if(t[0]==="follow"){const c=is(n.searchParams.get("view")),l={view:"follow",...c?{preferredView:c}:{}},m=t[1],p=t[2]?decodeURIComponent(t[2]):"";m==="flight"&&p&&(l.flightId=p),m==="invocation"&&p&&(l.invocationId=p),m==="conversation"&&p&&(l.conversationId=p),m==="work"&&p&&(l.workId=p),m==="session"&&p&&(l.sessionId=p),m==="agent"&&p&&(l.targetAgentId=p);const S=n.searchParams.get("flightId"),L=n.searchParams.get("invocationId"),w=n.searchParams.get("conversationId"),R=n.searchParams.get("workId"),$=n.searchParams.get("sessionId"),Le=n.searchParams.get("targetAgentId");return S&&(l.flightId=S),L&&(l.invocationId=L),w&&(l.conversationId=w),R&&(l.workId=R),$&&(l.sessionId=$),Le&&(l.targetAgentId=Le),o(l)}if(t[0]==="settings"){if(t[1]==="agents")return{view:"settings",section:"agents",...t[2]?{agentId:decodeURIComponent(t[2])}:{}};const c=as(t[1]);return{view:"settings",...c?{section:c}:{}}}if(t[0]==="terminal"){const c=cs(n.searchParams.get("mode")),l=n.searchParams.get("session")?.trim()||void 0,m=zn(n.searchParams.get("surface"))??void 0;if(t[1]==="new"){const S=us(n.searchParams.get("backend"))??"pty",L=ls(n.searchParams.get("agent"))??"shell",w=n.searchParams.get("name")?.trim()||void 0,R=n.searchParams.get("tab")?.trim()||void 0,$=n.searchParams.get("socketDir")?.trim()||void 0;return{view:"terminal",terminalBackend:S,terminalAgent:L,...w?{terminalSessionName:w}:{},...R?{terminalTabId:R}:{},...$?{zellijSocketDir:$}:{}}}const p=t[1]==="s"&&t[2]?Me(decodeURIComponent(t.slice(2).join("/")))?decodeURIComponent(t.slice(2).join("/")):null:Wn(t[1]?decodeURIComponent(t[1]):void 0,t[2]?decodeURIComponent(t.slice(2).join("/")):void 0);return p?{view:"terminal",terminalSurfaceKey:p,...l?{terminalSessionId:l}:{},...c?{mode:c}:{}}:{view:"terminal",...t[1]?{agentId:decodeURIComponent(t[1])}:{},...c?{mode:c}:{},...!t[1]&&l?{terminalSessionId:l}:{},...!t[1]&&m?{terminalSurfaceKey:m}:{}}}if(t[0]==="ops"){const c=ss(t[1])??"mission";if(!Pn(c)&&!fs(n))return o({view:"inbox"});const l=c==="tail"?n.searchParams.get("q")?.trim():"",m=c==="advisor"?n.searchParams.get("plan")?.trim():"",p=n.searchParams.get("flightId")?.trim(),S=n.searchParams.get("invocationId")?.trim(),L=n.searchParams.get("conversationId")?.trim(),w=n.searchParams.get("workId")?.trim(),R=n.searchParams.get("sessionId")?.trim(),$=n.searchParams.get("targetAgentId")?.trim()??n.searchParams.get("agentId")?.trim();return{view:"ops",mode:c,...l?{tailQuery:l}:{},...m?{planDocumentId:m}:{},...p?{flightId:p}:{},...S?{invocationId:S}:{},...L?{conversationId:L}:{},...w?{workId:w}:{},...R?{sessionId:R}:{},...$?{targetAgentId:$}:{}}}return o({view:"inbox"})}function _n(e,n){const t=e.view==="sessions"&&e.flightId?null:wn(e,n);if(t)return t;switch(e.view){case"inbox":return T("/",e);case"conversation":{const s=new URLSearchParams;return _(s,e),`/c/${encodeURIComponent(e.conversationId)}${I(s)}`}case"agent-info":return`/agent/${encodeURIComponent(e.conversationId)}`;case"agents-v2":{const s=new URLSearchParams;e.harness&&s.set("harness",e.harness),e.node&&s.set("node",e.node),e.set&&s.set("set",e.set),!e.projectSlug&&e.indexView&&e.indexView!=="agents"&&s.set("view",e.indexView),e.stateFilter&&s.set("state",e.stateFilter),e.showEphemeral&&s.set("ephemeral","1"),e.selectedAgentId&&!e.agentId&&!e.sessionId&&s.set("select",e.selectedAgentId);const o=e.conversationId?"message":"profile";e.agentId&&e.tab&&e.tab!==o&&s.set("tab",e.tab),_(s,e);const r=e.projectSlug?`/projects/${encodeURIComponent(e.projectSlug)}`:null;return`${r?e.agentId?e.conversationId?`${r}/agents/${encodeURIComponent(e.agentId)}/c/${encodeURIComponent(e.conversationId)}`:e.sessionId?`${r}/agents/${encodeURIComponent(e.agentId)}/sessions/${encodeURIComponent(e.sessionId)}`:`${r}/agents/${encodeURIComponent(e.agentId)}`:e.sessionId?`${r}/sessions/${encodeURIComponent(e.sessionId)}`:e.indexView==="sessions"?`${r}/sessions`:e.indexView==="agents"?`${r}/agents`:r:e.agentId?e.conversationId?`/agents/${encodeURIComponent(e.agentId)}/c/${encodeURIComponent(e.conversationId)}`:e.sessionId?`/agents/${encodeURIComponent(e.agentId)}/sessions/${encodeURIComponent(e.sessionId)}`:`/agents/${encodeURIComponent(e.agentId)}`:e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/projects"}${I(s)}`}case"messages":{const s=new URLSearchParams;return e.agentId&&e.threadId&&s.set("thread",e.threadId),_(s,e),`${e.agentId?`/messages/agent/${encodeURIComponent(e.agentId)}`:e.conversationId?`/messages/${encodeURIComponent(e.conversationId)}`:"/messages"}${I(s)}`}case"sessions":{const s=new URLSearchParams;return e.agentId&&s.set("agentId",e.agentId),e.flightId?(e.sessionId&&s.set("session",e.sessionId),e.compareSessionId&&s.set("compare",e.compareSessionId),_(s,e),`/flights/${encodeURIComponent(e.flightId)}/observe${I(s)}`):(_(s,e),`${e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/sessions"}${I(s)}`)}case"repos":{const s=new URLSearchParams;return e.root&&s.set("root",e.root),_(s,e),`/repos${I(s)}`}case"harnesses":return T("/providers",e);case"repo-diff":{const s=new URLSearchParams;s.set("path",e.path);for(const o of e.layers??[])s.append("layer",o);for(const o of e.files??[])s.append("file",o);return e.sessionId&&s.set("sessionId",e.sessionId),e.agentId&&s.set("agentId",e.agentId),e.include&&s.set("include",e.include),`/repo-diff${I(s)}`}case"search":{const s=e.mode==="indexer"?"/search/indexer":"/search",o=e.filters?Jt(e.filters,{hitId:e.hitId??null}):new URLSearchParams;return!e.filters&&e.hitId&&o.set("hit",e.hitId),`${s}${I(o)}`}case"mesh":return T("/network",e);case"mesh-ops":return T(e.itemId?`/mesh-ops/${encodeURIComponent(e.itemId)}`:"/mesh-ops",e);case"broker":{const s=new URLSearchParams;return e.attemptId&&s.set("attempt",e.attemptId),e.filter&&e.filter!=="all"&&s.set("filter",e.filter),`/dispatch${I(s)}`}case"code":{const s=new URLSearchParams;if(e.wt&&s.set("wt",e.wt),e.line&&s.set("line",String(e.line)),e.line&&e.endLine&&e.endLine>=e.line&&s.set("endLine",String(e.endLine)),e.project){e.returnConversationId&&s.set("fromConversation",e.returnConversationId);const r=[encodeURIComponent(e.project)];return e.path&&r.push(...e.path.split("/").map(encodeURIComponent)),`${`/code/${r.join("/")}`}${I(s)}`}e.root&&s.set("root",e.root),e.file&&s.set("file",e.file),e.returnConversationId&&s.set("fromConversation",e.returnConversationId);const o=s.toString();return o?`/code?${o}`:"/code"}case"briefings":return e.briefingId?`/briefings/${encodeURIComponent(e.briefingId)}`:"/briefings";case"activity":return T("/activity",e);case"voice":return"/voice";case"work":return T(`/work/${encodeURIComponent(e.workId)}`,e);case"settings":return e.section==="agents"?e.agentId?`/settings/agents/${encodeURIComponent(e.agentId)}`:"/settings/agents":e.section?e.section==="pairing"?"/settings/pairing":e.section==="comms"?"/settings/comms":`/settings/${e.section}`:"/settings";case"ops":if(!e.mode)return"/ops";if(e.mode==="tail"||e.mode==="advisor"){const s=new URLSearchParams;return e.mode==="tail"&&e.tailQuery&&s.set("q",e.tailQuery),e.mode==="advisor"&&e.planDocumentId&&s.set("plan",e.planDocumentId),e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),`/ops/${De(e.mode)}${I(s)}`}return`/ops/${De(e.mode)}`;case"follow":{const s=new URLSearchParams;e.preferredView&&s.set("view",e.preferredView),e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),e.machineId&&s.set(Ie,e.machineId);const o=s.toString();return`/follow${o?`?${o}`:""}`}case"terminal":if(e.agentId){const s=new URLSearchParams;return e.mode&&s.set("mode",e.mode),`/terminal/${encodeURIComponent(e.agentId)}${I(s)}`}{const s=new URLSearchParams;if(e.terminalBackend)return e.terminalBackend!=="pty"&&s.set("backend",e.terminalBackend),e.terminalAgent&&e.terminalAgent!=="shell"&&s.set("agent",e.terminalAgent),e.terminalSessionName&&s.set("name",e.terminalSessionName),e.terminalTabId&&s.set("tab",e.terminalTabId),e.zellijSocketDir&&s.set("socketDir",e.zellijSocketDir),`/terminal/new${I(s)}`;e.mode&&s.set("mode",e.mode);const o=Kn(e.terminalSurfaceKey);return o?`/terminal/${encodeURIComponent(o.backend)}/${encodeURIComponent(o.sessionName)}${I(s)}`:Me(e.terminalSurfaceKey)?`/terminal/s/${encodeURIComponent(e.terminalSurfaceKey)}${I(s)}`:(e.terminalSessionId&&s.set("session",e.terminalSessionId),e.terminalSurfaceKey&&s.set("surface",e.terminalSurfaceKey),`/terminal${I(s)}`)}}}function j(e){const n=vs(e);switch(e.view){case"conversation":return`conv:${e.conversationId}${n}`;case"agent-info":return`agent-info:${e.conversationId}`;case"settings":return`settings:${e.section??"pairing"}:${e.agentId??""}`;case"agents-v2":return["agents-v2",e.projectSlug??"",e.harness??"",e.node??"",e.set??"",e.indexView??"agents",e.stateFilter??"",e.showEphemeral?"eph":"",e.agentId??"",e.sessionId??"",n].join(":");case"sessions":return e.flightId?`flight-observe:${e.flightId}:${e.sessionId??""}:${e.compareSessionId??""}${n}`:e.sessionId?`session:${e.agentId??""}:${e.sessionId}${n}`:`sessions${n}`;case"messages":return["messages",e.conversationId??"",e.agentId??"",e.threadId??"",n].join(":");case"work":return`work:${e.workId}${n}`;case"ops":return`ops:${e.mode??"advisor"}:${e.tailQuery??""}:${e.planDocumentId??""}:${e.flightId??""}:${e.invocationId??""}:${e.workId??""}:${e.conversationId??""}:${e.sessionId??""}:${e.targetAgentId??""}`;case"search":return`search:${e.mode??"knowledge"}:${e.hitId??""}`;case"broker":return`broker:${e.attemptId??""}`;case"follow":return`follow:${e.flightId??e.invocationId??e.conversationId??e.workId??e.sessionId??e.targetAgentId??""}:${e.preferredView??""}${n}`;case"terminal":return`terminal:${e.agentId??""}:${e.terminalSessionId??""}:${e.terminalSurfaceKey??""}:${e.terminalBackend??""}:${e.terminalAgent??""}:${e.terminalSessionName??""}:${e.terminalTabId??""}:${e.mode??"detail"}`;case"repo-diff":return`repo-diff:${e.path}`;default:return`${e.view}${n}`}}function G(e,n){return ce(Se(`${e}${n}`))}function An(e){return e?`#${e}`:""}function Ss(e){return e.startsWith("/embed/")||e==="/ops/lanes/embed"}function xe(){if(typeof window>"u"){const e=new URL($n);return{pathname:e.pathname,searchStr:e.search,hash:e.hash.replace(/^#/,""),state:null}}return{pathname:window.location.pathname,searchStr:window.location.search,hash:window.location.hash.replace(/^#/,""),state:window.history.state}}function bs(e,n){return e.pathname===n.pathname&&e.searchStr===n.searchStr&&e.hash===n.hash&&Object.is(e.state,n.state)}function Ls(e){let n=e.read();const t=new Set;let s=null;const o=()=>{const r=e.read();if(!bs(n,r)){n=r;for(const i of t)i()}};return{getSnapshot:()=>n,subscribe(r){return s||(s=e.observe(o)),t.add(r),()=>{t.delete(r)}},navigateTo(r,i={}){const a=n.pathname,u=i.state===void 0?n.state:i.state;i.replace?e.replace(r,u):e.push(r,u),o(),n.pathname!==a&&Mn(a,n.pathname)}}}function ys(){return typeof window>"u"?{read:xe,push:()=>{},replace:()=>{},observe:()=>()=>{}}:{read:xe,push:(e,n)=>window.history.pushState(n,"",e),replace:(e,n)=>window.history.replaceState(n,"",e),observe:e=>(window.addEventListener("popstate",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)})}}const D=Ls(ys());function Es(){return C.useSyncExternalStore(D.subscribe,D.getSnapshot,D.getSnapshot)}function ae(e,n={}){D.navigateTo(e,n)}function Un(){return typeof window>"u"?null:window.navigation??null}function kn(){if(typeof window>"u")return!1;const e=Un();return e?e.canGoBack:window.history.length>1}function $s(){if(!kn())return;const e=Un();if(e){e.back();return}window.history.back()}function $o(e){if(!e||typeof e!="object")return null;const n=e.returnTo;return!n||typeof n!="object"||typeof n.view!="string"?null:n}function Ro(e){return!e||typeof e!="object"?!1:e.returnUseHistory===!0}function je(e){if(!e||typeof e!="object")return e;const{returnTo:n,returnUseHistory:t,settingsEntry:s,...o}=e;return o}function Rs(e,n){if(n.returnTo!==void 0){const t=n.state!==void 0?n.state:je(e),s=t&&typeof t=="object"?{...t}:{};return s.returnTo=n.returnTo,s.returnUseHistory=n.replace!==!0,s}return n.state!==void 0?n.state:n.replace?e:je(e)}function Tn(e){return e?e.replace(/^#/,""):""}function Ps(e,n,t={}){const s=G(e.pathname,e.searchStr),o=Is(n,s),r=t.preserveSearch===!1?"":e.searchStr;let i=_n(o,e.pathname);if({"/embed/home":"inbox","/embed/search":"search","/embed/ops":"ops"}[e.pathname]===o.view){const f=Rn(i),v=f.pathname.split("/").filter(Boolean)[1];f.pathname=e.pathname;const P=new URLSearchParams(e.searchStr);for(const y of["embed","profile","theme","themeVars","_nav"]){const g=P.get(y);g!==null&&f.searchParams.set(y,g)}v&&f.searchParams.set("mode",v),i=f.pathname+f.search}const u=gn(i,r),d=Tn(t.hash);return{route:o,href:`${u}${d?`#${d}`:""}`}}function Cs(e,n){const t=new URLSearchParams(e.searchStr);for(const[r,i]of Object.entries(n.searchPatch??{}))i===null?t.delete(r):t.set(r,i);const s=t.toString(),o=n.hash===void 0?e.hash:Tn(n.hash);return`${e.pathname}${s?`?${s}`:""}${o?`#${o}`:""}`}function Po(e){const n=D.getSnapshot(),t=Cs(n,e),s=`${n.pathname}${n.searchStr}${An(n.hash)}`;t!==s&&ae(t,{replace:e.replace??!0,state:e.state})}function _s(e,n,t){if(Ss(e))return null;const s=`${e}${n}`,o=Se(s),r=ce(o),i=gn(_n(r,e),n);return!(j(o)!==j(r)||r.view==="agents-v2"||s!==i)||s===i?null:`${i}${An(t)}`}function Co(){const{pathname:e,searchStr:n,hash:t}=Es(),s=`${e}${n}`,o=C.useMemo(()=>G(e,n),[e,n]),r=C.useRef({}),i=C.useRef(s);C.useEffect(()=>{const f=_s(e,n,t);f&&ae(f,{replace:!0})},[e,n,t]),C.useEffect(()=>{if(i.current===s)return;const f=G(e,n);requestAnimationFrame(()=>{window.scrollTo(0,r.current[j(f)]??0)}),i.current=s},[s,e,n]);const a=C.useCallback((f,v={})=>{const P=ce(f.view==="ops"&&!nn()&&!Pn(f.mode)?{view:"inbox"}:f),y=G(e,n),{route:g,href:x}=Ps({pathname:e,searchStr:n},P,v);r.current[j(y)]=window.scrollY;const z=D.getSnapshot().state,U=Rs(z,v);ae(x,{replace:v.replace,state:U}),requestAnimationFrame(()=>{window.scrollTo(0,r.current[j(g)]??0)})},[e,n]),u=C.useCallback(()=>$s(),[]),d=kn();return{route:o,navigate:a,navigateBack:u,canNavigateBack:d}}export{$t as $,go as A,es as B,bo as C,vo as D,Io as E,En as F,co as G,zt as H,pe as I,A as J,ro as K,io as L,lo as M,uo as N,Lo as O,wo as P,yo as Q,no as R,it as S,hn as T,pn as U,so as V,ve as W,Ks as X,Ms as Y,Gs as Z,Et as _,_n as a,Ws as a0,Lt as a1,Ys as a2,Rt as a3,Qs as a4,Xs as a5,qs as a6,Zs as a7,Vs as a8,Hs as a9,Ln as aA,ho as aB,oe as aC,mo as aD,fo as aE,bn as aF,zs as aa,sn as ab,tn as ac,Co as ad,Js as ae,eo as af,H as ag,ne as ah,Ds as ai,se as aj,q as ak,Ut as al,jt as am,kt as an,gn as ao,Nt as ap,ot as aq,to as ar,wn as as,Ke as at,oo as au,qn as av,In as aw,M as ax,ao as ay,po as az,Zn as b,Gn as c,ws as d,Eo as e,Po as f,$o as g,Qe as h,xs as i,ue as j,ft as k,Os as l,Ns as m,Bs as n,Ro as o,at as p,ct as q,Se as r,Oe as s,ut as t,Es as u,js as v,Fs as w,Jt as x,So as y,Zt as z};
|