@openscout/scout 0.2.105 → 0.2.107
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 +26 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/chat.mjs +23 -1
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
- package/dist/client/assets/{AddProjectForm-CHNJ4NnS.js → AddProjectForm-CusDRiVO.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-B4mEvXeD.js → AdventureEvidence-CyegKk1V.js} +1 -1
- package/dist/client/assets/{AdventureReader-ZsBDQITY.js → AdventureReader-X-hbTOi0.js} +1 -1
- package/dist/client/assets/{AdventureScenery-DSxDlqG1.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-MIEBKw_S.js → AgentDetailCard-DtHT3sCo.js} +1 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BTqwmK5G.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C4rKLLdT.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-fGC-ZrJS.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BTF4_th9.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-DgSeA_vS.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-CcS23wij.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
- package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-6Kfr1uOT.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-D67fIBdR.js → AstronautSuit-Cchnc4Ug.js} +1 -1
- package/dist/client/assets/{AtopView-Ck30FbzG.js → AtopView-gkEp4y__.js} +1 -1
- package/dist/client/assets/{BackToPicker-CkBhGRlD.js → BackToPicker-CUkjnoVk.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
- package/dist/client/assets/{BriefingsScreen-DTxYMr3a.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-crirZCdo.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
- package/dist/client/assets/{Canvas-CRP0KjKb.js → Canvas-X9pVSkw3.js} +1 -1
- package/dist/client/assets/{CastPicker-ZPomvOf-.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-ckVkecDO.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
- package/dist/client/assets/{ChatAvatar-DKBsbOqk.js → ChatAvatar-C3a_o5Hj.js} +1 -1
- package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-Co0NmqOO.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-D-iv28LJ.js → CodeDiffPane-DuQRwpgK.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-CZ3gDdiT.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
- package/dist/client/assets/{CodeScreen-CSC-zbP9.js → CodeScreen-BXyKeL5T.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DdNAwjGW.js → CommsCanvas-THp0r_U8.js} +1 -1
- package/dist/client/assets/{CommsDeck-mGWY7Ivi.js → CommsDeck-BVmSMV2V.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-voDD9M5R.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-C33sgD48.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
- package/dist/client/assets/{CommsSelection-BL8aYD7z.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-6pprBpmq.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-Dp9KBBGY.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/{DataTable-av71ehJV.js → DataTable-aH-jCyDq.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CcYGUB10.js → DispatchAftermath-66uQAorV.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DlMiEALb.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-CTkO_tQR.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
- package/dist/client/assets/{EmptyState-CYUwYyAW.js → EmptyState-CZlrHXy-.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Cxhixtks.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-Vj_wVZq1.js → FloorContextSheet-2_NVPQor.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-CjHSDXad.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BG4ebnX5.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
- package/dist/client/assets/{FloorReplay-BoYaGY9t.js → FloorReplay-VFzA6Kxc.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
- package/dist/client/assets/{FloorSavedWork-jbtRs-YE.js → FloorSavedWork-BeHDejWz.js} +1 -1
- package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
- package/dist/client/assets/{FollowScreen-CupyOgt4.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-Dcm3vf9U.js → HerdrSession-_t7yM8vX.js} +2 -2
- package/dist/client/assets/{HomeHero-pIZtE1cC.js → HomeHero-DouPyNmz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-Dv5meXo2.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-BmiSOEmp.js → JumpPalette-O1aJE9gR.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-B8yiM524.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-D2cnTeUd.js → LaneToolHoverCard-CJa110yk.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-BLhVHwff.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
- package/dist/client/assets/{MeshCanvas-BR25OBTJ.js → MeshCanvas-DWZHYh1A.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-ClVolr4-.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BT3ke2D1.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-CafjuseK.js → MissionContextRail-D62-Wis8.js} +1 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-nhy3hkxQ.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
- package/dist/client/assets/{MissionLogPane-DiUf3vWW.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-BQ2wQ5gp.js → NewAgentModal-Bh-L-emz.js} +1 -1
- package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
- package/dist/client/assets/{NewChatOrigin-C8ROO4ps.js → NewChatOrigin-DFbF_XvR.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BNTqYC7m.js → NodeDetailPanel-CElOEpCh.js} +1 -1
- package/dist/client/assets/{NodeMenu-CcOeFRCB.js → NodeMenu-B-jjHf1c.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-CC5mnngm.js → ObserveTextFlow-PFnG_10h.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DF6tRZL_.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-C8z22pJ2.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-DUPqXMZh.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-C8fxndAh.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
- package/dist/client/assets/{ReplayClock-DUVJjrIu.js → ReplayClock-348f17bW.js} +1 -1
- package/dist/client/assets/{ReplayLog-Bek1Vc4W.js → ReplayLog-CBnAM3ui.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-DlRg3172.js → ReplayOutpost-DyRPfNFx.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-CVUMnt6A.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-D9-s5PyB.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-D7FN-oyY.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
- package/dist/client/assets/{ReposScreen-BQ7HO1om.js → ReposScreen-uMCpt0e9.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-CJMWlvV-.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
- package/dist/client/assets/{SageModelStudio-B526NSnw.js → SageModelStudio-CNDhZhgD.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-ChkvGyEW.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
- package/dist/client/assets/{ScoutSurface-6g1f5chk.js → ScoutSurface-3_25USO_.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-BuwBdnPf.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Bs-_VwTC.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-C2wf35-P.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
- package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
- package/dist/client/assets/{SessionObserve-B64YsYhy.js → SessionObserve-DXxBvejJ.js} +9 -9
- 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-V04kD5T9.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-XwFI-pCp.js → ShikiPane-CRtTYkMj.js} +1 -1
- package/dist/client/assets/{SlidePanel-BMpkXai_.js → SlidePanel-_CHAQdOa.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
- package/dist/client/assets/{SpriteAvatar-aHeF4ZQZ.js → SpriteAvatar-CpZWf54-.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DI5N3gOj.js → SproutActionSprite-BSiTS4en.js} +1 -1
- package/dist/client/assets/{StatusPill-Dw4LP7wu.js → StatusPill-2gCP6H7A.js} +1 -1
- package/dist/client/assets/{TailView-BofjmUMJ.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-CwbQhXcI.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
- package/dist/client/assets/{TerminalRelay--qOBwnbR.js → TerminalRelay-DrikpUSJ.js} +3 -3
- package/dist/client/assets/{TextDocumentSurface-BK6Qy41F.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
- package/dist/client/assets/{TmuxPeek-DpUT9Tpc.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-D35fOnQj.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-t8AEyx3Q.js → WorkFilesViewer-vNt01sDd.js} +1 -1
- package/dist/client/assets/{WorkRunView-_mhG_FR2.js → WorkRunView-BDkR7Edq.js} +1 -1
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
- package/dist/client/assets/{WorldCharacter-BRrj3MQN.js → WorldCharacter-CIIlutQq.js} +1 -1
- package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
- package/dist/client/assets/{WorldSky-D-RJzSa6.js → WorldSky-Jm2Z6dfW.js} +1 -1
- package/dist/client/assets/{activity-BJqFrZyB.js → activity-CIlFrfPJ.js} +1 -1
- package/dist/client/assets/{addon-fit-CHohcvS3.js → addon-fit-dFpj9Kfq.js} +1 -1
- package/dist/client/assets/{addon-webgl-CaRy2x2b.js → addon-webgl-BFCGRtGh.js} +1 -1
- package/dist/client/assets/{agent-essentials-bKWYOZaH.js → agent-essentials-BGGvT5G6.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-BplZUa_0.js → agent-specialization-DDc7mLCW.js} +1 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
- package/dist/client/assets/{arc.es-CubLvQ4W.js → arc.es-C1SQHJ3k.js} +1 -1
- package/dist/client/assets/{arrow-left-DFfKAq0d.js → arrow-left-MVUKauwQ.js} +1 -1
- package/dist/client/assets/{arrow-right-DmAWnyAH.js → arrow-right-Bp-FpE5V.js} +1 -1
- package/dist/client/assets/{arrow-up-right-B0aLKiyF.js → arrow-up-right-BPedAgxO.js} +1 -1
- package/dist/client/assets/{book-open-BL9qvhEI.js → book-open-CV98WMSp.js} +1 -1
- package/dist/client/assets/{bot-BhAVbcCA.js → bot-B4zLQ4IN.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-g7D7-c1J.js → check-lrJ3a73a.js} +1 -1
- package/dist/client/assets/{chevron-down-CDzRQQGl.js → chevron-down-l1mrh5S9.js} +1 -1
- package/dist/client/assets/{chevron-right-DKGTLiqc.js → chevron-right-DrfqcerI.js} +1 -1
- package/dist/client/assets/{chevron-up-DX7R6KY2.js → chevron-up-CETZJzjV.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-Dvk_QpRq.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
- package/dist/client/assets/{clock-CQb4FeMf.js → clock-BV1aqPkK.js} +1 -1
- package/dist/client/assets/{code-xml-Cmadr3pQ.js → code-xml-BhcNbLWU.js} +1 -1
- package/dist/client/assets/{coffee-ljG1_krY.js → coffee-D7EAOdCk.js} +1 -1
- package/dist/client/assets/{compass-CvzkzkIh.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-CKJ9zb7Z.js → content-nGlEZhUI.js} +1 -1
- package/dist/client/assets/{content-D1Ze_FG9.js → content-oyzDM-LK.js} +1 -1
- package/dist/client/assets/content-x1PHxED7.js +1 -0
- package/dist/client/assets/content-zX3ZY3T9.js +1 -0
- package/dist/client/assets/{conversation-icons-CIRaxmid.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-BGOC1tJB.js → copy-xKeM5ZtU.js} +1 -1
- package/dist/client/assets/{cpu-Q6nrHFTN.js → cpu-BOTa_WLr.js} +1 -1
- package/dist/client/assets/{createLucideIcon-ChvMq-zl.js → createLucideIcon-zZ8Hx7er.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-BVccgH0n.js → external-link-CUObqmgX.js} +1 -1
- package/dist/client/assets/{eye-CsGfEVR6.js → eye-LrO-cXQt.js} +1 -1
- package/dist/client/assets/{file-code-corner-Be6da5l3.js → file-code-corner-CsU7jJpu.js} +1 -1
- package/dist/client/assets/{file-text-DP6txVW-.js → file-text-CnISiiw6.js} +1 -1
- package/dist/client/assets/{flag-DAFE2wZ5.js → flag-C4wl8z2-.js} +1 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
- package/dist/client/assets/{folder-B_S7gBVr.js → folder-D5prSkzz.js} +1 -1
- package/dist/client/assets/{gauge-DQCGlE3o.js → gauge-D9_5iJEm.js} +1 -1
- package/dist/client/assets/{gestures-CofqY4Km.js → gestures-QZub3Ot9.js} +1 -1
- package/dist/client/assets/{git-branch-DcUCsWdJ.js → git-branch-B0_fPLO7.js} +1 -1
- package/dist/client/assets/{go-shortcuts-KQy-ZOpV.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-CvU8B61b.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-kkXUq-zf.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-DReVb7jZ.js → index-EsrkGBcv.js} +8 -8
- package/dist/client/assets/index-gGHPA-By.js +1 -0
- package/dist/client/assets/{inspector-panel-CLU7wjnT.js → inspector-panel-BkgUDn6G.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CJXPaHXj.js → keyboard-nav-DDHegDbx.js} +1 -1
- package/dist/client/assets/{lane-roster-store-Ch9t6lb0.js → lane-roster-store-D-RSWjb-.js} +1 -1
- package/dist/client/assets/{layers-BOwyWodP.js → layers-C8PDiMul.js} +1 -1
- package/dist/client/assets/{layout-grid-B36Qsh0y.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-DNUsuPWz.js → loader-circle-OvccU82H.js} +1 -1
- package/dist/client/assets/{local-agents-I40PawYA.js → local-agents-BqnoxJrq.js} +1 -1
- package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
- package/dist/client/assets/{machine-children-CdhNzDF0.js → machine-children-DxcqCLmd.js} +1 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
- package/dist/client/assets/{mentions-Ck_Vjnyp.js → mentions-ByUvhS-v.js} +1 -1
- package/dist/client/assets/{mesh-ops-DSlvHp-D.js → mesh-ops-CiZ8xSAx.js} +1 -1
- package/dist/client/assets/{mesh-view-store-C1-mdP3P.js → mesh-view-store-DZvJC4KU.js} +1 -1
- package/dist/client/assets/{message-circle-cI5_A5mj.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-CJW4WRlo.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-p_cboAm4.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-C7_cHlkC.js → monitor-DTTYEb73.js} +1 -1
- package/dist/client/assets/{nav-destinations-CU_euC-Q.js → nav-destinations-uorRqFxf.js} +1 -1
- package/dist/client/assets/{observe-CtS0l3zu.js → observe-BJqERJVj.js} +1 -1
- package/dist/client/assets/{page-status-DwFR4wSw.js → page-status-BswZLqvA.js} +1 -1
- package/dist/client/assets/{panel-right-qP17MwMl.js → panel-right-Bv7sP_fc.js} +1 -1
- package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
- package/dist/client/assets/{pause-B_hliKuR.js → pause-C2XTlkjs.js} +1 -1
- package/dist/client/assets/{persistent-state-BUsTTZFE.js → persistent-state-KRk_yb0q.js} +1 -1
- package/dist/client/assets/{pin-Oi4qHR6M.js → pin-C2mFOV1l.js} +1 -1
- package/dist/client/assets/{play-CVeRmqLH.js → play-FT6K3It1.js} +1 -1
- package/dist/client/assets/{plus-D5NLH_fM.js → plus-DFDDeGKu.js} +1 -1
- package/dist/client/assets/profile-DTmzN16I.js +1 -0
- package/dist/client/assets/{projects-inbox-CfwxCTdN.js → projects-inbox-C0FUCv_p.js} +1 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
- package/dist/client/assets/{provider-DwmCoSlc.js → provider-Dojd8quC.js} +1 -1
- package/dist/client/assets/{proxy-DgzP27W8.js → proxy-AJsmwA6h.js} +1 -1
- package/dist/client/assets/{radio-Cas2qg1D.js → radio-DRoOZsws.js} +1 -1
- package/dist/client/assets/{refresh-cw-IcD2lPoT.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-cjPTwPXS.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-DAqYvu8I.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-Dl3ml9OZ.js → scope-views-RUWwCVAr.js} +1 -1
- package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
- package/dist/client/assets/{scoutbot-markdown-DwvGQOWo.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
- package/dist/client/assets/{scroll-text-B0tKI9Sg.js → scroll-text-DNjxhyO2.js} +1 -1
- package/dist/client/assets/{search-UsM-9-_W.js → search-DT42oyRW.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
- package/dist/client/assets/{selection-bridge-OTS2iFkt.js → selection-bridge-x3wFUjxj.js} +1 -1
- package/dist/client/assets/{send-horizontal-BlQsRK6C.js → send-horizontal-CH0-fbZE.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-C1mgqdow.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
- package/dist/client/assets/{server-DBlPW0Mp.js → server-QfsgMLk1.js} +1 -1
- package/dist/client/assets/{session-catalog-CnpZMB7C.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-CGkfG5Yd.js → session-table-L-pns6Zl.js} +1 -1
- package/dist/client/assets/{sessions-view-Bge4XZ4I.js → sessions-view-Dc-QAa7O.js} +1 -1
- package/dist/client/assets/{settings-C69Zjrpq.js → settings-BVh7kldq.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-6bzeod7c.js → sliders-horizontal-782VC_yy.js} +1 -1
- package/dist/client/assets/{sparkles-Cc5lPZRv.js → sparkles-BjHq_DNK.js} +1 -1
- package/dist/client/assets/{sse-A8AyLH0g.js → sse-BCPRocpq.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
- package/dist/client/assets/{tail-events-C4WdhVeK.js → tail-events-d0yAYxR0.js} +1 -1
- package/dist/client/assets/{terminal-DMZjX1es.js → terminal-hQKQygcf.js} +1 -1
- package/dist/client/assets/{terminal-relay-mO89dX-Y.js → terminal-relay-Bxs1hp-j.js} +1 -1
- package/dist/client/assets/{terminal-takeover-CZZsnPzj.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-D3cJpA5p.js → use-beside-DoRC1nt0.js} +1 -1
- package/dist/client/assets/{use-conversation-list-D5EnpVba.js → use-conversation-list-CY4JciOV.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-D_QOmjg5.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-3V3ADQ-G.js → use-mesh-node-state-BvaqtODo.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-DI9GKWlF.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-CiaZHMnk.js → use-reduced-motion-3gMYZNIp.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-CkdAHlDR.js → use-scout-dev-flags-DS_pYYQd.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-A3QGXqIy.js → useAgentHoverCard-BANmpjMh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-atkQVfGw.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DTvcwISe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
- package/dist/client/assets/{users-RLK3P5U4.js → users-BUjx36gx.js} +1 -1
- 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-B4maQJai.js → wrench-DR0i5BU7.js} +1 -1
- package/dist/client/assets/{x-rlMdRqJF.js → x-DAehov0E.js} +1 -1
- package/dist/client/assets/{xterm-B1zHHOLQ.js → xterm-BXQiLVnI.js} +1 -1
- package/dist/client/assets/{zap-B4X0OrEw.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 +2 -2
- package/dist/drizzle/0020_message_reactions.sql +11 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/main.mjs +542 -150
- package/dist/node/main.mjs +131 -17
- package/dist/pairing-runtime-controller.mjs +375 -78
- package/dist/runtime/base-daemon.mjs +98 -5
- package/dist/runtime/broker-daemon.mjs +1879 -1198
- package/dist/runtime/broker-process-manager.mjs +96 -3
- package/dist/runtime/mesh-discover.mjs +96 -3
- package/dist/scout-control-plane-web.mjs +4817 -1616
- package/dist/update-helper.mjs +211 -39
- package/package.json +5 -3
- package/server.json +31 -0
- package/dist/client/assets/ActivityScreen-CcDdQTBK.js +0 -1
- package/dist/client/assets/AgentAdventures-BxrYq_2v.js +0 -1
- package/dist/client/assets/AgentAvatar-NZOqcsB2.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +0 -1
- package/dist/client/assets/AgentFloorView-A0dDRlRV.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +0 -1
- package/dist/client/assets/AgentLanesView-WZhEDBFE.js +0 -2
- package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +0 -1
- package/dist/client/assets/AgentSessions-CO1WGa8Z.js +0 -6
- package/dist/client/assets/AgentsConsole-BQOWkj35.js +0 -1
- package/dist/client/assets/AgentsScreen-BMNAj1PH.js +0 -1
- package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +0 -1
- package/dist/client/assets/BrokerScreen-CT37VQiL.js +0 -8
- package/dist/client/assets/ChannelComposer-BVItWlEz.js +0 -1
- package/dist/client/assets/ChannelSidebar-B-2spawY.js +0 -1
- package/dist/client/assets/ChatBits-CLJ71hTY.js +0 -1
- package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +0 -1
- package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +0 -1
- package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +0 -1
- package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +0 -1
- package/dist/client/assets/ConversationComposer-DNcn5U6D.js +0 -1
- package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +0 -1
- package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +0 -1
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
- package/dist/client/assets/ConversationScreen-tpj4cqWs.js +0 -2
- package/dist/client/assets/ConversationStatus-Cv-7hErW.js +0 -1
- package/dist/client/assets/CrewAvatar-zgzC3cbU.js +0 -1
- package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +0 -1
- package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +0 -1
- package/dist/client/assets/FloorTacticalHUD-BhyOqlL5.js +0 -1
- package/dist/client/assets/HarnessMark-DSvM_H7H.js +0 -1
- package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +0 -1
- package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +0 -1
- package/dist/client/assets/InviteSheet--5Zjct25.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +0 -1
- package/dist/client/assets/MeshScreen-BW1dMFWF.js +0 -1
- package/dist/client/assets/MessagesScreen-CtNMfIvC.js +0 -1
- package/dist/client/assets/MissionControlView-BjPOViGY.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +0 -1
- package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +0 -1
- package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +0 -1
- package/dist/client/assets/NewChatComposer-BEXS8vV6.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-Dh30EjAQ.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +0 -31
- package/dist/client/assets/OpsAgentsView-D3rM0udq.js +0 -1
- package/dist/client/assets/OpsScreen-DySeNQ1V.js +0 -1
- package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +0 -1
- package/dist/client/assets/ProjectsInbox-DfCXReZK.js +0 -2
- package/dist/client/assets/ProjectsRail-CELVubfJ.js +0 -1
- package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +0 -1
- package/dist/client/assets/Provider-CNZluAZb.js +0 -5
- package/dist/client/assets/RailToggle-BwmY70B8.js +0 -1
- package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +0 -9
- package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +0 -2
- package/dist/client/assets/SessionObserveEvidence-CS1aQBpQ.js +0 -1
- package/dist/client/assets/SessionRefScreen-DURV0MpF.js +0 -1
- package/dist/client/assets/SessionsScreen-D71ZR-8t.js +0 -1
- package/dist/client/assets/SettingsDrawer-Nz98oBVl.js +0 -3
- package/dist/client/assets/SettingsScreen-CYBHal6y.js +0 -1
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
- package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +0 -2
- package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +0 -1
- package/dist/client/assets/Terminal-jIqnIZZ6.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +0 -1
- package/dist/client/assets/WorkDetailScreen-Bcf_yHhU.js +0 -5
- package/dist/client/assets/WorldActorTalk-CKerDikx.js +0 -1
- package/dist/client/assets/WorldMinimap-DOptgrc4.js +0 -1
- package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
- package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +0 -2
- package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
- package/dist/client/assets/at-sign-DM7xeppo.js +0 -1
- package/dist/client/assets/chat-api-BPVC0asu.js +0 -1
- package/dist/client/assets/chat-space-model-B6Jg2CY4.js +0 -4
- package/dist/client/assets/content-0AXa0klu.js +0 -1
- package/dist/client/assets/content-BEyJ19Lx.js +0 -1
- package/dist/client/assets/content-BN5weWKW.js +0 -1
- package/dist/client/assets/content-BNokkm7C.js +0 -1
- package/dist/client/assets/content-BV4PUM9q.js +0 -1
- package/dist/client/assets/content-BxUPlcx5.js +0 -1
- package/dist/client/assets/content-CIC5sku8.js +0 -1
- package/dist/client/assets/content-CdkTyxqk.js +0 -1
- package/dist/client/assets/content-CnhhSCZq.js +0 -1
- package/dist/client/assets/content-DY3F9Vfr.js +0 -1
- package/dist/client/assets/content-DrKBYpcb.js +0 -1
- package/dist/client/assets/content-LSStQYj5.js +0 -1
- package/dist/client/assets/content-YvU-D0hF.js +0 -1
- package/dist/client/assets/content-oKQMyVnH.js +0 -1
- package/dist/client/assets/conversation-model-m8HhzroS.js +0 -1
- package/dist/client/assets/conversation-motion-features-D9PxLoDt.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-DlwbftpC.js +0 -2
- package/dist/client/assets/embed-entry-c0lwtjBG.js +0 -2
- package/dist/client/assets/home-moving-signal-BIHUGNfI.js +0 -1
- package/dist/client/assets/home-now-card-CaLgZze2.js +0 -1
- package/dist/client/assets/hooks-DaUOREpP.js +0 -2
- package/dist/client/assets/index-CGbs0SBm.css +0 -1
- package/dist/client/assets/index-CbqBwfIW.js +0 -1
- package/dist/client/assets/index-CyPMl7Up.js +0 -1
- package/dist/client/assets/index-PQpJveGO.js +0 -1
- package/dist/client/assets/left-0vBrvrBG.js +0 -2
- package/dist/client/assets/left-C6SyaqlJ.js +0 -1
- package/dist/client/assets/left-CTuXysZR.js +0 -2
- package/dist/client/assets/left-Cc6s4DT2.js +0 -1
- package/dist/client/assets/left-DF5caiyh.js +0 -1
- package/dist/client/assets/left-DgT4tWCx.js +0 -1
- package/dist/client/assets/left-R0wppTTr.js +0 -1
- package/dist/client/assets/left-advisor-C-kt8V28.js +0 -1
- package/dist/client/assets/left-agents-thnBO156.js +0 -1
- package/dist/client/assets/left-default-CT42fnpF.js +0 -1
- package/dist/client/assets/left-lanes-CSmZgciK.js +0 -1
- package/dist/client/assets/left-mission-C86x6i9h.js +0 -1
- package/dist/client/assets/library-DdhYL_9v.js +0 -1
- package/dist/client/assets/message-markup-6Tgo4qFJ.js +0 -15
- package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
- package/dist/client/assets/profile-BegEUmB7.js +0 -1
- package/dist/client/assets/projects-inbox-CKPLZN8s.css +0 -1
- package/dist/client/assets/resolve-panes-pfZTezKo.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +0 -1
- package/dist/client/assets/right-BDaCJ0CF.js +0 -1
- package/dist/client/assets/right-BP6lXRFS.js +0 -1
- package/dist/client/assets/right-Cb1VCrdj.js +0 -1
- package/dist/client/assets/right-CeFaxfBo.js +0 -1
- package/dist/client/assets/right-Ck2SrYCj.js +0 -1
- package/dist/client/assets/right-D-uv5YfF.js +0 -1
- package/dist/client/assets/right-DJMSICky.js +0 -1
- package/dist/client/assets/right-Dnljs8ah.js +0 -1
- package/dist/client/assets/right-SdCSF8PP.js +0 -1
- package/dist/client/assets/router-C-MF5-mb.js +0 -1
- package/dist/client/assets/runtime-picker-C_AVYF63.js +0 -1
- package/dist/client/assets/scout-voice-CqAyfblr.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
- package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +0 -1
- package/dist/client/assets/usePersistentState-Y8XwSTg-.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
- package/dist/drizzle/meta/0019_snapshot.json +0 -6804
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,j as e}from"./index-EsrkGBcv.js";import{u as xt}from"./Provider-C35yu29I.js";import{o as pe}from"./openContent-C6XO6kr5.js";import{a as W}from"./api-DSqpVKC7.js";import{u as ft}from"./sse-BCPRocpq.js";import{u as jt}from"./tail-events-d0yAYxR0.js";import{n as gt,a as Nt,c as Ue}from"./agent-state-DDhnFEEP.js";import{s as Oe}from"./colors-CFlbwC25.js";import{A as It}from"./AgentLiveActions-CfTupTEl.js";import{i as yt,a as wt,c as St}from"./message-visibility-DwxgcgYK.js";import{d as bt,b as Tt,e as kt,g as Ct,m as At,c as Ve,s as Rt,a as Lt}from"./conversation-model-FxDeWlle.js";import{c as Et,e as Pt,t as F,f as he}from"./time-Dhsh_2EG.js";import{b as $t}from"./conversations-DoAAO6kA.js";import{d as Mt}from"./router-DCtl8wqb.js";import{T as _t}from"./TmuxPeek-CXFeweMg.js";import{S as Bt}from"./scroll-text-DNjxhyO2.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./index-BWHgHrtv.js";import"./terminal-takeover-Ay5C2c-M.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";/* empty css */import"./refresh-cw-BmVr7sCD.js";const Wt=20;function ve(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.split(/[\\/]/).filter(Boolean).at(-1)??n:null}function xe(t){const n=t?.trim();return n?n.length>18?`${n.slice(0,8)}...${n.slice(-6)}`:n:null}function C(t){const n=new Set,a=[];for(const r of t){const m=r?.trim();if(!m)continue;const h=m.toLowerCase();n.has(h)||(n.add(h),a.push(m))}return a}function De(t,n){const a=t?.trim().replace(/[\\/]+$/,""),r=n.trim().replace(/[\\/]+$/,"");if(!a||!r)return!1;if(a===r)return!0;if(r.startsWith("~/")){const m=r.slice(1);if(a.endsWith(m)||a.includes(`${m}/`))return!0}if(a.startsWith("~/")){const m=a.slice(1);if(r.endsWith(m)||r.includes(`${m}/`))return!0}return a.startsWith(`${r}/`)||r.startsWith(`${a}/`)}function Ke(t,n){const a=t?.trim().toLowerCase(),r=n.trim().toLowerCase();return!a||!r?!1:a.includes(r)||r.includes(a)}function Je(t,n){const a=t?.trim().toLowerCase(),r=n.trim().toLowerCase();return!a||!r?!1:a===r}function Ft(t){const{activeSessionId:n,agent:a,sessionMeta:r}=t,m=C([n,a?.harnessSessionId]),h=C([a?.cwd,a?.projectRoot,r?.workspaceRoot]),c=C([a?.project,ve(a?.cwd),ve(a?.projectRoot),ve(r?.workspaceRoot)]).filter(U=>U.length>2),o=C([...m.slice(0,2),...c.slice(0,2)]).join("|");return{sessionIds:m,paths:h,projects:c,query:o}}function ge(t,n){return!!(n.sessionIds.some(a=>Ke(t.sessionId,a))||n.paths.some(a=>De(t.cwd,a))||n.projects.some(a=>Je(t.project,a)))}function zt(t,n){const a=n.filter(c=>ge(c,t)),r=C(a.filter(c=>t.sessionIds.some(o=>Ke(c.sessionId,o))).map(c=>c.sessionId));if(r[0])return r[0];const m=C(a.filter(c=>t.paths.some(o=>De(c.cwd,o))).map(c=>c.sessionId));if(m[0])return m[0];const h=C(a.filter(c=>t.projects.some(o=>Je(c.project,o))).map(c=>c.sessionId));return h[0]?h[0]:t.paths[0]?t.paths[0]:t.sessionIds[0]?t.sessionIds[0]:t.projects[0]?t.projects[0]:t.query}function te(t,n){const a=new Map;for(const r of[...n,...t])a.set(r.id,r);return[...a.values()].sort((r,m)=>Et(r.ts,m.ts)).slice(0,Wt)}function Ut(t){return t==="tool-result"?"tool result":t}function Ot(t){const n=t.replace(/\s+/g," ").trim();return n.length<=180?n:`${n.slice(0,177)}...`}const Vt={direct:"Conversation",channel:"Conversation",group_direct:"Conversation",thread:"Thread"},Ht=1800,qt=4800,He=2,Dt=120,Kt=650,Jt=1800;function fe(t,n){try{return JSON.stringify(t)===JSON.stringify(n)?t:n}catch{return n}}function qe(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.split(/[\\/]/).filter(Boolean).at(-1)??n:null}function Qt(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.replace(/^\/Users\/[^/]+(?=\/|$)/,"~"):null}function z(t){switch(t){case"queued":return"Queued";case"waking":return"Waking";case"waiting":return"Thinking";case"running":return"Working";case"completed":return"Completed";case"failed":return"Failed";case"cancelled":return"Cancelled";default:return t.replace(/_/g," ")}}function rn(){const{route:t,agents:n,navigate:a,apiConnection:r,reload:m}=xt(),h=Mt(t),c=t.view==="conversation"||t.view==="messages"?t.conversationId??null:null,[o,U]=i.useState(null),[S,Ne]=i.useState([]),[E,Ie]=i.useState(null),[Qe,O]=i.useState(!1),ye=i.useRef(c);ye.current=c;const V=i.useCallback(async()=>{if(!c){U(null),Ne([]),Ie(null),O(!0);return}try{const[s,l,f]=await Promise.all([W(`/api/session/${encodeURIComponent(c)}`).catch(()=>null),W(`/api/flights?conversationId=${encodeURIComponent(c)}&active=false`).catch(()=>[]),W(`/api/messages?conversationId=${encodeURIComponent(c)}&limit=8`).catch(()=>[])]);if(ye.current!==c)return;U(p=>fe(p,s)),Ne(p=>fe(p,l??[])),Ie(p=>fe(p,f?.filter(B=>!yt(B)).sort((B,vt)=>Pt(B.createdAt,vt.createdAt)).at(-1)??null)),O(!0)}catch{O(!0)}},[c]);i.useEffect(()=>{O(!1),V()},[V]);const j=o?.agentId??null,d=i.useMemo(()=>j?n.find(s=>s.id===j)??null:null,[n,j]),H=d?.id??null,q=bt(o),D=Tt(o),se=kt({resolvedAgentId:H,sessionId:q,machineId:h}),[we,Se]=i.useState(null),[P,ne]=i.useState([]),[b,ae]=i.useState([]),be=i.useRef([]),T=i.useRef(null),K=i.useRef(null),x=i.useRef([]),g=i.useRef(null),N=i.useRef(null),$=i.useRef(new Set),J=i.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null),K.current=null},[]),M=i.useCallback(()=>{if(!c)return;const s=Date.now(),l=K.current??s;K.current=l;const p=s-l>=qt?0:Ht;T.current!==null&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,K.current=null,V()},p)},[c,V]);i.useEffect(()=>J,[J]),i.useEffect(()=>{if(Se(null),!H)return;let s=!1;return W(`/api/agents/${encodeURIComponent(H)}/session-catalog`).then(l=>{s||Se(l)}).catch(()=>{}),()=>{s=!0}},[H]);const Ye=Ct({name:d?.name,agentName:o?.agentName,id:j,title:o?.title}),Te=d?At(d)??Ve(d.id)??d.id:j?Ve(j)??j:null,u=i.useMemo(()=>S.filter($t).sort((s,l)=>(l.startedAt??0)-(s.startedAt??0))[0]??null,[S]),Ze=i.useMemo(()=>Rt(S),[S]);i.useEffect(()=>{$.current=new Set(S.map(s=>s.invocationId))},[S]),i.useEffect(()=>{J(),$.current.clear()},[J,c]),ft(s=>{if(c){if(s.kind==="message.posted"){s.payload?.message?.conversationId===c&&M();return}if(s.kind==="conversation.upserted"){s.payload?.conversation?.id===c&&M();return}if(s.kind==="invocation.requested"){const l=s.payload?.invocation;if(l?.conversationId===c){$.current.add(l.id),M();return}!l?.conversationId&&j&&l?.targetAgentId===j&&($.current.add(l.id),M());return}if(s.kind==="flight.updated"){const l=s.payload?.flight;if(!l)return;(u?.id===l.id||u?.invocationId===l.invocationId||$.current.has(l.invocationId)||S.some(p=>p.id===l.id||p.invocationId===l.invocationId))&&M()}}});const v=q??we?.activeSessionId??d?.harnessSessionId??o?.harnessSessionId??null,w=d?.harnessSessionId??o?.harnessSessionId??null,A=d?.harnessLogPath??null,I=i.useMemo(()=>Ft({activeSessionId:v,agent:d,sessionMeta:o}),[v,d,o]),ie=JSON.stringify({sessionIds:I.sessionIds,paths:I.paths,projects:I.projects}),_=I.sessionIds.length>0||I.paths.length>0||I.projects.length>0,Q=i.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),N.current!==null&&(window.clearInterval(N.current),N.current=null),x.current=[]},[]),Y=i.useCallback(()=>{Q()},[Q]),ke=i.useCallback(()=>{if(N.current!==null||(g.current!==null&&(window.clearTimeout(g.current),g.current=null),x.current.length===0))return;const l=()=>{const f=x.current.slice(0,He);x.current=x.current.slice(He),f.length>0&&ae(p=>te(p,f)),!(x.current.length>0)&&N.current!==null&&(window.clearInterval(N.current),N.current=null)};l(),x.current.length>0&&(N.current=window.setInterval(l,Dt))},[]),Ce=i.useCallback(s=>{N.current===null&&g.current===null&&(g.current=window.setTimeout(()=>{g.current=null,ke()},s))},[ke]);i.useEffect(()=>{be.current=b},[b]),i.useEffect(()=>Q,[Q]),i.useEffect(()=>{Y(),ne([]),ae([])},[Y,ie]),i.useEffect(()=>{if(!_)return;let s=!1;const l=new URLSearchParams({limit:"180",transcripts:"true"});return W(`/api/tail/recent?${l.toString()}`).then(f=>{if(s)return;const p=(f.events??[]).filter(B=>ge(B,I));ne(te([],p))}).catch(()=>{}),()=>{s=!0}},[_,ie]),jt(i.useCallback(s=>{_&&ge(s,I)&&ne(l=>te(l,[s]))},[_,ie])),i.useEffect(()=>{if(P.length===0){Y(),ae([]);return}const s=be.current,l=new Set([...s.map(p=>p.id),...x.current.map(p=>p.id)]),f=P.filter(p=>!l.has(p.id));f.length!==0&&(x.current=te(x.current,f),x.current.length>0&&Ce(s.length===0?Kt:Jt))},[Ce,Y,P]);const ce=i.useMemo(()=>b.flatMap(Xt).slice(0,5),[b]);if(!c)return e.jsx(Yt,{apiOffline:r.status==="offline",onRetry:()=>{m()}});if(!Qe)return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading conversation…"})})});const Xe=o?.kind?Vt[o.kind]??o.kind:"Conversation",Ge=D?o?.participants?.find(s=>s.sessionId===D||s.kind==="session"&&s.actorId===D)??null:null,et=!q||d?.harnessSessionId===q,Z=o?.workspaceRoot?.trim()||Ge?.workspaceRoot?.trim()||et&&(d?.projectRoot?.trim()||d?.cwd?.trim())||null||null,re=qe(Z),X=Qt(Z),Ae=o?.currentBranch??null,le=d?.harness??o?.harness??null,G=o?.lastMessageAt??E?.createdAt??null,Re=o?.messageCount??null,Le=o?o.participantCount??o.participantIds.filter(s=>s!=="operator").length+1:null,R=d?.state??null,tt=gt(R),st=E?wt(E):null,Ee=E?.body?.trim()||o?.preview?.trim()||null,Pe=Ee?St(Ee):null,$e=st?null:E?.actorName??null,Me=xe(v),y=D??v??w,oe=xe(y),nt=xe(w),_e=!!(w&&w!==y),Be=[le,d?.transport].filter(Boolean).join(" · "),at=!!(v||w||A),k=!!(d?.terminalSurface?.backend==="tmux"||d?.transport==="tmux"&&d.harnessSessionId),L=!!(u||Nt(R,d)),de=u??Ze,it=de?z(de.state):L?"In motion":"At rest",ct=de?.summary?.trim()??(G?`Last update ${F(G)??"recently"}`:"No recent activity recorded"),ue=[Ae?`branch ${Ae}`:null,le,d?.transport].filter(Boolean),rt=!!(re||X||ue.length>0),lt=L?"Live activity":k?"Terminal":"Activity",me=u?.summary?.trim()??(v&&!k?"Session linked.":b.length>0&&!k?"Streaming matching Tail events.":null),ee=zt(I,P),ot=!!(d&&(u||v||P.length>0||k)),dt=!k,ut=v?k?"Terminal session":"Trace session":u?"Session starting":"Session context",mt=v?oe??v:u?z(u.state):"Waiting for a session id",We=v?[le,d?.transport,u?z(u.state):null].filter(Boolean).join(" · "):u?.summary?.trim()??me??null,Fe=Lt({sessionId:y,machineId:h}),ze=Fe?()=>{pe(a,Fe,{returnTo:t})}:void 0,pt=()=>{se&&pe(a,se,{returnTo:t})},ht=()=>{pe(a,{view:"ops",mode:"tail",...ee?{tailQuery:ee}:{}},{returnTo:t})};return e.jsxs("div",{className:"ctx-panel ctx-panel--conversation",children:[e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:Xe}),e.jsxs("div",{className:"ctx-panel-conversation-card",children:[e.jsx("div",{className:"ctx-panel-conversation-title",children:Ye}),Te&&e.jsxs("div",{className:"ctx-panel-conversation-handle",children:["@",Te]}),e.jsxs("div",{className:"ctx-panel-conversation-state",children:[e.jsx("span",{className:"ctx-panel-conversation-state-dot",style:{background:Oe(R)}}),e.jsx("span",{children:Ue(R)})]})]})]}),u&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Now"}),e.jsxs("div",{className:"ctx-panel-conversation-flight",children:[e.jsxs("div",{className:"ctx-panel-conversation-flight-row",children:[e.jsx("span",{className:"ctx-panel-conversation-flight-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-conversation-flight-time",children:F(u.startedAt)})]}),u.summary&&e.jsx("div",{className:"ctx-panel-conversation-flight-summary",children:u.summary})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Workspace"}),rt?e.jsxs("div",{className:"ctx-panel-workspace-card",children:[e.jsxs("div",{className:"ctx-panel-workspace-head",children:[e.jsx("div",{className:"ctx-panel-workspace-kicker",children:"Project"}),e.jsx("div",{className:"ctx-panel-workspace-title",title:Z??re??void 0,children:re??"Unscoped workspace"})]}),X&&e.jsx("div",{className:"ctx-panel-workspace-path",title:Z??X,children:X}),ue.length>0&&e.jsx("div",{className:"ctx-panel-workspace-strip",children:ue.map(s=>e.jsx("span",{className:"ctx-panel-workspace-chip",children:s},s))})]}):e.jsx("div",{className:"ctx-panel-empty",children:"No workspace metadata yet"})]}),at&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsxs("div",{className:"ctx-panel-session-card",children:[e.jsx("div",{className:"ctx-panel-session-head",children:e.jsxs("div",{className:"ctx-panel-session-primary",children:[Be&&e.jsx("div",{className:"ctx-panel-session-kind",children:Be}),y&&(ze?e.jsxs("button",{type:"button",className:"btn btn--ghost ctx-panel-session-id ctx-panel-session-id--button","aria-label":`Open session ${y}`,title:y,onClick:ze,children:[e.jsx("span",{children:oe??y}),e.jsx("span",{className:"ctx-panel-session-id-action",children:"Open session"})]}):e.jsx("div",{className:"ctx-panel-session-id",title:y,children:oe??y}))]})}),(_e||A)&&e.jsxs("div",{className:"ctx-panel-session-meta",children:[_e&&w&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness session"}),e.jsx("strong",{title:w,children:nt??w})]}),A&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness log"}),e.jsx("strong",{title:A,children:qe(A)??A})]})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsxs("div",{className:`ctx-panel-activity-card${L?" ctx-panel-activity-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-activity-head",children:[e.jsx("span",{className:"ctx-panel-activity-dot",style:{background:L?"var(--green)":Oe(R)}}),e.jsxs("div",{className:"ctx-panel-activity-main",children:[e.jsx("div",{className:"ctx-panel-activity-title",children:it}),e.jsx("div",{className:"ctx-panel-activity-sub",title:G?he(G):void 0,children:ct})]})]}),u&&e.jsxs("div",{className:"ctx-panel-activity-ledger",children:[e.jsx("span",{className:"ctx-panel-activity-ledger-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-activity-ledger-time",title:he(u.startedAt),children:F(u.startedAt)})]}),e.jsxs("div",{className:"ctx-panel-activity-facts",children:[typeof Re=="number"&&e.jsx(je,{label:"Messages",value:`${Re}`}),typeof Le=="number"&&e.jsx(je,{label:"People",value:`${Le}`}),tt&&e.jsx(je,{label:"Agent",value:Ue(R)})]})]})]}),Pe&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-preview",children:[e.jsx("div",{className:"ctx-panel-section-label",children:$e?`Latest · ${$e}`:"Latest"}),e.jsx("div",{className:"ctx-panel-conversation-preview-body",children:Pe})]}),ot&&d&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-live-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:[e.jsx("span",{children:lt}),Me&&e.jsx("span",{className:"ctx-panel-live-session",title:v??void 0,children:Me})]}),e.jsxs("div",{className:`ctx-panel-live-card${L?" ctx-panel-live-card--active":""}`,children:[e.jsxs("div",{className:`ctx-panel-live-session-card${L?" ctx-panel-live-session-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-live-session-copy",children:[e.jsx("span",{children:ut}),e.jsx("strong",{title:v??void 0,children:mt}),We&&e.jsx("small",{children:We})]}),e.jsx("div",{className:"ctx-panel-live-session-pulse","aria-hidden":"true",children:e.jsx("span",{})})]}),e.jsx(It,{agent:d,catalog:we,navigate:a,returnTo:t,variant:"compact",className:"ctx-panel-live-actions"}),me&&e.jsx("div",{className:"ctx-panel-live-summary",children:me}),k&&e.jsx(_t,{agentId:d.id,lines:24,columns:132,className:"ctx-panel-tmux-peek--conversation"}),ce.length>0&&e.jsxs("div",{className:"ctx-panel-live-files","aria-live":"polite",children:[e.jsxs("div",{className:"ctx-panel-live-files-label",children:[e.jsx("span",{children:"Files"}),e.jsx("strong",{children:ce.length})]}),e.jsx("ol",{className:"ctx-panel-live-file-list",children:ce.map(s=>e.jsxs("li",{className:`ctx-panel-live-file ctx-panel-live-file--${s.tone}`,title:`${s.path} · ${s.verb}`,children:[e.jsx("span",{className:"ctx-panel-live-file-mark",children:s.mark}),e.jsx("span",{className:"ctx-panel-live-file-path",children:ss(s.path)}),e.jsx("span",{className:"ctx-panel-live-file-time",children:F(s.ts)})]},`${s.eventId}:${s.path}`))})]}),dt&&e.jsx("div",{className:"ctx-panel-live-stream","aria-live":"polite",children:b.length>0?e.jsx("ol",{className:"ctx-panel-live-events",children:b.map(s=>e.jsxs("li",{className:"ctx-panel-live-event",children:[e.jsx("span",{className:"ctx-panel-live-event-kind",children:Ut(s.kind)}),e.jsx("span",{className:"ctx-panel-live-event-summary",children:Ot(s.summary)}),e.jsx("span",{className:"ctx-panel-live-event-time",title:he(s.ts),children:F(s.ts)})]},s.id))}):e.jsx("div",{className:"ctx-panel-live-stream-empty",children:"Waiting for matching Tail events"})}),_&&e.jsxs("button",{type:"button",className:"ctx-panel-live-tail-button",onClick:ht,title:ee?`Tail filter: ${ee}`:"Open Tail",children:[e.jsx(Bt,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Tail"})]})]})]}),se&&e.jsx("section",{className:"ctx-panel-section ctx-panel-conversation-profile-section",children:e.jsxs("button",{type:"button",className:"ctx-panel-roster-button ctx-panel-conversation-profile-button",onClick:pt,children:[e.jsx("span",{className:"ctx-panel-roster-label",children:d?"Open agent profile":"Open session trace"}),e.jsx("span",{className:"ctx-panel-roster-count",children:e.jsx("span",{children:"→"})})]})})]})}function Yt({apiOffline:t,onRetry:n}){return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsxs("div",{className:"ctx-panel-empty-card","data-tone":t?"error":"neutral",children:[e.jsx("div",{className:"ctx-panel-empty-card-title",children:t?"Context unavailable":"No conversation selected"}),e.jsx("div",{className:"ctx-panel-empty-card-detail",children:t?"Scout context will load after the server reconnects.":"Select a chat to inspect participants, sessions, and recent activity."}),t&&e.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:n,children:"Retry"})]})})})}function je({label:t,value:n}){return e.jsxs("div",{className:"ctx-panel-fact",children:[e.jsx("span",{className:"ctx-panel-fact-value",children:n}),e.jsx("span",{className:"ctx-panel-fact-label",children:t})]})}const Zt=/(?:["'`])?((?:~|\/|\.{1,2}\/|[A-Za-z0-9_.-]+\/)[^\s"'`),;]+?\.(?:ts|tsx|js|jsx|mjs|cjs|css|scss|swift|md|json|jsonc|yml|yaml|toml|sql|py|rs|go|sh|html|m|mm))(?:["'`])?/gi;function Xt(t){const n=new Set,a=[],r=Gt(t.summary);for(const m of t.summary.matchAll(Zt)){const h=m[1]?.trim();if(!h)continue;const c=h.toLowerCase();n.has(c)||(n.add(c),a.push({eventId:t.id,path:h,verb:r,mark:ts(r),tone:es(r),ts:t.ts}))}return a}function Gt(t){return/\b(created|create|wrote|write|edited|edit|modified|modify|updated|update|changed|change|patched|patch)\b/i.test(t)?"changed":/\b(read|opened|viewed|cat|sed)\b/i.test(t)?"read":"touched"}function es(t){return t==="changed"?"changed":t==="read"?"read":"touched"}function ts(t){return t==="changed"?"+":t==="read"?"r":"·"}function ss(t){const n=t.replace(/[\\/]+$/g,""),a=n.split(/[\\/]/).filter(Boolean);return a.length<=2?n:`${a.at(-2)}/${a.at(-1)}`}export{rn as ConversationInspector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-zZ8Hx7er.js";const e=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],t=c("rocket",e);export{t as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{X as ie,Y as Dn,Z as Ne,$ as Be,L as On,a0 as xn,N as k,O as h,a1 as jn,a2 as Z,a3 as Nn,a4 as Bn,r as C}from"./index-EsrkGBcv.js";import{b as Mn}from"./api-DSqpVKC7.js";import{n as ce}from"./synthetic-agent-routing-aduMYO7P.js";import{g as zn,h as Me,j as Wn,k as Kn}from"./terminal-sessions-3RfJpen8.js";const ze=["local","url","sharedConfig","env"];function Gn(e){const n=Vn(e),t=e.audienceIncludes??Hn(e.audienceOrder),s=new Set;function o(a){!e.warnOnUnknown||s.has(a)||(s.add(a),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[hudsonkit/flags] Unknown feature flag "${a}" resolved false.`))}const r=e.registry;function i(a){const u=r[a];if(!u)return o(a),{key:a,enabled:!1,value:!1,layer:"default",audience:n,reason:"unknown-flag"};const d=Yn(e.layers,a);return d?{key:a,enabled:d.value,value:d.value,layer:d.layer,audience:n,requiredTier:u.tier,reason:"override",definition:u}:u.defaultEnabled?u.tier&&!t(n,u.tier)?{key:a,enabled:!1,value:!1,layer:"default",audience:n,requiredTier:u.tier,reason:"audience-denied",definition:u}:{key:a,enabled:!0,value:!0,layer:"default",audience:n,requiredTier:u.tier,reason:"default",definition:u}:{key:a,enabled:!1,value:!1,layer:"default",audience:n,requiredTier:u.tier,reason:"default",definition:u}}return{registry:e.registry,isEnabled:a=>i(String(a)).enabled,explain:a=>i(String(a)),all:()=>Object.keys(e.registry).sort().map(i),audience:()=>n}}function Vn(e){let n=e.audience.tier;for(const t of ze.slice().reverse()){const s=e.layers?.[t]?.audience;s&&(n=s)}return{...e.audience,tier:n}}function Hn(e){return(n,t)=>{if(n.tier===t)return!0;if(!e||e.length===0)return!1;const s=e.indexOf(n.tier),o=e.indexOf(t);return s<0||o<0?!1:s>=o}}function Yn(e,n){for(const t of ze){const s=qn(e?.[t]?.flags?.[n]);if(s!==null)return{layer:t,value:s}}return null}function qn(e){return e===!0||e==="on"?!0:e===!1||e==="off"?!1:null}function Qn(e){if(e===!0||e===!1)return e;if(typeof e=="number"){if(e===1)return!0;if(e===0)return!1}if(typeof e!="string")return;const n=e.trim().toLowerCase();if(["1","true","on","yes","enabled","enable"].includes(n))return!0;if(["0","false","off","no","disabled","disable"].includes(n))return!1;if(["default","null","unset","clear"].includes(n))return"default"}function Xn(e,n={}){const t=n.paramPrefix??"ff.",s=n.audienceParam??"ffAudience",o=typeof e=="string"?new URL(e,"http://hudson.local"):e,r={};let i;for(const[a,u]of o.searchParams.entries()){if(a===s&&u.trim()&&(i=u.trim()),!a.startsWith(t))continue;const d=a.slice(t.length),f=Qn(u);d&&f!==void 0&&(r[d]=f)}return{flags:r,audience:i}}const F=1;function Zn(e){if(typeof window>"u")return{version:F};try{const n=window.localStorage?.getItem(e);return Jn(n)}catch{return{version:F}}}function Fs(e,n){if(typeof window>"u")return;const t=We(n),s=JSON.stringify(t);try{window.localStorage?.setItem(e,s)}catch{}et(e,s)}function Jn(e){if(!e)return{version:F};try{const n=JSON.parse(e);return!n||typeof n!="object"?{version:F}:We(n)}catch{return{version:F}}}function We(e){const n={version:F};if(e.audience&&(n.audience=e.audience),e.flags&&typeof e.flags=="object"){n.flags={};for(const[t,s]of Object.entries(e.flags))(s===!0||s===!1)&&(n.flags[t]=s);Object.keys(n.flags).length===0&&delete n.flags}return n}function et(e,n){if(!(typeof document>"u"))try{const t=encodeURIComponent(n);document.cookie=`${encodeURIComponent(e)}=${t}; Path=/; SameSite=Lax; Max-Age=31536000`}catch{}}const nt=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal"],tt=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.scoutbot","surface.workflows"];function ye(e,n){return Object.fromEntries(e.map(t=>[t,n]))}const Ke={label:"Surface · Scope",description:`Scope presentation on Scout infra — lean lanes/tail/sessions/agents at ${Dn}/*.`,defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","scope","observability"]},st={...Ke,label:"Surface · Scope (legacy alias)",description:`Legacy alias for ${ie}. Prefer the primary flag; ${Ne} remains for old dev links.`},Ds=ie;function ot(){return{audience:"everyone",flags:{"ops.control":!0,"ops.lanes":!0,...ye(nt,!1),...ye(tt,!1)}}}const Ge=["ffBundle","ffVariant","scoutBundle","scoutExperience","ab"],Ve=["ffGlobal","scoutGlobalBundle"],He=["ffPersist","persistBundle"],rt=new Set(["no-ops","ffAudience",...Ge,...Ve,...He]);function Os(e){for(const n of[...e.searchParams.keys()])(rt.has(n)||n.startsWith("ff."))&&e.searchParams.delete(n);return e}const at=["everyone","internal","power"],it="openscout.flags",J="openscout.flagBundle",ct={tier:"power"},Ee=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal","ops.lanes"],$e=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.mesh-ops","surface.scoutbot","surface.workflows"],ut={"nav.sidebar":{label:"Nav · Sidebar",description:"Classic sidebar chrome (8 primary areas + icon rail). Default on since sco-083 soak; opt out with ?ff.nav.sidebar=off. Not included in max-pro.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["nav","chrome"]},"ops.control":{label:"Ops · Control",description:"Mission control, issues, and the Ops section shell.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops","nav"]},"ops.mesh":{label:"Ops · Network",description:"Mesh topology and peer status.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.runtime":{label:"Ops · Runtime",description:"Runtime / atop process telemetry.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.plans":{label:"Ops · Plans",description:"Plan documents and plan-mode review.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.terminal":{label:"Ops · Terminal",description:"Observe / takeover terminal sessions.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.lanes":{label:"Ops · Agent Lanes",description:"One column per local agent — follow live harness work in power-user mode.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"surface.search":{label:"Surface · Search",description:"Knowledge + indexer search as a top-level nav entry.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","nav"]},"surface.sessions":{label:"Surface · Sessions",description:"Standalone top-level Sessions entry (still reachable under Agents).",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","nav"]},"surface.briefings":{label:"Surface · Briefings",description:"Briefings list + detail.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.work":{label:"Surface · Work",description:"Work item detail.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.activity":{label:"Surface · Activity",description:"Activity stream.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.follow":{label:"Surface · Follow",description:"Follow view.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.mesh-ops":{label:"Surface · Mesh Ops",description:"Mesh Ops — work-item triage over the mesh (hosts rail, item list, inspector).",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","ops"]},"surface.scoutbot":{label:"Surface · Scoutbot",description:"Scoutbot assistant — the inspector panel, the status-bar broadcast chip, and the Message-Scout command-palette actions.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["surface","assistant"]},"surface.realtime-voice":{label:"Surface · Realtime voice",description:"Live WebRTC voice conversations with Scoutbot through OpenAI Realtime. Operator enablement lives in Settings → Voice; this flag is a build-level kill switch.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["surface","assistant","voice"]},"surface.workflows":{label:"Surface · Workflows",description:"Observed harness families / workflow topology telemetry on the Agents directory. Off in the lean view — the directory is just the project-grouped agent board.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","observability"]},[ie]:Ke,[Ne]:st},lt={a:"light-prod",control:"light-prod",light:"light-prod","light-prod":"light-prod",prod:"light-prod",production:"light-prod",b:"max-pro",max:"max-pro","max-pro":"max-pro",pro:"max-pro",treatment:"max-pro",...xn},Re=new Set(["clear","default","none","reset","unset"]);function K(e,n){return Object.fromEntries(e.map(t=>[t,n]))}function Ye(...e){const n={};for(const t of e)t.audience&&(n.audience=t.audience),t.flags&&Object.keys(t.flags).length>0&&(n.flags={...n.flags??{},...t.flags});return n}function ue(e){switch(e){case"light-prod":return{audience:"everyone",flags:{...K(Ee,!1),...K($e,!1)}};case"max-pro":return{audience:"power",flags:{...K(Ee,!0),...K($e,!0)}};case On:return ot()}}function O(e){return e?lt[e.trim().toLowerCase()]??null:null}function ee(e,n){for(const t of n){const s=e.get(t);if(s!==null)return s}return null}function qe(e){const n=ee(e,Ge);return O(n)}function dt(e){const n=ee(e,Ve);if(n){const i=n.trim().toLowerCase();if(Re.has(i))return{action:"clear"};const a=O(n);return a?{action:"set",bundle:a}:null}const t=ee(e,He);if(!t)return null;const s=t.trim().toLowerCase();if(Re.has(s))return{action:"clear"};if(["0","false","no"].includes(s))return null;const o=O(t);if(o)return{action:"set",bundle:o};const r=qe(e);return r?{action:"set",bundle:r}:null}function Qe(){if(typeof window>"u")return null;try{return O(window.localStorage.getItem(J))}catch{return null}}function ft(e){if(!(typeof window>"u"))try{e.action==="clear"?window.localStorage.removeItem(J):window.localStorage.setItem(J,e.bundle)}catch{}}function xs(){return Qe()??O(Be())??Ze}function Xe(){const e=Qe();return e?ue(e):{}}const Ze="light-prod";function Je(){const e=O(Be())??Ze;return ue(e)}function mt(e){const n=dt(e);n&&ft(n)}function en(e=new URLSearchParams(window.location.search)){const n=Xn(window.location.href),t=qe(e),s=t?ue(t):{},o={audience:n.audience??s.audience,flags:{...s.flags??{},...n.flags??{}}};return e.has("no-ops")&&(o.flags={...o.flags,"ops.control":!1}),o}function pt(){const e=Zn(it);return{flags:e.flags,audience:e.audience??void 0}}function js(){if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return mt(e),{sharedConfig:Ye(Je(),Xe()),url:en(e)}}function ht(e){const n=typeof window>"u"?{}:{sharedConfig:Ye(Je(),Xe()),url:en(),local:pt()};return Gn({registry:ut,audience:ct,audienceOrder:at,layers:n,warnOnUnknown:!1}).isEnabled(e)}function nn(){return ht("ops.control")}const ne={sm:408,md:512,lg:616},tn=240,sn=640,gt=24,on="openscout:lane-deck:v1",wt=new Set(["web.ops","macos.lanes","hud.tail","web.embed"]),le=new Set(["sm","md","lg"]),rn={"web.ops":{defaultLaneWidth:"lg",showAutoLanes:!0},"macos.lanes":{defaultLaneWidth:"md",showAutoLanes:!0},"hud.tail":{defaultLaneWidth:"sm",showAutoLanes:!0,defaultHorizon:"30m"},"web.embed":{defaultLaneWidth:"md",showAutoLanes:!0}},It=rn["web.ops"];function de(e){return an(e)?rn[e]:It}const V={pinned_left:0,main:1,pinned_right:2};function an(e){return wt.has(e)}function Ns(e=window.location.search,n=window.location.pathname){const t=new URLSearchParams(e),s=t.get("profile")?.trim().toLowerCase();if(s&&an(s))return s;const o=t.get("embed")?.trim().toLowerCase();return o==="hud"?"hud.tail":o==="app"?"macos.lanes":n.includes("/lanes/embed")?"web.embed":(n.includes("/ops/lanes"),"web.ops")}function Bs(e=window.location.search){const n=new URLSearchParams(e),t=(n.get("lanes")??n.get("size"))?.trim().toLowerCase();return t&&le.has(t)?t:"lg"}function Ms(e,n){if(typeof e=="number"&&Number.isFinite(e))return Math.min(sn,Math.max(tn,Math.round(e)));const t=typeof e=="string"&&le.has(e)?e:n;return ne[t]}function zs(e){const n=Math.min(sn,Math.max(tn,Math.round(e)));let t=null,s=Number.POSITIVE_INFINITY;for(const[o,r]of Object.entries(ne)){const i=Math.abs(r-n);i<s&&(s=i,t=o)}return t&&s<=gt?{px:ne[t],tier:t}:{px:n,tier:null}}function fe(e,n,t){return{version:1,profileId:e,defaultLaneWidth:n??t.defaultLaneWidth,defaultHorizon:t.defaultHorizon,laneWidths:{},laneDefs:[],slots:[],showAutoLanes:t.showAutoLanes,updatedAt:Date.now()}}function Pe(e,n){const t=de(e);return fe(e,n,t)}function te(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&le.has(e))return e}function vt(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.id!="string"||!n.id.trim()||n.kind!=="session"&&n.kind!=="harness"&&n.kind!=="project"&&n.kind!=="attention"||typeof n.title!="string"||!n.title.trim()?null:{id:n.id.trim(),kind:n.kind,title:n.title.trim(),sessionId:typeof n.sessionId=="string"?n.sessionId.trim():void 0,harness:typeof n.harness=="string"?n.harness.trim():void 0,projectPath:typeof n.projectPath=="string"?n.projectPath.trim():void 0}}function St(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.id!="string"||!n.id.trim()||typeof n.laneDefId!="string"||!n.laneDefId.trim()||n.zone!=="pinned_left"&&n.zone!=="main"&&n.zone!=="pinned_right"||typeof n.position!="number"||!Number.isFinite(n.position)?null:{id:n.id.trim(),laneDefId:n.laneDefId.trim(),zone:n.zone,position:n.position,width:te(n.width)}}function cn(e,n,t,s){if(!e||typeof e!="object")return fe(n,t,s);const o=e,r=Array.isArray(o.laneDefs)?o.laneDefs.map(vt).filter(d=>d!==null):[],i=Array.isArray(o.slots)?o.slots.map(St).filter(d=>d!==null):[],a={};if(o.laneWidths&&typeof o.laneWidths=="object")for(const[d,f]of Object.entries(o.laneWidths)){const v=te(f);v!==void 0&&(a[d]=v)}const u=te(o.defaultLaneWidth);return{version:1,profileId:n,defaultLaneWidth:(typeof u=="string"?u:void 0)??t??s.defaultLaneWidth,defaultHorizon:typeof o.defaultHorizon=="string"?o.defaultHorizon:s.defaultHorizon,laneWidths:a,laneDefs:r,slots:i,showAutoLanes:typeof o.showAutoLanes=="boolean"?o.showAutoLanes:s.showAutoLanes,updatedAt:typeof o.updatedAt=="number"?o.updatedAt:Date.now()}}function bt(e,n,t){return cn(e,n,t,de(n))}function Ws(e,n){const t=de(e),s=n??t.defaultLaneWidth;try{const o=localStorage.getItem(`${on}:${e}`);return o?bt(JSON.parse(o),e,s):Pe(e,s)}catch{return Pe(e,s)}}function Lt(e){try{localStorage.setItem(`${on}:${e.profileId}`,JSON.stringify({...e,updatedAt:Date.now()}))}catch{}}function Ks(e){return[...e].sort((n,t)=>{const s=V[n.zone]-V[t.zone];return s!==0?s:n.position-t.position})}function Gs(e,n){return V[e]-V[n]}function un(){return`slot:${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function me(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Y(e){return`session:${e}`}function yt(e){return`harness:${me(e)}`}function Et(e){return`project:${me(e)}`}const $t="attention:needs-input";function ln(e,n){const t=e.filter(s=>s.zone===n);return t.length===0?0:Math.max(...t.map(s=>s.position))+1}function dn(e,n){const t=e.laneDefs.some(s=>s.id===n.id);return{...e,laneDefs:t?e.laneDefs.map(s=>s.id===n.id?n:s):[...e.laneDefs,n]}}function fn(e,n){const t=e.slots.some(s=>s.id===n.id);return{...e,slots:t?e.slots.map(s=>s.id===n.id?n:s):[...e.slots,n]}}function mn(e,n){return{...e,slots:e.slots.filter(t=>t.laneDefId!==n)}}function Rt(e,n){const t=Y(n);return{...mn(e,t),laneDefs:e.laneDefs.filter(s=>s.id!==t)}}function Vs(e,n){const t=Y(n);return e.slots.some(s=>s.laneDefId===t&&s.zone!=="main")}function Hs(e,n){const t=Y(n),s=e.slots.find(o=>o.laneDefId===t);return!s||s.zone==="main"?null:s.zone}function Ys(e,n){const t=n.zone??"pinned_left",s=Y(n.laneId),o=Rt(e,n.laneId),r=dn(o,{id:s,kind:"session",title:n.title,sessionId:n.laneId});return fn(r,{id:un(),laneDefId:s,zone:t,position:ln(r.slots,t),width:n.width})}function qs(e,n){const t=n.zone??"pinned_left",s=n.kind==="attention"?$t:n.kind==="harness"&&n.harness?yt(n.harness):n.kind==="project"&&n.projectPath?Et(n.projectPath):`${n.kind}:${me(n.title)}`,o=mn(e,s),r=dn(o,{id:s,kind:n.kind,title:n.title,harness:n.harness,projectPath:n.projectPath});return fn(r,{id:un(),laneDefId:s,zone:t,position:ln(r.slots,t),width:n.width})}function Qs(e,n,t){return{...e,laneWidths:{...e.laneWidths,[n]:t},updatedAt:Date.now()}}function Xs(e,n){return{...e,defaultLaneWidth:n,updatedAt:Date.now()}}function Zs(e){const n=new Set(e.slots.filter(t=>t.zone!=="main").map(t=>t.laneDefId));return{...e,slots:e.slots.filter(t=>t.zone==="main"),laneDefs:e.laneDefs.filter(t=>!n.has(t.id))}}const H="scope.lanes",se={defaultLaneWidth:"md",showAutoLanes:!0,defaultHorizon:"30m"},Pt="openscout:lane-deck:v1";function Ce(e){return fe(H,e,se)}function Js(e){const n=e??se.defaultLaneWidth;try{const t=localStorage.getItem(`${Pt}:${H}`);return t?cn(JSON.parse(t),H,n,se):Ce(n)}catch{return Ce(n)}}function eo(e){Lt(e)}const Ct=[h.lanes,h.tail,h.sessions,h.agents];function _t(e){return Ct.includes(e)}function At(e){return e===Nn||e===Bn}function pn(e){return jn(e)}function q(e,n={}){switch(e){case h.tail:{const t=new URLSearchParams;n.tailQuery&&t.set("q",n.tailQuery);const s=t.toString();return k(e,s?`?${s}`:"")}case h.sessions:return n.sessionId?k(e,`/${encodeURIComponent(n.sessionId)}`):k(e);case h.lanes:return k(Z);case h.agents:return k(e);default:return k(Z)}}function hn(e){switch(e.view){case"ops":return!e.mode||e.mode==="lanes"?h.lanes:e.mode==="tail"?h.tail:null;case"sessions":return e.agentId?null:h.sessions;case"agents-v2":return e.agentId||e.projectSlug||e.sessionId||e.conversationId?null:h.agents;default:return null}}function Ut(e){const n=hn(e);return n?n===h.tail&&e.view==="ops"?q(n,{tailQuery:e.tailQuery}):n===h.sessions&&e.view==="sessions"?q(n,{sessionId:e.sessionId}):q(n):null}function kt(e,n,t){if(!At(e[0]))return null;const s=e[1]??Z;if(!_t(s))return{view:"ops",mode:"lanes"};switch(s){case h.tail:{const o=n.searchParams.get("q")?.trim();return{view:"ops",mode:"tail",...o?{tailQuery:o}:{}}}case h.sessions:return e[2]?t({view:"sessions",sessionId:decodeURIComponent(e[2])}):t({view:"sessions"});case h.agents:return t({view:"agents-v2"});case h.lanes:default:return{view:"ops",mode:"lanes"}}}const Tt=new Set(["no-ops","ffBundle","ffVariant","scoutBundle","scoutExperience","ab","ffGlobal","scoutGlobalBundle","ffPersist","persistBundle","ffAudience","studio","studioInjection","studioMode"]),Ft=["ff.","studio.","studioMode."];function Dt(e){return Tt.has(e)||Ft.some(n=>e.startsWith(n))}const Ot=[{key:"open",prefix:"/messages"}];function xt(e,n){return Ot.some(t=>t.key===e&&(n===t.prefix||n.startsWith(`${t.prefix}/`)))}function gn(e,n=""){const t=new URL(e,"http://scout.local");new URLSearchParams(n).forEach((r,i)=>{!Dt(i)&&!xt(i,t.pathname)||t.searchParams.has(i)||t.searchParams.set(i,r)});const o=t.searchParams.toString();return`${t.pathname}${o?`?${o}`:""}`}function no(e){switch(e){case h.tail:return{view:"ops",mode:"tail"};case h.sessions:return{view:"sessions"};case h.agents:return{view:"agents-v2"};case h.lanes:default:return{view:"ops",mode:"lanes"}}}function jt(e=typeof window<"u"?window.location.pathname:""){return pn(e)}function to(){return H}function so(e=jt()){return e?{"data-scope-presentation":!0}:void 0}function wn(e,n=typeof window<"u"?window.location.pathname:""){return pn(n)?Ut(e):null}function Nt(e,n=typeof window<"u"?window.location.pathname:""){return wn(e,n)!==null}function oo(e,n=typeof window<"u"?window.location.pathname:""){return Nt(e,n)?hn(e):null}const ro={days:3,sessionLimit:200,hitLimit:60,debounceMs:180};function oe(e){return e.root==="HOME"?`~/${e.relPath}`:e.root==="ABSOLUTE"?e.relPath:`$${e.root}/${e.relPath}`}function _e(e){const n=e?.trim();if(!n)return null;const t=n.replace(/[\\/]+$/,""),s=t.split(/[\\/]/).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function A(e){return e.sourceRefs.find(n=>n.kind==="harness_transcript")??null}function In(e){return e.sourceRefs.find(n=>n.kind==="file")??null}function pe(e){return e?_e(e.sessionId)??_e(oe(e.path)):null}function ao(e){const n=pe(e);if(!n)return null;const t=e?.recordRange;return t?`${n}|records ${t[0]}..${t[1]}`:n}function M(e,n){const t=e.facets[n];return Array.isArray(t)?t.filter(Boolean).join(", "):typeof t=="string"?t:""}function N(e){const n=new Set;return e.split(/[^A-Za-z0-9_./-]+/u).map(t=>t.trim()).filter(t=>t.length>1).filter(t=>{const s=t.toLowerCase();return n.has(s)?!1:(n.add(s),!0)}).slice(0,12)}const Bt=/^(events?\s+window(\s+\d+)?|files?\s+touched|tool\s+calls?|indexed\s+snippet|manifest|summary|decisions?|context\s+pack)\b/iu,Ae=/^(claude|codex|kimi|cursor|gpt|gemini)\b/iu,Ue=/^(?:claude|codex|kimi|cursor|gpt|gemini)?\s*[a-z0-9._/-]*\s*(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\s+\d{1,2}(?:\s+at\s+\d{1,2}:\d{2}\s*(?:am|pm)?)?\s*[-–—:]\s*/iu;function vn(e){return Bt.test(e.replace(/\s+/g," ").trim())}function Mt(e){let n=e.replace(/\s+/g," ").trim();if(!n)return"";if(n=n.replace(/<[^>\n]+>/g," ").replace(/\s+/g," ").trim(),Ue.test(n))n=n.replace(Ue,"").trim();else{const t=n.match(/^(.{6,72}?)\s[-–—]\s+(.+)$/u);if(t){const s=t[1]??"",o=t[2]??"";(Ae.test(s)||/\b(?:am|pm|\d{1,2}:\d{2}|plugin|session|openscout)\b/iu.test(s))&&(n=o.trim())}}return n=n.replace(Ae,"").replace(/^\s*[-–—:]\s*/,"").trim(),n=n.replace(/\s{2,}/g," ").trim(),n.length>72&&(n=`${n.slice(0,69).replace(/\s+\S*$/u,"").trimEnd()}…`),n}function zt(e){const n=M(e,"project"),t=e.title.replace(/\s+/g," ").trim();if(t&&!vn(t)){const o=Mt(t);if(o&&o.toLowerCase()!==n.toLowerCase()||o)return o}if(n)return n;const s=pe(A(e));return s?s.length>18?`${s.slice(0,16)}…`:s:"Session match"}function Sn(e){const n=B(e,"recordKind",8).map(s=>s.toLowerCase());if(n.length===0&&n.push(...B(e,"recordTag",8).map(s=>s.toLowerCase())),n.some(s=>s.includes("assistant")))return"assistant";if(n.some(s=>s.includes("user")))return"user";if(n.some(s=>s.includes("tool")||s.includes("command")||s.includes("response")))return"tool";const t=ge(e);return t==="tool activity"?"tool":t==="overview"?"overview":""}function io(e,n){const t=we(e.snippet,n),s=Sn(e),o=he(e);let r="";if(t){const i=N(n).map(d=>d.toLowerCase()),a=t.split(new RegExp("(?<=[.!?])\\s+|\\s+[–—]\\s+|\\s+·\\s+","u")).map(d=>d.replace(/^…+|…+$/gu,"").trim()).filter(d=>d.length>12);r=((i.length>0?a.find(d=>i.some(f=>re(d,f)>=0)):void 0)??a[0]??t).replace(/^…+|…+$/gu,"").trim()}return r?(r.length>78&&(r=`${r.slice(0,75).replace(/\s+\S*$/u,"").trimEnd()}…`),r):s&&o?`${s} · ${o}`:o||s||zt(e)}function Wt(e){return e.freshness&&e.freshness!=="unknown"?e.freshness:e.title.replace(/\s+/g," ").trim().match(/\b((?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\s+\d{1,2}(?:\s+at\s+\d{1,2}:\d{2}\s*(?:AM|PM)?)?)\b/iu)?.[1]??""}function ke(e){const n=e.trim().toLowerCase();return n?n==="events"||n.startsWith("events")?"conversation":n==="overview"||n==="summary"?"overview":n==="tool-calls"||n==="tools"?"tool activity":n==="files"||n==="files-touched"?"files touched":n==="manifest"?"session index":n.replace(/[-_]+/g," "):""}function Kt(e){const n=e.trim();return n?n.charAt(0).toUpperCase()+n.slice(1):""}function Gt(e){const n=M(e,"harness")||A(e)?.harness||"";if(!n)return"";const t=n.toLowerCase();return t==="claude"?"Claude":t==="codex"?"Codex":t==="kimi"?"Kimi":t==="cursor"?"Cursor":Kt(n)}function Vt(e){const n=M(e,"sessionId").trim(),t=pe(A(e)),s=(n||t||"").trim();return s?s.length>14?s.slice(0,8):s:""}function he(e){const n=A(e)?.recordRange;if(n){const[s,o]=n;return s===o?`turn ${s}`:o-s<=1?`turns ${s}–${o}`:`turns ${s}–${o}`}const t=e.title.match(/events?\s+window\s+(\d+)/iu);return t?`window ${Number(t[1])}`:""}function Ht(e){const n=B(e,"recordKind",8).map(s=>s.toLowerCase());n.length===0&&n.push(...B(e,"recordTag",8).map(s=>s.toLowerCase()));const t=[];return n.some(s=>s.includes("user"))&&t.push("user"),n.some(s=>s.includes("assistant"))&&t.push("assistant"),n.some(s=>s.includes("tool")||s.includes("command")||s.includes("response"))&&t.push("tool"),t.length===0?"":t.join(" · ")}function ge(e){const n=M(e,"documentKind");if(n){const s=n.split(",")[0]?.trim()??n;return ke(s)}return vn(e.title)?ke(e.title):In(e)?"file":A(e)?"conversation":""}function B(e,n,t=3){const s=e.facets[n];return(Array.isArray(s)?s:typeof s=="string"?s.split(","):[]).map(r=>r.trim()).filter(Boolean).slice(0,t)}function co(e){return{agent:Gt(e),project:M(e,"project"),session:Vt(e),when:Wt(e),turn:he(e),role:Ht(e),where:ge(e)}}function uo(e){const n=[],t=he(e);t&&n.push(t);const s=Sn(e);s&&n.push(s);const o=ge(e);o&&o!=="conversation"&&n.push(o);const r=B(e,"toolName",2);r.length===1&&n.push(r[0]),r.length>1&&n.push(r.join(", "));const i=new Set;return n.filter(a=>{const u=a.toLowerCase();return i.has(u)?!1:(i.add(u),!0)})}function re(e,n){return new RegExp(`(?<![A-Za-z0-9_./~-])${yn(n)}(?![A-Za-z0-9_./~-])`,"iu").exec(e)?.index??-1}function we(e,n=""){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(t=t.replace(/\s*-\s*\[\d{3,}\]\s*`[^`]+`(?:\s*\([^)]*\))?\s*-\s*/gu," "),t=t.replace(/\[\d{3,}\]\s*`[^`]+`\s*/gu,""),t=t.replace(/\*\*/gu,""),t=t.replace(/\b(?:assistant_turn|user_turn|agent_reasoning|command_or_tool|response_item|system_record)\b/giu," "),t=t.replace(/(?:~\/|\.\.?\/|\/(?:Users|home|var|tmp|opt)\/)\S+/gu," "),t=t.replace(/https?:\/\/\S+/gu," "),t=t.replace(/\b[\w.-]+\.(?:com|net|org|io|dev|app)(?:\/\S*)?/giu," "),t=t.replace(/\{[^{}]{0,160}\}/gu," "),t=t.replace(/`[^`]{0,64}`/gu,r=>{const i=r.slice(1,-1);return N(n).some(a=>re(i,a)>=0)||/^[A-Za-z][\w.-]{0,24}$/u.test(i)?i:" "}),t=t.replace(/\s{2,}/g," ").trim(),t=t.replace(/^[\s,;:.\-–—|/]+/u,"").trim(),t.includes("{")||t.includes("[")){const r=t.search(/[\[{]/u);if(r>18){const i=t.slice(0,r).trim().replace(/[-–—,:;]+$/u,"").trim();i&&(t=i)}}const s=N(n),o=200;if(s.length>0&&t.length>o){let r=-1;for(const i of s){const a=re(t,i);a>=0&&(r<0||a<r)&&(r=a)}if(r<0)for(const i of s){if(i.length<4)continue;const a=t.toLowerCase().indexOf(i.toLowerCase());a>=0&&(r<0||a<r)&&(r=a)}if(r>=0){const a=Math.max(0,r-48),u=Math.min(t.length,a+o),d=t.slice(a,u).trim();t=`${a>0?"…":""}${d}${u<t.length?"…":""}`}else t=`${t.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`}else t.length>o&&(t=`${t.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`);return t.replace(/\s{2,}/g," ").trim()}function lo(e,n,t){const s=we(e.snippet,n);return s.length<=t?s:`${s.slice(0,t-1).replace(/\s+\S*$/u,"").trimEnd()}…`}function Yt(e,n){return N(n).filter(t=>{const s=t.toLowerCase();return e.title.toLowerCase().includes(s)||e.snippet.toLowerCase().includes(s)||we(e.snippet,n).toLowerCase().includes(s)})}function bn(e){const n=(e.kind||e.role||e.type||"record").toLowerCase();return n==="assistant_turn"||n==="assistant"?"assistant":n==="user_turn"||n==="user"?"user":n==="system_record"||n==="system"?"system":n==="command_or_tool"||n==="tool_use"?"tool":n==="response_item"?"tool output":n==="agent_reasoning"||n==="reasoning"?"reasoning":n.replace(/_/gu," ")}function Ln(e){const n=(e.kind||e.role||e.type||"").toLowerCase();return n==="assistant"||n==="assistant_turn"||n==="user"||n==="user_turn"||n==="last-prompt"||n==="ai-title"?0:n==="system"||n==="system_record"||n.includes("reasoning")?1:2}function fo(e){return e.scoreSource==="hybrid"?"Words and meaning":e.scoreSource==="vector"?"Similar in meaning":"Exact words"}function mo(e,n,t){const s=Yt(e,n),o=s.length===1?`Matched “${s[0]}”`:s.length>1?`Matched ${s.length} terms`:"Matched in this session";if(!t?.matched)return o;const r=[t.renderedText,t.summary].filter(Boolean).join(" ").toLowerCase(),i=s.filter(d=>r.includes(d.toLowerCase()));if(i.length===0)return o;const a=bn(t),u=a==="assistant"?"an assistant reply":a==="user"?"your message":a==="tool"?"a tool call":a==="tool output"?"tool output":a==="system"?"a system record":a==="reasoning"?"agent reasoning":`a ${a} record`;return i.length===1?`Matched “${i[0]}” in ${u}`:`Matched ${i.length} terms in ${u}`}function po(e){const n=A(e);if(n){const s=oe(n.path),o=n.recordRange;return o?`${s}#R${o[0]}-R${o[1]}`:s}const t=In(e);if(t){const s=oe(t.path),o=t.lineRange;return o?`${s}#L${o[0]}-L${o[1]}`:s}return e.id}function qt(e){const n=e.filter(o=>Ln(o)===2).length,t=e.length-n,s=e.some(o=>o.matched)?" · match inside":"";return n>0&&t===0?`${n} tool step${n===1?"":"s"}${s}`:n===0?`${t} process step${t===1?"":"s"}${s}`:`${n} tool + ${t} process step${e.length===1?"":"s"}${s}`}function Qt(e){return`${e.length} more conversation turn${e.length===1?"":"s"}`}function ho(e,n={}){if(e.length===0)return[];const t=n.contextRadius??3,s=n.maxTurns??6,o=n.centerRecordIndex===void 0?-1:e.findIndex(g=>g.index===n.centerRecordIndex),r=e.findIndex(g=>g.matched),i=o>=0?o:r>=0?r:0,a=e.slice(Math.max(0,i-t),Math.min(e.length,i+t+1)),u=[];let d=[],f=[],v=0;const P=()=>{d.length!==0&&(u.push({kind:"folded",records:d,summary:qt(d)}),d=[])},y=()=>{f.length!==0&&(u.push({kind:"folded",records:f,summary:Qt(f)}),f=[])};for(const g of a){if(Ln(g)>0){y(),d.push(g);continue}if(P(),v>=s){f.push(g);continue}u.push({kind:"turn",record:g,role:bn(g)}),v+=1}return P(),y(),u}function Te(e){const n=A(e)?.recordRange;return n?n[0]:Number.MAX_SAFE_INTEGER}function go(e){const n=[],t=new Map;for(const s of e){const o=s.collectionId||s.id,r=t.get(o);r?r.push(s):(n.push(o),t.set(o,[s]))}return n.map(s=>{const o=[...t.get(s)??[]].sort((i,a)=>{const u=Te(i)-Te(a);return u!==0?u:i.score-a.score}),r=t.get(s)?.[0]??o[0];return{collectionId:s,best:r,moments:o}})}function yn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wo(e,n){const t=N(n);if(t.length===0||e.length===0)return[{text:e,match:!1}];const s=t.map(a=>`(?<![A-Za-z0-9_./~-])${yn(a)}(?![A-Za-z0-9_./~-])`),o=new RegExp(`(${s.join("|")})`,"giu"),r=[];let i=0;for(const a of e.matchAll(o)){const u=a.index??0;u>i&&r.push({text:e.slice(i,u),match:!1}),r.push({text:a[0],match:!0}),i=u+a[0].length}return i<e.length&&r.push({text:e.slice(i),match:!1}),r.length>0?r:[{text:e,match:!1}]}const Io={sessions:"Sessions",skills:"Skills",mcp:"MCP",codebase:"Codebase",context_pack:"Context packs",mixed:"Mixed"},En=[{value:"1",label:"Last 24h"},{value:"3",label:"Last 3 days"},{value:"7",label:"Last 7 days"},{value:"30",label:"Last 30 days"}],vo=["sessions","skills","mcp","codebase","context_pack"];function So(){return{query:"",sourceKinds:[],harness:[],project:[],timeWindow:"all"}}function Xt(e){return e?En.some(n=>n.value===e):!1}function Q(e){return e?e.split(",").map(n=>n.trim()).filter(n=>n.length>0):[]}function Zt(e){const n=e==null?new URLSearchParams:typeof e=="string"?new URLSearchParams(e):e,t=n.get("time"),s=Xt(t)?t:"all";return{query:n.get("q")?.trim()??"",sourceKinds:Q(n.get("source")),harness:Q(n.get("harness")),project:Q(n.get("project")),timeWindow:s}}function Jt(e,n={}){const t=new URLSearchParams,s=e.query.trim();return s&&t.set("q",s),e.sourceKinds.length>0&&t.set("source",e.sourceKinds.join(",")),e.harness.length>0&&t.set("harness",e.harness.join(",")),e.project.length>0&&t.set("project",e.project.join(",")),e.timeWindow!=="all"&&t.set("time",e.timeWindow),n.hitId&&t.set("hit",n.hitId),t}function bo(e,n){return e.query.trim()===n.query.trim()&&e.timeWindow===n.timeWindow&&X(e.sourceKinds,n.sourceKinds)&&X(e.harness,n.harness)&&X(e.project,n.project)}function X(e,n){if(e.length!==n.length)return!1;const t=[...e].map(o=>o.trim().toLowerCase()).sort(),s=[...n].map(o=>o.trim().toLowerCase()).sort();return t.every((o,r)=>o===s[r])}function es(e){return e.query.trim().length>0||e.sourceKinds.length>0||e.harness.length>0||e.project.length>0||e.timeWindow!=="all"}function Lo(e){if(e==="all")return null;const n=Number.parseInt(e,10);return!Number.isFinite(n)||n<=0?null:Date.now()-n*24*60*60*1e3}function yo(e){return e==="all"?"Any time":En.find(t=>t.value===e)?.label??e}const $n=typeof window<"u"?window.location.href:"http://scout.local/";function Rn(e){const n=e.toString();return new URL(n,$n)}function ns(e){switch(e){case"profile":case"config":case"definitions":return e==="definitions"?"config":e;case"observe":case"message":return e;default:return}}function ts(e){const n=e.trim().replace(/^#/,"");if(!n.startsWith("msg-"))return null;const t=n.slice(4).trim();if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}function ss(e){switch(e){case"control":case"mission":case"command":case"warroom":case"conduct":case"conductor":return"mission";case"plan":case"advisor":return"advisor";case"issues":case"errors":case"warnings":return"issues";case"agents":case"tail":case"atop":case"lanes":case"world":return e;default:return}}function os(e){return e==="delivered"||e==="failed"||e==="all"?e:void 0}function rs(e){return e==="indexer"||e==="knowledge"?e:void 0}function as(e){switch(e){case"pairing":case"agents":case"appearance":case"operator":case"comms":case"credentials":case"voice":case"devices":case"about":return e;case"communications":return"comms";default:return}}function is(e){switch(e){case"tail":case"session":case"chat":case"work":return e;default:return}}function cs(e){const n=e?.trim().replace(/\.+$/u,"");return n==="observe"||n==="takeover"?n:void 0}function us(e){const n=e?.trim().toLowerCase();return n==="pty"||n==="tmux"||n==="zellij"||n==="herdr"?n:void 0}function ls(e){const n=e?.trim().toLowerCase();return n==="shell"||n==="claude"||n==="codex"||n==="pi"?n:void 0}function ds(e){return e==="all"||e==="touched"?"all":e==="changed"?"changed":void 0}function Fe(e){if(!e)return;const n=Number.parseInt(e,10);return Number.isSafeInteger(n)&&n>0?n:void 0}function De(e){return e==="mission"?"control":e}function fs(e){return e.searchParams.has("no-ops")?!1:typeof window>"u"?!0:nn()}function ms(e){return e==="tail"}function ps(e){return e==="lanes"||e==="world"}function Pn(e){return ms(e)||ps(e)}const Ie="machineId",Cn=new Set(["inbox","conversation","agents-v2","messages","sessions","repos","harnesses","mesh","mesh-ops","activity","work","follow"]);function hs(e){return e.searchParams.get(Ie)?.trim()||void 0}function gs(e,n){return!n||!Cn.has(e.view)?e:{...e,machineId:n}}function ve(e){return Cn.has(e.view)}function ws(e){return"machineId"in e&&e.machineId?e.machineId:null}function Oe(e,n){if(!ve(e))return e;const t={...e},s=n?.trim();return s?t.machineId=s:delete t.machineId,t}function Eo(e){return ve(e)?{...e,machineId:""}:e}function Is(e,n){return ve(e)?"machineId"in e?Oe(e,e.machineId??null):Oe(e,ws(n)):e}function _(e,n){"machineId"in n&&n.machineId&&e.set(Ie,n.machineId)}function I(e){const n=e.toString();return n?`?${n}`:""}function T(e,n){const t=new URLSearchParams;return _(t,n),`${e}${I(t)}`}function vs(e){return"machineId"in e&&e.machineId?`:machine:${e.machineId}`:""}function Se(e){const n=Rn(e),t=n.pathname.replace(/^\/+/,"").split("/").filter(Boolean);if(t[0]==="embed"&&["home","search","ops"].includes(t[1]??"")){const c=new URL(n),l=t[1],m=n.searchParams.get("mode");c.pathname=l==="home"?"/":`/${l}${m?`/${encodeURIComponent(m)}`:""}`,c.searchParams.delete("mode");const p=Se(c);return l==="ops"&&p.view==="inbox"?{...p,view:"ops",mode:"tail"}:p}const s=hs(n),o=c=>gs(c,s),r=kt(t,n,o);if(r)return r;const i=ts(n.hash),a=ns(n.searchParams.get("tab"))??(i?"message":void 0),u=n.searchParams.get("project")?.trim()||void 0,d=n.searchParams.get("agentId")?.trim()||void 0;if(t[0]==="agent"&&t[1])return{view:"agent-info",conversationId:decodeURIComponent(t[1])};const f=n.searchParams.get("project")?.trim()||void 0,v=n.searchParams.get("harness")?.trim()||void 0,P=n.searchParams.get("node")?.trim()||void 0,y=n.searchParams.get("set")?.trim(),g=y==="live"||y==="ephemeral"||y==="archived"?y:void 0,x=n.searchParams.get("view")?.trim(),z=x==="sessions"||x==="agents"?x:void 0,U=n.searchParams.get("state")?.trim(),be=U==="needs"||U==="live"||U==="idle"?U:void 0,Fn=n.searchParams.get("ephemeral")==="1",W=n.searchParams.get("session")?.trim()||void 0,b=n.searchParams.get("select")?.trim()||void 0,E={...v?{harness:v}:{},...P?{node:P}:{},...g?{set:g}:{},...z?{indexView:z}:{},...be?{stateFilter:be}:{},...Fn?{showEphemeral:!0}:{}};if(t[0]==="projects"){const c=t[1]?decodeURIComponent(t[1]):void 0;if(!c)return o({view:"agents-v2",...b?{selectedAgentId:b}:{},...E});if(t[2]==="agents"){const l=t[3]?decodeURIComponent(t[3]):void 0;if(l){if(t[4]==="c"&&t[5])return o({view:"agents-v2",projectSlug:c,agentId:l,conversationId:decodeURIComponent(t[5]),tab:a??"message",...E});const m=t[4]==="sessions"&&t[5]?decodeURIComponent(t[5]):W;return o({view:"agents-v2",projectSlug:c,agentId:l,...m?{sessionId:m}:{},...a?{tab:a}:{},...E})}return o({view:"agents-v2",projectSlug:c,indexView:"agents",...b?{selectedAgentId:b}:{},...E})}return t[2]==="sessions"?o({view:"agents-v2",projectSlug:c,indexView:"sessions",...t[3]?{sessionId:decodeURIComponent(t[3])}:{},...b?{selectedAgentId:b}:{},...E}):o({view:"agents-v2",projectSlug:c,...b?{selectedAgentId:b}:{},...E})}if(t[0]==="agents-v2"&&t[1]==="sessions"&&t[2])return o({view:"agents-v2",sessionId:decodeURIComponent(t[2]),...b?{selectedAgentId:b}:{},...f?{projectSlug:f}:{},...E});if(t[0]==="agents-v2"&&t[1]){const c=decodeURIComponent(t[1]);return o({view:"agents-v2",agentId:c,...a?{tab:a}:{},...W?{sessionId:W}:{},...f?{projectSlug:f}:{},...E})}if(t[0]==="agents-v2")return o({view:"agents-v2",...b?{selectedAgentId:b}:{},...f?{projectSlug:f}:{},...E});if(t[0]==="agents"&&t[1]){const c=decodeURIComponent(t[1]),l=t[2]==="sessions"&&t[3]?decodeURIComponent(t[3]):W;return t[2]==="c"&&t[3]?o({view:"agents-v2",agentId:c,conversationId:decodeURIComponent(t[3]),tab:a??"message",...E}):o({view:"agents-v2",agentId:c,...l?{sessionId:l}:{},...a?{tab:a}:{},...E})}if(t[0]==="agents")return o({view:"agents-v2",...b?{selectedAgentId:b}:{},...f?{projectSlug:f}:{},...E});if(t[0]==="agents.deprecated"&&t[1]&&t[2]==="sessions"&&t[3])return o({view:"sessions",agentId:decodeURIComponent(t[1]),sessionId:decodeURIComponent(t[3])});if(t[0]==="agents.deprecated"&&t[1]&&t[2]==="c"&&t[3])return o({view:"agents-v2",agentId:decodeURIComponent(t[1]),conversationId:decodeURIComponent(t[3]),tab:a??"message"});if(t[0]==="agents.deprecated"&&t[1]){const c=decodeURIComponent(t[1]);return o({view:"agents-v2",agentId:c,...a?{tab:a}:{},...!a&&u?{projectSlug:u}:{}})}if(t[0]==="agents.deprecated")return o({view:"agents-v2",...u?{projectSlug:u}:{}});if(t[0]==="fleet")return o({view:"inbox"});if(t[0]==="c"&&t[1])return o({view:"conversation",conversationId:decodeURIComponent(t[1])});if(t[0]==="flights"&&t[1]&&t[2]==="observe"){const c=n.searchParams.get("session")?.trim()||void 0,l=n.searchParams.get("compare")?.trim()||void 0;return o({view:"sessions",flightId:decodeURIComponent(t[1]),...c?{sessionId:c}:{},...l?{compareSessionId:l}:{}})}if(t[0]==="sessions"&&t[1])return o({view:"sessions",sessionId:decodeURIComponent(t[1]),...d?{agentId:d}:{}});if(t[0]==="conversations")return o({view:"messages"});if(t[0]==="messages"){if(t[1]==="agent"&&t[2]){const l=n.searchParams.get("thread")?.trim()||void 0;return o({view:"messages",agentId:decodeURIComponent(t[2]),...l?{threadId:l}:{}})}const c={view:"messages",...t[1]?{conversationId:decodeURIComponent(t[1])}:{}};return o(c)}if(t[0]==="sessions")return o({view:"sessions",...d?{agentId:d}:{}});if(t[0]==="repos"){const c=n.searchParams.get("root")?.trim()||void 0;return o({view:"repos",...c?{root:c}:{}})}if(t[0]==="providers"||t[0]==="harnesses")return o({view:"harnesses"});if(t[0]==="repo-diff"){const c=n.searchParams.get("path")?.trim();if(c){const l=n.searchParams.getAll("layer").filter(w=>w==="unstaged"||w==="staged"||w==="branch"),m=n.searchParams.getAll("file").map(w=>w.trim()).filter(Boolean),p=n.searchParams.get("sessionId")?.trim()||void 0,S=n.searchParams.get("agentId")?.trim()||void 0,L=ds(n.searchParams.get("include"));return{view:"repo-diff",path:c,...l.length>0?{layers:l}:{},...m.length>0?{files:m}:{},...p?{sessionId:p}:{},...S?{agentId:S}:{},...L?{include:L}:{}}}}if(t[0]==="search"){const c=rs(t[1]),l=n.searchParams.get("hit")?.trim()||void 0,m=Zt(n.searchParams);return{view:"search",...c&&c!=="knowledge"?{mode:c}:{},...l?{hitId:l}:{},...es(m)?{filters:m}:{}}}if(t[0]==="channels"&&t[1])return o({view:"messages",conversationId:decodeURIComponent(t[1])});if(t[0]==="channels")return o({view:"messages"});if(t[0]==="network"||t[0]==="mesh")return o({view:"mesh"});if(t[0]==="mesh-ops")return o({view:"mesh-ops",...t[1]?{itemId:decodeURIComponent(t[1])}:{}});if(t[0]==="dispatch"||t[0]==="broker"){const c=n.searchParams.get("attempt")?.trim()||void 0,l=os(n.searchParams.get("filter"));return{view:"broker",...c?{attemptId:c}:{},...l&&l!=="all"?{filter:l}:{}}}if(t[0]==="code"){const c=n.searchParams.get("wt")?.trim()||void 0,l=n.searchParams.get("fromConversation")?.trim()||void 0,m=Fe(n.searchParams.get("line")),p=Fe(n.searchParams.get("endLine")),S=m&&p&&p>=m?p:void 0;if(t[1]){const R=decodeURIComponent(t[1]),$=t.length>2?t.slice(2).map(decodeURIComponent).join("/"):void 0;return{view:"code",project:R,...$?{path:$}:{},...c?{wt:c}:{},...m?{line:m}:{},...S?{endLine:S}:{},...l?{returnConversationId:l}:{}}}const L=n.searchParams.get("root")?.trim()||void 0,w=n.searchParams.get("file")?.trim()||void 0;return{view:"code",...L?{root:L}:{},...w?{file:w}:{},...c?{wt:c}:{},...m?{line:m}:{},...S?{endLine:S}:{},...l?{returnConversationId:l}:{}}}if(t[0]==="briefings"&&t[1])return{view:"briefings",briefingId:decodeURIComponent(t[1])};if(t[0]==="briefings")return{view:"briefings"};if(t[0]==="activity")return o({view:"activity"});if(t[0]==="voice")return{view:"voice"};if(t[0]==="work"&&t[1])return o({view:"work",workId:decodeURIComponent(t[1])});if(t[0]==="follow"){const c=is(n.searchParams.get("view")),l={view:"follow",...c?{preferredView:c}:{}},m=t[1],p=t[2]?decodeURIComponent(t[2]):"";m==="flight"&&p&&(l.flightId=p),m==="invocation"&&p&&(l.invocationId=p),m==="conversation"&&p&&(l.conversationId=p),m==="work"&&p&&(l.workId=p),m==="session"&&p&&(l.sessionId=p),m==="agent"&&p&&(l.targetAgentId=p);const S=n.searchParams.get("flightId"),L=n.searchParams.get("invocationId"),w=n.searchParams.get("conversationId"),R=n.searchParams.get("workId"),$=n.searchParams.get("sessionId"),Le=n.searchParams.get("targetAgentId");return S&&(l.flightId=S),L&&(l.invocationId=L),w&&(l.conversationId=w),R&&(l.workId=R),$&&(l.sessionId=$),Le&&(l.targetAgentId=Le),o(l)}if(t[0]==="settings"){if(t[1]==="agents")return{view:"settings",section:"agents",...t[2]?{agentId:decodeURIComponent(t[2])}:{}};const c=as(t[1]);return{view:"settings",...c?{section:c}:{}}}if(t[0]==="terminal"){const c=cs(n.searchParams.get("mode")),l=n.searchParams.get("session")?.trim()||void 0,m=zn(n.searchParams.get("surface"))??void 0;if(t[1]==="new"){const S=us(n.searchParams.get("backend"))??"pty",L=ls(n.searchParams.get("agent"))??"shell",w=n.searchParams.get("name")?.trim()||void 0,R=n.searchParams.get("tab")?.trim()||void 0,$=n.searchParams.get("socketDir")?.trim()||void 0;return{view:"terminal",terminalBackend:S,terminalAgent:L,...w?{terminalSessionName:w}:{},...R?{terminalTabId:R}:{},...$?{zellijSocketDir:$}:{}}}const p=t[1]==="s"&&t[2]?Me(decodeURIComponent(t.slice(2).join("/")))?decodeURIComponent(t.slice(2).join("/")):null:Wn(t[1]?decodeURIComponent(t[1]):void 0,t[2]?decodeURIComponent(t.slice(2).join("/")):void 0);return p?{view:"terminal",terminalSurfaceKey:p,...l?{terminalSessionId:l}:{},...c?{mode:c}:{}}:{view:"terminal",...t[1]?{agentId:decodeURIComponent(t[1])}:{},...c?{mode:c}:{},...!t[1]&&l?{terminalSessionId:l}:{},...!t[1]&&m?{terminalSurfaceKey:m}:{}}}if(t[0]==="ops"){const c=ss(t[1])??"mission";if(!Pn(c)&&!fs(n))return o({view:"inbox"});const l=c==="tail"?n.searchParams.get("q")?.trim():"",m=c==="advisor"?n.searchParams.get("plan")?.trim():"",p=n.searchParams.get("flightId")?.trim(),S=n.searchParams.get("invocationId")?.trim(),L=n.searchParams.get("conversationId")?.trim(),w=n.searchParams.get("workId")?.trim(),R=n.searchParams.get("sessionId")?.trim(),$=n.searchParams.get("targetAgentId")?.trim()??n.searchParams.get("agentId")?.trim();return{view:"ops",mode:c,...l?{tailQuery:l}:{},...m?{planDocumentId:m}:{},...p?{flightId:p}:{},...S?{invocationId:S}:{},...L?{conversationId:L}:{},...w?{workId:w}:{},...R?{sessionId:R}:{},...$?{targetAgentId:$}:{}}}return o({view:"inbox"})}function _n(e,n){const t=e.view==="sessions"&&e.flightId?null:wn(e,n);if(t)return t;switch(e.view){case"inbox":return T("/",e);case"conversation":{const s=new URLSearchParams;return _(s,e),`/c/${encodeURIComponent(e.conversationId)}${I(s)}`}case"agent-info":return`/agent/${encodeURIComponent(e.conversationId)}`;case"agents-v2":{const s=new URLSearchParams;e.harness&&s.set("harness",e.harness),e.node&&s.set("node",e.node),e.set&&s.set("set",e.set),!e.projectSlug&&e.indexView&&e.indexView!=="agents"&&s.set("view",e.indexView),e.stateFilter&&s.set("state",e.stateFilter),e.showEphemeral&&s.set("ephemeral","1"),e.selectedAgentId&&!e.agentId&&!e.sessionId&&s.set("select",e.selectedAgentId);const o=e.conversationId?"message":"profile";e.agentId&&e.tab&&e.tab!==o&&s.set("tab",e.tab),_(s,e);const r=e.projectSlug?`/projects/${encodeURIComponent(e.projectSlug)}`:null;return`${r?e.agentId?e.conversationId?`${r}/agents/${encodeURIComponent(e.agentId)}/c/${encodeURIComponent(e.conversationId)}`:e.sessionId?`${r}/agents/${encodeURIComponent(e.agentId)}/sessions/${encodeURIComponent(e.sessionId)}`:`${r}/agents/${encodeURIComponent(e.agentId)}`:e.sessionId?`${r}/sessions/${encodeURIComponent(e.sessionId)}`:e.indexView==="sessions"?`${r}/sessions`:e.indexView==="agents"?`${r}/agents`:r:e.agentId?e.conversationId?`/agents/${encodeURIComponent(e.agentId)}/c/${encodeURIComponent(e.conversationId)}`:e.sessionId?`/agents/${encodeURIComponent(e.agentId)}/sessions/${encodeURIComponent(e.sessionId)}`:`/agents/${encodeURIComponent(e.agentId)}`:e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/projects"}${I(s)}`}case"messages":{const s=new URLSearchParams;return e.agentId&&e.threadId&&s.set("thread",e.threadId),_(s,e),`${e.agentId?`/messages/agent/${encodeURIComponent(e.agentId)}`:e.conversationId?`/messages/${encodeURIComponent(e.conversationId)}`:"/messages"}${I(s)}`}case"sessions":{const s=new URLSearchParams;return e.agentId&&s.set("agentId",e.agentId),e.flightId?(e.sessionId&&s.set("session",e.sessionId),e.compareSessionId&&s.set("compare",e.compareSessionId),_(s,e),`/flights/${encodeURIComponent(e.flightId)}/observe${I(s)}`):(_(s,e),`${e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/sessions"}${I(s)}`)}case"repos":{const s=new URLSearchParams;return e.root&&s.set("root",e.root),_(s,e),`/repos${I(s)}`}case"harnesses":return T("/providers",e);case"repo-diff":{const s=new URLSearchParams;s.set("path",e.path);for(const o of e.layers??[])s.append("layer",o);for(const o of e.files??[])s.append("file",o);return e.sessionId&&s.set("sessionId",e.sessionId),e.agentId&&s.set("agentId",e.agentId),e.include&&s.set("include",e.include),`/repo-diff${I(s)}`}case"search":{const s=e.mode==="indexer"?"/search/indexer":"/search",o=e.filters?Jt(e.filters,{hitId:e.hitId??null}):new URLSearchParams;return!e.filters&&e.hitId&&o.set("hit",e.hitId),`${s}${I(o)}`}case"mesh":return T("/network",e);case"mesh-ops":return T(e.itemId?`/mesh-ops/${encodeURIComponent(e.itemId)}`:"/mesh-ops",e);case"broker":{const s=new URLSearchParams;return e.attemptId&&s.set("attempt",e.attemptId),e.filter&&e.filter!=="all"&&s.set("filter",e.filter),`/dispatch${I(s)}`}case"code":{const s=new URLSearchParams;if(e.wt&&s.set("wt",e.wt),e.line&&s.set("line",String(e.line)),e.line&&e.endLine&&e.endLine>=e.line&&s.set("endLine",String(e.endLine)),e.project){e.returnConversationId&&s.set("fromConversation",e.returnConversationId);const r=[encodeURIComponent(e.project)];return e.path&&r.push(...e.path.split("/").map(encodeURIComponent)),`${`/code/${r.join("/")}`}${I(s)}`}e.root&&s.set("root",e.root),e.file&&s.set("file",e.file),e.returnConversationId&&s.set("fromConversation",e.returnConversationId);const o=s.toString();return o?`/code?${o}`:"/code"}case"briefings":return e.briefingId?`/briefings/${encodeURIComponent(e.briefingId)}`:"/briefings";case"activity":return T("/activity",e);case"voice":return"/voice";case"work":return T(`/work/${encodeURIComponent(e.workId)}`,e);case"settings":return e.section==="agents"?e.agentId?`/settings/agents/${encodeURIComponent(e.agentId)}`:"/settings/agents":e.section?e.section==="pairing"?"/settings/pairing":e.section==="comms"?"/settings/comms":`/settings/${e.section}`:"/settings";case"ops":if(!e.mode)return"/ops";if(e.mode==="tail"||e.mode==="advisor"){const s=new URLSearchParams;return e.mode==="tail"&&e.tailQuery&&s.set("q",e.tailQuery),e.mode==="advisor"&&e.planDocumentId&&s.set("plan",e.planDocumentId),e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),`/ops/${De(e.mode)}${I(s)}`}return`/ops/${De(e.mode)}`;case"follow":{const s=new URLSearchParams;e.preferredView&&s.set("view",e.preferredView),e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),e.machineId&&s.set(Ie,e.machineId);const o=s.toString();return`/follow${o?`?${o}`:""}`}case"terminal":if(e.agentId){const s=new URLSearchParams;return e.mode&&s.set("mode",e.mode),`/terminal/${encodeURIComponent(e.agentId)}${I(s)}`}{const s=new URLSearchParams;if(e.terminalBackend)return e.terminalBackend!=="pty"&&s.set("backend",e.terminalBackend),e.terminalAgent&&e.terminalAgent!=="shell"&&s.set("agent",e.terminalAgent),e.terminalSessionName&&s.set("name",e.terminalSessionName),e.terminalTabId&&s.set("tab",e.terminalTabId),e.zellijSocketDir&&s.set("socketDir",e.zellijSocketDir),`/terminal/new${I(s)}`;e.mode&&s.set("mode",e.mode);const o=Kn(e.terminalSurfaceKey);return o?`/terminal/${encodeURIComponent(o.backend)}/${encodeURIComponent(o.sessionName)}${I(s)}`:Me(e.terminalSurfaceKey)?`/terminal/s/${encodeURIComponent(e.terminalSurfaceKey)}${I(s)}`:(e.terminalSessionId&&s.set("session",e.terminalSessionId),e.terminalSurfaceKey&&s.set("surface",e.terminalSurfaceKey),`/terminal${I(s)}`)}}}function j(e){const n=vs(e);switch(e.view){case"conversation":return`conv:${e.conversationId}${n}`;case"agent-info":return`agent-info:${e.conversationId}`;case"settings":return`settings:${e.section??"pairing"}:${e.agentId??""}`;case"agents-v2":return["agents-v2",e.projectSlug??"",e.harness??"",e.node??"",e.set??"",e.indexView??"agents",e.stateFilter??"",e.showEphemeral?"eph":"",e.agentId??"",e.sessionId??"",n].join(":");case"sessions":return e.flightId?`flight-observe:${e.flightId}:${e.sessionId??""}:${e.compareSessionId??""}${n}`:e.sessionId?`session:${e.agentId??""}:${e.sessionId}${n}`:`sessions${n}`;case"messages":return["messages",e.conversationId??"",e.agentId??"",e.threadId??"",n].join(":");case"work":return`work:${e.workId}${n}`;case"ops":return`ops:${e.mode??"advisor"}:${e.tailQuery??""}:${e.planDocumentId??""}:${e.flightId??""}:${e.invocationId??""}:${e.workId??""}:${e.conversationId??""}:${e.sessionId??""}:${e.targetAgentId??""}`;case"search":return`search:${e.mode??"knowledge"}:${e.hitId??""}`;case"broker":return`broker:${e.attemptId??""}`;case"follow":return`follow:${e.flightId??e.invocationId??e.conversationId??e.workId??e.sessionId??e.targetAgentId??""}:${e.preferredView??""}${n}`;case"terminal":return`terminal:${e.agentId??""}:${e.terminalSessionId??""}:${e.terminalSurfaceKey??""}:${e.terminalBackend??""}:${e.terminalAgent??""}:${e.terminalSessionName??""}:${e.terminalTabId??""}:${e.mode??"detail"}`;case"repo-diff":return`repo-diff:${e.path}`;default:return`${e.view}${n}`}}function G(e,n){return ce(Se(`${e}${n}`))}function An(e){return e?`#${e}`:""}function Ss(e){return e.startsWith("/embed/")||e==="/ops/lanes/embed"}function xe(){if(typeof window>"u"){const e=new URL($n);return{pathname:e.pathname,searchStr:e.search,hash:e.hash.replace(/^#/,""),state:null}}return{pathname:window.location.pathname,searchStr:window.location.search,hash:window.location.hash.replace(/^#/,""),state:window.history.state}}function bs(e,n){return e.pathname===n.pathname&&e.searchStr===n.searchStr&&e.hash===n.hash&&Object.is(e.state,n.state)}function Ls(e){let n=e.read();const t=new Set;let s=null;const o=()=>{const r=e.read();if(!bs(n,r)){n=r;for(const i of t)i()}};return{getSnapshot:()=>n,subscribe(r){return s||(s=e.observe(o)),t.add(r),()=>{t.delete(r)}},navigateTo(r,i={}){const a=n.pathname,u=i.state===void 0?n.state:i.state;i.replace?e.replace(r,u):e.push(r,u),o(),n.pathname!==a&&Mn(a,n.pathname)}}}function ys(){return typeof window>"u"?{read:xe,push:()=>{},replace:()=>{},observe:()=>()=>{}}:{read:xe,push:(e,n)=>window.history.pushState(n,"",e),replace:(e,n)=>window.history.replaceState(n,"",e),observe:e=>(window.addEventListener("popstate",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)})}}const D=Ls(ys());function Es(){return C.useSyncExternalStore(D.subscribe,D.getSnapshot,D.getSnapshot)}function ae(e,n={}){D.navigateTo(e,n)}function Un(){return typeof window>"u"?null:window.navigation??null}function kn(){if(typeof window>"u")return!1;const e=Un();return e?e.canGoBack:window.history.length>1}function $s(){if(!kn())return;const e=Un();if(e){e.back();return}window.history.back()}function $o(e){if(!e||typeof e!="object")return null;const n=e.returnTo;return!n||typeof n!="object"||typeof n.view!="string"?null:n}function Ro(e){return!e||typeof e!="object"?!1:e.returnUseHistory===!0}function je(e){if(!e||typeof e!="object")return e;const{returnTo:n,returnUseHistory:t,settingsEntry:s,...o}=e;return o}function Rs(e,n){if(n.returnTo!==void 0){const t=n.state!==void 0?n.state:je(e),s=t&&typeof t=="object"?{...t}:{};return s.returnTo=n.returnTo,s.returnUseHistory=n.replace!==!0,s}return n.state!==void 0?n.state:n.replace?e:je(e)}function Tn(e){return e?e.replace(/^#/,""):""}function Ps(e,n,t={}){const s=G(e.pathname,e.searchStr),o=Is(n,s),r=t.preserveSearch===!1?"":e.searchStr;let i=_n(o,e.pathname);if({"/embed/home":"inbox","/embed/search":"search","/embed/ops":"ops"}[e.pathname]===o.view){const f=Rn(i),v=f.pathname.split("/").filter(Boolean)[1];f.pathname=e.pathname;const P=new URLSearchParams(e.searchStr);for(const y of["embed","profile","theme","themeVars","_nav"]){const g=P.get(y);g!==null&&f.searchParams.set(y,g)}v&&f.searchParams.set("mode",v),i=f.pathname+f.search}const u=gn(i,r),d=Tn(t.hash);return{route:o,href:`${u}${d?`#${d}`:""}`}}function Cs(e,n){const t=new URLSearchParams(e.searchStr);for(const[r,i]of Object.entries(n.searchPatch??{}))i===null?t.delete(r):t.set(r,i);const s=t.toString(),o=n.hash===void 0?e.hash:Tn(n.hash);return`${e.pathname}${s?`?${s}`:""}${o?`#${o}`:""}`}function Po(e){const n=D.getSnapshot(),t=Cs(n,e),s=`${n.pathname}${n.searchStr}${An(n.hash)}`;t!==s&&ae(t,{replace:e.replace??!0,state:e.state})}function _s(e,n,t){if(Ss(e))return null;const s=`${e}${n}`,o=Se(s),r=ce(o),i=gn(_n(r,e),n);return!(j(o)!==j(r)||r.view==="agents-v2"||s!==i)||s===i?null:`${i}${An(t)}`}function Co(){const{pathname:e,searchStr:n,hash:t}=Es(),s=`${e}${n}`,o=C.useMemo(()=>G(e,n),[e,n]),r=C.useRef({}),i=C.useRef(s);C.useEffect(()=>{const f=_s(e,n,t);f&&ae(f,{replace:!0})},[e,n,t]),C.useEffect(()=>{if(i.current===s)return;const f=G(e,n);requestAnimationFrame(()=>{window.scrollTo(0,r.current[j(f)]??0)}),i.current=s},[s,e,n]);const a=C.useCallback((f,v={})=>{const P=ce(f.view==="ops"&&!nn()&&!Pn(f.mode)?{view:"inbox"}:f),y=G(e,n),{route:g,href:x}=Ps({pathname:e,searchStr:n},P,v);r.current[j(y)]=window.scrollY;const z=D.getSnapshot().state,U=Rs(z,v);ae(x,{replace:v.replace,state:U}),requestAnimationFrame(()=>{window.scrollTo(0,r.current[j(g)]??0)})},[e,n]),u=C.useCallback(()=>$s(),[]),d=kn();return{route:o,navigate:a,navigateBack:u,canNavigateBack:d}}export{$t as $,go as A,es as B,bo as C,vo as D,Io as E,En as F,co as G,zt as H,pe as I,A as J,ro as K,io as L,lo as M,uo as N,Lo as O,wo as P,yo as Q,no as R,it as S,hn as T,pn as U,so as V,ve as W,Ks as X,Ms as Y,Gs as Z,Et as _,_n as a,Ws as a0,Lt as a1,Ys as a2,Rt as a3,Qs as a4,Xs as a5,qs as a6,Zs as a7,Vs as a8,Hs as a9,Ln as aA,ho as aB,oe as aC,mo as aD,fo as aE,bn as aF,zs as aa,sn as ab,tn as ac,Co as ad,Js as ae,eo as af,H as ag,ne as ah,Ds as ai,se as aj,q as ak,Ut as al,jt as am,kt as an,gn as ao,Nt as ap,ot as aq,to as ar,wn as as,Ke as at,oo as au,qn as av,In as aw,M as ax,ao as ay,po as az,Zn as b,Gn as c,ws as d,Eo as e,Po as f,$o as g,Qe as h,xs as i,ue as j,ft as k,Os as l,Ns as m,Bs as n,Ro as o,at as p,ct as q,Se as r,Oe as s,ut as t,Es as u,js as v,Fs as w,Jt as x,So as y,Zt as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,j as n,W as Oe}from"./index-EsrkGBcv.js";import{g as Xe,e as Ye,b as He,c as Ce,d as Ue,h as Je}from"./scout-voice-CZx60X6E.js";import{createLevelHistory as Qe,energyFromPartialDelta as ke,tryStartMicLevelMeter as et,VOICE_WAVE_BARS as Ne}from"./voice-levels-Dcr3jglk.js";import{L as tt}from"./loader-circle-OvccU82H.js";import{c as Re}from"./createLucideIcon-zZ8Hx7er.js";import{ad as nt}from"./router-DCtl8wqb.js";const rt=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],st=Re("mic",rt);const ot=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],it=Re("square",ot);function Nt(e){if(!e)return null;const t=e.replace(/_/g," ");return t.toLowerCase()==="relay agent"?"agent":t}function ct(e,t=!1){return e.key==="Enter"&&!e.shiftKey&&(t||!!(e.metaKey||e.ctrlKey))&&!e.nativeEvent?.isComposing}const at=40,Rt=1500,lt=250;function _e(e,t,o=at){if(Math.hypot(e,t)<o)return"rest";const p=(Math.atan2(t,e)*180/Math.PI+360)%360,c=Math.round(p/45)%8;return["right","down-right","down","down-left","left","up-left","up","up-right"][c]}function _t(e,t){if(e==="rest"||!t||t.length===0)return;const o=l=>t.includes(l),p=`look-${e}`;if(o(p))return p;const[c,m]=e.split("-");if(m){if(o(`look-${m}`))return`look-${m}`;if(o(`look-${c}`))return`look-${c}`}}const ce=new Set;let ae={x:0,y:0,at:0,gone:!0},V=0,le=!1;function Ve(){V=0;for(const e of ce)e(ae)}function ue(e){ae={x:e.clientX,y:e.clientY,at:performance.now(),gone:!1},V||(V=window.requestAnimationFrame(Ve))}function de(){ae={...ae,gone:!0},V||(V=window.requestAnimationFrame(Ve))}function ut(){le||typeof window>"u"||(le=!0,window.addEventListener("pointermove",ue,{passive:!0}),window.addEventListener("pointerdown",ue,{passive:!0}),document.addEventListener("pointerleave",de),window.addEventListener("blur",de))}function dt(){le&&(le=!1,window.removeEventListener("pointermove",ue),window.removeEventListener("pointerdown",ue),document.removeEventListener("pointerleave",de),window.removeEventListener("blur",de),V&&(window.cancelAnimationFrame(V),V=0))}function Vt(e){return ce.add(e),ut(),()=>{ce.delete(e),ce.size===0&&dt()}}function mt(e){return Math.max(160,e*4)}function Tt(e){const t=mt(e);let o=null,p=0;return{sample(c,m){if(c.gone||((!o||c.at-p>lt)&&(o=m(),p=c.at),!o||o.width===0))return"rest";const l=c.x-(o.left+o.width/2),f=c.y-(o.top+o.height/2);return Math.hypot(l,f)>t?"rest":_e(l,f)}}}const Pt=1400,ve=new Set;let we=null;function ft(){return typeof performance<"u"?performance.now():Date.now()}function Ee(e){const t=e?.getBoundingClientRect();we=t&&t.width>0?{x:t.left+t.width/2,y:t.top+t.height/2,at:ft()}:null;for(const o of ve)o(we)}function Le(){return we}function Bt(e){return ve.add(e),()=>{ve.delete(e)}}function Dt(e,t){return!t||t.width===0?"rest":_e(e.x-(t.left+t.width/2),e.y-(t.top+t.height/2))}function ht(e){switch(e){case"starting":return"starting";case"recording":return"recording";case"processing":return"processing";default:return"idle"}}function pt(e,t,o){if(o)return o;switch(e){case"starting":return"Starting voice…";case"recording":return t.trim()?t.trim():null;case"processing":return"Transcribing…";default:return null}}function Me(e){return new Promise(t=>window.setTimeout(t,e))}function gt({onAppend:e,onError:t,onStatus:o,disabled:p,className:c}){const m=s.useRef(Xe()),l=s.useRef(null),f=s.useRef(Qe(Ne)),Z=s.useRef(null),E=s.useRef(!1),b=s.useRef(""),D=s.useRef(0),w=s.useRef(0),[v,y]=s.useState("idle"),[ee,T]=s.useState(""),[te,F]=s.useState("probing"),[me,I]=s.useState(null),[L,P]=s.useState(null),[N,O]=s.useState(null),[fe,M]=s.useState(0),S=s.useCallback(()=>{w.current&&(window.cancelAnimationFrame(w.current),w.current=0),Z.current?.stop(),Z.current=null,E.current=!1},[]),j=s.useCallback(r=>{O(r),t?.(r)},[t]),ne=s.useCallback((r,u,a,g)=>{o?.({state:r,partial:u,message:pt(r,u,a),tone:a?"error":r==="recording"?"recording":r==="processing"?"processing":"neutral",levels:r==="idle"&&!a?[]:f.current.snapshot(),levelsLive:E.current,issue:a?g:null})},[o]);s.useEffect(()=>{ne(v,ee,N,L)},[ne,L,N,ee,v,fe]);const R=s.useCallback(async(r=!1)=>{const u=m.current;F(g=>g==="launching"?g:"probing");const a=await u.probe(r?{force:!0}:void 0);return I(a),F("idle"),a},[]);s.useEffect(()=>{Ye();const r=m.current,u=He(a=>{I(a.ok),F("idle")});return r.connectionState==="unknown"?R():(I(r.connectionState==="connected"),P(null),F("idle")),()=>{u(),S();const a=l.current;a&&(a.cancel().catch(()=>{}),l.current=null)}},[R,S]);const q=s.useCallback(r=>{f.current.push(r),M(u=>u+1)},[]),$=s.useCallback(()=>{if(w.current)return;let r=performance.now();const u=a=>{if(a-r>=36){r=a;const g=a-(D.current||a),k=ke(b.current,b.current,g);f.current.push(Math.max(.05,k)),M(d=>d+1)}w.current=window.requestAnimationFrame(u)};w.current=window.requestAnimationFrame(u)},[]),re=s.useCallback(async()=>{const r=m.current;O(null),P(null),T(""),b.current="",D.current=performance.now(),f.current.clear(),M(d=>d+1),y("starting"),S();let u=await Ce({surface:"chat-composer",requestPermissions:!0});if(!u.ready&&u.issue?.code==="microphone_not_requested"&&(await Me(1800),u=await Ce({surface:"chat-composer"})),!(u.ready||u.issue?.code==="microphone_not_requested")){y("idle");const d=u.issue;d?(P(d),j(Ue(d))):j("Scout voice is not ready."),R(!0);return}P(null),I(!0);let g=null,k=!1;try{if(g=await r.startLive({onState:h=>y(ht(h)),onPartial:h=>{const H=b.current;if(b.current=h,D.current=performance.now(),T(h),!E.current){const U=ke(H,h,0);q(U)}},onLevel:h=>{k=!0,E.current=!0,w.current&&(window.cancelAnimationFrame(w.current),w.current=0),q(h)}}),l.current=g,y("recording"),await Me(140),l.current&&!k&&!E.current){const h=await et(H=>{k=!0,E.current=!0,w.current&&(window.cancelAnimationFrame(w.current),w.current=0),q(H)});h&&l.current?Z.current=h:l.current&&!E.current&&(E.current=!1,$())}const d=await g.result;l.current=null,S(),y("idle");const K=b.current.trim();T(""),b.current="",O(null),f.current.clear(),M(h=>h+1);const _=d.text?.trim()||K;_?e(_):j("No speech was detected. Check your microphone in Settings → Voice."),R(!0)}catch(d){l.current=null,S(),y("idle");const K=b.current.trim();T(""),b.current="",f.current.clear(),M(h=>h+1);const _=d instanceof Error?d.message:"Scout voice recording failed.";if(K){e(K),d instanceof Error&&d.name==="AbortError"||j(`Recording ended early, but Scout recovered the partial transcript. ${_}`);return}if(d instanceof Error&&d.name==="AbortError")return;j(_),R(!0)}},[e,R,q,j,$,S]),se=s.useCallback(async()=>{const r=l.current;if(!r)return;y("processing"),S();const u=window.setInterval(()=>{f.current.decay(.82),M(a=>a+1)},50);window.setTimeout(()=>window.clearInterval(u),600);try{await r.stop()}catch(a){try{await r.cancel()}catch{}l.current=null,y("idle");const g=b.current.trim();T(""),b.current="",f.current.clear(),M(d=>d+1);const k=a instanceof Error?a.message:"Scout voice recording did not finish.";g?(e(g),j(`Recording ended early, but Scout recovered the partial transcript. ${k}`)):j(k)}},[e,j,S]),he=s.useCallback(()=>{if(v==="recording"){se();return}v==="processing"||v==="starting"||re()},[v,re,se]),C=v==="recording",x=te==="launching"||v==="starting"||v==="processing",B=(m.current.canRequestMicrophone||L?.action==="request_microphone"||L?.action==="request_speech")&&!C&&!x,X=(m.current.isMicrophoneHardDenied||L?.action==="open_microphone_settings")&&!C&&!x,oe=(me===!1||L!==null)&&!B&&!X&&!C&&!x,z=N||(L?L.title:X?"Microphone blocked. Open Privacy & Security → Microphone to change it.":B?"Allow microphone access":oe?"Scout voice is not ready":te==="probing"?"Checking voice…":C?"Stop recording":v==="processing"?"Transcribing…":v==="starting"?"Starting voice…":"Start recording"),Y=N?"s-dictation-mic--error":C?"s-dictation-mic--recording":X?"s-dictation-mic--error":B?"s-dictation-mic--needs-permission":oe?"s-dictation-mic--unavailable":x?"s-dictation-mic--busy":"",pe=x?tt:C?it:st,G=C?12:14;return n.jsx("button",{type:"button",title:z,"aria-label":z,"aria-pressed":C,onClick:he,disabled:p||v==="processing",className:["s-dictation-mic",Y,c].filter(Boolean).join(" "),children:n.jsx(pe,{size:G,className:x?"s-dictation-mic-spin":C?"fill-current":""})})}function vt({samples:e,active:t,processing:o=!1,className:p}){const c=wt(e,Ne,o?.06:.04),m=["s-msg-compose-wave",t?"s-msg-compose-wave--live":"",o?"s-msg-compose-wave--processing":"",p??""].filter(Boolean).join(" ");return n.jsx("div",{className:m,"aria-hidden":"true","data-wave-source":e&&e.length>0?"levels":"floor",children:c.map((l,f)=>n.jsx("span",{className:"s-msg-compose-wave-bar",style:{transform:`scaleY(${Math.max(.08,l)})`,opacity:o?.28+l*.35:t?.4+l*.55:.25}},f))})}function wt(e,t,o){if(!e||e.length===0)return Array.from({length:t},()=>o);if(e.length===t)return e.map(c=>Math.max(o,Math.min(1,c)));const p=new Array(t);for(let c=0;c<t;c+=1){const m=Math.min(e.length-1,Math.round(c/Math.max(1,t-1)*(e.length-1)));p[c]=Math.max(o,Math.min(1,e[m]??o))}return p}function bt(){return n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"M12 19V5"}),n.jsx("path",{d:"m5 12 7-7 7 7"})]})}function xt(){return n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})})}function St(){return n.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("path",{d:"M21.44 11.05 12.05 20.44a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.5 3.5 0 0 1 4.95 4.95l-9.2 9.19a1.5 1.5 0 0 1-2.12-2.12l8.49-8.48"})})}function Ae(e,t){e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,t)}px`}function yt(e){return e.tone==="error"?"Voice":e.state==="recording"?"Listening":e.state==="processing"?"Transcribing":e.state==="starting"?"Starting":"Voice"}function Ft({renderWhenEmbedded:e=!1,...t}){return Oe()&&!e?null:n.jsx(jt,{...t})}function jt({value:e,onChange:t,onSend:o,placeholder:p="Type a message…",disabled:c=!1,sending:m=!1,canSend:l,stopMode:f=!1,onStop:Z,sendTitle:E="Send (Cmd+Enter)",sendAriaLabel:b="Send message (Cmd+Enter)",stopAriaLabel:D="Stop agent",showDictation:w=!0,onDictationStatusChange:v,onDictationCommit:y,showAttach:ee=!1,onAttach:T,attachTitle:te="Add attachment",attachAriaLabel:F="Add attachment",onPaste:me,dropHandlers:I,dragActive:L=!1,secondaryAction:P,leadingTools:N,tools:O,footer:fe,header:M,above:S,aboveAttached:j=!1,input:ne,overlay:R,status:q,textareaRef:$,onKeyDown:re,sendOnEnter:se=!1,onSelect:he,onBlur:C,density:x="panel",as:B="form",className:X,rows:oe=1,autoResize:z=!0,maxHeightPx:Y=160,"aria-label":pe="Message"}){const G=s.useRef(null),[r,u]=s.useState(null),[a,g]=s.useState(!1),[k,d]=s.useState(null),K=s.useCallback(i=>{G.current=i,$&&($.current=i)},[$]),_=s.useRef(null),h=s.useRef(null),H=s.useCallback(()=>{Ee(_.current??G.current),h.current=Le()?.at??null},[]),U=s.useCallback(()=>{const i=h.current;h.current=null,i!==null&&Le()?.at===i&&Ee(null)},[]);s.useEffect(()=>U,[U]),s.useEffect(()=>{if(!z)return;const i=G.current;i&&Ae(i,Y)},[e,z,Y]);const Te=(l??e.trim().length>0)&&!m&&!c,be=O??fe,ie=r?.state==="recording"||r?.state==="starting",J=r?.state==="processing",Pe=!!(r&&(r.tone==="error"||ie||J||r.partial&&r.partial.trim())),ge=s.useCallback(()=>{f||!(l??e.trim().length>0)||m||c||o()},[l,c,o,m,f,e]),Be=i=>{i.preventDefault(),ge()},De=i=>{if(re?.(i)){i.preventDefault();return}if(ct(i,se)){i.preventDefault(),ge();return}},Fe=i=>{const W=i.target.value;t(W,{caret:i.target.selectionStart??W.length}),z&&Ae(i.target,Y)},Ie=i=>{const W=e.trim()?`${e.trimEnd()} ${i}`:i;if(t(W,{caret:W.length}),y){y(W);return}requestAnimationFrame(()=>G.current?.focus())},qe=s.useCallback(i=>{u(i),i.issue||d(null),v?.(i)},[v]),xe=["s-msg-compose",`s-msg-compose--${x}`,x==="thread"?"s-thread-compose":"",X??""].filter(Boolean).join(" "),$e=["s-msg-compose-shell",x==="thread"?"s-thread-compose-shell":""].filter(Boolean).join(" "),ze=["s-msg-compose-input",x==="thread"?"s-thread-compose-input":""].filter(Boolean).join(" "),Se=["s-msg-compose-send",x==="thread"?"s-thread-compose-send":"",f?"s-msg-compose-send--agent-stop s-thread-compose-send--stop":""].filter(Boolean).join(" "),Ge=["s-msg-compose-voice",r?.tone==="recording"||ie?"s-msg-compose-voice--recording":"",r?.tone==="processing"||J?"s-msg-compose-voice--processing":"",r?.tone==="error"?"s-msg-compose-voice--error":""].filter(Boolean).join(" "),{navigate:Ke}=nt(),Q=r?.tone==="error",We=r?.partial?.trim()||null,A=Q?r?.issue??null:null,ye=Q?r?.message:J?"Finalizing transcript…":We,Ze=n.jsxs("div",{ref:_,className:$e,"data-drag-active":L?"true":void 0,...I,children:[M?n.jsx("div",{className:"s-msg-compose-header",children:M}):null,n.jsxs("div",{className:"s-msg-compose-body",children:[ne??n.jsx("textarea",{ref:K,className:ze,placeholder:p,value:e,disabled:c,rows:oe,"aria-label":pe,onChange:Fe,onKeyDown:De,onSelect:he,onFocus:H,onBlur:()=>{U(),C?.()},onPaste:me}),Pe?n.jsxs("div",{className:Ge,role:Q?"alert":"status","aria-live":Q?"assertive":"polite",children:[!Q&&(ie||J)?n.jsx(vt,{samples:r?.levels,active:ie,processing:J}):null,n.jsxs("div",{className:"s-msg-compose-voice-meta",children:[n.jsx("span",{className:"s-msg-compose-voice-label",children:r?yt(r):"Voice"}),A?n.jsxs("span",{className:"s-msg-compose-voice-issue",children:[n.jsx("span",{className:"s-msg-compose-voice-issue-title",children:A.title}),A.hint?n.jsx("span",{className:"s-msg-compose-voice-issue-hint",children:A.hint}):null,A.action!=="none"&&A.actionLabel?n.jsx("button",{type:"button",className:"s-msg-compose-voice-issue-action",disabled:a,onClick:()=>{d(null),A.action==="open_voice_settings"?Ke({view:"settings",section:"voice"}):(g(!0),Je(A.action).catch(i=>d(i instanceof Error?i.message:String(i))).finally(()=>g(!1)))},children:A.actionLabel}):null,k?n.jsx("span",{children:k}):null]}):ye?n.jsx("span",{className:"s-msg-compose-voice-text",children:ye}):null]})]}):null]}),n.jsxs("div",{className:["s-msg-compose-toolbar",x==="thread"?"s-thread-compose-footer":""].filter(Boolean).join(" "),children:[n.jsxs("div",{className:"s-msg-compose-toolbar-start",children:[N,ee?n.jsx("button",{type:"button",className:"s-msg-compose-icon-btn",title:te,"aria-label":F,disabled:c||m,onClick:T,children:n.jsx(St,{})}):N?null:n.jsx("span",{className:"s-msg-compose-toolbar-spacer","aria-hidden":"true"})]}),n.jsxs("div",{className:"s-msg-compose-toolbar-end",children:[be?n.jsx("div",{className:"s-msg-compose-tools",children:be}):null,w?n.jsx(gt,{onAppend:Ie,onStatus:qe,disabled:c||m}):null,P?n.jsx("div",{className:"s-msg-compose-secondary",children:P}):null,f?n.jsx("button",{type:"button",className:Se,onClick:Z,title:D,"aria-label":D,children:n.jsx(xt,{})}):n.jsx("button",{type:B==="form"?"submit":"button",className:Se,disabled:!Te,title:E,"aria-label":b,"data-action":"send",onClick:B==="div"?()=>ge():void 0,children:n.jsx(bt,{})})]})]}),q]}),je=n.jsxs("div",{className:"s-msg-compose-frame","data-above-attached":S&&j?"true":void 0,children:[R,S?n.jsx("div",{className:"s-msg-compose-above",children:S}):null,Ze]});return B==="div"?n.jsx("div",{className:xe,children:je}):n.jsx("form",{className:xe,onSubmit:Be,children:je})}export{gt as D,Rt as G,Ft as M,it as S,Bt as a,Dt as b,Pt as c,Tt as d,st as e,Nt as f,_t as g,ct as i,Vt as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{L as a,N as l,O as n,P as r,r as m}from"./index-EsrkGBcv.js";import{R as p,T as i,U as c,u as E,V as S}from"./router-DCtl8wqb.js";const _={path:l(n.lanes),bundle:`?ffBundle=${a}`,deploy:`OPENSCOUT_WEB_FLAG_BUNDLE=${a}`},o=[{key:"lanes",label:"Agent Lanes",segment:n.lanes},{key:"sessions",label:"Sessions",segment:n.sessions},{key:"tail",label:"Live Activity",segment:n.tail},{key:"agents",label:"Agents",segment:n.agents}],b=o.map(e=>({key:e.key,label:e.label,route:p(e.segment)}));function A(e){const t=i(e);return o.find(s=>s.segment===t)?.key??"lanes"}function d(e){const t=i(e);return o.find(s=>s.segment===t)?.label??r}function u(){const{pathname:e}=E();return c(e)}function P(){return S(u())}function L(e){const t=u();return m.useEffect(()=>(t?document.documentElement.setAttribute("data-scope-presentation",""):document.documentElement.removeAttribute("data-scope-presentation"),()=>document.documentElement.removeAttribute("data-scope-presentation")),[t]),{active:t,brandLabel:t?d(e.route):r}}function O(){return c(typeof window<"u"?window.location.pathname:"")}export{b as S,u as a,_ as b,d as c,L as d,O as i,A as s,P as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as B}from"./index-EsrkGBcv.js";import{b as H,p as j,V as G,D as z}from"./fx-z37u1o2z.js";function J(){return{code:"host_offline",title:"Scout Menu is not connected",message:"No voice host has registered with this web server.",hint:"The browser never records audio — Scout Menu is the voice host. If it is already running, this clears on its own; otherwise launch it.",action:"launch_host",actionLabel:"Launch Scout Menu"}}function W(t){return!t||t.granted?null:t.canRequest?{code:"microphone_not_requested",title:"Microphone access needed",message:"Scout Menu needs microphone access before dictation can start.",hint:"Request access or tap the mic again to show the macOS prompt.",action:"request_microphone",actionLabel:"Request access"}:t.status==="denied"?{code:"microphone_denied",title:"Microphone blocked",message:"Scout Menu cannot record because microphone access is off.",hint:"Scout is opening macOS Microphone settings and will detect the change automatically.",action:"open_microphone_settings",actionLabel:"Open Microphone settings"}:{code:"microphone_denied",title:"Microphone unavailable",message:"Scout Menu cannot access the microphone on this Mac.",hint:"Open Privacy & Security → Microphone to review it.",action:"open_microphone_settings",actionLabel:"Open Microphone settings"}}function X(t){return!t||t.granted?null:t.canRequest?{code:"speech_not_requested",title:"Speech recognition needed",message:"Scout Menu needs speech recognition for live partials and Apple Speech fallback.",hint:"Request access to show the macOS prompt.",action:"request_speech",actionLabel:"Request access"}:{code:"speech_denied",title:"Speech recognition blocked",message:"Speech recognition is off for Scout Menu.",hint:"Choose Retry access to reopen macOS Speech Recognition settings.",action:"open_speech_settings",actionLabel:"Open Speech settings"}}function K(){return{code:"no_input_device",title:"No microphone detected",message:"Scout Menu did not report any audio input devices.",hint:"Plug in a microphone, check Sound settings, then refresh Settings → Voice.",action:"open_voice_settings",actionLabel:"Open Voice settings"}}function Te(t){return t?t.hint?`${t.message} ${t.hint}`:t.message:"Scout voice is unavailable."}let x=!1,T=0;function Pe(t){x=t}function q(){T+=1}function N(){T=Math.max(0,T-1)}function Re(){return x?"Live voice is active.":T>0?"Another Scout playback is active.":null}async function Ie(t){switch(t){case"request_microphone":await R("microphone");return;case"request_speech":await R("speechRecognition");return;case"open_microphone_settings":await D("microphone");return;case"open_speech_settings":await D("speechRecognition");return;case"launch_host":await U().launch({source:"openscout"});return;case"open_voice_settings":case"none":return}}async function Oe(t={}){const e=await fetch("/api/voice/engage",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(e.status===404)return Q(t);if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(b(n,e.status))}return await e.json()}async function Q(t={}){const e=await Ee(),n=e.settings,s=e.devices,r=s.length>0||(n.permissions?.length??0)>0,o=n.permissions?.find(h=>h.kind==="microphone")??null,i=n.permissions?.find(h=>h.kind==="speechRecognition")??null,c=Y(n,s);if(t.requestPermissions&&(o&&!o.granted&&o.status!=="restricted"?await R("microphone").catch(()=>{}):(o?.granted??!1)&&i&&!i.granted&&i.status!=="restricted"&&await R("speechRecognition").catch(()=>{})),!r)return{ready:!1,issue:J(),warnings:[],settings:n,devices:s,inputDevice:null,hostOnline:!1};const l=W(o);if(l)return{ready:!1,issue:l,warnings:[],settings:n,devices:s,inputDevice:c,hostOnline:r};if(!c)return{ready:!1,issue:K(),warnings:[],settings:n,devices:s,inputDevice:null,hostOnline:r};const u=X(i);return{ready:!0,issue:null,warnings:u?[u]:[],settings:n,devices:s,inputDevice:c,hostOnline:r}}function Y(t,e){if(e.length===0)return null;const n=t.inputDeviceId?e.find(o=>o.id===t.inputDeviceId):null,s=e.find(o=>o.isDefault)??e[0]??null,r=n??s;return r?{id:r.id,name:r.name}:null}function Z(t,e){switch(e){case"microphone_permission":return"Microphone access is off for Scout Menu. Tap the mic to retry; Scout will open macOS Microphone settings.";case"empty_transcript":return"No speech was detected. Check your microphone input in Settings → Voice.";default:return t}}const ee=6e4,te=3e3,ne=2e4,oe=8e3,re=45e3;let I=null,_=null,p=null,C=!1;const O=new Set;function ie(){return typeof window>"u"?!1:typeof fetch=="function"}function U(){return I||(I=new se),I}function Ce(t){return O.add(t),p&&t(p),()=>{O.delete(t)}}function Le(){if(C||!ie())return;C=!0;const t=U();t.probe();const e=()=>{t.probeIfStale()};window.addEventListener("focus",e),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function L(t){for(const e of O)e(t)}function V(t,e=Date.now()){const n=t.ok?ne:oe;return e-t.probedAt<n}class se{state="unknown";unavailableReason=null;captureMode=null;hostReachable=!1;microphoneGranted=null;microphoneCanRequest=null;inputDeviceName=null;get connectionState(){return this.state}get lastUnavailableReason(){return this.unavailableReason}get preferredCaptureMode(){return this.captureMode}get isVoiceHostReachable(){return this.hostReachable}get activeInputDeviceName(){return this.inputDeviceName}get isMicrophoneGranted(){return this.microphoneGranted}get canRequestMicrophone(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!0}get isMicrophoneHardDenied(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!1}get isMicrophoneDenied(){return this.isMicrophoneHardDenied}async probeIfStale(){const e=Date.now();return p&&V(p,e)?(this.applyProbeSnapshot(p),p.ok):p&&p.ok&&e-p.probedAt<re?(this.applyProbeSnapshot(p),!0):p&&!p.ok?this.probe({force:!0}):this.probe()}async probe(e={}){const n=typeof e=="number"?{timeoutMs:e}:e,s=n.force??!1,r=n.timeoutMs??te,o=Date.now();return!s&&p&&V(p,o)?(this.applyProbeSnapshot(p),p.ok):_||(this.state="probing",_=this.fetchProbe(r).finally(()=>{_=null}),_)}async fetchProbe(e){const n=new AbortController,s=window.setTimeout(()=>n.abort(),e);try{const r=await fetch("/api/voice/health?quiet=1",{signal:n.signal}),o=await r.json().catch(()=>({})),i=!!o.host?.hostId,c=typeof o.microphoneGranted=="boolean"?o.microphoneGranted:null,l=typeof o.microphoneCanRequest=="boolean"?o.microphoneCanRequest:null,u=typeof o.inputDevice?.name=="string"&&o.inputDevice.name.trim()?o.inputDevice.name.trim():null,h=o.capture==="browser"?"browser":"native",m=r.ok&&o.ok===!0,g=m?null:o.detail??o.error??(i?"Scout voice is not ready.":"Scout voice service is unavailable."),w={ok:m,reason:g,captureMode:m?h:null,hostReachable:i,microphoneGranted:c,microphoneCanRequest:l,inputDeviceName:u,probedAt:Date.now()};return p=w,this.applyProbeSnapshot(w),L(w),m}catch(r){const i={ok:!1,reason:r instanceof Error&&r.name==="AbortError"?"Scout voice service did not respond.":"Scout voice service is unavailable.",captureMode:null,hostReachable:!1,microphoneGranted:null,microphoneCanRequest:null,inputDeviceName:null,probedAt:Date.now()};return p=i,this.applyProbeSnapshot(i),L(i),!1}finally{window.clearTimeout(s)}}applyProbeSnapshot(e){if(this.hostReachable=e.hostReachable,this.microphoneGranted=e.microphoneGranted,this.microphoneCanRequest=e.microphoneCanRequest,this.inputDeviceName=e.inputDeviceName,e.ok){this.unavailableReason=null,this.captureMode=e.captureMode,this.state="connected";return}this.unavailableReason=e.reason,this.captureMode=null,this.state="unavailable"}async launch(e={}){window.location.href="scout://hud/show"}async startLive(e={},n={}){return this.captureMode!=="browser"?await ae(e,n):await ce(e)}}async function ae(t={},e={}){t.onState?.("starting");const n=await fetch("/api/voice/session",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:"openscout-web",surface:e.surface?.trim()||"chat-composer"})});if(!n.ok){const a=await n.text().catch(()=>"");throw new Error(b(a,n.status))}const r=(await n.json()).sessionId?.trim();if(!r)throw new Error("Scout voice did not return a session id.");let o=!1,i,c;const l=new Promise((a,f)=>{i=a,c=f});let u=null;const h=()=>{u&&window.clearTimeout(u),u=window.setTimeout(()=>{g(new Error("Scout voice transcription timed out. Try again or check voice settings."))},ee)},m=()=>{u&&(window.clearTimeout(u),u=null)},g=(a,f="error")=>{o||(o=!0,m(),S.close(),t.onState?.(f),c(a))},w=a=>{o||(o=!0,m(),S.close(),t.onFinal?.(a),t.onState?.("done"),i(a))},S=new EventSource(`/api/voice/session/${encodeURIComponent(r)}/events`),d=a=>f=>{if(o)return;let v={};try{v=JSON.parse(f.data)}catch{return}if(a==="session.partial"){const M=typeof v.text=="string"?v.text:"";t.onPartial?.(M);return}if(a==="session.state"){const M=ue(v.state);M&&(t.onState?.(M),M==="processing"&&h());return}if(a==="session.final"){w({sessionId:r,text:typeof v.text=="string"?v.text.trim():"",durationMs:Number(v.durationMs??0)});return}if(a==="session.cancelled"){g(P(),"cancelled");return}if(a==="session.error"){const M=typeof v.message=="string"?v.message:"Scout voice session failed.",F=typeof v.code=="string"?v.code:null;g(new Error(Z(M,F)))}};return S.addEventListener("session.started",()=>{t.onState?.("starting")}),S.addEventListener("session.state",d("session.state")),S.addEventListener("session.partial",d("session.partial")),S.addEventListener("session.final",d("session.final")),S.addEventListener("session.cancelled",d("session.cancelled")),S.addEventListener("session.error",d("session.error")),S.onerror=()=>{o||g(new Error("Scout voice event stream disconnected."))},{get sessionId(){return r},result:l,stop:async()=>{t.onState?.("processing"),h();const a=await fetch(`/api/voice/session/${encodeURIComponent(r)}/stop`,{method:"POST"});if(!a.ok){const f=await a.text().catch(()=>"");throw new Error(b(f,a.status))}},cancel:async()=>{o=!0,m(),S.close();const a=await fetch(`/api/voice/session/${encodeURIComponent(r)}/cancel`,{method:"POST"});if(!a.ok){const f=await a.text().catch(()=>"");throw new Error(b(f,a.status))}t.onState?.("cancelled"),c(P())}}}async function ce(t={}){if(typeof MediaRecorder>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error("Scout voice capture is unavailable in this browser.");const{startStreamLevelMeter:e}=await B(async()=>{const{startStreamLevelMeter:d}=await import("./voice-levels-Dcr3jglk.js");return{startStreamLevelMeter:d}},[]),n=be(),s=[];let r=null,o=null,i=null,c=!1,l=!1,u,h;const m=new Promise((d,a)=>{u=d,h=a}),g=()=>{i?.stop(),i=null;for(const d of r?.getTracks()??[])d.stop();r=null},w=(d,a="error")=>{l||(l=!0,g(),t.onState?.(a),h(d))},S=async()=>{if(l)return;if(g(),c){w(P(),"cancelled");return}t.onState?.("processing");const d=o?.mimeType||A()||"application/octet-stream",a=new Blob(s,{type:d});if(a.size===0){w(new Error("No voice audio was captured."));return}try{const f=await we(a,{sessionId:n});if(l)return;l=!0,t.onFinal?.(f),t.onState?.("done"),u(f)}catch(f){w(f instanceof Error?f:new Error(String(f)))}};try{t.onState?.("starting"),r=await navigator.mediaDevices.getUserMedia({audio:!0}),t.onLevel&&(i=e(r,t.onLevel));const d=A();o=new MediaRecorder(r,d?{mimeType:d}:void 0),o.addEventListener("dataavailable",a=>{a.data.size>0&&s.push(a.data)}),o.addEventListener("error",()=>{w(new Error("Scout voice recorder failed."))}),o.addEventListener("stop",()=>{S()},{once:!0}),o.start(),t.onPartial?.(""),t.onState?.("recording")}catch(d){const a=d instanceof Error?d:new Error(String(d));throw w(a),m.catch(()=>{}),a}return{get sessionId(){return n},result:m,stop:async()=>{!o||o.state==="inactive"||o.stop()},cancel:async()=>{if(c=!0,o&&o.state!=="inactive"){o.stop();return}w(P(),"cancelled")}}}function ue(t){return t==="starting"||t==="recording"||t==="processing"||t==="done"||t==="cancelled"||t==="error"?t:null}function b(t,e){try{return JSON.parse(t).error??`Scout voice returned HTTP ${e}`}catch{return t||`Scout voice returned HTTP ${e}`}}function de(t){return t instanceof Error&&t.name==="AbortError"}async function $(t,e={}){const n={text:t,speed:ye(e.speed)};e.modelId&&(n.modelId=e.modelId),e.voiceId&&(n.voiceId=e.voiceId),e.originAppId&&(n.originAppId=e.originAppId),e.utteranceId&&(n.utteranceId=e.utteranceId),e.instructions&&(n.instructions=e.instructions),e.speechTiming?.enabled&&(n.speechTiming=e.speechTiming),e.playback&&(n.playback=e.playback);const s=await fetch("/api/voice/speak",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),signal:e.signal});if(!s.ok){const r=await s.text().catch(()=>"");try{const o=JSON.parse(r);throw new Error(o.error??`Scout voice returned HTTP ${s.status}`)}catch(o){throw o instanceof SyntaxError?new Error(r||`Scout voice returned HTTP ${s.status}`):o}}return await s.json()}async function Ve(t){const e=t?`?modelId=${encodeURIComponent(t)}`:"",n=await fetch(`/api/voice/catalog${e}`,{headers:{accept:"application/json"}});if(!n.ok)throw new Error(`Scout voice catalog returned HTTP ${n.status}`);return await n.json()}function ke(t,e,n){if(t.voices.find(i=>i.id===n&&i.modelId===e))return{modelId:e,voiceId:n};const r=t.voices.filter(i=>i.modelId===e),o=r.find(i=>i.isDefault&&i.available!==!1)??r.find(i=>i.available!==!1)??r[0];return{modelId:e,voiceId:o?.id??n}}let y=null;function le(){return typeof window>"u"?null:window.AudioContext??window.webkitAudioContext??null}function Ae(){const t=le();if(!t)return;let e=null;try{(!y||y.state==="closed")&&(y=new t),y.resume().catch(()=>{});const n=y.createBuffer(1,1,y.sampleRate);e=y.createBufferSource(),e.buffer=n,e.connect(y.destination);const s=e;e.onended=()=>s.disconnect(),e.start(0)}catch{e?.disconnect()}}function k(t,e){return new Promise((n,s)=>{if(e?.aborted){s(E());return}const r=()=>{clearTimeout(i),e?.removeEventListener("abort",o)},o=()=>{r(),s(E())},i=setTimeout(()=>{r(),s(new Error("Scout audio preparation timed out."))},1500);e?.addEventListener("abort",o,{once:!0});try{t().then(c=>{r(),n(c)},c=>{r(),s(c)})}catch(c){r(),s(c)}})}async function pe(t,e){const n=y;if(!n||n.state==="closed"||!t.audioBase64)throw new Error("no primed context");if(n.state!=="running"&&await k(()=>n.resume(),e.signal),n.state!=="running")throw new Error("primed context is unavailable");const s=atob(t.audioBase64),r=Uint8Array.from(s,c=>c.charCodeAt(0)),o=await k(()=>n.decodeAudioData(r.buffer),e.signal);if(e.signal?.aborted)throw E();const i=n.createBufferSource();i.buffer=o,i.connect(n.destination),await new Promise((c,l)=>{const u=()=>{i.onended=null,e.signal?.removeEventListener("abort",h),i.disconnect()},h=()=>{u();try{i.stop()}catch{}l(E())};if(e.signal?.aborted){h();return}e.signal?.addEventListener("abort",h,{once:!0}),i.onended=()=>{u(),c()};try{i.start(0),e.onPlaybackStart?.()}catch(m){u();try{i.stop()}catch{}l(m)}})}async function fe(t,e={}){if(e.signal?.aborted)throw E();if(t.playedOnHost)return e.onPlaybackStart?.(),t;if(!t.audioBase64)throw new Error("Scout voice returned no audio to play.");try{return await pe(t,e),t}catch(r){if(de(r))throw r}if(e.signal?.aborted)throw E();const n=new Audio(`data:${t.contentType};base64,${t.audioBase64}`),s=()=>{n.pause(),n.currentTime=0};e.signal?.addEventListener("abort",s,{once:!0}),await n.play(),e.onPlaybackStart?.();try{return await new Promise((r,o)=>{const i=()=>{n.removeEventListener("ended",c),n.removeEventListener("error",l),e.signal?.removeEventListener("abort",u)},c=()=>{i(),r()},l=()=>{i(),o(new Error("Scout voice playback failed."))},u=()=>{i(),o(E())};if(e.signal?.aborted){u();return}n.addEventListener("ended",c,{once:!0}),n.addEventListener("error",l,{once:!0}),e.signal?.addEventListener("abort",u,{once:!0})}),t}finally{e.signal?.removeEventListener("abort",s)}}async function he(t,e={}){q();try{const n=await $(t,e);return await fe(n,{signal:e.signal,onPlaybackStart:e.onPlaybackStart})}finally{N()}}function De(t,e={}){const n=new AbortController;return{promise:he(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function me(t,e={}){q();try{const n=await $(t,e);if(e.signal?.aborted)throw E();if(n.playedOnHost)return e.onPlaybackStart?.(),n;const s=await H(n.audioBase64,n.contentType),r=ge(e.presetId,e.params),o=j(s,{params:r,signal:e.signal});return e.onPlaybackStart?.(),await o.promise,n}finally{N()}}function xe(t,e={}){const n=new AbortController;return{promise:me(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function we(t,e){const n=new FormData,s=Se(t.type);n.append("audio",t,`audio.${ve(t.type)}`),n.append("sessionId",e.sessionId),s&&n.append("format",s);const r=await fetch("/api/voice/transcribe",{method:"POST",body:n});if(!r.ok){const i=await r.text().catch(()=>"");try{const c=JSON.parse(i);throw new Error(c.error??`Scout voice returned HTTP ${r.status}`)}catch(c){throw c instanceof SyntaxError?new Error(i||`Scout voice returned HTTP ${r.status}`):c}}const o=await r.json();return{sessionId:e.sessionId,text:o.text?.trim()??"",durationMs:Number(o.durationMs??0)}}function E(){const t=new Error("Speech stopped.");return t.name="AbortError",t}function P(){const t=new Error("Voice recording was cancelled.");return t.name="AbortError",t}function A(){return typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"?void 0:["audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/webm","audio/wav"].find(e=>{try{return MediaRecorder.isTypeSupported(e)}catch{return!1}})}function Se(t){const e=t.toLowerCase();if(e.includes("mp3")||e.includes("mpeg"))return"mp3";if(e.includes("wav"))return"wav";if(e.includes("aac")||e.includes("mp4"))return"aac";if(e.includes("opus")||e.includes("ogg")||e.includes("webm"))return"opus"}function ve(t){const e=t.toLowerCase();return e.includes("webm")?"webm":e.includes("ogg")||e.includes("opus")?"opus":e.includes("mp4")||e.includes("aac")?"m4a":e.includes("wav")?"wav":e.includes("mp3")||e.includes("mpeg")?"mp3":"audio"}function ge(t,e){const n=t?G.find(s=>s.id===t)?.params:void 0;return{...z,...n??{},...e??{}}}function ye(t){if(!(t===void 0||!Number.isFinite(t)))return Math.min(2,Math.max(.5,Number(t.toFixed(2))))}function be(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`scout-voice:${crypto.randomUUID()}`:`scout-voice:${Date.now().toString(36)}:${Math.random().toString(36).slice(2)}`}async function Ee(){const t=await fetch("/api/voice/settings");if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(b(e,t.status))}return await t.json()}async function D(t="microphone"){const e=await fetch("/api/voice/permissions/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(b(n,e.status))}}async function R(t="microphone"){const e=await fetch("/api/voice/permissions/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(b(n,e.status))}}async function qe(t=12){const e=await fetch(`/api/voice/history?limit=${t}`);if(!e.ok){const s=await e.text().catch(()=>"");throw new Error(b(s,e.status))}return(await e.json()).sessions??[]}async function Ne(t){const e=await fetch("/api/voice/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(b(n,e.status))}return await e.json()}export{Re as a,Ce as b,Oe as c,Te as d,Le as e,Ve as f,U as g,Ie as h,ke as i,fe as j,de as k,Pe as l,Ee as m,N as n,D as o,$ as p,q,R as r,De as s,xe as t,Ae as u,qe as v,Ne as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,r as p}from"./index-
|
|
1
|
+
import{j as i,r as p}from"./index-EsrkGBcv.js";import{u as m}from"./Provider-C35yu29I.js";import{a as x}from"./api-DSqpVKC7.js";import{E as g}from"./external-link-CUObqmgX.js";const h=new RegExp("(?:^|(?<=[\\s(`'\"<>]))(?:~\\/|\\/(?:Users|home|opt|var|etc|tmp|private)\\/)[^\\s)`'\"<>]+\\.[A-Za-z0-9]{1,8}\\b","g");function b(n){const e=n.replace(/\r\n?/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`),t=[];let s=0;for(;s<e.length;){const r=e[s];if(r.trim()===""){s+=1;continue}if(r.startsWith("```")){const l=[];for(s+=1;s<e.length&&!e[s].startsWith("```");)l.push(e[s]),s+=1;s<e.length&&(s+=1),t.push({kind:"code",body:l.join(`
|
|
4
4
|
`)});continue}const c=r.match(/^(#{1,3})\s+(.*\S)\s*$/);if(c){const l=c[1].length;t.push({kind:"heading",level:l,tokens:d(c[2])}),s+=1;continue}if(u(r)){const l=[];for(;s<e.length&&u(e[s]);)l.push(d(k(e[s]))),s+=1;t.push({kind:"list",items:l});continue}const o=[];for(;s<e.length&&e[s].trim()!==""&&!e[s].startsWith("```")&&!u(e[s])&&!/^#{1,3}\s+\S/.test(e[s]);)o.push(d(e[s])),s+=1;t.push({kind:"paragraph",lines:o})}return t}const f=/^\s*[-*]\s+/;function u(n){return f.test(n)}function k(n){return n.replace(f,"")}function d(n){const e=[];let t=0,s="";const r=()=>{s&&(e.push({kind:"text",body:s}),s="")};for(;t<n.length;){const c=n[t];if(c==="`"){const o=n.indexOf("`",t+1);if(o!==-1&&o>t+1){r(),e.push({kind:"code",body:n.slice(t+1,o)}),t=o+1;continue}}else if(c==="*"&&n[t+1]==="*"){const o=n.indexOf("**",t+2);if(o!==-1&&o>t+2){r(),e.push({kind:"bold",body:n.slice(t+2,o)}),t=o+2;continue}}else if(c==="*"||c==="_"){const o=y(n,t+1,c);if(o!==-1){r(),e.push({kind:"italic",body:n.slice(t+1,o)}),t=o+1;continue}}s+=c,t+=1}return r(),j(e)}function j(n){const e=[];for(const t of n){if(t.kind!=="text"){e.push(t);continue}const s=v(t.body);s.length===1&&s[0].kind==="text"?e.push(t):e.push(...s)}return e}function v(n){if(!n)return[];const e=[];let t=0;h.lastIndex=0;let s;for(;(s=h.exec(n))!==null;){const r=s.index,c=r+s[0].length;r>t&&e.push({kind:"text",body:n.slice(t,r)}),e.push({kind:"file-path",body:s[0]}),t=c}return t===0?[{kind:"text",body:n}]:(t<n.length&&e.push({kind:"text",body:n.slice(t)}),e)}function y(n,e,t){if(n[e]===void 0||/\s/.test(n[e]))return-1;for(let s=e;s<n.length;s+=1){const r=n[s];if(r===t){const c=n[s-1];if(c&&!/\s/.test(c)&&n[s+1]!==t)return s}if(r===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-zZ8Hx7er.js";const t=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],c=a("scroll-text",t);export{c as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-zZ8Hx7er.js";const e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b as o}from"./nav-destinations-uorRqFxf.js";const r=o(),t=a();export{r as A,t as O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,r as o}from"./index-
|
|
1
|
+
import{j as r,r as o}from"./index-EsrkGBcv.js";import{j as l}from"./ui-LM8pS8qE.js";function p({branch:t,fallback:s}){const e=l(t,s);return e.detached?r.jsx("span",{className:"pre",children:e.sha??"detached"}):e.prefix?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"pre",children:e.prefix}),e.leaf]}):r.jsx(r.Fragment,{children:e.leaf})}const a={worktree:null,project:null,generatedAt:0,tone:"warm"};let n=a;const c=new Set;function i(){for(const t of c)t()}function h(t){n=t,i()}function d(){n!==a&&(n=a,i())}function m(){const[t,s]=o.useState(()=>n);return o.useEffect(()=>{s(n);const e=()=>s(n);return c.add(e),()=>{c.delete(e)}},[]),t}export{p as B,d as c,h as p,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-zZ8Hx7er.js";const o=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],e=a("send-horizontal",o);export{e as S};
|
package/dist/client/assets/{send-to-agent-session-C1mgqdow.js → send-to-agent-session-DoKCDBJ4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./api-DSqpVKC7.js";import{h as r}from"./NewChatComposer-
|
|
1
|
+
import{a as o}from"./api-DSqpVKC7.js";import{h as r}from"./NewChatComposer-C97-iTMK.js";function a(s){return s.agentClass==="native-session"||s.id.startsWith("native:")}function c(s,n){const t=s.harnessSessionId?.trim();if(!t)throw new Error("This native session has no session id to continue.");const e=s.projectRoot?.trim()||s.cwd?.trim();if(!e)throw new Error("This native session has no project path to route from.");const i=s.harness?.trim();return{target:{projectPath:e},execution:{session:"existing",targetSessionId:t,...i?{harness:i}:{}},agent:{persistence:"one_time",...s.handle?.trim()?{handle:s.handle.trim()}:{}},seed:{instructions:n}}}async function m(s,n){if(a(s)){const i=Date.now();return await o("/api/sessions",{method:"POST",body:JSON.stringify(c(s,n))}),{conversationId:null,sentAt:i}}const t=await r(s),e=Date.now();return await o("/api/send",{method:"POST",body:JSON.stringify({body:n,chatId:t})}),{conversationId:t,sentAt:e}}export{a as i,m as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-zZ8Hx7er.js";const r=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],i=e("server",r);export{i as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d}from"./terminal-relay-
|
|
1
|
+
import{r as d}from"./terminal-relay-Bxs1hp-j.js";function S(r,e){const s=d(r),n=s?r.harnessSessionId??s.sessionName:null;return e?.activeSessionId??n}function I(r,e){return[...r].sort((s,n)=>{const t=s.id===e?1:0,o=n.id===e?1:0;return t!==o?o-t:(n.endedAt??n.startedAt)-(s.endedAt??s.startedAt)})}function c(r){const e=r;return[e.id,e.surfaceSessionId,e.harnessSessionId,e.externalSessionId,e.threadId,e.runtimeSessionId,e.runtimeSessionRef,e.runtimeRef,e.sourceSessionId,e.sessionId,e.refId].flatMap(s=>{const n=s?.trim();return n?[n]:[]})}function u(r){const e=/^relay-(.+)-(claude|codex)$/iu.exec(r);return e?{scope:e[1].toLowerCase(),harness:e[2].toLowerCase()}:null}function l(r,e){const s=u(r),n=u(e);return!s||!n?!1:s.harness===n.harness&&(s.scope===n.scope||s.scope.startsWith(`${n.scope}-`))}function f(r,e){const s=r?.trim();if(!s)return null;const n=e.find(a=>c(a).some(i=>i===s));if(n)return n.id;const t=e.filter(a=>c(a).some(i=>l(i,s)));return new Set(t.map(a=>a.id)).size===1?t[0]?.id??null:null}function h(r,e,s,n,t){const o=f(t,n);return o||(s??n[0]?.id??null)}function A(r,e,s,n){const t=!!d(r),o=n&&(!!s.canObserve||t),a=n&&(!!s.canTakeover||t||!!e?.resumeCommand);return{canObserve:o,canTakeover:a}}export{h as a,f as b,A as c,S as r,I as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let s=[],t=null;const n=new Set;function c(e){s=e;for(const a of n)a()}function u(){return s}function o(e){return n.add(e),()=>{n.delete(e)}}function r(e){t=e}function i(){return t}export{u as a,c as b,i as g,r as p,o as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as x}from"./api-DSqpVKC7.js";import{f as O,s as _,a as A}from"./scout-voice-CZx60X6E.js";import{g as K,a as T}from"./session-recap-lanes-D-eVJnpY.js";function F(e){return(e.split(/[/:]/u).filter(Boolean).at(-1)??e).replace(/^session[-_]?/i,"").slice(0,8)}function C(e){return((e.observe?.metadata?.session?.adapterType??e.observe?.metadata?.session?.source??e.agent.harness)?.trim().toLowerCase()??"")||null}function L(e){return((e.observe?.metadata?.session?.externalSessionId??e.agent.harnessSessionId??e.observe?.metadata?.session?.threadId)?.trim()??"")||null}function P(e,t,o){return[o??"local",e,t].join("|")}function E(e){const t=new Map;for(const a of e){const r=C(a),u=L(a);if(!r||!u)continue;const d=`${r}\0${u}`,p=t.get(d)??[];p.push(a),t.set(d,p)}const o=[];for(const a of t.values()){const r=a[0],u=C(r),d=L(r),p=r.agent.homeNodeId?.trim()||null,m=`${u} · ${F(d)}`,n=a.filter(s=>s.source==="scout"),y=n.length===1&&a.length===1,f=n[0]?.agent;o.push({sessionRef:d,harness:u,voiceKey:y&&f?f.id:P(u,d,p),displayLabel:y&&f?f.handle?.trim()||f.name:m,identityVerified:y,sourceExact:m,observedAt:r.lastActiveAt>0?r.lastActiveAt:null,reportedState:r.agent.state,nodeId:p})}return o}const N="scout.recapVoices.v1",V="scout.recapVoices.consent.v1";function M(e){return[...e].reduce((t,o)=>t*31+o.charCodeAt(0)>>>0,0)}function q(e,t){return e.voices.filter(o=>o.modelId===t&&o.available!==!1)}function B(){try{const e=window.localStorage.getItem(N);if(!e)return{};const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function j(e){try{window.localStorage.setItem(N,JSON.stringify(e))}catch{}}function J(){try{return window.localStorage.getItem(V)==="1"}catch{return!1}}function z(){try{window.localStorage.setItem(V,"1")}catch{}}function D(e,t){const o=e.models.find(a=>a.id===t);return o?o.provider!=="system"&&o.available!==!1:!0}function G(e,t,o,a={}){const r=q(t,o),u={...a},d=[],p=new Set;for(const m of e){const n=u[m];if(n&&n.modelId===o&&r.some(i=>i.id===n.voiceId)){p.add(n.voiceId);continue}n&&n.voiceId&&d.push(`Assigned voice ${n.voiceId} is unavailable; using a fallback.`);const y=r.filter(i=>!p.has(i.id)),f=y.length>0?y:r;if(f.length===0){d.push("No supported Scout speech voice is available for this model.");continue}const s=f[M(m)%f.length];u[m]={modelId:o,voiceId:s.id},p.add(s.id)}return{assignments:u,notices:d}}const Q="openscout-recap";let l={running:!1,speaker:null,notice:null,items:[]};const k=new Set;let v=null,b=null,h=0;function c(e){l=e;for(const t of k)t()}function Z(){return l}function ee(e){return k.add(e),()=>{k.delete(e)}}function S(){h+=1,v?.abort(),v=null,b?.stop(),b=null,c({running:!1,speaker:null,notice:l.notice,items:l.items.map(e=>e.status==="queued"||e.status==="summarizing"||e.status==="speaking"?{...e,status:"skipped",reason:e.reason??"Stopped."}:e)})}function Y(e,t){return x("/api/scoutbot/session-recap",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionRef:e.sessionRef,harness:e.harness}),signal:t})}async function $(e,t={}){if(l.running){S();return}const o=A();if(o){c({running:!1,speaker:null,notice:o,items:[]});return}if(e.length===0){c({running:!1,speaker:null,notice:"No visible sessions to recap.",items:[]});return}const a=++h,r=new AbortController;v=r,c({running:!0,speaker:null,notice:null,items:[]});let u;try{u=t.catalog??await(t.fetchCatalog?.()??O(t.modelId))}catch(s){if(h!==a)return;v=null,c({running:!1,speaker:null,notice:s instanceof Error?s.message:"Speech catalog unavailable.",items:[]});return}if(h!==a||r.signal.aborted)return;const d=A();if(d){v=null,c({running:!1,speaker:null,notice:d,items:[]});return}const p=t.modelId??u.defaultModelId;if((t.requireConsent??!0)&&D(u,p)&&!J()){c({running:!1,speaker:null,notice:"Configured TTS may be metered. Run Fleet roll call again to speak.",items:[]}),v=null,z();return}const m=G(e.map(s=>s.voiceKey),u,p,B());j(m.assignments);const n=e.map(s=>({target:s,status:"queued",summary:"",reason:null,spokenText:null}));c({running:!0,speaker:null,notice:m.notices[0]??null,items:n});const y=t.fetchRecap??Y,f=t.speak??((s,i)=>_(s,{modelId:i.modelId,voiceId:i.voiceId,originAppId:Q,utteranceId:`recap:${Date.now()}`}));for(let s=0;s<n.length;s+=1){if(h!==a||r.signal.aborted)return;const i=n[s];n[s]={...i,status:"summarizing"},c({running:!0,speaker:i.target.displayLabel,notice:l.notice,items:[...n]});try{const g=await y(i.target,r.signal);if(h!==a)return;if(g.status!=="ready"||!g.summary.trim()){n[s]={...n[s],status:"skipped",reason:"Source unavailable.",summary:g.summary},c({running:!0,speaker:i.target.displayLabel,notice:l.notice,items:[...n]});continue}const I=`${i.target.identityVerified?`${i.target.displayLabel}. `:`${i.target.displayLabel}. Identity not verified. `}${g.summary}`,R=m.assignments[i.target.voiceKey];if(!R){n[s]={...n[s],status:"failed",reason:"No Scout speech voice is assigned.",summary:g.summary},c({running:!0,speaker:i.target.displayLabel,notice:l.notice,items:[...n]});continue}n[s]={...n[s],status:"speaking",summary:g.summary,spokenText:I},c({running:!0,speaker:i.target.displayLabel,notice:l.notice,items:[...n]});const w=f(I,R);if(b=w,await w.promise,h!==a)return;b=null,n[s]={...n[s],status:"done"},c({running:!0,speaker:i.target.displayLabel,notice:l.notice,items:[...n]})}catch(g){if(h!==a||r.signal.aborted)return;b=null,n[s]={...n[s],status:"failed",reason:g instanceof Error?g.message:"Recap failed."},c({running:!0,speaker:null,notice:l.notice,items:[...n]})}}h===a&&(v=null,c({running:!1,speaker:null,notice:l.notice,items:[...n]}))}function te(){if(l.running){S();return}$(E(T()))}function ne(){if(l.running){S();return}const e=T(),t=K(),o=(t?e.find(r=>r.id===t):null)??e[0],a=E(o?[o]:[]);if(a.length===0){c({running:!1,speaker:null,notice:"No visible session to recap.",items:[]});return}$(a)}export{S as a,ne as b,Z as g,ee as s,te as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./createLucideIcon-
|
|
1
|
+
import{c as u}from"./createLucideIcon-zZ8Hx7er.js";const l=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],b=u("power",l),d=10080*60*1e3,f=720*60*60*1e3,p={column:"state",direction:"desc"},S=[{id:"name",label:"Session",initialDirection:"asc"},{id:"host",label:"Host",initialDirection:"asc"},{id:"state",label:"State",initialDirection:"desc"},{id:"project",label:"Project",initialDirection:"asc"},{id:"activity",label:"Activity",initialDirection:"desc"}];function c(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:0;return t.surface.state==="exited"?0:e>0?3:t.surface.state==="detached"?1:2}function y(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:null;return t.surface.state==="exited"?"exited":e&&e>0?`${e} attached`:t.surface.state??"live"}function o(t){const e=t.session.metadata?.activityAt;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=t.session.metadata?.startedAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null}function v(t,e=Date.now()){const n=t.session.metadata?.activityAt,i=typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null;if(i===null)return"current";const a=Math.max(0,e-i);return a>=f?"review":a>=d?"inactive":"current"}function s(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function _(t,e){const n=e.direction==="asc"?1:-1;return[...t].sort((i,a)=>{const r=m(i,a,e.column)*n;return r!==0?r:s(i.title,a.title)})}function m(t,e,n){switch(n){case"name":return s(t.title,e.title);case"host":return s(t.surface.backend,e.surface.backend);case"state":return c(t)-c(e);case"project":return s(t.project,e.project);case"activity":{const i=o(t),a=o(e);return i===null&&a===null?0:i===null?-1:a===null?1:i-a}}}function E(t,e){if(t.column===e)return{column:e,direction:t.direction==="asc"?"desc":"asc"};const n=S.find(i=>i.id===e)?.initialDirection??"asc";return{column:e,direction:n}}export{p as D,b as P,S as T,o as a,v as b,E as c,y as d,_ as s,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as d}from"./use-fleet-active-asks-
|
|
1
|
+
import{f as d}from"./use-fleet-active-asks-CymmXWH4.js";import{c as g}from"./message-visibility-DwxgcgYK.js";const l="No project",p="Recent";function m(e){const n=e?.project?.trim();if(n)return n;const o=e?.projectRoot?.trim();if(o){const s=o.replace(/\/+$/,"").split("/").pop();if(s)return s}return l}function _(e){const n=(e.title??"").trim()||e.agentName||e.id,o=(e.agentName??"").trim().toLowerCase();if(n&&n.trim().toLowerCase()!==o)return n;const s=e.preview?g(e.preview).replace(/\s+/g," ").trim():"";return s?s.length>64?`${s.slice(0,61)}…`:s:e.currentBranch??n}const f={needs_you:"Needs you",working:"Working",queued:"Starting",quiet:"Quiet"},w=["needs_you","working","queued","quiet"];function k(e){return e?.status==="needs_attention"?"needs_you":e?.status==="working"?"working":e?.status==="queued"?"queued":"quiet"}const A=1440*60*1e3,E=["Today","Yesterday","This week","Earlier"];function L(e,n){if(!e)return"Earlier";const o=c=>{const u=new Date(c);return u.setHours(0,0,0,0),u.getTime()},s=Math.round((o(n)-o(e))/A);return s<=0?"Today":s===1?"Yesterday":s<7?"This week":"Earlier"}function S(e,n,o,s,c){if(n==="recent"){if(e.length===0)return[];const t=[...e].sort((r,a)=>(a.lastMessageAt??0)-(r.lastMessageAt??0));return[{label:p,sessions:t}]}const u=t=>{const r=t.agentId?o.get(t.agentId):void 0;switch(n){case"project":return m(r);case"agent":return r?.name??t.agentName??"Unknown agent";case"day":return L(t.lastMessageAt,c);case"state":return f[k(d(s,t))]}},i=new Map;for(const t of e){const r=u(t),a=i.get(r);a?a.push(t):i.set(r,[t])}for(const t of i.values())t.sort((r,a)=>(a.lastMessageAt??0)-(r.lastMessageAt??0));return(()=>{const t=[...i.keys()];return n==="day"?E.filter(r=>i.has(r)):n==="state"?w.map(r=>f[r]).filter(r=>i.has(r)):t.sort((r,a)=>r===l?1:a===l?-1:r.localeCompare(a))})().map(t=>({label:t,sessions:i.get(t)}))}export{l as N,S as g,m as p,_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-zZ8Hx7er.js";const e=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o=c("settings",e);export{o as S};
|
package/dist/client/assets/{sliders-horizontal-6bzeod7c.js → sliders-horizontal-782VC_yy.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./createLucideIcon-
|
|
1
|
+
import{c as t}from"./createLucideIcon-zZ8Hx7er.js";const a=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],h=t("sliders-horizontal",a);export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-zZ8Hx7er.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,c as R}from"./index-
|
|
1
|
+
import{r as n,c as R}from"./index-EsrkGBcv.js";import{c as v,a as k,w as p}from"./index-BWHgHrtv.js";const u=new Set;let i=null,a=null,c=null,s=null;function b(e){for(const r of[...u])r(e)}function E(){s||u.size===0||(s=setTimeout(()=>{s=null,d()},2e3))}function d(){c||u.size===0||(i||(i=v({url:R()}),a=k({links:[p({client:i})]})),c=a.control.events.subscribe(void 0,{onData:e=>{const r=e.data;r&&b(r)},onError:()=>{c=null,E()}}),b({kind:"unknown",payload:{reason:"control_subscription_started"}}))}function w(){s&&(clearTimeout(s),s=null),c?.unsubscribe(),c=null}function S(e){return u.add(e),d(),()=>{u.delete(e),!(u.size>0)&&w()}}function T(e){const r=n.useRef(e);r.current=e,n.useEffect(()=>S(o=>{r.current(o)}),[])}function z(e,r,o=250){const l=n.useRef(e);l.current=e;const f=n.useRef(r);f.current=r;const t=n.useRef(null);T(m=>{l.current(m)&&(t.current||(t.current=setTimeout(()=>{t.current=null,f.current()},o)))}),n.useEffect(()=>()=>{t.current&&(clearTimeout(t.current),t.current=null)},[])}export{z as a,T as u};
|