@openscout/scout 0.2.97 → 0.2.102
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 +0 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-DCALiEXY.js +1 -0
- package/dist/client/assets/{AddProjectForm-r_1tVuWk.js → AddProjectForm-DfbjlFfy.js} +1 -1
- package/dist/client/assets/AdventureEvidence-Dzz9VbuE.js +5 -0
- package/dist/client/assets/AdventureReader-ClMxT0e4.js +4 -0
- package/dist/client/assets/AdventureScenery-D548O0x4.js +1 -0
- package/dist/client/assets/AgentAdventures-NwTKeF0F.js +1 -0
- package/dist/client/assets/AgentAvatar-BIwg54Tj.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +1 -0
- package/dist/client/assets/AgentDetailCard-CFDE8TLi.js +1 -0
- package/dist/client/assets/AgentFloorView-l2wNKFob.js +1 -0
- package/dist/client/assets/AgentFloorWorld-BDJmXl3C.js +1 -0
- package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +1 -0
- package/dist/client/assets/{AgentLaneCard-ajZvcfdW.js → AgentLaneCard-C6YmwPxQ.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CTp39syR.js → AgentLaneChrome-D9uJ4QY7.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-DRc-TpMB.js → AgentLaneDetailSheet-KYckCBCX.js} +2 -2
- package/dist/client/assets/{AgentLaneSummaryResize-VMNDo7kD.js → AgentLaneSummaryResize-BBYBS3DO.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-CFadSaia.js → AgentLanesPreflight-pw2vMO3Q.js} +1 -1
- package/dist/client/assets/AgentLanesView-aAyC7lHf.js +2 -0
- package/dist/client/assets/AgentLiveActions-lYzicnNa.js +1 -0
- package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +1 -0
- package/dist/client/assets/AgentSessions-Cox2zS-e.js +6 -0
- package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +1 -0
- package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +1 -0
- package/dist/client/assets/AgentsSubnav-BOobgtGE.js +1 -0
- package/dist/client/assets/{AstronautSuit-Cjjcv6yQ.js → AstronautSuit-C-4I5YKi.js} +1 -1
- package/dist/client/assets/AtopView-DKm-ERYC.js +1 -0
- package/dist/client/assets/BackToPicker-Bys9ColC.js +1 -0
- package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +1 -0
- package/dist/client/assets/BriefingsScreen-D4Zf31Y6.js +1 -0
- package/dist/client/assets/{BrokerMetadataPanel-DbaCQlhw.js → BrokerMetadataPanel-1GoSl2BV.js} +1 -1
- package/dist/client/assets/BrokerScreen-CejzhRsB.js +8 -0
- package/dist/client/assets/{CastPicker-CTBHjjGw.js → CastPicker-BuwE_JQp.js} +1 -1
- package/dist/client/assets/CharacterFamilyPreview-BniL8sEL.css +1 -0
- package/dist/client/assets/CharacterFamilyPreview-CfO3j8Of.js +1 -0
- package/dist/client/assets/ChatCollapsedStrip-TV0j1xTB.js +1 -0
- package/dist/client/assets/{CodeDiffPane-QvxCUzTi.js → CodeDiffPane-DB6-mqtX.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-DplkpM7f.js → CodeProjectPicker-B_LNLpIK.js} +1 -1
- package/dist/client/assets/CodeScreen-C9H160XS.js +1 -0
- package/dist/client/assets/CommsCanvas-BR2YS76H.css +1 -0
- package/dist/client/assets/CommsCanvas-DOKw3Q8i.js +1 -0
- package/dist/client/assets/CommsDeck-C18JA7rK.js +1 -0
- package/dist/client/assets/CommsFlowGraph-Czg-KTS0.js +1 -0
- package/dist/client/assets/CommsFlowGraph-vQucylxF.css +1 -0
- package/dist/client/assets/CommsFlowMap-CzBWvSa5.js +1 -0
- package/dist/client/assets/CommsSelection-g1twA-Lb.js +1 -0
- package/dist/client/assets/ConversationComposer-B7RU6LKd.js +1 -0
- package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +1 -0
- package/dist/client/assets/ConversationHeader-CCSU8uo_.js +1 -0
- package/dist/client/assets/ConversationPanels-C9yCAoJy.js +6 -0
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +1 -0
- package/dist/client/assets/ConversationScreen-tTP6B_F-.js +2 -0
- package/dist/client/assets/ConversationStatus-CK-YfLpi.js +1 -0
- package/dist/client/assets/{CrewAvatar-CXJHLNVM.js → CrewAvatar-CJhuqTsJ.js} +1 -1
- package/dist/client/assets/CrewSprite-DsQJdu3Z.css +1 -0
- package/dist/client/assets/CrewSprite-hgpA3SWB.js +1 -0
- package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +1 -0
- package/dist/client/assets/{DataTable-DXIlOlVu.js → DataTable-BMOZ1-z8.js} +1 -1
- package/dist/client/assets/DispatchAftermath-DDlwqSCY.js +1 -0
- package/dist/client/assets/DocumentFocusViewer-f12RRQpV.js +1 -0
- package/dist/client/assets/{EmbeddableSurfacesLab-DgpewB3y.js → EmbeddableSurfacesLab-DGl9EMRV.js} +1 -1
- package/dist/client/assets/{EmptyState-D9X16fKq.js → EmptyState-uyYN5piI.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CY0RN78e.js → FileViewerPane-HtiDbj9N.js} +2 -2
- package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +1 -0
- package/dist/client/assets/FloorContextSheet-DV-SYA0K.js +1 -0
- package/dist/client/assets/FloorExchangePanel-B3TFhjLk.css +1 -0
- package/dist/client/assets/FloorExchangePanel-D59nvRCF.js +1 -0
- package/dist/client/assets/FloorMessagePasses-BCwsz9VS.js +1 -0
- package/dist/client/assets/FloorMessagePasses-nxwwiUom.css +1 -0
- package/dist/client/assets/FloorReplay-BHo79HCD.js +1 -0
- package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +1 -0
- package/dist/client/assets/FloorSavedWork-2tjBoy06.js +1 -0
- package/dist/client/assets/FloorTacticalHUD-Bngao6sn.js +1 -0
- package/dist/client/assets/FollowScreen-eHXOlK-u.js +1 -0
- package/dist/client/assets/{HarnessMark-DAaWPiT_.js → HarnessMark-Bt47OeHy.js} +1 -1
- package/dist/client/assets/HarnessesScreen-M84sFjWY.js +1 -0
- package/dist/client/assets/{HerdrSession-CYKRfBad.js → HerdrSession-CtJOUn7H.js} +3 -3
- package/dist/client/assets/{HomeHero-DYyd3cpz.js → HomeHero-Cvwx2H0w.js} +1 -1
- package/dist/client/assets/HostAdvisorView-CTJXIc1Q.js +1 -0
- package/dist/client/assets/KnowledgeSearchInspector-DwGMVmFL.js +1 -0
- package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-Bo2Zl-1a.js → LaneToolHoverCard-C6YehJqD.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-Cek_64zR.js → LaneTraceEventFocus-WLNZZVi_.js} +1 -1
- package/dist/client/assets/MeshCanvas-FDDGE69h.js +3 -0
- package/dist/client/assets/MeshCanvasMinimap-CGRzQCac.js +1 -0
- package/dist/client/assets/MeshScreen-DlfiMlaR.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BjprutE8.js → MeshTopologyView-C2Cv_2gx.js} +2 -2
- package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +1 -0
- package/dist/client/assets/MissionContextRail-CVSZJnvX.js +1 -0
- package/dist/client/assets/MissionControlView-DpGhxG4a.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-B9SiuO-i.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +1 -0
- package/dist/client/assets/MissionLogPane-CMBiI29U.js +1 -0
- package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +1 -0
- package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +1 -0
- package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +1 -0
- package/dist/client/assets/NewAgentModal-Cl4nsGhu.js +1 -0
- package/dist/client/assets/NewChatComposer-JjLbm3W2.js +19 -0
- package/dist/client/assets/{NewChatOrigin-D7hwp6dm.js → NewChatOrigin-CyPPWTJP.js} +1 -1
- package/dist/client/assets/NodeDetailPanel-BUG8rOb-.js +1 -0
- package/dist/client/assets/NodeMenu-Fw8ATWQA.js +1 -0
- package/dist/client/assets/ObserveEmbedScreen-BPiSXXvm.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-BcrGQet8.js → ObserveTextFlow-ET0dD1wO.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BhVsvwkh.js → ObservedTopologyPanel-DkEkQzo-.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +22 -0
- package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +1 -0
- package/dist/client/assets/OpsScreen-DJq-aBmX.js +1 -0
- package/dist/client/assets/OpsSubnav-9sURjajO.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +1 -0
- package/dist/client/assets/ProjectAgentProfileBar-C1fR65Eh.js +1 -0
- package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +1 -0
- package/dist/client/assets/ProjectsInbox-Bs8I__my.js +2 -0
- package/dist/client/assets/ProjectsRail-Deb38OJ1.js +1 -0
- package/dist/client/assets/ProjectsScreen-CgLiYiss.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +1 -0
- package/dist/client/assets/Provider-5Hotn7NQ.js +5 -0
- package/dist/client/assets/{RailRow-B0sRaJc6.css → RailRow-B25zKEub.css} +1 -1
- package/dist/client/assets/RailRow-BYguXNm4.js +1 -0
- package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +1 -0
- package/dist/client/assets/RenderedWorkerSprite-CvdWO32C.js +1 -0
- package/dist/client/assets/RenderedWorkerSprite-qnTfkd_4.css +1 -0
- package/dist/client/assets/ReplayClock-B7JLTp8A.js +1 -0
- package/dist/client/assets/ReplayLog-DZTpf2CW.js +1 -0
- package/dist/client/assets/ReplayOutpost-CvWQa30T.js +1 -0
- package/dist/client/assets/ReplayOutpost-Y1DvZgeu.css +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-CjZ5ew3y.js → RepoDiffEmbedScreen-Cbu0_PJW.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-CdTFfmbk.js → RepoDiffPageScreen-Chwm6GXL.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-C2mb0Wj-.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +2 -0
- package/dist/client/assets/{ReposScreen-C8dT4bK0.js → ReposScreen-C7JZQmyh.js} +2 -2
- package/dist/client/assets/RiggedWorkerCharacter-BpYECnyK.css +1 -0
- package/dist/client/assets/RiggedWorkerCharacter-DNe731GE.js +1 -0
- package/dist/client/assets/SageModelStudio-768dRQr4.css +1 -0
- package/dist/client/assets/SageModelStudio-BR1J2D4R.js +4108 -0
- package/dist/client/assets/ScoutDeckSurface-flRamdvE.js +1 -0
- package/dist/client/assets/{ScoutSurface-DmzEtrx8.js → ScoutSurface-BpklGmDL.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DU15Plja.js → ScoutbotFxLab-DeK7ySWZ.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BrXMtvKE.js → SecondaryNav-BkTn5tkq.js} +1 -1
- package/dist/client/assets/SessionEmbedScreen-CcQN6xlo.js +1 -0
- package/dist/client/assets/{SessionObserve-CLrHfAKZ.css → SessionObserve-BOBJSfs0.css} +1 -1
- package/dist/client/assets/SessionObserve-DaqDhqDI.js +12 -0
- package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +1 -0
- package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +1 -0
- package/dist/client/assets/SessionsScreen-R8QKvoey.js +1 -0
- package/dist/client/assets/SettingsDrawer-BDapR4E9.js +3 -0
- package/dist/client/assets/SettingsScreen-DirtO7Z0.js +1 -0
- package/dist/client/assets/SharedFloorCharacter-Bi5_md4R.css +1 -0
- package/dist/client/assets/SharedFloorCharacter-CSYG_t9t.js +1 -0
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +1 -0
- package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +2 -0
- package/dist/client/assets/{ShikiPane-DPWsVNtn.js → ShikiPane-BudrOxNK.js} +1 -1
- package/dist/client/assets/{SlidePanel-BMRIR6bH.js → SlidePanel-Datu7XG4.js} +1 -1
- package/dist/client/assets/SpriteAvatar-BW1JzkDt.js +1 -0
- package/dist/client/assets/SproutActionSprite-DveCzg6l.js +1 -0
- package/dist/client/assets/{StatusPill-BcuYUgsD.js → StatusPill-MxYClPG5.js} +1 -1
- package/dist/client/assets/{TailView-BDy8c2VB.js → TailView-Dn7uWmPz.js} +2 -2
- package/dist/client/assets/Terminal-D-DsQlmV.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +1 -0
- package/dist/client/assets/TerminalHeaderMount-DCGstkZ4.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-BeSwe3Yl.js → TextDocumentSurface-BhYvAB0o.js} +1 -1
- package/dist/client/assets/{TmuxPeek-B4no_aGI.js → TmuxPeek-BhK0V9Qt.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Bd16scwz.js → VoicePermissionsPanel-CecFWzva.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-DIFQufak.js → WorkDetailScreen-CwtRCm_-.js} +4 -4
- package/dist/client/assets/WorkFilesViewer-DJHftsH9.js +1 -0
- package/dist/client/assets/WorkRunView-CxwAZ2QQ.css +1 -0
- package/dist/client/assets/WorkRunView-x5PH1byG.js +1 -0
- package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +1 -0
- package/dist/client/assets/WorldCharacter-Dn4sIXNP.js +1 -0
- package/dist/client/assets/WorldMinimap-Blqg0d5r.js +1 -0
- package/dist/client/assets/WorldSky-DV9bpvXj.js +1 -0
- package/dist/client/assets/{activity-CqZafWfx.js → activity-CSUhvjD0.js} +1 -1
- package/dist/client/assets/{addon-fit-CM6F_JRD.js → addon-fit-MR98IWES.js} +1 -1
- package/dist/client/assets/{addon-webgl-DRTiePFC.js → addon-webgl-CIIKXrvK.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-CeHQpuG9.js +10 -0
- package/dist/client/assets/{agent-essentials-vytdybaX.js → agent-essentials-8t2il7PV.js} +1 -1
- package/dist/client/assets/{agent-floor-CuJr1iK1.css → agent-floor-Dmr9hZHL.css} +1 -1
- package/dist/client/assets/agent-floor-actor-3v9drnxh.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-l0stnU9N.js +1 -0
- package/dist/client/assets/{agent-lane-detail-ppJId6Jc.js → agent-lane-detail-Db7KyAlf.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-BhplDYGf.js → agent-lane-preview-B8lsQJOQ.js} +1 -1
- package/dist/client/assets/{agent-lanes-DlqcEf0l.css → agent-lanes-DmgipV9D.css} +1 -1
- package/dist/client/assets/agent-lanes-model-CX0wTcnF.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-CiVxQsFT.js +1 -0
- package/dist/client/assets/agent-state-DDhnFEEP.js +1 -0
- package/dist/client/assets/{api-HFH8wFyb.js → api-B9_IqFKY.js} +1 -1
- package/dist/client/assets/api-CaROe5_H.js +1 -0
- package/dist/client/assets/{arc.es-Bh84oHJ7.js → arc.es-BzhWalCl.js} +1 -1
- package/dist/client/assets/{arrow-down-DvTsLokL.js → arrow-down-WoVlkUmg.js} +1 -1
- package/dist/client/assets/{arrow-left-DHfdXJVZ.js → arrow-left-PuKdO3NM.js} +1 -1
- package/dist/client/assets/{arrow-right-BBsrogWf.js → arrow-right-ldbfp4SZ.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CY0Vw_67.js → arrow-up-right-Hn754ybA.js} +1 -1
- package/dist/client/assets/book-open-BlJnpf2U.js +1 -0
- package/dist/client/assets/{bot-DzkOUFBb.js → bot-CfN9PSBF.js} +1 -1
- package/dist/client/assets/broker-display-BkBzyvbR.js +2 -0
- package/dist/client/assets/{cache-CeWH_KzJ.js → cache-DEy9E34b.js} +1 -1
- package/dist/client/assets/{check-DbIkldnK.js → check-B8dMv3Is.js} +1 -1
- package/dist/client/assets/{chevron-down-C475vltS.js → chevron-down-B5eMsn5c.js} +1 -1
- package/dist/client/assets/{chevron-right-CnZRSd-V.js → chevron-right-C7UGFpkl.js} +1 -1
- package/dist/client/assets/chevron-up-BHOEgHcn.js +1 -0
- package/dist/client/assets/{chunk-HRAB3GC3-DLNT8aOo.js → chunk-HRAB3GC3-C5X-kFhb.js} +1 -1
- package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +46 -0
- package/dist/client/assets/{chunk-T65CQEWV-BtNvicWs.js → chunk-T65CQEWV-CSVUz2rY.js} +1 -1
- package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +2 -0
- package/dist/client/assets/{clock-DVvENUU5.js → clock-DFcRbtrl.js} +1 -1
- package/dist/client/assets/{code-xml-CvKBY3KA.js → code-xml-BmyLM0I2.js} +1 -1
- package/dist/client/assets/coffee-C_D9zooM.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-BcRI_YXo.js → compass-DTZdCpv9.js} +1 -1
- package/dist/client/assets/content-B5Q4pb9R.js +1 -0
- package/dist/client/assets/content-BK1IfOZs.js +1 -0
- package/dist/client/assets/content-BeEsWLEm.js +1 -0
- package/dist/client/assets/content-BkOwEknW.js +1 -0
- package/dist/client/assets/content-C32W5kAG.js +1 -0
- package/dist/client/assets/content-CoqyLs9v.js +1 -0
- package/dist/client/assets/content-CwpdIS5b.js +1 -0
- package/dist/client/assets/content-DS2OkJ3Q.js +1 -0
- package/dist/client/assets/content-DXKaPDfn.js +1 -0
- package/dist/client/assets/content-DZt5-dkI.js +1 -0
- package/dist/client/assets/content-DbQJH8L1.js +1 -0
- package/dist/client/assets/content-DetoiaHq.js +1 -0
- package/dist/client/assets/content-Dhu3wL7J.js +1 -0
- package/dist/client/assets/content-Dpv34iZu.js +1 -0
- package/dist/client/assets/content-TtQJb61D.js +1 -0
- package/dist/client/assets/content-ymNb2R7g.js +1 -0
- package/dist/client/assets/{context-budget-DX_fwUs3.js → context-budget-DemtXu7E.js} +1 -1
- package/dist/client/assets/{conversation-icons-CBMKBGHd.js → conversation-icons-BQ4OeOmr.js} +1 -1
- package/dist/client/assets/conversation-model-BGFHoxQ0.js +1 -0
- package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +1 -0
- package/dist/client/assets/conversations-Cbg9h_Af.js +1 -0
- package/dist/client/assets/{copy-Cj-owMb-.js → copy-D9WUpQRf.js} +1 -1
- package/dist/client/assets/{cpu-DuD3RFX5.js → cpu-Ck_4tB_-.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DthwWQIg.js → createLucideIcon-DkjnzvcJ.js} +1 -1
- package/dist/client/assets/{credentials-BTce3VP1.js → credentials-C4VXz2hr.js} +1 -1
- package/dist/client/assets/discover-C8IOY7_K.js +2 -0
- package/dist/client/assets/embed-entry-CG3CfCbm.js +2 -0
- package/dist/client/assets/embed-navigation-DayfkQau.js +1 -0
- package/dist/client/assets/{external-link-C_nxk0MJ.js → external-link-RT4Ph-6-.js} +1 -1
- package/dist/client/assets/{eye-FnaaPfja.js → eye-CtqSV8BS.js} +1 -1
- package/dist/client/assets/{file-code-corner-DDPq4Cur.js → file-code-corner-D_Aptal2.js} +1 -1
- package/dist/client/assets/{file-text--hfhwZH1.js → file-text-ChtICwub.js} +1 -1
- package/dist/client/assets/flag-CqdOxVkI.js +1 -0
- package/dist/client/assets/floor-character-name-CqJPOlXb.js +1 -0
- package/dist/client/assets/floor-context-model-DZBpo_oD.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-CJh9f8Jp.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-0fWevPvQ.js +1 -0
- package/dist/client/assets/{gauge-BVEknshP.js → gauge-Dgtfxf_o.js} +1 -1
- package/dist/client/assets/{gestures-3gw5VgUS.js → gestures-BDCZ1FRG.js} +1 -1
- package/dist/client/assets/{git-branch-DJyvr0k-.js → git-branch-CA3cHKCI.js} +1 -1
- package/dist/client/assets/go-shortcuts-DKtw4qYx.js +1 -0
- package/dist/client/assets/home-moving-signal-B7m-ngb2.js +1 -0
- package/dist/client/assets/home-now-card-DduXkHRR.js +1 -0
- package/dist/client/assets/{home-now-card-nano-G8kMB32m.js → home-now-card-nano-D1ScGrgv.js} +1 -1
- package/dist/client/assets/hooks-C6VyQTQe.js +2 -0
- package/dist/client/assets/{hooks-D6NI15f6.css → hooks-D787lBmm.css} +1 -1
- package/dist/client/assets/index-C5cX8dkl.js +1 -0
- package/dist/client/assets/{index-BI9AljSD.js → index-C8uS5szO.js} +5 -5
- package/dist/client/assets/index-Ck1__1yL.css +1 -0
- package/dist/client/assets/index-ClOOrVG1.js +1 -0
- package/dist/client/assets/index-Crtgfc9I.js +1 -0
- package/dist/client/assets/index-CvsM3jm8.js +1 -0
- package/dist/client/assets/{inspector-panel-CFSArQ8Y.js → inspector-panel-BLhDODb3.js} +2 -2
- package/dist/client/assets/{keyboard-nav-e6yGeorb.js → keyboard-nav-CXfav14z.js} +1 -1
- package/dist/client/assets/knowledge-search-BNdQweGz.css +1 -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-BD21P8BB.js} +2 -2
- package/dist/client/assets/lane-roster-store-DzNHP392.js +1 -0
- package/dist/client/assets/{lane-tool-detail-0WhMf4Vj.js → lane-tool-detail-Czggx8oM.js} +1 -1
- package/dist/client/assets/{layers-Dz2dKOnU.js → layers-Bolb8ejU.js} +1 -1
- package/dist/client/assets/{layout-grid-Bvs5fdB4.js → layout-grid-DI9tVJ2E.js} +1 -1
- package/dist/client/assets/left-B-_z_nqj.js +2 -0
- package/dist/client/assets/left-B1LY7rJc.js +1 -0
- package/dist/client/assets/{left-DH44V4I_.css → left-BV9yMiTL.css} +1 -1
- package/dist/client/assets/left-C6bdjWcG.js +2 -0
- package/dist/client/assets/left-CF4iuqlz.js +1 -0
- package/dist/client/assets/left-DLtNyZl1.js +1 -0
- package/dist/client/assets/left-Fpxoq-VY.js +1 -0
- package/dist/client/assets/left-N2wXfTlp.js +1 -0
- package/dist/client/assets/left-advisor-CeIjCKbd.js +1 -0
- package/dist/client/assets/left-agents-upjHVlOj.js +1 -0
- package/dist/client/assets/left-default-08gmdCtb.js +1 -0
- package/dist/client/assets/left-lanes-Cvsp73Hw.js +1 -0
- package/dist/client/assets/left-mission-DENnfshd.css +1 -0
- package/dist/client/assets/left-mission-W1LLaz74.js +1 -0
- package/dist/client/assets/library-DLKBVUJ6.js +1 -0
- package/dist/client/assets/{loader-circle-B2W9DPG5.js → loader-circle-DurUYl7E.js} +1 -1
- package/dist/client/assets/{local-agents-DKr-gIDC.js → local-agents-D9fYYRyj.js} +1 -1
- package/dist/client/assets/machine-children-RGS4Q0r6.js +1 -0
- package/dist/client/assets/machine-scope-DJt9RZ2w.js +1 -0
- package/dist/client/assets/mentions-Ctw1ECUC.js +1 -0
- package/dist/client/assets/{mesh-ops-CRR-KnCG.js → mesh-ops-CGpRk4ik.js} +1 -1
- package/dist/client/assets/{mesh-screen-D1Yvo8fU.css → mesh-screen-DjA4mOaN.css} +1 -1
- package/dist/client/assets/mesh-view-store-CliSYsmt.js +1 -0
- package/dist/client/assets/{message-circle-B2DoYKDO.js → message-circle-CSiJj6yo.js} +1 -1
- package/dist/client/assets/{message-markup-Cc_O-WdA.js → message-markup-DgFSyb3f.js} +1 -1
- package/dist/client/assets/{message-square-O-Hu9Mk2.js → message-square-NmXWtWLR.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-DZ29Mlj1.js +1 -0
- package/dist/client/assets/{mission-wall-CocIM1cF.js → mission-wall-DOuGOxQy.js} +1 -1
- package/dist/client/assets/model-CBkMvT1w.js +1 -0
- package/dist/client/assets/nav-destinations-CyXnw9kh.js +1 -0
- package/dist/client/assets/observe-CkfOxYx_.js +1 -0
- package/dist/client/assets/{operator-attention-RqieiSY8.js → operator-attention-DGR4kOog.js} +1 -1
- package/dist/client/assets/ops-screen-CxYM0VOW.css +1 -0
- package/dist/client/assets/page-status-CkS3SZu-.js +1 -0
- package/dist/client/assets/panel-right-BNTJhy8M.js +1 -0
- package/dist/client/assets/pause-DWS7YGQ3.js +1 -0
- package/dist/client/assets/{persistent-state-xJz-qAFc.js → persistent-state-xsuk6Kc-.js} +1 -1
- package/dist/client/assets/pin-DWlD1BOF.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-D_Pggug4.js +1 -0
- package/dist/client/assets/{plus-BJ1If8vj.js → plus-D_wLGJGT.js} +1 -1
- package/dist/client/assets/profile-C3KgiZvc.js +1 -0
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +1 -0
- package/dist/client/assets/projects-inbox-DvbqJO3q.js +1 -0
- package/dist/client/assets/{proxy-1BABCaDb.js → proxy-DOG46ja4.js} +1 -1
- package/dist/client/assets/{radio-B5OpHrrK.js → radio-C_jtwbFP.js} +1 -1
- package/dist/client/assets/{refresh-cw-DmNAhaH0.js → refresh-cw-Da9DDLk2.js} +1 -1
- package/dist/client/assets/resolve-panes-DuowGRTk.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +1 -0
- package/dist/client/assets/right-B9OUA6Ho.js +1 -0
- package/dist/client/assets/right-BDQnjetX.js +1 -0
- package/dist/client/assets/{right-D8id_DWQ.js → right-BLJsc2-p.js} +2 -2
- package/dist/client/assets/right-BUbKHmRH.js +1 -0
- package/dist/client/assets/right-Ci2IcD4s.js +1 -0
- package/dist/client/assets/right-CmCce3e5.js +1 -0
- package/dist/client/assets/right-D7w0zM5a.js +1 -0
- package/dist/client/assets/right-DIoON_bv.js +1 -0
- package/dist/client/assets/right-E0Jr3VN5.js +1 -0
- package/dist/client/assets/right-lCdAk9dW.js +1 -0
- package/dist/client/assets/{rocket-D3-TUJ2m.js → rocket-DyrYDo8V.js} +1 -1
- package/dist/client/assets/router-BKiMcYa7.js +1 -0
- package/dist/client/assets/{text-BYAFNLNq.css → runtime-picker-C3JwrDKP.css} +1 -1
- package/dist/client/assets/runtime-picker-DdsttHHc.js +1 -0
- package/dist/client/assets/{scope-views-CPM0sBw_.js → scope-views-B7PZGlhY.js} +1 -1
- package/dist/client/assets/scout-voice-DOQ_B77g.js +1 -0
- package/dist/client/assets/scoutbot-Bk3nyrkj.js +3 -0
- package/dist/client/assets/{scoutbot-markdown-CQ7Y1McC.js → scoutbot-markdown-Bz0Vbto2.js} +1 -1
- package/dist/client/assets/{scroll-text-kPhYbh-M.js → scroll-text-DwC8r2g6.js} +1 -1
- package/dist/client/assets/{search-DmFM_9jm.js → search-C4VlW_0l.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +1 -0
- package/dist/client/assets/{selection-bridge-Dy2mtMyi.js → selection-bridge-B5jqyMR9.js} +1 -1
- package/dist/client/assets/{send-horizontal-qyjNgEaV.js → send-horizontal-pOtGI7FM.js} +1 -1
- package/dist/client/assets/send-to-agent-session-BZGq_ycy.js +1 -0
- package/dist/client/assets/{server-nWqndnxu.js → server-ms1yxUYJ.js} +1 -1
- package/dist/client/assets/{session-catalog-BkmktBHI.js → session-catalog-s-T_w41t.js} +1 -1
- package/dist/client/assets/{session-table-DKSF0mrS.js → session-table-CDx_16xf.js} +1 -1
- package/dist/client/assets/sessions-view-DzYGsKWS.js +1 -0
- package/dist/client/assets/{settings-C6h9y5XX.js → settings-TJIkkZ0P.js} +1 -1
- package/dist/client/assets/shared-work-artifacts-4IIQXQfc.js +1 -0
- package/dist/client/assets/{sliders-horizontal-BhHKxsCO.js → sliders-horizontal-CHf3ntw0.js} +1 -1
- package/dist/client/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png +0 -0
- package/dist/client/assets/{sparkles-Cf8gin88.js → sparkles-BbOFw3d0.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-DDHEHUgz.js → sse-v5QLsOHV.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-BdUrO0kb.js → tail-events-DQ46QBW1.js} +1 -1
- package/dist/client/assets/{terminal-C3YRPfyz.js → terminal-96JWDYDL.js} +1 -1
- package/dist/client/assets/{terminal-relay-BFhdIstF.js → terminal-relay-Bfx8pg80.js} +1 -1
- package/dist/client/assets/terminal-screen-Bpb2SZrn.css +1 -0
- package/dist/client/assets/{terminal-sessions-BQ6t92tJ.js → terminal-sessions-Ch9aYlgi.js} +1 -1
- package/dist/client/assets/{terminal-takeover-B6H4llRR.js → terminal-takeover-BlpxpvSp.js} +1 -1
- package/dist/client/assets/use-beside-Df-F2Uvg.js +1 -0
- package/dist/client/assets/use-conversation-list-A_YUf8lo.js +1 -0
- package/dist/client/assets/{use-fleet-active-asks-BtgNnRgK.js → use-fleet-active-asks-DFs_u-vM.js} +1 -1
- package/dist/client/assets/use-mesh-node-state-Ck9CYplv.js +1 -0
- package/dist/client/assets/{use-mesh-ops-items-N1HHhChY.js → use-mesh-ops-items-Be1WmwCg.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-8WuxLa5l.js → use-reduced-motion-D7n3vK8t.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-Bkv-Uz_V.js → useAgentHoverCard-Dr-OjNFF.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +1 -0
- package/dist/client/assets/useEmbedHeadline-BL8wQawZ.js +1 -0
- package/dist/client/assets/{usePierreRuntime-BfZHKAkI.js → usePierreRuntime-DJkRHMoe.js} +1 -1
- package/dist/client/assets/worker-rendered-v1-DmGVMlVi.png +0 -0
- package/dist/client/assets/worker-thinking-v1-ujakpzrK.png +0 -0
- package/dist/client/assets/worker-waiting-v1-DbTSsfJJ.png +0 -0
- package/dist/client/assets/worker-working-v1-BROAvJ_z.png +0 -0
- package/dist/client/assets/world-outposts-v1-DOt0i98W.png +0 -0
- package/dist/client/assets/{wrench-DkxnZRlR.js → wrench-BsMTSeji.js} +1 -1
- package/dist/client/assets/{x-DfRJbqrh.js → x-DI1ktCYb.js} +1 -1
- package/dist/client/assets/{xterm-CJw8Epxv.js → xterm-B1YBE4Gq.js} +1 -1
- package/dist/client/assets/{zap-CIo8msJB.js → zap-sKPkh4sQ.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 +2 -2
- package/dist/drizzle/0017_wise_silver_sable.sql +26 -0
- package/dist/drizzle/0018_message_epoch_order.sql +1 -0
- package/dist/drizzle/meta/0017_snapshot.json +6785 -0
- package/dist/drizzle/meta/0018_snapshot.json +6804 -0
- package/dist/drizzle/meta/_journal.json +14 -0
- package/dist/main.mjs +33938 -36054
- package/dist/node/main.mjs +7126 -6317
- package/dist/openscout-terminal-relay.mjs +391 -9
- package/dist/pairing-runtime-controller.mjs +35559 -34443
- package/dist/runtime/base-daemon.mjs +31 -8
- package/dist/runtime/broker-daemon.mjs +7891 -2579
- package/dist/runtime/broker-process-manager.mjs +15 -3
- package/dist/runtime/mesh-discover.mjs +14 -3
- package/dist/scout-control-plane-web.mjs +43027 -39136
- package/dist/statusline.mjs +1021 -35
- package/dist/update-helper.mjs +32169 -0
- package/package.json +2 -5
- package/dist/client/assets/ActivityScreen-y-5DLleY.js +0 -1
- package/dist/client/assets/AgentAvatar-B7c0egdP.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BD7Unt2P.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-BbcZc9Xk.js +0 -1
- package/dist/client/assets/AgentDetailCard-B_KLcgsP.js +0 -1
- package/dist/client/assets/AgentFloorView-DMFiHs21.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DHGLRddI.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +0 -1
- package/dist/client/assets/AgentLanesView-u5vpLwQf.js +0 -2
- package/dist/client/assets/AgentLiveActions-CsQA3pu_.js +0 -1
- package/dist/client/assets/AgentMasterScreen-C5WlWNmk.js +0 -1
- package/dist/client/assets/AgentSessions-BePq5Lgc.js +0 -6
- package/dist/client/assets/AgentsConsole-BuiZ_bDo.js +0 -1
- package/dist/client/assets/AgentsScreen-CRi-hG2k.js +0 -1
- package/dist/client/assets/AgentsSubnav-DUsya4WK.js +0 -1
- package/dist/client/assets/AtopView-PxWQd-sX.js +0 -1
- package/dist/client/assets/BackToPicker-Cto0Ioz9.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-C29smC5d.js +0 -1
- package/dist/client/assets/BriefingsScreen-DNyFBrPn.js +0 -1
- package/dist/client/assets/BrokerScreen-CS0s4Gm4.js +0 -5
- package/dist/client/assets/ChatCollapsedStrip-D4rc7wBQ.js +0 -1
- package/dist/client/assets/CodeScreen-CrR2JaVj.js +0 -1
- package/dist/client/assets/ConversationComposer-H8_hsYSc.js +0 -1
- package/dist/client/assets/ConversationFeedRows-hlEFlURs.js +0 -1
- package/dist/client/assets/ConversationHeader-B0ZBhE_E.js +0 -1
- package/dist/client/assets/ConversationPanels-fMo6Uy1v.js +0 -6
- package/dist/client/assets/ConversationScreen-CXAHQwQ3.js +0 -2
- package/dist/client/assets/ConversationScreen-CkWnKXt6.css +0 -1
- package/dist/client/assets/ConversationStatus-DI5GCiyW.js +0 -1
- package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +0 -1
- package/dist/client/assets/DispatchAftermath-CrELgl2e.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-DFFE85Tq.js +0 -1
- package/dist/client/assets/FlightObserveScreen-qyzHzxLa.js +0 -1
- package/dist/client/assets/FollowScreen-wZ-z67mX.js +0 -1
- package/dist/client/assets/HarnessesScreen-DbKkQM4o.js +0 -1
- package/dist/client/assets/HostAdvisorView-NtM0bsg8.js +0 -1
- package/dist/client/assets/KnowledgeSearchInspector-CU6BCFcS.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DvbRRPQB.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-C3C8UjXv.js +0 -1
- package/dist/client/assets/MeshCanvas-TvsID4fe.js +0 -3
- package/dist/client/assets/MeshCanvasMinimap-CxqeVVco.js +0 -1
- package/dist/client/assets/MeshScreen-BJ-j9YXv.js +0 -1
- package/dist/client/assets/MessagesScreen-CyNIZ3-X.js +0 -1
- package/dist/client/assets/MissionContextRail-Be0uXljQ.js +0 -1
- package/dist/client/assets/MissionControlView-Bj7cAbZd.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-DvTw6ts5.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-B0QG7Gys.js +0 -1
- package/dist/client/assets/MissionLogPane-EsM_S3ro.js +0 -1
- package/dist/client/assets/NewAgentModal-Cqiq1CE1.js +0 -1
- package/dist/client/assets/NewChatComposer-C_1op4dH.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-CGHI_hb5.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-BtfvMkAp.js +0 -79
- package/dist/client/assets/OpsAgentsView-DBYtmLnh.js +0 -1
- package/dist/client/assets/OpsScreen-CuYVgkC_.js +0 -1
- package/dist/client/assets/OpsSubnav-BEU4kKXm.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +0 -1
- package/dist/client/assets/ProjectAgentProfileBar-uJw9Wdfk.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-CIMS4Dy_.js +0 -1
- package/dist/client/assets/ProjectsInbox-JgU0lrY8.js +0 -2
- package/dist/client/assets/ProjectsRail-p99BRBOa.js +0 -1
- package/dist/client/assets/ProjectsScreen-BB45DU53.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BHDTJWOz.js +0 -1
- package/dist/client/assets/Provider-Bu-C8Hxc.js +0 -1
- package/dist/client/assets/RailRow-ClMmtaIE.js +0 -1
- package/dist/client/assets/RawSessionsTable-BtKdQPiv.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-KPHJgO1l.js +0 -1
- package/dist/client/assets/RepoDiffViewer-BFperHQg.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-BkBmbi1Z.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-BcJsm2Kq.js +0 -1
- package/dist/client/assets/SessionEmbedScreen-Bt4flmAx.js +0 -1
- package/dist/client/assets/SessionObserve-BCehTlO8.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-Bb6U-dem.js +0 -1
- package/dist/client/assets/SessionRefScreen-C8BiRVPx.js +0 -1
- package/dist/client/assets/SessionsScreen-BNvjUflN.js +0 -1
- package/dist/client/assets/SettingsDrawer-BieUmb8g.js +0 -3
- package/dist/client/assets/SettingsScreen-3JvX1WFL.js +0 -1
- package/dist/client/assets/SpriteAvatar-56DTXxSV.js +0 -1
- package/dist/client/assets/Terminal-BlUQY9_Z.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DTjxktyr.js +0 -1
- package/dist/client/assets/TerminalHeaderMount-Cy-uxkey.js +0 -1
- package/dist/client/assets/WorkFilesViewer-CT5XEFGf.js +0 -1
- package/dist/client/assets/agent-autocomplete-DXUBnlkN.js +0 -10
- package/dist/client/assets/agent-lane-card-model-CNZMPkhc.js +0 -1
- package/dist/client/assets/agent-lanes-model-DXqjs0OK.js +0 -2
- package/dist/client/assets/agent-master-I1W-5d-x.css +0 -1
- package/dist/client/assets/agent-master-model-DAZL92oe.js +0 -1
- package/dist/client/assets/agent-specialization-BtxLN4UR.js +0 -1
- package/dist/client/assets/agents-project-model-UYiamtrU.js +0 -1
- package/dist/client/assets/api-Co9aQ2Jw.js +0 -1
- package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
- package/dist/client/assets/chunk-JTPDIGGW-Ci5j4vzV.js +0 -46
- package/dist/client/assets/chunk-YOZR3KYS-DN5EJulq.js +0 -2
- package/dist/client/assets/colors-BtO5_zlx.js +0 -1
- package/dist/client/assets/content--T3p6akp.js +0 -1
- package/dist/client/assets/content-4nFMLuzF.js +0 -1
- package/dist/client/assets/content-BJ4nHvcu.js +0 -1
- package/dist/client/assets/content-BNyAjpUl.js +0 -1
- package/dist/client/assets/content-BmGp9wNl.js +0 -1
- package/dist/client/assets/content-CBWhwaRo.js +0 -1
- package/dist/client/assets/content-CQlykFbe.js +0 -1
- package/dist/client/assets/content-CevL0DgF.js +0 -1
- package/dist/client/assets/content-Ch8pf2bj.js +0 -1
- package/dist/client/assets/content-Cpvdcm_l.js +0 -1
- package/dist/client/assets/content-DfS3vgAu.js +0 -1
- package/dist/client/assets/content-DpQdNePJ.js +0 -1
- package/dist/client/assets/content-Dqpibejl.js +0 -1
- package/dist/client/assets/content-TV0nd6-r.js +0 -1
- package/dist/client/assets/content-odbb5H4U.js +0 -1
- package/dist/client/assets/content-uXHLPHe0.js +0 -1
- package/dist/client/assets/conversation-model-QsJVfSeG.js +0 -1
- package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +0 -1
- package/dist/client/assets/discover-B3uQlh5L.js +0 -2
- package/dist/client/assets/embed-entry-DkRcHKTh.js +0 -2
- package/dist/client/assets/home-moving-signal-BPqBoNSm.js +0 -1
- package/dist/client/assets/home-now-card-UspVW2-2.js +0 -1
- package/dist/client/assets/hooks-BMsQzo9j.js +0 -2
- package/dist/client/assets/index-C-v0Z6ZS.js +0 -1
- package/dist/client/assets/index-D9DzUORB.js +0 -1
- package/dist/client/assets/index-DfsTyYDx.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-roster-store-Q7pcblY5.js +0 -1
- package/dist/client/assets/left-B4Ak-Ibt.js +0 -2
- package/dist/client/assets/left-BMb493FZ.js +0 -1
- package/dist/client/assets/left-BjFLvVOC.js +0 -1
- package/dist/client/assets/left-CsXQ8Q3G.js +0 -1
- package/dist/client/assets/left-FNH7faCI.js +0 -1
- package/dist/client/assets/left-POkqE8gI.js +0 -2
- package/dist/client/assets/left-UulOTcWh.js +0 -1
- package/dist/client/assets/left-advisor-CJkQS2d6.js +0 -1
- package/dist/client/assets/left-agents-CFMxyEjT.js +0 -1
- package/dist/client/assets/left-default-rnX5HANc.js +0 -1
- package/dist/client/assets/left-lanes-BpLXT_qH.js +0 -1
- package/dist/client/assets/left-mission-B0bhseWw.js +0 -1
- package/dist/client/assets/left-mission-DSenPIyb.css +0 -1
- package/dist/client/assets/library-D1iXfda2.js +0 -1
- package/dist/client/assets/mentions-DuLQnEcn.js +0 -1
- package/dist/client/assets/mesh-buckets-6y3ZIibI.js +0 -1
- package/dist/client/assets/mesh-roster-Bc7T4b7z.js +0 -1
- package/dist/client/assets/mesh-view-store-CiET-yN8.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-DDAgWKUl.js +0 -1
- package/dist/client/assets/model-IGCUEsMy.js +0 -1
- package/dist/client/assets/observe-Da2mRAsc.js +0 -1
- package/dist/client/assets/ops-screen-giu3If_N.css +0 -1
- package/dist/client/assets/page-status-Crtgjbq3.js +0 -1
- package/dist/client/assets/paperclip-BudMKSyr.js +0 -1
- package/dist/client/assets/perf-PX8Rx0EP.js +0 -1
- package/dist/client/assets/profile-B3qDSbrH.js +0 -1
- package/dist/client/assets/projects-inbox-CLek3QaG.js +0 -1
- package/dist/client/assets/projects-inbox-DRBl2N85.css +0 -1
- package/dist/client/assets/resolve-panes-DXw-cHaj.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +0 -1
- package/dist/client/assets/right-BgJ4mQLf.js +0 -1
- package/dist/client/assets/right-Bk6h7o-Z.js +0 -1
- package/dist/client/assets/right-BrICCmEt.js +0 -1
- package/dist/client/assets/right-C1QIbqFZ.js +0 -1
- package/dist/client/assets/right-CfliKiHY.js +0 -1
- package/dist/client/assets/right-CtOLXB9s.js +0 -1
- package/dist/client/assets/right-DJ34yMAi.js +0 -1
- package/dist/client/assets/right-DiFmtw6d.js +0 -1
- package/dist/client/assets/right-Lx79pxpG.js +0 -1
- package/dist/client/assets/router-DTtux5sP.js +0 -1
- package/dist/client/assets/scout-voice-BZKsdquE.js +0 -1
- package/dist/client/assets/scoutbot-BJIamJOH.js +0 -3
- package/dist/client/assets/secondaryNavConfig-C9bQ9_IA.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +0 -1
- package/dist/client/assets/terminal-screen-BLk4PAYt.css +0 -1
- package/dist/client/assets/text-Faa3ZStB.js +0 -1
- package/dist/client/assets/use-conversation-list-DO5J8T1H.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-B31qTy6m.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-BI9AljSD.js";/* empty css */import{D as ys}from"./DataTable-DXIlOlVu.js";import{H,h as F}from"./HarnessMark-DAaWPiT_.js";import{O as vs}from"./ObservedTopologyPanel-BhVsvwkh.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-BdUrO0kb.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-BI9AljSD.js";import{k as d,l as B,m}from"./router-DTtux5sP.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-BI9AljSD.js";import{E as p}from"./EmptyState-D9X16fKq.js";import{a as f}from"./api-Co9aQ2Jw.js";import{S as b}from"./scoutbot-markdown-CQ7Y1McC.js";import{b as h,t as u}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./perf-PX8Rx0EP.js";import"./Provider-Bu-C8Hxc.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./external-link-C_nxk0MJ.js";const g={"fleet-home":"fleet briefing",tour:"tour briefing"};function fe({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{fe as BriefingDetailScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-BI9AljSD.js";import{E as c}from"./EmptyState-D9X16fKq.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-BI9AljSD.js";import{r as us}from"./index-DfsTyYDx.js";import{D as hs}from"./text-Faa3ZStB.js";import{E as Ie}from"./EmptyState-D9X16fKq.js";import{B as fs,j as ms,F as ps,R as bs,G as ys,H as gs}from"./NewChatComposer-C_1op4dH.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-DDHEHUgz.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-Bu-C8Hxc.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-DbaCQlhw.js";import{DispatchAftermath as Is}from"./DispatchAftermath-CrELgl2e.js";import{i as $s,c as Ds,n as _e}from"./keyboard-nav-e6yGeorb.js";import{ShikiPane as Es}from"./ShikiPane-DPWsVNtn.js";import{d as Fs}from"./types-B0PlfpKc.js";/* empty css */import{L as ke}from"./loader-circle-B2W9DPG5.js";import{R as Ms}from"./refresh-cw-DmNAhaH0.js";import{X as De}from"./x-DfRJbqrh.js";import{A as Ts}from"./arrow-down-DvTsLokL.js";import{E as Ue}from"./external-link-C_nxk0MJ.js";import{C as Ls}from"./chevron-down-C475vltS.js";import{S as Ps}from"./sparkles-Cf8gin88.js";import{P as Bs}from"./paperclip-BudMKSyr.js";import{P as zs}from"./plus-BJ1If8vj.js";import{S as qs}from"./send-horizontal-qyjNgEaV.js";import{A as Ke}from"./arrow-right-BBsrogWf.js";import{C as Os}from"./check-DbIkldnK.js";import{C as _s}from"./copy-Cj-owMb-.js";import{M as Us}from"./message-square-O-Hu9Mk2.js";import{c as Xe}from"./createLucideIcon-DthwWQIg.js";import{R as Ks}from"./radio-B5OpHrrK.js";import{M as Hs,b as Js}from"./DocumentFocusViewer-DFFE85Tq.js";import{B as Gs}from"./bot-DzkOUFBb.js";const Qs=[["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"}]],Ws=Xe("at-sign",Qs);const Vs=[["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"}]],Ys=Xe("hash",Vs),Xs=160;function Ce(s){const t=new URLSearchParams({limit:String(Xs)});return s&&t.set("cursor",s),`/api/broker?${t.toString()}`}const He={index:-1,request:0};function Zs(s,t){return{index:t,request:s.request+1}}function Ze(s,t){return t===s.index?s:{index:t,request:s.request}}function er(s,t){return s.index<t?s:Ze(s,t>0?t-1:-1)}function sr(s,t){return s.request!==t}function rr({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=>Zs(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(!sr(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=>er(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"],tr=3e4,ar={all:"All",delivered:"Delivered",failed:"Failed"};function nr(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 or(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 ir(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(Ys,{size:12,"aria-hidden":"true"});case"broadcast":return e.jsx(Ks,{size:12,"aria-hidden":"true"});case"dm":return e.jsx(Ws,{size:12,"aria-hidden":"true"});default:return e.jsx(Us,{size:12,"aria-hidden":"true"})}}function lr(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=lr(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 cr(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 dr({attempt:s,agents:t}){const n=Ge(s,t,"from"),o=Ge(s,t,"to"),u=cr(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 ur(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 hr(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 fr({navigate:s,embedded:t=!1,initialAttemptId:n}){const{route:o,agents:u,selectedBrokerAttempt:h,inspectBrokerAttempt:b,clearBrokerAttempt:m}=Ve(),[k]=a.useState(()=>xs(Ce(),tr)),[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?hr(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:xe}=rr({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&&xe(d)},[L,R,o,xe]);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:ar[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(ke,{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(Ie,{title:"Loading dispatch",body:"Reading the dispatch database snapshot."}),!q&&!c&&!Q&&e.jsx(Ie,{title:"No dispatch data",body:"No dispatch rows are available yet."}),c&&e.jsxs(e.Fragment,{children:[e.jsx(mr,{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 mr({attempts:s,agents:t,selectedAttemptId:n,onInspect:o,getRowFocusProps:u}){if(s.length===0)return e.jsx(Ie,{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:ur(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(dr,{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:or(m.ts)})})]},m.id)})})]},b.key))]})}function pr(s){const t=es(s);return[{label:"Kind",value:nr(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(Os,{size:14,"aria-hidden":"true"}):e.jsx(_s,{size:14,"aria-hidden":"true"})})}function br(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 yr({payload:s}){const t=a.useMemo(()=>br(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(Hs,{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(Js,{size:14,"aria-hidden":"true"})})]}),e.jsx("div",{className:"sys-broker-payload-dialog-body",children:b})]}),document.body)]})}function gr({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=pr(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,xe]=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??"",je=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:je,defaultForwardAgentId:me,defaultForwardAgent:re,effort:"medium"});Te.current={originalTargetAgentId:fe,firstRoutableAgentId:je,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||je),$(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,je,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"&&xe(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(ke,{size:13,className:"sys-broker-action-spinner","aria-hidden":"true"}):F?e.jsx(Ue,{size:13,"aria-hidden":"true"}):e.jsx(Gs,{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(ke,{size:13,className:"sys-broker-action-spinner","aria-hidden":"true"}):e.jsx(Ms,{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(Ts,{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:ir(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(gr,{attempt:s}):e.jsx(yr,{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(Ls,{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(Ps,{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(Bs,{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(zs,{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(ke,{size:14,className:"sys-broker-action-spinner","aria-hidden":"true"}):e.jsx(qs,{size:14,"aria-hidden":"true"})})]})]}),i&&e.jsx("div",{className:`sys-broker-action-status sys-broker-action-status--${A}`,role:"status",children:i})]})]})]})}const xr=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}}}),tt=Object.freeze(Object.defineProperty({__proto__:null,BrokerAttemptInspector:ts,BrokerScreen:fr,scoutSurface:xr},Symbol.toStringTag,{value:"Module"}));export{ts as B,fr as a,Ce as b,tt as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as j}from"./index-BI9AljSD.js";import{i as $,h as O,q as w,a as H}from"./conversation-model-QsJVfSeG.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,e as K}from"./Provider-Bu-C8Hxc.js";import{u as Q,f as X}from"./use-fleet-active-asks-BtgNnRgK.js";import{b as Y}from"./router-DTtux5sP.js";import{l as D,i as C,s as Z}from"./sessionRead-CvFz2RHv.js";import{u as ee}from"./use-conversation-list-DO5J8T1H.js";import{i as se}from"./colors-BtO5_zlx.js";import{A as te}from"./AgentAvatar-B7c0egdP.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-BI9AljSD.js";import{a as G}from"./api-Co9aQ2Jw.js";import{c as je}from"./clipboard-e3fSpeo7.js";import{f as ze}from"./scoutbot-BJIamJOH.js";import{g as Ae,f as Ce}from"./api-HFH8wFyb.js";import{d as Ke}from"./types-B0PlfpKc.js";import{r as Oe,C as He}from"./CodeDiffPane-QvxCUzTi.js";import{r as qe,a as Ge,w as Ve,b as Xe,f as xe,C as Je,s as Qe}from"./CodeProjectPicker-DplkpM7f.js";import{ShikiPane as Ye}from"./ShikiPane-DPWsVNtn.js";/* empty css */import{A as Ze}from"./arrow-left-DHfdXJVZ.js";import{C as et}from"./chevron-right-CnZRSd-V.js";import{C as tt}from"./check-DbIkldnK.js";import{C as nt}from"./copy-Cj-owMb-.js";import"./perf-PX8Rx0EP.js";import"./cache-CeWH_KzJ.js";import"./usePierreRuntime-BfZHKAkI.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";/* empty css */import"./chevron-down-C475vltS.js";import"./createLucideIcon-DthwWQIg.js";import"./search-DmFM_9jm.js";const st=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 V(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 rt(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 it(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"&&st.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 Rt({route:i,navigate:l,root:k,file:g,project:f,path:x,wt:u,line:Le,endLine:Ne,returnConversationId:Re,embedded:X=!1}){const I=k??i?.root??null,B=g??i?.file??null,p=f??i?.project??null,b=x??i?.path??null,P=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(()=>I??(p?null:qe())),[y,Q]=s.useState(()=>new Map),[L,U]=s.useState(()=>new Set),[de,ue]=s.useState(null),[a,W]=s.useState(B),[c,_]=s.useState(null),[Ee,Y]=s.useState(!1),[fe,z]=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,A]=s.useState(()=>p?{phase:"resolving"}:{phase:"idle"}),ne=p?`${p}\0${b??""}\0${P??""}`: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 G(`/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){U(d=>new Set([...d,...n]));for(const d of n)E(d)}},[E]);s.useEffect(()=>{if(!p)return;const e=`${p}\0${b??""}\0${P??""}`;if(R.current===e)return;const t=n=>{R.current=e;const d=b?`${n}/${b}`:null;A({phase:"idle"}),J(n),W(d),$(n,d)};if(h){const n=rt(h,p,P);if(n){t(n.root);return}}se.current!==e&&(A({phase:"resolving"}),G(`/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);A({phase:"failed",message:d.includes(p)?d:`Can't resolve project "${p}": ${d}`})}))},[p,b,P,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=Ge(o),t=he.current,n=t?ye(o,t):[];e?(Q(new Map(Object.entries(e.entries))),U(new Set([...e.expanded,...n])),!t&&e.selectedFile&&W(e.selectedFile)):(Q(new Map),U(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||(Ve(o,{entries:y,expanded:L,selectedFile:a}),Xe(o))},[o,y,L,a]),s.useEffect(()=>{!I||!B||$(I,B)},[I,B,$]);const re=s.useRef(new Map),ie=s.useRef(new Set),$e=3e4,K=s.useCallback(e=>{const t=re.current.get(e);return t?Date.now()-t.at>$e?(re.current.delete(e),null):t.preview:null},[]),O=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=>{K(e)||ie.current.has(e)||(ie.current.add(e),G(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>O(e,t)).catch(()=>{}).finally(()=>ie.current.delete(e)))},[K,O]);s.useEffect(()=>{if(Z("idle"),!a){_(null),z(null);return}const e=K(a);if(e){_(e.kind==="file"?e:null),z(null),Y(!1);return}let t=!1;return Y(!0),z(null),G(`/api/file/preview?path=${encodeURIComponent(a)}`).then(n=>{t||(O(a,n),_(n.kind==="file"?n:null))}).catch(n=>{t||(_(null),z(n instanceof Error?n.message:String(n)))}).finally(()=>{t||Y(!1)}),()=>{t=!0}},[a,K,O]);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 H=s.useCallback((e,t)=>{X||!l||l(me(e,t))},[X,l,me]),Te=s.useCallback(e=>{U(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),W(e),o&&H(o,e)},[o,H]),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]),q=!!(o&&a&&Oe(o,a));s.useEffect(()=>{q||ee("source")},[q]);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,A({phase:"idle"}),te(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),W(e.file??null),J(e.root),e.file&&$(e.root,e.file),H(e.root,e.file??null)},[$,H]);return r.jsxs("div",{className:"s-code-screen","data-embedded":X||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(Ze,{size:13,strokeWidth:1.9,"aria-hidden":!0}),r.jsx("span",{children:"Back to thread"})]}):null,r.jsx(Je,{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:Qe(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(et,{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:it(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}),q?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:[V(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(tt,{size:12,"aria-hidden":!0}):r.jsx(nt,{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"&&q&&o&&a?r.jsx(He,{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 ",V(256*1024)," of ",V(c.sizeBytes)," ·"," ",r.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,r.jsx(Ye,{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," · ",V(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 Et=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{Rt as CodeContent,Et as scoutSurface};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as h,j as e}from"./index-BI9AljSD.js";import{A as G}from"./AgentAvatar-B7c0egdP.js";import{M as J}from"./text-Faa3ZStB.js";import{j as Y,k as ee,l as O,m as se,M as _}from"./NewChatComposer-C_1op4dH.js";import{F as te}from"./file-text--hfhwZH1.js";import"./index-DfsTyYDx.js";import{c as I}from"./createLucideIcon-DthwWQIg.js";import{Z as ae}from"./zap-CIo8msJB.js";import{X as ne}from"./x-DfRJbqrh.js";const re=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],oe=I("pencil",re);const ce=[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]],ie=I("reply",ce),U="Only markdown, code, images, and video clips can be attached.";function we(){const[t,c]=h.useState([]),[g,x]=h.useState(null),[d,p]=h.useState(null),[i,j]=h.useState(0),n=h.useRef(null),f=h.useCallback((r,l="Attached")=>{const m=r.filter(Y);return m.length===0?(r.length>0&&p(U),0):(p(null),c(v=>{const F=new Set(v.map(u=>`${u.name}:${u.size}:${u.lastModified}`)),R=m.filter(u=>!F.has(`${u.name}:${u.size}:${u.lastModified}`));return R.length>0?[...v,...R]:v}),x(m.length===1?`${l} ${m[0]?.name??"1 attachment"}.`:`${l} ${m.length} attachments.`),m.length)},[]),b=h.useCallback(r=>{c(l=>l.filter(m=>m!==r)),x(null)},[]),$=h.useCallback(()=>{c([]),x(null),p(null),j(0)},[]),y=h.useCallback(()=>{n.current?.click()},[]),E=h.useCallback(r=>{const l=ee(r.clipboardData);l.length!==0&&(r.preventDefault(),f(l,"Pasted"))},[f]),k=h.useMemo(()=>({onDragOver:r=>{O(r.dataTransfer)&&(r.preventDefault(),j(l=>l===0?1:l))},onDragLeave:r=>{r.currentTarget.contains(r.relatedTarget)||j(0)},onDrop:r=>{if(!O(r.dataTransfer))return;r.preventDefault(),j(0);const l=se(r.dataTransfer);if(l.length===0){p(U);return}f(l,"Dropped")}}),[f]);return{files:t,hasFiles:t.length>0,feedback:g,error:d,dragActive:i>0,stage:f,remove:b,clear:$,setError:p,openPicker:y,dropHandlers:k,onPaste:E,inputRef:n}}function le(t){if(t<1024)return`${t} B`;const c=t/1024;return c<1024?`${c.toFixed(0)} KB`:`${(c/1024).toFixed(1)} MB`}function de(t){return(t.split(".").pop()?.toUpperCase()??"FILE").slice(0,4)}function me({file:t,onRemove:c}){const g=h.useMemo(()=>URL.createObjectURL(t),[t]);h.useEffect(()=>()=>URL.revokeObjectURL(g),[g]);const x=t.type.startsWith("video/"),d=t.type.startsWith("image/"),p=de(t.name),i=le(t.size);return e.jsxs("div",{className:"s-msg-compose-attachment surface-card surface-card--inset",children:[x?e.jsx("video",{src:g,muted:!0,playsInline:!0}):d?e.jsx("img",{src:g,alt:t.name}):e.jsxs("div",{className:"s-msg-compose-attachment-file",title:`${t.name} (${i})`,children:[e.jsxs("div",{className:"s-msg-compose-attachment-file-icon",children:[e.jsx(te,{size:16,"aria-hidden":"true"}),e.jsx("span",{className:"s-msg-compose-attachment-ext label-xs",children:p})]}),e.jsx("span",{className:"s-msg-compose-attachment-name",children:t.name}),e.jsx("span",{className:"s-msg-compose-attachment-size label-xs text-dim",children:i})]}),e.jsx("button",{type:"button",className:"s-msg-compose-attachment-remove btn btn--ghost btn--icon","aria-label":`Remove ${t.name}`,title:`Remove ${t.name}`,onClick:c,children:"×"})]})}function ue({attachments:t,accept:c="image/*,video/*,text/markdown,.md,.markdown,text/plain,.txt"}){const{files:g,feedback:x,error:d,remove:p,stage:i,inputRef:j}=t;return e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:j,type:"file",multiple:!0,accept:c,className:"s-msg-compose-file-input",onChange:n=>{i([...n.target.files??[]]),n.target.value=""}}),g.length>0?e.jsx("div",{className:"s-msg-compose-attachments","aria-label":"Staged attachments",children:g.map(n=>e.jsx(me,{file:n,onRemove:()=>p(n)},`${n.name}:${n.size}:${n.lastModified}`))}):null,d?e.jsx("div",{className:"s-msg-compose-attach-note","data-tone":"error",role:"alert",children:d}):x?e.jsx("div",{className:"s-msg-compose-attach-note","data-tone":"muted",role:"status",children:x}):null]})}function pe({composeRef:t,draft:c,setDraft:g,composePlaceholder:x,slashState:d,setSlashState:p,filteredSlashCommands:i,applySlashCommand:j,mentionState:n,setMentionState:f,filteredMentions:b,applyMention:$,updateTriggersFromDraft:y,closeSuggestions:E,replyTarget:k,onCancelReply:r,isStopMode:l,sending:m,composeAction:v,onSend:F,onInterrupt:R,attachments:u,isAgentBusy:H,busyIntent:D,onBusyIntentChange:L,queued:N,queueNote:K,onEditQueued:B,editingQueuedId:w,editingAttachmentCount:A,onCancelEdit:W,onUnqueue:S,onSendQueuedNow:Q}){const Z=e.jsxs(e.Fragment,{children:[d.open?e.jsx(_,{label:"Slash commands",items:i.map(s=>({id:s.command,token:s.label,description:s.description})),activeIndex:d.index,onPick:s=>{const a=i[s];a&&j(a)},onActiveIndexChange:s=>p(a=>({...a,index:s}))}):null,n.open?e.jsx(_,{label:"Mention agent",items:b.map(s=>({id:s.id,token:`@${s.handle}`,description:s.name,avatarNode:e.jsx(G,{name:s.name,size:20,tile:!0,presence:!1})})),activeIndex:n.index,onPick:s=>{const a=b[s];a&&$(a)},onActiveIndexChange:s=>f(a=>({...a,index:s}))}):null]}),V=c.trim().length>0,q=w!==null,P=V||u.hasFiles||A>0,z=H&&P,C=z&&D==="steer",T=q?N.findIndex(s=>s.id===w)+1:0,M=z?e.jsxs("div",{className:"s-msg-compose-mode",role:"group","aria-label":"What Send does while this turn is running",children:[e.jsx("button",{type:"button",className:"s-msg-compose-mode-btn","data-mode":"queue","aria-pressed":D==="queue",title:"Hold this draft until the running turn lands",disabled:m,onClick:()=>L("queue"),children:"Queue"}),e.jsx("button",{type:"button",className:"s-msg-compose-mode-btn","data-mode":"steer","aria-pressed":D==="steer",title:"Interrupt the running turn and deliver this now",disabled:m,onClick:()=>L("steer"),children:"Steer"})]}):null,X=N.length>0||M?e.jsxs("div",{className:"s-msg-compose-queue",role:"group","aria-label":"Queued messages",children:[e.jsxs("div",{className:"s-msg-compose-queue-head",children:[e.jsx("span",{className:"s-msg-compose-queue-kicker",children:N.length>0?`Queue · ${N.length}`:"Queues next"}),e.jsx("span",{className:"s-msg-compose-queue-hint",children:q?C?`Rewriting ${T} — send interrupts this turn`:`Rewriting ${T} — send returns it to its place`:N.length>0?C?"Send interrupts this turn":K??"":C?"Interrupts this turn on send":"Sends when this turn lands"}),M]}),N.map((s,a)=>e.jsxs("div",{className:"s-msg-compose-queue-row","data-editing":s.id===w?"true":void 0,children:[e.jsx("span",{className:"s-msg-compose-queue-index",children:a+1}),e.jsx("span",{className:"s-msg-compose-queue-body",children:s.body.trim()||"Attachments only"}),s.attachments.length>0?e.jsxs("span",{className:"s-msg-compose-queue-clip",children:[s.attachments.length," file",s.attachments.length===1?"":"s"]}):null,s.id===w?e.jsx("button",{type:"button",className:"s-msg-compose-queue-edit btn btn--sm btn--ghost",title:"Stop rewriting — leave this row as it was","aria-label":`Cancel rewriting queued message ${a+1}`,onClick:W,children:"Cancel edit"}):e.jsxs("button",{type:"button",className:"s-msg-compose-queue-edit btn btn--sm btn--ghost",title:"Pull this back into the input box to rewrite it","aria-label":`Edit queued message ${a+1}`,disabled:m||q,onClick:()=>B(s.id),children:[e.jsx(oe,{size:11,"aria-hidden":"true"}),e.jsx("span",{children:"Edit"})]}),e.jsxs("button",{type:"button",className:"s-msg-compose-queue-now btn btn--sm btn--accent",title:"Interrupt this turn and send this now","aria-label":`Send queued message ${a+1} now`,disabled:m||s.id===w,onClick:()=>Q(s.id),children:[e.jsx(ae,{size:11,"aria-hidden":"true"}),e.jsx("span",{children:"Send now"})]}),e.jsx("button",{type:"button",className:"s-msg-compose-queue-drop btn btn--ghost btn--icon",title:"Cancel — drop this from the queue","aria-label":`Cancel queued message ${a+1}`,onClick:()=>S(s.id),children:"×"})]},s.id))]}):null;return e.jsx(J,{density:"thread",value:c,onChange:(s,a)=>{g(s),y(s,a?.caret??s.length)},onSend:F,placeholder:x,sending:m,stopMode:l,onStop:R,canSend:P,sendTitle:C?"Steer — interrupt this turn and send now (Cmd+Enter)":z?"Queue for the next turn (Cmd+Enter)":"Send (Cmd+Enter)",sendAriaLabel:C?"Steer — interrupt this turn and send now (Cmd+Enter)":z?"Queue message for the next turn (Cmd+Enter)":v==="steer"?"Send follow-up (Cmd+Enter)":"Send message (Cmd+Enter)",showAttach:!0,onAttach:u.openPicker,onPaste:u.onPaste,dropHandlers:u.dropHandlers,dragActive:u.dragActive,textareaRef:t,overlay:Z,above:X,aboveAttached:!0,header:e.jsxs(e.Fragment,{children:[k?e.jsxs("div",{className:"s-thread-compose-reply surface-card surface-card--inset",role:"status",children:[e.jsx(ie,{className:"s-thread-compose-reply-icon text-muted",size:13,strokeWidth:1.8,"aria-hidden":"true"}),e.jsx("span",{className:"s-thread-compose-reply-label label-xs text-muted",children:"Replying to"}),e.jsx("span",{className:"s-thread-compose-reply-actor chip chip--sm chip--mono chip--neutral",children:k.actorLabel}),e.jsx("span",{className:"s-thread-compose-reply-preview text-muted",title:k.preview,children:k.preview}),e.jsx("button",{type:"button",className:"s-thread-compose-reply-cancel btn btn--ghost btn--icon","aria-label":"Cancel reply",title:"Cancel reply",onClick:r,children:e.jsx(ne,{size:13,strokeWidth:1.8,"aria-hidden":"true"})})]}):null,q&&A>0?e.jsxs("div",{className:"s-msg-compose-carried",role:"status",children:[A," file",A===1?"":"s"," stay attached to this draft"]}):null,e.jsx(ue,{attachments:u})]}),tools:e.jsxs("span",{className:"s-thread-compose-hint s-msg-compose-tools-hint",children:[e.jsx("kbd",{className:"s-kbd",children:"/"})," commands"," · ",e.jsx("kbd",{className:"s-kbd",children:"@"})," agents"]}),onSelect:s=>{const a=s.currentTarget;y(a.value,a.selectionStart)},onBlur:()=>{setTimeout(E,120)},onKeyDown:s=>{if(!(d.open&&i.length>0||n.open&&b.length>0))return!1;if(s.key==="ArrowDown")return d.open?p(o=>({...o,index:(o.index+1)%i.length})):n.open&&f(o=>({...o,index:(o.index+1)%b.length})),!0;if(s.key==="ArrowUp")return d.open?p(o=>({...o,index:(o.index-1+i.length)%i.length})):n.open&&f(o=>({...o,index:(o.index-1+b.length)%b.length})),!0;if(s.key==="Escape")return E(),!0;if((s.key==="Enter"||s.key==="Tab")&&!s.shiftKey&&!s.metaKey&&!s.ctrlKey&&!s.altKey){if(d.open){const o=i[d.index]??i[0];o&&j(o)}else if(n.open){const o=b[n.index]??b[0];o&&$(o)}return!0}return!1}})}const Ce=Object.freeze(Object.defineProperty({__proto__:null,ConversationComposer:pe},Symbol.toStringTag,{value:"Module"}));export{pe as C,Ce as a,we as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./index-BI9AljSD.js";import{M as p}from"./message-markup-Cc_O-WdA.js";import{f as d}from"./conversation-model-QsJVfSeG.js";import{t as n}from"./time-Dhsh_2EG.js";import"./mentions-DuLQnEcn.js";import"./colors-BtO5_zlx.js";import"./index-DfsTyYDx.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./Provider-Bu-C8Hxc.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.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 it({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{it as FanOutRow,l as ThreadDayDivider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as k,j as e,H as G}from"./index-BI9AljSD.js";import{c as A}from"./clipboard-e3fSpeo7.js";import{b as K}from"./router-DTtux5sP.js";import{A as M}from"./AgentAvatar-B7c0egdP.js";import{H as J}from"./HarnessMark-DAaWPiT_.js";import{a as Q}from"./Provider-Bu-C8Hxc.js";import{n as Z,c as ee}from"./colors-BtO5_zlx.js";import{B as te}from"./BackToPicker-Cto0Ioz9.js";import{o as P}from"./openContent-C6XO6kr5.js";import{AstronautSuit as se}from"./AstronautSuit-Cjjcv6yQ.js";import{v as ne,w as ae}from"./conversation-model-QsJVfSeG.js";import{E as re}from"./eye-FnaaPfja.js";import{c as oe}from"./createLucideIcon-DthwWQIg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./index-DfsTyYDx.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./time-Dhsh_2EG.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 ot({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 it({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 lt({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{lt as AddParticipantForm,ot as ConversationHeader,it as ConversationIdentityRow};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-BFLHX2eg.js","assets/gestures-3gw5VgUS.js","assets/index-BI9AljSD.js","assets/index-i7TMxlwW.css","assets/use-reduced-motion-8WuxLa5l.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as e,r as g,_ as z}from"./index-BI9AljSD.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-QsJVfSeG.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-Bu-C8Hxc.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-8WuxLa5l.js";import{L as ie,m as f}from"./proxy-1BABCaDb.js";import{C as ne}from"./chevron-down-C475vltS.js";import{C as re}from"./chevron-right-CnZRSd-V.js";import{A as oe}from"./activity-CqZafWfx.js";import{T as ce}from"./terminal-C3YRPfyz.js";import{M as le}from"./message-circle-B2DoYKDO.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-BFLHX2eg.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};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r,r as o}from"./index-BI9AljSD.js";import{o as ht,w as aa,q as Jt,s as Fs,t as ra,u as oa,v as ia,x as Os,y as la,z as ca,A as da,B as ua}from"./NewChatComposer-C_1op4dH.js";import{a as B}from"./api-Co9aQ2Jw.js";import"./text-Faa3ZStB.js";import{u as ma,C as ha}from"./ConversationComposer-H8_hsYSc.js";import"./index-DfsTyYDx.js";import{u as pa,d as fa,a as ga}from"./Provider-Bu-C8Hxc.js";import{d as ya,b as ba,x as ne,y as Ps,z as wa,A as Ce,B as Sa,D as Ta,E as xa,F as va,c as qs,S as Ds,G as Ca,H as Ma,I as Na,J as ka,K as Aa,L as Ia,M as ja,e as Bs,N as Ra,O as Ea,n as La,p as $a,r as Gt,P as Fa,Q as Oa,R as Pa,T as qa,g as Da,U as Ba,V as Ua,W as Us,X as Ha,Y as Wa,Z as Qe,u as _a,_ as Ka,$ as Qa,a0 as Hs,a1 as za,a2 as Va,a3 as Ja,a4 as Ga,a5 as Ws,a6 as Ya,a7 as _s,a8 as Xa,a9 as Za,aa as er}from"./conversation-model-QsJVfSeG.js";import{u as tr}from"./sse-DDHEHUgz.js";import{n as Yt,t as pt,f as Ks}from"./time-Dhsh_2EG.js";import{M as sr}from"./message-markup-Cc_O-WdA.js";import{c as Qs,i as Xt,b as nr}from"./message-visibility-CGOmSSKs.js";import{d as ar}from"./operator-attention-RqieiSY8.js";import{b as rr}from"./router-DTtux5sP.js";import{f as Zt,a as or}from"./scoutbot-BJIamJOH.js";import{s as ir}from"./sessionRead-CvFz2RHv.js";import{o as ft}from"./openContent-C6XO6kr5.js";import{c as ze}from"./clipboard-e3fSpeo7.js";import{A as es}from"./AgentAvatar-B7c0egdP.js";import{d as lr}from"./types-B0PlfpKc.js";/* empty css */import{ConversationHeader as cr,ConversationIdentityRow as dr,AddParticipantForm as ur}from"./ConversationHeader-B0ZBhE_E.js";import{FanOutRow as mr,ThreadDayDivider as hr}from"./ConversationFeedRows-hlEFlURs.js";import{T as pr,t as zs,m as Vs,a as fr,b as gr,o as yr,d as br,s as wr,l as Sr,c as Tr,e as xr,W as vr,f as Cr,g as Mr}from"./ConversationPanels-fMo6Uy1v.js";import{u as Nr}from"./tail-events-BdUrO0kb.js";import{PinnedAskCard as kr,ConversationStatusStrip as Ar}from"./ConversationStatus-DI5GCiyW.js";import"./HarnessMark-DAaWPiT_.js";import"./colors-BtO5_zlx.js";import"./NewChatOrigin-D7hwp6dm.js";import"./keyboard-nav-e6yGeorb.js";import"./x-DfRJbqrh.js";import"./createLucideIcon-DthwWQIg.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./loader-circle-B2W9DPG5.js";import"./file-text--hfhwZH1.js";import"./perf-PX8Rx0EP.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./zap-CIo8msJB.js";import"./surface-activity-B1rgWB1i.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./index-BWHgHrtv.js";import"./mentions-DuLQnEcn.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./BackToPicker-Cto0Ioz9.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./activity-CqZafWfx.js";import"./message-circle-B2DoYKDO.js";import"./check-DbIkldnK.js";import"./sparkles-Cf8gin88.js";const Zs="scout:conversations:failure-dismissals:v1",Ir=64;let ns={};function en(){try{if(typeof localStorage<"u"){const n=JSON.parse(localStorage.getItem(Zs)??"null");Er(n)&&(ns=as(n))}}catch{}return as(ns)}function jr(n){ns=as(n);try{typeof localStorage<"u"&&localStorage.setItem(Zs,JSON.stringify(n))}catch{}}function Js(n){return new Set(en()[n]??[])}function Rr(n,c){const d=en(),f=(d[n]??[]).filter(k=>k!==c);f.push(c),d[n]=f.slice(-100);const y=Object.keys(d);for(const k of y.slice(0,Math.max(0,y.length-Ir)))delete d[k];return jr(d),new Set(d[n])}function as(n){return Object.fromEntries(Object.entries(n).map(([c,d])=>[c,[...d]]))}function Er(n){return!n||typeof n!="object"||Array.isArray(n)?!1:Object.values(n).every(c=>Array.isArray(c)&&c.every(d=>typeof d=="string"&&d.length>0))}const Lr=/\.(?:apng|avif|gif|jpe?g|png|svg|webp)(?:$|[?#])/iu,$r=/\bhttps?:\/\/[^\s<>"')\]]+/giu;function Ve(n){if(typeof n!="string")return null;try{const c=new URL(n.trim());return c.protocol==="http:"||c.protocol==="https:"?c.toString():null}catch{return null}}function z(n,c){const d=n?.[c];return typeof d=="string"&&d.trim()?d.trim():null}function Fr(n){return n.mediaType.toLowerCase().startsWith("image/")}function Or(n){return Lr.test(n)}function Pr(n){try{const c=new URL(n),d=[c.pathname==="/"?"":c.pathname,c.search].join("").trim();return{host:c.hostname.replace(/^www\./iu,""),detail:d||c.hostname}}catch{return{host:n,detail:n}}}function qr(n){const c=new Set,d=[];for(const f of n.matchAll($r)){const y=f[0]?.replace(/[.,;:!?]+$/u,""),k=Ve(y);!k||c.has(k)||(c.add(k),d.push(k))}return d}const Dr=/^\/api\/blobs\/[^/]+$/u;function ts(n){try{const c=new URL(n);return Dr.test(c.pathname)?`${c.pathname}${c.search}`:n}catch{return n}}function gt(n){return Ve(n.url)??Ve(z(n.metadata,"url"))??Ve(z(n.metadata,"href"))}function Br(n){const c=n.metadata??null,d=z(c,"kind")??z(c,"type"),f=gt(n);if(!f||d!=="link_preview"&&d!=="link-preview"&&n.mediaType!=="text/x-uri")return null;const y=Pr(f);return{id:n.id,url:f,title:z(c,"title")??y.host,description:z(c,"description"),imageUrl:Ve(z(c,"imageUrl")??z(c,"image")),siteName:z(c,"siteName")??y.host}}function Ur({src:n,alt:c}){const[d,f]=o.useState(!1);return d?r.jsxs("a",{className:"s-message-embed s-message-embed--file",href:n,target:"_blank",rel:"noreferrer",children:[r.jsx("span",{className:"s-message-embed-title",children:c}),r.jsx("span",{className:"s-message-embed-description",children:"Preview unavailable"})]}):r.jsx("a",{className:"s-message-embed s-message-embed--image",href:n,target:"_blank",rel:"noreferrer",children:r.jsx("img",{src:n,alt:c,loading:"lazy",decoding:"async",onError:()=>f(!0)})})}function Hr({preview:n}){return r.jsxs("a",{className:"s-message-embed s-message-embed--link",href:n.url,target:"_blank",rel:"noreferrer",children:[n.imageUrl&&r.jsx("span",{className:"s-message-embed-thumb",children:r.jsx("img",{src:n.imageUrl,alt:"",loading:"lazy",decoding:"async"})}),r.jsxs("span",{className:"s-message-embed-copy",children:[n.siteName&&r.jsx("span",{className:"s-message-embed-site",children:n.siteName}),r.jsx("span",{className:"s-message-embed-title",children:n.title}),n.description&&r.jsx("span",{className:"s-message-embed-description",children:n.description})]})]})}function Wr({message:n}){const c=n.attachments??[],d=new Set,f=[],y=[];for(const h of c){const $=gt(h);if($&&Fr(h)){d.add(h.id),f.push({id:h.id,src:ts($),alt:h.fileName??"Image attachment"});continue}const b=Br(h);b&&(d.add(h.id),y.push(b))}const k=new Set(y.map(h=>h.url)),G=new Set(c.map(gt).filter(h=>!!h));for(const h of qr(n.body))G.has(h)||k.has(h)||Or(h)&&f.push({id:h,src:ts(h),alt:"Embedded image"});const N=c.filter(h=>!d.has(h.id));return f.length===0&&y.length===0&&N.length===0?null:r.jsxs("div",{className:"s-message-embeds",children:[f.map(h=>r.jsx(Ur,{src:h.src,alt:h.alt},h.id)),y.slice(0,1).map(h=>r.jsx(Hr,{preview:h},h.id)),N.map(h=>{const $=gt(h),b=$?ts($):null,u=h.fileName??z(h.metadata,"title")??h.mediaType;return b?r.jsxs("a",{className:"s-message-embed s-message-embed--file",href:b,target:"_blank",rel:"noreferrer",children:[r.jsx("span",{className:"s-message-embed-title",children:u}),r.jsx("span",{className:"s-message-embed-description",children:h.mediaType})]},h.id):r.jsxs("div",{className:"s-message-embed s-message-embed--file",children:[r.jsx("span",{className:"s-message-embed-title",children:u}),r.jsx("span",{className:"s-message-embed-description",children:h.mediaType})]},h.id)})]})}function _r(n){const{sessionIds:c,active:d}=n,f=c.join("|"),y=d&&c.length>0,[k,G]=o.useState([]);return o.useEffect(()=>{G([])},[f]),o.useEffect(()=>{if(!y)return;let N=!1;const h=new URLSearchParams({limit:String(pr*3),transcripts:"true"});return B(`/api/tail/recent?${h.toString()}`).then($=>{if(N)return;const b=($.events??[]).filter(u=>zs(u,c));b.length!==0&&G(u=>Vs(u,b))}).catch(()=>{}),()=>{N=!0}},[y,f]),Nr(N=>{y&&zs(N,c)&&G(h=>Vs(h,[N]))},y),o.useMemo(()=>y?fr(k):[],[y,k])}const Kr=3500;function Gs(n){const c=n?.trim().replace(/^#/,"");if(!c?.startsWith("msg-"))return null;const d=c.slice(4).trim();if(!d)return null;try{return decodeURIComponent(d)}catch{return d}}const Qr=64;function zr(n){const c=n?.clientMessageId;return typeof c=="string"&&c.trim()?c.trim():null}function Ys(n){const c=n.body.replace(/\s+/gu," ").trim();if(c)return c.length>180?`${c.slice(0,179).trimEnd()}…`:c;const d=n.attachments?.length??0;return d===1?"Attachment":d>1?`${d} attachments`:"Message"}function Xs(n,c){const d=n.toLocaleLowerCase().indexOf(c.toLocaleLowerCase());if(d<0)return n;const f=n.slice(0,d),y=n.slice(d+c.length);return!f&&y.startsWith(" ")?y.slice(1):f.endsWith(" ")&&y.startsWith(" ")?`${f}${y.slice(1)}`:`${f}${y}`}function Vr(n){return n instanceof TypeError||typeof DOMException<"u"&&n instanceof DOMException&&n.name==="AbortError"}function mi({conversationId:n,initialDraft:c,navigate:d,embedded:f,showBackNav:y=!0,treatment:k="standard"}){const{agents:G,route:N,openContextCapture:h}=pa(),$=rr(N),b=o.useMemo(()=>fa(G,$),[G,$]),[u,yt]=o.useState(null),rs=o.useRef(null);rs.current=u;const Je=o.useMemo(()=>ht(n),[n]),[tn,sn]=o.useState(()=>Je?{[n]:Je}:{}),T=tn[n]??Je??[],[nn,os]=o.useState(()=>Je!==null),Me=o.useRef(null),is=o.useMemo(()=>{const t=Me.current;return t===null?null:new Set(T.filter(e=>!t.has(e.id)).map(e=>e.id))},[T]),Ge=Me.current===null&&T.length>0;o.useEffect(()=>{if(T.length===0)return;const t=Me.current??new Set;for(const e of T)t.add(e.id);Me.current=t},[T]),o.useEffect(()=>{Me.current=null,os(ht(n)!==null)},[n]);const ls=!nn&&T.length===0,V=o.useCallback(t=>{sn(e=>{const s=e[n]??ht(n)??[],a=typeof t=="function"?t(s):t,i=aa(n,a);return{...e,[n]:i}})},[n]),an=Jt(n),[g,ge]=o.useState(an),[Ne,ke]=o.useState([]),[Ye,bt]=o.useState(null),[Xe,Ae]=o.useState(null),[Ze,rn]=o.useState(()=>typeof window>"u"?null:Gs(window.location.hash)),[cs,ae]=o.useState(null),[wt,ds]=o.useState(()=>Js(n)),[ye,St]=o.useState(!1),[on,Ie]=o.useState(!1),[Tt,et]=o.useState(0),je=o.useRef(null),Re=o.useRef(null),ln=o.useRef(null),Ee=o.useRef(!0),tt=o.useRef(!1),be=o.useRef(null),A=o.useRef(null),Le=o.useRef(new Set),$e=o.useRef(null),us=o.useRef(0),ms=o.useRef(null),Fe=o.useRef(null),Oe=o.useRef(new Set),Y=o.useRef(n);Y.current=n;const re=o.useRef(new Map),cn=Fs(n),st=o.useRef(!1);o.useLayoutEffect(()=>{const t=Re.current,e=je.current;!t||!e||(e.scrollTop=t.scrollTop+(e.scrollHeight-t.scrollHeight),Re.current=null,st.current=!0)}),o.useEffect(()=>{St(!1),Re.current=null,st.current=!1,Ee.current=!0,tt.current=!1,Ie(!1),et(0),Ut(new Set),re.current.clear(),ge(Jt(n)),ds(Js(n))},[n]);const nt=o.useCallback(async t=>{let s=typeof t.metadata?.flightId=="string"?t.metadata.flightId.trim():"";if(!s&&t.replyToMessageId)try{s=(await B(`/api/flights?conversationId=${encodeURIComponent(n)}&active=false`)).find(i=>i.messageId===t.replyToMessageId)?.id??""}catch{}await ar({...s?{flightId:s}:{},conversationId:n,messageId:t.replyToMessageId??t.id,itemUpdatedAt:Yt(t.createdAt)??Date.now()})},[n]),hs=o.useCallback(t=>{const e=t.replyToMessageId??t.id;ds(Rr(n,t.id)),Zt({type:"dismiss-conversation-failure",conversationId:n,messageId:e,reason:"The operator cleared this delivery issue"});const s=`${n}:${t.id}`;Oe.current.add(s),nt(t).catch(()=>{Oe.current.delete(s)})},[n,nt]);o.useEffect(()=>{for(const t of T){if(!wt.has(t.id)||!Qs(t))continue;const e=`${n}:${t.id}`;Oe.current.has(e)||(Oe.current.add(e),nt(t).catch(()=>{Oe.current.delete(e)}))}},[n,wt,T,nt]);const v=u?.agentId??null,M=u?.kind==="direct",xt=o.useMemo(()=>new Set([n,...u?.equivalentConversationIds??[]]),[n,u?.equivalentConversationIds]),K=o.useMemo(()=>v?b.find(t=>t.id===v)??null:null,[b,v]),ps=ya(u),dn=ba({resolvedAgentId:K?.id,sessionId:ps,machineId:$}),[vt,fs]=o.useState(null);o.useEffect(()=>{B("/api/fleet").then(t=>{fs(e=>ne(e,Ps(t.activeAsks,n,v)))}).catch(()=>{})},[n,v]);const U=o.useCallback(async(t={})=>{const e=t.messageMode??"none",s=t.includeMetadata??!0;ae(null);try{const a=s?await B(`/api/session/${encodeURIComponent(n)}`).catch(()=>null):rs.current;if(Y.current!==n)return;yt(x=>ne(x,a));const i=a?.agentId??null,l=a?.id&&a.id!==n?a.id:n;if(l!==n){d({view:"conversation",conversationId:l});return}const m=ht(l),R=ra(l),w=e==="initial"&&!R,p=e==="refresh"||e==="initial",S=Promise.all([B(`/api/flights?conversationId=${encodeURIComponent(l)}`).catch(()=>[]),B("/api/fleet?limit=24&activityLimit=160").catch(()=>wa())]),W=await(w?oa(l):p?ia(l,{refresh:!0}):Promise.resolve(m));if(Y.current!==n)return;const L=Ce(W??[]),fe=L.filter(x=>!Xt(x));W&&V(x=>ne(x,Sa(x,fe))),os(!0),ir(l);const E=L.at(-1);E&&Fe.current!==E.id&&(Fe.current=E.id,B(`/api/conversations/${encodeURIComponent(l)}/read-cursor`,{method:"POST",body:JSON.stringify({lastReadMessageId:E.id})}).catch(()=>{Fe.current===E.id&&(Fe.current=null)}));const[se,Q]=await S;if(Y.current!==n)return;const _=Ta(se),J=Jt(l),ve=_??J;Le.current=new Set([...se.map(x=>x.invocationId),...J?.invocationId?.startsWith("pending:")?[]:J?.invocationId?[J.invocationId]:[]]),_&&J?.id===_.id&&Os(l,_.id);const P=ve?.agentId??i??null,Vt=xa(Q.activity,ve,l,P),mt=va(Q.activeAsks,ve,l,P);ge(x=>ne(x,ve)),ke(x=>ne(x,Vt)),Ae(x=>ne(x,mt)),fs(x=>ne(x,Ps(Q.activeAsks,l,i)))}catch(a){if(Y.current!==n)return;ae(a instanceof Error?a.message:String(a))}},[n,d,V]);o.useEffect(()=>{U({messageMode:"initial"})},[U]),o.useEffect(()=>{Fe.current=null},[n]),o.useEffect(()=>{$e.current=g},[g]);const un=o.useCallback(async()=>{if(ye||!Fs(n))return;const t=je.current,e=t?{scrollHeight:t.scrollHeight,scrollTop:t.scrollTop}:null;St(!0),ae(null);try{const s=await la(n);if(Y.current!==n)return;e&&(Re.current=e),V(Ce(s).filter(a=>!Xt(a)))}catch(s){Y.current===n&&ae(s instanceof Error?s.message:String(s))}finally{Y.current===n&&St(!1)}},[n,ye,V]),[I,D]=o.useState(()=>c??""),[oe,ie]=o.useState(null),[H,at]=o.useState(!1),[C,mn]=o.useState("operator"),[le,Pe]=o.useState({open:!1,query:"",triggerStart:-1,index:0}),[ce,qe]=o.useState({open:!1,query:"",triggerStart:-1,index:0}),[F,X]=o.useState(null),[Ct,rt]=o.useState(!1),[Mt,ot]=o.useState(""),[hn,De]=o.useState(null),[pn,Nt]=o.useState(!1);o.useEffect(()=>{rt(!1),ot(""),De(null),Nt(!1)},[n]),o.useEffect(()=>{if(!c)return;const t=`${n}:${c}`;ms.current!==t&&(ms.current=t,D(c),requestAnimationFrame(()=>A.current?.focus()))},[n,c]);const Z=o.useMemo(()=>{const t=new Map;for(const e of u?.participants??[])t.set(e.actorId,e),e.agentId&&t.set(e.agentId,e);return t},[u]),kt=o.useMemo(()=>{const t=new Set,e=[];for(const s of u?.participantIds??[]){if(s==="operator")continue;const a=Z.get(s),i=a?.scopedAlias?.trim().replace(/^@+/,"");if(!i)continue;const l=i.toLowerCase();t.has(l)||(t.add(l),e.push({id:s,label:a?.label??a?.displayName??i,name:a?.displayName??i,handle:i}))}for(const s of b){const a=s.handle?.trim().replace(/^@+/,"")??qs(s.id)??s.id;if(!a)continue;const i=a.toLowerCase();t.has(i)||(t.add(i),e.push({id:s.id,label:a,name:s.name??a,handle:a}))}return e.sort((s,a)=>s.handle.localeCompare(a.handle))},[Z,b,u]),fn=o.useMemo(()=>{if(!le.open)return[];const t=le.query.toLowerCase();return t?Ds.filter(e=>e.command.toLowerCase().startsWith("/"+t)||e.command.toLowerCase().includes(t)):Ds},[le.open,le.query]),gn=o.useMemo(()=>{if(!ce.open)return[];const t=ce.query.toLowerCase();return t?kt.filter(e=>e.handle.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)).slice(0,8):kt.slice(0,8)},[ce.open,ce.query,kt]),yn=o.useCallback(()=>{Pe(t=>t.open?{...t,open:!1}:t),qe(t=>t.open?{...t,open:!1}:t)},[]),bn=o.useCallback((t,e)=>{const s=Ca(t,e);Pe(s?i=>({open:!0,query:s.query,triggerStart:s.start,index:i.open&&i.triggerStart===s.start?i.index:0}):i=>i.open?{...i,open:!1}:i);const a=Ma(t,e);qe(a?i=>({open:!0,query:a.query,triggerStart:a.start,index:i.open&&i.triggerStart===a.start?i.index:0}):i=>i.open?{...i,open:!1}:i)},[]),wn=o.useCallback(t=>{const e=A.current,s=le.triggerStart;if(s<0)return;const a=e?.selectionStart??I.length,i=I.slice(0,s),l=I.slice(a),m=t.insert,R=`${i}${m}${l}`;D(R),Pe(w=>({...w,open:!1})),requestAnimationFrame(()=>{const w=A.current;if(!w)return;const p=i.length+m.length;w.focus(),w.setSelectionRange(p,p)})},[I,le.triggerStart]),Sn=o.useCallback(t=>{const e=A.current,s=ce.triggerStart;if(s<0)return;const a=e?.selectionStart??I.length,i=I.slice(0,s),l=I.slice(a),m=l.length===0||!l.startsWith(" "),R=`@${t.handle}${m?" ":""}`,w=`${i}${R}${l}`;D(w),qe(p=>({...p,open:!1})),requestAnimationFrame(()=>{const p=A.current;if(!p)return;const S=i.length+R.length;p.focus(),p.setSelectionRange(S,S)})},[I,ce.triggerStart]);o.useEffect(()=>{const t=A.current;if(!t)return;t.style.height="0px";const e=Math.min(Math.max(t.scrollHeight,40),160);t.style.height=`${e}px`,t.style.overflowY=t.scrollHeight>e?"auto":"hidden"},[I]),o.useEffect(()=>{B("/api/user").then(t=>mn(t.name)).catch(()=>{})},[]);const it=o.useMemo(()=>Na(T,C),[T,C]);o.useEffect(()=>{F===null||it===null||it>=F&&X(null)},[F,it]);const Tn=o.useMemo(()=>ka(g),[g]),we=Date.now(),xn=Aa(g,it,we),At=Tn&&!Ia(g)&&!xn,gs=M&&(H||F!==null||At),ys=M&&ja({sending:H,awaitingResponse:F!==null,currentFlight:g}),O=Bs({name:K?.name,agentName:u?.agentName,id:v,title:u?.title}),j=o.useMemo(()=>M?Ra({agentName:O,agentState:K?.state??null,sending:H,currentFlight:g,showWorkingTurn:At,awaitingResponse:F!==null}):{label:"Open",detail:"",tone:"idle",showStrip:!1,showTyping:!1},[K?.state,O,F,g,we,M,H,At]),It=g?.startedAt??Xe?.startedAt??F,jt=Yt(It),bs=Ya(It,we),[,vn]=o.useState(0);o.useEffect(()=>{if(!j.showTyping||jt===null)return;const t=Math.max(0,Date.now()-jt),e=[Ws.sustained,Ws.long].find(a=>a>t);if(e===void 0)return;const s=window.setTimeout(()=>vn(a=>a+1),e-t+50);return()=>window.clearTimeout(s)},[jt,j.showTyping,bs]);const Cn="Live",Rt=o.useMemo(()=>Ea({currentFlight:g,presence:j,turnActivity:Ne,turnAsk:Xe,awaitingResponseSince:F,nowMs:we}),[F,g,we,j,Ne,Xe]),Mn="s-thread-msg-card s-thread-msg-working-card s-thread-msg-card--avatar-row",Nn="s-thread-msg-kind",kn="s-thread-turn-snapshot",An="s-thread-turn-snapshot-pulse",In="s-thread-presence-line",jn=["s-thread-presence-strip",`s-thread-presence-strip--${bs}`].filter(Boolean).join(" "),Et=u?La(u):O,ws=u?.id??n,Rn=u?.alias?.trim()||null,lt=$a(u?.workspaceRoot),En=j.tone,Lt=T.length===0&&M&&(j.showTyping||g!==null||Ne.length>0||Xe!==null||F!==null),Ss=o.useMemo(()=>u?u.participantIds.includes("operator"):M,[M,u]),Be=g?.agentId??v,Ue=Be?Gt(b,[Be]):null,He=Ue?.id??Be,We=g?.sessions.at(-1)?.sessionId??Ue?.harnessSessionId??void 0,Ts=g?.id?()=>{ft(d,{view:"sessions",flightId:g.id,...He?{agentId:He}:{},...We?{sessionId:We}:{},...$?{machineId:$}:{}},{returnTo:N})}:void 0,xs=g?.id??null;o.useEffect(()=>{if(!xs||!He){bt(null);return}let t=!1;const e=We?`?sessionId=${encodeURIComponent(We)}`:"",s=async()=>{try{const i=await B(`/api/agents/${encodeURIComponent(He)}/observe${e}`);if(t)return;bt(l=>ne(l,i))}catch{}};s();const a=window.setInterval(()=>{s()},Kr);return()=>{t=!0,window.clearInterval(a),bt(null)}},[xs,He,We]);const $t=o.useMemo(()=>gr({flight:g,agent:Ue??K,sessionMeta:u,observeSessionId:Ye?.sessionId}),[K,g,u,Ye?.sessionId,Ue]),vs=_r({sessionIds:$t,active:j.showTyping||Lt}),Ln=o.useMemo(()=>yr({observe:Ye,flight:g}),[g,Ye]),ee=vs.length>0?vs:Ln,Ft=o.useMemo(()=>ee.length>0?null:br({flight:g,hasSessionScope:$t.length>0,awaitingResponse:F!==null}),[F,g,$t.length,ee.length]),Ot=wr(ee),Pt=Sr(ee),Cs=ee.at(-1)??null,qt=Cs?pt(Cs.ts,we):null,de=o.useMemo(()=>Pt?{...Rt,latest:Pt,...Ot?{activityLabel:Ot}:{},...qt?{lastActivityLabel:qt}:{}}:Rt,[qt,Pt,Rt,Ot]),$n=`${O}: ${de.latest}`,Ms=Be&&Fa(Ue)?()=>{ft(d,{view:"terminal",agentId:Be,mode:"takeover"},{returnTo:N})}:void 0,Dt=M?()=>{f&&Zt({type:"focus-composer",reason:"Steer the active conversation"})||requestAnimationFrame(()=>{A.current?.focus({preventScroll:!0}),A.current?.scrollIntoView({block:"nearest"})})}:void 0,Fn=o.useMemo(()=>(u?u.participantIds.filter(e=>e!=="operator"):v?[v]:[]).map(e=>{const s=Gt(b,[e]),a=Z.get(e);return{id:e,name:a?.scopedAlias??s?.name??a?.displayName??qs(e)??e,title:a?.label??s?.id??e,agent:s,sessionId:a?.sessionId??null,harness:s?.harness??a?.harness??null,model:s?.model??null,reasoningEffort:s?.reasoningEffort??null}}),[v,Z,b,u]),On=o.useMemo(()=>({name:C,active:Ss}),[Ss,C]),ue=o.useMemo(()=>new Map(T.map(t=>[t.id,t])),[T]),Bt=o.useMemo(()=>b.find(t=>or(t)&&!!t.conversationId?.trim())?.conversationId?.trim()??null,[b]),_e=o.useMemo(()=>Oa(T),[T]),[Pn,Ut]=o.useState(()=>new Set),qn=o.useCallback(t=>{Ut(e=>{const s=new Set(e);return s.delete(t)||s.add(t),s})},[]),Ns=o.useMemo(()=>{const t=new Map;for(const e of _e)if(e.kind==="fanout")for(const s of e.messages)t.set(s.id,e.key);return t},[_e]),ct=o.useCallback(t=>{const e=Ns.get(t);e&&Ut(l=>l.has(e)?l:new Set(l).add(e));const s=document.getElementById(`msg-${t}`);if(!s)return;const a=s.closest(".s-thread-fanout")??s,i=a===s?"s-thread-msg--flash":"s-thread-fanout--flash";a.scrollIntoView({behavior:"smooth",block:"center"}),a.classList.add(i),window.setTimeout(()=>a.classList.remove(i),1200)},[Ns]);o.useEffect(()=>{const t=()=>rn(Gs(window.location.hash));return window.addEventListener("hashchange",t),()=>window.removeEventListener("hashchange",t)},[]),o.useEffect(()=>{if(!Ze||!ue.has(Ze))return;const t=window.setTimeout(()=>ct(Ze),50);return()=>window.clearTimeout(t)},[Ze,ue,ct]),tr(o.useCallback(t=>{if(t.kind==="message.posted"){const e=t.payload?.message;if(!e||!xt.has(e.conversationId))return;const s=e.actorId==="operator",a=M&&!s&&e.class==="agent",i={id:e.id,conversationId:e.conversationId,actorId:e.actorId,actorName:a?O:Pa(e.actorId,b,C),body:e.body,createdAt:e.createdAt,class:s?"operator":e.class,attachments:e.attachments,metadata:e.metadata,replyToMessageId:e.replyToMessageId??e.n??null};if(Xt(i))return;if(V(l=>{const m=zr(e.metadata),R=m?re.current.get(m):void 0;if(l.some(w=>w.id===e.id))return m&&re.current.delete(m),l;if(s&&m){const w=qa(l,m,R);if(w!==-1){const p=[...l];return p[w]=i,re.current.delete(m),Ce(p)}}return Ce([...l,i])}),a){const l=Yt(e.createdAt)??Date.now();X(m=>m===null||l<m||Da($e.current)?m:null),ge(m=>Ba(m)?null:m)}return}if(t.kind==="invocation.requested"){const e=t.payload?.invocation;if(!e||e.targetAgentId!==v||!e.conversationId||!xt.has(e.conversationId))return;Le.current.add(e.id),ke([]),Ae(null),X(s=>s??Date.now());return}if(t.kind==="flight.updated"){const e=t.payload?.flight;if(!e||e.targetAgentId!==v||!(Le.current.has(e.invocationId)||$e.current?.id===e.id))return;if(Ua.has(e.state)){Os(n,e.id),ge(l=>l?.id===e.id?null:l),ke([]),Ae(null),X(null),U({messageMode:"refresh",includeMetadata:!1});return}Le.current.add(e.invocationId);const a=$e.current?.id===e.id,i=Us(e,n,v??"",$e.current);Ha(i)&&X(null),ge(i),a||(ke([]),Ae(null));return}t.kind!=="agent.endpoint.upserted"&&t.kind==="unknown"&&U({messageMode:"refresh"})},[v,O,n,xt,M,U,C,b])),o.useEffect(()=>{if(!gs)return;const t=setInterval(()=>{U({messageMode:"refresh",includeMetadata:!1})},5e3);return()=>clearInterval(t)},[gs,U]),o.useEffect(()=>{const t=()=>{if(document.visibilityState!=="visible")return;const e=Date.now();e-us.current<1e3||(us.current=e,U({messageMode:"refresh"}))};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",t)}},[U]);const Ht=o.useRef(null),ks=o.useRef(!1),Wt=o.useRef(!1),_t=o.useCallback(t=>{const e=je.current;e&&(tt.current=!0,be.current!==null&&clearTimeout(be.current),t==="instant"?e.scrollTop=e.scrollHeight:e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),be.current=setTimeout(()=>{tt.current=!1,be.current=null},t==="smooth"?700:0))},[]);o.useEffect(()=>()=>{be.current!==null&&clearTimeout(be.current)},[]);const Dn=o.useCallback(()=>{const t=je.current;if(!t||tt.current)return;const s=t.scrollHeight-t.clientHeight-t.scrollTop<=Qr;Ee.current=s,s?(Ie(!1),et(0)):Ie(!0)},[]),Bn=o.useCallback(()=>{Ee.current=!0,Ie(!1),et(0),_t("smooth")},[_t]);o.useEffect(()=>{const t=T.at(-1)?.id??null,e=!!(t&&t!==Ht.current),s=Wa({newestMessageId:t,previousNewestMessageId:Ht.current,showTyping:j.showTyping,previousShowTyping:ks.current,historyRestorePending:st.current||Re.current!==null,initialScrollDone:Wt.current,nearBottom:Ee.current});s!=="none"?(_t(s),Wt.current=!0):e&&Wt.current&&!Ee.current&&(Ie(!0),et(a=>a+1)),st.current=!1,Ht.current=t,ks.current=j.showTyping});const[,Un]=o.useState(0);o.useEffect(()=>{const t=setInterval(()=>Un(e=>e+1),15e3);return()=>clearInterval(t)},[]);const me=ma(),[he,te]=o.useState([]),[As,dt]=o.useState("queue"),[Se,Te]=o.useState(null),xe=async(t,e)=>{const s=t.trim(),a=e?.attachments??[],i=e?.replyTarget??null;if(!s&&a.length===0||H)return"failed";const m=e?.forceAction??_s({isDm:M,hasOutstandingReply:ys}),R=Date.now(),w=da(),p={id:`optimistic-${w}`,conversationId:n,actorId:"operator",actorName:C,body:s,createdAt:R,class:"operator",...i?{replyToMessageId:i.messageId}:{},metadata:{clientMessageId:w,deliveryState:"sending"},...a.length>0?{attachments:a}:{}};at(!0),m!=="message"&&X(R),ae(null),re.current.set(w,p.id),V(S=>Ce([...S,p]));try{const S=await B(`/api/chats/${encodeURIComponent(n)}/messages`,{method:"POST",body:JSON.stringify({body:s,clientMessageId:w,...i?{replyToMessageId:i.messageId}:{},...a.length>0?{attachments:a}:{}})}),W=S.chatId?.trim()??S.conversationId?.trim();if(W&&W!==n)throw new Error(`Send returned a different Chat (${W}) instead of appending to ${n}.`);if(S.messageId?.trim()){const L=S.messageId.trim();V(fe=>Ce(fe.map(E=>E.id===p.id?{...E,id:L,metadata:{clientMessageId:w}}:E))),re.current.delete(w)}return S.flight?(Le.current.add(S.flight.invocationId),ge(Us(S.flight,n,v??"")),ke([]),Ae(null)):m!=="message"&&X(null),"sent"}catch(S){return Vr(S)?(V(W=>W.map(L=>L.id===p.id?{...L,metadata:{...L.metadata??{},deliveryState:"unknown"}}:L)),"unknown"):(V(W=>W.filter(L=>L.id!==p.id)),re.current.delete(w),X(null),ae(S instanceof Error?S.message:String(S)),"failed")}finally{at(!1)}},Hn=async t=>{const e=t.replyToMessageId?ue.get(t.replyToMessageId):null;if(!e||H)return;const s=[];for(const i of e.attachments??[]){if(!i.url){ae("This request includes an attachment that can’t be reused. Add it again, then retry."),requestAnimationFrame(()=>A.current?.focus());return}s.push({id:i.id,mediaType:i.mediaType,...i.fileName?{fileName:i.fileName}:{},url:i.url})}await xe(e.body,{forceAction:"invoke",attachments:s})!=="failed"&&hs(t)},Wn=(t,e,s)=>{if(!Bt)return;const a=t.replyToMessageId?ue.get(t.replyToMessageId)?.body.trim():"",i=a?`${a.slice(0,1200)}${a.length>1200?"…":""}`:"(The original request is no longer available in this transcript.)",l=[`Help me recover a failed request to ${e}.`,s,"","Original request:",i].join(`
|
|
2
|
-
`),m={view:"conversation",conversationId:Bt,composeDraft:l};f&&Zt({type:"navigate",route:m,reason:"Ask @scoutbot to help recover a failed conversation request"})||d(m)},_n=async()=>{const t=I.trim(),e=oe,s=me.files,a=Se?.attachments??[];if(!t&&s.length===0&&a.length===0)return null;let i=[];if(s.length>0){at(!0);try{i=await ua(s)}catch(l){return me.setError(l instanceof Error?l.message:String(l)),null}finally{at(!1)}}return D(""),ie(null),me.clear(),Te(null),{body:t,attachments:[...a,...i],replyTarget:e}},Kn=async()=>{const t=Za({isAgentBusy:pe,intent:As}),e=Se?.id??null,s=await _n();if(!s)return;if(t==="queue"){te(l=>e?l.map(m=>m.id===e?{...m,body:s.body,attachments:s.attachments,replyTarget:s.replyTarget}:m):[...l,{id:`queued-${Date.now()}-${l.length}`,body:s.body,attachments:s.attachments,replyTarget:s.replyTarget,queuedAt:Date.now()}]);return}e&&te(l=>l.filter(m=>m.id!==e));const a=()=>{D(s.body),Te(s.attachments.length>0?{id:null,attachments:s.attachments}:null),ie(s.replyTarget),requestAnimationFrame(()=>A.current?.focus())};if(t==="steer"){dt("queue"),await Qt(),await xe(s.body,{forceAction:"steer",attachments:s.attachments,replyTarget:s.replyTarget})==="failed"&&a();return}await xe(s.body,{attachments:s.attachments,replyTarget:s.replyTarget})==="failed"&&a()},Qn=t=>{te(e=>e.filter(s=>s.id!==t)),Te(e=>e?.id===t?null:e)},zn=t=>{const e=he.find(s=>s.id===t);e&&(D(e.body),ie(e.replyTarget??null),Te({id:t,attachments:e.attachments}),requestAnimationFrame(()=>{const s=A.current;s&&(s.focus(),s.setSelectionRange(s.value.length,s.value.length))}))},Vn=()=>{Te(null),D(""),ie(null),me.clear()},Jn=async t=>{const e=he.find(a=>a.id===t);if(!e)return;te(a=>a.filter(i=>i.id!==t)),await Qt(),await xe(e.body,{forceAction:"steer",attachments:e.attachments,replyTarget:e.replyTarget??null})==="failed"&&te(a=>[e,...a])},ut=o.useCallback((t,e)=>{const s=e?.trim().replace(/^@+/,"")||null,a=s?`@${s}`:null,i=oe?.insertedMention?Xs(I,oe.insertedMention):I,l=!!(!M&&a&&!i.toLocaleLowerCase().includes(a.toLocaleLowerCase())),m=l&&a?i.trim()?`${i.trimEnd()} ${a} `:`${a} `:i;D(m),ie({messageId:t.id,actorLabel:s?`@${s}`:t.actorName,preview:Ys(t),insertedMention:l?a:null}),requestAnimationFrame(()=>A.current?.focus())},[I,M,oe?.insertedMention]),Gn=o.useCallback(()=>{const t=oe?.insertedMention;ie(null),t&&D(e=>Xs(e,t)),requestAnimationFrame(()=>A.current?.focus())},[oe]),Kt=o.useCallback(t=>{const e=new URL(window.location.href);N.view==="agents-v2"&&e.searchParams.set("tab","message"),e.hash=`msg-${t}`,ze(e.toString())},[N.view]),Is=o.useCallback((t,e,s)=>{const a=ca({conversationId:n,selectedMessageId:t.id,messages:T.map(i=>({id:i.id,actorLabel:i.id===t.id?e:Qe(i,C)?C:i.actorName,body:i.body,attachmentCount:i.attachments?.length??0}))});h({intent:"forward-message",forwardContext:a,forwardContextMode:"selected-message",...s?{projectPath:s}:{}})},[n,T,h,C]),Qt=async()=>{if(v)try{await B("/api/agents/"+encodeURIComponent(v)+"/interrupt",{method:"POST",body:JSON.stringify({})})}catch{}},pe=j.tone==="working"||j.tone==="pending",Yn=_s({isDm:M,hasOutstandingReply:ys}),Xn=M?`Message ${O} — type / to route or @ to mention an agent`:u?.kind==="channel"?`Comment in #${_a(u)} — mention @agent to request a reply`:`Comment in ${Et} — mention @agent to request a reply`,js=Se?.attachments??[],Zn=!I.trim()&&!me.hasFiles&&js.length===0&&pe,zt=o.useRef(!1);o.useEffect(()=>{const t=Se?.id??null,e=t?he.filter(a=>a.id!==t):he;if(!Ka({isAgentBusy:pe,sending:H,queued:e})||zt.current)return;const s=e[0];s&&(zt.current=!0,te(a=>a.filter(i=>i.id!==s.id)),xe(s.body,{attachments:s.attachments,replyTarget:s.replyTarget??null}).then(a=>{a==="failed"&&te(i=>[s,...i])}).finally(()=>{zt.current=!1}))},[pe,H,he,Se]),o.useEffect(()=>{pe||dt("queue")},[pe]),o.useEffect(()=>{te([]),Te(null),ie(null),dt("queue"),me.clear()},[n]);const ea=Qa(he),Rs=ga(),ta=o.useCallback((t,e)=>{const s=window.getSelection()?.toString().trim(),a=Qe(e,C),i=e.actorId?Z.get(e.actorId):null,l=a?null:Hs(e,b,v),m=(i?.scopedAlias?.trim()||l?.handle?.trim()||null)?.replace(/^@+/,"")??null,R=m?`@${m}`:e.actorName,w=(l?.id||i?.agentId||e.actorId||"").trim(),p=[];a||p.push({kind:"action",label:"Reply",onSelect:()=>ut(e,m)}),p.push({kind:"action",label:"Forward to new task…",onSelect:()=>Is(e,R,i?.workspaceRoot??l?.projectRoot??l?.cwd??void 0)}),p.push({kind:"separator"}),s&&p.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{ze(s)}}),p.push({kind:"action",label:"Copy Message",onSelect:()=>{ze(e.body)}}),p.push({kind:"action",label:"Copy Link",onSelect:()=>Kt(e.id)}),p.push({kind:"separator"}),!a&&w&&p.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{ze(w)}}),p.push({kind:"action",label:"Copy Message ID",onSelect:()=>{ze(e.id)}}),Rs(t,p)},[v,ut,Kt,Is,C,Z,b,Rs]),sa=async(t,e)=>{const s=`@${e.agentId} `,a=I.trim();if(a){D(""),await xe(`${s}${a}`,{forceAction:"invoke"});return}D(s),A.current?.focus()},Ke=o.useMemo(()=>{if(!u)return[];const t=new Set(u.participantIds);return b.filter(e=>!t.has(e.id)&&!e.retiredFromFleet).sort((e,s)=>e.name.localeCompare(s.name))},[u,b]);o.useEffect(()=>{Ct&&ot(t=>t&&Ke.some(e=>e.id===t)?t:Ke[0]?.id??"")},[Ct,Ke]);const Es=!!(u&&["direct","group_direct","channel"].includes(u.kind)&&Ke.length>0),na=o.useCallback(async()=>{if(!u)return;const t=Mt.trim();if(t){Nt(!0),De(null);try{const e=await B(`/api/conversations/${encodeURIComponent(u.id)}/members`,{method:"POST",body:JSON.stringify({actorId:t})});e.session?yt(e.session):yt(s=>s&&{...s,kind:e.kind,participantIds:e.participantIds}),rt(!1),ot(""),await U({messageMode:"none"})}catch(e){De(e instanceof Error?e.message:String(e))}finally{Nt(!1)}}},[Mt,U,u]);return r.jsx("div",{className:`s-thread-layout${f?" s-thread-layout--embedded":""}`,"data-thread-treatment":k==="standard"?void 0:k,children:r.jsxs("div",{className:"s-thread-center",children:[!f&&r.jsx(cr,{showBackNav:y,isDm:M,navigate:d,route:N,canonicalConversationId:ws,threadTitle:Et,agentId:K?.id??null,sessionId:ps,detailRoute:dn,participants:Fn,operator:On,canAddParticipants:Es,onToggleAddParticipant:()=>{De(null),rt(t=>!t)}}),!f&&u&&r.jsx(dr,{canonicalConversationId:ws,conversationAlias:Rn}),!f&&Ct&&Es&&r.jsx(ur,{agents:Ke,addParticipantId:Mt,setAddParticipantId:ot,addingParticipant:pn,addParticipantError:hn,onCancel:()=>{rt(!1),De(null)},onSubmit:()=>{na()}}),vt&&r.jsx(kr,{pinnedAsk:vt,onAnswer:()=>{const t=[...T].reverse().find(e=>e.actorId===vt.agentId)??[...T].reverse().find(e=>!Qe(e,C)&&e.class!=="status"&&e.class!=="system");t?ut(t,t.actorId?Z.get(t.actorId)?.scopedAlias??null:null):A.current?.focus()},onSteer:Dt}),r.jsx(Ar,{presence:j,agent:K}),cs&&r.jsx("p",{className:"s-thread-error",children:cs}),r.jsxs("div",{className:"s-thread-feed","data-conversation-id":n,ref:je,onScroll:Dn,children:[!ls&&T.length>0&&cn&&r.jsx("div",{className:"s-thread-history-control",children:r.jsxs("button",{type:"button",className:"s-thread-history-button",disabled:ye,"aria-busy":ye,onClick:()=>{un()},children:[ye&&r.jsx("span",{className:"s-thread-history-spinner","aria-hidden":"true"}),ye?"Loading earlier messages…":"Load earlier messages"]})}),ls?r.jsx(Tr,{}):T.length===0?Lt?r.jsx(xr,{agentName:O,title:j.label,detail:j.detail||de.latest,snapshot:de,events:Ne,steps:ee,phase:Ft,tone:En,workspaceName:lt,branch:u?.currentBranch,startedAt:It,onOpenTrace:Ts,onOpenTerminal:Ms,onSteer:Dt}):r.jsxs("div",{className:"s-thread-empty",children:[r.jsx("div",{className:"s-thread-empty-glyph","aria-hidden":"true",children:M?"@":"#"}),r.jsx("p",{children:Et}),r.jsx("p",{children:M?"No messages yet. Send a message to start working with this agent.":"No messages yet. Start the conversation below."}),(lt||u?.currentBranch)&&r.jsxs("div",{className:"s-thread-empty-chips",children:[lt&&r.jsx("span",{className:"s-thread-empty-chip",children:lt}),u?.currentBranch&&r.jsx("span",{className:"s-thread-empty-chip",children:u.currentBranch})]})]}):_e.map((t,e)=>{const s=za(t,e);if(t.kind==="fanout")return r.jsx(mr,{row:t,expanded:Pn.has(t.key),showDayDivider:s,onToggle:()=>qn(t.key)},t.key);const a=t.message,i=Qe(a,C),l=Va(a),m=l?"scout.dispatch":a.class,R=Xa(m),w=m==="status",p=Ks(a.createdAt),S=i?null:Hs(a,b,v),L=Z.get(a.actorId)?.scopedAlias?.trim()||null,fe=!i&&L?L:a.actorName,E=i?C.toLowerCase():L??S?.handle??null,se=Ja(a.body),Q=se?Ga({flightId:se.flightId,replyToMessageId:a.replyToMessageId,messagesById:ue,agents:b,operatorName:C}):null,_=!se&&a.replyToMessageId?ue.get(a.replyToMessageId)??null:null,J=_?Qe(_,C)?C:_.actorName:null,ve=se?se.body:a.body,P=Qs(a);if(P&&wt.has(a.id))return null;const Vt=typeof a.metadata?.targetAgentId=="string"?a.metadata.targetAgentId:null,mt=P?Gt(b,[Vt,P.target]):null,x=P?Bs({name:mt?.name,id:mt?.id,title:nr(P.target)}):null;return r.jsxs("div",{className:["s-thread-feed-block",i&&"s-thread-feed-block--you",s&&"s-thread-feed-block--full-width"].filter(Boolean).join(" "),children:[s&&r.jsx(hr,{at:a.createdAt}),P&&x?r.jsxs("article",{id:`msg-${a.id}`,className:["s-thread-msg","s-thread-failure-notice",(Ge||is?.has(a.id))&&"s-thread-msg--enter"].filter(Boolean).join(" "),style:Ge?{animationDelay:`${Math.max(0,7-(_e.length-1-e))*26}ms`}:void 0,"data-class":m,"aria-label":"Delivery issue",children:[r.jsx("span",{className:"s-thread-failure-notice-mark","aria-hidden":"true",children:"!"}),r.jsxs("div",{className:"s-thread-failure-notice-content",children:[r.jsxs("p",{children:[r.jsxs("strong",{children:[x," couldn’t reply."]})," ",r.jsx("span",{children:P.explanation})]}),P.technicalDetail&&r.jsxs("details",{className:"s-thread-failure-notice-details",children:[r.jsx("summary",{children:"Technical details"}),r.jsx("pre",{children:P.technicalDetail})]}),r.jsxs("div",{className:"s-thread-failure-notice-actions",children:[a.replyToMessageId&&ue.has(a.replyToMessageId)&&r.jsx("button",{className:"s-thread-failure-notice-action s-thread-failure-notice-action--primary",type:"button",disabled:H,onClick:()=>{Hn(a)},children:H?"Retrying…":"Retry"}),Bt&&r.jsx("button",{className:"s-thread-failure-notice-action",type:"button",onClick:()=>Wn(a,x,P.explanation),children:"Ask @scoutbot"}),r.jsx("button",{className:"s-thread-failure-notice-action s-thread-failure-notice-action--clear",type:"button",onClick:()=>hs(a),"aria-label":`Clear delivery issue for ${x}`,children:"Clear"})]})]}),r.jsx("span",{className:"s-thread-failure-notice-time",title:p,children:pt(a.createdAt)})]}):r.jsx("article",{id:`msg-${a.id}`,className:["s-thread-msg",i&&"s-thread-msg--you",w&&"s-thread-msg--tool",(Ge||is?.has(a.id))&&"s-thread-msg--enter"].filter(Boolean).join(" "),style:Ge?{animationDelay:`${Math.max(0,7-(_e.length-1-e))*26}ms`}:void 0,"data-class":m,onContextMenu:q=>ta(q,a),children:r.jsx("div",{className:"s-thread-msg-card",children:r.jsxs("div",{className:"s-thread-msg-card-content",children:[r.jsxs("div",{className:"s-thread-msg-header",children:[r.jsxs("div",{className:"s-thread-msg-meta",children:[(()=>{const q=!i&&S?()=>ft(d,{view:"agents-v2",agentId:S.id},{returnTo:N}):null,Ls=i?C:fe??"?",$s=r.jsx(es,{agent:S??void 0,name:Ls,placement:"turn",size:28,className:"s-thread-msg-avatar",title:Ls});return q?r.jsx("button",{type:"button",className:"s-thread-msg-avatar--nav",onClick:q,"aria-label":`View profile for ${a.actorName??"agent"}`,title:`View profile for ${a.actorName??"agent"}`,children:$s}):$s})(),!i&&S?r.jsx("button",{type:"button",className:"s-thread-msg-actor s-thread-msg-actor--nav",onClick:()=>ft(d,{view:"agents-v2",agentId:S.id},{returnTo:N}),title:`View profile for ${a.actorName}`,children:fe}):r.jsx("span",{className:"s-thread-msg-actor",children:i?C:fe}),E&&r.jsxs("span",{className:"s-thread-msg-handle",children:["@",E]}),R&&r.jsx("span",{className:"s-thread-msg-kind",children:R})]}),r.jsx("span",{className:"s-thread-msg-time",title:p,children:pt(a.createdAt)}),r.jsxs("span",{className:"s-thread-msg-actions",children:[!i&&E&&r.jsx("button",{type:"button",className:"s-thread-msg-permalink","aria-label":`Reply to @${E}`,title:`Reply to @${E}`,onClick:()=>ut(a,E),children:r.jsx(ss,{})}),r.jsx("button",{type:"button",className:"s-thread-msg-permalink","aria-label":"Copy link to message",title:"Copy link to message",onClick:()=>Kt(a.id),children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M6.5 9.5a2.5 2.5 0 0 0 3.54 0l2.12-2.12a2.5 2.5 0 0 0-3.54-3.54l-.7.7"}),r.jsx("path",{d:"M9.5 6.5a2.5 2.5 0 0 0-3.54 0L3.84 8.62a2.5 2.5 0 0 0 3.54 3.54l.7-.7"})]})})]})]}),Q&&r.jsxs("button",{type:"button",className:"s-thread-reply-ctx",title:`Open the originating request${Q.flightId?` · ${Q.flightId}`:""}`,onClick:()=>ct(Q.originatingMessageId),children:[r.jsx(ss,{}),r.jsx("span",{className:"s-thread-reply-ctx-label",children:"reply to"}),r.jsx("span",{className:"s-thread-reply-ctx-title",children:Q.title}),r.jsxs("span",{className:"s-thread-reply-ctx-from",children:["· ",Q.from]}),r.jsx("span",{className:"s-thread-reply-ctx-status",children:"· done"})]}),_&&J&&r.jsxs("button",{type:"button",className:"s-thread-reply-ctx",title:`Open message from ${J}`,onClick:()=>ct(_.id),children:[r.jsx(ss,{}),r.jsx("span",{className:"s-thread-reply-ctx-label",children:"reply to"}),r.jsx("span",{className:"s-thread-reply-ctx-title",children:Ys(_)}),r.jsxs("span",{className:"s-thread-reply-ctx-from",children:["· ",J]})]}),r.jsx("div",{className:"s-thread-msg-body",title:p,children:r.jsx(sr,{text:ve})}),r.jsx(Wr,{message:a}),l&&l.candidates.length>0&&r.jsx("div",{className:"s-thread-dispatch",children:l.candidates.map(q=>r.jsxs("button",{type:"button",className:"s-thread-dispatch-tile",onClick:()=>{sa(l,q)},children:[r.jsxs("span",{className:"s-thread-dispatch-tile-id",children:["@",q.agentId]}),r.jsx("span",{className:"s-thread-dispatch-tile-state",children:q.endpointState}),r.jsx("span",{className:"s-thread-dispatch-tile-meta",children:[q.workspace,q.node,q.projectRoot].filter(Boolean).join(" · ")||q.displayName})]},q.agentId))})]})})})]},a.id)}),j.showTyping&&!Lt&&r.jsx("div",{className:"s-thread-feed-block",children:r.jsx("div",{className:"s-thread-msg","aria-live":"polite",children:r.jsxs("div",{className:Mn,children:[r.jsx(es,{agent:K??void 0,name:O,placement:"turn",size:28,className:"s-thread-msg-avatar s-thread-msg-avatar--working",title:O}),r.jsxs("div",{className:"s-thread-msg-card-content",children:[r.jsxs("div",{className:"s-thread-msg-header",children:[r.jsxs("div",{className:"s-thread-msg-meta",children:[r.jsx("span",{className:"s-thread-msg-actor",children:O}),r.jsx("span",{className:Nn,children:Cn})]}),r.jsx("span",{className:"s-thread-msg-time",title:g?.startedAt?Ks(g.startedAt):"now",children:g?.startedAt?pt(g.startedAt):"now"})]}),r.jsxs("div",{className:"s-thread-msg-working-body",children:[r.jsxs("div",{className:kn,children:[r.jsx("span",{className:An,"aria-hidden":"true"}),r.jsxs("div",{className:"s-thread-turn-snapshot-main",children:[r.jsx("span",{className:"s-thread-turn-snapshot-label",children:"Latest"}),r.jsx("span",{className:"s-thread-msg-working-copy",children:de.latest})]})]}),r.jsxs("dl",{className:"s-thread-turn-snapshot-stats",children:[r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Activity"}),r.jsx("dd",{children:de.activityLabel})]}),r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Elapsed"}),r.jsx("dd",{children:de.elapsedLabel})]}),r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Last"}),r.jsx("dd",{children:de.lastActivityLabel})]})]}),ee.length>0||Ft?r.jsx(vr,{steps:ee,phase:Ft,limit:5,compact:!0}):r.jsx(Cr,{events:Ne,limit:4,compact:!0}),r.jsx(Mr,{onOpenTrace:Ts,onOpenTerminal:Ms,onSteer:Dt,compact:!0})]})]})]})})}),on&&Tt>0&&r.jsxs("button",{type:"button",className:"s-thread-new-messages",onClick:Bn,children:[r.jsx("span",{"aria-hidden":"true",children:"↓"})," ",Tt," new ",Tt===1?"message":"messages"," · jump to latest"]}),r.jsx("div",{ref:ln})]}),j.showTyping&&r.jsxs("div",{className:In,children:[r.jsx("div",{className:"s-thread-presence-line-avatars",children:r.jsx(es,{agent:K??void 0,name:O,placement:"turn",size:22,className:"s-thread-presence-line-avatar",title:O})}),r.jsx("span",{className:"s-thread-presence-line-label",children:$n}),r.jsx("div",{className:jn,"aria-hidden":"true"})]}),r.jsx(ha,{composeRef:A,draft:I,setDraft:D,composePlaceholder:Xn,slashState:le,setSlashState:Pe,filteredSlashCommands:fn,applySlashCommand:wn,mentionState:ce,setMentionState:qe,filteredMentions:gn,applyMention:Sn,updateTriggersFromDraft:bn,closeSuggestions:yn,replyTarget:oe,onCancelReply:Gn,isStopMode:Zn,sending:H,composeAction:Yn,onSend:()=>{Kn()},onInterrupt:()=>{Qt()},attachments:me,isAgentBusy:pe,busyIntent:As,onBusyIntentChange:dt,queued:he,queueNote:ea,onEditQueued:zn,editingQueuedId:Se?.id??null,editingAttachmentCount:js.length,onCancelEdit:Vn,onUnqueue:Qn,onSendQueuedNow:t=>{Jn(t)}})]})})}function ss(){return r.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("polyline",{points:"9 14 4 9 9 4"}),r.jsx("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})]})}const hi=lr({id:"thread",label:"Thread",route:{view:"conversation",conversationId:""},webPath:"/chat",screen:"ConversationScreen",embed:{path:"/embed/thread",profile:"macos.thread",rootClassName:"s-thread-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:er}});export{mi as ConversationScreen,hi as scoutSurface};
|