@openscout/scout 0.2.79 → 0.2.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-BXm6nJ6L.js +1 -0
- package/dist/client/assets/{AddProjectForm-BoVtelSP.js → AddProjectForm-CtEiLQnm.js} +1 -1
- package/dist/client/assets/{AgentAvatar-CufDA4A-.js → AgentAvatar-CszU5eaU.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-CfBXxrsD.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-4Z0aN8AR.js +1 -0
- package/dist/client/assets/{AgentDetailCard-DxxVkgT1.js → AgentDetailCard-sZuHl1de.js} +1 -1
- package/dist/client/assets/AgentFloorView-DMivAYHU.js +1 -0
- package/dist/client/assets/AgentInfoScreen-CPkLg1pK.js +1 -0
- package/dist/client/assets/{AgentLaneCard-DTUvE96I.js → AgentLaneCard-nB68f2CI.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-BfVygkgL.js → AgentLaneChrome-O9Yf0uR-.js} +1 -1
- package/dist/client/assets/AgentLaneDetailSheet-BfhpaEQ3.js +4 -0
- package/dist/client/assets/{AgentLaneSummaryResize-CMgzYvAA.js → AgentLaneSummaryResize-Ct3b0TQR.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CjHMvy3v.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-KWfLcaNB.js → AgentLanesPreflight-DNGvZvjd.js} +1 -1
- package/dist/client/assets/{AgentLanesView-CxfbV8Kd.js → AgentLanesView-DqRK5-d2.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-CZdAInEu.js → AgentLiveActions-DI4ooSHW.js} +1 -1
- package/dist/client/assets/{AgentSessions-Bkr0lyry.js → AgentSessions-BxWIPkWh.js} +1 -1
- package/dist/client/assets/{AgentsConsole-WtFVqaPJ.js → AgentsConsole-D6VHSCfZ.js} +1 -1
- package/dist/client/assets/AgentsScreen-zR6b2bUL.js +1 -0
- package/dist/client/assets/AgentsSubnav-q0xcZi6C.js +1 -0
- package/dist/client/assets/{AtopView-_OKDlZ1h.js → AtopView-VZkk40v0.js} +1 -1
- package/dist/client/assets/{BackToPicker-CkUmHuuo.js → BackToPicker-DZg_4nHL.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-i54EtZKW.js → BriefingDetailScreen-BZU4qMwE.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-CBrHojlQ.js → BriefingsScreen-Bfc3tqPp.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-opTLuZU6.js → BrokerMetadataPanel-CaFe6kdh.js} +1 -1
- package/dist/client/assets/BrokerScreen-Chh8sGen.js +5 -0
- package/dist/client/assets/{ChatCollapsedStrip-Dr2vmKXQ.js → ChatCollapsedStrip-Cov54p9V.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-CLOGjwul.js → CodeDiffPane-C1ebFt-Y.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-DTV8hR6A.js → CodeProjectPicker-tsCly-f3.js} +1 -1
- package/dist/client/assets/CodeScreen-D0hpZNLP.js +1 -0
- package/dist/client/assets/{ContextMenu-BlBQhpax.js → ContextMenu-N-Z6X0Z1.js} +1 -1
- package/dist/client/assets/ConversationComposer-CiEF7dhd.js +1 -0
- package/dist/client/assets/ConversationFeedRows-5it6QNBV.js +1 -0
- package/dist/client/assets/ConversationHeader-BGgbITvr.js +1 -0
- package/dist/client/assets/ConversationPanels-vI9YuQJh.js +2 -0
- package/dist/client/assets/ConversationScreen-C-PrCRz1.js +1 -0
- package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
- package/dist/client/assets/{ConversationStatus-DSgdVofa.js → ConversationStatus-COEj5loj.js} +1 -1
- package/dist/client/assets/{DataTable-0DwuXyvW.js → DataTable-BoofV-_4.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-BrreQifA.js → DispatchAftermath-OXYlMbT1.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DU_9BHsD.js → DocumentFocusViewer-BCG2kOmd.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DdaswbfI.js → EmbeddableSurfacesLab-C2SZvrHJ.js} +1 -1
- package/dist/client/assets/{EmptyState-CoL-QuUO.js → EmptyState-DypEjx0V.js} +1 -1
- package/dist/client/assets/{FileViewerPane-C9Ly01Ef.js → FileViewerPane-CXCq-oKj.js} +1 -1
- package/dist/client/assets/{FleetSearch-DlWTLl-v.js → FleetSearch-Dj7-CfNi.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-Yq5NtQQJ.js +1 -0
- package/dist/client/assets/FollowScreen-DRgYuAvp.js +1 -0
- package/dist/client/assets/HarnessMark-BE-YSyci.js +1 -0
- package/dist/client/assets/HarnessesScreen-L-emPcXd.js +1 -0
- package/dist/client/assets/HerdrSession-DKFCJMst.js +4 -0
- package/dist/client/assets/{HomeHero-Cfsow7qL.js → HomeHero-CAEg8Yg5.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-DKashKoH.js → KnowledgeSearchInspector-C2EZsQ5i.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-DvdOFh-b.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-BzehBmdi.js → LaneToolHoverCard-DrPXYZvQ.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-Dl7foF88.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-DYvHfs_3.js → LaneTraceEventFocus-X4-DDFEo.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DIjlrMPU.js → MeshCanvas-rtCBD7s6.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-DEq-PkF0.js → MeshCanvasMinimap-CuvXOkc7.js} +1 -1
- package/dist/client/assets/MeshScreen-D5zzTn0o.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BMHpH5BU.js → MeshTopologyView-CeTShs-U.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-zAUUcLOv.js → MessageComposerSuggestions-Cs9u-F_3.js} +1 -1
- package/dist/client/assets/MessagesScreen-BhOJ7_tj.js +1 -0
- package/dist/client/assets/MissionContextRail-0O-Zu1Tn.js +1 -0
- package/dist/client/assets/MissionControlView-D2JO9u-y.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-C7cPt6eU.js → MissionFocusOverlay-LnjmqBiW.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-CxlH3dON.js → MissionLeftAgentRow-nc1Jyq3D.js} +1 -1
- package/dist/client/assets/MissionLogPane-lZ9vUftY.js +1 -0
- package/dist/client/assets/{NewAgentModal-DprvD4EK.js → NewAgentModal-K1cvdmZr.js} +1 -1
- package/dist/client/assets/NewChatComposer-C5LT7MF7.css +1 -0
- package/dist/client/assets/NewChatComposer-DXDxV2Mh.js +19 -0
- package/dist/client/assets/{NewChatOrigin--pHWUb4V.js → NewChatOrigin-CnjoswTG.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-CfvrnOiZ.js → ObserveEmbedScreen-CRpzYf0Y.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-CBitljxi.js → ObserveTextFlow-DJxQc2H6.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-Dv6fbHzW.js → ObservedTopologyPanel-C1AQM0Mq.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-DrHYD_pd.js +87 -0
- package/dist/client/assets/OpsAgentsView-BnMX0vEY.js +1 -0
- package/dist/client/assets/OpsScreen-BeC0lieE.js +1 -0
- package/dist/client/assets/OpsSubnav-D5Bpowtk.js +1 -0
- package/dist/client/assets/{PlanView-DYtt8H37.js → PlanView-DDXdC19M.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-zE1cApxw.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-B3IvVbqS.js → ProjectAgentProfileBar-MODhG0P6.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-D5E8yvDj.js → ProjectAgentProfileHero-C1ImgGDu.js} +1 -1
- package/dist/client/assets/ProjectsInbox-C3Jd6JTk.js +2 -0
- package/dist/client/assets/{ProjectsRail-DEDS-M1c.js → ProjectsRail-B1zrQLZe.js} +1 -1
- package/dist/client/assets/ProjectsScreen-PW_NH5VK.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-DaCEUWN1.js +1 -0
- package/dist/client/assets/Provider-DSsb2gLR.js +1 -0
- package/dist/client/assets/{RailRow-BTlVAnHS.js → RailRow-DerXOXQS.js} +1 -1
- package/dist/client/assets/RawSessionsTable-LWEvXJzj.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-XtxbCjOs.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-CtTdlQ2A.js → RepoDiffEmbedScreen-C9oLCcZX.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-BRvaVYoC.js → RepoDiffPageScreen-CGEMAv2Z.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-Bo0gREMj.js → RepoDiffViewer-CB8PSVey.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-DIxkiMto.js +2 -0
- package/dist/client/assets/{ReposScreen-BBkJf8xT.js → ReposScreen-BN1lVjOj.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-Bi9ov9Bm.js → ScoutDeckSurface-BCpl0QCx.js} +1 -1
- package/dist/client/assets/{ScoutSurface-DEQg_7Io.js → ScoutSurface-BEnDlynn.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-DJXuyn73.js → ScoutbotBroadcastChip-z9R_pC_U.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-BgsuLDjo.js → ScoutbotFxLab-fAROyIfz.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-Bzyl0BCS.js → ScoutbotRealtimeVoiceCall-CDyFJX8m.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Bks0CO2h.js → SecondaryNav-Hv5AJ3Fv.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-b0Zgmfx5.js → SessionEmbedScreen-CDRpQc3g.js} +1 -1
- package/dist/client/assets/{SessionObserve-Dlx5vDaV.js → SessionObserve-BmmJ8dEh.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-ChBD1d4c.js → SessionObserveEvidence-CEedIk2a.js} +1 -1
- package/dist/client/assets/SessionRefScreen-Dk-O4OVt.js +1 -0
- package/dist/client/assets/SessionsScreen-BJEjuo2X.js +1 -0
- package/dist/client/assets/{SettingsDrawer-C587L1i1.js → SettingsDrawer-DL-SVLdd.js} +1 -1
- package/dist/client/assets/SettingsScreen-DJ-BhBwR.js +1 -0
- package/dist/client/assets/{ShikiPane-I_OTW5NO.js → ShikiPane-B7O4if20.js} +1 -1
- package/dist/client/assets/{SlidePanel-FCqT1zO3.js → SlidePanel-B3gc5HnM.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-CQs-jC-v.js → SpriteAvatar-BpQDpOkq.js} +1 -1
- package/dist/client/assets/{StatusPill-CbABggnQ.js → StatusPill-B33sQinT.js} +1 -1
- package/dist/client/assets/{TailView-C_MXVSum.js → TailView-DL3YZkzE.js} +2 -2
- package/dist/client/assets/Terminal-Dp1FSGIS.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-DP9IM4xf.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-C-9EtYqt.js → TextDocumentSurface-DRjctOIt.js} +1 -1
- package/dist/client/assets/{TmuxPeek-Dz1gJ2pU.js → TmuxPeek-DNC4uWky.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-MfICy9kk.js → VoicePermissionsPanel-WLN0V-Xv.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Cs7kdllj.js → WorkDetailScreen-D2Yl0mYZ.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-CF-nhtZ4.js → WorkFilesViewer-BbVfcUN-.js} +1 -1
- package/dist/client/assets/{activity-WhBf3FXP.js → activity-BxwKkT8z.js} +1 -1
- package/dist/client/assets/{addon-fit-q-x_HytU.js → addon-fit-B9O2vJoh.js} +1 -1
- package/dist/client/assets/{addon-webgl-fhhvEA9h.js → addon-webgl-BhRZFDcn.js} +1 -1
- package/dist/client/assets/{agent-essentials-DyJiUGpZ.js → agent-essentials-SrzMYEXV.js} +1 -1
- package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
- package/dist/client/assets/{agent-lane-card-model-BCIwPjEh.js → agent-lane-card-model-DSWdGu-v.js} +1 -1
- package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +2 -0
- package/dist/client/assets/{agent-lane-preview-BtnfNyFR.js → agent-lane-preview-C33Dwpn7.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-Bl6xfviL.js → agent-lanes-model-CPgQRenB.js} +2 -2
- package/dist/client/assets/{arc.es-DPJ0xRV6.js → arc.es-NlJw-19N.js} +1 -1
- package/dist/client/assets/{arrow-down-DsD-dYj-.js → arrow-down-D3-IbArq.js} +1 -1
- package/dist/client/assets/{arrow-left-WjQIN9J6.js → arrow-left-_vS7itsV.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CtTDrZJr.js → arrow-up-right-CcrWONpD.js} +1 -1
- package/dist/client/assets/{bot-B_Uzf4_O.js → bot-BRINYlC6.js} +1 -1
- package/dist/client/assets/{check-BbgHJX8u.js → check-COxArFXG.js} +1 -1
- package/dist/client/assets/{chevron-down-BFai6ZfE.js → chevron-down-DRCbnzyY.js} +1 -1
- package/dist/client/assets/{chevron-right-CyUa1zXx.js → chevron-right-CNE6QAVr.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-CvwpNg-G.js → chunk-HRAB3GC3-CAeEKaf5.js} +1 -1
- package/dist/client/assets/chunk-JTPDIGGW-s6WbxdjC.js +46 -0
- package/dist/client/assets/{chunk-T65CQEWV-DI4NKdNq.js → chunk-T65CQEWV-CiZ_ICHW.js} +1 -1
- package/dist/client/assets/chunk-YOZR3KYS-DLOc92uD.js +2 -0
- package/dist/client/assets/{clock-DviOalxA.js → clock-CyfvRmj6.js} +1 -1
- package/dist/client/assets/{code-xml-05TD3uOC.js → code-xml--LjSM4Mv.js} +1 -1
- package/dist/client/assets/content-7ZeCPAEt.js +1 -0
- package/dist/client/assets/content-BHUcUCH5.js +1 -0
- package/dist/client/assets/content-BUhvLPkv.js +1 -0
- package/dist/client/assets/content-BomQ5YWo.js +1 -0
- package/dist/client/assets/content-C39ELNgC.js +1 -0
- package/dist/client/assets/content-C4RYKHut.js +1 -0
- package/dist/client/assets/content-CCiZfG4H.js +1 -0
- package/dist/client/assets/content-CDpDtVI-.js +1 -0
- package/dist/client/assets/content-CO-9CeFd.js +1 -0
- package/dist/client/assets/content-CuOLxp1x.js +1 -0
- package/dist/client/assets/content-CvtLIjXS.js +1 -0
- package/dist/client/assets/content-CzwTUb9n.js +1 -0
- package/dist/client/assets/content-DQXbo2RO.js +1 -0
- package/dist/client/assets/content-DRTQ9QQb.js +1 -0
- package/dist/client/assets/content-LCELs6zg.js +1 -0
- package/dist/client/assets/content-Uqt8AG-s.css +1 -0
- package/dist/client/assets/content-qsDjA4Au.js +1 -0
- package/dist/client/assets/{conversation-icons-DohQL6GI.js → conversation-icons-c-hXv7hY.js} +1 -1
- package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
- package/dist/client/assets/conversation-motion-features-T8vF9zED.js +1 -0
- package/dist/client/assets/{copy-CwCAivnc.js → copy-4LfKIdQJ.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DlxlBfLC.js → createLucideIcon-ClCdc3F9.js} +1 -1
- package/dist/client/assets/discover-7Ks00w-M.js +2 -0
- package/dist/client/assets/embed-entry-n2ThmSSX.js +2 -0
- package/dist/client/assets/{external-link-CnjcXf32.js → external-link-CnaI1QFS.js} +1 -1
- package/dist/client/assets/{eye-So8tNNK6.js → eye-BFlhMzQL.js} +1 -1
- package/dist/client/assets/{file-text-i3xTDUjJ.js → file-text-DG-pufl1.js} +1 -1
- package/dist/client/assets/{gestures-CgvAMd6F.js → gestures-CxG3Dphs.js} +1 -1
- package/dist/client/assets/home-live-action-BkqGLVRY.js +1 -0
- package/dist/client/assets/home-moving-signal-aNJusIzL.js +1 -0
- package/dist/client/assets/home-now-card-BQK4EFHx.js +1 -0
- package/dist/client/assets/{home-now-card-nano-CkLHUQ4J.js → home-now-card-nano-CdtzqSIF.js} +1 -1
- package/dist/client/assets/hooks-Dst1TH7n.js +2 -0
- package/dist/client/assets/index-9as_JTUs.css +1 -0
- package/dist/client/assets/index-CU9dtwJk.js +1 -0
- package/dist/client/assets/{index-sUomXsrf.js → index-CzVeWScw.js} +2 -2
- package/dist/client/assets/index-Dewd56RX.js +1 -0
- package/dist/client/assets/index-_YQXKEhb.js +1 -0
- package/dist/client/assets/{inspector-panel-DhXd-YbT.js → inspector-panel-DgOM8nCo.js} +1 -1
- package/dist/client/assets/keyboard-nav-BJnFoFDP.js +1 -0
- package/dist/client/assets/{lane-observe-DrhKkQ3A.js → lane-observe-BA3g9aVd.js} +1 -1
- package/dist/client/assets/{lane-roster-store-NE15Oe6M.js → lane-roster-store-pR4ZaYQm.js} +1 -1
- package/dist/client/assets/left-BhzPp-_E.js +1 -0
- package/dist/client/assets/left-CN1MABD0.js +2 -0
- package/dist/client/assets/left-DDgbsio7.js +1 -0
- package/dist/client/assets/left-Dpf2R9uD.js +1 -0
- package/dist/client/assets/left-HwwbMVtl.js +2 -0
- package/dist/client/assets/left-YfH0daht.js +1 -0
- package/dist/client/assets/left-agents-CYUwAy2Z.js +1 -0
- package/dist/client/assets/left-default-vEGZALPv.js +1 -0
- package/dist/client/assets/left-lanes-bphF-vlX.js +1 -0
- package/dist/client/assets/left-mission-B54-c3hq.js +1 -0
- package/dist/client/assets/left-np5USKqG.js +1 -0
- package/dist/client/assets/left-plan-BNBuDoPQ.js +2 -0
- package/dist/client/assets/library-DbCVJG_O.js +1 -0
- package/dist/client/assets/{loader-circle-lWOOKezu.js → loader-circle-Byb9kSFx.js} +1 -1
- package/dist/client/assets/{local-agents-C7fDHLVC.js → local-agents-DBaUbP-_.js} +1 -1
- package/dist/client/assets/{mentions-CY_wPZc5.js → mentions-fbQJ2mBI.js} +1 -1
- package/dist/client/assets/{mesh-ops-Kn8pCtyJ.js → mesh-ops-Cnw3vwAu.js} +1 -1
- package/dist/client/assets/{mesh-view-store-D14ihwkF.js → mesh-view-store-Btlyc7rW.js} +1 -1
- package/dist/client/assets/{message-circle-C5UZ6fO7.js → message-circle-aGOfQWm2.js} +1 -1
- package/dist/client/assets/{message-markup-C8Nx04sP.js → message-markup-mGF07emJ.js} +1 -1
- package/dist/client/assets/{message-square-BD-4UUdc.js → message-square-CIXda-Y7.js} +1 -1
- package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
- package/dist/client/assets/{mission-control-store-xQHVQdm8.js → mission-control-store-CcoNeQHG.js} +1 -1
- package/dist/client/assets/mission-wall-CocIM1cF.js +1 -0
- package/dist/client/assets/{observe-uJfIlIUV.js → observe-BNFzh-7B.js} +1 -1
- package/dist/client/assets/openAgent-Dbv5wfuL.js +1 -0
- package/dist/client/assets/{page-status-BymFEFai.js → page-status-DDvNdA8s.js} +1 -1
- package/dist/client/assets/{paperclip-DL9BXPp2.js → paperclip-DfpJkR4s.js} +1 -1
- package/dist/client/assets/{plus-C9lTjsgd.js → plus-CmFQp9Uj.js} +1 -1
- package/dist/client/assets/profile-s3KRbip1.js +1 -0
- package/dist/client/assets/{projects-inbox-DfVmGFFk.js → projects-inbox-Diddml6e.js} +1 -1
- package/dist/client/assets/{radio-DedMyP8J.js → radio-PauJIekM.js} +1 -1
- package/dist/client/assets/{refresh-cw-D8PFyhUa.js → refresh-cw-4oeFn1Jn.js} +1 -1
- package/dist/client/assets/resolve-panes-cp6eNewO.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-Dbo-5PWx.js +1 -0
- package/dist/client/assets/right-09W2JJFg.js +1 -0
- package/dist/client/assets/right-B-MKhiJ6.js +1 -0
- package/dist/client/assets/right-B91Zl8lQ.js +1 -0
- package/dist/client/assets/{right-C1sIsSHR.js → right-BcFnuse9.js} +1 -1
- package/dist/client/assets/right-BdtMzn35.js +1 -0
- package/dist/client/assets/right-BqmKXLtf.js +1 -0
- package/dist/client/assets/right-BzeB-Dpt.js +1 -0
- package/dist/client/assets/right-CkGOs-sq.js +1 -0
- package/dist/client/assets/right-CzGiNBzB.js +1 -0
- package/dist/client/assets/right-Dc7uqv7l.js +1 -0
- package/dist/client/assets/{rocket-CriBwkHM.js → rocket-C-AskjZH.js} +1 -1
- package/dist/client/assets/router-B-K15T7B.js +1 -0
- package/dist/client/assets/{runtime-picker-DOZpZOlt.js → runtime-picker-BCQD7d4K.js} +1 -1
- package/dist/client/assets/{scope-views-BF_RvGKU.js → scope-views-BhkbIFPY.js} +1 -1
- package/dist/client/assets/{scout-voice-BZ4KqADJ.js → scout-voice-S5_YZ2v8.js} +1 -1
- package/dist/client/assets/{scroll-text-BIYf6g6N.js → scroll-text-BV-BB7v-.js} +1 -1
- package/dist/client/assets/{search-DCT_EvPr.js → search-C3bSJluv.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-Drb7wPG4.js → secondaryNavConfig-Bg4Tc0gT.js} +1 -1
- package/dist/client/assets/{selection-bridge-CJOTyYQs.js → selection-bridge-B1dmkX3P.js} +1 -1
- package/dist/client/assets/{send-horizontal-DDwOgEs3.js → send-horizontal-CqogPmbY.js} +1 -1
- package/dist/client/assets/{server-CHZCp3cF.js → server-Brw5Y1Gh.js} +1 -1
- package/dist/client/assets/{session-catalog-XhGxCtP-.js → session-catalog-9FqXmjBw.js} +1 -1
- package/dist/client/assets/session-table-1xdSxSXq.js +1 -0
- package/dist/client/assets/{sliders-horizontal-B9Nj-Y4J.js → sliders-horizontal-CUiOH26y.js} +1 -1
- package/dist/client/assets/{sparkles-up7pVlX-.js → sparkles-BjCA3Evu.js} +1 -1
- package/dist/client/assets/{sse-CVoGDiKW.js → sse-QcU9bikk.js} +1 -1
- package/dist/client/assets/synthetic-agent-routing-aduMYO7P.js +1 -0
- package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
- package/dist/client/assets/{tail-display-BdyoLvzY.js → tail-display-BRcJltQa.js} +2 -2
- package/dist/client/assets/{tail-events-CTipUIli.js → tail-events-C6K7bCWB.js} +1 -1
- package/dist/client/assets/{terminal-DXQISjZn.js → terminal-DrTkVXIj.js} +1 -1
- package/dist/client/assets/{terminal-relay-B5Sma7fK.js → terminal-relay-BkXjjSkq.js} +1 -1
- package/dist/client/assets/{terminal-screen-19jAI0Cw.css → terminal-screen-BqVnCwl0.css} +1 -1
- package/dist/client/assets/terminal-sessions-C3qU8tnY.js +1 -0
- package/dist/client/assets/{terminal-takeover-X97KCSJk.js → terminal-takeover-KvmTwABa.js} +1 -1
- package/dist/client/assets/{use-conversation-list-B1T6J_qE.js → use-conversation-list-C5sF6WBR.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DLofGhhK.js → use-fleet-active-asks-BOMPW0nl.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-ByGZk8rU.js → use-mesh-ops-items-Co05vcTV.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-Cvk-HRKg.js → use-reduced-motion-Dla-G_Jz.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-BHvg3G2c.js → use-scout-dev-flags-BOQF3fW2.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-D5e8Qg1z.js → useAgentHoverCard-FtCmY-b9.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-BX7Sq7vy.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DIVunfX0.js → usePierreRuntime-Bo4lD7Ui.js} +1 -1
- package/dist/client/assets/{wrench-pEVd8JnN.js → wrench-CeCdjiPF.js} +1 -1
- package/dist/client/assets/{x-0XjXwGqq.js → x-D4X_y1j_.js} +1 -1
- package/dist/client/assets/{xterm-CRLlV1Xp.js → xterm-D2a5wrkJ.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +1404 -356
- package/dist/node/main.mjs +63 -15
- package/dist/openscout-terminal-relay.mjs +16 -4
- package/dist/pairing-runtime-controller.mjs +3028 -2946
- package/dist/runtime/broker-daemon.mjs +356 -134
- package/dist/scout-control-plane-web.mjs +5631 -5183
- package/dist/scout-web-server.mjs +5631 -5183
- package/package.json +1 -1
- package/dist/client/assets/ActivityScreen-DnqqRSlS.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-CJqoMA0J.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-FpEkb-tu.js +0 -1
- package/dist/client/assets/AgentFloorView-CycUn0Lv.js +0 -1
- package/dist/client/assets/AgentInfoScreen-CAQAxpAK.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-CWs9wKWk.js +0 -5
- package/dist/client/assets/AgentLanesEmbedScreen-BUCW4nUj.js +0 -1
- package/dist/client/assets/AgentsScreen-BMXvuiA2.js +0 -1
- package/dist/client/assets/AgentsSubnav-BTNjPYoA.js +0 -1
- package/dist/client/assets/BrokerScreen-CObCQvoy.js +0 -5
- package/dist/client/assets/CodeScreen-BXqi72NK.js +0 -1
- package/dist/client/assets/ConversationComposer-BBNPa5S9.js +0 -1
- package/dist/client/assets/ConversationFeedRows-BuejHMCY.js +0 -1
- package/dist/client/assets/ConversationHeader-DXMT-YXv.js +0 -1
- package/dist/client/assets/ConversationPanels-DHCtilQF.js +0 -2
- package/dist/client/assets/ConversationScreen-DSxIt9pq.css +0 -1
- package/dist/client/assets/ConversationScreen-Dz2d_Z_F.js +0 -1
- package/dist/client/assets/FlightObserveScreen-C-9S0nA5.js +0 -1
- package/dist/client/assets/FollowScreen--Q04xSSE.js +0 -1
- package/dist/client/assets/HarnessMark-Dm_qm1Ku.js +0 -1
- package/dist/client/assets/HarnessesScreen-Y54viPX8.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DsdDz8wY.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-CBf_aNZx.js +0 -1
- package/dist/client/assets/MeshScreen-TgDtz-1l.js +0 -1
- package/dist/client/assets/MessagesScreen-BTQL0UcE.js +0 -1
- package/dist/client/assets/MissionControlView-D59SPnAm.js +0 -1
- package/dist/client/assets/MissionLogPane-Ye3YlF9s.js +0 -1
- package/dist/client/assets/NewChatComposer-B5FnPyzS.js +0 -19
- package/dist/client/assets/NewChatComposer-W-t-L4oV.css +0 -1
- package/dist/client/assets/OpenScoutAppShell-BIp0WitK.js +0 -87
- package/dist/client/assets/OpsAgentsView-CoBfAigH.js +0 -1
- package/dist/client/assets/OpsScreen-Bbo0W64T.js +0 -1
- package/dist/client/assets/OpsSubnav-CoN8utF8.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-FiiIcB5R.js +0 -1
- package/dist/client/assets/ProjectsInbox-BWiXjGi7.js +0 -2
- package/dist/client/assets/ProjectsScreen-Cxk4CuYn.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BF66ugT5.js +0 -1
- package/dist/client/assets/Provider-tFc3jqZ4.js +0 -1
- package/dist/client/assets/RawSessionsTable-BsGVgZB3.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-B0Bem5Rc.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-C8UPk4oo.js +0 -2
- package/dist/client/assets/SessionRefScreen-D7TfPYPN.js +0 -1
- package/dist/client/assets/SessionsScreen-BlknOWAd.js +0 -1
- package/dist/client/assets/SettingsScreen-BIlYxv_a.js +0 -1
- package/dist/client/assets/Terminal-DwZyo8kA.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-Czp3tQyd.js +0 -1
- package/dist/client/assets/agent-chat-Bfjd9y6c.js +0 -1
- package/dist/client/assets/agent-identity-xQHedtLl.js +0 -1
- package/dist/client/assets/agent-lane-detail-Cw4QVAgH.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-BW85tiCr.js +0 -47
- package/dist/client/assets/content-2u_eV3fX.js +0 -1
- package/dist/client/assets/content-5irOghrY.js +0 -1
- package/dist/client/assets/content-8Z_0CwtD.js +0 -1
- package/dist/client/assets/content-B38YRDBu.js +0 -1
- package/dist/client/assets/content-BE3uK0LB.js +0 -1
- package/dist/client/assets/content-BtIxSqVY.js +0 -1
- package/dist/client/assets/content-CFsPAihU.js +0 -1
- package/dist/client/assets/content-CHU0wwA3.css +0 -1
- package/dist/client/assets/content-CKj5g5tu.js +0 -1
- package/dist/client/assets/content-CLDWXf9Z.js +0 -1
- package/dist/client/assets/content-CRr73E0r.js +0 -1
- package/dist/client/assets/content-CVR75_Uj.js +0 -1
- package/dist/client/assets/content-Czdp7_JQ.js +0 -1
- package/dist/client/assets/content-D0_EJ6nP.js +0 -1
- package/dist/client/assets/content-DNmxpNhD.js +0 -1
- package/dist/client/assets/content-XpbI9uxd.js +0 -1
- package/dist/client/assets/content-cyxWdgKQ.js +0 -1
- package/dist/client/assets/conversation-model-C4yb6_FA.js +0 -1
- package/dist/client/assets/conversation-motion-features-CifSdJtm.js +0 -1
- package/dist/client/assets/discover-DoiAJo4Z.js +0 -2
- package/dist/client/assets/embed-entry-D1Or9S4d.js +0 -2
- package/dist/client/assets/home-live-action-B22u89j7.js +0 -1
- package/dist/client/assets/home-moving-signal-BdkERL6B.js +0 -1
- package/dist/client/assets/home-now-card-lLkv6nQs.js +0 -1
- package/dist/client/assets/hooks-BPLDD9yu.js +0 -2
- package/dist/client/assets/index-DGoLx89y.js +0 -1
- package/dist/client/assets/index-DITWsjFb.css +0 -1
- package/dist/client/assets/index-m6dFtY5f.js +0 -1
- package/dist/client/assets/index-pY8-Mz7y.js +0 -1
- package/dist/client/assets/keyboard-nav-BhZZ5HEq.js +0 -1
- package/dist/client/assets/left-B6eawimv.js +0 -1
- package/dist/client/assets/left-BL2uBHe0.js +0 -2
- package/dist/client/assets/left-BNJguPDG.js +0 -1
- package/dist/client/assets/left-BvCtvN0f.js +0 -1
- package/dist/client/assets/left-CfBb6bxM.js +0 -1
- package/dist/client/assets/left-DTrlBF0h.js +0 -2
- package/dist/client/assets/left-agents-DsOHgDCY.js +0 -1
- package/dist/client/assets/left-d4hlBBxY.js +0 -1
- package/dist/client/assets/left-default-BRCwoCJr.js +0 -1
- package/dist/client/assets/left-lanes-DNtoRzoV.js +0 -1
- package/dist/client/assets/left-mission-DsTu2X5Y.js +0 -1
- package/dist/client/assets/left-plan-CtySjsXC.js +0 -2
- package/dist/client/assets/library-CLpgWNJO.js +0 -1
- package/dist/client/assets/mission-control-D3ikEPND.css +0 -1
- package/dist/client/assets/openAgent-Bjt57GdM.js +0 -1
- package/dist/client/assets/profile-BqY5tesX.js +0 -1
- package/dist/client/assets/resolve-panes-1xeZMuaw.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-PLr32WHN.js +0 -1
- package/dist/client/assets/right-1x7HzabC.js +0 -1
- package/dist/client/assets/right-CFzPUzlF.js +0 -1
- package/dist/client/assets/right-CRKyeJDk.js +0 -1
- package/dist/client/assets/right-CagzkLWg.js +0 -1
- package/dist/client/assets/right-CsV149pN.js +0 -1
- package/dist/client/assets/right-DITNyG2s.js +0 -1
- package/dist/client/assets/right-E3nNcLE3.js +0 -1
- package/dist/client/assets/right-eUQvSjd7.js +0 -1
- package/dist/client/assets/right-ozp4nM44.js +0 -1
- package/dist/client/assets/router-Dja9_ygK.js +0 -1
- package/dist/client/assets/session-table-sAVe44a4.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-CD26LFc0.css +0 -1
- package/dist/client/assets/terminal-sessions-D5CIR2OL.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-ZfBNi3d4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l,r as d}from"./index-sUomXsrf.js";import{n as y,e as F,f as V,d as K}from"./colors-BtO5_zlx.js";import{r as T}from"./index-m6dFtY5f.js";import{a as Z}from"./api-h5zurxmi.js";import{u as N}from"./Provider-tFc3jqZ4.js";import{A as U}from"./AgentDetailCard-DxxVkgT1.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=e.model?m(e.model):void 0,s=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...o?{harness:o}:{},...i?{model:i}:{},...s?{nodeQualifier:s}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;y(e.state);const c=F(e.state,e)?30:V(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await Z(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Te(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":K(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Te as r};
|
|
1
|
+
import{j as l,r as d}from"./index-CzVeWScw.js";import{n as y,e as F,f as V,d as K}from"./colors-BtO5_zlx.js";import{r as T}from"./index-Dewd56RX.js";import{a as Z}from"./api-h5zurxmi.js";import{u as N}from"./Provider-DSsb2gLR.js";import{A as U}from"./AgentDetailCard-sZuHl1de.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=e.model?m(e.model):void 0,s=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...o?{harness:o}:{},...i?{model:i}:{},...s?{nodeQualifier:s}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;y(e.state);const c=F(e.state,e)?30:V(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await Z(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Te(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":K(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Te as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p}from"./index-
|
|
1
|
+
import{r as p}from"./index-CzVeWScw.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d}from"./index-
|
|
1
|
+
import{r as d}from"./index-CzVeWScw.js";const u=new Set(["in_turn","in_flight","needs_attention","callable","blocked"]),l="openscout.mesh.machinePositions.v1";function f(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(l);if(!e)return{};const n=JSON.parse(e);if(n&&typeof n=="object"){const i={};for(const[c,o]of Object.entries(n))o&&typeof o=="object"&&typeof o.x=="number"&&typeof o.y=="number"&&(i[c]={x:o.x,y:o.y});return i}}catch{}return{}}function r(e){if(!(typeof window>"u"))try{window.localStorage.setItem(l,JSON.stringify(e))}catch{}}let t={mode:"map",density:"comfortable",selectedId:null,selectedType:null,meshSnapshot:null,probeCache:{},query:"",stateFilter:"all",agentStateFilters:u,hiddenMachineIds:new Set,collapsedMachineIds:new Set,treeFullMachineIds:new Set,scrollTargetMachineId:null,machinePositions:f()};const a=new Set;function s(){for(const e of a)e()}function p(e){t.mode!==e&&(t={...t,mode:e},s())}function g(e){t.density!==e&&(t={...t,density:e},s())}function w(e,n){t.selectedId===e&&t.selectedType===n||(t={...t,selectedId:e,selectedType:n},s())}function y(e){t={...t,meshSnapshot:e},s()}function I(e){t.query!==e&&(t={...t,query:e},s())}function b(e){t.stateFilter!==e&&(t={...t,stateFilter:e},s())}function T(e){const n=new Set(t.agentStateFilters);n.has(e)?n.delete(e):n.add(e),t={...t,agentStateFilters:n},s()}function x(e){const n=new Set(t.treeFullMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,treeFullMachineIds:n},s()}function P(e){const n=new Set(t.hiddenMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,hiddenMachineIds:n},s()}function _(e,n){const i=new Set;for(const c of n)c!==e&&i.add(c);t={...t,hiddenMachineIds:i},s()}function m(){t.hiddenMachineIds.size!==0&&(t={...t,hiddenMachineIds:new Set},s())}function F(e){const n=new Set(t.collapsedMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,collapsedMachineIds:n},s()}function A(e,n){const i={...t.machinePositions,[e]:n};t={...t,machinePositions:i},r(i),s()}function O(){if(Object.keys(t.machinePositions).length===0)return;const e={};t={...t,machinePositions:e},r(e),s()}function E(e){t={...t,scrollTargetMachineId:e},s(),queueMicrotask(()=>{t.scrollTargetMachineId===e&&(t={...t,scrollTargetMachineId:null},s())})}function h(e){return a.add(e),()=>{a.delete(e)}}function S(){return t}function j(){return d.useSyncExternalStore(h,S)}export{w as a,F as b,A as c,O as d,p as e,g as f,I as g,b as h,T as i,m as j,x as k,_ as l,E as r,y as s,P as t,j as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-ClCdc3F9.js";const c=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],a=e("message-circle",c);export{a as M};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./index-
|
|
1
|
+
import{j as i}from"./index-CzVeWScw.js";import{r as c}from"./mentions-fbQJ2mBI.js";const h=/^```([a-z0-9_-]+)?\s*$/iu,E=/^(#{1,6})\s+(.+)$/u,L=/^(?:-{3,}|\*{3,}|_{3,})$/u,_=/^\s*[-*]\s+(.+)$/u,M=/^\s*\d+[.)]\s+(.+)$/u,w=/^\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?$/u;function B(e){return/[\r\n]/u.test(e)||!(/(?:(?:\\r)?\\n){2}/u.test(e)||/(?:\\r)?\\n(?=\s*(?:#{1,6}\s|[-*+]\s|>\s|\d+[.)]\s|[A-Z][A-Za-z ]{0,40}:))/u.test(e))?e:e.replace(/\\r\\n|\\n|\\r/gu,`
|
|
2
2
|
`)}function P(e){const s=B(e).replace(/\r\n?/gu,`
|
|
3
3
|
`).trim();return s?s.replace(/([^\n])\s+---\s+(?=(?:#{1,6}\s|\*\*|[A-Z0-9]))/gu,`$1
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-ClCdc3F9.js";const e=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],o=a("message-square",e);export{o as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.s-wall{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg);font-family:var(--font-mono);color:var(--ink);overflow:hidden}.s-wall-status{flex:none;display:flex;align-items:center;gap:var(--space-sm);min-height:26px;padding:0 var(--space-lg);border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 18%,var(--bg));font-size:var(--text-2xs);letter-spacing:.04em}.s-wall-status-key{color:var(--dim);text-transform:lowercase}.s-wall-status-value{color:var(--muted);font-variant-numeric:tabular-nums;margin-right:var(--space-md)}.s-wall-status-hidden{color:var(--dim);font-variant-numeric:tabular-nums}.s-wall-status-keys{margin-left:auto;color:var(--dim);white-space:nowrap}.s-wall-status-keys kbd{font:inherit;color:var(--muted)}.s-wall-status-pin{margin-left:var(--space-md);padding:0;border:0;background:none;color:var(--accent);font:inherit;letter-spacing:inherit;cursor:pointer}.s-wall-status-pin:hover{text-decoration:underline}.s-wall-grid{flex:1;min-height:0;display:grid;padding:var(--space-sm);overflow:hidden}.s-wall-pane{position:relative;display:flex;flex-direction:column;contain:layout paint;min-width:0;min-height:0;border:1px solid var(--border);border-radius:var(--radius-xs);background:color-mix(in srgb,var(--surface) 34%,var(--bg));overflow:hidden;cursor:pointer;transition:border-color .12s}.s-wall-pane:hover{border-color:color-mix(in srgb,var(--muted) 45%,var(--border))}.s-wall-pane--live{border-color:color-mix(in srgb,var(--green) 30%,var(--border))}.s-wall-pane--selected,.s-wall-pane--selected:hover{border-color:var(--accent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 45%,transparent)}.s-wall-pane--cursor,.s-wall-pane--cursor:hover{border-color:color-mix(in srgb,var(--accent) 70%,var(--border));outline:1px solid var(--accent);outline-offset:-1px}.s-wall-pane:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}.s-wall-pane--revealed{animation:s-wall-reveal 1.8s ease-out}@keyframes s-wall-reveal{0%,40%{box-shadow:inset 0 0 0 1px var(--accent);border-color:var(--accent)}to{box-shadow:inset 0 0 0 1px transparent}}@media(prefers-reduced-motion:reduce){.s-wall-pane--revealed{animation:none;border-color:var(--accent)}}.s-wall-pane-head{flex:none;display:flex;align-items:center;gap:var(--space-xs);min-height:22px;padding:0 var(--space-sm);border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--ink) 3%,transparent);font-size:var(--text-2xs);letter-spacing:.02em;white-space:nowrap;overflow:hidden}.s-wall-pane-dot{flex:none;width:5px;height:5px;border-radius:50%}.s-wall-pane--live .s-wall-pane-dot{animation:s-ops-pulse 1.6s ease-in-out infinite}.s-wall-pane-title{flex:0 1 auto;min-width:0;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-weight:600;letter-spacing:inherit;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.s-wall-pane-title:hover{color:var(--accent)}.s-wall-pane-title:focus-visible{outline:1px solid var(--accent);outline-offset:2px}.s-wall-pane-where{flex:0 1 auto;min-width:0;color:var(--dim);overflow:hidden;text-overflow:ellipsis}.s-wall-pane-spacer{flex:1 1 auto}.s-wall-pane-live{flex:none;color:var(--green);text-transform:uppercase;letter-spacing:var(--tracking-md)}.s-wall-pane-file{flex:none;max-width:40%;padding:0;border:0;background:none;color:var(--dim);font:inherit;letter-spacing:inherit;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.s-wall-pane-file:hover{color:var(--accent);text-decoration:underline}.s-wall-pane-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:2px 0 4px;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--border) 80%,transparent) transparent}.s-wall-pane-body::-webkit-scrollbar{width:5px}.s-wall-pane-body::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--border) 80%,transparent)}.s-wall-pane-idle{padding:var(--space-sm) var(--space-md);color:var(--dim);font-size:var(--text-2xs);letter-spacing:var(--tracking-sm)}.s-wall-line{display:grid;grid-template-columns:52px 8px minmax(0,1fr);align-items:baseline;content-visibility:auto;contain-intrinsic-size:auto 15px;gap:var(--space-xs);padding:0 var(--space-sm);font-size:var(--text-2xs);line-height:15px;color:var(--muted)}.s-wall-line:nth-child(2n){background:color-mix(in srgb,var(--ink) 2.5%,transparent)}.s-wall-line-time{color:var(--dim);font-variant-numeric:tabular-nums}.s-wall-line-glyph{color:var(--dim)}.s-wall-line-text{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}.s-wall-line-repeat{color:var(--dim);font-variant-numeric:tabular-nums}.s-wall-line--user .s-wall-line-text{color:var(--ink)}.s-wall-line--assistant .s-wall-line-text{color:color-mix(in srgb,var(--ink) 80%,transparent)}.s-wall-line--tool .s-wall-line-text{color:var(--accent)}.s-wall-line--system .s-wall-line-text,.s-wall-line--other .s-wall-line-text{color:var(--dim)}.s-wall-pane-body>.s-wall-line:last-child{animation:s-wall-line-in .22s cubic-bezier(.22,.61,.36,1) both}@keyframes s-wall-line-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.s-wall-pane-body>.s-wall-line:last-child{animation:none}}.s-wall-grid--railed .s-wall-pane:not(.s-wall-pane--cursor){opacity:.5;transition:opacity .12s}.s-wall-rail{position:absolute;top:26px;right:0;bottom:0;z-index:3;width:min(400px,46vw);display:flex;flex-direction:column;border-left:1px solid var(--border);background:color-mix(in srgb,var(--surface) 92%,var(--bg));box-shadow:-12px 0 28px -18px #000000a6;font-size:var(--text-2xs);letter-spacing:.02em;overflow:hidden}.s-wall-rail-head{flex:none;display:flex;align-items:center;gap:var(--space-xs);min-height:34px;padding:0 var(--space-sm);border-bottom:1px solid var(--border)}.s-wall-rail-dot{flex:none;width:5px;height:5px;border-radius:50%;background:var(--dim)}.s-wall-rail-dot--live{background:var(--green);animation:s-ops-pulse 1.6s ease-in-out infinite}.s-wall-rail-identity{min-width:0;flex:1 1 auto}.s-wall-rail-title{color:var(--ink);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-wall-rail-sub{color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-wall-rail-close{flex:none;padding:0 var(--space-2xs);border:0;background:none;color:var(--dim);font:inherit;cursor:pointer}.s-wall-rail-close:hover{color:var(--ink)}.s-wall-rail-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:var(--space-sm);scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--border) 80%,transparent) transparent}.s-wall-rail-sec+.s-wall-rail-sec{margin-top:var(--space-md)}.s-wall-rail-sechead{display:flex;align-items:center;gap:var(--space-xs);margin-bottom:var(--space-xs);color:var(--dim);text-transform:uppercase;letter-spacing:var(--tracking-md)}.s-wall-rail-seccount{color:var(--muted);text-transform:none;letter-spacing:.02em;font-variant-numeric:tabular-nums}.s-wall-rail-secrule{flex:1 1 auto;height:1px;background:var(--border)}.s-wall-rail-headline{color:var(--ink);line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.s-wall-rail-detail{margin-top:2px;color:var(--dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-wall-rail-empty{color:var(--dim);line-height:1.45}.s-wall-rail-stats{display:flex;flex-wrap:wrap;gap:var(--space-md);margin:var(--space-sm) 0 0}.s-wall-rail-stat{display:flex;flex-direction:column;gap:1px}.s-wall-rail-stat-label{color:var(--dim);text-transform:uppercase;letter-spacing:var(--tracking-md)}.s-wall-rail-stat-value{margin:0;color:var(--ink);font-variant-numeric:tabular-nums}.s-wall-rail-gauge{margin-top:var(--space-sm)}.s-wall-rail-gauge-line{display:flex;align-items:baseline;gap:var(--space-xs);color:var(--muted)}.s-wall-rail-gauge-label{color:var(--dim);text-transform:uppercase;letter-spacing:var(--tracking-md)}.s-wall-rail-gauge-of{color:var(--dim)}.s-wall-rail-gauge-pct{margin-left:auto;font-variant-numeric:tabular-nums}.s-wall-rail-gauge--over .s-wall-rail-gauge-pct{color:var(--accent)}.s-wall-rail-gauge-bar{position:relative;height:3px;margin-top:4px;border-radius:2px;background:color-mix(in srgb,var(--border) 70%,transparent);overflow:hidden}.s-wall-rail-gauge-fill{display:block;height:100%;background:color-mix(in srgb,var(--muted) 70%,transparent)}.s-wall-rail-gauge--over .s-wall-rail-gauge-fill{background:var(--accent)}.s-wall-rail-facts{margin:0;display:grid;gap:2px}.s-wall-rail-fact{display:grid;grid-template-columns:62px minmax(0,1fr);gap:var(--space-xs);align-items:baseline}.s-wall-rail-fact-label{color:var(--dim);letter-spacing:var(--tracking-md)}.s-wall-rail-fact-value{margin:0;min-width:0;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-wall-rail-files{display:grid;gap:1px}.s-wall-rail-frow{display:flex;align-items:baseline;gap:var(--space-xs);width:100%;padding:1px 2px;border:0;border-radius:var(--radius-xs);background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer}.s-wall-rail-frow:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}.s-wall-rail-fstate{flex:none;width:8px;color:var(--dim)}.s-wall-rail-fstate--created,.s-wall-rail-fstate--modified{color:var(--accent)}.s-wall-rail-fpath{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-wall-rail-fdir{color:var(--dim)}.s-wall-rail-fbase{color:var(--ink)}.s-wall-rail-cmds{display:grid;gap:1px}.s-wall-rail-crow{display:flex;align-items:baseline;gap:var(--space-xs);padding:1px 2px;overflow:hidden}.s-wall-rail-cmark{flex:none;color:var(--dim)}.s-wall-rail-ctext{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s-wall-rail-bash-dir{color:var(--dim)}.s-wall-rail-bash-prog{color:var(--ink)}.s-wall-rail-bash-arg{color:var(--muted)}.s-wall-rail-bash-dim,.s-wall-rail-bash-flag{color:var(--dim)}.s-wall-rail-cresult{flex:none;margin-left:auto;color:var(--dim);font-variant-numeric:tabular-nums}.s-wall-rail-foot{flex:none;display:flex;align-items:center;gap:var(--space-sm);min-height:28px;padding:0 var(--space-sm);border-top:1px solid var(--border)}.s-wall-rail-act{padding:0;border:0;background:none;color:var(--muted);font:inherit;letter-spacing:inherit;cursor:pointer}.s-wall-rail-act:hover{color:var(--accent);text-decoration:underline}.s-wall-rail-keys{margin-left:auto;color:var(--dim);white-space:nowrap}.s-wall-rail-keys kbd{font:inherit;color:var(--muted)}.s-wall-empty{grid-column:1 / -1;grid-row:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-sm)}.s-wall-empty-title{font-family:var(--font-accent-title);font-size:var(--text-4xl);color:var(--ink);letter-spacing:-.01em}.s-wall-empty-sub{font-size:var(--text-sm);color:var(--dim);letter-spacing:var(--tracking-sm)}.s-mission-overlay{position:absolute;inset:0;z-index:10;background:var(--scrim-soft);backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);display:flex;align-items:stretch;justify-content:center;padding:var(--space-4xl);animation:s-mission-overlay-in .14s ease-out}@keyframes s-mission-overlay-in{0%{opacity:0}to{opacity:1}}.s-mission-overlay-dialog{display:flex;flex-direction:column;flex:1 1 auto;max-width:1180px;min-height:0;background:color-mix(in srgb,var(--surface) 88%,transparent);border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);border-radius:var(--radius-md);box-shadow:0 24px 80px -12px #000000b8,0 0 0 1px #ffffff0a;outline:none;overflow:hidden}.s-mission-overlay-header{display:flex;align-items:center;gap:var(--space-xl);padding:var(--space-lg) var(--space-xl) var(--space-md) var(--space-3xl);border-bottom:1px solid color-mix(in srgb,var(--ink) 9%,transparent);flex:none}.s-mission-overlay-identity{flex:1 1 auto;min-width:0}.s-mission-overlay-handle{color:var(--dim);font-size:var(--text-sm)}.s-mission-overlay-close{flex:0 0 auto;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);color:var(--dim);font-family:var(--font-mono);font-size:var(--text-sm);cursor:pointer;border-radius:var(--radius-xs);transition:color .1s,background .1s,border-color .1s}.s-mission-overlay-close:hover{color:var(--ink);background:color-mix(in srgb,var(--ink) 6%,transparent)}.s-mission-overlay-tabs{display:flex;align-items:stretch;justify-content:space-between;gap:var(--space-lg);padding:0 var(--space-lg) 0 var(--space-3xl);border-bottom:1px solid color-mix(in srgb,var(--ink) 9%,transparent);flex:none}.s-mission-overlay-tabs-group{display:flex}.s-mission-overlay-tabs-action{display:flex;align-items:center}.s-mission-overlay-jump{padding:var(--space-2xs) var(--space-md);background:color-mix(in srgb,var(--accent) 14%,transparent);border:1px solid color-mix(in srgb,var(--accent) 32%,transparent);color:var(--accent);font-family:var(--font-mono);font-size:var(--text-sm);letter-spacing:var(--tracking-md);cursor:pointer;border-radius:var(--radius-xs);transition:background .12s,border-color .12s,color .12s}.s-mission-overlay-jump:hover{background:var(--accent);color:var(--bg)}.s-mission-overlay-jump:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.s-mission-overlay-tab{padding:var(--space-md) var(--space-xl);background:transparent;border:0;border-bottom:2px solid transparent;color:var(--dim);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:500;letter-spacing:var(--tracking-lg);text-transform:uppercase;cursor:pointer;transition:color .12s,border-color .12s;margin-bottom:-1px}.s-mission-overlay-tab:hover{color:var(--ink)}.s-mission-overlay-tab--active{color:var(--ink);border-bottom-color:var(--accent)}.s-mission-overlay-tab:focus-visible{outline:1px solid var(--accent);outline-offset:-2px}.s-focus-tab{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;padding:var(--space-3xl) var(--space-3xl);gap:var(--space-2xl)}.s-focus-tab--activity{padding:0;overflow:hidden}.s-focus-tab--activity-preview{gap:var(--space-xl)}.s-focus-stats{margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:color-mix(in srgb,var(--ink) 10%,transparent);border:1px solid color-mix(in srgb,var(--ink) 10%,transparent);border-radius:var(--radius-xs);overflow:hidden;flex:0 0 auto}.s-focus-stat{display:flex;flex-direction:column;gap:var(--space-3xs);padding:var(--space-sm) var(--space-lg);background:color-mix(in srgb,var(--surface) 90%,transparent);min-width:0}.s-focus-stat-label{margin:0;font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim)}.s-focus-stat-value{margin:0;font-family:var(--font-mono);font-size:var(--text-lg);font-weight:500;color:var(--ink);font-variant-numeric:tabular-nums}.s-focus-activity-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow-y:auto;border:1px solid color-mix(in srgb,var(--ink) 8%,transparent);border-radius:var(--radius-xs);background:color-mix(in srgb,var(--bg) 50%,transparent)}.s-focus-activity-empty{flex:1 1 auto;display:flex;align-items:center;justify-content:center;padding:var(--space-4xl);font-family:var(--font-sans);font-size:var(--text-sm);color:var(--dim);border:1px dashed color-mix(in srgb,var(--ink) 12%,transparent);border-radius:var(--radius-xs)}.s-focus-activity-empty--rich{flex-direction:column;align-items:stretch;justify-content:flex-start;gap:var(--space-xl);padding:var(--space-2xl);background:color-mix(in srgb,var(--surface) 60%,transparent);border:1px solid color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink)}.s-focus-activity-empty-head{display:flex;flex-direction:column;gap:var(--space-2xs)}.s-focus-activity-empty-eyebrow{font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim)}.s-focus-activity-empty-title{font-family:var(--font-mono);font-size:var(--text-xl);font-weight:500;color:var(--ink);letter-spacing:var(--tracking-sm)}.s-focus-activity-empty-facts{margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:color-mix(in srgb,var(--ink) 6%,transparent);border:1px solid color-mix(in srgb,var(--ink) 7%,transparent)}.s-focus-activity-empty-fact{display:flex;flex-direction:column;gap:var(--space-3xs);padding:var(--space-sm) var(--space-md);background:color-mix(in srgb,var(--surface) 92%,transparent);min-width:0}.s-focus-activity-empty-fact dt{margin:0;font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim)}.s-focus-activity-empty-fact dd{margin:0;font-family:var(--font-mono);font-size:var(--text-sm);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.s-focus-activity-empty-actions{display:flex;gap:var(--space-sm);margin-top:auto}.s-focus-activity-empty-btn{flex:1 1 auto;appearance:none;border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);background:transparent;color:var(--ink);font-family:var(--font-mono);font-size:var(--text-sm);letter-spacing:var(--tracking-md);text-transform:uppercase;padding:var(--space-sm) var(--space-md);cursor:pointer;border-radius:var(--radius-xs);transition:background .12s ease,border-color .12s ease}.s-focus-activity-empty-btn:hover{background:color-mix(in srgb,var(--ink) 5%,transparent);border-color:color-mix(in srgb,var(--ink) 22%,transparent)}.s-focus-activity-empty-btn--primary{border-color:color-mix(in srgb,var(--accent) 50%,transparent);color:var(--accent)}.s-focus-activity-empty-btn--primary:hover{background:color-mix(in srgb,var(--accent) 10%,transparent);border-color:var(--accent)}.s-focus-activity-row{display:grid;grid-template-columns:36px 14px 44px 1fr;align-items:baseline;gap:var(--space-sm);padding:var(--space-xs) var(--space-lg);border-bottom:1px solid color-mix(in srgb,var(--ink) 5%,transparent);min-width:0}.s-focus-activity-row:last-child{border-bottom:0}.s-focus-activity-time{font-family:var(--font-mono);font-size:var(--text-2xs);color:var(--dim);font-variant-numeric:tabular-nums;text-align:right;letter-spacing:var(--tracking-md)}.s-focus-activity-glyph{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--dim);text-align:center;line-height:var(--leading-none)}.s-focus-activity-row--tool .s-focus-activity-glyph{color:var(--accent)}.s-focus-activity-row--think .s-focus-activity-glyph{color:var(--muted, var(--dim))}.s-focus-activity-row--ask .s-focus-activity-glyph{color:var(--amber)}.s-focus-activity-row--message .s-focus-activity-glyph{color:var(--ink)}.s-focus-activity-row--boot .s-focus-activity-glyph{color:var(--green)}.s-focus-activity-kind{font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-lg);text-transform:uppercase;color:var(--dim)}.s-focus-activity-text{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.s-focus-spec{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--space-5xl);row-gap:var(--space-lg);flex:0 0 auto}.s-focus-spec-row{display:grid;grid-template-columns:64px 1fr;column-gap:var(--space-lg);align-items:baseline;margin:0;min-width:0}.s-focus-spec-label{margin:0;font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim);white-space:nowrap}.s-focus-spec-value{margin:0;font-family:var(--font-mono);font-size:var(--text-sm);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.s-focus-actions{display:flex;flex-direction:column;gap:var(--space-sm)}.s-focus-action{display:flex;flex-direction:column;gap:var(--space-2xs);padding:var(--space-lg) var(--space-xl);text-align:left;background:color-mix(in srgb,var(--surface) 60%,transparent);border:1px solid color-mix(in srgb,var(--ink) 10%,transparent);color:var(--ink);cursor:pointer;border-radius:var(--radius-sm);font-family:inherit;transition:background .12s,border-color .12s}.s-focus-action:hover{background:color-mix(in srgb,var(--accent) 6%,transparent);border-color:color-mix(in srgb,var(--accent) 32%,transparent)}.s-focus-action:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.s-focus-action-name{font-family:var(--font-mono);font-size:var(--text-md);font-weight:500;letter-spacing:var(--tracking-md);text-transform:uppercase;color:var(--ink)}.s-focus-action-desc{font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--leading-snug);color:var(--muted)}.s-focus-compose{display:flex;flex-direction:column;gap:var(--space-md);flex:1 1 auto;min-height:0}.s-focus-compose-label{font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim)}.s-focus-compose-target{color:var(--accent);text-transform:none;letter-spacing:var(--tracking-xs);font-size:var(--text-sm);margin-left:var(--space-xs)}.s-focus-compose-input{flex:1 1 auto;min-height:120px;padding:var(--space-md) var(--space-lg);background:color-mix(in srgb,var(--bg) 60%,transparent);border:1px solid color-mix(in srgb,var(--ink) 12%,transparent);border-radius:var(--radius-sm);color:var(--ink);font-family:var(--font-mono);font-size:var(--text-md);line-height:var(--leading-normal);resize:none;outline:none;transition:border-color .12s}.s-focus-compose-input::placeholder{color:var(--dim)}.s-focus-compose-input:focus{border-color:color-mix(in srgb,var(--accent) 50%,transparent)}.s-focus-compose-input:disabled{opacity:.6}.s-focus-compose-foot{display:flex;align-items:center;justify-content:space-between;gap:var(--space-lg)}.s-focus-compose-hint{flex:1 1 auto;font-family:var(--font-sans);font-size:var(--text-sm);color:var(--dim);line-height:var(--leading-snug);min-width:0}.s-focus-compose-hint strong{color:var(--ink);font-weight:500}.s-focus-compose-error{color:var(--red)}.s-focus-compose-ok{color:var(--green);font-family:var(--font-mono);font-size:var(--text-sm);letter-spacing:var(--tracking-md)}.s-focus-compose-link{background:transparent;border:0;padding:0;margin-left:var(--space-sm);color:var(--accent);font-family:inherit;font-size:inherit;letter-spacing:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.s-focus-compose-link:hover{color:var(--ink)}.s-focus-compose-actions{display:flex;gap:var(--space-sm);flex:0 0 auto}.s-mission-overlay-name{font-size:var(--text-xl);font-weight:500}.s-mission-overlay-meta{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--dim);letter-spacing:var(--tracking-sm)}.s-mission-overlay-actions{margin-left:auto;display:flex;gap:var(--space-xs)}.s-mission-overlay-body{flex:1;min-height:0;overflow:hidden}
|
package/dist/client/assets/{mission-control-store-xQHVQdm8.js → mission-control-store-CcoNeQHG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./index-
|
|
1
|
+
import{r as o}from"./index-CzVeWScw.js";const c=[{label:"5m",value:5*6e4},{label:"30m",value:30*6e4},{label:"4h",value:240*6e4},{label:"24h",value:1440*6e4}];let t={activityFilter:"active",sourceFilter:"all",activityWindowMs:c[3].value,groupMode:"activity",query:"",focusedId:null,revealRequest:null,visibleAgents:[],selectedIds:[]};const u=new Set;let a=0;function s(){for(const e of u)e()}function I(e){t.activityFilter!==e&&(t={...t,activityFilter:e},s())}function g(e){t.sourceFilter!==e&&(t={...t,sourceFilter:e},s())}function y(e){t.activityWindowMs!==e&&(t={...t,activityWindowMs:e},s())}function A(e){t.groupMode!==e&&(t={...t,groupMode:e},s())}function S(e){t.query!==e&&(t={...t,query:e},s())}function h(e){t.focusedId!==e&&(t={...t,focusedId:e},s())}function b(e){a+=1,t={...t,revealRequest:{id:e,serial:a}},s()}function p(e){t.revealRequest?.serial===e&&(t={...t,revealRequest:null},s())}function f(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],l=n[i];if(r.id!==l.id||r.state!==l.state||r.updatedAt!==l.updatedAt||r.activity!==l.activity||r.lastActiveAt!==l.lastActiveAt)return!1}return!0}function q(e){f(t.visibleAgents,e)||(t={...t,visibleAgents:e},s())}function _(e){const n=t.selectedIds.includes(e);t={...t,selectedIds:n?t.selectedIds.filter(i=>i!==e):[...t.selectedIds,e]},s()}function R(){t.selectedIds.length!==0&&(t={...t,selectedIds:[]},s())}function d(e){return u.add(e),()=>{u.delete(e)}}function v(){return t}function F(){return o.useSyncExternalStore(d,v)}export{c as M,S as a,I as b,y as c,A as d,R as e,q as f,p as g,h,b as r,g as s,_ as t,F as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as L}from"./mission-control-model-C0fByIjm.js";const p=16,g=300,M=180,v=8,W=400,m=1.55,w={w:1440,h:860};function b(n,e,i,s,c,l){let a=null;for(let t=1;t<=n;t+=1){const r=Math.ceil(n/t),o=(e-s*(t-1))/t,u=(i-s*(r-1))/r;if(o<c||u<l)continue;const f=t*r-n,h=Math.min(o,u*m)*Math.min(o/m,u);(!a||f<a.waste||f===a.waste&&h>a.fit)&&(a={cols:t,rows:r,paneW:o,paneH:u,waste:f,fit:h})}return a}function I(n,e,i={}){const s=i.max??p,c=i.minW??g,l=i.minH??M,a=i.gap??v,t=e.w>0?e.w:w.w,r=e.h>0?e.h:w.h,o=Math.max(0,Math.floor(n));if(o===0)return{cols:0,rows:0,shown:0,hidden:0,paneW:0,paneH:0};for(let u=Math.min(o,s);u>=1;u-=1){const f=b(u,t,r,a,c,l);if(f)return{cols:f.cols,rows:f.rows,shown:u,hidden:o-u,paneW:f.paneW,paneH:f.paneH}}return{cols:1,rows:1,shown:1,hidden:o-1,paneW:t,paneH:r}}function j(n,e,i,s={}){const c=I(e,i,s);return n&&n.cols===c.cols&&n.rows===c.rows&&n.shown===c.shown&&n.hidden===c.hidden?n:c}function P(n){const e=n.sessionId?.trim();return e||null}function E(n){const e=n.bufferPerLog??W,i=new Map;for(const t of n.agents)for(const r of t.sessionIds){const o=r.trim();o&&i.set(o,t)}const s=new Map,c=(t,r)=>{const o=s.get(t);if(o)return o;const u={id:t,sessionId:t,lines:[],lastActiveAt:0,live:!1,agent:i.get(t)??null,...r};return s.set(t,u),u};for(const t of n.transcripts){const r=P(t);if(!r)continue;const o=c(r,{source:t.source,attribution:t.harness,project:t.project,cwd:t.cwd,logPath:t.transcriptPath});o.lastActiveAt=Math.max(o.lastActiveAt,t.mtimeMs??0)}const l=new Set;for(const t of n.events){const r=t.sessionId?.trim();if(!r)continue;if(t.id){if(l.has(t.id))continue;l.add(t.id)}const o=c(r,{source:t.source,attribution:t.harness,project:t.project,cwd:t.cwd,logPath:null});o.source=t.source,o.attribution=t.harness,o.project=t.project||o.project,o.cwd=t.cwd||o.cwd,o.lines.push(t),o.lastActiveAt=Math.max(o.lastActiveAt,t.ts)}const a=[];for(const t of s.values())t.lines.length>e&&(t.lines=t.lines.slice(t.lines.length-e)),t.live=t.lastActiveAt>0&&n.now-t.lastActiveAt<=n.liveWindowMs,a.push(t);return a}function _(n,e){const i=e.trim().toLowerCase();return i?[n.agent?.name,n.agent?.handle,n.agent?.branch,n.project,n.source,n.sessionId,n.cwd,n.logPath].filter(s=>!!s).some(s=>s.toLowerCase().includes(i)):!0}function d(n){return n.attribution==="scout-managed"||n.agent!==null}function F(n,e){const i=e.requireOutput??!0;return n.filter(s=>{if(i&&s.lines.length===0||e.sourceFilter==="scout"&&!d(s)||e.sourceFilter==="native"&&d(s)||e.activityFilter==="live"&&!s.live)return!1;if(e.activityFilter==="active"){const c=e.now-s.lastActiveAt;if(!(s.lastActiveAt>0&&c<=e.activeWindowMs))return!1}return _(s,e.query)})}function A(n,e){return e==="activity"?"":L({activityLabel:"",workspace:n.project,harness:n.source,state:n.agent?.state??null,source:d(n)?"scout":"native"},e)}function H(n,e){const i=new Map;for(const s of n){const c=A(s,e);i.set(c,Math.max(i.get(c)??0,s.lastActiveAt))}return[...n].sort((s,c)=>{const l=A(s,e),a=A(c,e);if(l!==a){const t=(i.get(a)??0)-(i.get(l)??0);return t!==0?t:l.localeCompare(a)}return s.lastActiveAt!==c.lastActiveAt?c.lastActiveAt-s.lastActiveAt:s.sessionId.localeCompare(c.sessionId)})}function y(n){return n.sessionId.slice(0,13)}function N(n){const e=n.agent?.handle?.trim();if(e)return`@${e}`;const i=n.agent?.name?.trim();return i||`${n.source}:${y(n)}`}function S(n){const e=n.logPath?.trim();return e?e.split("/").pop()||e:`${n.sessionId.slice(0,12)}.log`}export{v as W,S as a,E as b,I as c,y as d,F as f,N as m,j as n,H as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./index-
|
|
1
|
+
import{r}from"./index-CzVeWScw.js";import{a as L}from"./api-h5zurxmi.js";import{a as S}from"./colors-BtO5_zlx.js";import{i as y,o as E}from"./surface-activity-B1rgWB1i.js";const _=1e4,b=6e4;function O(t,s){const[p,i]=r.useState({}),c=s?.enabled??!0,o=r.useRef(!0),f=r.useRef(!1),l=r.useRef(!1),u=s?.pauseWhenHidden??!1,d=t.map(e=>e.id.trim()).filter(e=>e.length>0).join(","),I=t.some(e=>S(e.state))?s?.activeIntervalMs??_:s?.idleIntervalMs??b,n=r.useCallback(async()=>{if(c){if(t.length===0){i({});return}if(!(u&&!y())){if(f.current){l.current=!0;return}f.current=!0;try{const e=d?`?ids=${encodeURIComponent(d)}`:"",v=await L(`/api/observe/agents${e}`);if(!o.current)return;i(h=>{const m={};for(const a of t)m[a.id]=h[a.id];for(const a of v){const{agentId:R,...A}=a;m[R]=A}return m})}finally{f.current=!1,l.current&&(l.current=!1,n())}}}},[d,t,c,u]);return r.useEffect(()=>{if(o.current=!0,!c||t.length===0)return i({}),()=>{o.current=!1};n();const e=setInterval(()=>{n()},I),v=u?E(()=>{n()}):null;return()=>{o.current=!1,clearInterval(e),v?.()}},[t.length,c,n,u,I]),p}export{O as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i,s as u}from"./synthetic-agent-routing-aduMYO7P.js";import{o as f}from"./openContent-C6XO6kr5.js";function m(r,t,e={}){if(i(t.id)){const s=u(t);s&&f(r,{view:"sessions",sessionId:s},{returnTo:e.returnTo});return}const n=e.tab??(e.observe?"observe":void 0),o={view:"agents-v2",agentId:t.id,...n?{tab:n}:{}};if(e.returnTo){r(o,{returnTo:e.returnTo});return}r(o)}export{m as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-CzVeWScw.js";let e={hover:null,content:null};const n=new Set;function s(){for(const t of n)t()}function i(t){return n.add(t),()=>{n.delete(t)}}function r(){return e}function c(){return u.useSyncExternalStore(i,r,r)}function o(t){e.hover!==t&&(e={...e,hover:t},s())}function f(t){return!t||!t.route&&!t.label?{onPointerEnter:void 0,onPointerLeave:void 0}:{onPointerEnter:()=>o(t),onPointerLeave:()=>{e.hover===t&&o(null)}}}export{f as s,c as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-ClCdc3F9.js";const a=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],o=c("paperclip",a);export{o as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-ClCdc3F9.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c=e("plus",o);export{c as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as s}from"./index-CzVeWScw.js";import{A as Z}from"./AgentAvatar-CszU5eaU.js";import{a as B}from"./api-h5zurxmi.js";import{d as _,c as rs}from"./context-budget-DX_fwUs3.js";import{e as q}from"./NewChatComposer-DXDxV2Mh.js";import{b as Q,r as ss,s as es,a as ts}from"./session-catalog-9FqXmjBw.js";import{u as X}from"./sse-QcU9bikk.js";import{t as K}from"./time-Dhsh_2EG.js";import{B as ls}from"./BackToPicker-DZg_4nHL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-DSsb2gLR.js";import{ConversationScreen as cs}from"./ConversationScreen-C-PrCRz1.js";import{S as ds}from"./SessionObserve-BmmJ8dEh.js";import{H as ns}from"./HarnessMark-BE-YSyci.js";/* empty css */import{AgentDefinitionsWorkspace as ms}from"./AgentDefinitionsWorkspace-4Z0aN8AR.js";import{AgentEssentialsGlyph as ps}from"./agent-essentials-SrzMYEXV.js";import{b as us,p as z,n as as}from"./model-Co0zkMIc.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./colors-BtO5_zlx.js";import"./runtime-picker-BCQD7d4K.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./createLucideIcon-ClCdc3F9.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./index-Dewd56RX.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./keyboard-nav-BJnFoFDP.js";import"./x-D4X_y1j_.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./file-text-DG-pufl1.js";import"./terminal-relay-BkXjjSkq.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./mentions-fbQJ2mBI.js";import"./AgentDetailCard-sZuHl1de.js";import"./AgentLiveActions-DI4ooSHW.js";import"./terminal-takeover-KvmTwABa.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-BGgbITvr.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-C1AQM0Mq.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";import"./text-DsBWV_4k.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CXCq-oKj.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-arts-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function ws({buckets:e,emptyTitle:t,emptyDetail:o}){if(e.length===0)return s.jsxs("div",{className:"s-sum-observed-empty",children:[s.jsx("span",{children:t}),s.jsx("strong",{children:o})]});const c=Math.max(...e,1),i=240,m=20,r=1,p=(i-r*(e.length-1))/e.length;return s.jsxs("div",{className:"s-sum-spark",children:[s.jsx("svg",{viewBox:`0 0 ${i} ${m}`,preserveAspectRatio:"none",className:"s-sum-spark-svg","aria-hidden":!0,children:e.map((l,h)=>{const x=Math.max(1,l/c*m);return s.jsx("rect",{x:h*(p+r),y:m-x,width:p,height:x,fill:"var(--accent)",opacity:.22+.62*(l/c)},h)})}),s.jsxs("div",{className:"s-sum-spark-axis",children:[s.jsx("span",{children:"session start"}),s.jsx("span",{children:"now"})]})]})}function ys({agentId:e,session:t,active:o,onPrimary:c,primaryLabel:i,primaryTitle:m}){const[r,p]=u.useState(null),[l,h]=u.useState(null),x=u.useCallback(async()=>{const g=new URLSearchParams({sessionId:t.id}),[P,J]=await Promise.all([B(`/api/agents/${encodeURIComponent(e)}/observe?${g}`).catch(()=>null),B(`/api/agents/${encodeURIComponent(e)}/session/context`).catch(()=>null)]);p(P),h(J)},[e,t.id]);u.useEffect(()=>{x()},[x]),X(()=>{x()});const N=r?.data,v=(N?.events??[]).filter(bs),w=v.filter(g=>g.kind==="tool"),S=w.filter(g=>g.tool==="edit"||g.tool==="write"),y=w.filter(g=>g.tool==="read"),f=N?.files.length??0,b=N?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||f>0,d=r?r.source==="unavailable"?"unavailable":C?"observed":"waiting":"loading",R=d==="loading"?"Loading trace":d==="unavailable"?"No trace source":"Session created",L=d==="loading"?"checking for terminal or transcript activity":d==="unavailable"?"this session has no observable transcript attached":"no agent work has been recorded yet",H=[{k:"turns",v:U(b??$)},{k:"tools",v:U(w.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(y.length)},{k:"files",v:U(f)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=N?.metadata?.usage,a=_(D,{model:N?.metadata?.session?.model??t.model,adapterType:t.harness}),E=a?`${a.usedLabel} / ${a.budgetLabel} ctx`:l?Y(l):"context",T=a?`${a.pct}%${a.overLimit?" over":""}`:"tokens unavailable",O=l&&l.sessionAgeMs!==null?hs(l.sessionAgeMs):null,A=a&&l?`${Y(l)}${O?` · ${O}`:""}`:O,n=r?.sessionId?.trim()||r?.data.metadata?.session?.externalSessionId?.trim()||r?.data.metadata?.session?.threadId?.trim()||null,j=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(j&&j!==t.id?t.id:null),M=j??t.id,W=j&&t.harness==="codex"?"codex session id":j&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?z(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(ws,{buckets:Ns(v),emptyTitle:R,emptyDetail:L})]}),s.jsxs("div",{className:"s-sum-col s-sum-col--context",children:[s.jsx("div",{className:"s-sum-label",children:"Context"}),s.jsxs("div",{className:"s-sum-ctx-head",children:[s.jsx("span",{className:"s-sum-ctx-size",children:E}),s.jsx("span",{className:"s-sum-ctx-pct",children:T})]}),a?s.jsx("div",{className:"s-sum-gauge","aria-label":`Context ${a.pct}%`,children:s.jsx("div",{className:"s-sum-gauge-fill",style:{width:`${rs(a)}%`}})}):s.jsx("div",{className:"s-sum-ctx-unavailable",children:"No token-window usage yet"}),A&&s.jsx("div",{className:"s-sum-ctx-runway",children:A})]})]}),s.jsxs("div",{className:"s-sum-foot",children:[C?s.jsx("div",{className:"s-sum-stats",children:H.map((g,P)=>s.jsxs("span",{className:"s-sum-stat",children:[P>0&&s.jsx("span",{className:"s-sum-stat-sep",children:"·"}),s.jsx("span",{className:"s-sum-stat-v",children:g.v}),s.jsx("span",{className:"s-sum-stat-k",children:g.k})]},g.k))}):s.jsx("div",{className:"s-sum-status-note",children:o?"The session exists, but no turn/tool/file activity has reached Scout yet.":"This prior session has no observable work trace."}),s.jsx("button",{type:"button",className:"s-sess-explore-primary",onClick:c,title:m,children:i})]})]})}function rt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=ss(e,o),x=u.useMemo(()=>es(o?.sessions??[],h),[o?.sessions,h]),N=x.find(n=>n.id===h)??null,I=N?.model??null,v=N?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[y,f]=u.useState("idle"),[b,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{f("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=ts(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),j=n.sessionId?.trim();if(j){F(i,{view:"sessions",sessionId:j},{returnTo:m});return}const k=n.conversationId?.trim();if(!k)throw new Error("Session started, but no conversation was returned.");i({view:r,agentId:n.agentId?.trim()||e.id,conversationId:k,tab:"message"})}catch(n){$(n instanceof Error?n.message:"Could not start a new session.")}finally{f("idle")}}},O=n=>F(i,{view:"sessions",sessionId:n.id},{returnTo:m}),A=n=>{l(e.id,n)};return s.jsxs("div",{className:"s-sess-root",children:[s.jsxs("header",{className:"s-sess-head",children:[s.jsxs("div",{className:"s-sess-id",children:[s.jsx("span",{className:"s-sess-avatar",children:s.jsx(Z,{agent:e,size:46,tile:!0,presence:!1})}),s.jsxs("div",{className:"s-sess-id-copy",children:[s.jsxs("div",{className:"s-sess-name-row",children:[s.jsx("span",{className:"s-sess-name",children:t}),e.handle&&s.jsxs("span",{className:"s-sess-handle",children:["@",e.handle.replace(/^@+/,"")]})]}),s.jsx(ps,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled:y==="starting",onClick:T,children:y==="starting"?"Starting...":"+ New session"}),b&&s.jsx("div",{className:"s-sess-action-error",children:b}),R&&s.jsx("div",{className:"s-sess-action-error",children:R})]})]}),s.jsxs("section",{className:"s-sess-band",children:[s.jsxs("header",{className:"s-sess-band-head",children:[s.jsx("span",{className:"s-sess-band-label",children:"Recent sessions"}),x.length>0&&s.jsxs("span",{className:"s-sess-band-meta",children:[x.length," sessions"]})]}),s.jsx("div",{className:"s-sess-list",children:x.length===0?s.jsxs("div",{className:"s-sess-empty",children:["No sessions yet — start a new session for ",t,"."]}):x.map(n=>{const j=n.id===h,k=n.id===D,M=n.harness??e.harness??"session",W=n.model??e.model,V=W&&M&&W.startsWith(`${M}-`)?W.slice(M.length+1):W,g=[M,V,n.reasoningEffort].filter(os=>!!os).join(" · "),P=n.surfaceSessionId?`${n.transport??e.transport??"terminal"} surface ${vs(n.surfaceSessionId)}`:n.transport&&n.transport!==M?`${n.transport} surface`:null,J=j?"now":n.endedAt?`ended · ${K(n.endedAt)||"recent"}`:K(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${j?" s-sess-row--active":""}${k?" s-sess-row--selected":""}`,onClick:()=>A(n.id),"aria-expanded":k,children:[s.jsx("span",{className:"s-mod-dot s-sess-row-dot",style:{background:j?"var(--accent)":"var(--dim)",opacity:j?1:.55}}),s.jsxs("span",{className:"s-sess-row-main",children:[s.jsxs("span",{className:"s-sess-row-top",children:[s.jsx("span",{className:"s-sess-row-id",title:n.id,children:is(n.id)}),s.jsx("span",{className:"s-sess-row-tag",children:g})]}),s.jsxs("span",{className:"s-sess-row-sub",title:P??void 0,children:[n.cwd?z(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${j?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ys,{agentId:e.id,session:n,active:j,onPrimary:()=>j?void E():O(n),primaryLabel:j?"Continue":"Resume",primaryTitle:j?"Send a message into this conversation":"Reopen this conversation and message it"})]},n.id)})})]})]})}function Ss(e){let t;if(e.kind==="tool"){const o=e.arg?.trim()||e.text?.trim()||"";t=`${e.tool??"tool"}${o?` ${o}`:""}`.trim()}else t=e.text?.trim()||e.kind;return t.length>160?`${t.slice(0,157)}…`:t}function ks({agent:e,session:t,active:o,onContinue:c,onTakeover:i,onOpen:m}){const[r,p]=u.useState(null),l=u.useCallback(async()=>{const d=await B(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null);p(d)},[e.id]);u.useEffect(()=>{p(null),l()},[l]),X(()=>{l()});const h=r?.data.events??[],x=e.branch||(t.cwd?z(t.cwd):"main"),N=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,I=t.harness??e.harness??"session",v=(()=>{for(const d of h)if((d.kind==="message"||d.kind==="ask")&&d.text?.trim())return d.text.trim();return null})()??(t.cwd?z(t.cwd):null)??e.name,w=r?.data.metadata?.usage??null,S=w?.assistantMessages??null,y=_(w,{model:r?.data.metadata?.session?.model??N,adapterType:I}),f=y?Math.min(100,y.pct):null,b=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?K(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":b,"aria-label":v,children:[s.jsxs("header",{className:"ap-focusHead",children:[s.jsx("h1",{className:"ap-focusTitle",children:v}),s.jsx("span",{className:"ap-focusState","data-tone":b,children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0})," working"]}):"idle"}),s.jsx("button",{type:"button",className:"ap-focusOpen",onClick:m,children:"Open ↗"})]}),s.jsxs("div",{className:"ap-focusAttr",children:[s.jsxs("span",{className:"ap-focusAttrText",children:[x,N?` · ${N}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[f!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),f,"%"]}):null,w&&(w.inputTokens||w.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(w.inputTokens??0)," in"]}):null,S!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"turns"}),S]}):null]})]}),s.jsxs("div",{className:"ap-logHead",children:[s.jsx("span",{className:"ap-logHeadTitle",children:"Session log"}),s.jsx("span",{className:"ap-logHeadMeta",children:r===null?"loading…":`${r.source} · ${$} events`})]}),s.jsx("div",{className:"ap-log",children:r===null?s.jsx("div",{className:"ap-traceLoading",children:"Resolving the most recent session…"}):C.length===0?s.jsx("div",{className:"ap-traceLoading",children:"No activity captured for this session yet."}):C.map((d,R)=>s.jsxs("div",{className:"ap-logLine","data-kind":d.kind,children:[s.jsx("span",{className:"ap-logT",children:d.t}),s.jsx("span",{className:"ap-logText",children:d.text})]},R))})]})}function gs({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m}){const{focusedSession:r,focusSession:p}=G(),l=ss(e,o),h=u.useMemo(()=>es(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,N=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ts(e.id,r,l,h,N),v=Q(N,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const w=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,S=e.cwd?xs(e.cwd)??e.cwd:null,y=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,f=e.handle?.trim().replace(/^@+/,"")||null,b=f?`@${f}`:t,$=f&&t.toLowerCase()!==f.toLowerCase()?t:[e.project?`/${e.project}`:null,e.branch,w].filter(Boolean).join(" · "),C=a=>m.view==="agents-v2"?{...m,...a,view:"agents-v2"}:{view:"agents-v2",agentId:e.id,...a},d=async()=>{try{const a=await q({...e,conversationId:c});i(C({agentId:e.id,conversationId:a,tab:"message"}))}catch{}},R=async()=>{try{const a=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,size:48,tile:!0,presence:!1}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[s.jsx("h1",{className:"ap-profileName",title:b,children:b}),e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:e.harness,size:13})}):null]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),f&&t.toLowerCase()!==f.toLowerCase()?s.jsx("span",{className:"ap-profileId",title:e.id,children:t}):null]}),s.jsxs("div",{className:"ap-headActions",children:[s.jsx("button",{type:"button",className:"ap-headGhost",onClick:()=>i(C({agentId:e.id,tab:"config"})),children:"Edit config"}),s.jsx("button",{type:"button",className:"ap-headCta",onClick:()=>{R()},children:"+ New session"})]})]}),s.jsxs("div",{className:"ap-profileBody",children:[s.jsxs("div",{className:"ap-profileMain",children:[s.jsx("div",{className:"ap-profileSection",children:"Current session"}),x?s.jsx(ks,{agent:e,session:x,active:x.id===l,onContinue:()=>{d()},onTakeover:H,onOpen:()=>{d()}}):s.jsxs("div",{className:"ap-traceLoading",children:["No active session for ",t,"."]}),s.jsxs("div",{className:"ap-profileSection",children:["Sessions ",s.jsx("span",{className:"ap-profileCount",children:h.length})]}),h.length===0?s.jsxs("div",{className:"ap-empty",children:["No sessions yet — start a new session for ",t,"."]}):s.jsxs("div",{className:"ap-sessTable",children:[s.jsxs("div",{className:"ap-sessTableHead","aria-hidden":!0,children:[s.jsx("span",{}),s.jsx("span",{children:"Session"}),s.jsx("span",{children:"Engine"}),s.jsx("span",{children:"Last"})]}),h.map(a=>{const E=a.id===l,T=E?"now":a.endedAt?`ended · ${K(a.endedAt)||"recent"}`:K(a.startedAt)||"recent",O=a.cwd?z(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,j=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,j,a.reasoningEffort].filter(Boolean).join(" · ");return s.jsxs("button",{type:"button",className:"ap-sessRow","data-tone":E?"live":"idle","data-selected":a.id===I||void 0,onClick:()=>E?D(a.id):L(a),children:[E?s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0}):s.jsx("span",{className:"ap-sessRowDot","aria-hidden":!0}),s.jsx("span",{className:"ap-sessRowName",title:a.id,children:O}),s.jsx("span",{className:"ap-sessRowEngine",children:k}),s.jsx("span",{className:"ap-sessRowWhen",children:T})]},a.id)})]})]}),s.jsxs("aside",{className:"ap-profileAside",children:[s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Place"}),S?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"root"}),s.jsx("span",{className:"ap-kvVal",children:S})]}):null,y?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:y})]}):null,e.branch?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"branch"}),s.jsx("span",{className:"ap-kvVal",children:e.branch})]}):null]}),s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Runtime"}),e.harness?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"harness"}),s.jsx("span",{className:"ap-kvVal",children:e.harness})]}):null,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):null]})]})]})]})}function lt({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=us(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[N,I]=u.useState(null),{route:v}=G(),w=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(w,N?.sessions??[])??w,y=u.useCallback(async()=>{const b=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(b)},[e.id]),f=u.useCallback(async()=>{x(!0);try{const b=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${b?`?${b}`:""}`);l($)}catch{l({agentId:e.id,source:"unavailable",fidelity:"synthetic",historyPath:null,sessionId:null,updatedAt:Date.now(),data:{events:[{id:`${e.id}:observe-error`,t:0,kind:"system",text:"Observer data is temporarily unavailable.",detail:"Retrying will resume once the session source becomes reachable."}],files:[],contextUsage:[],live:!1}})}finally{x(!1)}},[e.id,S]);return u.useEffect(()=>{I(null),y();const b=window.setTimeout(()=>{y()},3e3);return()=>window.clearTimeout(b)},[y]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&f()},[i,f]),X(()=>{y(),i==="observe"&&f()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const b=setInterval(()=>{f()},2500);return()=>clearInterval(b)},[i,p?.data.live,f]),s.jsxs("div",{className:`s-profile-center${i!=="profile"?" s-profile-center--tabbed":" s-profile-center--modular"}`,children:[i==="profile"&&(m?m({agent:e,sessionCatalog:N,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:N,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(ms,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ds,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(cs,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function ct({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(ls,{slot:"agents",fallback:{view:"agents-v2"},navigate:c,className:"s-agent-bar-back"}),s.jsx("nav",{className:"s-profile-tabs s-agent-bar-tabs",children:i.map(r=>s.jsx("button",{type:"button",className:`s-profile-tab${o===r.key?" s-profile-tab--active":""}`,disabled:r.disabled,onClick:()=>m(r.key),children:r.label},r.key))})]})}export{lt as AgentDetailWithRail,ct as AgentProfileBar,rt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as E}from"./index-sUomXsrf.js";import{a as C}from"./api-h5zurxmi.js";import{b as ot}from"./router-Dja9_ygK.js";import{u as it}from"./sse-CVoGDiKW.js";import{i as P,o as rt}from"./surface-activity-B1rgWB1i.js";import{e as ct,u as lt}from"./Provider-tFc3jqZ4.js";import{x as H}from"./conversation-model-C4yb6_FA.js";import{d as at,c as ut,e as dt,f as ft,i as q}from"./model-Co0zkMIc.js";import{i as gt}from"./agents-project-model-UYiamtrU.js";import{o as z,b as vt,a as wt,h as x,c as Y}from"./model-IGCUEsMy.js";const O=1440*6e4;function It(t){const e=new Map;for(const n of t?.activeAsks??[]){const s=e.get(n.agentId)??[];s.push(n),e.set(n.agentId,s)}return e}function At(t){const e=new Map,n=(s,o)=>{if(!s)return;const r=e.get(s)??[];r.push(o),e.set(s,r)};for(const s of t?.needsAttention??[])n(s.agentId,{title:s.title,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of t?.activeAsks??[])s.status==="needs_attention"&&n(s.agentId,{title:s.task,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of e.values())s.sort((o,r)=>r.updatedAt-o.updatedAt);return e}function Q(t){return t?t.charAt(0).toUpperCase()+t.slice(1):"Harness"}function X(t){return t.length===1?t[0]??null:t.length>1?`${t.length} branches`:null}function mt(t,e,n,s){const o=t.group,r=o.nodes.flatMap(I=>n.get(I.row.agent.id)??[]).sort((I,h)=>h.updatedAt-I.updatedAt)[0]??null,c=!!r,a=!c&&o.nodes.some(I=>q(I.row)),d=gt(o,s),v=c?"needs":a?"working":"recent",w=c?"needs":a||d?"live":"idle",f=t.leadAgent,m=r?.conversationId??e.get(f.id)??f.conversationId??null;return{id:`${t.projectSlug}:agent:${f.id}`,kind:"agent",projectSlug:t.projectSlug,projectTitle:t.projectTitle,projectRoot:t.projectRoot,workspaceRoot:f.cwd??f.projectRoot??t.projectRoot,agentId:f.id,agentName:o.name,harness:x(o.harness),branch:X(o.branches),work:r?.summary?.trim()||r?.title.trim()||wt(t,w),group:v,needs:c,working:a,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:m,sessionId:null}}function pt(t){return t&&t.view==="sessions"&&t.sessionId?t.sessionId:null}function ht(t,e,n){const s=x(e.harness);return{id:`${t.slice.slug}:native:${e.key}`,kind:"native",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:t.slice.root,agentId:null,agentName:`${Q(s)} session`,harness:s,branch:null,work:Y(e.detail??e.label)||e.label,group:"working",needs:!1,working:!0,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:null,sessionId:pt(e.route)}}function yt(t,e){return t.status==="active"||t.status==="workflow"?"working":(t.lastActivityAt&&e-t.lastActivityAt<O,"recent")}function Z(t){return t?t.view==="sessions"?t.sessionId??null:t.view==="conversation"?t.conversationId:null:null}function F(t){return!!Z(t.route)}function G(t,e,n,s,o){const r=x(e.harness),c=Z(e.route),a=e.status==="active"||e.status==="workflow";return{id:`${t.slice.slug}:session:${e.key}`,kind:"session",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:s?.cwd??s?.projectRoot??t.slice.root,agentId:s?.id??null,agentName:s?.name??`${Q(r)} session`,harness:r,branch:X(o?[o]:[]),work:Y(e.detail??e.label)||e.label,group:yt(e,n),needs:!1,working:a,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:e.route?.view==="conversation"?e.route.conversationId:null,sessionId:e.route?.view==="sessions"?e.route.sessionId??c:c,route:e.route}}function kt(t,e){const n=[];for(const s of t.agents)for(const o of s.sessions)F(o)&&n.push(G(t,o,e,s.row.agent,s.row.branch));for(const s of t.unassigned)F(s)&&n.push(G(t,s,e));return n.sort((s,o)=>o.lastActivityAt-s.lastActivityAt||s.agentName.localeCompare(o.agentName))}function St(t){const e=new Map,n=(s,o,r,c)=>{const a=e.get(s);if(!a){e.set(s,{root:s,branch:o,working:r,lastActivityAt:c});return}(r||!a.branch)&&o&&(a.branch=o),a.working||=r,a.lastActivityAt=Math.max(a.lastActivityAt,c)};for(const s of t.agents){const o=s.row.agent.cwd??s.row.agent.projectRoot??t.slice.root;if(!o)continue;const r=s.row.branch&&s.row.branch!=="—"?s.row.branch:null;n(o,r,q(s.row),s.row.lastActivityAt??0)}for(const s of t.slice.nativeSessions)s.cwd&&n(s.cwd,null,s.status==="active",s.lastActivityAt??0);return e.size===0&&t.slice.root&&n(t.slice.root,null,!1,t.lastActivityAt??0),[...e.values()].sort((s,o)=>Number(o.working)-Number(s.working)||o.lastActivityAt-s.lastActivityAt||s.root.localeCompare(o.root))}function K(t,e){return t.needs?3:t.working?2:e-t.lastActivityAt<O?1:0}function Rt(t){const{nowMs:e,showEphemeral:n}=t,s=ct(t.agents,t.machineId),o=It(t.fleet),r=At(t.fleet),{conversationByAgentId:c,sessionByAgentId:a}=at(t.sessions),d=s.map(i=>ut(i,a.get(i.id)??null,o.get(i.id)??[])),v=dt(t.discovery,e),w=ft(d,t.sessions,v),f=vt(w,n),m=f.map(i=>mt(i,c,r,e));for(const i of w)for(const l of i.unassigned)l.kind!=="native"||l.status!=="active"||!l.route||m.push(ht(i,l,e));m.sort((i,l)=>K(l,e)-K(i,e)||l.lastActivityAt-i.lastActivityAt);const I=w.flatMap(i=>kt(i,e)),h=new Map;for(const i of m){const l=h.get(i.projectSlug)??[];l.push(i),h.set(i.projectSlug,l)}const M=new Map;for(const i of I){const l=M.get(i.projectSlug)??[];l.push(i),M.set(i.projectSlug,l)}const j=new Map;for(const i of f)j.set(i.projectSlug,(j.get(i.projectSlug)??0)+1);const D=w.map(i=>{const l=h.get(i.slice.slug)??[],L=M.get(i.slice.slug)??[],nt=[...new Set(i.agents.map(g=>g.row.branch).filter(g=>!!g&&g!=="—"&&g!=="main"))],$=St(i);return{slug:i.slice.slug,title:i.slice.title,root:i.slice.root,agentCount:j.get(i.slice.slug)??0,sessionCount:L.length,liveSessionCount:L.filter(g=>g.working).length,worktreeCount:$.length,worktrees:$,needs:l.filter(g=>g.needs).length,working:l.filter(g=>g.working).length,threadCount:l.length,lastActivityAt:i.lastActivityAt,branches:nt}});return D.sort((i,l)=>V(l)-V(i)||l.lastActivityAt-i.lastActivityAt||i.title.localeCompare(l.title)),{projects:D,threads:m,sessions:I}}function V(t){return t.needs>0?2:t.working>0?1:0}function qt(t,e){return t.needs===0&&t.working===0&&(t.threadCount===0||e-t.lastActivityAt>O)}function zt(t,e){return t.filter(n=>n.projectSlug===e)}function Yt(t,e){return t.filter(n=>n.projectSlug===e)}const bt=["needs","working","recent"],Mt={needs:"Your turn",working:"In flight",recent:"Recent"};function Qt(t){const e=new Map;for(const n of t){const s=e.get(n.group)??[];s.push(n),e.set(n.group,s)}return bt.filter(n=>e.has(n)).map(n=>({group:n,label:Mt[n],items:e.get(n)}))}function A(t){return{view:"agents-v2",...t.projectSlug?{projectSlug:t.projectSlug}:{},...t.machineId?{machineId:t.machineId}:{}}}function Xt(t,e){return t.agentId&&e.selectedAgentId?e.selectedAgentId===t.agentId:t.kind==="native"&&t.sessionId&&e.sessionId?e.sessionId===t.sessionId:!1}function Zt(t,e){return t.kind==="native"?{...A(e),sessionId:t.sessionId??void 0}:{...A(e),selectedAgentId:t.agentId??void 0}}function te(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.conversationId?{view:"conversation",conversationId:t.conversationId}:t.agentId?z(e,t.agentId):A(e)}function ee(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.agentId?{...z(e,t.agentId),tab:"observe"}:null}function se(t,e){const n=_(t);return n?{...A(e),indexView:"sessions",...n?{sessionId:n}:{},selectedAgentId:void 0}:A(e)}function ne(t,e){const n=_(t);return n&&e.sessionId?e.sessionId===n:!1}function _(t){return t.sessionId?t.sessionId:t.conversationId?t.conversationId:null}function oe(t,e){const n=_(t);return n?{...A(e),projectSlug:t.projectSlug,indexView:"sessions",sessionId:n,selectedAgentId:void 0}:{...A(e),projectSlug:t.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const jt=15e3,tt=3e4,Ct=250;let u={sessions:[],fleet:null,discovery:null,loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const N=new Set;let k=0,W=0,p=null,R=null,b=null,T=null,J=0;function et(){for(const t of[...N])t()}function Bt(t,e){return t&&JSON.stringify(t.activeAsks)===JSON.stringify(e.activeAsks)?t:e}function Et(t,e){const n=s=>JSON.stringify([s?.transcripts??[],s?.processes??[]]);return t&&n(t)===n(e)?t:e}function st(t){u={...u,...t},et()}async function y(t){const e=++W;J+=1,typeof window<"u"&&(window.__projectsInboxLoads=J),u.loadedAt===null&&t!=="background"&&st({loading:!0,error:null});const[n,s,o]=await Promise.allSettled([C("/api/conversations"),C("/api/fleet"),C("/api/tail/discover")]);if(e!==W)return;const r=n.status==="fulfilled"?H(u.sessions,n.value):u.sessions,c=s.status==="fulfilled"?Bt(u.fleet,s.value):u.fleet,a=o.status==="fulfilled"?Et(u.discovery,o.value):u.discovery,d=[n,s,o].find(f=>f.status==="rejected"),v=d?d.reason instanceof Error?d.reason.message:String(d.reason):null,w=r!==u.sessions||c!==u.fleet||a!==u.discovery||v!==u.error||u.loading;u={...u,sessions:r,fleet:c,discovery:a,error:v,loading:!1,loadedAt:Date.now()},w&&et()}function Pt(){P()&&(p||(p=setTimeout(()=>{p=null,y("background")},Ct)))}function Nt(){y("initial"),R=setInterval(()=>{P()&&y("background")},jt),b=setInterval(()=>{P()&&st({nowMs:Date.now()})},tt),T=rt(()=>{y("background")})}function Tt(){p&&(clearTimeout(p),p=null),R&&(clearInterval(R),R=null),b&&(clearInterval(b),b=null),T?.(),T=null}function ie(){y("background")}function xt(){const[t,e]=E.useState(u);return E.useEffect(()=>{const n=()=>e(u);return N.add(n),k+=1,k===1&&Nt(),n(),()=>{N.delete(n),k-=1,k===0&&Tt()}},[]),it(Pt),t}let U=null,S=null;function Ot(t,e){return!!t&&t.length===e.length&&t.every((n,s)=>n===e[s])}function B(t,e,n){if(!t?.length)return e;const s=new Map(t.map(c=>[n(c),c]));let o=t.length===e.length;const r=e.map((c,a)=>{const d=s.get(n(c)),v=d?H(d,c):c;return v!==t[a]&&(o=!1),v});return o?t:r}function _t(t,e){if(!t)return e;const n=B(t.projects,e.projects,r=>r.slug),s=B(t.threads,e.threads,r=>r.id),o=B(t.sessions,e.sessions,r=>r.id);return n===t.projects&&s===t.threads&&o===t.sessions?t:{projects:n,threads:s,sessions:o}}function Dt(t){const e=[t.agents,t.sessions,t.fleet,t.discovery,t.machineId,Math.floor(t.nowMs/tt),t.showEphemeral];if(Ot(U,e)&&S)return S;const n=Rt(t),s=_t(S,n);return U=e,S=s,s}function re(t){const e=xt(),{agents:n}=lt(),s=ot(t),o=!!t.showEphemeral;return{model:E.useMemo(()=>Dt({agents:n,machineId:s,sessions:e.sessions,fleet:e.fleet,discovery:e.discovery,nowMs:e.nowMs,showEphemeral:o}),[n,s,e.sessions,e.fleet,e.discovery,e.nowMs,o]),nowMs:e.nowMs,loading:e.loading,loadedAt:e.loadedAt,error:e.error}}export{te as a,ne as b,_ as c,Yt as d,zt as e,se as f,Qt as g,Zt as h,qt as i,Xt as j,ie as r,oe as s,ee as t,re as u};
|
|
1
|
+
import{r as E}from"./index-CzVeWScw.js";import{a as C}from"./api-h5zurxmi.js";import{b as ot}from"./router-B-K15T7B.js";import{u as it}from"./sse-QcU9bikk.js";import{i as P,o as rt}from"./surface-activity-B1rgWB1i.js";import{e as ct,u as lt}from"./Provider-DSsb2gLR.js";import{x as H}from"./conversation-model-CHwHZNw-.js";import{d as at,c as ut,e as dt,f as ft,i as q}from"./model-Co0zkMIc.js";import{i as gt}from"./agents-project-model-UYiamtrU.js";import{o as z,b as vt,a as wt,h as x,c as Y}from"./model-IGCUEsMy.js";const O=1440*6e4;function It(t){const e=new Map;for(const n of t?.activeAsks??[]){const s=e.get(n.agentId)??[];s.push(n),e.set(n.agentId,s)}return e}function At(t){const e=new Map,n=(s,o)=>{if(!s)return;const r=e.get(s)??[];r.push(o),e.set(s,r)};for(const s of t?.needsAttention??[])n(s.agentId,{title:s.title,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of t?.activeAsks??[])s.status==="needs_attention"&&n(s.agentId,{title:s.task,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of e.values())s.sort((o,r)=>r.updatedAt-o.updatedAt);return e}function Q(t){return t?t.charAt(0).toUpperCase()+t.slice(1):"Harness"}function X(t){return t.length===1?t[0]??null:t.length>1?`${t.length} branches`:null}function mt(t,e,n,s){const o=t.group,r=o.nodes.flatMap(I=>n.get(I.row.agent.id)??[]).sort((I,h)=>h.updatedAt-I.updatedAt)[0]??null,c=!!r,a=!c&&o.nodes.some(I=>q(I.row)),d=gt(o,s),v=c?"needs":a?"working":"recent",w=c?"needs":a||d?"live":"idle",f=t.leadAgent,m=r?.conversationId??e.get(f.id)??f.conversationId??null;return{id:`${t.projectSlug}:agent:${f.id}`,kind:"agent",projectSlug:t.projectSlug,projectTitle:t.projectTitle,projectRoot:t.projectRoot,workspaceRoot:f.cwd??f.projectRoot??t.projectRoot,agentId:f.id,agentName:o.name,harness:x(o.harness),branch:X(o.branches),work:r?.summary?.trim()||r?.title.trim()||wt(t,w),group:v,needs:c,working:a,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:m,sessionId:null}}function pt(t){return t&&t.view==="sessions"&&t.sessionId?t.sessionId:null}function ht(t,e,n){const s=x(e.harness);return{id:`${t.slice.slug}:native:${e.key}`,kind:"native",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:t.slice.root,agentId:null,agentName:`${Q(s)} session`,harness:s,branch:null,work:Y(e.detail??e.label)||e.label,group:"working",needs:!1,working:!0,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:null,sessionId:pt(e.route)}}function yt(t,e){return t.status==="active"||t.status==="workflow"?"working":(t.lastActivityAt&&e-t.lastActivityAt<O,"recent")}function Z(t){return t?t.view==="sessions"?t.sessionId??null:t.view==="conversation"?t.conversationId:null:null}function F(t){return!!Z(t.route)}function G(t,e,n,s,o){const r=x(e.harness),c=Z(e.route),a=e.status==="active"||e.status==="workflow";return{id:`${t.slice.slug}:session:${e.key}`,kind:"session",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:s?.cwd??s?.projectRoot??t.slice.root,agentId:s?.id??null,agentName:s?.name??`${Q(r)} session`,harness:r,branch:X(o?[o]:[]),work:Y(e.detail??e.label)||e.label,group:yt(e,n),needs:!1,working:a,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:e.route?.view==="conversation"?e.route.conversationId:null,sessionId:e.route?.view==="sessions"?e.route.sessionId??c:c,route:e.route}}function kt(t,e){const n=[];for(const s of t.agents)for(const o of s.sessions)F(o)&&n.push(G(t,o,e,s.row.agent,s.row.branch));for(const s of t.unassigned)F(s)&&n.push(G(t,s,e));return n.sort((s,o)=>o.lastActivityAt-s.lastActivityAt||s.agentName.localeCompare(o.agentName))}function St(t){const e=new Map,n=(s,o,r,c)=>{const a=e.get(s);if(!a){e.set(s,{root:s,branch:o,working:r,lastActivityAt:c});return}(r||!a.branch)&&o&&(a.branch=o),a.working||=r,a.lastActivityAt=Math.max(a.lastActivityAt,c)};for(const s of t.agents){const o=s.row.agent.cwd??s.row.agent.projectRoot??t.slice.root;if(!o)continue;const r=s.row.branch&&s.row.branch!=="—"?s.row.branch:null;n(o,r,q(s.row),s.row.lastActivityAt??0)}for(const s of t.slice.nativeSessions)s.cwd&&n(s.cwd,null,s.status==="active",s.lastActivityAt??0);return e.size===0&&t.slice.root&&n(t.slice.root,null,!1,t.lastActivityAt??0),[...e.values()].sort((s,o)=>Number(o.working)-Number(s.working)||o.lastActivityAt-s.lastActivityAt||s.root.localeCompare(o.root))}function K(t,e){return t.needs?3:t.working?2:e-t.lastActivityAt<O?1:0}function Rt(t){const{nowMs:e,showEphemeral:n}=t,s=ct(t.agents,t.machineId),o=It(t.fleet),r=At(t.fleet),{conversationByAgentId:c,sessionByAgentId:a}=at(t.sessions),d=s.map(i=>ut(i,a.get(i.id)??null,o.get(i.id)??[])),v=dt(t.discovery,e),w=ft(d,t.sessions,v),f=vt(w,n),m=f.map(i=>mt(i,c,r,e));for(const i of w)for(const l of i.unassigned)l.kind!=="native"||l.status!=="active"||!l.route||m.push(ht(i,l,e));m.sort((i,l)=>K(l,e)-K(i,e)||l.lastActivityAt-i.lastActivityAt);const I=w.flatMap(i=>kt(i,e)),h=new Map;for(const i of m){const l=h.get(i.projectSlug)??[];l.push(i),h.set(i.projectSlug,l)}const M=new Map;for(const i of I){const l=M.get(i.projectSlug)??[];l.push(i),M.set(i.projectSlug,l)}const j=new Map;for(const i of f)j.set(i.projectSlug,(j.get(i.projectSlug)??0)+1);const D=w.map(i=>{const l=h.get(i.slice.slug)??[],L=M.get(i.slice.slug)??[],nt=[...new Set(i.agents.map(g=>g.row.branch).filter(g=>!!g&&g!=="—"&&g!=="main"))],$=St(i);return{slug:i.slice.slug,title:i.slice.title,root:i.slice.root,agentCount:j.get(i.slice.slug)??0,sessionCount:L.length,liveSessionCount:L.filter(g=>g.working).length,worktreeCount:$.length,worktrees:$,needs:l.filter(g=>g.needs).length,working:l.filter(g=>g.working).length,threadCount:l.length,lastActivityAt:i.lastActivityAt,branches:nt}});return D.sort((i,l)=>V(l)-V(i)||l.lastActivityAt-i.lastActivityAt||i.title.localeCompare(l.title)),{projects:D,threads:m,sessions:I}}function V(t){return t.needs>0?2:t.working>0?1:0}function qt(t,e){return t.needs===0&&t.working===0&&(t.threadCount===0||e-t.lastActivityAt>O)}function zt(t,e){return t.filter(n=>n.projectSlug===e)}function Yt(t,e){return t.filter(n=>n.projectSlug===e)}const bt=["needs","working","recent"],Mt={needs:"Your turn",working:"In flight",recent:"Recent"};function Qt(t){const e=new Map;for(const n of t){const s=e.get(n.group)??[];s.push(n),e.set(n.group,s)}return bt.filter(n=>e.has(n)).map(n=>({group:n,label:Mt[n],items:e.get(n)}))}function A(t){return{view:"agents-v2",...t.projectSlug?{projectSlug:t.projectSlug}:{},...t.machineId?{machineId:t.machineId}:{}}}function Xt(t,e){return t.agentId&&e.selectedAgentId?e.selectedAgentId===t.agentId:t.kind==="native"&&t.sessionId&&e.sessionId?e.sessionId===t.sessionId:!1}function Zt(t,e){return t.kind==="native"?{...A(e),sessionId:t.sessionId??void 0}:{...A(e),selectedAgentId:t.agentId??void 0}}function te(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.conversationId?{view:"conversation",conversationId:t.conversationId}:t.agentId?z(e,t.agentId):A(e)}function ee(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.agentId?{...z(e,t.agentId),tab:"observe"}:null}function se(t,e){const n=_(t);return n?{...A(e),indexView:"sessions",...n?{sessionId:n}:{},selectedAgentId:void 0}:A(e)}function ne(t,e){const n=_(t);return n&&e.sessionId?e.sessionId===n:!1}function _(t){return t.sessionId?t.sessionId:t.conversationId?t.conversationId:null}function oe(t,e){const n=_(t);return n?{...A(e),projectSlug:t.projectSlug,indexView:"sessions",sessionId:n,selectedAgentId:void 0}:{...A(e),projectSlug:t.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const jt=15e3,tt=3e4,Ct=250;let u={sessions:[],fleet:null,discovery:null,loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const N=new Set;let k=0,W=0,p=null,R=null,b=null,T=null,J=0;function et(){for(const t of[...N])t()}function Bt(t,e){return t&&JSON.stringify(t.activeAsks)===JSON.stringify(e.activeAsks)?t:e}function Et(t,e){const n=s=>JSON.stringify([s?.transcripts??[],s?.processes??[]]);return t&&n(t)===n(e)?t:e}function st(t){u={...u,...t},et()}async function y(t){const e=++W;J+=1,typeof window<"u"&&(window.__projectsInboxLoads=J),u.loadedAt===null&&t!=="background"&&st({loading:!0,error:null});const[n,s,o]=await Promise.allSettled([C("/api/conversations"),C("/api/fleet"),C("/api/tail/discover")]);if(e!==W)return;const r=n.status==="fulfilled"?H(u.sessions,n.value):u.sessions,c=s.status==="fulfilled"?Bt(u.fleet,s.value):u.fleet,a=o.status==="fulfilled"?Et(u.discovery,o.value):u.discovery,d=[n,s,o].find(f=>f.status==="rejected"),v=d?d.reason instanceof Error?d.reason.message:String(d.reason):null,w=r!==u.sessions||c!==u.fleet||a!==u.discovery||v!==u.error||u.loading;u={...u,sessions:r,fleet:c,discovery:a,error:v,loading:!1,loadedAt:Date.now()},w&&et()}function Pt(){P()&&(p||(p=setTimeout(()=>{p=null,y("background")},Ct)))}function Nt(){y("initial"),R=setInterval(()=>{P()&&y("background")},jt),b=setInterval(()=>{P()&&st({nowMs:Date.now()})},tt),T=rt(()=>{y("background")})}function Tt(){p&&(clearTimeout(p),p=null),R&&(clearInterval(R),R=null),b&&(clearInterval(b),b=null),T?.(),T=null}function ie(){y("background")}function xt(){const[t,e]=E.useState(u);return E.useEffect(()=>{const n=()=>e(u);return N.add(n),k+=1,k===1&&Nt(),n(),()=>{N.delete(n),k-=1,k===0&&Tt()}},[]),it(Pt),t}let U=null,S=null;function Ot(t,e){return!!t&&t.length===e.length&&t.every((n,s)=>n===e[s])}function B(t,e,n){if(!t?.length)return e;const s=new Map(t.map(c=>[n(c),c]));let o=t.length===e.length;const r=e.map((c,a)=>{const d=s.get(n(c)),v=d?H(d,c):c;return v!==t[a]&&(o=!1),v});return o?t:r}function _t(t,e){if(!t)return e;const n=B(t.projects,e.projects,r=>r.slug),s=B(t.threads,e.threads,r=>r.id),o=B(t.sessions,e.sessions,r=>r.id);return n===t.projects&&s===t.threads&&o===t.sessions?t:{projects:n,threads:s,sessions:o}}function Dt(t){const e=[t.agents,t.sessions,t.fleet,t.discovery,t.machineId,Math.floor(t.nowMs/tt),t.showEphemeral];if(Ot(U,e)&&S)return S;const n=Rt(t),s=_t(S,n);return U=e,S=s,s}function re(t){const e=xt(),{agents:n}=lt(),s=ot(t),o=!!t.showEphemeral;return{model:E.useMemo(()=>Dt({agents:n,machineId:s,sessions:e.sessions,fleet:e.fleet,discovery:e.discovery,nowMs:e.nowMs,showEphemeral:o}),[n,s,e.sessions,e.fleet,e.discovery,e.nowMs,o]),nowMs:e.nowMs,loading:e.loading,loadedAt:e.loadedAt,error:e.error}}export{te as a,ne as b,_ as c,Yt as d,zt as e,se as f,Qt as g,Zt as h,qt as i,Xt as j,ie as r,oe as s,ee as t,re as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-ClCdc3F9.js";const c=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],o=a("radio",c);export{o as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-ClCdc3F9.js";const c=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],a=e("refresh-cw",c);export{a as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-CzVeWScw.js";import{ActivityContent as s}from"./content-CDpDtVI-.js";import"./index-BWHgHrtv.js";import"./router-B-K15T7B.js";import"./index-Dewd56RX.js";import"./Provider-DSsb2gLR.js";import"./AgentDetailCard-sZuHl1de.js";/* empty css */import{AgentsLeft as e}from"./left-BhzPp-_E.js";import{AgentsContent as n}from"./content-BHUcUCH5.js";import{AgentsInspector as m}from"./right-B-MKhiJ6.js";/* empty css */import"./secondaryNavConfig-Bg4Tc0gT.js";/* empty css */import"./BackToPicker-DZg_4nHL.js";import"./runtime-picker-BCQD7d4K.js";import"./ConversationScreen-C-PrCRz1.js";/* empty css */import"./ObservedTopologyPanel-C1AQM0Mq.js";import"./SessionObserve-BmmJ8dEh.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-DI4ooSHW.js";import{P as c}from"./ProjectsRail-B1zrQLZe.js";import{ProjectsScreen as f}from"./ProjectsScreen-PW_NH5VK.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-DaCEUWN1.js";import{BriefingsContent as x}from"./content-CvtLIjXS.js";/* empty css */import{BrokerContent as j}from"./content-CuOLxp1x.js";import"./NewChatComposer-DXDxV2Mh.js";import{ChatLeft as u}from"./left-CN1MABD0.js";/* empty css */import{ChatContent as l}from"./content-CO-9CeFd.js";import{ConversationInspector as i}from"./right-Dc7uqv7l.js";import{CodeContent as h}from"./CodeScreen-D0hpZNLP.js";import{FollowContent as C}from"./content-C39ELNgC.js";/* empty css */import{HarnessesContent as d}from"./content-BUhvLPkv.js";/* empty css */import{HomeLeft as I}from"./left-HwwbMVtl.js";import{H as p}from"./content-qsDjA4Au.js";import{HomeRight as w}from"./right-BqmKXLtf.js";import{MeshLeft as P}from"./left-YfH0daht.js";import{MeshContent as L}from"./content-DQXbo2RO.js";import{MeshInspectorPanel as R}from"./right-B91Zl8lQ.js";import"./mesh-view-store-Btlyc7rW.js";/* empty css */import{MeshOpsLeft as k}from"./left-DDgbsio7.js";import{MeshOpsContent as A}from"./content-C4RYKHut.js";import{MeshOpsInspector as M}from"./right-CkGOs-sq.js";import{OpsLeft as S}from"./left-np5USKqG.js";import{OpsContent as b}from"./content-BomQ5YWo.js";/* empty css */import"./RailRow-DerXOXQS.js";import"./left-mission-B54-c3hq.js";import"./mission-control-store-CcoNeQHG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-B3gc5HnM.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-DL3YZkzE.js";import{ReposContent as g}from"./content-LCELs6zg.js";import{ReposInspector as H}from"./right-BcFnuse9.js";/* empty css */import"./RepoDiffViewerLazy-DIxkiMto.js";import"./cache-Dr0why2k.js";import{SearchContent as O}from"./content-7ZeCPAEt.js";import{K as T}from"./KnowledgeSearchInspector-C2EZsQ5i.js";/* empty css */import{SessionsContent as y}from"./content-CzwTUb9n.js";import{SessionsInspector as B}from"./right-BzeB-Dpt.js";/* empty css */import{SettingsContent as K}from"./content-DRTQ9QQb.js";import"./SettingsDrawer-DL-SVLdd.js";import{TerminalLeft as W}from"./left-Dpf2R9uD.js";import{TerminalContent as E}from"./Terminal-Dp1FSGIS.js";import{TerminalInspector as F}from"./right-09W2JJFg.js";import{WorkContent as V}from"./content-CCiZfG4H.js";import{WorkInspector as q}from"./right-BdtMzn35.js";import{RealtimeVoicePage as z}from"./RealtimeVoiceScreen-XtxbCjOs.js";import"./ActivityScreen-BXm6nJ6L.js";import"./api-h5zurxmi.js";import"./clipboard-e3fSpeo7.js";import"./sse-QcU9bikk.js";import"./colors-BtO5_zlx.js";import"./mentions-fbQJ2mBI.js";import"./time-Dhsh_2EG.js";import"./ContextMenu-N-Z6X0Z1.js";import"./EmptyState-DypEjx0V.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./AgentInfoScreen-CPkLg1pK.js";import"./conversation-model-CHwHZNw-.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-zR6b2bUL.js";import"./AgentsSubnav-q0xcZi6C.js";import"./SecondaryNav-Hv5AJ3Fv.js";import"./library-DbCVJG_O.js";import"./HarnessMark-BE-YSyci.js";import"./AgentSessions-BxWIPkWh.js";import"./agents-project-model-UYiamtrU.js";import"./profile-s3KRbip1.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-9FqXmjBw.js";import"./terminal-relay-BkXjjSkq.js";import"./AgentDefinitionsWorkspace-4Z0aN8AR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CXCq-oKj.js";import"./chevron-down-DRCbnzyY.js";import"./agent-essentials-SrzMYEXV.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-KvmTwABa.js";import"./TmuxPeek-DNC4uWky.js";import"./refresh-cw-4oeFn1Jn.js";import"./message-square-CIXda-Y7.js";import"./search-C3bSJluv.js";import"./terminal-DrTkVXIj.js";import"./scroll-text-BV-BB7v-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-BGgbITvr.js";import"./eye-BFlhMzQL.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";import"./AddProjectForm-CtEiLQnm.js";import"./projects-inbox-Diddml6e.js";import"./model-IGCUEsMy.js";import"./ProjectsInbox-C3Jd6JTk.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Dk-O4OVt.js";import"./arrow-up-right-CcrWONpD.js";import"./ProjectAgentProfile-zE1cApxw.js";import"./ProjectAgentProfileBar-MODhG0P6.js";import"./BriefingDetailScreen-BZU4qMwE.js";import"./BriefingsScreen-Bfc3tqPp.js";import"./BrokerScreen-Chh8sGen.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-pp33bLsu.js";import"./BrokerMetadataPanel-CaFe6kdh.js";import"./DispatchAftermath-OXYlMbT1.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-B7O4if20.js";import"./arrow-down-D3-IbArq.js";import"./sparkles-BjCA3Evu.js";import"./paperclip-DfpJkR4s.js";import"./plus-CmFQp9Uj.js";import"./send-horizontal-CqogPmbY.js";import"./check-COxArFXG.js";import"./copy-4LfKIdQJ.js";import"./radio-PauJIekM.js";import"./bot-BRINYlC6.js";import"./NewChatOrigin-CnjoswTG.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C5sF6WBR.js";import"./use-fleet-active-asks-BOMPW0nl.js";import"./MessagesScreen-BhOJ7_tj.js";import"./CodeDiffPane-C1ebFt-Y.js";import"./usePierreRuntime-Bo4lD7Ui.js";/* empty css */import"./CodeProjectPicker-tsCly-f3.js";/* empty css */import"./FollowScreen-DRgYuAvp.js";import"./HarnessesScreen-L-emPcXd.js";import"./useContentSecondaryNav-BX7Sq7vy.js";import"./OpsSubnav-D5Bpowtk.js";import"./operator-attention-BwSPeheT.js";import"./HomeHero-CAEg8Yg5.js";import"./observe-BNFzh-7B.js";import"./agent-lanes-model-CPgQRenB.js";import"./home-moving-signal-aNJusIzL.js";import"./home-live-action-BkqGLVRY.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Dj7-CfNi.js";import"./MeshScreen-D5zzTn0o.js";import"./MeshCanvas-rtCBD7s6.js";import"./chunk-T65CQEWV-CiZ_ICHW.js";import"./useAgentHoverCard-FtCmY-b9.js";import"./local-agents-DBaUbP-_.js";import"./mesh-ops-Cnw3vwAu.js";import"./use-mesh-ops-items-Co05vcTV.js";import"./use-scout-dev-flags-BOQF3fW2.js";import"./left-agents-CYUwAy2Z.js";import"./left-default-vEGZALPv.js";import"./left-lanes-bphF-vlX.js";import"./lane-roster-store-pR4ZaYQm.js";import"./left-plan-BNBuDoPQ.js";import"./OpsScreen-BeC0lieE.js";import"./page-status-DDvNdA8s.js";import"./AgentLanesView-DqRK5-d2.js";import"./AgentFloorView-DMivAYHU.js";import"./AgentLanesPreflight-DNGvZvjd.js";import"./AgentLaneChrome-O9Yf0uR-.js";import"./AgentLaneCard-nB68f2CI.js";import"./AgentLaneSummaryResize-Ct3b0TQR.js";import"./agent-lane-card-model-DSWdGu-v.js";import"./agent-lane-preview-C33Dwpn7.js";import"./AgentLaneDetailSheet-BfhpaEQ3.js";import"./agent-lane-detail-BNNm6FNu.js";import"./LaneTraceDetailSheet-Dl7foF88.js";import"./LaneTraceEventFocus-X4-DDFEo.js";import"./MissionControlView-D2JO9u-y.js";import"./MissionContextRail-0O-Zu1Tn.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-LnjmqBiW.js";import"./MissionLogPane-lZ9vUftY.js";import"./OpsAgentsView-BnMX0vEY.js";import"./DataTable-BoofV-_4.js";import"./sliders-horizontal-CUiOH26y.js";import"./PlanView-DDXdC19M.js";import"./AtopView-VZkk40v0.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./RepoDiffPageScreen-CGEMAv2Z.js";import"./ReposScreen-BN1lVjOj.js";import"./selection-bridge-B1dmkX3P.js";import"./KnowledgeSearchScreen-DvdOFh-b.js";import"./clock-CyfvRmj6.js";import"./SessionsScreen-BJEjuo2X.js";import"./RawSessionsTable-LWEvXJzj.js";import"./FlightObserveScreen-Yq5NtQQJ.js";import"./SettingsScreen-DJ-BhBwR.js";import"./StatusPill-B33sQinT.js";import"./AgentConfigurationScreen-CfBXxrsD.js";import"./server-Brw5Y1Gh.js";import"./VoicePermissionsPanel-WLN0V-Xv.js";import"./chunk-YOZR3KYS-DLOc92uD.js";import"./session-table-1xdSxSXq.js";/* empty css */import"./HerdrSession-DKFCJMst.js";import"./chunk-JTPDIGGW-s6WbxdjC.js";import"./WorkDetailScreen-D2Yl0mYZ.js";import"./WorkFilesViewer-BbVfcUN-.js";import"./ScoutbotRealtimeVoiceCall-CDyFJX8m.js";function mp(t,o){switch(t.view){case"ops":return r.jsx(S,{});case"agents-v2":return r.jsx(c,{route:t,navigate:o});case"agent-info":return r.jsx(e,{});case"messages":case"conversation":return r.jsx(u,{});case"mesh":return r.jsx(P,{});case"mesh-ops":return r.jsx(k,{});case"terminal":return r.jsx(W,{});default:return r.jsx(I,{})}}function ip(t,o,D=[]){switch(t.view){case"conversation":case"messages":return r.jsx(l,{route:t,navigate:o});case"agents-v2":return r.jsx(f,{route:t,navigate:o});case"agent-info":return r.jsx(n,{route:t,navigate:o});case"settings":return r.jsx(K,{route:t,navigate:o});case"inbox":return r.jsx(p,{navigate:o});case"sessions":return r.jsx(y,{route:t,navigate:o});case"search":return r.jsx(O,{route:t,navigate:o});case"mesh":return r.jsx(L,{route:t,navigate:o});case"mesh-ops":return r.jsx(A,{route:t,navigate:o});case"broker":return r.jsx(j,{route:t,navigate:o});case"code":return r.jsx(h,{route:t,navigate:o});case"repos":case"repo-diff":return r.jsx(g,{route:t,navigate:o});case"harnesses":return r.jsx(d,{route:t,navigate:o});case"briefings":return r.jsx(x,{route:t,navigate:o});case"activity":return r.jsx(s,{route:t,navigate:o});case"voice":return r.jsx(z,{});case"ops":return r.jsx(b,{route:t,navigate:o});case"terminal":return r.jsx(E,{route:t,navigate:o});case"work":return r.jsx(V,{route:t,navigate:o});case"follow":return r.jsx(C,{route:t,navigate:o});default:return r.jsx(p,{navigate:o})}}function pp(t,o){switch(t.view){case"inbox":return r.jsx(w,{});case"agents-v2":return t.agentId?r.jsx(m,{}):t.selectedAgentId||t.sessionId?r.jsx(a,{route:t,navigate:o}):null;case"agent-info":return r.jsx(m,{});case"sessions":return t.flightId?null:r.jsx(B,{});case"search":return r.jsx(T,{});case"conversation":return r.jsx(i,{});case"messages":return r.jsx(i,{});case"terminal":return r.jsx(F,{});case"work":return r.jsx(q,{});case"mesh":return r.jsx(R,{});case"mesh-ops":return r.jsx(M,{});case"repos":return r.jsx(H,{});default:return null}}export{ip as resolveContentPane,mp as resolveLeftPane,pp as resolveRightPane};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-CzVeWScw.js";import{AgentsLeft as i}from"./left-BhzPp-_E.js";/* empty css */import"./index-BWHgHrtv.js";import"./Provider-DSsb2gLR.js";import"./router-B-K15T7B.js";import"./BackToPicker-DZg_4nHL.js";import"./AgentLiveActions-DI4ooSHW.js";import"./ObservedTopologyPanel-C1AQM0Mq.js";/* empty css */import"./secondaryNavConfig-Bg4Tc0gT.js";/* empty css */import"./runtime-picker-BCQD7d4K.js";import"./index-Dewd56RX.js";import"./AgentDetailCard-sZuHl1de.js";import"./ConversationScreen-C-PrCRz1.js";/* empty css */import"./SessionObserve-BmmJ8dEh.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as m}from"./ProjectsRail-B1zrQLZe.js";import"./ProjectsInbox-C3Jd6JTk.js";import"./projects-inbox-Diddml6e.js";import{ChatLeft as p}from"./left-CN1MABD0.js";/* empty css */import{HomeLeft as e}from"./left-HwwbMVtl.js";import"./content-qsDjA4Au.js";import{MeshLeft as s}from"./left-YfH0daht.js";import"./mesh-view-store-Btlyc7rW.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-DDgbsio7.js";import"./use-scout-dev-flags-BOQF3fW2.js";import"./mesh-ops-Cnw3vwAu.js";import{OpsLeft as l}from"./left-np5USKqG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-B3gc5HnM.js";/* empty css */import"./mission-control-store-CcoNeQHG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-DL3YZkzE.js";import"./RailRow-DerXOXQS.js";import"./left-mission-B54-c3hq.js";import{TerminalLeft as a}from"./left-Dpf2R9uD.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-CuvXOkc7.js";import"./NewChatComposer-DXDxV2Mh.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./api-h5zurxmi.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./keyboard-nav-BJnFoFDP.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-D4X_y1j_.js";import"./createLucideIcon-ClCdc3F9.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./loader-circle-Byb9kSFx.js";import"./file-text-DG-pufl1.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./sse-QcU9bikk.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./TextDocumentSurface-DRjctOIt.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./terminal-takeover-KvmTwABa.js";import"./openContent-C6XO6kr5.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";import"./message-square-CIXda-Y7.js";import"./scroll-text-BV-BB7v-.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./mentions-fbQJ2mBI.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-BGgbITvr.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";import"./AddProjectForm-CtEiLQnm.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Dk-O4OVt.js";/* empty css */import"./cache-Dr0why2k.js";import"./arrow-up-right-CcrWONpD.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C5sF6WBR.js";import"./use-fleet-active-asks-BOMPW0nl.js";import"./operator-attention-BwSPeheT.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-CAEg8Yg5.js";import"./observe-BNFzh-7B.js";import"./agent-lanes-model-CPgQRenB.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-aNJusIzL.js";import"./home-live-action-BkqGLVRY.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Dj7-CfNi.js";import"./use-mesh-ops-items-Co05vcTV.js";import"./left-agents-CYUwAy2Z.js";import"./left-default-vEGZALPv.js";import"./left-lanes-bphF-vlX.js";import"./lane-roster-store-pR4ZaYQm.js";import"./left-plan-BNBuDoPQ.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./page-status-DDvNdA8s.js";import"./chunk-YOZR3KYS-DLOc92uD.js";import"./arrow-down-D3-IbArq.js";import"./terminal-relay-BkXjjSkq.js";import"./session-table-1xdSxSXq.js";import"./refresh-cw-4oeFn1Jn.js";import"./clock-CyfvRmj6.js";function lt(r,t){switch(r.view){case"inbox":case"activity":case"briefings":return{body:o.jsx(e,{}),footer:null};case"agents-v2":return{body:o.jsx(m,{route:r,navigate:t}),footer:null};case"agent-info":return{body:o.jsx(i,{}),footer:null};case"repos":case"repo-diff":case"code":return{body:null,footer:null};case"sessions":return{body:null,footer:null};case"terminal":return{body:o.jsx(a,{}),footer:null};case"messages":case"conversation":return{body:o.jsx(p,{}),footer:null};case"broker":case"work":case"follow":return{body:null,footer:null};case"search":return{body:null,footer:null};case"ops":return{body:o.jsx(l,{}),footer:null};case"mesh":return{body:o.jsx(s,{}),footer:o.jsx(f,{})};case"mesh-ops":return{body:o.jsx(n,{}),footer:null};case"harnesses":return{body:null,footer:null};case"settings":case"voice":return{body:null,footer:null};default:return{body:null,footer:null}}}export{lt as resolveSidebarContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as d,j as e}from"./index-CzVeWScw.js";import{u as k}from"./Provider-DSsb2gLR.js";import{c as y}from"./colors-BtO5_zlx.js";import{A as S}from"./AgentAvatar-CszU5eaU.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./text-DsBWV_4k.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-C3qU8tnY.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";function Se(){const{route:t,agents:o,navigate:s}=k();if(t.view!=="terminal")return null;const r=t.agentId?o.find(i=>i.id===t.agentId)??null:null,l=t.mode??"takeover",[f,p]=d.useState(null);d.useEffect(()=>{if(t.view!=="terminal"||t.agentId||!t.terminalSurfaceKey){p(null);return}let i=!1;return T().then(g=>{i||p(C(g,t.terminalSessionId,t.terminalSurfaceKey))}).catch(()=>{i||p(null)}),()=>{i=!0}},[t.agentId,t.terminalSessionId,t.terminalSurfaceKey,t.view]);const j=f?R(f.surface):null,n=(r?$(r):null)??j,c=d.useMemo(()=>n?A(n):null,[n]);return r?e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsx(D,{agent:r}),e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),e.jsx(a,{label:"Backend",value:n?.backend??"pty"}),n&&e.jsx(a,{label:"Session",value:n.sessionName}),n?.paneId&&e.jsx(a,{label:"Pane",value:n.paneId}),e.jsx(a,{label:"State",value:y(r.state)})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c}),e.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[n&&e.jsx(m,{active:l==="observe",label:"Observe",onClick:()=>s(b(r.id,"observe"))}),e.jsx(m,{active:l==="takeover",label:"Takeover",onClick:()=>s(b(r.id,"takeover"))}),e.jsx(m,{label:"Profile",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"profile"})}),e.jsx(m,{label:"Trace",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"observe"})})]}),e.jsxs(u,{label:"Agent",children:[e.jsx(a,{label:"Harness",value:r.harness??"-"}),e.jsx(a,{label:"Transport",value:r.transport??"-"}),r.role&&e.jsx(a,{label:"Role",value:w(r.role)??r.role}),r.handle&&e.jsx(a,{label:"Handle",value:`@${r.handle}`}),r.updatedAt&&e.jsx(a,{label:"Updated",value:N(r.updatedAt)})]}),(r.project||r.branch||r.cwd||r.projectRoot)&&e.jsxs(u,{label:"Workspace",children:[r.project&&e.jsx(a,{label:"Name",value:r.project}),r.branch&&e.jsx(a,{label:"Branch",value:r.branch}),r.cwd&&e.jsx(a,{label:"Cwd",value:r.cwd}),!r.cwd&&r.projectRoot&&e.jsx(a,{label:"Root",value:r.projectRoot})]})]}):e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),t.agentId&&e.jsx(a,{label:"Agent",value:t.agentId}),n&&e.jsx(a,{label:"Backend",value:n.backend}),n&&e.jsx(a,{label:"Session",value:n.sessionName})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c})]})}function x(t){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(t)?t:`'${t.replace(/'/gu,"'\\''")}'`}function A(t){return t.backend==="tmux"?`tmux attach -t ${x(t.sessionName)}`:`${t.socketDir?`ZELLIJ_SOCKET_DIR=${x(t.socketDir)} `:""}zellij attach ${x(t.sessionName)}`}function b(t,o){return{view:"terminal",agentId:t,mode:o}}function $(t){return t.terminalSurface?t.terminalSurface:t.transport==="tmux"&&t.harnessSessionId?{backend:"tmux",sessionName:t.harnessSessionId,paneId:null,socketDir:null}:null}function v(t){return t==="observe"?"Read-only observe":"Interactive takeover"}function D({agent:t}){return e.jsx("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(S,{agent:t,placement:"row",size:32,presence:!1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.name}),t.handle&&e.jsxs("div",{className:"truncate font-mono text-xs text-cyan-400/70",children:["@",t.handle]})]})]})})}function m({active:t,label:o,onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:`h-7 rounded border px-2 font-mono text-2xs uppercase tracking-[0.1em] transition-colors ${t?"border-cyan-400/35 bg-cyan-400/[0.12] text-cyan-200":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] text-[var(--scout-chrome-ink-soft)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]"}`,children:o})}function h({label:t,command:o}){const[s,r]=d.useState(!1);return e.jsxs("details",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2",children:[e.jsx("summary",{className:"cursor-pointer select-none font-mono text-2xs uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mb-1.5 mt-2 flex items-center justify-end gap-2",children:e.jsx("button",{type:"button",className:"rounded border border-cyan-400/20 bg-cyan-400/[0.08] px-2 py-1 font-mono text-2xs uppercase tracking-[0.1em] text-cyan-100/80 hover:bg-cyan-400/[0.14]",onClick:()=>{I(o).then(l=>{l&&(r(!0),window.setTimeout(()=>r(!1),1200))})},children:s?"Copied":"Copy"})}),e.jsx("code",{className:"block select-text break-all rounded bg-black/25 p-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink)]",children:o})]})}function u({label:t,children:o}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),o]})}function a({label:t,value:o}){return e.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-right text-sm font-mono text-[var(--scout-chrome-ink)]",children:o})]})}export{Se as TerminalInspector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,r as h}from"./index-CzVeWScw.js";import{u as Z}from"./Provider-DSsb2gLR.js";import{o as ee}from"./openAgent-Dbv5wfuL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{i as pe,s as te,c as se,n as D,d as X}from"./colors-BtO5_zlx.js";import{t as O,c as ne}from"./time-Dhsh_2EG.js";import{f as oe}from"./text-DsBWV_4k.js";import{a as R}from"./api-h5zurxmi.js";import{u as L}from"./sse-QcU9bikk.js";import{r as E}from"./terminal-relay-BkXjjSkq.js";import{q as re}from"./terminal-takeover-KvmTwABa.js";import{r as fe,s as ve,a as be,b as je,c as ke}from"./session-catalog-9FqXmjBw.js";import{p as ae}from"./model-Co0zkMIc.js";import{u as ge}from"./ContextMenu-N-Z6X0Z1.js";import{A as Ne}from"./AgentAvatar-CszU5eaU.js";import{A as we}from"./AgentLiveActions-DI4ooSHW.js";import{T as H}from"./TmuxPeek-DNC4uWky.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./index-BWHgHrtv.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";/* empty css */import"./refresh-cw-4oeFn1Jn.js";const ye=new Intl.NumberFormat("en-US"),Ce=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function M(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?ye.format(e):Ce.format(e).toLowerCase()}function Se(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const s=Math.round(e),a=Math.floor(s/3600),r=Math.floor(s%3600/60),i=s%60;return a>0?`${a}h ${r}m`:r>=10||i===0?`${r}m`:`${r}m ${i}s`}function Ie(e){return e.replace(/\.local$/i,"").replace(/-local-openscout$/i,"")}function z(e){const s=e?.trim();return s?s.toLowerCase()==="a2a"?"A2A":s:null}function Y(e){const s=e?.trim();return s?s==="claude_stream_json"?"Claude stream-json worker":s==="codex_app_server"?"Codex app server":s==="pi_rpc"?"Pi RPC":s==="tmux"?"tmux terminal":s:null}function ie(e){return!!(e.providerName||z(e.protocol)||(e.skills?.length??0)>0)}async function Ae(e){await R("/api/local-path/reveal",{method:"POST",body:JSON.stringify({path:e.path,agentId:e.agentId,...e.basePath?{basePath:e.basePath}:{},...e.sessionId?{sessionId:e.sessionId}:{}})})}function ce(e){Ae(e).catch(s=>{console.warn("Failed to reveal local path",s)})}function _t(){const{route:e,agents:s,navigate:a}=Z();if(e.view==="agent-info")return t.jsx(Re,{conversationId:e.conversationId,agents:s,navigate:a,route:e});if(e.view==="agents-v2"){if(!e.agentId)return null;const r=s.find(i=>i.id===e.agentId)??null;return r?t.jsx(le,{agent:r,agents:s,navigate:a,route:e,observeMode:e.tab==="observe",showStaticIdentity:!1}):null}return null}function Re({conversationId:e,agents:s,navigate:a,route:r}){const[i,m]=h.useState(null),[x,v]=h.useState(null),[p,f]=h.useState(!1),n=h.useCallback(async()=>{const o=await R(`/api/session/${encodeURIComponent(e)}`).catch(()=>null);m(o),f(!0)},[e]);h.useEffect(()=>{f(!1),n()},[n]),L(()=>{n()});const l=i?.agentId??null;h.useEffect(()=>{if(!l||s.some(c=>c.id===l)){v(null);return}let o=!1;return R(`/api/agents/${encodeURIComponent(l)}`).then(c=>{o||v(c)}).catch(()=>{o||v(null)}),()=>{o=!0}},[s,l]);const u=h.useMemo(()=>l?s.find(o=>o.id===l)??(x?.id===l?x:null):null,[x,s,l]);return p?u?t.jsx(le,{agent:u,agents:s,navigate:a,route:r,observeMode:!1}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[t.jsx(w,{label:"Conversation",value:e}),t.jsx("div",{className:"mt-2 text-xs font-mono uppercase tracking-[0.15em] leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"No live agent registration matches this profile."})]}):t.jsx("div",{className:"flex h-full items-center justify-center p-4 text-center text-sm italic text-[var(--scout-chrome-ink-faint)]",children:"Loading agent context..."})}function le({agent:e,agents:s,navigate:a,route:r,observeMode:i,showStaticIdentity:m=!0}){const x=pe(e.state),[v,p]=h.useState(null),[f,n]=h.useState(null),[l,u]=h.useState(null),o=e.skills??[],c=z(e.protocol),j=ie(e),y=h.useCallback(async()=>{const[k,xe,he]=await Promise.all([R("/api/fleet").catch(()=>null),R(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null),R(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null)]);k&&p(k),n(xe),u(he)},[e.id]);h.useEffect(()=>{y()},[y]),h.useEffect(()=>{n(null),u(null)},[e.id]),L(()=>{y()});const{focusedSession:d,focusSession:C}=Z(),N=fe(e,f),S=h.useMemo(()=>ve(f?.sessions??[],N),[f?.sessions,N]),$=r.view==="agents-v2"&&r.agentId===e.id?r.sessionId:null,I=be(e.id,d,N,S,$),P=je($,S);h.useEffect(()=>{P&&(d?.agentId===e.id&&d.sessionId===P||C(e.id,P))},[e.id,d?.agentId,d?.sessionId,C,P]);const b=S.find(k=>k.id===I)??null,_=!!(b&&N&&b.id===N),G=l?.sessionId?.trim()||l?.data.metadata?.session?.externalSessionId?.trim()||l?.data.metadata?.session?.threadId?.trim()||null,T=b&&_&&G?G:b?.id??null,U=b&&T&&T!==b.id?b.id:null,W=b?ke(e,f,b,_):{canObserve:!1,canTakeover:!1},me=()=>F(a,{view:"terminal",agentId:e.id,mode:"observe"},{returnTo:r}),B=()=>F(a,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:r}),ue=()=>{if(E(e)){B();return}const k=f?.resumeCommand;if(k){re({command:k,cwd:f?.resumeCwd,agentId:e.id}).then(()=>B());return}B()};return m?t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--scout-chrome-border-soft)] pb-3",children:[t.jsx(Ne,{agent:e,placement:"inspector"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"truncate text-lg text-[var(--scout-chrome-ink-strong)]",children:e.name}),e.handle&&t.jsxs("span",{className:"text-xs font-mono text-[var(--scout-chrome-ink-faint)]",children:["@",e.handle]})]})]}),t.jsx(we,{agent:e,catalog:f,navigate:a,returnTo:r,variant:"compact"}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsxs(g,{label:"State",children:[t.jsxs("div",{className:"flex items-baseline gap-2",children:[t.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:te(e.state),opacity:x?1:.4}}),t.jsx("span",{className:"text-md capitalize text-[var(--scout-chrome-ink)]",children:se(e.state)})]}),e.updatedAt&&t.jsxs("div",{className:"mt-1 text-xs font-mono text-[var(--scout-chrome-ink-faint)]",children:["Updated ",O(e.updatedAt)]})]}),t.jsx(g,{label:"Presence",children:t.jsx(_e,{focusAgent:e,agents:s,onOpenAgent:k=>ee(a,k,{returnTo:r})})}),i&&t.jsx(J,{agentId:e.id}),v&&t.jsx(V,{asks:v.activeAsks,agentId:e.id,navigate:a}),t.jsxs(g,{label:"Identity",children:[e.providerName&&t.jsx(w,{label:"Provider",value:e.providerName}),c&&t.jsx(w,{label:"Protocol",value:c}),!j&&t.jsx(w,{label:"Class",value:e.agentClass}),!j&&e.role&&t.jsx(w,{label:"Role",value:oe(e.role)??e.role}),!j&&e.harness&&t.jsx(w,{label:"Harness",value:e.harness}),!j&&e.transport&&t.jsx(w,{label:"Transport",value:Y(e.transport)??e.transport}),(e.homeNodeName||e.homeNodeId)&&t.jsx(w,{label:"Host",value:Ie(e.homeNodeName??e.homeNodeId??"")})]}),o.length>0&&t.jsx(g,{label:`Skills · ${o.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:o.map(k=>t.jsx("span",{className:"rounded-sm bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 text-xs font-mono text-[var(--scout-chrome-ink-soft)]",children:k},k))})}),(e.project||e.branch||e.cwd)&&t.jsxs(g,{label:"Project",children:[e.project&&t.jsx(w,{label:"Name",value:e.project}),e.branch&&t.jsx(w,{label:"Branch",value:e.branch}),e.cwd&&t.jsx(w,{label:"Cwd",value:e.cwd})]}),e.capabilities.length>0&&t.jsx(g,{label:`Capabilities · ${e.capabilities.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:e.capabilities.map(k=>t.jsx("span",{className:"rounded-sm bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 text-xs font-mono text-[var(--scout-chrome-ink-soft)]",children:k},k))})}),t.jsx(Me,{agent:e,catalog:f,navigate:a,returnTo:r})]}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[b&&t.jsxs(g,{label:"Session",children:[t.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t.jsx("span",{className:"truncate font-mono text-md text-[var(--scout-chrome-ink)]",title:T??b.id,children:de(T??b.id)}),t.jsx("span",{className:"shrink-0 font-mono text-2xs uppercase tracking-[0.12em]",style:{color:_?"var(--accent)":"var(--scout-chrome-ink-faint)"},children:_?"now":b.endedAt?`ended · ${O(b.endedAt)||"recent"}`:O(b.startedAt)||"recent"})]}),b.cwd&&t.jsx("div",{className:"mt-1 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",title:b.cwd,children:b.cwd}),T&&t.jsxs("div",{className:"mt-1 break-all font-mono text-2xs leading-snug text-[var(--scout-chrome-ink-faint)]",title:T,children:[t.jsx("span",{className:"uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:"id"})," ",T]}),U&&t.jsxs("div",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",title:U,children:["profile ",U]}),t.jsx("div",{className:"mt-2.5 flex flex-col gap-1.5",children:t.jsxs(Te,{label:"Terminal",children:[t.jsx(q,{onClick:me,disabled:!W.canObserve,title:W.canObserve?"Watch the live terminal, read-only":"No live terminal to observe",children:"Observe"}),t.jsx(q,{onClick:ue,disabled:!W.canTakeover,title:W.canTakeover?"Grab the keyboard and drive it":"Can't take over this session",children:"Take over"})]})})]}),!i&&b&&t.jsx(Ee,{agentId:e.id,navigate:a,cwd:b.cwd??e.cwd,route:r}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsx(g,{label:"Runtime",children:t.jsx($e,{agent:e})}),i&&t.jsx(J,{agentId:e.id}),v&&t.jsx(V,{asks:v.activeAsks,agentId:e.id,navigate:a})]})}function $e({agent:e}){const s=[],a=(m,x)=>{x&&x.trim()&&s.push({label:m,value:x.trim()})},r=z(e.protocol);return ie(e)?a("Protocol",r):(a("Role",oe(e.role)),a("Class",e.agentClass)),s.length===0?null:t.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-2",children:s.map(m=>t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:m.label}),t.jsx("div",{className:"truncate font-mono text-sm text-[var(--scout-chrome-ink)]",children:m.value})]},m.label))})}function Te({label:e,children:s}){return t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"w-[56px] shrink-0 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("div",{className:"flex gap-1.5",children:s})]})}function q({onClick:e,disabled:s,title:a,children:r}){return t.jsx("button",{type:"button",onClick:e,disabled:s,title:a,className:"rounded-[4px] border border-[var(--scout-chrome-border-soft)] px-2.5 py-1 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-soft)] transition-colors hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-[var(--scout-chrome-ink-soft)]",children:r})}function Me({agent:e,catalog:s,navigate:a,returnTo:r}){const i=ge(),m=E(e),x=s?.activeSessionId??(m?e.harnessSessionId??m.sessionName:null),p=h.useMemo(()=>Pe(e,s,x),[e,s,x]).filter(c=>c.id===x||!c.endedAt),f=p.slice(0,5);if(f.length===0)return null;const n=c=>F(a,{view:"terminal",agentId:e.id,mode:c},{returnTo:r}),l=()=>{if(m){n("takeover");return}s?.resumeCommand&&re({command:s.resumeCommand,cwd:s.resumeCwd,agentId:e.id}).then(()=>n("takeover"))},u=c=>F(a,{view:"sessions",sessionId:c},{returnTo:r}),o=(c,j,y)=>{const d=[];return j&&d.push({kind:"action",label:"Observe in terminal",onSelect:()=>n("observe")}),y&&d.push({kind:"action",label:"Takeover terminal",onSelect:l}),d.length>0&&d.push({kind:"separator"}),d.push({kind:"action",label:"Open session detail",onSelect:()=>u(c.id)}),d.push({kind:"action",label:"Open agent profile",onSelect:()=>ee(a,e,{returnTo:r})}),d};return t.jsx(g,{label:`Running sessions · ${p.length}`,children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.map(c=>{const j=c.id===x,y=j&&!!m,d=j&&(!!m||!!s?.resumeCommand),C=O(c.startedAt)||"recent",N=Y(c.transport)??c.harness??Y(e.transport)??e.harness??"session",S=j?C:c.endedAt?`${O(c.endedAt)||C} ended`:N,$=o(c,y,d);return t.jsxs("div",{onContextMenu:I=>i(I,$),className:`rounded border px-2 py-1.5 transition-colors ${j?"border-[color-mix(in_srgb,var(--accent)_40%,transparent)] bg-[color-mix(in_srgb,var(--accent)_8%,transparent)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)]"}`,children:[t.jsxs("button",{type:"button",title:y?`Observe terminal ${c.id}`:`Open session ${c.id}`,onClick:()=>y?n("observe"):u(c.id),className:"flex w-full items-center justify-between gap-2 bg-transparent p-0 text-left",children:[t.jsxs("span",{className:"flex min-w-0 flex-col",children:[t.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[j&&t.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[var(--accent)]"}),t.jsx("span",{className:"truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:de(c.id)}),t.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-hover)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:N})]}),t.jsx("span",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:c.cwd?ae(c.cwd):"workspace"})]}),t.jsxs("span",{className:"flex shrink-0 flex-col items-end",children:[t.jsx("span",{className:"font-mono text-2xs uppercase tracking-[0.12em] text-[var(--accent)]",children:j?"active":"running"}),t.jsx("span",{className:"mt-0.5 max-w-[78px] truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:S})]})]}),t.jsx("button",{type:"button",title:"Session actions",onClick:I=>i(I,$),className:"mt-1.5 h-5 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]",children:"..."})]},c.id)}),p.length>f.length&&t.jsxs("div",{className:"px-1 pt-0.5 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[p.length-f.length," more running"]})]})})}function Pe(e,s,a){const r=[...s?.sessions??[]],i=E(e);return i&&a&&!r.some(m=>m.id===a)&&r.unshift({id:a,startedAt:e.createdAt??e.updatedAt??Date.now(),cwd:e.cwd??e.projectRoot??".",...e.harness?{harness:e.harness}:{},transport:i.backend,model:e.model}),r.sort((m,x)=>{const v=m.endedAt??m.startedAt,p=x.endedAt??x.startedAt;return ne(v,p)})}function de(e){const s=e.replace(/^session[_:-]?/i,"");return s.length>10?s.slice(0,8):s}function J({agentId:e}){const[s,a]=h.useState(null),r=h.useCallback(async()=>{const i=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);a(i)},[e]);return h.useEffect(()=>{r()},[r]),L(()=>{r()}),s?.data?t.jsx(Oe,{agentId:e,data:s.data,sessionId:s.sessionId}):t.jsx(g,{label:"Trace",children:t.jsx("div",{className:"text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Resolving session trace."})})}function Oe({agentId:e,data:s,sessionId:a}){const r=s.metadata?.session,i=s.events,m=s.files,x=i.filter(o=>o.kind==="tool").length,v=i.filter(o=>o.kind==="think").length,p=i.filter(o=>o.kind==="ask").length,f=i.filter(o=>o.kind==="tool"&&o.tool==="read").length,n=i.filter(o=>o.kind==="tool"&&(o.tool==="edit"||o.tool==="write")).length,l=i.length>0?i[i.length-1].t:0,u=r?.threadPath;return t.jsxs(t.Fragment,{children:[t.jsxs(g,{label:"Session",children:[a&&t.jsx(w,{label:"Active",value:a}),u&&t.jsx(Q,{label:"Source",path:u,basePath:r?.cwd??null,value:ae(u),agentId:e,sessionId:a}),r?.cwd&&t.jsx(Q,{label:"Workspace",path:r.cwd,value:r.cwd,agentId:e,sessionId:a})]}),t.jsx(g,{label:"Trace stats",children:t.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[t.jsx(A,{label:"Turns",value:M(r?.turnCount)}),t.jsx(A,{label:"Tools",value:M(x)}),t.jsx(A,{label:"Thinks",value:M(v)}),t.jsx(A,{label:"Requests",value:M(p)}),t.jsx(A,{label:"Reads",value:M(f)}),t.jsx(A,{label:"Edits",value:M(n)}),t.jsx(A,{label:"Files",value:M(m.length)}),t.jsx(A,{label:"Window",value:Se(l)})]})}),m.length>0&&t.jsx(g,{label:`Files touched · ${m.length}`,children:t.jsx("div",{className:"flex flex-col gap-1",children:m.slice(0,8).map(o=>t.jsxs("button",{type:"button",title:o.path,onClick:()=>ce({path:o.path,basePath:r?.cwd??null,agentId:e,sessionId:a}),className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1 text-left hover:border-[var(--accent)]",children:[t.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-[var(--scout-chrome-ink-soft)]",children:o.path}),t.jsxs("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:["x",o.touches]})]},o.path))})})]})}function K(e,s){return e?.view==="agents-v2"?{...e,view:"agents-v2",agentId:s,tab:"observe"}:{view:"agents-v2",agentId:s,tab:"observe"}}function Ee({agentId:e,navigate:s,cwd:a,route:r}){const[i,m]=h.useState(null),x=h.useCallback(async()=>{const d=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);m(d)},[e]);h.useEffect(()=>{x()},[x]),L(()=>{x()});const v=i?.data;if(!v||v.files.length===0)return null;const p=v.files,n=[...p].sort((d,C)=>{const N=d.state==="read"?0:1,S=C.state==="read"?0:1;return N!==S?S-N:C.touches-d.touches}).slice(0,6),l=p.length-n.length,u=p.filter(d=>d.state!=="read").length,o=v.metadata?.session?.cwd??a??null,c=i.sessionId??v.metadata?.session?.externalSessionId??void 0,j=()=>s(o?{view:"repo-diff",path:o,agentId:e,include:"changed",...c?{sessionId:c}:{}}:K(r,e)),y=()=>s(o?{view:"repo-diff",path:o}:K(r,e));return t.jsxs(g,{label:"Files changed",children:[t.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between font-mono text-3xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:[t.jsx("span",{children:u>0?`${u} changed`:"touched"}),t.jsx("span",{className:"tabular-nums",children:p.length})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[n.map(d=>{const C=d.path.replace(/\/+$/,"").split("/"),N=C.pop()??d.path,S=C.pop(),$=S?`${S}/`:"",I=d.state!=="read",P=d.state==="created"?"+":d.state==="modified"?"~":"·";return t.jsxs("div",{className:"flex items-baseline justify-between gap-2 font-mono text-xs leading-tight",title:`${d.path} · ${d.state}`,children:[t.jsxs("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[t.jsx("span",{className:"flex-none tabular-nums",style:{color:I?"var(--accent)":"var(--scout-chrome-ink-ghost)"},children:P}),t.jsxs("span",{className:"flex min-w-0 items-baseline",children:[t.jsx("span",{className:"truncate text-[var(--scout-chrome-ink-ghost)]",children:$}),t.jsx("span",{className:"flex-none",style:{color:I?"var(--scout-chrome-ink-soft)":"var(--scout-chrome-ink-faint)"},children:N})]})]}),t.jsxs("span",{className:"shrink-0 tabular-nums text-2xs text-[var(--scout-chrome-ink-faint)]",children:["×",d.touches]})]},d.path)}),t.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1",children:[t.jsxs("button",{type:"button",onClick:j,className:"w-fit cursor-pointer font-mono text-2xs uppercase tracking-[0.1em] text-[var(--accent)] hover:underline",children:["Session diff",l>0?` · +${l}`:""," →"]}),t.jsx("button",{type:"button",onClick:y,className:"w-fit cursor-pointer font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--accent)] hover:underline",children:"Worktree diff →"})]})]})]})}function Q({label:e,path:s,basePath:a,value:r,agentId:i,sessionId:m}){return t.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[t.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("button",{type:"button",title:`Reveal ${s}`,onClick:()=>ce({path:s,basePath:a,agentId:i,sessionId:m}),className:"min-w-0 truncate bg-transparent p-0 text-right font-mono text-sm text-[var(--accent)] hover:text-[var(--scout-chrome-ink)] hover:underline",children:r})]})}function A({label:e,value:s}){return t.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5",children:[t.jsx("div",{className:"font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("div",{className:"mt-0.5 font-mono text-md text-[var(--scout-chrome-ink)]",children:s})]})}function _e({focusAgent:e,agents:s,onOpenAgent:a}){const p=h.useMemo(()=>{const n=s.filter(u=>u.id!==e.id),l=u=>{const o=D(u);return o==="in_turn"?0:o==="in_flight"?1:2};return n.slice().sort((u,o)=>{const c=l(u.state??""),j=l(o.state??"");return c!==j?c-j:ne(u.updatedAt,o.updatedAt)}).slice(0,8)},[s,e.id]),f=h.useMemo(()=>{const n=[{agent:e,x:120,y:90,focused:!0}];return p.forEach((l,u)=>{const o=2*Math.PI*u/Math.max(p.length,1)-Math.PI/2;n.push({agent:l,x:120+68*Math.cos(o),y:90+68*Math.sin(o),focused:!1})}),n},[e,p,120,90,68]);return t.jsxs("div",{className:"@container flex flex-wrap items-start gap-3",children:[t.jsxs("svg",{viewBox:"0 0 240 180",className:"block mx-auto shrink-0 w-full",style:{maxWidth:240},xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("defs",{children:t.jsxs("radialGradient",{id:"inspMeshGlow",cx:"50%",cy:"50%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--accent)",stopOpacity:"0.06"}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:"0"})]})}),t.jsx("circle",{cx:120,cy:90,r:82,fill:"url(#inspMeshGlow)"}),t.jsx("circle",{cx:120,cy:90,r:68,fill:"none",stroke:"var(--border)",strokeDasharray:"2 4"}),f.slice(1).map((n,l)=>t.jsxs("g",{children:[t.jsx("line",{x1:120,y1:90,x2:n.x,y2:n.y,stroke:"var(--accent)",strokeWidth:1,opacity:.6}),t.jsx("circle",{r:2,fill:"var(--accent)",children:t.jsx("animateMotion",{dur:`${2+l*.3}s`,repeatCount:"indefinite",path:`M 120,90 L ${n.x},${n.y}`})})]},`e-${n.agent.id}`)),f.map(n=>{const l=D(n.agent.state),u=l==="in_turn"||l==="in_flight"||l==="callable",o=n.focused?14:9;return t.jsxs("g",{style:{cursor:"pointer"},onClick:()=>a(n.agent),children:[u&&t.jsxs("circle",{cx:n.x,cy:n.y,r:o+5,fill:"none",stroke:X(n.agent.name),strokeWidth:.8,opacity:.3,children:[t.jsx("animate",{attributeName:"r",values:`${o};${o+8};${o}`,dur:"2.5s",repeatCount:"indefinite"}),t.jsx("animate",{attributeName:"opacity",values:"0.3;0;0.3",dur:"2.5s",repeatCount:"indefinite"})]}),t.jsx("circle",{cx:n.x,cy:n.y,r:o,fill:X(n.agent.name),stroke:n.focused?"var(--accent)":"var(--surface)",strokeWidth:n.focused?1.5:1}),t.jsx("text",{x:n.x,y:n.y,dy:"0.35em",textAnchor:"middle",fontFamily:"var(--font-mono)",fontSize:n.focused?10:8,fontWeight:600,fill:"var(--scout-chrome-avatar-ink)",children:n.agent.name[0].toUpperCase()}),t.jsx("text",{x:n.x,y:n.y+o+10,textAnchor:"middle",fontFamily:"var(--font-mono)",fontSize:8,fill:"var(--dim)",letterSpacing:"0.04em",children:n.agent.name.length>9?n.agent.name.slice(0,8)+"...":n.agent.name})]},n.agent.id)})]}),p.length>0&&t.jsx("ul",{className:"@max-[380px]:hidden flex-1 min-w-[120px] flex flex-col gap-1 m-0 p-0 list-none",children:p.map(n=>{const l=D(n.state);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>a(n),className:"w-full flex items-center gap-2 py-1 px-1.5 rounded hover:bg-[var(--surface-hover)] text-left",children:[t.jsx("span",{"aria-hidden":!0,className:"shrink-0 w-2 h-2 rounded-full",style:{background:X(n.name)}}),t.jsx("span",{className:"flex-1 truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:n.name}),t.jsx("span",{"aria-hidden":!0,title:se(n.state),className:"shrink-0 w-1.5 h-1.5 rounded-full",style:{background:te(l)}})]})},n.id)})})]})}function V({asks:e,agentId:s,navigate:a}){const r=e.filter(i=>i.agentId===s&&(i.status==="needs_attention"||i.status==="queued"));return r.length===0?null:t.jsx(g,{label:`Incoming requests · ${r.length}`,children:t.jsx("div",{className:"flex flex-col gap-2",children:r.map(i=>t.jsxs("div",{className:"p-2.5 rounded-md border border-amber-500/30 bg-amber-500/[0.04] cursor-pointer hover:bg-amber-500/[0.08] transition-colors",onClick:()=>{i.conversationId&&a({view:"agents-v2",agentId:s,conversationId:i.conversationId})},children:[t.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.12em] text-amber-500/80 mb-1",children:"awaiting"}),t.jsx("div",{className:"line-clamp-2 text-sm leading-relaxed text-[var(--scout-chrome-ink)]",children:i.summary??i.task}),t.jsxs("div",{className:"mt-1.5 text-2xs font-mono text-[var(--scout-chrome-ink-ghost)]",children:[i.harness??"operator"," → ",i.agentName??"agent"]})]},i.invocationId))})})}function g({label:e,children:s}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:e}),s]})}function w({label:e,value:s}){return t.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[t.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",title:s,children:s})]})}export{_t as AgentsInspector};
|