@openscout/scout 0.2.102 → 0.2.106
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 +307 -0
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
- package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CusDRiVO.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-CyegKk1V.js} +1 -1
- package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-X-hbTOi0.js} +1 -1
- package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-LPXSVP67.js} +1 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
- package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
- package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-DtHT3sCo.js} +1 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
- package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-CfTupTEl.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
- package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
- package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-Cchnc4Ug.js} +1 -1
- package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-gkEp4y__.js} +1 -1
- package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CUkjnoVk.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
- package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
- package/dist/client/assets/Canvas-X9pVSkw3.js +1 -0
- package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-BXUtPAGC.js} +1 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
- package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
- package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
- package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +1 -0
- package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
- package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
- package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-DuQRwpgK.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
- package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-BXyKeL5T.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-THp0r_U8.js} +1 -1
- package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-BVmSMV2V.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
- package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BUoRbu9o.js} +1 -1
- package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
- package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js} +2 -2
- package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
- package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
- package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
- package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dhryjx2c.js} +1 -1
- package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
- package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-aH-jCyDq.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-66uQAorV.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
- package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CZlrHXy-.js} +1 -1
- package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-BAO6mtjD.js} +1 -1
- package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
- package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-2_NVPQor.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
- package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-VFzA6Kxc.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
- package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-BeHDejWz.js} +1 -1
- package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
- package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CFfkIbc6.js} +1 -1
- package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
- package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-_t7yM8vX.js} +2 -2
- package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-DouPyNmz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-CnM1i8hW.js} +1 -1
- package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
- package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
- package/dist/client/assets/JumpPalette-O1aJE9gR.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-CJa110yk.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
- package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-DWZHYh1A.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
- package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BVvtqI8q.js} +2 -2
- package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
- package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-D62-Wis8.js} +1 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
- package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-B19lYSY9.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
- package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-Bh-L-emz.js} +1 -1
- package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
- package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-DFbF_XvR.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-CElOEpCh.js} +1 -1
- package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-B-jjHf1c.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-PFnG_10h.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
- package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
- package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
- package/dist/client/assets/Provider-C35yu29I.js +5 -0
- package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-BjmWK420.js} +1 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
- package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
- package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-348f17bW.js} +1 -1
- package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-CBnAM3ui.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DyRPfNFx.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
- package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-uMCpt0e9.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
- package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-CNDhZhgD.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-3_25USO_.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-D7dbV2qo.js} +1 -1
- package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
- package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
- package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
- package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
- package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
- package/dist/client/assets/SessionObserve-DXxBvejJ.js +12 -0
- package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
- package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
- package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-CRtTYkMj.js} +1 -1
- package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-_CHAQdOa.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
- package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-CpZWf54-.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-BSiTS4en.js} +1 -1
- package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-2gCP6H7A.js} +1 -1
- package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-CYSijNTy.js} +2 -2
- package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
- package/dist/client/assets/TerminalRelay-DrikpUSJ.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-CXFeweMg.js} +1 -1
- package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
- package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
- package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
- package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
- package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
- package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
- package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
- package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-vNt01sDd.js} +1 -1
- package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-BDkR7Edq.js} +1 -1
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
- package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-CIIlutQq.js} +1 -1
- package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
- package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-Jm2Z6dfW.js} +1 -1
- package/dist/client/assets/{activity-CSUhvjD0.js → activity-CIlFrfPJ.js} +1 -1
- package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-dFpj9Kfq.js} +1 -1
- package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-BFCGRtGh.js} +1 -1
- package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-BGGvT5G6.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-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
- package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-DDc7mLCW.js} +1 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
- 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-C1SQHJ3k.js} +1 -1
- package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-MVUKauwQ.js} +1 -1
- package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-Bp-FpE5V.js} +1 -1
- package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-BPedAgxO.js} +1 -1
- package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-CV98WMSp.js} +1 -1
- package/dist/client/assets/{bot-CfN9PSBF.js → bot-B4zLQ4IN.js} +1 -1
- package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
- package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
- package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
- package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
- package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
- package/dist/client/assets/{check-B8dMv3Is.js → check-lrJ3a73a.js} +1 -1
- package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-l1mrh5S9.js} +1 -1
- package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DrfqcerI.js} +1 -1
- package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-CETZJzjV.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
- package/dist/client/assets/{clock-DFcRbtrl.js → clock-BV1aqPkK.js} +1 -1
- package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-BhcNbLWU.js} +1 -1
- package/dist/client/assets/{coffee-C_D9zooM.js → coffee-D7EAOdCk.js} +1 -1
- package/dist/client/assets/{compass-DTZdCpv9.js → compass-63TUaz5_.js} +1 -1
- package/dist/client/assets/content-B1lgE8qr.js +1 -0
- package/dist/client/assets/content-B5l11YyQ.js +1 -0
- package/dist/client/assets/content-BNZOZEpX.js +1 -0
- package/dist/client/assets/content-BRIxP155.js +1 -0
- package/dist/client/assets/content-BWd8gt8L.js +1 -0
- package/dist/client/assets/content-BfwS2jAK.js +1 -0
- package/dist/client/assets/content-C4p43_eT.js +1 -0
- package/dist/client/assets/content-CdYfaoDV.js +1 -0
- package/dist/client/assets/content-CzldLxw0.js +1 -0
- package/dist/client/assets/content-D-olnc4U.js +1 -0
- package/dist/client/assets/content-DTioimq4.js +1 -0
- package/dist/client/assets/content-LOebm3_d.js +1 -0
- package/dist/client/assets/content-nGlEZhUI.js +1 -0
- package/dist/client/assets/content-oyzDM-LK.js +1 -0
- package/dist/client/assets/content-x1PHxED7.js +1 -0
- package/dist/client/assets/content-zX3ZY3T9.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-Tqba2d56.js} +1 -1
- package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
- package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
- package/dist/client/assets/{copy-D9WUpQRf.js → copy-xKeM5ZtU.js} +1 -1
- package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-BOTa_WLr.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-zZ8Hx7er.js} +1 -1
- package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
- package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
- package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
- package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
- package/dist/client/assets/discover-DJFxyV1k.js +2 -0
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
- package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-CUObqmgX.js} +1 -1
- package/dist/client/assets/{eye-CtqSV8BS.js → eye-LrO-cXQt.js} +1 -1
- package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-CsU7jJpu.js} +1 -1
- package/dist/client/assets/{file-text-ChtICwub.js → file-text-CnISiiw6.js} +1 -1
- package/dist/client/assets/{flag-CqdOxVkI.js → flag-C4wl8z2-.js} +1 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
- 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-D5prSkzz.js} +1 -1
- package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-D9_5iJEm.js} +1 -1
- package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-QZub3Ot9.js} +1 -1
- package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-B0_fPLO7.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-DicR7sUf.js} +1 -1
- package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
- package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
- package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
- package/dist/client/assets/index-724SdE6r.js +1 -0
- package/dist/client/assets/{index-CvsM3jm8.js → index-CHD0qcfL.js} +1 -1
- package/dist/client/assets/index-CN4rBB_s.css +1 -0
- package/dist/client/assets/index-D1d98iYf.js +1 -0
- package/dist/client/assets/index-EsrkGBcv.js +10 -0
- package/dist/client/assets/index-gGHPA-By.js +1 -0
- package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-BkgUDn6G.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-DDHegDbx.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-D-RSWjb-.js} +1 -1
- package/dist/client/assets/{layers-Bolb8ejU.js → layers-C8PDiMul.js} +1 -1
- package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-Cor2frzj.js} +1 -1
- package/dist/client/assets/left-Bn5X7x2o.js +2 -0
- package/dist/client/assets/left-BqS0fYX1.js +1 -0
- package/dist/client/assets/left-CTCeeeD3.js +1 -0
- package/dist/client/assets/left-DhtVPVux.js +1 -0
- package/dist/client/assets/left-K39b-Wvx.js +2 -0
- package/dist/client/assets/left-KGmueNPt.js +1 -0
- package/dist/client/assets/left-P_GOYB-s.js +1 -0
- package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
- package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
- package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
- package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
- package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
- package/dist/client/assets/library-CkWNPHRp.js +1 -0
- package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-OvccU82H.js} +1 -1
- package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-BqnoxJrq.js} +1 -1
- package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
- package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-DxcqCLmd.js} +1 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
- package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-ByUvhS-v.js} +1 -1
- package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-CiZ8xSAx.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-DZvJC4KU.js} +1 -1
- package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-CxRVKNE-.js} +1 -1
- package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
- package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
- package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-BxesYglW.js} +1 -1
- package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
- package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-elEEsIvb.js} +1 -1
- package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
- package/dist/client/assets/monitor-DTTYEb73.js +1 -0
- package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-uorRqFxf.js} +1 -1
- package/dist/client/assets/{observe-CkfOxYx_.js → observe-BJqERJVj.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-BswZLqvA.js} +1 -1
- package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-Bv7sP_fc.js} +1 -1
- package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
- package/dist/client/assets/{pause-DWS7YGQ3.js → pause-C2XTlkjs.js} +1 -1
- package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-KRk_yb0q.js} +1 -1
- package/dist/client/assets/{pin-DWlD1BOF.js → pin-C2mFOV1l.js} +1 -1
- package/dist/client/assets/{play-D_Pggug4.js → play-FT6K3It1.js} +1 -1
- package/dist/client/assets/{plus-D_wLGJGT.js → plus-DFDDeGKu.js} +1 -1
- package/dist/client/assets/profile-DTmzN16I.js +1 -0
- package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-C0FUCv_p.js} +1 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
- package/dist/client/assets/provider-Dojd8quC.js +1 -0
- package/dist/client/assets/{proxy-DOG46ja4.js → proxy-AJsmwA6h.js} +1 -1
- package/dist/client/assets/{radio-C_jtwbFP.js → radio-DRoOZsws.js} +1 -1
- package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-BmVr7sCD.js} +1 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
- package/dist/client/assets/right-49kO-6nD.js +1 -0
- package/dist/client/assets/right-APtItA8A.js +1 -0
- package/dist/client/assets/right-BJwhPqtn.js +1 -0
- package/dist/client/assets/right-BPqrf4ek.js +1 -0
- package/dist/client/assets/right-D7djOy6K.js +1 -0
- package/dist/client/assets/right-DKOUCRob.js +1 -0
- package/dist/client/assets/right-DMNrVzg7.js +1 -0
- package/dist/client/assets/{right-BLJsc2-p.js → right-DWPVB-nK.js} +1 -1
- package/dist/client/assets/right-DppeMCy4.js +1 -0
- package/dist/client/assets/right-GAL5Mw1v.js +1 -0
- package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-CGl4RTV7.js} +1 -1
- package/dist/client/assets/router-DCtl8wqb.js +1 -0
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
- package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-RUWwCVAr.js} +1 -1
- package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
- package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
- package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-DNjxhyO2.js} +1 -1
- package/dist/client/assets/{search-C4VlW_0l.js → search-DT42oyRW.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
- package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-x3wFUjxj.js} +1 -1
- package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-CH0-fbZE.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
- package/dist/client/assets/{server-ms1yxUYJ.js → server-QfsgMLk1.js} +1 -1
- package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CvSdPHPe.js} +1 -1
- package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
- package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
- package/dist/client/assets/{session-table-CDx_16xf.js → session-table-L-pns6Zl.js} +1 -1
- package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Dc-QAa7O.js} +1 -1
- package/dist/client/assets/{settings-TJIkkZ0P.js → settings-BVh7kldq.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-782VC_yy.js} +1 -1
- package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-BjHq_DNK.js} +1 -1
- package/dist/client/assets/{sse-v5QLsOHV.js → sse-BCPRocpq.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
- package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-d0yAYxR0.js} +1 -1
- package/dist/client/assets/{terminal-96JWDYDL.js → terminal-hQKQygcf.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-Bxs1hp-j.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-Ay5C2c-M.js} +1 -1
- package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
- package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
- package/dist/client/assets/use-beside-DoRC1nt0.js +1 -0
- package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-CY4JciOV.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-BvaqtODo.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-3gMYZNIp.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-BANmpjMh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
- package/dist/client/assets/users-BUjx36gx.js +1 -0
- package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
- package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
- package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
- package/dist/client/assets/{wrench-BsMTSeji.js → wrench-DR0i5BU7.js} +1 -1
- package/dist/client/assets/{x-DI1ktCYb.js → x-DAehov0E.js} +1 -1
- package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-BXQiLVnI.js} +1 -1
- package/dist/client/assets/{zap-sKPkh4sQ.js → zap-CEjZNZbI.js} +1 -1
- package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/index.html +15 -3
- package/dist/drizzle/0019_session_actor_targets.sql +227 -0
- package/dist/drizzle/0020_message_reactions.sql +11 -0
- package/dist/drizzle/README.md +19 -0
- package/dist/drizzle/meta/_journal.json +14 -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 +1721 -837
- package/dist/node/main.mjs +264 -39
- package/dist/pairing-runtime-controller.mjs +1090 -570
- package/dist/runtime/base-daemon.mjs +14272 -61
- package/dist/runtime/broker-daemon.mjs +16999 -1243
- package/dist/runtime/broker-process-manager.mjs +101 -6
- package/dist/runtime/mesh-discover.mjs +101 -6
- package/dist/scout-control-plane-web.mjs +27057 -6178
- 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 +294 -56
- 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/AgentAvatar-BIwg54Tj.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/AgentLanesView-aAyC7lHf.js +0 -2
- package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
- package/dist/client/assets/AgentSessions-Cox2zS-e.js +0 -6
- 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/ConversationComposer-B7RU6LKd.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
- package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
- package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
- package/dist/client/assets/ConversationStatus-CK-YfLpi.js +0 -1
- package/dist/client/assets/CrewAvatar-CJhuqTsJ.js +0 -1
- 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/FloorTacticalHUD-Bngao6sn.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/ObserveEmbedScreen-BPiSXXvm.js +0 -2
- 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/Provider-5Hotn7NQ.js +0 -5
- 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/SessionObserve-DaqDhqDI.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +0 -1
- package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
- package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
- package/dist/client/assets/SettingsDrawer-BDapR4E9.js +0 -3
- package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +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/WorkDetailScreen-CwtRCm_-.js +0 -5
- package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
- package/dist/client/assets/WorldMinimap-Blqg0d5r.js +0 -1
- package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
- package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
- package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
- 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-model-BGFHoxQ0.js +0 -1
- package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
- package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
- package/dist/client/assets/ctx-panel-F05jXK4Q.css +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-moving-signal-B7m-ngb2.js +0 -1
- 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/message-markup-DgFSyb3f.js +0 -15
- package/dist/client/assets/mission-control-model-C30vU1Fe.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/runtime-picker-DdsttHHc.js +0 -1
- package/dist/client/assets/scout-voice-DOQ_B77g.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/system-surfaces-redesign-DKFg4GB5.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
- package/dist/drizzle/meta/0000_snapshot.json +0 -4575
- package/dist/drizzle/meta/0001_snapshot.json +0 -4624
- package/dist/drizzle/meta/0002_snapshot.json +0 -4631
- package/dist/drizzle/meta/0003_snapshot.json +0 -4952
- package/dist/drizzle/meta/0004_snapshot.json +0 -5235
- package/dist/drizzle/meta/0005_snapshot.json +0 -5599
- package/dist/drizzle/meta/0006_snapshot.json +0 -5606
- package/dist/drizzle/meta/0007_snapshot.json +0 -5767
- package/dist/drizzle/meta/0008_snapshot.json +0 -5774
- package/dist/drizzle/meta/0009_snapshot.json +0 -6262
- package/dist/drizzle/meta/0010_snapshot.json +0 -6286
- package/dist/drizzle/meta/0011_snapshot.json +0 -6337
- package/dist/drizzle/meta/0012_snapshot.json +0 -6458
- package/dist/drizzle/meta/0013_snapshot.json +0 -6465
- package/dist/drizzle/meta/0014_snapshot.json +0 -6503
- package/dist/drizzle/meta/0015_snapshot.json +0 -6596
- package/dist/drizzle/meta/0016_snapshot.json +0 -6611
- package/dist/drizzle/meta/0017_snapshot.json +0 -6785
- package/dist/drizzle/meta/0018_snapshot.json +0 -6804
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r,r as o}from"./index-C8uS5szO.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-JjLbm3W2.js";import{a as U}from"./api-CaROe5_H.js";import"./runtime-picker-DdsttHHc.js";import{b as Hs,u as va}from"./router-BKiMcYa7.js";import{u as Ta,C as xa}from"./ConversationComposer-B7RU6LKd.js";import"./index-C5cX8dkl.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-BGFHoxQ0.js";import{u as sr}from"./sse-v5QLsOHV.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-DgFSyb3f.js";import{a as Xs,i as ss,b as mr}from"./message-visibility-DwxgcgYK.js";import{d as hr}from"./operator-attention-DGR4kOog.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-5Hotn7NQ.js";import{o as bt}from"./openContent-C6XO6kr5.js";import{c as Ye}from"./clipboard-e3fSpeo7.js";import{A as as}from"./AgentAvatar-BIwg54Tj.js";import{d as wr}from"./types-B0PlfpKc.js";/* empty css */import{ConversationHeader as Sr,ConversationIdentityRow as br,AddParticipantForm as vr}from"./ConversationHeader-CCSU8uo_.js";import{CommsFlowPane as Tr}from"./CommsFlowGraph-Czg-KTS0.js";import{a as xr}from"./use-beside-Df-F2Uvg.js";import{FanOutRow as Cr,ThreadDayDivider as kr}from"./ConversationFeedRows-DVqnZQH0.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-C9yCAoJy.js";import{u as qr}from"./tail-events-DQ46QBW1.js";import{PinnedAskCard as Dr,ConversationStatusStrip as Br}from"./ConversationStatus-CK-YfLpi.js";import"./HarnessMark-Bt47OeHy.js";import"./colors-CFlbwC25.js";import"./agent-state-DDhnFEEP.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./createLucideIcon-DkjnzvcJ.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./loader-circle-DurUYl7E.js";import"./file-text-ChtICwub.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./zap-sKPkh4sQ.js";import"./index-BWHgHrtv.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./surface-activity-B1rgWB1i.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.js";import"./BackToPicker-Bys9ColC.js";import"./AstronautSuit-C-4I5YKi.js";import"./panel-right-BNTJhy8M.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DOKw3Q8i.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-CzBWvSa5.js";import"./CommsSelection-g1twA-Lb.js";/* empty css */import"./use-conversation-list-A_YUf8lo.js";import"./agent-master-model-C-KdOFDK.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./activity-CSUhvjD0.js";import"./message-circle-CSiJj6yo.js";import"./check-B8dMv3Is.js";import"./sparkles-BbOFw3d0.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 Ui({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 Hi=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{Ui as ConversationScreen,Hi as scoutSurface};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as x,j as s}from"./index-C8uS5szO.js";import{c as v,C as y,j as w}from"./conversation-model-BGFHoxQ0.js";import{C as b}from"./check-B8dMv3Is.js";import{S as C}from"./sparkles-BbOFw3d0.js";import{X as k}from"./x-DI1ktCYb.js";import{c as E}from"./createLucideIcon-DkjnzvcJ.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 +0,0 @@
|
|
|
1
|
-
import{l as G,n as O,r as d,p as U,o as E,C as q,q as P,t as X,j as r,u as g}from"./index-C8uS5szO.js";import{H as Y}from"./HarnessMark-Bt47OeHy.js";const z={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=q[l],n=G[l],w=D(h),p=z[w],$=J(n?n.roles.length+1:1),b=n&&$>0?O[$]?.role:void 0,v=d.useMemo(()=>U(i),[i]),k=(x?E[l]?.ink:void 0)??u?.ink??1,M=d.useMemo(()=>P(v,k),[v,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&&b&&r.jsx("img",{src:g(`${n.dir}/${b}.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 +0,0 @@
|
|
|
1
|
-
import{j as t,r as w}from"./index-C8uS5szO.js";import{A as E}from"./AgentAvatar-BIwg54Tj.js";import{H as Q}from"./HarnessMark-Bt47OeHy.js";import{t as T}from"./time-Dhsh_2EG.js";import{F as D,A as O}from"./AddProjectForm-DfbjlFfy.js";import{y as q,z as U}from"./Provider-5Hotn7NQ.js";import{b as J}from"./machine-scope-DJt9RZ2w.js";import{a as K}from"./agent-specialization-CiVxQsFT.js";import{o as G}from"./model-CBkMvT1w.js";import{s as W}from"./project-overview-helpers-BQTc_Ous.js";import{c as M}from"./createLucideIcon-DkjnzvcJ.js";import{S as V}from"./search-C4VlW_0l.js";import{S as X}from"./sliders-horizontal-CHf3ntw0.js";import{F as x}from"./folder-0fWevPvQ.js";import{F as Y}from"./DocumentFocusViewer-f12RRQpV.js";import{M as Z}from"./message-square-NmXWtWLR.js";const ee=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],te=M("rows-3",ee);const se=[["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"}]],ne=M("telescope",se);const re=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],ie=M("users",re);function z(e){return e.needs?3:e.working?2:1}function $(e){return[...e].sort((n,s)=>z(s)-z(n)||s.lastActivityAt-n.lastActivityAt)}function S(e){return[...new Set(e.map(n=>n?.trim().toLowerCase()).filter(n=>!!n))].sort()}function _(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 H(e){return e.needs>0?"needs":e.working>0||e.liveSessionCount>0?"working":"idle"}function oe(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 ae(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:_(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:oe(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:H(e),needs:o.needs,working:o.working,substrates:[o],primary:o,work:o.work,conversationId:null,lastActivityAt:e.lastActivityAt,sessionCount:e.sessionCount}}function ce(e){const n=$(e),s=n[0];return{threadId:s.id,projectSlug:s.projectSlug,projectTitle:s.projectTitle,projectRoot:s.projectRoot,branch:_(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 le(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(ce).sort((s,r)=>Number(r.needs)-Number(s.needs)||Number(r.working)-Number(s.working)||r.lastActivityAt-s.lastActivityAt)}function de(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 ue(e,n){return[n.root,...n.worktrees.map(r=>r.root)].map(b).filter(r=>!!r).some(r=>e===r||e.startsWith(`${r}/`))}function he(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=>ue(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 pe(e,n,s){const r=new Set;for(const o of e)for(const i of he(o,n,s))r.add(i);return r.size>1?!0:e.some(o=>!U(o)&&!o.workspaceQualifier?.trim()&&!o.cwd?.trim())}function je(e,n,s){const r=e.filter(q),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(!pe(a,n,s))return[];const h=[...a].sort((d,k)=>(k.updatedAt??0)-(d.updatedAt??0))[0],u=new Set(a.map(d=>d.id)),v=s.filter(d=>d.agentId&&u.has(d.agentId)),j=le(v),f=j[0]??null,p=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)),m=de(a,j),C=Math.max(0,...a.map(d=>d.updatedAt??0),...j.map(d=>d.lastActivityAt)),g=K(h);return[{kind:"role",key:`role:${i}`,agentId:h.id,name:h.name,headline:g.headline,harnesses:p,model:y.length===1?y[0]:null,effort:A.length===1?A[0]:null,status:m,needs:m==="needs",working:m==="working"||m==="thinking",substrates:j,primary:f,work:f?.work??g.headline,conversationId:f?.conversationId??h.conversationId,lastActivityAt:C,sessionCount:j.reduce((d,k)=>d+k.sessionCount,0)}]})}function R(e){switch(e.status){case"needs":return 3;case"working":return 2;case"thinking":return 1;case"idle":return 0}}function B(e,n,s,r=null){const o=J(s,r);return[...e.map(a=>ae(a,n)),...je(o,e,n)].sort((a,l)=>R(l)-R(a)||l.lastActivityAt-a.lastActivityAt||a.name.localeCompare(l.name))}function we(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 me(e,n){const s=H(e);switch(n){case"all":return!0;case"active":return s==="working";case"needs":return s==="needs";case"idle":return s==="idle"}}function fe(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 ge(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 ke(e){switch(e){case"needs":return"Needs attention";case"working":return"Working";case"thinking":return"Thinking";case"idle":return"Idle"}}const xe=[{id:"all",label:"All"},{id:"active",label:"Active"},{id:"needs",label:"Needs attention"},{id:"idle",label:"Idle"}];function ve(e,n){if(n){e({view:"conversation",conversationId:n});return}e({view:"messages"})}function L(e,n){e({view:"code",project:n})}function ye(e,n,s){e(G(n,s))}function P(e,n,s){e({view:"agents-v2",projectSlug:s,...n.machineId?{machineId:n.machineId}:{},...n.showEphemeral?{showEphemeral:!0}:{}})}function Ae({model:e,agents:n,route:s,navigate:r,nowMs:o}){const[i,a]=w.useState("projects"),[l,h]=w.useState("all"),[u,v]=w.useState(""),[j,f]=w.useState(!1),p=w.useMemo(()=>B(e.projects,e.threads,n,s.machineId??null),[n,e.projects,e.threads,s.machineId]),y=w.useMemo(()=>p.filter(c=>we(c,l)&&fe(c,u)),[p,u,l]),A=w.useMemo(()=>e.projects.filter(c=>me(c,l)&&ge(c,u)),[e.projects,u,l]),m=e.projects.filter(c=>c.working>0||c.liveSessionCount>0).length,C=e.projects.filter(c=>c.needs>0).length,g=p.filter(c=>c.status==="working"||c.status==="thinking").length,d=p.filter(c=>c.status==="needs").length,k=p.filter(c=>c.kind==="project").length,N=p.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.jsxs("button",{type:"button","data-active":i==="projects"||void 0,"aria-pressed":i==="projects",onClick:()=>a("projects"),title:"Browse tracked projects",children:[t.jsx(te,{size:13,strokeWidth:1.9,"aria-hidden":!0}),"Projects"]}),t.jsxs("button",{type:"button","data-active":i==="agents"||void 0,"aria-pressed":i==="agents",onClick:()=>a("agents"),title:"Browse durable agent identities",children:[t.jsx(ie,{size:13,strokeWidth:1.9,"aria-hidden":!0}),"Agents"]})]}),t.jsxs("label",{className:"cw-search",role:"search",children:[t.jsx(V,{size:13,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.jsxs("div",{className:"cw-filters","aria-label":"Status filter",children:[t.jsx(X,{size:12,strokeWidth:1.9,"aria-hidden":!0,className:"cw-filtersIcon"}),xe.map(c=>t.jsx("button",{type:"button","data-active":l===c.id||void 0,"aria-pressed":l===c.id,onClick:()=>h(c.id),children:c.label},c.id))]}),t.jsxs("button",{type:"button",className:"cw-addProject","aria-expanded":j,onClick:()=>f(c=>!c),children:[t.jsx(D,{size:13,strokeWidth:1.9,"aria-hidden":!0}),"Add project"]})]}),j?t.jsx(O,{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":m>0?"live":void 0,children:[m," active"]}),C>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":"needs",children:[C," need you"]})]}):null]}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[k," 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":g>0?"live":void 0,children:[g," active"]}),d>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":"needs",children:[d," need you"]})]}):null]})}),i==="projects"?t.jsx(Se,{projects:A,route:s,navigate:r,nowMs:o,allEmpty:e.projects.length===0}):t.jsx(be,{members:y,route:s,navigate:r,nowMs:o,allEmpty:p.length===0})]})}function Ce({project:e,threads:n,route:s,navigate:r,nowMs:o}){const i=B([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 F=5;function Se({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,F),h=Math.max(0,e.length-F);return t.jsxs("div",{className:"cw-workspaceList",children:[l.map(u=>t.jsx(Ne,{project:u,route:n,navigate:s,nowMs:r},u.slug)),h>0?t.jsx("button",{type:"button",className:"cw-showMore",onClick:()=>a(u=>!u),children:i?"Show fewer projects":`Show ${h} more`}):null]})}function Ne({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:[t.jsx(x,{size:13,strokeWidth:1.7,"aria-hidden":!0}),"/",e.title]}),t.jsx("span",{className:"cw-workspaceRoot",title:e.root??void 0,children:e.root?W(e.root):"Discovered project"}),t.jsxs("span",{className:"cw-workspaceMeta",children:[e.needs>0?t.jsx("b",{"data-tone":"needs",children:"Needs you"}):null,o?t.jsx("b",{"data-tone":"live",children:"Active"}):null,t.jsxs("span",{children:[e.worktreeCount," ",e.worktreeCount===1?"worktree":"worktrees"]}),t.jsxs("span",{children:[e.sessionCount," ",e.sessionCount===1?"session":"sessions"]}),t.jsx("time",{children:e.lastActivityAt?T(e.lastActivityAt,r):"no activity"})]})]})})}function be({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(Ie,{member:i,route:s,navigate:r,nowMs:o},i.key))})]})}function Ie({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(E,{agent:{name:e.name,state:Me(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:ke(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(x,{size:11,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("span",{children:o.projectRoot?W(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(Pe,{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?T(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(Y,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Open project"]}),t.jsxs("button",{type:"button",onClick:()=>L(s,o.projectSlug),children:[t.jsx(x,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Browse code"]})]}):t.jsxs(t.Fragment,{children:[e.conversationId?t.jsxs("button",{type:"button",onClick:()=>ve(s,e.conversationId),children:[t.jsx(Z,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Chat"]}):null,o?t.jsxs("button",{type:"button",onClick:()=>L(s,o.projectSlug),children:[t.jsx(x,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Browse code"]}):null,e.agentId?t.jsxs("button",{type:"button",onClick:()=>ye(s,n,e.agentId),children:[t.jsx(ne,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Inspect"]}):null]})})]})}function Me(e){switch(e){case"needs":return"needs_attention";case"working":return"in_turn";case"thinking":return"thinking";case"idle":return"idle"}}function Pe({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(x,{size:11,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("span",{children:e.projectTitle}),e.branch?t.jsxs("em",{children:["git: ",e.branch]}):null]})}const Je=Object.freeze(Object.defineProperty({__proto__:null,CrewWorkspaces:Ae,ProjectAgentDirectory:Ce},Symbol.toStringTag,{value:"Module"}));export{Ae as C,Ce as P,ie as U,Je as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.cw-root{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-lg);padding:var(--space-xl) 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-sm)}.cw-modeToggle{display:flex;align-items:center;gap:2px;padding:2px;border:1px solid var(--pi-hairline);border-radius:9px;background:color-mix(in srgb,var(--hud-surface) 40%,transparent)}.cw-modeToggle button{display:flex;align-items:center;gap:6px;height:26px;padding:0 10px;border:none;border-radius:7px;background:transparent;color:var(--pi-dim);font-size:var(--text-xs);font-weight:600;cursor:pointer;transition:background .15s var(--pi-ease),color .15s var(--pi-ease)}.cw-modeToggle button:hover{color:var(--pi-muted)}.cw-modeToggle button[data-active]{background:color-mix(in srgb,var(--hud-ink) 10%,transparent);color:var(--pi-ink);box-shadow:inset 0 0 0 1px var(--pi-hairline-strong)}.cw-search{flex:1 1 220px;min-width:180px;max-width:420px;display:flex;align-items:center;gap:7px;height:30px;padding:0 10px;border:1px solid var(--pi-hairline);border-radius:8px;background:color-mix(in srgb,var(--hud-surface) 34%,transparent);color:var(--pi-dim)}.cw-search input{flex:1;min-width:0;border:none;background:transparent;color:var(--pi-ink);font-size:var(--text-sm);font-family:var(--pi-sans)}.cw-search input:focus{outline:none}.cw-search input::placeholder{color:var(--pi-dim)}.cw-filters{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.cw-filtersIcon{color:var(--pi-dim);margin-right:2px}.cw-filters button{height:26px;padding:0 10px;border:1px solid var(--pi-hairline);border-radius:999px;background:color-mix(in srgb,var(--hud-surface) 30%,transparent);color:var(--pi-dim);font-size:var(--text-2xs);font-weight:600;letter-spacing:.01em;cursor:pointer;transition:background .15s var(--pi-ease),color .15s var(--pi-ease),border-color .15s var(--pi-ease)}.cw-filters button:hover{color:var(--pi-muted);border-color:var(--pi-hairline-strong)}.cw-filters button[data-active]{background:color-mix(in srgb,var(--pi-accent) 16%,transparent);border-color:color-mix(in srgb,var(--pi-accent) 40%,var(--pi-hairline));color:var(--pi-ink)}.cw-addProject{margin-left:auto;display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;border:1px solid var(--pi-hairline);border-radius:8px;background:color-mix(in srgb,var(--hud-surface) 34%,transparent);color:var(--pi-muted);font-size:var(--text-xs);font-weight:600;cursor:pointer;transition:background .15s var(--pi-ease),color .15s var(--pi-ease)}.cw-addProject:hover{color:var(--pi-ink);border-color:var(--pi-hairline-strong)}.cw-digest{flex:none;display:flex;align-items:center;gap:6px;color:var(--pi-dim);font-size:var(--text-xs);font-family:var(--pi-mono)}.cw-digest span[data-tone=live]{color:color-mix(in srgb,var(--pi-accent) 78%,var(--pi-ink))}.cw-digest span[data-tone=needs]{color:color-mix(in srgb,#d9a441 82%,var(--pi-ink));font-weight:650}.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-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:5px}.cw-workspace{border:1px solid var(--pi-hairline);border-radius:8px;background:color-mix(in srgb,var(--hud-surface) 18%,transparent);overflow:hidden}.cw-workspace[data-state=needs]{border-color:color-mix(in srgb,#d9a441 40%,var(--pi-hairline))}.cw-workspace[data-state=live]{border-color:color-mix(in srgb,var(--pi-accent) 28%,var(--pi-hairline))}.cw-workspaceHead{width:100%;display:flex;align-items:center;gap:var(--space-md);min-height:44px;padding:8px 12px;border:none;background:transparent;color:inherit;text-align:left;cursor:pointer;transition:background .15s var(--pi-ease)}.cw-workspaceHead:hover{background:color-mix(in srgb,var(--hud-ink) 4%,transparent)}.cw-workspaceTitle{flex:none;display:flex;align-items:center;gap:6px;color:var(--pi-ink);font-size:var(--text-sm);font-weight:650}.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:10px;color:var(--pi-dim);font-size:var(--text-xs)}.cw-workspaceMeta b{font-weight:650;color:var(--pi-muted)}.cw-workspaceMeta b[data-tone=needs]{color:color-mix(in srgb,#d9a441 85%,var(--pi-ink))}.cw-workspaceMeta b[data-tone=live]{color:color-mix(in srgb,var(--pi-accent) 82%,var(--pi-ink))}.cw-workspaceMeta time{font-family:var(--pi-mono)}.cw-showMore{align-self:flex-start;height:28px;padding:0 10px;border:none;background:transparent;color:var(--pi-dim);font-size:var(--text-xs);font-weight:600;cursor:pointer}.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}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as s}from"./index-C8uS5szO.js";import{a as k}from"./api-CaROe5_H.js";import{u as R}from"./sse-v5QLsOHV.js";import{d as $,t as F}from"./time-Dhsh_2EG.js";import{SessionRefScreen as j}from"./SessionRefScreen-BOQ1_ydg.js";/* empty css */import{c as E}from"./createLucideIcon-DkjnzvcJ.js";import{X as A}from"./x-DI1ktCYb.js";import"./index-BWHgHrtv.js";import"./tail-events-DQ46QBW1.js";import"./BackToPicker-Bys9ColC.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./ConversationScreen-tTP6B_F-.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./conversation-model-BGFHoxQ0.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./ConversationComposer-B7RU6LKd.js";import"./AgentAvatar-BIwg54Tj.js";import"./Provider-5Hotn7NQ.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.js";import"./zap-sKPkh4sQ.js";import"./message-markup-DgFSyb3f.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DGR4kOog.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-CCSU8uo_.js";import"./AstronautSuit-C-4I5YKi.js";import"./panel-right-BNTJhy8M.js";import"./CommsFlowGraph-Czg-KTS0.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DOKw3Q8i.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-CzBWvSa5.js";import"./CommsSelection-g1twA-Lb.js";/* empty css */import"./use-conversation-list-A_YUf8lo.js";import"./agent-master-model-C-KdOFDK.js";import"./use-beside-Df-F2Uvg.js";import"./ConversationFeedRows-DVqnZQH0.js";import"./ConversationPanels-C9yCAoJy.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./activity-CSUhvjD0.js";import"./message-circle-CSiJj6yo.js";import"./ConversationStatus-CK-YfLpi.js";import"./check-B8dMv3Is.js";import"./sparkles-BbOFw3d0.js";import"./SessionObserve-DaqDhqDI.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-C6YehJqD.js";import"./lane-observe-BD21P8BB.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-DkEkQzo-.js";import"./ObserveTextFlow-ET0dD1wO.js";import"./SessionObserveEvidence-Drv-D8Oh.js";import"./wrench-BsMTSeji.js";import"./external-link-RT4Ph-6-.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 Te({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{Te as FlightObserveScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as s}from"./index-C8uS5szO.js";import{b as O}from"./shared-work-artifacts-4IIQXQfc.js";import{u as E}from"./Provider-5Hotn7NQ.js";import{a as R}from"./router-BKiMcYa7.js";import{f as P,a as B}from"./terminal-sessions-Ch9aYlgi.js";import{b as H}from"./agent-lane-detail-Db7KyAlf.js";import{l as k}from"./agent-lanes-model-CX0wTcnF.js";/* empty css */import{F as S}from"./file-code-corner-D_Aptal2.js";import{G as C}from"./git-branch-CA3cHKCI.js";import{T as z}from"./terminal-96JWDYDL.js";import{X as G}from"./x-DI1ktCYb.js";import{A as m}from"./arrow-up-right-Hn754ybA.js";import"./api-CaROe5_H.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./time-Dhsh_2EG.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./lane-observe-BD21P8BB.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";const p={artifacts:"Artifact shelf",branches:"Branch board",terminals:"Terminal bay"};function We({view:o,lanes:h,onView:F,onClose:L,onActor:x}){const{openFilePreview:T}=E(),[f,$]=n.useState([]),[u,j]=n.useState(null),[b,w]=n.useState(!0),[l,_]=n.useState(!1),[y,v]=n.useState("");n.useEffect(()=>{if(o!=="terminals")return;let e=!0;const r=()=>P().then(c=>{e&&($(B(c)),j(null))}).catch(()=>{e&&j("Terminal discovery is unavailable. Retry or open the terminal workspace.")}).finally(()=>{e&&w(!1)});r();const t=window.setInterval(()=>{document.hidden||r()},15e3);return()=>{e=!1,window.clearInterval(t)}},[o]);const A=h.map(e=>({lane:e,stats:H(e)})),i=new Map,d=new Map(O(h).map(e=>[e.id,{path:e.path,resolved:e.resolvedPath,owners:e.owners,state:e.state}]));for(const{lane:e,stats:r}of A){const t=e.facts?.cwd||r.cwd||"",c=e.facts?.branch||r.branch;if(c){const N=`${t}\0${c}`,g=i.get(N)??{branch:c,cwd:t,owners:[]};g.owners.push(e),i.set(N,g)}}const a=e=>e.toLowerCase().includes(y.toLowerCase()),I=o==="artifacts"?S:o==="branches"?C:z;return s.jsxs("aside",{className:"agent-floor__trace-panel floor-context","aria-label":`${p[o]} context sheet`,children:[s.jsxs("header",{className:"floor-context__header",children:[s.jsx(I,{size:20}),s.jsxs("div",{children:[s.jsx("h2",{children:p[o]}),s.jsx("p",{children:o==="terminals"?"Discovered sessions · refreshes every 15s":"Across the loaded fleet"})]}),s.jsx("button",{type:"button",onClick:L,"aria-label":"Close resource sheet",children:s.jsx(G,{size:17})})]}),s.jsx("nav",{className:"floor-context__tabs","aria-label":"Resource sheets",children:["artifacts","branches","terminals"].map(e=>s.jsx("button",{type:"button","aria-pressed":o===e,onClick:()=>{v(""),F(e)},children:p[e]},e))}),s.jsxs("div",{className:"floor-context__body",children:[s.jsx("input",{className:"floor-context__search","aria-label":"Filter floor resources",placeholder:o==="terminals"?"Find a session or workspace…":"Filter by path or branch…",value:y,onChange:e=>v(e.target.value)}),o==="artifacts"?s.jsxs("section",{children:[s.jsxs("h3",{children:["Observed changed files ",s.jsx("span",{children:d.size})]}),s.jsx("p",{className:"floor-context__scope",children:"Files changed in loaded session history. Select a file to preview."}),[...d].filter(([,e])=>a(e.path)).map(([e,r])=>s.jsxs("article",{className:"floor-context__resource",children:[s.jsxs("button",{className:"floor-context__resource-title",type:"button",disabled:!r.resolved,onClick:()=>r.resolved&&T(r.resolved),children:[s.jsx(S,{size:15}),s.jsx("strong",{children:r.path.split("/").at(-1)}),s.jsx(m,{size:13})]}),s.jsx("code",{title:r.resolved??r.path,children:r.resolved??r.path}),s.jsxs("small",{children:[r.state,r.owners.length>1?` · ${r.owners.length} {row.owners.length === 1 ? "actor" : "actors"} touched this file`:""]}),s.jsx("div",{className:"floor-context__owners",children:r.owners.map(t=>s.jsxs("button",{type:"button",onClick:()=>x(t),children:[k(t.agent,t.source)," · ",t.id.slice(-5)]},t.id))})]},e)),[...d.values()].some(e=>a(e.path))?null:s.jsx("p",{className:"floor-context__empty",children:"No observed changed files match this view."})]}):null,o==="branches"?s.jsxs("section",{children:[s.jsxs("h3",{children:["Observed branches ",s.jsx("span",{children:i.size})]}),s.jsx("p",{className:"floor-context__scope",children:"Branches and workspaces reported by these sessions."}),[...i].filter(([,e])=>a(`${e.branch} ${e.cwd}`)).map(([e,r])=>s.jsxs("article",{className:"floor-context__resource",children:[s.jsxs("h3",{children:[s.jsx(C,{size:15}),r.branch,s.jsxs("span",{children:[r.owners.length," ",r.owners.length===1?"actor":"actors"]})]}),s.jsx("code",{children:r.cwd||"Workspace not reported"}),s.jsx("div",{className:"floor-context__owners",children:r.owners.map(t=>s.jsxs("button",{type:"button",onClick:()=>x(t),children:[k(t.agent,t.source)," · ",t.id.slice(-5)]},t.id))})]},e)),[...i.values()].some(e=>a(`${e.branch} ${e.cwd}`))?null:s.jsx("p",{className:"floor-context__empty",children:"No reported branches match this view."})]}):null,o==="terminals"?s.jsxs("section",{children:[s.jsxs("nav",{className:"floor-context__tabs",children:[s.jsx("button",{type:"button","aria-pressed":!l,onClick:()=>_(!1),children:"All terminals"}),s.jsx("button",{type:"button","aria-pressed":l,onClick:()=>_(!0),children:"Herdr"})]}),s.jsx("p",{className:"floor-context__scope",children:"All discovered terminal surfaces. Opening a session uses observe mode."}),u?s.jsx("p",{role:"alert",className:"floor-context__empty",children:u}):null,b?s.jsx("p",{className:"floor-context__empty",children:"Loading terminals…"}):f.filter(e=>(!l||e.surface.backend==="herdr")&&a(e.searchable)).map(e=>s.jsxs("article",{className:"floor-context__resource",children:[s.jsxs("a",{className:"floor-context__resource-title",href:R({view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:e.key,mode:"observe"}),children:[s.jsx(z,{size:15}),s.jsx("strong",{children:e.title}),s.jsx(m,{size:13})]}),s.jsxs("small",{children:[e.surface.backend," · ",e.condition]}),s.jsx("code",{children:e.session.cwd||e.project})]},e.id)),!b&&!f.some(e=>(!l||e.surface.backend==="herdr")&&a(e.searchable))?s.jsxs("p",{className:"floor-context__empty",children:["No ",l?"Herdr ":"","terminals match this view."]}):null,s.jsxs("a",{className:"floor-context__resource-title",href:"/terminal",children:["Open terminal workspace ",s.jsx(m,{size:13})]})]}):null]})]})}export{We as FloorResourcesSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as j,j as t}from"./index-C8uS5szO.js";import{FloorSavedWork as M}from"./FloorSavedWork-2tjBoy06.js";import{f as d}from"./agent-floor-actor-3v9drnxh.js";import{b as y,F as _,a as k,f as A}from"./agent-floor-world-layout-hfMjuoui.js";import{f as F}from"./floor-context-model-DZBpo_oD.js";import{l as h}from"./agent-lanes-model-CX0wTcnF.js";import{t as S}from"./time-Dhsh_2EG.js";/* empty css */import{c as N}from"./createLucideIcon-DkjnzvcJ.js";import{C as g}from"./chevron-down-B5eMsn5c.js";import{C as E}from"./chevron-up-BHOEgHcn.js";import{P as T}from"./play-D_Pggug4.js";import{P as D}from"./pause-DWS7YGQ3.js";import{A as W}from"./arrow-up-right-Hn754ybA.js";import"./pin-DWlD1BOF.js";import"./x-DI1ktCYb.js";import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";import"./terminal-sessions-Ch9aYlgi.js";import"./api-CaROe5_H.js";import"./lane-observe-BD21P8BB.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./agent-state-DDhnFEEP.js";const q=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],H=N("radar",q);const L=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],P=N("triangle-alert",L),b={home:"Crew",tools:"Execution",edit:"Build",message:"Comms"};function pt({berths:O,allLanes:i,lanes:m,now:a,selectedId:x,sheetOpen:$,motionPaused:c,onPause:C,onRoom:v,onActor:l}){const[n,z]=j.useState(!0),[p,u]=j.useState(!1),r=i.filter(e=>["attention","blocked"].includes(d(e,a).posture)),f=F(i,a,["tool","message","ask"]).slice(0,4);return t.jsxs(t.Fragment,{children:[t.jsxs("aside",{className:"floor-tactical floor-tactical__radar","aria-label":"Tactical overview",children:[t.jsx("header",{children:t.jsxs("button",{type:"button",className:"floor-tactical__radar-toggle","aria-expanded":n,onClick:()=>z(!n),children:[t.jsx(H,{size:14}),"Sector radar ",n?t.jsx(g,{size:13}):t.jsx(E,{size:13})]})}),n?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"floor-tactical__map","aria-label":"Current sector rooms",children:[Object.keys(y).map(e=>{const s=y[e],o=m.filter(R=>d(R,a).station===e).length;return t.jsx("button",{type:"button",className:`floor-tactical__room${o?" is-occupied":""}`,style:{left:`${s.x/k*100}%`,top:`${s.y/_*100}%`},"aria-label":`Open ${b[e]} sheet from radar, ${o} actors`,onClick:()=>v(e),children:t.jsx("span",{children:b[e]})},e)}),m.map(e=>{const s=d(e,a),o=A(s.station,O[e.id]??0);return t.jsx("button",{type:"button",className:`floor-tactical__dot is-${s.posture}${x===e.id?" is-selected":""}`,style:{left:`${o.x/k*100}%`,top:`${o.y/_*100}%`},"aria-label":`Locate ${h(e.agent,e.source)} ${e.id.slice(-5)}`,onClick:()=>l(e)},e.id)})]}),t.jsxs("p",{children:[m.length," in sector · ",i.length," in fleet"]})]}):null,t.jsxs("button",{type:"button",className:"floor-tactical__motion","aria-pressed":c,onClick:C,children:[c?t.jsx(T,{size:13}):t.jsx(D,{size:13}),c?"Resume scene motion":"Pause scene motion"]}),t.jsx(M,{lanes:i,selected:i.find(e=>e.id===x)??null,onActor:l}),c?t.jsx("small",{className:"floor-tactical__paused",children:"Motion paused · data stays live"}):null]}),$?null:t.jsxs("aside",{className:"floor-tactical floor-tactical__activity","aria-label":"Fleet activity and attention",children:[t.jsxs("button",{type:"button",className:`floor-tactical__attention${r.length?" has-attention":""}`,"aria-expanded":p,onClick:()=>u(!p),children:[t.jsx(P,{size:14}),t.jsx("span",{children:r.length?`${r.length} need attention`:"No attention signals"}),t.jsx(g,{size:13})]}),p?t.jsx("div",{className:"floor-tactical__attention-list",children:r.length?r.map(e=>t.jsxs("button",{type:"button",onClick:()=>{u(!1),l(e)},children:[t.jsx("strong",{children:h(e.agent,e.source)}),t.jsxs("small",{children:[e.id.slice(-5)," · ",d(e,a).label]})]},e.id)):t.jsx("p",{children:"No blocked or needs-attention actors reported in this fleet."})}):null,t.jsxs("h3",{children:["Recent activity ",t.jsx("span",{children:"15m"})]}),f.length?f.map(({lane:e,event:s,at:o})=>t.jsxs("button",{className:"floor-tactical__activity-item",type:"button",onClick:()=>l(e),children:[t.jsxs("span",{children:[t.jsx("strong",{children:s.kind==="tool"?s.tool||"Tool":s.kind==="ask"?"Request":"Message"}),t.jsx("time",{children:S(o,a)})]}),t.jsxs("span",{children:[t.jsxs("small",{children:[h(e.agent,e.source)," · ",e.id.slice(-5)]}),t.jsx(W,{size:11})]})]},`${e.id}:${s.id}`)):t.jsx("p",{className:"floor-tactical__empty",children:"No recent events."})]})]})}export{pt as FloorTacticalHUD};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./index-C8uS5szO.js";function p(o){const i=o?.trim().toLowerCase();if(!i)return"unknown";const n=i.replace(/[\s(].*$/,"").replace(/[_-].*$/,""),l={anthropic:"claude",claude:"claude",claudecode:"claude",sonnet:"claude",opus:"claude",openai:"codex",codex:"codex",gpt:"codex",chatgpt:"codex",oai:"codex",xai:"grok",grok:"grok",kimi:"kimi",moonshot:"kimi",google:"gemini",gemini:"gemini",vertex:"gemini",cursor:"cursor",github:"github",opencode:"opencode",oc:"opencode",amp:"amp",sourcegraph:"amp",pi:"pi",inflection:"pi",omp:"pi","oh-my-pi":"pi",claw:"claw",native:"native",worker:"worker",quad:"quad"};return l[n]??l[i.replace(/[\s(].*$/,"")]??i}const m={claude:"Claude",codex:"Codex",grok:"Grok",kimi:"Kimi",gemini:"Gemini",cursor:"Cursor",github:"GitHub",opencode:"OpenCode",amp:"Amp",pi:"Pi",claw:"Claw",native:"Native",worker:"Worker",quad:"Quad"};function g(o){const i=p(o);return m[i]??(o?.trim()||"Unknown")}const c={fill:{fill:"currentColor"},line:{fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},t={claude:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",gemini:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81",cursor:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",opencode:"M22 24H2V0h20zM17 4.8H7v14.4h10z"},r=o=>e.jsx("path",{d:o,fill:"currentColor"}),k={amp:{viewBox:"0.6 1.4 8.8 8.8",paths:["M2.37694 9.23487L4.34679 7.23716L5.06365 9.95891L6.10505 9.67408L5.06749 5.72214L1.17831 4.6688L0.901367 5.73289L3.5775 6.45984L1.61584 8.45465L2.37694 9.23487Z","M8.05742 6.91898L9.09885 6.63416L8.0613 2.68224L4.17209 1.62891L3.89515 2.693L7.17936 3.58514L8.05742 6.91898Z","M6.56226 8.43797L7.60365 8.15314L6.5661 4.20121L2.67692 3.14787L2.39998 4.21196L5.68416 5.10411L6.56226 8.43797Z"]},grok:{viewBox:"0 0 34 33",paths:["M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436","M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341"]}},C=e.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),j=e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M4.5 3h3.4v7.4L14.7 3h4.5l-7.9 8.5L19.8 21h-4.6l-7.3-8.2V21H4.5Z"}),e.jsx("circle",{cx:"20.2",cy:"3.8",r:"1.8"})]}),v=e.jsxs("g",{...c.line,strokeWidth:2,children:[e.jsx("path",{d:"M6.5 8.5h11"}),e.jsx("path",{d:"M10 8.5 9 17M14.2 8.5 15.2 17"})]}),w=e.jsxs("g",{...c.line,children:[e.jsx("path",{d:"M6.5 8 11 12l-4.5 4"}),e.jsx("path",{d:"M12.5 16.5H18",strokeWidth:1.8})]}),M=e.jsxs("g",{...c.line,strokeWidth:1.8,children:[e.jsx("path",{d:"M12 4.5 18.5 8.2v7.6L12 19.5 5.5 15.8V8.2L12 4.5Z"}),e.jsx("circle",{cx:12,cy:12,r:2.7})]}),y=e.jsxs("g",{...c.fill,children:[e.jsx("rect",{x:5.5,y:5.5,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:13.1,y:5.5,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:5.5,y:13.1,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:13.1,y:13.1,width:5.4,height:5.4,rx:1.3})]}),f=e.jsxs("g",{...c.line,strokeWidth:2,children:[e.jsx("path",{d:"M7.5 6Q9.5 12 8.5 18"}),e.jsx("path",{d:"M12 5.5Q14 12 13 18.5"}),e.jsx("path",{d:"M16.5 6Q18.5 12 17.5 18"})]}),b={claude:r(t.claude),codex:C,kimi:j,gemini:r(t.gemini),cursor:r(t.cursor),github:r(t.github),opencode:r(t.opencode),pi:v,native:w,worker:M,quad:y,claw:f};function G({harness:o,size:i=14,className:n,style:l,title:d}){const a=p(o),s=k[a],x=b[a],h=d===null?void 0:d??g(o);return e.jsx("span",{className:n,style:l,title:h,"aria-hidden":h?void 0:!0,children:e.jsx("svg",{viewBox:s?.viewBox??"0 0 24 24",width:i,height:i,style:{display:"block"},role:"img","aria-label":h,children:s?s.paths.map((u,L)=>e.jsx("path",{d:u,fill:"currentColor"},L)):x??e.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"13",fontWeight:"600",fontFamily:"var(--font-mono)",fill:"currentColor",children:(a[0]??"?").toUpperCase()})})})}export{G as H,g as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as e}from"./index-C8uS5szO.js";import{H as L,h as pe}from"./HarnessMark-Bt47OeHy.js";import{p as me,a as Z}from"./api-CaROe5_H.js";import{b as fe}from"./router-BKiMcYa7.js";import{n as S,t as J,f as O}from"./time-Dhsh_2EG.js";import{u as ge}from"./Provider-5Hotn7NQ.js";import{u as xe}from"./useContentSecondaryNav-CGvMOVGY.js";import{OpsSubnav as be}from"./OpsSubnav-9sURjajO.js";/* empty css */import{R as ve}from"./refresh-cw-Da9DDLk2.js";import{E as Y}from"./external-link-RT4Ph-6-.js";import{c as je}from"./createLucideIcon-DkjnzvcJ.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./SecondaryNav-BkTn5tkq.js";import"./secondaryNavConfig-DAXIFtVd.js";import"./nav-destinations-CyXnw9kh.js";import"./message-square-NmXWtWLR.js";import"./terminal-96JWDYDL.js";import"./compass-DTZdCpv9.js";import"./settings-TJIkkZ0P.js";import"./git-branch-CA3cHKCI.js";import"./scroll-text-DwC8r2g6.js";/* empty css */const D=60*6e4,N=24*D,ke=["product_judgment","large_context_synthesis","adversarial_critique","evidence_inventory","implementation","code_review"],V={fable:j("Fable 5","claude","claude","claude-fable-5","max","Fable","Premium product taste, rapid design iterations, and premise-level critique.","Uses the premium shared Claude allowance; do not spend it on routine mechanical work."),sol:j("GPT-5.6 Sol","codex","codex","gpt-5.6-sol","xhigh",null,"Load-bearing coding, debugging, integration, and technically grounded judgment.","Highest Codex tier; reserve deep turns for work where failure is expensive."),grok:j("Grok 4.6","grok","grok","grok-4.6",null,"Grok","Independent assumption checking, deletion pressure, and adversarial critique.","Do not make it the sole implementation authority; verify conclusions against repository evidence."),kimi:j("Kimi Code","kimi","kimi",null,null,"Kimi","Dense repository and study synthesis through the native Kimi harness.","The harness owns the concrete model and quota telemetry can be stale; probe before large fan-out."),opus:j("Opus 5","claude","claude","claude-opus-5","high","Opus","Long-context synthesis, nuanced architecture, and coherent product reasoning.","Premium shared Claude quota; avoid routine scans and repetitive verification."),glm:j("GLM-5.2","opencode","opencode","opencode-go/glm-5.2",null,"OpenCode","Independent broad-context synthesis through OpenCode.","OpenCode quota is not visible in Scout; use a bounded canary before scaling."),terra:j("GPT-5.6 Terra","codex","codex","gpt-5.6-terra","high",null,"Balanced implementation, correctness review, and technical critique.","Prefer Sol for the hardest integration boundary when its additional spend is justified."),minimax:j("MiniMax M3","minimax","opencode","opencode-go/minimax-m3",null,"OpenCode","Cost-effective structured evidence collection and comparison.","Verify load-bearing conclusions with a stronger reviewer before acceptance."),luna:j("GPT-5.6 Luna","codex","codex","gpt-5.6-luna","medium",null,"Inexpensive source mapping, test enumeration, and mechanical audit work.","Keep it out of sole high-stakes product judgment and final acceptance."),haiku:j("Haiku 4.5","claude","claude","claude-haiku-4-5","low",null,"Fast narrow scans and classification inside the Claude harness.","Lighter reasoning and a smaller context window make broad synthesis a poor fit."),sonnet:j("Sonnet 4.6","claude","claude","claude-sonnet-4-6","high",null,"Strong generalist implementation with a large context window.","Shares Claude's provider allowance and can become a poor choice when that pool is guarded."),deepseek:j("DeepSeek V4 Pro","opencode","opencode","opencode-go/deepseek-v4-pro",null,"OpenCode","Code-centric review through an independent model lineage.","Quota is opaque and findings should not be the sole acceptance authority.")},ee={product_judgment:{label:"Product judgment",objective:"Strategic tradeoffs, UX prioritization, scope shaping, and high-level product decisions.",strategy:"Select models with high nuanced taste, product-level synthesis, and clear communication of architectural tradeoffs.",candidates:[b("fable",100,"Unmatched product taste, rapid design iteration synthesis, and high-fidelity UX direction."),b("sol",87,"Technically grounded product decisions with strong execution realism."),b("grok",82,"Unfiltered perspective on feature bloat and aggressive scope reduction.")]},large_context_synthesis:{label:"Large-context synthesis",objective:"Repository-wide investigations, deep architectural archaeology, and multi-file code synthesis.",strategy:"Select models with expansive effective context windows and high-density information compression.",candidates:[b("kimi",100,"Native long-context retrieval and dense codebase relationship synthesis."),b("opus",91,"Deep structural understanding across complex multi-package repositories."),b("glm",84,"Independent wide-window scanning and structural cross-referencing.")]},adversarial_critique:{label:"Adversarial critique",objective:"Challenging design assumptions, rapid design iteration critique, identifying UX/logic gaps, and applying deletion pressure.",strategy:"Select high-taste and contrarian model lineages that stress-test design iterations and probe corner cases without sycophantic approval.",candidates:[b("fable",100,"High-fidelity design critique, rapid UX/visual iteration stress-testing, and premise challenge."),b("grok",91,"Contrarian perspective, uncompromising edge-case discovery, and aggressive premise challenge."),b("terra",84,"Rigorous technical inspection of code correctness and runtime invariants.")]},evidence_inventory:{label:"Evidence inventory",objective:"Grep and AST inventory, reference tracing, log audit, and structured fact collection.",strategy:"Select fast, cost-effective models with high precision on structured evidence gathering.",candidates:[b("minimax",100,"Fast, cost-effective structured evidence indexing and pattern enumeration."),b("luna",95,"Low-latency source tracing, test inventory, and reference mapping."),b("haiku",87,"Rapid mechanical file scans and categorization.")]},implementation:{label:"Implementation",objective:"Code creation, refactoring, type checking, unit test writing, and bug fixing.",strategy:"Select code-generation champions with high instruction following and strong language typing skills.",candidates:[b("sol",100,"Deep technical accuracy, robust multi-file refactors, and complex logic execution."),b("terra",91,"Reliable structured implementation with strong type-system adherence."),b("sonnet",87,"Strong generalist coding with fast turn times and clear explanations.")]},code_review:{label:"Code review",objective:"Diff analysis, security audit, regression detection, and style conformity.",strategy:"Select models with high sensitivity to subtle bugs, invariant violations, and edge-case behaviors.",candidates:[b("terra",100,"Strict invariant checking, subtle logic flaw detection, and boundary test coverage."),b("opus",96,"High-level architectural consistency and API surface evolution review."),b("deepseek",87,"Independent second-opinion review focused on code-level edge cases.")]}};function $(s){return s.availability==="constrained"||s.availability==="guarded"||s.minimumRemainingPercent!==null&&s.minimumRemainingPercent<=20||s.pacing==="ahead"&&(s.minimumRemainingPercent??100)<=35}function se(s){return s.confidence==="fresh"&&s.minimumRemainingPercent!==null&&!$(s)}function ye(s){return $(s)?s.minimumRemainingPercent!==null&&s.minimumRemainingPercent<=15?`${s.providerLabel} is near capacity (${s.minimumRemainingPercent}% remaining). High risk of quota exhaustion.`:s.pacing==="ahead"?`${s.providerLabel} consumption rate exceeds window pace with limited buffer.`:`${s.providerLabel} quota availability is ${s.availability}. Failover recommended.`:null}function k(s){return[s.providerId,s.harness,s.model,s.effort,s.profile].join("|")}function Ne(s){return[s.profile?`profile ${s.profile}`:s.harness,s.model,s.effort].filter(Boolean).join(" / ")}function Re(s,n="<request>"){const a=s.profile?.trim().toLowerCase()??null,t=a!=="opencode"&&a!=="oc",i=s.profile&&t?["--profile",s.profile]:["--harness",s.harness,...s.model?["--model",s.model]:[]];return s.effort&&i.push("--effort",s.effort),i.push(n),i}function B(s,n="<request>"){return["scout","ask",...Re(s,n)].map(_e).join(" ")}function we(s,n={}){const a=ne(n.now)??Date.now(),t=n.bias??"balanced",i=Me(t),o=new Map(s.providers.map(h=>[h.id,qe(h,a)])),r=n.role?[n.role]:[...ke],c=r.map(h=>{const u=ee[h],d=u.candidates.map(f=>{const g=o.get(f.route.providerId)??ae(f.route.providerId);return{runtime:f,quota:g,score:f.fit+Ae(g,a)*i}}).sort((f,g)=>g.score-f.score||g.runtime.fit-f.runtime.fit),p=d[0],x=$(p.quota),v=d.slice(1);return x&&v.sort((f,g)=>{const q=K(f,p.runtime.route.providerId),T=K(g,p.runtime.route.providerId);return q-T||g.score-f.score||g.runtime.fit-f.runtime.fit}),{role:h,roleLabel:u.label,modelLabel:p.runtime.label,route:p.runtime.route,score:p.score,fit:p.runtime.fit,objective:u.objective,taskRationale:p.runtime.taskRationale,capability:p.runtime.capability,caution:p.runtime.caution,assertion:Le(p.quota),quotaRisk:x,quotaRiskMessage:ye(p.quota),quota:p.quota,alternatives:v.slice(0,2).map(({runtime:f,quota:g,score:q})=>({label:f.label,route:f.route,score:q,fit:f.fit,capability:f.capability,caution:f.caution,taskRationale:f.taskRationale,quotaRisk:$(g),quota:g}))}}),l=Se(r,o,a);return{generatedAt:s.generatedAt,generatedAtLocal:s.generatedAtLocal,evaluatedAt:a,assignments:c,models:l,bias:t}}function Se(s,n,a){const t=new Map;for(const i of s){const o=ee[i];for(const r of o.candidates){const c=k(r.route),l=t.get(c);l?l.roles.push({role:i,label:o.label}):t.set(c,{runtime:r,roles:[{role:i,label:o.label}]})}}return[...t.values()].map(({runtime:i,roles:o})=>{const r=n.get(i.route.providerId)??ae(i.route.providerId);return{modelLabel:i.label,route:i.route,roles:o,strengths:[i.capability],cautions:[i.caution],guidance:Ce(r,a),quotaRisk:$(r),quota:r}})}function qe(s,n){const a=s.windows.filter(h=>!/^video\b/iu.test(h.label)).map(h=>$e(h,n)),t=[...a].sort((h,u)=>h.percentRemaining-u.percentRemaining)[0]??null,i=a.filter(h=>h.paceRatio!==null).sort((h,u)=>u.paceRatio-h.paceRatio)[0]??null,o=a.map(h=>h.confidence),r=o.includes("stale")?"stale":o.includes("fresh")?"fresh":"unknown",c=[...a].filter(h=>h.resetAt!==null&&h.resetAt>n).sort((h,u)=>h.resetAt-u.resetAt)[0]??null,l=t?.percentRemaining??null;return{providerId:s.id,providerLabel:s.label,plan:s.plan,availability:Te(l),pacing:i?.status??"unknown",confidence:r,minimumRemainingPercent:l,bindingWindow:t?.label??null,nextResetAt:c?.resetAt??null,nextResetIn:c?.resetIn??"",windows:a}}function $e(s,n){const a=ne(s.windowMs)??Pe(s.label,s.resetAt),t=a!==null&&s.resetAt!==null?X(Ue(100-(s.resetAt-n)/a*100,0,100)):null,i=t!==null&&t>=1?De(s.usedPercent/t):null,o=i===null?null:X(i*100),r=Ie(s.usedPercent,t,i),c=a===null?N:Math.min(N,Math.max(D,a/4)),l=s.freshness.ageMs===null?"unknown":s.freshness.ageMs>c?"stale":"fresh";return{label:s.label,usedPercent:s.usedPercent,percentRemaining:s.percentRemaining,durationMs:a,elapsedPercent:t,paceRatio:i,projectedUsedPercent:o,status:r,resetAt:s.resetAt,resetIn:s.resetIn,freshness:s.freshness.label,confidence:l}}function j(s,n,a,t,i,o,r,c){return{label:s,route:{providerId:n,harness:a,model:t,effort:i,profile:o},capability:r,caution:c}}function b(s,n,a){return{...V[s],fit:n,taskRationale:a??V[s].capability}}function Ce(s,n){return $(s)?"conserve":s.confidence!=="fresh"?"probe_first":s.availability==="constrained"?"conserve":s.nextResetAt!==null&&s.nextResetAt>n&&s.nextResetAt-n<=N&&s.pacing!=="ahead"&&(s.minimumRemainingPercent??0)>=10?"use_now":s.availability==="guarded"?"conserve":s.pacing==="ahead"?"use_deliberately":s.availability==="abundant"&&s.pacing==="underused"?"use_now":"available"}function Me(s){switch(s){case"capability":return .25;case"quota":return 1.75;case"balanced":return 1}}function Ae(s,n){let a=0;switch(s.availability){case"abundant":a+=10;break;case"available":a+=5;break;case"guarded":a-=5;break;case"constrained":a-=30;break;case"unknown":a-=2;break}return s.pacing==="underused"&&(a+=5),s.pacing==="ahead"&&(a-=8),s.confidence==="stale"&&(a-=8),s.confidence==="unknown"&&(a-=3),s.pacing==="underused"&&s.nextResetAt!==null&&s.nextResetAt>n&&s.nextResetAt-n<=2*N&&(a+=3),a}function Le(s){if(s.minimumRemainingPercent===null)return`${te(s.providerId)} quota telemetry unavailable; use a bounded canary before scaling.`;const n=s.pacing==="on_track"?"usage tracks elapsed time":s.pacing==="underused"?"usage trails elapsed time":s.pacing==="ahead"?"usage exceeds elapsed time":"pace unknown",a=s.nextResetIn?` · next reset ${s.nextResetIn}`:"";return`${Oe(s.minimumRemainingPercent)} minimum remaining · ${n} · telemetry ${s.confidence}${a}.`}function ae(s){return{providerId:s,providerLabel:te(s),plan:null,availability:"unknown",pacing:"unknown",confidence:"unknown",minimumRemainingPercent:null,bindingWindow:null,nextResetAt:null,nextResetIn:"",windows:[]}}function Pe(s,n){const a=s.trim().toLowerCase(),t=a.match(/(?:^|\s)(\d+(?:\.\d+)?)([hd])$/u);if(t){const i=Number(t[1]);return t[2]==="h"?i*D:i*N}if(a==="weekly"||a==="week"||a==="7-day")return 7*N;if(a==="5-hour")return 5*D;if(a==="monthly"||a==="month"){if(n===null)return 30*N;const i=new Date(n),o=new Date(n);o.setUTCMonth(o.getUTCMonth()-1);const r=i.getTime()-o.getTime();return r>0?r:30*N}return null}function Ie(s,n,a){if(n===null||a===null)return"unknown";const t=s-n;return a>1.1&&t>3?"ahead":a<.7&&t<-10?"underused":"on_track"}function Te(s){return s===null?"unknown":s>=60?"abundant":s>=30?"available":s>=15?"guarded":"constrained"}function K(s,n){const a=se(s.quota),t=s.runtime.route.providerId!==n;return a&&t?0:a?1:t?2:3}function _e(s){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(s)?s:`'${s.replaceAll("'",`'"'"'`)}'`}function te(s){return s.split(/[-_\s]+/u).filter(Boolean).map(n=>`${n.charAt(0).toUpperCase()}${n.slice(1)}`).join(" ")||"Unknown"}function Oe(s){return`${Number.isInteger(s)?s.toFixed(0):s.toFixed(1)}%`}function ne(s){return typeof s=="number"&&Number.isFinite(s)?s:null}function X(s){return Math.round(s*10)/10}function De(s){return Math.round(s*100)/100}function Ue(s,n,a){return Math.min(a,Math.max(n,s))}const Ee=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],Fe=je("clipboard-paste",Ee),Ge=3e4,M=[{value:"capability",label:"Capability"},{value:"balanced",label:"Balanced"},{value:"quota",label:"Quota"}],Be={codex:"Codex",claude:"Claude",kimi:"Kimi",minimax:"MiniMax",cursor:"Cursor",native:"Native",worker:"Worker",bridge:"Bridge",http:"HTTP",pi:"Pi",flue:"Flue",github:"GitHub",unknown:"Unknown"},ie=[{id:"claude",description:"Anthropic plan windows captured from Claude Code.",links:[{label:"Usage",href:"https://claude.ai/settings/usage"},{label:"Manage plan",href:"https://claude.ai/settings/billing"}]},{id:"codex",description:"OpenAI plan windows reported by local Codex sessions.",links:[{label:"Usage",href:"https://chatgpt.com/codex/settings/usage"},{label:"Open Codex",href:"https://chatgpt.com/codex"}]},{id:"kimi",description:"Kimi Code subscription windows and membership level.",links:[{label:"Kimi Code",href:"https://www.kimi.com/code"},{label:"Docs",href:"https://www.kimi.com/code/docs/en/"}]},{id:"grok",description:"SuperGrok quota reported by local Grok, with dashboard capture and local activity as fallbacks.",links:[{label:"Open Grok",href:"https://grok.com/"},{label:"Billing",href:"https://grok.com/?_s=billing"},{label:"Help",href:"https://docs.x.ai/grok/faq"}]},{id:"minimax",description:"MiniMax Token Plan 5-hour and weekly allowance.",links:[{label:"Usage",href:"https://platform.minimax.io/console/plan"},{label:"Docs",href:"https://platform.minimax.io/docs/token-plan/intro"}]},{id:"cursor",description:"Cursor membership detected locally, plus usage totals from an exported dashboard capture.",links:[{label:"Usage",href:"https://cursor.com/dashboard/usage"},{label:"Manage plan",href:"https://cursor.com/dashboard/billing"}]}],He={cloudflare:[{label:"Dashboard",href:"https://dash.cloudflare.com/"},{label:"Billing",href:"https://dash.cloudflare.com/?to=/:account/billing"}],vercel:[{label:"Dashboard",href:"https://vercel.com/dashboard"},{label:"Billing",href:"https://vercel.com/account/billing"}],exe:[{label:"VMs",href:"https://exe.dev/"},{label:"Billing",href:"https://exe.dev/user/billing"},{label:"Docs",href:"https://exe.dev/docs/what-is-exe"}]},ze={exe:{category:"Agent compute",description:"Persistent VMs for remote Scout agents and isolated workloads."},cloudflare:{category:"Edge platform",description:"Workers, networking, and edge infrastructure available for deployment."},vercel:{category:"App hosting",description:"Projects, preview environments, and production deployments."}};function Qe({provider:s}){return e.jsx("span",{className:`hs-cloud-mark hs-cloud-mark--${s}`,"aria-hidden":"true",children:s==="exe"?e.jsx("img",{src:"https://exe.dev/apple-touch-icon.png",alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer"}):e.jsx("svg",{viewBox:"0 0 24 24",focusable:"false",children:s==="cloudflare"?e.jsx("path",{d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268Zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"}):e.jsx("path",{d:"m12 1.608 12 20.784H0Z"})})})}function F(s){const n=(s??"").trim().toLowerCase();return n?n.includes("claude")?"claude":n.includes("codex")?"codex":n.includes("cursor")?"cursor":n.includes("kimi")||n.includes("moonshot")?"kimi":n.includes("minimax")?"minimax":n.includes("github")?"github":n.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown":"unknown"}function P(s){return Be[s]??pe(s)}function We(s){switch(s){case"weekly":return"7d";case"req/h":return"1h";default:return s||"quota"}}function I(s){return s.windows&&s.windows.length>0?s.windows:[{label:We(s.unitLabel),fill:s.fill,usedLabel:s.usedLabel,capLabel:s.capLabel,unitLabel:s.unitLabel,resetAt:s.resetAt}]}function Ve(s){return s.capLabel==="100%"&&s.usedLabel.endsWith("%")?s.usedLabel:`${s.usedLabel}/${s.capLabel}`}function re(s){return s>=.9?"err":s>=.75?"warn":"ok"}function Ke(s,n=30){const a=s??[];if(a.length<=n)return a;if(n<=1)return[a[a.length-1]];const t=(a.length-1)/(n-1);return Array.from({length:n},(i,o)=>a[Math.round(o*t)])}function H(s){const n=Math.floor((s-Date.now())/1e3),a=n<0,t=Math.abs(n);let i;if(t>=86400){const o=Math.floor(t/86400),r=Math.floor(t%86400/3600);i=r>0?`${o}d ${r}h`:`${o}d`}else if(t>=3600){const o=Math.floor(t/3600),r=Math.floor(t%3600/60);i=r>0?`${o}h ${r}m`:`${o}h`}else i=`${Math.max(1,Math.floor(t/60))}m`;return a?`stale ${i}`:i}function Xe(s){if(!s)return null;const n=S(s.capturedAt);if(n)return n;if(s.kind!=="quota")return null;const a=I(s).reduce((t,i)=>{const o=S(i.capturedAt);return Math.max(t??0,o??0)||t},null);return a||I(s).flatMap(t=>t.history??[]).reduce((t,i)=>{const o=S(i.capturedAt);return Math.max(t??0,o??0)||t},null)}function Ze({provider:s,onImported:n}){const[a,t]=m.useState(!1),[i,o]=m.useState(""),[r,c]=m.useState(!1),[l,h]=m.useState(null),u=`hs-${s}-dashboard-capture`,d=P(s);if(!a)return e.jsxs("button",{type:"button",className:"hs-dashboard-capture-trigger",onClick:()=>t(!0),children:[e.jsx(Fe,{size:12,"aria-hidden":"true"}),"Import dashboard"]});const p=async x=>{if(x.preventDefault(),!(!i.trim()||r)){c(!0),h(null);try{await Z("/api/service-budgets/dashboard-import",{method:"POST",body:JSON.stringify({provider:s,text:i})}),o(""),h("Usage snapshot imported."),await n()}catch(v){h(v instanceof Error?v.message:String(v))}finally{c(!1)}}};return e.jsxs("form",{className:"hs-dashboard-capture",onSubmit:x=>{p(x)},children:[e.jsxs("label",{htmlFor:u,children:[d," usage snapshot"]}),e.jsxs("p",{children:[s==="cursor"?"Paste the exported Usage CSV or copied usage table.":"Copy the signed-in Usage panel and paste it here."," ","Scout keeps only normalized totals, not this text."]}),e.jsx("textarea",{id:u,value:i,onChange:x=>o(x.target.value),maxLength:128*1024,rows:5,placeholder:s==="cursor"?"Date (UTC),Type,Model,Tokens,Cost…":"Weekly SuperGrok… Limit · 12% used · Resets…","aria-describedby":l?`${u}-message`:void 0}),l?e.jsx("span",{id:`${u}-message`,className:"hs-dashboard-capture-message",role:"status",children:l}):null,e.jsxs("div",{className:"hs-dashboard-capture-actions",children:[e.jsx("button",{type:"button",onClick:()=>{t(!1),h(null)},disabled:r,children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!i.trim()||r,children:r?"Importing…":"Use snapshot"})]})]})}function Je(s){const n=new Map(s.map(a=>[F(a.id),a]));return ie.map(({id:a})=>({id:a,label:P(a),gauge:n.get(a)??null}))}function Ye({points:s}){const n=Ke(s);return n.length===0?e.jsx("span",{className:"hs-history hs-history-empty",children:"live"}):e.jsx("span",{className:"hs-history","aria-label":`${n.length} budget samples`,children:n.map((a,t)=>{const i=Math.max(.06,Math.min(1,a.fill));return e.jsx("span",{className:`hs-history-bar hs-history-bar--${re(a.fill)}`,style:{height:`${Math.round(i*100)}%`},title:`${O(a.capturedAt)||"unknown"} ${a.usedLabel}`},`${a.capturedAt}:${t}`)})})}function es({gauge:s,window:n}){const a=Math.max(0,Math.min(100,Math.round(n.fill*100))),t=100-a,i=re(n.fill),o=Number.isFinite(n.resetAt)?new Date(n.resetAt).toISOString():void 0;return e.jsxs("div",{className:"hs-subscription-window",children:[e.jsxs("div",{className:"hs-subscription-window-head",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"hs-subscription-window-label",children:[n.label," window"]}),e.jsxs("strong",{className:`hs-subscription-usage hs-subscription-usage--${i}`,children:[a,"% used"]})]}),e.jsxs("div",{className:"hs-subscription-remaining",children:[e.jsxs("strong",{children:[t,"%"]}),e.jsx("span",{children:"available"})]})]}),e.jsx("div",{className:"hs-subscription-meter",role:"progressbar","aria-label":`${s.label} ${n.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:e.jsx("span",{className:`hs-subscription-meter-fill hs-subscription-meter-fill--${i}`,style:{width:`${a}%`}})}),e.jsxs("div",{className:"hs-subscription-window-meta",children:[e.jsxs("span",{children:[Ve(n)," ",n.unitLabel==="quota"?"quota":n.unitLabel]}),e.jsxs("span",{children:["resets in ",H(n.resetAt),o?e.jsx("time",{dateTime:o,title:O(n.resetAt)||void 0,children:` · ${O(n.resetAt)||""}`}):null]})]}),e.jsx(Ye,{points:n.history})]})}function ss(){return e.jsxs("div",{className:"hs-subscription-loading","aria-hidden":"true",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--label"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--value"}),e.jsx("span",{className:"hs-loading-meter"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--meta"}),e.jsx("span",{className:"hs-loading-history"})]})}function as(s,n,a){const t=s.flatMap(i=>{if(i.kind!=="quota")return[];const o=I(i).map(r=>{const c=S(r.capturedAt??i.capturedAt),l=Math.round(Math.max(0,Math.min(1,r.fill))*1e3)/10;return{label:r.label,usedPercent:l,percentRemaining:Math.round((100-l)*10)/10,windowMs:r.windowMs??null,resetAt:S(r.resetAt),resetIn:Number.isFinite(r.resetAt)?H(r.resetAt):"",freshness:{ageMs:c?Math.max(0,a-c):null,label:c?J(c)||"now":"unknown"}}});return[{id:F(i.id),label:P(F(i.id)),plan:i.plan??null,windows:o}]});return{generatedAt:n,generatedAtLocal:O(n)||"now",providers:t}}function U(s){switch(s){case"underused":return"usage trails elapsed time";case"on_track":return"usage tracks elapsed time";case"ahead":return"usage exceeds elapsed time";default:return"pace unknown"}}function A(s){return Ne(s)}function z({text:s,label:n="Copy rule"}){const[a,t]=m.useState("idle");m.useEffect(()=>{if(a==="idle")return;const o=window.setTimeout(()=>t("idle"),1800);return()=>window.clearTimeout(o)},[a]);const i=m.useCallback(async()=>{if(typeof navigator>"u"||!navigator.clipboard){t("failed");return}try{await navigator.clipboard.writeText(s),t("copied")}catch{t("failed")}},[s]);return e.jsx("button",{type:"button",className:"hs-advisor-dispatch-copy",onClick:()=>{i()},"aria-live":"polite","aria-atomic":"true",children:a==="copied"?"Copied!":a==="failed"?"Copy failed":n})}function G(s,n){return!!(s.quotaRisk&&n&&!n.quotaRisk&&se(n.quota)&&n.route.providerId!==s.route.providerId)}function oe(s){return s.minimumRemainingPercent===null?"quota unknown":`${s.minimumRemainingPercent}% minimum remaining`}function ts(s){switch(s){case"use_now":return"Use now";case"available":return"Available";case"use_deliberately":return"Use deliberately";case"probe_first":return"Probe first";case"conserve":return"Conserve"}}function le({providerLabel:s,quota:n}){return n.windows.length===0?e.jsxs("div",{className:"hs-advisor-no-quota",children:[e.jsx("strong",{children:"No quota telemetry"}),e.jsx("span",{children:"Use one bounded ask as a canary before scaling this route."})]}):e.jsx("div",{className:"hs-advisor-windows",children:n.windows.map(a=>{const t=Math.max(0,Math.min(100,a.usedPercent)),i=a.elapsedPercent===null?null:Math.max(0,Math.min(100,a.elapsedPercent)),o=i===null?"elapsed time unavailable":`${i}% of the window elapsed`,r=a.projectedUsedPercent===null?"projection unavailable":`${a.projectedUsedPercent}% projected at reset`;return e.jsxs("div",{className:"hs-advisor-window",children:[e.jsxs("div",{className:"hs-advisor-window-head",children:[e.jsx("strong",{children:a.label}),e.jsxs("span",{children:[a.usedPercent,"% used"]}),e.jsx("span",{children:U(a.status)})]}),e.jsxs("div",{className:"hs-advisor-window-meter",role:"progressbar","aria-label":`${s} ${a.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),"aria-valuetext":`${a.usedPercent}% used; ${o}; ${r}; ${U(a.status)}`,children:[e.jsx("span",{className:`hs-advisor-window-fill hs-advisor-window-fill--${a.status}`,style:{width:`${t}%`}}),i!==null?e.jsx("span",{className:"hs-advisor-window-now",style:{left:`${i}%`},title:`${i}% of the window has elapsed`,"aria-hidden":"true"}):null]}),e.jsxs("div",{className:"hs-advisor-window-meta",children:[e.jsxs("span",{children:[a.percentRemaining,"% available"]}),e.jsx("span",{children:r}),e.jsx("span",{children:a.resetIn?`resets in ${a.resetIn}`:"reset unknown"})]})]},a.label)})})}function ce({assignment:s,selected:n,onSelect:a}){return e.jsxs("button",{type:"button",className:"hs-advisor-role","data-selected":n?"true":void 0,onClick:a,"aria-pressed":n,children:[e.jsx("span",{className:"hs-advisor-role-mark",children:e.jsx(L,{harness:s.route.harness,size:25,title:null})}),e.jsxs("span",{className:"hs-advisor-role-copy",children:[e.jsx("strong",{children:s.roleLabel}),e.jsx("span",{children:s.modelLabel}),e.jsxs("small",{children:[s.route.profile?`profile ${s.route.profile}`:s.route.harness," · Fit $",s.fit]})]}),e.jsx("span",{className:`hs-advisor-role-tag ${s.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:s.quotaRisk?`⚠️ ${s.quota.minimumRemainingPercent!==null?`${s.quota.minimumRemainingPercent}%`:"Risk"}`:s.fit>=100?"Primary":`Fit ${s.fit}`})]})}function ns({map:s}){const[n,a]=m.useState("implementation"),t=s.assignments.find(r=>r.role===n)??s.assignments[0];if(!t)return null;const i=B(t.route),o=t.alternatives.find(r=>G(t,r));return e.jsxs("div",{className:"hs-advisor-layout",children:[e.jsx("nav",{className:"hs-advisor-roles","aria-label":"Work roles",children:s.assignments.map(r=>e.jsx(ce,{assignment:r,selected:r.role===t.role,onSelect:()=>a(r.role)},r.role))}),e.jsxs("article",{className:"hs-advisor-detail","aria-live":"polite",children:[e.jsxs("header",{className:"hs-advisor-detail-head",children:[e.jsxs("div",{className:"hs-advisor-model",children:[e.jsx(L,{harness:t.route.harness,size:26,title:null}),e.jsxs("div",{children:[e.jsxs("span",{children:[t.roleLabel," · Role Routing"]}),e.jsx("h4",{children:t.modelLabel}),e.jsx("code",{children:A(t.route)})]})]}),e.jsx("span",{className:`hs-advisor-fit-badge ${t.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:t.quotaRisk?"⚠️ Quota Risk · Failover Active":`Primary Route · Fit ${t.fit}`})]}),t.quotaRisk?e.jsxs("div",{className:"hs-advisor-quota-alert",role:"alert",children:[e.jsxs("div",{className:"hs-advisor-quota-alert-head",children:[e.jsx("span",{className:"hs-advisor-quota-alert-badge",children:"⚠️ Quota Risk"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Quota Exhaustion Imminent · Elevated to Primary Concern"}),e.jsx("p",{children:t.quotaRiskMessage??`${t.quota.providerLabel} quota is near capacity.`})]})]}),e.jsx("div",{className:"hs-advisor-quota-alert-action",children:o?e.jsxs("span",{children:["Failover to ",e.jsx("strong",{children:o.label})," to move work off the constrained provider."]}):e.jsx("span",{children:"No quota-safe cross-provider fallback is currently available; keep the task bounded or wait for reset."})})]}):null,e.jsxs("div",{className:"hs-advisor-task-hero",children:[e.jsxs("div",{className:"hs-advisor-task-hero-head",children:[e.jsx("h5",{children:"Task Objective"}),e.jsx("span",{children:"Cognitive Strategy"})]}),e.jsx("p",{children:t.objective}),e.jsxs("small",{children:[e.jsx("strong",{children:"Execution Rationale:"})," ",t.taskRationale]})]}),e.jsxs("div",{className:"hs-advisor-assessment",children:[e.jsxs("section",{children:[e.jsx("h5",{children:"Strengths for this task"}),e.jsx("p",{children:t.capability})]}),e.jsxs("section",{children:[e.jsx("h5",{children:"Watchouts & Guardrails"}),e.jsx("p",{children:t.caution})]})]}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Dispatch rule"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:i}),e.jsx(z,{text:i,label:"Copy rule"})]})]}),e.jsxs("section",{className:"hs-advisor-ladder",children:[e.jsx("h5",{children:"Failover ladder"}),e.jsxs("div",{className:"hs-advisor-ladder-nodes",children:[e.jsxs("div",{className:`hs-advisor-ladder-node ${t.quotaRisk?"hs-advisor-ladder-node--primary hs-advisor-ladder-node--risk":"hs-advisor-ladder-node--primary"}`,children:[e.jsx("span",{className:"hs-advisor-ladder-badge",children:t.quotaRisk?"⚠️ Primary (Quota Risk)":"Primary"}),e.jsxs("div",{className:"hs-advisor-ladder-body",children:[e.jsx("strong",{children:t.modelLabel}),e.jsx("code",{children:A(t.route)}),e.jsx("small",{children:t.quotaRisk?`Exhaustion risk (${t.quota.minimumRemainingPercent}% remaining) · ${t.taskRationale}`:`Initial execution target · ${t.taskRationale}`})]})]}),t.alternatives.map((r,c)=>{const l=G(t,r);return e.jsxs("div",{className:`hs-advisor-ladder-node ${l?"hs-advisor-ladder-node--fallback-rec":""}`,children:[e.jsx("span",{className:"hs-advisor-ladder-badge",children:l?"⭐️ Quota-safe fallback":c===0?"Secondary":"Tertiary"}),e.jsxs("div",{className:"hs-advisor-ladder-body",children:[e.jsx("strong",{children:r.label}),e.jsx("code",{children:A(r.route)}),e.jsx("small",{children:l?`Moves work off ${t.quota.providerLabel} · ${r.taskRationale}`:r.quotaRisk?`Also quota constrained; use only if operationally necessary · ${r.taskRationale}`:`Fallback if ${t.modelLabel} encounters rate limits or errors · ${r.taskRationale}`})]})]},k(r.route))})]})]}),e.jsxs("section",{className:"hs-advisor-quota-secondary",children:[e.jsxs("div",{className:"hs-advisor-quota-secondary-head",children:[e.jsxs("h5",{children:["Provider Telemetry ",t.quotaRisk?"(Active Constraint)":"(Secondary)"]}),e.jsxs("span",{children:[t.quota.providerLabel,t.quota.plan?` · ${t.quota.plan}`:""]})]}),e.jsxs("div",{className:"hs-advisor-quota-compact-bar",children:[e.jsxs("span",{children:["Allowance: ",e.jsx("strong",{children:oe(t.quota)})]}),e.jsxs("span",{children:["Pacing: ",e.jsx("strong",{children:U(t.quota.pacing)})]}),e.jsxs("span",{children:["Telemetry: ",e.jsx("strong",{children:t.quota.confidence})]}),t.quota.nextResetIn?e.jsxs("span",{children:["Next reset: ",e.jsx("strong",{children:t.quota.nextResetIn})]}):null]}),t.quotaRisk?e.jsx("div",{style:{marginTop:"var(--space-sm)"},children:e.jsx(le,{providerLabel:t.quota.providerLabel,quota:t.quota})}):null]})]})]})}function is({models:s}){const n=s.find(r=>r.modelLabel==="GPT-5.6 Sol")??s[0],[a,t]=m.useState(()=>n?k(n.route):""),i=s.find(r=>k(r.route)===a)??n;if(!i)return null;const o=B(i.route);return e.jsxs("div",{className:"hs-model-guide-layout",children:[e.jsx("nav",{className:"hs-model-guide-list","aria-label":"Model Fleet",children:s.map(r=>{const c=k(r.route);return e.jsxs("button",{type:"button",className:"hs-model-guide-item","data-selected":c===k(i.route)?"true":void 0,"aria-pressed":c===k(i.route),onClick:()=>t(c),children:[e.jsx("span",{className:"hs-model-guide-mark",children:e.jsx(L,{harness:r.route.harness,size:23,title:null})}),e.jsxs("span",{className:"hs-model-guide-item-copy",children:[e.jsx("strong",{children:r.modelLabel}),e.jsxs("span",{children:[r.quota.providerLabel," · ",r.route.profile?`profile ${r.route.profile}`:r.route.harness]})]}),e.jsx("span",{className:`hs-advisor-role-tag ${r.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:r.quotaRisk?"⚠️ Conserve":ts(r.guidance)})]},c)})}),e.jsxs("article",{className:"hs-model-guide-detail","aria-live":"polite",children:[e.jsxs("header",{className:"hs-advisor-detail-head",children:[e.jsxs("div",{className:"hs-advisor-model",children:[e.jsx(L,{harness:i.route.harness,size:25,title:null}),e.jsxs("div",{children:[e.jsxs("span",{children:[i.quota.providerLabel,i.quota.plan?` · ${i.quota.plan}`:""]}),e.jsx("h4",{children:i.modelLabel}),e.jsx("code",{children:A(i.route)})]})]}),e.jsx("span",{className:`hs-advisor-fit-badge ${i.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:i.quotaRisk?"⚠️ Quota Risk · Conserve":i.roles.length>0?`${i.roles.length} Assigned Roles`:"Model Fleet"})]}),i.quotaRisk?e.jsx("div",{className:"hs-advisor-quota-alert",role:"alert",children:e.jsxs("div",{className:"hs-advisor-quota-alert-head",children:[e.jsx("span",{className:"hs-advisor-quota-alert-badge",children:"⚠️ Quota Risk"}),e.jsxs("div",{children:[e.jsx("strong",{children:"High Quota Depletion · Conserve Model"}),e.jsxs("p",{children:[i.quota.providerLabel," allowance is near capacity (",i.quota.minimumRemainingPercent,"% remaining). Conserve this model for essential high-fit tasks."]})]})]})}):null,e.jsxs("div",{className:"hs-model-guide-roles",children:[e.jsx("strong",{children:"Assigned task roles"}),e.jsx("div",{className:"hs-model-guide-role-chips",children:i.roles.map(r=>e.jsx("span",{className:"hs-model-guide-role-chip",children:r.label},r.role))})]}),e.jsxs("div",{className:"hs-advisor-assessment",children:[e.jsxs("section",{children:[e.jsx("h5",{children:"Strengths & Cognitive Profile"}),e.jsx("p",{children:i.strengths.join(" ")})]}),e.jsxs("section",{children:[e.jsx("h5",{children:"Watchouts & Guardrails"}),e.jsx("p",{children:i.cautions.join(" ")})]})]}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Direct dispatch"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:o}),e.jsx(z,{text:o,label:"Copy command"})]})]}),e.jsxs("section",{className:"hs-advisor-quota-secondary",children:[e.jsxs("div",{className:"hs-advisor-quota-secondary-head",children:[e.jsxs("h5",{children:["Provider Telemetry ",i.quotaRisk?"(Active Constraint)":"(Secondary)"]}),e.jsxs("span",{children:[i.quota.providerLabel,i.quota.plan?` · ${i.quota.plan}`:""]})]}),e.jsxs("div",{className:"hs-advisor-quota-compact-bar",children:[e.jsxs("span",{children:["Allowance: ",e.jsx("strong",{children:oe(i.quota)})]}),e.jsxs("span",{children:["Pacing: ",e.jsx("strong",{children:U(i.quota.pacing)})]}),e.jsxs("span",{children:["Telemetry: ",e.jsx("strong",{children:i.quota.confidence})]}),i.quota.nextResetIn?e.jsxs("span",{children:["Next reset: ",e.jsx("strong",{children:i.quota.nextResetIn})]}):null]}),i.quotaRisk?e.jsx("div",{style:{marginTop:"var(--space-sm)"},children:e.jsx(le,{providerLabel:i.quota.providerLabel,quota:i.quota})}):null]})]})]})}function rs({assignments:s}){const[n,a]=m.useState("implementation"),[t,i]=m.useState({}),o=s.find(d=>d.role===n)??s[0];if(!o)return null;const r=[{label:o.modelLabel,route:o.route,capability:o.capability,taskRationale:o.taskRationale,quota:o.quota,quotaRisk:o.quotaRisk},...o.alternatives.map(d=>({label:d.label,route:d.route,capability:d.capability,taskRationale:d.taskRationale,quota:d.quota,quotaRisk:d.quotaRisk}))],c=t[o.role],l=c?c.flatMap(d=>{const p=r.find(x=>k(x.route)===d);return p?[p]:[]}):r,h=d=>{const p=l.map(x=>k(x.route));i(x=>({...x,[o.role]:[d,...p.filter(v=>v!==d)]}))},u=B(l[0].route);return e.jsxs("div",{className:"hs-cascade-layout",children:[e.jsx("nav",{className:"hs-advisor-roles","aria-label":"Cascade roles",children:s.map(d=>e.jsx(ce,{assignment:d,selected:d.role===o.role,onSelect:()=>a(d.role)},d.role))}),e.jsxs("article",{className:"hs-cascade-editor",children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("span",{children:[o.roleLabel," · Failover Hierarchy"]}),e.jsx("h4",{children:"Task Escalation Sequence"}),e.jsx("p",{children:"Hierarchical fallback sequence when models encounter rate limits, timeouts, or task complexity thresholds."})]}),c?e.jsx("button",{type:"button",onClick:()=>i(d=>{const p={...d};return delete p[o.role],p}),children:"Reset suggested order"}):e.jsx("span",{children:"Default policy"})]}),e.jsx("ol",{className:"hs-cascade-workflow",children:l.map((d,p)=>{const x=k(d.route),v=p>0&&G(l[0],d),f=p===0?"Primary Route":p===1?"Secondary Fallback":"Tertiary Fallback",g=p===0?d.quotaRisk?`Initial target (⚠️ Quota Risk: ${d.quota.minimumRemainingPercent}% remaining) · ${d.taskRationale}`:`Initial execution target · ${d.taskRationale}`:p===1?v?`⭐️ Quota-safe route off ${l[0].quota.providerLabel} · ${d.taskRationale}`:`Triggered if primary encounters rate limits, errors, or complexity threshold · ${d.taskRationale}`:`Emergency baseline fallback · ${d.taskRationale}`;return e.jsxs("li",{className:"hs-cascade-node",children:[e.jsx("span",{className:"hs-cascade-node-index",children:p+1}),e.jsxs("div",{className:"hs-cascade-node-main",children:[e.jsx("span",{children:f}),e.jsx("strong",{children:d.label}),e.jsx("code",{children:A(d.route)}),e.jsx("p",{children:d.capability}),e.jsx("small",{children:g})]}),e.jsxs("div",{className:"hs-cascade-node-side",children:[e.jsx("em",{className:d.quotaRisk?"hs-advisor-tone--warn":"",children:d.quota.minimumRemainingPercent===null?"quota unknown":`${d.quota.minimumRemainingPercent}% quota remaining`}),p>0?e.jsx("button",{type:"button",onClick:()=>h(x),children:"Make primary"}):null]})]},`${o.role}:${x}`)})}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Primary dispatch command"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:u}),e.jsx(z,{text:u,label:"Copy primary command"})]})]})]})]})}function os({map:s,loading:n,bias:a,onBiasChange:t}){const[i,o]=m.useState("tasks"),r={tasks:"Task-first model routing: Map each role to the optimal cognitive profile and failover ladder.",models:"Model fleet inventory: Inspect cognitive strengths, guardrails, and assigned roles across all models.",cascades:"Failover & escalation rules: Review and customize the task escalation sequence for each role."};return e.jsxs("section",{className:"hs-advisor","aria-labelledby":"hs-orchestrator-map-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-advisor-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-orchestrator-map-title",children:"Orchestrator map"}),e.jsx("p",{children:r[i]})]}),e.jsxs("div",{className:"hs-advisor-head-tools",children:[e.jsx("span",{className:"hs-section-meta",children:n?"refreshing inputs":"advisory · no dispatch"}),e.jsxs("label",{className:"hs-routing-bias",children:[e.jsx("span",{children:"Routing bias"}),e.jsx("input",{type:"range",min:0,max:M.length-1,step:1,value:M.findIndex(c=>c.value===a),"aria-valuetext":M.find(c=>c.value===a)?.label,onChange:c=>{const l=M[Number(c.target.value)];l&&t(l.value)}}),e.jsx("small",{"aria-hidden":"true",children:M.map(c=>e.jsx("i",{"data-active":c.value===a?"true":void 0,children:c.label},c.value))})]})]})]}),e.jsx("div",{className:"hs-routing-angles",role:"group","aria-label":"Orchestrator map angle",children:[["tasks","Task map"],["models","Model fleet"],["cascades","Cascades"]].map(([c,l])=>e.jsx("button",{type:"button","aria-pressed":i===c,onClick:()=>o(c),children:l},c))}),i==="tasks"?e.jsx(ns,{map:s}):null,i==="models"?e.jsx(is,{models:s.models}):null,i==="cascades"?e.jsx(rs,{assignments:s.assignments}):null]})}function ls({rows:s,loading:n,onImported:a}){const t=ie.map(l=>({provider:l,row:s.find(h=>h.id===l.id)??null})),i=t.filter(({row:l})=>l?.gauge).length,o=t.filter(({row:l})=>l?.gauge?.kind==="quota").length,r=t.filter(({row:l})=>l?.gauge?.kind==="quota"&&l.gauge.plan||l?.gauge?.kind==="status").length,c=t.flatMap(({row:l})=>l?.gauge?.kind==="quota"?I(l.gauge):[]).map(l=>l.resetAt).filter(l=>l>Date.now()).sort((l,h)=>l-h)[0];return e.jsxs("section",{className:"hs-subscriptions","aria-labelledby":"hs-subscriptions-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-subscriptions-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-subscriptions-title",children:"Subscriptions"}),e.jsx("p",{children:"Plans, remaining allowance, reset windows, and the fastest path to each provider dashboard."})]}),e.jsxs("div",{className:"hs-subscription-summary","aria-label":"Subscription feed summary",children:[e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":i})," detected"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":o})," usage feeds"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":r})," plans named"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":c?H(c):"-"})," next reset"]})]})]}),e.jsx("div",{className:"hs-subscription-grid",children:t.map(({provider:l,row:h})=>{const u=h?.gauge??null,d=n&&!u,p=d?"loading":u?"connected":"missing",x=u?.kind==="quota"?u.plan:u?.kind==="status"?u.statusLabel:null,v=Xe(u),f=u?.kind==="quota"?"Usage connected":u?.kind==="status"?u.detailLabel||"Subscription detected":d?"Checking":"Not detected";return e.jsxs("article",{className:`hs-subscription-card hs-subscription-card--${p}`,children:[e.jsxs("header",{className:"hs-subscription-card-head",children:[e.jsxs("div",{className:"hs-subscription-provider",children:[e.jsx(L,{harness:l.id,size:18,title:null,className:"hs-subscription-mark"}),e.jsxs("div",{children:[e.jsx("h4",{children:P(l.id)}),e.jsx("span",{children:d?"Checking local plan…":x||"Plan not reported"})]})]}),e.jsx("span",{className:`hs-subscription-state hs-subscription-state--${p}`,children:f})]}),e.jsx("p",{className:"hs-subscription-description",children:l.description}),d?e.jsx(ss,{}):u?.kind==="quota"?e.jsx("div",{className:"hs-subscription-windows",children:I(u).map(g=>e.jsx(es,{gauge:u,window:g},`${l.id}:${g.label}`))}):u?.kind==="status"?e.jsxs("div",{className:"hs-subscription-status-detail",children:[e.jsx("strong",{children:u.statusLabel}),e.jsx("span",{children:u.detailLabel||"Subscription detected locally. Open the provider dashboard for live usage."})]}):e.jsxs("div",{className:"hs-subscription-missing",children:[e.jsx("strong",{children:"No local subscription feed yet"}),e.jsx("span",{children:"Open the provider locally, then refresh Scout."})]}),l.id==="cursor"||l.id==="grok"&&u?.kind!=="quota"?e.jsx(Ze,{provider:l.id,onImported:a}):null,e.jsxs("footer",{className:"hs-subscription-footer",children:[e.jsxs("span",{children:[d?"checking local feed":v?`updated ${J(v)||"now"}`:u?"detected locally":"waiting for provider data",u?.source?` · ${u.source}`:""]}),e.jsx("nav",{"aria-label":`${P(l.id)} quick links`,children:l.links.map(g=>e.jsxs("a",{href:g.href,target:"_blank",rel:"noreferrer",children:[g.label,e.jsx(Y,{size:11,"aria-hidden":"true"})]},g.href))})]})]},l.id)})})]})}function cs({accounts:s,loading:n}){return s.length===0&&!n?null:e.jsxs("section",{className:"hs-cloud-accounts","aria-labelledby":"hs-cloud-accounts-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-cloud-accounts-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-cloud-accounts-title",children:"Cloud accounts"}),e.jsx("p",{children:"Infrastructure available to Scout for deployment and agent compute."})]}),e.jsx("span",{className:"hs-section-meta",children:n?"checking accounts":`${s.length} connected`})]}),e.jsxs("div",{className:"hs-cloud-grid",children:[n&&s.length===0?Array.from({length:3},(a,t)=>e.jsxs("article",{className:"hs-cloud-card hs-cloud-card--loading","aria-hidden":"true",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsx("span",{className:"hs-loading-mark"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-title"})]}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-copy"}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-meta"}),e.jsx("span",{className:"hs-loading-actions"})]})]},t)):null,s.map(a=>{const t=ze[a.id];return e.jsxs("article",{className:"hs-cloud-card",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsxs("div",{className:"hs-cloud-identity",children:[e.jsx(Qe,{provider:a.id}),e.jsxs("div",{children:[e.jsx("span",{className:"hs-cloud-category",children:t.category}),e.jsx("h4",{children:a.label})]})]}),e.jsx("span",{className:"hs-subscription-state hs-subscription-state--connected",children:a.statusLabel})]}),e.jsx("p",{className:"hs-cloud-description",children:t.description}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsxs("span",{className:"hs-cloud-connection",children:[e.jsx("span",{className:"hs-cloud-dot","aria-hidden":"true"}),a.detailLabel]}),e.jsx("nav",{"aria-label":`${a.label} quick links`,children:He[a.id].map(i=>e.jsxs("a",{href:i.href,target:"_blank",rel:"noreferrer",children:[i.label,e.jsx(Y,{size:11,"aria-hidden":"true"})]},i.href))})]})]},a.id)})]})]})}function pa({navigate:s}){const{route:n}=ge(),a=fe(n),[t]=m.useState(()=>me("/api/service-budgets",Ge)),[i,o]=m.useState(t?.gauges??[]),[r,c]=m.useState(t?.cloudAccounts??[]),[l,h]=m.useState("budget"),[u,d]=m.useState(()=>S(t?.generatedAt)??Date.now()),[p,x]=m.useState("balanced"),[v,f]=m.useState(t===null),[g,q]=m.useState(!1),[T,Q]=m.useState(null),_=m.useRef(0),W=m.useRef(t!==null),R=m.useCallback(async(y=!1,C=!1)=>{const E=++_.current;C&&!W.current&&f(!0),q(!0),Q(null);try{const w=await Z(`/api/service-budgets${y?"?refresh=1":""}`);if(E!==_.current)return;W.current=!0,o(w.gauges??[]),d(S(w.generatedAt)??Date.now()),c(w.cloudAccounts??[])}catch(w){E===_.current&&Q(w instanceof Error?w.message:String(w))}finally{E===_.current&&(f(!1),q(!1))}},[]);m.useEffect(()=>{let y=!1,C;return R(!1,!0).then(()=>{y||(C=window.setTimeout(()=>{R(!0)},600))}),()=>{y=!0,C!==void 0&&window.clearTimeout(C)}},[R]),m.useEffect(()=>{const y=window.setInterval(()=>{R(!1)},3e4);return()=>window.clearInterval(y)},[R]);const de=m.useMemo(()=>Je(i),[i]),ue=m.useMemo(()=>{const y=Date.now();return we(as(i,u,y),{now:y,bias:p})},[u,p,i]),he=xe();return e.jsxs("div",{className:"s-ops",children:[he?e.jsx("div",{className:"s-ops-header",children:e.jsx(be,{activeRoute:{view:"harnesses",...a?{machineId:a}:{}},navigate:s})}):null,e.jsx("div",{className:"s-ops-body hs-body",children:e.jsxs("div",{className:"hs-page",children:[e.jsxs("header",{className:"hs-page-head",children:[e.jsxs("div",{className:"hs-title-group",children:[e.jsx("span",{className:"hs-kicker",children:"ops / provider central"}),e.jsx("h2",{children:"Agent Providers"}),e.jsx("p",{children:l==="budget"?"See what you pay for, how much remains, and where to use it.":"Map each kind of work to a model and provider route using live quota posture."})]}),e.jsxs("div",{className:"hs-page-actions",children:[e.jsxs("div",{className:"hs-view-switch",role:"group","aria-label":"Provider view",children:[e.jsx("button",{type:"button","aria-pressed":l==="budget",onClick:()=>h("budget"),children:"Budget"}),e.jsx("button",{type:"button","aria-pressed":l==="routing",onClick:()=>h("routing"),children:"Routing"})]}),e.jsxs("button",{type:"button",className:"hs-refresh",disabled:g,onClick:()=>{R(!0)},children:[e.jsx(ve,{size:14,className:g?"hs-refresh-icon-spinning":"","aria-hidden":"true"}),e.jsx("span",{children:g?"Refreshing":"Refresh"})]})]})]}),T&&e.jsxs("div",{className:"hs-error",role:"status","aria-live":"polite",children:["refresh: ",T]}),l==="budget"?e.jsxs("div",{id:"hs-budget-view",className:"hs-provider-view",children:[e.jsx(ls,{rows:de,loading:v,onImported:()=>R(!1)}),e.jsx(cs,{accounts:r,loading:v})]}):e.jsx("div",{id:"hs-routing-view",className:"hs-provider-view",children:e.jsx(os,{map:ue,loading:v,bias:p,onBiasChange:x})})]})})]})}export{pa as HarnessesScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,j as e}from"./index-C8uS5szO.js";/* empty css */import{a as _}from"./api-CaROe5_H.js";import{d as Pe}from"./time-Dhsh_2EG.js";import{u as We}from"./Provider-5Hotn7NQ.js";import{v as $e,x as Se,y as Oe,z as _e,A as Ue,B as Ne,K as k,C as ze,D as Fe,E as Be,G as Ge,H as Je,I as be,J as we,L as Xe,M as Qe,N as Ve,O as Ye,P as Ze,Q as es}from"./router-BKiMcYa7.js";import{S as ss}from"./search-C4VlW_0l.js";import{X as ts}from"./x-DI1ktCYb.js";import{L as ve}from"./loader-circle-DurUYl7E.js";import{c as ns}from"./createLucideIcon-DkjnzvcJ.js";import{S as as}from"./sparkles-BbOFw3d0.js";import{C as is}from"./chevron-down-B5eMsn5c.js";import{C as rs}from"./clock-DFcRbtrl.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";const ls=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],os=ns("funnel",ls);function cs(t){return!!t.query.trim()&&t.hasIndex&&t.filterKey!==t.settledFilterKey&&t.filterKey!==t.failedFilterKey}const us=5*6e4;function y(t){return $e(t).toString()}let ae={status:null,results:[],lastFilterKey:"",facets:null,indexedAt:null};function Ce(){return ae}function I(t){ae={...ae,...t}}const ds=220;function N(t){return new Intl.NumberFormat("en-US").format(t||0)}function hs({text:t,query:a}){return e.jsx(e.Fragment,{children:Ze(t,a).map((c,u)=>c.match?e.jsx("mark",{children:c.text},u):e.jsx("span",{children:c.text},u))})}function ms(t,a){t.target===t.currentTarget&&(t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),a()))}async function ps(){return _("/api/knowledge/status")}async function fs(t){const a=new URLSearchParams;for(const c of t)a.append("key",c);return a.set("limit","200"),_(`/api/knowledge/search-primitives?${a.toString()}`)}async function ne(t,a){const c=new URLSearchParams({q:t,limit:String(k.hitLimit)});if(a.sourceKinds.length>0)for(const m of a.sourceKinds)c.append("sourceKind",m);for(const m of a.harness)c.append("harness",m);for(const m of a.project)c.append("project",m);const u=Ye(a.timeWindow);return u!=null&&c.set("updatedAfterMs",String(u)),_(`/api/knowledge/search?${c.toString()}`)}async function Ke(t=!1){return _("/api/knowledge/sessions/index",{method:"POST",body:JSON.stringify({days:k.days,limit:k.sessionLimit,force:t})})}const ks=Be;function R({active:t,onClick:a,count:c,label:u,ariaLabel:m}){return e.jsxs("button",{type:"button",className:`ks-chip${t?" ks-chip--active":""}`,onClick:a,"aria-pressed":t,"aria-label":m??u,children:[e.jsx("span",{className:"ks-chip-label",children:u}),typeof c=="number"?e.jsx("span",{className:"ks-chip-count","aria-hidden":"true",children:N(c)}):null]})}function qe(t){return t&&t.split(/[\s_-]+/u).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function Ee(t,a,c=6){return t?t.filter(u=>u.key===a&&u.value.length>0).sort((u,m)=>m.count-u.count||u.value.localeCompare(m.value)).slice(0,c):[]}function Ae(t){return t.sourceKinds.length>0||t.harness.length>0||t.project.length>0||t.timeWindow!=="all"}function xs(t){const a=[];return t.sourceKinds.length>0&&a.push(t.sourceKinds.map(c=>Fe[c]??c).join(" + ")),t.harness.length>0&&a.push(t.harness.map(qe).join(" + ")),t.project.length>0&&a.push(t.project.join(" + ")),t.timeWindow!=="all"&&a.push(es(t.timeWindow)),a.length>0?`Filters: ${a.join(" · ")}`:""}function ct({navigate:t,mode:a,hitId:c,routeFilters:u}){const{selectedKnowledgeHit:m,inspectKnowledgeHit:b,clearKnowledgeHit:E}=We(),D=r.useMemo(()=>u||(typeof window>"u"?Se():Oe(window.location.search)),[u]),[g]=r.useState(()=>Ce()),[q,H]=r.useState(g.status),[ie,Le]=r.useState(g.facets),[i,U]=r.useState(D),[A,re]=r.useState(()=>g.lastFilterKey&&g.lastFilterKey===y(D)?g.results:[]),[z,B]=r.useState(!1),[le,oe]=r.useState(!1),[Te,ce]=r.useState(()=>g.lastFilterKey===y(D)?y(D):null),[G,M]=r.useState(null),J=r.useRef(0),[L,P]=r.useState(!1),[X,w]=r.useState(null),[Ie,W]=r.useState(g.status!==null),[ue,de]=r.useState(g.facets!==null),v=r.useRef(i);v.current=i;const f=(q?.chunks??0)>0,$=q?.activeJobs[0]??null,C=r.useMemo(()=>_e(A),[A]),he=L||!!$,K=i.query.trim(),Q=y(i),me=cs({query:K,hasIndex:f,filterKey:Q,settledFilterKey:Te,failedFilterKey:G}),V=!!K&&(me||z),Y=Ue(i);r.useEffect(()=>{u&&U(s=>Ne(s,u)?s:u)},[u]);const x=r.useMemo(()=>{const s=[];for(const n of C)s.push(...n.moments);return s},[C]),F=r.useCallback((s,n)=>{const l=y(s);if(l!==y(v.current))return;re(n.hits),ce(l),M(null),H(n.status),I({results:n.hits,status:n.status,lastFilterKey:y(s)});const o=(c?n.hits.find(d=>d.id===c):void 0)??n.hits[0];o?b(o,s.query,s):E()},[c,b,E]),Z=r.useCallback(async s=>{const n=++J.current,l=y(s),h=()=>n===J.current&&l===y(v.current),o=s.query.trim();if(!o){re([]),ce(l),M(null),B(!1),E();return}B(!0),M(null);try{w(null);const d=await ne(o,s);h()&&F(s,d)}catch(d){h()&&(M(l),w(d instanceof Error?d.message:String(d)))}finally{n===J.current&&B(!1)}},[F,E]),pe=r.useCallback(async(s=!1)=>{P(!0);try{w(null);const n=await Ke(s);H(n.status),W(!0),I({status:n.status,indexedAt:Date.now()});const l=v.current;n.status.chunks>0&&l.query.trim()&&F(l,await ne(l.query.trim(),l))}catch(n){w(n instanceof Error?n.message:String(n))}finally{P(!1)}},[F]);r.useEffect(()=>{let s=!1;return(async()=>{let n=null;try{const o=await ps();if(s)return;n=o,H(o),W(!0),I({status:o}),w(null)}catch{}if(s)return;const{indexedAt:l}=Ce();if(!(l!==null&&Date.now()-l<us&&(n?.chunks??0)>0)){P(!0);try{w(null);const o=await Ke(!1);if(s)return;H(o.status),W(!0),I({status:o.status,indexedAt:Date.now()});const d=v.current;o.status.chunks>0&&d.query.trim()&&F(d,await ne(d.query.trim(),d))}catch(o){s||(w(o instanceof Error?o.message:String(o)),W(!0))}finally{s||P(!1)}}})(),()=>{s=!0}},[F]),r.useEffect(()=>{if(!f||ue)return;let s=!1;return(async()=>{try{const n=await fs(["harness","project","sourceKind"]);s||(Le(n),de(!0),I({facets:n}))}catch{s||de(!0)}})(),()=>{s=!0}},[f,ue]),r.useEffect(()=>{if(!V){oe(!1);return}const s=window.setTimeout(()=>oe(!0),ds);return()=>window.clearTimeout(s)},[V]),r.useEffect(()=>{if(!f)return;const s=window.setTimeout(()=>{Z(i)},k.debounceMs);return()=>window.clearTimeout(s)},[i,f,Z]);const Re=s=>{if(s.preventDefault(),!f&&!L){pe(!1);return}Z(i)},S=r.useCallback(s=>{U(n=>{const l={...n,...s};return Ne(n,l)?n:(t({view:"search",...a?{mode:a}:{},filters:l},{replace:!0}),l)})},[a,t]),T=r.useCallback(()=>{const s=Se();U(s),t({view:"search",...a?{mode:a}:{},filters:s},{replace:!0})},[a,t]),De=r.useCallback(()=>{x[0]&&b(x[0],v.current.query)},[x,b]);r.useEffect(()=>{function s(n){const l=n.target,h=l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable);if(n.key==="/"&&!h){n.preventDefault();const o=document.querySelector(".ks-search-input");o?.focus(),o?.select()}else if(n.key==="Escape"&&!h)x.length>0?E():T();else if(!h&&(n.key==="j"||n.key==="k")){if(x.length===0)return;n.preventDefault();const o=m?x.findIndex(ee=>ee.id===m.id):-1,d=n.key==="j"?Math.min(x.length-1,o+1):Math.max(0,o-1),O=x[d];O&&b(O,v.current.query)}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[x,b,E,m,T]);const He=q?Pe(q.generatedAt)||"just now":"—",Me=he?$?`Indexing ${N($.progress.indexed??0)} of ${N($.progress.discovered??0)}`:f?`Refreshing last ${k.days} days in the background`:`Building last ${k.days} days of sessions`:f?`${N(q?.chunks??0)} moments · last ${k.days} days · updated ${He}`:Ie?"No index yet":"Loading index",fe=Ee(ie?.facets,"harness"),ke=Ee(ie?.facets,"project");return e.jsxs("main",{className:"ks-page",children:[e.jsxs("div",{className:"ks-shell",children:[e.jsx("header",{className:"ks-header",children:e.jsxs("div",{className:"ks-header-titles",children:[e.jsx("span",{className:"ks-eyebrow",children:"Search"}),e.jsx("h1",{children:"Find anything you ran, opened, or decided"}),e.jsxs("p",{children:["Search across sessions, skills, MCP tools, codebase, and context packs from the last ",k.days," days."]})]})}),e.jsxs("form",{className:"ks-search-form",onSubmit:Re,role:"search",children:[e.jsx(ss,{size:17,strokeWidth:1.75,"aria-hidden":"true"}),e.jsx("input",{value:i.query,onChange:s=>S({query:s.target.value}),placeholder:"Search topics, files, decisions, agents…",className:"ks-search-input",spellCheck:!1,autoFocus:!0,"aria-label":"Search OpenScout knowledge"}),i.query?e.jsx("button",{type:"button",className:"ks-search-clear",onClick:()=>S({query:""}),"aria-label":"Clear search",children:e.jsx(ts,{size:14,"aria-hidden":"true"})}):e.jsx("span",{className:"ks-search-hint","aria-hidden":"true",children:"/"}),le?e.jsx(ve,{size:15,className:"ks-spin","aria-hidden":"true"}):null]}),e.jsxs("section",{className:"ks-filterbar","aria-label":"Search filters",children:[e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(os,{size:12,"aria-hidden":"true"}),"Source"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Source kind filters",children:ze.map(s=>e.jsx(R,{active:i.sourceKinds.includes(s),onClick:()=>S({sourceKinds:i.sourceKinds.includes(s)?i.sourceKinds.filter(n=>n!==s):[...i.sourceKinds,s]}),label:Fe[s]??s},s))})]}),fe.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(as,{size:12,"aria-hidden":"true"}),"Agent"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Harness filters",children:fe.map(s=>e.jsx(R,{active:i.harness.includes(s.value),onClick:()=>S({harness:i.harness.includes(s.value)?i.harness.filter(n=>n!==s.value):[...i.harness,s.value]}),label:qe(s.value),count:s.count},`harness:${s.value}`))})]}):null,ke.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(is,{size:12,"aria-hidden":"true"}),"Project"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Project filters",children:ke.map(s=>e.jsx(R,{active:i.project.includes(s.value),onClick:()=>S({project:i.project.includes(s.value)?i.project.filter(n=>n!==s.value):[...i.project,s.value]}),label:s.value,count:s.count},`project:${s.value}`))})]}):null,e.jsxs("div",{className:"ks-filterbar-row ks-filterbar-row--inline",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(rs,{size:12,"aria-hidden":"true"}),"Time"]}),e.jsxs("div",{className:"ks-chip-row",role:"group","aria-label":"Time window filter",children:[e.jsx(R,{active:i.timeWindow==="all",onClick:()=>S({timeWindow:"all"}),label:"Any time"}),ks.map(s=>e.jsx(R,{active:i.timeWindow===s.value,onClick:()=>S({timeWindow:s.value}),label:s.label},s.value))]}),Ae(i)?e.jsx("button",{type:"button",className:"ks-clear-all",onClick:T,children:"Clear filters"}):null]})]}),X?e.jsx("section",{className:"ks-error",role:"alert",children:X}):null,!f&&!X?e.jsxs("div",{className:"ks-empty-state",children:[e.jsx("strong",{children:L?"Preparing your session index":"Preparing search"}),e.jsxs("span",{children:["First load builds the last ",k.days," days"," ","(up to ",N(k.sessionLimit)," sessions). You can keep this page open — results appear as soon as the index is ready."]})]}):null,f?e.jsxs("div",{className:"ks-hit-list",role:"listbox","aria-label":"Search results",children:[e.jsxs("div",{className:"ks-hit-list-head","aria-live":"polite",children:[e.jsx("span",{children:G===Q?"Search failed":V?"Searching…":K?`${N(C.length)} session${C.length===1?"":"s"}`:"Ready"}),K&&A.length>0?e.jsxs("span",{className:"ks-hit-list-meta",children:[N(A.length)," moment",A.length===1?"":"s",Y?e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"ks-text-action",onClick:T,children:"Clear filters"})]}):null]}):null]}),le&&C.length===0?e.jsx("div",{className:"ks-skeleton","aria-hidden":"true",children:[0,1,2].map(s=>e.jsxs("section",{className:"ks-skeleton-session",children:[e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--meta"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--goal"}),e.jsxs("div",{className:"ks-skeleton-moments",children:[e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--title"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--snippet"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--snippet-short"})]})]},s))}):null,K&&C.length===0&&!me&&!z&&G!==Q?e.jsxs("div",{className:"ks-empty-hit",children:[e.jsxs("strong",{children:["No matches for “",K,"”"]}),e.jsxs("span",{children:["Try a project name, file path, or topic from recent work",Y?", or clear one of the filters above.":"."]}),e.jsxs("div",{className:"ks-empty-hit-actions",children:[e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>S({query:""}),children:"Clear query"}),Y?e.jsx("button",{type:"button",className:"ks-text-action",onClick:T,children:"Clear all filters"}):null]})]}):null,K?null:e.jsxs("div",{className:"ks-empty-hit ks-empty-hit--quiet",children:[e.jsx("strong",{children:"Start with a query"}),e.jsxs("span",{children:["Type a topic, file path, agent, or session hint. Use"," ",e.jsx("kbd",{children:"/"})," to focus this field, ",e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," to walk results, ",e.jsx("kbd",{children:"↵"})," to select, ",e.jsx("kbd",{children:"⌘↵"})," to open the session."]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:De,disabled:A.length===0,children:"Pick the first result automatically"})]}),e.jsx("div",{className:"ks-hit-list-body","aria-busy":z,children:C.map((s,n)=>{const l=s.best,h=Ge(l),o=Je(l),d=be(we(l)),O=()=>{d&&t({view:"sessions",sessionId:d})},ee=s.moments.some(j=>m?.id===j.id);return e.jsxs("section",{className:`ks-session${ee?" ks-session--selected":""}`,"aria-label":`Session ${n+1}`,children:[e.jsxs("header",{className:"ks-session-head",children:[e.jsxs("div",{className:"ks-session-topline",children:[e.jsxs("div",{className:"ks-session-meta",children:[h.agent?e.jsx("span",{className:"ks-hit-chip",children:h.agent}):null,h.project?e.jsx("span",{children:h.project}):null,h.session?e.jsxs("span",{className:"ks-hit-session",title:d??h.session,children:["session ",h.session]}):null,e.jsxs("span",{className:"ks-session-count",children:[N(s.moments.length)," match",s.moments.length===1?"":"es"]})]}),h.when?e.jsx("time",{className:"ks-hit-when",children:h.when}):null]}),e.jsx("button",{type:"button",className:"ks-session-goal",onClick:O,title:d?"Open session":void 0,children:o})]}),e.jsx("div",{className:"ks-session-moments",children:s.moments.map(j=>{const xe=Xe(j,i.query),je=m?.id===j.id,se=Qe(j,i.query,200),ye=Ve(j),te=()=>b(j,i.query),ge=()=>{const p=be(we(j))??d;if(!p){te();return}t({view:"sessions",sessionId:p})};return e.jsx("article",{className:`ks-hit${je?" ks-hit--selected":""}`,role:"option","aria-selected":je,tabIndex:0,onClick:te,onDoubleClick:ge,onKeyDown:p=>{if(p.key==="Enter"&&(p.metaKey||p.ctrlKey)){p.preventDefault(),ge();return}ms(p,te)},children:e.jsxs("div",{className:"ks-hit-body",children:[ye.length>0?e.jsx("div",{className:"ks-hit-details ks-hit-details--moment","aria-label":"Turn",children:ye.map(p=>e.jsx("span",{className:"ks-hit-details-strong",children:p},p))}):null,e.jsx("h3",{className:"ks-hit-title",children:xe}),se&&se!==xe?e.jsx("p",{className:"ks-hit-snippet",children:e.jsx(hs,{text:se,query:i.query})}):null]})},j.id)})})]},s.collectionId)})})]}):null]}),e.jsx("footer",{className:"ks-foot-status","aria-live":"polite",children:e.jsxs("div",{className:"ks-foot-status-shell",children:[e.jsxs("span",{className:"ks-foot-status-facts",children:[he?e.jsx(ve,{size:12,className:"ks-spin","aria-hidden":"true"}):null,Me,Ae(i)?e.jsxs(e.Fragment,{children:[" · ",xs(i)]}):null]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>{pe(!0)},disabled:L,children:L?"Updating…":"Update index"})]})})]})}export{ct as KnowledgeSearchScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,j as e}from"./index-C8uS5szO.js";import{S as L}from"./SlidePanel-Datu7XG4.js";import{A as j}from"./AgentAvatar-BIwg54Tj.js";import{H as S}from"./HarnessMark-Bt47OeHy.js";import{t as N}from"./time-Dhsh_2EG.js";import{o as g,f as k,a as y}from"./lane-observe-BD21P8BB.js";import{S as A}from"./SessionObserve-DaqDhqDI.js";import{LaneTraceEventFocus as E}from"./LaneTraceEventFocus-WLNZZVi_.js";import{b as T}from"./agent-lane-detail-Db7KyAlf.js";import{l as I,a as z}from"./agent-lanes-model-CX0wTcnF.js";import"./Provider-5Hotn7NQ.js";import"./router-BKiMcYa7.js";import"./api-CaROe5_H.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-C6YehJqD.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./message-markup-DgFSyb3f.js";import"./ObservedTopologyPanel-DkEkQzo-.js";import"./ObserveTextFlow-ET0dD1wO.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./SessionObserveEvidence-Drv-D8Oh.js";import"./message-circle-CSiJj6yo.js";import"./wrench-BsMTSeji.js";import"./external-link-RT4Ph-6-.js";import"./context-budget-DemtXu7E.js";const M={think:"Thought",tool:"Tool",ask:"Request",message:"Message",note:"Note",system:"System",boot:"Boot"};function Ye({target:d,onClose:n}){const{lane:i,event:t}=d,{agent:s,observe:l,source:r,lastActiveAt:a}=i,p=f.useMemo(()=>T(i),[i]),c=I(s,r),v=z(s,r),h=M[t.kind]??t.kind,u=l?.metadata?.session?.sessionStart,o=g(t,u),b=o!=null?k(o,a):void 0,x=o!=null?y(o):void 0,m=t.kind==="tool"||t.kind==="ask"?t:void 0;return e.jsxs(L,{open:!0,onClose:n,side:"right",owner:"openscout.lane-trace",layer:"elevated",resizable:!0,defaultSize:980,minSize:560,maxSize:1280,scrollLock:!0,ariaLabel:`${c} session trace`,className:"s-lane-trace-sheet",children:[e.jsxs("div",{className:"s-slide-header s-lane-trace-sheet-header",children:[e.jsx(j,{agent:s,placement:"row",size:28,presence:!1,className:"s-agent-lane-avatar"}),e.jsxs("div",{className:"s-lane-trace-sheet-header-copy",children:[e.jsx("div",{className:"s-lane-trace-sheet-title",children:c}),e.jsxs("div",{className:"s-lane-trace-sheet-sub",children:[v," · ",h,a?` · ${N(a)}`:""]})]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsx(S,{harness:s.harness??p.harness,size:18,className:"s-lane-trace-sheet-hmark"}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:n,"aria-label":"Close",children:"×"})]}),e.jsx("div",{className:"s-slide-body s-lane-trace-sheet-body",children:e.jsx(A,{data:l??void 0,agentId:r==="scout"?s.id:void 0,sessionId:s.harnessSessionId??p.sessionId,showRail:!0,variant:"default",initialCursorT:t.t,focusEventId:t.id,inlineFocusEventId:m?.id,inlineFocusContent:m?e.jsx(E,{event:m,wallLabel:b,wallTitle:x,variant:"inline"}):void 0})})]})}export{Ye as LaneTraceDetailSheet};
|