@openscout/scout 0.2.96 → 0.2.97
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/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/{ActivityScreen-BnoaUkVZ.js → ActivityScreen-y-5DLleY.js} +1 -1
- package/dist/client/assets/{AddProjectForm-IqOtJfRs.js → AddProjectForm-r_1tVuWk.js} +1 -1
- package/dist/client/assets/{AgentAvatar-6-KBVKUu.js → AgentAvatar-B7c0egdP.js} +1 -1
- package/dist/client/assets/{AgentConfigurationScreen-CuZJy07q.js → AgentConfigurationScreen-BD7Unt2P.js} +1 -1
- package/dist/client/assets/{AgentDefinitionsWorkspace-Iyl4BesU.js → AgentDefinitionsWorkspace-BbcZc9Xk.js} +1 -1
- package/dist/client/assets/{AgentDetailCard-C9rn3Fj5.js → AgentDetailCard-B_KLcgsP.js} +1 -1
- package/dist/client/assets/{AgentFloorView-YT-Jjccf.js → AgentFloorView-DMFiHs21.js} +1 -1
- package/dist/client/assets/{AgentInfoScreen-Dr99gQEZ.js → AgentInfoScreen-DHGLRddI.js} +1 -1
- package/dist/client/assets/{AgentLaneCard-DI2iW9zO.js → AgentLaneCard-ajZvcfdW.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D8bARHMx.js → AgentLaneChrome-CTp39syR.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-52un7dKC.js → AgentLaneDetailSheet-DRc-TpMB.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-CEBjmPTa.js → AgentLaneSummaryResize-VMNDo7kD.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-q20mTjms.js → AgentLanesPreflight-CFadSaia.js} +1 -1
- package/dist/client/assets/{AgentLanesView-CetZZDyF.js → AgentLanesView-u5vpLwQf.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-DrEJDJef.js → AgentLiveActions-CsQA3pu_.js} +1 -1
- package/dist/client/assets/{AgentMasterScreen-DJPnstoD.js → AgentMasterScreen-C5WlWNmk.js} +1 -1
- package/dist/client/assets/{AgentSessions-DCPCG4xb.js → AgentSessions-BePq5Lgc.js} +1 -1
- package/dist/client/assets/{AgentsConsole-CsYOoFJi.js → AgentsConsole-BuiZ_bDo.js} +1 -1
- package/dist/client/assets/{AgentsScreen-k8LvBuU_.js → AgentsScreen-CRi-hG2k.js} +1 -1
- package/dist/client/assets/AgentsSubnav-DUsya4WK.js +1 -0
- package/dist/client/assets/{AstronautSuit-DbjQtfD_.js → AstronautSuit-Cjjcv6yQ.js} +1 -1
- package/dist/client/assets/{AtopView-Daq_ob3z.js → AtopView-PxWQd-sX.js} +1 -1
- package/dist/client/assets/{BackToPicker-CXZjBRAe.js → BackToPicker-Cto0Ioz9.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-CUCXO-KH.js → BriefingDetailScreen-C29smC5d.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-B5oMTGKv.js → BriefingsScreen-DNyFBrPn.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-BsiU8lTD.js → BrokerMetadataPanel-DbaCQlhw.js} +1 -1
- package/dist/client/assets/{BrokerScreen-BPbOHhCS.js → BrokerScreen-CS0s4Gm4.js} +1 -1
- package/dist/client/assets/{CastPicker-_5E5hNUe.js → CastPicker-CTBHjjGw.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-D-eXhzPf.js → ChatCollapsedStrip-D4rc7wBQ.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-n7W4iGUG.js → CodeDiffPane-QvxCUzTi.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-CMsbSTDq.js → CodeProjectPicker-DplkpM7f.js} +1 -1
- package/dist/client/assets/{CodeScreen-CeuO3EhR.js → CodeScreen-CrR2JaVj.js} +1 -1
- package/dist/client/assets/{ConversationComposer-CXPKx86g.js → ConversationComposer-H8_hsYSc.js} +1 -1
- package/dist/client/assets/{ConversationFeedRows-WrH-YI3L.js → ConversationFeedRows-hlEFlURs.js} +1 -1
- package/dist/client/assets/{ConversationHeader-BQWzGzLK.js → ConversationHeader-B0ZBhE_E.js} +1 -1
- package/dist/client/assets/{ConversationPanels-Dujvnmup.js → ConversationPanels-fMo6Uy1v.js} +2 -2
- package/dist/client/assets/{ConversationScreen-CR9pWB65.js → ConversationScreen-CXAHQwQ3.js} +1 -1
- package/dist/client/assets/{ConversationStatus-DVzSb2Hv.js → ConversationStatus-DI5GCiyW.js} +1 -1
- package/dist/client/assets/{CrewAvatar-BwXjyg8N.js → CrewAvatar-CXJHLNVM.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +1 -0
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
- package/dist/client/assets/{DataTable-Bp8tU9AK.js → DataTable-DXIlOlVu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-B-6rmXzL.js → DispatchAftermath-CrELgl2e.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-Do3wQ_3Z.js → DocumentFocusViewer-DFFE85Tq.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-C1orRyP9.js → EmbeddableSurfacesLab-DgpewB3y.js} +1 -1
- package/dist/client/assets/{EmptyState-CJzXj1l5.js → EmptyState-D9X16fKq.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Df6VzXjA.js → FileViewerPane-CY0RN78e.js} +1 -1
- package/dist/client/assets/{FlightObserveScreen-6mGnmWQA.js → FlightObserveScreen-qyzHzxLa.js} +1 -1
- package/dist/client/assets/{FollowScreen-DvnxYLVh.js → FollowScreen-wZ-z67mX.js} +1 -1
- package/dist/client/assets/{HarnessMark-B979GCSB.js → HarnessMark-DAaWPiT_.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-CHTuv8p6.js → HarnessesScreen-DbKkQM4o.js} +1 -1
- package/dist/client/assets/{HerdrSession-B3McuYgi.js → HerdrSession-CYKRfBad.js} +1 -1
- package/dist/client/assets/{HomeHero-CdUVPjkG.js → HomeHero-DYyd3cpz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-Bok5Sk5c.js → HostAdvisorView-NtM0bsg8.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-B7XSoJsu.js → KnowledgeSearchInspector-CU6BCFcS.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchScreen-D3o3IODW.js → KnowledgeSearchScreen-DvbRRPQB.js} +1 -1
- package/dist/client/assets/{LaneToolHoverCard-HByf2ndx.js → LaneToolHoverCard-Bo2Zl-1a.js} +1 -1
- package/dist/client/assets/{LaneTraceDetailSheet-BUgHz-sd.js → LaneTraceDetailSheet-C3C8UjXv.js} +1 -1
- package/dist/client/assets/{LaneTraceEventFocus-DM-hoPxG.js → LaneTraceEventFocus-Cek_64zR.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DCLJRsBy.js → MeshCanvas-TvsID4fe.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-cEFS9eW7.js → MeshCanvasMinimap-CxqeVVco.js} +1 -1
- package/dist/client/assets/{MeshScreen-BcxPkhm6.js → MeshScreen-BJ-j9YXv.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-CCRPd8PU.js → MeshTopologyView-BjprutE8.js} +2 -2
- package/dist/client/assets/{MessagesScreen-Bb5l13MO.js → MessagesScreen-CyNIZ3-X.js} +1 -1
- package/dist/client/assets/{MissionContextRail-DF0_kiU7.js → MissionContextRail-Be0uXljQ.js} +1 -1
- package/dist/client/assets/{MissionControlView-E3V7bENU.js → MissionControlView-Bj7cAbZd.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-h15sQFvP.js → MissionFocusOverlay-DvTw6ts5.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-KPdk9rSa.js → MissionLeftAgentRow-B0QG7Gys.js} +1 -1
- package/dist/client/assets/{MissionLogPane-BbdDKjUl.js → MissionLogPane-EsM_S3ro.js} +1 -1
- package/dist/client/assets/{NewAgentModal-DfHxad34.js → NewAgentModal-Cqiq1CE1.js} +1 -1
- package/dist/client/assets/{NewChatComposer-_Stj0fZy.js → NewChatComposer-C_1op4dH.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-B1u7ki70.js → NewChatOrigin-D7hwp6dm.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-CGHI_hb5.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-ZQWwrK3i.js → ObserveTextFlow-BcrGQet8.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-BhVsvwkh.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-CUd2yOLu.js → OpenScoutAppShell-BtfvMkAp.js} +1 -1
- package/dist/client/assets/{OpsAgentsView-DI5wu1si.js → OpsAgentsView-DBYtmLnh.js} +1 -1
- package/dist/client/assets/OpsScreen-CuYVgkC_.js +1 -0
- package/dist/client/assets/OpsSubnav-BEU4kKXm.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-k2QHHHsQ.js → ProjectAgentProfileBar-uJw9Wdfk.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-Bpxk1ui2.js → ProjectAgentProfileHero-CIMS4Dy_.js} +1 -1
- package/dist/client/assets/{ProjectsInbox-C_bMHLCc.js → ProjectsInbox-JgU0lrY8.js} +1 -1
- package/dist/client/assets/{ProjectsRail-J-aH_pxT.js → ProjectsRail-p99BRBOa.js} +1 -1
- package/dist/client/assets/ProjectsScreen-BB45DU53.js +1 -0
- package/dist/client/assets/{ProjectsThreadAside-_ourdM-Q.js → ProjectsThreadAside-BHDTJWOz.js} +1 -1
- package/dist/client/assets/{Provider-CtXJeLrP.js → Provider-Bu-C8Hxc.js} +1 -1
- package/dist/client/assets/{RailRow-CEH2MFBw.js → RailRow-ClMmtaIE.js} +1 -1
- package/dist/client/assets/{RawSessionsTable-CDyrom-F.js → RawSessionsTable-BtKdQPiv.js} +1 -1
- package/dist/client/assets/{RealtimeVoiceScreen-DBl3DN1H.js → RealtimeVoiceScreen-KPHJgO1l.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-kY2pHjIs.js → RepoDiffEmbedScreen-CjZ5ew3y.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-C6LhoKrn.js → RepoDiffPageScreen-CdTFfmbk.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-BhcIIQQg.js → RepoDiffViewer-BFperHQg.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-Csy_j9LD.js → RepoDiffViewerLazy-BkBmbi1Z.js} +2 -2
- package/dist/client/assets/{ReposScreen-B_cB0zu7.js → ReposScreen-C8dT4bK0.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-CSy_fjcG.js → ScoutDeckSurface-BcJsm2Kq.js} +1 -1
- package/dist/client/assets/{ScoutSurface-CQVcSrin.js → ScoutSurface-DmzEtrx8.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DqGiLYNy.js → ScoutbotFxLab-DU15Plja.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BR4VRdgh.js → SecondaryNav-BrXMtvKE.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-BTlZ9gAg.js → SessionEmbedScreen-Bt4flmAx.js} +1 -1
- package/dist/client/assets/{SessionObserve-dQDN23pP.js → SessionObserve-BCehTlO8.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-BRBGKAgd.js → SessionObserveEvidence-Bb6U-dem.js} +1 -1
- package/dist/client/assets/{SessionRefScreen-COVQMbtE.js → SessionRefScreen-C8BiRVPx.js} +1 -1
- package/dist/client/assets/SessionsScreen-BNvjUflN.js +1 -0
- package/dist/client/assets/{SettingsDrawer-RGVK_bmE.js → SettingsDrawer-BieUmb8g.js} +1 -1
- package/dist/client/assets/{SettingsScreen-CCxzy5IU.js → SettingsScreen-3JvX1WFL.js} +1 -1
- package/dist/client/assets/{ShikiPane-DYI9Hkge.js → ShikiPane-DPWsVNtn.js} +1 -1
- package/dist/client/assets/{SlidePanel-B9ugxWgA.js → SlidePanel-BMRIR6bH.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-z5hHesx9.js → SpriteAvatar-56DTXxSV.js} +1 -1
- package/dist/client/assets/{StatusPill-BFvMjmZV.js → StatusPill-BcuYUgsD.js} +1 -1
- package/dist/client/assets/{TailView-0uEIj2JH.js → TailView-BDy8c2VB.js} +1 -1
- package/dist/client/assets/{Terminal-DouZeNxc.js → Terminal-BlUQY9_Z.js} +1 -1
- package/dist/client/assets/{TerminalEmbedScreen-dMNUbzXr.js → TerminalEmbedScreen-DTjxktyr.js} +1 -1
- package/dist/client/assets/{TerminalHeaderMount-BL07cd0q.js → TerminalHeaderMount-Cy-uxkey.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-BflAwXeZ.js → TextDocumentSurface-BeSwe3Yl.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BTnjOQi0.js → TmuxPeek-B4no_aGI.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-CgQ6GGS-.js → VoicePermissionsPanel-Bd16scwz.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-CaLG-zDs.js → WorkDetailScreen-DIFQufak.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-B9Sil_No.js → WorkFilesViewer-CT5XEFGf.js} +1 -1
- package/dist/client/assets/{activity-DcrMApUY.js → activity-CqZafWfx.js} +1 -1
- package/dist/client/assets/{addon-fit-DMVrz5Sv.js → addon-fit-CM6F_JRD.js} +1 -1
- package/dist/client/assets/{addon-webgl-BYvpZUyu.js → addon-webgl-DRTiePFC.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-B-5QTeas.js → agent-autocomplete-DXUBnlkN.js} +1 -1
- package/dist/client/assets/{agent-essentials-D7KRGYvF.js → agent-essentials-vytdybaX.js} +1 -1
- package/dist/client/assets/{agent-master-model-DqjrVI2h.js → agent-master-model-DAZL92oe.js} +1 -1
- package/dist/client/assets/{agent-specialization-BujJVUTD.js → agent-specialization-BtxLN4UR.js} +1 -1
- package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
- package/dist/client/assets/{arc.es-NHqHWohb.js → arc.es-Bh84oHJ7.js} +1 -1
- package/dist/client/assets/{arrow-down-CKtSUjmW.js → arrow-down-DvTsLokL.js} +1 -1
- package/dist/client/assets/{arrow-left-Czpf-AE4.js → arrow-left-DHfdXJVZ.js} +1 -1
- package/dist/client/assets/{arrow-right-BuzMnLYP.js → arrow-right-BBsrogWf.js} +1 -1
- package/dist/client/assets/{arrow-up-right-C6Wl-1uw.js → arrow-up-right-CY0Vw_67.js} +1 -1
- package/dist/client/assets/{bot-rd0awxD3.js → bot-DzkOUFBb.js} +1 -1
- package/dist/client/assets/{check-ofKUE8yH.js → check-DbIkldnK.js} +1 -1
- package/dist/client/assets/{chevron-down-wciXnOQz.js → chevron-down-C475vltS.js} +1 -1
- package/dist/client/assets/{chevron-right-D-HdlPg8.js → chevron-right-CnZRSd-V.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-Tyv9rzx7.js → chunk-HRAB3GC3-DLNT8aOo.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-BC2Mandc.js → chunk-JTPDIGGW-Ci5j4vzV.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-C1AWTYZZ.js → chunk-T65CQEWV-BtNvicWs.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-DwHPHa6f.js → chunk-YOZR3KYS-DN5EJulq.js} +1 -1
- package/dist/client/assets/{clock-B88r8OrZ.js → clock-DVvENUU5.js} +1 -1
- package/dist/client/assets/{code-xml-D7pOQM9l.js → code-xml-CvKBY3KA.js} +1 -1
- package/dist/client/assets/{compass-Dt1AMXz2.js → compass-BcRI_YXo.js} +1 -1
- package/dist/client/assets/content--T3p6akp.js +1 -0
- package/dist/client/assets/content-4nFMLuzF.js +1 -0
- package/dist/client/assets/content-BJ4nHvcu.js +1 -0
- package/dist/client/assets/{content-nkx0swDe.js → content-BNyAjpUl.js} +1 -1
- package/dist/client/assets/content-BmGp9wNl.js +1 -0
- package/dist/client/assets/content-CBWhwaRo.js +1 -0
- package/dist/client/assets/{content-C9ijJxyl.js → content-CQlykFbe.js} +1 -1
- package/dist/client/assets/content-CevL0DgF.js +1 -0
- package/dist/client/assets/content-Ch8pf2bj.js +1 -0
- package/dist/client/assets/content-Cpvdcm_l.js +1 -0
- package/dist/client/assets/content-DfS3vgAu.js +1 -0
- package/dist/client/assets/content-DpQdNePJ.js +1 -0
- package/dist/client/assets/content-Dqpibejl.js +1 -0
- package/dist/client/assets/content-TV0nd6-r.js +1 -0
- package/dist/client/assets/{content-BWPNyXJ0.js → content-odbb5H4U.js} +1 -1
- package/dist/client/assets/content-uXHLPHe0.js +1 -0
- package/dist/client/assets/{conversation-icons-tp9BX6X2.js → conversation-icons-CBMKBGHd.js} +1 -1
- package/dist/client/assets/{conversation-model-Dc02NsGp.js → conversation-model-QsJVfSeG.js} +1 -1
- package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +1 -0
- package/dist/client/assets/{copy-CWWAJ75H.js → copy-Cj-owMb-.js} +1 -1
- package/dist/client/assets/{cpu-DrqejfkB.js → cpu-DuD3RFX5.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DezKXSG2.js → createLucideIcon-DthwWQIg.js} +1 -1
- package/dist/client/assets/{discover-C2CZO4Tk.js → discover-B3uQlh5L.js} +2 -2
- package/dist/client/assets/embed-entry-DkRcHKTh.js +2 -0
- package/dist/client/assets/{external-link-Dp_a2vRZ.js → external-link-C_nxk0MJ.js} +1 -1
- package/dist/client/assets/{eye-BRyD0jno.js → eye-FnaaPfja.js} +1 -1
- package/dist/client/assets/{file-code-corner-muIVH_xO.js → file-code-corner-DDPq4Cur.js} +1 -1
- package/dist/client/assets/{file-text-CqJgwxmv.js → file-text--hfhwZH1.js} +1 -1
- package/dist/client/assets/{gauge-hU--hKVP.js → gauge-BVEknshP.js} +1 -1
- package/dist/client/assets/{gestures-DN4hEeqv.js → gestures-3gw5VgUS.js} +1 -1
- package/dist/client/assets/{git-branch-CK5v8F2v.js → git-branch-DJyvr0k-.js} +1 -1
- package/dist/client/assets/{home-moving-signal-BjDtEJUP.js → home-moving-signal-BPqBoNSm.js} +1 -1
- package/dist/client/assets/{home-now-card-nF8OotI-.js → home-now-card-UspVW2-2.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-C-r_bBg5.js → home-now-card-nano-G8kMB32m.js} +1 -1
- package/dist/client/assets/{hooks-D46bABUP.js → hooks-BMsQzo9j.js} +1 -1
- package/dist/client/assets/{index-DvLtl7rV.js → index-BI9AljSD.js} +2 -2
- package/dist/client/assets/{index-kL1WLbeS.js → index-C-v0Z6ZS.js} +1 -1
- package/dist/client/assets/{index-CPrU5q04.js → index-D9DzUORB.js} +1 -1
- package/dist/client/assets/index-DfsTyYDx.js +1 -0
- package/dist/client/assets/{inspector-panel-Dkc7rLvY.js → inspector-panel-CFSArQ8Y.js} +1 -1
- package/dist/client/assets/{keyboard-nav-BLYDhL3Z.js → keyboard-nav-e6yGeorb.js} +1 -1
- package/dist/client/assets/{lane-roster-store-DOdI1O13.js → lane-roster-store-Q7pcblY5.js} +1 -1
- package/dist/client/assets/{layers-CSsg3JVP.js → layers-Dz2dKOnU.js} +1 -1
- package/dist/client/assets/{layout-grid-DOChPJdZ.js → layout-grid-Bvs5fdB4.js} +1 -1
- package/dist/client/assets/{left-BNRFiRsb.js → left-B4Ak-Ibt.js} +1 -1
- package/dist/client/assets/{left-BggzhgXN.js → left-BMb493FZ.js} +1 -1
- package/dist/client/assets/{left-YT7mIGuH.js → left-BjFLvVOC.js} +1 -1
- package/dist/client/assets/{left-B3wSE6ql.js → left-CsXQ8Q3G.js} +1 -1
- package/dist/client/assets/left-FNH7faCI.js +1 -0
- package/dist/client/assets/{left-CARCvvxS.js → left-POkqE8gI.js} +1 -1
- package/dist/client/assets/{left-CpokZYHt.js → left-UulOTcWh.js} +1 -1
- package/dist/client/assets/{left-advisor-CCY0vkcO.js → left-advisor-CJkQS2d6.js} +1 -1
- package/dist/client/assets/{left-agents-trhO5sL8.js → left-agents-CFMxyEjT.js} +1 -1
- package/dist/client/assets/{left-default-CG33elBs.js → left-default-rnX5HANc.js} +1 -1
- package/dist/client/assets/{left-lanes-CitMgeTp.js → left-lanes-BpLXT_qH.js} +1 -1
- package/dist/client/assets/{left-mission-Zl2m_5eU.js → left-mission-B0bhseWw.js} +1 -1
- package/dist/client/assets/library-D1iXfda2.js +1 -0
- package/dist/client/assets/{loader-circle-pM56HNhR.js → loader-circle-B2W9DPG5.js} +1 -1
- package/dist/client/assets/{local-agents-C8xAhbO5.js → local-agents-DKr-gIDC.js} +1 -1
- package/dist/client/assets/{mentions-DG6OQrsc.js → mentions-DuLQnEcn.js} +1 -1
- package/dist/client/assets/{mesh-ops-BZ1h5RQs.js → mesh-ops-CRR-KnCG.js} +1 -1
- package/dist/client/assets/{mesh-view-store-ChUOASK8.js → mesh-view-store-CiET-yN8.js} +1 -1
- package/dist/client/assets/{message-circle-mZCv8tvB.js → message-circle-B2DoYKDO.js} +1 -1
- package/dist/client/assets/{message-markup-C2LQDm_k.js → message-markup-Cc_O-WdA.js} +1 -1
- package/dist/client/assets/{message-square-C7t_qtuj.js → message-square-O-Hu9Mk2.js} +1 -1
- package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-DDAgWKUl.js} +1 -1
- package/dist/client/assets/{observe-BpEm1INu.js → observe-Da2mRAsc.js} +1 -1
- package/dist/client/assets/{page-status-E5jnk48p.js → page-status-Crtgjbq3.js} +1 -1
- package/dist/client/assets/{paperclip-C64lkcbM.js → paperclip-BudMKSyr.js} +1 -1
- package/dist/client/assets/{persistent-state-EHXw8WNy.js → persistent-state-xJz-qAFc.js} +1 -1
- package/dist/client/assets/{plus-Co-dqKul.js → plus-BJ1If8vj.js} +1 -1
- package/dist/client/assets/{profile-APxDsN2P.js → profile-B3qDSbrH.js} +1 -1
- package/dist/client/assets/{projects-inbox-Cg4X2lUQ.js → projects-inbox-CLek3QaG.js} +1 -1
- package/dist/client/assets/{proxy-BiW5suC7.js → proxy-1BABCaDb.js} +1 -1
- package/dist/client/assets/{radio-BOxBQX-T.js → radio-B5OpHrrK.js} +1 -1
- package/dist/client/assets/{refresh-cw-DMxGzDwn.js → refresh-cw-DmNAhaH0.js} +1 -1
- package/dist/client/assets/resolve-panes-DXw-cHaj.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +1 -0
- package/dist/client/assets/{right-Bmfd3pjP.js → right-BgJ4mQLf.js} +1 -1
- package/dist/client/assets/{right-Dz_xD0Vj.js → right-Bk6h7o-Z.js} +1 -1
- package/dist/client/assets/{right-CkCCPbCX.js → right-BrICCmEt.js} +1 -1
- package/dist/client/assets/{right-CdkcrmeD.js → right-C1QIbqFZ.js} +1 -1
- package/dist/client/assets/{right-BwlW6E57.js → right-CfliKiHY.js} +1 -1
- package/dist/client/assets/{right-BuCgE0fZ.js → right-CtOLXB9s.js} +1 -1
- package/dist/client/assets/{right-CimaAvQN.js → right-D8id_DWQ.js} +1 -1
- package/dist/client/assets/{right-C0ybUw0j.js → right-DJ34yMAi.js} +1 -1
- package/dist/client/assets/{right-D3eSiy41.js → right-DiFmtw6d.js} +1 -1
- package/dist/client/assets/{right-BqI-nr9G.js → right-Lx79pxpG.js} +1 -1
- package/dist/client/assets/{rocket-BQm5_CvR.js → rocket-D3-TUJ2m.js} +1 -1
- package/dist/client/assets/{router-B9vQkNJL.js → router-DTtux5sP.js} +1 -1
- package/dist/client/assets/{scope-views-1IYJdl41.js → scope-views-CPM0sBw_.js} +1 -1
- package/dist/client/assets/{scout-voice-BVUqGhth.js → scout-voice-BZKsdquE.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-BQ_Ee2Ic.js → scoutbot-markdown-CQ7Y1McC.js} +1 -1
- package/dist/client/assets/{scroll-text-Dze_dXtQ.js → scroll-text-kPhYbh-M.js} +1 -1
- package/dist/client/assets/{search-CDko0PKE.js → search-DmFM_9jm.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-BoQ_zYR9.js → secondaryNavConfig-C9bQ9_IA.js} +1 -1
- package/dist/client/assets/{selection-bridge-Din6yV3h.js → selection-bridge-Dy2mtMyi.js} +1 -1
- package/dist/client/assets/{send-horizontal-CSjIm6xg.js → send-horizontal-qyjNgEaV.js} +1 -1
- package/dist/client/assets/{server-Bzj7lPIx.js → server-nWqndnxu.js} +1 -1
- package/dist/client/assets/{session-catalog-DsaZJXZt.js → session-catalog-BkmktBHI.js} +1 -1
- package/dist/client/assets/{session-table-BQfR7u6r.js → session-table-DKSF0mrS.js} +1 -1
- package/dist/client/assets/{settings-Dyvpkb1D.js → settings-C6h9y5XX.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-C8njVwfg.js → sliders-horizontal-BhHKxsCO.js} +1 -1
- package/dist/client/assets/{sparkles-CETYrxGA.js → sparkles-Cf8gin88.js} +1 -1
- package/dist/client/assets/{sse-CD9MMUxl.js → sse-DDHEHUgz.js} +1 -1
- package/dist/client/assets/{tail-events-Ps8KpKah.js → tail-events-BdUrO0kb.js} +1 -1
- package/dist/client/assets/{terminal-9GRS_Qdc.js → terminal-C3YRPfyz.js} +1 -1
- package/dist/client/assets/{terminal-relay-GYMIvKs1.js → terminal-relay-BFhdIstF.js} +1 -1
- package/dist/client/assets/{terminal-takeover-_Jyys4me.js → terminal-takeover-B6H4llRR.js} +1 -1
- package/dist/client/assets/{text-BP3oyl8-.js → text-Faa3ZStB.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C9ABzjXI.js → use-conversation-list-DO5J8T1H.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DAspZQjE.js → use-fleet-active-asks-BtgNnRgK.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Dh54ymEp.js → use-mesh-ops-items-N1HHhChY.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-x8pJMVrG.js → use-reduced-motion-8WuxLa5l.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-DhCbiDK3.js → use-scout-dev-flags-B31qTy6m.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-DoBwV0LX.js → useAgentHoverCard-Bkv-Uz_V.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-ejq9dCWV.js → usePierreRuntime-BfZHKAkI.js} +1 -1
- package/dist/client/assets/{wrench-DjkoAOQt.js → wrench-DkxnZRlR.js} +1 -1
- package/dist/client/assets/{x-CAbNespN.js → x-DfRJbqrh.js} +1 -1
- package/dist/client/assets/{xterm-Cf-ngcGP.js → xterm-CJw8Epxv.js} +1 -1
- package/dist/client/assets/{zap-Cq8eWkcF.js → zap-CIo8msJB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +65 -21
- package/dist/pairing-runtime-controller.mjs +8 -0
- package/dist/runtime/broker-daemon.mjs +58 -10
- package/dist/scout-control-plane-web.mjs +8 -0
- package/package.json +2 -2
- package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +0 -1
- package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +0 -1
- package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +0 -1
- package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +0 -1
- package/dist/client/assets/OpsScreen-D8fQafCl.js +0 -1
- package/dist/client/assets/OpsSubnav-1K4Jaf__.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +0 -1
- package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +0 -1
- package/dist/client/assets/SessionsScreen--5OJ3p3v.js +0 -1
- package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
- package/dist/client/assets/content-9K38QchR.js +0 -1
- package/dist/client/assets/content-BRgnyXWh.js +0 -1
- package/dist/client/assets/content-BdkI07v3.js +0 -1
- package/dist/client/assets/content-C4oWa8SB.js +0 -1
- package/dist/client/assets/content-CFZ4rghn.js +0 -1
- package/dist/client/assets/content-CIqu_Ci_.js +0 -1
- package/dist/client/assets/content-CnJF9DGO.js +0 -1
- package/dist/client/assets/content-CriW8Y8u.js +0 -1
- package/dist/client/assets/content-DDCyPPk_.js +0 -1
- package/dist/client/assets/content-DtcZeh5m.js +0 -1
- package/dist/client/assets/content-U9tsdtle.js +0 -1
- package/dist/client/assets/content-hFLK3CON.js +0 -1
- package/dist/client/assets/content-p00KQrtD.js +0 -1
- package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +0 -1
- package/dist/client/assets/embed-entry-BSMUykuG.js +0 -2
- package/dist/client/assets/index-zvhpRHao.js +0 -1
- package/dist/client/assets/left-B-SdEJSJ.js +0 -1
- package/dist/client/assets/library-DkALuCh5.js +0 -1
- package/dist/client/assets/resolve-panes-DeVJbS9c.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-
|
|
1
|
+
import{r as d,j as e}from"./index-BI9AljSD.js";import{u as k}from"./Provider-Bu-C8Hxc.js";import{c as y}from"./colors-BtO5_zlx.js";import{A as S}from"./AgentAvatar-B7c0egdP.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./text-Faa3ZStB.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-BQ6t92tJ.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./api-Co9aQ2Jw.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./loader-circle-B2W9DPG5.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./voice-levels-Dcr3jglk.js";function ge(){const{route:t,agents:o,navigate:s}=k();if(t.view!=="terminal")return null;const r=t.agentId?o.find(i=>i.id===t.agentId)??null:null,l=t.mode??"takeover",[f,p]=d.useState(null);d.useEffect(()=>{if(t.view!=="terminal"||t.agentId||!t.terminalSurfaceKey){p(null);return}let i=!1;return T().then(g=>{i||p(C(g,t.terminalSessionId,t.terminalSurfaceKey))}).catch(()=>{i||p(null)}),()=>{i=!0}},[t.agentId,t.terminalSessionId,t.terminalSurfaceKey,t.view]);const j=f?R(f.surface):null,n=(r?$(r):null)??j,c=d.useMemo(()=>n?A(n):null,[n]);return r?e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsx(D,{agent:r}),e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),e.jsx(a,{label:"Backend",value:n?.backend??"pty"}),n&&e.jsx(a,{label:"Session",value:n.sessionName}),n?.paneId&&e.jsx(a,{label:"Pane",value:n.paneId}),e.jsx(a,{label:"State",value:y(r.state)})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c}),e.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[n&&e.jsx(m,{active:l==="observe",label:"Observe",onClick:()=>s(b(r.id,"observe"))}),e.jsx(m,{active:l==="takeover",label:"Takeover",onClick:()=>s(b(r.id,"takeover"))}),e.jsx(m,{label:"Profile",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"profile"})}),e.jsx(m,{label:"Trace",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"observe"})})]}),e.jsxs(u,{label:"Agent",children:[e.jsx(a,{label:"Harness",value:r.harness??"-"}),e.jsx(a,{label:"Transport",value:r.transport??"-"}),r.role&&e.jsx(a,{label:"Role",value:w(r.role)??r.role}),r.handle&&e.jsx(a,{label:"Handle",value:`@${r.handle}`}),r.updatedAt&&e.jsx(a,{label:"Updated",value:N(r.updatedAt)})]}),(r.project||r.branch||r.cwd||r.projectRoot)&&e.jsxs(u,{label:"Workspace",children:[r.project&&e.jsx(a,{label:"Name",value:r.project}),r.branch&&e.jsx(a,{label:"Branch",value:r.branch}),r.cwd&&e.jsx(a,{label:"Cwd",value:r.cwd}),!r.cwd&&r.projectRoot&&e.jsx(a,{label:"Root",value:r.projectRoot})]})]}):e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),t.agentId&&e.jsx(a,{label:"Agent",value:t.agentId}),n&&e.jsx(a,{label:"Backend",value:n.backend}),n&&e.jsx(a,{label:"Session",value:n.sessionName})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c})]})}function x(t){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(t)?t:`'${t.replace(/'/gu,"'\\''")}'`}function A(t){return t.backend==="tmux"?`tmux attach -t ${x(t.sessionName)}`:`${t.socketDir?`ZELLIJ_SOCKET_DIR=${x(t.socketDir)} `:""}zellij attach ${x(t.sessionName)}`}function b(t,o){return{view:"terminal",agentId:t,mode:o}}function $(t){return t.terminalSurface?t.terminalSurface:t.transport==="tmux"&&t.harnessSessionId?{backend:"tmux",sessionName:t.harnessSessionId,paneId:null,socketDir:null}:null}function v(t){return t==="observe"?"Read-only observe":"Interactive takeover"}function D({agent:t}){return e.jsx("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(S,{agent:t,placement:"row",size:32,presence:!1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.name}),t.handle&&e.jsxs("div",{className:"truncate font-mono text-xs text-cyan-400/70",children:["@",t.handle]})]})]})})}function m({active:t,label:o,onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:`h-7 rounded border px-2 font-mono text-2xs uppercase tracking-[0.1em] transition-colors ${t?"border-cyan-400/35 bg-cyan-400/[0.12] text-cyan-200":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] text-[var(--scout-chrome-ink-soft)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]"}`,children:o})}function h({label:t,command:o}){const[s,r]=d.useState(!1);return e.jsxs("details",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2",children:[e.jsx("summary",{className:"cursor-pointer select-none font-mono text-2xs uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mb-1.5 mt-2 flex items-center justify-end gap-2",children:e.jsx("button",{type:"button",className:"rounded border border-cyan-400/20 bg-cyan-400/[0.08] px-2 py-1 font-mono text-2xs uppercase tracking-[0.1em] text-cyan-100/80 hover:bg-cyan-400/[0.14]",onClick:()=>{I(o).then(l=>{l&&(r(!0),window.setTimeout(()=>r(!1),1200))})},children:s?"Copied":"Copy"})}),e.jsx("code",{className:"block select-text break-all rounded bg-black/25 p-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink)]",children:o})]})}function u({label:t,children:o}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),o]})}function a({label:t,value:o}){return e.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-right text-sm font-mono text-[var(--scout-chrome-ink)]",children:o})]})}export{ge as TerminalInspector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as i}from"./index-
|
|
1
|
+
import{j as e,r as i}from"./index-BI9AljSD.js";import{u as w}from"./Provider-Bu-C8Hxc.js";import{a as C}from"./api-Co9aQ2Jw.js";import{u as B}from"./sse-DDHEHUgz.js";import{t as g}from"./time-Dhsh_2EG.js";import{B as E,b as M}from"./BrokerScreen-CS0s4Gm4.js";import{b as S}from"./broker-display-Q75fupqG.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./index-BWHgHrtv.js";import"./EmptyState-D9X16fKq.js";import"./clipboard-e3fSpeo7.js";import"./status-tone-BM_zuRy1.js";import"./openContent-C6XO6kr5.js";import"./BrokerMetadataPanel-DbaCQlhw.js";import"./DispatchAftermath-CrELgl2e.js";import"./follow-route-BvcGtBIL.js";import"./arrow-up-right-CY0Vw_67.js";import"./ShikiPane-DPWsVNtn.js";import"./types-B0PlfpKc.js";/* empty css */import"./refresh-cw-DmNAhaH0.js";import"./arrow-down-DvTsLokL.js";import"./external-link-C_nxk0MJ.js";import"./sparkles-Cf8gin88.js";import"./paperclip-BudMKSyr.js";import"./plus-BJ1If8vj.js";import"./send-horizontal-qyjNgEaV.js";import"./check-DbIkldnK.js";import"./copy-Cj-owMb-.js";import"./message-square-O-Hu9Mk2.js";import"./radio-B5OpHrrK.js";import"./bot-DzkOUFBb.js";function $(r){return`${Math.round(r*100)}%`}function R(r){switch(r){case"success":return"sent";case"failed_query":return"query";case"failed_delivery":return"delivery";default:return"attempt"}}function q(r){switch(r){case"dm":return"direct";case"channel":return"channel";case"broadcast":return"broadcast";case null:return"no route";default:return r}}function A(r){const t=new Map;for(const o of r){const n=q(o.route);t.set(n,(t.get(n)??0)+1)}return[...t.entries()].map(([o,n])=>({label:o,count:n})).sort((o,n)=>n.count-o.count||o.label.localeCompare(n.label)).slice(0,5)}function D(r){const t={sent:0,query:0,delivery:0,failures:0};for(const o of r)o.kind==="success"?t.sent+=1:o.kind==="failed_query"?t.query+=1:(o.kind==="failed_delivery"||o.kind==="delivery_attempt")&&(t.delivery+=1),S(o)&&(t.failures+=1);return t}function L(){const{inspectBrokerAttempt:r}=w(),[t,o]=i.useState(null),[n,f]=i.useState(null),l=i.useCallback(async()=>{try{const s=await C(M());o(s),f(null)}catch(s){f(s instanceof Error?s.message:String(s))}},[]);i.useEffect(()=>{l()},[l]),B(s=>{(s.kind==="message.posted"||s.kind==="delivery.planned"||s.kind==="delivery.attempted"||s.kind==="delivery.state.changed"||s.kind==="scout.dispatched")&&l()});const h=i.useMemo(()=>t?[...t.failedQueries,...t.failedDeliveries].sort((s,m)=>m.ts-s.ts).slice(0,4):[],[t]),v=i.useMemo(()=>t?t.attempts.slice().sort((s,m)=>m.ts-s.ts).slice(0,5):[],[t]),j=i.useMemo(()=>t?A(t.attempts):[],[t]),a=i.useMemo(()=>t?D(t.attempts):null,[t]),b=i.useCallback(s=>{r(s),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:420}}))},[r]);if(!t&&!n)return e.jsx("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:e.jsx(u,{title:"Dispatch context",status:"Loading broker ledger..."})});if(!t)return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsx(u,{title:"Dispatch context",status:"Broker diagnostics unavailable"}),e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5 text-sm leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:n})]});const c=t.attempts.length,y=t.ledger.hasMore.attempts?"+":"",N=c>0&&a?a.failures/c:0;return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs(u,{title:"Dispatch context",status:`${c}${y} latest route${c===1?"":"s"}`,children:[e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(d,{label:"Sent",value:`${a?.sent??0}`}),e.jsx(d,{label:"Query",value:`${a?.query??0}`}),e.jsx(d,{label:"Delivery",value:`${a?.delivery??0}`})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-2 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsxs("span",{children:[$(N)," failed"]}),e.jsx("span",{children:g(t.generatedAt)})]})]}),e.jsx(p,{label:"Route mix",children:e.jsx(_,{items:j,empty:"No route records visible"})}),e.jsx(p,{label:"Needs attention",children:h.length===0?e.jsx(x,{children:"No failed routes in history."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:h.map(s=>e.jsx(k,{attempt:s,onOpen:b},s.id))})}),e.jsx(p,{label:"Recent dispatch",children:v.length===0?e.jsx(x,{children:"No recent dispatch rows."}):e.jsx("div",{className:"flex flex-col gap-1",children:v.map(s=>e.jsx(k,{attempt:s,onOpen:b,compact:!0},s.id))})})]})}function u({title:r,status:t,children:o}){return e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5",children:[e.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),e.jsx("div",{className:"mt-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-soft)]",children:t}),o]})}function d({label:r,value:t}){return e.jsxs("div",{className:"min-w-0 rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-bg)] px-1.5 py-1",children:[e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:r}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:t})]})}function p({label:r,children:t}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),t]})}function _({items:r,empty:t}){return r.length===0?e.jsx(x,{children:t}):e.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(o=>e.jsxs("span",{className:"rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 font-mono text-xs text-[var(--scout-chrome-ink-soft)]",title:`${o.count} ${o.label}`,children:[o.label," ",o.count]},o.label))})}function x({children:r}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:r})}function k({attempt:r,onOpen:t,compact:o=!1}){return e.jsxs("button",{type:"button",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5 text-left transition-colors hover:border-[var(--scout-chrome-border)]",onClick:()=>t(r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-bg)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:R(r.kind)}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:r.detail}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(r.ts)})]}),!o&&e.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{className:"truncate",children:r.actorName??"unknown"}),e.jsx("span",{className:"shrink-0",children:"->"}),e.jsx("span",{className:"truncate",children:r.target??"none"})]})]})}function Ue({selectedAttempt:r,navigate:t,onClose:o}){return r?e.jsx(E,{attempt:r,navigate:t,onClose:o}):e.jsx(L,{})}export{Ue as BrokerRight};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-DthwWQIg.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as L,j as jt,N as ce,O as Nt,P as Ne,Q as Me,A as Mt,R as Bt,B as k,D as h,T as zt,U as J,V as Wt,W as Kt}from"./index-DvLtl7rV.js";import{b as Gt}from"./perf-PX8Rx0EP.js";import{n as ue}from"./synthetic-agent-routing-aduMYO7P.js";import{o as Ht,q as Be,n as Vt,u as Yt}from"./terminal-sessions-BQ6t92tJ.js";var ze=["local","url","sharedConfig","env"];function We(e){const t=qt(e),n=e.audienceIncludes??Qt(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 c=r[a];if(!c)return o(a),{key:a,enabled:!1,value:!1,layer:"default",audience:t,reason:"unknown-flag"};const d=Xt(e.layers,a);return d?{key:a,enabled:d.value,value:d.value,layer:d.layer,audience:t,requiredTier:c.tier,reason:"override",definition:c}:c.defaultEnabled?c.tier&&!n(t,c.tier)?{key:a,enabled:!1,value:!1,layer:"default",audience:t,requiredTier:c.tier,reason:"audience-denied",definition:c}:{key:a,enabled:!0,value:!0,layer:"default",audience:t,requiredTier:c.tier,reason:"default",definition:c}:{key:a,enabled:!1,value:!1,layer:"default",audience:t,requiredTier:c.tier,reason:"default",definition:c}}return{registry:e.registry,isEnabled:a=>i(String(a)).enabled,explain:a=>i(String(a)),all:()=>Object.keys(e.registry).sort().map(i),audience:()=>t}}function qt(e){let t=e.audience.tier;for(const n of ze.slice().reverse()){const s=e.layers?.[n]?.audience;s&&(t=s)}return{...e.audience,tier:t}}function Qt(e){return(t,n)=>{if(t.tier===n)return!0;if(!e||e.length===0)return!1;const s=e.indexOf(t.tier),o=e.indexOf(n);return s<0||o<0?!1:s>=o}}function Xt(e,t){for(const n of ze){const s=Zt(e?.[n]?.flags?.[t]);if(s!==null)return{layer:n,value:s}}return null}function Zt(e){return e===!0||e==="on"?!0:e===!1||e==="off"?!1:null}function Jt(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 t=e.trim().toLowerCase();if(["1","true","on","yes","enabled","enable"].includes(t))return!0;if(["0","false","off","no","disabled","disable"].includes(t))return!1;if(["default","null","unset","clear"].includes(t))return"default"}function en(e,t={}){const n=t.paramPrefix??"ff.",s=t.audienceParam??"ffAudience",o=typeof e=="string"?new URL(e,"http://hudson.local"):e,r={};let i;for(const[a,c]of o.searchParams.entries()){if(a===s&&c.trim()&&(i=c.trim()),!a.startsWith(n))continue;const d=a.slice(n.length),f=Jt(c);d&&f!==void 0&&(r[d]=f)}return{flags:r,audience:i}}var D=1;function Ke(e){if(typeof window>"u")return{version:D};try{const t=window.localStorage?.getItem(e);return tn(t)}catch{return{version:D}}}function q(e,t){if(typeof window>"u")return;const n=Ge(t),s=JSON.stringify(n);try{window.localStorage?.setItem(e,s)}catch{}nn(e,s)}function tn(e){if(!e)return{version:D};try{const t=JSON.parse(e);return!t||typeof t!="object"?{version:D}:Ge(t)}catch{return{version:D}}}function Ge(e){const t={version:D};if(e.audience&&(t.audience=e.audience),e.flags&&typeof e.flags=="object"){t.flags={};for(const[n,s]of Object.entries(e.flags))(s===!0||s===!1)&&(t.flags[n]=s);Object.keys(t.flags).length===0&&delete t.flags}return t}function nn(e,t){if(!(typeof document>"u"))try{const n=encodeURIComponent(t);document.cookie=`${encodeURIComponent(e)}=${n}; Path=/; SameSite=Lax; Max-Age=31536000`}catch{}}var sn="hudson.flags",He=L.createContext(null);function js({registry:e,audience:t,audienceOrder:n,audienceIncludes:s,initialLayers:o,storageKey:r=sn,warnOnUnknown:i=!1,children:a}){const[c,d]=L.useState(()=>{const g=o?.local;return{version:1,audience:g?.audience??void 0,flags:on(g)}});L.useEffect(()=>{const g=Ke(r);(g.audience||Object.keys(g.flags??{}).length>0)&&d(g)},[r]);const f=L.useMemo(()=>({...o,local:{...o?.local,audience:c.audience??o?.local?.audience,flags:{...o?.local?.flags??{},...c.flags??{}}}}),[o,c]),S=L.useMemo(()=>We({registry:e,audience:t,audienceOrder:n,audienceIncludes:s,layers:f,warnOnUnknown:i}),[e,t,n,s,f,i]),A=L.useMemo(()=>({...S,layers:f,storageKey:r,setLocalOverride:(g,w)=>{d(R=>{const U={...R.flags??{}};w===null?delete U[g]:U[g]=w;const _={...R,version:1,flags:U};return q(r,_),_})},setLocalAudienceOverride:g=>{d(w=>{const R={...w,version:1,audience:g??void 0};return q(r,R),R})},resetLocalOverrides:()=>{const g={version:1};q(r,g),d(g)}}),[S,f,r]);return jt.jsx(He.Provider,{value:A,children:a})}function Ve(){return L.useContext(He)}function Ns(){const e=Ve();if(!e)throw new Error("useFeatureFlags must be used within FeatureFlagsProvider");return e}function Ms(e,t=!0){return Ve()?.isEnabled(e)??t}function on(e){if(!e?.flags)return;const t={};for(const[n,s]of Object.entries(e.flags))(s===!0||s===!1)&&(t[n]=s);return Object.keys(t).length>0?t:void 0}const rn=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal"],an=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.scoutbot","surface.workflows"];function ye(e,t){return Object.fromEntries(e.map(n=>[n,t]))}const Ye={label:"Surface · Scope",description:`Scope presentation on Scout infra — lean lanes/tail/sessions/agents at ${Nt}/*.`,defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","scope","observability"]},cn={...Ye,label:"Surface · Scope (legacy alias)",description:`Legacy alias for ${ce}. Prefer the primary flag; ${Ne} remains for old dev links.`},Bs=ce;function un(){return{audience:"everyone",flags:{"ops.control":!0,"ops.lanes":!0,...ye(rn,!1),...ye(an,!1)}}}const qe=["ffBundle","ffVariant","scoutBundle","scoutExperience","ab"],Qe=["ffGlobal","scoutGlobalBundle"],Xe=["ffPersist","persistBundle"],ln=new Set(["no-ops","ffAudience",...qe,...Qe,...Xe]);function zs(e){for(const t of[...e.searchParams.keys()])(ln.has(t)||t.startsWith("ff."))&&e.searchParams.delete(t);return e}const dn=["everyone","internal","power"],fn="openscout.flags",ee="openscout.flagBundle",mn={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"],pn={"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 · Mesh",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"]},[ce]:Ye,[Ne]:cn},gn={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",...Bt},Re=new Set(["clear","default","none","reset","unset"]);function K(e,t){return Object.fromEntries(e.map(n=>[n,t]))}function Ze(...e){const t={};for(const n of e)n.audience&&(t.audience=n.audience),n.flags&&Object.keys(n.flags).length>0&&(t.flags={...t.flags??{},...n.flags});return t}function le(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 Mt:return un()}}function j(e){return e?gn[e.trim().toLowerCase()]??null:null}function te(e,t){for(const n of t){const s=e.get(n);if(s!==null)return s}return null}function Je(e){const t=te(e,qe);return j(t)}function hn(e){const t=te(e,Qe);if(t){const i=t.trim().toLowerCase();if(Re.has(i))return{action:"clear"};const a=j(t);return a?{action:"set",bundle:a}:null}const n=te(e,Xe);if(!n)return null;const s=n.trim().toLowerCase();if(Re.has(s))return{action:"clear"};if(["0","false","no"].includes(s))return null;const o=j(n);if(o)return{action:"set",bundle:o};const r=Je(e);return r?{action:"set",bundle:r}:null}function et(){if(typeof window>"u")return null;try{return j(window.localStorage.getItem(ee))}catch{return null}}function wn(e){if(!(typeof window>"u"))try{e.action==="clear"?window.localStorage.removeItem(ee):window.localStorage.setItem(ee,e.bundle)}catch{}}function Ws(){return et()??j(Me())??nt}function tt(){const e=et();return e?le(e):{}}const nt="light-prod";function st(){const e=j(Me())??nt;return le(e)}function In(e){const t=hn(e);t&&wn(t)}function ot(e=new URLSearchParams(window.location.search)){const t=en(window.location.href),n=Je(e),s=n?le(n):{},o={audience:t.audience??s.audience,flags:{...s.flags??{},...t.flags??{}}};return e.has("no-ops")&&(o.flags={...o.flags,"ops.control":!1}),o}function vn(){const e=Ke(fn);return{flags:e.flags,audience:e.audience??void 0}}function Ks(){if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return In(e),{sharedConfig:Ze(st(),tt()),url:ot(e)}}function Sn(e){const t=typeof window>"u"?{}:{sharedConfig:Ze(st(),tt()),url:ot(),local:vn()};return We({registry:pn,audience:mn,audienceOrder:dn,layers:t,warnOnUnknown:!1}).isEnabled(e)}function rt(){return Sn("ops.control")}const ne={sm:408,md:512,lg:616},at=240,it=640,bn=24,ct="openscout:lane-deck:v1",Ln=new Set(["web.ops","macos.lanes","hud.tail","web.embed"]),de=new Set(["sm","md","lg"]),ut={"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}},yn=ut["web.ops"];function fe(e){return lt(e)?ut[e]:yn}const H={pinned_left:0,main:1,pinned_right:2};function lt(e){return Ln.has(e)}function Gs(e=window.location.search,t=window.location.pathname){const n=new URLSearchParams(e),s=n.get("profile")?.trim().toLowerCase();if(s&<(s))return s;const o=n.get("embed")?.trim().toLowerCase();return o==="hud"?"hud.tail":o==="app"?"macos.lanes":t.includes("/lanes/embed")?"web.embed":(t.includes("/ops/lanes"),"web.ops")}function Hs(e=window.location.search){const t=new URLSearchParams(e),n=(t.get("lanes")??t.get("size"))?.trim().toLowerCase();return n&&de.has(n)?n:"lg"}function Vs(e,t){if(typeof e=="number"&&Number.isFinite(e))return Math.min(it,Math.max(at,Math.round(e)));const n=typeof e=="string"&&de.has(e)?e:t;return ne[n]}function Ys(e){const t=Math.min(it,Math.max(at,Math.round(e)));let n=null,s=Number.POSITIVE_INFINITY;for(const[o,r]of Object.entries(ne)){const i=Math.abs(r-t);i<s&&(s=i,n=o)}return n&&s<=bn?{px:ne[n],tier:n}:{px:t,tier:null}}function me(e,t,n){return{version:1,profileId:e,defaultLaneWidth:t??n.defaultLaneWidth,defaultHorizon:n.defaultHorizon,laneWidths:{},laneDefs:[],slots:[],showAutoLanes:n.showAutoLanes,updatedAt:Date.now()}}function Pe(e,t){const n=fe(e);return me(e,t,n)}function se(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&de.has(e))return e}function En(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.id!="string"||!t.id.trim()||t.kind!=="session"&&t.kind!=="harness"&&t.kind!=="project"&&t.kind!=="attention"||typeof t.title!="string"||!t.title.trim()?null:{id:t.id.trim(),kind:t.kind,title:t.title.trim(),sessionId:typeof t.sessionId=="string"?t.sessionId.trim():void 0,harness:typeof t.harness=="string"?t.harness.trim():void 0,projectPath:typeof t.projectPath=="string"?t.projectPath.trim():void 0}}function $n(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.id!="string"||!t.id.trim()||typeof t.laneDefId!="string"||!t.laneDefId.trim()||t.zone!=="pinned_left"&&t.zone!=="main"&&t.zone!=="pinned_right"||typeof t.position!="number"||!Number.isFinite(t.position)?null:{id:t.id.trim(),laneDefId:t.laneDefId.trim(),zone:t.zone,position:t.position,width:se(t.width)}}function dt(e,t,n,s){if(!e||typeof e!="object")return me(t,n,s);const o=e,r=Array.isArray(o.laneDefs)?o.laneDefs.map(En).filter(d=>d!==null):[],i=Array.isArray(o.slots)?o.slots.map($n).filter(d=>d!==null):[],a={};if(o.laneWidths&&typeof o.laneWidths=="object")for(const[d,f]of Object.entries(o.laneWidths)){const S=se(f);S!==void 0&&(a[d]=S)}const c=se(o.defaultLaneWidth);return{version:1,profileId:t,defaultLaneWidth:(typeof c=="string"?c:void 0)??n??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 Rn(e,t,n){return dt(e,t,n,fe(t))}function qs(e,t){const n=fe(e),s=t??n.defaultLaneWidth;try{const o=localStorage.getItem(`${ct}:${e}`);return o?Rn(JSON.parse(o),e,s):Pe(e,s)}catch{return Pe(e,s)}}function Pn(e){try{localStorage.setItem(`${ct}:${e.profileId}`,JSON.stringify({...e,updatedAt:Date.now()}))}catch{}}function Qs(e){return[...e].sort((t,n)=>{const s=H[t.zone]-H[n.zone];return s!==0?s:t.position-n.position})}function Xs(e,t){return H[e]-H[t]}function ft(){return`slot:${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function pe(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Y(e){return`session:${e}`}function Cn(e){return`harness:${pe(e)}`}function An(e){return`project:${pe(e)}`}const _n="attention:needs-input";function mt(e,t){const n=e.filter(s=>s.zone===t);return n.length===0?0:Math.max(...n.map(s=>s.position))+1}function pt(e,t){const n=e.laneDefs.some(s=>s.id===t.id);return{...e,laneDefs:n?e.laneDefs.map(s=>s.id===t.id?t:s):[...e.laneDefs,t]}}function gt(e,t){const n=e.slots.some(s=>s.id===t.id);return{...e,slots:n?e.slots.map(s=>s.id===t.id?t:s):[...e.slots,t]}}function ht(e,t){return{...e,slots:e.slots.filter(n=>n.laneDefId!==t)}}function Un(e,t){const n=Y(t);return{...ht(e,n),laneDefs:e.laneDefs.filter(s=>s.id!==n)}}function Zs(e,t){const n=Y(t);return e.slots.some(s=>s.laneDefId===n&&s.zone!=="main")}function Js(e,t){const n=Y(t),s=e.slots.find(o=>o.laneDefId===n);return!s||s.zone==="main"?null:s.zone}function eo(e,t){const n=t.zone??"pinned_left",s=Y(t.laneId),o=Un(e,t.laneId),r=pt(o,{id:s,kind:"session",title:t.title,sessionId:t.laneId});return gt(r,{id:ft(),laneDefId:s,zone:n,position:mt(r.slots,n),width:t.width})}function to(e,t){const n=t.zone??"pinned_left",s=t.kind==="attention"?_n:t.kind==="harness"&&t.harness?Cn(t.harness):t.kind==="project"&&t.projectPath?An(t.projectPath):`${t.kind}:${pe(t.title)}`,o=ht(e,s),r=pt(o,{id:s,kind:t.kind,title:t.title,harness:t.harness,projectPath:t.projectPath});return gt(r,{id:ft(),laneDefId:s,zone:n,position:mt(r.slots,n),width:t.width})}function no(e,t,n){return{...e,laneWidths:{...e.laneWidths,[t]:n},updatedAt:Date.now()}}function so(e,t){return{...e,defaultLaneWidth:t,updatedAt:Date.now()}}function oo(e){const t=new Set(e.slots.filter(n=>n.zone!=="main").map(n=>n.laneDefId));return{...e,slots:e.slots.filter(n=>n.zone==="main"),laneDefs:e.laneDefs.filter(n=>!t.has(n.id))}}const V="scope.lanes",oe={defaultLaneWidth:"md",showAutoLanes:!0,defaultHorizon:"30m"},Fn="openscout:lane-deck:v1";function Ce(e){return me(V,e,oe)}function ro(e){const t=e??oe.defaultLaneWidth;try{const n=localStorage.getItem(`${Fn}:${V}`);return n?dt(JSON.parse(n),V,t,oe):Ce(t)}catch{return Ce(t)}}function ao(e){Pn(e)}const Tn=[h.lanes,h.tail,h.sessions,h.agents];function kn(e){return Tn.includes(e)}function On(e){return e===Wt||e===Kt}function wt(e){return zt(e)}function Q(e,t={}){switch(e){case h.tail:{const n=new URLSearchParams;t.tailQuery&&n.set("q",t.tailQuery);const s=n.toString();return k(e,s?`?${s}`:"")}case h.sessions:return t.sessionId?k(e,`/${encodeURIComponent(t.sessionId)}`):k(e);case h.lanes:return k(J);case h.agents:return k(e);default:return k(J)}}function It(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 Dn(e){const t=It(e);return t?t===h.tail&&e.view==="ops"?Q(t,{tailQuery:e.tailQuery}):t===h.sessions&&e.view==="sessions"?Q(t,{sessionId:e.sessionId}):Q(t):null}function xn(e,t,n){if(!On(e[0]))return null;const s=e[1]??J;if(!kn(s))return{view:"ops",mode:"lanes"};switch(s){case h.tail:{const o=t.searchParams.get("q")?.trim();return{view:"ops",mode:"tail",...o?{tailQuery:o}:{}}}case h.sessions:return e[2]?n({view:"sessions",sessionId:decodeURIComponent(e[2])}):n({view:"sessions"});case h.agents:return n({view:"agents-v2"});case h.lanes:default:return{view:"ops",mode:"lanes"}}}const jn=new Set(["no-ops","ffBundle","ffVariant","scoutBundle","scoutExperience","ab","ffGlobal","scoutGlobalBundle","ffPersist","persistBundle","ffAudience","studio","studioInjection","studioMode"]),Nn=["ff.","studio.","studioMode."];function Mn(e){return jn.has(e)||Nn.some(t=>e.startsWith(t))}function vt(e,t=""){const n=new URL(e,"http://scout.local");new URLSearchParams(t).forEach((r,i)=>{Mn(i)&&(n.searchParams.has(i)||n.searchParams.set(i,r))});const o=n.searchParams.toString();return`${n.pathname}${o?`?${o}`:""}`}function io(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 Bn(e=typeof window<"u"?window.location.pathname:""){return wt(e)}function co(){return V}function uo(e=Bn()){return e?{"data-scope-presentation":!0}:void 0}function St(e,t=typeof window<"u"?window.location.pathname:""){return wt(t)?Dn(e):null}function zn(e,t=typeof window<"u"?window.location.pathname:""){return St(e,t)!==null}function lo(e,t=typeof window<"u"?window.location.pathname:""){return zn(e,t)?It(e):null}const fo={days:3,sessionLimit:200,hitLimit:60,debounceMs:180};function re(e){return e.root==="HOME"?`~/${e.relPath}`:e.root==="ABSOLUTE"?e.relPath:`$${e.root}/${e.relPath}`}function Ae(e){const t=e?.trim();if(!t)return null;const n=t.replace(/[\\/]+$/,""),s=n.split(/[\\/]/).filter(Boolean).at(-1)??n;return s.endsWith(".jsonl")?s.slice(0,-6):s}function T(e){return e.sourceRefs.find(t=>t.kind==="harness_transcript")??null}function bt(e){return e.sourceRefs.find(t=>t.kind==="file")??null}function ge(e){return e?Ae(e.sessionId)??Ae(re(e.path)):null}function mo(e){const t=ge(e);if(!t)return null;const n=e?.recordRange;return n?`${t}|records ${n[0]}..${n[1]}`:t}function z(e,t){const n=e.facets[t];return Array.isArray(n)?n.filter(Boolean).join(", "):typeof n=="string"?n:""}function M(e){const t=new Set;return e.split(/[^A-Za-z0-9_./-]+/u).map(n=>n.trim()).filter(n=>n.length>1).filter(n=>{const s=n.toLowerCase();return t.has(s)?!1:(t.add(s),!0)}).slice(0,12)}const Wn=/^(events?\s+window(\s+\d+)?|files?\s+touched|tool\s+calls?|indexed\s+snippet|manifest|summary|decisions?|context\s+pack)\b/iu,_e=/^(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 Lt(e){return Wn.test(e.replace(/\s+/g," ").trim())}function Kn(e){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(t=t.replace(/<[^>\n]+>/g," ").replace(/\s+/g," ").trim(),Ue.test(t))t=t.replace(Ue,"").trim();else{const n=t.match(/^(.{6,72}?)\s[-–—]\s+(.+)$/u);if(n){const s=n[1]??"",o=n[2]??"";(_e.test(s)||/\b(?:am|pm|\d{1,2}:\d{2}|plugin|session|openscout)\b/iu.test(s))&&(t=o.trim())}}return t=t.replace(_e,"").replace(/^\s*[-–—:]\s*/,"").trim(),t=t.replace(/\s{2,}/g," ").trim(),t.length>72&&(t=`${t.slice(0,69).replace(/\s+\S*$/u,"").trimEnd()}…`),t}function Gn(e){const t=z(e,"project"),n=e.title.replace(/\s+/g," ").trim();if(n&&!Lt(n)){const o=Kn(n);if(o&&o.toLowerCase()!==t.toLowerCase()||o)return o}if(t)return t;const s=ge(T(e));return s?s.length>18?`${s.slice(0,16)}…`:s:"Session match"}function yt(e){const t=B(e,"recordKind",8).map(s=>s.toLowerCase());if(t.length===0&&t.push(...B(e,"recordTag",8).map(s=>s.toLowerCase())),t.some(s=>s.includes("assistant")))return"assistant";if(t.some(s=>s.includes("user")))return"user";if(t.some(s=>s.includes("tool")||s.includes("command")||s.includes("response")))return"tool";const n=we(e);return n==="tool activity"?"tool":n==="overview"?"overview":""}function po(e,t){const n=Ie(e.snippet,t),s=yt(e),o=he(e);let r="";if(n){const i=M(t).map(d=>d.toLowerCase()),a=n.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=>ae(d,f)>=0)):void 0)??a[0]??n).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||Gn(e)}function Hn(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 Fe(e){const t=e.trim().toLowerCase();return t?t==="events"||t.startsWith("events")?"conversation":t==="overview"||t==="summary"?"overview":t==="tool-calls"||t==="tools"?"tool activity":t==="files"||t==="files-touched"?"files touched":t==="manifest"?"session index":t.replace(/[-_]+/g," "):""}function Vn(e){const t=e.trim();return t?t.charAt(0).toUpperCase()+t.slice(1):""}function Yn(e){const t=z(e,"harness")||T(e)?.harness||"";if(!t)return"";const n=t.toLowerCase();return n==="claude"?"Claude":n==="codex"?"Codex":n==="kimi"?"Kimi":n==="cursor"?"Cursor":Vn(t)}function qn(e){const t=z(e,"sessionId").trim(),n=ge(T(e)),s=(t||n||"").trim();return s?s.length>14?s.slice(0,8):s:""}function he(e){const t=T(e)?.recordRange;if(t){const[s,o]=t;return s===o?`turn ${s}`:o-s<=1?`turns ${s}–${o}`:`turns ${s}–${o}`}const n=e.title.match(/events?\s+window\s+(\d+)/iu);return n?`window ${Number(n[1])}`:""}function Qn(e){const t=B(e,"recordKind",8).map(s=>s.toLowerCase());t.length===0&&t.push(...B(e,"recordTag",8).map(s=>s.toLowerCase()));const n=[];return t.some(s=>s.includes("user"))&&n.push("user"),t.some(s=>s.includes("assistant"))&&n.push("assistant"),t.some(s=>s.includes("tool")||s.includes("command")||s.includes("response"))&&n.push("tool"),n.length===0?"":n.join(" · ")}function we(e){const t=z(e,"documentKind");if(t){const s=t.split(",")[0]?.trim()??t;return Fe(s)}return Lt(e.title)?Fe(e.title):bt(e)?"file":T(e)?"conversation":""}function B(e,t,n=3){const s=e.facets[t];return(Array.isArray(s)?s:typeof s=="string"?s.split(","):[]).map(r=>r.trim()).filter(Boolean).slice(0,n)}function go(e){return{agent:Yn(e),project:z(e,"project"),session:qn(e),when:Hn(e),turn:he(e),role:Qn(e),where:we(e)}}function ho(e){const t=[],n=he(e);n&&t.push(n);const s=yt(e);s&&t.push(s);const o=we(e);o&&o!=="conversation"&&t.push(o);const r=B(e,"toolName",2);r.length===1&&t.push(r[0]),r.length>1&&t.push(r.join(", "));const i=new Set;return t.filter(a=>{const c=a.toLowerCase();return i.has(c)?!1:(i.add(c),!0)})}function ae(e,t){return new RegExp(`(?<![A-Za-z0-9_./~-])${Rt(t)}(?![A-Za-z0-9_./~-])`,"iu").exec(e)?.index??-1}function Ie(e,t=""){let n=e.replace(/\s+/g," ").trim();if(!n)return"";if(n=n.replace(/\s*-\s*\[\d{3,}\]\s*`[^`]+`(?:\s*\([^)]*\))?\s*-\s*/gu," "),n=n.replace(/\[\d{3,}\]\s*`[^`]+`\s*/gu,""),n=n.replace(/\*\*/gu,""),n=n.replace(/\b(?:assistant_turn|user_turn|agent_reasoning|command_or_tool|response_item|system_record)\b/giu," "),n=n.replace(/(?:~\/|\.\.?\/|\/(?:Users|home|var|tmp|opt)\/)\S+/gu," "),n=n.replace(/https?:\/\/\S+/gu," "),n=n.replace(/\b[\w.-]+\.(?:com|net|org|io|dev|app)(?:\/\S*)?/giu," "),n=n.replace(/\{[^{}]{0,160}\}/gu," "),n=n.replace(/`[^`]{0,64}`/gu,r=>{const i=r.slice(1,-1);return M(t).some(a=>ae(i,a)>=0)||/^[A-Za-z][\w.-]{0,24}$/u.test(i)?i:" "}),n=n.replace(/\s{2,}/g," ").trim(),n=n.replace(/^[\s,;:.\-–—|/]+/u,"").trim(),n.includes("{")||n.includes("[")){const r=n.search(/[\[{]/u);if(r>18){const i=n.slice(0,r).trim().replace(/[-–—,:;]+$/u,"").trim();i&&(n=i)}}const s=M(t),o=200;if(s.length>0&&n.length>o){let r=-1;for(const i of s){const a=ae(n,i);a>=0&&(r<0||a<r)&&(r=a)}if(r<0)for(const i of s){if(i.length<4)continue;const a=n.toLowerCase().indexOf(i.toLowerCase());a>=0&&(r<0||a<r)&&(r=a)}if(r>=0){const a=Math.max(0,r-48),c=Math.min(n.length,a+o),d=n.slice(a,c).trim();n=`${a>0?"…":""}${d}${c<n.length?"…":""}`}else n=`${n.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`}else n.length>o&&(n=`${n.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`);return n.replace(/\s{2,}/g," ").trim()}function wo(e,t,n){const s=Ie(e.snippet,t);return s.length<=n?s:`${s.slice(0,n-1).replace(/\s+\S*$/u,"").trimEnd()}…`}function Xn(e,t){return M(t).filter(n=>{const s=n.toLowerCase();return e.title.toLowerCase().includes(s)||e.snippet.toLowerCase().includes(s)||Ie(e.snippet,t).toLowerCase().includes(s)})}function Et(e){const t=(e.kind||e.role||e.type||"record").toLowerCase();return t==="assistant_turn"||t==="assistant"?"assistant":t==="user_turn"||t==="user"?"user":t==="system_record"||t==="system"?"system":t==="command_or_tool"||t==="tool_use"?"tool":t==="response_item"?"tool output":t==="agent_reasoning"||t==="reasoning"?"reasoning":t.replace(/_/gu," ")}function $t(e){const t=(e.kind||e.role||e.type||"").toLowerCase();return t==="assistant"||t==="assistant_turn"||t==="user"||t==="user_turn"||t==="last-prompt"||t==="ai-title"?0:t==="system"||t==="system_record"||t.includes("reasoning")?1:2}function Io(e){return e.scoreSource==="hybrid"?"Words and meaning":e.scoreSource==="vector"?"Similar in meaning":"Exact words"}function vo(e,t,n){const s=Xn(e,t),o=s.length===1?`Matched “${s[0]}”`:s.length>1?`Matched ${s.length} terms`:"Matched in this session";if(!n?.matched)return o;const r=[n.renderedText,n.summary].filter(Boolean).join(" ").toLowerCase(),i=s.filter(d=>r.includes(d.toLowerCase()));if(i.length===0)return o;const a=Et(n),c=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 ${c}`:`Matched ${i.length} terms in ${c}`}function So(e){const t=T(e);if(t){const s=re(t.path),o=t.recordRange;return o?`${s}#R${o[0]}-R${o[1]}`:s}const n=bt(e);if(n){const s=re(n.path),o=n.lineRange;return o?`${s}#L${o[0]}-L${o[1]}`:s}return e.id}function Zn(e){const t=e.filter(o=>$t(o)===2).length,n=e.length-t,s=e.some(o=>o.matched)?" · match inside":"";return t>0&&n===0?`${t} tool step${t===1?"":"s"}${s}`:t===0?`${n} process step${n===1?"":"s"}${s}`:`${t} tool + ${n} process step${e.length===1?"":"s"}${s}`}function Jn(e){return`${e.length} more conversation turn${e.length===1?"":"s"}`}function bo(e,t={}){if(e.length===0)return[];const n=t.contextRadius??3,s=t.maxTurns??6,o=t.centerRecordIndex===void 0?-1:e.findIndex(w=>w.index===t.centerRecordIndex),r=e.findIndex(w=>w.matched),i=o>=0?o:r>=0?r:0,a=e.slice(Math.max(0,i-n),Math.min(e.length,i+n+1)),c=[];let d=[],f=[],S=0;const A=()=>{d.length!==0&&(c.push({kind:"folded",records:d,summary:Zn(d)}),d=[])},g=()=>{f.length!==0&&(c.push({kind:"folded",records:f,summary:Jn(f)}),f=[])};for(const w of a){if($t(w)>0){g(),d.push(w);continue}if(A(),S>=s){f.push(w);continue}c.push({kind:"turn",record:w,role:Et(w)}),S+=1}return A(),g(),c}function Te(e){const t=T(e)?.recordRange;return t?t[0]:Number.MAX_SAFE_INTEGER}function Lo(e){const t=[],n=new Map;for(const s of e){const o=s.collectionId||s.id,r=n.get(o);r?r.push(s):(t.push(o),n.set(o,[s]))}return t.map(s=>{const o=[...n.get(s)??[]].sort((i,a)=>{const c=Te(i)-Te(a);return c!==0?c:i.score-a.score}),r=n.get(s)?.[0]??o[0];return{collectionId:s,best:r,moments:o}})}function Rt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yo(e,t){const n=M(t);if(n.length===0||e.length===0)return[{text:e,match:!1}];const s=n.map(a=>`(?<![A-Za-z0-9_./~-])${Rt(a)}(?![A-Za-z0-9_./~-])`),o=new RegExp(`(${s.join("|")})`,"giu"),r=[];let i=0;for(const a of e.matchAll(o)){const c=a.index??0;c>i&&r.push({text:e.slice(i,c),match:!1}),r.push({text:a[0],match:!0}),i=c+a[0].length}return i<e.length&&r.push({text:e.slice(i),match:!1}),r.length>0?r:[{text:e,match:!1}]}const Eo={sessions:"Sessions",skills:"Skills",mcp:"MCP",codebase:"Codebase",context_pack:"Context packs",mixed:"Mixed"},Pt=[{value:"1",label:"Last 24h"},{value:"3",label:"Last 3 days"},{value:"7",label:"Last 7 days"},{value:"30",label:"Last 30 days"}],$o=["sessions","skills","mcp","codebase","context_pack"];function Ro(){return{query:"",sourceKinds:[],harness:[],project:[],timeWindow:"all"}}function es(e){return e?Pt.some(t=>t.value===e):!1}function X(e){return e?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):[]}function ts(e){const t=e==null?new URLSearchParams:typeof e=="string"?new URLSearchParams(e):e,n=t.get("time"),s=es(n)?n:"all";return{query:t.get("q")?.trim()??"",sourceKinds:X(t.get("source")),harness:X(t.get("harness")),project:X(t.get("project")),timeWindow:s}}function ns(e,t={}){const n=new URLSearchParams,s=e.query.trim();return s&&n.set("q",s),e.sourceKinds.length>0&&n.set("source",e.sourceKinds.join(",")),e.harness.length>0&&n.set("harness",e.harness.join(",")),e.project.length>0&&n.set("project",e.project.join(",")),e.timeWindow!=="all"&&n.set("time",e.timeWindow),t.hitId&&n.set("hit",t.hitId),n}function Po(e,t){return e.query.trim()===t.query.trim()&&e.timeWindow===t.timeWindow&&Z(e.sourceKinds,t.sourceKinds)&&Z(e.harness,t.harness)&&Z(e.project,t.project)}function Z(e,t){if(e.length!==t.length)return!1;const n=[...e].map(o=>o.trim().toLowerCase()).sort(),s=[...t].map(o=>o.trim().toLowerCase()).sort();return n.every((o,r)=>o===s[r])}function ss(e){return e.query.trim().length>0||e.sourceKinds.length>0||e.harness.length>0||e.project.length>0||e.timeWindow!=="all"}function Co(e){if(e==="all")return null;const t=Number.parseInt(e,10);return!Number.isFinite(t)||t<=0?null:Date.now()-t*24*60*60*1e3}function Ao(e){return e==="all"?"Any time":Pt.find(n=>n.value===e)?.label??e}const Ct=typeof window<"u"?window.location.href:"http://scout.local/";function os(e){const t=e.toString();return new URL(t,Ct)}function rs(e){switch(e){case"profile":case"config":case"definitions":return e==="definitions"?"config":e;case"observe":case"message":return e;default:return}}function as(e){const t=e.trim().replace(/^#/,"");if(!t.startsWith("msg-"))return null;const n=t.slice(4).trim();if(!n)return null;try{return decodeURIComponent(n)}catch{return n}}function is(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":return e;default:return}}function cs(e){return e==="delivered"||e==="failed"||e==="all"?e:void 0}function us(e){return e==="indexer"||e==="knowledge"?e:void 0}function ls(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 ds(e){switch(e){case"tail":case"session":case"chat":case"work":return e;default:return}}function fs(e){const t=e?.trim().replace(/\.+$/u,"");return t==="observe"||t==="takeover"?t:void 0}function ms(e){const t=e?.trim().toLowerCase();return t==="pty"||t==="tmux"||t==="zellij"||t==="herdr"?t:void 0}function ps(e){const t=e?.trim().toLowerCase();return t==="shell"||t==="claude"||t==="codex"||t==="pi"?t:void 0}function gs(e){return e==="all"||e==="touched"?"all":e==="changed"?"changed":void 0}function ke(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isSafeInteger(t)&&t>0?t:void 0}function Oe(e){return e==="mission"?"control":e}function hs(e){return e.searchParams.has("no-ops")?!1:typeof window>"u"?!0:rt()}function ws(e){return e==="tail"}function Is(e){return e==="lanes"}function At(e){return ws(e)||Is(e)}const ve="machineId",_t=new Set(["inbox","conversation","agents-v2","messages","sessions","repos","harnesses","mesh","mesh-ops","activity","work","follow"]);function vs(e){return e.searchParams.get(ve)?.trim()||void 0}function Ss(e,t){return!t||!_t.has(e.view)?e:{...e,machineId:t}}function Se(e){return _t.has(e.view)}function bs(e){return"machineId"in e&&e.machineId?e.machineId:null}function De(e,t){if(!Se(e))return e;const n={...e},s=t?.trim();return s?n.machineId=s:delete n.machineId,n}function _o(e){return Se(e)?{...e,machineId:""}:e}function Ls(e,t){return Se(e)?"machineId"in e?De(e,e.machineId??null):De(e,bs(t)):e}function F(e,t){"machineId"in t&&t.machineId&&e.set(ve,t.machineId)}function v(e){const t=e.toString();return t?`?${t}`:""}function O(e,t){const n=new URLSearchParams;return F(n,t),`${e}${v(n)}`}function ys(e){return"machineId"in e&&e.machineId?`:machine:${e.machineId}`:""}function Ut(e){const t=os(e),n=t.pathname.replace(/^\/+/,"").split("/").filter(Boolean),s=vs(t),o=u=>Ss(u,s),r=xn(n,t,o);if(r)return r;const i=as(t.hash),a=rs(t.searchParams.get("tab"))??(i?"message":void 0),c=t.searchParams.get("project")?.trim()||void 0,d=t.searchParams.get("agentId")?.trim()||void 0;if(n[0]==="agent"&&n[1])return{view:"agent-info",conversationId:decodeURIComponent(n[1])};const f=t.searchParams.get("project")?.trim()||void 0,S=t.searchParams.get("harness")?.trim()||void 0,A=t.searchParams.get("node")?.trim()||void 0,g=t.searchParams.get("set")?.trim(),w=g==="live"||g==="ephemeral"||g==="archived"?g:void 0,R=t.searchParams.get("view")?.trim(),U=R==="sessions"||R==="agents"?R:void 0,_=t.searchParams.get("state")?.trim(),be=_==="needs"||_==="live"||_==="idle"?_:void 0,xt=t.searchParams.get("ephemeral")==="1",W=t.searchParams.get("session")?.trim()||void 0,y=t.searchParams.get("select")?.trim()||void 0,$={...S?{harness:S}:{},...A?{node:A}:{},...w?{set:w}:{},...U?{indexView:U}:{},...be?{stateFilter:be}:{},...xt?{showEphemeral:!0}:{}};if(n[0]==="projects"){const u=n[1]?decodeURIComponent(n[1]):void 0;if(!u)return o({view:"agents-v2",...y?{selectedAgentId:y}:{},...$});if(n[2]==="agents"){const l=n[3]?decodeURIComponent(n[3]):void 0;if(l){if(n[4]==="c"&&n[5])return o({view:"agents-v2",projectSlug:u,agentId:l,conversationId:decodeURIComponent(n[5]),tab:a??"message",...$});const m=n[4]==="sessions"&&n[5]?decodeURIComponent(n[5]):W;return o({view:"agents-v2",projectSlug:u,agentId:l,...m?{sessionId:m}:{},...a?{tab:a}:{},...$})}return o({view:"agents-v2",projectSlug:u,indexView:"agents",...y?{selectedAgentId:y}:{},...$})}return n[2]==="sessions"?o({view:"agents-v2",projectSlug:u,indexView:"sessions",...n[3]?{sessionId:decodeURIComponent(n[3])}:{},...y?{selectedAgentId:y}:{},...$}):o({view:"agents-v2",projectSlug:u,...y?{selectedAgentId:y}:{},...$})}if(n[0]==="agents-v2"&&n[1]==="sessions"&&n[2])return o({view:"agents-v2",sessionId:decodeURIComponent(n[2]),...y?{selectedAgentId:y}:{},...f?{projectSlug:f}:{},...$});if(n[0]==="agents-v2"&&n[1]){const u=decodeURIComponent(n[1]);return o({view:"agents-v2",agentId:u,...a?{tab:a}:{},...W?{sessionId:W}:{},...f?{projectSlug:f}:{},...$})}if(n[0]==="agents-v2")return o({view:"agents-v2",...y?{selectedAgentId:y}:{},...f?{projectSlug:f}:{},...$});if(n[0]==="agents"&&n[1]){const u=decodeURIComponent(n[1]),l=n[2]==="sessions"&&n[3]?decodeURIComponent(n[3]):W;return n[2]==="c"&&n[3]?o({view:"agents-v2",agentId:u,conversationId:decodeURIComponent(n[3]),tab:a??"message",...$}):o({view:"agents-v2",agentId:u,...l?{sessionId:l}:{},...a?{tab:a}:{},...$})}if(n[0]==="agents")return o({view:"agents-v2",...y?{selectedAgentId:y}:{},...f?{projectSlug:f}:{},...$});if(n[0]==="agents.deprecated"&&n[1]&&n[2]==="sessions"&&n[3])return o({view:"sessions",agentId:decodeURIComponent(n[1]),sessionId:decodeURIComponent(n[3])});if(n[0]==="agents.deprecated"&&n[1]&&n[2]==="c"&&n[3])return o({view:"agents-v2",agentId:decodeURIComponent(n[1]),conversationId:decodeURIComponent(n[3]),tab:a??"message"});if(n[0]==="agents.deprecated"&&n[1]){const u=decodeURIComponent(n[1]);return o({view:"agents-v2",agentId:u,...a?{tab:a}:{},...!a&&c?{projectSlug:c}:{}})}if(n[0]==="agents.deprecated")return o({view:"agents-v2",...c?{projectSlug:c}:{}});if(n[0]==="fleet")return o({view:"inbox"});if(n[0]==="c"&&n[1])return o({view:"conversation",conversationId:decodeURIComponent(n[1])});if(n[0]==="flights"&&n[1]&&n[2]==="observe"){const u=t.searchParams.get("session")?.trim()||void 0,l=t.searchParams.get("compare")?.trim()||void 0;return o({view:"sessions",flightId:decodeURIComponent(n[1]),...u?{sessionId:u}:{},...l?{compareSessionId:l}:{}})}if(n[0]==="sessions"&&n[1])return o({view:"sessions",sessionId:decodeURIComponent(n[1]),...d?{agentId:d}:{}});if(n[0]==="conversations")return o({view:"messages"});if(n[0]==="messages"){if(n[1]==="agent"&&n[2]){const l=t.searchParams.get("thread")?.trim()||void 0;return o({view:"messages",agentId:decodeURIComponent(n[2]),...l?{threadId:l}:{}})}const u={view:"messages",...n[1]?{conversationId:decodeURIComponent(n[1])}:{}};return o(u)}if(n[0]==="sessions")return o({view:"sessions",...d?{agentId:d}:{}});if(n[0]==="repos"){const u=t.searchParams.get("root")?.trim()||void 0;return o({view:"repos",...u?{root:u}:{}})}if(n[0]==="providers"||n[0]==="harnesses")return o({view:"harnesses"});if(n[0]==="repo-diff"){const u=t.searchParams.get("path")?.trim();if(u){const l=t.searchParams.getAll("layer").filter(I=>I==="unstaged"||I==="staged"||I==="branch"),m=t.searchParams.getAll("file").map(I=>I.trim()).filter(Boolean),p=t.searchParams.get("sessionId")?.trim()||void 0,b=t.searchParams.get("agentId")?.trim()||void 0,E=gs(t.searchParams.get("include"));return{view:"repo-diff",path:u,...l.length>0?{layers:l}:{},...m.length>0?{files:m}:{},...p?{sessionId:p}:{},...b?{agentId:b}:{},...E?{include:E}:{}}}}if(n[0]==="search"){const u=us(n[1]),l=t.searchParams.get("hit")?.trim()||void 0,m=ts(t.searchParams);return{view:"search",...u&&u!=="knowledge"?{mode:u}:{},...l?{hitId:l}:{},...ss(m)?{filters:m}:{}}}if(n[0]==="channels"&&n[1])return o({view:"messages",conversationId:decodeURIComponent(n[1])});if(n[0]==="channels")return o({view:"messages"});if(n[0]==="mesh")return o({view:"mesh"});if(n[0]==="mesh-ops")return o({view:"mesh-ops",...n[1]?{itemId:decodeURIComponent(n[1])}:{}});if(n[0]==="dispatch"||n[0]==="broker"){const u=t.searchParams.get("attempt")?.trim()||void 0,l=cs(t.searchParams.get("filter"));return{view:"broker",...u?{attemptId:u}:{},...l&&l!=="all"?{filter:l}:{}}}if(n[0]==="code"){const u=t.searchParams.get("wt")?.trim()||void 0,l=t.searchParams.get("fromConversation")?.trim()||void 0,m=ke(t.searchParams.get("line")),p=ke(t.searchParams.get("endLine")),b=m&&p&&p>=m?p:void 0;if(n[1]){const C=decodeURIComponent(n[1]),P=n.length>2?n.slice(2).map(decodeURIComponent).join("/"):void 0;return{view:"code",project:C,...P?{path:P}:{},...u?{wt:u}:{},...m?{line:m}:{},...b?{endLine:b}:{},...l?{returnConversationId:l}:{}}}const E=t.searchParams.get("root")?.trim()||void 0,I=t.searchParams.get("file")?.trim()||void 0;return{view:"code",...E?{root:E}:{},...I?{file:I}:{},...u?{wt:u}:{},...m?{line:m}:{},...b?{endLine:b}:{},...l?{returnConversationId:l}:{}}}if(n[0]==="briefings"&&n[1])return{view:"briefings",briefingId:decodeURIComponent(n[1])};if(n[0]==="briefings")return{view:"briefings"};if(n[0]==="activity")return o({view:"activity"});if(n[0]==="voice")return{view:"voice"};if(n[0]==="work"&&n[1])return o({view:"work",workId:decodeURIComponent(n[1])});if(n[0]==="follow"){const u=ds(t.searchParams.get("view")),l={view:"follow",...u?{preferredView:u}:{}},m=n[1],p=n[2]?decodeURIComponent(n[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 b=t.searchParams.get("flightId"),E=t.searchParams.get("invocationId"),I=t.searchParams.get("conversationId"),C=t.searchParams.get("workId"),P=t.searchParams.get("sessionId"),Le=t.searchParams.get("targetAgentId");return b&&(l.flightId=b),E&&(l.invocationId=E),I&&(l.conversationId=I),C&&(l.workId=C),P&&(l.sessionId=P),Le&&(l.targetAgentId=Le),o(l)}if(n[0]==="settings"){if(n[1]==="agents")return{view:"settings",section:"agents",...n[2]?{agentId:decodeURIComponent(n[2])}:{}};const u=ls(n[1]);return{view:"settings",...u?{section:u}:{}}}if(n[0]==="terminal"){const u=fs(t.searchParams.get("mode")),l=t.searchParams.get("session")?.trim()||void 0,m=Ht(t.searchParams.get("surface"))??void 0;if(n[1]==="new"){const b=ms(t.searchParams.get("backend"))??"pty",E=ps(t.searchParams.get("agent"))??"shell",I=t.searchParams.get("name")?.trim()||void 0,C=t.searchParams.get("tab")?.trim()||void 0,P=t.searchParams.get("socketDir")?.trim()||void 0;return{view:"terminal",terminalBackend:b,terminalAgent:E,...I?{terminalSessionName:I}:{},...C?{terminalTabId:C}:{},...P?{zellijSocketDir:P}:{}}}const p=n[1]==="s"&&n[2]?Be(decodeURIComponent(n.slice(2).join("/")))?decodeURIComponent(n.slice(2).join("/")):null:Vt(n[1]?decodeURIComponent(n[1]):void 0,n[2]?decodeURIComponent(n.slice(2).join("/")):void 0);return p?{view:"terminal",terminalSurfaceKey:p,...l?{terminalSessionId:l}:{},...u?{mode:u}:{}}:{view:"terminal",...n[1]?{agentId:decodeURIComponent(n[1])}:{},...u?{mode:u}:{},...!n[1]&&l?{terminalSessionId:l}:{},...!n[1]&&m?{terminalSurfaceKey:m}:{}}}if(n[0]==="ops"){const u=is(n[1])??"mission";if(!At(u)&&!hs(t))return o({view:"inbox"});const l=u==="tail"?t.searchParams.get("q")?.trim():"",m=u==="advisor"?t.searchParams.get("plan")?.trim():"",p=t.searchParams.get("flightId")?.trim(),b=t.searchParams.get("invocationId")?.trim(),E=t.searchParams.get("conversationId")?.trim(),I=t.searchParams.get("workId")?.trim(),C=t.searchParams.get("sessionId")?.trim(),P=t.searchParams.get("targetAgentId")?.trim()??t.searchParams.get("agentId")?.trim();return{view:"ops",mode:u,...l?{tailQuery:l}:{},...m?{planDocumentId:m}:{},...p?{flightId:p}:{},...b?{invocationId:b}:{},...E?{conversationId:E}:{},...I?{workId:I}:{},...C?{sessionId:C}:{},...P?{targetAgentId:P}:{}}}return o({view:"inbox"})}function Ft(e,t){const n=e.view==="sessions"&&e.flightId?null:St(e,t);if(n)return n;switch(e.view){case"inbox":return O("/",e);case"conversation":{const s=new URLSearchParams;return F(s,e),`/c/${encodeURIComponent(e.conversationId)}${v(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),F(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"}${v(s)}`}case"messages":{const s=new URLSearchParams;return e.agentId&&e.threadId&&s.set("thread",e.threadId),F(s,e),`${e.agentId?`/messages/agent/${encodeURIComponent(e.agentId)}`:e.conversationId?`/messages/${encodeURIComponent(e.conversationId)}`:"/messages"}${v(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),F(s,e),`/flights/${encodeURIComponent(e.flightId)}/observe${v(s)}`):(F(s,e),`${e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/sessions"}${v(s)}`)}case"repos":{const s=new URLSearchParams;return e.root&&s.set("root",e.root),F(s,e),`/repos${v(s)}`}case"harnesses":return O("/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${v(s)}`}case"search":{const s=e.mode==="indexer"?"/search/indexer":"/search",o=e.filters?ns(e.filters,{hitId:e.hitId??null}):new URLSearchParams;return!e.filters&&e.hitId&&o.set("hit",e.hitId),`${s}${v(o)}`}case"mesh":return O("/mesh",e);case"mesh-ops":return O(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${v(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("/")}`}${v(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 O("/activity",e);case"voice":return"/voice";case"work":return O(`/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/${Oe(e.mode)}${v(s)}`}return`/ops/${Oe(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(ve,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)}${v(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${v(s)}`;e.mode&&s.set("mode",e.mode);const o=Yt(e.terminalSurfaceKey);return o?`/terminal/${encodeURIComponent(o.backend)}/${encodeURIComponent(o.sessionName)}${v(s)}`:Be(e.terminalSurfaceKey)?`/terminal/s/${encodeURIComponent(e.terminalSurfaceKey)}${v(s)}`:(e.terminalSessionId&&s.set("session",e.terminalSessionId),e.terminalSurfaceKey&&s.set("surface",e.terminalSurfaceKey),`/terminal${v(s)}`)}}}function N(e){const t=ys(e);switch(e.view){case"conversation":return`conv:${e.conversationId}${t}`;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??"",t].join(":");case"sessions":return e.flightId?`flight-observe:${e.flightId}:${e.sessionId??""}:${e.compareSessionId??""}${t}`:e.sessionId?`session:${e.agentId??""}:${e.sessionId}${t}`:`sessions${t}`;case"messages":return["messages",e.conversationId??"",e.agentId??"",e.threadId??"",t].join(":");case"work":return`work:${e.workId}${t}`;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??""}${t}`;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}${t}`}}function G(e,t){return ue(Ut(`${e}${t}`))}function Tt(e){return e?`#${e}`:""}function Es(e){return e.startsWith("/embed/")||e==="/ops/lanes/embed"}function xe(){if(typeof window>"u"){const e=new URL(Ct);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 $s(e,t){return e.pathname===t.pathname&&e.searchStr===t.searchStr&&e.hash===t.hash&&Object.is(e.state,t.state)}function Rs(e){let t=e.read();const n=new Set;let s=null;const o=()=>{const r=e.read();if(!$s(t,r)){t=r;for(const i of n)i()}};return{getSnapshot:()=>t,subscribe(r){return s||(s=e.observe(o)),n.add(r),()=>{n.delete(r)}},navigateTo(r,i={}){const a=t.pathname,c=i.state===void 0?t.state:i.state;i.replace?e.replace(r,c):e.push(r,c),o(),t.pathname!==a&&Gt(a,t.pathname)}}}function Ps(){return typeof window>"u"?{read:xe,push:()=>{},replace:()=>{},observe:()=>()=>{}}:{read:xe,push:(e,t)=>window.history.pushState(t,"",e),replace:(e,t)=>window.history.replaceState(t,"",e),observe:e=>(window.addEventListener("popstate",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)})}}const x=Rs(Ps());function Cs(){return L.useSyncExternalStore(x.subscribe,x.getSnapshot,x.getSnapshot)}function ie(e,t={}){x.navigateTo(e,t)}function kt(){return typeof window>"u"?null:window.navigation??null}function Ot(){if(typeof window>"u")return!1;const e=kt();return e?e.canGoBack:window.history.length>1}function As(){if(!Ot())return;const e=kt();if(e){e.back();return}window.history.back()}function Uo(e){if(!e||typeof e!="object")return null;const t=e.returnTo;return!t||typeof t!="object"||typeof t.view!="string"?null:t}function Fo(e){return!e||typeof e!="object"?!1:e.returnUseHistory===!0}function je(e){if(!e||typeof e!="object")return e;const{returnTo:t,returnUseHistory:n,settingsEntry:s,...o}=e;return o}function _s(e,t){if(t.returnTo!==void 0){const n=t.state!==void 0?t.state:je(e),s=n&&typeof n=="object"?{...n}:{};return s.returnTo=t.returnTo,s.returnUseHistory=t.replace!==!0,s}return t.state!==void 0?t.state:t.replace?e:je(e)}function Dt(e){return e?e.replace(/^#/,""):""}function Us(e,t,n={}){const s=G(e.pathname,e.searchStr),o=Ls(t,s),r=n.preserveSearch===!1?"":e.searchStr,i=vt(Ft(o,e.pathname),r),a=Dt(n.hash);return{route:o,href:`${i}${a?`#${a}`:""}`}}function Fs(e,t){const n=new URLSearchParams(e.searchStr);for(const[r,i]of Object.entries(t.searchPatch??{}))i===null?n.delete(r):n.set(r,i);const s=n.toString(),o=t.hash===void 0?e.hash:Dt(t.hash);return`${e.pathname}${s?`?${s}`:""}${o?`#${o}`:""}`}function To(e){const t=x.getSnapshot(),n=Fs(t,e),s=`${t.pathname}${t.searchStr}${Tt(t.hash)}`;n!==s&&ie(n,{replace:e.replace??!0,state:e.state})}function Ts(e,t,n){if(Es(e))return null;const s=`${e}${t}`,o=Ut(s),r=ue(o),i=vt(Ft(r,e),t);return!(N(o)!==N(r)||r.view==="agents-v2"||s!==i)||s===i?null:`${i}${Tt(n)}`}function ko(){const{pathname:e,searchStr:t,hash:n}=Cs(),s=`${e}${t}`,o=L.useMemo(()=>G(e,t),[e,t]),r=L.useRef({}),i=L.useRef(s);L.useEffect(()=>{const f=Ts(e,t,n);f&&ie(f,{replace:!0})},[e,t,n]),L.useEffect(()=>{if(i.current===s)return;const f=G(e,t);requestAnimationFrame(()=>{window.scrollTo(0,r.current[N(f)]??0)}),i.current=s},[s,e,t]);const a=L.useCallback((f,S={})=>{const A=ue(f.view==="ops"&&!rt()&&!At(f.mode)?{view:"inbox"}:f),g=G(e,t),{route:w,href:R}=Us({pathname:e,searchStr:t},A,S);r.current[N(g)]=window.scrollY;const U=x.getSnapshot().state,_=_s(U,S);ie(R,{replace:S.replace,state:_}),requestAnimationFrame(()=>{window.scrollTo(0,r.current[N(w)]??0)})},[e,t]),c=L.useCallback(()=>As(),[]),d=Ot();return{route:o,navigate:a,navigateBack:c,canNavigateBack:d}}export{qs as $,Po as A,$o as B,Eo as C,Pt as D,go as E,js as F,Gn as G,ge as H,T as I,po as J,fo as K,wo as L,ho as M,Co as N,yo as O,Ao as P,To as Q,io as R,fn as S,It as T,wt as U,uo as V,Qs as W,Vs as X,Xs as Y,An as Z,_n as _,Ft as a,Pn as a0,eo as a1,Un as a2,no as a3,so as a4,to as a5,oo as a6,Zs as a7,Js as a8,Ys as a9,So as aA,$t as aB,bo as aC,re as aD,vo as aE,Io as aF,Et as aG,it as aa,at as ab,Se as ac,ro as ad,ao as ae,V as af,ne as ag,Bs as ah,oe as ai,Q as aj,Dn as ak,Bn as al,xn as am,vt as an,zn as ao,un as ap,co as aq,St as ar,Ye as as,lo as at,ko as au,Ve as av,Zt as aw,bt as ax,z as ay,mo as az,bs as b,_o as c,et as d,Ws as e,le as f,zs as g,Ms as h,Gs as i,Hs as j,Cs as k,Uo as l,Fo as m,dn as n,mn as o,pn as p,Ks as q,Ut as r,De as s,ns as t,Ns as u,Ro as v,wn as w,ts as x,Lo as y,ss as z};
|
|
1
|
+
import{r as L,j as jt,N as ce,O as Nt,P as Ne,Q as Me,A as Mt,R as Bt,B as k,D as h,T as zt,U as J,V as Wt,W as Kt}from"./index-BI9AljSD.js";import{b as Gt}from"./perf-PX8Rx0EP.js";import{n as ue}from"./synthetic-agent-routing-aduMYO7P.js";import{o as Ht,q as Be,n as Vt,u as Yt}from"./terminal-sessions-BQ6t92tJ.js";var ze=["local","url","sharedConfig","env"];function We(e){const t=qt(e),n=e.audienceIncludes??Qt(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 c=r[a];if(!c)return o(a),{key:a,enabled:!1,value:!1,layer:"default",audience:t,reason:"unknown-flag"};const d=Xt(e.layers,a);return d?{key:a,enabled:d.value,value:d.value,layer:d.layer,audience:t,requiredTier:c.tier,reason:"override",definition:c}:c.defaultEnabled?c.tier&&!n(t,c.tier)?{key:a,enabled:!1,value:!1,layer:"default",audience:t,requiredTier:c.tier,reason:"audience-denied",definition:c}:{key:a,enabled:!0,value:!0,layer:"default",audience:t,requiredTier:c.tier,reason:"default",definition:c}:{key:a,enabled:!1,value:!1,layer:"default",audience:t,requiredTier:c.tier,reason:"default",definition:c}}return{registry:e.registry,isEnabled:a=>i(String(a)).enabled,explain:a=>i(String(a)),all:()=>Object.keys(e.registry).sort().map(i),audience:()=>t}}function qt(e){let t=e.audience.tier;for(const n of ze.slice().reverse()){const s=e.layers?.[n]?.audience;s&&(t=s)}return{...e.audience,tier:t}}function Qt(e){return(t,n)=>{if(t.tier===n)return!0;if(!e||e.length===0)return!1;const s=e.indexOf(t.tier),o=e.indexOf(n);return s<0||o<0?!1:s>=o}}function Xt(e,t){for(const n of ze){const s=Zt(e?.[n]?.flags?.[t]);if(s!==null)return{layer:n,value:s}}return null}function Zt(e){return e===!0||e==="on"?!0:e===!1||e==="off"?!1:null}function Jt(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 t=e.trim().toLowerCase();if(["1","true","on","yes","enabled","enable"].includes(t))return!0;if(["0","false","off","no","disabled","disable"].includes(t))return!1;if(["default","null","unset","clear"].includes(t))return"default"}function en(e,t={}){const n=t.paramPrefix??"ff.",s=t.audienceParam??"ffAudience",o=typeof e=="string"?new URL(e,"http://hudson.local"):e,r={};let i;for(const[a,c]of o.searchParams.entries()){if(a===s&&c.trim()&&(i=c.trim()),!a.startsWith(n))continue;const d=a.slice(n.length),f=Jt(c);d&&f!==void 0&&(r[d]=f)}return{flags:r,audience:i}}var D=1;function Ke(e){if(typeof window>"u")return{version:D};try{const t=window.localStorage?.getItem(e);return tn(t)}catch{return{version:D}}}function q(e,t){if(typeof window>"u")return;const n=Ge(t),s=JSON.stringify(n);try{window.localStorage?.setItem(e,s)}catch{}nn(e,s)}function tn(e){if(!e)return{version:D};try{const t=JSON.parse(e);return!t||typeof t!="object"?{version:D}:Ge(t)}catch{return{version:D}}}function Ge(e){const t={version:D};if(e.audience&&(t.audience=e.audience),e.flags&&typeof e.flags=="object"){t.flags={};for(const[n,s]of Object.entries(e.flags))(s===!0||s===!1)&&(t.flags[n]=s);Object.keys(t.flags).length===0&&delete t.flags}return t}function nn(e,t){if(!(typeof document>"u"))try{const n=encodeURIComponent(t);document.cookie=`${encodeURIComponent(e)}=${n}; Path=/; SameSite=Lax; Max-Age=31536000`}catch{}}var sn="hudson.flags",He=L.createContext(null);function js({registry:e,audience:t,audienceOrder:n,audienceIncludes:s,initialLayers:o,storageKey:r=sn,warnOnUnknown:i=!1,children:a}){const[c,d]=L.useState(()=>{const g=o?.local;return{version:1,audience:g?.audience??void 0,flags:on(g)}});L.useEffect(()=>{const g=Ke(r);(g.audience||Object.keys(g.flags??{}).length>0)&&d(g)},[r]);const f=L.useMemo(()=>({...o,local:{...o?.local,audience:c.audience??o?.local?.audience,flags:{...o?.local?.flags??{},...c.flags??{}}}}),[o,c]),S=L.useMemo(()=>We({registry:e,audience:t,audienceOrder:n,audienceIncludes:s,layers:f,warnOnUnknown:i}),[e,t,n,s,f,i]),A=L.useMemo(()=>({...S,layers:f,storageKey:r,setLocalOverride:(g,w)=>{d(R=>{const U={...R.flags??{}};w===null?delete U[g]:U[g]=w;const _={...R,version:1,flags:U};return q(r,_),_})},setLocalAudienceOverride:g=>{d(w=>{const R={...w,version:1,audience:g??void 0};return q(r,R),R})},resetLocalOverrides:()=>{const g={version:1};q(r,g),d(g)}}),[S,f,r]);return jt.jsx(He.Provider,{value:A,children:a})}function Ve(){return L.useContext(He)}function Ns(){const e=Ve();if(!e)throw new Error("useFeatureFlags must be used within FeatureFlagsProvider");return e}function Ms(e,t=!0){return Ve()?.isEnabled(e)??t}function on(e){if(!e?.flags)return;const t={};for(const[n,s]of Object.entries(e.flags))(s===!0||s===!1)&&(t[n]=s);return Object.keys(t).length>0?t:void 0}const rn=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal"],an=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.scoutbot","surface.workflows"];function ye(e,t){return Object.fromEntries(e.map(n=>[n,t]))}const Ye={label:"Surface · Scope",description:`Scope presentation on Scout infra — lean lanes/tail/sessions/agents at ${Nt}/*.`,defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","scope","observability"]},cn={...Ye,label:"Surface · Scope (legacy alias)",description:`Legacy alias for ${ce}. Prefer the primary flag; ${Ne} remains for old dev links.`},Bs=ce;function un(){return{audience:"everyone",flags:{"ops.control":!0,"ops.lanes":!0,...ye(rn,!1),...ye(an,!1)}}}const qe=["ffBundle","ffVariant","scoutBundle","scoutExperience","ab"],Qe=["ffGlobal","scoutGlobalBundle"],Xe=["ffPersist","persistBundle"],ln=new Set(["no-ops","ffAudience",...qe,...Qe,...Xe]);function zs(e){for(const t of[...e.searchParams.keys()])(ln.has(t)||t.startsWith("ff."))&&e.searchParams.delete(t);return e}const dn=["everyone","internal","power"],fn="openscout.flags",ee="openscout.flagBundle",mn={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"],pn={"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 · Mesh",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"]},[ce]:Ye,[Ne]:cn},gn={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",...Bt},Re=new Set(["clear","default","none","reset","unset"]);function K(e,t){return Object.fromEntries(e.map(n=>[n,t]))}function Ze(...e){const t={};for(const n of e)n.audience&&(t.audience=n.audience),n.flags&&Object.keys(n.flags).length>0&&(t.flags={...t.flags??{},...n.flags});return t}function le(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 Mt:return un()}}function j(e){return e?gn[e.trim().toLowerCase()]??null:null}function te(e,t){for(const n of t){const s=e.get(n);if(s!==null)return s}return null}function Je(e){const t=te(e,qe);return j(t)}function hn(e){const t=te(e,Qe);if(t){const i=t.trim().toLowerCase();if(Re.has(i))return{action:"clear"};const a=j(t);return a?{action:"set",bundle:a}:null}const n=te(e,Xe);if(!n)return null;const s=n.trim().toLowerCase();if(Re.has(s))return{action:"clear"};if(["0","false","no"].includes(s))return null;const o=j(n);if(o)return{action:"set",bundle:o};const r=Je(e);return r?{action:"set",bundle:r}:null}function et(){if(typeof window>"u")return null;try{return j(window.localStorage.getItem(ee))}catch{return null}}function wn(e){if(!(typeof window>"u"))try{e.action==="clear"?window.localStorage.removeItem(ee):window.localStorage.setItem(ee,e.bundle)}catch{}}function Ws(){return et()??j(Me())??nt}function tt(){const e=et();return e?le(e):{}}const nt="light-prod";function st(){const e=j(Me())??nt;return le(e)}function In(e){const t=hn(e);t&&wn(t)}function ot(e=new URLSearchParams(window.location.search)){const t=en(window.location.href),n=Je(e),s=n?le(n):{},o={audience:t.audience??s.audience,flags:{...s.flags??{},...t.flags??{}}};return e.has("no-ops")&&(o.flags={...o.flags,"ops.control":!1}),o}function vn(){const e=Ke(fn);return{flags:e.flags,audience:e.audience??void 0}}function Ks(){if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return In(e),{sharedConfig:Ze(st(),tt()),url:ot(e)}}function Sn(e){const t=typeof window>"u"?{}:{sharedConfig:Ze(st(),tt()),url:ot(),local:vn()};return We({registry:pn,audience:mn,audienceOrder:dn,layers:t,warnOnUnknown:!1}).isEnabled(e)}function rt(){return Sn("ops.control")}const ne={sm:408,md:512,lg:616},at=240,it=640,bn=24,ct="openscout:lane-deck:v1",Ln=new Set(["web.ops","macos.lanes","hud.tail","web.embed"]),de=new Set(["sm","md","lg"]),ut={"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}},yn=ut["web.ops"];function fe(e){return lt(e)?ut[e]:yn}const H={pinned_left:0,main:1,pinned_right:2};function lt(e){return Ln.has(e)}function Gs(e=window.location.search,t=window.location.pathname){const n=new URLSearchParams(e),s=n.get("profile")?.trim().toLowerCase();if(s&<(s))return s;const o=n.get("embed")?.trim().toLowerCase();return o==="hud"?"hud.tail":o==="app"?"macos.lanes":t.includes("/lanes/embed")?"web.embed":(t.includes("/ops/lanes"),"web.ops")}function Hs(e=window.location.search){const t=new URLSearchParams(e),n=(t.get("lanes")??t.get("size"))?.trim().toLowerCase();return n&&de.has(n)?n:"lg"}function Vs(e,t){if(typeof e=="number"&&Number.isFinite(e))return Math.min(it,Math.max(at,Math.round(e)));const n=typeof e=="string"&&de.has(e)?e:t;return ne[n]}function Ys(e){const t=Math.min(it,Math.max(at,Math.round(e)));let n=null,s=Number.POSITIVE_INFINITY;for(const[o,r]of Object.entries(ne)){const i=Math.abs(r-t);i<s&&(s=i,n=o)}return n&&s<=bn?{px:ne[n],tier:n}:{px:t,tier:null}}function me(e,t,n){return{version:1,profileId:e,defaultLaneWidth:t??n.defaultLaneWidth,defaultHorizon:n.defaultHorizon,laneWidths:{},laneDefs:[],slots:[],showAutoLanes:n.showAutoLanes,updatedAt:Date.now()}}function Pe(e,t){const n=fe(e);return me(e,t,n)}function se(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&de.has(e))return e}function En(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.id!="string"||!t.id.trim()||t.kind!=="session"&&t.kind!=="harness"&&t.kind!=="project"&&t.kind!=="attention"||typeof t.title!="string"||!t.title.trim()?null:{id:t.id.trim(),kind:t.kind,title:t.title.trim(),sessionId:typeof t.sessionId=="string"?t.sessionId.trim():void 0,harness:typeof t.harness=="string"?t.harness.trim():void 0,projectPath:typeof t.projectPath=="string"?t.projectPath.trim():void 0}}function $n(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.id!="string"||!t.id.trim()||typeof t.laneDefId!="string"||!t.laneDefId.trim()||t.zone!=="pinned_left"&&t.zone!=="main"&&t.zone!=="pinned_right"||typeof t.position!="number"||!Number.isFinite(t.position)?null:{id:t.id.trim(),laneDefId:t.laneDefId.trim(),zone:t.zone,position:t.position,width:se(t.width)}}function dt(e,t,n,s){if(!e||typeof e!="object")return me(t,n,s);const o=e,r=Array.isArray(o.laneDefs)?o.laneDefs.map(En).filter(d=>d!==null):[],i=Array.isArray(o.slots)?o.slots.map($n).filter(d=>d!==null):[],a={};if(o.laneWidths&&typeof o.laneWidths=="object")for(const[d,f]of Object.entries(o.laneWidths)){const S=se(f);S!==void 0&&(a[d]=S)}const c=se(o.defaultLaneWidth);return{version:1,profileId:t,defaultLaneWidth:(typeof c=="string"?c:void 0)??n??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 Rn(e,t,n){return dt(e,t,n,fe(t))}function qs(e,t){const n=fe(e),s=t??n.defaultLaneWidth;try{const o=localStorage.getItem(`${ct}:${e}`);return o?Rn(JSON.parse(o),e,s):Pe(e,s)}catch{return Pe(e,s)}}function Pn(e){try{localStorage.setItem(`${ct}:${e.profileId}`,JSON.stringify({...e,updatedAt:Date.now()}))}catch{}}function Qs(e){return[...e].sort((t,n)=>{const s=H[t.zone]-H[n.zone];return s!==0?s:t.position-n.position})}function Xs(e,t){return H[e]-H[t]}function ft(){return`slot:${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function pe(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Y(e){return`session:${e}`}function Cn(e){return`harness:${pe(e)}`}function An(e){return`project:${pe(e)}`}const _n="attention:needs-input";function mt(e,t){const n=e.filter(s=>s.zone===t);return n.length===0?0:Math.max(...n.map(s=>s.position))+1}function pt(e,t){const n=e.laneDefs.some(s=>s.id===t.id);return{...e,laneDefs:n?e.laneDefs.map(s=>s.id===t.id?t:s):[...e.laneDefs,t]}}function gt(e,t){const n=e.slots.some(s=>s.id===t.id);return{...e,slots:n?e.slots.map(s=>s.id===t.id?t:s):[...e.slots,t]}}function ht(e,t){return{...e,slots:e.slots.filter(n=>n.laneDefId!==t)}}function Un(e,t){const n=Y(t);return{...ht(e,n),laneDefs:e.laneDefs.filter(s=>s.id!==n)}}function Zs(e,t){const n=Y(t);return e.slots.some(s=>s.laneDefId===n&&s.zone!=="main")}function Js(e,t){const n=Y(t),s=e.slots.find(o=>o.laneDefId===n);return!s||s.zone==="main"?null:s.zone}function eo(e,t){const n=t.zone??"pinned_left",s=Y(t.laneId),o=Un(e,t.laneId),r=pt(o,{id:s,kind:"session",title:t.title,sessionId:t.laneId});return gt(r,{id:ft(),laneDefId:s,zone:n,position:mt(r.slots,n),width:t.width})}function to(e,t){const n=t.zone??"pinned_left",s=t.kind==="attention"?_n:t.kind==="harness"&&t.harness?Cn(t.harness):t.kind==="project"&&t.projectPath?An(t.projectPath):`${t.kind}:${pe(t.title)}`,o=ht(e,s),r=pt(o,{id:s,kind:t.kind,title:t.title,harness:t.harness,projectPath:t.projectPath});return gt(r,{id:ft(),laneDefId:s,zone:n,position:mt(r.slots,n),width:t.width})}function no(e,t,n){return{...e,laneWidths:{...e.laneWidths,[t]:n},updatedAt:Date.now()}}function so(e,t){return{...e,defaultLaneWidth:t,updatedAt:Date.now()}}function oo(e){const t=new Set(e.slots.filter(n=>n.zone!=="main").map(n=>n.laneDefId));return{...e,slots:e.slots.filter(n=>n.zone==="main"),laneDefs:e.laneDefs.filter(n=>!t.has(n.id))}}const V="scope.lanes",oe={defaultLaneWidth:"md",showAutoLanes:!0,defaultHorizon:"30m"},Fn="openscout:lane-deck:v1";function Ce(e){return me(V,e,oe)}function ro(e){const t=e??oe.defaultLaneWidth;try{const n=localStorage.getItem(`${Fn}:${V}`);return n?dt(JSON.parse(n),V,t,oe):Ce(t)}catch{return Ce(t)}}function ao(e){Pn(e)}const Tn=[h.lanes,h.tail,h.sessions,h.agents];function kn(e){return Tn.includes(e)}function On(e){return e===Wt||e===Kt}function wt(e){return zt(e)}function Q(e,t={}){switch(e){case h.tail:{const n=new URLSearchParams;t.tailQuery&&n.set("q",t.tailQuery);const s=n.toString();return k(e,s?`?${s}`:"")}case h.sessions:return t.sessionId?k(e,`/${encodeURIComponent(t.sessionId)}`):k(e);case h.lanes:return k(J);case h.agents:return k(e);default:return k(J)}}function It(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 Dn(e){const t=It(e);return t?t===h.tail&&e.view==="ops"?Q(t,{tailQuery:e.tailQuery}):t===h.sessions&&e.view==="sessions"?Q(t,{sessionId:e.sessionId}):Q(t):null}function xn(e,t,n){if(!On(e[0]))return null;const s=e[1]??J;if(!kn(s))return{view:"ops",mode:"lanes"};switch(s){case h.tail:{const o=t.searchParams.get("q")?.trim();return{view:"ops",mode:"tail",...o?{tailQuery:o}:{}}}case h.sessions:return e[2]?n({view:"sessions",sessionId:decodeURIComponent(e[2])}):n({view:"sessions"});case h.agents:return n({view:"agents-v2"});case h.lanes:default:return{view:"ops",mode:"lanes"}}}const jn=new Set(["no-ops","ffBundle","ffVariant","scoutBundle","scoutExperience","ab","ffGlobal","scoutGlobalBundle","ffPersist","persistBundle","ffAudience","studio","studioInjection","studioMode"]),Nn=["ff.","studio.","studioMode."];function Mn(e){return jn.has(e)||Nn.some(t=>e.startsWith(t))}function vt(e,t=""){const n=new URL(e,"http://scout.local");new URLSearchParams(t).forEach((r,i)=>{Mn(i)&&(n.searchParams.has(i)||n.searchParams.set(i,r))});const o=n.searchParams.toString();return`${n.pathname}${o?`?${o}`:""}`}function io(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 Bn(e=typeof window<"u"?window.location.pathname:""){return wt(e)}function co(){return V}function uo(e=Bn()){return e?{"data-scope-presentation":!0}:void 0}function St(e,t=typeof window<"u"?window.location.pathname:""){return wt(t)?Dn(e):null}function zn(e,t=typeof window<"u"?window.location.pathname:""){return St(e,t)!==null}function lo(e,t=typeof window<"u"?window.location.pathname:""){return zn(e,t)?It(e):null}const fo={days:3,sessionLimit:200,hitLimit:60,debounceMs:180};function re(e){return e.root==="HOME"?`~/${e.relPath}`:e.root==="ABSOLUTE"?e.relPath:`$${e.root}/${e.relPath}`}function Ae(e){const t=e?.trim();if(!t)return null;const n=t.replace(/[\\/]+$/,""),s=n.split(/[\\/]/).filter(Boolean).at(-1)??n;return s.endsWith(".jsonl")?s.slice(0,-6):s}function T(e){return e.sourceRefs.find(t=>t.kind==="harness_transcript")??null}function bt(e){return e.sourceRefs.find(t=>t.kind==="file")??null}function ge(e){return e?Ae(e.sessionId)??Ae(re(e.path)):null}function mo(e){const t=ge(e);if(!t)return null;const n=e?.recordRange;return n?`${t}|records ${n[0]}..${n[1]}`:t}function z(e,t){const n=e.facets[t];return Array.isArray(n)?n.filter(Boolean).join(", "):typeof n=="string"?n:""}function M(e){const t=new Set;return e.split(/[^A-Za-z0-9_./-]+/u).map(n=>n.trim()).filter(n=>n.length>1).filter(n=>{const s=n.toLowerCase();return t.has(s)?!1:(t.add(s),!0)}).slice(0,12)}const Wn=/^(events?\s+window(\s+\d+)?|files?\s+touched|tool\s+calls?|indexed\s+snippet|manifest|summary|decisions?|context\s+pack)\b/iu,_e=/^(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 Lt(e){return Wn.test(e.replace(/\s+/g," ").trim())}function Kn(e){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(t=t.replace(/<[^>\n]+>/g," ").replace(/\s+/g," ").trim(),Ue.test(t))t=t.replace(Ue,"").trim();else{const n=t.match(/^(.{6,72}?)\s[-–—]\s+(.+)$/u);if(n){const s=n[1]??"",o=n[2]??"";(_e.test(s)||/\b(?:am|pm|\d{1,2}:\d{2}|plugin|session|openscout)\b/iu.test(s))&&(t=o.trim())}}return t=t.replace(_e,"").replace(/^\s*[-–—:]\s*/,"").trim(),t=t.replace(/\s{2,}/g," ").trim(),t.length>72&&(t=`${t.slice(0,69).replace(/\s+\S*$/u,"").trimEnd()}…`),t}function Gn(e){const t=z(e,"project"),n=e.title.replace(/\s+/g," ").trim();if(n&&!Lt(n)){const o=Kn(n);if(o&&o.toLowerCase()!==t.toLowerCase()||o)return o}if(t)return t;const s=ge(T(e));return s?s.length>18?`${s.slice(0,16)}…`:s:"Session match"}function yt(e){const t=B(e,"recordKind",8).map(s=>s.toLowerCase());if(t.length===0&&t.push(...B(e,"recordTag",8).map(s=>s.toLowerCase())),t.some(s=>s.includes("assistant")))return"assistant";if(t.some(s=>s.includes("user")))return"user";if(t.some(s=>s.includes("tool")||s.includes("command")||s.includes("response")))return"tool";const n=we(e);return n==="tool activity"?"tool":n==="overview"?"overview":""}function po(e,t){const n=Ie(e.snippet,t),s=yt(e),o=he(e);let r="";if(n){const i=M(t).map(d=>d.toLowerCase()),a=n.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=>ae(d,f)>=0)):void 0)??a[0]??n).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||Gn(e)}function Hn(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 Fe(e){const t=e.trim().toLowerCase();return t?t==="events"||t.startsWith("events")?"conversation":t==="overview"||t==="summary"?"overview":t==="tool-calls"||t==="tools"?"tool activity":t==="files"||t==="files-touched"?"files touched":t==="manifest"?"session index":t.replace(/[-_]+/g," "):""}function Vn(e){const t=e.trim();return t?t.charAt(0).toUpperCase()+t.slice(1):""}function Yn(e){const t=z(e,"harness")||T(e)?.harness||"";if(!t)return"";const n=t.toLowerCase();return n==="claude"?"Claude":n==="codex"?"Codex":n==="kimi"?"Kimi":n==="cursor"?"Cursor":Vn(t)}function qn(e){const t=z(e,"sessionId").trim(),n=ge(T(e)),s=(t||n||"").trim();return s?s.length>14?s.slice(0,8):s:""}function he(e){const t=T(e)?.recordRange;if(t){const[s,o]=t;return s===o?`turn ${s}`:o-s<=1?`turns ${s}–${o}`:`turns ${s}–${o}`}const n=e.title.match(/events?\s+window\s+(\d+)/iu);return n?`window ${Number(n[1])}`:""}function Qn(e){const t=B(e,"recordKind",8).map(s=>s.toLowerCase());t.length===0&&t.push(...B(e,"recordTag",8).map(s=>s.toLowerCase()));const n=[];return t.some(s=>s.includes("user"))&&n.push("user"),t.some(s=>s.includes("assistant"))&&n.push("assistant"),t.some(s=>s.includes("tool")||s.includes("command")||s.includes("response"))&&n.push("tool"),n.length===0?"":n.join(" · ")}function we(e){const t=z(e,"documentKind");if(t){const s=t.split(",")[0]?.trim()??t;return Fe(s)}return Lt(e.title)?Fe(e.title):bt(e)?"file":T(e)?"conversation":""}function B(e,t,n=3){const s=e.facets[t];return(Array.isArray(s)?s:typeof s=="string"?s.split(","):[]).map(r=>r.trim()).filter(Boolean).slice(0,n)}function go(e){return{agent:Yn(e),project:z(e,"project"),session:qn(e),when:Hn(e),turn:he(e),role:Qn(e),where:we(e)}}function ho(e){const t=[],n=he(e);n&&t.push(n);const s=yt(e);s&&t.push(s);const o=we(e);o&&o!=="conversation"&&t.push(o);const r=B(e,"toolName",2);r.length===1&&t.push(r[0]),r.length>1&&t.push(r.join(", "));const i=new Set;return t.filter(a=>{const c=a.toLowerCase();return i.has(c)?!1:(i.add(c),!0)})}function ae(e,t){return new RegExp(`(?<![A-Za-z0-9_./~-])${Rt(t)}(?![A-Za-z0-9_./~-])`,"iu").exec(e)?.index??-1}function Ie(e,t=""){let n=e.replace(/\s+/g," ").trim();if(!n)return"";if(n=n.replace(/\s*-\s*\[\d{3,}\]\s*`[^`]+`(?:\s*\([^)]*\))?\s*-\s*/gu," "),n=n.replace(/\[\d{3,}\]\s*`[^`]+`\s*/gu,""),n=n.replace(/\*\*/gu,""),n=n.replace(/\b(?:assistant_turn|user_turn|agent_reasoning|command_or_tool|response_item|system_record)\b/giu," "),n=n.replace(/(?:~\/|\.\.?\/|\/(?:Users|home|var|tmp|opt)\/)\S+/gu," "),n=n.replace(/https?:\/\/\S+/gu," "),n=n.replace(/\b[\w.-]+\.(?:com|net|org|io|dev|app)(?:\/\S*)?/giu," "),n=n.replace(/\{[^{}]{0,160}\}/gu," "),n=n.replace(/`[^`]{0,64}`/gu,r=>{const i=r.slice(1,-1);return M(t).some(a=>ae(i,a)>=0)||/^[A-Za-z][\w.-]{0,24}$/u.test(i)?i:" "}),n=n.replace(/\s{2,}/g," ").trim(),n=n.replace(/^[\s,;:.\-–—|/]+/u,"").trim(),n.includes("{")||n.includes("[")){const r=n.search(/[\[{]/u);if(r>18){const i=n.slice(0,r).trim().replace(/[-–—,:;]+$/u,"").trim();i&&(n=i)}}const s=M(t),o=200;if(s.length>0&&n.length>o){let r=-1;for(const i of s){const a=ae(n,i);a>=0&&(r<0||a<r)&&(r=a)}if(r<0)for(const i of s){if(i.length<4)continue;const a=n.toLowerCase().indexOf(i.toLowerCase());a>=0&&(r<0||a<r)&&(r=a)}if(r>=0){const a=Math.max(0,r-48),c=Math.min(n.length,a+o),d=n.slice(a,c).trim();n=`${a>0?"…":""}${d}${c<n.length?"…":""}`}else n=`${n.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`}else n.length>o&&(n=`${n.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`);return n.replace(/\s{2,}/g," ").trim()}function wo(e,t,n){const s=Ie(e.snippet,t);return s.length<=n?s:`${s.slice(0,n-1).replace(/\s+\S*$/u,"").trimEnd()}…`}function Xn(e,t){return M(t).filter(n=>{const s=n.toLowerCase();return e.title.toLowerCase().includes(s)||e.snippet.toLowerCase().includes(s)||Ie(e.snippet,t).toLowerCase().includes(s)})}function Et(e){const t=(e.kind||e.role||e.type||"record").toLowerCase();return t==="assistant_turn"||t==="assistant"?"assistant":t==="user_turn"||t==="user"?"user":t==="system_record"||t==="system"?"system":t==="command_or_tool"||t==="tool_use"?"tool":t==="response_item"?"tool output":t==="agent_reasoning"||t==="reasoning"?"reasoning":t.replace(/_/gu," ")}function $t(e){const t=(e.kind||e.role||e.type||"").toLowerCase();return t==="assistant"||t==="assistant_turn"||t==="user"||t==="user_turn"||t==="last-prompt"||t==="ai-title"?0:t==="system"||t==="system_record"||t.includes("reasoning")?1:2}function Io(e){return e.scoreSource==="hybrid"?"Words and meaning":e.scoreSource==="vector"?"Similar in meaning":"Exact words"}function vo(e,t,n){const s=Xn(e,t),o=s.length===1?`Matched “${s[0]}”`:s.length>1?`Matched ${s.length} terms`:"Matched in this session";if(!n?.matched)return o;const r=[n.renderedText,n.summary].filter(Boolean).join(" ").toLowerCase(),i=s.filter(d=>r.includes(d.toLowerCase()));if(i.length===0)return o;const a=Et(n),c=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 ${c}`:`Matched ${i.length} terms in ${c}`}function So(e){const t=T(e);if(t){const s=re(t.path),o=t.recordRange;return o?`${s}#R${o[0]}-R${o[1]}`:s}const n=bt(e);if(n){const s=re(n.path),o=n.lineRange;return o?`${s}#L${o[0]}-L${o[1]}`:s}return e.id}function Zn(e){const t=e.filter(o=>$t(o)===2).length,n=e.length-t,s=e.some(o=>o.matched)?" · match inside":"";return t>0&&n===0?`${t} tool step${t===1?"":"s"}${s}`:t===0?`${n} process step${n===1?"":"s"}${s}`:`${t} tool + ${n} process step${e.length===1?"":"s"}${s}`}function Jn(e){return`${e.length} more conversation turn${e.length===1?"":"s"}`}function bo(e,t={}){if(e.length===0)return[];const n=t.contextRadius??3,s=t.maxTurns??6,o=t.centerRecordIndex===void 0?-1:e.findIndex(w=>w.index===t.centerRecordIndex),r=e.findIndex(w=>w.matched),i=o>=0?o:r>=0?r:0,a=e.slice(Math.max(0,i-n),Math.min(e.length,i+n+1)),c=[];let d=[],f=[],S=0;const A=()=>{d.length!==0&&(c.push({kind:"folded",records:d,summary:Zn(d)}),d=[])},g=()=>{f.length!==0&&(c.push({kind:"folded",records:f,summary:Jn(f)}),f=[])};for(const w of a){if($t(w)>0){g(),d.push(w);continue}if(A(),S>=s){f.push(w);continue}c.push({kind:"turn",record:w,role:Et(w)}),S+=1}return A(),g(),c}function Te(e){const t=T(e)?.recordRange;return t?t[0]:Number.MAX_SAFE_INTEGER}function Lo(e){const t=[],n=new Map;for(const s of e){const o=s.collectionId||s.id,r=n.get(o);r?r.push(s):(t.push(o),n.set(o,[s]))}return t.map(s=>{const o=[...n.get(s)??[]].sort((i,a)=>{const c=Te(i)-Te(a);return c!==0?c:i.score-a.score}),r=n.get(s)?.[0]??o[0];return{collectionId:s,best:r,moments:o}})}function Rt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yo(e,t){const n=M(t);if(n.length===0||e.length===0)return[{text:e,match:!1}];const s=n.map(a=>`(?<![A-Za-z0-9_./~-])${Rt(a)}(?![A-Za-z0-9_./~-])`),o=new RegExp(`(${s.join("|")})`,"giu"),r=[];let i=0;for(const a of e.matchAll(o)){const c=a.index??0;c>i&&r.push({text:e.slice(i,c),match:!1}),r.push({text:a[0],match:!0}),i=c+a[0].length}return i<e.length&&r.push({text:e.slice(i),match:!1}),r.length>0?r:[{text:e,match:!1}]}const Eo={sessions:"Sessions",skills:"Skills",mcp:"MCP",codebase:"Codebase",context_pack:"Context packs",mixed:"Mixed"},Pt=[{value:"1",label:"Last 24h"},{value:"3",label:"Last 3 days"},{value:"7",label:"Last 7 days"},{value:"30",label:"Last 30 days"}],$o=["sessions","skills","mcp","codebase","context_pack"];function Ro(){return{query:"",sourceKinds:[],harness:[],project:[],timeWindow:"all"}}function es(e){return e?Pt.some(t=>t.value===e):!1}function X(e){return e?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):[]}function ts(e){const t=e==null?new URLSearchParams:typeof e=="string"?new URLSearchParams(e):e,n=t.get("time"),s=es(n)?n:"all";return{query:t.get("q")?.trim()??"",sourceKinds:X(t.get("source")),harness:X(t.get("harness")),project:X(t.get("project")),timeWindow:s}}function ns(e,t={}){const n=new URLSearchParams,s=e.query.trim();return s&&n.set("q",s),e.sourceKinds.length>0&&n.set("source",e.sourceKinds.join(",")),e.harness.length>0&&n.set("harness",e.harness.join(",")),e.project.length>0&&n.set("project",e.project.join(",")),e.timeWindow!=="all"&&n.set("time",e.timeWindow),t.hitId&&n.set("hit",t.hitId),n}function Po(e,t){return e.query.trim()===t.query.trim()&&e.timeWindow===t.timeWindow&&Z(e.sourceKinds,t.sourceKinds)&&Z(e.harness,t.harness)&&Z(e.project,t.project)}function Z(e,t){if(e.length!==t.length)return!1;const n=[...e].map(o=>o.trim().toLowerCase()).sort(),s=[...t].map(o=>o.trim().toLowerCase()).sort();return n.every((o,r)=>o===s[r])}function ss(e){return e.query.trim().length>0||e.sourceKinds.length>0||e.harness.length>0||e.project.length>0||e.timeWindow!=="all"}function Co(e){if(e==="all")return null;const t=Number.parseInt(e,10);return!Number.isFinite(t)||t<=0?null:Date.now()-t*24*60*60*1e3}function Ao(e){return e==="all"?"Any time":Pt.find(n=>n.value===e)?.label??e}const Ct=typeof window<"u"?window.location.href:"http://scout.local/";function os(e){const t=e.toString();return new URL(t,Ct)}function rs(e){switch(e){case"profile":case"config":case"definitions":return e==="definitions"?"config":e;case"observe":case"message":return e;default:return}}function as(e){const t=e.trim().replace(/^#/,"");if(!t.startsWith("msg-"))return null;const n=t.slice(4).trim();if(!n)return null;try{return decodeURIComponent(n)}catch{return n}}function is(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":return e;default:return}}function cs(e){return e==="delivered"||e==="failed"||e==="all"?e:void 0}function us(e){return e==="indexer"||e==="knowledge"?e:void 0}function ls(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 ds(e){switch(e){case"tail":case"session":case"chat":case"work":return e;default:return}}function fs(e){const t=e?.trim().replace(/\.+$/u,"");return t==="observe"||t==="takeover"?t:void 0}function ms(e){const t=e?.trim().toLowerCase();return t==="pty"||t==="tmux"||t==="zellij"||t==="herdr"?t:void 0}function ps(e){const t=e?.trim().toLowerCase();return t==="shell"||t==="claude"||t==="codex"||t==="pi"?t:void 0}function gs(e){return e==="all"||e==="touched"?"all":e==="changed"?"changed":void 0}function ke(e){if(!e)return;const t=Number.parseInt(e,10);return Number.isSafeInteger(t)&&t>0?t:void 0}function Oe(e){return e==="mission"?"control":e}function hs(e){return e.searchParams.has("no-ops")?!1:typeof window>"u"?!0:rt()}function ws(e){return e==="tail"}function Is(e){return e==="lanes"}function At(e){return ws(e)||Is(e)}const ve="machineId",_t=new Set(["inbox","conversation","agents-v2","messages","sessions","repos","harnesses","mesh","mesh-ops","activity","work","follow"]);function vs(e){return e.searchParams.get(ve)?.trim()||void 0}function Ss(e,t){return!t||!_t.has(e.view)?e:{...e,machineId:t}}function Se(e){return _t.has(e.view)}function bs(e){return"machineId"in e&&e.machineId?e.machineId:null}function De(e,t){if(!Se(e))return e;const n={...e},s=t?.trim();return s?n.machineId=s:delete n.machineId,n}function _o(e){return Se(e)?{...e,machineId:""}:e}function Ls(e,t){return Se(e)?"machineId"in e?De(e,e.machineId??null):De(e,bs(t)):e}function F(e,t){"machineId"in t&&t.machineId&&e.set(ve,t.machineId)}function v(e){const t=e.toString();return t?`?${t}`:""}function O(e,t){const n=new URLSearchParams;return F(n,t),`${e}${v(n)}`}function ys(e){return"machineId"in e&&e.machineId?`:machine:${e.machineId}`:""}function Ut(e){const t=os(e),n=t.pathname.replace(/^\/+/,"").split("/").filter(Boolean),s=vs(t),o=u=>Ss(u,s),r=xn(n,t,o);if(r)return r;const i=as(t.hash),a=rs(t.searchParams.get("tab"))??(i?"message":void 0),c=t.searchParams.get("project")?.trim()||void 0,d=t.searchParams.get("agentId")?.trim()||void 0;if(n[0]==="agent"&&n[1])return{view:"agent-info",conversationId:decodeURIComponent(n[1])};const f=t.searchParams.get("project")?.trim()||void 0,S=t.searchParams.get("harness")?.trim()||void 0,A=t.searchParams.get("node")?.trim()||void 0,g=t.searchParams.get("set")?.trim(),w=g==="live"||g==="ephemeral"||g==="archived"?g:void 0,R=t.searchParams.get("view")?.trim(),U=R==="sessions"||R==="agents"?R:void 0,_=t.searchParams.get("state")?.trim(),be=_==="needs"||_==="live"||_==="idle"?_:void 0,xt=t.searchParams.get("ephemeral")==="1",W=t.searchParams.get("session")?.trim()||void 0,y=t.searchParams.get("select")?.trim()||void 0,$={...S?{harness:S}:{},...A?{node:A}:{},...w?{set:w}:{},...U?{indexView:U}:{},...be?{stateFilter:be}:{},...xt?{showEphemeral:!0}:{}};if(n[0]==="projects"){const u=n[1]?decodeURIComponent(n[1]):void 0;if(!u)return o({view:"agents-v2",...y?{selectedAgentId:y}:{},...$});if(n[2]==="agents"){const l=n[3]?decodeURIComponent(n[3]):void 0;if(l){if(n[4]==="c"&&n[5])return o({view:"agents-v2",projectSlug:u,agentId:l,conversationId:decodeURIComponent(n[5]),tab:a??"message",...$});const m=n[4]==="sessions"&&n[5]?decodeURIComponent(n[5]):W;return o({view:"agents-v2",projectSlug:u,agentId:l,...m?{sessionId:m}:{},...a?{tab:a}:{},...$})}return o({view:"agents-v2",projectSlug:u,indexView:"agents",...y?{selectedAgentId:y}:{},...$})}return n[2]==="sessions"?o({view:"agents-v2",projectSlug:u,indexView:"sessions",...n[3]?{sessionId:decodeURIComponent(n[3])}:{},...y?{selectedAgentId:y}:{},...$}):o({view:"agents-v2",projectSlug:u,...y?{selectedAgentId:y}:{},...$})}if(n[0]==="agents-v2"&&n[1]==="sessions"&&n[2])return o({view:"agents-v2",sessionId:decodeURIComponent(n[2]),...y?{selectedAgentId:y}:{},...f?{projectSlug:f}:{},...$});if(n[0]==="agents-v2"&&n[1]){const u=decodeURIComponent(n[1]);return o({view:"agents-v2",agentId:u,...a?{tab:a}:{},...W?{sessionId:W}:{},...f?{projectSlug:f}:{},...$})}if(n[0]==="agents-v2")return o({view:"agents-v2",...y?{selectedAgentId:y}:{},...f?{projectSlug:f}:{},...$});if(n[0]==="agents"&&n[1]){const u=decodeURIComponent(n[1]),l=n[2]==="sessions"&&n[3]?decodeURIComponent(n[3]):W;return n[2]==="c"&&n[3]?o({view:"agents-v2",agentId:u,conversationId:decodeURIComponent(n[3]),tab:a??"message",...$}):o({view:"agents-v2",agentId:u,...l?{sessionId:l}:{},...a?{tab:a}:{},...$})}if(n[0]==="agents")return o({view:"agents-v2",...y?{selectedAgentId:y}:{},...f?{projectSlug:f}:{},...$});if(n[0]==="agents.deprecated"&&n[1]&&n[2]==="sessions"&&n[3])return o({view:"sessions",agentId:decodeURIComponent(n[1]),sessionId:decodeURIComponent(n[3])});if(n[0]==="agents.deprecated"&&n[1]&&n[2]==="c"&&n[3])return o({view:"agents-v2",agentId:decodeURIComponent(n[1]),conversationId:decodeURIComponent(n[3]),tab:a??"message"});if(n[0]==="agents.deprecated"&&n[1]){const u=decodeURIComponent(n[1]);return o({view:"agents-v2",agentId:u,...a?{tab:a}:{},...!a&&c?{projectSlug:c}:{}})}if(n[0]==="agents.deprecated")return o({view:"agents-v2",...c?{projectSlug:c}:{}});if(n[0]==="fleet")return o({view:"inbox"});if(n[0]==="c"&&n[1])return o({view:"conversation",conversationId:decodeURIComponent(n[1])});if(n[0]==="flights"&&n[1]&&n[2]==="observe"){const u=t.searchParams.get("session")?.trim()||void 0,l=t.searchParams.get("compare")?.trim()||void 0;return o({view:"sessions",flightId:decodeURIComponent(n[1]),...u?{sessionId:u}:{},...l?{compareSessionId:l}:{}})}if(n[0]==="sessions"&&n[1])return o({view:"sessions",sessionId:decodeURIComponent(n[1]),...d?{agentId:d}:{}});if(n[0]==="conversations")return o({view:"messages"});if(n[0]==="messages"){if(n[1]==="agent"&&n[2]){const l=t.searchParams.get("thread")?.trim()||void 0;return o({view:"messages",agentId:decodeURIComponent(n[2]),...l?{threadId:l}:{}})}const u={view:"messages",...n[1]?{conversationId:decodeURIComponent(n[1])}:{}};return o(u)}if(n[0]==="sessions")return o({view:"sessions",...d?{agentId:d}:{}});if(n[0]==="repos"){const u=t.searchParams.get("root")?.trim()||void 0;return o({view:"repos",...u?{root:u}:{}})}if(n[0]==="providers"||n[0]==="harnesses")return o({view:"harnesses"});if(n[0]==="repo-diff"){const u=t.searchParams.get("path")?.trim();if(u){const l=t.searchParams.getAll("layer").filter(I=>I==="unstaged"||I==="staged"||I==="branch"),m=t.searchParams.getAll("file").map(I=>I.trim()).filter(Boolean),p=t.searchParams.get("sessionId")?.trim()||void 0,b=t.searchParams.get("agentId")?.trim()||void 0,E=gs(t.searchParams.get("include"));return{view:"repo-diff",path:u,...l.length>0?{layers:l}:{},...m.length>0?{files:m}:{},...p?{sessionId:p}:{},...b?{agentId:b}:{},...E?{include:E}:{}}}}if(n[0]==="search"){const u=us(n[1]),l=t.searchParams.get("hit")?.trim()||void 0,m=ts(t.searchParams);return{view:"search",...u&&u!=="knowledge"?{mode:u}:{},...l?{hitId:l}:{},...ss(m)?{filters:m}:{}}}if(n[0]==="channels"&&n[1])return o({view:"messages",conversationId:decodeURIComponent(n[1])});if(n[0]==="channels")return o({view:"messages"});if(n[0]==="mesh")return o({view:"mesh"});if(n[0]==="mesh-ops")return o({view:"mesh-ops",...n[1]?{itemId:decodeURIComponent(n[1])}:{}});if(n[0]==="dispatch"||n[0]==="broker"){const u=t.searchParams.get("attempt")?.trim()||void 0,l=cs(t.searchParams.get("filter"));return{view:"broker",...u?{attemptId:u}:{},...l&&l!=="all"?{filter:l}:{}}}if(n[0]==="code"){const u=t.searchParams.get("wt")?.trim()||void 0,l=t.searchParams.get("fromConversation")?.trim()||void 0,m=ke(t.searchParams.get("line")),p=ke(t.searchParams.get("endLine")),b=m&&p&&p>=m?p:void 0;if(n[1]){const C=decodeURIComponent(n[1]),P=n.length>2?n.slice(2).map(decodeURIComponent).join("/"):void 0;return{view:"code",project:C,...P?{path:P}:{},...u?{wt:u}:{},...m?{line:m}:{},...b?{endLine:b}:{},...l?{returnConversationId:l}:{}}}const E=t.searchParams.get("root")?.trim()||void 0,I=t.searchParams.get("file")?.trim()||void 0;return{view:"code",...E?{root:E}:{},...I?{file:I}:{},...u?{wt:u}:{},...m?{line:m}:{},...b?{endLine:b}:{},...l?{returnConversationId:l}:{}}}if(n[0]==="briefings"&&n[1])return{view:"briefings",briefingId:decodeURIComponent(n[1])};if(n[0]==="briefings")return{view:"briefings"};if(n[0]==="activity")return o({view:"activity"});if(n[0]==="voice")return{view:"voice"};if(n[0]==="work"&&n[1])return o({view:"work",workId:decodeURIComponent(n[1])});if(n[0]==="follow"){const u=ds(t.searchParams.get("view")),l={view:"follow",...u?{preferredView:u}:{}},m=n[1],p=n[2]?decodeURIComponent(n[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 b=t.searchParams.get("flightId"),E=t.searchParams.get("invocationId"),I=t.searchParams.get("conversationId"),C=t.searchParams.get("workId"),P=t.searchParams.get("sessionId"),Le=t.searchParams.get("targetAgentId");return b&&(l.flightId=b),E&&(l.invocationId=E),I&&(l.conversationId=I),C&&(l.workId=C),P&&(l.sessionId=P),Le&&(l.targetAgentId=Le),o(l)}if(n[0]==="settings"){if(n[1]==="agents")return{view:"settings",section:"agents",...n[2]?{agentId:decodeURIComponent(n[2])}:{}};const u=ls(n[1]);return{view:"settings",...u?{section:u}:{}}}if(n[0]==="terminal"){const u=fs(t.searchParams.get("mode")),l=t.searchParams.get("session")?.trim()||void 0,m=Ht(t.searchParams.get("surface"))??void 0;if(n[1]==="new"){const b=ms(t.searchParams.get("backend"))??"pty",E=ps(t.searchParams.get("agent"))??"shell",I=t.searchParams.get("name")?.trim()||void 0,C=t.searchParams.get("tab")?.trim()||void 0,P=t.searchParams.get("socketDir")?.trim()||void 0;return{view:"terminal",terminalBackend:b,terminalAgent:E,...I?{terminalSessionName:I}:{},...C?{terminalTabId:C}:{},...P?{zellijSocketDir:P}:{}}}const p=n[1]==="s"&&n[2]?Be(decodeURIComponent(n.slice(2).join("/")))?decodeURIComponent(n.slice(2).join("/")):null:Vt(n[1]?decodeURIComponent(n[1]):void 0,n[2]?decodeURIComponent(n.slice(2).join("/")):void 0);return p?{view:"terminal",terminalSurfaceKey:p,...l?{terminalSessionId:l}:{},...u?{mode:u}:{}}:{view:"terminal",...n[1]?{agentId:decodeURIComponent(n[1])}:{},...u?{mode:u}:{},...!n[1]&&l?{terminalSessionId:l}:{},...!n[1]&&m?{terminalSurfaceKey:m}:{}}}if(n[0]==="ops"){const u=is(n[1])??"mission";if(!At(u)&&!hs(t))return o({view:"inbox"});const l=u==="tail"?t.searchParams.get("q")?.trim():"",m=u==="advisor"?t.searchParams.get("plan")?.trim():"",p=t.searchParams.get("flightId")?.trim(),b=t.searchParams.get("invocationId")?.trim(),E=t.searchParams.get("conversationId")?.trim(),I=t.searchParams.get("workId")?.trim(),C=t.searchParams.get("sessionId")?.trim(),P=t.searchParams.get("targetAgentId")?.trim()??t.searchParams.get("agentId")?.trim();return{view:"ops",mode:u,...l?{tailQuery:l}:{},...m?{planDocumentId:m}:{},...p?{flightId:p}:{},...b?{invocationId:b}:{},...E?{conversationId:E}:{},...I?{workId:I}:{},...C?{sessionId:C}:{},...P?{targetAgentId:P}:{}}}return o({view:"inbox"})}function Ft(e,t){const n=e.view==="sessions"&&e.flightId?null:St(e,t);if(n)return n;switch(e.view){case"inbox":return O("/",e);case"conversation":{const s=new URLSearchParams;return F(s,e),`/c/${encodeURIComponent(e.conversationId)}${v(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),F(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"}${v(s)}`}case"messages":{const s=new URLSearchParams;return e.agentId&&e.threadId&&s.set("thread",e.threadId),F(s,e),`${e.agentId?`/messages/agent/${encodeURIComponent(e.agentId)}`:e.conversationId?`/messages/${encodeURIComponent(e.conversationId)}`:"/messages"}${v(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),F(s,e),`/flights/${encodeURIComponent(e.flightId)}/observe${v(s)}`):(F(s,e),`${e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/sessions"}${v(s)}`)}case"repos":{const s=new URLSearchParams;return e.root&&s.set("root",e.root),F(s,e),`/repos${v(s)}`}case"harnesses":return O("/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${v(s)}`}case"search":{const s=e.mode==="indexer"?"/search/indexer":"/search",o=e.filters?ns(e.filters,{hitId:e.hitId??null}):new URLSearchParams;return!e.filters&&e.hitId&&o.set("hit",e.hitId),`${s}${v(o)}`}case"mesh":return O("/mesh",e);case"mesh-ops":return O(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${v(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("/")}`}${v(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 O("/activity",e);case"voice":return"/voice";case"work":return O(`/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/${Oe(e.mode)}${v(s)}`}return`/ops/${Oe(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(ve,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)}${v(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${v(s)}`;e.mode&&s.set("mode",e.mode);const o=Yt(e.terminalSurfaceKey);return o?`/terminal/${encodeURIComponent(o.backend)}/${encodeURIComponent(o.sessionName)}${v(s)}`:Be(e.terminalSurfaceKey)?`/terminal/s/${encodeURIComponent(e.terminalSurfaceKey)}${v(s)}`:(e.terminalSessionId&&s.set("session",e.terminalSessionId),e.terminalSurfaceKey&&s.set("surface",e.terminalSurfaceKey),`/terminal${v(s)}`)}}}function N(e){const t=ys(e);switch(e.view){case"conversation":return`conv:${e.conversationId}${t}`;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??"",t].join(":");case"sessions":return e.flightId?`flight-observe:${e.flightId}:${e.sessionId??""}:${e.compareSessionId??""}${t}`:e.sessionId?`session:${e.agentId??""}:${e.sessionId}${t}`:`sessions${t}`;case"messages":return["messages",e.conversationId??"",e.agentId??"",e.threadId??"",t].join(":");case"work":return`work:${e.workId}${t}`;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??""}${t}`;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}${t}`}}function G(e,t){return ue(Ut(`${e}${t}`))}function Tt(e){return e?`#${e}`:""}function Es(e){return e.startsWith("/embed/")||e==="/ops/lanes/embed"}function xe(){if(typeof window>"u"){const e=new URL(Ct);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 $s(e,t){return e.pathname===t.pathname&&e.searchStr===t.searchStr&&e.hash===t.hash&&Object.is(e.state,t.state)}function Rs(e){let t=e.read();const n=new Set;let s=null;const o=()=>{const r=e.read();if(!$s(t,r)){t=r;for(const i of n)i()}};return{getSnapshot:()=>t,subscribe(r){return s||(s=e.observe(o)),n.add(r),()=>{n.delete(r)}},navigateTo(r,i={}){const a=t.pathname,c=i.state===void 0?t.state:i.state;i.replace?e.replace(r,c):e.push(r,c),o(),t.pathname!==a&&Gt(a,t.pathname)}}}function Ps(){return typeof window>"u"?{read:xe,push:()=>{},replace:()=>{},observe:()=>()=>{}}:{read:xe,push:(e,t)=>window.history.pushState(t,"",e),replace:(e,t)=>window.history.replaceState(t,"",e),observe:e=>(window.addEventListener("popstate",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)})}}const x=Rs(Ps());function Cs(){return L.useSyncExternalStore(x.subscribe,x.getSnapshot,x.getSnapshot)}function ie(e,t={}){x.navigateTo(e,t)}function kt(){return typeof window>"u"?null:window.navigation??null}function Ot(){if(typeof window>"u")return!1;const e=kt();return e?e.canGoBack:window.history.length>1}function As(){if(!Ot())return;const e=kt();if(e){e.back();return}window.history.back()}function Uo(e){if(!e||typeof e!="object")return null;const t=e.returnTo;return!t||typeof t!="object"||typeof t.view!="string"?null:t}function Fo(e){return!e||typeof e!="object"?!1:e.returnUseHistory===!0}function je(e){if(!e||typeof e!="object")return e;const{returnTo:t,returnUseHistory:n,settingsEntry:s,...o}=e;return o}function _s(e,t){if(t.returnTo!==void 0){const n=t.state!==void 0?t.state:je(e),s=n&&typeof n=="object"?{...n}:{};return s.returnTo=t.returnTo,s.returnUseHistory=t.replace!==!0,s}return t.state!==void 0?t.state:t.replace?e:je(e)}function Dt(e){return e?e.replace(/^#/,""):""}function Us(e,t,n={}){const s=G(e.pathname,e.searchStr),o=Ls(t,s),r=n.preserveSearch===!1?"":e.searchStr,i=vt(Ft(o,e.pathname),r),a=Dt(n.hash);return{route:o,href:`${i}${a?`#${a}`:""}`}}function Fs(e,t){const n=new URLSearchParams(e.searchStr);for(const[r,i]of Object.entries(t.searchPatch??{}))i===null?n.delete(r):n.set(r,i);const s=n.toString(),o=t.hash===void 0?e.hash:Dt(t.hash);return`${e.pathname}${s?`?${s}`:""}${o?`#${o}`:""}`}function To(e){const t=x.getSnapshot(),n=Fs(t,e),s=`${t.pathname}${t.searchStr}${Tt(t.hash)}`;n!==s&&ie(n,{replace:e.replace??!0,state:e.state})}function Ts(e,t,n){if(Es(e))return null;const s=`${e}${t}`,o=Ut(s),r=ue(o),i=vt(Ft(r,e),t);return!(N(o)!==N(r)||r.view==="agents-v2"||s!==i)||s===i?null:`${i}${Tt(n)}`}function ko(){const{pathname:e,searchStr:t,hash:n}=Cs(),s=`${e}${t}`,o=L.useMemo(()=>G(e,t),[e,t]),r=L.useRef({}),i=L.useRef(s);L.useEffect(()=>{const f=Ts(e,t,n);f&&ie(f,{replace:!0})},[e,t,n]),L.useEffect(()=>{if(i.current===s)return;const f=G(e,t);requestAnimationFrame(()=>{window.scrollTo(0,r.current[N(f)]??0)}),i.current=s},[s,e,t]);const a=L.useCallback((f,S={})=>{const A=ue(f.view==="ops"&&!rt()&&!At(f.mode)?{view:"inbox"}:f),g=G(e,t),{route:w,href:R}=Us({pathname:e,searchStr:t},A,S);r.current[N(g)]=window.scrollY;const U=x.getSnapshot().state,_=_s(U,S);ie(R,{replace:S.replace,state:_}),requestAnimationFrame(()=>{window.scrollTo(0,r.current[N(w)]??0)})},[e,t]),c=L.useCallback(()=>As(),[]),d=Ot();return{route:o,navigate:a,navigateBack:c,canNavigateBack:d}}export{qs as $,Po as A,$o as B,Eo as C,Pt as D,go as E,js as F,Gn as G,ge as H,T as I,po as J,fo as K,wo as L,ho as M,Co as N,yo as O,Ao as P,To as Q,io as R,fn as S,It as T,wt as U,uo as V,Qs as W,Vs as X,Xs as Y,An as Z,_n as _,Ft as a,Pn as a0,eo as a1,Un as a2,no as a3,so as a4,to as a5,oo as a6,Zs as a7,Js as a8,Ys as a9,So as aA,$t as aB,bo as aC,re as aD,vo as aE,Io as aF,Et as aG,it as aa,at as ab,Se as ac,ro as ad,ao as ae,V as af,ne as ag,Bs as ah,oe as ai,Q as aj,Dn as ak,Bn as al,xn as am,vt as an,zn as ao,un as ap,co as aq,St as ar,Ye as as,lo as at,ko as au,Ve as av,Zt as aw,bt as ax,z as ay,mo as az,bs as b,_o as c,et as d,Ws as e,le as f,zs as g,Ms as h,Gs as i,Hs as j,Cs as k,Uo as l,Fo as m,dn as n,mn as o,pn as p,Ks as q,Ut as r,De as s,ns as t,Ns as u,Ro as v,wn as w,ts as x,Lo as y,ss as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as a,B as l,D as n,E as r,r as m}from"./index-
|
|
1
|
+
import{A as a,B as l,D as n,E as r,r as m}from"./index-BI9AljSD.js";import{R as p,T as i,U as c,k as E,V as S}from"./router-DTtux5sP.js";const A={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}],_=o.map(e=>({key:e.key,label:e.label,route:p(e.segment)}));function b(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 T(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 L(){return c(typeof window<"u"?window.location.pathname:"")}export{_ as S,u as a,A as b,d as c,T as d,L as i,b as s,P as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as x}from"./index-DvLtl7rV.js";import{b as k,p as A,V as q,D as N}from"./fx-z37u1o2z.js";function he(t){return t?t.hint?`${t.message} ${t.hint}`:t.message:"Scout voice is unavailable."}async function fe(t={}){const e=await fetch("/api/voice/engage",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(e.status===404)return j(t);if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(y(n,e.status))}return await e.json()}async function j(t={}){const e=await de(),n=e.settings,i=e.devices,r=i.length>0||(n.permissions?.length??0)>0,o=n.permissions?.find(w=>w.kind==="microphone")??null,a=n.permissions?.find(w=>w.kind==="speechRecognition")??null,u=U(n,i);if(t.requestPermissions&&(o&&!o.granted&&o.status!=="restricted"?await C("microphone").catch(()=>{}):(o?.granted??!1)&&a&&!a.granted&&a.status!=="restricted"&&await C("speechRecognition").catch(()=>{})),!r)return{ready:!1,issue:{code:"host_offline",title:"Scout Menu is not running",message:"Launch Scout Menu on this Mac to dictate in web chat.",hint:"Restart the web server if you just updated Scout — `scout server restart` or restart `bun run server/index.ts`.",action:"launch_host"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:!1};const h=$(o);if(h)return{ready:!1,issue:h,warnings:[],settings:n,devices:i,inputDevice:u,hostOnline:r};if(!u)return{ready:!1,issue:{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"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:r};const d=F(a);return{ready:!0,issue:null,warnings:d?[d]:[],settings:n,devices:i,inputDevice:u,hostOnline:r}}function U(t,e){if(e.length===0)return null;const n=t.inputDeviceId?e.find(o=>o.id===t.inputDeviceId):null,i=e.find(o=>o.isDefault)??e[0]??null,r=n??i;return r?{id:r.id,name:r.name}:null}function $(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"}:{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"}}function F(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.",hint:"Request access to show the macOS prompt.",action:"request_speech"}:{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"}}function H(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 G=6e4,J=3e3,z=2e4,B=8e3,W=45e3;let M=null,E=null,l=null,_=!1;const R=new Set;function X(){return typeof window>"u"?!1:typeof fetch=="function"}function K(){return M||(M=new Q),M}function me(t){return R.add(t),l&&t(l),()=>{R.delete(t)}}function we(){if(_||!X())return;_=!0;const t=K();t.probe();const e=()=>{t.probeIfStale()};window.addEventListener("focus",e),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function I(t){for(const e of R)e(t)}function O(t,e=Date.now()){const n=t.ok?z:B;return e-t.probedAt<n}class Q{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 l&&O(l,e)?(this.applyProbeSnapshot(l),l.ok):l&&l.ok&&e-l.probedAt<W?(this.applyProbeSnapshot(l),!0):l&&!l.ok?this.probe({force:!0}):this.probe()}async probe(e={}){const n=typeof e=="number"?{timeoutMs:e}:e,i=n.force??!1,r=n.timeoutMs??J,o=Date.now();return!i&&l&&O(l,o)?(this.applyProbeSnapshot(l),l.ok):E||(this.state="probing",E=this.fetchProbe(r).finally(()=>{E=null}),E)}async fetchProbe(e){const n=new AbortController,i=window.setTimeout(()=>n.abort(),e);try{const r=await fetch("/api/voice/health?quiet=1",{signal:n.signal}),o=await r.json().catch(()=>({})),a=!!o.host?.hostId,u=typeof o.microphoneGranted=="boolean"?o.microphoneGranted:null,h=typeof o.microphoneCanRequest=="boolean"?o.microphoneCanRequest:null,d=typeof o.inputDevice?.name=="string"&&o.inputDevice.name.trim()?o.inputDevice.name.trim():null,w=o.capture==="browser"?"browser":"native",S=r.ok&&o.ok===!0,v=S?null:o.detail??o.error??(a?"Scout voice is not ready.":"Scout voice service is unavailable."),f={ok:S,reason:v,captureMode:S?w:null,hostReachable:a,microphoneGranted:u,microphoneCanRequest:h,inputDeviceName:d,probedAt:Date.now()};return l=f,this.applyProbeSnapshot(f),I(f),S}catch(r){const a={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 l=a,this.applyProbeSnapshot(a),I(a),!1}finally{window.clearTimeout(i)}}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={}){try{const i=await(await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"all"})})).json().catch(()=>({}));if(i.url?.startsWith("scout://services/restart/")){window.location.href=i.url;return}}catch{}window.location.href="scout://hud/show"}async startLive(e={},n={}){return this.captureMode!=="browser"?await Y(e,n):await Z(e)}}async function Y(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 s=await n.text().catch(()=>"");throw new Error(y(s,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,a,u;const h=new Promise((s,p)=>{a=s,u=p});let d=null;const w=()=>{d&&window.clearTimeout(d),d=window.setTimeout(()=>{v(new Error("Scout voice transcription timed out. Try again or check voice settings."))},G)},S=()=>{d&&(window.clearTimeout(d),d=null)},v=(s,p="error")=>{o||(o=!0,S(),m.close(),t.onState?.(p),u(s))},f=s=>{o||(o=!0,S(),m.close(),t.onFinal?.(s),t.onState?.("done"),a(s))},m=new EventSource(`/api/voice/session/${encodeURIComponent(r)}/events`),c=s=>p=>{if(o)return;let g={};try{g=JSON.parse(p.data)}catch{return}if(s==="session.partial"){const b=typeof g.text=="string"?g.text:"";t.onPartial?.(b);return}if(s==="session.state"){const b=ee(g.state);b&&(t.onState?.(b),b==="processing"&&w());return}if(s==="session.final"){f({sessionId:r,text:typeof g.text=="string"?g.text.trim():"",durationMs:Number(g.durationMs??0)});return}if(s==="session.cancelled"){v(T(),"cancelled");return}if(s==="session.error"){const b=typeof g.message=="string"?g.message:"Scout voice session failed.",L=typeof g.code=="string"?g.code:null;v(new Error(H(b,L)))}};return m.addEventListener("session.started",()=>{t.onState?.("starting")}),m.addEventListener("session.state",c("session.state")),m.addEventListener("session.partial",c("session.partial")),m.addEventListener("session.final",c("session.final")),m.addEventListener("session.cancelled",c("session.cancelled")),m.addEventListener("session.error",c("session.error")),m.onerror=()=>{o||v(new Error("Scout voice event stream disconnected."))},{get sessionId(){return r},result:h,stop:async()=>{t.onState?.("processing"),w();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/stop`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(y(p,s.status))}},cancel:async()=>{o=!0,S(),m.close();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/cancel`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(y(p,s.status))}t.onState?.("cancelled"),u(T())}}}async function Z(t={}){if(typeof MediaRecorder>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error("Scout voice capture is unavailable in this browser.");const{startStreamLevelMeter:e}=await x(async()=>{const{startStreamLevelMeter:c}=await import("./voice-levels-Dcr3jglk.js");return{startStreamLevelMeter:c}},[]),n=ue(),i=[];let r=null,o=null,a=null,u=!1,h=!1,d,w;const S=new Promise((c,s)=>{d=c,w=s}),v=()=>{a?.stop(),a=null;for(const c of r?.getTracks()??[])c.stop();r=null},f=(c,s="error")=>{h||(h=!0,v(),t.onState?.(s),w(c))},m=async()=>{if(h)return;if(v(),u){f(T(),"cancelled");return}t.onState?.("processing");const c=o?.mimeType||V()||"application/octet-stream",s=new Blob(i,{type:c});if(s.size===0){f(new Error("No voice audio was captured."));return}try{const p=await re(s,{sessionId:n});if(h)return;h=!0,t.onFinal?.(p),t.onState?.("done"),d(p)}catch(p){f(p instanceof Error?p:new Error(String(p)))}};try{t.onState?.("starting"),r=await navigator.mediaDevices.getUserMedia({audio:!0}),t.onLevel&&(a=e(r,t.onLevel));const c=V();o=new MediaRecorder(r,c?{mimeType:c}:void 0),o.addEventListener("dataavailable",s=>{s.data.size>0&&i.push(s.data)}),o.addEventListener("error",()=>{f(new Error("Scout voice recorder failed."))}),o.addEventListener("stop",()=>{m()},{once:!0}),o.start(),t.onPartial?.(""),t.onState?.("recording")}catch(c){const s=c instanceof Error?c:new Error(String(c));throw f(s),S.catch(()=>{}),s}return{get sessionId(){return n},result:S,stop:async()=>{!o||o.state==="inactive"||o.stop()},cancel:async()=>{if(u=!0,o&&o.state!=="inactive"){o.stop();return}f(T(),"cancelled")}}}function ee(t){return t==="starting"||t==="recording"||t==="processing"||t==="done"||t==="cancelled"||t==="error"?t:null}function y(t,e){try{return JSON.parse(t).error??`Scout voice returned HTTP ${e}`}catch{return t||`Scout voice returned HTTP ${e}`}}function Se(t){return t instanceof Error&&t.name==="AbortError"}async function D(t,e={}){const n={text:t,speed:ce(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);const i=await fetch("/api/voice/speak",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),signal:e.signal});if(!i.ok){const r=await i.text().catch(()=>"");try{const o=JSON.parse(r);throw new Error(o.error??`Scout voice returned HTTP ${i.status}`)}catch(o){throw o instanceof SyntaxError?new Error(r||`Scout voice returned HTTP ${i.status}`):o}}return await i.json()}async function ge(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()}async function te(t,e={}){if(e.signal?.aborted)throw P();const n=new Audio(`data:${t.contentType};base64,${t.audioBase64}`),i=()=>{n.pause(),n.currentTime=0};e.signal?.addEventListener("abort",i,{once:!0}),await n.play(),e.onPlaybackStart?.();try{return await new Promise((r,o)=>{const a=()=>{n.removeEventListener("ended",u),n.removeEventListener("error",h),e.signal?.removeEventListener("abort",d)},u=()=>{a(),r()},h=()=>{a(),o(new Error("Scout voice playback failed."))},d=()=>{a(),o(P())};if(e.signal?.aborted){d();return}n.addEventListener("ended",u,{once:!0}),n.addEventListener("error",h,{once:!0}),e.signal?.addEventListener("abort",d,{once:!0})}),t}finally{e.signal?.removeEventListener("abort",i)}}async function ne(t,e={}){const n=await D(t,e);return await te(n,{signal:e.signal})}function ve(t,e={}){const n=new AbortController;return{promise:ne(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function oe(t,e={}){const n=await D(t,e);if(e.signal?.aborted)throw P();const i=await k(n.audioBase64,n.contentType),r=ae(e.presetId,e.params);return await A(i,{params:r,signal:e.signal}).promise,n}function ye(t,e={}){const n=new AbortController;return{promise:oe(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function re(t,e){const n=new FormData,i=ie(t.type);n.append("audio",t,`audio.${se(t.type)}`),n.append("sessionId",e.sessionId),i&&n.append("format",i);const r=await fetch("/api/voice/transcribe",{method:"POST",body:n});if(!r.ok){const a=await r.text().catch(()=>"");try{const u=JSON.parse(a);throw new Error(u.error??`Scout voice returned HTTP ${r.status}`)}catch(u){throw u instanceof SyntaxError?new Error(a||`Scout voice returned HTTP ${r.status}`):u}}const o=await r.json();return{sessionId:e.sessionId,text:o.text?.trim()??"",durationMs:Number(o.durationMs??0)}}function P(){const t=new Error("Speech stopped.");return t.name="AbortError",t}function T(){const t=new Error("Voice recording was cancelled.");return t.name="AbortError",t}function V(){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 ie(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 se(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 ae(t,e){const n=t?q.find(i=>i.id===t)?.params:void 0;return{...N,...n??{},...e??{}}}function ce(t){if(!(t===void 0||!Number.isFinite(t)))return Math.min(2,Math.max(.5,Number(t.toFixed(2))))}function ue(){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 de(){const t=await fetch("/api/voice/settings");if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(y(e,t.status))}return await t.json()}async function be(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(y(n,e.status))}}async function C(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(y(n,e.status))}}async function Ee(t=12){const e=await fetch(`/api/voice/history?limit=${t}`);if(!e.ok){const i=await e.text().catch(()=>"");throw new Error(y(i,e.status))}return(await e.json()).sessions??[]}async function Te(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(y(n,e.status))}return await e.json()}export{fe as a,ve as b,ye as c,ge as d,we as e,he as f,K as g,te as h,Se as i,de as j,Ee as k,Te as l,be as o,D as p,C as r,me as s};
|
|
1
|
+
import{_ as x}from"./index-BI9AljSD.js";import{b as k,p as A,V as q,D as N}from"./fx-z37u1o2z.js";function he(t){return t?t.hint?`${t.message} ${t.hint}`:t.message:"Scout voice is unavailable."}async function fe(t={}){const e=await fetch("/api/voice/engage",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(e.status===404)return j(t);if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(y(n,e.status))}return await e.json()}async function j(t={}){const e=await de(),n=e.settings,i=e.devices,r=i.length>0||(n.permissions?.length??0)>0,o=n.permissions?.find(w=>w.kind==="microphone")??null,a=n.permissions?.find(w=>w.kind==="speechRecognition")??null,u=U(n,i);if(t.requestPermissions&&(o&&!o.granted&&o.status!=="restricted"?await C("microphone").catch(()=>{}):(o?.granted??!1)&&a&&!a.granted&&a.status!=="restricted"&&await C("speechRecognition").catch(()=>{})),!r)return{ready:!1,issue:{code:"host_offline",title:"Scout Menu is not running",message:"Launch Scout Menu on this Mac to dictate in web chat.",hint:"Restart the web server if you just updated Scout — `scout server restart` or restart `bun run server/index.ts`.",action:"launch_host"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:!1};const h=$(o);if(h)return{ready:!1,issue:h,warnings:[],settings:n,devices:i,inputDevice:u,hostOnline:r};if(!u)return{ready:!1,issue:{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"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:r};const d=F(a);return{ready:!0,issue:null,warnings:d?[d]:[],settings:n,devices:i,inputDevice:u,hostOnline:r}}function U(t,e){if(e.length===0)return null;const n=t.inputDeviceId?e.find(o=>o.id===t.inputDeviceId):null,i=e.find(o=>o.isDefault)??e[0]??null,r=n??i;return r?{id:r.id,name:r.name}:null}function $(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"}:{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"}}function F(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.",hint:"Request access to show the macOS prompt.",action:"request_speech"}:{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"}}function H(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 G=6e4,J=3e3,z=2e4,B=8e3,W=45e3;let M=null,E=null,l=null,_=!1;const R=new Set;function X(){return typeof window>"u"?!1:typeof fetch=="function"}function K(){return M||(M=new Q),M}function me(t){return R.add(t),l&&t(l),()=>{R.delete(t)}}function we(){if(_||!X())return;_=!0;const t=K();t.probe();const e=()=>{t.probeIfStale()};window.addEventListener("focus",e),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function I(t){for(const e of R)e(t)}function O(t,e=Date.now()){const n=t.ok?z:B;return e-t.probedAt<n}class Q{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 l&&O(l,e)?(this.applyProbeSnapshot(l),l.ok):l&&l.ok&&e-l.probedAt<W?(this.applyProbeSnapshot(l),!0):l&&!l.ok?this.probe({force:!0}):this.probe()}async probe(e={}){const n=typeof e=="number"?{timeoutMs:e}:e,i=n.force??!1,r=n.timeoutMs??J,o=Date.now();return!i&&l&&O(l,o)?(this.applyProbeSnapshot(l),l.ok):E||(this.state="probing",E=this.fetchProbe(r).finally(()=>{E=null}),E)}async fetchProbe(e){const n=new AbortController,i=window.setTimeout(()=>n.abort(),e);try{const r=await fetch("/api/voice/health?quiet=1",{signal:n.signal}),o=await r.json().catch(()=>({})),a=!!o.host?.hostId,u=typeof o.microphoneGranted=="boolean"?o.microphoneGranted:null,h=typeof o.microphoneCanRequest=="boolean"?o.microphoneCanRequest:null,d=typeof o.inputDevice?.name=="string"&&o.inputDevice.name.trim()?o.inputDevice.name.trim():null,w=o.capture==="browser"?"browser":"native",S=r.ok&&o.ok===!0,v=S?null:o.detail??o.error??(a?"Scout voice is not ready.":"Scout voice service is unavailable."),f={ok:S,reason:v,captureMode:S?w:null,hostReachable:a,microphoneGranted:u,microphoneCanRequest:h,inputDeviceName:d,probedAt:Date.now()};return l=f,this.applyProbeSnapshot(f),I(f),S}catch(r){const a={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 l=a,this.applyProbeSnapshot(a),I(a),!1}finally{window.clearTimeout(i)}}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={}){try{const i=await(await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"all"})})).json().catch(()=>({}));if(i.url?.startsWith("scout://services/restart/")){window.location.href=i.url;return}}catch{}window.location.href="scout://hud/show"}async startLive(e={},n={}){return this.captureMode!=="browser"?await Y(e,n):await Z(e)}}async function Y(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 s=await n.text().catch(()=>"");throw new Error(y(s,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,a,u;const h=new Promise((s,p)=>{a=s,u=p});let d=null;const w=()=>{d&&window.clearTimeout(d),d=window.setTimeout(()=>{v(new Error("Scout voice transcription timed out. Try again or check voice settings."))},G)},S=()=>{d&&(window.clearTimeout(d),d=null)},v=(s,p="error")=>{o||(o=!0,S(),m.close(),t.onState?.(p),u(s))},f=s=>{o||(o=!0,S(),m.close(),t.onFinal?.(s),t.onState?.("done"),a(s))},m=new EventSource(`/api/voice/session/${encodeURIComponent(r)}/events`),c=s=>p=>{if(o)return;let g={};try{g=JSON.parse(p.data)}catch{return}if(s==="session.partial"){const b=typeof g.text=="string"?g.text:"";t.onPartial?.(b);return}if(s==="session.state"){const b=ee(g.state);b&&(t.onState?.(b),b==="processing"&&w());return}if(s==="session.final"){f({sessionId:r,text:typeof g.text=="string"?g.text.trim():"",durationMs:Number(g.durationMs??0)});return}if(s==="session.cancelled"){v(T(),"cancelled");return}if(s==="session.error"){const b=typeof g.message=="string"?g.message:"Scout voice session failed.",L=typeof g.code=="string"?g.code:null;v(new Error(H(b,L)))}};return m.addEventListener("session.started",()=>{t.onState?.("starting")}),m.addEventListener("session.state",c("session.state")),m.addEventListener("session.partial",c("session.partial")),m.addEventListener("session.final",c("session.final")),m.addEventListener("session.cancelled",c("session.cancelled")),m.addEventListener("session.error",c("session.error")),m.onerror=()=>{o||v(new Error("Scout voice event stream disconnected."))},{get sessionId(){return r},result:h,stop:async()=>{t.onState?.("processing"),w();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/stop`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(y(p,s.status))}},cancel:async()=>{o=!0,S(),m.close();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/cancel`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(y(p,s.status))}t.onState?.("cancelled"),u(T())}}}async function Z(t={}){if(typeof MediaRecorder>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error("Scout voice capture is unavailable in this browser.");const{startStreamLevelMeter:e}=await x(async()=>{const{startStreamLevelMeter:c}=await import("./voice-levels-Dcr3jglk.js");return{startStreamLevelMeter:c}},[]),n=ue(),i=[];let r=null,o=null,a=null,u=!1,h=!1,d,w;const S=new Promise((c,s)=>{d=c,w=s}),v=()=>{a?.stop(),a=null;for(const c of r?.getTracks()??[])c.stop();r=null},f=(c,s="error")=>{h||(h=!0,v(),t.onState?.(s),w(c))},m=async()=>{if(h)return;if(v(),u){f(T(),"cancelled");return}t.onState?.("processing");const c=o?.mimeType||V()||"application/octet-stream",s=new Blob(i,{type:c});if(s.size===0){f(new Error("No voice audio was captured."));return}try{const p=await re(s,{sessionId:n});if(h)return;h=!0,t.onFinal?.(p),t.onState?.("done"),d(p)}catch(p){f(p instanceof Error?p:new Error(String(p)))}};try{t.onState?.("starting"),r=await navigator.mediaDevices.getUserMedia({audio:!0}),t.onLevel&&(a=e(r,t.onLevel));const c=V();o=new MediaRecorder(r,c?{mimeType:c}:void 0),o.addEventListener("dataavailable",s=>{s.data.size>0&&i.push(s.data)}),o.addEventListener("error",()=>{f(new Error("Scout voice recorder failed."))}),o.addEventListener("stop",()=>{m()},{once:!0}),o.start(),t.onPartial?.(""),t.onState?.("recording")}catch(c){const s=c instanceof Error?c:new Error(String(c));throw f(s),S.catch(()=>{}),s}return{get sessionId(){return n},result:S,stop:async()=>{!o||o.state==="inactive"||o.stop()},cancel:async()=>{if(u=!0,o&&o.state!=="inactive"){o.stop();return}f(T(),"cancelled")}}}function ee(t){return t==="starting"||t==="recording"||t==="processing"||t==="done"||t==="cancelled"||t==="error"?t:null}function y(t,e){try{return JSON.parse(t).error??`Scout voice returned HTTP ${e}`}catch{return t||`Scout voice returned HTTP ${e}`}}function Se(t){return t instanceof Error&&t.name==="AbortError"}async function D(t,e={}){const n={text:t,speed:ce(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);const i=await fetch("/api/voice/speak",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),signal:e.signal});if(!i.ok){const r=await i.text().catch(()=>"");try{const o=JSON.parse(r);throw new Error(o.error??`Scout voice returned HTTP ${i.status}`)}catch(o){throw o instanceof SyntaxError?new Error(r||`Scout voice returned HTTP ${i.status}`):o}}return await i.json()}async function ge(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()}async function te(t,e={}){if(e.signal?.aborted)throw P();const n=new Audio(`data:${t.contentType};base64,${t.audioBase64}`),i=()=>{n.pause(),n.currentTime=0};e.signal?.addEventListener("abort",i,{once:!0}),await n.play(),e.onPlaybackStart?.();try{return await new Promise((r,o)=>{const a=()=>{n.removeEventListener("ended",u),n.removeEventListener("error",h),e.signal?.removeEventListener("abort",d)},u=()=>{a(),r()},h=()=>{a(),o(new Error("Scout voice playback failed."))},d=()=>{a(),o(P())};if(e.signal?.aborted){d();return}n.addEventListener("ended",u,{once:!0}),n.addEventListener("error",h,{once:!0}),e.signal?.addEventListener("abort",d,{once:!0})}),t}finally{e.signal?.removeEventListener("abort",i)}}async function ne(t,e={}){const n=await D(t,e);return await te(n,{signal:e.signal})}function ve(t,e={}){const n=new AbortController;return{promise:ne(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function oe(t,e={}){const n=await D(t,e);if(e.signal?.aborted)throw P();const i=await k(n.audioBase64,n.contentType),r=ae(e.presetId,e.params);return await A(i,{params:r,signal:e.signal}).promise,n}function ye(t,e={}){const n=new AbortController;return{promise:oe(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function re(t,e){const n=new FormData,i=ie(t.type);n.append("audio",t,`audio.${se(t.type)}`),n.append("sessionId",e.sessionId),i&&n.append("format",i);const r=await fetch("/api/voice/transcribe",{method:"POST",body:n});if(!r.ok){const a=await r.text().catch(()=>"");try{const u=JSON.parse(a);throw new Error(u.error??`Scout voice returned HTTP ${r.status}`)}catch(u){throw u instanceof SyntaxError?new Error(a||`Scout voice returned HTTP ${r.status}`):u}}const o=await r.json();return{sessionId:e.sessionId,text:o.text?.trim()??"",durationMs:Number(o.durationMs??0)}}function P(){const t=new Error("Speech stopped.");return t.name="AbortError",t}function T(){const t=new Error("Voice recording was cancelled.");return t.name="AbortError",t}function V(){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 ie(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 se(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 ae(t,e){const n=t?q.find(i=>i.id===t)?.params:void 0;return{...N,...n??{},...e??{}}}function ce(t){if(!(t===void 0||!Number.isFinite(t)))return Math.min(2,Math.max(.5,Number(t.toFixed(2))))}function ue(){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 de(){const t=await fetch("/api/voice/settings");if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(y(e,t.status))}return await t.json()}async function be(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(y(n,e.status))}}async function C(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(y(n,e.status))}}async function Ee(t=12){const e=await fetch(`/api/voice/history?limit=${t}`);if(!e.ok){const i=await e.text().catch(()=>"");throw new Error(y(i,e.status))}return(await e.json()).sessions??[]}async function Te(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(y(n,e.status))}return await e.json()}export{fe as a,ve as b,ye as c,ge as d,we as e,he as f,K as g,te as h,Se as i,de as j,Ee as k,Te as l,be as o,D as p,C as r,me as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i,r as p}from"./index-
|
|
1
|
+
import{j as i,r as p}from"./index-BI9AljSD.js";import{u as m}from"./Provider-Bu-C8Hxc.js";import{a as x}from"./api-Co9aQ2Jw.js";import{E as g}from"./external-link-C_nxk0MJ.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-DthwWQIg.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-DthwWQIg.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};
|