@openscout/scout 0.2.98 → 0.2.105
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/NOTICE +7 -0
- package/README.md +37 -0
- package/bin/scout.mjs +6 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/chat.mjs +285 -0
- package/dist/client/assets/ActivityScreen-CcDdQTBK.js +1 -0
- package/dist/client/assets/{AddProjectForm-fXndbzXT.js → AddProjectForm-CHNJ4NnS.js} +1 -1
- package/dist/client/assets/AdventureEvidence-B4mEvXeD.js +5 -0
- package/dist/client/assets/AdventureReader-ZsBDQITY.js +4 -0
- package/dist/client/assets/AdventureScenery-DSxDlqG1.js +1 -0
- package/dist/client/assets/AgentAdventures-BxrYq_2v.js +1 -0
- package/dist/client/assets/AgentAvatar-NZOqcsB2.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +1 -0
- package/dist/client/assets/AgentDetailCard-MIEBKw_S.js +1 -0
- package/dist/client/assets/AgentFloorView-A0dDRlRV.js +1 -0
- package/dist/client/assets/AgentFloorWorld-BTqwmK5G.js +1 -0
- package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-Cc9uyfBr.js → AgentLaneCard-C4rKLLdT.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-Dv2lBFoH.js → AgentLaneChrome-fGC-ZrJS.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-CGqtqSHQ.js → AgentLaneDetailSheet-BTF4_th9.js} +2 -2
- package/dist/client/assets/{AgentLaneSummaryResize-Di4u6df2.js → AgentLaneSummaryResize-DgSeA_vS.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-CCGBArIb.js → AgentLanesPreflight-CcS23wij.js} +1 -1
- package/dist/client/assets/AgentLanesView-WZhEDBFE.js +2 -0
- package/dist/client/assets/AgentLiveActions-6Kfr1uOT.js +1 -0
- package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +1 -0
- package/dist/client/assets/AgentSessions-CO1WGa8Z.js +6 -0
- package/dist/client/assets/AgentsConsole-BQOWkj35.js +1 -0
- package/dist/client/assets/AgentsScreen-BMNAj1PH.js +1 -0
- package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +1 -0
- package/dist/client/assets/{AstronautSuit-CwB4Dw07.js → AstronautSuit-D67fIBdR.js} +1 -1
- package/dist/client/assets/AtopView-Ck30FbzG.js +1 -0
- package/dist/client/assets/BackToPicker-CkBhGRlD.js +1 -0
- package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +1 -0
- package/dist/client/assets/BriefingsScreen-DTxYMr3a.js +1 -0
- package/dist/client/assets/{BrokerMetadataPanel-BJSwU9XZ.js → BrokerMetadataPanel-crirZCdo.js} +1 -1
- package/dist/client/assets/BrokerScreen-CT37VQiL.js +8 -0
- package/dist/client/assets/Canvas-CRP0KjKb.js +1 -0
- package/dist/client/assets/{CastPicker-CkgTalIt.js → CastPicker-ZPomvOf-.js} +1 -1
- package/dist/client/assets/ChannelComposer-BVItWlEz.js +1 -0
- package/dist/client/assets/ChannelSidebar-B-2spawY.js +1 -0
- package/dist/client/assets/CharacterFamilyPreview-BniL8sEL.css +1 -0
- package/dist/client/assets/CharacterFamilyPreview-ckVkecDO.js +1 -0
- package/dist/client/assets/ChatAvatar-DKBsbOqk.js +1 -0
- package/dist/client/assets/ChatBits-CLJ71hTY.js +1 -0
- package/dist/client/assets/ChatCollapsedStrip-Co0NmqOO.js +1 -0
- package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +1 -0
- package/dist/client/assets/{CodeDiffPane-DfluIWmO.js → CodeDiffPane-D-iv28LJ.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-By_Wz9ex.js → CodeProjectPicker-CZ3gDdiT.js} +1 -1
- package/dist/client/assets/CodeScreen-CSC-zbP9.js +1 -0
- package/dist/client/assets/CommsCanvas-BR2YS76H.css +1 -0
- package/dist/client/assets/CommsCanvas-DdNAwjGW.js +1 -0
- package/dist/client/assets/CommsDeck-mGWY7Ivi.js +1 -0
- package/dist/client/assets/CommsFlowGraph-vQucylxF.css +1 -0
- package/dist/client/assets/CommsFlowGraph-voDD9M5R.js +1 -0
- package/dist/client/assets/CommsFlowMap-C33sgD48.js +1 -0
- package/dist/client/assets/CommsSelection-BL8aYD7z.js +1 -0
- package/dist/client/assets/{ConversationComposer-BUIjWMBi.js → ConversationComposer-DNcn5U6D.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +1 -0
- package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +1 -0
- package/dist/client/assets/ConversationPanels-6pprBpmq.js +6 -0
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +1 -0
- package/dist/client/assets/ConversationScreen-tpj4cqWs.js +2 -0
- package/dist/client/assets/ConversationStatus-Cv-7hErW.js +1 -0
- package/dist/client/assets/{CrewAvatar-CZ_faQ_s.js → CrewAvatar-zgzC3cbU.js} +1 -1
- package/dist/client/assets/CrewSprite-Dp9KBBGY.js +1 -0
- package/dist/client/assets/CrewSprite-DsQJdu3Z.css +1 -0
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
- package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +1 -0
- package/dist/client/assets/{DataTable-C6aMSilS.js → DataTable-av71ehJV.js} +1 -1
- package/dist/client/assets/DispatchAftermath-CcYGUB10.js +1 -0
- package/dist/client/assets/DocumentFocusViewer-DlMiEALb.js +1 -0
- package/dist/client/assets/{EmbeddableSurfacesLab-D3iZiS8o.js → EmbeddableSurfacesLab-CTkO_tQR.js} +1 -1
- package/dist/client/assets/{EmptyState-CKPWFSjq.js → EmptyState-CYUwYyAW.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CxNbcTYf.js → FileViewerPane-Cxhixtks.js} +2 -2
- package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +1 -0
- package/dist/client/assets/FloorContextSheet-Vj_wVZq1.js +1 -0
- package/dist/client/assets/FloorExchangePanel-B3TFhjLk.css +1 -0
- package/dist/client/assets/FloorExchangePanel-CjHSDXad.js +1 -0
- package/dist/client/assets/FloorMessagePasses-BG4ebnX5.js +1 -0
- package/dist/client/assets/FloorMessagePasses-nxwwiUom.css +1 -0
- package/dist/client/assets/FloorReplay-BoYaGY9t.js +1 -0
- package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +1 -0
- package/dist/client/assets/FloorSavedWork-jbtRs-YE.js +1 -0
- package/dist/client/assets/FloorTacticalHUD-BhyOqlL5.js +1 -0
- package/dist/client/assets/FollowScreen-CupyOgt4.js +1 -0
- package/dist/client/assets/HarnessMark-DSvM_H7H.js +1 -0
- package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +1 -0
- package/dist/client/assets/{HerdrSession-DsuxCtfX.js → HerdrSession-Dcm3vf9U.js} +3 -3
- package/dist/client/assets/{HomeHero-DXJo2QSO.js → HomeHero-pIZtE1cC.js} +1 -1
- package/dist/client/assets/HostAdvisorView-Dv5meXo2.js +1 -0
- package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +1 -0
- package/dist/client/assets/InviteSheet--5Zjct25.js +1 -0
- package/dist/client/assets/JumpPalette-BmiSOEmp.js +1 -0
- package/dist/client/assets/KnowledgeSearchInspector-B8yiM524.js +1 -0
- package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-t7-XJP-h.js → LaneToolHoverCard-D2cnTeUd.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-BB5DhFQm.js → LaneTraceEventFocus-BLhVHwff.js} +1 -1
- package/dist/client/assets/MeshCanvas-BR25OBTJ.js +3 -0
- package/dist/client/assets/MeshCanvasMinimap-ClVolr4-.js +1 -0
- package/dist/client/assets/MeshScreen-BW1dMFWF.js +1 -0
- package/dist/client/assets/{MeshTopologyView-Dc0GSrKa.js → MeshTopologyView-BT3ke2D1.js} +2 -2
- package/dist/client/assets/MessagesScreen-CtNMfIvC.js +1 -0
- package/dist/client/assets/MissionContextRail-CafjuseK.js +1 -0
- package/dist/client/assets/MissionControlView-BjPOViGY.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-nhy3hkxQ.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +1 -0
- package/dist/client/assets/MissionLogPane-DiUf3vWW.js +1 -0
- package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +1 -0
- package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +1 -0
- package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +1 -0
- package/dist/client/assets/NewAgentModal-BQ2wQ5gp.js +1 -0
- package/dist/client/assets/NewChatComposer-BEXS8vV6.js +19 -0
- package/dist/client/assets/{NewChatOrigin-DCn5cWPZ.js → NewChatOrigin-C8ROO4ps.js} +1 -1
- package/dist/client/assets/NodeDetailPanel-BNTqYC7m.js +1 -0
- package/dist/client/assets/NodeMenu-CcOeFRCB.js +1 -0
- package/dist/client/assets/ObserveEmbedScreen-Dh30EjAQ.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-DCJ5EmD8.js → ObserveTextFlow-CC5mnngm.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-CJVqIqQ2.js → ObservedTopologyPanel-DF6tRZL_.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +31 -0
- package/dist/client/assets/OpsAgentsView-D3rM0udq.js +1 -0
- package/dist/client/assets/OpsScreen-DySeNQ1V.js +1 -0
- package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-CUzZ4Rpx.js → ProjectAgentProfileBar-C8z22pJ2.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +1 -0
- package/dist/client/assets/ProjectsInbox-DfCXReZK.js +2 -0
- package/dist/client/assets/ProjectsRail-CELVubfJ.js +1 -0
- package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +1 -0
- package/dist/client/assets/Provider-CNZluAZb.js +5 -0
- package/dist/client/assets/{RailRow-B0sRaJc6.css → RailRow-B25zKEub.css} +1 -1
- package/dist/client/assets/RailRow-DUPqXMZh.js +1 -0
- package/dist/client/assets/RailToggle-BwmY70B8.js +1 -0
- package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +9 -0
- package/dist/client/assets/RenderedWorkerSprite-C8fxndAh.js +1 -0
- package/dist/client/assets/RenderedWorkerSprite-qnTfkd_4.css +1 -0
- package/dist/client/assets/ReplayClock-DUVJjrIu.js +1 -0
- package/dist/client/assets/ReplayLog-Bek1Vc4W.js +1 -0
- package/dist/client/assets/ReplayOutpost-DlRg3172.js +1 -0
- package/dist/client/assets/ReplayOutpost-Y1DvZgeu.css +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-mexrJPhW.js → RepoDiffEmbedScreen-CVUMnt6A.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DbqX4L3q.js → RepoDiffPageScreen-D9-s5PyB.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-D7FN-oyY.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +2 -0
- package/dist/client/assets/{ReposScreen-CzbO1Fuy.js → ReposScreen-BQ7HO1om.js} +2 -2
- package/dist/client/assets/RiggedWorkerCharacter-BpYECnyK.css +1 -0
- package/dist/client/assets/RiggedWorkerCharacter-CJMWlvV-.js +1 -0
- package/dist/client/assets/SageModelStudio-768dRQr4.css +1 -0
- package/dist/client/assets/SageModelStudio-B526NSnw.js +4108 -0
- package/dist/client/assets/ScoutDeckSurface-ChkvGyEW.js +1 -0
- package/dist/client/assets/{ScoutSurface-NlhDsPzg.js → ScoutSurface-6g1f5chk.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-l2WAahCg.js → ScoutbotFxLab-BuwBdnPf.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Cs0_FQdj.js → SecondaryNav-Bs-_VwTC.js} +1 -1
- package/dist/client/assets/SessionEmbedScreen-C2wf35-P.js +1 -0
- package/dist/client/assets/SessionObserve-B64YsYhy.js +12 -0
- package/dist/client/assets/{SessionObserve-CLrHfAKZ.css → SessionObserve-CDdJ7fAE.css} +1 -1
- package/dist/client/assets/SessionObserveEvidence-CS1aQBpQ.js +1 -0
- package/dist/client/assets/SessionRefScreen-DURV0MpF.js +1 -0
- package/dist/client/assets/SessionsScreen-D71ZR-8t.js +1 -0
- package/dist/client/assets/SettingsDrawer-Nz98oBVl.js +3 -0
- package/dist/client/assets/SettingsScreen-CYBHal6y.js +1 -0
- package/dist/client/assets/SharedFloorCharacter-Bi5_md4R.css +1 -0
- package/dist/client/assets/SharedFloorCharacter-V04kD5T9.js +1 -0
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +1 -0
- package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +2 -0
- package/dist/client/assets/{ShikiPane-C0TuCATU.js → ShikiPane-XwFI-pCp.js} +1 -1
- package/dist/client/assets/{SlidePanel-CETQ5NTx.js → SlidePanel-BMpkXai_.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +1 -0
- package/dist/client/assets/SpriteAvatar-aHeF4ZQZ.js +1 -0
- package/dist/client/assets/SproutActionSprite-DI5N3gOj.js +1 -0
- package/dist/client/assets/{StatusPill-BllrY-eg.js → StatusPill-Dw4LP7wu.js} +1 -1
- package/dist/client/assets/{TailView-_gKWfaQM.js → TailView-BofjmUMJ.js} +2 -2
- package/dist/client/assets/Terminal-jIqnIZZ6.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +1 -0
- package/dist/client/assets/TerminalHeaderMount-CwbQhXcI.js +1 -0
- package/dist/client/assets/TerminalRelay--qOBwnbR.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-2X1Gw4eA.js → TextDocumentSurface-BK6Qy41F.js} +1 -1
- package/dist/client/assets/{TmuxPeek-CqTJRhkI.js → TmuxPeek-DpUT9Tpc.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-C4vkU-sU.js → VoicePermissionsPanel-D35fOnQj.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-DqGnuK0e.js → WorkDetailScreen-Bcf_yHhU.js} +4 -4
- package/dist/client/assets/WorkFilesViewer-t8AEyx3Q.js +1 -0
- package/dist/client/assets/WorkRunView-CxwAZ2QQ.css +1 -0
- package/dist/client/assets/WorkRunView-_mhG_FR2.js +1 -0
- package/dist/client/assets/WorldActorTalk-CKerDikx.js +1 -0
- package/dist/client/assets/WorldCharacter-BRrj3MQN.js +1 -0
- package/dist/client/assets/WorldMinimap-DOptgrc4.js +1 -0
- package/dist/client/assets/WorldSky-D-RJzSa6.js +1 -0
- package/dist/client/assets/{activity-CzTJ-YMX.js → activity-BJqFrZyB.js} +1 -1
- package/dist/client/assets/{addon-fit-Zx3A7pGS.js → addon-fit-CHohcvS3.js} +1 -1
- package/dist/client/assets/{addon-webgl-DitJj-N0.js → addon-webgl-CaRy2x2b.js} +1 -1
- package/dist/client/assets/adventure-evidence-DgQbBmfa.css +1 -0
- package/dist/client/assets/adventure-habitats-v1-CVMbdB_Z.png +0 -0
- package/dist/client/assets/adventure-habitats-v1-M1lcpTJh.js +1 -0
- package/dist/client/assets/adventure-playback-DTfkhIc0.js +3 -0
- package/dist/client/assets/adventure-reader-DM5UDDm9.css +1 -0
- package/dist/client/assets/agent-adventures-DZtWpj6k.css +1 -0
- package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +2 -0
- package/dist/client/assets/{agent-essentials-K9B6kbTS.js → agent-essentials-bKWYOZaH.js} +1 -1
- package/dist/client/assets/{agent-floor-CuJr1iK1.css → agent-floor-Dmr9hZHL.css} +1 -1
- package/dist/client/assets/agent-floor-actor-DW8zLht0.js +1 -0
- package/dist/client/assets/agent-floor-world-Bnd1AtwK.css +1 -0
- package/dist/client/assets/agent-floor-world-layout-hfMjuoui.js +1 -0
- package/dist/client/assets/agent-lane-card-model-CeqQGp-8.js +1 -0
- package/dist/client/assets/{agent-lane-detail-ppJId6Jc.js → agent-lane-detail-Ti3trpfH.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-BhplDYGf.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
- package/dist/client/assets/{agent-lanes-DlqcEf0l.css → agent-lanes-DmgipV9D.css} +1 -1
- package/dist/client/assets/agent-lanes-model-DMAdqCmK.js +4 -0
- package/dist/client/assets/agent-master-THmq-1k8.css +1 -0
- package/dist/client/assets/agent-master-model-C-KdOFDK.js +1 -0
- package/dist/client/assets/{agent-specialization-CtF_jI34.js → agent-specialization-BplZUa_0.js} +1 -1
- package/dist/client/assets/agent-state-DDhnFEEP.js +1 -0
- package/dist/client/assets/{api-HFH8wFyb.js → api-BQYTwoz6.js} +1 -1
- package/dist/client/assets/api-DSqpVKC7.js +1 -0
- package/dist/client/assets/{arc.es-BNXJqSw7.js → arc.es-CubLvQ4W.js} +1 -1
- package/dist/client/assets/{arrow-left-eToA6GxC.js → arrow-left-DFfKAq0d.js} +1 -1
- package/dist/client/assets/{arrow-right-DTX42clh.js → arrow-right-DmAWnyAH.js} +1 -1
- package/dist/client/assets/{arrow-up-right-B09GPwFl.js → arrow-up-right-B0aLKiyF.js} +1 -1
- package/dist/client/assets/at-sign-DM7xeppo.js +1 -0
- package/dist/client/assets/book-open-BL9qvhEI.js +1 -0
- package/dist/client/assets/{bot-WxKXYtEX.js → bot-BhAVbcCA.js} +1 -1
- package/dist/client/assets/broker-display-BkBzyvbR.js +2 -0
- package/dist/client/assets/{cache-CeWH_KzJ.js → cache-DGBo3vIf.js} +1 -1
- package/dist/client/assets/chat-api-BPVC0asu.js +1 -0
- package/dist/client/assets/chat-space-model-B6Jg2CY4.js +4 -0
- package/dist/client/assets/{check-Dz2SRHft.js → check-g7D7-c1J.js} +1 -1
- package/dist/client/assets/{chevron-down-D120PY4g.js → chevron-down-CDzRQQGl.js} +1 -1
- package/dist/client/assets/{chevron-right-CowuvuE6.js → chevron-right-DKGTLiqc.js} +1 -1
- package/dist/client/assets/chevron-up-DX7R6KY2.js +1 -0
- package/dist/client/assets/{chunk-HRAB3GC3-KjjrTLCU.js → chunk-HRAB3GC3-Dvk_QpRq.js} +1 -1
- package/dist/client/assets/{clock-_9FDplIT.js → clock-CQb4FeMf.js} +1 -1
- package/dist/client/assets/{code-xml-CkkNdRmu.js → code-xml-Cmadr3pQ.js} +1 -1
- package/dist/client/assets/coffee-ljG1_krY.js +1 -0
- package/dist/client/assets/colors-CFlbwC25.js +1 -0
- package/dist/client/assets/comms-deck-C8nVeMBh.css +1 -0
- package/dist/client/assets/comms-deck-CBhsXnY-.js +2 -0
- package/dist/client/assets/comms-gesture-_aGFo6g3.js +2 -0
- package/dist/client/assets/{compass-BdpImt_W.js → compass-CvzkzkIh.js} +1 -1
- package/dist/client/assets/content-0AXa0klu.js +1 -0
- package/dist/client/assets/content-BEyJ19Lx.js +1 -0
- package/dist/client/assets/content-BN5weWKW.js +1 -0
- package/dist/client/assets/content-BNokkm7C.js +1 -0
- package/dist/client/assets/content-BV4PUM9q.js +1 -0
- package/dist/client/assets/content-BxUPlcx5.js +1 -0
- package/dist/client/assets/content-CIC5sku8.js +1 -0
- package/dist/client/assets/content-CKJ9zb7Z.js +1 -0
- package/dist/client/assets/content-CdkTyxqk.js +1 -0
- package/dist/client/assets/content-CnhhSCZq.js +1 -0
- package/dist/client/assets/content-D1Ze_FG9.js +1 -0
- package/dist/client/assets/content-DY3F9Vfr.js +1 -0
- package/dist/client/assets/content-DrKBYpcb.js +1 -0
- package/dist/client/assets/content-LSStQYj5.js +1 -0
- package/dist/client/assets/content-YvU-D0hF.js +1 -0
- package/dist/client/assets/content-oKQMyVnH.js +1 -0
- package/dist/client/assets/{context-budget-DqxWzalx.js → context-budget-8qFKqM-j.js} +1 -1
- package/dist/client/assets/{conversation-icons-DHGc9wbT.js → conversation-icons-CIRaxmid.js} +1 -1
- package/dist/client/assets/conversation-model-m8HhzroS.js +1 -0
- package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +1 -0
- package/dist/client/assets/conversations-Cbg9h_Af.js +1 -0
- package/dist/client/assets/{copy-BzdzWsQd.js → copy-BGOC1tJB.js} +1 -1
- package/dist/client/assets/{cpu-CHFIGw87.js → cpu-Q6nrHFTN.js} +1 -1
- package/dist/client/assets/{createLucideIcon-Dv8H8m7J.js → createLucideIcon-ChvMq-zl.js} +1 -1
- package/dist/client/assets/{credentials-BTce3VP1.js → credentials-OeoF-VKJ.js} +1 -1
- package/dist/client/assets/discover-DlwbftpC.js +2 -0
- package/dist/client/assets/embed-entry-c0lwtjBG.js +2 -0
- package/dist/client/assets/embed-navigation-DayfkQau.js +1 -0
- package/dist/client/assets/{external-link-BvX5PfLh.js → external-link-BVccgH0n.js} +1 -1
- package/dist/client/assets/{eye-C9cGk5z6.js → eye-CsGfEVR6.js} +1 -1
- package/dist/client/assets/{file-code-corner-jlGFdr8d.js → file-code-corner-Be6da5l3.js} +1 -1
- package/dist/client/assets/{file-text-BHro8MkG.js → file-text-DP6txVW-.js} +1 -1
- package/dist/client/assets/flag-DAFE2wZ5.js +1 -0
- package/dist/client/assets/floor-character-name-CqJPOlXb.js +1 -0
- package/dist/client/assets/floor-context-model-rWKqaKmV.js +1 -0
- package/dist/client/assets/floor-context-sheet-BFnkFiY3.css +1 -0
- package/dist/client/assets/floor-memory-YMM8AlLY.js +1 -0
- package/dist/client/assets/floor-message-passes-CO3Ix_wR.js +1 -0
- package/dist/client/assets/floor-preview-text-HrORUJ7D.js +1 -0
- package/dist/client/assets/floor-replay-CccYqE-f.css +1 -0
- package/dist/client/assets/floor-tactical-hud-HL5Vja5Y.css +1 -0
- package/dist/client/assets/folder-B_S7gBVr.js +1 -0
- package/dist/client/assets/{gauge-DSflSery.js → gauge-DQCGlE3o.js} +1 -1
- package/dist/client/assets/{gestures-YA5IIwp-.js → gestures-CofqY4Km.js} +1 -1
- package/dist/client/assets/{git-branch-Bc_eDIpG.js → git-branch-DcUCsWdJ.js} +1 -1
- package/dist/client/assets/go-shortcuts-KQy-ZOpV.js +1 -0
- package/dist/client/assets/home-moving-signal-BIHUGNfI.js +1 -0
- package/dist/client/assets/home-now-card-CaLgZze2.js +1 -0
- package/dist/client/assets/{home-now-card-nano-Jmy7eJ6H.js → home-now-card-nano-CvU8B61b.js} +1 -1
- package/dist/client/assets/{hooks-D6NI15f6.css → hooks-D787lBmm.css} +1 -1
- package/dist/client/assets/hooks-DaUOREpP.js +2 -0
- package/dist/client/assets/index-CGbs0SBm.css +1 -0
- package/dist/client/assets/index-CbqBwfIW.js +1 -0
- package/dist/client/assets/index-CyPMl7Up.js +1 -0
- package/dist/client/assets/index-DReVb7jZ.js +10 -0
- package/dist/client/assets/index-PQpJveGO.js +1 -0
- package/dist/client/assets/index-kkXUq-zf.js +1 -0
- package/dist/client/assets/{inspector-panel-CwrHjRaQ.js → inspector-panel-CLU7wjnT.js} +2 -2
- package/dist/client/assets/{keyboard-nav-B8sQ_8IF.js → keyboard-nav-CJXPaHXj.js} +1 -1
- package/dist/client/assets/knowledge-search-BNdQweGz.css +1 -0
- package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
- package/dist/client/assets/{lane-edit-display-C_Aujldz.js → lane-edit-display-BjdT9oZl.js} +1 -1
- package/dist/client/assets/{lane-observe-vfyACHi0.js → lane-observe-CteDwdD-.js} +3 -3
- package/dist/client/assets/lane-roster-store-Ch9t6lb0.js +1 -0
- package/dist/client/assets/{lane-tool-detail-0WhMf4Vj.js → lane-tool-detail-Czggx8oM.js} +1 -1
- package/dist/client/assets/{layers-CW2-qHsG.js → layers-BOwyWodP.js} +1 -1
- package/dist/client/assets/{layout-grid-BoVnPOk-.js → layout-grid-B36Qsh0y.js} +1 -1
- package/dist/client/assets/left-0vBrvrBG.js +2 -0
- package/dist/client/assets/{left-DH44V4I_.css → left-BV9yMiTL.css} +1 -1
- package/dist/client/assets/left-C6SyaqlJ.js +1 -0
- package/dist/client/assets/left-CTuXysZR.js +2 -0
- package/dist/client/assets/left-Cc6s4DT2.js +1 -0
- package/dist/client/assets/left-DF5caiyh.js +1 -0
- package/dist/client/assets/left-DgT4tWCx.js +1 -0
- package/dist/client/assets/left-R0wppTTr.js +1 -0
- package/dist/client/assets/left-advisor-C-kt8V28.js +1 -0
- package/dist/client/assets/left-agents-thnBO156.js +1 -0
- package/dist/client/assets/left-default-CT42fnpF.js +1 -0
- package/dist/client/assets/left-lanes-CSmZgciK.js +1 -0
- package/dist/client/assets/left-mission-C86x6i9h.js +1 -0
- package/dist/client/assets/left-mission-DENnfshd.css +1 -0
- package/dist/client/assets/library-DdhYL_9v.js +1 -0
- package/dist/client/assets/{loader-circle-DmUG_YC7.js → loader-circle-DNUsuPWz.js} +1 -1
- package/dist/client/assets/{local-agents-VP1-ZlPw.js → local-agents-I40PawYA.js} +1 -1
- package/dist/client/assets/machine-children-CdhNzDF0.js +1 -0
- package/dist/client/assets/machine-scope-DJt9RZ2w.js +1 -0
- package/dist/client/assets/mentions-Ck_Vjnyp.js +1 -0
- package/dist/client/assets/{mesh-ops-CKSWgax2.js → mesh-ops-DSlvHp-D.js} +1 -1
- package/dist/client/assets/{mesh-screen-D1Yvo8fU.css → mesh-screen-DjA4mOaN.css} +1 -1
- package/dist/client/assets/mesh-view-store-C1-mdP3P.js +1 -0
- package/dist/client/assets/{message-circle-joGFxfj1.js → message-circle-cI5_A5mj.js} +1 -1
- package/dist/client/assets/{message-markup-DC0QFEZn.js → message-markup-6Tgo4qFJ.js} +1 -1
- package/dist/client/assets/{message-square-BLiFqpe_.js → message-square-CJW4WRlo.js} +1 -1
- package/dist/client/assets/{message-visibility-CGOmSSKs.js → message-visibility-DwxgcgYK.js} +1 -1
- package/dist/client/assets/mission-control-CsX3Yc58.css +1 -0
- package/dist/client/assets/mission-control-model-C30vU1Fe.js +1 -0
- package/dist/client/assets/mission-control-store-p_cboAm4.js +1 -0
- package/dist/client/assets/{mission-wall-CocIM1cF.js → mission-wall-DOuGOxQy.js} +1 -1
- package/dist/client/assets/monitor-C7_cHlkC.js +1 -0
- package/dist/client/assets/nav-destinations-CU_euC-Q.js +1 -0
- package/dist/client/assets/observe-CtS0l3zu.js +1 -0
- package/dist/client/assets/{operator-attention-RqieiSY8.js → operator-attention-DBaRg5ep.js} +1 -1
- package/dist/client/assets/ops-screen-CxYM0VOW.css +1 -0
- package/dist/client/assets/page-status-DwFR4wSw.js +1 -0
- package/dist/client/assets/panel-right-qP17MwMl.js +1 -0
- package/dist/client/assets/pause-B_hliKuR.js +1 -0
- package/dist/client/assets/{persistent-state-BubPQ7tT.js → persistent-state-BUsTTZFE.js} +1 -1
- package/dist/client/assets/pin-Oi4qHR6M.js +1 -0
- 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-CVeRmqLH.js +1 -0
- package/dist/client/assets/{plus-BWKhylds.js → plus-D5NLH_fM.js} +1 -1
- package/dist/client/assets/profile-BegEUmB7.js +1 -0
- package/dist/client/assets/projects-inbox-CKPLZN8s.css +1 -0
- package/dist/client/assets/{projects-inbox-DFbgVlXL.js → projects-inbox-CfwxCTdN.js} +1 -1
- package/dist/client/assets/provider-DwmCoSlc.js +1 -0
- package/dist/client/assets/{proxy-DVDRhSRR.js → proxy-DgzP27W8.js} +1 -1
- package/dist/client/assets/{radio-CxIXS1nU.js → radio-Cas2qg1D.js} +1 -1
- package/dist/client/assets/{refresh-cw-Bkh7Cvnd.js → refresh-cw-IcD2lPoT.js} +1 -1
- package/dist/client/assets/resolve-panes-pfZTezKo.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +1 -0
- package/dist/client/assets/right-BDaCJ0CF.js +1 -0
- package/dist/client/assets/right-BP6lXRFS.js +1 -0
- package/dist/client/assets/right-Cb1VCrdj.js +1 -0
- package/dist/client/assets/right-CeFaxfBo.js +1 -0
- package/dist/client/assets/right-Ck2SrYCj.js +1 -0
- package/dist/client/assets/right-D-uv5YfF.js +1 -0
- package/dist/client/assets/right-DJMSICky.js +1 -0
- package/dist/client/assets/right-Dnljs8ah.js +1 -0
- package/dist/client/assets/right-SdCSF8PP.js +1 -0
- package/dist/client/assets/{right-DVUq5374.js → right-cjPTwPXS.js} +2 -2
- package/dist/client/assets/{rocket-CnxqjX_K.js → rocket-DAqYvu8I.js} +1 -1
- package/dist/client/assets/router-C-MF5-mb.js +1 -0
- package/dist/client/assets/{runtime-picker-BYAFNLNq.css → runtime-picker-C3JwrDKP.css} +1 -1
- package/dist/client/assets/runtime-picker-C_AVYF63.js +1 -0
- package/dist/client/assets/{scope-views-KPY85UUx.js → scope-views-Dl3ml9OZ.js} +1 -1
- package/dist/client/assets/scout-voice-CqAyfblr.js +1 -0
- package/dist/client/assets/{scoutbot-D7kGGyK_.js → scoutbot-Bk3nyrkj.js} +2 -2
- package/dist/client/assets/{scoutbot-markdown-yb87JlSE.js → scoutbot-markdown-DwvGQOWo.js} +1 -1
- package/dist/client/assets/{scroll-text-DFcBYy5J.js → scroll-text-B0tKI9Sg.js} +1 -1
- package/dist/client/assets/{search-FB2vVxCp.js → search-UsM-9-_W.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
- package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +1 -0
- package/dist/client/assets/{selection-bridge-qBGFCJv8.js → selection-bridge-OTS2iFkt.js} +1 -1
- package/dist/client/assets/{send-horizontal-CS7mxVhX.js → send-horizontal-BlQsRK6C.js} +1 -1
- package/dist/client/assets/send-to-agent-session-C1mgqdow.js +1 -0
- package/dist/client/assets/{server-WY6gsbZz.js → server-DBlPW0Mp.js} +1 -1
- package/dist/client/assets/{session-catalog-CG4oL_yN.js → session-catalog-CnpZMB7C.js} +1 -1
- package/dist/client/assets/{session-table-uJh3v-ly.js → session-table-CGkfG5Yd.js} +1 -1
- package/dist/client/assets/sessions-view-Bge4XZ4I.js +1 -0
- package/dist/client/assets/{settings-DQEtqkM9.js → settings-C69Zjrpq.js} +1 -1
- package/dist/client/assets/shared-work-artifacts-DfNl9KTo.js +1 -0
- package/dist/client/assets/{sliders-horizontal-57e99_qO.js → sliders-horizontal-6bzeod7c.js} +1 -1
- package/dist/client/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png +0 -0
- package/dist/client/assets/{sparkles-D0vWLTyC.js → sparkles-Cc5lPZRv.js} +1 -1
- package/dist/client/assets/sprout-action-sprite-DZ8C0fTl.css +1 -0
- package/dist/client/assets/sprout-actions-proof-v1-BzUdc812.png +0 -0
- package/dist/client/assets/{sse-B29iGBnw.js → sse-A8AyLH0g.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +1 -0
- package/dist/client/assets/{tail-display-DcliDVkW.js → tail-display-DHSNmvor.js} +2 -2
- package/dist/client/assets/{tail-events-LK29oCKm.js → tail-events-C4WdhVeK.js} +1 -1
- package/dist/client/assets/{terminal-UDy4lzV1.js → terminal-DMZjX1es.js} +1 -1
- package/dist/client/assets/{terminal-relay-CXHMdain.js → terminal-relay-mO89dX-Y.js} +1 -1
- package/dist/client/assets/terminal-screen-Bpb2SZrn.css +1 -0
- package/dist/client/assets/{terminal-sessions-Bdt2W3Y4.js → terminal-sessions-3RfJpen8.js} +1 -1
- package/dist/client/assets/{terminal-takeover-BMeBjBB2.js → terminal-takeover-CZZsnPzj.js} +1 -1
- package/dist/client/assets/use-beside-D3cJpA5p.js +1 -0
- package/dist/client/assets/use-conversation-list-D5EnpVba.js +1 -0
- package/dist/client/assets/{use-fleet-active-asks-CCGrll5q.js → use-fleet-active-asks-D_QOmjg5.js} +1 -1
- package/dist/client/assets/use-mesh-node-state-3V3ADQ-G.js +1 -0
- package/dist/client/assets/{use-mesh-ops-items-BjyeFJTz.js → use-mesh-ops-items-DI9GKWlF.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-CPoX8iV2.js → use-reduced-motion-CiaZHMnk.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-CkdAHlDR.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-BgTLNcF-.js → useAgentHoverCard-A3QGXqIy.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-DuUnwTB7.js → useEmbedHeadline-atkQVfGw.js} +1 -1
- package/dist/client/assets/usePersistentState-Y8XwSTg-.js +1 -0
- package/dist/client/assets/{usePierreRuntime-35AHf9RQ.js → usePierreRuntime-DTvcwISe.js} +1 -1
- package/dist/client/assets/users-RLK3P5U4.js +1 -0
- 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-BfVeded5.js → wrench-B4maQJai.js} +1 -1
- package/dist/client/assets/{x-DgmmnPKt.js → x-rlMdRqJF.js} +1 -1
- package/dist/client/assets/{xterm-DnJJmrCA.js → xterm-B1zHHOLQ.js} +1 -1
- package/dist/client/assets/{zap-Bcja1lHG.js → zap-B4X0OrEw.js} +1 -1
- package/dist/client/characters/sage/sage.glb +0 -0
- package/dist/client/crew/brik-bust.webp +0 -0
- package/dist/client/crew/brik-chip-id.webp +0 -0
- package/dist/client/crew/fenn-bust.webp +0 -0
- package/dist/client/crew/fenn-chip-id.webp +0 -0
- package/dist/client/crew/lulu-bust.webp +0 -0
- package/dist/client/crew/milo-bust.webp +0 -0
- package/dist/client/crew/milo-chip-id.webp +0 -0
- package/dist/client/crew/nori-bust.webp +0 -0
- package/dist/client/crew/pip-bust.webp +0 -0
- package/dist/client/crew/pip-chip-id.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/blink-half.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/rest.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/crew/sprout-bust.webp +0 -0
- package/dist/client/crew/sprout-chip-id.webp +0 -0
- package/dist/client/crew/tuck-bust.webp +0 -0
- package/dist/client/crew/tuck-chip-id.webp +0 -0
- package/dist/client/crew/vex-bust.webp +0 -0
- package/dist/client/crew/vex-chip-id.webp +0 -0
- package/dist/client/crew/wrench-bust.webp +0 -0
- package/dist/client/crew/wrench-chip-id.webp +0 -0
- package/dist/client/index.html +15 -3
- package/dist/drizzle/0017_wise_silver_sable.sql +26 -0
- package/dist/drizzle/0018_message_epoch_order.sql +1 -0
- package/dist/drizzle/0019_session_actor_targets.sql +227 -0
- package/dist/drizzle/README.md +19 -0
- package/dist/drizzle/meta/0017_snapshot.json +6785 -0
- package/dist/drizzle/meta/0018_snapshot.json +6804 -0
- package/dist/drizzle/meta/0019_snapshot.json +6804 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/main.mjs +32163 -29049
- package/dist/node/main.mjs +7189 -6285
- package/dist/openscout-terminal-relay.mjs +391 -9
- package/dist/pairing-runtime-controller.mjs +36724 -35406
- package/dist/runtime/base-daemon.mjs +14204 -63
- package/dist/runtime/broker-daemon.mjs +23498 -3137
- package/dist/runtime/broker-process-manager.mjs +19 -5
- package/dist/runtime/mesh-discover.mjs +18 -5
- package/dist/scout-control-plane-web.mjs +58517 -36972
- package/dist/statusline.mjs +1021 -35
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/update-helper.mjs +32235 -0
- package/package.json +2 -2
- package/dist/client/assets/ActivityScreen-sfonf5SR.js +0 -1
- package/dist/client/assets/AgentAvatar-Dz79iTxB.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-DDc3udYM.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-DHDS9Pgd.js +0 -1
- package/dist/client/assets/AgentDetailCard-8viaEY8b.js +0 -1
- package/dist/client/assets/AgentFloorView-DuyvyMMj.js +0 -1
- package/dist/client/assets/AgentInfoScreen-qntgg2q2.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +0 -1
- package/dist/client/assets/AgentLanesView-96lHsoX7.js +0 -2
- package/dist/client/assets/AgentLiveActions-DlSKL60c.js +0 -1
- package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +0 -1
- package/dist/client/assets/AgentSessions-DV9v34aq.js +0 -6
- package/dist/client/assets/AgentsConsole-DTpVhS67.js +0 -1
- package/dist/client/assets/AgentsScreen-hZ4o2I-e.js +0 -1
- package/dist/client/assets/AgentsSubnav-Ci7uWM7P.js +0 -1
- package/dist/client/assets/AtopView-D7vyQDtE.js +0 -1
- package/dist/client/assets/BackToPicker-BHicJyfc.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +0 -1
- package/dist/client/assets/BriefingsScreen-Cn4Mbam9.js +0 -1
- package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +0 -5
- package/dist/client/assets/ChatCollapsedStrip-7Wrg8Ge0.js +0 -1
- package/dist/client/assets/CodeScreen-cLC0tJ4S.js +0 -1
- package/dist/client/assets/ConversationFeedRows-Bx0gFyG_.js +0 -1
- package/dist/client/assets/ConversationHeader-Bt2RBj93.js +0 -1
- package/dist/client/assets/ConversationPanels-o6W-cOoU.js +0 -6
- package/dist/client/assets/ConversationScreen-CkWnKXt6.css +0 -1
- package/dist/client/assets/ConversationScreen-DIU7m_aC.js +0 -2
- package/dist/client/assets/ConversationStatus-CTYOywFh.js +0 -1
- package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +0 -1
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
- package/dist/client/assets/DispatchAftermath-ZCEB75hh.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-D8iB6SMt.js +0 -1
- package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +0 -1
- package/dist/client/assets/FollowScreen-CkR-okdL.js +0 -1
- package/dist/client/assets/HarnessMark-DttReffF.js +0 -1
- package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +0 -1
- package/dist/client/assets/HostAdvisorView-DeJ-8RZV.js +0 -1
- package/dist/client/assets/KnowledgeSearchInspector-W_zNIBRV.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +0 -1
- package/dist/client/assets/MeshCanvas-DZv2ipsy.js +0 -3
- package/dist/client/assets/MeshCanvasMinimap-BXHRNb7l.js +0 -1
- package/dist/client/assets/MeshScreen-DuNvpDC5.js +0 -1
- package/dist/client/assets/MessagesScreen-dNNPFwAc.js +0 -1
- package/dist/client/assets/MissionContextRail-DnCWPzAM.js +0 -1
- package/dist/client/assets/MissionControlView-DmaThhNR.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-K21ssTxv.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-CbQm4BLv.js +0 -1
- package/dist/client/assets/MissionLogPane-BLvSSIdT.js +0 -1
- package/dist/client/assets/NewAgentModal-B7qxjZlW.js +0 -1
- package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-DvKGsaLv.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-C9TOLB7u.js +0 -79
- package/dist/client/assets/OpsAgentsView-vIoY-AW1.js +0 -1
- package/dist/client/assets/OpsScreen-CJBwshEp.js +0 -1
- package/dist/client/assets/OpsSubnav-CjDTnp64.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Br1eTD7G.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-mjxNcRvw.js +0 -1
- package/dist/client/assets/ProjectsInbox-Bq29DE_o.js +0 -2
- package/dist/client/assets/ProjectsRail-kMDA0yn4.js +0 -1
- package/dist/client/assets/ProjectsScreen-BDaJYhc0.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-B940p3vW.js +0 -1
- package/dist/client/assets/Provider-D0bB7q6y.js +0 -1
- package/dist/client/assets/RailRow-B88JVr62.js +0 -1
- package/dist/client/assets/RawSessionsTable-CzGhEdiZ.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-CyP1CWsX.js +0 -1
- package/dist/client/assets/RepoDiffViewer-Bw5yMC4A.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-DzfoFhbl.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-DQoZofzH.js +0 -1
- package/dist/client/assets/SessionEmbedScreen-CpduQ0O9.js +0 -1
- package/dist/client/assets/SessionObserve-BVeTkcIl.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-BkOezTGV.js +0 -1
- package/dist/client/assets/SessionRefScreen-DetLMkTT.js +0 -1
- package/dist/client/assets/SessionsScreen-B-McKw6d.js +0 -1
- package/dist/client/assets/SettingsDrawer-CPB32w0n.js +0 -3
- package/dist/client/assets/SettingsScreen-BEzYFdjz.js +0 -1
- package/dist/client/assets/SpriteAvatar-DFO4Kb4Z.js +0 -1
- package/dist/client/assets/Terminal-DWyZTZdY.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-_SSzwhWa.js +0 -1
- package/dist/client/assets/TerminalHeaderMount-CY7uIWBg.js +0 -1
- package/dist/client/assets/WorkFilesViewer-D8-4vF5l.js +0 -1
- package/dist/client/assets/agent-autocomplete-BlK8wY06.js +0 -10
- package/dist/client/assets/agent-lane-card-model-CY3OE1Xu.js +0 -1
- package/dist/client/assets/agent-lanes-model-tc-1hE6q.js +0 -2
- package/dist/client/assets/agent-master-I1W-5d-x.css +0 -1
- package/dist/client/assets/agent-master-model-DMcHeNq3.js +0 -1
- package/dist/client/assets/api-Co9aQ2Jw.js +0 -1
- package/dist/client/assets/arrow-down-BAGkhHA6.js +0 -1
- package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
- package/dist/client/assets/chunk-JTPDIGGW-COJ00z94.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-H2QEKfr1.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-CrCgXw9l.js +0 -2
- package/dist/client/assets/colors-BtO5_zlx.js +0 -1
- package/dist/client/assets/content-0RBfbCIJ.js +0 -1
- package/dist/client/assets/content-BTmnk2bl.js +0 -1
- package/dist/client/assets/content-Bk5DKhyP.js +0 -1
- package/dist/client/assets/content-Bw_8GE_S.js +0 -1
- package/dist/client/assets/content-CI4gLEWi.js +0 -1
- package/dist/client/assets/content-CLCtp9Rb.js +0 -1
- package/dist/client/assets/content-C_FAGTNk.js +0 -1
- package/dist/client/assets/content-CnnzWOE3.js +0 -1
- package/dist/client/assets/content-DKlY98pO.js +0 -1
- package/dist/client/assets/content-Df7ndXTG.js +0 -1
- package/dist/client/assets/content-DkZDzzx3.js +0 -1
- package/dist/client/assets/content-DnGmb2L0.js +0 -1
- package/dist/client/assets/content-Ds-zs-Ss.js +0 -1
- package/dist/client/assets/content-JIWSyC0f.js +0 -1
- package/dist/client/assets/content-Q3TIYC8q.js +0 -1
- package/dist/client/assets/content-evaBfvxD.js +0 -1
- package/dist/client/assets/conversation-model-C2KuZUXc.js +0 -1
- package/dist/client/assets/conversation-motion-features-BJnHs3Ul.js +0 -1
- package/dist/client/assets/discover-DutlV0ZU.js +0 -2
- package/dist/client/assets/embed-entry-CJG7WEVw.js +0 -2
- package/dist/client/assets/home-moving-signal-PHSqSBu_.js +0 -1
- package/dist/client/assets/home-now-card-C_qsI6C6.js +0 -1
- package/dist/client/assets/hooks-ME7rmhpE.js +0 -2
- package/dist/client/assets/index-C1VaWNuD.js +0 -10
- package/dist/client/assets/index-C8UCRm2W.js +0 -1
- package/dist/client/assets/index-Cn0I2Hgi.js +0 -1
- package/dist/client/assets/index-Cx6Gbr6n.js +0 -1
- package/dist/client/assets/index-i7TMxlwW.css +0 -1
- package/dist/client/assets/knowledge-search-D_bLoYtC.css +0 -1
- package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
- package/dist/client/assets/lane-roster-store-DN2jxXF-.js +0 -1
- package/dist/client/assets/left-BRu9pnqx.js +0 -2
- package/dist/client/assets/left-BjS1dKNV.js +0 -2
- package/dist/client/assets/left-CL-TVLJ7.js +0 -1
- package/dist/client/assets/left-DLpsDi55.js +0 -1
- package/dist/client/assets/left-DPcM9o8Y.js +0 -1
- package/dist/client/assets/left-MmTJf1tK.js +0 -1
- package/dist/client/assets/left-P80i5V8L.js +0 -1
- package/dist/client/assets/left-advisor-CbXVzAqS.js +0 -1
- package/dist/client/assets/left-agents-7mJsiNyr.js +0 -1
- package/dist/client/assets/left-default-COK26l3H.js +0 -1
- package/dist/client/assets/left-lanes-Dbdm9Veu.js +0 -1
- package/dist/client/assets/left-mission-DSenPIyb.css +0 -1
- package/dist/client/assets/left-mission-DqGR5jby.js +0 -1
- package/dist/client/assets/library-COnWzUWv.js +0 -1
- package/dist/client/assets/mentions-BZ5SBMtc.js +0 -1
- package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +0 -1
- package/dist/client/assets/mesh-view-store-CBM1za_N.js +0 -1
- package/dist/client/assets/mission-control-CnU7dNt1.css +0 -1
- package/dist/client/assets/mission-control-model-C0fByIjm.js +0 -1
- package/dist/client/assets/mission-control-store-CM8mQGg8.js +0 -1
- package/dist/client/assets/observe-BLmy4quB.js +0 -1
- package/dist/client/assets/ops-screen-giu3If_N.css +0 -1
- package/dist/client/assets/page-status-BE0-J1xY.js +0 -1
- package/dist/client/assets/paperclip-Br7wUDFl.js +0 -1
- package/dist/client/assets/perf-PX8Rx0EP.js +0 -1
- package/dist/client/assets/profile-BCvk8jOQ.js +0 -1
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
- package/dist/client/assets/resolve-panes-DhD5qmQO.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-GqhZNRPY.js +0 -1
- package/dist/client/assets/right-B_08ilv6.js +0 -1
- package/dist/client/assets/right-Brm67HOL.js +0 -1
- package/dist/client/assets/right-BveAPKBW.js +0 -1
- package/dist/client/assets/right-CpTB_-Ya.js +0 -1
- package/dist/client/assets/right-CqC4Qdot.js +0 -1
- package/dist/client/assets/right-D91j9d5Y.js +0 -1
- package/dist/client/assets/right-DaLRhYl3.js +0 -1
- package/dist/client/assets/right-Dt1wOwA5.js +0 -1
- package/dist/client/assets/right-DtzqIZQF.js +0 -1
- package/dist/client/assets/router-kfcaYqZr.js +0 -1
- package/dist/client/assets/runtime-picker-C20lTGhV.js +0 -1
- package/dist/client/assets/scout-voice-Cg1qfepC.js +0 -1
- package/dist/client/assets/secondaryNavConfig-C0Srrmy8.js +0 -1
- package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
- package/dist/client/assets/system-surfaces-redesign-kuf3wuE_.css +0 -1
- package/dist/client/assets/terminal-screen-vMICbBJh.css +0 -1
- package/dist/client/assets/use-conversation-list-UG-tMN67.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-DTseRrFi.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-CoIoz7JU.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-C1VaWNuD.js";/* empty css */import{D as ys}from"./DataTable-C6aMSilS.js";import{H,h as F}from"./HarnessMark-DttReffF.js";import{O as vs}from"./ObservedTopologyPanel-CJVqIqQ2.js";import{a as es}from"./api-Co9aQ2Jw.js";import{o as ts,i as U}from"./surface-activity-B1rgWB1i.js";import{a as Ns,d as gs}from"./time-Dhsh_2EG.js";import{u as Is}from"./tail-events-LK29oCKm.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";const ns=4e3,bs=500,Cs=5e3,Es=5e3,Ss=6e4,q={"scout-managed":"scout","hudson-managed":"hudson",unattributed:"native"},X={tool:"working",run:"active",idle:"idle"};function G(s){const n=s.split(/\s+/)[0]??"",r=n.lastIndexOf("/");return r>=0?n.slice(r+1):n}function ws(s,n=60){const r=s.split(/\s+/);if(r.length===0)return s;r[0]=G(r[0]);const c=r.join(" ");return c.length<=n?c:c.slice(0,n-1)+"…"}function Ms(s){for(const n of s){const r=G(n.command);if(r&&!(r==="sh"||r==="zsh"||r==="bash"||r==="login"))return r}return s[0]?.command?G(s[0].command):"—"}function As(s){const n=s.match(/^(?:(\d+)-)?(?:(\d+):)?(\d+):(\d+)$/);if(!n){const u=s.match(/^(\d+)$/);return u?Number.parseInt(u[1],10):0}const[,r,c,m,p]=n;let f=Number.parseInt(p,10)+Number.parseInt(m,10)*60;return c&&(f+=Number.parseInt(c,10)*3600),r&&(f+=Number.parseInt(r,10)*86400),f}function ls(s){if(s<60)return`${s}s`;if(s<3600)return`${Math.floor(s/60)}m${String(s%60).padStart(2,"0")}`;if(s<86400){const c=Math.floor(s/3600),m=Math.floor(s%3600/60);return`${c}h${String(m).padStart(2,"0")}`}const n=Math.floor(s/86400),r=Math.floor(s%86400/3600);return`${n}d${String(r).padStart(2,"0")}h`}function is(s,n){return Ns(s,n)||"—"}function $s(s){return gs(s)||"—"}function Q(s){return s?s.slice(0,8):"—"}function cs(s){return s?.trim().toLowerCase()||"unknown"}function Rs(s){return cs(s).replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function Z(s){return`s-atop-chip s-atop-chip--harness s-atop-chip--harness-${Rs(s)}`}const Ts=/permission-mode/i;function as(s){return s.kind!=="system"?!1:Ts.test(s.summary)}function J(s){return s.kind==="assistant"}function Ws(s,n,r){if(!s)return[];const c=new Map,m=new Map;for(const t of n){let l=c.get(t.pid);if(l||(l={firstEventAt:t.ts,lastEventAt:t.ts,lastKind:t.kind,lastSummary:t.summary,reqCount:0,toolCount:0,permCount:0,eventCount:0,sessionId:t.sessionId||null,model:null,tokIn:null,tokOut:null,cacheReadIn:null,cacheWriteIn:null},c.set(t.pid,l)),t.ts<l.firstEventAt&&(l.firstEventAt=t.ts),t.ts>=l.lastEventAt&&(l.lastEventAt=t.ts,l.lastKind=t.kind,l.lastSummary=t.summary),l.eventCount++,t.kind==="tool"&&l.toolCount++,J(t)&&l.reqCount++,as(t)&&l.permCount++,t.sessionId&&!l.sessionId&&(l.sessionId=t.sessionId),t.sessionId){let a=m.get(t.sessionId);a||(a={firstEventAt:t.ts,lastEventAt:t.ts,lastKind:t.kind,lastSummary:t.summary,reqCount:0,toolCount:0,permCount:0,eventCount:0,sessionId:t.sessionId,model:null,tokIn:null,tokOut:null,cacheReadIn:null,cacheWriteIn:null},m.set(t.sessionId,a)),t.ts<a.firstEventAt&&(a.firstEventAt=t.ts),t.ts>=a.lastEventAt&&(a.lastEventAt=t.ts,a.lastKind=t.kind,a.lastSummary=t.summary),a.eventCount++,t.kind==="tool"&&a.toolCount++,J(t)&&a.reqCount++,as(t)&&a.permCount++}}const p=new Map;for(const t of s.processes){if(!t.cwd)continue;const l=Y(t.source,t.cwd),a=p.get(l);(!a||t.pid<a.pid)&&p.set(l,t)}const f=new Map,u=new Map;for(const t of s.transcripts??[]){const l=Y(t.source,t.cwd),a=os(t),j=u.get(l)??Number.NEGATIVE_INFINITY,N=f.get(l)??"";(t.mtimeMs>j||t.mtimeMs===j&&a>N)&&(u.set(l,t.mtimeMs),f.set(l,a))}const h=new Set,I=(t,l,a,j)=>{l&&h.add(l.pid);let N="idle";const w=Math.max(a?.lastEventAt??0,j?.mtimeMs??0);a&&r-a.lastEventAt<Es&&(N=a.lastKind==="tool"?"tool":"run"),N==="idle"&&r-w<6e4&&(N="run");const L=l?As(l.etime):0,D=a?.firstEventAt??null,V=a&&a.firstEventAt<a.lastEventAt?Math.min(Math.max(0,Math.round((a.lastEventAt-a.firstEventAt)/1e3)),L||Number.POSITIVE_INFINITY):0,_=l?.pid??Os(t),R=j?.cwd??l?.cwd??"";return{key:t,pid:_,ppid:l?.ppid??0,sessionId:j?.sessionId??a?.sessionId??null,transcriptPath:j?.transcriptPath??null,harness:cs(j?.source??l?.source),attribution:l?.harness??j?.harness??"unattributed",project:j?.project?.trim()||(R?Ps(R):"(unknown)"),cwd:R,command:l?.command??`${j?.source??"unknown"} transcript`,parentLabel:l?Ms(l.parentChain??[]):"transcript",procRuntimeSec:L,procEtime:l?.etime??"0",sessionStartAt:D,sessionRuntimeSec:V,status:N,lastEventAt:w||null,lastEventKind:a?.lastKind??null,lastSummary:a?.lastSummary??null,reqCount:a?.reqCount??0,toolCount:a?.toolCount??0,permCount:a?.permCount??0,eventCount:a?.eventCount??0,model:a?.model??null,tokIn:a?.tokIn??null,tokOut:a?.tokOut??null,cacheReadIn:a?.cacheReadIn??null,cacheWriteIn:a?.cacheWriteIn??null}},k=(s.transcripts??[]).map(t=>{const l=os(t),a=Y(t.source,t.cwd),j=f.get(a)===l?p.get(a)??null:null,N=t.sessionId?m.get(t.sessionId):void 0;return I(l,j,N,t)}),y=s.processes.filter(t=>!h.has(t.pid)).map(t=>I(Ls(t),t,c.get(t.pid),null));return[...k,...y]}function $(s){if(s.cacheReadIn==null||s.tokIn==null)return null;const n=s.cacheReadIn+s.tokIn;return n===0?null:s.cacheReadIn/n}function S(s){return s==null?"—":s===0?"0":s>=1e6?(s/1e6).toFixed(s>=1e7?0:1)+"M":s>=1e3?(s/1e3).toFixed(s>=1e4?0:1)+"k":String(s)}function us(s){return s==null?"—":`${Math.round(s*100)}%`}function Ps(s){if(!s)return"";const n=s.lastIndexOf("/");return n>=0?s.slice(n+1):s}function os(s){return`session:${s.source}:${s.sessionId??s.transcriptPath}`}function Ls(s){return`process:${s.source}:${s.pid}`}function Os(s){let n=2166136261;for(let r=0;r<s.length;r+=1)n^=s.charCodeAt(r),n=Math.imul(n,16777619);return-((n>>>0)%9e5+1e3)}function Y(s,n){return`${s}\0${n??""}`}function Ks(s,n,r){const c=r-Ss;let m=0;for(const u of n)J(u)&&u.ts>=c&&m++;const p={total:s.length,running:0,tooling:0,idle:0,harnesses:[],reqsPerMin:m},f=new Map;for(const u of s)u.status==="tool"?(p.tooling++,p.running++):u.status==="run"?p.running++:p.idle++,f.set(u.harness,(f.get(u.harness)??0)+1);return p.harnesses=[...f.entries()].map(([u,h])=>({harness:u,count:h})).sort((u,h)=>h.count-u.count||u.harness.localeCompare(h.harness)),p}const P={tool:0,run:1,idle:2};function A(s){return s??-1}function qs(s,n,r,c){switch(r){case"status":return(P[s.status]-P[n.status])*c;case"agent":{const m=s.harness.localeCompare(n.harness);return m!==0?m*c:(s.sessionId??"").localeCompare(n.sessionId??"")*c}case"project":return s.project.localeCompare(n.project)*c;case"reqs":return(s.reqCount-n.reqCount)*c;case"tokIn":return(A(s.tokIn)-A(n.tokIn))*c;case"tokOut":return(A(s.tokOut)-A(n.tokOut))*c;case"cache":return(A($(s))-A($(n)))*c;case"tools":return(s.toolCount-n.toolCount)*c;case"perms":return(s.permCount-n.permCount)*c;case"last":{const m=s.lastEventAt??0,p=n.lastEventAt??0;return(m-p)*c}case"runtime":return(s.sessionRuntimeSec-n.sessionRuntimeSec)*c}}function rs({values:s,color:n}){if(s.length<2)return e.jsx("svg",{className:"s-atop-spark",width:88,height:18,viewBox:"0 0 88 18"});const m=Math.max(1,...s),p=88/(s.length-1),f=s.map((u,h)=>`${(h*p).toFixed(1)},${(18-u/m*18).toFixed(1)}`).join(" ");return e.jsx("svg",{className:"s-atop-spark",width:88,height:18,viewBox:"0 0 88 18",children:e.jsx("polyline",{fill:"none",stroke:n,strokeWidth:"1.25",points:f})})}function ae(){const[s,n]=d.useState([]),[r,c]=d.useState(null),[m,p]=d.useState(()=>Date.now()),[f,u]=d.useState(""),[h,I]=d.useState(()=>new Set),[k,y]=d.useState(()=>new Set),[t,l]=d.useState({key:"status",dir:1}),[a,j]=d.useState(null),N=d.useRef([]),w=d.useRef([]),[L,D]=d.useState([]),[V,_]=d.useState([]),R=d.useCallback(o=>{n(i=>i.length>=ns?[...i.slice(i.length-ns+1),o]:[...i,o])},[]);Is(R),d.useEffect(()=>{let o=!1,i=!1;const x=async()=>{if(!(i||!U()))try{const O=await es(`/api/tail/recent?limit=${bs}`);o||(i=!0,n(O.events??[]))}catch{}};x();const E=ts(()=>{x()});return()=>{o=!0,E()}},[]);const T=d.useCallback(async()=>{if(U())try{const o=await es("/api/tail/discover");c(o)}catch{}},[]);d.useEffect(()=>{T();const o=setInterval(()=>{T()},Cs),i=ts(()=>{T()});return()=>{clearInterval(o),i()}},[T]),d.useEffect(()=>{const o=setInterval(()=>{U()&&p(Date.now())},1e3);return()=>clearInterval(o)},[]);const v=d.useMemo(()=>Ws(r,s,m),[r,s,m]),M=d.useMemo(()=>Ks(v,s,m),[v,s,m]);d.useEffect(()=>{N.current=[...N.current,M.running].slice(-24),w.current=[...w.current,M.tooling].slice(-24),D(N.current),_(w.current)},[M.running,M.tooling]);const ds=d.useMemo(()=>{const o=new Set;return v.forEach(i=>o.add(i.harness)),[...o]},[v]),ms=d.useMemo(()=>{const o=new Set;return v.forEach(i=>o.add(i.status)),[...o]},[v]),z=d.useMemo(()=>{const o=f.trim().toLowerCase();return v.filter(i=>{if(h.size>0&&!h.has(i.harness)||k.size>0&&!k.has(i.status))return!1;if(!o)return!0;const x=q[i.attribution];return`${i.pid} ${i.project} ${i.command} ${i.harness} ${i.attribution} ${x} ${i.sessionId??""} ${i.transcriptPath??""} ${i.lastSummary??""}`.toLowerCase().includes(o)})},[v,f,h,k]),B=d.useMemo(()=>t.key==="status"?void 0:(o,i)=>P[o.status]-P[i.status],[t.key]),C=d.useMemo(()=>z.map((o,i)=>({row:o,index:i})).sort((o,i)=>{const x=qs(o.row,i.row,t.key,t.dir);if(x!==0)return x;const E=B?.(o.row,i.row)??0;return E!==0?E:o.index-i.index}).map(o=>o.row),[z,t,B]);d.useEffect(()=>{a!=null&&(v.some(o=>o.key===a)||j(null))},[v,a]),d.useEffect(()=>{const o=i=>{const x=i.target,E=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||(x?.isContentEditable??!1);if(i.key==="Escape"&&a!=null){i.preventDefault(),j(null);return}if(E)return;const O=i.key==="j"||i.key==="ArrowDown",js=i.key==="k"||i.key==="ArrowUp";if(O||js){if(C.length===0)return;i.preventDefault();const K=C.findIndex(ks=>ks.key===a),ss=O?C[Math.min(C.length-1,K<0?0:K+1)]:C[Math.max(0,K<0?0:K-1)];ss&&j(ss.key);return}if(i.key==="Enter"&&a!=null){i.preventDefault();return}};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[C,a]);const ps=o=>{I(i=>{const x=new Set(i);return x.has(o)?x.delete(o):x.add(o),x})},hs=o=>{y(i=>{const x=new Set(i);return x.has(o)?x.delete(o):x.add(o),x})},g=d.useMemo(()=>a!=null?v.find(o=>o.key===a)??null:null,[v,a]),fs=d.useMemo(()=>g?r?.processes.find(o=>o.pid===g.pid)??null:null,[r,g]),xs=d.useMemo(()=>g?s.filter(o=>g.sessionId?o.sessionId===g.sessionId:o.pid===g.pid).slice(-40):[],[s,g]);return e.jsxs("div",{className:"s-atop",children:[e.jsx(Hs,{summary:M,runHistory:L,toolHistory:V}),e.jsx(vs,{title:"Harness families",size:"compact",maxAgents:6,maxTasks:3,showEmpty:!0}),e.jsx(Fs,{search:f,onSearch:u,harnessOptions:ds,harnessFilter:h,onToggleHarness:ps,statusOptions:ms,statusFilter:k,onToggleStatus:hs,summary:M}),e.jsx(ys,{rows:z,columns:Ds,rowId:o=>o.key,storageKey:"openscout.atop.cols",sort:t,onSortChange:l,secondarySort:B,onRowClick:o=>j(o.key),rowClassName:o=>a===o.key?"s-atop-row--selected":void 0,empty:{title:"no agents match",body:"adjust filters or start a session to populate"},density:"compact",className:"s-atop-data-table",ariaLabel:"Agent activity inventory"}),e.jsx(_s,{shown:C.length,total:v.length,hasSelection:a!=null}),g&&e.jsx(zs,{row:g,process:fs,events:xs,now:m,onClose:()=>j(null)})]})}function Hs({summary:s,runHistory:n,toolHistory:r}){return e.jsxs("div",{className:"s-atop-summary",children:[e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--primary",children:[e.jsxs("div",{className:"s-atop-summary-num",children:[e.jsx("strong",{children:s.running}),e.jsxs("span",{className:"s-atop-summary-of",children:["/ ",s.total]})]}),e.jsx("span",{className:"s-atop-summary-lbl",children:"active"}),e.jsx(rs,{values:n,color:"var(--green)"})]}),e.jsxs("div",{className:"s-atop-summary-cell",children:[e.jsx("div",{className:"s-atop-summary-num",children:e.jsx("strong",{children:s.tooling})}),e.jsx("span",{className:"s-atop-summary-lbl",children:"working"}),e.jsx(rs,{values:r,color:"var(--accent)"})]}),e.jsxs("div",{className:"s-atop-summary-cell",children:[e.jsx("div",{className:"s-atop-summary-num",children:e.jsx("strong",{children:s.idle})}),e.jsx("span",{className:"s-atop-summary-lbl",children:"idle"})]}),e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--breakdown",children:[e.jsx("span",{className:"s-atop-summary-lbl",children:"harness"}),e.jsx("div",{className:"s-atop-summary-row",children:s.harnesses.length>0?s.harnesses.slice(0,4).map(c=>e.jsxs("span",{className:Z(c.harness),children:[e.jsx(H,{harness:c.harness,size:11,title:null}),F(c.harness)," ",c.count]},c.harness)):e.jsx("span",{className:"s-atop-chip s-atop-chip--mute",children:"none"})})]}),e.jsx("div",{className:"s-atop-summary-spacer"}),e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--rate",children:[e.jsxs("div",{className:"s-atop-summary-num",children:[e.jsx("strong",{children:s.reqsPerMin}),e.jsx("span",{className:"s-atop-summary-of",children:"/ min"})]}),e.jsx("span",{className:"s-atop-summary-lbl",children:"requests"})]})]})}function Fs({search:s,onSearch:n,harnessOptions:r,harnessFilter:c,onToggleHarness:m,statusOptions:p,statusFilter:f,onToggleStatus:u,summary:h}){const I=t=>h.harnesses.find(l=>l.harness===t)?.count??0,k=t=>t==="tool"?h.tooling:t==="run"?h.running-h.tooling:h.idle,y=d.useRef(null);return d.useEffect(()=>{const t=l=>{if(l.key!=="/")return;const a=l.target;a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||(a?.isContentEditable??!1)||(l.preventDefault(),y.current?.focus())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),e.jsxs("div",{className:"s-atop-fbar",children:[e.jsxs("div",{className:"s-atop-search",children:[e.jsx("span",{className:"s-atop-search-prompt",children:"▸"}),e.jsx("input",{ref:y,className:"s-atop-search-input",value:s,onChange:t=>n(t.target.value),placeholder:"filter by pid · project · command · summary",spellCheck:!1}),e.jsx("span",{className:"s-atop-search-kbd",children:"/"})]}),r.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"harness"}),r.map(t=>{const l=c.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--harness${l?" s-atop-pill--on":""}`,onClick:()=>m(t),children:[e.jsx(H,{harness:t,size:11,title:null}),F(t),e.jsx("span",{className:"s-atop-pill-ct",children:I(t)})]},t)})]}),p.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"status"}),["tool","run","idle"].filter(t=>p.includes(t)).map(t=>{const l=f.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--status-${t}${l?" s-atop-pill--on":""}`,onClick:()=>u(t),children:[X[t],e.jsx("span",{className:"s-atop-pill-ct",children:k(t)})]},t)})]}),e.jsx("div",{className:"s-atop-fbar-spacer"})]})}const Ds=[{key:"status",label:"Status",cls:"s-atop-col-status",kind:"text",defaultWidth:96,minWidth:70,sortValue:s=>P[s.status],render:s=>e.jsxs("span",{className:`s-atop-status s-atop-status--${s.status}`,children:[e.jsx("span",{className:"s-atop-status-dot"}),X[s.status]]})},{key:"agent",label:"Agent",cls:"s-atop-col-agent",kind:"text",tip:"Harness · short session id",defaultWidth:168,minWidth:110,sortValue:s=>`${s.harness}\0${s.sessionId??""}`,render:s=>e.jsxs("div",{className:"s-atop-agent-cell",children:[e.jsxs("span",{className:Z(s.harness),title:`origin: ${q[s.attribution]}`,children:[e.jsx(H,{harness:s.harness,size:11,title:null}),F(s.harness)]}),e.jsx("span",{className:"s-atop-agent-id",title:s.sessionId??`pid ${s.pid}`,children:Q(s.sessionId)})]})},{key:"project",label:"Project",cls:"s-atop-col-project",kind:"text",defaultWidth:200,minWidth:96,maxWidth:480,sortValue:s=>s.project,render:s=>e.jsx("span",{title:s.cwd,children:s.project})},{key:"reqs",label:"Reqs",cls:"s-atop-col-num",kind:"number",tip:"Model invocations (assistant turns) for this session",defaultWidth:64,minWidth:56,sortValue:s=>s.reqCount,render:s=>e.jsx(W,{value:s.reqCount||null})},{key:"tokIn",label:"Tok ↓",cls:"s-atop-col-num",kind:"number",tip:"Input tokens — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>s.tokIn,render:s=>e.jsx(W,{value:s.tokIn})},{key:"tokOut",label:"Tok ↑",cls:"s-atop-col-num",kind:"number",tip:"Output tokens — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>s.tokOut,render:s=>e.jsx(W,{value:s.tokOut})},{key:"cache",label:"Cache",cls:"s-atop-col-num",kind:"number",tip:"Cache hit rate — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>$(s),render:s=>e.jsx(Vs,{value:$(s)})},{key:"tools",label:"Tools",cls:"s-atop-col-num",kind:"number",defaultWidth:64,minWidth:56,sortValue:s=>s.toolCount,render:s=>e.jsx(W,{value:s.toolCount||null})},{key:"perms",label:"Perms",cls:"s-atop-col-num",kind:"number",tip:"Permission requests — heuristic count of permission-mode events",defaultWidth:64,minWidth:56,sortValue:s=>s.permCount,render:s=>e.jsx(W,{value:s.permCount||null,accent:s.permCount>0?"amber":void 0})},{key:"last",label:"Last",cls:"s-atop-col-last",kind:"time",defaultWidth:86,minWidth:64,sortValue:s=>s.lastEventAt,render:s=>is(s.lastEventAt,Date.now())},{key:"runtime",label:"Runtime",cls:"s-atop-col-runtime",kind:"number",tip:"Session duration (active period in current buffer)",defaultWidth:80,minWidth:64,sortValue:s=>s.sessionRuntimeSec,render:s=>ls(s.sessionRuntimeSec)}];function W({value:s,accent:n}){const r=s==null?"s-atop-col-num s-atop-col-num--dim":`s-atop-col-num${n?` s-atop-col-num--${n}`:""}`;return e.jsx("span",{className:r,children:S(s)})}function Vs({value:s}){const n=s==null?"s-atop-col-num s-atop-col-num--dim":"s-atop-col-num";return e.jsx("span",{className:n,children:us(s)})}function _s({shown:s,total:n,hasSelection:r}){return e.jsxs("div",{className:"s-atop-keys",children:[e.jsxs("span",{className:"s-atop-keys-count",children:[e.jsx("strong",{children:s})," / ",n," agents"]}),e.jsx("span",{className:"s-atop-keys-spacer"}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"click"})," drill in"]}),r&&e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," close"]})]})}function zs({row:s,process:n,events:r,now:c,onClose:m}){const p=d.useMemo(()=>{const u={};for(const k of r){if(k.kind!=="tool")continue;const y=k.summary.match(/^([a-z_][a-z0-9_]*)/i),t=y?y[1]:"(tool)";u[t]=(u[t]??0)+1}const h=Object.entries(u).sort((k,y)=>y[1]-k[1]).slice(0,6),I=Math.max(1,...h.map(k=>k[1]));return h.map(([k,y])=>({name:k,count:y,frac:y/I}))},[r]),f=r.slice(-40).reverse();return e.jsxs("aside",{className:"s-atop-drawer","aria-label":`Agent ${s.key}`,children:[e.jsxs("header",{className:"s-atop-drawer-head",children:[e.jsxs("div",{className:"s-atop-drawer-head-meta",children:[e.jsxs("span",{className:`s-atop-status s-atop-status--${s.status}`,children:[e.jsx("span",{className:"s-atop-status-dot"}),X[s.status]]}),e.jsx("span",{className:"s-atop-drawer-pid",children:s.pid>0?`pid ${s.pid}`:"transcript"}),e.jsxs("span",{className:Z(s.harness),title:`origin: ${q[s.attribution]}`,children:[e.jsx(H,{harness:s.harness,size:11,title:null}),F(s.harness)]}),e.jsxs("span",{className:"s-atop-drawer-session",children:["session ",Q(s.sessionId)]})]}),e.jsx("h2",{className:"s-atop-drawer-title",children:s.project}),e.jsxs("p",{className:"s-atop-drawer-sub",children:["session ",Q(s.sessionId)," · runtime ",ls(s.sessionRuntimeSec)," · last activity ",is(s.lastEventAt,c)]}),e.jsx("button",{className:"s-atop-drawer-close",onClick:m,"aria-label":"Close (Esc)",children:"✕"})]}),e.jsxs("div",{className:"s-atop-drawer-body",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Activity"}),e.jsxs("div",{className:"s-atop-metrics",children:[e.jsx(b,{label:"Requests",value:S(s.reqCount||null)}),e.jsx(b,{label:"Tools",value:S(s.toolCount||null)}),e.jsx(b,{label:"Permissions",value:S(s.permCount||null),accent:s.permCount>0?"amber":void 0}),e.jsx(b,{label:"Tok in",value:S(s.tokIn),dim:s.tokIn==null}),e.jsx(b,{label:"Tok out",value:S(s.tokOut),dim:s.tokOut==null}),e.jsx(b,{label:"Cache hit",value:us($(s)),dim:$(s)==null}),e.jsx(b,{label:"Model",value:s.model??"—",dim:s.model==null}),e.jsx(b,{label:"Events",value:S(s.eventCount||null)})]})]}),p.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Tool calls"}),e.jsx("ul",{className:"s-atop-histo",children:p.map(u=>e.jsxs("li",{children:[e.jsx("span",{className:"s-atop-histo-name",children:u.name}),e.jsx("span",{className:"s-atop-histo-bar",children:e.jsx("span",{className:"s-atop-histo-fill",style:{width:`${(u.frac*100).toFixed(1)}%`}})}),e.jsx("span",{className:"s-atop-histo-count",children:u.count})]},u.name))})]}),e.jsxs("section",{children:[e.jsxs("h3",{className:"s-atop-drawer-h3",children:["Recent activity",e.jsxs("span",{className:"s-atop-drawer-h3-aside",children:[r.length," buffered"]})]}),f.length===0?e.jsx("div",{className:"s-atop-peek-empty",children:"no events buffered for this agent yet"}):e.jsx("ol",{className:"s-atop-peek",children:f.map(u=>e.jsxs("li",{className:`s-atop-peek-row s-atop-peek-row--${u.kind}`,children:[e.jsx("span",{className:"s-atop-peek-time",children:$s(u.ts)}),e.jsx("span",{className:"s-atop-peek-kind",children:u.kind}),e.jsx("span",{className:"s-atop-peek-text",children:u.summary})]},u.id))})]}),e.jsxs("section",{className:"s-atop-drawer-section--secondary",children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Process"}),e.jsx("code",{className:"s-atop-codeblock",children:s.command}),e.jsxs("dl",{className:"s-atop-kvs",children:[e.jsx("dt",{children:"PID"}),e.jsx("dd",{children:s.pid>0?s.pid:"transcript-only"}),e.jsx("dt",{children:"Parent"}),e.jsxs("dd",{children:[s.parentLabel," (ppid ",s.ppid,")"]}),e.jsx("dt",{children:"Process etime"}),e.jsx("dd",{children:s.procEtime}),s.transcriptPath&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Transcript"}),e.jsx("dd",{children:s.transcriptPath})]}),e.jsx("dt",{children:"Origin"}),e.jsx("dd",{children:q[s.attribution]}),e.jsx("dt",{children:"CWD"}),e.jsx("dd",{children:s.cwd||"(none)"})]}),n?.parentChain&&n.parentChain.length>0&&e.jsx("ol",{className:"s-atop-chain",children:n.parentChain.map(u=>e.jsxs("li",{children:[e.jsx("span",{className:"s-atop-chain-pid",children:u.pid}),e.jsx("span",{className:"s-atop-chain-cmd",children:ws(u.command,80)})]},u.pid))})]})]})]})}function b({label:s,value:n,dim:r,accent:c}){const m=`s-atop-metric${r?" s-atop-metric--dim":""}${c?` s-atop-metric--${c}`:""}`;return e.jsxs("div",{className:m,children:[e.jsx("span",{className:"s-atop-metric-lbl",children:s}),e.jsx("span",{className:"s-atop-metric-val",children:n})]})}export{ae as AtopView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as k,j as s}from"./index-C1VaWNuD.js";import{k as d,l as B,m}from"./router-kfcaYqZr.js";function p(t){switch(t.view){case"mesh":return"Back to mesh";case"ops":return"Back to ops";case"agents-v2":return t.agentId?"Registry":"All agents";case"messages":return"Back to conversations";case"conversation":return"Back to conversation";case"inbox":return"Back to inbox";case"sessions":return"Back to sessions";case"terminal":return"Terminal Control";case"work":return"Back to work";case"broker":return"Back to broker";case"activity":return"Back to activity";default:return"Back"}}function w({slot:t,fallback:n,navigate:c,className:r,label:i}){const e=d(),o=k.useMemo(()=>B(e.state),[e.state]),a=o??n,u=i??p(a),l=m(e.state)&&!!o;return s.jsxs("button",{type:"button",className:`s-back-pill${r?` ${r}`:""}`,onClick:()=>{if(l&&typeof window<"u"&&window.history.length>1){window.history.back();return}c(a)},children:[s.jsx("span",{"aria-hidden":!0,className:"s-back-pill-glyph",children:"←"}),s.jsx("span",{children:u})]})}export{w as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,j as e}from"./index-C1VaWNuD.js";import{E as p}from"./EmptyState-CKPWFSjq.js";import{a as f}from"./api-Co9aQ2Jw.js";import{S as b}from"./scoutbot-markdown-yb87JlSE.js";import{b as h,t as u}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./perf-PX8Rx0EP.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./external-link-BvX5PfLh.js";const g={"fleet-home":"fleet briefing",tour:"tour briefing"};function be({briefingId:s,navigate:i}){const[r,n]=o.useState(null),[t,a]=o.useState(null),c=o.useCallback(async()=>{try{const d=await f(`/api/briefings/${encodeURIComponent(s)}`);n(d),a(null)}catch(d){a(d instanceof Error?d.message:"Failed to load briefing")}},[s]);return o.useEffect(()=>{c()},[c]),t?e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[e.jsx("button",{type:"button",className:"briefing-detail-back",onClick:()=>i({view:"briefings"}),children:"← back to briefings"}),e.jsx(p,{title:"Couldn't load briefing",body:t})]}):r?e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide briefing-detail",children:[e.jsx("button",{type:"button",className:"briefing-detail-back",onClick:()=>i({view:"briefings"}),children:"← back to briefings"}),e.jsxs("header",{className:"briefing-detail-header",children:[e.jsx("h2",{children:r.title}),e.jsxs("div",{className:"briefing-detail-header-meta",children:[e.jsx("span",{className:`briefing-kind briefing-kind-${r.kind}`,children:g[r.kind]}),e.jsx("span",{children:h(r.preparedAt)}),e.jsxs("span",{children:["· ",u(r.preparedAt)]})]}),e.jsx("p",{className:"briefing-detail-summary",children:r.summary}),r.recommendation?e.jsx("div",{className:"briefing-detail-recommendation",children:r.recommendation}):null]}),r.markdown?e.jsx(x,{markdown:r.markdown}):null,r.brief?.presented?e.jsx(y,{presented:r.brief.presented}):null,e.jsx(j,{call:r.call}),e.jsx(N,{brief:r.brief,navigate:i}),e.jsx(k,{observations:r.observations,navigate:i}),e.jsx(v,{snapshot:r.snapshot,call:r.call})]}):e.jsx("div",{className:"sys-surface-page sys-surface-page-wide",children:e.jsx("div",{className:"briefings-placeholder",children:"Loading briefing..."})})}function x({markdown:s}){return e.jsxs("section",{className:"briefing-layer briefing-layer-markdown",children:[e.jsx(l,{eyebrow:"Layer 0",title:"Brief (markdown)"}),e.jsx("div",{className:"briefing-markdown",children:e.jsx(b,{text:s})})]})}function j({call:s}){return!s||!s.telemetry&&!s.presenter?null:e.jsxs("section",{className:"briefing-layer briefing-layer-telemetry",children:[e.jsx(l,{eyebrow:"Telemetry",title:"Calls & usage"}),e.jsxs("dl",{className:"briefing-telemetry",children:[e.jsx(m,{label:"Analyst",model:s.model,responseId:s.responseId,telemetry:s.telemetry??null}),s.presenter?e.jsx(m,{label:"Presenter",model:s.presenter.model,responseId:s.presenter.responseId,telemetry:s.presenter,note:s.presenter.skipped==="rate-guard"?"skipped — rate-guard hit":s.presenter.skipped==="error"?`failed — ${s.presenter.errorMessage??"unknown"}`:null}):null]})]})}function m({label:s,model:i,responseId:r,telemetry:n,note:t}){const a=n?.usage??null;return e.jsxs("div",{className:"briefing-telemetry-row",children:[e.jsxs("div",{className:"briefing-telemetry-row-head",children:[e.jsx("span",{className:"briefing-telemetry-label",children:s}),e.jsx("span",{className:"briefing-telemetry-model",children:i}),t?e.jsx("span",{className:"briefing-telemetry-note",children:t}):null]}),e.jsxs("div",{className:"briefing-telemetry-stats",children:[e.jsx("span",{children:n&&n.elapsedMs>0?`${(n.elapsedMs/1e3).toFixed(2)}s`:"—"}),e.jsxs("span",{children:["in ",a?.inputTokens??"—"]}),e.jsxs("span",{children:["out ",a?.outputTokens??"—"]}),e.jsxs("span",{children:["total ",a?.totalTokens??"—"]}),r?e.jsx("span",{className:"briefing-telemetry-response",children:r}):null]})]})}function y({presented:s}){return e.jsxs("section",{className:"briefing-layer briefing-layer-presented",children:[e.jsx(l,{eyebrow:"Spoken",title:`Presented as · ${s.voiceSpec.persona}, ~${s.voiceSpec.targetWords} words`}),e.jsx("ol",{className:"briefing-presented-sentences",children:s.sentences.map((i,r)=>e.jsx("li",{className:"briefing-presented-sentence",children:i},r))}),e.jsxs("div",{className:"briefing-presented-meta",children:["model: ",s.model,s.responseId?` · response: ${s.responseId}`:""]})]})}function N({brief:s,navigate:i}){return s?e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 3",title:"Brief"}),s.steps.length>0?e.jsx("ol",{className:"briefing-steps",children:s.steps.map((r,n)=>e.jsxs("li",{className:"briefing-step",children:[e.jsxs("div",{className:"briefing-step-label",children:[n+1,". ",r.label]}),r.narration?e.jsx("p",{className:"briefing-step-narration",children:r.narration}):null]},r.id??n))}):null,s.actions.length>0?e.jsx("div",{className:"briefing-actions",children:s.actions.map((r,n)=>e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{r.route&&i(r.route)},children:r.label},`${r.label}-${n}`))}):null]}):e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 3",title:"Brief & call"}),e.jsx("p",{className:"briefings-placeholder",children:"No brief body persisted."})]})}function k({observations:s,navigate:i}){return e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 2",title:`Observations (${s.length})`}),s.length===0?e.jsx("p",{className:"briefings-placeholder",children:"No observations on this brief."}):e.jsx("div",{className:"briefing-observations",children:s.map((r,n)=>{const t=r.tone==="warn"?"briefing-observation-warn":r.tone==="err"||r.tone==="error"?"briefing-observation-err":"";return e.jsxs("div",{className:`briefing-observation ${t}`.trim(),children:[e.jsx("div",{className:"briefing-observation-text",children:r.text}),r.references.length>0?e.jsx("div",{className:"briefing-observation-refs",children:r.references.map((a,c)=>e.jsx(w,{reference:a,navigate:i},`${a.label}-${c}`))}):null]},n)})})]})}function w({reference:s,navigate:i}){const r=!!s.route,n=s.detail?`${s.label} · ${s.detail}`:s.label;return r?e.jsx("button",{type:"button",className:"briefing-ref-chip",onClick:()=>i(s.route),children:n}):e.jsx("span",{className:"briefing-ref-chip briefing-ref-chip-static",children:n})}function v({snapshot:s,call:i}){const r=o.useMemo(()=>C(s),[s]),[n,t]=o.useState(!1);return e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 1",title:"Read snapshot"}),r.length>0?e.jsx("div",{className:"briefing-snapshot-counts",children:r.map(a=>e.jsxs("span",{className:"briefing-snapshot-count",children:[e.jsx("strong",{children:a.value})," ",a.label]},a.label))}):null,i?e.jsxs("details",{className:"briefing-snapshot-section",children:[e.jsx("summary",{className:"briefing-snapshot-section-head",children:"Call metadata"}),e.jsxs("dl",{className:"briefing-call-grid",children:[e.jsx("dt",{children:"Model"}),e.jsx("dd",{children:i.model}),e.jsx("dt",{children:"Response ID"}),e.jsx("dd",{children:i.responseId??"—"}),e.jsx("dt",{children:"System prompt"}),e.jsx("dd",{children:e.jsx("pre",{className:"briefing-call-prompt",children:i.systemPrompt})}),e.jsx("dt",{children:"Operator request"}),e.jsx("dd",{children:e.jsx("pre",{className:"briefing-call-prompt",children:i.operatorRequest})})]})]}):null,e.jsxs("div",{className:"briefing-snapshot-section",children:[e.jsx("button",{type:"button",className:"briefing-detail-back",onClick:()=>t(a=>!a),children:n?"Hide raw snapshot":"Show raw snapshot JSON"}),n?e.jsx("pre",{className:"briefing-snapshot-raw",children:JSON.stringify(s??{},null,2)}):null]})]})}function l({eyebrow:s,title:i}){return e.jsxs("div",{className:"briefing-layer-head",children:[e.jsx("span",{className:"briefing-layer-eyebrow",children:s}),e.jsx("span",{className:"briefing-layer-title",children:i})]})}function C(s){if(!s?.state)return[];const i=s.state,r=[],n=(t,a)=>{Array.isArray(a)&&r.push({label:t,value:a.length})};if(n("agents",i.agents),i.fleet&&typeof i.fleet=="object"){const t=i.fleet;n("active requests",t.activeAsks),n("attention",t.needsAttention),n("recent",t.recentCompleted)}if(i.broker&&typeof i.broker=="object"){const t=i.broker;n("broker msgs",t.recentMessages)}if(n("scout chatter",i.scoutChatter),n("tail events",i.agentLogMessages),i.operatorAttention&&typeof i.operatorAttention=="object"){const t=i.operatorAttention;n("operator items",t.items)}return r}export{be as BriefingDetailScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-C1VaWNuD.js";import{E as c}from"./EmptyState-CKPWFSjq.js";import{p as m,a as g}from"./api-Co9aQ2Jw.js";import{t as p}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./perf-PX8Rx0EP.js";const b={"fleet-home":"fleet",tour:"tour"},d="/api/briefings?limit=50",u=3e4;function S({navigate:f}){const[r,h]=i.useState(()=>m(d,u)?.briefings??null),[n,t]=i.useState(null),[l,o]=i.useState(!1),a=i.useCallback(async()=>{o(!0);try{const s=await g(d);h(s.briefings),t(null)}catch(s){t(s instanceof Error?s.message:"Failed to load briefings")}finally{o(!1)}},[]);return i.useEffect(()=>{a()},[a]),e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[e.jsxs("div",{className:"sys-page-head",children:[e.jsxs("div",{className:"sys-page-title-group",children:[e.jsx("h2",{className:"sys-page-title",children:"Briefings"}),e.jsx("p",{className:"sys-page-subtitle",children:"Scoutbot's archived fleet briefs — what it told you, when, and what it saw. Rolling 100."})]}),e.jsx("div",{className:"sys-page-actions",children:e.jsx("button",{type:"button",className:"s-btn",disabled:l,onClick:()=>{a()},children:l?"Refreshing...":"Refresh"})})]}),n?e.jsx(c,{title:"Couldn't load briefings",body:n}):r===null?e.jsx("div",{className:"briefings-placeholder",children:"Loading briefings..."}):r.length===0?e.jsx(c,{title:"No briefings yet",body:"Scoutbot writes here when it generates a fleet brief — either on Home or via tour. Briefs land in this archive automatically."}):e.jsx("ul",{className:"briefings-list",children:r.map(s=>e.jsx("li",{children:e.jsxs("button",{type:"button",className:"briefing-row",onClick:()=>f({view:"briefings",briefingId:s.id}),children:[e.jsxs("div",{className:"briefing-row-head",children:[e.jsx("span",{className:`briefing-kind briefing-kind-${s.kind}`,children:b[s.kind]}),e.jsx("span",{className:"briefing-row-title",children:s.title}),e.jsx("span",{className:"briefing-row-time",children:p(s.preparedAt)})]}),e.jsx("div",{className:"briefing-row-summary",children:s.summary}),e.jsxs("div",{className:"briefing-row-meta",children:[e.jsxs("span",{children:[s.observationCount," observations"]}),s.recommendation?e.jsxs("span",{children:["· ",s.recommendation]}):null]})]})},s.id))})]})}export{S as BriefingsScreen};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as a,j as e}from"./index-C1VaWNuD.js";import{r as us}from"./index-Cx6Gbr6n.js";import{D as hs}from"./runtime-picker-C20lTGhV.js";import{E as Ie}from"./EmptyState-CKPWFSjq.js";import{B as fs,j as ms,F as ps,R as bs,G as ys,H as gs}from"./NewChatComposer-D2Ah4T-W.js";import{p as xs,a as ne}from"./api-Co9aQ2Jw.js";import{c as js}from"./clipboard-e3fSpeo7.js";import{u as ks}from"./sse-B29iGBnw.js";import{b as Fe}from"./status-tone-BM_zuRy1.js";import{t as $e,b as We,n as X}from"./time-Dhsh_2EG.js";import{u as Ve}from"./Provider-D0bB7q6y.js";import{o as Oe}from"./openContent-C6XO6kr5.js";import{g as vs,b as oe,h as Ye,d as ws,i as Ns,j as Ss,k as Rs,l as As}from"./broker-display-Q75fupqG.js";import{BrokerMetadataPanel as Cs}from"./BrokerMetadataPanel-BJSwU9XZ.js";import{DispatchAftermath as Is}from"./DispatchAftermath-ZCEB75hh.js";import{i as $s,c as Ds,n as _e}from"./keyboard-nav-B8sQ_8IF.js";import{ShikiPane as Es}from"./ShikiPane-C0TuCATU.js";import{d as Fs}from"./types-B0PlfpKc.js";import{u as Ms}from"./useEmbedHeadline-DuUnwTB7.js";/* empty css */import{L as xe}from"./loader-circle-DmUG_YC7.js";import{R as Ts}from"./refresh-cw-Bkh7Cvnd.js";import{X as De}from"./x-DgmmnPKt.js";import{A as Ls}from"./arrow-down-BAGkhHA6.js";import{E as Ue}from"./external-link-BvX5PfLh.js";import{C as Ps}from"./chevron-down-D120PY4g.js";import{S as Bs}from"./sparkles-D0vWLTyC.js";import{P as zs}from"./paperclip-Br7wUDFl.js";import{P as qs}from"./plus-BWKhylds.js";import{S as Os}from"./send-horizontal-CS7mxVhX.js";import{A as Ke}from"./arrow-right-DTX42clh.js";import{C as _s}from"./check-Dz2SRHft.js";import{C as Us}from"./copy-BzdzWsQd.js";import{M as Ks}from"./message-square-BLiFqpe_.js";import{c as Xe}from"./createLucideIcon-Dv8H8m7J.js";import{R as Hs}from"./radio-CxIXS1nU.js";import{M as Js,b as Gs}from"./DocumentFocusViewer-D8iB6SMt.js";import{B as Qs}from"./bot-WxKXYtEX.js";const Ws=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],Vs=Xe("at-sign",Ws);const Ys=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Xs=Xe("hash",Ys),Zs=160;function Ce(s){const t=new URLSearchParams({limit:String(Zs)});return s&&t.set("cursor",s),`/api/broker?${t.toString()}`}const He={index:-1,request:0};function er(s,t){return{index:t,request:s.request+1}}function Ze(s,t){return t===s.index?s:{index:t,request:s.request}}function sr(s,t){return s.index<t?s:Ze(s,t>0?t-1:-1)}function rr(s,t){return s.request!==t}function tr({enabled:s,rowCount:t,onActivateRow:n,onClearSelection:o}){const[u,h]=a.useState(He),b=u.index,m=a.useRef(new Map),k=a.useRef(He.request),c=a.useCallback(y=>{h(f=>er(f,typeof y=="function"?y(f.index):y))},[]),N=a.useCallback(y=>{h(f=>Ze(f,typeof y=="function"?y(f.index):y))},[]);a.useEffect(()=>{if(!rr(u,k.current)||(k.current=u.request,u.index<0))return;const y=m.current.get(u.index);y?.scrollIntoView({block:"nearest"}),y?.focus()},[u]),a.useEffect(()=>{h(y=>sr(y,t))},[t]);const R=a.useCallback((y,f)=>{f?m.current.set(y,f):m.current.delete(y)},[]);a.useEffect(()=>{if(!s)return;const y=f=>{if(document.querySelector(".sys-broker-page")&&!($s(f.target)||Ds())&&t!==0){if(f.key==="Escape"){o&&(f.preventDefault(),o(),N(-1));return}if(f.key==="ArrowDown"||f.key==="j"){f.preventDefault(),c(S=>_e(S,t,1));return}if(f.key==="ArrowUp"||f.key==="k"){f.preventDefault(),c(S=>_e(S,t,-1));return}if(f.key==="Home"||f.key==="g"&&!f.shiftKey){f.preventDefault(),c(0);return}if(f.key==="End"||f.key==="G"){f.preventDefault(),c(t-1);return}if(f.key==="Enter"||f.key===" "){const S=b<0?0:b;f.preventDefault(),c(S),n(S)}}};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[s,b,c,n,o,t,N]);const q=a.useCallback(y=>({tabIndex:b===y?0:-1,ref:f=>R(y,f),onFocus:()=>N(y)}),[b,R,N]);return{focusedIndex:b,setFocusedIndex:N,getRowFocusProps:q}}const ye=["all","delivered","failed"],ar=3e4,nr={all:"All",delivered:"Delivered",failed:"Failed"};function or(s){switch(s){case"success":return"Success";case"failed_query":return"Query failure";case"failed_delivery":return"Delivery failure";default:return"Delivery attempt"}}function es(s){return s.messageId??s.deliveryId??s.invocationId??s.id}function ss(s){switch(Fe(s.kind,s.status)){case"success":return"Delivered";case"danger":return"Failed";case"working":return"Pending";case"warning":return"Held";default:return s.status?s.status.charAt(0).toUpperCase()+s.status.slice(1):"Queued"}}function ve(s){if(!s)return"··";const t=s.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"··";const n=t[t.length-1];return/^\d+$/.test(n)?n.slice(-2):t.length>=2?(t[0][0]+t[1][0]).toUpperCase():s.trim().slice(0,2).toUpperCase()}function ir(s){const t=X(s)??0;return new Date(t).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function Je(s){const t=X(s);return t===null?"—":new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function Ne(s,t,n=0){if(!s||typeof s!="object"||Array.isArray(s)||n>3)return;const o=s;for(const u of t)if(o[u]!==void 0&&o[u]!==null)return o[u];for(const u of Object.values(o)){const h=Ne(u,t,n+1);if(h!==void 0)return h}}function U(s,...t){const n=Ne(s.metadata,t);return typeof n!="string"&&typeof n!="number"?null:String(n).trim()||null}function we(s,...t){const n=Ne(s.metadata,t);return typeof n=="number"||typeof n=="string"?X(n):null}function rs(s){switch(s){case"dm":return"Direct · agent";case"channel":return"Channel";case"broadcast":return"Broadcast";case null:return"No route";default:return s.replaceAll("_"," ")}}function Ee(s,t){if(t==="to")return s.route==="channel"?"Channel":s.route==="broadcast"?"Broadcast":s.target?.toLowerCase().includes("operator")?"Operator":"Agent lane";const n=U(s,"class","actorClass")?.toLowerCase();return n==="operator"||n==="human"?"Operator":n==="agent"?"Agent":s.actorName?.toLowerCase().includes("operator")?"Operator":"Sender"}function lr(s){const t=Ne(s.metadata,["latencyMs","durationMs"]);if(typeof t=="number"&&Number.isFinite(t)&&t>=0)return t<1e3?`${Math.round(t)}ms`:`${(t/1e3).toFixed(t<1e4?1:0)}s`;const n=we(s,"sentAt","createdAt")??X(s.ts),o=we(s,"deliveredAt","completedAt");if(n===null||o===null||o<n)return"—";const u=o-n;return u<1e3?`${u}ms`:`${(u/1e3).toFixed(u<1e4?1:0)}s`}function Me({route:s}){switch(s){case"channel":return e.jsx(Xs,{size:12,"aria-hidden":"true"});case"broadcast":return e.jsx(Hs,{size:12,"aria-hidden":"true"});case"dm":return e.jsx(Vs,{size:12,"aria-hidden":"true"});default:return e.jsx(Ks,{size:12,"aria-hidden":"true"})}}function cr(s,t){if(!t)return null;const n=t.trim().replace(/^@/,"").toLowerCase();return s.find(o=>[o.id,o.name,o.handle,o.selector,o.defaultSelector,o.conversationId,o.harnessSessionId].some(u=>u?.trim().replace(/^@/,"").toLowerCase()===n))??null}function Ge(s,t,n){const o=n==="from"?s.actorName:s.target,u=cr(t,o),h=u?.name??o??(n==="from"?"Unknown":"No target"),b=u?"Agent":n==="to"&&s.conversationId?"Session route":Ee(s,n);return{label:h,kind:b,agent:u}}function dr(s,t,n){const o=n.agent??t.agent;return[{label:"From",value:t.kind},{label:"To",value:n.kind},{label:"Target",value:s.target??n.label},{label:"Channel",value:rs(s.route)},{label:"Project",value:o?.project??U(s,"project","projectName")},{label:"Branch",value:o?.branch??U(s,"branch")},{label:"Runtime",value:o?[o.harness,o.model,o.reasoningEffort].filter(Boolean).join(" · ")||null:[U(s,"harness"),U(s,"model")].filter(Boolean).join(" · ")||null},{label:"Machine",value:o?.authorityNodeName??o?.homeNodeName??o?.authorityNodeId??o?.homeNodeId??U(s,"machine","machineName","nodeName")}].filter(u=>!!u.value)}function Qe({party:s,route:t,side:n}){return e.jsxs("span",{className:`sys-broker-route-end sys-broker-route-end--${n}`,children:[e.jsx("span",{className:"sys-broker-avatar sys-broker-endpoint-avatar","aria-hidden":"true",children:s.agent||n==="from"?ve(s.label):e.jsx(Me,{route:t})}),e.jsx("span",{className:"sys-broker-endpoint-name",title:s.label,children:s.label})]})}function ur({attempt:s,agents:t}){const n=Ge(s,t,"from"),o=Ge(s,t,"to"),u=dr(s,n,o),h=`dispatch-route-${s.id}`;return e.jsxs("span",{className:"sys-broker-route",tabIndex:0,"aria-describedby":h,children:[e.jsx(Qe,{party:n,route:s.route,side:"from"}),e.jsx(Ke,{className:"sys-broker-route-arrow",size:11,"aria-hidden":"true"}),e.jsx(Qe,{party:o,route:s.route,side:"to"}),e.jsxs("span",{className:"sys-broker-endpoint-card",id:h,role:"tooltip",children:[e.jsx("span",{className:"sys-broker-endpoint-card-head",children:e.jsxs("span",{className:"sys-broker-endpoint-card-edge",children:[e.jsx("span",{className:"sys-broker-avatar sys-broker-endpoint-avatar","aria-hidden":"true",children:ve(n.label)}),e.jsx("strong",{children:n.label}),e.jsx(Ke,{className:"sys-broker-route-arrow",size:11,"aria-hidden":"true"}),e.jsx("span",{className:"sys-broker-avatar sys-broker-endpoint-avatar","aria-hidden":"true",children:o.agent?ve(o.label):e.jsx(Me,{route:s.route})}),e.jsx("strong",{children:o.label})]})}),e.jsx("span",{className:"sys-broker-endpoint-card-body",children:u.map(b=>e.jsxs("span",{className:"sys-broker-endpoint-card-field",children:[e.jsx("small",{children:b.label}),e.jsx("code",{title:b.value,children:b.value})]},b.label))})]})]})}function ge(s){const t=X(s)??0,n=new Date(t);return`${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`}function hr(s,t=Date.now()){const n=X(s)??0,o=new Date(n),u=new Date(t),h=new Date(t);return h.setDate(h.getDate()-1),ge(s)===ge(u.getTime())?"Today":ge(s)===ge(h.getTime())?"Yesterday":o.toLocaleDateString(void 0,{month:"short",day:"numeric",year:o.getFullYear()===u.getFullYear()?void 0:"numeric"})}function fr(s,t,n){return{...t,source:s.source,attempts:[...s.attempts,...t.attempts],failedQueries:s.failedQueries,failedDeliveries:s.failedDeliveries,dialogue:s.dialogue,ledger:{...t.ledger,cursors:{...s.ledger.cursors,[n]:t.ledger.cursors[n]},hasMore:{...s.ledger.hasMore,[n]:t.ledger.hasMore[n]}}}}function mr({navigate:s,embedded:t=!1,initialAttemptId:n}){Ms("Dispatch",t);const{route:o,agents:u,selectedBrokerAttempt:h,inspectBrokerAttempt:b,clearBrokerAttempt:m}=Ve(),[k]=a.useState(()=>xs(Ce(),ar)),[c,N]=a.useState(k),R=o.view==="broker"?o.filter??"all":"all",[q,y]=a.useState(k===null),[f,S]=a.useState(!1),[K,le]=a.useState(!1),[Q,F]=a.useState(null),W=a.useRef(k),C=a.useRef(0),M=a.useRef(null),T=a.useCallback(async(i="initial")=>{const d=++C.current;!W.current&&i!=="background"?(y(!0),F(null)):S(!0);try{const j=await ne(Ce());if(d!==C.current)return;W.current=j,N(j),F(null)}catch(j){if(d!==C.current)return;F(j instanceof Error?j.message:String(j))}finally{d===C.current&&(y(!1),S(!1))}},[]),ce=a.useCallback(async()=>{const i=W.current;if(!i||K)return;const d="attempts",j=i.ledger.cursors[d];if(!j||!i.ledger.hasMore[d])return;const B=++C.current;le(!0),F(null);try{const z=await ne(Ce(j));if(B!==C.current)return;const ue=W.current,he=ue?fr(ue,z,d):z;W.current=he,N(he)}catch(z){if(B!==C.current)return;F(z instanceof Error?z.message:String(z))}finally{B===C.current&&le(!1)}},[K]),H=a.useCallback(()=>{M.current||(M.current=setTimeout(()=>{M.current=null,T("background")},250))},[T]);a.useEffect(()=>(T("initial"),()=>{M.current&&clearTimeout(M.current)}),[T]),ks(i=>{(i.kind==="message.posted"||i.kind==="delivery.planned"||i.kind==="delivery.attempted"||i.kind==="delivery.state.changed"||i.kind==="scout.dispatched")&&H()});const v=a.useMemo(()=>{if(!c)return[];const i=new Map(c.dialogue.map(d=>[d.id,d.body]));return vs(c.attempts).map(d=>{const j=d.messageId?i.get(d.messageId):null;return j&&j!==d.detail?{...d,detail:j}:d})},[c]),L=a.useMemo(()=>{switch(R){case"delivered":return v.filter(i=>!oe(i));case"failed":return v.filter(oe);default:return v}},[R,v]),Z=c?.ledger.hasMore.attempts??!1,ae=a.useMemo(()=>({all:v.length,delivered:v.filter(i=>!oe(i)).length,failed:v.filter(oe).length}),[v]),$=a.useMemo(()=>{const i=o.view==="broker"?o.attemptId:void 0;return!c||!i?null:v.find(d=>d.id===i)??c.attempts.find(d=>d.id===i)??c.failedQueries.find(d=>d.id===i)??c.failedDeliveries.find(d=>d.id===i)??null},[c,v,o]),D=$?`${$.id}\0${$.status}\0${$.ts}`:null,ee=h?`${h.id}\0${h.status}\0${h.ts}`:null;a.useEffect(()=>{$&&D!==ee&&b($)},[ee,b,$,D]);const[x,O]=a.useState(null),P=a.useRef(!1),J=a.useCallback(i=>{if(t){P.current=!0,O(i);return}b(i)},[t,b]),G=a.useCallback(()=>{if(t){P.current=!0,O(null);return}m()},[m,t]),de=a.useCallback(i=>{const d=L[i];d&&(J(d),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:520}})))},[L,J]),{getRowFocusProps:Se,setFocusedIndex:je}=tr({enabled:!!c&&L.length>0,rowCount:L.length,onActivateRow:de,onClearSelection:G}),E=x?.id??null,se=x?`${x.id} ${x.status} ${x.ts}`:null;a.useEffect(()=>{if(!t||!E)return;const i=v.find(d=>d.id===E);i&&`${i.id} ${i.status} ${i.ts}`!==se&&O(i)},[t,E,se,v]),a.useEffect(()=>{if(!t||!n||!c||P.current||x)return;const i=v.find(d=>d.id===n)??c.attempts.find(d=>d.id===n)??c.failedQueries.find(d=>d.id===n)??c.failedDeliveries.find(d=>d.id===n);i&&(P.current=!0,O(i))},[c,t,x,v,n]),a.useEffect(()=>{const i=o.view==="broker"?o.attemptId:void 0;if(!i)return;const d=L.findIndex(j=>j.id===i);d>=0&&je(d)},[L,R,o,je]);const A=a.useCallback(i=>{const j=(ye.indexOf(R)+i+ye.length)%ye.length,B=ye[j];s({view:"broker",...B==="all"?{}:{filter:B}})},[R,s]),I=t?x:null;return e.jsx("div",{className:`s-ops${t?" s-ops--embedded":""}${I?" s-ops--split":""}`,children:e.jsxs("div",{className:"s-ops-body",children:[e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide sys-surface-page-fluid sys-broker-page",children:[e.jsxs("div",{className:"sys-ledger-toolbar","aria-label":"Dispatch controls",children:[c?e.jsx("div",{className:"sys-tab-row sys-tab-row--toolbar",role:"tablist","aria-label":"Dispatch message filters",onKeyDown:i=>{i.key==="ArrowRight"?(i.preventDefault(),A(1)):i.key==="ArrowLeft"&&(i.preventDefault(),A(-1))},children:ye.map(i=>e.jsxs("button",{type:"button",role:"tab","aria-selected":R===i,className:`sys-tab${R===i?" sys-tab-active":""}`,onClick:()=>s({view:"broker",...i==="all"?{}:{filter:i}}),children:[e.jsx("span",{children:nr[i]}),e.jsx("span",{className:"sys-tab-count",children:ae[i]})]},i))}):e.jsx("div",{className:"sys-ledger-kicker",children:"Dispatch ledger"}),e.jsxs("div",{className:"sys-page-actions sys-ledger-actions",children:[e.jsx("div",{className:"sys-sync-note",children:q?"Loading dispatch ledger...":c?`Updated ${$e(c.generatedAt)}${c.source?.latestMessageAt?` · latest message ${$e(c.source.latestMessageAt)}`:""}`:"Waiting for dispatch data"}),e.jsx("button",{type:"button",className:"s-btn",disabled:q||f,onClick:()=>{T("manual")},children:f?"Refreshing...":"Refresh"})]})]}),Q&&e.jsxs("div",{className:"sys-banner sys-banner-warning",children:[e.jsx("strong",{children:"Refresh failed."}),e.jsx("span",{children:Q})]}),f&&c&&e.jsxs("div",{className:"sys-broker-source-note",role:"status","aria-live":"polite",children:[e.jsx(xe,{className:"sys-broker-source-spinner",size:12,"aria-hidden":"true"}),e.jsx("strong",{children:"Updating dispatches…"})]}),!f&&c?.source?.mode==="sqlite_projection"&&c.source.status==="degraded"&&c.source.detail&&e.jsxs("div",{className:"sys-broker-source-note sys-broker-source-note--warning",role:"status","aria-label":c.source.detail,title:c.source.detail,children:[e.jsx("span",{className:"sys-broker-source-dot","aria-hidden":"true"}),e.jsx("strong",{children:c.source.brokerReachable?"Dispatch history is loading":"Dispatch may be out of date"}),e.jsx("span",{children:c.source.brokerReachable?"Broker online; showing saved dispatch history while live messages load.":"Live broker unavailable; showing saved dispatch history."})]}),q&&!c&&e.jsx("div",{className:"sys-broker-empty-wrap",children:e.jsx(Ie,{className:"sys-state-card-centered",icon:e.jsx(xe,{className:"sys-broker-source-spinner",size:24,"aria-hidden":"true"}),title:"Loading dispatch",body:"Reading the dispatch database snapshot."})}),!q&&!c&&!Q&&e.jsx("div",{className:"sys-broker-empty-wrap",children:e.jsx(Ie,{className:"sys-state-card-centered",title:"No dispatch data",body:"No dispatch rows are available yet."})}),c&&e.jsxs(e.Fragment,{children:[e.jsx(pr,{attempts:L,agents:u,selectedAttemptId:t?x?.id??null:h?.id??(o.view==="broker"?o.attemptId??null:null),onInspect:J,getRowFocusProps:Se}),L.length>0&&Z&&e.jsx("div",{className:"sys-ledger-footer",children:e.jsx("button",{type:"button",className:"s-btn",disabled:K,onClick:()=>{ce()},children:K?"Loading older...":"Load older"})})]})]}),I&&e.jsx("div",{className:"s-broker-embed-detail",children:e.jsx(ts,{attempt:I,navigate:s,onClose:G})})]})})}function pr({attempts:s,agents:t,selectedAttemptId:n,onInspect:o,getRowFocusProps:u}){if(s.length===0)return e.jsx("div",{className:"sys-broker-empty-wrap",children:e.jsx(Ie,{className:"sys-state-card-centered",title:"No dispatch rows",body:"No dispatch rows are available yet."})});const h=s.reduce((b,m,k)=>{const c=ge(m.ts),N=b[b.length-1];return N?.key===c?N.attempts.push({attempt:m,index:k}):b.push({key:c,label:hr(m.ts),attempts:[{attempt:m,index:k}]}),b},[]);return e.jsxs("div",{className:"sys-broker-wire","aria-label":"Dispatch ledger",children:[e.jsxs("div",{className:"sys-broker-wire-head","aria-hidden":"true",children:[e.jsx("span",{className:"sys-broker-col sys-broker-col--route",children:"Route"}),e.jsx("span",{className:"sys-broker-col sys-broker-col--msg",children:"Message"}),e.jsx("span",{className:"sys-broker-col sys-broker-col--time",children:"Time"})]}),h.map(b=>e.jsxs("section",{className:"sys-broker-day","aria-labelledby":`dispatch-day-${b.key}`,children:[e.jsxs("header",{className:"sys-broker-day-head",children:[e.jsx("h2",{id:`dispatch-day-${b.key}`,children:b.label}),e.jsxs("span",{children:[b.attempts.length," ",b.attempts.length===1?"dispatch":"dispatches"]})]}),e.jsx("div",{className:"sys-broker-wire-body",role:"list",children:b.attempts.map(({attempt:m,index:k})=>{const c=Fe(m.kind,m.status),N=oe(m),R=!N&&(c==="working"||c==="warning"),q=Ye(m),y=ss(m),f=N?q:R?y:null,S=()=>{o(m),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:520}}))};return e.jsxs("div",{role:"listitem",className:`sys-broker-wire-row${N?" sys-broker-wire-row--failure":R?" sys-broker-wire-row--pending":""}${n===m.id?" sys-broker-wire-row--selected":""}`,"aria-label":`${y}. Inspect ${m.detail}`,onClick:S,...u(k),children:[e.jsx("div",{className:"sys-broker-cell sys-broker-col--route",children:e.jsx(ur,{attempt:m,agents:t})}),e.jsxs("div",{className:"sys-broker-cell sys-broker-col--msg",children:[e.jsx("span",{className:"sys-broker-msg",title:m.detail,children:m.detail}),f&&e.jsx("span",{className:`sys-broker-msg-error sys-broker-msg-error--${N?"danger":"warning"}`,title:f,children:f})]}),e.jsx("div",{className:"sys-broker-cell sys-broker-col--time",children:e.jsx("time",{className:"sys-broker-time-abs",title:`${$e(m.ts)} · ${We(m.ts)}`,children:ir(m.ts)})})]},m.id)})})]},b.key))]})}function br(s){const t=es(s);return[{label:"Kind",value:or(s.kind)},{label:"Time",value:We(s.ts)},{label:"Actor",value:s.actorName},{label:"Target",value:s.target},{label:"Route",value:s.route},{label:"Conversation",value:s.conversationId},{label:"Reference",value:t},{label:"Message",value:s.messageId===t?null:s.messageId},{label:"Delivery",value:s.deliveryId===t?null:s.deliveryId},{label:"Invocation",value:s.invocationId===t?null:s.invocationId}].filter(n=>!!n.value)}function ie({value:s,subject:t,className:n}){const[o,u]=a.useState("idle"),h=a.useRef(null);a.useEffect(()=>{u("idle")},[s]),a.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const b=a.useCallback(async()=>{const c=await js(s);h.current&&clearTimeout(h.current),u(c?"copied":"failed"),h.current=setTimeout(()=>{u("idle"),h.current=null},1500)},[s]),m=o==="copied",k=o==="failed";return e.jsx("button",{type:"button",className:`sys-copy-btn${n?` ${n}`:""}${m?" sys-copy-btn--copied":""}${k?" sys-copy-btn--failed":""}`,onClick:()=>{b()},title:m?`Copied ${t}`:k?"Copy failed":`Copy ${t}`,"aria-label":m?`Copied ${t}`:k?`Copy ${t} failed`:`Copy ${t}`,children:m?e.jsx(_s,{size:14,"aria-hidden":"true"}):e.jsx(Us,{size:14,"aria-hidden":"true"})})}function yr(s){const t=s.trim();if(t.startsWith("{")||t.startsWith("["))try{return{code:JSON.stringify(JSON.parse(t),null,2),path:"payload.json",language:"JSON"}}catch{}return{code:s,path:"payload.md",language:"Text · Markdown"}}function gr({payload:s}){const t=a.useMemo(()=>yr(s),[s]),[n,o]=a.useState(!1),u=a.useRef(null),h=t.code.split(`
|
|
2
|
-
`).length;a.useEffect(()=>{const m=u.current;!m||!n||m.open||m.showModal()},[n]),a.useEffect(()=>{o(!1)},[s]);const b=e.jsx("div",{className:"sys-broker-payload-code","data-language":t.path==="payload.json"?"json":"markdown",role:"region","aria-label":`Dispatch payload, ${t.language}`,tabIndex:0,children:e.jsx(Es,{code:t.code,path:t.path})});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sys-broker-payload-head",children:[e.jsx("span",{className:"sys-detail-label",children:"Payload"}),e.jsxs("span",{className:"sys-broker-payload-meta",children:[t.language," · ",h," ",h===1?"line":"lines"]}),e.jsx(ie,{value:s,subject:"payload"}),e.jsx("button",{type:"button",className:"sys-copy-btn sys-broker-payload-expand",onClick:()=>o(!0),title:"Expand payload","aria-label":"Expand payload",children:e.jsx(Js,{size:14,"aria-hidden":"true"})})]}),e.jsx("div",{className:"sys-broker-payload-resizer",children:b}),n&&us.createPortal(e.jsxs("dialog",{ref:u,className:"sys-broker-payload-dialog","aria-label":"Expanded dispatch payload",onCancel:m=>{m.preventDefault(),o(!1)},onClose:()=>o(!1),children:[e.jsxs("header",{className:"sys-broker-payload-dialog-head",children:[e.jsxs("div",{children:[e.jsx("span",{className:"sys-detail-label",children:"Dispatch payload"}),e.jsxs("span",{className:"sys-broker-payload-meta",children:[t.language," · ",h," ",h===1?"line":"lines"]})]}),e.jsx(ie,{value:s,subject:"payload"}),e.jsx("button",{type:"button",className:"sys-copy-btn",onClick:()=>o(!1),title:"Return payload to inspector","aria-label":"Return payload to inspector",children:e.jsx(Gs,{size:14,"aria-hidden":"true"})})]}),e.jsx("div",{className:"sys-broker-payload-dialog-body",children:b})]}),document.body)]})}function xr({attempt:s}){const t=As(s);return e.jsxs("div",{className:"sys-broker-route-failure",role:"status",children:[e.jsx("span",{className:"sys-broker-route-failure-mark","aria-hidden":"true",children:e.jsx(De,{size:14})}),e.jsxs("div",{children:[e.jsx("span",{className:"sys-detail-label",children:"Routing stopped"}),e.jsx("strong",{children:t}),e.jsx("p",{children:s.detail})]}),e.jsx(ie,{value:s.detail,subject:"failure detail"})]})}function ts({attempt:s,navigate:t,onClose:n}){const{route:o,agents:u,scoutbotAgentId:h}=Ve(),b=br(s),m=ws(s.metadata),k=oe(s),c=s.kind==="failed_query",N=Ye(s),R=Fe(s.kind,s.status),q=we(s,"sentAt","createdAt")??X(s.ts),y=we(s,"deliveredAt","completedAt")??X(s.ts),f=es(s),[S,K]=a.useState("idle"),[le,Q]=a.useState(null),[F,W]=a.useState(null),[C,M]=a.useState(""),[T,ce]=a.useState(""),[H,v]=a.useState("idle"),[L,Z]=a.useState(null),[ae,$]=a.useState(""),[D,ee]=a.useState(""),[x,O]=a.useState(""),[P,J]=a.useState(""),[G,de]=a.useState("medium"),[Se,je]=a.useState(null),[E,se]=a.useState([]),[A,I]=a.useState("idle"),[i,d]=a.useState(null),j=U(s,"harness"),B=U(s,"model"),z=U(s,"reasoningEffort","effort"),ue=a.useRef(null),he=a.useRef(null),Re=a.useMemo(()=>Ns(s),[s]),w=a.useMemo(()=>u.filter(r=>!r.retiredFromFleet&&!r.staleLocalRegistration).slice().sort((r,l)=>r.id===h?-1:l.id===h?1:(l.updatedAt??0)-(r.updatedAt??0)||r.name.localeCompare(l.name)),[u,h]),fe=a.useMemo(()=>Ss(s,w)?.id??"",[s,w]),me=w.some(r=>r.id===h)?h:w[0]?.id??"",ke=w[0]?.id??"",re=w.find(r=>r.id===me)??null,as=a.useMemo(()=>{const r=new Map;for(const l of w){const p=l.projectRoot?.trim()||l.cwd?.trim();if(!p)continue;const g=p.split("/").filter(Boolean).at(-1)??p;r.set(p,l.project?.trim()||g)}return[...r.entries()].map(([l,p])=>({path:l,label:p}))},[w]),Te=a.useRef({originalTargetAgentId:fe,firstRoutableAgentId:ke,defaultForwardAgentId:me,defaultForwardAgent:re,effort:"medium"});Te.current={originalTargetAgentId:fe,firstRoutableAgentId:ke,defaultForwardAgentId:me,defaultForwardAgent:re,effort:U(s,"reasoningEffort","effort")||"medium"};const pe=a.useRef(!1);a.useEffect(()=>{const r=Te.current;pe.current=!1,K("idle"),Q(null),W(null),M(""),ce(r.originalTargetAgentId||r.firstRoutableAgentId),v("idle"),Z(null),$(r.defaultForwardAgentId),ee(r.defaultForwardAgent?.projectRoot?.trim()||r.defaultForwardAgent?.cwd?.trim()||""),O(r.defaultForwardAgent?.harness?.trim()||""),J(r.defaultForwardAgent?.model?.trim()||""),de(r.effort),se([]),I("idle"),d(null)},[s.id]),a.useEffect(()=>{pe.current||(ce(r=>r||fe||ke),$(r=>r||me),ee(r=>r||re?.projectRoot?.trim()||re?.cwd?.trim()||""),O(r=>r||re?.harness?.trim()||""),J(r=>r||re?.model?.trim()||""))},[re,me,ke,fe]),a.useEffect(()=>{const r=new URLSearchParams({scope:"global+project"});D&&r.set("projectRoot",D);let l=!1;return ne(`/api/runner/options?${r.toString()}`).then(p=>{!l&&p.schemaVersion==="openscout.runtime-capabilities.v1"&&je(p)}).catch(()=>{}),()=>{l=!0}},[D]);const ns=a.useCallback(r=>{M(r),window.requestAnimationFrame(()=>ue.current?.focus())},[]),os=a.useCallback(async()=>{const r=w.find(l=>l.id===T);if(!(!r||H==="sending")){v("sending"),Z(null);try{const l=await ne("/api/ask",{method:"POST",body:JSON.stringify({body:s.detail,targetAgentId:r.id,targetLabel:r.name,...j||B||z?{execution:{...j?{harness:j}:{},...B?{model:B}:{},...z?{reasoningEffort:z}:{},session:"new"}}:{},metadata:{source:"scout-dispatch-redispatch",originalDispatchId:s.id,...s.messageId?{originalMessageId:s.messageId}:{},...s.conversationId?{originalConversationId:s.conversationId}:{}}})}),p=l.flightId??l.flight?.id;v("sent"),Z(`New dispatch sent to ${r.name}${p?` · ${p}`:""}`)}catch(l){v("failed"),Z(`Retry failed. ${l instanceof Error?l.message:String(l)}`)}}},[s,T,H,z,j,B,w]),Le=a.useCallback(async()=>{const r=C.trim(),l=w.find(p=>p.id===ae);if(!(!r||!l||A==="sending")){I("sending"),d(E.length>0?`Uploading ${E.length} ${E.length===1?"attachment":"attachments"}…`:null);try{const p=E.length>0?await fs(E):[],g=await ne("/api/ask",{method:"POST",body:JSON.stringify({body:`${r}
|
|
3
|
-
|
|
4
|
-
Attached dispatch context:
|
|
5
|
-
${Re}`,targetAgentId:l.id,targetLabel:l.name,...p.length>0?{attachments:p}:{},execution:{...x?{harness:x}:{},...P?{model:P}:{},...G?{reasoningEffort:G}:{}},metadata:{source:"scout-dispatch-forward",originalDispatchId:s.id,...D?{targetProjectPath:D}:{},...s.messageId?{originalMessageId:s.messageId}:{},...s.conversationId?{originalConversationId:s.conversationId}:{}}})}),V=g.flightId??g.flight?.id;I("sent"),d(`Request sent to ${l.name}${V?` · ${V}`:""}`),M(""),se([])}catch(p){I("failed"),d(`Request wasn't sent. ${p instanceof Error?p.message:String(p)}`)}}},[s,Re,ae,G,E,x,P,D,A,C,w]),is=a.useCallback(r=>{const l=r.filter(ms),p=r.length-l.length;l.length>0&&(se(g=>[...g,...l]),I("idle"),d(null)),p>0&&(I("failed"),d("Attach markdown, code, an image, or a video clip."))},[]),ls=k?["Get a second opinion","Propose a recovery plan","Draft a follow-up"]:["Summarize this dispatch","Draft a follow-up","What changed?"],_=w.find(r=>r.id===T)??null,te=w.find(r=>r.id===ae)??null,be=w.filter(r=>D?(r.projectRoot?.trim()||r.cwd?.trim())===D:!0),Pe=Se??bs,Ae=a.useMemo(()=>{const r=ps(Pe),l=[P,te?.harness===x?te.model:null,...be.filter(g=>g.harness===x).map(g=>g.model)].map(g=>g?.trim()).filter(g=>!!g);let p=r.harnesses;return p.some(g=>g.value===x)||(p=[{value:x,label:x||"default",models:[]},...p]),p=p.map(g=>{if(g.value!==x)return g;const V=g.models.some(Y=>Y.value==="")?g.models:[{value:"",label:"Default",note:"harness picks"},...g.models],ds=new Set(V.map(Y=>Y.value)),qe=l.filter(Y=>!ds.has(Y)).map(Y=>({value:Y,label:Y,note:"observed"}));return qe.length===0&&V===g.models?g:{...g,models:[...V,...qe]}}),{...r,harnesses:p}},[Pe,te,x,P,be]);a.useEffect(()=>{const r=ys(Ae,x);!r||r.some(l=>l.value===G)||de(r.find(l=>l.value==="medium")?.value??r[0]?.value??"")},[Ae,x,G]);const cs=a.useCallback(async()=>{K("running"),Q(null);try{const r=await ne("/api/broker/dispatch-review",{method:"POST",body:JSON.stringify(Rs(s))});K("sent"),W(r.conversationId),Q(r.conversationId?`Report started${r.targetLabel?` with ${r.targetLabel}`:""}. Open the conversation to follow it.`:`Report started${r.targetLabel?` with ${r.targetLabel}`:""}${r.flightId?` · ${r.flightId}`:""}.`)}catch(r){K("failed"),Q(`Couldn't start the report. ${r instanceof Error?r.message:String(r)}`)}},[s]),Be=k?e.jsxs("div",{className:"sys-broker-action-row",children:[e.jsxs("div",{className:"sys-broker-action-line",children:[e.jsx("span",{className:"sys-broker-action-label",id:"dispatch-report-title",children:"Failure report"}),e.jsxs("button",{type:"button",className:"sys-broker-report-button",disabled:S==="running"||S==="sent"&&!F,onClick:()=>{if(F){Oe(t,{view:"conversation",conversationId:F},{returnTo:o});return}cs()},children:[S==="running"?e.jsx(xe,{size:13,className:"sys-broker-action-spinner","aria-hidden":"true"}):F?e.jsx(Ue,{size:13,"aria-hidden":"true"}):e.jsx(Qs,{size:13,"aria-hidden":"true"}),S==="running"?"Starting report…":F?"Open report conversation":"Start failure report"]})]}),le&&e.jsx("div",{className:`sys-broker-review-status sys-broker-review-status--${S}`,role:"status",children:le})]}):null,ze=e.jsxs("div",{className:"sys-broker-action-row",children:[e.jsxs("div",{className:"sys-broker-action-line",children:[e.jsx("span",{className:"sys-broker-action-label",id:"dispatch-redispatch-title",children:"Retry"}),e.jsxs("div",{className:"sys-broker-redispatch-controls",children:[e.jsx("select",{"aria-label":"Retry destination",value:T,disabled:H==="sending"||w.length===0,onChange:r=>{ce(r.target.value),v("idle"),Z(null)},children:w.length===0?e.jsx("option",{value:"",children:"No agents available"}):e.jsxs(e.Fragment,{children:[!T&&e.jsx("option",{value:"",children:"Original destination unavailable"}),w.map(r=>e.jsxs("option",{value:r.id,children:[r.id===h?"Scout":r.name,r.project?` · ${r.project}`:""]},r.id))]})}),e.jsxs("button",{type:"button",className:"sys-broker-redispatch-send",disabled:!_||H==="sending",onClick:()=>{os()},children:[H==="sending"?e.jsx(xe,{size:13,className:"sys-broker-action-spinner","aria-hidden":"true"}):e.jsx(Ts,{size:13,"aria-hidden":"true"}),H==="sending"?"Retrying…":"Retry dispatch"]})]})]}),_&&e.jsxs("div",{className:"sys-broker-action-target-meta",children:[_.harness&&e.jsx("span",{children:_.harness}),_.model&&e.jsx("span",{children:_.model}),(_.cwd??_.projectRoot)&&e.jsx("code",{children:_.cwd??_.projectRoot})]}),L&&e.jsx("div",{className:`sys-broker-action-status sys-broker-action-status--${H}`,role:"status",children:L})]});return e.jsxs("aside",{className:"sys-panel sys-broker-inspector","aria-label":"Dispatch route inspector",children:[e.jsx("header",{className:"sys-broker-inspector-head",children:e.jsxs("div",{className:"sys-broker-inspector-status",children:[e.jsx("span",{className:`sys-broker-dot sys-broker-dot--${R}`,"aria-hidden":"true"}),e.jsx("strong",{className:`sys-broker-state sys-broker-state--${R}`,children:ss(s)}),e.jsx("code",{title:f,children:f}),e.jsx(ie,{value:Re,subject:"dispatch context",className:"sys-broker-inspector-copy"}),e.jsx("button",{type:"button",className:"sys-copy-btn sys-broker-inspector-close",onClick:n,title:"Close inspector","aria-label":"Close inspector",children:e.jsx(De,{size:14,"aria-hidden":"true"})})]})}),e.jsxs("div",{className:"sys-broker-inspector-body",children:[e.jsxs("section",{className:"sys-broker-route-stack","aria-label":"Dispatch route",children:[e.jsxs("div",{className:"sys-broker-route-party",children:[e.jsx("span",{className:"sys-broker-avatar sys-broker-route-avatar","aria-hidden":"true",children:ve(s.actorName)}),e.jsxs("div",{className:"sys-broker-route-party-copy",children:[e.jsxs("span",{className:"sys-detail-label",children:["From · ",Ee(s,"from")]}),e.jsx("strong",{children:s.actorName??"Unknown sender"})]})]}),e.jsx(Ls,{className:"sys-broker-route-down",size:17,"aria-hidden":"true"}),e.jsxs("div",{className:"sys-broker-route-party",children:[e.jsx("span",{className:"sys-broker-route-target-icon","aria-hidden":"true",children:e.jsx(Me,{route:s.route})}),e.jsxs("div",{className:"sys-broker-route-party-copy",children:[e.jsxs("span",{className:"sys-detail-label",children:["To · ",Ee(s,"to")]}),e.jsx("code",{title:s.target??"No target",children:s.target??"No target"})]}),s.conversationId&&e.jsxs("button",{type:"button",className:"sys-broker-route-button",onClick:()=>Oe(t,{view:"conversation",conversationId:s.conversationId},{returnTo:o}),children:[e.jsx(Ue,{size:11,"aria-hidden":"true"}),"Route"]})]})]}),e.jsxs("dl",{className:"sys-broker-delivery-grid",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Channel"}),e.jsx("dd",{children:rs(s.route)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Latency"}),e.jsx("dd",{className:"sys-broker-delivery-accent",children:lr(s)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sent"}),e.jsx("dd",{children:Je(q)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:k?"Failed":"Delivered"}),e.jsx("dd",{children:Je(y)})]})]}),e.jsxs("section",{className:"sys-broker-payload",children:[c?e.jsx(xr,{attempt:s}):e.jsx(gr,{payload:s.detail}),k&&!c&&N&&e.jsxs("div",{className:"sys-broker-inspector-error",role:"status",children:[e.jsx("span",{className:"sys-broker-inspector-error-label",children:"Error"}),e.jsx("p",{children:N})]})]}),e.jsx(Is,{attempt:s,targetAgentId:fe||null,navigate:t,returnTo:o}),e.jsx("section",{className:"sys-broker-actions","aria-label":"Dispatch actions",children:c?e.jsxs(e.Fragment,{children:[Be,ze]}):e.jsxs(e.Fragment,{children:[ze,Be]})}),e.jsxs("details",{className:"sys-broker-technical",children:[e.jsxs("summary",{children:[e.jsx("span",{children:"Technical details"}),e.jsx(Ps,{size:13,"aria-hidden":"true"})]}),e.jsx("div",{className:"sys-broker-inspector-rows",children:b.map(r=>e.jsxs("div",{className:"sys-broker-inspector-row",children:[e.jsx("span",{className:"sys-detail-label",children:r.label}),e.jsx("code",{className:"sys-detail-value",children:r.value}),e.jsx(ie,{value:r.value,subject:r.label.toLowerCase()})]},r.label))}),e.jsxs("div",{className:"sys-broker-metadata",children:[e.jsxs("div",{className:"sys-broker-metadata-head",children:[e.jsx("span",{className:"sys-detail-label",children:"Metadata"}),e.jsx(ie,{value:m,subject:"metadata",className:"sys-broker-metadata-copy"})]}),e.jsx(Cs,{metadata:s.metadata,rawJson:m})]})]})]}),e.jsxs("section",{className:"sys-broker-forward","aria-labelledby":"dispatch-forward-title",children:[e.jsx("div",{className:"sys-broker-forward-head",children:e.jsx("span",{id:"dispatch-forward-title",className:"sys-broker-action-label",children:"Follow up"})}),e.jsxs("div",{id:"dispatch-forward-content",children:[e.jsx("div",{className:"sys-broker-forward-intro",children:e.jsx("div",{className:"sys-broker-ask-prompts","aria-label":"Suggested requests",children:ls.map(r=>e.jsxs("button",{type:"button",onClick:()=>ns(r),children:[e.jsx(Bs,{size:11,"aria-hidden":"true"}),r]},r))})}),e.jsxs("form",{className:"sys-broker-message-composer",onSubmit:r=>{r.preventDefault(),Le()},children:[e.jsx("label",{htmlFor:"dispatch-message-input",children:"Request"}),e.jsx("textarea",{ref:ue,id:"dispatch-message-input",value:C,rows:3,placeholder:`What should ${te?.id===h?"Scout":te?.name??"this agent"} investigate or do?`,disabled:A==="sending",onChange:r=>{M(r.target.value),A!=="idle"&&(I("idle"),d(null))},onKeyDown:r=>{r.key==="Enter"&&(r.metaKey||r.ctrlKey)&&(r.preventDefault(),Le())}}),E.length>0&&e.jsx("div",{className:"sys-broker-composer-attachments","aria-label":"Attachments",children:E.map((r,l)=>e.jsxs("span",{children:[e.jsx(zs,{size:10,"aria-hidden":"true"}),e.jsx("span",{title:r.name,children:r.name}),e.jsx("button",{type:"button",onClick:()=>se(p=>p.filter((g,V)=>V!==l)),"aria-label":`Remove ${r.name}`,children:e.jsx(De,{size:10,"aria-hidden":"true"})})]},`${r.name}:${r.size}:${l}`))}),e.jsxs("footer",{children:[e.jsxs("div",{className:"sys-broker-composer-left",children:[e.jsx("input",{ref:he,type:"file",multiple:!0,hidden:!0,disabled:A==="sending",onChange:r=>{is([...r.target.files??[]]),r.target.value=""}}),e.jsx("button",{type:"button",className:"sys-broker-composer-attach",disabled:A==="sending",onClick:()=>he.current?.click(),"aria-label":"Attach files",title:"Attach files",children:e.jsx(qs,{size:16,"aria-hidden":"true"})}),e.jsx("span",{className:"sys-broker-message-attachment",title:f,children:"Dispatch context included"})]}),e.jsxs("div",{className:"sys-broker-composer-targets",children:[e.jsx("span",{className:"sys-broker-composer-route-label",children:"Send to"}),e.jsxs("label",{title:"Project target",children:[e.jsx("span",{children:"Project"}),e.jsxs("select",{"aria-label":"Project target",value:D,disabled:A==="sending",onChange:r=>{const l=r.target.value,p=w.find(g=>!l||(g.projectRoot?.trim()||g.cwd?.trim())===l)??null;pe.current=!0,ee(l),p&&($(p.id),O(p.harness?.trim()||""),J(p.model?.trim()||""))},children:[e.jsx("option",{value:"",children:"Any project"}),as.map(r=>e.jsx("option",{value:r.path,children:r.label},r.path))]})]}),e.jsxs("label",{title:"Agent target",children:[e.jsx("span",{children:"Agent"}),e.jsx("select",{"aria-label":"Agent target",value:ae,disabled:A==="sending"||be.length===0,onChange:r=>{const l=w.find(p=>p.id===r.target.value)??null;pe.current=!0,$(r.target.value),l&&(ee(l.projectRoot?.trim()||l.cwd?.trim()||""),O(l.harness?.trim()||""),J(l.model?.trim()||"")),I("idle"),d(null)},children:be.length===0?e.jsx("option",{value:"",children:"No agents"}):be.map(r=>e.jsx("option",{value:r.id,children:r.id===h?"Scout":r.name},r.id))})]}),e.jsx(gs,{catalog:Ae,value:{harness:x,model:P,effort:G},onChange:r=>{pe.current=!0,O(r.harness),J(r.model),de(r.effort)},disabled:A==="sending"}),e.jsx(hs,{className:"sys-broker-composer-mic",disabled:A==="sending",onAppend:r=>M(l=>l.trim()?`${l.trimEnd()} ${r}`:r),onError:r=>{I("failed"),d(r)}})]}),e.jsx("button",{type:"submit",className:"sys-broker-composer-send",disabled:!C.trim()||!te||A==="sending","aria-label":`Ask ${te?.name??"recipient"} about this dispatch`,children:A==="sending"?e.jsx(xe,{size:14,className:"sys-broker-action-spinner","aria-hidden":"true"}):e.jsx(Os,{size:14,"aria-hidden":"true"})})]})]}),i&&e.jsx("div",{className:`sys-broker-action-status sys-broker-action-status--${A}`,role:"status",children:i})]})]})]})}const jr=Fs({id:"dispatch",label:"Dispatch",route:{view:"broker"},webPath:"/dispatch",screen:"BrokerScreen",embed:{path:"/embed/dispatch",profile:"macos.dispatch",rootClassName:"s-broker-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},ownsInternalRoutes:!0,resolveEmbedProps:s=>{const t=s.get("attempt")?.trim();return t?{initialAttemptId:t}:{}},hosts:{macos:!0}}}),nt=Object.freeze(Object.defineProperty({__proto__:null,BrokerAttemptInspector:ts,BrokerScreen:mr,scoutSurface:jr},Symbol.toStringTag,{value:"Module"}));export{ts as B,mr as a,Ce as b,nt as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as j}from"./index-C1VaWNuD.js";import{i as $,h as O,q as w,a as H}from"./conversation-model-C2KuZUXc.js";import{l as B,i as W,a as E,p as T}from"./conversation-prefs-DNre-Lcx.js";import{u as G,m as J,j as K}from"./Provider-D0bB7q6y.js";import{u as Q,f as X}from"./use-fleet-active-asks-CCGrll5q.js";import{b as Y}from"./router-kfcaYqZr.js";import{l as D,i as C,s as Z}from"./sessionRead-CvFz2RHv.js";import{u as ee}from"./use-conversation-list-UG-tMN67.js";import{i as se}from"./colors-BtO5_zlx.js";import{A as te}from"./AgentAvatar-Dz79iTxB.js";/* empty css */function ae({children:n,count:t,tone:a="default",title:l,onClick:i}){const d=["collapsed-strip-label",a!=="default"&&`collapsed-strip-label--${a}`,t!=null&&"collapsed-strip-label--has-count",i&&"collapsed-strip-label--button"].filter(Boolean).join(" "),o=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"collapsed-strip-label-mark","aria-hidden":!0}),i?e.jsx("span",{className:"collapsed-strip-label-expand","aria-hidden":!0,children:"›"}):null,e.jsx("span",{className:"collapsed-strip-label-text",children:n}),t!=null?e.jsx("span",{className:"collapsed-strip-label-count",children:t}):null]});return i?e.jsx("button",{type:"button",className:d,title:l??n,"aria-label":l??n,onClick:i,children:o}):e.jsx("div",{className:d,title:l??n,children:o})}function ne({label:n,emptyMark:t="·",showLabel:a=!0,labelTone:l="default",labelCount:i,onLabelClick:d,children:o}){const v=!o||Array.isArray(o)&&o.length===0,p=a?e.jsx(ae,{tone:l,count:i,onClick:d,title:d?`Expand ${n}`:void 0,children:n}):null;return v?e.jsxs("div",{className:"collapsed-strip collapsed-strip--empty","aria-hidden":!0,children:[p,e.jsx("span",{className:"collapsed-strip-empty-mark",children:t})]}):e.jsxs("div",{className:"collapsed-strip",role:"list","aria-label":n,children:[p,o]})}function Ae(){return e.jsx("div",{className:"collapsed-strip-rule","aria-hidden":!0})}function le({title:n,active:t,tone:a="default",ava:l,avaColor:i,glyph:d,avatarNode:o,dot:v,pinned:p,onClick:b}){const m=["collapsed-chip",a==="channel"&&"collapsed-chip--channel",a==="neutral"&&"collapsed-chip--neutral",a==="attention"&&"collapsed-chip--attention",a==="unread"&&"collapsed-chip--unread",t&&"collapsed-chip--active",p&&"collapsed-chip--pinned"].filter(Boolean).join(" ");return e.jsxs("button",{type:"button",role:"listitem",className:m,title:n,"aria-label":n,"aria-current":t?"page":void 0,onClick:b,children:[o?e.jsx("span",{className:"collapsed-chip-avatar-wrap",children:o}):l?e.jsx("span",{className:"collapsed-chip-ava",style:i?{"--ava-color":i}:void 0,children:l}):e.jsx("span",{className:`collapsed-chip-glyph${typeof d=="string"&&d.length>1?" collapsed-chip-glyph--long":""}`,children:d}),v?e.jsx("span",{className:["collapsed-chip-dot",v==="attention"&&"collapsed-chip-dot--attention",v==="live"&&"collapsed-chip-dot--live"].filter(Boolean).join(" "),"aria-hidden":!0}):null,p?e.jsx("span",{className:"collapsed-chip-pin","aria-hidden":!0}):null]})}function Ie(n){const t=n.trim(),a=t.split(/[\s/_-]+/).filter(Boolean);if(a.length>=2){const l=a[a.length-1];return/^\d+$/.test(l)&&a.length>=3?(a[a.length-2][0]??"?").toUpperCase():(l[0]??"?").toUpperCase()}return(t[0]??"?").toUpperCase()}const ie=3,oe=3,re=4,ce=3;function S(n,t){return[...n].sort((a,l)=>{const i=C(a.lastMessageAt,a.id,t)?0:1,d=C(l.lastMessageAt,l.id,t)?0:1;return i!==d?i-d:(l.lastMessageAt??0)-(a.lastMessageAt??0)})}function de({onExpand:n}){const{route:t,navigate:a,agents:l}=G(),{sessions:i}=ee(),d=Q(),[o,v]=j.useState(()=>B()),[p,b]=j.useState(()=>D()),m=Y(t),y=j.useMemo(()=>J(l,m),[l,m]),P=j.useMemo(()=>{const s=new Map;for(const f of l)s.set(f.id,f);return s},[l]),R=t.view==="messages"||t.view==="conversation"?t.conversationId:void 0;j.useEffect(()=>{v(B()),b(D())},[]);const r=j.useMemo(()=>{const s=K(i,y,m).filter(c=>!W(c.id,o)),f=s.filter(c=>E(c.id,o)).sort((c,x)=>T(x.id,o)-T(c.id,o)||(x.lastMessageAt??0)-(c.lastMessageAt??0)).slice(0,ie),g=new Set(f.map(c=>c.id)),h=s.filter(c=>!g.has(c.id));return{pinned:f,channels:S(h.filter(w),p).slice(0,oe),dms:S(h.filter(O),p).slice(0,re),observed:S(h.filter($),p).slice(0,ce),totals:{channels:h.filter(w).length,dms:h.filter(O).length,observed:h.filter($).length,pinned:s.filter(c=>E(c.id,o)).length}}},[i,y,m,o,p]),U=s=>{b(Z(s.id)),a({view:"messages",conversationId:s.id,...m?{machineId:m}:{}})},k=[...r.pinned,...r.channels,...r.dms,...r.observed],A=k.filter(s=>C(s.lastMessageAt,s.id,p)).length,M=(s,f=!1)=>{const g=H(s),h=w(s),c=C(s.lastMessageAt,s.id,p),x=h?void 0:he(s,g),V=x??g,I=s.agentId?P.get(s.agentId):void 0,L=X(d,s),_=L?.status==="needs_attention",z=L?.status==="working",F=I?se(I.state):!1,q=_?"attention":c?"unread":z||F?"live":null;return e.jsx(le,{title:f?`${g} · pinned`:x?`${g} · ${x}`:g,active:s.id===R,tone:h?"channel":_?"attention":c?"unread":"default",avatarNode:h?void 0:e.jsx(te,{agent:I,name:V,size:28,tile:!0,presence:!1}),glyph:h?pe(g):void 0,dot:q,pinned:f,onClick:()=>U(s)},s.id)},u=[];return r.pinned.length&&u.push(e.jsx(N,{mark:"Pin",count:r.totals.pinned,showMark:u.length>0,children:r.pinned.map(s=>M(s,!0))},"pin")),r.channels.length&&u.push(e.jsx(N,{mark:"#",count:r.totals.channels,showMark:u.length>0,children:r.channels.map(s=>M(s))},"ch")),r.dms.length&&u.push(e.jsx(N,{mark:"DM",count:r.totals.dms,showMark:u.length>0,children:r.dms.map(s=>M(s))},"dm")),r.observed.length&&u.push(e.jsx(N,{mark:"Obs",count:r.totals.observed,showMark:u.length>0,children:r.observed.map(s=>M(s))},"obs")),e.jsx(ne,{label:"Chat",emptyMark:"#",labelTone:A>0?"accent":"default",labelCount:A>0?A:k.length||void 0,onLabelClick:n,children:u})}function pe(n){const a=n.replace(/^#+/,"").match(/[a-z0-9]/i)?.[0]?.toLowerCase()??"?";return e.jsxs("span",{className:"collapsed-chip-channel-badge",children:[e.jsx("span",{className:"collapsed-chip-channel-hash","aria-hidden":!0,children:"#"}),e.jsx("span",{className:"collapsed-chip-channel-text",children:a})]})}function he(n,t){const a=t.toLowerCase();for(const l of n.participants??[]){const i=l.displayName||l.label;if(i&&i.toLowerCase()!==a)return i}}function N({mark:n,count:t,showMark:a=!0,children:l}){return e.jsxs("div",{className:"collapsed-strip-section",role:"group","aria-label":n,children:[a?e.jsxs("div",{className:"collapsed-strip-section-mark",title:t!=null?`${n} · ${t}`:n,children:[e.jsx("span",{className:"collapsed-strip-section-mark-text",children:n}),t!=null&&t>0?e.jsx("span",{className:"collapsed-strip-section-mark-count",children:t>99?"99+":t}):null]}):null,l]})}const we=Object.freeze(Object.defineProperty({__proto__:null,ChatCollapsedStrip:de},Symbol.toStringTag,{value:"Module"}));export{ne as C,de as a,le as b,Ie as c,Ae as d,we as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,j as r}from"./index-C1VaWNuD.js";import{a as V}from"./api-Co9aQ2Jw.js";import{c as je}from"./clipboard-e3fSpeo7.js";import{f as ze}from"./scoutbot-D7kGGyK_.js";import{g as Ae,f as Ce}from"./api-HFH8wFyb.js";import{d as Ke}from"./types-B0PlfpKc.js";import{u as Oe}from"./useEmbedHeadline-DuUnwTB7.js";import{r as He,C as qe}from"./CodeDiffPane-DfluIWmO.js";import{r as Ge,a as Ve,w as Xe,b as Je,f as xe,C as Qe,s as Ye}from"./CodeProjectPicker-By_Wz9ex.js";import{ShikiPane as Ze}from"./ShikiPane-C0TuCATU.js";/* empty css */import{A as et}from"./arrow-left-eToA6GxC.js";import{C as tt}from"./chevron-right-CowuvuE6.js";import{C as nt}from"./check-Dz2SRHft.js";import{C as st}from"./copy-BzdzWsQd.js";import"./perf-PX8Rx0EP.js";import"./cache-CeWH_KzJ.js";import"./usePierreRuntime-35AHf9RQ.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";/* empty css */import"./chevron-down-D120PY4g.js";import"./createLucideIcon-Dv8H8m7J.js";import"./search-FB2vVxCp.js";const rt=new Set(["node_modules",".git","dist",".next",".build","DerivedData","__pycache__",".venv","target"]);function we(i){const l=i.lastIndexOf("/");return l>0?i.slice(0,l):"/"}function ce(i){const l=i.lastIndexOf("/");return l>=0?i.slice(l+1):i}function X(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function S(i){return i.toLowerCase().replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function it(i,l,k){const g=S(l),f=i.projects.find(u=>S(u.name)===g||S(ce(u.root))===g);if(!f)return null;const x=k?f.worktrees.find(u=>u.name===k||u.branch.name===k||S(u.name)===S(k)):f.worktrees[0];return{projectName:f.name,root:x?.path??f.root}}function ye(i,l){if(!l.startsWith(`${i}/`))return[];const k=l.slice(i.length+1).split("/"),g=[];let f=i;for(const x of k.slice(0,-1))f=`${f}/${x}`,g.push(f);return g}function ot(i){switch(i){case"untracked":return"U";case"conflicted":return"C";case"staged":return"S";case"unstaged":return"M";case"staged+unstaged":return"SM";default:return i.charAt(0).toUpperCase()}}function be(i,l,k,g,f){const x=k.get(i);if(!x){f.push({path:`${i}#loading`,name:"Loading…",kind:"file",depth:l,loading:!0});return}for(const u of x)u.kind==="directory"&&rt.has(u.name)||(f.push({path:u.path,name:u.name,kind:u.kind,depth:l}),u.kind==="directory"&&g.has(u.path)&&be(u.path,l+1,k,g,f))}function $t({route:i,navigate:l,root:k,file:g,project:f,path:x,wt:u,line:Le,endLine:Ne,returnConversationId:Re,embedded:I=!1}){Oe("Code",I);const B=k??i?.root??null,P=g??i?.file??null,p=f??i?.project??null,b=x??i?.path??null,U=u??i?.wt??null,j=Le??i?.line,w=Ne??i?.endLine,C=Re??i?.returnConversationId??null,[h,le]=s.useState(()=>Ae()),[o,J]=s.useState(()=>B??(p?null:Ge())),[y,Q]=s.useState(()=>new Map),[L,W]=s.useState(()=>new Set),[de,ue]=s.useState(null),[a,_]=s.useState(P),[c,z]=s.useState(null),[Ee,Y]=s.useState(!1),[fe,A]=s.useState(null),[pe,Z]=s.useState("idle"),[M,ee]=s.useState("source"),[m,te]=s.useState(()=>j&&j>0?{line:j,...w&&w>=j?{endLine:w}:{}}:null),[N,K]=s.useState(()=>p?{phase:"resolving"}:{phase:"idle"}),ne=p?`${p}\0${b??""}\0${U??""}`:null,R=s.useRef(null),se=s.useRef(null),T=s.useRef(ne);T.current!==ne&&(T.current=ne,R.current=null,se.current=null),s.useEffect(()=>{te(j&&j>0?{line:j,...w&&w>=j?{endLine:w}:{}}:null)},[w,j]),s.useEffect(()=>{if(h)return;let e=!1;return Ce("quick",!1,2e4).then(t=>{e||le(t)}).catch(()=>{}),()=>{e=!0}},[h]);const E=s.useCallback(async e=>{try{const t=await V(`/api/file/preview?path=${encodeURIComponent(e)}`);if(t.kind!=="directory")return;const n=t.entries.map(d=>({name:d.name,path:d.path,kind:d.kind}));Q(d=>new Map(d).set(e,n))}catch(t){ue(t instanceof Error?t.message:String(t))}},[]),$=s.useCallback((e,t)=>{if(!t)return;const n=ye(e,t);if(n.length!==0){W(d=>new Set([...d,...n]));for(const d of n)E(d)}},[E]);s.useEffect(()=>{if(!p)return;const e=`${p}\0${b??""}\0${U??""}`;if(R.current===e)return;const t=n=>{R.current=e;const d=b?`${n}/${b}`:null;K({phase:"idle"}),J(n),_(d),$(n,d)};if(h){const n=it(h,p,U);if(n){t(n.root);return}}se.current!==e&&(K({phase:"resolving"}),V(`/api/code/resolve-project?slug=${encodeURIComponent(p)}`).then(n=>{R.current===e||T.current!==e||t(n.root)}).catch(n=>{if(R.current===e||T.current!==e)return;se.current=e;const d=n instanceof Error?n.message:String(n);K({phase:"failed",message:d.includes(p)?d:`Can't resolve project "${p}": ${d}`})}))},[p,b,U,h,$]),s.useEffect(()=>{if(o||p||!h)return;const e=h.projects[0];e&&J(e.worktrees[0]?.path??e.root)},[o,p,h]);const he=s.useRef(a);he.current=a,s.useEffect(()=>{if(!o)return;ue(null);const e=Ve(o),t=he.current,n=t?ye(o,t):[];e?(Q(new Map(Object.entries(e.entries))),W(new Set([...e.expanded,...n])),!t&&e.selectedFile&&_(e.selectedFile)):(Q(new Map),W(new Set(n)));const d=new Set([o,...e?.expanded??[],...n]);for(const ae of d)E(ae);Ce("quick",!1,2e4).then(le).catch(()=>{})},[o,E]),s.useEffect(()=>{!o||y.size===0||(Xe(o,{entries:y,expanded:L,selectedFile:a}),Je(o))},[o,y,L,a]),s.useEffect(()=>{!B||!P||$(B,P)},[B,P,$]);const re=s.useRef(new Map),ie=s.useRef(new Set),$e=3e4,O=s.useCallback(e=>{const t=re.current.get(e);return t?Date.now()-t.at>$e?(re.current.delete(e),null):t.preview:null},[]),H=s.useCallback((e,t)=>{const n=re.current;if(n.set(e,{at:Date.now(),preview:t}),n.size>80){const d=n.keys().next().value;d&&n.delete(d)}},[]),Fe=s.useCallback(e=>{O(e)||ie.current.has(e)||(ie.current.add(e),V(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>H(e,t)).catch(()=>{}).finally(()=>ie.current.delete(e)))},[O,H]);s.useEffect(()=>{if(Z("idle"),!a){z(null),A(null);return}const e=O(a);if(e){z(e.kind==="file"?e:null),A(null),Y(!1);return}let t=!1;return Y(!0),A(null),V(`/api/file/preview?path=${encodeURIComponent(a)}`).then(n=>{t||(H(a,n),z(n.kind==="file"?n:null))}).catch(n=>{t||(z(null),A(n instanceof Error?n.message:String(n)))}).finally(()=>{t||Y(!1)}),()=>{t=!0}},[a,O,H]);const Me=s.useMemo(()=>{if(!o)return[];const e=[];return be(o,0,y,L,e),e},[o,y,L]),me=s.useCallback((e,t)=>{const n=C?{returnConversationId:C}:{};if(h){for(const d of h.projects)for(const[ae,ge]of d.worktrees.entries())if(ge.path===e){const ve=t&&t.startsWith(`${e}/`)?t.slice(e.length+1):void 0;return{view:"code",project:S(d.name),...ve?{path:ve}:{},...ae>0?{wt:ge.name}:{},...n}}}return{view:"code",root:e,...t?{file:t}:{},...n}},[C,h]),oe=s.useCallback(()=>{if(!C)return;const e={view:"conversation",conversationId:C};ze({type:"navigate",route:e})||l?.(e)},[l,C]);s.useEffect(()=>{if(!C)return;const e=t=>{if(!t.defaultPrevented&&!(!t.metaKey||t.key!=="[")){if(t.target instanceof HTMLElement){const n=t.target.tagName;if(n==="INPUT"||n==="TEXTAREA"||t.target.isContentEditable)return}t.preventDefault(),oe()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[C,oe]);const q=s.useCallback((e,t)=>{I||!l||l(me(e,t))},[I,l,me]),Te=s.useCallback(e=>{W(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),y.has(e)||E(e)},[y,E]),De=s.useCallback(e=>{te(null),_(e),o&&q(o,e)},[o,q]),v=s.useMemo(()=>{if(!h||!o)return null;for(const e of h.projects)for(const t of e.worktrees)if(t.path===o)return{project:e,worktree:t};return null},[h,o]),F=s.useMemo(()=>{const e=new Map;if(!o||!v)return e;for(const t of v.worktree.status.files)e.set(`${o}/${t.path}`,t.status);return e},[o,v]),Ie=s.useMemo(()=>{const e=new Set;if(!o)return e;for(const t of F.keys()){let n=we(t);for(;n.startsWith(o)&&(e.add(n),n!==o);)n=we(n)}return e},[o,F]),G=!!(o&&a&&He(o,a));s.useEffect(()=>{G||ee("source")},[G]);const Be=a&&o&&a.startsWith(`${o}/`)?a.slice(o.length+1):c?.kind==="file"?c.title:a?ce(a):null,Pe=s.useCallback(async()=>{if(!c||c.kind!=="file"||!c.previewable)return;await je(c.content)&&(Z("copied"),window.setTimeout(()=>Z("idle"),1500))},[c]),[Ue,ke]=s.useState("idle"),D=s.useMemo(()=>{if(!o)return null;if(v){const e=a&&a.startsWith(`${o}/`)?a.slice(o.length+1):void 0,t=v.project.worktrees[0]?.path;return xe({project:S(v.project.name),...e?{path:e}:{},...t&&t!==o?{wt:v.worktree.name}:{},...m?.line?{line:m.line}:{},...m?.endLine?{endLine:m.endLine}:{}})}return xe({...a?{file:a}:{root:o},...m?.line?{line:m.line}:{},...m?.endLine?{endLine:m.endLine}:{}})},[o,a,v,m]),We=s.useCallback(async()=>{if(!D)return;await je(D)&&(ke("copied"),window.setTimeout(()=>ke("idle"),1500))},[D]),_e=s.useCallback(e=>{R.current=T.current,K({phase:"idle"}),te(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),_(e.file??null),J(e.root),e.file&&$(e.root,e.file),q(e.root,e.file??null)},[$,q]);return r.jsxs("div",{className:"s-code-screen","data-embedded":I||void 0,children:[r.jsxs("div",{className:"s-code-head",children:[C?r.jsxs("button",{type:"button",className:"s-code-returnThread",onClick:oe,title:"Back to thread (⌘[)",children:[r.jsx(et,{size:13,strokeWidth:1.9,"aria-hidden":!0}),r.jsx("span",{children:"Back to thread"})]}):null,r.jsx(Qe,{snapshot:h,root:o,onSelect:_e}),v?.worktree.diff.branchShortstat?r.jsx("span",{className:"s-code-headStat",children:v.worktree.diff.branchShortstat}):null,o?r.jsx("span",{className:"s-code-headPath",title:o,children:Ye(o)}):null,D?r.jsx("button",{type:"button",className:"s-code-copyLink",title:D,onClick:()=>{We()},children:Ue==="copied"?"Copied scout://":"Copy scout://"}):null]}),r.jsxs("div",{className:"s-code-body",children:[r.jsx("div",{className:"s-code-tree",role:"tree","aria-label":"Files",children:de?r.jsx("div",{className:"s-code-treeNote",children:de}):o?Me.map(e=>e.loading?r.jsx("div",{className:"s-code-node s-code-node--loading",style:{paddingLeft:10+e.depth*14},children:e.name},e.path):r.jsxs("button",{type:"button",role:"treeitem",className:"s-code-node","data-selected":e.path===a||void 0,"data-diff":e.kind==="file"?F.get(e.path):void 0,"aria-expanded":e.kind==="directory"?L.has(e.path):void 0,style:{paddingLeft:10+e.depth*14},onClick:()=>e.kind==="directory"?Te(e.path):De(e.path),onMouseEnter:e.kind==="file"?()=>Fe(e.path):void 0,children:[e.kind==="directory"?r.jsx(tt,{size:11,strokeWidth:2,className:"s-code-nodeChevron","data-open":L.has(e.path)||void 0,"aria-hidden":!0}):r.jsx("span",{className:"s-code-nodeSpacer","aria-hidden":!0}),r.jsx("span",{className:"s-code-nodeName",children:e.name}),e.kind==="file"&&F.has(e.path)?r.jsx("span",{className:"s-code-nodeBadge","data-diff":F.get(e.path),children:ot(F.get(e.path)??"")}):null,e.kind==="directory"&&Ie.has(e.path)?r.jsx("span",{className:"s-code-nodeDot","aria-label":"Contains changes"}):null]},e.path)):N.phase==="resolving"?r.jsxs("div",{className:"s-code-treeNote",children:["Resolving “",p,"”…"]}):N.phase==="failed"?r.jsx("div",{className:"s-code-treeNote",children:N.message}):r.jsx("div",{className:"s-code-treeNote",children:"No repo selected."})}),r.jsxs("div",{className:"s-code-main",children:[a?r.jsxs("div",{className:"s-code-fileHead",children:[r.jsx("span",{className:"s-code-filePath",children:Be}),G?r.jsxs("div",{className:"s-code-fileMode",role:"tablist","aria-label":"File view",children:[r.jsx("button",{type:"button",role:"tab","aria-selected":M==="source","data-selected":M==="source"||void 0,onClick:()=>ee("source"),children:"Source"}),r.jsx("button",{type:"button",role:"tab","aria-selected":M==="changes","data-selected":M==="changes"||void 0,onClick:()=>ee("changes"),children:"Changes"})]}):null,c?.kind==="file"?r.jsxs("span",{className:"s-code-fileMeta",children:[X(c.sizeBytes),c.previewable&&c.truncated?" · truncated":"",m?` · L${m.line}${m.endLine?`–${m.endLine}`:""}`:""]}):null,c?.kind==="file"&&c.previewable?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",className:"s-code-fileAction",onClick:()=>{Pe()},title:"Copy file contents",children:[pe==="copied"?r.jsx(nt,{size:12,"aria-hidden":!0}):r.jsx(st,{size:12,"aria-hidden":!0}),pe==="copied"?"Copied":"Copy"]}),r.jsx("a",{className:"s-code-fileAction",href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"Raw"})]}):null]}):null,M==="changes"&&G&&o&&a?r.jsx(qe,{root:o,file:a},`${o}\0${a}`):Ee?r.jsxs("div",{className:"s-code-empty",children:["Loading ",a?ce(a):"file","…"]}):fe?r.jsx("div",{className:"s-code-empty",children:fe}):c&&c.kind==="file"&&c.previewable?r.jsxs(r.Fragment,{children:[c.truncated?r.jsxs("div",{className:"s-code-fileNote",children:["Showing the first ",X(256*1024)," of ",X(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,r.jsx(Ze,{code:c.content,path:c.path,focusLine:m?.line,endLine:m?.endLine})]}):c&&c.kind==="file"?r.jsxs("div",{className:"s-code-empty",children:[c.previewReason," · ",X(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):N.phase==="resolving"?r.jsxs("div",{className:"s-code-empty",children:["Opening ",b??`“${p}”`,"…"]}):N.phase==="failed"?r.jsx("div",{className:"s-code-empty",children:N.message}):r.jsx("div",{className:"s-code-empty",children:"Pick a file to read."})]})]})]})}const Ft=Ke({id:"code",label:"Code Browser",route:{view:"code"},webPath:"/code",screen:"CodeContent",embed:{path:"/embed/code",profile:"macos.code",rootClassName:"s-code-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:i=>({root:i.get("root")?.trim()||void 0,file:i.get("file")?.trim()||void 0,project:i.get("project")?.trim()||void 0,path:i.get("path")?.trim()||void 0,wt:i.get("wt")?.trim()||void 0,line:Se(i.get("line")),endLine:Se(i.get("endLine")),returnConversationId:i.get("fromConversation")?.trim()||void 0})}});function Se(i){if(!i)return;const l=Number.parseInt(i,10);return Number.isSafeInteger(l)&&l>0?l:void 0}export{$t as CodeContent,Ft as scoutSurface};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./index-C1VaWNuD.js";import{M as p}from"./message-markup-DC0QFEZn.js";import{f as d}from"./conversation-model-C2KuZUXc.js";import{t as n}from"./time-Dhsh_2EG.js";import"./mentions-BZ5SBMtc.js";import"./colors-BtO5_zlx.js";import"./index-Cx6Gbr6n.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./openContent-C6XO6kr5.js";import"./eye-C9cGk5z6.js";import"./terminal-UDy4lzV1.js";function l({at:a}){const i=d(a);return t.jsxs("div",{className:"s-thread-day-divider","aria-label":i,children:[t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"}),t.jsx("span",{className:"s-thread-day-label",children:i}),t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"})]})}function rt({row:a,expanded:i,showDayDivider:e,onToggle:s}){const m=`${a.recipients.length} recipients`;return t.jsxs("div",{className:["s-thread-feed-block","s-thread-fanout",e&&"s-thread-feed-block--full-width"].filter(Boolean).join(" "),children:[e&&t.jsx(l,{at:a.createdAt}),a.messages.map(r=>t.jsx("span",{id:`msg-${r.id}`,className:"s-thread-fanout-anchor","aria-hidden":"true"},r.id)),t.jsxs("button",{type:"button",className:"s-thread-fanout-summary","aria-expanded":i,onClick:s,title:a.recipients.join(", "),children:[t.jsx("span",{className:"s-thread-fanout-caret","aria-hidden":"true",children:i?"▾":"▸"}),t.jsx("span",{className:"s-thread-fanout-label",children:m}),t.jsx("span",{className:"s-thread-fanout-time",children:n(a.createdAt)})]}),i&&t.jsxs("div",{className:"s-thread-fanout-detail",children:[t.jsx("ul",{className:"s-thread-fanout-recipients",children:a.messages.map((r,o)=>t.jsx("li",{className:"s-thread-fanout-recipient",children:a.recipients[o]},r.id))}),t.jsx("div",{className:"s-thread-fanout-body",children:t.jsx(p,{text:a.messages[0].body})})]})]})}export{rt as FanOutRow,l as ThreadDayDivider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as k,j as e,H as G}from"./index-C1VaWNuD.js";import{c as A}from"./clipboard-e3fSpeo7.js";import{b as K}from"./router-kfcaYqZr.js";import{A as M}from"./AgentAvatar-Dz79iTxB.js";import{H as J}from"./HarnessMark-DttReffF.js";import{b as Q}from"./Provider-D0bB7q6y.js";import{n as Z,c as ee}from"./colors-BtO5_zlx.js";import{B as te}from"./BackToPicker-BHicJyfc.js";import{o as P}from"./openContent-C6XO6kr5.js";import{AstronautSuit as se}from"./AstronautSuit-CwB4Dw07.js";import{w as ne,x as ae}from"./conversation-model-C2KuZUXc.js";import{E as re}from"./eye-C9cGk5z6.js";import{c as oe}from"./createLucideIcon-Dv8H8m7J.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./api-Co9aQ2Jw.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./CrewAvatar-CZ_faQ_s.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";const ie=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],le=oe("user-plus",ie),X=150,_=320,ce=1.4,de=1.1,V=5,me=22,W=5200,he=1,pe=1200;function ue(n){k.useEffect(()=>{const s=n.current;if(!s||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let i=[],r=[],x=-9999,m=-9999,u=0;const c=()=>{i=[],r=[],s.querySelectorAll(".sprite-cell--eye circle").forEach(o=>{const a=o.getBoundingClientRect();if(!a.width)return;const h=o.closest("[data-state]");i.push({el:o,cx:a.left+a.width/2,cy:a.top+a.height/2,working:h?.dataset.state==="in_flight"})}),s.querySelectorAll(".s-thread-participant-avatar svg").forEach(o=>{const a=o.getBoundingClientRect();a.width&&r.push({el:o,cx:a.left+a.width/2,cy:a.top+a.height/2})})},y=o=>o<X?1:o>_?0:(_-o)/(_-X),f=o=>{for(const a of i){const h=x-a.cx,N=m-a.cy,b=Math.hypot(h,N),p=y(b),v=b<1?1:b;let j=h/v*ce*p;const w=N/v*de*p;if(a.working&&p<1){const S=o%W/W;j+=Math.sin(S*Math.PI*2)*he*(1-p)}a.el.style.transform=`translate(${j.toFixed(2)}px, ${w.toFixed(2)}px)`}for(const a of r){const h=x-a.cx,N=Math.hypot(h,m-a.cy),b=y(N),p=Math.max(-V,Math.min(V,h/me))*b;a.el.style.transform=p===0?"":`rotate(${p.toFixed(2)}deg)`}u=requestAnimationFrame(f)},d=o=>{x=o.clientX,m=o.clientY};c();const L=window.setInterval(c,pe);return u=requestAnimationFrame(f),window.addEventListener("resize",c),document.addEventListener("pointermove",d,{passive:!0}),()=>{cancelAnimationFrame(u),window.clearInterval(L),window.removeEventListener("resize",c),document.removeEventListener("pointermove",d);for(const o of i)o.el.style.transform="";for(const o of r)o.el.style.transform=""}},[n])}function E(n,s,i){const r=i?G[i.trim().toLowerCase()]:void 0;return{"--fp-z":String(n-s),"--fp-i":String(s),...r==null?{}:{"--fp-suit-hue":String(r)}}}function xe(n){if(n<1e3)return String(n);const s=n/1e3;return s<10?`${s.toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(s)}k`}function O({name:n,runtime:s,state:i,action:r}){return e.jsxs("span",{className:"s-thread-participant-card","aria-hidden":"true",children:[e.jsx("strong",{children:n}),s?e.jsx("span",{children:s}):null,e.jsx("span",{children:i}),r?e.jsx("span",{className:"s-thread-participant-card-action",children:r}):null]})}function R({count:n,className:s,style:i,rosterId:r,expanded:x,onClick:m}){const u=`${n} more participant${n===1?"":"s"}`;return e.jsx("button",{type:"button",className:`s-thread-participant s-thread-participant--button ${s}`,style:i,"aria-label":`${u}; open participant list`,"aria-haspopup":"dialog","aria-controls":r,"aria-expanded":x,onClick:m,children:e.jsxs("span",{className:"s-thread-participant-face s-thread-participant-face--overflow",children:["+",xe(n)]})})}function it({showBackNav:n,isDm:s,navigate:i,route:r,canonicalConversationId:x,threadTitle:m,agentId:u,sessionId:c,detailRoute:y,participants:f,operator:d,canAddParticipants:L,onToggleAddParticipant:o}){const a=Q(),h=K(r),N=k.useRef(null),b=k.useRef(null),p=k.useId(),[v,j]=k.useState(!1);ue(N);const w=f.slice(0,4),S=Math.max(f.length-w.length,0),z=Math.max(f.length-2,0),B=Math.max(f.length-1,0),C=w.length+(S>0?1:0)+(d.active?1:0);k.useEffect(()=>{if(!v)return;const t=g=>{b.current?.contains(g.target)||j(!1)},l=g=>{g.key==="Escape"&&j(!1)};return document.addEventListener("mousedown",t),document.addEventListener("keydown",l),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",l)}},[v]);const $=t=>t.agent?{view:"agents-v2",agentId:t.agent.id,...h?{machineId:h}:{}}:t.sessionId?{view:"sessions",sessionId:t.sessionId,...h?{machineId:h}:{}}:null,H=t=>{const l=$(t);l&&(j(!1),P(i,l,{returnTo:r}))};return e.jsxs("div",{className:"s-thread-center-header",onClick:t=>{t.target?.closest("button,a,input,select,textarea")||!s||!y||P(i,y,{returnTo:r})},style:s&&y?{cursor:"pointer"}:void 0,onContextMenu:t=>{const l=[{kind:"action",label:"Copy Title",onSelect:()=>{A(m)}}];u&&l.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{A(u)}}),!u&&c&&l.push({kind:"action",label:"Copy Session ID",onSelect:()=>{A(c)}}),l.push({kind:"action",label:"Copy Conversation ID",onSelect:()=>{A(x)}}),a(t,l)},children:[n&&e.jsx(te,{slot:"conversation",fallback:{view:"inbox"},navigate:i,label:"Back",className:"s-thread-header-back"}),e.jsx("div",{className:"s-thread-center-header-info",children:s&&y?e.jsx("button",{type:"button",className:"s-thread-center-header-name",title:`Open ${m} details`,onClick:()=>P(i,y,{returnTo:r}),children:m}):e.jsx("span",{className:"s-thread-center-header-name",children:m})}),e.jsxs("div",{className:"s-thread-center-header-right",children:[f.length>0&&e.jsxs("div",{className:"s-thread-participants",ref:t=>{N.current=t,b.current=t},"aria-label":"Conversation participants",children:[w.map((t,l)=>{const g=[t.harness,t.model,t.reasoningEffort].filter(Boolean).join(" · ")||null,I=t.agent?Z(t.agent.state??null,t.agent):null,U=t.agent?ee(t.agent.state??null,t.agent):"Session participant",q=$(t),T=q?t.agent?"Open profile":"Open session":null,Y=[t.name,g,U,T].filter(Boolean).join(", "),D=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"s-thread-participant-face",children:[e.jsx(se,{}),e.jsx(M,{agent:t.agent??void 0,name:t.name,placement:"turn",size:28,className:"s-thread-participant-avatar"})]}),t.harness?e.jsx(J,{harness:t.harness,size:9,className:"s-thread-participant-harness",title:null}):null,e.jsx(O,{name:t.name,runtime:g,state:U,action:T})]}),F={className:"s-thread-participant",style:E(C,l,t.harness),"data-state":I??void 0,"data-compact-hidden":l>=2?"true":void 0,"data-narrow-hidden":l>=1?"true":void 0,"aria-label":Y};return q?e.jsx("button",{type:"button",...F,className:`${F.className} s-thread-participant--button`,onClick:()=>H(t),children:D},t.id):e.jsx("span",{...F,role:"group",tabIndex:0,children:D},t.id)}),S>0?e.jsx(R,{count:S,className:"s-thread-participant--desktop-overflow",style:E(C,w.length),rosterId:p,expanded:v,onClick:()=>j(t=>!t)}):null,z>0?e.jsx(R,{count:z,className:"s-thread-participant--compact-overflow",style:E(C,2),rosterId:p,expanded:v,onClick:()=>j(t=>!t)}):null,B>0?e.jsx(R,{count:B,className:"s-thread-participant--narrow-overflow",style:E(C,1),rosterId:p,expanded:v,onClick:()=>j(t=>!t)}):null,d.active?e.jsxs("span",{className:"s-thread-participant s-thread-participant--operator",style:E(C,C-1),role:"group",tabIndex:0,"aria-label":`${d.name}, you, in this conversation`,children:[e.jsx("span",{className:"s-thread-participant-face",children:e.jsx(M,{name:d.name,placement:"turn",size:28,className:"s-thread-participant-avatar"})}),e.jsx(O,{name:`${d.name} (you)`,runtime:null,state:"In this conversation",action:null})]}):e.jsxs("span",{className:"s-thread-participant-observer",role:"group",tabIndex:0,"aria-label":`${d.name}, observing, not in this conversation`,children:[e.jsx(re,{size:15,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx(O,{name:d.name,runtime:null,state:"Observing, not in this conversation",action:null})]}),v?e.jsxs("div",{id:p,className:"s-thread-participant-roster",role:"dialog","aria-label":"Conversation participants",onClick:t=>t.stopPropagation(),children:[e.jsx("strong",{className:"s-thread-participant-roster-title",children:"Participants"}),e.jsxs("div",{className:"s-thread-participant-roster-list",children:[f.map(t=>{const l=$(t),g=[t.harness,t.model].filter(Boolean).join(" · "),I=e.jsxs(e.Fragment,{children:[e.jsx(M,{agent:t.agent??void 0,name:t.name,placement:"turn",size:24,className:"s-thread-participant-roster-avatar"}),e.jsxs("span",{children:[e.jsx("strong",{children:t.name}),g?e.jsx("small",{children:g}):null]})]});return l?e.jsx("button",{type:"button",className:"s-thread-participant-roster-row",onClick:()=>H(t),children:I},t.id):e.jsx("div",{className:"s-thread-participant-roster-row",children:I},t.id)}),d.active?e.jsxs("div",{className:"s-thread-participant-roster-row",children:[e.jsx(M,{name:d.name,placement:"turn",size:24,className:"s-thread-participant-roster-avatar"}),e.jsxs("span",{children:[e.jsxs("strong",{children:[d.name," (you)"]}),e.jsx("small",{children:"Operator"})]})]}):null]})]}):null]}),L&&e.jsx("button",{type:"button",className:"s-thread-add-participant-trigger",onClick:o,title:"Add participant","aria-label":"Add participant",children:e.jsx(le,{size:14,strokeWidth:1.9,"aria-hidden":"true"})})]})]})}function lt({canonicalConversationId:n,conversationAlias:s}){return e.jsxs("div",{className:"s-thread-identity-row",children:[e.jsxs("button",{type:"button",className:"s-thread-identity-chip",title:n,onClick:()=>{A(n)},children:[e.jsx("span",{children:ne()}),e.jsx("strong",{children:ae(n)})]}),s&&e.jsxs("span",{className:"s-thread-identity-chip",title:s,children:[e.jsx("span",{children:"Alias"}),e.jsx("strong",{children:s})]})]})}function ct({agents:n,addParticipantId:s,setAddParticipantId:i,addingParticipant:r,addParticipantError:x,onCancel:m,onSubmit:u}){return e.jsxs("form",{className:"s-thread-add-participant",onSubmit:c=>{c.preventDefault(),u()},children:[e.jsxs("div",{className:"s-thread-add-participant-row",children:[e.jsxs("div",{className:"s-thread-add-participant-field",children:[e.jsx("label",{className:"s-thread-add-participant-label",htmlFor:"thread-add-participant-select",children:"Agent"}),e.jsx("select",{id:"thread-add-participant-select",className:"s-thread-add-participant-select",value:s,onChange:c=>i(c.target.value),autoFocus:!0,children:n.map(c=>e.jsx("option",{value:c.id,children:c.name},c.id))})]}),e.jsxs("div",{className:"s-thread-add-participant-actions",children:[e.jsx("button",{type:"button",className:"s-btn s-btn-sm",onClick:m,disabled:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"s-btn s-btn-primary s-btn-sm",disabled:r||s.trim().length===0,children:r?"Adding...":"Add"})]})]}),x&&e.jsx("div",{className:"s-thread-add-participant-error",children:x})]})}export{ct as AddParticipantForm,it as ConversationHeader,lt as ConversationIdentityRow};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-BJnHs3Ul.js","assets/gestures-YA5IIwp-.js","assets/index-C1VaWNuD.js","assets/index-i7TMxlwW.css","assets/use-reduced-motion-CPoX8iV2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as e,r as g,_ as z}from"./index-C1VaWNuD.js";import{j as W,t as B,k as O,r as D,l as U,m as F,c as K,n as H,p as q}from"./conversation-model-C2KuZUXc.js";import{n as G,d as L,f as V,s as J}from"./colors-BtO5_zlx.js";import{i as C}from"./sessionRead-CvFz2RHv.js";import{n as Q,t as w,f as b}from"./time-Dhsh_2EG.js";import{u as X}from"./Provider-D0bB7q6y.js";import{o as E}from"./openContent-C6XO6kr5.js";import{g as Y,c as Z,b as ee,e as te,f as se}from"./tail-display-DcliDVkW.js";import{u as ae}from"./use-reduced-motion-CPoX8iV2.js";import{L as ie,m as f}from"./proxy-DVDRhSRR.js";import{C as ne}from"./chevron-down-D120PY4g.js";import{C as re}from"./chevron-right-CowuvuE6.js";import{A as oe}from"./activity-CzTJ-YMX.js";import{T as ce}from"./terminal-UDy4lzV1.js";import{M as le}from"./message-circle-joGFxfj1.js";const M=60,de={planning:"Planning",inspection:"Inspection",mutation:"Mutations",execution:"Execution",verification:"Verification",coordination:"Coordination"};function N(s){if(s.kind==="think")return"planning";const t=s.tool?.toLowerCase()??"",o=s.arg?.toLowerCase()??"",r=s.text?.toLowerCase()??"",i=s.outcome?.toLowerCase()??"";return t.includes("test")||t.includes("check")||t.includes("lint")||t.includes("typecheck")||t.includes("verify")||/\b(?:bun|npm|pnpm|yarn|cargo|pytest|go|vitest|jest|playwright|cypress)\s+(?:test|run\s+(?:check|test|lint)|check|typecheck)/i.test(o)||/\b(?:\d+\s+pass|all tests passed|test passed|lint clean|tsc clean)\b/i.test(i)?"verification":t==="write"||t==="edit"||t==="strreplace"||t==="str_replace"||t==="delete"||t==="write_file"||t==="edit_file"||t==="patch"||t==="apply_patch"||t==="todowrite"||t==="todo_write"||/\b(?:git\s+apply|git\s+commit|git\s+add|rm\s+|mkdir\s+|touch\s+|sed\s+|awk\s+)/i.test(o)||/^\+\d+\s+[−-]\d+/u.test(i)?"mutation":t==="read"||t==="glob"||t==="grep"||t==="filesearch"||t==="file_search"||t==="list_dir"||t==="list_directory"||t==="view"||t==="fetch"||t==="webfetch"||t==="websearch"||t==="scout_search"||t==="search"||/\b(?:grep|find|rg|cat|head|tail|ls|git\s+status|git\s+diff|git\s+log|git\s+branch)/i.test(o)?"inspection":s.kind==="note"||/\b(?:planning|plan|evaluating|analyzing|reasoning|strategy)\b/i.test(r)?"planning":s.kind==="tool"||t==="bash"||t==="shell"||t==="terminal"||t==="exec"||t==="run"||t==="command"||t==="task"?"execution":"coordination"}function y(s){const t=s.outcome?.toLowerCase()??"";return t.includes("error")||t.includes("fail")||t.includes("exit 1")||t.includes("rejected")||t.includes("timed out")?"error":t.includes("warn")||t.includes("skipped")?"warning":s.outcome||!s.isLatest?"success":s.isActive?"working":"success"}function he(s){if(s<1e3)return`${Math.round(s)}ms`;const t=s/1e3;if(t<60)return`${t.toFixed(1).replace(/\.0$/,"")}s`;const o=Math.floor(t/60),r=Math.round(t%60);return`${o}m ${r}s`}function me(s){if(s.length===0)return[];const t=new Map;for(const c of s)t.set(c.phase,(t.get(c.phase)??0)+(c.repeatCount||1));const r=s.at(-1)?.phase??"planning";return["planning","inspection","mutation","execution","verification","coordination"].filter(c=>(t.get(c)??0)>0).map(c=>({phase:c,label:de[c],count:t.get(c)??0,active:c===r}))}function j(s,t,o){const r=o?.trim();if(!r)return;const i=r.toLowerCase();t.has(i)||(t.add(i),s.push(r))}function De(s){const t=[],o=new Set;j(t,o,s.observeSessionId);for(const r of s.flight?.sessions??[])j(t,o,r.sessionId);return j(t,o,s.agent?.harnessSessionId),j(t,o,s.sessionMeta?.harnessSessionId),t}function Ue(s,t){const o=s.sessionId?.trim().toLowerCase();return o?t.some(r=>{const i=r.trim().toLowerCase();return i?o.includes(i)||i.includes(o):!1}):!1}function A(s,t){return s.ts!==t.ts?s.ts-t.ts:s.id.localeCompare(t.id)}function Fe(s,t){const o=new Map;for(const r of[...s,...t])o.set(r.id,r);return[...o.values()].sort(A).slice(-M)}function Ke(s){const t=Y(s).sort(A),o=Z(t.map(i=>({event:i,meta:ee(i)}))),r=[];for(const i of o){if(i.event.kind==="other")continue;if(i.event.kind==="tool-result"){const m=r.at(-1);m?.kind==="tool"&&(m.outcome=i.meta.result?.outcome??m.outcome??"done",m.ts=i.event.ts,m.status=y({outcome:m.outcome}),m.phase=N({kind:m.kind,tool:m.tool,arg:m.arg,text:m.text,outcome:m.outcome}));continue}const c=ue(i.event),l=pe(i.event,te(i.event,i.meta),c);if(!l&&c!=="think")continue;const d=i.meta.tool,n=i.meta.arg?v(i.meta.arg):void 0,h=i.meta.result?.outcome,a=N({kind:c,tool:d,arg:n,text:l,outcome:h}),p=y({outcome:h}),u={id:i.event.id,ts:i.event.ts,kind:c,text:l,repeatCount:i.repeatCount,phase:a,status:p};d&&(u.tool=d),n&&(u.arg=n),h&&(u.outcome=h),r.push(u)}for(let i=0;i<r.length-1;i++){const c=r[i],l=r[i+1];c&&l&&l.ts>=c.ts&&(c.durationMs=l.ts-c.ts)}return r}const $=160;function v(s){const t=s.replace(/\s+/gu," ").trim();return t.length>$?`${t.slice(0,$-1)}…`:t}const I=/^\[thinking\]\s*$/iu;function ue(s){return I.test(s.summary.trim())?"think":se(s)}function pe(s,t,o){return o==="think"&&I.test(s.summary.trim())?"":v(t)}const xe=15e3;function ge(s){const t=s?.outcome;return typeof t=="string"&&t.trim()?t.trim():void 0}function He(s){const{observe:t,flight:o}=s;if(!t||!o)return[];const r=t.data.events.filter(n=>n.kind!=="boot"&&n.kind!=="system");if(r.length===0)return[];const i=Q(o.startedAt),c=i!==null?r.filter(n=>typeof n.at=="number"&&n.at>=i-xe):[],d=(c.length>0?c:t.data.live?r:[]).slice(-M).map(n=>{const h=ge(n.result),p=(n.diff?`+${n.diff.add} −${n.diff.del}`:void 0)||h,u=N({kind:n.kind,tool:n.tool,arg:n.arg,text:n.text,outcome:p}),m=y({outcome:p}),x={id:`observe:${t.sessionId??"session"}:${n.id}`,ts:n.at??n.t,kind:n.kind,text:v(n.text||n.tool||"step"),repeatCount:1,phase:u,status:m};return n.tool&&(x.tool=n.tool),n.arg&&(x.arg=v(n.arg)),p&&(x.outcome=p),x});for(let n=0;n<d.length-1;n++){const h=d[n],a=d[n+1];h&&a&&a.ts>=h.ts&&(h.durationMs=a.ts-h.ts)}return d}function qe(s){const t=s.at(-1);return t?t.tool?t.arg?`${t.tool} · ${t.arg}`:t.tool:t.kind==="think"?t.text||"Thinking":t.text||null:null}function Ge(s){if(s.length===0)return null;const t=s.filter(i=>i.kind==="tool").length,o=s.filter(i=>i.kind==="think").length,r=[];return t>0&&r.push(`${t} tool${t===1?"":"s"}`),o>0&&r.push(`${o} thinking`),r.length===0?`${s.length} step${s.length===1?"":"s"}`:r.join(" · ")}function Ve(s){const t=s.flight?.state;return t==="queued"?{label:"Queued",detail:"waiting for the session to come online"}:t==="waking"?{label:"Waking",detail:"starting the session"}:t==="running"||t==="waiting"?s.hasSessionScope?{label:"Session live",detail:"waiting for the first trace line"}:{label:"Session live",detail:"no trace stream for this session yet"}:s.awaitingResponse?{label:"Sent",detail:"waiting for the agent to pick this up"}:null}const fe=[{head:"30%",body:"88%",short:"62%"},{head:"22%",body:"76%",short:"48%"},{head:"34%",body:"82%",short:"68%"}],je=()=>z(()=>import("./conversation-motion-features-BJnHs3Ul.js"),__vite__mapDeps([0,1,2,3,4])).then(s=>s.default);function P({onOpenTrace:s,onOpenTerminal:t,onSteer:o,compact:r=!1}){return!s&&!t&&!o?null:e.jsxs("nav",{className:`s-thread-working-actions${r?" s-thread-working-actions--compact":""}`,"aria-label":"Working turn actions",children:[s&&e.jsxs("button",{type:"button",className:"s-thread-working-action s-thread-working-action--primary",onClick:s,title:"Watch this run's live trace",children:[e.jsx(oe,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Live trace"})]}),t&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:t,title:"Jump into this agent's terminal",children:[e.jsx(ce,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Terminal"})]}),o&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:o,title:"Write an interrupting message to steer this turn",children:[e.jsx(le,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Steer…"})]})]})}const ve={think:"Thinking",tool:"Tool",ask:"Prompt",message:"Says",note:"Note",system:"System",boot:"Boot"};function k({steps:s,phase:t,limit:o=5,compact:r=!1}){const[i,c]=g.useState(()=>new Set),l=g.useCallback(a=>{c(p=>{const u=new Set(p);return u.has(a)?u.delete(a):u.add(a),u})},[]),d=g.useMemo(()=>me(s),[s]),n=s.slice(-o),h=s.length-n.length;return n.length===0?t?e.jsxs("div",{className:"s-thread-steps-phase surface-card surface-card--inset",children:[e.jsxs("div",{className:"s-thread-steps-phase-header",children:[e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow","aria-hidden":"true"}),e.jsx("span",{className:"label-xs text-muted",children:t.label})]}),e.jsx("strong",{className:"s-thread-steps-phase-detail",children:t.detail})]}):null:e.jsxs("div",{className:`s-thread-steps${r?" s-thread-steps--compact":""}`,children:[d.length>0&&e.jsx("div",{className:"s-thread-turn-phases-ribbon",role:"status","aria-label":"Execution phases",children:d.map(a=>e.jsxs("span",{className:`s-thread-turn-phase-chip chip chip--sm chip--mono ${a.active?"chip--working s-thread-turn-phase-chip--active":"chip--neutral"}`,children:[a.active&&e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow","aria-hidden":"true"}),e.jsx("span",{className:"s-thread-turn-phase-name",children:a.label}),e.jsx("span",{className:"s-thread-turn-phase-count",children:a.count})]},a.phase))}),h>0&&e.jsxs("div",{className:"s-thread-steps-elided label-xs",children:[h," earlier step",h===1?"":"s"]}),e.jsx("ol",{className:"s-thread-steps-list","aria-label":"Live steps in this turn",children:n.map((a,p)=>{const u=p===n.length-1,m=i.has(a.id),x=!!(a.arg&&a.arg.length>30||a.outcome||a.text.length>50);return e.jsxs("li",{className:`s-thread-step-card s-thread-step-card--${a.status}${u?" s-thread-step-card--latest":""}${m?" s-thread-step-card--expanded":""}`,"data-kind":a.kind,"data-phase":a.phase,"data-status":a.status,children:[e.jsxs("div",{className:"s-thread-step-header",children:[e.jsx("span",{className:"s-thread-step-mark s-thread-step-indicator","aria-hidden":"true",children:a.status==="working"||u&&!a.outcome?e.jsx("span",{className:"dot dot--sm dot--working dot--pulse dot--glow"}):a.status==="error"?e.jsx("span",{className:"dot dot--sm dot--danger"}):a.status==="warning"?e.jsx("span",{className:"dot dot--sm dot--warning"}):e.jsx("span",{className:"dot dot--sm dot--success"})}),e.jsx("span",{className:"s-thread-step-kind chip chip--sm chip--mono chip--ghost",children:a.tool?a.tool:ve[a.kind]}),e.jsxs("div",{className:"s-thread-step-body",children:[a.tool?e.jsx("span",{className:"s-thread-step-tool-arg",children:a.arg?e.jsx("code",{className:"s-thread-step-arg-code",children:a.arg}):e.jsx("span",{className:"s-thread-step-tool",children:a.tool})}):e.jsx("span",{className:"s-thread-step-text",children:a.text}),a.repeatCount>1&&e.jsxs("span",{className:"s-thread-step-repeat chip chip--sm chip--mono chip--neutral",children:["×",a.repeatCount]})]}),e.jsxs("div",{className:"s-thread-step-meta",children:[a.outcome&&e.jsx("span",{className:`s-thread-step-outcome chip chip--sm chip--mono ${a.outcome.includes("+")?"chip--success":a.status==="error"?"chip--danger":"chip--neutral"}`,children:a.outcome}),a.durationMs?e.jsx("span",{className:"s-thread-step-duration label-xs",children:he(a.durationMs)}):null,e.jsx("time",{className:"label-xs",title:b(a.ts),children:w(a.ts)}),x&&e.jsx("button",{type:"button",className:"s-thread-step-toggle btn btn--ghost btn--icon","aria-expanded":m,onClick:()=>l(a.id),title:m?"Collapse output":"Expand output",children:m?e.jsx(ne,{size:12}):e.jsx(re,{size:12})})]})]}),m&&e.jsxs("div",{className:"s-thread-step-output surface-card surface-card--inset",children:[e.jsxs("div",{className:"s-thread-step-output-header",children:[e.jsx("span",{className:"label-xs text-muted",children:"Telemetry Detail"}),e.jsxs("span",{className:"label-xs text-dim",children:[a.phase.toUpperCase()," · ",a.status.toUpperCase()]})]}),e.jsx("pre",{className:"s-thread-step-output-code",children:e.jsxs("code",{children:[a.tool?`tool: ${a.tool}
|
|
3
|
-
`:"",a.arg?`args: ${a.arg}
|
|
4
|
-
`:"",a.outcome?`outcome: ${a.outcome}
|
|
5
|
-
`:"",a.text?`text: ${a.text}
|
|
6
|
-
`:"",`timestamp: ${b(a.ts)}`]})})]})]},a.id)})})]})}function R({events:s,limit:t=3,compact:o=!1}){const r=s.slice(0,t);return r.length===0?null:e.jsx("ol",{className:`s-thread-motion-events${o?" s-thread-motion-events--compact":""}`,"aria-label":"Latest run activity",children:r.map((i,c)=>e.jsxs("li",{className:"s-thread-motion-event-card",children:[e.jsx("span",{className:"s-thread-motion-event-dot",children:e.jsx("span",{className:`dot dot--sm ${c===0?"dot--working dot--pulse dot--glow":"dot--neutral"}`})}),e.jsx("span",{className:"s-thread-motion-event-kind chip chip--sm chip--mono chip--ghost",children:W(i.kind)}),e.jsx("span",{className:"s-thread-motion-event-summary",children:B(i)??"Activity recorded"}),e.jsx("time",{className:"label-xs",title:b(i.ts),children:w(i.ts)})]},i.id))})}function be(){const s=ae();return e.jsx(ie,{features:je,strict:!0,children:e.jsxs(f.section,{className:"s-thread-skeleton","aria-busy":"true","aria-live":"polite",initial:s?!1:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.2,.7,.3,1]},children:[e.jsxs("div",{className:"s-thread-skeleton-intro",role:"status",children:[e.jsxs("div",{className:"s-thread-loader-mark","aria-hidden":"true",children:[e.jsx(f.span,{className:"s-thread-loader-orbit",animate:s?void 0:{rotate:360},transition:{duration:3.2,ease:"linear",repeat:1/0},children:e.jsx("span",{})}),e.jsx(f.span,{className:"s-thread-loader-core",animate:s?void 0:{scale:[.88,1,.88],opacity:[.58,1,.58]},transition:{duration:1.8,ease:"easeInOut",repeat:1/0}})]}),e.jsxs("span",{className:"s-thread-skeleton-copy",children:[e.jsx("strong",{children:"Composer ready"}),e.jsx("span",{children:"Gathering the conversation…"})]})]}),e.jsx("div",{className:"s-thread-skeleton-turns","aria-hidden":"true",children:fe.map((t,o)=>e.jsxs(f.div,{className:"s-thread-skeleton-turn",initial:s?!1:{opacity:0,y:7},animate:{opacity:1,y:0},transition:{delay:s?0:.05+o*.055,duration:.24,ease:[.2,.7,.3,1]},children:[e.jsx("span",{className:"s-thread-skeleton-avatar"}),e.jsxs("div",{className:"s-thread-skeleton-lines",children:[e.jsx("span",{className:"s-thread-skeleton-line s-thread-skeleton-line--head",style:{width:t.head}}),e.jsx("span",{className:"s-thread-skeleton-line",style:{width:t.body}}),e.jsx("span",{className:"s-thread-skeleton-line s-thread-skeleton-line--short",style:{width:t.short}})]})]},`${t.head}-${t.body}`))})]})})}function Ne({sessions:s,activeConversationId:t,needsYouIds:o,lastViewed:r,navigate:i}){const c=s.filter(d=>o.has(d.id)||d.agentId&&o.has(d.agentId)),l=g.useMemo(()=>O(s),[s]);return e.jsx("aside",{className:"s-thread-rail",children:e.jsxs("div",{className:"s-thread-rail-scroll",children:[c.length>0&&e.jsxs("div",{className:"s-thread-rail-section s-thread-rail-section--needs-you",children:[e.jsx("div",{className:"s-thread-rail-section-label",children:"Needs you"}),c.map(d=>e.jsx(_,{session:d,active:d.id===t,unread:C(d.lastMessageAt,d.id,r),needsYou:!0,navigate:i},`needs-${d.id}`))]}),l.map(d=>e.jsxs("div",{className:"s-thread-rail-section",children:[e.jsx("div",{className:"s-thread-rail-section-label",children:d.workspace}),d.sessions.map(n=>e.jsx(_,{session:n,active:n.id===t,unread:C(n.lastMessageAt,n.id,r),needsYou:!1,navigate:i},n.id))]},d.workspace))]})})}function ye({sessionMeta:s,agents:t,flights:o,conversationId:r,navigate:i,route:c}){const l=g.useMemo(()=>s?s.participantIds.filter(a=>a!=="operator").map(a=>D(t,[a])).filter(a=>a!==null):[],[s,t]),d={id:"operator",name:"You",handle:"operator",activity:null,state:"ready",agent:null},n=g.useMemo(()=>l.map(a=>({id:a.id,name:a.name,handle:F(a)??K(a.id)??a.id,activity:U(a,o,r),state:G(a.state),agent:a})),[l,o,r]),h=[d,...n];return e.jsxs("aside",{className:"s-thread-sidebar",children:[e.jsxs("div",{className:"s-thread-sidebar-section",children:[e.jsx("div",{className:"s-thread-sidebar-label",children:"In this conversation"}),h.map(a=>{const p=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"s-ops-avatar",style:{"--size":"28px",background:L(a.name)},children:a.name[0]?.toUpperCase()??"?"}),e.jsxs("div",{className:"s-thread-sidebar-participant-info",children:[e.jsx("span",{className:"s-thread-sidebar-participant-name",children:a.name}),e.jsxs("span",{className:"s-thread-sidebar-participant-handle",children:["@",a.handle]})]}),e.jsx("div",{className:"s-thread-sidebar-participant-activity",children:a.activity?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-thread-sidebar-activity-dot s-thread-sidebar-activity-dot--pulse",style:{background:"var(--green)"}}),e.jsx("span",{className:"s-thread-sidebar-activity-label",children:a.activity})]}):V(a.state)||a.id==="operator"?e.jsx("span",{className:"s-thread-sidebar-activity-dot",style:{background:J(a.state)}}):e.jsx("span",{className:"s-thread-sidebar-activity-dot",style:{background:"var(--dim)"}})})]});return a.agent?e.jsx("button",{type:"button",className:"s-thread-sidebar-participant s-thread-sidebar-participant--clickable",onClick:()=>E(i,{view:"agents-v2",agentId:a.agent.id},{returnTo:c}),title:`Open ${a.name} profile`,children:p},a.id):e.jsx("div",{className:"s-thread-sidebar-participant",children:p},a.id)})]}),n.length>0&&e.jsxs("div",{className:"s-thread-sidebar-section",children:[e.jsx("div",{className:"s-thread-sidebar-label",children:"Conversation mesh"}),e.jsx(we,{participants:n})]})]})}function ke({agentName:s,title:t,detail:o,snapshot:r,events:i,steps:c,phase:l,tone:d,workspaceName:n,branch:h,startedAt:a,onOpenTrace:p,onOpenTerminal:u,onSteer:m}){const x=a?w(a):"now";return e.jsxs("section",{className:`s-thread-motion-panel s-thread-motion-panel--${d}`,"aria-live":"polite",children:[e.jsxs("div",{className:"s-thread-motion-head",children:[e.jsx("div",{className:"s-thread-motion-beacon","aria-hidden":"true",children:e.jsx("span",{})}),e.jsxs("div",{className:"s-thread-motion-title-block",children:[e.jsx("div",{className:"s-thread-motion-kicker",children:"Currently working"}),e.jsx("h2",{children:t}),e.jsx("p",{children:o})]})]}),e.jsx("div",{className:"s-thread-motion-meter","aria-hidden":"true",children:Se.map((S,T)=>e.jsx("span",{style:{"--bar-height":`${S}%`,"--bar-delay":`${T*74}ms`}},`${S}-${T}`))}),e.jsxs("dl",{className:"s-thread-motion-stats",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Session"}),e.jsx("dd",{children:x})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Activity"}),e.jsx("dd",{children:r.activityLabel})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Last"}),e.jsx("dd",{children:r.lastActivityLabel})]})]}),e.jsxs("div",{className:"s-thread-motion-latest",children:[e.jsx("span",{children:s}),e.jsx("strong",{children:r.latest})]}),c.length>0?e.jsx(k,{steps:c,phase:null,limit:6}):i.length>0?e.jsx(R,{events:i,limit:4}):l?e.jsx(k,{steps:c,phase:l,limit:6}):e.jsxs("div",{className:"s-thread-motion-waiting",children:[e.jsx("span",{children:"Session created"}),e.jsx("strong",{children:"waiting for the first trace event"})]}),(n||h)&&e.jsxs("div",{className:"s-thread-motion-chips",children:[n&&e.jsx("span",{children:n}),h&&e.jsx("span",{children:h})]}),e.jsx(P,{onOpenTrace:p,onOpenTerminal:u,onSteer:m})]})}function _({session:s,active:t,unread:o,needsYou:r,navigate:i}){const{route:c}=X(),l=H(s),d=(s.agentName??l)[0]?.toUpperCase()??"?",n=s.kind==="direct",h=q(s.workspaceRoot)??s.kind;return e.jsxs("button",{type:"button",className:["s-thread-rail-item",t&&"s-thread-rail-item--active",r&&"s-thread-rail-item--needs-you"].filter(Boolean).join(" "),onClick:()=>E(i,{view:"conversation",conversationId:s.id},{returnTo:c}),children:[n?e.jsx("div",{className:"s-thread-rail-avatar",style:{background:L(s.agentName??l)},children:d}):e.jsx("div",{className:"s-thread-rail-avatar s-thread-rail-avatar--channel",children:"#"}),e.jsxs("div",{className:"s-thread-rail-body",children:[e.jsx("span",{className:"s-thread-rail-name",children:l}),e.jsx("span",{className:"s-thread-rail-sub",children:h})]}),e.jsxs("div",{className:"s-thread-rail-trailing",children:[o&&!r&&e.jsx("span",{className:"s-thread-rail-presence-dot",style:{background:"var(--accent)"}}),r&&e.jsx("span",{className:"s-thread-rail-badge s-thread-rail-badge--amber",children:"!"})]})]})}function we({participants:s}){const c=s.map((l,d)=>{const n=2*Math.PI*d/s.length-Math.PI/2;return{...l,x:130+55*Math.cos(n),y:80+55*Math.sin(n)}});return e.jsx("div",{className:"s-thread-mini-mesh",children:e.jsxs("svg",{viewBox:"0 0 260 160","aria-label":"Conversation participant mesh",children:[c.map(l=>e.jsx("line",{x1:130,y1:80,x2:l.x,y2:l.y,className:"s-thread-mini-mesh-edge"},`edge-${l.id}`)),e.jsx("circle",{cx:130,cy:80,r:16,className:"s-thread-mini-mesh-node s-thread-mini-mesh-node--center"}),e.jsx("text",{x:130,y:80,className:"s-thread-mini-mesh-label s-thread-mini-mesh-label--center",children:"OP"}),c.map(l=>e.jsxs("g",{children:[e.jsx("circle",{cx:l.x,cy:l.y,r:16,className:"s-thread-mini-mesh-node",style:l.state==="in_turn"||l.state==="in_flight"?{stroke:"var(--green)"}:void 0}),e.jsx("text",{x:l.x,y:l.y,className:"s-thread-mini-mesh-label",children:l.name.slice(0,3).toUpperCase()})]},`node-${l.id}`))]})})}const Se=[42,76,54,88,34,66,92,48,72,38,84,58],Je=Object.freeze(Object.defineProperty({__proto__:null,ChannelRail:Ne,PresenceSidebar:ye,ThreadLoadingSkeleton:be,ThreadMotionPanel:ke,WorkingTurnActions:P,WorkingTurnActivityPreview:R,WorkingTurnSteps:k},Symbol.toStringTag,{value:"Module"}));export{Je as C,M as T,k as W,Ke as a,De as b,be as c,Ve as d,ke as e,R as f,P as g,qe as l,Fe as m,He as o,Ge as s,Ue as t};
|