@openscout/scout 0.2.96 → 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-IqOtJfRs.js → AddProjectForm-fXndbzXT.js} +1 -1
- package/dist/client/assets/{AgentAvatar-6-KBVKUu.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-C9rn3Fj5.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-DI2iW9zO.js → AgentLaneCard-Cc9uyfBr.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D8bARHMx.js → AgentLaneChrome-Dv2lBFoH.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-52un7dKC.js → AgentLaneDetailSheet-CGqtqSHQ.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-CEBjmPTa.js → AgentLaneSummaryResize-Di4u6df2.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-q20mTjms.js → AgentLanesPreflight-CCGBArIb.js} +1 -1
- package/dist/client/assets/AgentLanesView-96lHsoX7.js +2 -0
- package/dist/client/assets/{AgentLiveActions-DrEJDJef.js → AgentLiveActions-DlSKL60c.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +1 -0
- package/dist/client/assets/{AgentSessions-DCPCG4xb.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-DbjQtfD_.js → AstronautSuit-CwB4Dw07.js} +1 -1
- package/dist/client/assets/{AtopView-Daq_ob3z.js → AtopView-D7vyQDtE.js} +1 -1
- package/dist/client/assets/{BackToPicker-CXZjBRAe.js → BackToPicker-BHicJyfc.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +1 -0
- package/dist/client/assets/{BriefingsScreen-B5oMTGKv.js → BriefingsScreen-Cn4Mbam9.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-BsiU8lTD.js → BrokerMetadataPanel-BJSwU9XZ.js} +1 -1
- package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +5 -0
- package/dist/client/assets/{CastPicker-_5E5hNUe.js → CastPicker-CkgTalIt.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-D-eXhzPf.js → ChatCollapsedStrip-7Wrg8Ge0.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-n7W4iGUG.js → CodeDiffPane-DfluIWmO.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-CMsbSTDq.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-Dujvnmup.js → ConversationPanels-o6W-cOoU.js} +2 -2
- package/dist/client/assets/ConversationScreen-DIU7m_aC.js +2 -0
- package/dist/client/assets/{ConversationStatus-DVzSb2Hv.js → ConversationStatus-CTYOywFh.js} +1 -1
- package/dist/client/assets/{CrewAvatar-BwXjyg8N.js → CrewAvatar-CZ_faQ_s.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +1 -0
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
- package/dist/client/assets/{DataTable-Bp8tU9AK.js → DataTable-C6aMSilS.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-B-6rmXzL.js → DispatchAftermath-ZCEB75hh.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-Do3wQ_3Z.js → DocumentFocusViewer-D8iB6SMt.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-C1orRyP9.js → EmbeddableSurfacesLab-D3iZiS8o.js} +1 -1
- package/dist/client/assets/{EmptyState-CJzXj1l5.js → EmptyState-CKPWFSjq.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Df6VzXjA.js → FileViewerPane-CxNbcTYf.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +1 -0
- package/dist/client/assets/{FollowScreen-DvnxYLVh.js → FollowScreen-CkR-okdL.js} +1 -1
- package/dist/client/assets/{HarnessMark-B979GCSB.js → HarnessMark-DttReffF.js} +1 -1
- package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +1 -0
- package/dist/client/assets/{HerdrSession-B3McuYgi.js → HerdrSession-DsuxCtfX.js} +1 -1
- package/dist/client/assets/{HomeHero-CdUVPjkG.js → HomeHero-DXJo2QSO.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-Bok5Sk5c.js → HostAdvisorView-DeJ-8RZV.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-B7XSoJsu.js → KnowledgeSearchInspector-W_zNIBRV.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-HByf2ndx.js → LaneToolHoverCard-t7-XJP-h.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-DM-hoPxG.js → LaneTraceEventFocus-BB5DhFQm.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DCLJRsBy.js → MeshCanvas-DZv2ipsy.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-cEFS9eW7.js → MeshCanvasMinimap-BXHRNb7l.js} +1 -1
- package/dist/client/assets/MeshScreen-DuNvpDC5.js +1 -0
- package/dist/client/assets/{MeshTopologyView-CCRPd8PU.js → MeshTopologyView-Dc0GSrKa.js} +2 -2
- package/dist/client/assets/MessagesScreen-dNNPFwAc.js +1 -0
- package/dist/client/assets/{MissionContextRail-DF0_kiU7.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-BbdDKjUl.js → MissionLogPane-BLvSSIdT.js} +1 -1
- package/dist/client/assets/{NewAgentModal-DfHxad34.js → NewAgentModal-B7qxjZlW.js} +1 -1
- package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +19 -0
- package/dist/client/assets/{NewChatOrigin-B1u7ki70.js → NewChatOrigin-DCn5cWPZ.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-DvKGsaLv.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-ZQWwrK3i.js → ObserveTextFlow-DCJ5EmD8.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-CJVqIqQ2.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-CUd2yOLu.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-CEH2MFBw.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-kY2pHjIs.js → RepoDiffEmbedScreen-mexrJPhW.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-C6LhoKrn.js → RepoDiffPageScreen-DbqX4L3q.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-BhcIIQQg.js → RepoDiffViewer-Bw5yMC4A.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-Csy_j9LD.js → RepoDiffViewerLazy-DzfoFhbl.js} +2 -2
- package/dist/client/assets/{ReposScreen-B_cB0zu7.js → ReposScreen-CzbO1Fuy.js} +2 -2
- package/dist/client/assets/{ScoutDeckSurface-CSy_fjcG.js → ScoutDeckSurface-DQoZofzH.js} +1 -1
- package/dist/client/assets/{ScoutSurface-CQVcSrin.js → ScoutSurface-NlhDsPzg.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DqGiLYNy.js → ScoutbotFxLab-l2WAahCg.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BR4VRdgh.js → SecondaryNav-Cs0_FQdj.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-BTlZ9gAg.js → SessionEmbedScreen-CpduQ0O9.js} +1 -1
- package/dist/client/assets/{SessionObserve-dQDN23pP.js → SessionObserve-BVeTkcIl.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-BRBGKAgd.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-RGVK_bmE.js → SettingsDrawer-CPB32w0n.js} +3 -3
- package/dist/client/assets/SettingsScreen-BEzYFdjz.js +1 -0
- package/dist/client/assets/{ShikiPane-DYI9Hkge.js → ShikiPane-C0TuCATU.js} +1 -1
- package/dist/client/assets/{SlidePanel-B9ugxWgA.js → SlidePanel-CETQ5NTx.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-z5hHesx9.js → SpriteAvatar-DFO4Kb4Z.js} +1 -1
- package/dist/client/assets/{StatusPill-BFvMjmZV.js → StatusPill-BllrY-eg.js} +1 -1
- package/dist/client/assets/{TailView-0uEIj2JH.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-BL07cd0q.js → TerminalHeaderMount-CY7uIWBg.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-BflAwXeZ.js → TextDocumentSurface-2X1Gw4eA.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BTnjOQi0.js → TmuxPeek-CqTJRhkI.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-CgQ6GGS-.js → VoicePermissionsPanel-C4vkU-sU.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-CaLG-zDs.js → WorkDetailScreen-DqGnuK0e.js} +3 -3
- package/dist/client/assets/{WorkFilesViewer-B9Sil_No.js → WorkFilesViewer-D8-4vF5l.js} +1 -1
- package/dist/client/assets/{activity-DcrMApUY.js → activity-CzTJ-YMX.js} +1 -1
- package/dist/client/assets/{addon-fit-DMVrz5Sv.js → addon-fit-Zx3A7pGS.js} +1 -1
- package/dist/client/assets/{addon-webgl-BYvpZUyu.js → addon-webgl-DitJj-N0.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-B-5QTeas.js → agent-autocomplete-BlK8wY06.js} +1 -1
- package/dist/client/assets/{agent-essentials-D7KRGYvF.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-DqjrVI2h.js → agent-master-model-DMcHeNq3.js} +1 -1
- package/dist/client/assets/agent-specialization-CtF_jI34.js +1 -0
- package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
- package/dist/client/assets/{arc.es-NHqHWohb.js → arc.es-BNXJqSw7.js} +1 -1
- package/dist/client/assets/{arrow-down-CKtSUjmW.js → arrow-down-BAGkhHA6.js} +1 -1
- package/dist/client/assets/{arrow-left-Czpf-AE4.js → arrow-left-eToA6GxC.js} +1 -1
- package/dist/client/assets/{arrow-right-BuzMnLYP.js → arrow-right-DTX42clh.js} +1 -1
- package/dist/client/assets/{arrow-up-right-C6Wl-1uw.js → arrow-up-right-B09GPwFl.js} +1 -1
- package/dist/client/assets/{bot-rd0awxD3.js → bot-WxKXYtEX.js} +1 -1
- package/dist/client/assets/{check-ofKUE8yH.js → check-Dz2SRHft.js} +1 -1
- package/dist/client/assets/{chevron-down-wciXnOQz.js → chevron-down-D120PY4g.js} +1 -1
- package/dist/client/assets/{chevron-right-D-HdlPg8.js → chevron-right-CowuvuE6.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-Tyv9rzx7.js → chunk-HRAB3GC3-KjjrTLCU.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-BC2Mandc.js → chunk-JTPDIGGW-COJ00z94.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-C1AWTYZZ.js → chunk-T65CQEWV-H2QEKfr1.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-DwHPHa6f.js → chunk-YOZR3KYS-CrCgXw9l.js} +1 -1
- package/dist/client/assets/{clock-B88r8OrZ.js → clock-_9FDplIT.js} +1 -1
- package/dist/client/assets/{code-xml-D7pOQM9l.js → code-xml-CkkNdRmu.js} +1 -1
- package/dist/client/assets/{compass-Dt1AMXz2.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-nkx0swDe.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-tp9BX6X2.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-CWWAJ75H.js → copy-BzdzWsQd.js} +1 -1
- package/dist/client/assets/{cpu-DrqejfkB.js → cpu-CHFIGw87.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DezKXSG2.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-Dp_a2vRZ.js → external-link-BvX5PfLh.js} +1 -1
- package/dist/client/assets/{eye-BRyD0jno.js → eye-C9cGk5z6.js} +1 -1
- package/dist/client/assets/{file-code-corner-muIVH_xO.js → file-code-corner-jlGFdr8d.js} +1 -1
- package/dist/client/assets/{file-text-CqJgwxmv.js → file-text-BHro8MkG.js} +1 -1
- package/dist/client/assets/{gauge-hU--hKVP.js → gauge-DSflSery.js} +1 -1
- package/dist/client/assets/{gestures-DN4hEeqv.js → gestures-YA5IIwp-.js} +1 -1
- package/dist/client/assets/{git-branch-CK5v8F2v.js → git-branch-Bc_eDIpG.js} +1 -1
- package/dist/client/assets/{home-moving-signal-BjDtEJUP.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-C-r_bBg5.js → home-now-card-nano-Jmy7eJ6H.js} +1 -1
- package/dist/client/assets/{hooks-D46bABUP.js → hooks-ME7rmhpE.js} +1 -1
- package/dist/client/assets/{index-DvLtl7rV.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-Dkc7rLvY.js → inspector-panel-CwrHjRaQ.js} +2 -2
- package/dist/client/assets/{keyboard-nav-BLYDhL3Z.js → keyboard-nav-B8sQ_8IF.js} +1 -1
- package/dist/client/assets/{lane-roster-store-DOdI1O13.js → lane-roster-store-DN2jxXF-.js} +1 -1
- package/dist/client/assets/{layers-CSsg3JVP.js → layers-CW2-qHsG.js} +1 -1
- package/dist/client/assets/{layout-grid-DOChPJdZ.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-pM56HNhR.js → loader-circle-DmUG_YC7.js} +1 -1
- package/dist/client/assets/{local-agents-C8xAhbO5.js → local-agents-VP1-ZlPw.js} +1 -1
- package/dist/client/assets/{mentions-DG6OQrsc.js → mentions-BZ5SBMtc.js} +1 -1
- package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +1 -0
- package/dist/client/assets/{mesh-ops-BZ1h5RQs.js → mesh-ops-CKSWgax2.js} +1 -1
- package/dist/client/assets/{mesh-view-store-ChUOASK8.js → mesh-view-store-CBM1za_N.js} +1 -1
- package/dist/client/assets/{message-circle-mZCv8tvB.js → message-circle-joGFxfj1.js} +1 -1
- package/dist/client/assets/{message-markup-C2LQDm_k.js → message-markup-DC0QFEZn.js} +1 -1
- package/dist/client/assets/{message-square-C7t_qtuj.js → message-square-BLiFqpe_.js} +1 -1
- package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-CM8mQGg8.js} +1 -1
- package/dist/client/assets/model-CBkMvT1w.js +1 -0
- package/dist/client/assets/{observe-BpEm1INu.js → observe-BLmy4quB.js} +1 -1
- package/dist/client/assets/{page-status-E5jnk48p.js → page-status-BE0-J1xY.js} +1 -1
- package/dist/client/assets/{paperclip-C64lkcbM.js → paperclip-Br7wUDFl.js} +1 -1
- package/dist/client/assets/{persistent-state-EHXw8WNy.js → persistent-state-BubPQ7tT.js} +1 -1
- package/dist/client/assets/{plus-Co-dqKul.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-BiW5suC7.js → proxy-DVDRhSRR.js} +1 -1
- package/dist/client/assets/{radio-BOxBQX-T.js → radio-CxIXS1nU.js} +1 -1
- package/dist/client/assets/{refresh-cw-DMxGzDwn.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-CimaAvQN.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-BQm5_CvR.js → rocket-CnxqjX_K.js} +1 -1
- package/dist/client/assets/{router-B9vQkNJL.js → router-kfcaYqZr.js} +1 -1
- package/dist/client/assets/runtime-picker-C20lTGhV.js +1 -0
- package/dist/client/assets/{scope-views-1IYJdl41.js → scope-views-KPY85UUx.js} +1 -1
- package/dist/client/assets/{scout-voice-BVUqGhth.js → scout-voice-Cg1qfepC.js} +1 -1
- package/dist/client/assets/scoutbot-D7kGGyK_.js +3 -0
- package/dist/client/assets/{scoutbot-markdown-BQ_Ee2Ic.js → scoutbot-markdown-yb87JlSE.js} +1 -1
- package/dist/client/assets/{scroll-text-Dze_dXtQ.js → scroll-text-DFcBYy5J.js} +1 -1
- package/dist/client/assets/{search-CDko0PKE.js → search-FB2vVxCp.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-BoQ_zYR9.js → secondaryNavConfig-C0Srrmy8.js} +1 -1
- package/dist/client/assets/{selection-bridge-Din6yV3h.js → selection-bridge-qBGFCJv8.js} +1 -1
- package/dist/client/assets/{send-horizontal-CSjIm6xg.js → send-horizontal-CS7mxVhX.js} +1 -1
- package/dist/client/assets/{server-Bzj7lPIx.js → server-WY6gsbZz.js} +1 -1
- package/dist/client/assets/{session-catalog-DsaZJXZt.js → session-catalog-CG4oL_yN.js} +1 -1
- package/dist/client/assets/{session-table-BQfR7u6r.js → session-table-uJh3v-ly.js} +1 -1
- package/dist/client/assets/{settings-Dyvpkb1D.js → settings-DQEtqkM9.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-C8njVwfg.js → sliders-horizontal-57e99_qO.js} +1 -1
- package/dist/client/assets/{sparkles-CETYrxGA.js → sparkles-D0vWLTyC.js} +1 -1
- package/dist/client/assets/{sse-CD9MMUxl.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-Ps8KpKah.js → tail-events-LK29oCKm.js} +1 -1
- package/dist/client/assets/{terminal-9GRS_Qdc.js → terminal-UDy4lzV1.js} +1 -1
- package/dist/client/assets/{terminal-relay-GYMIvKs1.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-_Jyys4me.js → terminal-takeover-BMeBjBB2.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C9ABzjXI.js → use-conversation-list-UG-tMN67.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DAspZQjE.js → use-fleet-active-asks-CCGrll5q.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Dh54ymEp.js → use-mesh-ops-items-BjyeFJTz.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-x8pJMVrG.js → use-reduced-motion-CPoX8iV2.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-DhCbiDK3.js → use-scout-dev-flags-DTseRrFi.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-DoBwV0LX.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-ejq9dCWV.js → usePierreRuntime-35AHf9RQ.js} +1 -1
- package/dist/client/assets/{wrench-DjkoAOQt.js → wrench-BfVeded5.js} +1 -1
- package/dist/client/assets/{x-CAbNespN.js → x-DgmmnPKt.js} +1 -1
- package/dist/client/assets/{xterm-Cf-ngcGP.js → xterm-DnJJmrCA.js} +1 -1
- package/dist/client/assets/{zap-Cq8eWkcF.js → zap-Bcja1lHG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +5180 -9874
- package/dist/node/main.mjs +18 -2
- package/dist/pairing-runtime-controller.mjs +31 -2
- package/dist/runtime/broker-daemon.mjs +87 -13
- package/dist/scout-control-plane-web.mjs +35 -3
- package/package.json +2 -5
- package/dist/client/assets/ActivityScreen-BnoaUkVZ.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-CuZJy07q.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-Iyl4BesU.js +0 -1
- package/dist/client/assets/AgentFloorView-YT-Jjccf.js +0 -1
- package/dist/client/assets/AgentInfoScreen-Dr99gQEZ.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +0 -1
- package/dist/client/assets/AgentLanesView-CetZZDyF.js +0 -2
- package/dist/client/assets/AgentMasterScreen-DJPnstoD.js +0 -1
- package/dist/client/assets/AgentsConsole-CsYOoFJi.js +0 -1
- package/dist/client/assets/AgentsScreen-k8LvBuU_.js +0 -1
- package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-CUCXO-KH.js +0 -1
- package/dist/client/assets/BrokerScreen-BPbOHhCS.js +0 -5
- package/dist/client/assets/CodeScreen-CeuO3EhR.js +0 -1
- package/dist/client/assets/ConversationComposer-CXPKx86g.js +0 -1
- package/dist/client/assets/ConversationFeedRows-WrH-YI3L.js +0 -1
- package/dist/client/assets/ConversationHeader-BQWzGzLK.js +0 -1
- package/dist/client/assets/ConversationScreen-CR9pWB65.js +0 -2
- package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +0 -1
- package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +0 -1
- package/dist/client/assets/FlightObserveScreen-6mGnmWQA.js +0 -1
- package/dist/client/assets/HarnessesScreen-CHTuv8p6.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-D3o3IODW.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-BUgHz-sd.js +0 -1
- package/dist/client/assets/MeshScreen-BcxPkhm6.js +0 -1
- package/dist/client/assets/MessagesScreen-Bb5l13MO.js +0 -1
- package/dist/client/assets/MissionControlView-E3V7bENU.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-h15sQFvP.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-KPdk9rSa.js +0 -1
- package/dist/client/assets/NewChatComposer-_Stj0fZy.js +0 -19
- package/dist/client/assets/OpsAgentsView-DI5wu1si.js +0 -1
- package/dist/client/assets/OpsScreen-D8fQafCl.js +0 -1
- package/dist/client/assets/OpsSubnav-1K4Jaf__.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +0 -1
- package/dist/client/assets/ProjectAgentProfileBar-k2QHHHsQ.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-Bpxk1ui2.js +0 -1
- package/dist/client/assets/ProjectsInbox-C_bMHLCc.js +0 -2
- package/dist/client/assets/ProjectsRail-J-aH_pxT.js +0 -1
- package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-_ourdM-Q.js +0 -1
- package/dist/client/assets/Provider-CtXJeLrP.js +0 -1
- package/dist/client/assets/RawSessionsTable-CDyrom-F.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-DBl3DN1H.js +0 -1
- package/dist/client/assets/SessionRefScreen-COVQMbtE.js +0 -1
- package/dist/client/assets/SessionsScreen--5OJ3p3v.js +0 -1
- package/dist/client/assets/SettingsScreen-CCxzy5IU.js +0 -1
- package/dist/client/assets/Terminal-DouZeNxc.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-dMNUbzXr.js +0 -1
- package/dist/client/assets/agent-specialization-BujJVUTD.js +0 -1
- package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
- package/dist/client/assets/agents-project-model-UYiamtrU.js +0 -1
- package/dist/client/assets/content-9K38QchR.js +0 -1
- package/dist/client/assets/content-BRgnyXWh.js +0 -1
- package/dist/client/assets/content-BWPNyXJ0.js +0 -1
- package/dist/client/assets/content-BdkI07v3.js +0 -1
- package/dist/client/assets/content-C4oWa8SB.js +0 -1
- package/dist/client/assets/content-C9ijJxyl.js +0 -1
- package/dist/client/assets/content-CFZ4rghn.js +0 -1
- package/dist/client/assets/content-CIqu_Ci_.js +0 -1
- package/dist/client/assets/content-CnJF9DGO.js +0 -1
- package/dist/client/assets/content-CriW8Y8u.js +0 -1
- package/dist/client/assets/content-DDCyPPk_.js +0 -1
- package/dist/client/assets/content-DtcZeh5m.js +0 -1
- package/dist/client/assets/content-U9tsdtle.js +0 -1
- package/dist/client/assets/content-hFLK3CON.js +0 -1
- package/dist/client/assets/content-p00KQrtD.js +0 -1
- package/dist/client/assets/conversation-model-Dc02NsGp.js +0 -1
- package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +0 -1
- package/dist/client/assets/discover-C2CZO4Tk.js +0 -2
- package/dist/client/assets/embed-entry-BSMUykuG.js +0 -2
- package/dist/client/assets/home-now-card-nF8OotI-.js +0 -1
- package/dist/client/assets/index-CPrU5q04.js +0 -1
- package/dist/client/assets/index-kL1WLbeS.js +0 -1
- package/dist/client/assets/index-zvhpRHao.js +0 -1
- package/dist/client/assets/left-B-SdEJSJ.js +0 -1
- package/dist/client/assets/left-B3wSE6ql.js +0 -1
- package/dist/client/assets/left-BNRFiRsb.js +0 -2
- package/dist/client/assets/left-BggzhgXN.js +0 -1
- package/dist/client/assets/left-CARCvvxS.js +0 -2
- package/dist/client/assets/left-CpokZYHt.js +0 -1
- package/dist/client/assets/left-YT7mIGuH.js +0 -1
- package/dist/client/assets/left-advisor-CCY0vkcO.js +0 -1
- package/dist/client/assets/left-agents-trhO5sL8.js +0 -1
- package/dist/client/assets/left-default-CG33elBs.js +0 -1
- package/dist/client/assets/left-lanes-CitMgeTp.js +0 -1
- package/dist/client/assets/left-mission-Zl2m_5eU.js +0 -1
- package/dist/client/assets/library-DkALuCh5.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-APxDsN2P.js +0 -1
- package/dist/client/assets/projects-inbox-Cg4X2lUQ.js +0 -1
- package/dist/client/assets/projects-inbox-DRBl2N85.css +0 -1
- package/dist/client/assets/resolve-panes-DeVJbS9c.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +0 -1
- package/dist/client/assets/right-Bmfd3pjP.js +0 -1
- package/dist/client/assets/right-BqI-nr9G.js +0 -1
- package/dist/client/assets/right-BuCgE0fZ.js +0 -1
- package/dist/client/assets/right-BwlW6E57.js +0 -1
- package/dist/client/assets/right-C0ybUw0j.js +0 -1
- package/dist/client/assets/right-CdkcrmeD.js +0 -1
- package/dist/client/assets/right-CkCCPbCX.js +0 -1
- package/dist/client/assets/right-D3eSiy41.js +0 -1
- package/dist/client/assets/right-Dz_xD0Vj.js +0 -1
- package/dist/client/assets/scoutbot-BJIamJOH.js +0 -3
- package/dist/client/assets/text-BP3oyl8-.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +0 -1
- /package/dist/client/assets/{text-BYAFNLNq.css → runtime-picker-BYAFNLNq.css} +0 -0
package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-DvKGsaLv.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,j as e}from"./index-
|
|
2
|
-
`).length>N,n=r.conversationId?`/messages/${encodeURIComponent(r.conversationId)}${r.messageId?`#msg-${encodeURIComponent(r.messageId)}`:""}`:null,d=`/flights/${encodeURIComponent(r.flightId)}/observe${s?`?session=${encodeURIComponent(s)}`:""}`;return e.jsxs("section",{className:"s-observe-embed-ask",children:[e.jsxs("div",{className:"s-observe-embed-ask-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"s-observe-embed-ask-kicker",children:"Ask"}),e.jsxs("div",{className:"s-observe-embed-ask-byline",children:[e.jsx("span",{children:r.requesterName}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("time",{dateTime:new Date(r.requestedAt).toISOString(),children:x(r.requestedAt)})]})]}),e.jsxs("nav",{className:"s-observe-embed-ask-links","aria-label":"Run provenance",children:[n&&e.jsxs("a",{href:n,target:"_top",children:["Origin ",e.jsx(p,{size:11,"aria-hidden":"true"})]}),e.jsxs("a",{href:d,target:"_top",children:["Flight ",e.jsx(p,{size:11,"aria-hidden":"true"})]})]})]}),e.jsx("div",{className:`s-observe-embed-ask-body${i?" is-expanded":""}`,children:r.task}),m&&e.jsx("button",{type:"button",className:"s-observe-embed-ask-toggle","aria-expanded":i,onClick:()=>c(t=>!t),children:i?"Show less":"Show full ask"})]})}function
|
|
1
|
+
import{r as o,j as e}from"./index-C1VaWNuD.js";import{a as v}from"./api-Co9aQ2Jw.js";import{d as b,S as u}from"./SessionObserve-BVeTkcIl.js";import{u as h}from"./sse-B29iGBnw.js";import{f as x}from"./time-Dhsh_2EG.js";import{SessionObserveEmbedStatus as f}from"./SessionObserveEvidence-BkOezTGV.js";import{E as p}from"./external-link-BvX5PfLh.js";import"./perf-PX8Rx0EP.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"./index-Cx6Gbr6n.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./colors-BtO5_zlx.js";import"./mentions-BZ5SBMtc.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"./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";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"./message-circle-joGFxfj1.js";import"./wrench-BfVeded5.js";import"./index-BWHgHrtv.js";const j=2500,g=240,N=5;function I({ask:r,sessionId:s}){const[i,c]=o.useState(!1);if(!r)return e.jsxs("section",{className:"s-observe-embed-ask s-observe-embed-ask--unknown",children:[e.jsx("div",{className:"s-observe-embed-ask-kicker",children:"Ask"}),e.jsx("div",{className:"s-observe-embed-ask-unknown",children:"Not available for this observed session."})]});const m=r.task.length>g||r.task.split(`
|
|
2
|
+
`).length>N,n=r.conversationId?`/messages/${encodeURIComponent(r.conversationId)}${r.messageId?`#msg-${encodeURIComponent(r.messageId)}`:""}`:null,d=`/flights/${encodeURIComponent(r.flightId)}/observe${s?`?session=${encodeURIComponent(s)}`:""}`;return e.jsxs("section",{className:"s-observe-embed-ask",children:[e.jsxs("div",{className:"s-observe-embed-ask-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"s-observe-embed-ask-kicker",children:"Ask"}),e.jsxs("div",{className:"s-observe-embed-ask-byline",children:[e.jsx("span",{children:r.requesterName}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("time",{dateTime:new Date(r.requestedAt).toISOString(),children:x(r.requestedAt)})]})]}),e.jsxs("nav",{className:"s-observe-embed-ask-links","aria-label":"Run provenance",children:[n&&e.jsxs("a",{href:n,target:"_top",children:["Origin ",e.jsx(p,{size:11,"aria-hidden":"true"})]}),e.jsxs("a",{href:d,target:"_top",children:["Flight ",e.jsx(p,{size:11,"aria-hidden":"true"})]})]})]}),e.jsx("div",{className:`s-observe-embed-ask-body${i?" is-expanded":""}`,children:r.task}),m&&e.jsx("button",{type:"button",className:"s-observe-embed-ask-toggle","aria-expanded":i,onClick:()=>c(t=>!t),children:i?"Show less":"Show full ask"})]})}function we({agentId:r}){const[s,i]=o.useState(null),[c,m]=o.useState(!0),[n,d]=o.useState(null),t=o.useCallback(async(l=!1)=>{l||m(!0),d(null);try{const a=await v(`/api/agents/${encodeURIComponent(r)}/observe`);i(a)}catch(a){l||i(null),d(a instanceof Error?a.message:String(a))}finally{m(!1)}},[r]);return o.useEffect(()=>{t();const l=window.setInterval(()=>{t(!0)},j);return()=>window.clearInterval(l)},[t]),h(()=>{t(!0)}),n&&!s?e.jsx("div",{className:"s-observe-embed-page",children:e.jsxs("div",{className:"s-observe-embed-empty",children:[e.jsx("div",{className:"s-observe-embed-empty-title",children:"Observe unavailable"}),e.jsx("div",{className:"s-observe-embed-empty-detail",children:n})]})}):c&&!s?e.jsx("div",{className:"s-observe-embed-page",children:e.jsxs("div",{className:"s-observe-embed-empty",children:[e.jsx("div",{className:"s-observe-embed-empty-title",children:"Resolving trace"}),e.jsx("div",{className:"s-observe-embed-empty-detail",children:r})]})}):e.jsxs("div",{className:"s-observe-embed-page",children:[s&&e.jsxs(e.Fragment,{children:[e.jsx(f,{source:s.source,fidelity:s.fidelity,sessionId:s.sessionId,evidence:b({source:s.source,fidelity:s.fidelity,live:s.data.live,eventCount:s.data.events.length})}),e.jsx(I,{ask:s.initiatingAsk,sessionId:s.sessionId})]}),e.jsx(u,{data:s?.data,agentId:r,sessionId:s?.sessionId,showRail:!1,observeSource:s?.source,observeFidelity:s?.fidelity})]})}export{I as InitiatingAsk,we as ObserveEmbedScreen};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-
|
|
2
|
-
import{r as n,j as e,_ as b}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-BJnHs3Ul.js","assets/gestures-YA5IIwp-.js","assets/index-C1VaWNuD.js","assets/index-i7TMxlwW.css","assets/use-reduced-motion-CPoX8iV2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as n,j as e,_ as b}from"./index-C1VaWNuD.js";import{l as p}from"./lane-observe-vfyACHi0.js";import{C as f}from"./chevron-down-D120PY4g.js";import{u as h}from"./use-reduced-motion-CPoX8iV2.js";import{L as g,m as x}from"./proxy-DVDRhSRR.js";import"./time-Dhsh_2EG.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./createLucideIcon-Dv8H8m7J.js";const j=420,N=()=>b(()=>import("./conversation-motion-features-BJnHs3Ul.js"),__vite__mapDeps([0,1,2,3,4])).then(t=>t.default);function R({text:t}){const s=h(),[o,i]=n.useState(!0),r=n.useRef(null);return n.useEffect(()=>(i(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>i(!1),j),()=>{r.current&&clearTimeout(r.current)}),[t]),e.jsx(g,{features:N,strict:!0,children:e.jsx(x.span,{className:"s-observe-stream-cursor","data-receiving":o||void 0,"aria-hidden":"true",initial:!1,animate:s||o?{opacity:1}:{opacity:[1,.28,1]},transition:s||o?{duration:.12}:{duration:1.05,ease:"linear",repeat:1/0}})})}function w({text:t,live:s,compact:o=!1,copyControl:i}){const r=n.useId(),c=t.trim(),[a,d]=n.useState(s),u=n.useRef(s);n.useEffect(()=>{s?d(!0):u.current&&d(!1),u.current=s},[s]);const l=p(c,o?120:168,1),m=e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"s-observe-reasoning-state",children:[e.jsx("span",{className:"s-observe-reasoning-dot","aria-hidden":"true"}),s?"Thinking":"Reasoning"]}),!s&&!a&&l?e.jsx("span",{className:"s-observe-reasoning-preview",title:c,children:l}):null,s?null:e.jsx(f,{className:"s-observe-reasoning-chevron",size:12,strokeWidth:1.8,"aria-hidden":"true"})]});return e.jsxs("div",{className:["s-observe-block","s-observe-reasoning",o&&"s-observe-reasoning--compact",s&&"s-observe-reasoning--live",a&&"s-observe-reasoning--open"].filter(Boolean).join(" "),"aria-busy":s||void 0,children:[s?e.jsx("div",{className:"s-observe-reasoning-header",role:"status",children:m}):e.jsx("button",{type:"button",className:"s-observe-reasoning-header s-observe-reasoning-header--button","aria-expanded":a,"aria-controls":r,"aria-label":a?"Hide reasoning":"Show reasoning",onClick:()=>d(v=>!v),children:m}),e.jsx("div",{id:r,className:"s-observe-reasoning-body","aria-hidden":!a,inert:a?void 0:!0,children:e.jsx("div",{className:"s-observe-reasoning-body-clip",children:e.jsxs("div",{className:"s-observe-reasoning-body-inner",children:[e.jsxs("div",{className:"s-observe-reasoning-text",children:[c,s?e.jsx(R,{text:c}):null]}),i?e.jsx("div",{className:"s-observe-reasoning-tools",children:i}):null]})})})]})}export{w as ObserveReasoningDisclosure,R as ObserveStreamCursor};
|
package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-CJVqIqQ2.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as x,j as s}from"./index-
|
|
1
|
+
import{r as x,j as s}from"./index-C1VaWNuD.js";import{a as R}from"./api-Co9aQ2Jw.js";import{a as A}from"./time-Dhsh_2EG.js";function S(e){if(!e)return null;const o=Date.parse(e);return Number.isFinite(o)?o:null}function T(e){return e?e.length<=12?e:e.slice(0,12):null}function W(e){return e.includes("workflow")?"Claude workflows":e.includes("codex")?"Codex":e.includes("claude")?"Claude Code":e.replace(/[-_]/g," ")}function $(e){const o=[];return e.workerCount>0&&o.push(`${e.workerCount} worker${e.workerCount===1?"":"s"}`),e.eventCount>0?o.push(`${e.eventCount} event${e.eventCount===1?"":"s"}`):e.taskCount>0&&o.push(`${e.completedTaskCount}/${e.taskCount} tasks`),o.join(" · ")}function M(e){const o=[e.label];e.description&&o.push(e.description);const n=$(e);return n&&o.push(n),e.parentSessionId&&o.push(`Parent session ${e.parentSessionId}`),o.join(`
|
|
2
2
|
`)}function C(e){return e.name??T(e.externalSessionId)??e.id.replace(/^.*:/,"")}function P(e){return e.status??e.role??e.type??"observed"}function N(e,o){const n=e?.[o];return typeof n=="string"&&n.trim()?n.trim():null}function F(e,o){const n=e?.[o];return typeof n=="number"&&Number.isFinite(n)?n:null}function w(e){return N(e,"claudeWorkflowRunId")??N(e,"workflowRunId")}function B(e,o,n){return o.filter(l=>l.kind==="spawned"&&l.toId===e.id).map(l=>n.get(l.fromId)).filter(l=>!!l).map(C)}function D(e,o){return o.find(n=>n.assigneeId===e.id)??null}function E(e,o){return w(e.providerMeta)===o||e.id.includes(o)}function q(e,o){return w(e.providerMeta)===o||e.id.includes(o)}function G(e){const o=N(e.providerMeta,"latestTimestamp");if(!o)return null;const n=Date.parse(o);return Number.isFinite(n)?n:null}function H(e,o){return e.some(n=>n.state&&y(n.state)===0)||o.some(n=>n.status&&y(n.status)===0)?"running":e.some(n=>n.state==="failed"||n.state==="error")||o.some(n=>n.status==="failed"||n.status==="error")?"failed":e.length>0&&e.every(n=>n.state==="completed"||n.state==="done")||o.length>0&&o.every(n=>n.status==="completed"||n.status==="done")?"completed":e.length>0?"observed":"workflow"}function I(e,o){return e.groups.filter(l=>l.kind==="workflow").map(l=>{const c=w(l.providerMeta)??l.id,i=e.tasks.filter(a=>E(a,c)),h=e.agents.filter(a=>a.role!=="lead"&&q(a,c)),p=i.filter(a=>a.state!=="completed"&&a.state!=="done"),b=i.filter(a=>a.state==="completed"||a.state==="done"),v=h.map(G).filter(a=>!!a).sort((a,m)=>m-a)[0]??null,f=h.reduce((a,m)=>a+(F(m.providerMeta,"eventCount")??0),0),j=(p.length>0?p:i).slice(0,3);return{id:l.id,label:l.name??c,description:N(l.providerMeta,"description"),runId:c,parentSessionId:N(l.providerMeta,"parentSessionId"),status:H(i,h),workerCount:h.length,taskCount:i.length,activeTaskCount:p.length,completedTaskCount:b.length,eventCount:f,latestAt:v??o,taskPreview:j}}).sort((l,c)=>{const i=(c.activeTaskCount>0?1:0)-(l.activeTaskCount>0?1:0);return i!==0?i:(c.latestAt??0)-(l.latestAt??0)||l.label.localeCompare(c.label)})}function y(e){return e==="running"||e==="in_progress"||e==="working"?0:e==="queued"||e==="pending"||e==="materialized"?1:e==="failed"||e==="error"?2:e==="completed"||e==="done"?3:4}function L(e){return e?e.observations.map(o=>({source:o.source,observedAt:S(o.observedAt),topology:o.topology})):[]}function Q({topology:e,sessionId:o,size:n="full",title:l="Internal topology",maxAgents:c=n==="rail"?5:8,maxTasks:i=n==="rail"?3:5,showEmpty:h=!1}){const[p,b]=x.useState(null),[v,f]=x.useState(!1),[j,a]=x.useState(!e);x.useEffect(()=>{if(e)return;a(!0);let r=!1;const d=o?`?sessionId=${encodeURIComponent(o)}`:"";return R(`/api/topology/snapshot${d}`).then(g=>{r||(b(g),f(!1))}).catch(()=>{r||f(!0)}).finally(()=>{r||a(!1)}),()=>{r=!0}},[o,e]);const m=x.useMemo(()=>e?[{source:e.source,observedAt:S(e.observedAt),topology:e}]:L(p),[p,e]),u=x.useMemo(()=>m.reduce((r,d)=>(r.sources+=1,r.workflows+=d.topology.groups.filter(g=>g.kind==="workflow").length,r.agents+=d.topology.agents.length,r.subagents+=d.topology.agents.filter(g=>g.role==="subagent").length,r.tasks+=d.topology.tasks.length,r.activeTasks+=d.topology.tasks.filter(g=>g.state!=="completed").length,r.spawned+=d.topology.relationships.filter(g=>g.kind==="spawned").length,r),{sources:0,workflows:0,agents:0,subagents:0,tasks:0,activeTasks:0,spawned:0}),[m]),k=n==="rail",t=m.reduce((r,d)=>r+I(d.topology,d.observedAt).filter(g=>g.status==="running").length,0);return m.length===0?!h&&!v?null:s.jsxs("section",{className:`s-observed-topology s-observed-topology--${n}`,children:[!k&&s.jsx("header",{className:"s-observed-topology-head",children:s.jsxs("div",{children:[s.jsx("div",{className:"s-observed-topology-kicker",children:"Harness observed"}),s.jsx("h3",{children:l})]})}),s.jsx("div",{className:"s-observed-topology-empty",children:j?"Reading topology…":v?"Topology is unavailable right now.":"No interacted agents observed yet."})]}):s.jsxs("section",{className:`s-observed-topology s-observed-topology--${n}`,children:[k?u.workflows>0&&s.jsxs("div",{className:"s-observed-topology-rail-summary",children:[t>0?`${t} running`:"No active workflows",u.workflows>0&&` · ${u.workflows} total`]}):s.jsxs("header",{className:"s-observed-topology-head",children:[s.jsxs("div",{children:[s.jsx("div",{className:"s-observed-topology-kicker",children:"Harness observed"}),s.jsx("h3",{children:l})]}),s.jsxs("div",{className:"s-observed-topology-counts",children:[u.workflows>0&&s.jsxs("span",{children:[u.workflows," workflows"]}),s.jsxs("span",{children:[u.subagents," workers"]}),s.jsxs("span",{children:[u.tasks," tasks"]}),u.activeTasks>0?s.jsxs("span",{children:[u.activeTasks," active"]}):s.jsxs("span",{children:[u.spawned," spawn links"]})]})]}),s.jsx("div",{className:"s-observed-topology-sources",children:m.map(r=>s.jsx(_,{source:r,maxAgents:c,maxTasks:i,size:n},`${r.source}:${r.topology.observedAt}`))})]})}function O({workflow:e}){const o=$(e);return s.jsxs("div",{className:`s-observed-topology-rail-row s-observed-topology-rail-row--${e.status}`,title:M(e),children:[s.jsx("span",{className:`s-observed-topology-rail-dot s-observed-topology-rail-dot--${e.status}`,"aria-label":e.status}),s.jsx("span",{className:"s-observed-topology-rail-name",children:e.label}),o&&s.jsx("span",{className:"s-observed-topology-rail-stats",children:o})]})}function _({source:e,maxAgents:o,maxTasks:n,size:l="full"}){const c=l==="rail",{topology:i}=e,h=new Map(i.agents.map(t=>[t.id,t])),p=I(i,e.observedAt),b=p.slice(0,o),v=p.length-b.length,f=(t,r)=>y(t.status)-y(r.status)||C(t).localeCompare(C(r)),j=i.agents.filter(t=>t.role==="subagent").sort(f),a=i.agents.filter(t=>t.role==="lead").sort(f),m=i.agents.filter(t=>t.role!=="subagent"&&t.role!=="lead").sort(f),u=[...a,...j,...m].slice(0,o),k=i.tasks.filter(t=>t.state!=="completed").sort((t,r)=>y(t.state)-y(r.state)||(t.title??t.id).localeCompare(r.title??r.id)).slice(0,n);return s.jsxs("div",{className:"s-observed-topology-source",children:[!c&&s.jsxs("div",{className:"s-observed-topology-source-head",children:[s.jsx("span",{children:W(e.source)}),s.jsx("span",{children:A(e.observedAt)||"observed"})]}),p.length>0?c?s.jsxs("div",{className:"s-observed-topology-rail-list",children:[b.map(t=>s.jsx(O,{workflow:t},t.id)),v>0&&s.jsxs("div",{className:"s-observed-topology-rail-more",children:["+",v," more workflow",v===1?"":"s"]})]}):s.jsxs("div",{className:"s-observed-topology-workflow-list",children:[b.map(t=>s.jsxs("div",{className:"s-observed-topology-workflow",children:[s.jsxs("div",{className:"s-observed-topology-workflow-main",children:[s.jsx("span",{className:`s-observed-topology-workflow-state s-observed-topology-workflow-state--${t.status}`,children:t.status}),s.jsx("span",{className:"s-observed-topology-workflow-name",title:M(t),children:t.label}),s.jsx("span",{className:"s-observed-topology-workflow-age",children:A(t.latestAt)||"observed"})]}),s.jsxs("div",{className:"s-observed-topology-workflow-meta",children:[s.jsxs("span",{children:[t.workerCount," workers"]}),t.taskCount>0&&s.jsxs("span",{children:[t.completedTaskCount,"/",t.taskCount," tasks"]}),t.eventCount>0&&s.jsxs("span",{children:[t.eventCount," events"]}),t.parentSessionId&&s.jsxs("span",{children:["parent ",T(t.parentSessionId)]})]}),t.description&&s.jsx("div",{className:"s-observed-topology-workflow-description",children:t.description}),t.taskPreview.length>0&&s.jsx("div",{className:"s-observed-topology-workflow-tasks",children:t.taskPreview.map(r=>s.jsx("span",{children:r.title??r.id.replace(/^.*:/,"")},r.id))})]},t.id)),v>0&&s.jsxs("div",{className:"s-observed-topology-more",children:[v," more workflow",v===1?"":"s"]})]}):s.jsx("div",{className:"s-observed-topology-agent-list",children:u.map(t=>{const r=B(t,i.relationships,h),d=D(t,i.tasks);return s.jsxs("div",{className:"s-observed-topology-agent",children:[s.jsxs("div",{className:"s-observed-topology-agent-main",children:[s.jsx("span",{className:`s-observed-topology-agent-role s-observed-topology-agent-role--${t.role??"observed"}`,children:t.role??"observed"}),s.jsx("span",{className:"s-observed-topology-agent-name",children:C(t)}),s.jsx("span",{className:"s-observed-topology-agent-status",children:P(t)})]}),(r.length>0||d?.title)&&s.jsxs("div",{className:"s-observed-topology-agent-detail",children:[r.length>0&&s.jsxs("span",{children:["spawned by ",r.join(", ")]}),d?.title&&s.jsx("span",{children:d.title})]})]},t.id)})}),p.length===0&&k.length>0&&s.jsx("div",{className:"s-observed-topology-task-list",children:k.map(t=>s.jsxs("div",{className:"s-observed-topology-task",children:[s.jsx("span",{children:t.state??"task"}),s.jsx("strong",{children:t.title??t.id.replace(/^.*:/,"")})]},t.id))})]})}export{Q as O};
|
|
@@ -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-DvLtl7rV.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-B9vQkNJL.js";import{a as ro,u as Fm,T as Zm,b as Bm,H as Wm}from"./chunk-JTPDIGGW-BC2Mandc.js";import{u as xt,c as Vm,l as Um,H as hn,a as Hm,b as Gm}from"./chunk-YOZR3KYS-DwHPHa6f.js";import{S as pu}from"./sparkles-CETYrxGA.js";import{L as Pa}from"./loader-circle-pM56HNhR.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-B-5QTeas.js";import{S as mu,a as nh}from"./text-BP3oyl8-.js";import{c as yt}from"./createLucideIcon-DezKXSG2.js";import{P as rh}from"./paperclip-C64lkcbM.js";import{r as Vt}from"./index-zvhpRHao.js";import{C as oh,Z as sh}from"./chunk-T65CQEWV-C1AWTYZZ.js";import{C as ah}from"./clock-B88r8OrZ.js";import{S as vs}from"./search-CDko0PKE.js";import{u as hu,i as gu,d as ih,e as ch,c as lh,f as uh}from"./keyboard-nav-BLYDhL3Z.js";import{i as Jo,u as bu}from"./use-scout-dev-flags-DhCbiDK3.js";import{X as ys}from"./x-CAbNespN.js";import{T as vu}from"./terminal-9GRS_Qdc.js";import{b as yu,M as xu,a as dh}from"./DocumentFocusViewer-Do3wQ_3Z.js";import{C as fh}from"./conversation-model-Dc02NsGp.js";import{s as ph,S as mh,d as hh}from"./scope-views-1IYJdl41.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-CtXJeLrP.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./AgentDetailCard-C9rn3Fj5.js";/* empty css *//* empty css */import"./NewChatComposer-_Stj0fZy.js";import"./CrewAvatar-BwXjyg8N.js";/* empty css */import"./BackToPicker-CXZjBRAe.js";import"./AgentLiveActions-DrEJDJef.js";import"./ObservedTopologyPanel-BJUhDSuQ.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-BoQ_zYR9.js";/* empty css */import"./ConversationScreen-CR9pWB65.js";/* empty css */import"./SessionObserve-dQDN23pP.js";/* empty css *//* empty css *//* empty css */import"./projects-inbox-Cg4X2lUQ.js";import"./ProjectsInbox-C_bMHLCc.js";/* empty css */import"./RailRow-CEH2MFBw.js";/* empty css *//* empty css */import"./cache-CeWH_KzJ.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./left-BNRFiRsb.js";import"./content-C9ijJxyl.js";import{u as Sh}from"./mesh-view-store-ChUOASK8.js";import"./left-CpokZYHt.js";/* empty css */import"./mesh-ops-BZ1h5RQs.js";import"./left-mission-Zl2m_5eU.js";import"./mission-control-store-nDLdUZPA.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-B9ugxWgA.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-0uEIj2JH.js";import"./RepoDiffViewerLazy-Csy_j9LD.js";/* empty css *//* empty css *//* empty css */import"./CastPicker-_5E5hNUe.js";import"./SettingsDrawer-RGVK_bmE.js";import"./left-B3wSE6ql.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-D46bABUP.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-Co-dqKul.js";import{resolveSidebarContext as Ph}from"./resolve-sidebar-context-BQe5J6xF.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-CD9MMUxl.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-6-KBVKUu.js";import{C as wn,a as $h,b as Xt,c as hi,d as Fh}from"./ChatCollapsedStrip-D-eXhzPf.js";import{U as _u}from"./CrewWorkspaces-NKujRzwh.js";import{L as Zh}from"./layout-grid-DOChPJdZ.js";import{A as Tu}from"./activity-DcrMApUY.js";import{OpsSubnav as Bh}from"./OpsSubnav-1K4Jaf__.js";import{A as pc}from"./arrow-left-Czpf-AE4.js";import{A as Wh}from"./arrow-right-BuzMnLYP.js";import{M as mc}from"./message-square-C7t_qtuj.js";import{C as Vh}from"./chevron-down-wciXnOQz.js";import{C as Uh}from"./chevron-right-D-HdlPg8.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./arrow-down-CKtSUjmW.js";import"./use-reduced-motion-x8pJMVrG.js";import"./gestures-DN4hEeqv.js";import"./radio-BOxBQX-T.js";import"./bot-rd0awxD3.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./time-Dhsh_2EG.js";import"./scoutbot-BJIamJOH.js";import"./code-xml-D7pOQM9l.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./terminal-takeover-_Jyys4me.js";import"./openContent-C6XO6kr5.js";import"./eye-BRyD0jno.js";import"./compass-Dt1AMXz2.js";import"./settings-Dyvpkb1D.js";import"./git-branch-CK5v8F2v.js";import"./scroll-text-Dze_dXtQ.js";import"./ConversationComposer-CXPKx86g.js";import"./zap-Cq8eWkcF.js";import"./message-markup-C2LQDm_k.js";import"./mentions-DG6OQrsc.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-BQWzGzLK.js";import"./AstronautSuit-DbjQtfD_.js";import"./SpriteAvatar-z5hHesx9.js";import"./ConversationFeedRows-WrH-YI3L.js";import"./ConversationPanels-Dujvnmup.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./proxy-BiW5suC7.js";import"./message-circle-mZCv8tvB.js";import"./tail-events-Ps8KpKah.js";import"./ConversationStatus-DVzSb2Hv.js";import"./check-ofKUE8yH.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./wrench-DjkoAOQt.js";import"./external-link-Dp_a2vRZ.js";import"./mesh-roster-Bc7T4b7z.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-COVQMbtE.js";import"./session-ref-lookup-state-SATH_jAP.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-HFH8wFyb.js";import"./arrow-up-right-C6Wl-1uw.js";import"./AddProjectForm-IqOtJfRs.js";import"./agent-specialization-BujJVUTD.js";import"./sliders-horizontal-C8njVwfg.js";import"./HomeHero-CdUVPjkG.js";import"./refresh-cw-DMxGzDwn.js";import"./observe-BpEm1INu.js";import"./persistent-state-EHXw8WNy.js";import"./agent-lanes-model-DXqjs0OK.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-BjDtEJUP.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DrqejfkB.js";import"./file-code-corner-muIVH_xO.js";import"./use-fleet-active-asks-DAspZQjE.js";import"./MissionLeftAgentRow-KPdk9rSa.js";import"./page-status-E5jnk48p.js";import"./VoicePermissionsPanel-CgQ6GGS-.js";import"./copy-CWWAJ75H.js";import"./terminal-relay-GYMIvKs1.js";import"./session-table-BQfR7u6r.js";import"./layers-CSsg3JVP.js";import"./server-Bzj7lPIx.js";import"./left-YT7mIGuH.js";import"./ProjectsRail-J-aH_pxT.js";import"./left-CARCvvxS.js";import"./conversation-prefs-DNre-Lcx.js";import"./agent-master-model-DqjrVI2h.js";import"./use-conversation-list-C9ABzjXI.js";import"./left-BggzhgXN.js";import"./use-mesh-ops-items-Dh54ymEp.js";import"./left-B-SdEJSJ.js";import"./left-agents-trhO5sL8.js";import"./left-default-CG33elBs.js";import"./left-lanes-CitMgeTp.js";import"./lane-roster-store-DOdI1O13.js";import"./left-advisor-CCY0vkcO.js";import"./gauge-hU--hKVP.js";import"./MeshCanvasMinimap-cEFS9eW7.js";import"./SecondaryNav-BR4VRdgh.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};
|