@openscout/scout 0.2.102 → 0.2.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/bin/scout.mjs +6 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/chat.mjs +285 -0
- package/dist/client/assets/ActivityScreen-CcDdQTBK.js +1 -0
- package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CHNJ4NnS.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-B4mEvXeD.js} +1 -1
- package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-ZsBDQITY.js} +1 -1
- package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-DSxDlqG1.js} +1 -1
- package/dist/client/assets/AgentAdventures-BxrYq_2v.js +1 -0
- package/dist/client/assets/{AgentAvatar-BIwg54Tj.js → AgentAvatar-NZOqcsB2.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +1 -0
- package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-MIEBKw_S.js} +1 -1
- package/dist/client/assets/AgentFloorView-A0dDRlRV.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-BTqwmK5G.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-C4rKLLdT.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-fGC-ZrJS.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-BTF4_th9.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-DgSeA_vS.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-CcS23wij.js} +1 -1
- package/dist/client/assets/{AgentLanesView-aAyC7lHf.js → AgentLanesView-WZhEDBFE.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-6Kfr1uOT.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +1 -0
- package/dist/client/assets/{AgentSessions-Cox2zS-e.js → AgentSessions-CO1WGa8Z.js} +2 -2
- package/dist/client/assets/AgentsConsole-BQOWkj35.js +1 -0
- package/dist/client/assets/AgentsScreen-BMNAj1PH.js +1 -0
- package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +1 -0
- package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-D67fIBdR.js} +1 -1
- package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-Ck30FbzG.js} +1 -1
- package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CkBhGRlD.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +1 -0
- package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-DTxYMr3a.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-crirZCdo.js} +1 -1
- package/dist/client/assets/BrokerScreen-CT37VQiL.js +8 -0
- package/dist/client/assets/Canvas-CRP0KjKb.js +1 -0
- package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-ZPomvOf-.js} +1 -1
- package/dist/client/assets/ChannelComposer-BVItWlEz.js +1 -0
- package/dist/client/assets/ChannelSidebar-B-2spawY.js +1 -0
- package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-ckVkecDO.js} +1 -1
- package/dist/client/assets/ChatAvatar-DKBsbOqk.js +1 -0
- package/dist/client/assets/ChatBits-CLJ71hTY.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-Co0NmqOO.js} +1 -1
- package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +1 -0
- package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-D-iv28LJ.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-CZ3gDdiT.js} +1 -1
- package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-CSC-zbP9.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-DdNAwjGW.js} +1 -1
- package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-mGWY7Ivi.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-voDD9M5R.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-C33sgD48.js} +1 -1
- package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BL8aYD7z.js} +1 -1
- package/dist/client/assets/{ConversationComposer-B7RU6LKd.js → ConversationComposer-DNcn5U6D.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +1 -0
- package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +1 -0
- package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-6pprBpmq.js} +2 -2
- package/dist/client/assets/ConversationScreen-tpj4cqWs.js +2 -0
- package/dist/client/assets/{ConversationStatus-CK-YfLpi.js → ConversationStatus-Cv-7hErW.js} +1 -1
- package/dist/client/assets/{CrewAvatar-CJhuqTsJ.js → CrewAvatar-zgzC3cbU.js} +1 -1
- package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dp9KBBGY.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
- package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +1 -0
- package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-av71ehJV.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-CcYGUB10.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DlMiEALb.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-CTkO_tQR.js} +1 -1
- package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CYUwYyAW.js} +1 -1
- package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-Cxhixtks.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +1 -0
- package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-Vj_wVZq1.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-CjHSDXad.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-BG4ebnX5.js} +1 -1
- package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-BoYaGY9t.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +1 -0
- package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-jbtRs-YE.js} +1 -1
- package/dist/client/assets/{FloorTacticalHUD-Bngao6sn.js → FloorTacticalHUD-BhyOqlL5.js} +1 -1
- package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CupyOgt4.js} +1 -1
- package/dist/client/assets/HarnessMark-DSvM_H7H.js +1 -0
- package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +1 -0
- package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-Dcm3vf9U.js} +1 -1
- package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-pIZtE1cC.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-Dv5meXo2.js} +1 -1
- package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +1 -0
- package/dist/client/assets/InviteSheet--5Zjct25.js +1 -0
- package/dist/client/assets/JumpPalette-BmiSOEmp.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-B8yiM524.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-D2cnTeUd.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-BLhVHwff.js} +1 -1
- package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-BR25OBTJ.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-ClVolr4-.js} +1 -1
- package/dist/client/assets/MeshScreen-BW1dMFWF.js +1 -0
- package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BT3ke2D1.js} +2 -2
- package/dist/client/assets/MessagesScreen-CtNMfIvC.js +1 -0
- package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-CafjuseK.js} +1 -1
- package/dist/client/assets/MissionControlView-BjPOViGY.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-nhy3hkxQ.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +1 -0
- package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-DiUf3vWW.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +1 -0
- package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +1 -0
- package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +1 -0
- package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-BQ2wQ5gp.js} +1 -1
- package/dist/client/assets/NewChatComposer-BEXS8vV6.js +19 -0
- package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-C8ROO4ps.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-BNTqYC7m.js} +1 -1
- package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-CcOeFRCB.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-BPiSXXvm.js → ObserveEmbedScreen-Dh30EjAQ.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-CC5mnngm.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-DF6tRZL_.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +31 -0
- package/dist/client/assets/OpsAgentsView-D3rM0udq.js +1 -0
- package/dist/client/assets/OpsScreen-DySeNQ1V.js +1 -0
- package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-C8z22pJ2.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +1 -0
- package/dist/client/assets/ProjectsInbox-DfCXReZK.js +2 -0
- package/dist/client/assets/ProjectsRail-CELVubfJ.js +1 -0
- package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +1 -0
- package/dist/client/assets/{Provider-5Hotn7NQ.js → Provider-CNZluAZb.js} +2 -2
- package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-DUPqXMZh.js} +1 -1
- package/dist/client/assets/RailToggle-BwmY70B8.js +1 -0
- package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +9 -0
- package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-C8fxndAh.js} +1 -1
- package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-DUVJjrIu.js} +1 -1
- package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-Bek1Vc4W.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DlRg3172.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-CVUMnt6A.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-D9-s5PyB.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-D7FN-oyY.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +2 -0
- package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-BQ7HO1om.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-CJMWlvV-.js} +1 -1
- package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-B526NSnw.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-ChkvGyEW.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-6g1f5chk.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-BuwBdnPf.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-Bs-_VwTC.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-C2wf35-P.js} +1 -1
- package/dist/client/assets/{SessionObserve-DaqDhqDI.js → SessionObserve-B64YsYhy.js} +9 -9
- package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-Drv-D8Oh.js → SessionObserveEvidence-CS1aQBpQ.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DURV0MpF.js +1 -0
- package/dist/client/assets/SessionsScreen-D71ZR-8t.js +1 -0
- package/dist/client/assets/{SettingsDrawer-BDapR4E9.js → SettingsDrawer-Nz98oBVl.js} +3 -3
- package/dist/client/assets/SettingsScreen-CYBHal6y.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-V04kD5T9.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +2 -0
- package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-XwFI-pCp.js} +1 -1
- package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-BMpkXai_.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +1 -0
- package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-aHeF4ZQZ.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-DI5N3gOj.js} +1 -1
- package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-Dw4LP7wu.js} +1 -1
- package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-BofjmUMJ.js} +2 -2
- package/dist/client/assets/Terminal-jIqnIZZ6.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-CwbQhXcI.js} +1 -1
- package/dist/client/assets/TerminalRelay--qOBwnbR.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-BK6Qy41F.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-DpUT9Tpc.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-D35fOnQj.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-CwtRCm_-.js → WorkDetailScreen-Bcf_yHhU.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-t8AEyx3Q.js} +1 -1
- package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-_mhG_FR2.js} +1 -1
- package/dist/client/assets/WorldActorTalk-CKerDikx.js +1 -0
- package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-BRrj3MQN.js} +1 -1
- package/dist/client/assets/{WorldMinimap-Blqg0d5r.js → WorldMinimap-DOptgrc4.js} +1 -1
- package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-D-RJzSa6.js} +1 -1
- package/dist/client/assets/{activity-CSUhvjD0.js → activity-BJqFrZyB.js} +1 -1
- package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-CHohcvS3.js} +1 -1
- package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-CaRy2x2b.js} +1 -1
- package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +2 -0
- package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-bKWYOZaH.js} +1 -1
- package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
- package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-BplZUa_0.js} +1 -1
- package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
- package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
- package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-CubLvQ4W.js} +1 -1
- package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-DFfKAq0d.js} +1 -1
- package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-DmAWnyAH.js} +1 -1
- package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-B0aLKiyF.js} +1 -1
- package/dist/client/assets/at-sign-DM7xeppo.js +1 -0
- package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-BL9qvhEI.js} +1 -1
- package/dist/client/assets/{bot-CfN9PSBF.js → bot-BhAVbcCA.js} +1 -1
- package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
- package/dist/client/assets/chat-api-BPVC0asu.js +1 -0
- package/dist/client/assets/chat-space-model-B6Jg2CY4.js +4 -0
- package/dist/client/assets/{check-B8dMv3Is.js → check-g7D7-c1J.js} +1 -1
- package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-CDzRQQGl.js} +1 -1
- package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DKGTLiqc.js} +1 -1
- package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-DX7R6KY2.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-Dvk_QpRq.js} +1 -1
- package/dist/client/assets/{clock-DFcRbtrl.js → clock-CQb4FeMf.js} +1 -1
- package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-Cmadr3pQ.js} +1 -1
- package/dist/client/assets/{coffee-C_D9zooM.js → coffee-ljG1_krY.js} +1 -1
- package/dist/client/assets/{compass-DTZdCpv9.js → compass-CvzkzkIh.js} +1 -1
- package/dist/client/assets/content-0AXa0klu.js +1 -0
- package/dist/client/assets/content-BEyJ19Lx.js +1 -0
- package/dist/client/assets/content-BN5weWKW.js +1 -0
- package/dist/client/assets/content-BNokkm7C.js +1 -0
- package/dist/client/assets/content-BV4PUM9q.js +1 -0
- package/dist/client/assets/content-BxUPlcx5.js +1 -0
- package/dist/client/assets/content-CIC5sku8.js +1 -0
- package/dist/client/assets/content-CKJ9zb7Z.js +1 -0
- package/dist/client/assets/content-CdkTyxqk.js +1 -0
- package/dist/client/assets/content-CnhhSCZq.js +1 -0
- package/dist/client/assets/content-D1Ze_FG9.js +1 -0
- package/dist/client/assets/content-DY3F9Vfr.js +1 -0
- package/dist/client/assets/content-DrKBYpcb.js +1 -0
- package/dist/client/assets/content-LSStQYj5.js +1 -0
- package/dist/client/assets/content-YvU-D0hF.js +1 -0
- package/dist/client/assets/content-oKQMyVnH.js +1 -0
- package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
- package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-CIRaxmid.js} +1 -1
- package/dist/client/assets/{conversation-model-BGFHoxQ0.js → conversation-model-m8HhzroS.js} +1 -1
- package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +1 -0
- package/dist/client/assets/{copy-D9WUpQRf.js → copy-BGOC1tJB.js} +1 -1
- package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-Q6nrHFTN.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-ChvMq-zl.js} +1 -1
- package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
- package/dist/client/assets/discover-DlwbftpC.js +2 -0
- package/dist/client/assets/embed-entry-c0lwtjBG.js +2 -0
- package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-BVccgH0n.js} +1 -1
- package/dist/client/assets/{eye-CtqSV8BS.js → eye-CsGfEVR6.js} +1 -1
- package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-Be6da5l3.js} +1 -1
- package/dist/client/assets/{file-text-ChtICwub.js → file-text-DP6txVW-.js} +1 -1
- package/dist/client/assets/{flag-CqdOxVkI.js → flag-DAFE2wZ5.js} +1 -1
- package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
- package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
- package/dist/client/assets/{folder-0fWevPvQ.js → folder-B_S7gBVr.js} +1 -1
- package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-DQCGlE3o.js} +1 -1
- package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-CofqY4Km.js} +1 -1
- package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-DcUCsWdJ.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-KQy-ZOpV.js} +1 -1
- package/dist/client/assets/{home-moving-signal-B7m-ngb2.js → home-moving-signal-BIHUGNfI.js} +1 -1
- package/dist/client/assets/home-now-card-CaLgZze2.js +1 -0
- package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-CvU8B61b.js} +1 -1
- package/dist/client/assets/hooks-DaUOREpP.js +2 -0
- package/dist/client/assets/index-CGbs0SBm.css +1 -0
- package/dist/client/assets/index-CbqBwfIW.js +1 -0
- package/dist/client/assets/index-CyPMl7Up.js +1 -0
- package/dist/client/assets/index-DReVb7jZ.js +10 -0
- package/dist/client/assets/index-PQpJveGO.js +1 -0
- package/dist/client/assets/{index-CvsM3jm8.js → index-kkXUq-zf.js} +1 -1
- package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-CLU7wjnT.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-CJXPaHXj.js} +1 -1
- package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
- package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
- package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-Ch9t6lb0.js} +1 -1
- package/dist/client/assets/{layers-Bolb8ejU.js → layers-BOwyWodP.js} +1 -1
- package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-B36Qsh0y.js} +1 -1
- package/dist/client/assets/left-0vBrvrBG.js +2 -0
- package/dist/client/assets/left-C6SyaqlJ.js +1 -0
- package/dist/client/assets/left-CTuXysZR.js +2 -0
- package/dist/client/assets/left-Cc6s4DT2.js +1 -0
- package/dist/client/assets/left-DF5caiyh.js +1 -0
- package/dist/client/assets/left-DgT4tWCx.js +1 -0
- package/dist/client/assets/left-R0wppTTr.js +1 -0
- package/dist/client/assets/left-advisor-C-kt8V28.js +1 -0
- package/dist/client/assets/left-agents-thnBO156.js +1 -0
- package/dist/client/assets/left-default-CT42fnpF.js +1 -0
- package/dist/client/assets/left-lanes-CSmZgciK.js +1 -0
- package/dist/client/assets/left-mission-C86x6i9h.js +1 -0
- package/dist/client/assets/library-DdhYL_9v.js +1 -0
- package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-DNUsuPWz.js} +1 -1
- package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-I40PawYA.js} +1 -1
- package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-CdhNzDF0.js} +1 -1
- package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-Ck_Vjnyp.js} +1 -1
- package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-DSlvHp-D.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-C1-mdP3P.js} +1 -1
- package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-cI5_A5mj.js} +1 -1
- package/dist/client/assets/{message-markup-DgFSyb3f.js → message-markup-6Tgo4qFJ.js} +1 -1
- package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-CJW4WRlo.js} +1 -1
- package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-p_cboAm4.js} +1 -1
- package/dist/client/assets/monitor-C7_cHlkC.js +1 -0
- package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-CU_euC-Q.js} +1 -1
- package/dist/client/assets/{observe-CkfOxYx_.js → observe-CtS0l3zu.js} +1 -1
- package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
- package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-DwFR4wSw.js} +1 -1
- package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-qP17MwMl.js} +1 -1
- package/dist/client/assets/{pause-DWS7YGQ3.js → pause-B_hliKuR.js} +1 -1
- package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-BUsTTZFE.js} +1 -1
- package/dist/client/assets/{pin-DWlD1BOF.js → pin-Oi4qHR6M.js} +1 -1
- package/dist/client/assets/{play-D_Pggug4.js → play-CVeRmqLH.js} +1 -1
- package/dist/client/assets/{plus-D_wLGJGT.js → plus-D5NLH_fM.js} +1 -1
- package/dist/client/assets/profile-BegEUmB7.js +1 -0
- package/dist/client/assets/projects-inbox-CKPLZN8s.css +1 -0
- package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-CfwxCTdN.js} +1 -1
- package/dist/client/assets/provider-DwmCoSlc.js +1 -0
- package/dist/client/assets/{proxy-DOG46ja4.js → proxy-DgzP27W8.js} +1 -1
- package/dist/client/assets/{radio-C_jtwbFP.js → radio-Cas2qg1D.js} +1 -1
- package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-IcD2lPoT.js} +1 -1
- package/dist/client/assets/resolve-panes-pfZTezKo.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +1 -0
- package/dist/client/assets/right-BDaCJ0CF.js +1 -0
- package/dist/client/assets/right-BP6lXRFS.js +1 -0
- package/dist/client/assets/right-Cb1VCrdj.js +1 -0
- package/dist/client/assets/right-CeFaxfBo.js +1 -0
- package/dist/client/assets/right-Ck2SrYCj.js +1 -0
- package/dist/client/assets/right-D-uv5YfF.js +1 -0
- package/dist/client/assets/right-DJMSICky.js +1 -0
- package/dist/client/assets/right-Dnljs8ah.js +1 -0
- package/dist/client/assets/right-SdCSF8PP.js +1 -0
- package/dist/client/assets/{right-BLJsc2-p.js → right-cjPTwPXS.js} +1 -1
- package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-DAqYvu8I.js} +1 -1
- package/dist/client/assets/router-C-MF5-mb.js +1 -0
- package/dist/client/assets/{runtime-picker-DdsttHHc.js → runtime-picker-C_AVYF63.js} +1 -1
- package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-Dl3ml9OZ.js} +1 -1
- package/dist/client/assets/{scout-voice-DOQ_B77g.js → scout-voice-CqAyfblr.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-DwvGQOWo.js} +1 -1
- package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-B0tKI9Sg.js} +1 -1
- package/dist/client/assets/{search-C4VlW_0l.js → search-UsM-9-_W.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
- package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +1 -0
- package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-OTS2iFkt.js} +1 -1
- package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-BlQsRK6C.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-C1mgqdow.js} +1 -1
- package/dist/client/assets/{server-ms1yxUYJ.js → server-DBlPW0Mp.js} +1 -1
- package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CnpZMB7C.js} +1 -1
- package/dist/client/assets/{session-table-CDx_16xf.js → session-table-CGkfG5Yd.js} +1 -1
- package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Bge4XZ4I.js} +1 -1
- package/dist/client/assets/{settings-TJIkkZ0P.js → settings-C69Zjrpq.js} +1 -1
- package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-6bzeod7c.js} +1 -1
- package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-Cc5lPZRv.js} +1 -1
- package/dist/client/assets/{sse-v5QLsOHV.js → sse-A8AyLH0g.js} +1 -1
- package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-C4WdhVeK.js} +1 -1
- package/dist/client/assets/{terminal-96JWDYDL.js → terminal-DMZjX1es.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-mO89dX-Y.js} +1 -1
- package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
- package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-CZZsnPzj.js} +1 -1
- package/dist/client/assets/use-beside-D3cJpA5p.js +1 -0
- package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-D5EnpVba.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-D_QOmjg5.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-3V3ADQ-G.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-DI9GKWlF.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-CiaZHMnk.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-CkdAHlDR.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-A3QGXqIy.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-atkQVfGw.js} +1 -1
- package/dist/client/assets/usePersistentState-Y8XwSTg-.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-DTvcwISe.js} +1 -1
- package/dist/client/assets/users-RLK3P5U4.js +1 -0
- package/dist/client/assets/{wrench-BsMTSeji.js → wrench-B4maQJai.js} +1 -1
- package/dist/client/assets/{x-DI1ktCYb.js → x-rlMdRqJF.js} +1 -1
- package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-B1zHHOLQ.js} +1 -1
- package/dist/client/assets/{zap-sKPkh4sQ.js → zap-B4X0OrEw.js} +1 -1
- package/dist/client/index.html +15 -3
- package/dist/drizzle/0019_session_actor_targets.sql +227 -0
- package/dist/drizzle/README.md +19 -0
- package/dist/drizzle/meta/0019_snapshot.json +6804 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/main.mjs +1214 -722
- package/dist/node/main.mjs +133 -22
- package/dist/pairing-runtime-controller.mjs +715 -492
- package/dist/runtime/base-daemon.mjs +14176 -58
- package/dist/runtime/broker-daemon.mjs +15520 -445
- package/dist/runtime/broker-process-manager.mjs +5 -3
- package/dist/runtime/mesh-discover.mjs +5 -3
- package/dist/scout-control-plane-web.mjs +21065 -3387
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/update-helper.mjs +83 -17
- package/package.json +2 -2
- package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
- package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
- package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
- package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
- package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
- package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
- package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
- package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
- package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
- package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
- package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
- package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
- package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
- package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
- package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
- package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
- package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
- package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
- package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
- package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
- package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
- package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
- package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
- package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
- package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
- package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
- package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
- package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
- package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
- package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
- package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
- package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
- package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
- package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
- package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
- package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
- package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
- package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
- package/dist/client/assets/content-B5Q4pb9R.js +0 -1
- package/dist/client/assets/content-BK1IfOZs.js +0 -1
- package/dist/client/assets/content-BeEsWLEm.js +0 -1
- package/dist/client/assets/content-BkOwEknW.js +0 -1
- package/dist/client/assets/content-C32W5kAG.js +0 -1
- package/dist/client/assets/content-CoqyLs9v.js +0 -1
- package/dist/client/assets/content-CwpdIS5b.js +0 -1
- package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
- package/dist/client/assets/content-DXKaPDfn.js +0 -1
- package/dist/client/assets/content-DZt5-dkI.js +0 -1
- package/dist/client/assets/content-DbQJH8L1.js +0 -1
- package/dist/client/assets/content-DetoiaHq.js +0 -1
- package/dist/client/assets/content-Dhu3wL7J.js +0 -1
- package/dist/client/assets/content-Dpv34iZu.js +0 -1
- package/dist/client/assets/content-TtQJb61D.js +0 -1
- package/dist/client/assets/content-ymNb2R7g.js +0 -1
- package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
- package/dist/client/assets/discover-C8IOY7_K.js +0 -2
- package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
- package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
- package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
- package/dist/client/assets/index-C5cX8dkl.js +0 -1
- package/dist/client/assets/index-C8uS5szO.js +0 -10
- package/dist/client/assets/index-Ck1__1yL.css +0 -1
- package/dist/client/assets/index-ClOOrVG1.js +0 -1
- package/dist/client/assets/index-Crtgfc9I.js +0 -1
- package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
- package/dist/client/assets/left-B-_z_nqj.js +0 -2
- package/dist/client/assets/left-B1LY7rJc.js +0 -1
- package/dist/client/assets/left-C6bdjWcG.js +0 -2
- package/dist/client/assets/left-CF4iuqlz.js +0 -1
- package/dist/client/assets/left-DLtNyZl1.js +0 -1
- package/dist/client/assets/left-Fpxoq-VY.js +0 -1
- package/dist/client/assets/left-N2wXfTlp.js +0 -1
- package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
- package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
- package/dist/client/assets/left-default-08gmdCtb.js +0 -1
- package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
- package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
- package/dist/client/assets/library-DLKBVUJ6.js +0 -1
- package/dist/client/assets/profile-C3KgiZvc.js +0 -1
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
- package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
- package/dist/client/assets/right-B9OUA6Ho.js +0 -1
- package/dist/client/assets/right-BDQnjetX.js +0 -1
- package/dist/client/assets/right-BUbKHmRH.js +0 -1
- package/dist/client/assets/right-Ci2IcD4s.js +0 -1
- package/dist/client/assets/right-CmCce3e5.js +0 -1
- package/dist/client/assets/right-D7w0zM5a.js +0 -1
- package/dist/client/assets/right-DIoON_bv.js +0 -1
- package/dist/client/assets/right-E0Jr3VN5.js +0 -1
- package/dist/client/assets/right-lCdAk9dW.js +0 -1
- package/dist/client/assets/router-BKiMcYa7.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
- package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
- package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as r,r as o}from"./index-DReVb7jZ.js";import{o as wt,w as ha,q as Zt,s as Bs,t as pa,u as fa,v as ga,x as Us,y as ya,z as wa,A as Sa,B as ba}from"./NewChatComposer-BEXS8vV6.js";import{a as U}from"./api-DSqpVKC7.js";import"./runtime-picker-C_AVYF63.js";import{d as Hs,u as va}from"./router-C-MF5-mb.js";import{u as Ta,C as xa}from"./ConversationComposer-DNcn5U6D.js";import"./index-CbqBwfIW.js";import{b as Ca}from"./machine-scope-DJt9RZ2w.js";import{d as ka,a as Ma,k as ae,n as Ws,o as Na,q as Ne,u as Aa,v as Ia,w as ja,x as Ra,c as _s,S as Vs,y as Ea,z as La,A as $a,B as Fa,b as Ks,D as Pa,E as Oa,i as qa,p as Da,r as es,F as Ba,G as Ua,H as Ha,I as Wa,J as _a,K as Qs,L as Va,M as Ge,N as Ka,O as Qa,P as zs,Q as za,R as Ja,T as Ga,U as Ya,W as Js,V as Xa,X as Gs,Y as Za,Z as er,_ as tr}from"./conversation-model-m8HhzroS.js";import{u as sr}from"./sse-A8AyLH0g.js";import{n as ts,t as St,f as Ys}from"./time-Dhsh_2EG.js";import{s as nr,h as ar,g as rr,b as or,j as ir,T as lr,k as cr,f as dr}from"./conversations-Cbg9h_Af.js";import{M as ur}from"./message-markup-6Tgo4qFJ.js";import{a as Xs,i as ss,b as mr}from"./message-visibility-DwxgcgYK.js";import{d as hr}from"./operator-attention-DBaRg5ep.js";import{f as ns,a as pr}from"./scoutbot-Bk3nyrkj.js";import{s as fr}from"./sessionRead-CvFz2RHv.js";import{u as gr,a as yr}from"./Provider-CNZluAZb.js";import{o as bt}from"./openContent-C6XO6kr5.js";import{c as Ye}from"./clipboard-e3fSpeo7.js";import{A as as}from"./AgentAvatar-NZOqcsB2.js";import{d as wr}from"./types-B0PlfpKc.js";/* empty css */import{ConversationHeader as Sr,ConversationIdentityRow as br,AddParticipantForm as vr}from"./ConversationHeader-Y9TEJxP_.js";import{CommsFlowPane as Tr}from"./CommsFlowGraph-voDD9M5R.js";import{a as xr}from"./use-beside-D3cJpA5p.js";import{FanOutRow as Cr,ThreadDayDivider as kr}from"./ConversationFeedRows-RnYSa7Io.js";import{T as Mr,t as Zs,m as en,a as Nr,b as Ar,o as Ir,d as jr,s as Rr,l as Er,c as Lr,e as $r,W as Fr,f as Pr,g as Or}from"./ConversationPanels-6pprBpmq.js";import{u as qr}from"./tail-events-C4WdhVeK.js";import{PinnedAskCard as Dr,ConversationStatusStrip as Br}from"./ConversationStatus-Cv-7hErW.js";import"./HarnessMark-DSvM_H7H.js";import"./colors-CFlbwC25.js";import"./agent-state-DDhnFEEP.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./createLucideIcon-ChvMq-zl.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./loader-circle-DNUsuPWz.js";import"./file-text-DP6txVW-.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./zap-B4X0OrEw.js";import"./index-BWHgHrtv.js";import"./mentions-Ck_Vjnyp.js";import"./AgentDetailCard-MIEBKw_S.js";import"./AgentLiveActions-6Kfr1uOT.js";import"./terminal-takeover-CZZsnPzj.js";import"./eye-CsGfEVR6.js";import"./terminal-DMZjX1es.js";import"./provider-DwmCoSlc.js";import"./surface-activity-B1rgWB1i.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./CrewAvatar-zgzC3cbU.js";import"./BackToPicker-CkBhGRlD.js";import"./AstronautSuit-D67fIBdR.js";import"./panel-right-qP17MwMl.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DdNAwjGW.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-C33sgD48.js";import"./CommsSelection-BL8aYD7z.js";/* empty css */import"./use-conversation-list-D5EnpVba.js";import"./agent-master-model-C-KdOFDK.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-CiaZHMnk.js";import"./proxy-DgzP27W8.js";import"./activity-BJqFrZyB.js";import"./message-circle-cI5_A5mj.js";import"./check-g7D7-c1J.js";import"./sparkles-Cc5lPZRv.js";const rn="scout:conversations:failure-dismissals:v1",Ur=64;let is={};function on(){try{if(typeof localStorage<"u"){const n=JSON.parse(localStorage.getItem(rn)??"null");_r(n)&&(is=ls(n))}}catch{}return ls(is)}function Hr(n){is=ls(n);try{typeof localStorage<"u"&&localStorage.setItem(rn,JSON.stringify(n))}catch{}}function tn(n){return new Set(on()[n]??[])}function Wr(n,c){const d=on(),f=(d[n]??[]).filter(C=>C!==c);f.push(c),d[n]=f.slice(-100);const y=Object.keys(d);for(const C of y.slice(0,Math.max(0,y.length-Ur)))delete d[C];return Hr(d),new Set(d[n])}function ls(n){return Object.fromEntries(Object.entries(n).map(([c,d])=>[c,[...d]]))}function _r(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 Vr=/\.(?:apng|avif|gif|jpe?g|png|svg|webp)(?:$|[?#])/iu,Kr=/\bhttps?:\/\/[^\s<>"')\]]+/giu;function Xe(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 J(n,c){const d=n?.[c];return typeof d=="string"&&d.trim()?d.trim():null}function Qr(n){return n.mediaType.toLowerCase().startsWith("image/")}function zr(n){return Vr.test(n)}function Jr(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 Gr(n){const c=new Set,d=[];for(const f of n.matchAll(Kr)){const y=f[0]?.replace(/[.,;:!?]+$/u,""),C=Xe(y);!C||c.has(C)||(c.add(C),d.push(C))}return d}const Yr=/^\/api\/blobs\/[^/]+$/u;function rs(n){try{const c=new URL(n);return Yr.test(c.pathname)?`${c.pathname}${c.search}`:n}catch{return n}}function vt(n){return Xe(n.url)??Xe(J(n.metadata,"url"))??Xe(J(n.metadata,"href"))}function Xr(n){const c=n.metadata??null,d=J(c,"kind")??J(c,"type"),f=vt(n);if(!f||d!=="link_preview"&&d!=="link-preview"&&n.mediaType!=="text/x-uri")return null;const y=Jr(f);return{id:n.id,url:f,title:J(c,"title")??y.host,description:J(c,"description"),imageUrl:Xe(J(c,"imageUrl")??J(c,"image")),siteName:J(c,"siteName")??y.host}}function Zr({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 eo({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 to({message:n}){const c=n.attachments??[],d=new Set,f=[],y=[];for(const m of c){const N=vt(m);if(N&&Qr(m)){d.add(m.id),f.push({id:m.id,src:rs(N),alt:m.fileName??"Image attachment"});continue}const W=Xr(m);W&&(d.add(m.id),y.push(W))}const C=new Set(y.map(m=>m.url)),re=new Set(c.map(vt).filter(m=>!!m));for(const m of Gr(n.body))re.has(m)||C.has(m)||zr(m)&&f.push({id:m,src:rs(m),alt:"Embedded image"});const H=c.filter(m=>!d.has(m.id));return f.length===0&&y.length===0&&H.length===0?null:r.jsxs("div",{className:"s-message-embeds",children:[f.map(m=>r.jsx(Zr,{src:m.src,alt:m.alt},m.id)),y.slice(0,1).map(m=>r.jsx(eo,{preview:m},m.id)),H.map(m=>{const N=vt(m),W=N?rs(N):null,q=m.fileName??J(m.metadata,"title")??m.mediaType;return W?r.jsxs("a",{className:"s-message-embed s-message-embed--file",href:W,target:"_blank",rel:"noreferrer",children:[r.jsx("span",{className:"s-message-embed-title",children:q}),r.jsx("span",{className:"s-message-embed-description",children:m.mediaType})]},m.id):r.jsxs("div",{className:"s-message-embed s-message-embed--file",children:[r.jsx("span",{className:"s-message-embed-title",children:q}),r.jsx("span",{className:"s-message-embed-description",children:m.mediaType})]},m.id)})]})}function so(n){const{sessionIds:c,active:d}=n,f=c.join("|"),y=d&&c.length>0,[C,re]=o.useState([]);return o.useEffect(()=>{re([])},[f]),o.useEffect(()=>{if(!y)return;let H=!1;const m=new URLSearchParams({limit:String(Mr*3),transcripts:"true"});return U(`/api/tail/recent?${m.toString()}`).then(N=>{if(H)return;const W=(N.events??[]).filter(q=>Zs(q,c));W.length!==0&&re(q=>en(q,W))}).catch(()=>{}),()=>{H=!0}},[y,f]),qr(H=>{y&&Zs(H,c)&&re(m=>en(m,[H]))},y),o.useMemo(()=>y?Nr(C):[],[y,C])}const no=3500;function sn(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 ao=64;function ro(n){const c=n?.clientMessageId;return typeof c=="string"&&c.trim()?c.trim():null}function nn(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 an(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 oo(n){return n instanceof TypeError||typeof DOMException<"u"&&n instanceof DOMException&&n.name==="AbortError"}function Hi({conversationId:n,initialDraft:c,navigate:d,embedded:f,showBackNav:y=!0,beside:C,backLabel:re,treatment:H="standard"}){const{agents:m,route:N,openContextCapture:W}=gr(),q=Hs(N),k=o.useMemo(()=>Ca(m,q),[m,q]),[h,Tt]=o.useState(null),cs=o.useRef(null);cs.current=h;const Ze=o.useMemo(()=>wt(n),[n]),[ln,cn]=o.useState(()=>Ze?{[n]:Ze}:{}),b=ln[n]??Ze??[],[dn,ds]=o.useState(()=>Ze!==null),Ae=o.useRef(null),us=o.useMemo(()=>{const e=Ae.current;return e===null?null:new Set(b.filter(t=>!e.has(t.id)).map(t=>t.id))},[b]),et=Ae.current===null&&b.length>0;o.useEffect(()=>{if(b.length===0)return;const e=Ae.current??new Set;for(const t of b)e.add(t.id);Ae.current=e},[b]),o.useEffect(()=>{Ae.current=null,ds(wt(n)!==null)},[n]);const ms=!dn&&b.length===0,G=o.useCallback(e=>{cn(t=>{const s=t[n]??wt(n)??[],a=typeof e=="function"?e(s):e,i=ha(n,a);return{...t,[n]:i}})},[n]),un=Zt(n),[g,we]=o.useState(un),[Ie,je]=o.useState([]),[tt,xt]=o.useState(null),[st,Re]=o.useState(null),[nt,mn]=o.useState(()=>typeof window>"u"?null:sn(window.location.hash)),[hs,oe]=o.useState(null),[Ct,ps]=o.useState(()=>tn(n)),[Se,kt]=o.useState(!1),[hn,Ee]=o.useState(!1),[Mt,at]=o.useState(0),Le=o.useRef(null),$e=o.useRef(null),pn=o.useRef(null),Fe=o.useRef(!0),rt=o.useRef(!1),be=o.useRef(null),A=o.useRef(null),Pe=o.useRef(new Set),Oe=o.useRef(null),fs=o.useRef(0),gs=o.useRef(null),qe=o.useRef(null),De=o.useRef(new Set),X=o.useRef(n);X.current=n;const ie=o.useRef(new Map),fn=Bs(n),ot=o.useRef(!1);o.useLayoutEffect(()=>{const e=$e.current,t=Le.current;!e||!t||(t.scrollTop=e.scrollTop+(t.scrollHeight-e.scrollHeight),$e.current=null,ot.current=!0)}),o.useEffect(()=>{kt(!1),$e.current=null,ot.current=!1,Fe.current=!0,rt.current=!1,Ee(!1),at(0),Vt(new Set),ie.current.clear(),we(Zt(n)),ps(tn(n))},[n]);const it=o.useCallback(async e=>{let s=typeof e.metadata?.flightId=="string"?e.metadata.flightId.trim():"";if(!s&&e.replyToMessageId)try{s=(await U(`/api/flights?conversationId=${encodeURIComponent(n)}&active=false`)).find(i=>i.messageId===e.replyToMessageId)?.id??""}catch{}await hr({...s?{flightId:s}:{},conversationId:n,messageId:e.replyToMessageId??e.id,itemUpdatedAt:ts(e.createdAt)??Date.now()})},[n]),ys=o.useCallback(e=>{const t=e.replyToMessageId??e.id;ps(Wr(n,e.id)),ns({type:"dismiss-conversation-failure",conversationId:n,messageId:t,reason:"The operator cleared this delivery issue"});const s=`${n}:${e.id}`;De.current.add(s),it(e).catch(()=>{De.current.delete(s)})},[n,it]);o.useEffect(()=>{for(const e of b){if(!Ct.has(e.id)||!Xs(e))continue;const t=`${n}:${e.id}`;De.current.has(t)||(De.current.add(t),it(e).catch(()=>{De.current.delete(t)}))}},[n,Ct,b,it]);const x=h?.agentId??null,M=h?.kind==="direct",lt=o.useMemo(()=>new Set([n,...h?.equivalentConversationIds??[]]),[n,h?.equivalentConversationIds]),Q=o.useMemo(()=>x?k.find(e=>e.id===x)??null:null,[k,x]),ws=ka(h),gn=Ma({resolvedAgentId:Q?.id,sessionId:ws,machineId:q}),[Nt,Ss]=o.useState(null);o.useEffect(()=>{U("/api/fleet").then(e=>{Ss(t=>ae(t,Ws(e.activeAsks,n,x)))}).catch(()=>{})},[n,x]);const D=o.useCallback(async(e={})=>{const t=e.messageMode??"none",s=e.includeMetadata??!0;oe(null);try{const a=s?await U(`/api/session/${encodeURIComponent(n)}`).catch(()=>null):cs.current;if(X.current!==n)return;Tt(v=>ae(v,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 u=wt(l),R=pa(l),w=t==="initial"&&!R,p=t==="refresh"||t==="initial",S=Promise.all([U(`/api/flights?conversationId=${encodeURIComponent(l)}`).catch(()=>[]),U("/api/fleet?limit=24&activityLimit=160").catch(()=>Na())]),V=await(w?fa(l):p?ga(l,{refresh:!0}):Promise.resolve(u));if(X.current!==n)return;const L=Ne(V??[]),ye=L.filter(v=>!ss(v));V&&G(v=>ae(v,Aa(v,ye))),ds(!0),fr(l);const E=L.at(-1);E&&qe.current!==E.id&&(qe.current=E.id,U(`/api/conversations/${encodeURIComponent(l)}/read-cursor`,{method:"POST",body:JSON.stringify({lastReadMessageId:E.id})}).catch(()=>{qe.current===E.id&&(qe.current=null)}));const[ne,z]=await S;if(X.current!==n)return;const K=Ia(ne),Y=Zt(l),Me=K??Y;Pe.current=new Set([...ne.map(v=>v.invocationId),...Y?.invocationId?.startsWith("pending:")?[]:Y?.invocationId?[Y.invocationId]:[]]),K&&Y?.id===K.id&&Us(l,K.id);const P=Me?.agentId??i??null,Xt=ja(z.activity,Me,l,P),yt=Ra(z.activeAsks,Me,l,P);we(v=>ae(v,Me)),je(v=>ae(v,Xt)),Re(v=>ae(v,yt)),Ss(v=>ae(v,Ws(z.activeAsks,l,i)))}catch(a){if(X.current!==n)return;oe(a instanceof Error?a.message:String(a))}},[n,d,G]);o.useEffect(()=>{D({messageMode:"initial"})},[D]),o.useEffect(()=>{qe.current=null},[n]),o.useEffect(()=>{Oe.current=g},[g]);const yn=o.useCallback(async()=>{if(Se||!Bs(n))return;const e=Le.current,t=e?{scrollHeight:e.scrollHeight,scrollTop:e.scrollTop}:null;kt(!0),oe(null);try{const s=await ya(n);if(X.current!==n)return;t&&($e.current=t),G(Ne(s).filter(a=>!ss(a)))}catch(s){X.current===n&&oe(s instanceof Error?s.message:String(s))}finally{X.current===n&&kt(!1)}},[n,Se,G]),[I,B]=o.useState(()=>c??""),[le,ce]=o.useState(null),[_,ct]=o.useState(!1),[T,wn]=o.useState("operator"),[de,Be]=o.useState({open:!1,query:"",triggerStart:-1,index:0}),[ue,Ue]=o.useState({open:!1,query:"",triggerStart:-1,index:0}),[$,Z]=o.useState(null),[At,dt]=o.useState(!1),[It,ut]=o.useState(""),[Sn,He]=o.useState(null),[bn,jt]=o.useState(!1);o.useEffect(()=>{dt(!1),ut(""),He(null),jt(!1)},[n]),o.useEffect(()=>{if(!c)return;const e=`${n}:${c}`;gs.current!==e&&(gs.current=e,B(c),requestAnimationFrame(()=>A.current?.focus()))},[n,c]);const ee=o.useMemo(()=>{const e=new Map;for(const t of h?.participants??[])e.set(t.actorId,t),t.agentId&&e.set(t.agentId,t);return e},[h]),Rt=o.useMemo(()=>{const e=new Set,t=[];for(const s of h?.participantIds??[]){if(s==="operator")continue;const a=ee.get(s),i=a?.scopedAlias?.trim().replace(/^@+/,"");if(!i)continue;const l=i.toLowerCase();e.has(l)||(e.add(l),t.push({id:s,label:a?.label??a?.displayName??i,name:a?.displayName??i,handle:i}))}for(const s of k){const a=s.handle?.trim().replace(/^@+/,"")??_s(s.id)??s.id;if(!a)continue;const i=a.toLowerCase();e.has(i)||(e.add(i),t.push({id:s.id,label:a,name:s.name??a,handle:a}))}return t.sort((s,a)=>s.handle.localeCompare(a.handle))},[ee,k,h]),vn=o.useMemo(()=>{if(!de.open)return[];const e=de.query.toLowerCase();return e?Vs.filter(t=>t.command.toLowerCase().startsWith("/"+e)||t.command.toLowerCase().includes(e)):Vs},[de.open,de.query]),Tn=o.useMemo(()=>{if(!ue.open)return[];const e=ue.query.toLowerCase();return e?Rt.filter(t=>t.handle.toLowerCase().includes(e)||t.name.toLowerCase().includes(e)||t.label.toLowerCase().includes(e)).slice(0,8):Rt.slice(0,8)},[ue.open,ue.query,Rt]),xn=o.useCallback(()=>{Be(e=>e.open?{...e,open:!1}:e),Ue(e=>e.open?{...e,open:!1}:e)},[]),Cn=o.useCallback((e,t)=>{const s=Ea(e,t);Be(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=La(e,t);Ue(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)},[]),kn=o.useCallback(e=>{const t=A.current,s=de.triggerStart;if(s<0)return;const a=t?.selectionStart??I.length,i=I.slice(0,s),l=I.slice(a),u=e.insert,R=`${i}${u}${l}`;B(R),Be(w=>({...w,open:!1})),requestAnimationFrame(()=>{const w=A.current;if(!w)return;const p=i.length+u.length;w.focus(),w.setSelectionRange(p,p)})},[I,de.triggerStart]),Mn=o.useCallback(e=>{const t=A.current,s=ue.triggerStart;if(s<0)return;const a=t?.selectionStart??I.length,i=I.slice(0,s),l=I.slice(a),u=l.length===0||!l.startsWith(" "),R=`@${e.handle}${u?" ":""}`,w=`${i}${R}${l}`;B(w),Ue(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,ue.triggerStart]);o.useEffect(()=>{const e=A.current;if(!e)return;e.style.height="0px";const t=Math.min(Math.max(e.scrollHeight,40),160);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?"auto":"hidden"},[I]),o.useEffect(()=>{U("/api/user").then(e=>wn(e.name)).catch(()=>{})},[]);const mt=o.useMemo(()=>$a(b,T),[b,T]);o.useEffect(()=>{$===null||mt===null||mt>=$&&Z(null)},[$,mt]);const Nn=o.useMemo(()=>nr(g),[g]),ve=Date.now(),An=ar(g,mt,ve),Et=Nn&&!rr(g)&&!An,bs=M&&(_||$!==null||Et),vs=M&&Fa({sending:_,awaitingResponse:$!==null,currentFlight:g}),F=Ks({name:Q?.name,agentName:h?.agentName,id:x,title:h?.title}),j=o.useMemo(()=>M?Pa({agentName:F,agentState:Q?.state??null,sending:_,currentFlight:g,showWorkingTurn:Et,awaitingResponse:$!==null}):{label:"Open",detail:"",tone:"idle",showStrip:!1,showTyping:!1},[Q?.state,F,$,g,ve,M,_,Et]),Lt=g?.startedAt??st?.startedAt??$,$t=ts(Lt),Ts=Xa(Lt,ve),[,In]=o.useState(0);o.useEffect(()=>{if(!j.showTyping||$t===null)return;const e=Math.max(0,Date.now()-$t),t=[Js.sustained,Js.long].find(a=>a>e);if(t===void 0)return;const s=window.setTimeout(()=>In(a=>a+1),t-e+50);return()=>window.clearTimeout(s)},[$t,j.showTyping,Ts]);const jn="Live",Ft=o.useMemo(()=>Oa({currentFlight:g,presence:j,turnActivity:Ie,turnAsk:st,awaitingResponseSince:$,nowMs:ve}),[$,g,ve,j,Ie,st]),Rn="s-thread-msg-card s-thread-msg-working-card s-thread-msg-card--avatar-row",En="s-thread-msg-kind",Ln="s-thread-turn-snapshot",$n="s-thread-turn-snapshot-pulse",Fn="s-thread-presence-line",Pn=["s-thread-presence-strip",`s-thread-presence-strip--${Ts}`].filter(Boolean).join(" "),Pt=h?qa(h):F,We=h?.id??n,On=h?.alias?.trim()||null,ht=Da(h?.workspaceRoot),qn=j.tone,Ot=b.length===0&&M&&(j.showTyping||g!==null||Ie.length>0||st!==null||$!==null),xs=o.useMemo(()=>h?h.participantIds.includes("operator"):M,[M,h]),_e=g?.agentId??x,Ve=_e?es(k,[_e]):null,Ke=Ve?.id??_e,Qe=g?.sessions.at(-1)?.sessionId??Ve?.harnessSessionId??void 0,Cs=g?.id?()=>{bt(d,{view:"sessions",flightId:g.id,...Ke?{agentId:Ke}:{},...Qe?{sessionId:Qe}:{},...q?{machineId:q}:{}},{returnTo:N})}:void 0,ks=g?.id??null;o.useEffect(()=>{if(!ks||!Ke){xt(null);return}let e=!1;const t=Qe?`?sessionId=${encodeURIComponent(Qe)}`:"",s=async()=>{try{const i=await U(`/api/agents/${encodeURIComponent(Ke)}/observe${t}`);if(e)return;xt(l=>ae(l,i))}catch{}};s();const a=window.setInterval(()=>{s()},no);return()=>{e=!0,window.clearInterval(a),xt(null)}},[ks,Ke,Qe]);const qt=o.useMemo(()=>Ar({flight:g,agent:Ve??Q,sessionMeta:h,observeSessionId:tt?.sessionId}),[Q,g,h,tt?.sessionId,Ve]),Ms=so({sessionIds:qt,active:j.showTyping||Ot}),Dn=o.useMemo(()=>Ir({observe:tt,flight:g}),[g,tt]),te=Ms.length>0?Ms:Dn,Dt=o.useMemo(()=>te.length>0?null:jr({flight:g,hasSessionScope:qt.length>0,awaitingResponse:$!==null}),[$,g,qt.length,te.length]),Bt=Rr(te),Ut=Er(te),Ns=te.at(-1)??null,Ht=Ns?St(Ns.ts,ve):null,me=o.useMemo(()=>Ut?{...Ft,latest:Ut,...Bt?{activityLabel:Bt}:{},...Ht?{lastActivityLabel:Ht}:{}}:Ft,[Ht,Ut,Ft,Bt]),Bn=`${F}: ${me.latest}`,As=_e&&Ba(Ve)?()=>{bt(d,{view:"terminal",agentId:_e,mode:"takeover"},{returnTo:N})}:void 0,Wt=M?()=>{f&&ns({type:"focus-composer",reason:"Steer the active conversation"})||requestAnimationFrame(()=>{A.current?.focus({preventScroll:!0}),A.current?.scrollIntoView({block:"nearest"})})}:void 0,[Te,Is]=o.useState(()=>{if(f||typeof window>"u")return"thread";const e=new URLSearchParams(window.location.search).get("view");return e==="flow"||e==="map"||e==="canvas"?e:"thread"}),Un=o.useCallback(e=>Is(e),[]),js=xr(d,Hs(N)??void 0),Hn=o.useCallback(e=>{Is("thread"),js(e)},[js]),Wn=va();o.useEffect(()=>{if(f||typeof window>"u")return;const e=new URL(window.location.href),t=Te==="thread"?"":Te;(e.searchParams.get("view")??"")!==t&&(t?e.searchParams.set("view",t):e.searchParams.delete("view"),window.history.replaceState(window.history.state,"",`${e.pathname}${e.search}${e.hash}`))},[f,Te,Wn.searchStr]);const _n=o.useMemo(()=>(h?h.participantIds.filter(t=>t!=="operator"):x?[x]:[]).map(t=>{const s=es(k,[t]),a=ee.get(t);return{id:t,name:a?.scopedAlias??s?.name??a?.displayName??_s(t)??t,title:a?.label??s?.id??t,agent:s,sessionId:a?.sessionId??null,harness:s?.harness??a?.harness??null,model:s?.model??null,reasoningEffort:s?.reasoningEffort??null}}),[x,ee,k,h]),Vn=o.useMemo(()=>({name:T,active:xs}),[xs,T]),he=o.useMemo(()=>new Map(b.map(e=>[e.id,e])),[b]),_t=o.useMemo(()=>k.find(e=>pr(e)&&!!e.conversationId?.trim())?.conversationId?.trim()??null,[k]),ze=o.useMemo(()=>Ua(b),[b]),[Kn,Vt]=o.useState(()=>new Set),Qn=o.useCallback(e=>{Vt(t=>{const s=new Set(t);return s.delete(e)||s.add(e),s})},[]),Rs=o.useMemo(()=>{const e=new Map;for(const t of ze)if(t.kind==="fanout")for(const s of t.messages)e.set(s.id,t.key);return e},[ze]),pt=o.useCallback(e=>{const t=Rs.get(e);t&&Vt(l=>l.has(t)?l:new Set(l).add(t));const s=document.getElementById(`msg-${e}`);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)},[Rs]);o.useEffect(()=>{const e=()=>mn(sn(window.location.hash));return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),o.useEffect(()=>{if(!nt||!he.has(nt))return;const e=window.setTimeout(()=>pt(nt),50);return()=>window.clearTimeout(e)},[nt,he,pt]),sr(o.useCallback(e=>{if(e.kind==="message.posted"){const t=e.payload?.message;if(!t||!lt.has(t.conversationId))return;const s=t.actorId==="operator",a=M&&!s&&t.class==="agent",i={id:t.id,conversationId:t.conversationId,actorId:t.actorId,actorName:a?F:Ha(t.actorId,k,T),body:t.body,createdAt:t.createdAt,class:s?"operator":t.class,attachments:t.attachments,metadata:t.metadata,replyToMessageId:t.replyToMessageId??t.n??null};if(ss(i))return;if(G(l=>{const u=ro(t.metadata),R=u?ie.current.get(u):void 0;if(l.some(w=>w.id===t.id))return u&&ie.current.delete(u),l;if(s&&u){const w=Wa(l,u,R);if(w!==-1){const p=[...l];return p[w]=i,ie.current.delete(u),Ne(p)}}return Ne([...l,i])}),a){const l=ts(t.createdAt)??Date.now();Z(u=>u===null||l<u||or(Oe.current)?u:null),we(u=>ir(u)?null:u)}return}if(e.kind==="invocation.requested"){const t=e.payload?.invocation;if(!_a(t,lt))return;Pe.current.add(t.id),je([]),Re(null),Z(s=>s??Date.now());return}if(e.kind==="conversation.upserted"){const t=e.payload?.conversation;t?.id&<.has(t.id)&&D({messageMode:"none",includeMetadata:!1});return}if(e.kind==="flight.updated"){const t=e.payload?.flight;if(!t||t.targetAgentId!==x||!(Pe.current.has(t.invocationId)||Oe.current?.id===t.id))return;if(lr.has(t.state)){Us(n,t.id),we(l=>l?.id===t.id?null:l),je([]),Re(null),Z(null),D({messageMode:"refresh",includeMetadata:!1});return}Pe.current.add(t.invocationId);const a=Oe.current?.id===t.id,i=Qs(t,n,x??"",Oe.current);cr(i)&&Z(null),we(i),a||(je([]),Re(null));return}e.kind!=="agent.endpoint.upserted"&&e.kind==="unknown"&&D({messageMode:"refresh"})},[x,F,n,lt,M,D,T,k])),o.useEffect(()=>{if(!bs)return;const e=setInterval(()=>{D({messageMode:"refresh",includeMetadata:!1})},5e3);return()=>clearInterval(e)},[bs,D]),o.useEffect(()=>{const e=()=>{if(document.visibilityState!=="visible")return;const t=Date.now();t-fs.current<1e3||(fs.current=t,D({messageMode:"refresh"}))};return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[D]);const Kt=o.useRef(null),Es=o.useRef(!1),Qt=o.useRef(!1),zt=o.useCallback(e=>{const t=Le.current;t&&(rt.current=!0,be.current!==null&&clearTimeout(be.current),e==="instant"?t.scrollTop=t.scrollHeight:t.scrollTo({top:t.scrollHeight,behavior:"smooth"}),be.current=setTimeout(()=>{rt.current=!1,be.current=null},e==="smooth"?700:0))},[]);o.useEffect(()=>()=>{be.current!==null&&clearTimeout(be.current)},[]);const zn=o.useCallback(()=>{const e=Le.current;if(!e||rt.current)return;const s=e.scrollHeight-e.clientHeight-e.scrollTop<=ao;Fe.current=s,s?(Ee(!1),at(0)):Ee(!0)},[]),Jn=o.useCallback(()=>{Fe.current=!0,Ee(!1),at(0),zt("smooth")},[zt]);o.useEffect(()=>{const e=b.at(-1)?.id??null,t=!!(e&&e!==Kt.current),s=Va({newestMessageId:e,previousNewestMessageId:Kt.current,showTyping:j.showTyping,previousShowTyping:Es.current,historyRestorePending:ot.current||$e.current!==null,initialScrollDone:Qt.current,nearBottom:Fe.current});s!=="none"?(zt(s),Qt.current=!0):t&&Qt.current&&!Fe.current&&(Ee(!0),at(a=>a+1)),ot.current=!1,Kt.current=e,Es.current=j.showTyping});const[,Gn]=o.useState(0);o.useEffect(()=>{const e=setInterval(()=>Gn(t=>t+1),15e3);return()=>clearInterval(e)},[]);const pe=Ta(),[fe,se]=o.useState([]),[Ls,ft]=o.useState("queue"),[xe,Ce]=o.useState(null),ke=async(e,t)=>{const s=e.trim(),a=t?.attachments??[],i=t?.replyTarget??null;if(!s&&a.length===0||_)return"failed";const u=t?.forceAction??Gs({isDm:M,hasOutstandingReply:vs}),R=Date.now(),w=Sa(),p={id:`optimistic-${w}`,conversationId:n,actorId:"operator",actorName:T,body:s,createdAt:R,class:"operator",...i?{replyToMessageId:i.messageId}:{},metadata:{clientMessageId:w,deliveryState:"sending"},...a.length>0?{attachments:a}:{}};ct(!0),u!=="message"&&Z(R),oe(null),ie.current.set(w,p.id),G(S=>Ne([...S,p]));try{const S=await U(`/api/chats/${encodeURIComponent(n)}/messages`,{method:"POST",body:JSON.stringify({body:s,clientMessageId:w,...i?{replyToMessageId:i.messageId}:{},...a.length>0?{attachments:a}:{}})}),V=S.chatId?.trim()??S.conversationId?.trim();if(V&&V!==n)throw new Error(`Send returned a different Chat (${V}) instead of appending to ${n}.`);if(S.messageId?.trim()){const L=S.messageId.trim();G(ye=>Ne(ye.map(E=>E.id===p.id?{...E,id:L,metadata:{clientMessageId:w}}:E))),ie.current.delete(w)}return S.flight?(Pe.current.add(S.flight.invocationId),we(Qs(S.flight,n,x??"")),je([]),Re(null)):u!=="message"&&Z(null),"sent"}catch(S){return oo(S)?(G(V=>V.map(L=>L.id===p.id?{...L,metadata:{...L.metadata??{},deliveryState:"unknown"}}:L)),"unknown"):(G(V=>V.filter(L=>L.id!==p.id)),ie.current.delete(w),Z(null),oe(S instanceof Error?S.message:String(S)),"failed")}finally{ct(!1)}},Yn=async e=>{const t=e.replyToMessageId?he.get(e.replyToMessageId):null;if(!t||_)return;const s=[];for(const i of t.attachments??[]){if(!i.url){oe("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 ke(t.body,{forceAction:"invoke",attachments:s})!=="failed"&&ys(e)},Xn=(e,t,s)=>{if(!_t)return;const a=e.replyToMessageId?he.get(e.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 ${t}.`,s,"","Original request:",i].join(`
|
|
2
|
+
`),u={view:"conversation",conversationId:_t,composeDraft:l};f&&ns({type:"navigate",route:u,reason:"Ask @scoutbot to help recover a failed conversation request"})||d(u)},Zn=async()=>{const e=I.trim(),t=le,s=pe.files,a=xe?.attachments??[];if(!e&&s.length===0&&a.length===0)return null;let i=[];if(s.length>0){ct(!0);try{i=await ba(s)}catch(l){return pe.setError(l instanceof Error?l.message:String(l)),null}finally{ct(!1)}}return B(""),ce(null),pe.clear(),Ce(null),{body:e,attachments:[...a,...i],replyTarget:t}},ea=async()=>{const e=er({isAgentBusy:ge,intent:Ls}),t=xe?.id??null,s=await Zn();if(!s)return;if(e==="queue"){se(l=>t?l.map(u=>u.id===t?{...u,body:s.body,attachments:s.attachments,replyTarget:s.replyTarget}:u):[...l,{id:`queued-${Date.now()}-${l.length}`,body:s.body,attachments:s.attachments,replyTarget:s.replyTarget,queuedAt:Date.now()}]);return}t&&se(l=>l.filter(u=>u.id!==t));const a=()=>{B(s.body),Ce(s.attachments.length>0?{id:null,attachments:s.attachments}:null),ce(s.replyTarget),requestAnimationFrame(()=>A.current?.focus())};if(e==="steer"){ft("queue"),await Gt(),await ke(s.body,{forceAction:"steer",attachments:s.attachments,replyTarget:s.replyTarget})==="failed"&&a();return}await ke(s.body,{attachments:s.attachments,replyTarget:s.replyTarget})==="failed"&&a()},ta=e=>{se(t=>t.filter(s=>s.id!==e)),Ce(t=>t?.id===e?null:t)},sa=e=>{const t=fe.find(s=>s.id===e);t&&(B(t.body),ce(t.replyTarget??null),Ce({id:e,attachments:t.attachments}),requestAnimationFrame(()=>{const s=A.current;s&&(s.focus(),s.setSelectionRange(s.value.length,s.value.length))}))},na=()=>{Ce(null),B(""),ce(null),pe.clear()},aa=async e=>{const t=fe.find(a=>a.id===e);if(!t)return;se(a=>a.filter(i=>i.id!==e)),await Gt(),await ke(t.body,{forceAction:"steer",attachments:t.attachments,replyTarget:t.replyTarget??null})==="failed"&&se(a=>[t,...a])},gt=o.useCallback((e,t)=>{const s=t?.trim().replace(/^@+/,"")||null,a=s?`@${s}`:null,i=le?.insertedMention?an(I,le.insertedMention):I,l=!!(!M&&a&&!i.toLocaleLowerCase().includes(a.toLocaleLowerCase())),u=l&&a?i.trim()?`${i.trimEnd()} ${a} `:`${a} `:i;B(u),ce({messageId:e.id,actorLabel:s?`@${s}`:e.actorName,preview:nn(e),insertedMention:l?a:null}),requestAnimationFrame(()=>A.current?.focus())},[I,M,le?.insertedMention]),ra=o.useCallback(()=>{const e=le?.insertedMention;ce(null),e&&B(t=>an(t,e)),requestAnimationFrame(()=>A.current?.focus())},[le]),Jt=o.useCallback(e=>{const t=new URL(window.location.href);N.view==="agents-v2"&&t.searchParams.set("tab","message"),t.hash=`msg-${e}`,Ye(t.toString())},[N.view]),$s=o.useCallback((e,t,s)=>{const a=wa({conversationId:n,selectedMessageId:e.id,messages:b.map(i=>({id:i.id,actorLabel:i.id===e.id?t:Ge(i,T)?T:i.actorName,body:i.body,attachmentCount:i.attachments?.length??0}))});W({intent:"forward-message",forwardContext:a,forwardContextMode:"selected-message",...s?{projectPath:s}:{}})},[n,b,W,T]),Gt=async()=>{if(x)try{await U("/api/agents/"+encodeURIComponent(x)+"/interrupt",{method:"POST",body:JSON.stringify({})})}catch{}},ge=j.tone==="working"||j.tone==="pending",oa=Gs({isDm:M,hasOutstandingReply:vs}),ia=M?`Message ${F} — type / to route or @ to mention an agent`:h?.kind==="channel"?`Comment in #${dr(h)} — mention @agent to request a reply`:`Comment in ${Pt} — mention @agent to request a reply`,Fs=xe?.attachments??[],la=!I.trim()&&!pe.hasFiles&&Fs.length===0&&ge,Yt=o.useRef(!1);o.useEffect(()=>{const e=xe?.id??null,t=e?fe.filter(a=>a.id!==e):fe;if(!Ka({isAgentBusy:ge,sending:_,queued:t})||Yt.current)return;const s=t[0];s&&(Yt.current=!0,se(a=>a.filter(i=>i.id!==s.id)),ke(s.body,{attachments:s.attachments,replyTarget:s.replyTarget??null}).then(a=>{a==="failed"&&se(i=>[s,...i])}).finally(()=>{Yt.current=!1}))},[ge,_,fe,xe]),o.useEffect(()=>{ge||ft("queue")},[ge]),o.useEffect(()=>{se([]),Ce(null),ce(null),ft("queue"),pe.clear()},[n]);const ca=Qa(fe),Ps=yr(),da=o.useCallback((e,t)=>{const s=window.getSelection()?.toString().trim(),a=Ge(t,T),i=t.actorId?ee.get(t.actorId):null,l=a?null:zs(t,k,x),u=(i?.scopedAlias?.trim()||l?.handle?.trim()||null)?.replace(/^@+/,"")??null,R=u?`@${u}`:t.actorName,w=(l?.id||i?.agentId||t.actorId||"").trim(),p=[];a||p.push({kind:"action",label:"Reply",onSelect:()=>gt(t,u)}),p.push({kind:"action",label:"Forward to new task…",onSelect:()=>$s(t,R,i?.workspaceRoot??l?.projectRoot??l?.cwd??void 0)}),p.push({kind:"separator"}),s&&p.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{Ye(s)}}),p.push({kind:"action",label:"Copy Message",onSelect:()=>{Ye(t.body)}}),p.push({kind:"action",label:"Copy Link",onSelect:()=>Jt(t.id)}),p.push({kind:"separator"}),!a&&w&&p.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{Ye(w)}}),p.push({kind:"action",label:"Copy Message ID",onSelect:()=>{Ye(t.id)}}),Ps(e,p)},[x,gt,Jt,$s,T,ee,k,Ps]),ua=async(e,t)=>{const s=`@${t.agentId} `,a=I.trim();if(a){B(""),await ke(`${s}${a}`,{forceAction:"invoke"});return}B(s),A.current?.focus()},Je=o.useMemo(()=>{if(!h)return[];const e=new Set(h.participantIds);return k.filter(t=>!e.has(t.id)&&!t.retiredFromFleet).sort((t,s)=>t.name.localeCompare(s.name))},[h,k]);o.useEffect(()=>{At&&ut(e=>e&&Je.some(t=>t.id===e)?e:Je[0]?.id??"")},[At,Je]);const Os=!!(h&&["direct","group_direct","channel"].includes(h.kind)&&Je.length>0),ma=o.useCallback(async()=>{if(!h)return;const e=It.trim();if(e){jt(!0),He(null);try{const t=await U(`/api/conversations/${encodeURIComponent(h.id)}/members`,{method:"POST",body:JSON.stringify({actorId:e})});t.session?Tt(t.session):Tt(s=>s&&{...s,kind:t.kind,participantIds:t.participantIds}),dt(!1),ut(""),await D({messageMode:"none"})}catch(t){He(t instanceof Error?t.message:String(t))}finally{jt(!1)}}},[It,D,h]);return r.jsx("div",{className:`s-thread-layout${f?" s-thread-layout--embedded":""}`,"data-thread-treatment":H==="standard"?void 0:H,children:r.jsxs("div",{className:"s-thread-center",children:[!f&&r.jsx(Sr,{showBackNav:y,backLabel:re,beside:C&&We?{on:C.has(We),toggle:()=>C.toggle(We)}:void 0,isDm:M,navigate:d,route:N,canonicalConversationId:We,threadTitle:Pt,agentId:Q?.id??null,sessionId:ws,detailRoute:gn,participants:_n,operator:Vn,canAddParticipants:Os,view:Te,onChangeView:Un,onToggleAddParticipant:()=>{He(null),dt(e=>!e)}}),!f&&h&&r.jsx(br,{canonicalConversationId:We,conversationAlias:On}),!f&&At&&Os&&r.jsx(vr,{agents:Je,addParticipantId:It,setAddParticipantId:ut,addingParticipant:bn,addParticipantError:Sn,onCancel:()=>{dt(!1),He(null)},onSubmit:()=>{ma()}}),Nt&&r.jsx(Dr,{pinnedAsk:Nt,onAnswer:()=>{const e=[...b].reverse().find(t=>t.actorId===Nt.agentId)??[...b].reverse().find(t=>!Ge(t,T)&&t.class!=="status"&&t.class!=="system");e?gt(e,e.actorId?ee.get(e.actorId)?.scopedAlias??null:null):A.current?.focus()},onSteer:Wt}),r.jsx(Br,{presence:j,agent:Q}),hs&&r.jsx("p",{className:"s-thread-error",children:hs}),Te!=="thread"?r.jsx(Tr,{messages:b,view:Te,participants:h?.participants,onStage:Hn,beside:C}):r.jsxs("div",{className:"s-thread-feed","data-conversation-id":n,ref:Le,onScroll:zn,children:[!ms&&b.length>0&&fn&&r.jsx("div",{className:"s-thread-history-control",children:r.jsxs("button",{type:"button",className:"s-thread-history-button",disabled:Se,"aria-busy":Se,onClick:()=>{yn()},children:[Se&&r.jsx("span",{className:"s-thread-history-spinner","aria-hidden":"true"}),Se?"Loading earlier messages…":"Load earlier messages"]})}),ms?r.jsx(Lr,{}):b.length===0?Ot?r.jsx($r,{agentName:F,title:j.label,detail:j.detail||me.latest,snapshot:me,events:Ie,steps:te,phase:Dt,tone:qn,workspaceName:ht,branch:h?.currentBranch,startedAt:Lt,onOpenTrace:Cs,onOpenTerminal:As,onSteer:Wt}):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:Pt}),r.jsx("p",{children:M?"No messages yet. Send a message to start working with this agent.":"No messages yet. Start the conversation below."}),(ht||h?.currentBranch)&&r.jsxs("div",{className:"s-thread-empty-chips",children:[ht&&r.jsx("span",{className:"s-thread-empty-chip",children:ht}),h?.currentBranch&&r.jsx("span",{className:"s-thread-empty-chip",children:h.currentBranch})]})]}):ze.map((e,t)=>{const s=za(e,t);if(e.kind==="fanout")return r.jsx(Cr,{row:e,expanded:Kn.has(e.key),showDayDivider:s,onToggle:()=>Qn(e.key)},e.key);const a=e.message,i=Ge(a,T),l=Ja(a),u=l?"scout.dispatch":a.class,R=Za(u),w=u==="status",p=Ys(a.createdAt),S=i?null:zs(a,k,x),L=(a.actorId?ee.get(a.actorId):void 0)?.scopedAlias?.trim()||null,ye=!i&&L?L:a.actorName,E=i?T.toLowerCase():L??S?.handle??null,ne=Ga(a.body),z=ne?Ya({flightId:ne.flightId,replyToMessageId:a.replyToMessageId,messagesById:he,agents:k,operatorName:T}):null,K=!ne&&a.replyToMessageId?he.get(a.replyToMessageId)??null:null,Y=K?Ge(K,T)?T:K.actorName:null,Me=ne?ne.body:a.body,P=Xs(a);if(P&&Ct.has(a.id))return null;const Xt=typeof a.metadata?.targetAgentId=="string"?a.metadata.targetAgentId:null,yt=P?es(k,[Xt,P.target]):null,v=P?Ks({name:yt?.name,id:yt?.id,title:mr(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(kr,{at:a.createdAt}),P&&v?r.jsxs("article",{id:`msg-${a.id}`,className:["s-thread-msg","s-thread-failure-notice",(et||us?.has(a.id))&&"s-thread-msg--enter"].filter(Boolean).join(" "),style:et?{animationDelay:`${Math.max(0,7-(ze.length-1-t))*26}ms`}:void 0,"data-class":u,"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:[v," 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&&he.has(a.replyToMessageId)&&r.jsx("button",{className:"s-thread-failure-notice-action s-thread-failure-notice-action--primary",type:"button",disabled:_,onClick:()=>{Yn(a)},children:_?"Retrying…":"Retry"}),_t&&r.jsx("button",{className:"s-thread-failure-notice-action",type:"button",onClick:()=>Xn(a,v,P.explanation),children:"Ask @scoutbot"}),r.jsx("button",{className:"s-thread-failure-notice-action s-thread-failure-notice-action--clear",type:"button",onClick:()=>ys(a),"aria-label":`Clear delivery issue for ${v}`,children:"Clear"})]})]}),r.jsx("span",{className:"s-thread-failure-notice-time",title:p,children:St(a.createdAt)})]}):r.jsx("article",{id:`msg-${a.id}`,className:["s-thread-msg",i&&"s-thread-msg--you",w&&"s-thread-msg--tool",(et||us?.has(a.id))&&"s-thread-msg--enter"].filter(Boolean).join(" "),style:et?{animationDelay:`${Math.max(0,7-(ze.length-1-t))*26}ms`}:void 0,"data-class":u,onContextMenu:O=>da(O,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 O=!i&&S?()=>bt(d,{view:"agents-v2",agentId:S.id},{returnTo:N}):null,qs=i?T:ye??"?",Ds=r.jsx(as,{agent:S??void 0,name:qs,placement:"turn",size:28,className:"s-thread-msg-avatar",title:qs});return O?r.jsx("button",{type:"button",className:"s-thread-msg-avatar--nav",onClick:O,"aria-label":`View profile for ${a.actorName??"agent"}`,title:`View profile for ${a.actorName??"agent"}`,children:Ds}):Ds})(),!i&&S?r.jsx("button",{type:"button",className:"s-thread-msg-actor s-thread-msg-actor--nav",onClick:()=>bt(d,{view:"agents-v2",agentId:S.id},{returnTo:N}),title:`View profile for ${a.actorName}`,children:ye}):r.jsx("span",{className:"s-thread-msg-actor",children:i?T:ye}),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:St(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:()=>gt(a,E),children:r.jsx(os,{})}),r.jsx("button",{type:"button",className:"s-thread-msg-permalink","aria-label":"Copy link to message",title:"Copy link to message",onClick:()=>Jt(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"})]})})]})]}),z&&r.jsxs("button",{type:"button",className:"s-thread-reply-ctx",title:`Open the originating request${z.flightId?` · ${z.flightId}`:""}`,onClick:()=>pt(z.originatingMessageId),children:[r.jsx(os,{}),r.jsx("span",{className:"s-thread-reply-ctx-label",children:"reply to"}),r.jsx("span",{className:"s-thread-reply-ctx-title",children:z.title}),r.jsxs("span",{className:"s-thread-reply-ctx-from",children:["· ",z.from]}),r.jsx("span",{className:"s-thread-reply-ctx-status",children:"· done"})]}),K&&Y&&r.jsxs("button",{type:"button",className:"s-thread-reply-ctx",title:`Open message from ${Y}`,onClick:()=>pt(K.id),children:[r.jsx(os,{}),r.jsx("span",{className:"s-thread-reply-ctx-label",children:"reply to"}),r.jsx("span",{className:"s-thread-reply-ctx-title",children:nn(K)}),r.jsxs("span",{className:"s-thread-reply-ctx-from",children:["· ",Y]})]}),r.jsx("div",{className:"s-thread-msg-body",title:p,children:r.jsx(ur,{text:Me})}),r.jsx(to,{message:a}),l&&l.candidates.length>0&&r.jsx("div",{className:"s-thread-dispatch",children:l.candidates.map(O=>r.jsxs("button",{type:"button",className:"s-thread-dispatch-tile",onClick:()=>{ua(l,O)},children:[r.jsxs("span",{className:"s-thread-dispatch-tile-id",children:["@",O.agentId]}),r.jsx("span",{className:"s-thread-dispatch-tile-state",children:O.endpointState}),r.jsx("span",{className:"s-thread-dispatch-tile-meta",children:[O.workspace,O.node,O.projectRoot].filter(Boolean).join(" · ")||O.displayName})]},O.agentId))})]})})})]},a.id)}),j.showTyping&&!Ot&&r.jsx("div",{className:"s-thread-feed-block",children:r.jsx("div",{className:"s-thread-msg","aria-live":"polite",children:r.jsxs("div",{className:Rn,children:[r.jsx(as,{agent:Q??void 0,name:F,placement:"turn",size:28,className:"s-thread-msg-avatar s-thread-msg-avatar--working",title:F}),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:F}),r.jsx("span",{className:En,children:jn})]}),r.jsx("span",{className:"s-thread-msg-time",title:g?.startedAt?Ys(g.startedAt):"now",children:g?.startedAt?St(g.startedAt):"now"})]}),r.jsxs("div",{className:"s-thread-msg-working-body",children:[r.jsxs("div",{className:Ln,children:[r.jsx("span",{className:$n,"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:me.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:me.activityLabel})]}),r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Elapsed"}),r.jsx("dd",{children:me.elapsedLabel})]}),r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Last"}),r.jsx("dd",{children:me.lastActivityLabel})]})]}),te.length>0||Dt?r.jsx(Fr,{steps:te,phase:Dt,limit:5,compact:!0}):r.jsx(Pr,{events:Ie,limit:4,compact:!0}),r.jsx(Or,{onOpenTrace:Cs,onOpenTerminal:As,onSteer:Wt,compact:!0})]})]})]})})}),hn&&Mt>0&&r.jsxs("button",{type:"button",className:"s-thread-new-messages",onClick:Jn,children:[r.jsx("span",{"aria-hidden":"true",children:"↓"})," ",Mt," new ",Mt===1?"message":"messages"," · jump to latest"]}),r.jsx("div",{ref:pn})]}),j.showTyping&&r.jsxs("div",{className:Fn,children:[r.jsx("div",{className:"s-thread-presence-line-avatars",children:r.jsx(as,{agent:Q??void 0,name:F,placement:"turn",size:22,className:"s-thread-presence-line-avatar",title:F})}),r.jsx("span",{className:"s-thread-presence-line-label",children:Bn}),r.jsx("div",{className:Pn,"aria-hidden":"true"})]}),r.jsx(xa,{composeRef:A,draft:I,setDraft:B,composePlaceholder:ia,slashState:de,setSlashState:Be,filteredSlashCommands:vn,applySlashCommand:kn,mentionState:ue,setMentionState:Ue,filteredMentions:Tn,applyMention:Mn,updateTriggersFromDraft:Cn,closeSuggestions:xn,replyTarget:le,onCancelReply:ra,isStopMode:la,sending:_,composeAction:oa,onSend:()=>{ea()},onInterrupt:()=>{Gt()},attachments:pe,isAgentBusy:ge,busyIntent:Ls,onBusyIntentChange:ft,queued:fe,queueNote:ca,onEditQueued:sa,editingQueuedId:xe?.id??null,editingAttachmentCount:Fs.length,onCancelEdit:na,onUnqueue:ta,onSendQueuedNow:e=>{aa(e)}})]})})}function os(){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 Wi=wr({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:tr}});export{Hi as ConversationScreen,Wi as scoutSurface};
|
package/dist/client/assets/{ConversationStatus-CK-YfLpi.js → ConversationStatus-Cv-7hErW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as s}from"./index-
|
|
1
|
+
import{r as x,j as s}from"./index-DReVb7jZ.js";import{c as v,C as y,j as w}from"./conversation-model-m8HhzroS.js";import{C as b}from"./check-g7D7-c1J.js";import{S as C}from"./sparkles-Cc5lPZRv.js";import{X as k}from"./x-rlMdRqJF.js";import{c as E}from"./createLucideIcon-ChvMq-zl.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";import"./time-Dhsh_2EG.js";import"./conversations-Cbg9h_Af.js";const L=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],S=E("shield-alert",L);function z(e){const a=e.split(/\r?\n/).map(t=>t.trim()).find(Boolean)??"",r=110;return a.length>r?`${a.slice(0,r-1).trimEnd()}…`:a}function G({pinnedAsk:e,onAnswer:a,onApprove:r,onReject:t,onSteer:i,enableKeyboard:o=!0}){const l=e.summary?.trim()||null,d=z(e.task),p=l&&l!==e.task.trim()?l:d,N=p!==d&&d.length>0,c=/\b(?:approve|approval|permission|allow|proceed|confirm|gate)\b/i.test(p),f=c?"Approval Gate":p.includes("?")?"Question":e.statusLabel,g=e.agentName??v(e.agentId)??e.agentId,m=x.useCallback(()=>{r?r():a()},[r,a]),u=x.useCallback(()=>{i?i():a()},[i,a]);return x.useEffect(()=>{if(!o)return;const j=n=>{const h=document.activeElement;h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||h instanceof HTMLElement&&h.isContentEditable||n.metaKey||n.ctrlKey||n.altKey||(n.key==="y"||n.key==="Y"?(n.preventDefault(),m()):n.key==="s"||n.key==="S"?(n.preventDefault(),u()):(n.key==="n"||n.key==="N")&&t&&(n.preventDefault(),t()))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[o,m,u,t]),s.jsxs("div",{className:`s-thread-pinned-ask surface-card ${c?"s-thread-pinned-ask--approval":"s-thread-pinned-ask--question"}`,role:"alert","aria-live":"assertive",children:[s.jsxs("div",{className:"s-thread-pinned-ask-header",children:[s.jsx("div",{className:"s-thread-pinned-ask-beacon","aria-hidden":"true",children:s.jsx("span",{className:"dot dot--sm dot--warning dot--pulse dot--glow"})}),s.jsxs("div",{className:"s-thread-pinned-ask-kicker",children:[s.jsx("span",{className:"label-sm s-thread-pinned-ask-eyebrow",children:"Operator Attention Required"}),s.jsx("span",{className:"chip chip--sm chip--mono chip--warning",children:f})]}),s.jsxs("div",{className:"s-thread-pinned-ask-routing",children:[s.jsxs("span",{className:"s-thread-pinned-ask-agent-name chip chip--sm chip--mono chip--neutral",children:["@",g]}),s.jsx("span",{className:"s-thread-pinned-ask-routing-arrow","aria-hidden":"true",children:"→"}),s.jsx("span",{className:"chip chip--sm chip--mono chip--working",children:"You"})]})]}),s.jsxs("div",{className:"s-thread-pinned-ask-body",children:[s.jsx("p",{className:"s-thread-pinned-ask-text",children:p}),N&&s.jsxs("p",{className:"s-thread-pinned-ask-context text-muted",children:["Re: ",d]})]}),s.jsxs("div",{className:"s-thread-pinned-ask-actions",children:[s.jsxs("button",{type:"button",className:"btn btn--primary s-thread-pinned-ask-btn",onClick:m,title:c?"Approve this gate [Y]":"Answer this question [Y]",children:[s.jsx("kbd",{className:"s-kbd",children:"[Y]"}),c?s.jsx(b,{size:13,strokeWidth:2.2}):s.jsx(y,{size:13}),s.jsx("span",{children:c?"Approve":"Answer"})]}),s.jsxs("button",{type:"button",className:"btn btn--accent s-thread-pinned-ask-btn",onClick:u,title:"Provide guidance or steer [S]",children:[s.jsx("kbd",{className:"s-kbd",children:"[S]"}),s.jsx(C,{size:13,strokeWidth:1.9}),s.jsx("span",{children:"Steer"})]}),t&&s.jsxs("button",{type:"button",className:"btn btn--danger s-thread-pinned-ask-btn",onClick:t,title:"Reject or decline [N]",children:[s.jsx("kbd",{className:"s-kbd",children:"[N]"}),s.jsx(k,{size:13,strokeWidth:2.2}),s.jsx("span",{children:"Reject"})]})]}),s.jsx("div",{className:"s-thread-pinned-ask-strip","aria-hidden":"true"})]})}function H({title:e,description:a,diff:r,command:t,risk:i="medium",onApprove:o,onReject:l,onSteer:d}){return s.jsxs("div",{className:"s-thread-approval-gate surface-card",role:"alert",children:[s.jsxs("div",{className:"s-thread-approval-gate-head",children:[s.jsxs("div",{className:"s-thread-approval-gate-title-wrap",children:[s.jsx(S,{size:16,className:"text-amber","aria-hidden":"true"}),s.jsx("span",{className:"label-sm text-amber",children:"Execution Approval Gate"}),i&&s.jsxs("span",{className:`chip chip--sm chip--mono ${i==="high"?"chip--danger":i==="medium"?"chip--warning":"chip--info"}`,children:[i.toUpperCase()," RISK"]})]}),s.jsx("h3",{className:"s-thread-approval-gate-title",children:e}),a&&s.jsx("p",{className:"s-thread-approval-gate-desc",children:a})]}),t&&s.jsxs("div",{className:"s-thread-approval-gate-command surface-card surface-card--inset",children:[s.jsx("span",{className:"label-xs text-muted",children:"Command"}),s.jsx("code",{className:"s-thread-approval-gate-code",children:t})]}),r&&s.jsxs("div",{className:"s-thread-approval-gate-diff surface-card surface-card--inset",children:[s.jsx("span",{className:"label-xs text-muted",children:"Diff Preview"}),s.jsx("pre",{className:"s-thread-approval-gate-diff-pre",children:s.jsx("code",{children:r})})]}),s.jsxs("div",{className:"s-thread-approval-gate-actions",children:[s.jsxs("button",{type:"button",className:"btn btn--primary",onClick:o,children:[s.jsx("kbd",{className:"s-kbd",children:"[Y]"}),s.jsx(b,{size:13}),s.jsx("span",{children:"Approve Action"})]}),s.jsxs("button",{type:"button",className:"btn btn--danger",onClick:l,children:[s.jsx("kbd",{className:"s-kbd",children:"[N]"}),s.jsx(k,{size:13}),s.jsx("span",{children:"Reject"})]}),d&&s.jsxs("button",{type:"button",className:"btn btn--ghost",onClick:d,children:[s.jsx("kbd",{className:"s-kbd",children:"[S]"}),s.jsx("span",{children:"Steer…"})]})]})]})}function R({presence:e,agent:a}){if(!e.showStrip)return null;const r=e.tone==="working",t=e.tone==="pending";return s.jsxs("div",{className:`s-thread-status s-thread-status--${e.tone}`,"aria-live":"polite",children:[s.jsx("span",{className:"s-thread-status-dot-wrap","aria-hidden":"true",children:s.jsx("span",{className:`dot dot--sm ${r?"dot--working dot--pulse dot--glow":t?"dot--warning dot--pulse dot--glow":"dot--neutral"}`,style:{color:w(e,a?.state??null)}})}),s.jsxs("div",{className:"s-thread-status-copy",children:[s.jsx("span",{className:"s-thread-status-label label-xs",children:e.label}),s.jsx("span",{className:"s-thread-status-detail",children:e.detail})]})]})}export{H as ApprovalGateCard,R as ConversationStatusStrip,G as PinnedAskCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as G,u as O,r as d,v as U,x as E,C as z,y as P,z as X,j as r,A as g}from"./index-DReVb7jZ.js";import{H as Y}from"./HarnessMark-DSvM_H7H.js";const q={idle:{label:"Idle",colour:"var(--hud-dim, #71717a)"},thinking:{label:"Thinking",colour:"var(--info, #6fb7c7)"},working:{label:"Working",colour:"var(--hud-status-ok, #7fb069)"},needs:{label:"Needs attention",colour:"var(--hud-status-warn, #d9a441)"},error:{label:"Error",colour:"var(--hud-status-error, #c74a4a)"},offline:{label:"Offline",colour:"var(--hud-dim, #6e6e72)"}};function D(t){if(!t)return"idle";const e=t.toLowerCase();return e.includes("think")?"thinking":e.includes("work")||e.includes("turn")||e.includes("stream")||e.includes("run")||e.includes("busy")?"working":e.includes("need")||e.includes("wait")||e.includes("block")||e.includes("ask")||e.includes("prompt")?"needs":e.includes("err")||e.includes("fail")||e.includes("crash")?"error":e.includes("off")||e.includes("stop")||e.includes("down")||e.includes("dead")?"offline":"idle"}function J(t){const[e,i]=d.useState(0),s=d.useRef([]);return d.useEffect(()=>{if(t<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const h=()=>{s.current.push(window.setTimeout(()=>{i(1),s.current.push(window.setTimeout(()=>i(2),40)),s.current.push(window.setTimeout(()=>i(1),90)),s.current.push(window.setTimeout(()=>{i(0),h()},130))},2800+Math.random()*4500))};h();const a=s.current;return()=>{a.forEach(f=>window.clearTimeout(f)),a.length=0}},[t]),t<3?0:e}function V({slug:t,name:e,project:i,harness:s,state:h,size:a,badge:f=!0,ring:C=!0,chip:x=!1,glow:S=!1,className:N,style:j,title:H}){const l=t.toLowerCase(),u=z[l],n=G[l],w=D(h),p=q[w],$=J(n?n.roles.length+1:1),v=n&&$>0?O[$]?.role:void 0,b=d.useMemo(()=>U(i),[i]),k=(x?E[l]?.ink:void 0)??u?.ink??1,M=d.useMemo(()=>P(b,k),[b,k]);if(!u)return null;const c=x?E[l]:void 0,m=a??40,[T,y,o]=X(u,m),A=`${u.w/o*100}%`,R=`${u.h/o*100}%`,F=`${-T/o*100}%`,W=`${-y/o*100}%`,_=e||t.toUpperCase(),I=H??`${_} · ${i||"openscout"} · ${s||"scout"} · ${p.label}`,L=f&&m>=28&&!!(s&&s!=="unknown"),B=a!=null?{width:a,height:a}:{width:"100%",height:"100%"};return r.jsxs("span",{className:`xc-avatar-root ${N||""}`,style:{...B,boxShadow:S?`0 0 ${Math.round(m*.3)}px ${p.colour}`:void 0,...j},title:I,children:[r.jsx("span",{className:"xc-avatar-shell",style:{background:M,opacity:w==="offline"?.55:1},children:c?r.jsx("img",{src:g(`${l}-chip-id.webp`),alt:"",className:"xc-avatar-img xc-avatar-img--pixel",style:{width:`${c.fill*100}%`,height:`${c.fill*100}%`,left:`${(.5-c.fill/2+(c.nudge?.[0]??0))*100}%`,top:`${(.5-c.fill/2+(c.nudge?.[1]??0))*100}%`}}):r.jsxs(r.Fragment,{children:[r.jsx("img",{src:g(`${t.toLowerCase()}-bust.webp`),alt:"",className:"xc-avatar-img",style:{width:A,height:R,left:F,top:W}}),n&&v&&r.jsx("img",{src:g(`${n.dir}/${v}.webp`),alt:"",className:"xc-avatar-patch",style:{width:`${n.patch[2]/o*100}%`,height:`${n.patch[3]/o*100}%`,left:`${(-T+n.patch[0])/o*100}%`,top:`${(-y+n.patch[1])/o*100}%`}})]})}),C&&r.jsx("span",{className:"xc-ring","data-ring":w,style:{"--xc-c":p.colour}}),L&&r.jsx(Y,{harness:s,size:Math.max(8,Math.round(m*.22)),className:"xc-badge-mark",style:{right:"0%",bottom:"0%",width:"32%",height:"32%",minWidth:12,minHeight:12},title:null})]})}export{V as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,
|
|
1
|
+
import{r,t as j,B as x,j as l,A as b,C as B,x as R}from"./index-DReVb7jZ.js";function A({slug:p,size:h,pixel:a=!1,paused:g=!1,expression:v="rest"}){const i=p.toLowerCase(),s=B[i],e=a?void 0:j[i],d=r.useRef(null),[k,E]=r.useState(!0),[$,y]=r.useState(()=>typeof document>"u"||!document.hidden),[_,T]=r.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),[w,c]=r.useState(null),m=!!s&&(!a||!!R[i]);r.useEffect(()=>{if(!d.current)return;const n=new IntersectionObserver(([S])=>E(S.isIntersecting));n.observe(d.current);const t=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>T(t.matches),f=()=>y(!document.hidden);return t.addEventListener("change",o),document.addEventListener("visibilitychange",f),()=>{n.disconnect(),t.removeEventListener("change",o),document.removeEventListener("visibilitychange",f)}},[m]);const u=!!(e?.roles.includes("blink-half")&&e.roles.includes("blink-shut"))&&!g&&k&&$&&!_;if(r.useEffect(()=>{if(!u)return;const n=x(`crew-blink:${i}`);let t;const o=()=>{t=window.setTimeout(()=>{c("blink-half"),t=window.setTimeout(()=>{c("blink-shut"),t=window.setTimeout(()=>{c("blink-half"),t=window.setTimeout(()=>{c(null),o()},40)},50)},40)},n.float(2800,6800))};return c(null),o(),()=>window.clearTimeout(t)},[i,u]),!m||!s)return null;const C=u&&w?w:v;return l.jsxs("span",{ref:d,className:`crew-sprite${a?" is-pixel":""}`,style:{width:h*s.w/s.h,height:h},"aria-hidden":"true",children:[i==="milo"&&!a?l.jsx("span",{className:"crew-sprite__visor-backing"}):null,l.jsx("img",{className:"crew-sprite__art",src:b(`${i}-${a?"chip-id":"bust"}.webp`),alt:"",draggable:!1}),e?e.roles.map(n=>l.jsx("img",{className:"crew-sprite__patch",src:b(`${e.dir}/${n}.webp`),alt:"",draggable:!1,style:{left:`${e.patch[0]/s.w*100}%`,top:`${e.patch[1]/s.h*100}%`,width:`${e.patch[2]/s.w*100}%`,height:`${e.patch[3]/s.h*100}%`,visibility:C===n?"visible":"hidden"}},n)):null]})}export{A as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cw-root{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-2xs);padding:0 var(--space-2xl) var(--space-6xl)}.cw-root--scoped{padding-top:var(--space-lg)}.cw-toolbar{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2xl);min-height:36px}.cw-modeToggle,.cw-filters{display:flex;align-items:center;gap:var(--space-sm)}.cw-modeToggle button,.cw-filters button{display:flex;align-items:center;height:22px;padding:0 6px;border:none;border-radius:6px;background:transparent;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;cursor:pointer;transition:background .12s var(--pi-ease),color .12s var(--pi-ease)}.cw-modeToggle button:hover,.cw-filters button:hover{color:var(--pi-ink)}.cw-modeToggle button[data-active],.cw-filters button[data-active]{background:color-mix(in srgb,var(--hud-ink) 8%,transparent);color:var(--pi-ink)}.cw-search{flex:0 1 200px;min-width:140px;display:flex;align-items:center;gap:7px;height:24px;padding:0 8px;border-radius:6px;background:color-mix(in srgb,var(--hud-ink) 4%,transparent);color:var(--pi-dim);transition:background .12s var(--pi-ease),color .12s var(--pi-ease)}.cw-search:focus-within{background:color-mix(in srgb,var(--hud-ink) 8%,transparent);color:var(--pi-muted)}.cw-search input{flex:1;min-width:0;border:none;background:transparent;color:var(--pi-ink);font-size:var(--text-md);font-family:var(--pi-sans)}.cw-search input:focus{outline:none}.cw-search input::placeholder{color:var(--pi-dim)}.cw-addProject{margin-left:auto;display:flex;align-items:center;gap:6px;height:24px;padding:0 6px;border:none;border-radius:6px;background:transparent;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;cursor:pointer;transition:background .12s var(--pi-ease),color .12s var(--pi-ease)}.cw-addProject:hover{color:var(--pi-ink)}.cw-addProject[aria-expanded=true]{background:color-mix(in srgb,var(--hud-ink) 8%,transparent);color:var(--pi-ink)}.cw-digest{flex:none;display:flex;align-items:center;gap:5px;min-height:24px;color:var(--pi-dim);font-family:var(--pi-mono);font-size:var(--text-xs);font-weight:600;letter-spacing:.12em;text-transform:uppercase;font-variant-numeric:tabular-nums}.cw-digest span[data-tone=live]{color:var(--pi-accent)}.cw-digest span[data-tone=needs]{color:var(--pi-muted)}.cw-digestSep{opacity:.5}.cw-empty{padding:48px 12px;text-align:center;color:var(--pi-dim);font-size:var(--text-sm)}.cw-agentDirectory,.cw-agentSection{display:flex;flex-direction:column;gap:var(--space-lg)}.cw-agentDirectory{padding-top:var(--space-sm)}.cw-agentSectionHead{display:flex;align-items:baseline;gap:8px;padding-bottom:var(--space-xs);border-bottom:1px solid var(--pi-hairline)}.cw-agentSectionHead h2{margin:0;color:var(--pi-ink);font-size:var(--text-sm);font-weight:650}.cw-agentSectionHead span{color:var(--pi-dim);font-family:var(--pi-mono);font-size:var(--text-2xs)}.cw-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:var(--space-lg)}.cw-card{display:flex;flex-direction:column;gap:var(--space-md);padding:var(--space-lg);border:1px solid var(--pi-hairline);border-radius:12px;background:linear-gradient(180deg,color-mix(in srgb,white 2.5%,transparent),transparent 40%),color-mix(in srgb,var(--hud-surface) 30%,transparent);transition:border-color .16s var(--pi-ease),transform .16s var(--pi-ease),background .16s var(--pi-ease)}.cw-card:hover{border-color:var(--pi-hairline-strong);transform:translateY(-1px)}.cw-card[data-status=needs]{border-color:color-mix(in srgb,#d9a441 45%,var(--pi-hairline))}.cw-card[data-status=working]{border-color:color-mix(in srgb,var(--pi-accent) 32%,var(--pi-hairline))}.cw-cardHead{display:flex;align-items:flex-start;gap:var(--space-md)}.cw-cardIdentity{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.cw-cardNameRow{display:flex;align-items:center;gap:8px;min-width:0}.cw-cardHarness{flex:none;display:inline-flex;align-items:center;gap:4px;color:var(--pi-ink)}.cw-cardHarness[data-idle]{color:var(--pi-dim)}.cw-cardNameRow b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-ink);font-size:var(--text-md);font-weight:650}.cw-statusPill{flex:none;padding:2px 8px;border-radius:999px;font-size:var(--text-2xs);font-weight:650;letter-spacing:.01em;color:var(--pi-dim);background:color-mix(in srgb,var(--hud-ink) 8%,transparent);box-shadow:inset 0 0 0 1px var(--pi-hairline)}.cw-statusPill[data-status=needs]{color:color-mix(in srgb,#d9a441 88%,var(--pi-ink));background:color-mix(in srgb,#d9a441 14%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,#d9a441 40%,transparent)}.cw-statusPill[data-status=working]{color:color-mix(in srgb,var(--pi-accent) 84%,var(--pi-ink));background:color-mix(in srgb,var(--pi-accent) 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--pi-accent) 32%,transparent)}.cw-statusPill[data-status=thinking]{color:color-mix(in srgb,#6fb7c7 86%,var(--pi-ink));background:color-mix(in srgb,#6fb7c7 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,#6fb7c7 32%,transparent)}.cw-cardSubline{display:flex;align-items:center;gap:6px;min-width:0;color:var(--pi-muted);font-size:var(--text-xs)}.cw-headline{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cw-substrates{display:flex;flex-wrap:wrap;gap:6px}.cw-substrateChip{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border:1px solid var(--pi-hairline);border-radius:999px;background:color-mix(in srgb,var(--hud-surface) 26%,transparent);color:var(--pi-muted);font-size:var(--text-2xs);cursor:pointer;transition:border-color .15s var(--pi-ease),color .15s var(--pi-ease)}.cw-substrateChip:hover{border-color:var(--pi-hairline-strong);color:var(--pi-ink)}.cw-substrateChip[data-primary]{color:var(--pi-ink);background:color-mix(in srgb,var(--hud-ink) 6%,transparent)}.cw-substrateChip[data-live]{border-color:color-mix(in srgb,var(--pi-accent) 34%,var(--pi-hairline))}.cw-substrateChip em{font-style:normal;color:var(--pi-dim);font-family:var(--pi-mono)}.cw-work{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-md);padding-top:var(--space-2xs);border-top:1px solid var(--pi-hairline)}.cw-work p{flex:1;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-ink);font-size:var(--text-sm)}.cw-work time{flex:none;color:var(--pi-dim);font-size:var(--text-2xs);font-family:var(--pi-mono)}.cw-cardActions{display:flex;gap:6px}.cw-cardActions:empty{display:none}.cw-cardActions button{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;height:26px;border:1px solid var(--pi-hairline);border-radius:7px;background:transparent;color:var(--pi-muted);font-size:var(--text-2xs);font-weight:600;cursor:pointer;transition:background .15s var(--pi-ease),color .15s var(--pi-ease),border-color .15s var(--pi-ease)}.cw-cardActions button:hover{color:var(--pi-ink);border-color:var(--pi-hairline-strong);background:color-mix(in srgb,var(--hud-ink) 5%,transparent)}.cw-projectContext{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;padding:5px 8px;border:1px solid var(--pi-hairline);border-radius:7px;background:color-mix(in srgb,var(--hud-surface) 28%,transparent);color:var(--pi-muted);font-size:var(--text-2xs)}.cw-projectContext span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--pi-mono)}.cw-projectContext em{font-style:normal;color:var(--pi-dim)}.cw-workspaceList{display:flex;flex-direction:column;gap:0;margin:0 -12px}.cw-workspace{border:none;border-radius:0;background:none;overflow:hidden}.cw-workspaceHead{width:100%;display:flex;align-items:center;gap:var(--space-lg);min-height:32px;padding:0 12px;border:none;border-radius:6px;background:transparent;color:inherit;text-align:left;cursor:pointer;transition:background .12s var(--pi-ease)}.cw-workspaceHead:hover{background:color-mix(in srgb,var(--hud-ink) 4%,transparent)}.cw-workspace[data-selected] .cw-workspaceHead{background:color-mix(in srgb,var(--hud-ink) 8%,transparent)}.cw-workspaceTitle{flex:none;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;transition:color .12s var(--pi-ease)}.cw-workspaceHead:hover .cw-workspaceTitle{color:var(--pi-ink)}.cw-workspace[data-state=live] .cw-workspaceTitle,.cw-workspace[data-selected] .cw-workspaceTitle{color:var(--pi-ink);font-weight:600}.cw-workspaceRoot{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-dim);font-family:var(--pi-mono);font-size:var(--text-xs)}.cw-workspaceMeta{flex:none;display:flex;align-items:center;gap:8px;color:var(--pi-muted);font-family:var(--pi-mono);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.cw-workspaceMeta time{min-width:3ch;text-align:right;color:var(--pi-dim)}.cw-workspaceMeta time[data-tone=live]{color:var(--pi-accent)}.cw-workspaceAsks{padding:1px 7px;border-radius:999px;color:var(--pi-accent);background:color-mix(in srgb,var(--pi-accent) 14%,transparent);font-size:var(--text-2xs);font-weight:600}.cw-showMore{align-self:flex-start;height:26px;padding:0 12px;border:none;background:transparent;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;cursor:pointer;transition:color .12s var(--pi-ease)}.cw-showMore:hover{color:var(--pi-ink)}.cw-modeToggle button:focus-visible,.cw-filters button:focus-visible,.cw-addProject:focus-visible,.cw-showMore:focus-visible,.cw-workspaceHead:focus-visible,.cw-substrateChip:focus-visible,.cw-cardActions button:focus-visible{outline:2px solid color-mix(in srgb,var(--pi-accent) 70%,white);outline-offset:2px}@media(max-width:600px){.cw-toolbar{flex-direction:column;align-items:stretch}.cw-search{flex:none;width:100%;min-width:0;max-width:none}.cw-addProject{margin-left:0}.cw-grid{grid-template-columns:1fr}.cw-workspaceHead{flex-wrap:wrap}.cw-workspaceRoot{flex:1 1 100%;order:3}.cw-workspaceMeta{flex-wrap:wrap}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,r as w}from"./index-DReVb7jZ.js";import{A as H}from"./AgentAvatar-NZOqcsB2.js";import{H as Q}from"./HarnessMark-DSvM_H7H.js";import{t as z}from"./time-Dhsh_2EG.js";import{A as _}from"./AddProjectForm-CHNJ4NnS.js";import{y as D,z as O}from"./Provider-CNZluAZb.js";import{b as q}from"./machine-scope-DJt9RZ2w.js";import{a as U}from"./agent-specialization-BplZUa_0.js";import{o as J}from"./model-CBkMvT1w.js";import{s as F}from"./project-overview-helpers-BQTc_Ous.js";import{S as K}from"./search-UsM-9-_W.js";import{P as G}from"./plus-D5NLH_fM.js";import{F as C}from"./folder-B_S7gBVr.js";import{F as V}from"./DocumentFocusViewer-DlMiEALb.js";import{M as X}from"./message-square-CJW4WRlo.js";import{c as Y}from"./createLucideIcon-ChvMq-zl.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-zgzC3cbU.js";import"./colors-CFlbwC25.js";import"./api-DSqpVKC7.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./conversation-model-m8HhzroS.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./file-text-DP6txVW-.js";import"./index-kkXUq-zf.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./chevron-right-DKGTLiqc.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";const Z=[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]],ee=Y("telescope",Z);function M(e){return e.needs?3:e.working?2:1}function $(e){return[...e].sort((n,s)=>M(s)-M(n)||s.lastActivityAt-n.lastActivityAt)}function S(e){return[...new Set(e.map(n=>n?.trim().toLowerCase()).filter(n=>!!n))].sort()}function W(e){const n=[...new Set(e.map(s=>s?.trim()).filter(s=>!!s))];return n.length===0?null:n.length===1?n[0]:`${n.length} branches`}function B(e){return e.needs>0?"needs":e.working>0||e.liveSessionCount>0?"working":"idle"}function te(e){if(e.needs>0)return`${e.needs} ${e.needs===1?"item needs":"items need"} attention`;const n=Math.max(e.working,e.liveSessionCount);return n>0?`${n} active work ${n===1?"stream":"streams"}`:"No active work"}function se(e,n){const s=$(n.filter(i=>i.projectSlug===e.slug)),r=S(s.map(i=>i.harness)),o={threadId:`project:${e.slug}`,projectSlug:e.slug,projectTitle:e.title,projectRoot:e.root,branch:W(e.branches.length>0?e.branches:s.map(i=>i.branch)),working:e.working>0||e.liveSessionCount>0,needs:e.needs>0,lastActivityAt:e.lastActivityAt,sessionCount:e.sessionCount,work:te(e),conversationId:null};return{kind:"project",key:`project:${e.slug}`,agentId:null,name:e.title,headline:"Project agent",harnesses:r,model:null,effort:null,status:B(e),needs:o.needs,working:o.working,substrates:[o],primary:o,work:o.work,conversationId:null,lastActivityAt:e.lastActivityAt,sessionCount:e.sessionCount}}function ne(e){const n=$(e),s=n[0];return{threadId:s.id,projectSlug:s.projectSlug,projectTitle:s.projectTitle,projectRoot:s.projectRoot,branch:W(n.map(r=>r.branch)),working:n.some(r=>r.working),needs:n.some(r=>r.needs),lastActivityAt:Math.max(...n.map(r=>r.lastActivityAt)),sessionCount:n.reduce((r,o)=>r+o.sessionCount,0),work:s.work,conversationId:s.conversationId}}function re(e){const n=new Map;for(const s of e){const r=n.get(s.projectSlug)??[];r.push(s),n.set(s.projectSlug,r)}return[...n.values()].map(ne).sort((s,r)=>Number(r.needs)-Number(s.needs)||Number(r.working)-Number(s.working)||r.lastActivityAt-s.lastActivityAt)}function ie(e,n){return n.some(s=>s.needs)?"needs":e.some(s=>(s.state??"").toLowerCase().includes("think"))?"thinking":n.some(s=>s.working)||e.some(s=>/work|running|in_turn/iu.test(s.state??""))?"working":"idle"}function b(e){const n=e?.trim().replace(/\/+$/u,"");return n?n.replace(/^\/(?:Users|home)\/[^/]+(?=\/)/u,"~"):null}function oe(e,n){return[n.root,...n.worktrees.map(r=>r.root)].map(b).filter(r=>!!r).some(r=>e===r||e.startsWith(`${r}/`))}function ae(e,n,s){const r=new Set;for(const i of s)i.agentId===e.id&&r.add(i.projectSlug);const o=[e.projectRoot,e.cwd].map(b).filter(i=>!!i);for(const i of n){const a=[i.slug,i.title].map(l=>l.trim().toLowerCase());e.project&&a.includes(e.project.trim().toLowerCase())&&r.add(i.slug),e.workspaceQualifier&&a.includes(e.workspaceQualifier.trim().toLowerCase())&&r.add(i.slug),o.some(l=>oe(l,i))&&r.add(i.slug)}if(r.size===0){const i=b(e.projectRoot??e.cwd);i?r.add(`root:${i}`):e.project?.trim()?r.add(`project:${e.project.trim().toLowerCase()}`):e.workspaceQualifier?.trim()&&r.add(`workspace:${e.workspaceQualifier.trim().toLowerCase()}`)}return r}function ce(e,n,s){const r=new Set;for(const o of e)for(const i of ae(o,n,s))r.add(i);return r.size>1?!0:e.some(o=>!O(o)&&!o.workspaceQualifier?.trim()&&!o.cwd?.trim())}function le(e,n,s){const r=e.filter(D),o=new Map;for(const i of r){const a=i.definitionId.trim()||i.id,l=o.get(a)??[];l.push(i),o.set(a,l)}return[...o.entries()].flatMap(([i,a])=>{if(!ce(a,n,s))return[];const p=[...a].sort((d,x)=>(x.updatedAt??0)-(d.updatedAt??0))[0],u=new Set(a.map(d=>d.id)),v=s.filter(d=>d.agentId&&u.has(d.agentId)),m=re(v),f=m[0]??null,h=S([...a.map(d=>d.harness),...v.map(d=>d.harness)]),y=S(a.map(d=>d.model)),A=S(a.map(d=>d.reasoningEffort)),j=ie(a,m),g=Math.max(0,...a.map(d=>d.updatedAt??0),...m.map(d=>d.lastActivityAt)),k=U(p);return[{kind:"role",key:`role:${i}`,agentId:p.id,name:p.name,headline:k.headline,harnesses:h,model:y.length===1?y[0]:null,effort:A.length===1?A[0]:null,status:j,needs:j==="needs",working:j==="working"||j==="thinking",substrates:m,primary:f,work:f?.work??k.headline,conversationId:f?.conversationId??p.conversationId,lastActivityAt:g,sessionCount:m.reduce((d,x)=>d+x.sessionCount,0)}]})}function L(e){switch(e.status){case"needs":return 3;case"working":return 2;case"thinking":return 1;case"idle":return 0}}function E(e,n,s,r=null){const o=q(s,r);return[...e.map(a=>se(a,n)),...le(o,e,n)].sort((a,l)=>L(l)-L(a)||l.lastActivityAt-a.lastActivityAt||a.name.localeCompare(l.name))}function de(e,n){switch(n){case"all":return!0;case"active":return e.status==="working"||e.status==="thinking";case"needs":return e.status==="needs";case"idle":return e.status==="idle"}}function ue(e,n){const s=B(e);switch(n){case"all":return!0;case"active":return s==="working";case"needs":return s==="needs";case"idle":return s==="idle"}}function pe(e,n){const s=n.trim().toLowerCase();return!s||e.name.toLowerCase().includes(s)||e.headline.toLowerCase().includes(s)||e.work.toLowerCase().includes(s)?!0:e.substrates.some(r=>r.projectTitle.toLowerCase().includes(s)||r.projectSlug.toLowerCase().includes(s)||(r.projectRoot?.toLowerCase().includes(s)??!1))}function he(e,n){const s=n.trim().toLowerCase();return s?e.title.toLowerCase().includes(s)||e.slug.toLowerCase().includes(s)||(e.root?.toLowerCase().includes(s)??!1):!0}function me(e){switch(e){case"needs":return"Needs attention";case"working":return"Working";case"thinking":return"Thinking";case"idle":return"Idle"}}const we=[{id:"all",label:"All"},{id:"active",label:"Live"},{id:"idle",label:"Idle"}];function je(e,n){if(n){e({view:"conversation",conversationId:n});return}e({view:"messages"})}function R(e,n){e({view:"code",project:n})}function fe(e,n,s){e(J(n,s))}function P(e,n,s){e({view:"agents-v2",projectSlug:s,...n.machineId?{machineId:n.machineId}:{},...n.showEphemeral?{showEphemeral:!0}:{}})}function vt({model:e,agents:n,route:s,navigate:r,nowMs:o}){const[i,a]=w.useState("projects"),[l,p]=w.useState("all"),[u,v]=w.useState(""),[m,f]=w.useState(!1),h=w.useMemo(()=>E(e.projects,e.threads,n,s.machineId??null),[n,e.projects,e.threads,s.machineId]),y=w.useMemo(()=>h.filter(c=>de(c,l)&&pe(c,u)),[h,u,l]),A=w.useMemo(()=>e.projects.filter(c=>ue(c,l)&&he(c,u)),[e.projects,u,l]),j=e.projects.filter(c=>c.working>0||c.liveSessionCount>0).length,g=e.projects.filter(c=>c.needs>0).length,k=h.filter(c=>c.status==="working"||c.status==="thinking").length,d=h.filter(c=>c.status==="needs").length,x=h.filter(c=>c.kind==="project").length,N=h.filter(c=>c.kind==="role").length;return t.jsxs("main",{className:"cw-root","aria-label":"Projects and agents",children:[t.jsxs("div",{className:"cw-toolbar",children:[t.jsxs("div",{className:"cw-modeToggle",role:"group","aria-label":"Directory view",children:[t.jsx("button",{type:"button","data-active":i==="projects"||void 0,"aria-pressed":i==="projects",onClick:()=>a("projects"),title:"Browse tracked projects",children:"Projects"}),t.jsx("button",{type:"button","data-active":i==="agents"||void 0,"aria-pressed":i==="agents",onClick:()=>a("agents"),title:"Browse durable agent identities",children:"Agents"})]}),t.jsxs("label",{className:"cw-search",role:"search",children:[t.jsx(K,{size:12,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("input",{type:"search",value:u,placeholder:i==="projects"?"Find project":"Find agent or project","aria-label":i==="projects"?"Find project":"Find agent or project",onChange:c=>v(c.currentTarget.value)})]}),t.jsx("div",{className:"cw-filters","aria-label":"Status filter",children:we.map(c=>t.jsx("button",{type:"button","data-active":l===c.id||void 0,"aria-pressed":l===c.id,onClick:()=>p(c.id),children:c.label},c.id))}),t.jsxs("button",{type:"button",className:"cw-addProject","aria-expanded":m,onClick:()=>f(c=>!c),children:[t.jsx(G,{size:11,strokeWidth:1.9,"aria-hidden":!0}),"Add project"]})]}),m?t.jsx(_,{onClose:()=>f(!1)}):null,t.jsx("div",{className:"cw-digest",children:i==="projects"?t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[e.projects.length," projects"]}),t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":j>0?"live":void 0,children:[j," live"]}),g>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":"needs",children:[g," ",g===1?"ask":"asks"]})]}):null]}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[x," project agents"]}),N>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{children:[N," role ",N===1?"agent":"agents"]})]}):null,t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":k>0?"live":void 0,children:[k," live"]}),d>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":"needs",children:[d," ",d===1?"ask":"asks"]})]}):null]})}),i==="projects"?t.jsx(ge,{projects:A,route:s,navigate:r,nowMs:o,allEmpty:e.projects.length===0}):t.jsx(xe,{members:y,route:s,navigate:r,nowMs:o,allEmpty:h.length===0})]})}function yt({project:e,threads:n,route:s,navigate:r,nowMs:o}){const i=E([e],n,[])[0];return t.jsx("main",{className:"cw-root cw-root--scoped","aria-label":`${e.title} agent`,children:t.jsx(I,{title:"Project agent",members:[i],route:s,navigate:r,nowMs:o})})}const T=5;function ge({projects:e,route:n,navigate:s,nowMs:r,allEmpty:o}){const[i,a]=w.useState(!1);if(e.length===0)return t.jsx("div",{className:"cw-empty",children:o?"No projects are tracked yet.":"No projects match these filters."});const l=i?e:e.slice(0,T),p=Math.max(0,e.length-T);return t.jsxs("div",{className:"cw-workspaceList",children:[l.map(u=>t.jsx(ke,{project:u,route:n,navigate:s,nowMs:r},u.slug)),p>0?t.jsx("button",{type:"button",className:"cw-showMore",onClick:()=>a(u=>!u),children:i?"Show fewer":`Show ${p} more`}):null]})}function ke({project:e,route:n,navigate:s,nowMs:r}){const o=e.working>0||e.liveSessionCount>0;return t.jsx("article",{className:"cw-workspace","data-state":e.needs>0?"needs":o?"live":void 0,children:t.jsxs("button",{type:"button",className:"cw-workspaceHead",onClick:()=>P(s,n,e.slug),children:[t.jsxs("span",{className:"cw-workspaceTitle",children:["/",e.title]}),t.jsx("span",{className:"cw-workspaceRoot",title:e.root??void 0,children:e.root?F(e.root):"Discovered project"}),t.jsxs("span",{className:"cw-workspaceMeta",children:[t.jsxs("span",{children:[e.worktreeCount," ",e.worktreeCount===1?"worktree":"worktrees"," · ",e.sessionCount," ",e.sessionCount===1?"session":"sessions"]}),e.needs>0?t.jsxs("span",{className:"cw-workspaceAsks",children:[e.needs," ",e.needs===1?"ask":"asks"]}):t.jsx("time",{"data-tone":o?"live":void 0,children:o?"now":e.lastActivityAt?z(e.lastActivityAt,r):"no activity"})]})]})})}function xe({members:e,route:n,navigate:s,nowMs:r,allEmpty:o}){if(e.length===0)return t.jsx("div",{className:"cw-empty",children:o?"No durable agents are registered yet.":"No agents match these filters."});const i=e.filter(l=>l.kind==="role"),a=e.filter(l=>l.kind==="project");return t.jsxs("div",{className:"cw-agentDirectory",children:[i.length>0?t.jsx(I,{title:"Role agents",members:i,route:n,navigate:s,nowMs:r}):null,a.length>0?t.jsx(I,{title:"Project agents",members:a,route:n,navigate:s,nowMs:r}):null]})}function I({title:e,members:n,route:s,navigate:r,nowMs:o}){return t.jsxs("section",{className:"cw-agentSection","aria-label":e,children:[t.jsxs("div",{className:"cw-agentSectionHead",children:[t.jsx("h2",{children:e}),t.jsx("span",{children:n.length})]}),t.jsx("div",{className:"cw-grid",children:n.map(i=>t.jsx(ve,{member:i,route:s,navigate:r,nowMs:o},i.key))})]})}function ve({member:e,route:n,navigate:s,nowMs:r}){const o=e.primary;return t.jsxs("article",{className:"cw-card","data-status":e.status,"data-kind":e.kind,children:[t.jsxs("header",{className:"cw-cardHead",children:[t.jsx(H,{agent:{name:e.name,state:ye(e.status)},placement:"hero",size:46,presence:!0}),t.jsxs("div",{className:"cw-cardIdentity",children:[t.jsxs("div",{className:"cw-cardNameRow",children:[e.harnesses.length>0?t.jsx("span",{className:"cw-cardHarness","data-idle":e.status==="idle"||void 0,"aria-hidden":!0,children:e.harnesses.map(i=>t.jsx(Q,{harness:i,size:13},i))}):null,t.jsx("b",{title:e.name,children:e.name}),t.jsx("span",{className:"cw-statusPill","data-status":e.status,children:me(e.status)})]}),t.jsx("div",{className:"cw-cardSubline",children:t.jsx("span",{className:"cw-headline",children:e.headline})})]})]}),e.kind==="project"&&o?t.jsxs("div",{className:"cw-projectContext",title:o.projectRoot??void 0,children:[t.jsx(C,{size:11,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("span",{children:o.projectRoot?F(o.projectRoot):`/${o.projectTitle}`}),t.jsxs("em",{children:[e.sessionCount," ",e.sessionCount===1?"session":"sessions"]})]}):e.substrates.length>0?t.jsx("div",{className:"cw-substrates",children:e.substrates.map((i,a)=>t.jsx(Ae,{substrate:i,route:n,navigate:s,primary:a===0},i.threadId))}):null,t.jsxs("div",{className:"cw-work",children:[t.jsx("p",{title:e.work,children:e.work}),t.jsx("time",{children:e.lastActivityAt?z(e.lastActivityAt,r):"—"})]}),t.jsx("footer",{className:"cw-cardActions",children:e.kind==="project"&&o?t.jsxs(t.Fragment,{children:[t.jsxs("button",{type:"button",onClick:()=>P(s,n,o.projectSlug),children:[t.jsx(V,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Open project"]}),t.jsxs("button",{type:"button",onClick:()=>R(s,o.projectSlug),children:[t.jsx(C,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Browse code"]})]}):t.jsxs(t.Fragment,{children:[e.conversationId?t.jsxs("button",{type:"button",onClick:()=>je(s,e.conversationId),children:[t.jsx(X,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Chat"]}):null,o?t.jsxs("button",{type:"button",onClick:()=>R(s,o.projectSlug),children:[t.jsx(C,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Browse code"]}):null,e.agentId?t.jsxs("button",{type:"button",onClick:()=>fe(s,n,e.agentId),children:[t.jsx(ee,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Inspect"]}):null]})})]})}function ye(e){switch(e){case"needs":return"needs_attention";case"working":return"in_turn";case"thinking":return"thinking";case"idle":return"idle"}}function Ae({substrate:e,route:n,navigate:s,primary:r=!1}){return t.jsxs("button",{type:"button",className:"cw-substrateChip","data-primary":r||void 0,"data-live":e.working||void 0,title:e.projectRoot??void 0,onClick:()=>P(s,n,e.projectSlug),children:[t.jsx(C,{size:11,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("span",{children:e.projectTitle}),e.branch?t.jsxs("em",{children:["git: ",e.branch]}):null]})}export{vt as CrewWorkspaces,yt as ProjectAgentDirectory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as o}from"./index-
|
|
1
|
+
import{r as m,j as o}from"./index-DReVb7jZ.js";/* empty css */const $=48,I=720;function _(e){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);if(!n)return null;const a=JSON.parse(n);if(!a||typeof a!="object")return null;const f={};for(const[c,d]of Object.entries(a))typeof d=="number"&&Number.isFinite(d)&&d>0&&(f[c]=d);return f}catch{return null}}function z(e,n){if(e&&!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(n))}catch{}}function H({storageKey:e,columns:n}){const a=m.useMemo(()=>{const r=_(e)??{},s={};for(const p of n)s[p.key]=r[p.key]??p.defaultWidth;return s},[e,n]),[f,c]=m.useState(a);m.useEffect(()=>{c(r=>{let s=!1;const p={...r};for(const b of n)p[b.key]==null&&(p[b.key]=b.defaultWidth,s=!0);return s?p:r})},[n]);const d=m.useMemo(()=>{const r=new Map;for(const s of n)r.set(s.key,s);return r},[n]),N=m.useRef(null),x=m.useCallback(r=>{const s=N.current;if(!s)return;const p=r.clientX-s.startX,b=Math.min(s.max,Math.max(s.min,s.startWidth+p));c(u=>u[s.key]===b?u:{...u,[s.key]:b})},[]),y=m.useCallback(()=>{N.current&&(N.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),c(r=>(z(e,r),r)))},[x,e]);m.useEffect(()=>()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y)},[x,y]);const D=m.useCallback(r=>{const s=f[r],p=d.get(r),b=p?.minWidth??$,u=p?.maxWidth??I;return{style:{width:s,minWidth:b,maxWidth:u},"data-resize-key":r}},[f,d]),E=m.useCallback(r=>({onPointerDown:u=>{if(u.button!==0)return;u.preventDefault(),u.stopPropagation();const h=d.get(r),j=h?.minWidth??$,v=h?.maxWidth??I,S=f[r]??h?.defaultWidth??j;N.current={key:r,startX:u.clientX,startWidth:S,min:j,max:v},document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",x),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},onClick:u=>{u.stopPropagation()},onDoubleClick:u=>{u.preventDefault(),u.stopPropagation();const h=d.get(r);h&&c(j=>{const v={...j,[r]:h.defaultWidth};return z(e,v),v})},role:"separator","aria-orientation":"vertical","aria-label":"Resize column",className:"s-resize-handle"}),[f,d,x,y,e]),C=m.useCallback(()=>{c(()=>{const r={};for(const s of n)r[s.key]=s.defaultWidth;return z(e,r),r})},[n,e]);return{widths:f,getColumnProps:D,getResizeHandleProps:E,resetAll:C}}function J(e){return e==="number"||e==="time"?"right":"left"}function B(e){return e==="number"||e==="time"?-1:1}function T(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):Array.isArray(e)?e.map(n=>T(n)).join(""):""}function F(e,n){if(e.sortValue)return e.sortValue(n);const a=e.render(n),f=T(a).trim();return f||null}function R(e){if(typeof e=="number")return e;const n=Date.parse(e);return Number.isFinite(n)?n:Number.NaN}function q(e,n,a,f){const c=F(a,e),d=F(a,n);return c==null&&d==null?0:c==null?1:d==null?-1:a.kind==="number"?((Number(c)||0)-(Number(d)||0))*f:a.kind==="time"?(R(c)-R(d))*f:String(c).localeCompare(String(d),void 0,{numeric:!0,sensitivity:"base"})*f}function G(e,n){return a=>{typeof e=="function"&&e(a),a.defaultPrevented||n?.(a)}}function K(e,n){return a=>{typeof e=="function"&&e(a),a.defaultPrevented||n?.(a)}}function Z({rows:e,columns:n,rowId:a,storageKey:f,initialSort:c,sort:d,onSortChange:N,secondarySort:x,onRowClick:y,rowBindings:D,rowState:E,empty:C={title:"No rows"},loading:r=!1,rowClassName:s,density:p="comfortable",className:b,ariaLabel:u="Data table"}){const h=m.useMemo(()=>n.map(t=>{const l=t.kind??"text";return{...t,kind:l,align:t.align??J(l),sortable:t.sortable??l!=="custom",resizable:t.resizable??!0}}),[n]),j=m.useMemo(()=>new Map(h.map(t=>[t.key,t])),[h]),[v,S]=m.useState(()=>{if(!c)return null;const l=n.find(i=>i.key===c.key)?.kind??"text";return{key:c.key,dir:c.dir??B(l)}}),k=d??v,{getColumnProps:X,getResizeHandleProps:O}=H({storageKey:f,columns:h.map(t=>({key:t.key,defaultWidth:t.defaultWidth,minWidth:t.minWidth,maxWidth:t.maxWidth}))}),M=m.useMemo(()=>{const t=e.map((i,w)=>({row:i,index:w}));if(!k)return t.map(i=>i.row);const l=j.get(k.key);return l?.sortable?t.slice().sort((i,w)=>{const W=q(i.row,w.row,l,k.dir);if(W!==0)return W;const P=x?.(i.row,w.row)??0;return P!==0?P:i.index-w.index}).map(i=>i.row):t.map(i=>i.row)},[e,k,j,x]),A=t=>{d==null&&S(t),N?.(t)};return o.jsx("div",{className:`dt-wrap dt-wrap--${p}${b?` ${b}`:""}`,children:o.jsxs("table",{className:"dt-table","aria-label":u,"aria-busy":r||void 0,children:[o.jsx("thead",{children:o.jsx("tr",{children:h.map(t=>{const l=k?.key===t.key,i=l?k.dir===1?"ascending":"descending":"none",w=["dt-th",`dt-align-${t.align}`,t.cls,l?"dt-th--sorted":""].filter(Boolean).join(" ");return o.jsxs("th",{className:w,title:t.tip,"aria-sort":i,...X(t.key),children:[t.sortable?o.jsxs("button",{type:"button",className:"dt-th-sort",onClick:()=>{if(k?.key===t.key){A({key:t.key,dir:k.dir===1?-1:1});return}A({key:t.key,dir:B(t.kind)})},children:[o.jsx("span",{className:"dt-th-label",children:t.label}),o.jsx("span",{className:`dt-th-arrow${l?" dt-th-arrow--active":""}`,"aria-hidden":"true",children:l?k?.dir===1?"↑":"↓":"↕"})]}):o.jsx("div",{className:"dt-th-static",children:o.jsx("span",{className:"dt-th-label",children:t.label})}),t.resizable?o.jsx("span",{...O(t.key)}):null]},t.key)})})}),o.jsx("tbody",{children:r&&M.length===0?o.jsx("tr",{className:"dt-loading-row",children:o.jsx("td",{colSpan:h.length,children:o.jsx("div",{className:"dt-loading",role:"status","aria-label":`Loading ${u.toLowerCase()}`,children:Array.from({length:7},(t,l)=>o.jsx("div",{className:"dt-loading-line","aria-hidden":"true",children:h.map(i=>o.jsx("span",{style:{width:`${Math.min(i.defaultWidth,220)}px`}},i.key))},l))})})}):M.length===0?o.jsx("tr",{className:"dt-empty-row",children:o.jsx("td",{colSpan:h.length,children:o.jsxs("div",{className:"dt-empty",children:[o.jsx("div",{className:"dt-empty-title",children:C.title}),C.body?o.jsx("div",{children:C.body}):null]})})}):M.map(t=>{const l=a(t),i=D?.(l)??{},w=E?.(l)??{isActive:!1,isPinned:!1},W=!!(y||D),P=["dt-row",W?"dt-row--interactive":"",w.isActive?"dt-row--active":"",w.isPinned?"dt-row--pinned":"",s?.(t),typeof i.className=="string"?i.className:""].filter(Boolean).join(" "),U=y?()=>y(t):void 0,V=W?K(i.onKeyDown,g=>{y&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),y(t))}):typeof i.onKeyDown=="function"?i.onKeyDown:void 0,L={...i,className:P,onClick:G(i.onClick,U),onKeyDown:V};return W&&L.tabIndex==null&&(L.tabIndex=0),o.jsx("tr",{...L,children:h.map(g=>o.jsx("td",{className:["dt-td",`dt-align-${g.align}`,g.cls].filter(Boolean).join(" "),children:g.render(t)},g.key))},l)})})]})})}export{Z as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as r}from"./index-
|
|
1
|
+
import{r as f,j as r}from"./index-DReVb7jZ.js";import{a as y}from"./api-DSqpVKC7.js";import{i as j}from"./scoutbot-Bk3nyrkj.js";import{u as S}from"./sse-A8AyLH0g.js";import{t as E}from"./time-Dhsh_2EG.js";import{o as M}from"./openContent-C6XO6kr5.js";import{e as k}from"./broker-display-BkBzyvbR.js";import{r as R}from"./follow-route-BvcGtBIL.js";import{L as C}from"./loader-circle-DNUsuPWz.js";import{A as L}from"./arrow-up-right-B0aLKiyF.js";import"./index-BWHgHrtv.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-ChvMq-zl.js";const _=3,$=80;function h(e){return Number(e.createdAt)||0}function F(e,s){if(!e.conversationId)return{status:"no-conversation"};const t=s.slice().sort((o,i)=>h(o)-h(i)),n=e.messageId?t.find(o=>o.id===e.messageId)??null:null;let l;if(n){const o=h(n);l=t.filter(i=>i.id!==n.id&&h(i)>=o)}else{const o=t[0];if(o&&h(o)>e.ts)return{status:"beyond-page"};l=t.filter(i=>h(i)>e.ts)}if(l.length===0)return{status:"no-reply"};const u=n?h(n):e.ts,d=l.slice(0,_).map(o=>({id:o.id,actorName:o.actorName||"Unknown",body:o.body??"",createdAt:h(o),afterMs:Math.max(0,h(o)-u),answersDispatch:!!(e.messageId&&o.replyToMessageId===e.messageId)}));return{status:"replies",replies:d,more:Math.max(0,l.length-d.length)}}function b(e,...s){const t=e.metadata??{},n=t.raw&&typeof t.raw=="object"&&!Array.isArray(t.raw)?t.raw:null;for(const l of s)for(const u of[t,n]){const d=u?.[l];if(typeof d=="string"&&d.trim())return d.trim()}return null}function D(e,s){const t=new URLSearchParams,n=e.invocationId??b(e,"invocationId"),l=b(e,"flightId"),u=b(e,"collaborationRecordId","workId","recordId");return l&&t.set("flightId",l),n&&t.set("invocationId",n),e.conversationId&&t.set("conversationId",e.conversationId),u&&t.set("workId",u),s&&t.set("targetAgentId",s),[...t.keys()].length>0?t:null}function H(e,s={}){const t=[];return e.conversationId&&t.push({key:"conversation",label:"Conversation",hint:"The thread this dispatch landed in",route:{view:"conversation",conversationId:e.conversationId}}),(e.flightId||e.sessionId)&&t.push({key:"trace",label:"Live trace",hint:"The session that ran the work",route:{view:"sessions",...e.flightId?{flightId:e.flightId}:{},...e.sessionId?{sessionId:e.sessionId}:{},...e.targetAgentId?{agentId:e.targetAgentId}:{}}}),e.workId&&!s.nativeHost&&t.push({key:"work",label:"Work item",hint:"The collaboration record it belongs to",route:{view:"work",workId:e.workId}}),e.targetAgentId&&t.push({key:"agent",label:"Recipient",hint:"The agent that received it",route:{view:"agents-v2",agentId:e.targetAgentId,tab:"observe"}}),t.length>0&&t.push({key:"tail",label:"Tail",hint:"Raw events for these ids",route:R(e,"tail")}),t}const P={queued:"Queued",dispatched:"Dispatched",running:"Running",succeeded:"Completed",completed:"Completed",failed:"Failed",errored:"Failed",cancelled:"Cancelled",canceled:"Cancelled",timed_out:"Timed out",expired:"Expired"},U=new Set(["failed","errored","timed_out","expired"]),v=new Set(["queued","dispatched","running"]),G=new Set(["succeeded","completed"]);function q(e){if(!e)return null;const s=e.state?.trim().toLowerCase()||"unknown",t=U.has(s)?"danger":v.has(s)?"working":G.has(s)?"success":"neutral",n=e.startedAt&&e.completedAt?Math.max(0,e.completedAt-e.startedAt):null;return{state:s,label:P[s]??s.replace(/_/g," "),tone:t,summary:e.summary?.trim()||null,durationMs:n,settled:!v.has(s)}}function O(e){if(e<1e3)return"instant";const s=Math.round(e/1e3);if(s<60)return`${s}s later`;const t=Math.round(s/60);if(t<60)return`${t}m later`;const n=Math.round(t/60);return n<48?`${n}h later`:`${Math.round(n/24)}d later`}function B(e){if(e<1e3)return`${e}ms`;const s=e/1e3;if(s<60)return`${s.toFixed(s<10?1:0)}s`;const t=Math.floor(s/60),n=Math.round(s%60);return t<60?n>0?`${t}m ${n}s`:`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}const w=180,Q=250,W={loading:!0,target:null,targetUnknown:!1,flight:null,aftermath:{status:"no-conversation"}};function z(e,s){const[t,n]=f.useState(W),[l,u]=f.useState(0),d=f.useRef(0),o=e.conversationId,i=f.useMemo(()=>D(e,s)?.toString()??null,[e,s]);f.useEffect(()=>{const a=++d.current;n(p=>({...p,loading:!0}));const x=i?y(`/api/follow?${i}`).catch(()=>null):Promise.resolve(null),A=o?y(`/api/messages?conversationId=${encodeURIComponent(o)}&limit=${$}`).catch(()=>null):Promise.resolve(null);return(async()=>{const[p,g]=await Promise.all([x,A]);if(a!==d.current)return;const T=p?.flightId?await y(`/api/flights?active=false&flightId=${encodeURIComponent(p.flightId)}`).then(N=>N[0]??null).catch(()=>null):null;a===d.current&&n({loading:!1,target:p,targetUnknown:!!i&&!p,flight:T,aftermath:o?g?F(e,g):{status:"unavailable"}:{status:"no-conversation"}})})(),()=>{d.current+=1}},[e,o,i,l]);const c=f.useRef(null),m=f.useCallback(()=>{c.current||(c.current=setTimeout(()=>{c.current=null,u(a=>a+1)},Q))},[]);f.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const I=t.flight?.id??t.target?.flightId??null;return S(a=>{switch(a.kind){case"message.posted":o&&a.payload.message.conversationId===o&&m();return;case"delivery.state.changed":e.messageId&&a.payload.delivery.messageId===e.messageId&&m();return;case"flight.updated":I&&a.payload.flight.id===I&&m();return}}),{...t,reload:m}}function ie({attempt:e,targetAgentId:s,navigate:t,returnTo:n}){const{loading:l,target:u,targetUnknown:d,flight:o,aftermath:i}=z(e,s),c=q(o),m=u?H(u,{nativeHost:j()}):[],I=f.useCallback(a=>M(t,a,{returnTo:n}),[t,n]);return r.jsxs("section",{className:"sys-broker-aftermath","aria-labelledby":"dispatch-aftermath-title",children:[r.jsxs("div",{className:"sys-broker-aftermath-head",children:[r.jsx("span",{id:"dispatch-aftermath-title",className:"sys-detail-label",children:"What happened next"}),l&&r.jsx(C,{className:"sys-broker-action-spinner",size:12,"aria-hidden":"true"})]}),c&&r.jsxs("div",{className:`sys-broker-aftermath-outcome sys-broker-aftermath-outcome--${c.tone}`,children:[r.jsx("span",{className:`sys-broker-dot sys-broker-dot--${c.tone}`,"aria-hidden":"true"}),r.jsx("strong",{children:c.label}),c.durationMs!==null&&r.jsxs("span",{className:"sys-broker-aftermath-duration",children:["ran ",B(c.durationMs)]}),c.summary&&r.jsx("p",{children:k(c.summary,w)})]}),i.status==="replies"?r.jsxs("ol",{className:"sys-broker-aftermath-replies",children:[i.replies.map(a=>r.jsx("li",{children:r.jsxs("button",{type:"button",className:"sys-broker-aftermath-reply",disabled:!e.conversationId,onClick:()=>e.conversationId&&I({view:"conversation",conversationId:e.conversationId}),children:[r.jsxs("span",{className:"sys-broker-aftermath-reply-head",children:[r.jsx("strong",{children:a.actorName}),a.answersDispatch&&r.jsx("span",{className:"sys-broker-aftermath-answer",children:"reply"}),r.jsx("span",{className:"sys-broker-aftermath-gap",children:O(a.afterMs)})]}),r.jsx("span",{className:"sys-broker-aftermath-reply-body",children:k(a.body,w)})]})},a.id)),i.more>0&&r.jsxs("li",{className:"sys-broker-aftermath-more",children:["+",i.more," more in the thread"]})]}):!l&&r.jsx("p",{className:"sys-broker-aftermath-empty",children:i.status==="no-conversation"?"No conversation followed this dispatch, so there is nothing to open.":i.status==="unavailable"?"The conversation could not be read, so what followed is unknown.":i.status==="beyond-page"?"This dispatch is older than the loaded transcript. Open the conversation to read it in place.":c&&!c.settled?"Still running. Nothing has come back yet.":"Nothing followed this dispatch in its conversation."}),m.length>0?r.jsx("div",{className:"sys-broker-aftermath-links",children:m.map(a=>r.jsxs("button",{type:"button",className:"sys-broker-aftermath-link",title:a.hint,onClick:()=>I(a.route),children:[a.label,r.jsx(L,{size:11,"aria-hidden":"true"})]},a.key))}):!l&&i.status!=="no-conversation"&&r.jsx("p",{className:"sys-broker-aftermath-empty",children:d?"Where this went could not be looked up, so there is nothing to link to yet.":"No session, work item, or recipient could be resolved from this row."}),o?.completedAt&&r.jsxs("div",{className:"sys-broker-aftermath-foot",children:["Settled ",E(o.completedAt)]})]})}export{ie as DispatchAftermath};
|
package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DlMiEALb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h}from"./createLucideIcon-
|
|
1
|
+
import{c as h}from"./createLucideIcon-ChvMq-zl.js";import{r,j as e}from"./index-DReVb7jZ.js";import{T as _}from"./TextDocumentSurface-BK6Qy41F.js";import{F as R}from"./file-text-DP6txVW-.js";import{X as S}from"./x-rlMdRqJF.js";const W=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],X=h("folder-open",W);const A=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],B=h("maximize-2",A);const T=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],C=h("minimize-2",T);function G({open:i=!0,focusable:M=!0,kind:z,document:c,title:F,eyebrow:v,subtitle:w,meta:x=[],mode:$,actions:L=[],state:j,error:t,notice:p,body:l,onClose:o}){const[a,u]=r.useState(!1),[g,y]=r.useState({}),b=r.useRef(null);if(r.useEffect(()=>{i||u(!1)},[i]),r.useEffect(()=>{if(!i)return;let s=null;const d=b.current?.closest(".frame-scrollbar, .s-content")??null,N=()=>{if(!d){y({});return}const n=d.getBoundingClientRect();y({"--doc-focus-layer-top":`${Math.max(0,n.top)}px`,"--doc-focus-layer-right":`${Math.max(0,window.innerWidth-n.right)}px`,"--doc-focus-layer-bottom":`${Math.max(0,window.innerHeight-n.bottom)}px`,"--doc-focus-layer-left":`${Math.max(0,n.left)}px`})},f=()=>{s!==null&&cancelAnimationFrame(s),s=requestAnimationFrame(N)};N();const E=d?new ResizeObserver(f):null;return d&&E?.observe(d),window.addEventListener("resize",f),()=>{s!==null&&cancelAnimationFrame(s),E?.disconnect(),window.removeEventListener("resize",f)}},[i]),r.useEffect(()=>{if(!i)return;const s=m=>{m.key==="Escape"&&(m.preventDefault(),a?u(!1):o?.())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a,o,i]),!i)return null;const k=F??c?.title??"Document",D=$??(c?.kind==="markdown"?"preview":"read"),H=M&&!!(c||l);return e.jsxs("div",{ref:b,className:`s-doc-focus-layer${a?" s-doc-focus-layer-focused":""}`,style:g,children:[o&&e.jsx("button",{type:"button",className:"s-doc-focus-scrim","aria-label":"Dismiss document viewer",tabIndex:-1,onClick:o}),e.jsxs("section",{className:`s-doc-focus-viewer s-doc-focus-viewer-${z}${a?" s-doc-focus-viewer-focused":""}`,"aria-label":k,role:"dialog","aria-modal":"true",children:[e.jsxs("div",{className:"s-doc-focus-viewer-head",children:[e.jsxs("div",{className:"s-doc-focus-viewer-title-wrap",children:[e.jsx("div",{className:"s-doc-focus-viewer-icon","aria-hidden":"true",children:e.jsx(R,{size:15,strokeWidth:1.8})}),e.jsxs("div",{className:"s-doc-focus-viewer-title-main",children:[v&&e.jsx("div",{className:"s-doc-focus-viewer-eyebrow",children:v}),e.jsx("h3",{className:"s-doc-focus-viewer-title",children:k}),w&&e.jsx("div",{className:"s-doc-focus-viewer-subtitle",children:w})]})]}),e.jsxs("div",{className:"s-doc-focus-viewer-actions",children:[x.length>0&&e.jsx("div",{className:"s-doc-focus-viewer-meta","aria-label":"Document metadata",children:x.map(s=>e.jsx("span",{children:s},s))}),L.map(s=>e.jsxs("button",{type:"button",className:`s-doc-focus-viewer-action${s.hideLabel?" s-doc-focus-viewer-action-icon":""}`,onClick:s.onClick,title:s.title??s.label,disabled:s.disabled,"aria-label":s.hideLabel?s.label:void 0,children:[s.icon,!s.hideLabel&&e.jsx("span",{children:s.label})]},s.label)),H&&e.jsx("button",{type:"button",className:"s-doc-focus-viewer-close",onClick:()=>u(s=>!s),"aria-label":a?"Exit focus mode":"Enter focus mode",title:a?"Exit focus mode":"Focus",children:a?e.jsx(C,{"aria-hidden":"true",size:14,strokeWidth:1.8}):e.jsx(B,{"aria-hidden":"true",size:14,strokeWidth:1.8})}),o&&e.jsx("button",{type:"button",className:"s-doc-focus-viewer-close",onClick:o,"aria-label":"Close document viewer",title:"Close",children:e.jsx(S,{"aria-hidden":"true",size:14,strokeWidth:1.8})})]})]}),j&&!t&&!c&&!l&&e.jsx("div",{className:"s-doc-focus-viewer-state",children:j}),t&&e.jsx("div",{className:"s-doc-focus-viewer-state s-doc-focus-viewer-error",children:t}),!t&&l&&e.jsx("div",{className:"s-doc-focus-viewer-body",children:l}),!t&&!l&&c&&e.jsx(_,{document:c,mode:D,showHeader:!1,className:"s-doc-focus-document"}),!t&&p&&e.jsx("div",{className:"s-doc-focus-viewer-notice",children:p})]})]})}export{G as D,X as F,B as M,C as a};
|
package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-CTkO_tQR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-
|
|
1
|
+
import{r as l,j as e}from"./index-DReVb7jZ.js";import{l as c}from"./discover-DlwbftpC.js";import"./types-B0PlfpKc.js";function n(){const[r,a]=l.useState([]);return l.useEffect(()=>{let s=!1;return c().then(d=>{s||a(d)}),()=>{s=!0}},[]),e.jsxs("div",{className:"s-embeddable-surfaces-lab","data-scout-theme":!0,children:[e.jsxs("header",{className:"s-embeddable-surfaces-lab__header",children:[e.jsx("h1",{children:"Embeddable surfaces"}),e.jsxs("p",{children:["Screens that exported ",e.jsx("code",{children:"scoutSurface.embed"})," and were discovered from"," ",e.jsx("code",{children:"client/screens/**"}),". No separate embed registry file — parity comes from the screen declaration."]})]}),e.jsxs("table",{className:"s-embeddable-surfaces-lab__table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"ID"}),e.jsx("th",{children:"Label"}),e.jsx("th",{children:"Web"}),e.jsx("th",{children:"Embed"}),e.jsx("th",{children:"Profile"}),e.jsx("th",{children:"Module"})]})}),e.jsx("tbody",{children:r.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:s.id})}),e.jsx("td",{children:s.label}),e.jsx("td",{children:e.jsx("a",{href:s.webPath,children:s.webPath})}),e.jsxs("td",{children:[e.jsx("div",{children:e.jsx("a",{href:s.embedPath,children:s.embedPath})}),s.embedAliases.length>0&&e.jsx("div",{className:"s-embeddable-surfaces-lab__aliases",children:s.embedAliases.map(d=>e.jsx("a",{href:d,children:d},d))})]}),e.jsx("td",{children:e.jsx("code",{children:s.profile})}),e.jsx("td",{children:e.jsx("code",{children:s.modulePath.replace("../","")})})]},s.id))})]}),r.length===0&&e.jsx("p",{className:"s-embeddable-surfaces-lab__empty",children:"No embeddable screens discovered yet."})]})}export{n as EmbeddableSurfacesLab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DReVb7jZ.js";function c({title:n,body:s,icon:i,action:t,className:a}){const l=a?`sys-panel sys-state-card ${a}`:"sys-panel sys-state-card";return e.jsxs("div",{className:l,children:[i,e.jsx("h3",{className:"sys-state-title",children:n}),s!=null&&(typeof s=="string"?e.jsx("p",{className:"sys-state-body",children:s}):s),t&&e.jsx("div",{className:"sys-inline-actions",children:t})]})}export{c as E};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as n,j as t}from"./index-
|
|
1
|
+
import{r as n,j as t}from"./index-DReVb7jZ.js";import{T as b,c as j}from"./TextDocumentSurface-BK6Qy41F.js";import{a as N}from"./api-DSqpVKC7.js";function V(e,a,u){const o=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx"),s=e.relativePath.endsWith(".json");return j({id:e.absolutePath,title:e.relativePath,uri:e.absolutePath,filename:e.relativePath.split("/").pop(),kind:o?"markdown":"code",language:s?"json":o?"markdown":"plain",value:u?`${a}
|
|
2
2
|
|
|
3
3
|
— excerpt —`:a,readOnly:!0})}function y({artifact:e,onOpen:a,onReveal:u,onBrowse:o}){const[s,l]=n.useState(e.excerpt),[c,i]=n.useState(!0),[w,h]=n.useState(!1),[m,p]=n.useState(null);n.useEffect(()=>{l(e.excerpt),i(!0),p(null);let d=!1;return h(!0),N(`/api/file/preview?path=${encodeURIComponent(e.absolutePath)}`).then(r=>{if(!d)if(r.kind==="file"&&r.previewable){const x=r;l(x.content),i(x.truncated)}else e.excerpt?(l(e.excerpt),i(!0)):(l(null),p("Preview not available for this file type."))}).catch(r=>{d||(e.excerpt?(l(e.excerpt),i(!0)):p(r instanceof Error?r.message:"Could not load file."))}).finally(()=>{d||h(!1)}),()=>{d=!0}},[e.absolutePath,e.excerpt]);const v=n.useMemo(()=>s?V(e,s,c):null,[e,s,c]),P=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx");return t.jsxs(t.Fragment,{children:[t.jsxs("header",{className:"av2-repoViewerHead",children:[t.jsxs("div",{className:"av2-repoViewerPath",children:[t.jsx("span",{className:"av2-repoViewerPathFile",children:e.relativePath}),t.jsx("span",{className:"av2-repoViewerPathAbs",title:e.absolutePath,children:e.absolutePath})]}),t.jsxs("div",{className:"av2-repoViewerActs",children:[t.jsx("button",{type:"button",className:"av2-repoViewerAct","data-primary":!0,onClick:()=>a(e.absolutePath),children:"open"}),o?t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>o(e.absolutePath),children:"browse"}):null,t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>{u(e.absolutePath)},children:"reveal"})]})]}),t.jsxs("div",{className:"av2-repoViewerBody",children:[w&&!s?t.jsx("div",{className:"av2-repoViewerState",children:"Loading file…"}):m&&!s?t.jsx("div",{className:"av2-repoViewerState av2-repoViewerState--error",children:m}):v?t.jsx(b,{document:v,mode:P?"preview":"read",className:"av2-repoViewerDoc"}):t.jsx("div",{className:"av2-repoViewerState",children:"No content."}),c?t.jsx("div",{className:"av2-repoViewerNotice",children:"Showing excerpt — use open for the full file."}):null]})]})}export{y as FileViewerPane};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,j as s}from"./index-DReVb7jZ.js";import{a as k}from"./api-DSqpVKC7.js";import{u as R}from"./sse-A8AyLH0g.js";import{d as $,t as F}from"./time-Dhsh_2EG.js";import{SessionRefScreen as j}from"./SessionRefScreen-DURV0MpF.js";/* empty css */import{c as E}from"./createLucideIcon-ChvMq-zl.js";import{X as A}from"./x-rlMdRqJF.js";import"./index-BWHgHrtv.js";import"./tail-events-C4WdhVeK.js";import"./BackToPicker-CkBhGRlD.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./ConversationScreen-tpj4cqWs.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./conversation-model-m8HhzroS.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./HarnessMark-DSvM_H7H.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./ConversationComposer-DNcn5U6D.js";import"./AgentAvatar-NZOqcsB2.js";import"./Provider-CNZluAZb.js";import"./provider-DwmCoSlc.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./CrewAvatar-zgzC3cbU.js";import"./zap-B4X0OrEw.js";import"./message-markup-6Tgo4qFJ.js";import"./mentions-Ck_Vjnyp.js";import"./AgentDetailCard-MIEBKw_S.js";import"./AgentLiveActions-6Kfr1uOT.js";import"./terminal-takeover-CZZsnPzj.js";import"./openContent-C6XO6kr5.js";import"./eye-CsGfEVR6.js";import"./terminal-DMZjX1es.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Y9TEJxP_.js";import"./AstronautSuit-D67fIBdR.js";import"./panel-right-qP17MwMl.js";import"./CommsFlowGraph-voDD9M5R.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DdNAwjGW.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-C33sgD48.js";import"./CommsSelection-BL8aYD7z.js";/* empty css */import"./use-conversation-list-D5EnpVba.js";import"./agent-master-model-C-KdOFDK.js";import"./use-beside-D3cJpA5p.js";import"./ConversationFeedRows-RnYSa7Io.js";import"./ConversationPanels-6pprBpmq.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-CiaZHMnk.js";import"./proxy-DgzP27W8.js";import"./activity-BJqFrZyB.js";import"./message-circle-cI5_A5mj.js";import"./ConversationStatus-Cv-7hErW.js";import"./check-g7D7-c1J.js";import"./sparkles-Cc5lPZRv.js";import"./SessionObserve-B64YsYhy.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-D2cnTeUd.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./ObservedTopologyPanel-DF6tRZL_.js";import"./ObserveTextFlow-CC5mnngm.js";import"./SessionObserveEvidence-CS1aQBpQ.js";import"./wrench-B4maQJai.js";import"./external-link-BVccgH0n.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */const T=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],L=E("columns-2",T);function S(t){const o=new Map;for(const r of t)o.delete(r.sessionId),o.set(r.sessionId,r);return[...o.values()]}function M(t,o){const r=S(t),d=o?.trim()||null;return r.find(n=>n.sessionId===d)?.sessionId??r.at(-1)?.sessionId??d}function O(t){return t.length<=34?t:`${t.slice(0,15)}…${t.slice(-14)}`}function q(t,o){return o===0?t.strategy||"dispatch":t.strategy?`switched via ${t.strategy}`:"session changed"}function y({label:t,sessions:o,value:r,onChange:d}){return s.jsxs("label",{className:"s-flight-observe-select-wrap",children:[s.jsx("span",{children:t}),s.jsx("select",{className:"s-flight-observe-select",value:r,onChange:n=>d(n.currentTarget.value),children:o.map(n=>s.jsxs("option",{value:n.sessionId,children:[n.harness?`${n.harness} · `:"",n.sessionId]},n.sessionId))})]})}function Le({route:t,navigate:o}){const[r,d]=m.useState(null),[n,I]=m.useState(!0),[h,N]=m.useState(null),u=m.useCallback(async()=>{try{const e=await k(`/api/flights?active=false&flightId=${encodeURIComponent(t.flightId)}`);d(e[0]??null),N(e.length===0?"This flight is not available on the connected broker.":null)}catch(e){N(e instanceof Error?e.message:String(e))}finally{I(!1)}},[t.flightId]);m.useEffect(()=>{I(!0),u()},[u]),R(()=>{u()});const v=r?.sessions??[],a=m.useMemo(()=>S(v),[v]),g=M(v,t.sessionId),i=a.find(e=>e.sessionId===g)??null,l=a.find(e=>e.sessionId===t.compareSessionId)??null,f=!!(i&&l&&i.sessionId!==l.sessionId),c=m.useCallback((e,p)=>{o({...t,sessionId:e,...p?{compareSessionId:p}:{compareSessionId:void 0}})},[o,t]),w=m.useCallback(()=>{if(!i||a.length<2)return;const e=[...a].reverse().find(p=>p.sessionId!==i.sessionId);e&&c(i.sessionId,e.sessionId)},[i,a,c]),C=m.useCallback(e=>{if(!f||!i||!l){c(e);return}c(e,e===l.sessionId?i.sessionId:l.sessionId)},[l,i,f,c]);return s.jsxs("div",{className:"s-flight-observe",children:[s.jsxs("header",{className:"s-flight-observe-header",children:[s.jsxs("div",{className:"s-flight-observe-heading",children:[s.jsx("div",{className:"s-flight-observe-eyebrow",children:"Flight observe"}),s.jsxs("div",{className:"s-flight-observe-title-row",children:[s.jsx("h2",{children:r?.agentName||r?.agentId||"Flight"}),s.jsx("span",{className:`s-flight-observe-state s-flight-observe-state--${r?.state??"loading"}`,children:r?.state??(n?"loading":"unknown")})]}),s.jsx("div",{className:"s-flight-observe-id",title:t.flightId,children:t.flightId}),r?.summary&&s.jsx("p",{children:r.summary})]}),s.jsxs("div",{className:"s-flight-observe-actions",children:[a.length>1&&!f&&s.jsxs("button",{type:"button",onClick:w,children:[s.jsx(L,{size:13})," Split view"]}),f&&i&&s.jsxs("button",{type:"button",onClick:()=>c(i.sessionId),children:[s.jsx(A,{size:13})," Close split"]})]})]}),v.length>0&&s.jsx("nav",{className:"s-flight-observe-trace","aria-label":"Flight session history",children:v.map((e,p)=>{const b=i?.sessionId===e.sessionId,x=l?.sessionId===e.sessionId;return s.jsxs("div",{className:"s-flight-observe-trace-step",children:[p>0&&s.jsx("span",{className:"s-flight-observe-trace-arrow","aria-hidden":"true",children:"→"}),s.jsxs("button",{type:"button",className:"s-flight-observe-session-chip","data-selected":b||x,"data-observe-role":b?"primary":x?"compare":"idle","aria-pressed":b||x,title:e.sessionId,onClick:()=>C(e.sessionId),children:[s.jsxs("span",{className:"s-flight-observe-session-chip-top",children:[s.jsx("span",{children:e.harness||e.transport||"session"}),s.jsx("time",{title:new Date(e.startedAt).toLocaleString(),children:$(e.startedAt)||F(e.startedAt)})]}),s.jsx("strong",{children:O(e.sessionId)}),s.jsx("small",{children:q(e,p)})]})]},`${e.sessionId}:${e.startedAt}:${p}`)})}),h&&!g&&s.jsx("div",{className:"s-flight-observe-message s-flight-observe-message--error",children:h}),h&&g&&s.jsxs("div",{className:"s-flight-observe-message",children:[s.jsx("strong",{children:"Flight record unavailable"}),s.jsx("span",{children:"Showing the concrete session captured by this link."})]}),!h&&n&&s.jsx("div",{className:"s-flight-observe-message",children:"Resolving the flight’s session trace…"}),!h&&!n&&a.length===0&&!g&&s.jsxs("div",{className:"s-flight-observe-message",children:[s.jsx("strong",{children:"Waiting for a session"}),s.jsx("span",{children:"The flight is stable here; its trace will appear as soon as a harness acknowledges dispatch."})]}),g&&!f&&s.jsx("main",{className:"s-flight-observe-single",children:s.jsx(j,{sessionRef:g,navigate:o})}),!h&&i&&l&&f&&s.jsxs("main",{className:"s-flight-observe-split",children:[s.jsxs("section",{className:"s-flight-observe-pane",children:[s.jsx(y,{label:"Primary session",sessions:a,value:i.sessionId,onChange:e=>c(e,e===l.sessionId?i.sessionId:l.sessionId)}),s.jsx("div",{className:"s-flight-observe-pane-content",children:s.jsx(j,{sessionRef:i.sessionId,navigate:o,showObserveRail:!1})})]}),s.jsxs("section",{className:"s-flight-observe-pane",children:[s.jsx(y,{label:"Compare session",sessions:a.filter(e=>e.sessionId!==i.sessionId),value:l.sessionId,onChange:e=>c(i.sessionId,e)}),s.jsx("div",{className:"s-flight-observe-pane-content",children:s.jsx(j,{sessionRef:l.sessionId,navigate:o,showObserveRail:!1})})]})]})]})}export{Le as FlightObserveScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-DReVb7jZ.js";import{f as u}from"./floor-preview-text-HrORUJ7D.js";import{f as F}from"./floor-memory-YMM8AlLY.js";import{a as O,S as P}from"./SpriteAvatar-aHeF4ZQZ.js";import{f as q}from"./floor-context-model-rWKqaKmV.js";import{t as E}from"./time-Dhsh_2EG.js";import{f as b}from"./agent-floor-actor-DW8zLht0.js";import{l as d}from"./agent-lanes-model-DMAdqCmK.js";import{b as M,a as I,l as B}from"./agent-lane-detail-Ti3trpfH.js";/* empty css */import{R as U}from"./radio-Cas2qg1D.js";import{F as g}from"./file-code-corner-Be6da5l3.js";import{T as y}from"./terminal-DMZjX1es.js";import{C as W}from"./coffee-ljG1_krY.js";import{X}from"./x-rlMdRqJF.js";import{A as _}from"./arrow-up-right-B0aLKiyF.js";import"./agent-state-DDhnFEEP.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./terminal-sessions-3RfJpen8.js";import"./api-DSqpVKC7.js";import"./createLucideIcon-ChvMq-zl.js";const w={home:{title:"Crew quarters",subtitle:"Readiness & attention",icon:W},tools:{title:"Execution lab",subtitle:"Recent commands & tool activity",icon:y},edit:{title:"Build workshop",subtitle:"Observed files & changes",icon:g},message:{title:"Communications",subtitle:"Observed messages & requests",icon:U}};function C({lane:t,now:o,onSelect:c}){const h=O(t.agent),r=b(t,o);return s.jsxs("button",{className:"floor-context__actor-row",type:"button",onClick:()=>c(t),children:[s.jsx(P,{name:t.agent.name,size:28,hue:h.hue,tone:h.tone}),s.jsxs("span",{children:[s.jsx("strong",{children:d(t.agent,t.source)}),s.jsxs("small",{children:[t.agent.harness," · ",t.id.slice(-5)]})]}),s.jsx("span",{className:`floor-context__posture is-${r.posture}`,children:r.label}),s.jsx(_,{size:13})]})}function l({children:t}){return s.jsx("p",{className:"floor-context__empty",children:t})}function js({lane:t,room:o,lanes:c,allLanes:h,now:r,onClose:R,onSelectRoom:T,onSelectLane:a,onOpenTrace:S}){const $=F(h),m=t?$.filter(e=>e.parent.id===t.id||e.child.id===t.id):[],p=o?w[o]:null,z=p?.icon??y,N=t?d(t.agent,t.source):p?.title??"Floor",j=o?c.filter(e=>b(e,r).station===o):[],v=q(c,r,o==="message"?["message","ask"]:["tool"]),f=t?M(t):null,n=(t?[t]:c).flatMap(e=>I({events:e.observe?.events??[],files:e.facts?.touchedFiles??e.observe?.files??[]},50).map(i=>({lane:e,file:i}))).filter(e=>o!=="edit"||e.file.state!=="read"),k=t?B(t.observe,4):[],A=t?b(t,r):null;return s.jsxs("aside",{className:"agent-floor__trace-panel floor-context","aria-label":`${N} context sheet`,children:[s.jsxs("header",{className:"floor-context__header",children:[s.jsx(z,{size:20}),s.jsxs("div",{children:[s.jsx("h2",{children:N}),s.jsx("p",{children:t?`${t.agent.harness??"Agent"} · ${t.id.slice(-8)} · ${A?.label}`:p?.subtitle})]}),s.jsx("button",{type:"button",onClick:R,"aria-label":"Close context sheet",children:s.jsx(X,{size:17})})]}),t?null:s.jsx("nav",{className:"floor-context__tabs","aria-label":"Room sheets",children:[["home","Crew"],["tools","Execution"],["edit","Build"],["message","Comms"]].map(([e,i])=>s.jsx("button",{type:"button","aria-pressed":o===e,onClick:()=>T(e),children:i},e))}),s.jsx("div",{className:"floor-context__body",children:t?s.jsxs(s.Fragment,{children:[s.jsxs("section",{children:[s.jsx("h3",{children:"Current task"}),s.jsx("p",{className:"floor-context__task",children:u(t.facts?.currentTask)||"No task summary reported for this session."})]}),s.jsx("dl",{className:"floor-context__facts",children:[["Model",t.facts?.model||f?.model],["Branch",t.facts?.branch||f?.branch],["Workspace",t.facts?.cwd||f?.cwd],["Parent",t.facts?.parentAgentName]].filter(([,e])=>e).map(([e,i])=>s.jsxs("div",{children:[s.jsx("dt",{children:e}),s.jsx("dd",{title:i??void 0,children:i})]},e))}),s.jsxs("section",{children:[s.jsx("h3",{children:"Capabilities & tools"}),t.agent.capabilities?.length||t.agent.skills?.length?s.jsx("div",{className:"floor-context__abilities",children:[...new Set([...t.agent.capabilities??[],...t.agent.skills??[]])].map(e=>s.jsx("span",{children:e},e))}):s.jsx(l,{children:"No capabilities reported by this actor."}),s.jsx("p",{className:"floor-context__scope",children:"Tools observed in loaded session history"}),s.jsx("div",{className:"floor-context__abilities",children:[...new Set((t.observe?.events??[]).filter(e=>e.kind==="tool"&&e.tool).map(e=>e.tool))].slice(0,20).map(e=>s.jsx("span",{children:e},e))})]}),s.jsxs("section",{children:[s.jsxs("h3",{children:["Session relationships ",s.jsx("span",{children:m.length})]}),m.length?m.map(e=>{const i=e.child.id===t.id,x=i?e.parent:e.child;return s.jsxs("div",{children:[s.jsx("p",{className:"floor-context__scope",children:i?"Parent session":"Child session"}),s.jsx(C,{lane:x,now:r,onSelect:a})]},x.id)}):s.jsx(l,{children:t.facts?.parentSessionId?"Parent session is outside the loaded fleet.":"No parent or child sessions reported in the loaded fleet."})]}),s.jsxs("section",{children:[s.jsxs("h3",{children:["Touched files ",s.jsx("span",{children:n.length})]}),n.length?n.slice(0,10).map(({file:e})=>s.jsxs("div",{className:"floor-context__file",children:[s.jsx(g,{size:14}),s.jsx("code",{title:e.path,children:e.path}),s.jsx("small",{children:e.state})]},e.path)):s.jsx(l,{children:"No files observed yet."})]}),s.jsxs("section",{children:[s.jsx("h3",{children:"Recent commands"}),k.length?k.map(e=>s.jsxs("div",{className:"floor-context__command",children:[s.jsx("pre",{children:e.command}),e.outcome?s.jsx("small",{children:e.outcome}):null]},e.id)):s.jsx(l,{children:"No shell commands observed yet."})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("section",{children:[s.jsxs("h3",{children:["In this room ",s.jsx("span",{children:j.length})]}),j.length?j.map(e=>s.jsx(C,{lane:e,now:r,onSelect:a},e.id)):s.jsx(l,{children:"No actors in this room right now."})]}),o==="home"?s.jsxs("section",{children:[s.jsx("h3",{children:"Tasks in this sector"}),c.map(e=>s.jsxs("button",{type:"button",className:"floor-context__task-row",onClick:()=>a(e),children:[s.jsxs("strong",{children:[d(e.agent,e.source)," ",s.jsx("small",{children:e.id.slice(-5)})]}),s.jsx("p",{children:u(e.facts?.currentTask)||"No task summary reported."})]},e.id))]}):null,o==="edit"?s.jsxs("section",{children:[s.jsxs("h3",{children:["Changed files ",s.jsx("span",{children:n.length})]}),s.jsx("p",{className:"floor-context__scope",children:"Observed in this sector’s loaded session history."}),n.length?n.map(({lane:e,file:i})=>s.jsxs("button",{type:"button",className:"floor-context__file is-action",title:`Inspect the actor that touched ${i.path}`,onClick:()=>a(e),children:[s.jsx(g,{size:14}),s.jsxs("span",{children:[s.jsx("code",{title:i.path,children:i.path}),s.jsxs("small",{children:[d(e.agent,e.source)," · ",e.id.slice(-5)]})]}),s.jsx("small",{children:i.state})]},`${e.id}:${i.path}`)):s.jsx(l,{children:"No changed files observed in this sector."})]}):null,o==="tools"||o==="message"?s.jsxs("section",{children:[s.jsx("h3",{children:o==="tools"?"Tool activity":"Messages & requests"}),s.jsx("p",{className:"floor-context__scope",children:"This sector · last 15 minutes · observed harness activity"}),v.length?v.map(({lane:e,event:i,at:x})=>s.jsxs("article",{className:"floor-context__event",children:[s.jsxs("header",{children:[s.jsx("strong",{children:o==="tools"?i.tool||"Tool":i.kind==="ask"?"Request":"Message"}),s.jsx("time",{children:E(x,r)})]}),s.jsx("p",{children:u(i.arg||i.text,800)}),i.diff?s.jsxs("small",{className:"floor-context__diff",children:["+",i.diff.add," −",i.diff.del]}):null,s.jsxs("button",{type:"button",onClick:()=>a(e),children:[d(e.agent,e.source)," · ",e.id.slice(-5)," ",s.jsx(_,{size:12})]})]},`${e.id}:${i.id}`)):s.jsx(l,{children:o==="tools"?"No recent tool activity in this sector.":"No recent messages or requests in this sector."})]}):null]})}),t?s.jsxs("footer",{className:"floor-context__footer",children:[s.jsx("span",{children:"Observed session context"}),s.jsxs("button",{type:"button",onClick:()=>S(t),children:["Open full trace ",s.jsx(_,{size:14})]})]}):null]})}export{js as FloorContextSheet};
|
package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-CjHSDXad.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as t}from"./index-
|
|
1
|
+
import{r as a,j as t}from"./index-DReVb7jZ.js";import{f as T}from"./floor-character-name-CqJPOlXb.js";import{a as D}from"./floor-message-passes-CO3Ix_wR.js";import{f as I}from"./floor-preview-text-HrORUJ7D.js";import{b as F}from"./shared-work-artifacts-DfNl9KTo.js";import{f as O}from"./floor-memory-YMM8AlLY.js";function V(l,v,S=[]){const k=new Map;for(const n of D(l,v,15*6e4,S)){const[i,f]=[n.from,n.to].sort(),u=JSON.stringify([i,f]);let r=k.get(u);r||(r={id:u,from:i,to:f,messages:[],lastAt:n.at},k.set(u,r)),!(r.messages.length>=50)&&r.messages.push({id:n.id,from:n.from,to:n.to,at:n.at,bodyAvailable:n.bodyAvailable,text:I(n.label,2e3)||"Message sent"})}return[...k.values()].map(n=>({...n,messages:n.messages.sort((i,f)=>i.at-f.at||i.id.localeCompare(f.id))})).sort((n,i)=>i.lastAt-n.lastAt||n.id.localeCompare(i.id))}let R=null;function B(l){return I(l.replace(/```[\s\S]*?```/g," ")).replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/https?:\/\/\S+/g,"").replace(/<[^>]*>/g," ").replace(/[`*_#>|]/g,"").replace(/\s+/g," ").trim().slice(0,400)}function L(){const[l]=a.useState(()=>typeof window<"u"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window),[v,S]=a.useState(0),[k,n]=a.useState(!1),[i,f]=a.useState(null),[u,r]=a.useState(null),b=a.useRef(Symbol("exchange-speech")),m=a.useRef(0),y=a.useRef(!0),s=a.useRef(null),d=a.useRef(new Map),g=a.useCallback(()=>{m.current++,s.current&&(s.current.onend=null,s.current.onerror=null,s.current=null),l&&R===b.current&&(window.speechSynthesis.cancel(),R=null),y.current&&(n(!1),f(null))},[l]);a.useEffect(()=>{if(y.current=!0,!l)return()=>{y.current=!1};const w=window.speechSynthesis,h=()=>S(w.getVoices().filter(e=>e.localService).length);return h(),w.addEventListener("voiceschanged",h),()=>{y.current=!1,g(),w.removeEventListener("voiceschanged",h)}},[l,g]);const E=a.useCallback(w=>{if(r(null),!l){r("Speech playback is unavailable in this browser.");return}const h=window.speechSynthesis;if(R!==b.current&&(R!==null||h.speaking||h.pending)){r("Another playback is active. Stop it before listening here.");return}g();const e=h.getVoices().filter(c=>c.localService).sort((c,p)=>c.voiceURI.localeCompare(p.voiceURI));if(S(e.length),!e.length){r("No local browser voices are available yet.");return}const o=w.slice(-12).map(c=>({...c,text:B(c.text)})).filter(c=>c.text);if(!o.length){r("No readable message text to play.");return}const j=new Set;for(const c of new Set(o.map(p=>p.from))){const p=d.current.get(c);if(p&&!j.has(p)&&e.some(C=>C.voiceURI===p)){j.add(p);continue}const x=[...c].reduce((C,_)=>C*31+_.charCodeAt(0)>>>0,0),P=e.filter(C=>!j.has(C.voiceURI)),N=P.length?P:e,U=N[x%N.length];d.current.set(c,U.voiceURI),j.add(U.voiceURI)}R=b.current;const A=m.current;n(!0);const M=c=>{if(!y.current||m.current!==A||R!==b.current)return;if(c>=o.length){R=null,s.current=null,n(!1),f(null);return}const p=o[c],x=new SpeechSynthesisUtterance(p.text);x.voice=e.find(P=>P.voiceURI===d.current.get(p.from))??e[0],x.lang=x.voice.lang,x.rate=1,x.onend=()=>M(c+1),x.onerror=()=>{m.current!==A||!y.current||(g(),r("Browser speech stopped before the exchange finished."))},s.current=x,f(p.id);try{h.speak(x)}catch{g(),r("Browser speech could not start.")}};M(0)},[l,g]);return{supported:l,voiceCount:v,playing:k,speakingId:i,error:u,play:E,stop:g}}function W({pair:l,lanes:v,now:S,onClose:k,onFile:n,onSpeaker:i}){const u=V(v,S).find(e=>l.includes(e.from)&&l.includes(e.to))?.messages??[],r=u.filter(e=>e.bodyAvailable!==!1),b=O(v).find(e=>l.includes(e.parent.id)&&l.includes(e.child.id)),m=e=>{const o=v.find(j=>j.id===e);return o?T(o).label:"Departed actor"},y=F(v).filter(e=>l.every(o=>e.owners.some(j=>j.id===o))),s=L(),[d,g]=a.useState(null),[E,w]=a.useState([]),h=d!==null||s.playing?E:u;return a.useEffect(()=>{const e=h.find(o=>o.id===s.speakingId);return i(e?.from??(d===null?null:h[d]?.from??null)),()=>i(null)},[s.speakingId,d]),a.useEffect(()=>{if(d===null)return;const e=window.setTimeout(()=>g(o=>o===null||o+1>=E.length?null:o+1),1800);return()=>window.clearTimeout(e)},[d]),t.jsxs("aside",{className:"floor-exchange-panel","aria-label":u.length?"Recent exchange":"Agent relationship",onPointerDown:e=>e.stopPropagation(),children:[t.jsxs("header",{children:[t.jsxs("div",{children:[t.jsxs("strong",{children:[m(l[0])," ↔ ",m(l[1])]}),t.jsx("small",{children:u.length?"Recent exchanges · last 15 minutes":"Parent → subagent"})]}),t.jsx("button",{type:"button",onClick:k,"aria-label":"Close exchange",children:"×"})]}),b?t.jsxs("section",{className:"floor-exchange-panel__relationship",children:[t.jsx("small",{children:"Delegation relationship"}),t.jsxs("p",{children:[m(b.parent.id)," → ",m(b.child.id)]}),t.jsx("strong",{children:"Subagent’s current task"}),t.jsx("p",{children:I(b.child.facts?.currentTask)||"Task details have not been reported yet."})]}):null,r.length>0?t.jsxs("div",{className:"floor-exchange-panel__actions",children:[t.jsx("button",{type:"button",disabled:!u.length,onClick:()=>{s.stop(),w(r),g(d===null?0:null)},children:d===null?"Replay":"Stop replay"}),t.jsx("button",{type:"button",disabled:!s.supported||!u.length,onClick:()=>{g(null),w(r),s.playing?s.stop():s.play(r)},children:s.playing?"Stop voice":"Listen"})]}):null,r.length>0&&(s.supported?s.voiceCount<2?t.jsx("small",{children:"Distinct character voices depend on available browser voices."}):null:t.jsx("small",{children:"Voice playback isn’t available in this browser."})),s.error?t.jsx("p",{role:"status",children:s.error}):null,t.jsx("ol",{children:h.map((e,o)=>t.jsxs("li",{className:s.speakingId===e.id||d===o?"is-speaking":"",children:[t.jsxs("div",{children:[t.jsx("strong",{children:m(e.from)}),t.jsxs("small",{children:[Math.max(0,Math.floor((S-e.at)/6e4)),"m ago"]})]}),t.jsx("p",{children:e.text}),e.bodyAvailable===!1?t.jsxs("details",{children:[t.jsx("summary",{children:"Why unavailable?"}),t.jsx("small",{children:"The harness recorded the exchange without readable message contents. Playback skips this entry."})]}):null]},e.id))}),u.length?null:t.jsx("p",{children:"This dotted link shows who the subagent belongs to. Recorded exchanges appear here when available."}),y.length?t.jsxs("section",{children:[t.jsx("strong",{children:"Files both touched"}),y.slice(0,6).map(e=>t.jsx("button",{type:"button",disabled:!e.resolvedPath,onClick:()=>e.resolvedPath&&n(e.resolvedPath),children:e.path.split("/").at(-1)},e.id))]}):null]})}const K=Object.freeze(Object.defineProperty({__proto__:null,FloorExchangePanel:W},Symbol.toStringTag,{value:"Module"}));export{W as F,K as a,V as f};
|
package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-BG4ebnX5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as a}from"./index-
|
|
1
|
+
import{r as m,j as a}from"./index-DReVb7jZ.js";import{f as j,F as $}from"./floor-message-passes-CO3Ix_wR.js";import"./lane-observe-CteDwdD-.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";function k({lanes:h,now:c,positions:x,paused:r,broker:_}){const n=m.useRef(null),o=m.useRef(new Map),p=r?n.current??c:c;m.useEffect(()=>{n.current=r?n.current??c:null},[r,c]);const i=j(h,p,_);return m.useEffect(()=>{const t=new Set(i.map(s=>`${s.id}:${r}`));for(const s of o.current.keys())t.has(s)||o.current.delete(s)},[i,r]),a.jsx("svg",{className:`floor-message-passes${r?" is-paused":""}`,"aria-label":"Recent messages between agents",children:i.map(t=>{const s=x.get(t.from),e=x.get(t.to);if(!s||!e)return null;const y=(s.x+e.x)/2,u=(s.y+e.y)/2-Math.min(110,30+Math.hypot(e.x-s.x,e.y-s.y)*.3),f=`M ${s.x} ${s.y} Q ${y} ${u} ${e.x} ${e.y}`,g=Math.max(0,p-t.at),l=`${t.id}:${r}`;return o.current.has(l)||o.current.set(l,g),a.jsxs("g",{className:"floor-message-passes__pass",style:{opacity:Math.min(1,($-g)/3e3),"--pass-age":`${-o.current.get(l)}ms`},children:[a.jsx("title",{children:t.label}),a.jsx("path",{className:"floor-message-passes__trail",d:f}),a.jsx("path",{className:"floor-message-passes__hit",d:f}),a.jsxs("g",{className:"floor-message-passes__marker",style:{offsetPath:`path('${f}')`},children:[a.jsx("circle",{className:"floor-message-passes__aura",r:"12"}),a.jsx("ellipse",{className:"floor-message-passes__ball",rx:"6",ry:"4.5"}),a.jsx("path",{className:"floor-message-passes__seam",d:"M -2.5 0 H 2.5 M -1.3 -1.2 V 1.2 M 1.3 -1.2 V 1.2"})]}),a.jsx("circle",{className:"floor-message-passes__arrival",cx:e.x,cy:e.y,r:"7"}),a.jsx("circle",{className:"floor-message-passes__still",cx:e.x,cy:e.y,r:"4"})]},l)})})}export{k as FloorMessagePasses};
|