@openscout/scout 0.2.97 → 0.2.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-sfonf5SR.js +1 -0
- package/dist/client/assets/{AddProjectForm-r_1tVuWk.js → AddProjectForm-fXndbzXT.js} +1 -1
- package/dist/client/assets/{AgentAvatar-B7c0egdP.js → AgentAvatar-Dz79iTxB.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-DDc3udYM.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-DHDS9Pgd.js +1 -0
- package/dist/client/assets/{AgentDetailCard-B_KLcgsP.js → AgentDetailCard-8viaEY8b.js} +1 -1
- package/dist/client/assets/AgentFloorView-DuyvyMMj.js +1 -0
- package/dist/client/assets/AgentInfoScreen-qntgg2q2.js +1 -0
- package/dist/client/assets/{AgentLaneCard-ajZvcfdW.js → AgentLaneCard-Cc9uyfBr.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CTp39syR.js → AgentLaneChrome-Dv2lBFoH.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-DRc-TpMB.js → AgentLaneDetailSheet-CGqtqSHQ.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-VMNDo7kD.js → AgentLaneSummaryResize-Di4u6df2.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-CFadSaia.js → AgentLanesPreflight-CCGBArIb.js} +1 -1
- package/dist/client/assets/AgentLanesView-96lHsoX7.js +2 -0
- package/dist/client/assets/{AgentLiveActions-CsQA3pu_.js → AgentLiveActions-DlSKL60c.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +1 -0
- package/dist/client/assets/{AgentSessions-BePq5Lgc.js → AgentSessions-DV9v34aq.js} +2 -2
- package/dist/client/assets/AgentsConsole-DTpVhS67.js +1 -0
- package/dist/client/assets/AgentsScreen-hZ4o2I-e.js +1 -0
- package/dist/client/assets/AgentsSubnav-Ci7uWM7P.js +1 -0
- package/dist/client/assets/{AstronautSuit-Cjjcv6yQ.js → AstronautSuit-CwB4Dw07.js} +1 -1
- package/dist/client/assets/{AtopView-PxWQd-sX.js → AtopView-D7vyQDtE.js} +1 -1
- package/dist/client/assets/{BackToPicker-Cto0Ioz9.js → BackToPicker-BHicJyfc.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +1 -0
- package/dist/client/assets/{BriefingsScreen-DNyFBrPn.js → BriefingsScreen-Cn4Mbam9.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-DbaCQlhw.js → BrokerMetadataPanel-BJSwU9XZ.js} +1 -1
- package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +5 -0
- package/dist/client/assets/{CastPicker-CTBHjjGw.js → CastPicker-CkgTalIt.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-D4rc7wBQ.js → ChatCollapsedStrip-7Wrg8Ge0.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-QvxCUzTi.js → CodeDiffPane-DfluIWmO.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-DplkpM7f.js → CodeProjectPicker-By_Wz9ex.js} +1 -1
- package/dist/client/assets/CodeScreen-cLC0tJ4S.js +1 -0
- package/dist/client/assets/ConversationComposer-BUIjWMBi.js +1 -0
- package/dist/client/assets/ConversationFeedRows-Bx0gFyG_.js +1 -0
- package/dist/client/assets/ConversationHeader-Bt2RBj93.js +1 -0
- package/dist/client/assets/{ConversationPanels-fMo6Uy1v.js → ConversationPanels-o6W-cOoU.js} +2 -2
- package/dist/client/assets/ConversationScreen-DIU7m_aC.js +2 -0
- package/dist/client/assets/{ConversationStatus-DI5GCiyW.js → ConversationStatus-CTYOywFh.js} +1 -1
- package/dist/client/assets/{CrewAvatar-CXJHLNVM.js → CrewAvatar-CZ_faQ_s.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +1 -0
- package/dist/client/assets/{DataTable-DXIlOlVu.js → DataTable-C6aMSilS.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CrELgl2e.js → DispatchAftermath-ZCEB75hh.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DFFE85Tq.js → DocumentFocusViewer-D8iB6SMt.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DgpewB3y.js → EmbeddableSurfacesLab-D3iZiS8o.js} +1 -1
- package/dist/client/assets/{EmptyState-D9X16fKq.js → EmptyState-CKPWFSjq.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CY0RN78e.js → FileViewerPane-CxNbcTYf.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +1 -0
- package/dist/client/assets/{FollowScreen-wZ-z67mX.js → FollowScreen-CkR-okdL.js} +1 -1
- package/dist/client/assets/{HarnessMark-DAaWPiT_.js → HarnessMark-DttReffF.js} +1 -1
- package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +1 -0
- package/dist/client/assets/{HerdrSession-CYKRfBad.js → HerdrSession-DsuxCtfX.js} +1 -1
- package/dist/client/assets/{HomeHero-DYyd3cpz.js → HomeHero-DXJo2QSO.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-NtM0bsg8.js → HostAdvisorView-DeJ-8RZV.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-CU6BCFcS.js → KnowledgeSearchInspector-W_zNIBRV.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-Bo2Zl-1a.js → LaneToolHoverCard-t7-XJP-h.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-Cek_64zR.js → LaneTraceEventFocus-BB5DhFQm.js} +1 -1
- package/dist/client/assets/{MeshCanvas-TvsID4fe.js → MeshCanvas-DZv2ipsy.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-CxqeVVco.js → MeshCanvasMinimap-BXHRNb7l.js} +1 -1
- package/dist/client/assets/MeshScreen-DuNvpDC5.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BjprutE8.js → MeshTopologyView-Dc0GSrKa.js} +2 -2
- package/dist/client/assets/MessagesScreen-dNNPFwAc.js +1 -0
- package/dist/client/assets/{MissionContextRail-Be0uXljQ.js → MissionContextRail-DnCWPzAM.js} +1 -1
- package/dist/client/assets/MissionControlView-DmaThhNR.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-K21ssTxv.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-CbQm4BLv.js +1 -0
- package/dist/client/assets/{MissionLogPane-EsM_S3ro.js → MissionLogPane-BLvSSIdT.js} +1 -1
- package/dist/client/assets/{NewAgentModal-Cqiq1CE1.js → NewAgentModal-B7qxjZlW.js} +1 -1
- package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +19 -0
- package/dist/client/assets/{NewChatOrigin-D7hwp6dm.js → NewChatOrigin-DCn5cWPZ.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-CGHI_hb5.js → ObserveEmbedScreen-DvKGsaLv.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-BcrGQet8.js → ObserveTextFlow-DCJ5EmD8.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BhVsvwkh.js → ObservedTopologyPanel-CJVqIqQ2.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-BtfvMkAp.js → OpenScoutAppShell-C9TOLB7u.js} +2 -2
- package/dist/client/assets/OpsAgentsView-vIoY-AW1.js +1 -0
- package/dist/client/assets/OpsScreen-CJBwshEp.js +1 -0
- package/dist/client/assets/OpsSubnav-CjDTnp64.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-Br1eTD7G.js +1 -0
- package/dist/client/assets/ProjectAgentProfileBar-CUzZ4Rpx.js +1 -0
- package/dist/client/assets/ProjectAgentProfileHero-mjxNcRvw.js +1 -0
- package/dist/client/assets/ProjectsInbox-Bq29DE_o.js +2 -0
- package/dist/client/assets/ProjectsRail-kMDA0yn4.js +1 -0
- package/dist/client/assets/ProjectsScreen-BDaJYhc0.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-B940p3vW.js +1 -0
- package/dist/client/assets/Provider-D0bB7q6y.js +1 -0
- package/dist/client/assets/{RailRow-ClMmtaIE.js → RailRow-B88JVr62.js} +1 -1
- package/dist/client/assets/RawSessionsTable-CzGhEdiZ.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-CyP1CWsX.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-CjZ5ew3y.js → RepoDiffEmbedScreen-mexrJPhW.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-CdTFfmbk.js → RepoDiffPageScreen-DbqX4L3q.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-BFperHQg.js → RepoDiffViewer-Bw5yMC4A.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-BkBmbi1Z.js → RepoDiffViewerLazy-DzfoFhbl.js} +2 -2
- package/dist/client/assets/{ReposScreen-C8dT4bK0.js → ReposScreen-CzbO1Fuy.js} +2 -2
- package/dist/client/assets/{ScoutDeckSurface-BcJsm2Kq.js → ScoutDeckSurface-DQoZofzH.js} +1 -1
- package/dist/client/assets/{ScoutSurface-DmzEtrx8.js → ScoutSurface-NlhDsPzg.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DU15Plja.js → ScoutbotFxLab-l2WAahCg.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BrXMtvKE.js → SecondaryNav-Cs0_FQdj.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-Bt4flmAx.js → SessionEmbedScreen-CpduQ0O9.js} +1 -1
- package/dist/client/assets/{SessionObserve-BCehTlO8.js → SessionObserve-BVeTkcIl.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-Bb6U-dem.js → SessionObserveEvidence-BkOezTGV.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DetLMkTT.js +1 -0
- package/dist/client/assets/SessionsScreen-B-McKw6d.js +1 -0
- package/dist/client/assets/{SettingsDrawer-BieUmb8g.js → SettingsDrawer-CPB32w0n.js} +3 -3
- package/dist/client/assets/SettingsScreen-BEzYFdjz.js +1 -0
- package/dist/client/assets/{ShikiPane-DPWsVNtn.js → ShikiPane-C0TuCATU.js} +1 -1
- package/dist/client/assets/{SlidePanel-BMRIR6bH.js → SlidePanel-CETQ5NTx.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-56DTXxSV.js → SpriteAvatar-DFO4Kb4Z.js} +1 -1
- package/dist/client/assets/{StatusPill-BcuYUgsD.js → StatusPill-BllrY-eg.js} +1 -1
- package/dist/client/assets/{TailView-BDy8c2VB.js → TailView-_gKWfaQM.js} +2 -2
- package/dist/client/assets/Terminal-DWyZTZdY.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-_SSzwhWa.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-Cy-uxkey.js → TerminalHeaderMount-CY7uIWBg.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-BeSwe3Yl.js → TextDocumentSurface-2X1Gw4eA.js} +1 -1
- package/dist/client/assets/{TmuxPeek-B4no_aGI.js → TmuxPeek-CqTJRhkI.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Bd16scwz.js → VoicePermissionsPanel-C4vkU-sU.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-DIFQufak.js → WorkDetailScreen-DqGnuK0e.js} +3 -3
- package/dist/client/assets/{WorkFilesViewer-CT5XEFGf.js → WorkFilesViewer-D8-4vF5l.js} +1 -1
- package/dist/client/assets/{activity-CqZafWfx.js → activity-CzTJ-YMX.js} +1 -1
- package/dist/client/assets/{addon-fit-CM6F_JRD.js → addon-fit-Zx3A7pGS.js} +1 -1
- package/dist/client/assets/{addon-webgl-DRTiePFC.js → addon-webgl-DitJj-N0.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-DXUBnlkN.js → agent-autocomplete-BlK8wY06.js} +1 -1
- package/dist/client/assets/{agent-essentials-vytdybaX.js → agent-essentials-K9B6kbTS.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-CNZMPkhc.js → agent-lane-card-model-CY3OE1Xu.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-DXqjs0OK.js → agent-lanes-model-tc-1hE6q.js} +1 -1
- package/dist/client/assets/{agent-master-model-DAZL92oe.js → agent-master-model-DMcHeNq3.js} +1 -1
- package/dist/client/assets/agent-specialization-CtF_jI34.js +1 -0
- package/dist/client/assets/{arc.es-Bh84oHJ7.js → arc.es-BNXJqSw7.js} +1 -1
- package/dist/client/assets/{arrow-down-DvTsLokL.js → arrow-down-BAGkhHA6.js} +1 -1
- package/dist/client/assets/{arrow-left-DHfdXJVZ.js → arrow-left-eToA6GxC.js} +1 -1
- package/dist/client/assets/{arrow-right-BBsrogWf.js → arrow-right-DTX42clh.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CY0Vw_67.js → arrow-up-right-B09GPwFl.js} +1 -1
- package/dist/client/assets/{bot-DzkOUFBb.js → bot-WxKXYtEX.js} +1 -1
- package/dist/client/assets/{check-DbIkldnK.js → check-Dz2SRHft.js} +1 -1
- package/dist/client/assets/{chevron-down-C475vltS.js → chevron-down-D120PY4g.js} +1 -1
- package/dist/client/assets/{chevron-right-CnZRSd-V.js → chevron-right-CowuvuE6.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-DLNT8aOo.js → chunk-HRAB3GC3-KjjrTLCU.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-Ci5j4vzV.js → chunk-JTPDIGGW-COJ00z94.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-BtNvicWs.js → chunk-T65CQEWV-H2QEKfr1.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-DN5EJulq.js → chunk-YOZR3KYS-CrCgXw9l.js} +1 -1
- package/dist/client/assets/{clock-DVvENUU5.js → clock-_9FDplIT.js} +1 -1
- package/dist/client/assets/{code-xml-CvKBY3KA.js → code-xml-CkkNdRmu.js} +1 -1
- package/dist/client/assets/{compass-BcRI_YXo.js → compass-BdpImt_W.js} +1 -1
- package/dist/client/assets/content-0RBfbCIJ.js +1 -0
- package/dist/client/assets/content-BTmnk2bl.js +1 -0
- package/dist/client/assets/content-Bk5DKhyP.js +1 -0
- package/dist/client/assets/{content-BNyAjpUl.js → content-Bw_8GE_S.js} +1 -1
- package/dist/client/assets/content-CI4gLEWi.js +1 -0
- package/dist/client/assets/content-CLCtp9Rb.js +1 -0
- package/dist/client/assets/content-C_FAGTNk.js +1 -0
- package/dist/client/assets/content-CnnzWOE3.js +1 -0
- package/dist/client/assets/content-DKlY98pO.js +1 -0
- package/dist/client/assets/content-Df7ndXTG.js +1 -0
- package/dist/client/assets/content-DkZDzzx3.js +1 -0
- package/dist/client/assets/content-DnGmb2L0.js +1 -0
- package/dist/client/assets/content-Ds-zs-Ss.js +1 -0
- package/dist/client/assets/content-JIWSyC0f.js +1 -0
- package/dist/client/assets/content-Q3TIYC8q.js +1 -0
- package/dist/client/assets/content-evaBfvxD.js +1 -0
- package/dist/client/assets/{context-budget-DX_fwUs3.js → context-budget-DqxWzalx.js} +1 -1
- package/dist/client/assets/{conversation-icons-CBMKBGHd.js → conversation-icons-DHGc9wbT.js} +1 -1
- package/dist/client/assets/conversation-model-C2KuZUXc.js +1 -0
- package/dist/client/assets/conversation-motion-features-BJnHs3Ul.js +1 -0
- package/dist/client/assets/{copy-Cj-owMb-.js → copy-BzdzWsQd.js} +1 -1
- package/dist/client/assets/{cpu-DuD3RFX5.js → cpu-CHFIGw87.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DthwWQIg.js → createLucideIcon-Dv8H8m7J.js} +1 -1
- package/dist/client/assets/discover-DutlV0ZU.js +2 -0
- package/dist/client/assets/embed-entry-CJG7WEVw.js +2 -0
- package/dist/client/assets/{external-link-C_nxk0MJ.js → external-link-BvX5PfLh.js} +1 -1
- package/dist/client/assets/{eye-FnaaPfja.js → eye-C9cGk5z6.js} +1 -1
- package/dist/client/assets/{file-code-corner-DDPq4Cur.js → file-code-corner-jlGFdr8d.js} +1 -1
- package/dist/client/assets/{file-text--hfhwZH1.js → file-text-BHro8MkG.js} +1 -1
- package/dist/client/assets/{gauge-BVEknshP.js → gauge-DSflSery.js} +1 -1
- package/dist/client/assets/{gestures-3gw5VgUS.js → gestures-YA5IIwp-.js} +1 -1
- package/dist/client/assets/{git-branch-DJyvr0k-.js → git-branch-Bc_eDIpG.js} +1 -1
- package/dist/client/assets/{home-moving-signal-BPqBoNSm.js → home-moving-signal-PHSqSBu_.js} +1 -1
- package/dist/client/assets/home-now-card-C_qsI6C6.js +1 -0
- package/dist/client/assets/{home-now-card-nano-G8kMB32m.js → home-now-card-nano-Jmy7eJ6H.js} +1 -1
- package/dist/client/assets/{hooks-BMsQzo9j.js → hooks-ME7rmhpE.js} +1 -1
- package/dist/client/assets/{index-BI9AljSD.js → index-C1VaWNuD.js} +2 -2
- package/dist/client/assets/index-C8UCRm2W.js +1 -0
- package/dist/client/assets/index-Cn0I2Hgi.js +1 -0
- package/dist/client/assets/index-Cx6Gbr6n.js +1 -0
- package/dist/client/assets/{inspector-panel-CFSArQ8Y.js → inspector-panel-CwrHjRaQ.js} +2 -2
- package/dist/client/assets/{keyboard-nav-e6yGeorb.js → keyboard-nav-B8sQ_8IF.js} +1 -1
- package/dist/client/assets/{lane-roster-store-Q7pcblY5.js → lane-roster-store-DN2jxXF-.js} +1 -1
- package/dist/client/assets/{layers-Dz2dKOnU.js → layers-CW2-qHsG.js} +1 -1
- package/dist/client/assets/{layout-grid-Bvs5fdB4.js → layout-grid-BoVnPOk-.js} +1 -1
- package/dist/client/assets/left-BRu9pnqx.js +2 -0
- package/dist/client/assets/left-BjS1dKNV.js +2 -0
- package/dist/client/assets/left-CL-TVLJ7.js +1 -0
- package/dist/client/assets/left-DLpsDi55.js +1 -0
- package/dist/client/assets/left-DPcM9o8Y.js +1 -0
- package/dist/client/assets/left-MmTJf1tK.js +1 -0
- package/dist/client/assets/left-P80i5V8L.js +1 -0
- package/dist/client/assets/left-advisor-CbXVzAqS.js +1 -0
- package/dist/client/assets/left-agents-7mJsiNyr.js +1 -0
- package/dist/client/assets/left-default-COK26l3H.js +1 -0
- package/dist/client/assets/left-lanes-Dbdm9Veu.js +1 -0
- package/dist/client/assets/left-mission-DqGR5jby.js +1 -0
- package/dist/client/assets/library-COnWzUWv.js +1 -0
- package/dist/client/assets/{loader-circle-B2W9DPG5.js → loader-circle-DmUG_YC7.js} +1 -1
- package/dist/client/assets/{local-agents-DKr-gIDC.js → local-agents-VP1-ZlPw.js} +1 -1
- package/dist/client/assets/{mentions-DuLQnEcn.js → mentions-BZ5SBMtc.js} +1 -1
- package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +1 -0
- package/dist/client/assets/{mesh-ops-CRR-KnCG.js → mesh-ops-CKSWgax2.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CiET-yN8.js → mesh-view-store-CBM1za_N.js} +1 -1
- package/dist/client/assets/{message-circle-B2DoYKDO.js → message-circle-joGFxfj1.js} +1 -1
- package/dist/client/assets/{message-markup-Cc_O-WdA.js → message-markup-DC0QFEZn.js} +1 -1
- package/dist/client/assets/{message-square-O-Hu9Mk2.js → message-square-BLiFqpe_.js} +1 -1
- package/dist/client/assets/{mission-control-store-DDAgWKUl.js → mission-control-store-CM8mQGg8.js} +1 -1
- package/dist/client/assets/model-CBkMvT1w.js +1 -0
- package/dist/client/assets/{observe-Da2mRAsc.js → observe-BLmy4quB.js} +1 -1
- package/dist/client/assets/{page-status-Crtgjbq3.js → page-status-BE0-J1xY.js} +1 -1
- package/dist/client/assets/{paperclip-BudMKSyr.js → paperclip-Br7wUDFl.js} +1 -1
- package/dist/client/assets/{persistent-state-xJz-qAFc.js → persistent-state-BubPQ7tT.js} +1 -1
- package/dist/client/assets/{plus-BJ1If8vj.js → plus-BWKhylds.js} +1 -1
- package/dist/client/assets/profile-BCvk8jOQ.js +1 -0
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +1 -0
- package/dist/client/assets/projects-inbox-DFbgVlXL.js +1 -0
- package/dist/client/assets/{proxy-1BABCaDb.js → proxy-DVDRhSRR.js} +1 -1
- package/dist/client/assets/{radio-B5OpHrrK.js → radio-CxIXS1nU.js} +1 -1
- package/dist/client/assets/{refresh-cw-DmNAhaH0.js → refresh-cw-Bkh7Cvnd.js} +1 -1
- package/dist/client/assets/resolve-panes-DhD5qmQO.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-GqhZNRPY.js +1 -0
- package/dist/client/assets/right-B_08ilv6.js +1 -0
- package/dist/client/assets/right-Brm67HOL.js +1 -0
- package/dist/client/assets/right-BveAPKBW.js +1 -0
- package/dist/client/assets/right-CpTB_-Ya.js +1 -0
- package/dist/client/assets/right-CqC4Qdot.js +1 -0
- package/dist/client/assets/right-D91j9d5Y.js +1 -0
- package/dist/client/assets/{right-D8id_DWQ.js → right-DVUq5374.js} +1 -1
- package/dist/client/assets/right-DaLRhYl3.js +1 -0
- package/dist/client/assets/right-Dt1wOwA5.js +1 -0
- package/dist/client/assets/right-DtzqIZQF.js +1 -0
- package/dist/client/assets/{rocket-D3-TUJ2m.js → rocket-CnxqjX_K.js} +1 -1
- package/dist/client/assets/{router-DTtux5sP.js → router-kfcaYqZr.js} +1 -1
- package/dist/client/assets/runtime-picker-C20lTGhV.js +1 -0
- package/dist/client/assets/{scope-views-CPM0sBw_.js → scope-views-KPY85UUx.js} +1 -1
- package/dist/client/assets/{scout-voice-BZKsdquE.js → scout-voice-Cg1qfepC.js} +1 -1
- package/dist/client/assets/scoutbot-D7kGGyK_.js +3 -0
- package/dist/client/assets/{scoutbot-markdown-CQ7Y1McC.js → scoutbot-markdown-yb87JlSE.js} +1 -1
- package/dist/client/assets/{scroll-text-kPhYbh-M.js → scroll-text-DFcBYy5J.js} +1 -1
- package/dist/client/assets/{search-DmFM_9jm.js → search-FB2vVxCp.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-C9bQ9_IA.js → secondaryNavConfig-C0Srrmy8.js} +1 -1
- package/dist/client/assets/{selection-bridge-Dy2mtMyi.js → selection-bridge-qBGFCJv8.js} +1 -1
- package/dist/client/assets/{send-horizontal-qyjNgEaV.js → send-horizontal-CS7mxVhX.js} +1 -1
- package/dist/client/assets/{server-nWqndnxu.js → server-WY6gsbZz.js} +1 -1
- package/dist/client/assets/{session-catalog-BkmktBHI.js → session-catalog-CG4oL_yN.js} +1 -1
- package/dist/client/assets/{session-table-DKSF0mrS.js → session-table-uJh3v-ly.js} +1 -1
- package/dist/client/assets/{settings-C6h9y5XX.js → settings-DQEtqkM9.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-BhHKxsCO.js → sliders-horizontal-57e99_qO.js} +1 -1
- package/dist/client/assets/{sparkles-Cf8gin88.js → sparkles-D0vWLTyC.js} +1 -1
- package/dist/client/assets/{sse-DDHEHUgz.js → sse-B29iGBnw.js} +1 -1
- package/dist/client/assets/{system-surfaces-redesign-QVXNeGYw.css → system-surfaces-redesign-kuf3wuE_.css} +1 -1
- package/dist/client/assets/{tail-events-BdUrO0kb.js → tail-events-LK29oCKm.js} +1 -1
- package/dist/client/assets/{terminal-C3YRPfyz.js → terminal-UDy4lzV1.js} +1 -1
- package/dist/client/assets/{terminal-relay-BFhdIstF.js → terminal-relay-CXHMdain.js} +1 -1
- package/dist/client/assets/{terminal-screen-BLk4PAYt.css → terminal-screen-vMICbBJh.css} +1 -1
- package/dist/client/assets/{terminal-sessions-BQ6t92tJ.js → terminal-sessions-Bdt2W3Y4.js} +1 -1
- package/dist/client/assets/{terminal-takeover-B6H4llRR.js → terminal-takeover-BMeBjBB2.js} +1 -1
- package/dist/client/assets/{use-conversation-list-DO5J8T1H.js → use-conversation-list-UG-tMN67.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-BtgNnRgK.js → use-fleet-active-asks-CCGrll5q.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-N1HHhChY.js → use-mesh-ops-items-BjyeFJTz.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-8WuxLa5l.js → use-reduced-motion-CPoX8iV2.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-B31qTy6m.js → use-scout-dev-flags-DTseRrFi.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-Bkv-Uz_V.js → useAgentHoverCard-BgTLNcF-.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-CoIoz7JU.js +1 -0
- package/dist/client/assets/useEmbedHeadline-DuUnwTB7.js +1 -0
- package/dist/client/assets/{usePierreRuntime-BfZHKAkI.js → usePierreRuntime-35AHf9RQ.js} +1 -1
- package/dist/client/assets/{wrench-DkxnZRlR.js → wrench-BfVeded5.js} +1 -1
- package/dist/client/assets/{x-DfRJbqrh.js → x-DgmmnPKt.js} +1 -1
- package/dist/client/assets/{xterm-CJw8Epxv.js → xterm-DnJJmrCA.js} +1 -1
- package/dist/client/assets/{zap-CIo8msJB.js → zap-Bcja1lHG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +5116 -9854
- package/dist/node/main.mjs +18 -2
- package/dist/pairing-runtime-controller.mjs +23 -2
- package/dist/runtime/broker-daemon.mjs +29 -3
- package/dist/scout-control-plane-web.mjs +27 -3
- package/package.json +2 -5
- package/dist/client/assets/ActivityScreen-y-5DLleY.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BD7Unt2P.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-BbcZc9Xk.js +0 -1
- package/dist/client/assets/AgentFloorView-DMFiHs21.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DHGLRddI.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +0 -1
- package/dist/client/assets/AgentLanesView-u5vpLwQf.js +0 -2
- package/dist/client/assets/AgentMasterScreen-C5WlWNmk.js +0 -1
- package/dist/client/assets/AgentsConsole-BuiZ_bDo.js +0 -1
- package/dist/client/assets/AgentsScreen-CRi-hG2k.js +0 -1
- package/dist/client/assets/AgentsSubnav-DUsya4WK.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-C29smC5d.js +0 -1
- package/dist/client/assets/BrokerScreen-CS0s4Gm4.js +0 -5
- package/dist/client/assets/CodeScreen-CrR2JaVj.js +0 -1
- package/dist/client/assets/ConversationComposer-H8_hsYSc.js +0 -1
- package/dist/client/assets/ConversationFeedRows-hlEFlURs.js +0 -1
- package/dist/client/assets/ConversationHeader-B0ZBhE_E.js +0 -1
- package/dist/client/assets/ConversationScreen-CXAHQwQ3.js +0 -2
- package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +0 -1
- package/dist/client/assets/FlightObserveScreen-qyzHzxLa.js +0 -1
- package/dist/client/assets/HarnessesScreen-DbKkQM4o.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DvbRRPQB.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-C3C8UjXv.js +0 -1
- package/dist/client/assets/MeshScreen-BJ-j9YXv.js +0 -1
- package/dist/client/assets/MessagesScreen-CyNIZ3-X.js +0 -1
- package/dist/client/assets/MissionControlView-Bj7cAbZd.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-DvTw6ts5.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-B0QG7Gys.js +0 -1
- package/dist/client/assets/NewChatComposer-C_1op4dH.js +0 -19
- package/dist/client/assets/OpsAgentsView-DBYtmLnh.js +0 -1
- package/dist/client/assets/OpsScreen-CuYVgkC_.js +0 -1
- package/dist/client/assets/OpsSubnav-BEU4kKXm.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +0 -1
- package/dist/client/assets/ProjectAgentProfileBar-uJw9Wdfk.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-CIMS4Dy_.js +0 -1
- package/dist/client/assets/ProjectsInbox-JgU0lrY8.js +0 -2
- package/dist/client/assets/ProjectsRail-p99BRBOa.js +0 -1
- package/dist/client/assets/ProjectsScreen-BB45DU53.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BHDTJWOz.js +0 -1
- package/dist/client/assets/Provider-Bu-C8Hxc.js +0 -1
- package/dist/client/assets/RawSessionsTable-BtKdQPiv.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-KPHJgO1l.js +0 -1
- package/dist/client/assets/SessionRefScreen-C8BiRVPx.js +0 -1
- package/dist/client/assets/SessionsScreen-BNvjUflN.js +0 -1
- package/dist/client/assets/SettingsScreen-3JvX1WFL.js +0 -1
- package/dist/client/assets/Terminal-BlUQY9_Z.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DTjxktyr.js +0 -1
- package/dist/client/assets/agent-specialization-BtxLN4UR.js +0 -1
- package/dist/client/assets/agents-project-model-UYiamtrU.js +0 -1
- package/dist/client/assets/content--T3p6akp.js +0 -1
- package/dist/client/assets/content-4nFMLuzF.js +0 -1
- package/dist/client/assets/content-BJ4nHvcu.js +0 -1
- package/dist/client/assets/content-BmGp9wNl.js +0 -1
- package/dist/client/assets/content-CBWhwaRo.js +0 -1
- package/dist/client/assets/content-CQlykFbe.js +0 -1
- package/dist/client/assets/content-CevL0DgF.js +0 -1
- package/dist/client/assets/content-Ch8pf2bj.js +0 -1
- package/dist/client/assets/content-Cpvdcm_l.js +0 -1
- package/dist/client/assets/content-DfS3vgAu.js +0 -1
- package/dist/client/assets/content-DpQdNePJ.js +0 -1
- package/dist/client/assets/content-Dqpibejl.js +0 -1
- package/dist/client/assets/content-TV0nd6-r.js +0 -1
- package/dist/client/assets/content-odbb5H4U.js +0 -1
- package/dist/client/assets/content-uXHLPHe0.js +0 -1
- package/dist/client/assets/conversation-model-QsJVfSeG.js +0 -1
- package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +0 -1
- package/dist/client/assets/discover-B3uQlh5L.js +0 -2
- package/dist/client/assets/embed-entry-DkRcHKTh.js +0 -2
- package/dist/client/assets/home-now-card-UspVW2-2.js +0 -1
- package/dist/client/assets/index-C-v0Z6ZS.js +0 -1
- package/dist/client/assets/index-D9DzUORB.js +0 -1
- package/dist/client/assets/index-DfsTyYDx.js +0 -1
- package/dist/client/assets/left-B4Ak-Ibt.js +0 -2
- package/dist/client/assets/left-BMb493FZ.js +0 -1
- package/dist/client/assets/left-BjFLvVOC.js +0 -1
- package/dist/client/assets/left-CsXQ8Q3G.js +0 -1
- package/dist/client/assets/left-FNH7faCI.js +0 -1
- package/dist/client/assets/left-POkqE8gI.js +0 -2
- package/dist/client/assets/left-UulOTcWh.js +0 -1
- package/dist/client/assets/left-advisor-CJkQS2d6.js +0 -1
- package/dist/client/assets/left-agents-CFMxyEjT.js +0 -1
- package/dist/client/assets/left-default-rnX5HANc.js +0 -1
- package/dist/client/assets/left-lanes-BpLXT_qH.js +0 -1
- package/dist/client/assets/left-mission-B0bhseWw.js +0 -1
- package/dist/client/assets/library-D1iXfda2.js +0 -1
- package/dist/client/assets/mesh-buckets-6y3ZIibI.js +0 -1
- package/dist/client/assets/mesh-roster-Bc7T4b7z.js +0 -1
- package/dist/client/assets/model-IGCUEsMy.js +0 -1
- package/dist/client/assets/profile-B3qDSbrH.js +0 -1
- package/dist/client/assets/projects-inbox-CLek3QaG.js +0 -1
- package/dist/client/assets/projects-inbox-DRBl2N85.css +0 -1
- package/dist/client/assets/resolve-panes-DXw-cHaj.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +0 -1
- package/dist/client/assets/right-BgJ4mQLf.js +0 -1
- package/dist/client/assets/right-Bk6h7o-Z.js +0 -1
- package/dist/client/assets/right-BrICCmEt.js +0 -1
- package/dist/client/assets/right-C1QIbqFZ.js +0 -1
- package/dist/client/assets/right-CfliKiHY.js +0 -1
- package/dist/client/assets/right-CtOLXB9s.js +0 -1
- package/dist/client/assets/right-DJ34yMAi.js +0 -1
- package/dist/client/assets/right-DiFmtw6d.js +0 -1
- package/dist/client/assets/right-Lx79pxpG.js +0 -1
- package/dist/client/assets/scoutbot-BJIamJOH.js +0 -3
- package/dist/client/assets/text-Faa3ZStB.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +0 -1
- /package/dist/client/assets/{text-BYAFNLNq.css → runtime-picker-BYAFNLNq.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,z as Om,a4 as cu,j as u,F as lu,k as Nm}from"./index-BI9AljSD.js";import{av as Pm,aw as Am,h as ar,k as uu,U as Mm,b as du,F as jm,S as zm,n as fu,o as Dm,p as Lm,q as $m}from"./router-DTtux5sP.js";import{a as ro,u as Fm,T as Zm,b as Bm,H as Wm}from"./chunk-JTPDIGGW-Ci5j4vzV.js";import{u as xt,c as Vm,l as Um,H as hn,a as Hm,b as Gm}from"./chunk-YOZR3KYS-DN5EJulq.js";import{S as pu}from"./sparkles-Cf8gin88.js";import{L as Pa}from"./loader-circle-B2W9DPG5.js";import{V as qm,a as Km,b as Jm,m as Ym,P as Xm,d as Qm,e as eh,c as th}from"./agent-autocomplete-DXUBnlkN.js";import{S as mu,a as nh}from"./text-Faa3ZStB.js";import{c as yt}from"./createLucideIcon-DthwWQIg.js";import{P as rh}from"./paperclip-BudMKSyr.js";import{r as Vt}from"./index-DfsTyYDx.js";import{C as oh,Z as sh}from"./chunk-T65CQEWV-BtNvicWs.js";import{C as ah}from"./clock-DVvENUU5.js";import{S as vs}from"./search-DmFM_9jm.js";import{u as hu,i as gu,d as ih,e as ch,c as lh,f as uh}from"./keyboard-nav-e6yGeorb.js";import{i as Jo,u as bu}from"./use-scout-dev-flags-B31qTy6m.js";import{X as ys}from"./x-DfRJbqrh.js";import{T as vu}from"./terminal-C3YRPfyz.js";import{b as yu,M as xu,a as dh}from"./DocumentFocusViewer-DFFE85Tq.js";import{C as fh}from"./conversation-model-QsJVfSeG.js";import{s as ph,S as mh,d as hh}from"./scope-views-CPM0sBw_.js";import{n as wu,o as gh,u as Ut,d as Eu,m as bh,g as vh,t as yh}from"./Provider-Bu-C8Hxc.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./AgentDetailCard-B_KLcgsP.js";/* empty css *//* empty css */import"./NewChatComposer-C_1op4dH.js";import"./CrewAvatar-CXJHLNVM.js";/* empty css */import"./BackToPicker-Cto0Ioz9.js";import"./AgentLiveActions-CsQA3pu_.js";import"./ObservedTopologyPanel-BhVsvwkh.js";/* empty css */import{e as xh,f as gn,P as Yo,g as Su,h as ku,s as wh,i as Eh}from"./secondaryNavConfig-C9bQ9_IA.js";/* empty css */import"./ConversationScreen-CXAHQwQ3.js";/* empty css */import"./SessionObserve-BCehTlO8.js";/* empty css *//* empty css *//* empty css */import"./projects-inbox-CLek3QaG.js";import"./ProjectsInbox-JgU0lrY8.js";/* empty css */import"./RailRow-ClMmtaIE.js";/* empty css *//* empty css */import"./cache-CeWH_KzJ.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./left-B4Ak-Ibt.js";import"./content-CQlykFbe.js";import{u as Sh}from"./mesh-view-store-CiET-yN8.js";import"./left-UulOTcWh.js";/* empty css */import"./mesh-ops-CRR-KnCG.js";import"./left-mission-B0bhseWw.js";import"./mission-control-store-DDAgWKUl.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-BMRIR6bH.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-BDy8c2VB.js";import"./RepoDiffViewerLazy-BkBmbi1Z.js";/* empty css *//* empty css *//* empty css */import"./CastPicker-CTBHjjGw.js";import"./SettingsDrawer-BieUmb8g.js";import"./left-CsXQ8Q3G.js";/* empty css */import"./credentials-BTce3VP1.js";import{N as $r,f as kh,g as Ch,h as Lo,i as Rh,j as _h,k as Th}from"./hooks-BMsQzo9j.js";import{a as Aa}from"./api-Co9aQ2Jw.js";import{o as Ih,i as Oh}from"./surface-activity-B1rgWB1i.js";import{P as Nh}from"./plus-BJ1If8vj.js";import{resolveSidebarContext as Ph}from"./resolve-sidebar-context-CDdbRDEa.js";import{d as mi,n as Ah,i as Cu}from"./colors-BtO5_zlx.js";import{b as Mh}from"./mesh-buckets-6y3ZIibI.js";import{u as jh}from"./sse-DDHEHUgz.js";import{f as zh,b as Dh,d as Lh}from"./terminal-sessions-BQ6t92tJ.js";import{o as fc}from"./openAgent-Dbv5wfuL.js";import{A as Ru}from"./AgentAvatar-B7c0egdP.js";import{C as wn,a as $h,b as Xt,c as hi,d as Fh}from"./ChatCollapsedStrip-D4rc7wBQ.js";import{U as _u}from"./CrewWorkspaces-Bz2Dcnt4.js";import{L as Zh}from"./layout-grid-Bvs5fdB4.js";import{A as Tu}from"./activity-CqZafWfx.js";import{OpsSubnav as Bh}from"./OpsSubnav-BEU4kKXm.js";import{A as pc}from"./arrow-left-DHfdXJVZ.js";import{A as Wh}from"./arrow-right-BBsrogWf.js";import{M as mc}from"./message-square-O-Hu9Mk2.js";import{C as Vh}from"./chevron-down-C475vltS.js";import{C as Uh}from"./chevron-right-CnZRSd-V.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./arrow-down-DvTsLokL.js";import"./use-reduced-motion-8WuxLa5l.js";import"./gestures-3gw5VgUS.js";import"./radio-B5OpHrrK.js";import"./bot-DzkOUFBb.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./time-Dhsh_2EG.js";import"./scoutbot-BJIamJOH.js";import"./code-xml-CvKBY3KA.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./compass-BcRI_YXo.js";import"./settings-C6h9y5XX.js";import"./git-branch-DJyvr0k-.js";import"./scroll-text-kPhYbh-M.js";import"./ConversationComposer-H8_hsYSc.js";import"./zap-CIo8msJB.js";import"./message-markup-Cc_O-WdA.js";import"./mentions-DuLQnEcn.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-B0ZBhE_E.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./SpriteAvatar-56DTXxSV.js";import"./ConversationFeedRows-hlEFlURs.js";import"./ConversationPanels-fMo6Uy1v.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./proxy-1BABCaDb.js";import"./message-circle-B2DoYKDO.js";import"./tail-events-BdUrO0kb.js";import"./ConversationStatus-DI5GCiyW.js";import"./check-DbIkldnK.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BcrGQet8.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";import"./mesh-roster-Bc7T4b7z.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-C8BiRVPx.js";import"./session-ref-lookup-state-SATH_jAP.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-HFH8wFyb.js";import"./arrow-up-right-CY0Vw_67.js";import"./AddProjectForm-r_1tVuWk.js";import"./agent-specialization-BtxLN4UR.js";import"./sliders-horizontal-BhHKxsCO.js";import"./HomeHero-DYyd3cpz.js";import"./refresh-cw-DmNAhaH0.js";import"./observe-Da2mRAsc.js";import"./persistent-state-xJz-qAFc.js";import"./agent-lanes-model-DXqjs0OK.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-BPqBoNSm.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DuD3RFX5.js";import"./file-code-corner-DDPq4Cur.js";import"./use-fleet-active-asks-BtgNnRgK.js";import"./MissionLeftAgentRow-B0QG7Gys.js";import"./page-status-Crtgjbq3.js";import"./VoicePermissionsPanel-Bd16scwz.js";import"./copy-Cj-owMb-.js";import"./terminal-relay-BFhdIstF.js";import"./session-table-DKSF0mrS.js";import"./layers-Dz2dKOnU.js";import"./server-nWqndnxu.js";import"./left-BjFLvVOC.js";import"./ProjectsRail-p99BRBOa.js";import"./left-POkqE8gI.js";import"./conversation-prefs-DNre-Lcx.js";import"./agent-master-model-DAZL92oe.js";import"./use-conversation-list-DO5J8T1H.js";import"./left-BMb493FZ.js";import"./use-mesh-ops-items-N1HHhChY.js";import"./left-FNH7faCI.js";import"./left-agents-CFMxyEjT.js";import"./left-default-rnX5HANc.js";import"./left-lanes-BpLXT_qH.js";import"./lane-roster-store-Q7pcblY5.js";import"./left-advisor-CJkQS2d6.js";import"./gauge-BVEknshP.js";import"./MeshCanvasMinimap-CxqeVVco.js";import"./SecondaryNav-BrXMtvKE.js";var ir={panels:{statusBar:"bg-card/95 backdrop-blur-xl border-t border-[var(--hud-chrome-border-subtle)] shadow-[var(--hud-shadow-bar)] fixed bottom-0 left-0 right-0 z-[60]"},zIndex:{navigationStack:50,drawer:70},layout:{navHeight:48,statusBarHeight:28}},Hh=ir.panels;const Gh=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],qh=yt("bell",Gh);const Kh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jh=yt("circle-alert",Kh);const Yh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Xh=yt("circle-question-mark",Yh);const Qh=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],eg=yt("flag",Qh);const tg=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],ng=yt("list-todo",tg);const rg=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],og=yt("map",rg);const sg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}]],ag=yt("panel-bottom",sg);const ig=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],cg=yt("panel-left-close",ig);const lg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],ug=yt("panel-left-open",lg);const dg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],fg=yt("panel-right-close",dg);const pg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],mg=yt("panel-right-open",pg);const hg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],gg=yt("panel-right",hg);const bg=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],vg=yt("pin-off",bg);const yg=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],xg=yt("pin",yg);const wg=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Eg=yt("trash-2",wg);var Sg=p.createContext({});function kg(){return p.useContext(Sg)}var Iu="vercel.ai.error",Cg=Symbol.for(Iu),hc,gc,nn=class Ou extends(gc=Error,hc=Cg,gc){constructor({name:t,message:n,cause:r}){super(n),this[hc]=!0,this.name=t,this.cause=r}static isInstance(t){return Ou.hasMarker(t,Iu)}static hasMarker(t,n){const r=Symbol.for(n);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function Nu(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var Pu="AI_InvalidArgumentError",Au=`vercel.ai.error.${Pu}`,Rg=Symbol.for(Au),bc,vc,_g=class extends(vc=nn,bc=Rg,vc){constructor({message:e,cause:t,argument:n}){super({name:Pu,message:e,cause:t}),this[bc]=!0,this.argument=n}static isInstance(e){return nn.hasMarker(e,Au)}},Mu="AI_JSONParseError",ju=`vercel.ai.error.${Mu}`,Tg=Symbol.for(ju),yc,xc,wc=class extends(xc=nn,yc=Tg,xc){constructor({text:e,cause:t}){super({name:Mu,message:`JSON parsing failed: Text: ${e}.
|
|
1
|
+
import{r as p,z as Om,a4 as cu,j as u,F as lu,k as Nm}from"./index-C1VaWNuD.js";import{av as Pm,aw as Am,h as ar,k as uu,U as Mm,b as du,F as jm,S as zm,n as fu,o as Dm,p as Lm,q as $m}from"./router-kfcaYqZr.js";import{a as ro,u as Fm,T as Zm,b as Bm,H as Wm}from"./chunk-JTPDIGGW-COJ00z94.js";import{u as xt,c as Vm,l as Um,H as hn,a as Hm,b as Gm}from"./chunk-YOZR3KYS-CrCgXw9l.js";import{S as pu}from"./sparkles-D0vWLTyC.js";import{L as Pa}from"./loader-circle-DmUG_YC7.js";import{V as qm,a as Km,b as Jm,m as Ym,P as Xm,d as Qm,e as eh,c as th}from"./agent-autocomplete-BlK8wY06.js";import{S as mu,a as nh}from"./runtime-picker-C20lTGhV.js";import{c as yt}from"./createLucideIcon-Dv8H8m7J.js";import{P as rh}from"./paperclip-Br7wUDFl.js";import{r as Vt}from"./index-Cx6Gbr6n.js";import{C as oh,Z as sh}from"./chunk-T65CQEWV-H2QEKfr1.js";import{C as ah}from"./clock-_9FDplIT.js";import{S as vs}from"./search-FB2vVxCp.js";import{u as hu,i as gu,d as ih,e as ch,c as lh,f as uh}from"./keyboard-nav-B8sQ_8IF.js";import{i as Jo,u as bu}from"./use-scout-dev-flags-DTseRrFi.js";import{X as ys}from"./x-DgmmnPKt.js";import{T as vu}from"./terminal-UDy4lzV1.js";import{b as yu,M as xu,a as dh}from"./DocumentFocusViewer-D8iB6SMt.js";import{C as fh}from"./conversation-model-C2KuZUXc.js";import{s as ph,S as mh,d as hh}from"./scope-views-KPY85UUx.js";import{N as wu,O as gh,u as Ut,i as Eu,m as bh,l as vh,U as yh}from"./Provider-D0bB7q6y.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./AgentDetailCard-8viaEY8b.js";/* empty css *//* empty css */import"./NewChatComposer-D2Ah4T-W.js";import"./CrewAvatar-CZ_faQ_s.js";/* empty css */import"./BackToPicker-BHicJyfc.js";import"./AgentLiveActions-DlSKL60c.js";import"./ObservedTopologyPanel-CJVqIqQ2.js";/* empty css */import{e as xh,f as gn,P as Yo,g as Su,h as ku,s as wh,i as Eh}from"./secondaryNavConfig-C0Srrmy8.js";/* empty css */import"./ConversationScreen-DIU7m_aC.js";/* empty css */import"./SessionObserve-BVeTkcIl.js";/* empty css *//* empty css *//* empty css */import"./projects-inbox-DFbgVlXL.js";import"./ProjectsInbox-Bq29DE_o.js";/* empty css */import"./RailRow-B88JVr62.js";/* empty css *//* empty css */import"./cache-CeWH_KzJ.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./left-BjS1dKNV.js";import"./content-DkZDzzx3.js";import{u as Sh}from"./mesh-view-store-CBM1za_N.js";import"./left-MmTJf1tK.js";/* empty css */import"./mesh-ops-CKSWgax2.js";import"./left-mission-DqGR5jby.js";import"./mission-control-store-CM8mQGg8.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-CETQ5NTx.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-_gKWfaQM.js";import"./RepoDiffViewerLazy-DzfoFhbl.js";/* empty css *//* empty css *//* empty css */import"./CastPicker-CkgTalIt.js";import"./SettingsDrawer-CPB32w0n.js";import"./left-CL-TVLJ7.js";/* empty css */import"./credentials-BTce3VP1.js";import{N as $r,f as kh,g as Ch,h as Lo,i as Rh,j as _h,k as Th}from"./hooks-ME7rmhpE.js";import{a as Aa}from"./api-Co9aQ2Jw.js";import{o as Ih,i as Oh}from"./surface-activity-B1rgWB1i.js";import{P as Nh}from"./plus-BWKhylds.js";import{resolveSidebarContext as Ph}from"./resolve-sidebar-context-GqhZNRPY.js";import{d as mi,n as Ah,i as Cu}from"./colors-BtO5_zlx.js";import{b as Mh}from"./mesh-buckets-CLYS8Jx8.js";import{u as jh}from"./sse-B29iGBnw.js";import{f as zh,b as Dh,d as Lh}from"./terminal-sessions-Bdt2W3Y4.js";import{o as fc}from"./openAgent-Dbv5wfuL.js";import{A as Ru}from"./AgentAvatar-Dz79iTxB.js";import{C as wn,a as $h,b as Xt,c as hi,d as Fh}from"./ChatCollapsedStrip-7Wrg8Ge0.js";import{U as _u}from"./CrewWorkspaces-DNX-QQ1h.js";import{L as Zh}from"./layout-grid-BoVnPOk-.js";import{A as Tu}from"./activity-CzTJ-YMX.js";import{OpsSubnav as Bh}from"./OpsSubnav-CjDTnp64.js";import{A as pc}from"./arrow-left-eToA6GxC.js";import{A as Wh}from"./arrow-right-DTX42clh.js";import{M as mc}from"./message-square-BLiFqpe_.js";import{C as Vh}from"./chevron-down-D120PY4g.js";import{C as Uh}from"./chevron-right-CowuvuE6.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./arrow-down-BAGkhHA6.js";import"./use-reduced-motion-CPoX8iV2.js";import"./gestures-YA5IIwp-.js";import"./radio-CxIXS1nU.js";import"./bot-WxKXYtEX.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./file-text-BHro8MkG.js";import"./time-Dhsh_2EG.js";import"./scoutbot-D7kGGyK_.js";import"./model-CBkMvT1w.js";import"./code-xml-CkkNdRmu.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./terminal-takeover-BMeBjBB2.js";import"./openContent-C6XO6kr5.js";import"./eye-C9cGk5z6.js";import"./compass-BdpImt_W.js";import"./settings-DQEtqkM9.js";import"./git-branch-Bc_eDIpG.js";import"./scroll-text-DFcBYy5J.js";import"./ConversationComposer-BUIjWMBi.js";import"./zap-Bcja1lHG.js";import"./message-markup-DC0QFEZn.js";import"./mentions-BZ5SBMtc.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-Bt2RBj93.js";import"./AstronautSuit-CwB4Dw07.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./ConversationFeedRows-Bx0gFyG_.js";import"./ConversationPanels-o6W-cOoU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./proxy-DVDRhSRR.js";import"./message-circle-joGFxfj1.js";import"./tail-events-LK29oCKm.js";import"./ConversationStatus-CTYOywFh.js";import"./check-Dz2SRHft.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-t7-XJP-h.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DCJ5EmD8.js";import"./SessionObserveEvidence-BkOezTGV.js";import"./wrench-BfVeded5.js";import"./external-link-BvX5PfLh.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-DetLMkTT.js";import"./session-ref-lookup-state-SATH_jAP.js";import"./project-overview-helpers-BQTc_Ous.js";import"./useEmbedHeadline-DuUnwTB7.js";import"./api-HFH8wFyb.js";import"./arrow-up-right-B09GPwFl.js";import"./AddProjectForm-fXndbzXT.js";import"./agent-specialization-CtF_jI34.js";import"./sliders-horizontal-57e99_qO.js";import"./HomeHero-DXJo2QSO.js";import"./refresh-cw-Bkh7Cvnd.js";import"./observe-BLmy4quB.js";import"./persistent-state-BubPQ7tT.js";import"./agent-lanes-model-tc-1hE6q.js";import"./context-budget-DqxWzalx.js";import"./home-moving-signal-PHSqSBu_.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-CHFIGw87.js";import"./file-code-corner-jlGFdr8d.js";import"./use-fleet-active-asks-CCGrll5q.js";import"./MissionLeftAgentRow-CbQm4BLv.js";import"./page-status-BE0-J1xY.js";import"./VoicePermissionsPanel-C4vkU-sU.js";import"./copy-BzdzWsQd.js";import"./terminal-relay-CXHMdain.js";import"./session-table-uJh3v-ly.js";import"./layers-CW2-qHsG.js";import"./server-WY6gsbZz.js";import"./left-DLpsDi55.js";import"./ProjectsRail-kMDA0yn4.js";import"./left-BRu9pnqx.js";import"./conversation-prefs-DNre-Lcx.js";import"./agent-master-model-DMcHeNq3.js";import"./use-conversation-list-UG-tMN67.js";import"./left-P80i5V8L.js";import"./use-mesh-ops-items-BjyeFJTz.js";import"./left-DPcM9o8Y.js";import"./left-agents-7mJsiNyr.js";import"./left-default-COK26l3H.js";import"./left-lanes-Dbdm9Veu.js";import"./lane-roster-store-DN2jxXF-.js";import"./left-advisor-CbXVzAqS.js";import"./gauge-DSflSery.js";import"./MeshCanvasMinimap-BXHRNb7l.js";import"./SecondaryNav-Cs0_FQdj.js";var ir={panels:{statusBar:"bg-card/95 backdrop-blur-xl border-t border-[var(--hud-chrome-border-subtle)] shadow-[var(--hud-shadow-bar)] fixed bottom-0 left-0 right-0 z-[60]"},zIndex:{navigationStack:50,drawer:70},layout:{navHeight:48,statusBarHeight:28}},Hh=ir.panels;const Gh=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],qh=yt("bell",Gh);const Kh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jh=yt("circle-alert",Kh);const Yh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Xh=yt("circle-question-mark",Yh);const Qh=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],eg=yt("flag",Qh);const tg=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],ng=yt("list-todo",tg);const rg=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],og=yt("map",rg);const sg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}]],ag=yt("panel-bottom",sg);const ig=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],cg=yt("panel-left-close",ig);const lg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],ug=yt("panel-left-open",lg);const dg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],fg=yt("panel-right-close",dg);const pg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],mg=yt("panel-right-open",pg);const hg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],gg=yt("panel-right",hg);const bg=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],vg=yt("pin-off",bg);const yg=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],xg=yt("pin",yg);const wg=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Eg=yt("trash-2",wg);var Sg=p.createContext({});function kg(){return p.useContext(Sg)}var Iu="vercel.ai.error",Cg=Symbol.for(Iu),hc,gc,nn=class Ou extends(gc=Error,hc=Cg,gc){constructor({name:t,message:n,cause:r}){super(n),this[hc]=!0,this.name=t,this.cause=r}static isInstance(t){return Ou.hasMarker(t,Iu)}static hasMarker(t,n){const r=Symbol.for(n);return t!=null&&typeof t=="object"&&r in t&&typeof t[r]=="boolean"&&t[r]===!0}};function Nu(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var Pu="AI_InvalidArgumentError",Au=`vercel.ai.error.${Pu}`,Rg=Symbol.for(Au),bc,vc,_g=class extends(vc=nn,bc=Rg,vc){constructor({message:e,cause:t,argument:n}){super({name:Pu,message:e,cause:t}),this[bc]=!0,this.argument=n}static isInstance(e){return nn.hasMarker(e,Au)}},Mu="AI_JSONParseError",ju=`vercel.ai.error.${Mu}`,Tg=Symbol.for(ju),yc,xc,wc=class extends(xc=nn,yc=Tg,xc){constructor({text:e,cause:t}){super({name:Mu,message:`JSON parsing failed: Text: ${e}.
|
|
2
2
|
Error message: ${Nu(t)}`,cause:t}),this[yc]=!0,this.text=e}static isInstance(e){return nn.hasMarker(e,ju)}},zu="AI_TypeValidationError",Du=`vercel.ai.error.${zu}`,Ig=Symbol.for(Du),Ec,Sc,cr=class Ma extends(Sc=nn,Ec=Ig,Sc){constructor({value:t,cause:n,context:r}){let o="Type validation failed";if(r?.field&&(o+=` for ${r.field}`),r?.entityName||r?.entityId){o+=" (";const s=[];r.entityName&&s.push(r.entityName),r.entityId&&s.push(`id: "${r.entityId}"`),o+=s.join(", "),o+=")"}super({name:zu,message:`${o}: Value: ${JSON.stringify(t)}.
|
|
3
3
|
Error message: ${Nu(n)}`,cause:n}),this[Ec]=!0,this.value=t,this.context=r}static isInstance(t){return nn.hasMarker(t,Du)}static wrap({value:t,cause:n,context:r}){var o,s,a;return Ma.isInstance(n)&&n.value===t&&((o=n.context)==null?void 0:o.field)===r?.field&&((s=n.context)==null?void 0:s.entityName)===r?.entityName&&((a=n.context)==null?void 0:a.entityId)===r?.entityId?n:new Ma({value:t,cause:n,context:r})}};function M(e,t,n){function r(i,l){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),i._zod.traits.has(e))return;i._zod.traits.add(e),t(i,l);const c=a.prototype,d=Object.keys(c);for(let f=0;f<d.length;f++){const h=d[f];h in i||(i[h]=c[h].bind(i))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function a(i){var l;const c=n?.Parent?new s:this;r(c,i),(l=c._zod).deferred??(l.deferred=[]);for(const d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:i=>n?.Parent&&i instanceof n.Parent?!0:i?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class rr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Lu extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const $u={};function En(e){return $u}function Fu(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ja(e,t){return typeof t=="bigint"?t.toString():t}function xs(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function gi(e){return e==null}function bi(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Og(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l?.[1]&&(o=Number.parseInt(l[1]))}const s=n>o?n:o,a=Number.parseInt(e.toFixed(s).replace(".","")),i=Number.parseInt(t.toFixed(s).replace(".",""));return a%i/10**s}const kc=Symbol("evaluating");function Ie(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==kc)return r===void 0&&(r=kc,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Bn(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Rn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Cc(e){return JSON.stringify(e)}function Ng(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Zu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Pg=xs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lr(e){if(Hr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Hr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Bu(e){return lr(e)?{...e}:Array.isArray(e)?[...e]:e}const Ag=new Set(["string","number","symbol"]);function ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _n(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ce(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Mg(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const jg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function zg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Rn(e._zod.def,{get shape(){const a={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=n.shape[i])}return Bn(this,"shape",a),a},checks:[]});return _n(e,s)}function Dg(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Rn(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete a[i]}return Bn(this,"shape",a),a},checks:[]});return _n(e,s)}function Lg(e,t){if(!lr(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(s,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Rn(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Bn(this,"shape",s),s}});return _n(e,o)}function $g(e,t){if(!lr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Rn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Bn(this,"shape",r),r}});return _n(e,n)}function Fg(e,t){const n=Rn(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Bn(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return _n(e,n)}function Zg(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Rn(t._zod.def,{get shape(){const i=t._zod.def.shape,l={...i};if(n)for(const c in n){if(!(c in i))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:i[c]}):i[c])}else for(const c in i)l[c]=e?new e({type:"optional",innerType:i[c]}):i[c];return Bn(this,"shape",l),l},checks:[]});return _n(t,a)}function Bg(e,t,n){const r=Rn(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const a in n){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(s[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)s[a]=new e({type:"nonoptional",innerType:o[a]});return Bn(this,"shape",s),s}});return _n(t,r)}function er(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function tr(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function So(e){return typeof e=="string"?e:e?.message}function Sn(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=So(e.inst?._zod.def?.error?.(e))??So(t?.error?.(e))??So(n.customError?.(e))??So(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function vi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Gr(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Wu=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ja,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Vu=M("$ZodError",Wu),Uu=M("$ZodError",Wu,{Parent:Error});function Wg(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Vg(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>r({issues:a}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let a=n,i=0;for(;i<s.path.length;){const l=s.path[i];i===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(s))):a[l]=a[l]||{_errors:[]},a=a[l],i++}}};return r(e),n}const yi=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new rr;if(a.issues.length){const i=new(o?.Err??e)(a.issues.map(l=>Sn(l,s,En())));throw Zu(i,o?.callee),i}return a.value},xi=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const i=new(o?.Err??e)(a.issues.map(l=>Sn(l,s,En())));throw Zu(i,o?.callee),i}return a.value},ws=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new rr;return s.issues.length?{success:!1,error:new(e??Vu)(s.issues.map(a=>Sn(a,o,En())))}:{success:!0,data:s.value}},Ug=ws(Uu),Es=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(a=>Sn(a,o,En())))}:{success:!0,data:s.value}},Hg=Es(Uu),Gg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return yi(e)(t,n,o)},qg=e=>(t,n,r)=>yi(e)(t,n,r),Kg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xi(e)(t,n,o)},Jg=e=>async(t,n,r)=>xi(e)(t,n,r),Yg=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ws(e)(t,n,o)},Xg=e=>(t,n,r)=>ws(e)(t,n,r),Qg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Es(e)(t,n,o)},eb=e=>async(t,n,r)=>Es(e)(t,n,r),tb=/^[cC][^\s-]{8,}$/,nb=/^[0-9a-z]+$/,rb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ob=/^[0-9a-vA-V]{20}$/,sb=/^[A-Za-z0-9]{27}$/,ab=/^[a-zA-Z0-9_-]{21}$/,ib=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cb=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Rc=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,lb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ub="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function db(){return new RegExp(ub,"u")}const fb=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,mb=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,hb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hu=/^[A-Za-z0-9_-]*$/,bb=/^\+[1-9]\d{6,14}$/,Gu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",vb=new RegExp(`^${Gu}$`);function qu(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function yb(e){return new RegExp(`^${qu(e)}$`)}function xb(e){const t=qu({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Gu}T(?:${r})$`)}const wb=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Eb=/^-?\d+$/,Ku=/^-?\d+(?:\.\d+)?$/,Sb=/^(?:true|false)$/i,kb=/^null$/i,Cb=/^[^A-Z]*$/,Rb=/^[^a-z]*$/,kt=M("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ju={number:"number",bigint:"bigint",object:"date"},Yu=M("$ZodCheckLessThan",(e,t)=>{kt.init(e,t);const n=Ju[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xu=M("$ZodCheckGreaterThan",(e,t)=>{kt.init(e,t);const n=Ju[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_b=M("$ZodCheckMultipleOf",(e,t)=>{kt.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Og(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Tb=M("$ZodCheckNumberFormat",(e,t)=>{kt.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=jg[t.format];e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,i.minimum=o,i.maximum=s,n&&(i.pattern=Eb)}),e._zod.check=a=>{const i=a.value;if(n){if(!Number.isInteger(i)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:i,inst:e});return}if(!Number.isSafeInteger(i)){i>0?a.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}i<o&&a.issues.push({origin:"number",input:i,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),i>s&&a.issues.push({origin:"number",input:i,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Ib=M("$ZodCheckMaxLength",(e,t)=>{var n;kt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!gi(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const a=vi(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ob=M("$ZodCheckMinLength",(e,t)=>{var n;kt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!gi(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const a=vi(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Nb=M("$ZodCheckLengthEquals",(e,t)=>{var n;kt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!gi(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const a=vi(o),i=s>t.length;r.issues.push({origin:a,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ss=M("$ZodCheckStringFormat",(e,t)=>{var n,r;kt.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Pb=M("$ZodCheckRegex",(e,t)=>{Ss.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ab=M("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cb),Ss.init(e,t)}),Mb=M("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Rb),Ss.init(e,t)}),jb=M("$ZodCheckIncludes",(e,t)=>{kt.init(e,t);const n=ur(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),zb=M("$ZodCheckStartsWith",(e,t)=>{kt.init(e,t);const n=new RegExp(`^${ur(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Db=M("$ZodCheckEndsWith",(e,t)=>{kt.init(e,t);const n=new RegExp(`.*${ur(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Lb=M("$ZodCheckOverwrite",(e,t)=>{kt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class $b{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
4
4
|
`).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),s=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
|
|
@@ -76,4 +76,4 @@ ${b}`,c++;break;case"id":i=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.t
|
|
|
76
76
|
placeholder:text-muted-foreground/80 placeholder:font-light text-foreground
|
|
77
77
|
focus:outline-none transition-all duration-200
|
|
78
78
|
${i?"text-accent":""}
|
|
79
|
-
`}),i&&u.jsx("button",{type:"button",onClick:()=>r.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded-sm",children:u.jsx(ys,{size:12})})]})]})]})})}function MP({app:e,assistant:t=!0}){return u.jsx(jm,{registry:Lm,audience:Dm,audienceOrder:fu,storageKey:zm,initialLayers:$m(),children:u.jsx(e.Provider,{children:u.jsx(m_,{children:u.jsx(WT,{app:e,assistantEnabled:t})})})})}function ZT({statusBar:e,dictationActive:t}){const n=ar("surface.scoutbot",!0),r=ar(wu,!0),o=e.mesh.color==="amber"?"text-amber-400":e.mesh.color==="red"?"text-red-400":"text-foreground";return u.jsxs("div",{className:"flex items-center gap-3 font-mono leading-none",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"text-2xs font-normal uppercase tracking-[0.16em] text-muted-foreground",children:e.mesh.label}),u.jsx("span",{className:`text-xs ${o}`,children:e.mesh.value})]}),(n||r)&&u.jsxs(u.Fragment,{children:[u.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),u.jsxs("div",{className:"flex items-center gap-1",children:[n&&u.jsx(th,{}),r&&u.jsx(C_,{dictationActive:t})]})]})]})}function BT({statusBar:e,onOpenFlagPanel:t,onOpenActivityLog:n}){return u.jsxs("div",{className:"flex max-w-[42vw] items-center gap-3",children:[u.jsx(S_,{onOpen:n}),u.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),u.jsx(a_,{onOpenPanel:t}),u.jsx("div",{className:"truncate font-mono text-xs leading-none text-muted-foreground",title:e.build.title,children:e.build.label})]})}function WT({app:e,assistantEnabled:t}){const{navTotalHeight:n}=Hi(),{titleBarInset:r,dragRegionProps:o,onInteractiveMouseDown:s}=ro(),a=y_();ih();const{route:i,openContextCapture:l,apiConnection:c,navigate:d,navigateBack:f,selectedBrokerAttempt:h,selectedKnowledgeHit:m,appearanceDetails:v}=Ut(),x=uu(),S=v.shell==="slack",y=ar("nav.sidebar",!1),g=S||y,b=g?r:n,w=g,E=w?$T:0,k=b+E,C=k+rm,R=yh(),O=e.hooks.useCommands(),N=e.hooks.useSearch?.()??null,A=e.hooks.useNavCenter?.()??null,j=e.hooks.useNavActions?.()??null,_=e.hooks.useLayoutMode?.()??e.mode,Z=_==="focus"?"panel":_,P=e.hooks.useActiveToolHint?.()??null,z=e.hooks.useTakeover?.()??null,D=z?.active===!0,I=D&&z?.dismissible===!0,W=z?.onDismiss,T=e.slots.Takeover,B=_h();__(B,c);const U=h_(),[q,he]=p.useState(!1),[ee,K]=xt(`appshell.${e.id}.left`,!1),[ae,Q]=xt(`appshell.${e.id}.right`,!1),[J,fe]=xt(`appshell.${e.id}.rightOverlay`,!1),[$,ie]=xt(`appshell.${e.id}.leftW`,260),[te,ye]=xt(`appshell.${e.id}.rightW`,280),[pe,Y]=xt("openscout.ops.minimap.collapsed",!1),[se,we]=xt(`appshell.${e.id}.terminalFocus`,!1),[Ee,Ce]=p.useState(()=>typeof window<"u"?window.innerWidth:1280),[H,be]=p.useState(()=>iu(typeof window<"u"?window.innerWidth:1280)),X=i.view==="search"||x.pathname==="/search",le=S?rT:sT,F=kT(e.id,Ee,le),ge=g&&i.view==="terminal"&&se,[Ne,Re]=p.useState(null),[Qe,nt]=p.useState(!1),tt=p.useRef(null),rt=p.useRef(null),Ct=Ne!=null,Se=Ne!=null?sm(Ne,{min:di,max:fi,startedCollapsed:Qe}):null,[ze,qe]=p.useState(null),Pe=p.useRef(null);p.useEffect(()=>{const L=()=>{Ce(window.innerWidth),be(iu(window.innerWidth))};return L(),window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]);const{active:De,brandLabel:ut}=hh({route:i});p.useEffect(()=>(document.documentElement.style.setProperty("--scout-rail-collapsed-width",`${lt}px`),g?(document.documentElement.setAttribute("data-scout-sidebar-chrome",""),document.documentElement.style.setProperty("--scout-nav-rail-width",`${F.width}px`),F.isSidebarResizing?document.documentElement.setAttribute("data-scout-sidebar-resizing",""):document.documentElement.removeAttribute("data-scout-sidebar-resizing")):(document.documentElement.removeAttribute("data-scout-sidebar-chrome"),document.documentElement.removeAttribute("data-scout-sidebar-resizing"),document.documentElement.style.removeProperty("--scout-nav-rail-width")),()=>{document.documentElement.removeAttribute("data-scout-sidebar-chrome"),document.documentElement.removeAttribute("data-scout-sidebar-resizing"),document.documentElement.style.removeProperty("--scout-nav-rail-width")}),[g,F.width,F.isSidebarResizing]),p.useEffect(()=>{ie(g?L=>Oa(L):L=>Math.min(H,Math.max(Do,L))),ye(L=>Math.min(H,Math.max(Do,L)))},[g,H,ie,ye]),p.useEffect(()=>{!X||ae||J||ye(L=>Math.max(L,Math.min(H,jT)))},[X,ae,J,ye,H]);const Pt=i.view==="agents-v2"&&!i.agentId&&!i.sessionId&&!!i.selectedAgentId||i.view==="agents-v2"&&!!i.agentId;p.useEffect(()=>{!Pt||ae||J||ye(L=>Math.max(L,Math.min(H,zT)))},[Pt,ae,J,ye,H]);const Ke=i.view==="broker"&&!!i.attemptId;p.useEffect(()=>{Ke&&(Q(!1),ye(L=>Math.max(L,Math.min(H,DT))))},[Ke,Q,ye,H]);const[sn,xr]=p.useState({x:0,y:0}),[co,Fs]=p.useState(1),Zs=p.useCallback(L=>{xr(V=>({x:V.x+L.x,y:V.y+L.y}))},[]),Bs=p.useCallback(L=>{Fs(L)},[]),[Ht,Lt]=p.useState(!1),[lo,Ws]=p.useState(!1),[Vs,An]=xt(`appshell.${e.id}.termH`,320),uo=!!e.slots.Terminal,Gn=p.useMemo(()=>{const L=[];return uo&&L.push("terminal"),t&&L.push("assistant"),L},[uo,t]),fo=Gn[0]??"terminal",[po,wr]=xt(`appshell.${e.id}.drawerTab`,fo),Er=Gn.includes(po)?po:fo,[um,mo]=p.useState(!1),[dm,qn]=p.useState(!1),[fm,pm]=p.useState(new Set),Us=p.useRef(!1),Kn=p.useRef(null),ln=p.useCallback(()=>{Us.current=!1,Kn.current!==null&&(window.clearTimeout(Kn.current),Kn.current=null)},[]),Xi=p.useCallback(()=>{Us.current=!0,Kn.current!==null&&window.clearTimeout(Kn.current),Kn.current=window.setTimeout(ln,LT)},[ln]);p.useEffect(()=>ln,[ln]);const mm=p.useCallback(L=>{pm(V=>{const Oe=new Set(V);return Oe.has(L)?Oe.delete(L):Oe.add(L),Oe})},[]),Qi=p.useCallback(L=>V=>{V.preventDefault();const Oe=V.clientX,Rt=L==="left"?$:te,ft=L==="left"?ie:ye,Je=L==="left"?1:-1,un=_t=>{const it=(_t.clientX-Oe)*Je;ft(Math.max(Do,Math.min(H,Rt+it)))},$t=()=>{document.removeEventListener("mousemove",un),document.removeEventListener("mouseup",Ft),window.removeEventListener("blur",$t)},Ft=()=>$t();document.addEventListener("mousemove",un),document.addEventListener("mouseup",Ft),window.addEventListener("blur",$t)},[$,te,ie,ye,H]),[ho,hm]=p.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);p.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const L=window.matchMedia("(prefers-reduced-motion: reduce)"),V=()=>hm(L.matches);return V(),L.addEventListener?.("change",V),()=>L.removeEventListener?.("change",V)},[]);const go=p.useCallback(L=>{ho||(qe(L),Pe.current!==null&&window.clearTimeout(Pe.current),Pe.current=window.setTimeout(()=>{qe(null),Pe.current=null},150))},[ho]);p.useEffect(()=>()=>{Pe.current!==null&&window.clearTimeout(Pe.current)},[]);const gm=p.useCallback(L=>{L.preventDefault(),L.stopPropagation();const V=F.effectiveCollapsed,Oe=L.clientX,Rt=V?le:F.expandedWidth;rt.current=Rt,F.beginResize(Rt,V);const ft=()=>{document.removeEventListener("pointermove",Je),document.removeEventListener("pointerup",un),document.removeEventListener("pointercancel",$t),window.removeEventListener("blur",$t)},Je=Ft=>{const _t=Rt+(Ft.clientX-Oe);rt.current=_t,F.updateResize(_t)},un=()=>{const Ft=rt.current??Rt,_t=F.commitDrag(Ft,V),it=_t.kind==="collapse"?le:_t.kind==="expand"?F.expandedWidth:_t.kind==="resize"?_t.width:null;it!=null&&go(it),ft()},$t=()=>{F.clearDrag(),ft()};document.addEventListener("pointermove",Je),document.addEventListener("pointerup",un),document.addEventListener("pointercancel",$t),window.addEventListener("blur",$t)},[F,le,go]),bm=p.useCallback((L,V)=>Oe=>{Oe.preventDefault(),Oe.stopPropagation();const Rt=Oe.clientX,ft=V?lt:Oa($);tt.current=ft,Re(ft),nt(V);const Je=()=>{document.removeEventListener("pointermove",un),document.removeEventListener("pointerup",$t),document.removeEventListener("pointercancel",Ft),window.removeEventListener("blur",Ft)},un=_t=>{const it=ft+(_t.clientX-Rt);tt.current=it,Re(it)},$t=()=>{const _t=tt.current??ft,it=am({startedCollapsed:V,rawWidth:_t},{min:di,max:fi});it.kind==="collapse"?K(!0):it.kind==="expand"?K(!1):it.kind==="resize"&&ie(it.width),Re(null),tt.current=null;const dc=it.kind==="collapse"?L+lt:it.kind==="expand"?L+Oa($):it.kind==="resize"?L+it.width:null;dc!=null&&go(dc),Je()},Ft=()=>{Re(null),tt.current=null,Je()};document.addEventListener("pointermove",un),document.addEventListener("pointerup",$t),document.addEventListener("pointercancel",Ft),window.addEventListener("blur",Ft)},[$,K,ie,go]),ec=i.view==="agents-v2",tc=OT(i,{hasBrokerAttempt:!!h,hasKnowledgeHit:!!m}),bo=i.view==="ops"&&i.mode==="lanes",[vo,Hs]=p.useState(!1),vm=R.state.conversation,Sr=_T(i,vm);p.useEffect(()=>{bo||Hs(!1)},[bo]),p.useEffect(()=>{Sr||Hs(!1)},[Sr]);const kr=TT({empty:Sr,forceOpen:vo,baseCollapsed:ae||De}),Gs=!ge&&!De&&tc,qs=Gn.length>0,Cr=!De&&tc,yo=Gs&&!kr,Gt=p.useCallback(()=>{const L=NT({available:Cr,terminalFocusActive:ge,lanesContextRoute:bo,lanesContextEmpty:Sr,lanesContextForceOpen:vo,rightCollapsed:ae});L&&(L.terminalFocusActive!==ge&&we(L.terminalFocusActive),L.lanesContextForceOpen!==vo&&Hs(L.lanesContextForceOpen),L.rightCollapsed!==ae&&Q(L.rightCollapsed))},[Sr,vo,bo,ae,Cr,Q,we,ge]),nc=p.useMemo(()=>{const V=[{id:"nav:back",label:"Back",shortcut:"Cmd+[",action:f},{id:"shell:toggle-sidebar-b",label:"Toggle Sidebar",shortcut:"Cmd+B",action:()=>{g?F.toggleCollapsed():K(Oe=>!Oe)}},{id:"shell:toggle-right",label:"Toggle Right Panel",shortcut:"Cmd+]",action:Gt},{id:"shell:toggle-right-overlay",label:"Toggle Inspector Overlay",shortcut:"Cmd+Shift+]",action:()=>fe(Oe=>!Oe)},{id:"shell:new-session",label:$r,shortcut:Lo,action:()=>l()},{id:"shell:toggle-terminal",label:"Toggle Terminal",shortcut:"Ctrl+`",action:()=>Lt(Oe=>!Oe)},...g&&i.view==="terminal"?[{id:"shell:terminal-focus",label:se?"Exit Terminal Focus":"Focus Terminal",shortcut:"Cmd+Shift+B",action:()=>we(Oe=>!Oe)}]:[],{id:"shell:feature-flags",label:"Feature Flags",shortcut:Jo()?"Cmd+Shift+F":void 0,action:()=>qn(!0)}];return t&&V.push({id:"shell:toggle-assistant",label:"Toggle Assistant",shortcut:"Cmd+J",action:()=>{wr("assistant"),Lt(Oe=>!Oe||po!=="assistant")}}),V},[t,po,l,f,i,wr,K,fe,qn,we,g,F,se,Gt]),ym=p.useMemo(()=>[...O,...nc],[O,nc]);p.useEffect(()=>{const L=V=>{if(ch(V)&&!D&&!a.open&&!lh()&&g&&i.view==="terminal"){V.preventDefault(),V.stopPropagation(),we(Je=>!Je);return}if(uh(V.target)||D||a.open)return;const Oe=V.key.toLowerCase(),Rt=V.metaKey||V.ctrlKey||V.altKey,ft=gu(V.target);if(Us.current)if(V.key==="Escape"||Rt||ft)ln();else{const Je=g_(Oe);if(Je){V.preventDefault(),V.stopPropagation(),ln(),d(Je.route);return}else ln()}if(!Rt&&!V.shiftKey&&Oe==="g"&&!ft){V.preventDefault(),V.stopPropagation(),Xi();return}if((V.metaKey||V.ctrlKey)&&V.key==="k"&&(V.preventDefault(),mo(!0)),Th(V)&&(V.preventDefault(),l()),(V.metaKey||V.ctrlKey)&&V.key==="["&&(V.preventDefault(),f()),(V.metaKey||V.ctrlKey)&&V.key.toLowerCase()==="b"){if(ft)return;V.preventDefault(),g?F.toggleCollapsed():K(Je=>!Je)}(V.metaKey||V.ctrlKey)&&V.key==="]"&&(V.preventDefault(),V.shiftKey?fe(Je=>!Je):Gt()),V.ctrlKey&&V.key==="`"&&(V.preventDefault(),Lt(Je=>!Je)),t&&(V.metaKey||V.ctrlKey)&&V.key==="j"&&(V.preventDefault(),wr("assistant"),Lt(Je=>!(Je&&Er==="assistant"))),Jo()&&(V.metaKey||V.ctrlKey)&&V.shiftKey&&!V.altKey&&V.code==="KeyF"&&(V.preventDefault(),V.stopPropagation(),qn(!0))};return window.addEventListener("keydown",L,!0),()=>window.removeEventListener("keydown",L,!0)},[t,ln,a.open,f,d,l,Er,i,wr,K,Q,fe,qn,we,g,F,Xi,D,Gt]),p.useEffect(()=>{const L=V=>{const Oe=V.detail,Rt=typeof Oe?.width=="number"?Oe.width:420;Q(!1),ye(ft=>Math.max(ft,Math.min(H,Math.max(Do,Rt))))};return window.addEventListener("scout:set-inspector-width",L),()=>window.removeEventListener("scout:set-inspector-width",L)},[Q,ye,H]);const Ks=e.slots.Inspector,rc=e.slots.RightPanel,xm=e.tools&&e.tools.length>0,wm=u.jsxs(u.Fragment,{children:[Ks&&u.jsx(Ks,{}),!Ks&&rc&&u.jsx(rc,{}),xm&&u.jsx("div",{className:"border-t border-neutral-700/50",children:e.tools.map(L=>{const V=fm.has(L.id);return u.jsxs("div",{children:[u.jsxs("button",{onClick:()=>mm(L.id),className:`w-full flex items-center gap-2 px-4 py-2.5 text-sm font-mono tracking-wider uppercase transition-colors hover:bg-white/5 ${P===L.id?"text-emerald-400":"text-neutral-300"}`,children:[V?u.jsx(Vh,{size:10}):u.jsx(Uh,{size:10}),u.jsx("span",{className:"text-neutral-400",children:L.icon}),u.jsx("span",{className:"font-bold",children:L.name})]}),V&&u.jsx("div",{className:"px-4 pb-3",children:u.jsx(L.Component,{})})]},L.id)})})]}),Em=u.jsx(e_,{onOpenCommandPalette:()=>mo(!0)}),oc=p.useMemo(()=>({isCollapsed:pe,onToggleCollapse:()=>Y(L=>!L)}),[pe,Y]),Sm=U?u.jsx("div",{className:`scout-canvas-minimap-shell${pe?" scout-canvas-minimap-shell--collapsed":""}`,children:U.render(oc)}):null,km=U?u.jsx("div",{className:`scout-canvas-minimap-shell scout-canvas-minimap-shell--floating${pe?" scout-canvas-minimap-shell--collapsed":""}`,children:U.render(oc)}):null,sc=p.useRef(null),ac=p.useRef(null);p.useEffect(()=>{const L=sc.current;L&&(D?L.setAttribute("inert",""):L.removeAttribute("inert"))},[D]),p.useEffect(()=>{if(!D)return;const L=ac.current;if(L&&(L.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")??L).focus(),!I)return;const V=Oe=>{Oe.key==="Escape"&&(Oe.preventDefault(),W?.())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[D,I,W]);const xo=De&&!g,Cm=De,Rr=!ge&&g&&bT(i,De),Js=Rr?ee?lt:$:0,ic=Rr&&F.effectiveCollapsed&ⅇp.useEffect(()=>(ic?document.documentElement.setAttribute("data-scout-double-rail",""):document.documentElement.removeAttribute("data-scout-double-rail"),()=>document.documentElement.removeAttribute("data-scout-double-rail")),[ic]);const _r=ge?0:g?F.width+Js:ee||xo?0:$,wo=ge||!Gs||J||Ke||Cm?0:kr?g?lt:0:te,Rm=Ee-_r-wo,cc=_==="panel"&&Rm<Na&&(_r>0||wo>0),Ys=cc&&wo>0,Xs=cc&&(g?Js>0&&Ee-F.width-Js<Na:_r>0&&Ee-_r<Na),Eo=Ke||J||Ys,Qs=Xs?g?F.width:0:_r,ea=Eo?0:wo,_m=_==="panel"?{position:"absolute",top:k,bottom:28,left:Qs,right:ea,overflow:"auto"}:{},lc=g?{top:k}:{},Tm=g?{top:k}:{},Im={display:"contents","--scout-shell-left-inset":`${_==="panel"?Qs:0}px`,"--scout-shell-right-inset":`${_==="panel"?ea:0}px`,...g?{"--scout-nav-rail-width":`${F.width}px`}:{}},uc=J?"Pin inspector (push content)":Ys?"Keep inspector floating when there is room":"Float inspector (overlay content)",ta=p.useCallback((L,V=!1)=>({backgroundColor:"rgba(13, 14, 16, 0.72)",backdropFilter:"blur(24px) saturate(140%)",WebkitBackdropFilter:"blur(24px) saturate(140%)",boxShadow:L==="left"?"18px 0 48px -12px rgba(0,0,0,0.7), inset -1px 0 0 0 rgba(255,255,255,0.06)":"-18px 0 48px -12px rgba(0,0,0,0.7), inset 1px 0 0 0 rgba(255,255,255,0.06)",...V?{right:12,bottom:40,borderWidth:1,borderStyle:"solid",borderColor:"rgba(255,255,255,0.09)",borderRadius:12,boxShadow:"-24px 18px 72px -18px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.025)"}:{}}),[]);return u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:sc,"aria-hidden":D?!0:void 0,style:Im,children:u.jsx(GR,{mode:Z,panOffset:sn,scale:co,onPan:Zs,onZoom:Bs,hud:u.jsxs(u.Fragment,{children:[g?null:u.jsx(FT,{title:De?ut:e.name,search:De?void 0:N??void 0,center:A,actions:j}),g?ge?null:u.jsxs(u.Fragment,{children:[u.jsx(V1,{open:!F.effectiveCollapsed,onOpenChange:L=>F.setCollapsed(!L),style:{"--sidebar-width":`${F.expandedWidth}px`,"--sidebar-width-icon":`${le}px`,"--scout-sidebar-top":"0px"},"data-sidebar-resizing":F.isSidebarResizing?"":void 0,children:u.jsx(eT,{brandLabel:e.name,presentation:S?"slack":"scout"})}),u.jsx(qo,{side:"left",collapsed:F.effectiveCollapsed,label:"Sidebar",onToggle:F.toggleCollapsed,onMouseDown:L=>L.stopPropagation(),className:"scout-rail-toggle--band",style:{position:"fixed",left:Ko(F.width,F.effectiveCollapsed,le),top:C,zIndex:46}}),u.jsx("div",{"data-scout-sidebar-resize-handle":"",role:"separator","aria-orientation":"vertical","aria-label":F.effectiveCollapsed?"Expand sidebar (drag out)":"Resize or collapse sidebar",title:F.effectiveCollapsed?"Drag out to expand · double-click to expand":"Drag to resize · drag in to collapse · double-click to reset",onPointerDown:gm,onDoubleClick:L=>{L.preventDefault(),F.effectiveCollapsed?(F.setExpandedWidth(no),F.setCollapsed(!1)):F.resetExpandedWidth()},onMouseDown:L=>{L.stopPropagation()},style:{position:"fixed",left:Math.max(0,F.width-3),top:k+ii,bottom:28,width:6,zIndex:50,cursor:"ew-resize",pointerEvents:"auto",touchAction:"none"}}),!ho&&F.isSidebarResizing&&F.dragGhostWidth!=null?u.jsx("div",{"data-scout-sidebar-resize-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost",style:{position:"fixed",left:F.dragGhostWidth,top:k,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null,Rr?u.jsx(vT,{presentation:S?"slack":"scout",navRailWidth:F.width,isCollapsed:ee,onToggleCollapse:()=>K(!ee),width:$,style:{...Tm,...Xs?ta("left"):{}}}):null,Rr?u.jsx("div",{"data-scout-sidebar-resize-handle":"","data-scout-side-rail-resize-handle":"",role:"separator","aria-orientation":"vertical","aria-label":ee?"Expand context rail (drag out)":"Resize or collapse context rail",title:ee?"Drag out to expand · double-click to expand":"Drag to resize · drag in to collapse · double-click to reset",onPointerDown:bm(F.width,ee),onDoubleClick:L=>{L.preventDefault(),ee?(ie(ui),K(!1)):ie(ui)},onMouseDown:L=>{L.stopPropagation()},style:{position:"fixed",left:Math.max(0,F.width+(ee?lt:$)-3),top:k+ii,bottom:28,width:6,zIndex:50,cursor:"ew-resize",pointerEvents:"auto",touchAction:"none"}}):null,!ho&&Rr&&Ct&&Se!=null?u.jsx("div",{"data-scout-side-rail-resize-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost",style:{position:"fixed",left:F.width+Se,top:k,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null,ze!=null?u.jsx("div",{"data-scout-rail-settle-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost scout-sidebar-resize-ghost--settle",style:{position:"fixed",left:ze,top:k,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null]}):u.jsxs(u.Fragment,{children:[u.jsx(oi,{side:"left",title:ec?"Browse":i.view==="agent-info"?"Projects":e.leftPanel?.title??"Navigation",icon:e.leftPanel?.icon,isCollapsed:ee||xo,onToggleCollapse:()=>K(!ee),width:$,onResizeStart:Qi("left"),style:Xs?ta("left"):void 0,footer:!ee&&!xo?Sm:void 0,headerActions:e.leftPanel?.headerActions&&u.jsx(e.leftPanel.headerActions,{}),children:u.jsx("div",{"data-pane":"left",style:{display:"contents"},children:e.slots.LeftPanel&&u.jsx(e.slots.LeftPanel,{})})}),ee||xo?km:null]}),w?u.jsx("div",{"data-scout-top-row-frame":"",className:"scout-top-row-frame",style:{position:"fixed",top:b,left:ge?0:F.width,right:0,height:E,zIndex:30,...o?.style??{}},...Object.fromEntries(Object.entries(o??{}).filter(([L])=>L!=="style")),children:u.jsx(wT,{variant:"top-row",presentation:S?"slack":"scout",onOpenSearch:()=>mo(!0),rightUtility:u.jsxs(u.Fragment,{children:[u.jsx(ST,{presentation:S?"slack":"scout"}),i.view==="terminal"?u.jsxs(u.Fragment,{children:[u.jsx("div",{id:"scout-terminal-header-slot","data-scout-terminal-header-slot":""}),u.jsx("button",{type:"button","data-scout-terminal-focus-toggle":"","aria-label":ge?"Exit terminal focus":"Focus terminal","aria-pressed":ge,"aria-keyshortcuts":"Meta+Shift+B Control+Shift+B",title:ge?"Exit focus (⌘⇧B)":"Focus terminal (⌘⇧B)",className:`scout-terminal-focus-toggle${ge?" scout-terminal-focus-toggle--active":""}`,onClick:()=>we(L=>!L),children:ge?u.jsx(yu,{size:13,strokeWidth:1.8,"aria-hidden":"true"}):u.jsx(xu,{size:13,strokeWidth:1.8,"aria-hidden":"true"})})]}):null,u.jsxs("span",{className:"scout-top-row-panel-toggles",role:"group","aria-label":"Layout panels",children:[u.jsx("button",{type:"button","data-scout-bottom-panel-toggle":"","aria-label":qs?Ht?"Hide bottom panel":"Show bottom panel":"Bottom panel unavailable","aria-pressed":Ht,"aria-keyshortcuts":"Control+`",title:qs?Ht?"Hide bottom panel (⌃`)":"Show bottom panel (⌃`)":"No bottom panel is available in this app",className:`scout-top-row-panel-toggle${Ht?" scout-top-row-panel-toggle--active":""}`,disabled:!qs,onClick:()=>Lt(L=>!L),children:u.jsx(ag,{size:14,strokeWidth:1.8,"aria-hidden":"true"})}),u.jsx("button",{type:"button","data-scout-right-panel-toggle":"","aria-label":Cr?yo?"Hide right panel":"Show right panel":"Right panel unavailable for this view","aria-pressed":yo,"aria-keyshortcuts":"Meta+] Control+]",title:Cr?yo?"Hide right panel (⌘])":"Show right panel (⌘])":"No right panel is available for this view",className:`scout-top-row-panel-toggle${yo?" scout-top-row-panel-toggle--active":""}`,disabled:!Cr,onClick:Gt,children:u.jsx(gg,{size:14,strokeWidth:1.8,"aria-hidden":"true"})})]})]}),onInteractiveMouseDown:s})}):null,Gs&&(()=>{const L=Ke?"Dispatch detail":ec?"Detail":e.rightPanel?.title??"Inspector";return g&&kr?u.jsxs(u.Fragment,{children:[u.jsx(lm,{side:"right",title:L,onToggle:Gt,edgeOffset:0,top:k,style:lc,body:u.jsx(CT,{route:i,onExpand:Gt})}),u.jsx(qo,{side:"right",collapsed:!0,label:L,onToggle:Gt,onMouseDown:V=>V.stopPropagation(),className:"scout-rail-toggle--band",style:{position:"fixed",right:Ko(lt,!0),top:C,zIndex:45}})]}):u.jsxs(u.Fragment,{children:[u.jsx(oi,{side:"right",title:L,icon:e.rightPanel?.icon,isCollapsed:g?!1:kr,onToggleCollapse:g?void 0:Gt,width:te,onResizeStart:Qi("right"),floating:Eo,style:{...lc,...Eo?ta("right",Ke):{}},footer:Em,headerActions:u.jsxs(u.Fragment,{children:[!Ke&&u.jsx("button",{type:"button",onClick:()=>fe(V=>Ys&&!V?!0:!V),title:uc,"aria-label":uc,className:"p-1 hover:bg-accent/10 rounded transition-colors text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",children:Eo?u.jsx(vg,{size:12}):u.jsx(xg,{size:12})}),e.rightPanel?.headerActions&&u.jsx(e.rightPanel.headerActions,{})]}),children:u.jsx("div",{"data-pane":"right",style:{display:"contents"},children:wm})}),g&&!kr?u.jsx(qo,{side:"right",collapsed:!1,label:L,onToggle:Gt,onMouseDown:V=>V.stopPropagation(),className:"scout-rail-toggle--band",style:{position:"fixed",right:Ko(te,!1),top:C,zIndex:45}}):null]})})(),u.jsx(XR,{status:B.status,left:u.jsx(ZT,{statusBar:B,dictationActive:R.state.activity==="listening"}),right:u.jsx(BT,{statusBar:B,onOpenFlagPanel:()=>qn(!0),onOpenActivityLog:()=>he(!0)}),onToggleTerminal:()=>Lt(L=>!L),isTerminalOpen:Ht}),u.jsx(k_,{open:q,onClose:()=>he(!1)}),u.jsx("div",{className:"pointer-events-none",style:{position:"fixed",left:Qs,right:ea,bottom:0,top:0,zIndex:45,transform:"translateZ(0)"},children:u.jsxs(l_,{isOpen:Ht,onClose:()=>Lt(!1),onToggleMaximize:()=>Ws(L=>!L),isMaximized:lo,height:Math.min(Vs,window.innerHeight*.8),onHeightChange:L=>An(Math.min(L,window.innerHeight*.8)),title:u.jsx(VT,{tabs:Gn,active:Er,onSelect:wr}),children:[Ht&&Er==="terminal"&&(e.slots.Terminal?u.jsx(e.slots.Terminal,{}):u.jsx("div",{className:"p-4 font-mono text-md text-neutral-400",children:"No terminal content"})),Ht&&Er==="assistant"&&u.jsx(cE,{app:e,commands:O})]})}),u.jsx(f_,{isOpen:um,onClose:()=>mo(!1),commands:ym})]}),children:u.jsx("div",{style:_m,className:"frame-scrollbar","data-pane":"center",children:u.jsx(e.slots.Content,{})})})}),D&&T?u.jsxs("div",{ref:ac,tabIndex:-1,role:"dialog","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:80,outline:"none"},children:[u.jsx("div",{"data-scout-takeover-drag-region":"","aria-hidden":"true",style:{position:"absolute",top:0,left:0,right:0,height:Math.max(28,r||28),zIndex:1,...o?.style??{}},...Object.fromEntries(Object.entries(o??{}).filter(([L])=>L!=="style"))}),u.jsx(T,{})]}):null,u.jsx(v_,{open:a.open,onClose:()=>a.setOpen(!1)}),u.jsx(r_,{isOpen:dm,onClose:()=>qn(!1),audienceOptions:fu}),u.jsx(E_,{})]})}function VT({tabs:e,active:t,onSelect:n}){return e.length===0?null:u.jsx("div",{className:"flex items-center gap-0.5",children:e.map(r=>{const o=r===t,s=r==="terminal"?vu:pu,a=r==="terminal"?"TERMINAL":"ASSISTANT",i=r==="terminal"?"text-emerald-400":"text-cyan-400";return u.jsxs("button",{type:"button",onClick:()=>n(r),className:`flex items-center gap-1.5 px-2.5 py-1 rounded text-xs font-bold tracking-widest font-mono transition-colors ${o?`${i} bg-white/[0.04]`:"text-neutral-500 hover:text-neutral-300"}`,children:[u.jsx(s,{size:13}),u.jsx("span",{children:a})]},r)})})}export{MP as OpenScoutAppShell};
|
|
79
|
+
`}),i&&u.jsx("button",{type:"button",onClick:()=>r.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none rounded-sm",children:u.jsx(ys,{size:12})})]})]})]})})}function AP({app:e,assistant:t=!0}){return u.jsx(jm,{registry:Lm,audience:Dm,audienceOrder:fu,storageKey:zm,initialLayers:$m(),children:u.jsx(e.Provider,{children:u.jsx(m_,{children:u.jsx(WT,{app:e,assistantEnabled:t})})})})}function ZT({statusBar:e,dictationActive:t}){const n=ar("surface.scoutbot",!0),r=ar(wu,!0),o=e.mesh.color==="amber"?"text-amber-400":e.mesh.color==="red"?"text-red-400":"text-foreground";return u.jsxs("div",{className:"flex items-center gap-3 font-mono leading-none",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"text-2xs font-normal uppercase tracking-[0.16em] text-muted-foreground",children:e.mesh.label}),u.jsx("span",{className:`text-xs ${o}`,children:e.mesh.value})]}),(n||r)&&u.jsxs(u.Fragment,{children:[u.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),u.jsxs("div",{className:"flex items-center gap-1",children:[n&&u.jsx(th,{}),r&&u.jsx(C_,{dictationActive:t})]})]})]})}function BT({statusBar:e,onOpenFlagPanel:t,onOpenActivityLog:n}){return u.jsxs("div",{className:"flex max-w-[42vw] items-center gap-3",children:[u.jsx(S_,{onOpen:n}),u.jsx("span",{"aria-hidden":"true",className:"select-none text-muted-foreground/40 text-xs",children:"·"}),u.jsx(a_,{onOpenPanel:t}),u.jsx("div",{className:"truncate font-mono text-xs leading-none text-muted-foreground",title:e.build.title,children:e.build.label})]})}function WT({app:e,assistantEnabled:t}){const{navTotalHeight:n}=Hi(),{titleBarInset:r,dragRegionProps:o,onInteractiveMouseDown:s}=ro(),a=y_();ih();const{route:i,openContextCapture:l,apiConnection:c,navigate:d,navigateBack:f,selectedBrokerAttempt:h,selectedKnowledgeHit:m,appearanceDetails:v}=Ut(),x=uu(),S=v.shell==="slack",y=ar("nav.sidebar",!1),g=S||y,b=g?r:n,w=g,E=w?$T:0,k=b+E,C=k+rm,R=yh(),O=e.hooks.useCommands(),N=e.hooks.useSearch?.()??null,A=e.hooks.useNavCenter?.()??null,j=e.hooks.useNavActions?.()??null,_=e.hooks.useLayoutMode?.()??e.mode,Z=_==="focus"?"panel":_,P=e.hooks.useActiveToolHint?.()??null,z=e.hooks.useTakeover?.()??null,D=z?.active===!0,I=D&&z?.dismissible===!0,W=z?.onDismiss,T=e.slots.Takeover,B=_h();__(B,c);const U=h_(),[q,he]=p.useState(!1),[ee,K]=xt(`appshell.${e.id}.left`,!1),[ae,Q]=xt(`appshell.${e.id}.right`,!1),[J,fe]=xt(`appshell.${e.id}.rightOverlay`,!1),[$,ie]=xt(`appshell.${e.id}.leftW`,260),[te,ye]=xt(`appshell.${e.id}.rightW`,280),[pe,Y]=xt("openscout.ops.minimap.collapsed",!1),[se,we]=xt(`appshell.${e.id}.terminalFocus`,!1),[Ee,Ce]=p.useState(()=>typeof window<"u"?window.innerWidth:1280),[H,be]=p.useState(()=>iu(typeof window<"u"?window.innerWidth:1280)),X=i.view==="search"||x.pathname==="/search",le=S?rT:sT,F=kT(e.id,Ee,le),ge=g&&i.view==="terminal"&&se,[Ne,Re]=p.useState(null),[Qe,nt]=p.useState(!1),tt=p.useRef(null),rt=p.useRef(null),Ct=Ne!=null,Se=Ne!=null?sm(Ne,{min:di,max:fi,startedCollapsed:Qe}):null,[ze,qe]=p.useState(null),Pe=p.useRef(null);p.useEffect(()=>{const L=()=>{Ce(window.innerWidth),be(iu(window.innerWidth))};return L(),window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[]);const{active:De,brandLabel:ut}=hh({route:i});p.useEffect(()=>(document.documentElement.style.setProperty("--scout-rail-collapsed-width",`${lt}px`),g?(document.documentElement.setAttribute("data-scout-sidebar-chrome",""),document.documentElement.style.setProperty("--scout-nav-rail-width",`${F.width}px`),F.isSidebarResizing?document.documentElement.setAttribute("data-scout-sidebar-resizing",""):document.documentElement.removeAttribute("data-scout-sidebar-resizing")):(document.documentElement.removeAttribute("data-scout-sidebar-chrome"),document.documentElement.removeAttribute("data-scout-sidebar-resizing"),document.documentElement.style.removeProperty("--scout-nav-rail-width")),()=>{document.documentElement.removeAttribute("data-scout-sidebar-chrome"),document.documentElement.removeAttribute("data-scout-sidebar-resizing"),document.documentElement.style.removeProperty("--scout-nav-rail-width")}),[g,F.width,F.isSidebarResizing]),p.useEffect(()=>{ie(g?L=>Oa(L):L=>Math.min(H,Math.max(Do,L))),ye(L=>Math.min(H,Math.max(Do,L)))},[g,H,ie,ye]),p.useEffect(()=>{!X||ae||J||ye(L=>Math.max(L,Math.min(H,jT)))},[X,ae,J,ye,H]);const Pt=i.view==="agents-v2"&&!i.agentId&&!i.sessionId&&!!i.selectedAgentId||i.view==="agents-v2"&&!!i.agentId;p.useEffect(()=>{!Pt||ae||J||ye(L=>Math.max(L,Math.min(H,zT)))},[Pt,ae,J,ye,H]);const Ke=i.view==="broker"&&!!i.attemptId;p.useEffect(()=>{Ke&&(Q(!1),ye(L=>Math.max(L,Math.min(H,DT))))},[Ke,Q,ye,H]);const[sn,xr]=p.useState({x:0,y:0}),[co,Fs]=p.useState(1),Zs=p.useCallback(L=>{xr(V=>({x:V.x+L.x,y:V.y+L.y}))},[]),Bs=p.useCallback(L=>{Fs(L)},[]),[Ht,Lt]=p.useState(!1),[lo,Ws]=p.useState(!1),[Vs,An]=xt(`appshell.${e.id}.termH`,320),uo=!!e.slots.Terminal,Gn=p.useMemo(()=>{const L=[];return uo&&L.push("terminal"),t&&L.push("assistant"),L},[uo,t]),fo=Gn[0]??"terminal",[po,wr]=xt(`appshell.${e.id}.drawerTab`,fo),Er=Gn.includes(po)?po:fo,[um,mo]=p.useState(!1),[dm,qn]=p.useState(!1),[fm,pm]=p.useState(new Set),Us=p.useRef(!1),Kn=p.useRef(null),ln=p.useCallback(()=>{Us.current=!1,Kn.current!==null&&(window.clearTimeout(Kn.current),Kn.current=null)},[]),Xi=p.useCallback(()=>{Us.current=!0,Kn.current!==null&&window.clearTimeout(Kn.current),Kn.current=window.setTimeout(ln,LT)},[ln]);p.useEffect(()=>ln,[ln]);const mm=p.useCallback(L=>{pm(V=>{const Oe=new Set(V);return Oe.has(L)?Oe.delete(L):Oe.add(L),Oe})},[]),Qi=p.useCallback(L=>V=>{V.preventDefault();const Oe=V.clientX,Rt=L==="left"?$:te,ft=L==="left"?ie:ye,Je=L==="left"?1:-1,un=_t=>{const it=(_t.clientX-Oe)*Je;ft(Math.max(Do,Math.min(H,Rt+it)))},$t=()=>{document.removeEventListener("mousemove",un),document.removeEventListener("mouseup",Ft),window.removeEventListener("blur",$t)},Ft=()=>$t();document.addEventListener("mousemove",un),document.addEventListener("mouseup",Ft),window.addEventListener("blur",$t)},[$,te,ie,ye,H]),[ho,hm]=p.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);p.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const L=window.matchMedia("(prefers-reduced-motion: reduce)"),V=()=>hm(L.matches);return V(),L.addEventListener?.("change",V),()=>L.removeEventListener?.("change",V)},[]);const go=p.useCallback(L=>{ho||(qe(L),Pe.current!==null&&window.clearTimeout(Pe.current),Pe.current=window.setTimeout(()=>{qe(null),Pe.current=null},150))},[ho]);p.useEffect(()=>()=>{Pe.current!==null&&window.clearTimeout(Pe.current)},[]);const gm=p.useCallback(L=>{L.preventDefault(),L.stopPropagation();const V=F.effectiveCollapsed,Oe=L.clientX,Rt=V?le:F.expandedWidth;rt.current=Rt,F.beginResize(Rt,V);const ft=()=>{document.removeEventListener("pointermove",Je),document.removeEventListener("pointerup",un),document.removeEventListener("pointercancel",$t),window.removeEventListener("blur",$t)},Je=Ft=>{const _t=Rt+(Ft.clientX-Oe);rt.current=_t,F.updateResize(_t)},un=()=>{const Ft=rt.current??Rt,_t=F.commitDrag(Ft,V),it=_t.kind==="collapse"?le:_t.kind==="expand"?F.expandedWidth:_t.kind==="resize"?_t.width:null;it!=null&&go(it),ft()},$t=()=>{F.clearDrag(),ft()};document.addEventListener("pointermove",Je),document.addEventListener("pointerup",un),document.addEventListener("pointercancel",$t),window.addEventListener("blur",$t)},[F,le,go]),bm=p.useCallback((L,V)=>Oe=>{Oe.preventDefault(),Oe.stopPropagation();const Rt=Oe.clientX,ft=V?lt:Oa($);tt.current=ft,Re(ft),nt(V);const Je=()=>{document.removeEventListener("pointermove",un),document.removeEventListener("pointerup",$t),document.removeEventListener("pointercancel",Ft),window.removeEventListener("blur",Ft)},un=_t=>{const it=ft+(_t.clientX-Rt);tt.current=it,Re(it)},$t=()=>{const _t=tt.current??ft,it=am({startedCollapsed:V,rawWidth:_t},{min:di,max:fi});it.kind==="collapse"?K(!0):it.kind==="expand"?K(!1):it.kind==="resize"&&ie(it.width),Re(null),tt.current=null;const dc=it.kind==="collapse"?L+lt:it.kind==="expand"?L+Oa($):it.kind==="resize"?L+it.width:null;dc!=null&&go(dc),Je()},Ft=()=>{Re(null),tt.current=null,Je()};document.addEventListener("pointermove",un),document.addEventListener("pointerup",$t),document.addEventListener("pointercancel",Ft),window.addEventListener("blur",Ft)},[$,K,ie,go]),ec=i.view==="agents-v2",tc=OT(i,{hasBrokerAttempt:!!h,hasKnowledgeHit:!!m}),bo=i.view==="ops"&&i.mode==="lanes",[vo,Hs]=p.useState(!1),vm=R.state.conversation,Sr=_T(i,vm);p.useEffect(()=>{bo||Hs(!1)},[bo]),p.useEffect(()=>{Sr||Hs(!1)},[Sr]);const kr=TT({empty:Sr,forceOpen:vo,baseCollapsed:ae||De}),Gs=!ge&&!De&&tc,qs=Gn.length>0,Cr=!De&&tc,yo=Gs&&!kr,Gt=p.useCallback(()=>{const L=NT({available:Cr,terminalFocusActive:ge,lanesContextRoute:bo,lanesContextEmpty:Sr,lanesContextForceOpen:vo,rightCollapsed:ae});L&&(L.terminalFocusActive!==ge&&we(L.terminalFocusActive),L.lanesContextForceOpen!==vo&&Hs(L.lanesContextForceOpen),L.rightCollapsed!==ae&&Q(L.rightCollapsed))},[Sr,vo,bo,ae,Cr,Q,we,ge]),nc=p.useMemo(()=>{const V=[{id:"nav:back",label:"Back",shortcut:"Cmd+[",action:f},{id:"shell:toggle-sidebar-b",label:"Toggle Sidebar",shortcut:"Cmd+B",action:()=>{g?F.toggleCollapsed():K(Oe=>!Oe)}},{id:"shell:toggle-right",label:"Toggle Right Panel",shortcut:"Cmd+]",action:Gt},{id:"shell:toggle-right-overlay",label:"Toggle Inspector Overlay",shortcut:"Cmd+Shift+]",action:()=>fe(Oe=>!Oe)},{id:"shell:new-session",label:$r,shortcut:Lo,action:()=>l()},{id:"shell:toggle-terminal",label:"Toggle Terminal",shortcut:"Ctrl+`",action:()=>Lt(Oe=>!Oe)},...g&&i.view==="terminal"?[{id:"shell:terminal-focus",label:se?"Exit Terminal Focus":"Focus Terminal",shortcut:"Cmd+Shift+B",action:()=>we(Oe=>!Oe)}]:[],{id:"shell:feature-flags",label:"Feature Flags",shortcut:Jo()?"Cmd+Shift+F":void 0,action:()=>qn(!0)}];return t&&V.push({id:"shell:toggle-assistant",label:"Toggle Assistant",shortcut:"Cmd+J",action:()=>{wr("assistant"),Lt(Oe=>!Oe||po!=="assistant")}}),V},[t,po,l,f,i,wr,K,fe,qn,we,g,F,se,Gt]),ym=p.useMemo(()=>[...O,...nc],[O,nc]);p.useEffect(()=>{const L=V=>{if(ch(V)&&!D&&!a.open&&!lh()&&g&&i.view==="terminal"){V.preventDefault(),V.stopPropagation(),we(Je=>!Je);return}if(uh(V.target)||D||a.open)return;const Oe=V.key.toLowerCase(),Rt=V.metaKey||V.ctrlKey||V.altKey,ft=gu(V.target);if(Us.current)if(V.key==="Escape"||Rt||ft)ln();else{const Je=g_(Oe);if(Je){V.preventDefault(),V.stopPropagation(),ln(),d(Je.route);return}else ln()}if(!Rt&&!V.shiftKey&&Oe==="g"&&!ft){V.preventDefault(),V.stopPropagation(),Xi();return}if((V.metaKey||V.ctrlKey)&&V.key==="k"&&(V.preventDefault(),mo(!0)),Th(V)&&(V.preventDefault(),l()),(V.metaKey||V.ctrlKey)&&V.key==="["&&(V.preventDefault(),f()),(V.metaKey||V.ctrlKey)&&V.key.toLowerCase()==="b"){if(ft)return;V.preventDefault(),g?F.toggleCollapsed():K(Je=>!Je)}(V.metaKey||V.ctrlKey)&&V.key==="]"&&(V.preventDefault(),V.shiftKey?fe(Je=>!Je):Gt()),V.ctrlKey&&V.key==="`"&&(V.preventDefault(),Lt(Je=>!Je)),t&&(V.metaKey||V.ctrlKey)&&V.key==="j"&&(V.preventDefault(),wr("assistant"),Lt(Je=>!(Je&&Er==="assistant"))),Jo()&&(V.metaKey||V.ctrlKey)&&V.shiftKey&&!V.altKey&&V.code==="KeyF"&&(V.preventDefault(),V.stopPropagation(),qn(!0))};return window.addEventListener("keydown",L,!0),()=>window.removeEventListener("keydown",L,!0)},[t,ln,a.open,f,d,l,Er,i,wr,K,Q,fe,qn,we,g,F,Xi,D,Gt]),p.useEffect(()=>{const L=V=>{const Oe=V.detail,Rt=typeof Oe?.width=="number"?Oe.width:420;Q(!1),ye(ft=>Math.max(ft,Math.min(H,Math.max(Do,Rt))))};return window.addEventListener("scout:set-inspector-width",L),()=>window.removeEventListener("scout:set-inspector-width",L)},[Q,ye,H]);const Ks=e.slots.Inspector,rc=e.slots.RightPanel,xm=e.tools&&e.tools.length>0,wm=u.jsxs(u.Fragment,{children:[Ks&&u.jsx(Ks,{}),!Ks&&rc&&u.jsx(rc,{}),xm&&u.jsx("div",{className:"border-t border-neutral-700/50",children:e.tools.map(L=>{const V=fm.has(L.id);return u.jsxs("div",{children:[u.jsxs("button",{onClick:()=>mm(L.id),className:`w-full flex items-center gap-2 px-4 py-2.5 text-sm font-mono tracking-wider uppercase transition-colors hover:bg-white/5 ${P===L.id?"text-emerald-400":"text-neutral-300"}`,children:[V?u.jsx(Vh,{size:10}):u.jsx(Uh,{size:10}),u.jsx("span",{className:"text-neutral-400",children:L.icon}),u.jsx("span",{className:"font-bold",children:L.name})]}),V&&u.jsx("div",{className:"px-4 pb-3",children:u.jsx(L.Component,{})})]},L.id)})})]}),Em=u.jsx(e_,{onOpenCommandPalette:()=>mo(!0)}),oc=p.useMemo(()=>({isCollapsed:pe,onToggleCollapse:()=>Y(L=>!L)}),[pe,Y]),Sm=U?u.jsx("div",{className:`scout-canvas-minimap-shell${pe?" scout-canvas-minimap-shell--collapsed":""}`,children:U.render(oc)}):null,km=U?u.jsx("div",{className:`scout-canvas-minimap-shell scout-canvas-minimap-shell--floating${pe?" scout-canvas-minimap-shell--collapsed":""}`,children:U.render(oc)}):null,sc=p.useRef(null),ac=p.useRef(null);p.useEffect(()=>{const L=sc.current;L&&(D?L.setAttribute("inert",""):L.removeAttribute("inert"))},[D]),p.useEffect(()=>{if(!D)return;const L=ac.current;if(L&&(L.querySelector("button, [href], input, select, textarea, [tabindex]:not([tabindex='-1'])")??L).focus(),!I)return;const V=Oe=>{Oe.key==="Escape"&&(Oe.preventDefault(),W?.())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[D,I,W]);const xo=De&&!g,Cm=De,Rr=!ge&&g&&bT(i,De),Js=Rr?ee?lt:$:0,ic=Rr&&F.effectiveCollapsed&ⅇp.useEffect(()=>(ic?document.documentElement.setAttribute("data-scout-double-rail",""):document.documentElement.removeAttribute("data-scout-double-rail"),()=>document.documentElement.removeAttribute("data-scout-double-rail")),[ic]);const _r=ge?0:g?F.width+Js:ee||xo?0:$,wo=ge||!Gs||J||Ke||Cm?0:kr?g?lt:0:te,Rm=Ee-_r-wo,cc=_==="panel"&&Rm<Na&&(_r>0||wo>0),Ys=cc&&wo>0,Xs=cc&&(g?Js>0&&Ee-F.width-Js<Na:_r>0&&Ee-_r<Na),Eo=Ke||J||Ys,Qs=Xs?g?F.width:0:_r,ea=Eo?0:wo,_m=_==="panel"?{position:"absolute",top:k,bottom:28,left:Qs,right:ea,overflow:"auto"}:{},lc=g?{top:k}:{},Tm=g?{top:k}:{},Im={display:"contents","--scout-shell-left-inset":`${_==="panel"?Qs:0}px`,"--scout-shell-right-inset":`${_==="panel"?ea:0}px`,...g?{"--scout-nav-rail-width":`${F.width}px`}:{}},uc=J?"Pin inspector (push content)":Ys?"Keep inspector floating when there is room":"Float inspector (overlay content)",ta=p.useCallback((L,V=!1)=>({backgroundColor:"rgba(13, 14, 16, 0.72)",backdropFilter:"blur(24px) saturate(140%)",WebkitBackdropFilter:"blur(24px) saturate(140%)",boxShadow:L==="left"?"18px 0 48px -12px rgba(0,0,0,0.7), inset -1px 0 0 0 rgba(255,255,255,0.06)":"-18px 0 48px -12px rgba(0,0,0,0.7), inset 1px 0 0 0 rgba(255,255,255,0.06)",...V?{right:12,bottom:40,borderWidth:1,borderStyle:"solid",borderColor:"rgba(255,255,255,0.09)",borderRadius:12,boxShadow:"-24px 18px 72px -18px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.025)"}:{}}),[]);return u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:sc,"aria-hidden":D?!0:void 0,style:Im,children:u.jsx(GR,{mode:Z,panOffset:sn,scale:co,onPan:Zs,onZoom:Bs,hud:u.jsxs(u.Fragment,{children:[g?null:u.jsx(FT,{title:De?ut:e.name,search:De?void 0:N??void 0,center:A,actions:j}),g?ge?null:u.jsxs(u.Fragment,{children:[u.jsx(V1,{open:!F.effectiveCollapsed,onOpenChange:L=>F.setCollapsed(!L),style:{"--sidebar-width":`${F.expandedWidth}px`,"--sidebar-width-icon":`${le}px`,"--scout-sidebar-top":"0px"},"data-sidebar-resizing":F.isSidebarResizing?"":void 0,children:u.jsx(eT,{brandLabel:e.name,presentation:S?"slack":"scout"})}),u.jsx(qo,{side:"left",collapsed:F.effectiveCollapsed,label:"Sidebar",onToggle:F.toggleCollapsed,onMouseDown:L=>L.stopPropagation(),className:"scout-rail-toggle--band",style:{position:"fixed",left:Ko(F.width,F.effectiveCollapsed,le),top:C,zIndex:46}}),u.jsx("div",{"data-scout-sidebar-resize-handle":"",role:"separator","aria-orientation":"vertical","aria-label":F.effectiveCollapsed?"Expand sidebar (drag out)":"Resize or collapse sidebar",title:F.effectiveCollapsed?"Drag out to expand · double-click to expand":"Drag to resize · drag in to collapse · double-click to reset",onPointerDown:gm,onDoubleClick:L=>{L.preventDefault(),F.effectiveCollapsed?(F.setExpandedWidth(no),F.setCollapsed(!1)):F.resetExpandedWidth()},onMouseDown:L=>{L.stopPropagation()},style:{position:"fixed",left:Math.max(0,F.width-3),top:k+ii,bottom:28,width:6,zIndex:50,cursor:"ew-resize",pointerEvents:"auto",touchAction:"none"}}),!ho&&F.isSidebarResizing&&F.dragGhostWidth!=null?u.jsx("div",{"data-scout-sidebar-resize-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost",style:{position:"fixed",left:F.dragGhostWidth,top:k,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null,Rr?u.jsx(vT,{presentation:S?"slack":"scout",navRailWidth:F.width,isCollapsed:ee,onToggleCollapse:()=>K(!ee),width:$,style:{...Tm,...Xs?ta("left"):{}}}):null,Rr?u.jsx("div",{"data-scout-sidebar-resize-handle":"","data-scout-side-rail-resize-handle":"",role:"separator","aria-orientation":"vertical","aria-label":ee?"Expand context rail (drag out)":"Resize or collapse context rail",title:ee?"Drag out to expand · double-click to expand":"Drag to resize · drag in to collapse · double-click to reset",onPointerDown:bm(F.width,ee),onDoubleClick:L=>{L.preventDefault(),ee?(ie(ui),K(!1)):ie(ui)},onMouseDown:L=>{L.stopPropagation()},style:{position:"fixed",left:Math.max(0,F.width+(ee?lt:$)-3),top:k+ii,bottom:28,width:6,zIndex:50,cursor:"ew-resize",pointerEvents:"auto",touchAction:"none"}}):null,!ho&&Rr&&Ct&&Se!=null?u.jsx("div",{"data-scout-side-rail-resize-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost",style:{position:"fixed",left:F.width+Se,top:k,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null,ze!=null?u.jsx("div",{"data-scout-rail-settle-ghost":"","aria-hidden":"true",className:"scout-sidebar-resize-ghost scout-sidebar-resize-ghost--settle",style:{position:"fixed",left:ze,top:k,bottom:28,width:2,transform:"translateX(-50%)",zIndex:55,pointerEvents:"none"}}):null]}):u.jsxs(u.Fragment,{children:[u.jsx(oi,{side:"left",title:ec?"Browse":i.view==="agent-info"?"Projects":e.leftPanel?.title??"Navigation",icon:e.leftPanel?.icon,isCollapsed:ee||xo,onToggleCollapse:()=>K(!ee),width:$,onResizeStart:Qi("left"),style:Xs?ta("left"):void 0,footer:!ee&&!xo?Sm:void 0,headerActions:e.leftPanel?.headerActions&&u.jsx(e.leftPanel.headerActions,{}),children:u.jsx("div",{"data-pane":"left",style:{display:"contents"},children:e.slots.LeftPanel&&u.jsx(e.slots.LeftPanel,{})})}),ee||xo?km:null]}),w?u.jsx("div",{"data-scout-top-row-frame":"",className:"scout-top-row-frame",style:{position:"fixed",top:b,left:ge?0:F.width,right:0,height:E,zIndex:30,...o?.style??{}},...Object.fromEntries(Object.entries(o??{}).filter(([L])=>L!=="style")),children:u.jsx(wT,{variant:"top-row",presentation:S?"slack":"scout",onOpenSearch:()=>mo(!0),rightUtility:u.jsxs(u.Fragment,{children:[u.jsx(ST,{presentation:S?"slack":"scout"}),i.view==="terminal"?u.jsxs(u.Fragment,{children:[u.jsx("div",{id:"scout-terminal-header-slot","data-scout-terminal-header-slot":""}),u.jsx("button",{type:"button","data-scout-terminal-focus-toggle":"","aria-label":ge?"Exit terminal focus":"Focus terminal","aria-pressed":ge,"aria-keyshortcuts":"Meta+Shift+B Control+Shift+B",title:ge?"Exit focus (⌘⇧B)":"Focus terminal (⌘⇧B)",className:`scout-terminal-focus-toggle${ge?" scout-terminal-focus-toggle--active":""}`,onClick:()=>we(L=>!L),children:ge?u.jsx(yu,{size:13,strokeWidth:1.8,"aria-hidden":"true"}):u.jsx(xu,{size:13,strokeWidth:1.8,"aria-hidden":"true"})})]}):null,u.jsxs("span",{className:"scout-top-row-panel-toggles",role:"group","aria-label":"Layout panels",children:[u.jsx("button",{type:"button","data-scout-bottom-panel-toggle":"","aria-label":qs?Ht?"Hide bottom panel":"Show bottom panel":"Bottom panel unavailable","aria-pressed":Ht,"aria-keyshortcuts":"Control+`",title:qs?Ht?"Hide bottom panel (⌃`)":"Show bottom panel (⌃`)":"No bottom panel is available in this app",className:`scout-top-row-panel-toggle${Ht?" scout-top-row-panel-toggle--active":""}`,disabled:!qs,onClick:()=>Lt(L=>!L),children:u.jsx(ag,{size:14,strokeWidth:1.8,"aria-hidden":"true"})}),u.jsx("button",{type:"button","data-scout-right-panel-toggle":"","aria-label":Cr?yo?"Hide right panel":"Show right panel":"Right panel unavailable for this view","aria-pressed":yo,"aria-keyshortcuts":"Meta+] Control+]",title:Cr?yo?"Hide right panel (⌘])":"Show right panel (⌘])":"No right panel is available for this view",className:`scout-top-row-panel-toggle${yo?" scout-top-row-panel-toggle--active":""}`,disabled:!Cr,onClick:Gt,children:u.jsx(gg,{size:14,strokeWidth:1.8,"aria-hidden":"true"})})]})]}),onInteractiveMouseDown:s})}):null,Gs&&(()=>{const L=Ke?"Dispatch detail":ec?"Detail":e.rightPanel?.title??"Inspector";return g&&kr?u.jsxs(u.Fragment,{children:[u.jsx(lm,{side:"right",title:L,onToggle:Gt,edgeOffset:0,top:k,style:lc,body:u.jsx(CT,{route:i,onExpand:Gt})}),u.jsx(qo,{side:"right",collapsed:!0,label:L,onToggle:Gt,onMouseDown:V=>V.stopPropagation(),className:"scout-rail-toggle--band",style:{position:"fixed",right:Ko(lt,!0),top:C,zIndex:45}})]}):u.jsxs(u.Fragment,{children:[u.jsx(oi,{side:"right",title:L,icon:e.rightPanel?.icon,isCollapsed:g?!1:kr,onToggleCollapse:g?void 0:Gt,width:te,onResizeStart:Qi("right"),floating:Eo,style:{...lc,...Eo?ta("right",Ke):{}},footer:Em,headerActions:u.jsxs(u.Fragment,{children:[!Ke&&u.jsx("button",{type:"button",onClick:()=>fe(V=>Ys&&!V?!0:!V),title:uc,"aria-label":uc,className:"p-1 hover:bg-accent/10 rounded transition-colors text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",children:Eo?u.jsx(vg,{size:12}):u.jsx(xg,{size:12})}),e.rightPanel?.headerActions&&u.jsx(e.rightPanel.headerActions,{})]}),children:u.jsx("div",{"data-pane":"right",style:{display:"contents"},children:wm})}),g&&!kr?u.jsx(qo,{side:"right",collapsed:!1,label:L,onToggle:Gt,onMouseDown:V=>V.stopPropagation(),className:"scout-rail-toggle--band",style:{position:"fixed",right:Ko(te,!1),top:C,zIndex:45}}):null]})})(),u.jsx(XR,{status:B.status,left:u.jsx(ZT,{statusBar:B,dictationActive:R.state.activity==="listening"}),right:u.jsx(BT,{statusBar:B,onOpenFlagPanel:()=>qn(!0),onOpenActivityLog:()=>he(!0)}),onToggleTerminal:()=>Lt(L=>!L),isTerminalOpen:Ht}),u.jsx(k_,{open:q,onClose:()=>he(!1)}),u.jsx("div",{className:"pointer-events-none",style:{position:"fixed",left:Qs,right:ea,bottom:0,top:0,zIndex:45,transform:"translateZ(0)"},children:u.jsxs(l_,{isOpen:Ht,onClose:()=>Lt(!1),onToggleMaximize:()=>Ws(L=>!L),isMaximized:lo,height:Math.min(Vs,window.innerHeight*.8),onHeightChange:L=>An(Math.min(L,window.innerHeight*.8)),title:u.jsx(VT,{tabs:Gn,active:Er,onSelect:wr}),children:[Ht&&Er==="terminal"&&(e.slots.Terminal?u.jsx(e.slots.Terminal,{}):u.jsx("div",{className:"p-4 font-mono text-md text-neutral-400",children:"No terminal content"})),Ht&&Er==="assistant"&&u.jsx(cE,{app:e,commands:O})]})}),u.jsx(f_,{isOpen:um,onClose:()=>mo(!1),commands:ym})]}),children:u.jsx("div",{style:_m,className:"frame-scrollbar","data-pane":"center",children:u.jsx(e.slots.Content,{})})})}),D&&T?u.jsxs("div",{ref:ac,tabIndex:-1,role:"dialog","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:80,outline:"none"},children:[u.jsx("div",{"data-scout-takeover-drag-region":"","aria-hidden":"true",style:{position:"absolute",top:0,left:0,right:0,height:Math.max(28,r||28),zIndex:1,...o?.style??{}},...Object.fromEntries(Object.entries(o??{}).filter(([L])=>L!=="style"))}),u.jsx(T,{})]}):null,u.jsx(v_,{open:a.open,onClose:()=>a.setOpen(!1)}),u.jsx(r_,{isOpen:dm,onClose:()=>qn(!1),audienceOptions:fu}),u.jsx(E_,{})]})}function VT({tabs:e,active:t,onSelect:n}){return e.length===0?null:u.jsx("div",{className:"flex items-center gap-0.5",children:e.map(r=>{const o=r===t,s=r==="terminal"?vu:pu,a=r==="terminal"?"TERMINAL":"ASSISTANT",i=r==="terminal"?"text-emerald-400":"text-cyan-400";return u.jsxs("button",{type:"button",onClick:()=>n(r),className:`flex items-center gap-1.5 px-2.5 py-1 rounded text-xs font-bold tracking-widest font-mono transition-colors ${o?`${i} bg-white/[0.04]`:"text-neutral-500 hover:text-neutral-300"}`,children:[u.jsx(s,{size:13}),u.jsx("span",{children:a})]},r)})})}export{AP as OpenScoutAppShell};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as p,j as r}from"./index-C1VaWNuD.js";/* empty css */import{i as J,n as Z,s as ee}from"./colors-BtO5_zlx.js";import{a as A}from"./api-Co9aQ2Jw.js";import{u as te}from"./sse-B29iGBnw.js";import{t as re}from"./time-Dhsh_2EG.js";import{D as ne}from"./DataTable-C6aMSilS.js";import{u as ae}from"./useAgentHoverCard-BgTLNcF-.js";import{S as se}from"./search-FB2vVxCp.js";import{S as oe}from"./sliders-horizontal-57e99_qO.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";/* empty css */import"./index-Cx6Gbr6n.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./openContent-C6XO6kr5.js";import"./eye-C9cGk5z6.js";import"./terminal-UDy4lzV1.js";function ie(e,t){return{model:t?.data.metadata?.session?.model??e.model??null,provider:t?.data.metadata?.session?.modelProvider??e.providerName??null}}const ce=["openai","codex","codex_app_server"],ue=["anthropic","claude","claude-code","claude_stream_json"],W={"openai:gpt-5.5":{provider:"openai",model:"gpt-5.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:30,webSearchPer1K:10},"openai:gpt-5.5-pro":{provider:"openai",model:"gpt-5.5-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.4":{provider:"openai",model:"gpt-5.4",inputPerM:2.5,cachedInputPerM:.25,cacheWritePerM:null,outputPerM:15,webSearchPer1K:10},"openai:gpt-5.4-mini":{provider:"openai",model:"gpt-5.4-mini",inputPerM:.75,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:4.5,webSearchPer1K:10},"openai:gpt-5.4-nano":{provider:"openai",model:"gpt-5.4-nano",inputPerM:.2,cachedInputPerM:.02,cacheWritePerM:null,outputPerM:1.25,webSearchPer1K:10},"openai:gpt-5.4-pro":{provider:"openai",model:"gpt-5.4-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.3-codex":{provider:"openai",model:"gpt-5.3-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.3-chat-latest":{provider:"openai",model:"gpt-5.3-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2":{provider:"openai",model:"gpt-5.2",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-codex":{provider:"openai",model:"gpt-5.2-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-chat-latest":{provider:"openai",model:"gpt-5.2-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-pro":{provider:"openai",model:"gpt-5.2-pro",inputPerM:21,cachedInputPerM:null,cacheWritePerM:null,outputPerM:168,webSearchPer1K:10},"openai:gpt-5.1":{provider:"openai",model:"gpt-5.1",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex":{provider:"openai",model:"gpt-5.1-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex-max":{provider:"openai",model:"gpt-5.1-codex-max",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-chat-latest":{provider:"openai",model:"gpt-5.1-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5":{provider:"openai",model:"gpt-5",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-codex":{provider:"openai",model:"gpt-5-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-chat-latest":{provider:"openai",model:"gpt-5-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-mini":{provider:"openai",model:"gpt-5-mini",inputPerM:.25,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:2,webSearchPer1K:10},"openai:gpt-5-nano":{provider:"openai",model:"gpt-5-nano",inputPerM:.05,cachedInputPerM:.005,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-5-pro":{provider:"openai",model:"gpt-5-pro",inputPerM:15,cachedInputPerM:null,cacheWritePerM:null,outputPerM:120,webSearchPer1K:10},"openai:gpt-4.1":{provider:"openai",model:"gpt-4.1",inputPerM:2,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:8,webSearchPer1K:10},"openai:gpt-4.1-mini":{provider:"openai",model:"gpt-4.1-mini",inputPerM:.4,cachedInputPerM:.1,cacheWritePerM:null,outputPerM:1.6,webSearchPer1K:10},"openai:gpt-4.1-nano":{provider:"openai",model:"gpt-4.1-nano",inputPerM:.1,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-4o":{provider:"openai",model:"gpt-4o",inputPerM:2.5,cachedInputPerM:1.25,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-4o-mini":{provider:"openai",model:"gpt-4o-mini",inputPerM:.15,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:.6,webSearchPer1K:10},"anthropic:claude-opus-4.6":{provider:"anthropic",model:"claude-opus-4.6",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.5":{provider:"anthropic",model:"claude-opus-4.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.1":{provider:"anthropic",model:"claude-opus-4.1",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-opus-4":{provider:"anthropic",model:"claude-opus-4",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-sonnet-4.6":{provider:"anthropic",model:"claude-sonnet-4.6",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4.5":{provider:"anthropic",model:"claude-sonnet-4.5",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4":{provider:"anthropic",model:"claude-sonnet-4",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-3-7-sonnet":{provider:"anthropic",model:"claude-3-7-sonnet",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-haiku-4.5":{provider:"anthropic",model:"claude-haiku-4.5",inputPerM:1,cachedInputPerM:.1,cacheWritePerM:1.25,outputPerM:5,webSearchPer1K:10}},le={"claude-sonnet-4-5":"anthropic:claude-sonnet-4.5","claude-sonnet-4-6":"anthropic:claude-sonnet-4.6","claude-opus-4-5":"anthropic:claude-opus-4.5","claude-opus-4-6":"anthropic:claude-opus-4.6","claude-haiku-4-5":"anthropic:claude-haiku-4.5"};function pe(e){const t=e.provider?.trim().toLowerCase()??"",s=e.adapterType?.trim().toLowerCase()??"",a=V(e.model)??"",i=[t,s].filter(Boolean);return i.some(o=>ce.some(c=>o.includes(c)))?"openai":i.some(o=>ue.some(c=>o.includes(c)))?"anthropic":a.startsWith("gpt-")||a.startsWith("o")||a.includes("codex")?"openai":a.startsWith("claude-")?"anthropic":"unknown"}function V(e){return e?e.trim().toLowerCase().replace(/^(openai|anthropic)\//,"").replace(/_/g,"-").replace(/-\d{8}$/,""):null}function de(e){const t=x(e?.inputTokens),s=x(e?.cacheReadInputTokens),a=x(e?.cacheCreationInputTokens),i=x(e?.outputTokens),o=x(e?.reasoningOutputTokens),c=[t,i].reduce((m,b)=>m+(b??0),0),h=x(e?.totalTokens)??(c||null);return{input:t,uncachedInput:t==null?null:Math.max(0,t-(s??0)-(a??0)),cachedInput:s,cacheWrite:a,output:i,reasoningOutput:o,total:h,webSearchRequests:x(e?.webSearchRequests),webFetchRequests:x(e?.webFetchRequests)}}function he(e){const t=pe(e),s=V(e.model),a=de(e.usage),i=me(t,s),o=ge(e);if(!i.rateCard)return{provider:t,model:s,rateCard:null,rateCardSource:"unknown",capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:[],totalUsd:null,billedTotalUsd:null,billingMode:o,subscriptionWindows:e.subscriptionWindows??[]};const c=i.rateCard,h=a.uncachedInput??a.input??0,m=a.cachedInput??0,b=a.cacheWrite??0,g=a.output??0,v=a.webSearchRequests??0,f=[j("input","Input",h,c.inputPerM,o),j("cached_input","Cached input",m,c.cachedInputPerM??c.inputPerM,o),j("cache_write","Cache write",b,c.cacheWritePerM??c.inputPerM,o),j("output","Output",g,c.outputPerM,o),{key:"web_search",label:"Web search",quantity:v,unit:"requests",rate:c.webSearchPer1K??0,billedRate:o==="subscription"?0:c.webSearchPer1K??0,costUsd:v/1e3*(c.webSearchPer1K??0),billedCostUsd:o==="subscription"?0:v/1e3*(c.webSearchPer1K??0)}].filter(P=>P.quantity>0);return{provider:t,model:s,rateCard:c,rateCardSource:i.source,capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:f,totalUsd:f.reduce((P,d)=>P+d.costUsd,0),billedTotalUsd:f.reduce((P,d)=>P+d.billedCostUsd,0),billingMode:o,subscriptionWindows:e.subscriptionWindows??[]}}function me(e,t){if(e==="unknown")return{rateCard:null,source:"unknown"};const s=t?`${e}:${t}`:null;if(s&&W[s])return{rateCard:W[s],source:"exact"};const a=t?le[t]:null;if(a&&W[a])return{rateCard:W[a],source:"alias"};if(e==="anthropic"){if(t?.includes("opus"))return{rateCard:W["anthropic:claude-opus-4.5"],source:"provider-default"};if(t?.includes("haiku"))return{rateCard:W["anthropic:claude-haiku-4.5"],source:"provider-default"};if(t?.includes("sonnet")||!t)return{rateCard:W["anthropic:claude-sonnet-4.5"],source:"provider-default"}}return{rateCard:null,source:"unknown"}}function j(e,t,s,a,i){const o=i==="subscription"?0:a;return{key:e,label:t,quantity:s,unit:"tokens",rate:a,billedRate:o,costUsd:s/1e6*a,billedCostUsd:s/1e6*o}}function x(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function ge(e){if(e.billingMode)return e.billingMode;const t=e.adapterType?.trim().toLowerCase();if(t==="claude-code"||t==="claude_stream_json")return"subscription";const s=e.usage?.planType?.trim().toLowerCase();return!s||s==="api"||s.includes("api")?"api":"subscription"}const Pe=1500,T=1440*6e4,Me=90*6e4,E={needs_attention:0,in_turn:1,in_flight:2,callable:3,blocked:4},be=[{key:"agent",label:"Agent",kind:"custom",sortable:!0,sortValue:e=>e.agent.name.toLowerCase(),defaultWidth:220,minWidth:160,render:e=>r.jsxs("div",{className:"s-ops-agents-agent-cell",children:[r.jsx("span",{className:"s-ops-agents-dot",style:{background:ee(e.state)},"aria-hidden":!0}),r.jsx("span",{className:"s-ops-agents-agent-name",title:e.agent.name,children:e.agent.handle??e.agent.name})]})},{key:"task",label:"Active task",kind:"custom",sortable:!0,sortValue:e=>(e.activeTask??"").toLowerCase()||null,defaultWidth:240,minWidth:140,render:e=>e.activeTask?r.jsx("span",{className:"s-ops-agents-task",title:e.activeTask,children:e.activeTask}):r.jsx("span",{className:"s-ops-agents-task s-ops-agents-task--idle",children:"—"})},{key:"team",label:"Project",kind:"text",defaultWidth:140,minWidth:90,cls:"s-ops-agents-meta",render:e=>r.jsx("span",{className:"s-ops-agents-meta-cell",children:e.team}),sortValue:e=>e.team.toLowerCase()},{key:"machine",label:"Machine",kind:"text",defaultWidth:120,minWidth:88,cls:"s-ops-agents-meta",render:e=>r.jsx("span",{className:"s-ops-agents-meta-cell",children:e.machine}),sortValue:e=>e.machine.toLowerCase()},{key:"active",label:"Active",kind:"number",defaultWidth:90,minWidth:64,cls:"s-ops-agents-num",render:e=>e.activeFlights,sortValue:e=>e.activeFlights},{key:"sessions24h",label:"24h sessions",kind:"number",defaultWidth:108,minWidth:78,cls:"s-ops-agents-num",render:e=>e.sessions24h,sortValue:e=>e.sessions24h},{key:"throughput",label:"Throughput",kind:"custom",sortable:!1,defaultWidth:110,minWidth:90,render:e=>r.jsx(ke,{values:e.throughput,warn:e.errors>0})},{key:"avgLatency",label:"Avg latency",kind:"number",defaultWidth:108,minWidth:80,cls:"s-ops-agents-num",render:e=>D(e.avgLatencyMs),sortValue:e=>e.avgLatencyMs},{key:"input",label:"Input",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.uncachedInput??e.usage.input),sortValue:e=>e.usage.uncachedInput??e.usage.input??null},{key:"cacheRead",label:"Cache read",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cachedInput),sortValue:e=>e.usage.cachedInput??null},{key:"cacheWrite",label:"Cache write",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cacheWrite),sortValue:e=>e.usage.cacheWrite??null},{key:"output",label:"Output",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.output),sortValue:e=>e.usage.output??null},{key:"apiEquiv",label:"API equiv",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.cost.rateCardSource==="unknown"?"s-ops-agents-num--dim":void 0,children:N(e.cost.totalUsd)}),sortValue:e=>e.cost.totalUsd??null},{key:"billed",label:"Billed",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.cost.billingMode==="subscription"?"s-ops-agents-num--covered":void 0,children:N(e.cost.billedTotalUsd)}),sortValue:e=>e.cost.billedTotalUsd??null},{key:"errors",label:"Errors",kind:"number",defaultWidth:72,minWidth:58,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.errors>0?"s-ops-agents-num--warn":void 0,children:e.errors}),sortValue:e=>e.errors},{key:"lastActive",label:"Last active",kind:"time",defaultWidth:104,minWidth:78,cls:"s-ops-agents-last",render:e=>e.lastActiveAt?re(e.lastActiveAt):"—",sortValue:e=>e.lastActiveAt}];function U(e){if(!e)return null;const t=e.replace(/\/+$/,""),s=t.lastIndexOf("/");return s>=0?t.slice(s+1):t}function w(e){return e==null?"—":e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)}function D(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function N(e){return e==null?"$—":e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}function fe(e,t){if(!e)return null;const s=e.data.events.filter(i=>i.kind==="message"||i.kind==="tool").filter(i=>t-i.t<=Me).sort((i,o)=>i.t-o.t);if(s.length<2)return null;const a=[];for(let i=1;i<s.length;i+=1){const o=s[i].t-s[i-1].t;o>0&&o<12e4&&a.push(o)}return a.length===0?null:Math.round(a.reduce((i,o)=>i+o,0)/a.length)}function ve(e,t){const s=new Array(24).fill(0),a=t-T;for(const i of e){if(i.ts<a||i.ts>t)continue;const o=Math.min(23,Math.max(0,Math.floor((i.ts-a)/T*s.length)));s[o]+=1}return s}function ke({values:e,warn:t=!1}){const i=Math.max(1,...e),o=e.map((c,h)=>{const m=h/Math.max(1,e.length-1)*92,b=22-c/i*19-1.5;return`${m.toFixed(1)},${b.toFixed(1)}`}).join(" ");return r.jsx("svg",{className:`s-ops-agents-spark${t?" s-ops-agents-spark--warn":""}`,viewBox:"0 0 92 22","aria-hidden":"true",children:r.jsx("polyline",{points:o,fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function xe(e){return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??U(e.cwd)??U(e.projectRoot)??"local"}function We(e){return e.project??e.role??e.agentClass??"Unassigned"}function Se(e){if(e.length===0)return null;const t={working:0,needs_attention:1,queued:2,failed:3,completed:4},a=[...e].sort((o,c)=>{const h=t[o.status]-t[c.status];return h!==0?h:(c.updatedAt??0)-(o.updatedAt??0)})[0];return(a.task??a.summary??"").trim()||null}function we(e,t,s,a,i,o){const c=t.filter(l=>l.agentId===e.id),h=c.filter(l=>{const I=l.lastMessageAt??0;return I>0&&o-I<=T}),m=e.conversationId,b=s.filter(l=>l.actorName===e.name||!!(m&&l.conversationId===m)),g=i.get(e.id),{model:v,provider:f}=ie(e,g),P=he({adapterType:g?.data.metadata?.session?.adapterType,capturedAt:g?.updatedAt??o,model:v,provider:f,usage:g?.data.metadata?.usage}),d=a.filter(l=>l.agentId===e.id);return{agent:e,team:We(e),machine:xe(e),model:v,provider:f,state:Z(e.state),activeFlights:d.length,activeTask:Se(d),sessions24h:h.length,throughput:ve(b,o),avgLatencyMs:fe(g,o),usage:P.usage,cost:P,errors:d.filter(l=>l.status==="failed"||l.status==="needs_attention").length,lastActiveAt:Math.max(0,...c.map(l=>l.lastMessageAt??0),...b.map(l=>l.ts),e.updatedAt??0)||null}}function vt({navigate:e,agents:t}){const[s,a]=p.useState(null),[i,o]=p.useState([]),[c,h]=p.useState([]),[m,b]=p.useState([]),[g,v]=p.useState(""),[f,P]=p.useState(()=>Date.now()),d=p.useRef(null),l=p.useCallback(async()=>{const n=t.map(X=>X.id).join(","),[u,k,L,$]=await Promise.allSettled([A("/api/fleet"),A("/api/conversations"),A("/api/activity"),n?A(`/api/observe/agents?ids=${encodeURIComponent(n)}`):Promise.resolve([])]);u.status==="fulfilled"&&a(u.value),k.status==="fulfilled"&&o(k.value),L.status==="fulfilled"&&h(L.value),$.status==="fulfilled"&&b($.value),P(Date.now())},[t]);p.useEffect(()=>{l()},[l]);const I=p.useCallback(()=>{d.current||(d.current=setTimeout(()=>{d.current=null,l()},Pe))},[l]);te(I),p.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),p.useEffect(()=>{const n=setInterval(()=>P(Date.now()),1e3);return()=>clearInterval(n)},[]);const R=p.useMemo(()=>new Map(m.map(n=>[n.agentId,n])),[m]),M=p.useMemo(()=>{const n=s?.activeAsks??[];return t.map(u=>we(u,i,c,n,R,f))},[c,t,s?.activeAsks,f,R,i]),S=p.useMemo(()=>{const n=g.trim().toLowerCase();return n?M.filter(u=>`${u.agent.name} ${u.team} ${u.machine} ${u.agent.handle??""} ${u.agent.harness??""} ${u.activeTask??""}`.toLowerCase().includes(n)):M},[g,M]),[K,F]=p.useState({key:"lastActive",dir:-1}),O=p.useMemo(()=>K?.key==="agent"?void 0:(n,u)=>E[n.state]-E[u.state],[K?.key]),q=p.useMemo(()=>S.map(n=>n.agent),[S]),B=p.useMemo(()=>S.map(n=>n.agent.id),[S]),y=ae({agents:q,orderedIds:B,navigate:e,selectMode:"preview"}),z=M.filter(n=>n.state==="in_turn"||n.state==="in_flight").length,H=M.filter(n=>J(n.agent.state,n.agent)).length,Y=M.reduce((n,u)=>n+(u.usage.total??0),0),_=M.some(n=>n.cost.totalUsd!=null)?M.reduce((n,u)=>n+(u.cost.totalUsd??0),0):null,G=M.some(n=>n.cost.billedTotalUsd!=null)?M.reduce((n,u)=>n+(u.cost.billedTotalUsd??0),0):null,Q=(()=>{const n=M.map(u=>u.avgLatencyMs).filter(u=>u!=null);return n.length===0?null:Math.round(n.reduce((u,k)=>u+k,0)/n.length)})();return r.jsxs("div",{className:"s-ops-agents",children:[r.jsxs("main",{className:"s-ops-agents-main",children:[r.jsxs("div",{className:"s-ops-agents-toolbar",children:[r.jsxs("div",{className:"s-ops-agents-breadcrumb",children:["Agents ",r.jsx("span",{children:"/"})," Directory"]}),r.jsxs("div",{className:"s-ops-agents-live",children:[r.jsx("span",{className:"s-ops-agents-live-dot"}),H," active"]}),r.jsxs("div",{className:"s-ops-agents-search",children:[r.jsx(se,{size:13}),r.jsx("input",{value:g,onChange:n=>v(n.target.value),placeholder:"Search agents, tasks, projects, machines…"})]}),r.jsx("button",{className:"s-ops-agents-icon-btn",type:"button",title:"Filters",children:r.jsx(oe,{size:14})})]}),r.jsx("section",{className:"s-ops-agents-hero",children:r.jsxs("div",{children:[r.jsx("div",{className:"s-ops-agents-kicker",children:"Agents"}),r.jsx("h1",{children:"All agents"}),r.jsx("p",{children:"Every registered agent across the local fleet, sorted by live status."})]})}),r.jsxs("section",{className:"s-ops-agents-stats",children:[r.jsx(C,{label:"Running",value:String(z),sub:`of ${t.length} total`}),r.jsx(C,{label:"Tokens",value:w(Y||null),sub:_==null?"usage metadata pending":`${N(_)} API equiv`}),r.jsx(C,{label:"Avg latency",value:D(Q),sub:"recent observe events"}),r.jsx(C,{label:"Billed",value:N(G),sub:"subscription usage can mark this down"})]}),r.jsxs("section",{className:"s-ops-agents-table-panel",children:[r.jsxs("div",{className:"s-ops-agents-table-title",children:["Agents ",r.jsx("span",{children:S.length}),r.jsxs("span",{className:"s-ops-agents-hint","aria-hidden":!0,children:[r.jsx("kbd",{children:"↑"}),r.jsx("kbd",{children:"↓"})," navigate · ",r.jsx("kbd",{children:"enter"})," pin · ",r.jsx("kbd",{children:"o"})," open · ",r.jsx("kbd",{children:"esc"})," clear"]})]}),r.jsx("div",{className:"s-ops-agents-table-wrap",ref:y.containerRef,children:r.jsx(ne,{rows:S,columns:be,rowId:n=>n.agent.id,storageKey:"openscout.opsAgents.cols",sort:K,onSortChange:F,secondarySort:O,density:"compact",rowBindings:n=>{const u=y.bind(n);return{...u,onKeyDown:k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),u.onClick())}}},rowState:n=>y.getState(n),empty:{title:"No agents match",body:"Adjust the search to find a different slice of the fleet."},className:"s-ops-agents-data-table",ariaLabel:"Agents directory"})})]})]}),y.card]})}function C({label:e,value:t,sub:s,tone:a="default"}){return r.jsxs("div",{className:`s-ops-agents-metric s-ops-agents-metric--${a}`,children:[r.jsx("div",{className:"s-ops-agents-metric-label",children:e}),r.jsx("div",{className:"s-ops-agents-metric-value",children:t}),r.jsx("div",{className:"s-ops-agents-metric-sub",children:s})]})}export{vt as OpsAgentsView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as t}from"./index-C1VaWNuD.js";/* empty css */import{u as d}from"./Provider-D0bB7q6y.js";/* empty css */import{u as v}from"./page-status-BE0-J1xY.js";import{A as x}from"./AgentLanesView-96lHsoX7.js";import{MissionControlView as j}from"./MissionControlView-DmaThhNR.js";import{OpsAgentsView as f}from"./OpsAgentsView-vIoY-AW1.js";import{HostAdvisorView as w}from"./HostAdvisorView-DeJ-8RZV.js";import{AtopView as N}from"./AtopView-D7vyQDtE.js";import{TailView as c}from"./TailView-_gKWfaQM.js";import{u as g}from"./useContentSecondaryNav-CoIoz7JU.js";import{OpsSubnav as S}from"./OpsSubnav-CjDTnp64.js";import"./router-kfcaYqZr.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./api-Co9aQ2Jw.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./time-Dhsh_2EG.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";/* empty css */import"./tail-events-LK29oCKm.js";import"./observe-BLmy4quB.js";import"./types-B0PlfpKc.js";import"./useEmbedHeadline-DuUnwTB7.js";import"./AgentAvatar-Dz79iTxB.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./CrewAvatar-CZ_faQ_s.js";import"./SessionObserve-BVeTkcIl.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-t7-XJP-h.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-BZ5SBMtc.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./openContent-C6XO6kr5.js";import"./eye-C9cGk5z6.js";import"./terminal-UDy4lzV1.js";import"./message-markup-DC0QFEZn.js";import"./ObservedTopologyPanel-CJVqIqQ2.js";import"./ObserveTextFlow-DCJ5EmD8.js";import"./use-reduced-motion-CPoX8iV2.js";import"./proxy-DVDRhSRR.js";import"./SessionObserveEvidence-BkOezTGV.js";import"./message-circle-joGFxfj1.js";import"./wrench-BfVeded5.js";import"./external-link-BvX5PfLh.js";import"./AgentFloorView-DuyvyMMj.js";/* empty css */import"./agent-lanes-model-tc-1hE6q.js";import"./context-budget-DqxWzalx.js";import"./lane-roster-store-DN2jxXF-.js";import"./AgentLanesPreflight-CCGBArIb.js";import"./AgentLaneChrome-Dv2lBFoH.js";import"./AgentLaneCard-Cc9uyfBr.js";/* empty css */import"./AgentLaneSummaryResize-Di4u6df2.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-CY3OE1Xu.js";import"./agent-lane-preview-BhplDYGf.js";import"./agent-lane-detail-ppJId6Jc.js";import"./AgentLaneDetailSheet-CGqtqSHQ.js";import"./SlidePanel-CETQ5NTx.js";import"./LaneTraceDetailSheet-DNIECgEl.js";import"./LaneTraceEventFocus-BB5DhFQm.js";/* empty css */import"./mission-control-store-CM8mQGg8.js";import"./MissionContextRail-DnCWPzAM.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-K21ssTxv.js";import"./MissionLogPane-BLvSSIdT.js";/* empty css */import"./DataTable-C6aMSilS.js";/* empty css */import"./useAgentHoverCard-BgTLNcF-.js";import"./sliders-horizontal-57e99_qO.js";/* empty css */import"./compass-BdpImt_W.js";import"./layout-grid-BoVnPOk-.js";import"./refresh-cw-Bkh7Cvnd.js";import"./arrow-up-right-B09GPwFl.js";import"./cpu-CHFIGw87.js";import"./gauge-DSflSery.js";/* empty css */import"./SecondaryNav-Cs0_FQdj.js";import"./secondaryNavConfig-C0Srrmy8.js";import"./message-square-BLiFqpe_.js";import"./settings-DQEtqkM9.js";import"./git-branch-Bc_eDIpG.js";import"./scroll-text-DFcBYy5J.js";const A=220;function F(){const r=v(),o=!!(r.hover||r.content),[i,p]=n.useState(o?{hover:r.hover,content:r.content}:null),[e,s]=n.useState(o?"enter":"hidden"),m=n.useRef(null);if(n.useEffect(()=>{if(o){m.current&&(clearTimeout(m.current),m.current=null),p({hover:r.hover,content:r.content}),s(h=>h==="show"?"show":"enter");const u=requestAnimationFrame(()=>s("show"));return()=>cancelAnimationFrame(u)}return s("leave"),m.current=setTimeout(()=>{s("hidden"),p(null),m.current=null},A),()=>{m.current&&(clearTimeout(m.current),m.current=null)}},[o,r.hover,r.content]),e==="hidden"||!i)return null;const a=i.hover?.label??i.hover?.route??null,l=i.hover?.label&&i.hover?.route?i.hover.route:null;return t.jsxs("div",{className:`s-page-status s-page-status--${e}`,role:"status","aria-live":"polite",children:[t.jsx("div",{className:"s-page-status-left",children:a&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"s-page-status-arrow","aria-hidden":!0,children:"→"}),t.jsx("span",{className:"s-page-status-target",children:a}),l&&t.jsx("span",{className:"s-page-status-route",children:l})]})}),t.jsx("div",{className:"s-page-status-right",children:i.content&&t.jsx("span",{className:"s-page-status-content",children:i.content})})]})}function Ur({navigate:r,mode:o="mission",tailQuery:i}){const{agents:p,route:e}=d(),s=g();return t.jsxs("div",{className:"s-ops",children:[s?t.jsx("div",{className:"s-ops-header",children:t.jsx(S,{activeRoute:e,navigate:r})}):null,t.jsxs("div",{className:"s-ops-body",children:[o==="mission"&&t.jsx(j,{navigate:r,agents:p}),o==="agents"&&t.jsx(f,{navigate:r,agents:p}),o==="advisor"&&t.jsx(w,{navigate:r,agents:p}),o==="issues"&&t.jsx(c,{navigate:r,initialFilter:i,variant:"issues"}),o==="tail"&&t.jsx(c,{navigate:r,initialFilter:i,variant:"tail"}),o==="atop"&&t.jsx(N,{}),o==="lanes"&&t.jsx(x,{navigate:r,agents:p})]}),t.jsx(F,{})]})}export{Ur as OpsScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-C1VaWNuD.js";import{S as p}from"./SecondaryNav-Cs0_FQdj.js";import{O as i}from"./secondaryNavConfig-C0Srrmy8.js";/* empty css */import"./createLucideIcon-Dv8H8m7J.js";import"./message-square-BLiFqpe_.js";import"./file-text-BHro8MkG.js";import"./search-FB2vVxCp.js";import"./compass-BdpImt_W.js";import"./settings-DQEtqkM9.js";import"./terminal-UDy4lzV1.js";import"./git-branch-Bc_eDIpG.js";import"./code-xml-CkkNdRmu.js";import"./scroll-text-DFcBYy5J.js";function v({activeRoute:r,navigate:o}){return t.jsx(p,{ariaLabel:"Ops sections",activeRoute:r,groups:i,navigate:o})}export{v as OpsSubnav};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,j as o}from"./index-C1VaWNuD.js";import{a as A}from"./api-Co9aQ2Jw.js";import{u as b,i as S}from"./Provider-D0bB7q6y.js";import{b as y}from"./router-kfcaYqZr.js";import{u as P}from"./sse-B29iGBnw.js";import{AgentsSubnav as N}from"./AgentsSubnav-Ci7uWM7P.js";import{AgentDetailWithRail as B,AgentProfileSessionsCenter as E}from"./profile-BCvk8jOQ.js";import{r as R,d as C,b as M}from"./NewChatComposer-D2Ah4T-W.js";/* empty css *//* empty css *//* empty css */import{ProjectAgentProfileBar as w}from"./ProjectAgentProfileBar-CUzZ4Rpx.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./createLucideIcon-Dv8H8m7J.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./file-text-BHro8MkG.js";import"./x-DgmmnPKt.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-B8sQ_8IF.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./index-BWHgHrtv.js";import"./SecondaryNav-Cs0_FQdj.js";import"./secondaryNavConfig-C0Srrmy8.js";import"./message-square-BLiFqpe_.js";import"./search-FB2vVxCp.js";import"./compass-BdpImt_W.js";import"./settings-DQEtqkM9.js";import"./terminal-UDy4lzV1.js";import"./git-branch-Bc_eDIpG.js";import"./scroll-text-DFcBYy5J.js";import"./AgentAvatar-Dz79iTxB.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./CrewAvatar-CZ_faQ_s.js";import"./HarnessMark-DttReffF.js";import"./context-budget-DqxWzalx.js";import"./session-catalog-CG4oL_yN.js";import"./terminal-relay-CXHMdain.js";import"./BackToPicker-BHicJyfc.js";import"./openContent-C6XO6kr5.js";import"./ConversationScreen-DIU7m_aC.js";import"./runtime-picker-C20lTGhV.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./ConversationComposer-BUIjWMBi.js";import"./index-Cx6Gbr6n.js";import"./zap-Bcja1lHG.js";import"./conversation-model-C2KuZUXc.js";import"./message-markup-DC0QFEZn.js";import"./mentions-BZ5SBMtc.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./eye-C9cGk5z6.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-Bt2RBj93.js";import"./AstronautSuit-CwB4Dw07.js";import"./ConversationFeedRows-Bx0gFyG_.js";import"./ConversationPanels-o6W-cOoU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CPoX8iV2.js";import"./proxy-DVDRhSRR.js";import"./chevron-down-D120PY4g.js";import"./activity-CzTJ-YMX.js";import"./message-circle-joGFxfj1.js";import"./tail-events-LK29oCKm.js";import"./ConversationStatus-CTYOywFh.js";import"./check-Dz2SRHft.js";import"./sparkles-D0vWLTyC.js";import"./SessionObserve-BVeTkcIl.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-t7-XJP-h.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-CJVqIqQ2.js";import"./ObserveTextFlow-DCJ5EmD8.js";import"./SessionObserveEvidence-BkOezTGV.js";import"./wrench-BfVeded5.js";import"./external-link-BvX5PfLh.js";/* empty css */import"./AgentDefinitionsWorkspace-DHDS9Pgd.js";import"./agent-specialization-CtF_jI34.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CxNbcTYf.js";import"./agent-essentials-K9B6kbTS.js";import"./NewChatOrigin-DCn5cWPZ.js";function Mo({route:t,navigate:r}){const{agents:e}=b(),p=y(t),n=m.useMemo(()=>S(e,p),[e,p]),[f,g]=m.useState([]),a=m.useCallback(async()=>{const s=await A("/api/conversations").catch(()=>[]);g(s)},[]);m.useEffect(()=>{a()},[a]),P(()=>{a()});const i=R(n,t.agentId),c=!!(t.agentId&&i&&i.id!==t.agentId),{conversationByAgentId:j}=C(f);if(m.useEffect(()=>{!t.agentId||!i||!c||r({...t,view:"agents-v2",agentId:i.id})},[r,t,i,t.agentId,c]),!i)return o.jsx(v,{activeRoute:t,navigate:r,children:o.jsx("div",{className:"av2-empty",children:"Agent not found."})});const d=t.conversationId??j.get(i.id)??i.conversationId??null,l=t.tab??(t.conversationId?"message":"profile");return o.jsx("div",{className:"s-av2-profileShell",children:o.jsx(v,{activeRoute:t,navigate:r,bar:o.jsx(w,{agent:i,conversationId:d,activeTab:l,route:t,navigate:r}),children:o.jsx("div",{className:"av2-profileCanvas",children:o.jsx(B,{agent:i,allAgents:n,conversationId:d,navigate:r,activeTab:l,renderProfile:({agent:s,sessionCatalog:x,conversationId:h,navigate:I,route:u})=>o.jsx(E,{agent:s,name:M(s,n).name,sessionCatalog:x,conversationId:h,navigate:I,route:u,homeView:"agents-v2"})})})})})}function v({activeRoute:t,children:r,navigate:e,bar:p}){return o.jsxs("div",{className:"s-secondary-nav-shell",children:[o.jsx("div",{className:"s-secondary-nav-bar",children:p??o.jsx(N,{activeRoute:t,navigate:e})}),o.jsx("div",{className:"s-secondary-nav-body",children:r})]})}export{Mo as ProjectAgentProfile};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./index-C1VaWNuD.js";import{r as c}from"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";function f({agent:i,conversationId:s,activeTab:o,route:l,navigate:r}){const n=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],t=e=>r({...l,view:"agents-v2",agentId:i.id,...s?{conversationId:s}:{},tab:e});return a.jsxs("div",{className:"av2-profileBar",children:[a.jsxs("button",{type:"button",className:"av2-profileBack",onClick:()=>r(c(l)),children:[a.jsx("span",{className:"av2-profileBackGlyph","aria-hidden":!0,children:"←"}),"Project"]}),a.jsx("nav",{className:"av2-profileTabs","aria-label":"Agent views",children:n.map(e=>a.jsx("button",{type:"button",className:"av2-profileTab","data-on":o===e.key||void 0,onClick:()=>t(e.key),children:e.label},e.key))})]})}export{f as ProjectAgentProfileBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e}from"./index-C1VaWNuD.js";import{i as y,c as L}from"./colors-BtO5_zlx.js";import{a as u}from"./api-Co9aQ2Jw.js";import{u as T}from"./sse-B29iGBnw.js";import{t as P}from"./time-Dhsh_2EG.js";import{o as R}from"./openContent-C6XO6kr5.js";import{A as E}from"./AgentAvatar-Dz79iTxB.js";import{H as O}from"./HarnessMark-DttReffF.js";import{n as V}from"./NewChatComposer-D2Ah4T-W.js";import{h as B}from"./model-CBkMvT1w.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./createLucideIcon-Dv8H8m7J.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./file-text-BHro8MkG.js";import"./x-DgmmnPKt.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-B8sQ_8IF.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./CrewAvatar-CZ_faQ_s.js";import"./runtime-picker-C20lTGhV.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";function U(s){return s?s.startsWith("/Users/")?`~/${s.split("/").slice(3).join("/")}`:s:null}function _(s){const a=s.model?.trim();if(!a)return null;const o=s.harness?.trim();return o&&a.startsWith(`${o}-`)?a.slice(o.length+1).replace(/-\d{8}$/,""):a.replace(/^claude-/,"").replace(/-\d{8}$/,"")}function g(s){const a=new Map;for(const o of s){if(o.kind!=="tool"||!o.tool)continue;const t=o.tool.toLowerCase();a.set(t,(a.get(t)??0)+1)}return[...a.entries()].sort((o,t)=>t[1]-o[1]||o[0].localeCompare(t[0])).map(([o])=>o).slice(0,6)}function i({label:s,value:a,title:o}){return a?.trim()?e.jsxs("div",{className:"av2-coreMetaItem",title:o??a,children:[e.jsx("span",{className:"av2-coreMetaLabel",children:s}),e.jsx("span",{className:"av2-coreMetaValue",children:a})]}):null}function Ss({agent:s,route:a,navigate:o}){const[t,h]=c.useState(null),[C,v]=c.useState(null),m=c.useCallback(async()=>{const[r,l]=await Promise.all([u(`/api/agents/${encodeURIComponent(s.id)}/observe`).catch(()=>null),u(`/api/agents/${encodeURIComponent(s.id)}/session-catalog`).catch(()=>null)]);h(r),v(l)},[s.id]);c.useEffect(()=>{h(null),v(null),m()},[m]),T(()=>{m()});const p=s.handle?.trim().replace(/^@+/,"")||null,j=p?`@${p}`:s.name,n=s.harness?B(s.harness):null,H=_(s),w=U(s.cwd??s.projectRoot),M=(s.homeNodeName??s.authorityNodeName??"").replace(/\.local$/i,"").replace(/-local-openscout$/i,""),I=y(s.state),k=L(s.state,s),x=t?.data.events??[],d=c.useMemo(()=>g(x),[x]),f=t?.data.metadata?.usage??null,N=(()=>{const r=f?.contextWindowTokens??0,l=f?.contextInputTokens??0;return!r||r<=0||l<=0?null:Math.min(100,Math.max(0,Math.round(l/r*100)))})(),A=C?.sessions?.length??0,$=s.transport==="claude_stream_json"?"stream-json":s.transport==="codex_app_server"?"app-server":s.transport?.trim()||null,S=async()=>{try{const r=await u("/api/sessions",{method:"POST",body:JSON.stringify(V(s))}),l=r.sessionId?.trim();if(l){R(o,{view:"sessions",sessionId:l},{returnTo:a});return}const b=r.conversationId?.trim();o({...a,view:"agents-v2",agentId:r.agentId?.trim()||s.id,...b?{conversationId:b}:{},tab:"message"})}catch{}};return e.jsxs("header",{className:"av2-profileHero",children:[e.jsx(E,{agent:s,size:56,tile:!0,presence:!0}),e.jsxs("div",{className:"av2-profileHeroCore",children:[e.jsxs("div",{className:"av2-profileHeroTop",children:[e.jsxs("div",{className:"av2-profileHeroIdent",children:[e.jsx("h1",{className:"av2-profileHeroTitle",title:j,children:j}),e.jsxs("span",{className:"av2-profileHeroState","data-online":I||void 0,children:[e.jsx("span",{className:"av2-profileHeroDot","aria-hidden":!0}),k,s.updatedAt?` · ${P(s.updatedAt)}`:""]}),p&&s.name.toLowerCase()!==p.toLowerCase()?e.jsx("span",{className:"av2-profileHeroBroker",title:s.id,children:s.name}):e.jsx("span",{className:"av2-profileHeroBroker",title:s.id,children:s.id})]}),e.jsxs("div",{className:"av2-profileHeroActions",children:[e.jsx("button",{type:"button",className:"av2-heroGhost",onClick:()=>o({...a,view:"agents-v2",agentId:s.id,tab:"config"}),children:"Edit config"}),e.jsx("button",{type:"button",className:"av2-heroCta",onClick:()=>{S()},children:"+ New session"})]})]}),e.jsxs("div",{className:"av2-profileHeroMeta",children:[e.jsx(i,{label:"Project",value:s.project?`/${s.project}`:null}),e.jsx(i,{label:"Branch",value:s.branch}),e.jsx(i,{label:"Harness",value:n?n.charAt(0).toUpperCase()+n.slice(1):null,title:s.harness??void 0}),e.jsx(i,{label:"Model",value:H}),e.jsx(i,{label:"Host",value:M||null}),e.jsx(i,{label:"Root",value:w,title:s.cwd??s.projectRoot??void 0}),e.jsx(i,{label:"Transport",value:$})]}),e.jsxs("div",{className:"av2-profileHeroSignal",children:[n?e.jsx("span",{className:"av2-signalMark",title:s.harness??n,children:e.jsx(O,{harness:n,size:12})}):null,e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Sessions"}),e.jsx("span",{className:"av2-signalValue",children:A})]}),N!=null?e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Ctx"}),e.jsxs("span",{className:"av2-signalValue",children:[N,"%"]})]}):null,d.length>0?e.jsxs("span",{className:"av2-signalChip av2-signalChip--wide",title:d.join(" · "),children:[e.jsx("span",{className:"av2-signalLabel",children:"Tools"}),e.jsx("span",{className:"av2-signalValue",children:d.join(" · ")})]}):t?e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Tools"}),e.jsx("span",{className:"av2-signalValue",children:"—"})]}):null]})]})]})}export{Ss as ProjectAgentProfileHero};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as h,j as s}from"./index-C1VaWNuD.js";import{A as Me}from"./AgentAvatar-Dz79iTxB.js";import{H as ge}from"./HarnessMark-DttReffF.js";import{a as Ee}from"./api-Co9aQ2Jw.js";import{r as Ie,i as $e}from"./ui-LM8pS8qE.js";import{t as _,d as We,n as ee}from"./time-Dhsh_2EG.js";import{p as Fe,l as Be,s as De,f as Oe}from"./terminal-sessions-Bdt2W3Y4.js";import{r as ze,y as Z,z as ae,A as He,s as re,c as le,B as qe,E as be,F as Ge,G as _e,d as Ve,u as Ke}from"./Provider-D0bB7q6y.js";import{o as Ue}from"./openContent-C6XO6kr5.js";import{p as J}from"./NewChatComposer-D2Ah4T-W.js";import{SessionRefScreen as Xe}from"./SessionRefScreen-DetLMkTT.js";import{P as Ye,C as Ze}from"./CrewWorkspaces-DNX-QQ1h.js";import{r as X,s as V}from"./project-overview-helpers-BQTc_Ous.js";import{u as Je,r as Qe}from"./projects-inbox-DFbgVlXL.js";import{u as es}from"./useEmbedHeadline-DuUnwTB7.js";import{g as ss,a as ts,f as ce,b as ns}from"./api-HFH8wFyb.js";import{f as is}from"./cache-CeWH_KzJ.js";import{A as ue}from"./arrow-up-right-B09GPwFl.js";import{C as os}from"./chevron-right-CowuvuE6.js";import{F as as}from"./AddProjectForm-fXndbzXT.js";import{S as rs}from"./search-FB2vVxCp.js";import{A as ls}from"./arrow-right-DTX42clh.js";import{E as cs}from"./external-link-BvX5PfLh.js";import{F as us}from"./DocumentFocusViewer-D8iB6SMt.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./colors-BtO5_zlx.js";import"./CrewAvatar-CZ_faQ_s.js";import"./perf-PX8Rx0EP.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./model-CBkMvT1w.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./file-text-BHro8MkG.js";import"./createLucideIcon-Dv8H8m7J.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-B8sQ_8IF.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./runtime-picker-C20lTGhV.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./tail-events-LK29oCKm.js";import"./BackToPicker-BHicJyfc.js";import"./ConversationScreen-DIU7m_aC.js";import"./ConversationComposer-BUIjWMBi.js";import"./zap-Bcja1lHG.js";import"./message-markup-DC0QFEZn.js";import"./mentions-BZ5SBMtc.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./eye-C9cGk5z6.js";import"./terminal-UDy4lzV1.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Bt2RBj93.js";import"./AstronautSuit-CwB4Dw07.js";import"./ConversationFeedRows-Bx0gFyG_.js";import"./ConversationPanels-o6W-cOoU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CPoX8iV2.js";import"./proxy-DVDRhSRR.js";import"./activity-CzTJ-YMX.js";import"./message-circle-joGFxfj1.js";import"./ConversationStatus-CTYOywFh.js";import"./check-Dz2SRHft.js";import"./sparkles-D0vWLTyC.js";import"./SessionObserve-BVeTkcIl.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-t7-XJP-h.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-CJVqIqQ2.js";import"./ObserveTextFlow-DCJ5EmD8.js";import"./SessionObserveEvidence-BkOezTGV.js";import"./wrench-BfVeded5.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./agent-specialization-CtF_jI34.js";import"./sliders-horizontal-57e99_qO.js";import"./message-square-BLiFqpe_.js";function de(e){const t=e?.trim();if(!t)return null;const i=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return i.endsWith(".jsonl")?i.slice(0,-6):i}function ds(e){return e.surfaces.filter(t=>t.backend==="tmux")}function ps(e,t){return{terminalSessionId:e.id,terminalSurfaceKey:De(t),sessionName:t.sessionName}}function ms(e,t){const i=de(t.agentId),n=new Set(t.sessionRefs.map(de).filter(r=>!!r)),o=i?.split(".",1)[0]??null;o?.startsWith("session-")&&n.add(o);for(const r of e){const a=ds(r).find(c=>n.has(c.sessionName));if(a)return ps(r,a)}return null}function hs(e,t){const i=Fe(e.terminalSurfaceKey);return i?`scout://terminal?${new URLSearchParams({session:e.terminalSessionId,surface:Be(i),mode:t}).toString()}`:null}const fs=1e4,js=2e4,xs=6e4,gs=15e3,bs=45e3,vs=["branch","unstaged","staged"];function te(e){const t=()=>{document.visibilityState==="visible"&&e()};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",t)}}function ws(e,t){const i=new Set;for(const n of[e,...t]){const o=n?.trim();o&&i.add(o.replace(/\/+$/u,""))}return[...i].slice(0,6)}function Ns(e){return e.replace(/\/+$/u,"").split("/").pop()?.toLocaleLowerCase()??e.toLocaleLowerCase()}function ks(e,t,i){return e.path===t||i?.worktrees.some(o=>o.path===e.path)?!0:e.repo.split("/").pop()?.toLocaleLowerCase()===(i?.name.toLocaleLowerCase()??Ns(t))}function Q(e){return e&&typeof e=="object"&&"name"in e&&e.name==="AbortError"?"The repository scan timed out.":e instanceof Error?e.message:String(e)}function Ss(e,t=[]){const i=ws(e,t).join("\0"),n=h.useMemo(()=>i?i.split("\0"):[],[i]),[o,r]=h.useState(()=>ss()),[a,c]=h.useState(()=>ts()),[m,f]=h.useState(!!(e&&!X(o,e))),[j,x]=h.useState(!!e),[w,y]=h.useState(!!e),[T,L]=h.useState(null),[S,E]=h.useState(null),[W,P]=h.useState(()=>new Map),[B,A]=h.useState(()=>new Map),[N,D]=h.useState(0),I=h.useRef(null),k=h.useCallback(()=>{I.current=null,D(d=>d+1)},[]);h.useEffect(()=>{if(!e){f(!1),L(null);return}let d=!1,p=!1,R=!0;const M=async()=>{if(p)return;p=!0,d||(f(!0),L(null));let O=null;try{let F=null;const z=N>0&&R;R=!1;try{F=await ce("standard",z,gs)}catch(C){O=Q(C)}if((!F||!X(F,e))&&I.current!==e){I.current=e;try{const C=await ce("expanded",z,bs);X(C,e)&&(F=C)}catch(C){O=Q(C)}}!d&&F&&r(C=>X(F,e)?F:C&&X(C,e)?C:F),!d&&!X(F,e)&&L(O??"Repo Watch did not include this project in its latest scan.")}finally{p=!1,d||f(!1)}};M();const l=window.setInterval(()=>{document.visibilityState==="visible"&&M()},fs),$=te(()=>{M()});return()=>{d=!0,window.clearInterval(l),$()}},[e,N]),h.useEffect(()=>{if(n.length===0){y(!1),A(new Map);return}let d=!1,p=!1,R=!0;const M=async()=>{if(p)return;p=!0,d||y(!0);const O=await Promise.allSettled(n.map(F=>is(F,[...vs],{force:N>0&&R,tier:"summary"})));if(R=!1,!d){const F=new Map,z=new Map;O.forEach((C,K)=>{const q=n[K];C.status==="fulfilled"?F.set(q,C.value.snapshot):z.set(q,Q(C.reason))}),P(C=>{const K=new Map(C);for(const q of n)K.delete(q);for(const[q,se]of F)K.set(q,se);return K}),A(z),y(!1)}p=!1};M();const l=window.setInterval(()=>{document.visibilityState==="visible"&&M()},js),$=te(()=>{M()});return()=>{d=!0,window.clearInterval(l),$()}},[n,N]),h.useEffect(()=>{if(n.length===0){x(!1),E(null);return}let d=!1,p=!1;const R=async()=>{if(!p){p=!0;try{const $=await ns(n);d||(c($),E(null))}catch($){d||E(Q($))}finally{p=!1,d||x(!1)}}};x(!0),E(null),R();const M=window.setInterval(()=>{document.visibilityState==="visible"&&R()},xs),l=te(()=>{R()});return()=>{d=!0,window.clearInterval(M),l()}},[n,N]);const u=h.useMemo(()=>X(o,e),[e,o]),g=h.useMemo(()=>e?(a?.pullRequests??[]).filter(d=>ks(d,e,u)):[],[u,e,a]),b=h.useMemo(()=>{const d=a?.paths.some(p=>n.includes(p))?a.warnings:[];return S?[S,...d]:d},[n,S,a]);return{project:u,pullRequests:g,pullRequestsLoading:j,pullRequestWarnings:b,repoLoading:m,repoError:T,diffSnapshots:W,diffErrors:B,diffLoading:w,refresh:k}}const ys=[];function Cs(e,t){return e.thread===t.thread&&e.crossProject===t.crossProject&&e.selected===t.selected&&e.cursor===t.cursor&&e.nowMs===t.nowMs&&e.workLabel===t.workLabel}const As=h.memo(function({thread:t,crossProject:i,selected:n,cursor:o,nowMs:r,onSelect:a,onOpen:c,rowRef:m,workLabel:f}){return s.jsxs("button",{ref:m,type:"button",className:"pi-row","data-state":t.group,"data-selected":n||void 0,"data-cursor":o||void 0,onClick:a,onDoubleClick:c,children:[s.jsx("span",{className:"pi-rowDot","aria-hidden":!0}),s.jsxs("span",{className:"pi-rowBody",children:[s.jsx("span",{className:"pi-rowWork",title:t.work,children:f??t.work}),s.jsxs("span",{className:"pi-rowAttr",children:[s.jsx("span",{className:"pi-rowAvatar",children:s.jsx(Me,{agent:{name:t.agentName,harness:t.harness,state:t.working?"in_turn":null},placement:"row",size:22})}),s.jsx("span",{className:"pi-rowAgent",title:t.agentName,children:t.agentName}),s.jsx("span",{className:"pi-rowHmark","aria-hidden":!0,children:s.jsx(ge,{harness:t.harness,size:11})}),i?s.jsxs("span",{className:"pi-rowChip",title:`/${t.projectTitle}`,children:["/",t.projectTitle]}):t.branch?s.jsx("span",{className:"pi-rowBranch",title:t.branch,children:t.branch}):null]})]}),s.jsxs("span",{className:"pi-rowVitals",children:[t.working?s.jsx("span",{className:"pi-rowLiveTag",children:"live"}):null,s.jsx("span",{className:"pi-rowAgo",children:t.lastActivityAt?_(t.lastActivityAt,r):"—"}),t.contextPct!=null?s.jsxs("span",{className:"pi-rowCtx",children:[t.contextPct,"%"]}):null]}),s.jsxs("span",{className:"pi-rowOpen","aria-hidden":!0,children:[s.jsx("span",{children:"Open"}),s.jsx(os,{size:14,strokeWidth:1.8})]})]})},Cs);function pe({title:e,detail:t,tone:i="muted"}){return s.jsxs("div",{className:"pi-stateBlock","data-tone":i,role:i==="loading"?"status":"note",children:[s.jsx("span",{className:"pi-statePulse","aria-hidden":!0}),s.jsx("span",{className:"pi-stateTitle",children:e}),t?s.jsx("span",{className:"pi-stateDetail",children:t}):null]})}function Rs({rows:e=7}){return s.jsxs("div",{className:"pi-loadingRows","aria-hidden":"true",children:[s.jsxs("div",{className:"pi-sectionHead pi-sectionHead--loading",children:[s.jsx("span",{className:"pi-loadingLine pi-loadingLine--label"}),s.jsx("span",{className:"pi-loadingLine pi-loadingLine--count"})]}),Array.from({length:e},(t,i)=>s.jsxs("div",{className:"pi-row pi-row--loading",children:[s.jsx("span",{className:"pi-rowDot"}),s.jsxs("span",{className:"pi-rowBody",children:[s.jsx("span",{className:"pi-loadingLine pi-loadingLine--title"}),s.jsx("span",{className:"pi-loadingLine pi-loadingLine--meta"})]}),s.jsx("span",{className:"pi-rowVitals",children:s.jsx("span",{className:"pi-loadingLine pi-loadingLine--time"})})]},i))]})}function Ts({route:e,navigate:t,slug:i,model:n,mode:o,repoProject:r}){const a=n.projects.find(S=>S.slug===i)??null,m=Z(n.threads,i).filter(S=>S.kind==="agent"),f=a?.title??i,j=a?.root??null,x=(a?.agentCount??m.length)>0,w=e.machineId?{machineId:e.machineId}:{},y={view:"agents-v2",projectSlug:i,...w},T=Ls(a?.needs??0,Math.max(a?.working??0,a?.liveSessionCount??0),a?.agentCount??(m.length>0?1:0),a?.sessionCount??0),L=r?.worktrees.length??a?.worktreeCount??0;return s.jsxs("header",{className:"pi-projectHead",children:[s.jsx("div",{className:"pi-projectHeadTop",children:s.jsxs("div",{className:"pi-projectIdent",children:[s.jsx("h1",{className:"pi-projectTitle",children:f}),s.jsxs("div",{className:"pi-projectMeta",children:[j?s.jsx("span",{title:j,children:V(j)}):null,s.jsx("span",{className:"pi-projectDigest",children:T})]})]})}),s.jsxs("div",{className:"pi-projectFacets","aria-label":"Project sections",children:[s.jsx("button",{type:"button",className:"pi-projectFacet","data-selected":o==="overview"||void 0,onClick:()=>t(y),children:s.jsx("span",{children:"Overview"})}),s.jsxs("button",{type:"button",className:"pi-projectFacet","data-selected":o==="sessions"||void 0,onClick:()=>t({...y,indexView:"sessions"}),children:[s.jsx("span",{children:"Sessions"}),s.jsx("b",{children:a?.sessionCount??0})]}),x?s.jsxs("button",{type:"button",className:"pi-projectFacet","data-selected":o==="agents"||void 0,onClick:()=>t({...y,indexView:"agents"}),children:[s.jsx("span",{children:"Agents"}),s.jsx("b",{children:a?.agentCount??m.length})]}):null,s.jsxs("button",{type:"button",className:"pi-projectFacet",title:"Open worktrees in Repos",onClick:()=>t({view:"repos",...j?{root:j}:{},...w}),children:[s.jsx("span",{children:"Worktrees"}),s.jsx("b",{children:L}),s.jsx(ue,{className:"pi-projectFacetOut",size:11,strokeWidth:2,"aria-hidden":!0})]}),s.jsxs("button",{type:"button",className:"pi-projectFacet",disabled:!j,title:j?"Open this project's AGENTS.md":"No project root known",onClick:()=>t({view:"code",project:i,path:"AGENTS.md"}),children:[s.jsx("span",{children:"Rules"}),s.jsx("b",{children:j?"set":"—"}),s.jsx(ue,{className:"pi-projectFacetOut",size:11,strokeWidth:2,"aria-hidden":!0})]})]})]})}function Ls(e,t,i,n){const o=[];return t>0&&o.push(s.jsxs("b",{children:[t," active"]},"w")),e>0&&o.push(s.jsxs("b",{children:[e," needs you"]},"n")),o.push(s.jsxs("span",{children:[i," agent",i===1?"":"s"]},"a")),o.push(s.jsxs("span",{children:[n," session",n===1?"":"s"]},"s")),o.reduce((r,a,c)=>(c>0&&r.push(s.jsx("span",{children:" · "},`sep${c}`)),r.push(a),r),[])}function ve(e){if(e.length<=18)return e;const t=e.match(/^([0-9a-f]{8})-[0-9a-f-]{27,}$/iu);return t?t[1]:`${e.slice(0,10)}…${e.slice(-5)}`}function Ps(e,t){return`${t?0:e.projects.length} tracked`}function Ms({route:e,navigate:t,projects:i}){const{onboarding:n,refreshOnboarding:o,reload:r}=Ke(),a=Es(n?.defaultHarness),[c,m]=h.useState(""),[f,j]=h.useState(""),[x,w]=h.useState(a),[y,T]=h.useState(!1),[L,S]=h.useState(null),[E,W]=h.useState(null),[P,B]=h.useState(null);h.useEffect(()=>{w(a)},[a]);const A=h.useMemo(()=>Is(i),[i]),N=h.useMemo(()=>$s(A,c),[c,A]),D=h.useMemo(()=>A.find(l=>l.slug===f)??he(A,c),[c,A,f]),I=c.trim(),k=Fs(I)&&!he(A,I),u=D??(!k&&I?N[0]??null:null),g=u?"Open project":k?"Create project":"Find project",b=!!(u||k||I);h.useEffect(()=>{f&&(A.some(l=>l.slug===f)||j(""))},[A,f]),h.useEffect(()=>{if(!P)return;const l=A.find($=>Bs($,P));l&&(B(null),t(me(e,l.slug)))},[P,t,A,e]);const d=l=>{j(l.slug),m(l.title),S(null),W(null)},p=l=>{t(me(e,l.slug))},R=async l=>{T(!0),S(null),W(null);try{await Ee("/api/onboarding/project",{method:"POST",body:JSON.stringify({contextRoot:l,sourceRoots:[l],defaultHarness:x})}),B(l),W("Project created. Refreshing inventory."),j(""),m(""),Qe(),await Promise.all([o(),r()])}catch($){S($ instanceof Error?$.message:"Could not create project.")}finally{T(!1)}},M=l=>{if(l.preventDefault(),!y){if(u){p(u);return}if(k){R(I);return}if(I){S("No project matches that search. Paste a repo path to create one.");return}S("Choose a project or paste a repo path.")}};return s.jsxs("div",{className:"pi-zero",children:[s.jsxs("div",{className:"pi-zeroHead",children:[s.jsxs("span",{className:"pi-zeroKicker",children:[s.jsx(as,{size:13,strokeWidth:1.9,"aria-hidden":!0}),"Projects"]}),s.jsx("h2",{children:"Pick a project to start."})]}),s.jsxs("form",{className:"pi-zeroComposer",onSubmit:M,children:[s.jsxs("div",{className:"pi-zeroBar",children:[s.jsxs("label",{className:"pi-zeroSelect",children:[s.jsx(rs,{size:13,strokeWidth:1.8,"aria-hidden":!0}),s.jsxs("select",{value:f,"aria-label":"Choose project",onChange:l=>{const $=A.find(O=>O.slug===l.currentTarget.value);$?d($):j("")},children:[s.jsx("option",{value:"",children:"Choose project"}),A.slice(0,80).map(l=>s.jsx("option",{value:l.slug,children:l.title},l.slug))]})]}),s.jsx("div",{className:"pi-zeroHarness",role:"group","aria-label":"Default harness",children:["claude","codex"].map(l=>s.jsx("button",{type:"button","data-on":x===l||void 0,onClick:()=>w(l),children:l==="claude"?"Claude":"Codex"},l))})]}),s.jsxs("div",{className:"pi-zeroInputRow",children:[s.jsx("textarea",{value:c,rows:2,placeholder:"Find project or paste /path/to/repo","aria-label":"Find or create project",onChange:l=>{m(l.currentTarget.value),j(""),S(null),W(null)},onKeyDown:l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),l.currentTarget.form?.requestSubmit())}}),s.jsxs("button",{type:"submit",className:"pi-zeroSend",disabled:y||!b,title:g,children:[s.jsx(ls,{size:15,strokeWidth:2,"aria-hidden":!0}),s.jsx("span",{children:y?"Working":g})]})]}),N.length>0?s.jsx("div",{className:"pi-zeroMatches","aria-label":"Matching projects",children:N.map(l=>s.jsxs("button",{type:"button",className:"pi-zeroMatch","data-selected":D?.slug===l.slug||void 0,onClick:()=>d(l),onDoubleClick:()=>p(l),children:[s.jsxs("span",{className:"pi-zeroMatchMain",children:[s.jsxs("span",{className:"pi-zeroMatchTitle",children:["/",l.title]}),s.jsx("span",{className:"pi-zeroMatchRoot",title:l.root??void 0,children:l.root?V(l.root):l.slug})]}),s.jsx("span",{className:"pi-zeroMatchMeta",children:Ds(l)})]},l.slug))}):I?s.jsx("div",{className:"pi-zeroEmpty",children:"No project matches."}):null,L?s.jsx("div",{className:"pi-zeroError",children:L}):null,E?s.jsx("div",{className:"pi-zeroStatus",children:E}):null]})]})}function Es(e){return e==="codex"?"codex":"claude"}function me(e,t){return{view:"agents-v2",projectSlug:t,...e.showEphemeral?{showEphemeral:!0}:{},...e.machineId?{machineId:e.machineId}:{}}}function Is(e){return e.map(t=>({slug:t.slug,title:t.title,root:t.root,agentCount:t.agentCount,sessionCount:t.sessionCount,lastActivityAt:t.lastActivityAt})).sort((t,i)=>i.lastActivityAt-t.lastActivityAt||i.agentCount-t.agentCount||i.sessionCount-t.sessionCount||t.title.localeCompare(i.title))}function $s(e,t){const i=H(t);return i?e.map(n=>({option:n,score:Ws(n,i)})).filter(n=>n.score!==null).sort((n,o)=>n.score-o.score||o.option.lastActivityAt-n.option.lastActivityAt||n.option.title.localeCompare(o.option.title)).slice(0,6).map(n=>n.option):e.slice(0,6)}function he(e,t){const i=H(t);return i?e.find(n=>{const o=H(n.root??""),r=H(n.root?J(n.root):"");return H(n.title)===i||H(n.slug)===i||o===i||r===i||H(n.root?V(n.root):"")===i})??null:null}function Ws(e,t){const i=H(e.title),n=H(e.slug),o=H(e.root??""),r=H(e.root?J(e.root):"");return i===t||n===t||o===t||r===t?0:i.startsWith(t)||n.startsWith(t)||r.startsWith(t)?1:i.includes(t)||n.includes(t)||r.includes(t)?2:o.includes(t)?3:null}function H(e){return e.trim().toLowerCase().replace(/^~(?=\/)/u,"").replace(/\s+/g," ")}function Fs(e){const t=e.trim();return/^(~\/|\/|\.{1,2}\/)/u.test(t)||t.includes("/")}function Bs(e,t){const i=H(t);return i?[e.root??"",e.root?V(e.root):"",e.root?J(e.root):"",e.slug,e.title].map(H).some(o=>o===i||o.endsWith(i)):!1}function Ds(e){return[fe(e.agentCount,"agent"),fe(e.sessionCount,"session"),e.lastActivityAt?_(e.lastActivityAt):null].filter(Boolean).join(" · ")}function fe(e,t){return`${e} ${t}${e===1?"":"s"}`}function Os(e,t){return Ve(e,t)}function je(e){return/^native:process:/iu.test(e??"")}function zs(e){return e.startsWith("/")||e.startsWith("~/")||e.includes("/")&&/\.(jsonl?|events)$/i.test(e)}function we(e,t,i){const n=e?.trim()??"";return!n||zs(n)?t:n}function Hs({session:e,sessionRef:t,threads:i,lookup:n,route:o,navigate:r,nowMs:a}){const[c,m]=h.useState(null),f=e?.agentName??o.selectedAgentId??o.agentId??"Session",j=e?.harness??"session",x=n?.kind==="observe"?n.observe.data:null,w=x?.metadata?.session,y=e?.lastActivityAt??n?.session?.lastMessageAt??null,[T,L,S]=h.useMemo(()=>[oe(x),ke(x,y),Ks(x,y)],[x,y]),E=w?.gitBranch??n?.session?.currentBranch??e?.branch??null,W=w?.model??null,P=w?.turnCount??x?.metadata?.usage?.assistantMessages??(n?.kind==="conversation"?n.session.messageCount:null),B=L?_(L,a):e?.lastActivityAt?_(e.lastActivityAt,a):"—",A=e?.working?`live · last ${B}`:B!=="—"?`last ${B}`:"trace resolving",N=we(e?.work,f),D=ve(t),I=n?.session??null,k=n?.kind==="observe"?n.observe.agentId??I?.agentId??e?.agentId:I?.agentId??e?.agentId,u=n?.kind==="observe"?n.observe.sessionId:I?.harnessSessionId,g=[f,j,W,E,T?`started ${We(T)}`:null,S,P!=null?`turn ${v(P)}`:null,D].filter(p=>!!p&&p!=="—");h.useEffect(()=>{let p=!0;return m(null),!k&&!u&&!t?()=>{p=!1}:(Oe({includeDiscovered:!0}).then(R=>{p&&m(ms(R,{agentId:k,sessionRefs:[t,u,e?.sessionId]}))}).catch(()=>{p&&m(null)}),()=>{p=!1})},[e?.sessionId,t,k,u]);const b=()=>{c&&Ue(r,{view:"terminal",terminalSessionId:c.terminalSessionId,terminalSurfaceKey:c.terminalSurfaceKey,mode:"takeover"},{returnTo:o})},d=c?hs(c,"takeover"):null;return s.jsxs("section",{className:"pi-sessionOverview","aria-label":"Session overview",children:[s.jsxs("section",{className:"pi-sessionMasthead","data-state":e?.working?"working":"recent",children:[s.jsxs("div",{className:"pi-sessionMastTop",children:[s.jsx("span",{className:"pi-sessionCrumb",children:"Sessions ▸"}),s.jsx("h2",{className:"pi-sessionHeadline",title:N,children:N}),s.jsxs("span",{className:"pi-sessionState",children:[e?.working?s.jsx("span",{className:"pi-sessionLiveDot","aria-hidden":!0}):null,A]})]}),s.jsx("div",{className:"pi-sessionMeta",children:g.map((p,R)=>s.jsxs("span",{title:R===g.length-1?t:p,children:[R===1?s.jsx(ge,{harness:j,size:11}):null,p]},`${p}:${R}`))}),c?s.jsxs("div",{className:"pi-sessionTerminalActions","aria-label":"tmux terminal actions",children:[s.jsxs("span",{className:"pi-sessionTerminalName",title:c.sessionName,children:["tmux · ",c.sessionName]}),s.jsx("button",{type:"button",onClick:b,children:"Open in web terminal"}),d?s.jsxs("a",{href:d,children:["Open in native terminal",s.jsx(cs,{size:11,strokeWidth:1.8,"aria-hidden":!0})]}):null]}):null]}),s.jsx(et,{lookup:n,session:e,threads:i,nowMs:a,route:o,navigate:r})]})}function qs({session:e,sessionRef:t,threads:i,route:n,navigate:o,nowMs:r}){const[a,c]=h.useState(null);return h.useEffect(()=>{c(null)},[t]),s.jsx("main",{className:"pi-sessionDetail","aria-label":"Selected session",children:s.jsxs("div",{className:"pi-sessionContent",children:[s.jsx(Hs,{session:e,sessionRef:t,threads:i,lookup:a,route:n,navigate:o,nowMs:r}),s.jsx(Xe,{sessionRef:t,navigate:o,showObserveRail:!1,onLookup:c})]})})}function v(e){return typeof e!="number"||!Number.isFinite(e)?"—":Math.abs(e)<1e3?e.toLocaleString("en-US"):Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(e).toLowerCase()}function Ne(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?"—":`${v(e)} tok`}function G(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}function Gs(e){const t=G(e?.contextInputTokens),i=G(e?.contextWindowTokens);return t===null||i===null?null:Math.max(0,Math.min(1,t/i))}function _s(e){const t=[{key:"input",label:"input",value:G(e?.inputTokens)??0},{key:"cache-read",label:"cache rd",value:G(e?.cacheReadInputTokens)??0},{key:"cache-write",label:"cache wr",value:G(e?.cacheCreationInputTokens)??0},{key:"output",label:"output",value:G(e?.outputTokens)??0},{key:"reasoning",label:"reasoning",value:G(e?.reasoningOutputTokens)??0}].filter(r=>r.value>0),i=t.reduce((r,a)=>r+a.value,0),n=t.filter(r=>r.key!=="reasoning"||i>0&&r.value/i>=.02);if(n.length>0)return n;const o=G(e?.totalTokens);return o!==null?[{key:"total",label:"total",value:o}]:[]}function Vs({buckets:e}){const t=e.reduce((i,n)=>i+n.value,0);return e.length===0?null:s.jsxs("div",{className:"pi-sessionGlanceTokens","aria-label":"Token usage",children:[s.jsx("div",{className:"pi-sessionGlanceTokenBars",children:e.map(i=>s.jsx("span",{className:"pi-sessionGlanceTokenSeg","data-kind":i.key,style:{flexGrow:t>0?Math.max(.035,i.value/t):1,flexBasis:0},title:`${i.label}: ${Ne(i.value)}`},i.key))}),s.jsx("div",{className:"pi-sessionGlanceTokenLegend",children:e.map(i=>s.jsxs("span",{children:[s.jsx("i",{"data-kind":i.key,"aria-hidden":!0}),i.label," ",s.jsx("b",{children:v(i.value)})]},i.key))})]})}function oe(e){const t=ee(e?.metadata?.session?.sessionStart);if(t!==null)return t;for(const i of e?.events??[]){const n=ee(i.at);if(n!==null)return n}return null}function ke(e,t){for(let o=(e?.events.length??0)-1;o>=0;o-=1){const r=ee(e?.events[o]?.at);if(r!==null)return r}const i=oe(e),n=e?.events.at(-1)?.t;return i!==null&&typeof n=="number"&&Number.isFinite(n)?i+n*1e3:ee(t)}function Ks(e,t){const i=oe(e),n=ke(e,t);if(i!==null&&n!==null)return ie(Math.max(0,n-i))||"—";const o=e?.events.at(-1)?.t;return typeof o=="number"&&Number.isFinite(o)&&ie(o*1e3)||"—"}function ie(e){if(typeof e!="number"||!Number.isFinite(e)||e<0)return"";const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const i=Math.floor(t/60);if(i<60)return`${i}m`;const n=Math.floor(i/60),o=i%60;if(n<48)return o>0?`${n}h ${o}m`:`${n}h`;const r=Math.floor(n/24),a=n%24;return a>0?`${r}d ${a}h`:`${r}d`}function Us(e){const t=e?.metadata?.topology;if(!t)return null;const i=t.agents.length,n=t.agents.filter(c=>c.role!=="lead").length,o=t.groups.filter(c=>c.kind==="workflow").length,r=t.tasks.length,a=[];return n>0?a.push(`${n} worker${n===1?"":"s"}`):i>0&&a.push(`${i} agent${i===1?"":"s"}`),o>0&&a.push(`${o} workflow${o===1?"":"s"}`),r>0&&a.push(`${r} task${r===1?"":"s"}`),a.length?a.join(" · "):null}function Xs(e){return[...e].sort((t,i)=>xe(i.state)-xe(t.state)||i.touches-t.touches||i.lastT-t.lastT||t.path.localeCompare(i.path)).slice(0,5).map(t=>({path:t.path,kind:t.state,detail:[t.touches>1?`${v(t.touches)} touches`:"1 touch",t.lastT>0?`last ${ie(t.lastT*1e3)}`:null].filter(Boolean).join(" · ")}))}function xe(e){switch(e){case"created":return 3;case"modified":return 2;case"read":return 1}}function Ys(e){const t=new Map;for(const i of e){if(i.kind!=="tool")continue;const n=Zs(i.tool||i.text),o=t.get(n)??{count:0,samples:[]};o.count+=1;const r=i.arg||i.detail||i.text;r&&o.samples.length<2&&o.samples.push(r),t.set(n,o)}return[...t.entries()].sort((i,n)=>n[1].count-i[1].count||i[0].localeCompare(n[0])).slice(0,5).map(([i,n])=>({name:i,count:n.count,detail:n.samples.join(" · ")||`${v(n.count)} uses`}))}function Zs(e){return(e.trim().split(/\s+/u)[0]??"tool").replace(/[_-]+/gu," ").toLowerCase()}function Js({usage:e,contextPct:t,topology:i,workspace:n,projectRoot:o,branch:r}){const a=[];return t!==null&&a.push({label:"Context",value:`${t}%`,detail:t>=80?"approaching limit":"within window",tone:t>=80?"warn":void 0}),(e?.serviceTier||e?.planType||e?.speed)&&a.push({label:"Budget",value:e.serviceTier??e.planType??e.speed??"usage",detail:[e.planType,e.speed].filter(Boolean).join(" · ")||"provider metadata"}),n&&o&&n!==o?a.push({label:"Worktree",value:V(n),detail:"session cwd differs from project root",tone:"warn"}):r&&a.push({label:"Repo",value:r,detail:"session branch"}),i&&a.push({label:"Topology",value:i,detail:"observed harness hierarchy"}),(e?.webSearchRequests||e?.webFetchRequests)&&a.push({label:"Network",value:`${v((e.webSearchRequests??0)+(e.webFetchRequests??0))} req`,detail:[e.webSearchRequests?`${v(e.webSearchRequests)} search`:null,e.webFetchRequests?`${v(e.webFetchRequests)} fetch`:null].filter(Boolean).join(" · ")}),a.slice(0,4)}function Qs({session:e,threads:t,nowMs:i}){return t.filter(n=>n.kind==="agent").filter(n=>n.agentId!==e?.agentId||n.work!==e?.work).sort((n,o)=>Number(o.working)-Number(n.working)||o.lastActivityAt-n.lastActivityAt).slice(0,4).map(n=>{const o=!!(e?.branch&&n.branch===e.branch),r=!!(e?.agentName&&n.agentName===e.agentName);return{thread:n,title:we(n.work,n.agentName,n.id),channel:n.conversationId?ve(n.conversationId):n.agentName,state:n.needs?"needs":n.working?"working":"recent",time:n.lastActivityAt?_(n.lastActivityAt,i):"—",participants:n.agentName,why:o?"same branch":r?"same agent":n.working?"active in project":"project thread"}})}function Y({label:e,value:t,title:i,detail:n}){return s.jsxs("span",{className:"pi-sessionGlanceField",title:i,children:[s.jsx("span",{children:e}),s.jsx("b",{children:t}),n?s.jsx("small",{children:n}):null]})}function et({lookup:e,session:t,threads:i,nowMs:n,route:o,navigate:r}){const[a,c]=h.useState(!1),m=h.useMemo(()=>{const k=e?.kind==="observe"?e.observe.data:null,u=k?.metadata?.session,g=k?.metadata?.usage,b=k?.events??[],d=k?.files??[],p=u?.turnCount??g?.assistantMessages??(e?.kind==="conversation"?e.session.messageCount:null),R=b.filter(U=>U.kind==="tool").length,M=d.filter(U=>U.state==="created").length,l=d.filter(U=>U.state==="modified").length,$=d.filter(U=>U.state==="read").length,O=M+l,F=Gs(g),z=F!==null?Math.round(F*100):null,C=u?.cwd??e?.session?.workspaceRoot??t?.projectRoot??null,K=u?.gitBranch??e?.session?.currentBranch??t?.branch??null,q=Us(k),se=Ne(g?.totalTokens??(typeof g?.inputTokens=="number"||typeof g?.outputTokens=="number"?(g?.inputTokens??0)+(g?.outputTokens??0):null)),ye=_s(g),Ce=O>0?[l>0?`${v(l)} mod`:null,M>0?`${v(M)} new`:null].filter(Boolean).join(" · "):$>0?"read-only":"no file trace",Ae=d.length>0?`${v(d.length)} touched`:"—",Re=Xs(d),Te=Ys(b),Le=Js({usage:g,contextPct:z,topology:q,workspace:C,projectRoot:t?.projectRoot,branch:K}),Pe=Qs({session:t,threads:i,nowMs:n});return{turnCount:p,toolCount:R,editCount:O,fileCountLabel:Ae,fileStateLabel:Ce,workspace:C,contextPct:z,showContext:z!==null,contextWarn:z!==null&&z>=80,tokenTotal:se,buckets:ye,fileSignals:Re,toolSignals:Te,contextSignals:Le,threadSignals:Pe,projectRoot:t?.projectRoot??null}},[e,t,i,n]),{turnCount:f,toolCount:j,editCount:x,fileCountLabel:w,fileStateLabel:y,workspace:T,contextPct:L,showContext:S,contextWarn:E,tokenTotal:W,buckets:P,fileSignals:B,toolSignals:A,contextSignals:N,threadSignals:D,projectRoot:I}=m;return s.jsxs("section",{className:"pi-sessionGlance","aria-label":"Session glance",children:[s.jsxs("div",{className:"pi-sessionVitals","aria-label":"Session vitals",children:[s.jsx(Y,{label:"Turns",value:v(f)}),s.jsx(Y,{label:"Tools",value:v(j)}),s.jsx(Y,{label:"Edits",value:v(x)}),s.jsx(Y,{label:"Files",value:w,detail:y!=="no file trace"?y:null}),T&&I&&T!==I?s.jsx(Y,{label:"Worktree",value:V(T),title:T}):null,S?s.jsxs("span",{className:"pi-sessionContextVital",title:"Context window usage",children:[s.jsx("span",{children:"Ctx"}),s.jsx("span",{className:"pi-sessionContextBar","aria-hidden":!0,children:s.jsx("span",{"data-warn":E||void 0,style:{width:`${L}%`}})}),s.jsxs("b",{"data-warn":E||void 0,children:[L,"%"]})]}):null,P.length>0?s.jsxs("button",{type:"button",className:"pi-sessionTokenToggle","aria-expanded":a,onClick:()=>c(k=>!k),children:[s.jsx("span",{children:"Tokens"}),s.jsx("b",{children:W}),s.jsx("i",{children:a?"▾":"▸"})]}):null]}),a&&P.length>0?s.jsx(Vs,{buckets:P}):null,s.jsx(st,{files:B,tools:A,context:N,threads:D,route:o,navigate:r})]})}function st({files:e,tools:t,context:i,threads:n,route:o,navigate:r}){return s.jsxs("section",{className:"pi-sessionSignals","aria-label":"Session work signals",children:[s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsxs("div",{className:"pi-sessionSignalHead",children:[s.jsx("span",{children:"Files"}),s.jsx("b",{children:v(e.length)})]}),e.length>0?s.jsx("div",{className:"pi-sessionFileList",children:e.map(a=>s.jsxs("div",{className:"pi-sessionFileRow",children:[s.jsx("span",{"data-kind":a.kind,children:a.kind}),s.jsx("code",{title:a.path,children:a.path}),s.jsx("small",{children:a.detail})]},`${a.kind}:${a.path}`))}):s.jsx("span",{className:"pi-sessionSignalEmpty",children:"No file trace yet."})]}),s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsx("div",{className:"pi-sessionSignalHead",children:s.jsx("span",{children:"Tools · Context · Topology"})}),t.length>0?s.jsx("div",{className:"pi-sessionToolGrid",children:t.map(a=>s.jsxs("span",{className:"pi-sessionToolPill",title:a.detail,children:[s.jsx("b",{children:a.name}),s.jsx("em",{children:v(a.count)})]},a.name))}):null,i.length>0?s.jsx("div",{className:"pi-sessionContextList",children:i.map(a=>s.jsxs("div",{className:"pi-sessionContextRow",children:[s.jsx("span",{children:a.label}),s.jsx("b",{"data-tone":a.tone,children:a.value}),s.jsx("small",{children:a.detail})]},`${a.label}:${a.value}`))}):t.length===0?s.jsx("span",{className:"pi-sessionSignalEmpty",children:"Trace metadata is still resolving."}):null]}),s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsxs("div",{className:"pi-sessionSignalHead",children:[s.jsx("span",{children:"Recent threads"}),s.jsx("b",{children:v(n.length)})]}),n.length>0?s.jsx("div",{className:"pi-sessionThreadList",children:n.map(a=>s.jsxs("button",{type:"button",className:"pi-sessionThreadRow",onClick:()=>r(be(a.thread,o)),children:[s.jsx("span",{className:"pi-sessionThreadTitle",title:a.title,children:a.title}),s.jsxs("span",{className:"pi-sessionThreadMeta",children:[s.jsx("b",{children:a.channel}),s.jsx("em",{children:a.state}),s.jsx("small",{children:a.time})]}),s.jsxs("span",{className:"pi-sessionThreadWhy",children:[a.participants," · ",a.why]})]},a.thread.id))}):s.jsx("span",{className:"pi-sessionSignalEmpty",children:"No recent agent threads."})]})]})}function ne(e){return!e||e==="—"||/^\d+\s+branches$/iu.test(e)?null:e}function Se(e,t,i,n){const o=new Map,r=(c,m)=>{const f=c??e,j=ne(m),x=f??"project",w=o.get(x);if(w)return!w.branch&&j&&(w.branch=j),w;const y={key:x,root:f,branch:j,sessions:0,work:0,moving:0,lastActivityAt:0,repoWatch:null};return o.set(x,y),y};for(const c of t){const m=r(c.root,c.branch);c.working&&(m.moving+=1),m.lastActivityAt=Math.max(m.lastActivityAt,c.lastActivityAt)}const a=(c,m)=>{const f=c??e,j=o.get(f??"project");return j||(t.length>0?o.get(e??"")??o.values().next().value:r(c,m))};for(const c of i){const m=a(c.workspaceRoot??c.projectRoot,c.branch);m.sessions+=1,c.working&&(m.moving+=1,m.branch=ne(c.branch)??m.branch),m.lastActivityAt=Math.max(m.lastActivityAt,c.lastActivityAt)}for(const c of n){const m=a(c.workspaceRoot??c.projectRoot,c.branch);m.work+=1,c.working&&(m.moving+=1,m.branch=ne(c.branch)??m.branch),m.lastActivityAt=Math.max(m.lastActivityAt,c.lastActivityAt)}return o.size===0&&r(e,null),[...o.values()].sort((c,m)=>m.moving-c.moving||m.lastActivityAt-c.lastActivityAt||(c.root??"").localeCompare(m.root??""))}function tt(e){return e.worktrees.map(t=>({key:t.id,root:t.path,branch:t.branch.name,sessions:t.sessions.length,work:t.agents.length,moving:t.agents.some($e)?1:0,lastActivityAt:t.lastCommitAt??0,repoWatch:t}))}function nt({pullRequests:e,loading:t,warnings:i,onRefresh:n,nowMs:o}){return s.jsxs("section",{className:"pi-projectPullRequests","aria-label":"Open pull requests",children:[s.jsxs("div",{className:"pi-projectPullRequestsHead",children:[s.jsx("span",{children:"Open PRs"}),s.jsx("b",{children:t&&e.length===0?"…":v(e.length)})]}),e.length>0?s.jsx("div",{className:"pi-projectPullRequestList",children:e.slice(0,6).map(r=>{const a=r.updatedAt?Date.parse(r.updatedAt):Number.NaN;return s.jsxs("a",{className:"pi-projectPullRequest",href:r.url,target:"_blank",rel:"noreferrer",children:[s.jsxs("span",{className:"pi-projectPullRequestNumber",children:["#",r.number]}),s.jsx("b",{title:r.title,children:r.title}),s.jsxs("span",{className:"pi-projectPullRequestBranch",title:`${r.headRefName} → ${r.baseRefName}`,children:[r.headRefName," → ",r.baseRefName]}),s.jsx("em",{children:r.isDraft?"draft":"open"}),s.jsx("time",{children:Number.isFinite(a)?_(a,o):"updated"})]},r.id)})}):s.jsxs("div",{className:"pi-projectPullRequestState","data-loading":t||void 0,children:[s.jsx("span",{children:t?"Checking GitHub for open pull requests…":i[0]??"No open pull requests for this repository."}),!t&&i.length>0?s.jsx("button",{type:"button",onClick:n,children:"Retry"}):null]})]})}function it(e){const t=new Set;let i=0,n=0;const o=[];for(const r of e.layers){r.files.length>0&&o.push(r.kind);for(const a of r.files)t.add(a.newPath??a.oldPath??"unknown"),i+=a.additions??0,n+=a.deletions??0}return{additions:i,deletions:n,files:[...t],layers:o}}function ot({additions:e,deletions:t}){return e+t===0?s.jsx("span",{className:"pi-projectWorktreeChurnBar","data-empty":!0}):s.jsxs("span",{className:"pi-projectWorktreeChurnBar","aria-label":`${e} additions and ${t} deletions`,children:[e>0?s.jsx("i",{"data-add":!0,style:{flexGrow:e}}):null,t>0?s.jsx("i",{"data-delete":!0,style:{flexGrow:t}}):null]})}function at({project:e,repoProject:t,repoLoading:i,repoError:n,diffSnapshots:o,diffErrors:r,diffLoading:a,pullRequests:c,pullRequestsLoading:m,pullRequestWarnings:f,onRepositoryRefresh:j,threads:x,sessions:w,route:y,navigate:T,nowMs:L}){const S=e?.root??w[0]?.projectRoot??x[0]?.projectRoot??null,E=x.length,W=e?.sessionCount??w.length,P=e?.agentCount??0,B=Math.max(e?.lastActivityAt??0,w[0]?.lastActivityAt??0,x[0]?.lastActivityAt??0),A=e?.branches.length?e.branches:[...new Set([...w.map(u=>u.branch),...x.map(u=>u.branch)].filter(u=>!!u&&u!=="—"&&u!=="main"))],N=t?.worktrees.length?tt(t):Se(S,e?.worktrees??[],w,x),D=N.find(u=>u.moving>0&&u.branch)?.branch??N.find(u=>u.branch)?.branch??A[0]??"main",I=S?J(S):e?.title??y.projectSlug??"project",k=N.find(u=>u.moving>0)?.key??N.find(u=>u.branch===D)?.key??N[0]?.key;return s.jsxs("main",{className:"pi-projectOverview","aria-label":"Project overview",children:[s.jsxs("section",{className:"pi-projectSnapshot","aria-label":"Project snapshot",children:[s.jsxs("div",{className:"pi-projectRepository",children:[s.jsxs("div",{className:"pi-projectRepositoryHead",children:[s.jsx("span",{children:"Repository"}),s.jsx(us,{size:13,strokeWidth:1.7,"aria-hidden":!0})]}),s.jsxs("div",{className:"pi-projectRepositoryIdentity",children:[s.jsx("b",{children:I}),s.jsx("span",{title:S??void 0,children:S?V(S):y.projectSlug??"project"})]}),s.jsxs("div",{className:"pi-projectRepositoryCurrent",children:[N.some(u=>u.moving>0)?s.jsx("span",{className:"pi-projectRepositoryPulse","aria-label":"Active now"}):null,s.jsxs("span",{children:[s.jsx("small",{children:"Current branch"}),s.jsx("b",{title:D,children:D})]}),s.jsx("time",{children:B?_(B,L):"no activity"})]}),W>0||P>0||E>0?s.jsxs("div",{className:"pi-projectRepositoryStats","aria-label":"Repository activity",children:[W>0?s.jsxs("span",{children:[s.jsx("b",{children:v(W)})," ",W===1?"session":"sessions"]}):null,P>0?s.jsxs("span",{children:[s.jsx("b",{children:v(P)})," ",P===1?"agent":"agents"]}):null,E>0?s.jsxs("span",{children:[s.jsx("b",{children:v(E)})," ",E===1?"thread":"threads"]}):null]}):null]}),s.jsxs("div",{className:"pi-projectWorktrees",children:[s.jsxs("div",{className:"pi-projectWorktreesHead",children:[s.jsx("span",{children:"Worktree preview"}),s.jsx("b",{children:v(N.length)})]}),s.jsx("div",{className:"pi-projectWorktreeList",children:N.slice(0,6).map(u=>{const g=u.repoWatch,b=u.root?o.get(u.root)??null:null,d=b?it(b):null,p=g?Ie(g):null,R=d?.additions??p?.add??0,M=d?.deletions??p?.del??0,l=d?.files.length??(g?Math.max(g.status.changedFiles,p?.files??0):0),$=!!(l>0||g&&(!g.status.clean||g.branch.ahead>0||g.branch.behind>0)),O=c.filter(C=>C.headRefName===u.branch),F=!!(u.root&&a&&!b&&!r.has(u.root)),z=u.root?r.get(u.root)??null:"No worktree path is available.";return s.jsxs("article",{className:"pi-projectWorktree","data-active":u.key===k||void 0,"data-stranded":$||void 0,children:[s.jsx("span",{className:"pi-projectWorktreeTop",children:s.jsx("b",{title:u.branch??"main",children:u.branch??"main"})}),s.jsx("em",{title:u.root??void 0,children:u.root?V(u.root):"workspace"}),b||g?s.jsxs("div",{className:"pi-projectWorktreeDiff","data-clean":!$||void 0,children:[$?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"pi-projectWorktreeChurn",children:[s.jsxs("b",{className:"pi-projectWorktreeAdd",children:["+",v(R)]}),s.jsxs("b",{className:"pi-projectWorktreeDel",children:["−",v(M)]}),s.jsx(ot,{additions:R,deletions:M})]}),s.jsxs("small",{children:[v(l)," changed"]})]}):s.jsx("small",{children:"clean"}),u.root?s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:()=>T({view:"repo-diff",path:u.root}),children:"View diff"}):null]}):s.jsxs("div",{className:"pi-projectWorktreeDiff","data-pending":!0,children:[s.jsx("small",{children:F||i?"Reading worktree diff…":z??n??"No diff data returned."}),!F&&!i?s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:j,children:"Retry"}):null]}),d&&d.files.length>0?s.jsxs("span",{className:"pi-projectWorktreeFiles",title:d.files.join(`
|
|
2
|
+
`),children:[d.files.slice(0,2).map(C=>J(C)).join(" · "),d.files.length>2?` · +${d.files.length-2} more`:""]}):null,s.jsx("span",{className:"pi-projectWorktreeMeta",children:g?s.jsxs(s.Fragment,{children:[s.jsx("small",{children:g.branch.ahead>0||g.branch.behind>0?`${g.branch.ahead}↑ ${g.branch.behind}↓`:"synced"}),g.status.staged>0?s.jsxs("small",{children:[v(g.status.staged)," staged"]}):null,g.status.unstaged>0?s.jsxs("small",{children:[v(g.status.unstaged)," unstaged"]}):null,g.status.untracked>0?s.jsxs("small",{children:[v(g.status.untracked)," untracked"]}):null,g.status.conflicts>0?s.jsxs("small",{children:[v(g.status.conflicts)," conflicts"]}):null,d?.layers.map(C=>s.jsx("small",{children:C},C)),O.length>0?s.jsxs("small",{children:[O.length," PR",O.length===1?"":"s"]}):null]}):s.jsxs(s.Fragment,{children:[s.jsx("small",{children:u.lastActivityAt?_(u.lastActivityAt,L):"idle"}),s.jsxs("small",{children:[v(u.sessions)," sessions"]}),s.jsxs("small",{children:[v(u.work)," threads"]})]})})]},u.key)})}),N.length>6?s.jsxs("div",{className:"pi-projectWorktreeMore",children:["+",N.length-6," more worktrees"]}):null]})]}),s.jsx(nt,{pullRequests:c,loading:m,warnings:f,onRefresh:j,nowMs:L})]})}function rt({project:e,threads:t,sessions:i,route:n,navigate:o,nowMs:r}){const a=e?.root??i[0]?.projectRoot??t[0]?.projectRoot??null,c=h.useMemo(()=>Se(a,e?.worktrees??[],i,t).map(f=>f.root).filter(f=>!!f),[e?.worktrees,a,i,t]),m=Ss(a,c);return s.jsx(at,{project:e,repoProject:m.project,repoLoading:m.repoLoading,repoError:m.repoError,diffSnapshots:m.diffSnapshots,diffErrors:m.diffErrors,diffLoading:m.diffLoading,pullRequests:m.pullRequests,pullRequestsLoading:m.pullRequestsLoading,pullRequestWarnings:m.pullRequestWarnings,onRepositoryRefresh:m.refresh,threads:t,sessions:i,route:n,navigate:o,nowMs:r})}function ei({route:e,navigate:t,zeroPreview:i=!1,embedded:n=!1}){const{model:o,nowMs:r,loading:a,error:c,agents:m=ys}=Je(e),f=!!e.projectSlug,j=e.projectSlug?ze(o,e.projectSlug)??e.projectSlug:null,x=j&&j!==e.projectSlug?{...e,projectSlug:j}:e,w=f&&!je(e.sessionId)?e.sessionId??null:null,y=h.useMemo(()=>w?Os(o.sessions,x):null,[x,o.sessions,w]),T=f?e.indexView==="agents"?"agents":e.indexView==="sessions"?"sessions":"overview":"overview",L=f?o.projects.find(b=>b.slug===j)??null:null,S=f?L?.title??j:"Projects";es(S,n);const E=h.useMemo(()=>{if(i)return[];if(!f)return[];const b=j,d=Z(o.threads,b),p=ae(o.sessions,b);return T==="overview"?[]:T==="agents"?[]:p.length>0?p:d},[j,o.sessions,o.threads,T,f,i]),W=h.useMemo(()=>He(E),[E]),P=h.useMemo(()=>W.flatMap(b=>b.items),[W]),B=o.projects.length>0||o.threads.length>0||o.sessions.length>0,A=a&&!B,N=a&&!i,D=!f&&!N&&(i||o.projects.length===0&&E.length===0),I=!f&&!D,[k,u]=h.useState(-1),g=h.useRef(new Map);return h.useEffect(()=>{!f||!e.sessionId||!je(e.sessionId)||t({...x,indexView:"sessions",sessionId:void 0,selectedAgentId:void 0})},[x,t,e.sessionId,f]),h.useEffect(()=>{u(-1)},[j]),h.useEffect(()=>{function b(d){const p=document.activeElement;if(!!p&&(p.tagName==="INPUT"||p.tagName==="TEXTAREA"||p.isContentEditable))return;const M=P.length;if(M){if(d.key==="ArrowDown"||d.key==="j")d.preventDefault(),u(l=>l<0?0:Math.min(M-1,l+1));else if(d.key==="ArrowUp"||d.key==="k")d.preventDefault(),u(l=>l<0?0:Math.max(0,l-1));else if(d.key==="Enter"){const l=P[k<0?0:k];l&&(d.preventDefault(),t(l.kind==="session"?re(l,x):le(l,x)))}}}return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[k,x,P,t]),h.useEffect(()=>{if(k<0)return;const b=P[k];b&&g.current.get(b.id)?.scrollIntoView({block:"nearest"})},[k,P]),s.jsxs("div",{className:"s-pi s-pi-inbox","aria-busy":a||void 0,"data-loading":a||void 0,children:[f?s.jsx(Ts,{route:x,navigate:t,slug:j,model:o,mode:T,repoProject:null}):s.jsx("div",{className:"pi-inboxHead",children:s.jsxs("div",{className:"pi-inboxHeading",children:[s.jsx("h1",{className:"pi-inboxTitle",children:"Projects"}),s.jsx("span",{className:"pi-inboxDigest",children:Ps(o,i)})]})}),w?s.jsx(qs,{session:y,sessionRef:w,threads:Z(o.threads,j),route:x,navigate:t,nowMs:r}):f&&T==="overview"?s.jsx(rt,{project:L,threads:Z(o.threads,j),sessions:ae(o.sessions,j),route:x,navigate:t,nowMs:r}):f&&T==="agents"&&L?s.jsx(Ye,{project:L,threads:Z(o.threads,j),route:x,navigate:t,nowMs:r}):I?s.jsx(Ze,{model:o,agents:m,route:e,navigate:t,nowMs:r}):s.jsxs("div",{className:"pi-threads",children:[A?s.jsx(Rs,{}):null,!A&&W.map(b=>{let d=0;for(const p of W){if(p.group===b.group)break;d+=p.items.length}return s.jsxs("div",{children:[s.jsxs("div",{className:"pi-sectionHead","data-tone":b.group,children:[s.jsx("span",{className:"pi-sectionLabel",children:b.label}),s.jsx("span",{className:"pi-sectionCount",children:b.items.length})]}),b.items.map((p,R)=>{const M=d+R;return s.jsx(As,{thread:p,crossProject:!f,selected:p.kind==="session"?Ge(p,x,o.sessions):_e(p,x,o.threads),cursor:k===M,nowMs:r,onSelect:()=>{const l=p.kind==="session"?qe(p,x):be(p,x);t(l)},onOpen:()=>t(p.kind==="session"?re(p,x):le(p,x)),rowRef:l=>{l?g.current.set(p.id,l):g.current.delete(p.id)}},p.id)})]},b.group)}),!A&&E.length===0?c&&!B?s.jsx(pe,{tone:"error",title:"Projects unavailable",detail:c}):D?s.jsx("div",{className:"pi-empty",children:s.jsx(Ms,{route:e,navigate:t,projects:o.projects})}):N?s.jsx("div",{className:"pi-empty",children:"Loading…"}):s.jsx(pe,{title:lt(f,T)}):null]})]})}function lt(e,t){return e&&t==="agents"?"No visible agents in this project.":e?"No sessions in this project yet.":"No projects yet."}export{ei as ProjectsInbox,As as ThreadRow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as p,j as e}from"./index-C1VaWNuD.js";import{t as P}from"./time-Dhsh_2EG.js";import{F as y,A as b}from"./AddProjectForm-fXndbzXT.js";import{s as k}from"./project-overview-helpers-BQTc_Ous.js";import{u as C}from"./projects-inbox-DFbgVlXL.js";import{r as A}from"./Provider-D0bB7q6y.js";import{S as x}from"./search-FB2vVxCp.js";import{X as w}from"./x-DgmmnPKt.js";import{C as F}from"./chevron-down-D120PY4g.js";import{F as v}from"./DocumentFocusViewer-D8iB6SMt.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./createLucideIcon-Dv8H8m7J.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./tail-events-LK29oCKm.js";import"./conversation-model-C2KuZUXc.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";function G(t){return t.needs>0?"needs":t.working>0||t.liveSessionCount>0?"working":"idle"}function L(t){return[t.title,t.slug,t.root??""].join(" ").toLowerCase()}function R(t,a,s){const o=a.trim().toLowerCase();return[...o?t.filter(i=>L(i).includes(o)):t].sort((i,n)=>s==="name"?i.title.localeCompare(n.title):n.lastActivityAt-i.lastActivityAt||i.title.localeCompare(n.title))}function W({rows:t=7}){return e.jsx("div",{className:"pi-railLoading","aria-hidden":"true",children:Array.from({length:t},(a,s)=>e.jsx("div",{className:"pi-projectGroup pi-projectGroup--loading",children:e.jsx("div",{className:"pi-projectGroupHead pi-projectGroupHead--flat",children:e.jsxs("span",{className:"pi-projectPath pi-projectPath--flat",children:[e.jsx(v,{size:13,strokeWidth:1.6,"aria-hidden":!0}),e.jsxs("span",{className:"pi-projectPathStack",children:[e.jsx("span",{className:"pi-loadingLine pi-loadingLine--railProject"}),e.jsx("span",{className:"pi-loadingLine pi-loadingLine--railRoot"})]})]})})},s))})}function Pe({route:t,navigate:a,zeroPreview:s=!1}){const{model:o,nowMs:l,loading:i,error:n}=C(t),[c,j]=p.useState(""),[d,N]=p.useState("recent"),[h,u]=p.useState(!1),m=p.useMemo(()=>R(s?[]:o.projects,c,d),[o.projects,c,d,s]),g=t.projectSlug?A(o,t.projectSlug)??t.projectSlug:void 0,f=i&&o.projects.length===0&&!s,S=p.useCallback(r=>{a({view:"agents-v2",projectSlug:r,...t.machineId?{machineId:t.machineId}:{},...t.showEphemeral?{showEphemeral:!0}:{}})},[a,t.machineId,t.showEphemeral]);return e.jsxs("nav",{className:"s-pi s-pi-rail","aria-label":"Projects","aria-busy":i||void 0,"data-loading":i||void 0,children:[e.jsxs("div",{className:"pi-railFind",role:"search",children:[e.jsx(x,{size:13,strokeWidth:1.8,"aria-hidden":!0}),e.jsx("input",{className:"pi-railFindInput",type:"search",value:c,placeholder:"Find project","aria-label":"Find project",onChange:r=>j(r.currentTarget.value)}),c?e.jsx("button",{type:"button",className:"pi-railFindClear","aria-label":"Clear",onClick:()=>j(""),children:e.jsx(w,{size:12,strokeWidth:2,"aria-hidden":!0})}):null]}),e.jsx("div",{className:"pi-railBody",children:e.jsxs("div",{className:"pi-railGroup pi-railGroup--projects",children:[e.jsxs("div",{className:"pi-railProjectTools",children:[e.jsx("div",{className:"pi-railLabel",children:"Projects"}),e.jsxs("label",{className:"pi-railSortWrap",title:"Sort projects",children:[e.jsx("span",{className:"pi-srOnly",children:"Sort projects"}),e.jsxs("select",{className:"pi-railSort",value:d,"aria-label":"Sort projects",onChange:r=>N(r.currentTarget.value),children:[e.jsx("option",{value:"recent",children:"Recent"}),e.jsx("option",{value:"name",children:"Name"})]}),e.jsx(F,{size:12,strokeWidth:2,"aria-hidden":!0})]}),e.jsx("button",{type:"button",className:"pi-railAddBtn","aria-expanded":h,"aria-label":"Add project",title:"Add a project by path",onClick:()=>u(r=>!r),children:e.jsx(y,{size:13,strokeWidth:1.8,"aria-hidden":!0})})]}),h?e.jsx(b,{onClose:()=>u(!1)}):null,f?e.jsx(W,{}):n&&m.length===0?e.jsx("div",{className:"pi-railEmpty",children:"Projects unavailable."}):m.length===0?e.jsx("div",{className:"pi-railEmpty",children:c?"No projects matched.":"No projects yet."}):e.jsx("div",{className:"pi-projectIndex",children:m.map(r=>e.jsx(E,{project:r,selected:g===r.slug,nowMs:l,onOpen:S},r.slug))})]})}),e.jsx("div",{className:"pi-railFoot",children:e.jsxs("button",{type:"button",className:"pi-railFootBtn",onClick:()=>a({view:"search"}),children:[e.jsx(x,{size:13,strokeWidth:1.8,"aria-hidden":!0}),"Search all Scout"]})})]})}function E({project:t,selected:a,nowMs:s,onOpen:o}){const l=G(t),i=t.lastActivityAt?P(t.lastActivityAt,s):"No activity";return e.jsx("div",{className:"pi-projectGroup pi-projectGroup--flat","data-selected":a||void 0,"data-state":l,children:e.jsx("div",{className:"pi-projectGroupHead pi-projectGroupHead--flat",children:e.jsxs("button",{type:"button",className:"pi-projectPath pi-projectPath--flat",title:t.root??t.title,"aria-current":a?"page":void 0,"aria-label":`Open /${t.title}`,onClick:()=>o(t.slug),children:[e.jsx(v,{size:13,strokeWidth:1.6,"aria-hidden":!0}),e.jsxs("span",{className:"pi-projectPathStack",children:[e.jsxs("span",{className:"pi-projectPathText",children:["/",t.title]}),e.jsxs("span",{className:"pi-projectPathMeta",children:[e.jsx("span",{children:t.root?k(t.root):"Discovered project"}),e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsxs("span",{children:[t.worktreeCount," ",t.worktreeCount===1?"worktree":"worktrees"]}),e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsx("time",{children:i})]})]}),l!=="idle"?e.jsx("span",{className:"pi-projectState","data-state":l,children:l==="needs"?"Needs you":"Active"}):null]})})})}export{Pe as ProjectsRail,R as filterAndSortProjects};
|