@openscout/scout 0.2.92 → 0.2.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -28
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/ActivityScreen--eANwuxa.js +1 -0
- package/dist/client/assets/{AddProjectForm-CpyytDf2.js → AddProjectForm-CcD6qvV8.js} +1 -1
- package/dist/client/assets/AgentAvatar-CYhf6twS.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-BTI24HQX.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-srmN6-vj.js +1 -0
- package/dist/client/assets/{AgentDetailCard-BTiOmh-a.js → AgentDetailCard-UqPNpcvB.js} +1 -1
- package/dist/client/assets/AgentFloorView-XXNgI5Cj.js +1 -0
- package/dist/client/assets/AgentInfoScreen-CimdOnZ9.js +1 -0
- package/dist/client/assets/{AgentLaneCard-lfRNb7JD.js → AgentLaneCard-Z-aOBR3W.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-Dlwrbq3g.js → AgentLaneChrome-CyhA1reW.js} +1 -1
- package/dist/client/assets/AgentLaneDetailSheet-BNzjMjIH.js +4 -0
- package/dist/client/assets/{AgentLaneSummaryResize-6SOEWUnr.js → AgentLaneSummaryResize-Box8-_rS.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-C3uOiOzd.js → AgentLanesPreflight-5B6sXvRB.js} +1 -1
- package/dist/client/assets/AgentLanesView-DHyzVBk6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-BJ5dIfL3.js → AgentLiveActions-BwuzOE8h.js} +1 -1
- package/dist/client/assets/AgentSessions-CsZwoukw.js +6 -0
- package/dist/client/assets/AgentsConsole-KCao4XmX.js +1 -0
- package/dist/client/assets/AgentsScreen-CtPAmwRX.js +1 -0
- package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +1 -0
- package/dist/client/assets/AstronautSuit-Ckx7lu7G.js +1 -0
- package/dist/client/assets/AtopView-DYlpgEHf.js +1 -0
- package/dist/client/assets/{BackToPicker-D1LV6Cqp.js → BackToPicker-4JaeRvDm.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-D6-xqrpo.js +1 -0
- package/dist/client/assets/BriefingsScreen-DKxSDEmk.js +1 -0
- package/dist/client/assets/{BrokerMetadataPanel-BhjECqOK.js → BrokerMetadataPanel-BbREmsbK.js} +1 -1
- package/dist/client/assets/BrokerScreen-fbPIouMw.js +5 -0
- package/dist/client/assets/CastPicker-BcA2vDDV.js +1 -0
- package/dist/client/assets/CastPicker-zXsnkTIy.css +1 -0
- package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +1 -0
- package/dist/client/assets/{CodeDiffPane-Bx_2VAzv.js → CodeDiffPane-Cn8Y9hAt.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-C1yOJKvs.js → CodeProjectPicker-nPFktrco.js} +1 -1
- package/dist/client/assets/CodeScreen-BlAxtxE5.js +1 -0
- package/dist/client/assets/ConversationComposer-2HjbGPL9.js +1 -0
- package/dist/client/assets/ConversationFeedRows-C6wUqJrx.js +1 -0
- package/dist/client/assets/ConversationHeader-C8vfXaTF.js +1 -0
- package/dist/client/assets/ConversationPanels-CNCIbpqU.js +6 -0
- package/dist/client/assets/ConversationScreen-BNULZAp2.js +2 -0
- package/dist/client/assets/ConversationScreen-CkWnKXt6.css +1 -0
- package/dist/client/assets/ConversationStatus-DZuyKsWN.js +1 -0
- package/dist/client/assets/CrewAvatar-CTIuxp4G.js +1 -0
- package/dist/client/assets/CrewAvatar-D0c9z5Qr.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +1 -0
- package/dist/client/assets/{DataTable-CJbbgBdA.js → DataTable-6IDhanr5.js} +1 -1
- package/dist/client/assets/DispatchAftermath-DC1u9itO.js +1 -0
- package/dist/client/assets/DocumentFocusViewer-DZVhS7as.js +1 -0
- package/dist/client/assets/{EmbeddableSurfacesLab-BdsYRDky.js → EmbeddableSurfacesLab-BKUFJMCV.js} +1 -1
- package/dist/client/assets/{EmptyState-BRY5jTpz.js → EmptyState-CeBl0iGd.js} +1 -1
- package/dist/client/assets/{FileViewerPane-9Bveqm9c.js → FileViewerPane-DQlpNt2S.js} +2 -2
- package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +1 -0
- package/dist/client/assets/FollowScreen-BXHOp3gb.js +1 -0
- package/dist/client/assets/{HarnessMark-BPAphNjx.js → HarnessMark-D5CA5uSp.js} +1 -1
- package/dist/client/assets/HarnessesScreen-DhFXq1qz.js +1 -0
- package/dist/client/assets/{HerdrSession-BujfGzrP.js → HerdrSession-BRhs5LIR.js} +1 -1
- package/dist/client/assets/HomeHero-7JwycwFY.css +1 -0
- package/dist/client/assets/HomeHero-DMABJuze.js +1 -0
- package/dist/client/assets/HostAdvisorView-RAociATV.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-B4ZY24xE.js → KnowledgeSearchInspector-CZPyVNSw.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-mGTKIg00.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-B7KdvQvf.js → LaneToolHoverCard-D_DMlBeT.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-BEHg3LmH.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-mkMw2wJU.js → LaneTraceEventFocus-DVimcizS.js} +1 -1
- package/dist/client/assets/{MeshCanvas-CpKcWxKy.js → MeshCanvas-BOuZx4AM.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-C9IoGHbe.js → MeshCanvasMinimap-wL-1N94e.js} +1 -1
- package/dist/client/assets/MeshScreen-DMY9Bmh5.js +1 -0
- package/dist/client/assets/{MeshTopologyView-DFzr0IZM.js → MeshTopologyView-DiDcX5f4.js} +2 -2
- package/dist/client/assets/MessagesScreen-Eulveud3.js +1 -0
- package/dist/client/assets/{MissionContextRail-Y8QxUZGE.js → MissionContextRail-DrNKXG5u.js} +1 -1
- package/dist/client/assets/MissionControlView-ByBlHVN8.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-D1i6R6Zt.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-DN9NcCML.js +1 -0
- package/dist/client/assets/MissionLogPane-DSeIv3Xo.js +1 -0
- package/dist/client/assets/NewAgentModal-V7yK6J6j.js +1 -0
- package/dist/client/assets/NewChatComposer-hlWT-nbR.js +19 -0
- package/dist/client/assets/{NewChatOrigin-DmuJ32wa.js → NewChatOrigin-DdpzE4kz.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-l_Q3ts2q.js +2 -0
- package/dist/client/assets/ObserveTextFlow-BSEtYTxU.js +2 -0
- package/dist/client/assets/ObservedTopologyPanel-CdGUXxGR.js +2 -0
- package/dist/client/assets/OpenScoutAppShell-DN8dOSK4.js +79 -0
- package/dist/client/assets/OpsAgentsView-ntGr4pz4.js +1 -0
- package/dist/client/assets/OpsScreen-Ppen_Lmj.js +1 -0
- package/dist/client/assets/OpsSubnav-GAKsoSor.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-BLVg5EeA.js → ProjectAgentProfileBar-BQET-qrY.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Ck8mThtx.js +1 -0
- package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +2 -0
- package/dist/client/assets/ProjectsRail-DCfNMmnW.js +1 -0
- package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +1 -0
- package/dist/client/assets/Provider-B2xuo3rf.js +1 -0
- package/dist/client/assets/RailRow-B-GycCBx.js +1 -0
- package/dist/client/assets/RailRow-B0sRaJc6.css +1 -0
- package/dist/client/assets/RawSessionsTable-AQThi6sm.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-BCDXFE3D.js → RepoDiffEmbedScreen-DXWoRF_c.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-m62FiWXC.js → RepoDiffPageScreen-D_274ExO.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-DbedmHDX.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-C0--fPtk.js +2 -0
- package/dist/client/assets/ReposScreen-D39_YG4H.js +6 -0
- package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +1 -0
- package/dist/client/assets/{ScoutSurface-CkgT7A-c.js → ScoutSurface-UsRy0t-I.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-D-kV5j4T.js → ScoutbotFxLab-Fmdfboxs.js} +1 -1
- package/dist/client/assets/{SecondaryNav-_wyKjwNf.js → SecondaryNav-o2RL9H8H.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CJZmIBV7.js → SessionEmbedScreen-RD5XOx7R.js} +1 -1
- package/dist/client/assets/{SessionObserve-yYA8Gy5s.js → SessionObserve-Dsd0j05N.js} +9 -9
- package/dist/client/assets/{SessionObserveEvidence-cHdjYOJe.js → SessionObserveEvidence-DopQYDkD.js} +1 -1
- package/dist/client/assets/SessionRefScreen-B_cTv47v.js +1 -0
- package/dist/client/assets/SessionsScreen-Bq0Z77On.js +1 -0
- package/dist/client/assets/SettingsDrawer-R8a0TlJD.css +1 -0
- package/dist/client/assets/SettingsDrawer-_AwuopMS.js +3 -0
- package/dist/client/assets/SettingsScreen-Cw4DDfJP.js +1 -0
- package/dist/client/assets/{ShikiPane-dBS9hD-z.js → ShikiPane-BfHc_3pM.js} +1 -1
- package/dist/client/assets/{SlidePanel-CH-3-8_2.js → SlidePanel-C-q7XwTa.js} +1 -1
- package/dist/client/assets/SpriteAvatar-Bs68ZENy.js +1 -0
- package/dist/client/assets/{StatusPill-C8m9ZymF.js → StatusPill-ZZQwxB1a.js} +1 -1
- package/dist/client/assets/{TailView-B0BSopPs.js → TailView-Q4FVMsUH.js} +2 -2
- package/dist/client/assets/Terminal-D7zqHwHV.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-CXIJ7qv6.js +1 -0
- package/dist/client/assets/TerminalHeaderMount-BnBLOPbb.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-BWJCGBZf.js → TextDocumentSurface-CKQP-cBT.js} +1 -1
- package/dist/client/assets/{TmuxPeek-B4QdHbGm.js → TmuxPeek-V9dGESfO.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Dd4ITJy_.js → VoicePermissionsPanel-k7sbLXx2.js} +1 -1
- package/dist/client/assets/WorkDetailScreen-60p9litn.js +5 -0
- package/dist/client/assets/WorkFilesViewer-BjJS7GyM.js +1 -0
- package/dist/client/assets/{activity-CC8JzJNH.js → activity-Bj3Hnbj3.js} +1 -1
- package/dist/client/assets/{addon-fit-CaZ-uLrg.js → addon-fit-BL-NTWRU.js} +1 -1
- package/dist/client/assets/{addon-webgl-B8utL3bM.js → addon-webgl-CIMgmNjg.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-CxtYZWPZ.css → agent-autocomplete-C7xwIcwd.css} +1 -1
- package/dist/client/assets/agent-autocomplete-DXlvdc4b.js +10 -0
- package/dist/client/assets/{agent-essentials-B3wcxg_v.js → agent-essentials-BOMHR0_U.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-q4cwzLX4.js → agent-lane-card-model-CTLxf3R4.js} +1 -1
- package/dist/client/assets/agent-lane-detail-ppJId6Jc.js +2 -0
- package/dist/client/assets/{agent-lane-preview-C33Dwpn7.js → agent-lane-preview-BhplDYGf.js} +1 -1
- package/dist/client/assets/{agent-lanes-BDNktFBZ.css → agent-lanes-DlqcEf0l.css} +1 -1
- package/dist/client/assets/{agent-lanes-model-VYQ5a68i.js → agent-lanes-model-AfrjRNK5.js} +2 -2
- package/dist/client/assets/agent-specialization-BIPIBW8u.js +1 -0
- package/dist/client/assets/api-Co9aQ2Jw.js +1 -0
- package/dist/client/assets/{api-BkjHJfgJ.js → api-HFH8wFyb.js} +1 -1
- package/dist/client/assets/{arc.es-uFv9UrHn.js → arc.es-IR5r6sj_.js} +1 -1
- package/dist/client/assets/archive-BjcGiAy8.js +1 -0
- package/dist/client/assets/{arrow-down-w1HPzDSE.js → arrow-down-BydciYFZ.js} +1 -1
- package/dist/client/assets/{arrow-left-B-3GJ7ct.js → arrow-left-CghA0kTw.js} +1 -1
- package/dist/client/assets/arrow-right-iJFv3jNh.js +1 -0
- package/dist/client/assets/{arrow-up-right-G6bJXxhK.js → arrow-up-right-CCfZXPqD.js} +1 -1
- package/dist/client/assets/{bot-DzCOGKi6.js → bot-B5sub1-i.js} +1 -1
- package/dist/client/assets/broker-display-Q75fupqG.js +2 -0
- package/dist/client/assets/{cache-Dr0why2k.js → cache-CeWH_KzJ.js} +1 -1
- package/dist/client/assets/{check-BX8nRgop.js → check-C18YQC90.js} +1 -1
- package/dist/client/assets/{chevron-down-B3VVRJcV.js → chevron-down-Mp9mu_yd.js} +1 -1
- package/dist/client/assets/{chevron-right-BYMV1511.js → chevron-right-CzH-TaSF.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-dRd2eQMJ.js → chunk-HRAB3GC3-swV8PA2k.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-BjX67kHU.js → chunk-JTPDIGGW-BKXqcLKw.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-kP6nJjkU.js → chunk-T65CQEWV-vYbNJ8E6.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-C13bZPVd.js → chunk-YOZR3KYS-U65yUmqt.js} +1 -1
- package/dist/client/assets/{clock-B9ukVaVn.js → clock-B4PTFi5m.js} +1 -1
- package/dist/client/assets/{code-xml-BFc3TMSm.js → code-xml-Jtxsp5d1.js} +1 -1
- package/dist/client/assets/collapsed-strip-raJWthAH.css +1 -0
- package/dist/client/assets/compass-0_54-vz3.js +1 -0
- package/dist/client/assets/content-6RvWTrtk.js +1 -0
- package/dist/client/assets/content-BCgwMUqz.js +1 -0
- package/dist/client/assets/content-Bf2VLhx0.js +1 -0
- package/dist/client/assets/content-BrU_38-m.js +1 -0
- package/dist/client/assets/content-BvvJN8rN.js +1 -0
- package/dist/client/assets/content-CAeEqYPw.js +1 -0
- package/dist/client/assets/content-CHghn-rT.js +1 -0
- package/dist/client/assets/{content-Uqt8AG-s.css → content-CINHz-rZ.css} +1 -1
- package/dist/client/assets/content-CI_Z9DXk.js +1 -0
- package/dist/client/assets/content-CbyKONhW.js +1 -0
- package/dist/client/assets/content-Czogvp43.js +1 -0
- package/dist/client/assets/content-DFk0zNzX.js +1 -0
- package/dist/client/assets/content-DHe4DgkA.js +1 -0
- package/dist/client/assets/content-DMbawvqU.js +1 -0
- package/dist/client/assets/content-DTz7cKjo.js +1 -0
- package/dist/client/assets/content-E3kudY-W.js +1 -0
- package/dist/client/assets/content-LpO0aO_U.js +1 -0
- package/dist/client/assets/{conversation-icons-gpsv650H.js → conversation-icons-BV10B2Me.js} +1 -1
- package/dist/client/assets/conversation-model-CwF6Y9gx.js +1 -0
- package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +1 -0
- package/dist/client/assets/{copy-BFmOcWof.js → copy-Dtpx4FOE.js} +1 -1
- package/dist/client/assets/cpu-BjVis9mc.js +1 -0
- package/dist/client/assets/{createLucideIcon-CFBn0Sdk.js → createLucideIcon-DXpqZP7I.js} +1 -1
- package/dist/client/assets/credentials-BTce3VP1.js +1 -0
- package/dist/client/assets/ctx-panel-D_HJ3nhb.css +1 -0
- package/dist/client/assets/discover-CHbrEItO.js +2 -0
- package/dist/client/assets/embed-entry-vil28MyU.js +2 -0
- package/dist/client/assets/{external-link-B1TI5yIt.js → external-link-Ckiyzjwo.js} +1 -1
- package/dist/client/assets/{eye-1J4yOUoG.js → eye-CpfyvdLq.js} +1 -1
- package/dist/client/assets/file-code-corner-7mo7EviR.js +1 -0
- package/dist/client/assets/{file-text-DcYSrI4v.js → file-text-KijGBnME.js} +1 -1
- package/dist/client/assets/gauge-y-Xg8Mrv.js +1 -0
- package/dist/client/assets/gestures-Bq9XnSqY.js +1 -0
- package/dist/client/assets/git-branch-BQ_x8KZL.js +1 -0
- package/dist/client/assets/harnesses-screen-2z36fJKE.css +1 -0
- package/dist/client/assets/home-moving-signal-DMguaRWR.css +1 -0
- package/dist/client/assets/home-moving-signal-DtRpiNa0.js +1 -0
- package/dist/client/assets/home-now-card-DFb4GOgM.js +1 -0
- package/dist/client/assets/{home-now-card-nano-y1EhBvVL.js → home-now-card-nano-D--m9jpq.js} +1 -1
- package/dist/client/assets/hooks-9d1SoaQA.js +2 -0
- package/dist/client/assets/host-advisor-B2Fqs5Dd.css +1 -0
- package/dist/client/assets/index-BVlMw8x_.js +1 -0
- package/dist/client/assets/index-CZ-05hKz.js +10 -0
- package/dist/client/assets/index-Cn0GR-q1.js +1 -0
- package/dist/client/assets/index-DosI4AG9.js +1 -0
- package/dist/client/assets/index-i7TMxlwW.css +1 -0
- package/dist/client/assets/index-wLwc74Pu.css +1 -0
- package/dist/client/assets/inspector-panel-C-EhEDYy.js +2 -0
- package/dist/client/assets/{keyboard-nav-h1IdakpD.js → keyboard-nav-DFhAJkW3.js} +1 -1
- package/dist/client/assets/{lane-observe-BA3g9aVd.js → lane-observe-vfyACHi0.js} +1 -1
- package/dist/client/assets/{lane-roster-store-71vFgAem.js → lane-roster-store-gUBsydNf.js} +1 -1
- package/dist/client/assets/layers-CGou-LwV.js +1 -0
- package/dist/client/assets/layout-grid-BrZt31QH.js +1 -0
- package/dist/client/assets/left-B_o51JV6.js +1 -0
- package/dist/client/assets/left-BpgWnaah.js +1 -0
- package/dist/client/assets/left-CwHZCGO3.js +2 -0
- package/dist/client/assets/left-CwLs0okF.js +1 -0
- package/dist/client/assets/left-Cx0kv6pe.js +1 -0
- package/dist/client/assets/left-DA0amyfu.js +1 -0
- package/dist/client/assets/left-DH44V4I_.css +1 -0
- package/dist/client/assets/left-R2OOE7VG.css +1 -0
- package/dist/client/assets/left-advisor-DU3s01gk.js +1 -0
- package/dist/client/assets/left-agents-qL5PpUY-.js +1 -0
- package/dist/client/assets/left-default-uvuvDmt0.js +1 -0
- package/dist/client/assets/left-lanes-DnNLgec8.js +1 -0
- package/dist/client/assets/left-mission-DN3-NLPC.js +1 -0
- package/dist/client/assets/left-z-6CkuBe.js +2 -0
- package/dist/client/assets/library-DIo5NiGP.js +1 -0
- package/dist/client/assets/{loader-circle-d6PKL_KD.js → loader-circle-BiohlpM3.js} +1 -1
- package/dist/client/assets/{local-agents-B5pq17tZ.js → local-agents-wUIaBcEr.js} +1 -1
- package/dist/client/assets/{mentions-agCGDgyA.js → mentions-CcPFMbmZ.js} +1 -1
- package/dist/client/assets/mesh-buckets-ByyFXdKT.js +1 -0
- package/dist/client/assets/{mesh-ops-5pZCYptW.js → mesh-ops-CvGyjK84.js} +1 -1
- package/dist/client/assets/mesh-roster-n2nDpEmA.js +1 -0
- package/dist/client/assets/{mesh-screen-BSDUjrnV.css → mesh-screen-D1Yvo8fU.css} +1 -1
- package/dist/client/assets/{mesh-view-store-KJzABIkN.js → mesh-view-store-BpxGm71b.js} +1 -1
- package/dist/client/assets/{message-circle-CJO-pi7b.js → message-circle-B2ddzBrX.js} +1 -1
- package/dist/client/assets/{message-markup-CyRDLdOn.js → message-markup-RkfmDfME.js} +1 -1
- package/dist/client/assets/{message-square-D1hMsMj_.js → message-square-D9YYWE0x.js} +1 -1
- package/dist/client/assets/message-visibility-DwxgcgYK.js +1 -0
- package/dist/client/assets/mission-control-CnU7dNt1.css +1 -0
- package/dist/client/assets/{mission-control-store-Ce6dOvnZ.js → mission-control-store-Bf4b54MV.js} +1 -1
- package/dist/client/assets/{observe-BSWVM8YA.js → observe-CJRIvOCn.js} +1 -1
- package/dist/client/assets/{operator-attention-BwSPeheT.js → operator-attention-RqieiSY8.js} +1 -1
- package/dist/client/assets/{page-status-D2FQLJOX.js → page-status-BptpTdQ-.js} +1 -1
- package/dist/client/assets/{paperclip-iZmDMOS5.js → paperclip-B1UNGl5d.js} +1 -1
- package/dist/client/assets/perf-PX8Rx0EP.js +1 -0
- package/dist/client/assets/persistent-state-YI-WHSCF.js +1 -0
- package/dist/client/assets/{plus-gZ0T0eBI.js → plus-CuU_X0-8.js} +1 -1
- package/dist/client/assets/profile-rY8jO38P.js +1 -0
- package/dist/client/assets/projects-inbox-BBs1hG13.css +1 -0
- package/dist/client/assets/projects-inbox-D-zAb9Gp.js +1 -0
- package/dist/client/assets/proxy-DnLpZIi9.js +1 -0
- package/dist/client/assets/{radio-RMLfV4EO.js → radio-Dm1ItnA4.js} +1 -1
- package/dist/client/assets/{refresh-cw-C4x1x6b_.js → refresh-cw-BRn9Oxxl.js} +1 -1
- package/dist/client/assets/resolve-panes-DO6LkwhQ.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +1 -0
- package/dist/client/assets/right-BJltPRnd.js +1 -0
- package/dist/client/assets/right-BbyYdzHn.js +1 -0
- package/dist/client/assets/right-Beh3nCUB.js +1 -0
- package/dist/client/assets/right-C1yumXNx.js +1 -0
- package/dist/client/assets/{right-D-k9Z1Fe.js → right-CJnB_Bg7.js} +2 -2
- package/dist/client/assets/right-CPP7GyOm.js +1 -0
- package/dist/client/assets/right-D3aTKf1F.js +1 -0
- package/dist/client/assets/right-DI1B79nR.js +1 -0
- package/dist/client/assets/right-DtsRNX5b.js +1 -0
- package/dist/client/assets/right-Shpw_xDy.js +1 -0
- package/dist/client/assets/{rocket-CMM-IdLy.js → rocket-DOwXHKWA.js} +1 -1
- package/dist/client/assets/router-DJj2WbDg.js +1 -0
- package/dist/client/assets/{scope-views-BIfMTXU4.js → scope-views-A4_vP97W.js} +1 -1
- package/dist/client/assets/scout-voice-BhPzrc6P.js +1 -0
- package/dist/client/assets/{scoutbot-BTIErYHo.js → scoutbot-BJIamJOH.js} +2 -2
- package/dist/client/assets/scoutbot-markdown-jh7tzFB1.js +6 -0
- package/dist/client/assets/{scroll-text-DPPYrqB9.js → scroll-text-DO0GQzvN.js} +1 -1
- package/dist/client/assets/{search-DAyagUtF.js → search-D1tJSAWe.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-B9IF8wXl.js +1 -0
- package/dist/client/assets/{selection-bridge-BXw09aRF.js → selection-bridge-i2S9zpf8.js} +1 -1
- package/dist/client/assets/{send-horizontal-IcG46D2M.js → send-horizontal-CgLppsIC.js} +1 -1
- package/dist/client/assets/{server-BySujhDV.js → server-Dymv5Emh.js} +1 -1
- package/dist/client/assets/{session-catalog-ClS9xf6i.js → session-catalog-DNaOEzoQ.js} +1 -1
- package/dist/client/assets/{session-table-BdpHs1GN.js → session-table-PTQVoTyc.js} +1 -1
- package/dist/client/assets/settings-2fC_G9nX.js +1 -0
- package/dist/client/assets/{sliders-horizontal-R5pWUUcH.js → sliders-horizontal-BPSMHhbm.js} +1 -1
- package/dist/client/assets/{sparkles-DJOBD_8l.js → sparkles-Dy8p5xN8.js} +1 -1
- package/dist/client/assets/sse-CiOSzE5n.js +1 -0
- package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +1 -0
- package/dist/client/assets/{tail-display-BRcJltQa.js → tail-display-DcliDVkW.js} +1 -1
- package/dist/client/assets/{tail-events-BdvqZHLr.js → tail-events-BMQmSx1n.js} +1 -1
- package/dist/client/assets/{terminal-relay-TffuSPGs.js → terminal-relay-9lhzEp2V.js} +1 -1
- package/dist/client/assets/terminal-screen-BLk4PAYt.css +1 -0
- package/dist/client/assets/terminal-sessions-BQ6t92tJ.js +1 -0
- package/dist/client/assets/{terminal-takeover-BOFPRPjR.js → terminal-takeover-DANQfTcy.js} +1 -1
- package/dist/client/assets/{terminal-DJPUp_Qn.js → terminal-yN9xN-h9.js} +1 -1
- package/dist/client/assets/{runtime-picker--IW3cRry.js → text-CnZ0e1-V.js} +1 -1
- package/dist/client/assets/text-rLpBg4_z.css +1 -0
- package/dist/client/assets/use-conversation-list-D9BNLfnW.js +1 -0
- package/dist/client/assets/{use-fleet-active-asks-BHzeBZSW.js → use-fleet-active-asks-BeAdcl09.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-KmaauBr_.js → use-mesh-ops-items-BIvIHlqe.js} +1 -1
- package/dist/client/assets/use-reduced-motion-CKkhq9c5.js +1 -0
- package/dist/client/assets/{use-scout-dev-flags-BJbw87PK.js → use-scout-dev-flags-B2KCzPxn.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-C6o0tlat.js → useAgentHoverCard-CHBsxcbp.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +1 -0
- package/dist/client/assets/{usePierreRuntime-Cm7-qdm0.js → usePierreRuntime-DUuXH5yp.js} +1 -1
- package/dist/client/assets/{wrench-CvRjjByE.js → wrench-YcXMlsh2.js} +1 -1
- package/dist/client/assets/{x-C8ayPBtj.js → x-e3h2hDsp.js} +1 -1
- package/dist/client/assets/{xterm-B0ci4Q9a.js → xterm-Byp1Hep_.js} +1 -1
- package/dist/client/assets/zap-nMcjPoWB.js +1 -0
- package/dist/client/favicon-16.png +0 -0
- package/dist/client/favicon-32.png +0 -0
- package/dist/client/favicon.ico +0 -0
- package/dist/client/favicon.svg +20 -47
- package/dist/client/index.html +5 -5
- package/dist/client/openscout-icon.png +0 -0
- package/dist/client/site.webmanifest +2 -2
- package/dist/client/web-app-icon-192.png +0 -0
- package/dist/client/web-app-icon-512.png +0 -0
- package/dist/main.mjs +20093 -78203
- package/dist/node/main.mjs +322 -252
- package/dist/pairing-runtime-controller.mjs +1032 -804
- package/dist/runtime/base-daemon.mjs +49 -121
- package/dist/runtime/broker-daemon.mjs +1105 -281
- package/dist/runtime/broker-process-manager.mjs +6 -0
- package/dist/runtime/mesh-discover.mjs +6 -0
- package/dist/scout-control-plane-web.mjs +3326 -1912
- package/package.json +7 -4
- package/dist/client/assets/ActivityScreen-DkUP7V7M.js +0 -1
- package/dist/client/assets/AgentAvatar-D8ZtMluU.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BlGI6fuM.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CfaDVCVt.js +0 -1
- package/dist/client/assets/AgentFloorView-DjNLILLt.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DG5dlHb_.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-BzYzBfcW.js +0 -4
- package/dist/client/assets/AgentLanesEmbedScreen-Crxx1srt.js +0 -1
- package/dist/client/assets/AgentLanesView-ChNlmY-F.js +0 -2
- package/dist/client/assets/AgentSessions-DpY0htZV.js +0 -6
- package/dist/client/assets/AgentsConsole-CHyXrjhm.js +0 -1
- package/dist/client/assets/AgentsScreen-BhCjX2lD.js +0 -1
- package/dist/client/assets/AgentsSubnav-az_VDkri.js +0 -1
- package/dist/client/assets/AtopView-BjjPM8OX.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-B7qJ90Np.js +0 -6
- package/dist/client/assets/BriefingsScreen-CW6N829d.js +0 -1
- package/dist/client/assets/BrokerScreen-X3z50712.js +0 -5
- package/dist/client/assets/ChatCollapsedStrip-DNR9osDy.js +0 -1
- package/dist/client/assets/CodeScreen-CIKK1LcZ.js +0 -1
- package/dist/client/assets/ContextMenu-CHIuVKz7.js +0 -1
- package/dist/client/assets/ConversationComposer-Bf7Ga_49.js +0 -1
- package/dist/client/assets/ConversationFeedRows-Cm1Lgo43.js +0 -1
- package/dist/client/assets/ConversationHeader-B_GXrKR0.js +0 -1
- package/dist/client/assets/ConversationPanels-BTBbEvrP.js +0 -2
- package/dist/client/assets/ConversationScreen-B3l2m3JI.js +0 -1
- package/dist/client/assets/ConversationScreen-yIKEsm-8.css +0 -1
- package/dist/client/assets/ConversationStatus-BqhUHD85.js +0 -1
- package/dist/client/assets/DispatchAftermath-BDA9CrOd.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-B9vodVmG.js +0 -1
- package/dist/client/assets/FleetSearch-Bj9SCl2f.js +0 -1
- package/dist/client/assets/FleetSearch-EXOe8ulE.css +0 -1
- package/dist/client/assets/FlightObserveScreen-BVMdsiCC.js +0 -1
- package/dist/client/assets/FollowScreen-BifwHWOV.js +0 -1
- package/dist/client/assets/HarnessesScreen-fMnbnrD4.js +0 -1
- package/dist/client/assets/HomeHero-BgM6S39l.js +0 -1
- package/dist/client/assets/HomeHero-DEl-WBsT.css +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-Ch_WENUC.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-H3AnN-vN.js +0 -1
- package/dist/client/assets/MeshScreen-48QkJSDI.js +0 -1
- package/dist/client/assets/MessageComposerSuggestions-FdVHnT_q.js +0 -1
- package/dist/client/assets/MessagesScreen-BMOOfbWX.js +0 -1
- package/dist/client/assets/MissionControlView-BpsHKu1F.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-BPnAEA3F.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-iOZ6ds9L.js +0 -1
- package/dist/client/assets/MissionLogPane-B0csI89E.js +0 -1
- package/dist/client/assets/NewAgentModal-DBHJR9Qm.js +0 -1
- package/dist/client/assets/NewChatComposer-Hd7pI5Ac.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-DyArn7Id.js +0 -2
- package/dist/client/assets/ObserveTextFlow-CkMrtT8s.js +0 -2
- package/dist/client/assets/ObservedTopologyPanel-CaSZZP05.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-BtlKkiuF.js +0 -87
- package/dist/client/assets/OpsAgentsView-CnqrwbC2.js +0 -1
- package/dist/client/assets/OpsScreen-DOlmlVkP.js +0 -1
- package/dist/client/assets/OpsSubnav-Dj3ShAKv.js +0 -1
- package/dist/client/assets/PlanView-BLGdWDx6.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Dv1sVnQl.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-0-GDhsPT.js +0 -1
- package/dist/client/assets/ProjectsInbox-B3DpAI5b.js +0 -2
- package/dist/client/assets/ProjectsRail-BDl7U9Jq.js +0 -1
- package/dist/client/assets/ProjectsScreen-Dl2FcGrR.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BcGC5mHE.js +0 -1
- package/dist/client/assets/Provider-cJCdHAxu.js +0 -1
- package/dist/client/assets/RailRow-CLcVmywd.js +0 -1
- package/dist/client/assets/RailRow-Cf9LOiEj.css +0 -1
- package/dist/client/assets/RawSessionsTable-DBto4Ts-.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-DXEU5v3g.js +0 -1
- package/dist/client/assets/RepoDiffViewer-PaNeZMhJ.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-CWE5GxMP.js +0 -2
- package/dist/client/assets/ReposScreen-Cksv1cAD.js +0 -6
- package/dist/client/assets/ScoutDeckSurface-BCjPl7C4.js +0 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DkiRCHuK.js +0 -2
- package/dist/client/assets/ScoutbotRealtimeVoiceCall-1ixiEn1L.js +0 -1
- package/dist/client/assets/SessionRefScreen-OkTY7Szg.js +0 -1
- package/dist/client/assets/SessionsScreen-B-GFjxIA.js +0 -1
- package/dist/client/assets/SettingsDrawer-Co11RFX0.js +0 -3
- package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +0 -1
- package/dist/client/assets/SettingsScreen-Cn09nq5_.js +0 -1
- package/dist/client/assets/SpriteAvatar-DS6Tmyua.js +0 -1
- package/dist/client/assets/Terminal-U8gjIdm3.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-CTmdE7us.js +0 -1
- package/dist/client/assets/WorkDetailScreen-mJs0mb99.js +0 -5
- package/dist/client/assets/WorkFilesViewer-ODzLXKxj.js +0 -1
- package/dist/client/assets/agent-identity-BxCsXnDp.js +0 -1
- package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +0 -2
- package/dist/client/assets/api-h5zurxmi.js +0 -1
- package/dist/client/assets/broker-display-pp33bLsu.js +0 -2
- package/dist/client/assets/collapsed-strip-Dz-of2SM.css +0 -1
- package/dist/client/assets/content-B8gahuBy.js +0 -1
- package/dist/client/assets/content-BIqX06OQ.js +0 -1
- package/dist/client/assets/content-BKDZ6Fxe.js +0 -1
- package/dist/client/assets/content-C15Ya-iu.js +0 -1
- package/dist/client/assets/content-CDE9tJDF.js +0 -1
- package/dist/client/assets/content-CSAfI-PX.js +0 -1
- package/dist/client/assets/content-CTF9D60D.js +0 -1
- package/dist/client/assets/content-CbAGkYQO.js +0 -1
- package/dist/client/assets/content-CtqLJOVp.js +0 -1
- package/dist/client/assets/content-Dvs1KRfo.js +0 -1
- package/dist/client/assets/content-DyJdVZjI.js +0 -1
- package/dist/client/assets/content-Ji7ATaf7.js +0 -1
- package/dist/client/assets/content-eqZXKWcP.js +0 -1
- package/dist/client/assets/content-iyyQKwvA.js +0 -1
- package/dist/client/assets/content-pDE7Fpb9.js +0 -1
- package/dist/client/assets/content-pPSd2dua.js +0 -1
- package/dist/client/assets/conversation-model-CHwHZNw-.js +0 -1
- package/dist/client/assets/conversation-motion-features-DXtKlmuM.js +0 -1
- package/dist/client/assets/ctx-panel-B4s49N9e.css +0 -1
- package/dist/client/assets/discover-DKf0aTr_.js +0 -2
- package/dist/client/assets/embed-entry-RlQUTtc4.js +0 -2
- package/dist/client/assets/gestures-CcEOV6Sr.js +0 -1
- package/dist/client/assets/harnesses-screen-DBZoTZz8.css +0 -1
- package/dist/client/assets/home-moving-signal-Bh2FugbH.js +0 -1
- package/dist/client/assets/home-moving-signal-CAa0V91u.css +0 -1
- package/dist/client/assets/home-now-card-ByRH5fFx.js +0 -1
- package/dist/client/assets/hooks-DUZwL3Aq.js +0 -2
- package/dist/client/assets/index-BBznYVWk.css +0 -1
- package/dist/client/assets/index-BTuq-8Iv.js +0 -1
- package/dist/client/assets/index-CmwGCxUk.js +0 -1
- package/dist/client/assets/index-CvF09yvf.css +0 -1
- package/dist/client/assets/index-DmFAhGPj.js +0 -10
- package/dist/client/assets/index-Dtaswdsh.js +0 -1
- package/dist/client/assets/inspector-panel-DzgS5_Mv.js +0 -2
- package/dist/client/assets/left-8NITBvFX.js +0 -1
- package/dist/client/assets/left-B2HEqrTM.js +0 -2
- package/dist/client/assets/left-Bk3XnxPD.css +0 -1
- package/dist/client/assets/left-CCoobxPS.css +0 -1
- package/dist/client/assets/left-CTYUvXbe.js +0 -1
- package/dist/client/assets/left-CwDRT50z.js +0 -2
- package/dist/client/assets/left-CxlDLJlw.js +0 -1
- package/dist/client/assets/left-XFXxNd4g.js +0 -1
- package/dist/client/assets/left-agents-Ck4Xn-R8.js +0 -1
- package/dist/client/assets/left-default-BeOyS0bR.js +0 -1
- package/dist/client/assets/left-lanes-DZp3jJMo.js +0 -1
- package/dist/client/assets/left-mission-CuKFQ5xL.js +0 -1
- package/dist/client/assets/left-p1hkO6P0.js +0 -1
- package/dist/client/assets/left-plan-3rrFENhp.js +0 -2
- package/dist/client/assets/library-E--gKzEZ.js +0 -1
- package/dist/client/assets/mesh-buckets-CfAukILK.js +0 -1
- package/dist/client/assets/message-visibility-kJM8XcSG.js +0 -1
- package/dist/client/assets/mission-control-m3BTDQ9l.css +0 -1
- package/dist/client/assets/model-Co0zkMIc.js +0 -1
- package/dist/client/assets/plan-view-D56fneVF.css +0 -1
- package/dist/client/assets/profile-Dxj3VVOM.js +0 -1
- package/dist/client/assets/projects-inbox-COZ23dLR.css +0 -1
- package/dist/client/assets/projects-inbox-Dzt_GQDv.js +0 -1
- package/dist/client/assets/resolve-panes-C9gF0w4e.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-DxbY5RCH.js +0 -1
- package/dist/client/assets/right-5L7Tn0zG.js +0 -1
- package/dist/client/assets/right-CYtkMmRu.js +0 -1
- package/dist/client/assets/right-CreoQzPP.js +0 -1
- package/dist/client/assets/right-D9xFfy2b.js +0 -1
- package/dist/client/assets/right-DI7zHADe.js +0 -1
- package/dist/client/assets/right-DUbJ3WVc.js +0 -1
- package/dist/client/assets/right-DiybhsiK.js +0 -1
- package/dist/client/assets/right-Jh_1Q88s.js +0 -1
- package/dist/client/assets/right-udr1qTJG.js +0 -1
- package/dist/client/assets/router-Cn_s9IGH.js +0 -1
- package/dist/client/assets/runtime-picker-vhm0gtLs.css +0 -1
- package/dist/client/assets/scout-voice-CwbOz6EN.js +0 -1
- package/dist/client/assets/secondaryNavConfig-Dw3gS1jR.js +0 -1
- package/dist/client/assets/sse-CxXt4tqI.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +0 -1
- package/dist/client/assets/terminal-screen-BqVnCwl0.css +0 -1
- package/dist/client/assets/terminal-sessions-AmSgHklm.js +0 -1
- package/dist/client/assets/text-DsBWV_4k.js +0 -1
- package/dist/client/assets/use-conversation-list-C-dPcjQe.js +0 -1
- package/dist/client/assets/use-reduced-motion-CYqhYqHO.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-DjHBrgnS.js +0 -1
- package/dist/highlights-eq9cgrbb.scm +0 -604
- package/dist/highlights-ghv9g403.scm +0 -205
- package/dist/highlights-hk7bwhj4.scm +0 -284
- package/dist/highlights-r812a2qc.scm +0 -150
- package/dist/highlights-x6tmsnaa.scm +0 -115
- package/dist/injections-73j83es3.scm +0 -27
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- /package/dist/client/assets/{document-focus-viewer-BSC_JwVE.css → DocumentFocusViewer-BSC_JwVE.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as W}from"./index-CZ-05hKz.js";import{a as b}from"./api-Co9aQ2Jw.js";import{b as ye}from"./router-DJj2WbDg.js";import{u as Ae}from"./sse-CiOSzE5n.js";import{i as F,o as Se}from"./surface-activity-B1rgWB1i.js";import{u as Re}from"./tail-events-BMQmSx1n.js";import{d as ke,u as Ee}from"./Provider-B2xuo3rf.js";import{x as T}from"./conversation-model-CwF6Y9gx.js";import{d as be,c as je,e as Ce,f as Me,I as le}from"./NewChatComposer-hlWT-nbR.js";import{i as Te}from"./agents-project-model-UYiamtrU.js";import{o as ce,b as _e,a as Ne,h as K,c as ae}from"./model-IGCUEsMy.js";const Be=["codex","claude","grok","grok-acp","kimi","flue","cursor","opencode","native","worker","bridge","http","pi"],Le=new Set(Be);function ue(e){const t=e?.trim().toLowerCase().replace(/_/gu,"-")??"",n=t==="claude-code"||t==="claude-stream-json"?"claude":t==="codex-app-server"||t==="codex-exec"?"codex":t==="pi-rpc"?"pi":t;return Le.has(n)?n:null}function O(e){const t=e?.trim();if(!t)return null;const n=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return n.endsWith(".jsonl")?n.slice(0,-6):n}function V(e){const t=e?.trim();if(!t)return null;if(t.startsWith("session:")){const s=t.slice(8),o=s.indexOf(":");if(o>0){const l=ue(s.slice(0,o)),c=O(s.slice(o+1));if(l&&c)return{refId:c,harness:l,qualified:!0}}const r=O(s);return r?{refId:r,harness:null,qualified:!1}:null}const n=O(t);return n?{refId:n,harness:null,qualified:!1}:null}function fe(e,t){const n=V(t);if(!n)return null;if(n.qualified)return`session:${n.harness}:${n.refId}`;const s=ue(e);return s?`session:${s}:${n.refId}`:n.refId}const G=1440*6e4;function xe(e){const t=new Map;for(const n of e?.activeAsks??[]){const s=t.get(n.agentId)??[];s.push(n),t.set(n.agentId,s)}return t}function Pe(e){const t=new Map,n=(s,o)=>{if(!s)return;const r=t.get(s)??[];r.push(o),t.set(s,r)};for(const s of e?.needsAttention??[])n(s.agentId,{title:s.title,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of e?.activeAsks??[])s.status==="needs_attention"&&n(s.agentId,{title:s.task,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of t.values())s.sort((o,r)=>r.updatedAt-o.updatedAt);return t}function de(e){return e?e.charAt(0).toUpperCase()+e.slice(1):"Harness"}function ge(e){return e.length===1?e[0]??null:e.length>1?`${e.length} branches`:null}function Oe(e,t,n,s){const o=e.group,r=o.nodes.flatMap(v=>n.get(v.row.agent.id)??[]).sort((v,k)=>k.updatedAt-v.updatedAt)[0]??null,l=!!r,c=!l&&o.nodes.some(v=>le(v.row)),a=Te(o,s),g=l?"needs":c?"working":"recent",m=l?"needs":c||a?"live":"idle",p=e.leadAgent,B=r?.conversationId??t.get(p.id)??p.conversationId??null;return{id:`${e.projectSlug}:agent:${p.id}`,kind:"agent",projectSlug:e.projectSlug,projectTitle:e.projectTitle,projectRoot:e.projectRoot,workspaceRoot:p.cwd??p.projectRoot??e.projectRoot,agentId:p.id,agentName:o.name,harness:K(o.harness),branch:ge(o.branches),work:r?.summary?.trim()||r?.title.trim()||Ne(e,m),group:g,needs:l,working:c,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:B,sessionId:null}}function $e(e){return e&&e.view==="sessions"&&e.sessionId?e.sessionId:null}function De(e,t,n){const s=K(t.harness);return{id:`${e.slice.slug}:native:${t.key}`,kind:"native",projectSlug:e.slice.slug,projectTitle:e.slice.title,projectRoot:e.slice.root,workspaceRoot:e.slice.root,agentId:null,agentName:`${de(s)} session`,harness:s,source:t.harness,branch:null,work:ae(t.detail??t.label)||t.label,group:"working",needs:!1,working:!0,lastActivityAt:t.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:null,sessionId:$e(t.route)}}function We(e,t){return e.status==="active"||e.status==="workflow"?"working":(e.lastActivityAt&&t-e.lastActivityAt<G,"recent")}function M(e){return e?e.view==="sessions"?e.sessionId??null:e.view==="conversation"?e.conversationId:null:null}function ee(e){return!!M(e.route)}function te(e,t,n,s,o,r){const l=K(t.harness),c=M(t.route),a=t.status==="active"||t.status==="workflow";return{id:`${e.slice.slug}:session:${t.key}`,kind:"session",projectSlug:e.slice.slug,projectTitle:e.slice.title,projectRoot:e.slice.root,workspaceRoot:s?.cwd??s?.projectRoot??e.slice.root,agentId:s?.id??null,agentName:s?.name??`${de(l)} session`,harness:l,source:t.harness,branch:ge(o?[o]:[]),work:ae(t.detail??t.label)||t.label,group:We(t,n),needs:!1,working:a,lastActivityAt:t.lastActivityAt??n,latestReplyAt:r?.ts??null,latestReplyPreview:r?.summary.trim()||null,sessionCount:1,contextPct:null,conversationId:t.route?.view==="conversation"?t.route.conversationId:null,sessionId:t.route?.view==="sessions"?t.route.sessionId??c:c,route:t.route}}function Fe(e){const t=e?.trim();if(!t)return null;const n=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return n.endsWith(".jsonl")?n.slice(0,-6):n}function q(e,t){const n=Fe(t);return n?`${e.trim().toLowerCase()}\0${n}`:null}function qe(e){if(!e.raw||typeof e.raw!="object"||Array.isArray(e.raw))return null;const t=e.raw.payload;if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.role;return typeof n=="string"?n.trim().toLowerCase():null}function ze(e){const t=e.trim();if(!t.startsWith("{"))return!1;if(t.startsWith('{"risk_level":')&&t.includes('"user_authorization":')&&t.includes('"outcome":')&&t.includes('"rationale":'))return!0;try{const n=JSON.parse(t);return typeof n.risk_level=="string"&&typeof n.user_authorization=="string"&&typeof n.outcome=="string"&&typeof n.rationale=="string"}catch{return!1}}function J(e){if(e.kind!=="assistant")return!1;const t=e.summary.trim();if(!t||/^\[(?:assistant|message)\]$/iu.test(t))return!1;const n=qe(e);return n&&n!=="assistant"?!1:!ze(t)}function He(e){const t=new Map;for(const n of e){if(!J(n))continue;const s=q(n.source,n.sessionId);if(!s)continue;const o=t.get(s);(!o||n.ts>o.ts)&&t.set(s,n)}return t}function Ke(e,t,n){const s=[];for(const o of e.agents)for(const r of o.sessions)ee(r)&&s.push(te(e,r,t,o.row.agent,o.row.branch,n.get(q(r.harness,M(r.route))??"")??null));for(const o of e.unassigned)ee(o)&&s.push(te(e,o,t,void 0,void 0,n.get(q(o.harness,M(o.route))??"")??null));return s.sort((o,r)=>r.lastActivityAt-o.lastActivityAt||o.agentName.localeCompare(r.agentName))}function Ve(e){const t=new Map,n=(s,o,r,l)=>{const c=t.get(s);if(!c){t.set(s,{root:s,branch:o,working:r,lastActivityAt:l});return}(r||!c.branch)&&o&&(c.branch=o),c.working||=r,c.lastActivityAt=Math.max(c.lastActivityAt,l)};for(const s of e.agents){const o=s.row.agent.cwd??s.row.agent.projectRoot??e.slice.root;if(!o)continue;const r=s.row.branch&&s.row.branch!=="—"?s.row.branch:null;n(o,r,le(s.row),s.row.lastActivityAt??0)}for(const s of e.slice.nativeSessions)s.cwd&&n(s.cwd,null,s.status==="active",s.lastActivityAt??0);return t.size===0&&e.slice.root&&n(e.slice.root,null,!1,e.lastActivityAt??0),[...t.values()].sort((s,o)=>Number(o.working)-Number(s.working)||o.lastActivityAt-s.lastActivityAt||s.root.localeCompare(o.root))}function ne(e,t){return e.needs?3:e.working?2:t-e.lastActivityAt<G?1:0}function Ge(e){const{nowMs:t,showEphemeral:n}=e,s=ke(e.agents,e.machineId),o=xe(e.fleet),r=Pe(e.fleet),{conversationByAgentId:l,sessionByAgentId:c}=be(e.sessions),a=s.map(i=>je(i,c.get(i.id)??null,o.get(i.id)??[])),g=Ce(e.discovery,t),m=Me(a,e.sessions,g),p=_e(m,n),B=He(e.recentEvents??[]),v=p.map(i=>Oe(i,l,r,t));for(const i of m)for(const f of i.unassigned)f.kind!=="native"||f.status!=="active"||!f.route||v.push(De(i,f,t));v.sort((i,f)=>ne(f,t)-ne(i,t)||f.lastActivityAt-i.lastActivityAt);const k=m.flatMap(i=>Ke(i,t,B)),L=new Map;for(const i of v){const f=L.get(i.projectSlug)??[];f.push(i),L.set(i.projectSlug,f)}const x=new Map;for(const i of k){const f=x.get(i.projectSlug)??[];f.push(i),x.set(i.projectSlug,f)}const P=new Map;for(const i of p)P.set(i.projectSlug,(P.get(i.projectSlug)??0)+1);const Q=m.map(i=>{const f=L.get(i.slice.slug)??[],X=x.get(i.slice.slug)??[],he=[...new Set(i.agents.map(d=>d.row.branch).filter(d=>!!d&&d!=="—"&&d!=="main"))],Z=Ve(i);return{slug:i.slice.slug,title:i.slice.title,root:i.slice.root,agentCount:P.get(i.slice.slug)??0,sessionCount:X.length,liveSessionCount:X.filter(d=>d.working).length,worktreeCount:Z.length,worktrees:Z,needs:f.filter(d=>d.needs).length,working:f.filter(d=>d.working).length,threadCount:f.length,lastActivityAt:i.lastActivityAt,branches:he}});return Q.sort((i,f)=>se(f)-se(i)||f.lastActivityAt-i.lastActivityAt||i.title.localeCompare(f.title)),{projects:Q,threads:v,sessions:k}}function se(e){return e.needs>0?2:e.working>0?1:0}function Ct(e,t){return e.needs===0&&e.working===0&&(e.threadCount===0||t-e.lastActivityAt>G)}function Mt(e,t){return e.filter(n=>n.projectSlug===t)}function Tt(e,t){return e.filter(n=>n.projectSlug===t)}const Je=["needs","working","recent"],Ue={needs:"Your turn",working:"In flight",recent:"Recent"};function _t(e){const t=new Map;for(const n of e){const s=t.get(n.group)??[];s.push(n),t.set(n.group,s)}return Je.filter(n=>t.has(n)).map(n=>({group:n,label:Ue[n],items:t.get(n)}))}function w(e){return{view:"agents-v2",...e.projectSlug?{projectSlug:e.projectSlug}:{},...e.machineId?{machineId:e.machineId}:{}}}function _(e){return e.kind!=="native"||!e.sessionId?null:fe(e.source??e.harness,e.sessionId)}function Ye(e,t){const n=t.projectSlug?e.filter(a=>a.projectSlug===t.projectSlug):e;if(t.selectedAgentId){const a=n.filter(g=>g.agentId===t.selectedAgentId);return a.length===1?a[0]:null}const s=t.sessionId?.trim();if(!s)return null;const o=n.filter(a=>_(a)===s);if(o.length===1)return o[0];const r=V(s);if(o.length>1||r?.qualified)return null;const l=r?.refId??s,c=n.filter(a=>a.kind==="native"&&a.sessionId===l);return c.length===1?c[0]:null}function Nt(e,t,n){return Ye(n,t)===e}function Bt(e,t){return e.kind==="native"?{...w(t),sessionId:_(e)??void 0}:{...w(t),selectedAgentId:e.agentId??void 0}}function Lt(e,t){const n=_(e);return n?{view:"sessions",sessionId:n}:e.conversationId?{view:"conversation",conversationId:e.conversationId}:e.agentId?ce(t,e.agentId):w(t)}function xt(e,t){const n=_(e);return n?{view:"sessions",sessionId:n}:e.agentId?{...ce(t,e.agentId),tab:"observe"}:null}function Pt(e,t){const n=U(e);return n?{...w(t),indexView:"sessions",...n?{sessionId:n}:{},selectedAgentId:void 0}:w(t)}function Ot(e,t,n){return Qe(n,t)===e}function U(e){return e.conversationId&&e.route?.view==="conversation"?e.conversationId:e.sessionId?fe(e.source??e.harness,e.sessionId):e.conversationId?e.conversationId:null}function Qe(e,t){const n=t.sessionId?.trim();if(!n)return null;const s=t.projectSlug?e.filter(a=>a.projectSlug===t.projectSlug):e,o=s.filter(a=>U(a)===n);if(o.length===1)return o[0];const r=V(n);if(o.length>1||r?.qualified)return null;const l=r?.refId??n,c=s.filter(a=>a.sessionId===l||a.conversationId===l||a.id===l);return c.length===1?c[0]:null}function $t(e,t){const n=U(e);return n?{...w(t),projectSlug:e.projectSlug,indexView:"sessions",sessionId:n,selectedAgentId:void 0}:{...w(t),projectSlug:e.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const Xe=50;function ve(e){const t=e.source.trim().toLowerCase(),n=e.sessionId.trim(),s=n.split(/[\\/]/u).filter(Boolean).at(-1)??n,o=s.endsWith(".jsonl")?s.slice(0,-6):s;return t&&o?`${t}\0${o}`:`event\0${e.id}`}function pe(e,t){const n=new Map;for(const s of e){if(!J(s))continue;const o=ve(s),r=n.get(o);(!r||s.ts>=r.ts)&&n.set(o,s)}return[...n.values()].sort((s,o)=>o.ts-s.ts||o.id.localeCompare(s.id)).slice(0,t)}function Ze(e,t=n=>{const s=setTimeout(n,Xe);return()=>clearTimeout(s)}){const n=new Map;let s=null;const o=()=>{if(s=null,n.size===0)return;const r=[...n.values()];n.clear(),e(r)};return{push(r){n.set(ve(r),r),s??=t(o)},cancel(){s?.(),s=null,n.clear()}}}function et(e){if(typeof window<"u"){const n=window;if(n.requestIdleCallback){const s=n.requestIdleCallback(e,{timeout:1e3});return()=>n.cancelIdleCallback?.(s)}}const t=setTimeout(e,0);return()=>clearTimeout(t)}const tt=15e3,me=3e4,nt=250,Y=200,st=5e3,ot=`/api/tail/recent?limit=${Y}&transcripts=1&mode=assistant-replies`;let u={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const z=new Set;let h=0,oe=0,S=null,$=!1,I=null,R=null,y=null,j=null,C=null,H=null,re=0;function we(){for(const e of[...z])e()}function rt(e,t){return e&&JSON.stringify(e.activeAsks)===JSON.stringify(t.activeAsks)?e:t}function it(e,t){const n=s=>JSON.stringify([s?.transcripts??[],s?.processes??[]]);return e&&n(e)===n(t)?e:t}function N(e){u={...u,...e},we()}async function lt(){if(!(Date.now()-oe<st)){if(I)return I;I=(async()=>{try{const e=await b(ot);oe=Date.now();const t=pe([...u.recentEvents,...e.events??[]],Y),n=T(u.recentEvents,t);n!==u.recentEvents&&N({recentEvents:n})}catch{}})();try{await I}finally{I=null}}}function ct(){R||I||(R=et(()=>{R=null,h>0&<()}))}const Ie=Ze(e=>{const t=pe([...u.recentEvents,...e],Y),n=T(u.recentEvents,t);n!==u.recentEvents&&N({recentEvents:n})});function at(e){J(e)&&Ie.push(e)}async function A(e){if(S)return $=!0,S;S=(async()=>{re+=1,typeof window<"u"&&(window.__projectsInboxLoads=re),u.loadedAt===null&&e!=="background"&&N({loading:!0,error:null});const[t,n,s]=await Promise.allSettled([b("/api/conversations"),b("/api/fleet"),b("/api/tail/discover")]),o=t.status==="fulfilled"?T(u.sessions,t.value):u.sessions,r=n.status==="fulfilled"?rt(u.fleet,n.value):u.fleet,l=s.status==="fulfilled"?it(u.discovery,s.value):u.discovery,c=[t,n,s].find(m=>m.status==="rejected"),a=c?c.reason instanceof Error?c.reason.message:String(c.reason):null,g=o!==u.sessions||r!==u.fleet||l!==u.discovery||a!==u.error||u.loading;u={...u,sessions:o,fleet:r,discovery:l,error:a,loading:!1,loadedAt:Date.now()},g&&we(),ct()})();try{await S}finally{S=null,$&&h>0&&($=!1,A("background"))}}function ut(){F()&&(y||(y=setTimeout(()=>{y=null,A("background")},nt)))}function ft(){A("initial"),j=setInterval(()=>{F()&&A("background")},tt),C=setInterval(()=>{F()&&N({nowMs:Date.now()})},me),H=Se(()=>{A("background")})}function dt(){R?.(),R=null,Ie.cancel(),y&&(clearTimeout(y),y=null),j&&(clearInterval(j),j=null),C&&(clearInterval(C),C=null),H?.(),H=null}function Dt(){A("background")}function gt(){const[e,t]=W.useState(u);return W.useEffect(()=>{const n=()=>t(u);return z.add(n),h+=1,h===1&&ft(),n(),()=>{z.delete(n),h-=1,h===0&&dt()}},[]),Ae(ut),Re(at),e}let ie=null,E=null;function vt(e,t){return!!e&&e.length===t.length&&e.every((n,s)=>n===t[s])}function D(e,t,n){if(!e?.length)return t;const s=new Map(e.map(l=>[n(l),l]));let o=e.length===t.length;const r=t.map((l,c)=>{const a=s.get(n(l)),g=a?T(a,l):l;return g!==e[c]&&(o=!1),g});return o?e:r}function pt(e,t){if(!e)return t;const n=D(e.projects,t.projects,r=>r.slug),s=D(e.threads,t.threads,r=>r.id),o=D(e.sessions,t.sessions,r=>r.id);return n===e.projects&&s===e.threads&&o===e.sessions?e:{projects:n,threads:s,sessions:o}}function mt(e){const t=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/me),e.showEphemeral];if(vt(ie,t)&&E)return E;const n=Ge(e),s=pt(E,n);return ie=t,E=s,s}function Wt(e){const t=gt(),{agents:n}=Ee(),s=ye(e),o=!!e.showEphemeral;return{model:W.useMemo(()=>mt({agents:n,machineId:s,sessions:t.sessions,fleet:t.fleet,discovery:t.discovery,recentEvents:t.recentEvents,nowMs:t.nowMs,showEphemeral:o}),[n,s,t.sessions,t.fleet,t.discovery,t.recentEvents,t.nowMs,o]),agents:n,nowMs:t.nowMs,loading:t.loading,loadedAt:t.loadedAt,error:t.error}}export{Lt as a,Ye as b,Ot as c,U as d,Tt as e,Qe as f,Mt as g,_t as h,Ct as i,Pt as j,Bt as k,Nt as l,Dt as r,$t as s,xt as t,Wt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,j as u}from"./index-CZ-05hKz.js";import{l as c,L as f,c as l}from"./use-reduced-motion-CKkhq9c5.js";function p({children:r,features:e,strict:d=!1}){const[,i]=s.useState(!a(e)),t=s.useRef(void 0);if(!a(e)){const{renderer:n,...o}=e;t.current=n,c(o)}return s.useEffect(()=>{a(e)&&e().then(({renderer:n,...o})=>{c(o),t.current=n,i(!0)})},[]),u.jsx(f.Provider,{value:{renderer:t.current,strict:d},children:r})}function a(r){return typeof r=="function"}const L=l();export{p as L,L as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-DXpqZP7I.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-DXpqZP7I.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-CZ-05hKz.js";import{ActivityContent as s}from"./content-Czogvp43.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DJj2WbDg.js";import"./index-BVlMw8x_.js";import"./Provider-B2xuo3rf.js";import"./AgentDetailCard-UqPNpcvB.js";/* empty css */import{AgentsLeft as e}from"./left-CwLs0okF.js";import{AgentsContent as n}from"./content-DFk0zNzX.js";import{AgentsInspector as m}from"./right-Shpw_xDy.js";/* empty css */import"./secondaryNavConfig-B9IF8wXl.js";/* empty css */import"./CrewAvatar-CTIuxp4G.js";import"./BackToPicker-4JaeRvDm.js";import"./text-CnZ0e1-V.js";import"./ConversationScreen-BNULZAp2.js";/* empty css */import"./ObservedTopologyPanel-CdGUXxGR.js";import"./SessionObserve-Dsd0j05N.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-BwuzOE8h.js";import{P as c}from"./ProjectsRail-DCfNMmnW.js";import{ProjectsScreen as f}from"./ProjectsScreen-BP-hmI1m.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-CWpMjGIH.js";import{BriefingsContent as x}from"./content-Bf2VLhx0.js";/* empty css */import{BrokerContent as j}from"./content-DHe4DgkA.js";import"./NewChatComposer-hlWT-nbR.js";import{ChatLeft as u}from"./left-z-6CkuBe.js";/* empty css */import{ChatContent as l}from"./content-BCgwMUqz.js";import{ConversationInspector as i}from"./right-BbyYdzHn.js";import{CodeContent as h}from"./CodeScreen-BlAxtxE5.js";import{FollowContent as C}from"./content-CHghn-rT.js";/* empty css */import{HarnessesContent as d}from"./content-E3kudY-W.js";/* empty css */import{HomeLeft as I}from"./left-CwHZCGO3.js";import{HomeContent as p}from"./content-CbyKONhW.js";import{HomeRight as w}from"./right-C1yumXNx.js";import{MeshLeft as P}from"./left-Cx0kv6pe.js";import{MeshContent as L}from"./content-DTz7cKjo.js";import{MeshInspectorPanel as R}from"./right-BJltPRnd.js";import"./mesh-view-store-BpxGm71b.js";/* empty css */import{MeshOpsLeft as k}from"./left-DA0amyfu.js";import{MeshOpsContent as A}from"./content-DMbawvqU.js";import{MeshOpsInspector as M}from"./right-D3aTKf1F.js";import{OpsLeft as S}from"./left-BpgWnaah.js";import{OpsContent as b}from"./content-CI_Z9DXk.js";/* empty css */import"./RailRow-B-GycCBx.js";import"./left-mission-DN3-NLPC.js";import"./mission-control-store-Bf4b54MV.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-C-q7XwTa.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-Q4FVMsUH.js";import{ReposContent as g}from"./content-BvvJN8rN.js";import{ReposInspector as O}from"./right-CJnB_Bg7.js";/* empty css */import"./RepoDiffViewerLazy-C0--fPtk.js";import"./cache-CeWH_KzJ.js";import{SearchContent as H}from"./content-BrU_38-m.js";import{K as T}from"./KnowledgeSearchInspector-CZPyVNSw.js";/* empty css */import{SessionsContent as y}from"./content-LpO0aO_U.js";import{SessionsInspector as B}from"./right-CPP7GyOm.js";/* empty css */import{SettingsContent as K}from"./content-6RvWTrtk.js";import"./CastPicker-BcA2vDDV.js";import"./SettingsDrawer-_AwuopMS.js";import{TerminalLeft as W}from"./left-B_o51JV6.js";import{TerminalContent as E}from"./Terminal-D7zqHwHV.js";import{TerminalInspector as F}from"./right-DI1B79nR.js";import{WorkContent as V}from"./content-CAeEqYPw.js";import{WorkInspector as q}from"./right-DtsRNX5b.js";import"./DocumentFocusViewer-DZVhS7as.js";import{R as z}from"./RealtimeVoiceScreen-D7zZHK_t.js";import"./ActivityScreen--eANwuxa.js";import"./api-Co9aQ2Jw.js";import"./clipboard-e3fSpeo7.js";import"./sse-CiOSzE5n.js";import"./colors-BtO5_zlx.js";import"./mentions-CcPFMbmZ.js";import"./time-Dhsh_2EG.js";import"./EmptyState-CeBl0iGd.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./chevron-right-CzH-TaSF.js";import"./createLucideIcon-DXpqZP7I.js";import"./file-text-KijGBnME.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./AgentInfoScreen-CimdOnZ9.js";import"./conversation-model-CwF6Y9gx.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-CtPAmwRX.js";import"./AgentsSubnav-CDMjKeYC.js";import"./SecondaryNav-o2RL9H8H.js";import"./library-DIo5NiGP.js";import"./HarnessMark-D5CA5uSp.js";import"./AgentSessions-CsZwoukw.js";import"./agents-project-model-UYiamtrU.js";import"./profile-rY8jO38P.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-DNaOEzoQ.js";import"./terminal-relay-9lhzEp2V.js";import"./AgentDefinitionsWorkspace-srmN6-vj.js";import"./agent-specialization-BIPIBW8u.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-DQlpNt2S.js";import"./chevron-down-Mp9mu_yd.js";import"./agent-essentials-BOMHR0_U.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-DANQfTcy.js";import"./TmuxPeek-V9dGESfO.js";import"./refresh-cw-BRn9Oxxl.js";import"./message-square-D9YYWE0x.js";import"./search-D1tJSAWe.js";import"./compass-0_54-vz3.js";import"./settings-2fC_G9nX.js";import"./terminal-yN9xN-h9.js";import"./git-branch-BQ_x8KZL.js";import"./scroll-text-DO0GQzvN.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./ConversationComposer-2HjbGPL9.js";import"./zap-nMcjPoWB.js";import"./x-e3h2hDsp.js";import"./message-markup-RkfmDfME.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-C8vfXaTF.js";import"./AstronautSuit-Ckx7lu7G.js";import"./eye-CpfyvdLq.js";import"./ConversationFeedRows-C6wUqJrx.js";import"./ConversationPanels-CNCIbpqU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CKkhq9c5.js";import"./proxy-DnLpZIi9.js";import"./activity-Bj3Hnbj3.js";import"./message-circle-B2ddzBrX.js";import"./tail-events-BMQmSx1n.js";import"./ConversationStatus-DZuyKsWN.js";import"./check-C18YQC90.js";import"./sparkles-Dy8p5xN8.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-D_DMlBeT.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BSEtYTxU.js";import"./SessionObserveEvidence-DopQYDkD.js";import"./wrench-YcXMlsh2.js";import"./external-link-Ckiyzjwo.js";import"./AddProjectForm-CcD6qvV8.js";import"./projects-inbox-D-zAb9Gp.js";import"./model-IGCUEsMy.js";import"./archive-BjcGiAy8.js";import"./ProjectsInbox-Dlt8OQ8O.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-B_cTv47v.js";import"./CrewWorkspaces-CkPYIA46.js";import"./cpu-BjVis9mc.js";import"./sliders-horizontal-BPSMHhbm.js";import"./api-HFH8wFyb.js";import"./arrow-up-right-CCfZXPqD.js";import"./ProjectAgentProfile-BLlp2e6t.js";import"./ProjectAgentProfileBar-BQET-qrY.js";import"./BriefingDetailScreen-D6-xqrpo.js";import"./scoutbot-markdown-jh7tzFB1.js";import"./BriefingsScreen-DKxSDEmk.js";import"./BrokerScreen-fbPIouMw.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-Q75fupqG.js";import"./BrokerMetadataPanel-BbREmsbK.js";import"./DispatchAftermath-DC1u9itO.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-BfHc_3pM.js";import"./arrow-down-BydciYFZ.js";import"./paperclip-B1UNGl5d.js";import"./plus-CuU_X0-8.js";import"./send-horizontal-CgLppsIC.js";import"./copy-Dtpx4FOE.js";import"./radio-Dm1ItnA4.js";import"./bot-B5sub1-i.js";import"./NewChatOrigin-DdpzE4kz.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-D9BNLfnW.js";import"./use-fleet-active-asks-BeAdcl09.js";import"./MessagesScreen-Eulveud3.js";import"./CodeDiffPane-Cn8Y9hAt.js";import"./usePierreRuntime-DUuXH5yp.js";/* empty css */import"./CodeProjectPicker-nPFktrco.js";/* empty css */import"./FollowScreen-BXHOp3gb.js";import"./HarnessesScreen-DhFXq1qz.js";import"./useContentSecondaryNav-D0mUhxTF.js";import"./OpsSubnav-GAKsoSor.js";import"./HomeHero-DMABJuze.js";import"./observe-CJRIvOCn.js";import"./persistent-state-YI-WHSCF.js";import"./agent-lanes-model-AfrjRNK5.js";import"./home-moving-signal-DtRpiNa0.js";import"./home-live-action-BkqGLVRY.js";import"./file-code-corner-7mo7EviR.js";import"./mesh-buckets-ByyFXdKT.js";import"./mesh-roster-n2nDpEmA.js";import"./MeshScreen-DMY9Bmh5.js";import"./MeshCanvas-BOuZx4AM.js";import"./chunk-T65CQEWV-vYbNJ8E6.js";import"./useAgentHoverCard-CHBsxcbp.js";import"./local-agents-wUIaBcEr.js";import"./mesh-ops-CvGyjK84.js";import"./use-mesh-ops-items-BIvIHlqe.js";import"./use-scout-dev-flags-B2KCzPxn.js";import"./left-agents-qL5PpUY-.js";import"./left-default-uvuvDmt0.js";import"./left-lanes-DnNLgec8.js";import"./lane-roster-store-gUBsydNf.js";import"./left-advisor-DU3s01gk.js";import"./server-Dymv5Emh.js";import"./layers-CGou-LwV.js";import"./gauge-y-Xg8Mrv.js";import"./OpsScreen-Ppen_Lmj.js";import"./page-status-BptpTdQ-.js";import"./AgentLanesView-DHyzVBk6.js";import"./AgentFloorView-XXNgI5Cj.js";import"./AgentLanesPreflight-5B6sXvRB.js";import"./AgentLaneChrome-CyhA1reW.js";import"./AgentLaneCard-Z-aOBR3W.js";import"./AgentLaneSummaryResize-Box8-_rS.js";import"./agent-lane-card-model-CTLxf3R4.js";import"./agent-lane-preview-BhplDYGf.js";import"./agent-lane-detail-ppJId6Jc.js";import"./AgentLaneDetailSheet-BNzjMjIH.js";import"./LaneTraceDetailSheet-BEHg3LmH.js";import"./LaneTraceEventFocus-DVimcizS.js";import"./MissionControlView-ByBlHVN8.js";import"./MissionContextRail-DrNKXG5u.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-D1i6R6Zt.js";import"./MissionLogPane-DSeIv3Xo.js";import"./OpsAgentsView-ntGr4pz4.js";import"./DataTable-6IDhanr5.js";import"./HostAdvisorView-RAociATV.js";import"./layout-grid-BrZt31QH.js";import"./AtopView-DYlpgEHf.js";import"./MissionLeftAgentRow-DN9NcCML.js";import"./RepoDiffPageScreen-D_274ExO.js";import"./ReposScreen-D39_YG4H.js";import"./selection-bridge-i2S9zpf8.js";import"./KnowledgeSearchScreen-mGTKIg00.js";import"./clock-B4PTFi5m.js";import"./SessionsScreen-Bq0Z77On.js";import"./RawSessionsTable-AQThi6sm.js";import"./FlightObserveScreen-CDWGSKZg.js";import"./SettingsScreen-Cw4DDfJP.js";import"./StatusPill-ZZQwxB1a.js";import"./AgentConfigurationScreen-BTI24HQX.js";import"./credentials-BTce3VP1.js";import"./VoicePermissionsPanel-k7sbLXx2.js";import"./chunk-YOZR3KYS-U65yUmqt.js";import"./session-table-PTQVoTyc.js";/* empty css */import"./HerdrSession-BRhs5LIR.js";import"./chunk-JTPDIGGW-BKXqcLKw.js";import"./TerminalHeaderMount-BnBLOPbb.js";import"./WorkDetailScreen-60p9litn.js";import"./WorkFilesViewer-BjJS7GyM.js";import"./agent-autocomplete-DXlvdc4b.js";import"./gestures-Bq9XnSqY.js";import"./rocket-DOwXHKWA.js";function Pp(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 Lp(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(H,{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 Rp(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(O,{});default:return null}}export{Lp as resolveContentPane,Pp as resolveLeftPane,Rp as resolveRightPane};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-CZ-05hKz.js";import{AgentsLeft as i}from"./left-CwLs0okF.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./Provider-B2xuo3rf.js";import"./router-DJj2WbDg.js";import"./BackToPicker-4JaeRvDm.js";import"./AgentLiveActions-BwuzOE8h.js";import"./ObservedTopologyPanel-CdGUXxGR.js";/* empty css */import"./secondaryNavConfig-B9IF8wXl.js";/* empty css */import"./CrewAvatar-CTIuxp4G.js";import"./text-CnZ0e1-V.js";import"./index-BVlMw8x_.js";import"./AgentDetailCard-UqPNpcvB.js";import"./ConversationScreen-BNULZAp2.js";/* empty css */import"./SessionObserve-Dsd0j05N.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as m}from"./ProjectsRail-DCfNMmnW.js";import"./ProjectsInbox-Dlt8OQ8O.js";import"./projects-inbox-D-zAb9Gp.js";import{ChatLeft as p}from"./left-z-6CkuBe.js";/* empty css */import{HomeLeft as e}from"./left-CwHZCGO3.js";import"./content-CbyKONhW.js";import{MeshLeft as s}from"./left-Cx0kv6pe.js";import"./mesh-view-store-BpxGm71b.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-DA0amyfu.js";import"./use-scout-dev-flags-B2KCzPxn.js";import"./mesh-ops-CvGyjK84.js";import{OpsLeft as l}from"./left-BpgWnaah.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-C-q7XwTa.js";/* empty css */import"./mission-control-store-Bf4b54MV.js";/* empty css *//* empty css *//* empty css */import"./TailView-Q4FVMsUH.js";import"./RailRow-B-GycCBx.js";import"./left-mission-DN3-NLPC.js";import{TerminalLeft as a}from"./left-B_o51JV6.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-wL-1N94e.js";import"./NewChatComposer-hlWT-nbR.js";import"./conversation-model-CwF6Y9gx.js";import"./createLucideIcon-DXpqZP7I.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./api-Co9aQ2Jw.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./keyboard-nav-DFhAJkW3.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./loader-circle-BiohlpM3.js";import"./file-text-KijGBnME.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./sse-CiOSzE5n.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./terminal-takeover-DANQfTcy.js";import"./openContent-C6XO6kr5.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";import"./message-square-D9YYWE0x.js";import"./compass-0_54-vz3.js";import"./settings-2fC_G9nX.js";import"./git-branch-BQ_x8KZL.js";import"./scroll-text-DO0GQzvN.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-2HjbGPL9.js";import"./zap-nMcjPoWB.js";import"./message-markup-RkfmDfME.js";import"./mentions-CcPFMbmZ.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-C8vfXaTF.js";import"./AstronautSuit-Ckx7lu7G.js";import"./ConversationFeedRows-C6wUqJrx.js";import"./ConversationPanels-CNCIbpqU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CKkhq9c5.js";import"./proxy-DnLpZIi9.js";import"./activity-Bj3Hnbj3.js";import"./message-circle-B2ddzBrX.js";import"./tail-events-BMQmSx1n.js";import"./ConversationStatus-DZuyKsWN.js";import"./check-C18YQC90.js";import"./sparkles-Dy8p5xN8.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-D_DMlBeT.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BSEtYTxU.js";import"./SessionObserveEvidence-DopQYDkD.js";import"./wrench-YcXMlsh2.js";import"./external-link-Ckiyzjwo.js";import"./AddProjectForm-CcD6qvV8.js";import"./project-overview-helpers-BQTc_Ous.js";import"./archive-BjcGiAy8.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-B_cTv47v.js";/* empty css */import"./CrewWorkspaces-CkPYIA46.js";import"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";import"./agent-specialization-BIPIBW8u.js";import"./cpu-BjVis9mc.js";import"./sliders-horizontal-BPSMHhbm.js";import"./api-HFH8wFyb.js";import"./cache-CeWH_KzJ.js";import"./arrow-up-right-CCfZXPqD.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-D9BNLfnW.js";import"./use-fleet-active-asks-BeAdcl09.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-DMABJuze.js";import"./refresh-cw-BRn9Oxxl.js";import"./observe-CJRIvOCn.js";import"./persistent-state-YI-WHSCF.js";import"./agent-lanes-model-AfrjRNK5.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-DtRpiNa0.js";import"./home-live-action-BkqGLVRY.js";import"./file-code-corner-7mo7EviR.js";import"./mesh-buckets-ByyFXdKT.js";import"./mesh-roster-n2nDpEmA.js";import"./use-mesh-ops-items-BIvIHlqe.js";import"./left-agents-qL5PpUY-.js";import"./left-default-uvuvDmt0.js";import"./left-lanes-DnNLgec8.js";import"./lane-roster-store-gUBsydNf.js";import"./left-advisor-DU3s01gk.js";import"./server-Dymv5Emh.js";import"./layers-CGou-LwV.js";import"./gauge-y-Xg8Mrv.js";import"./MissionLeftAgentRow-DN9NcCML.js";import"./page-status-BptpTdQ-.js";import"./chunk-YOZR3KYS-U65yUmqt.js";import"./arrow-down-BydciYFZ.js";import"./terminal-relay-9lhzEp2V.js";import"./session-table-PTQVoTyc.js";import"./clock-B4PTFi5m.js";function wt(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{wt as resolveSidebarContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as s}from"./index-CZ-05hKz.js";import{u as $,s as g,c as b}from"./mesh-view-store-BpxGm71b.js";import{u as I}from"./local-agents-wUIaBcEr.js";import{f as O}from"./mesh-roster-n2nDpEmA.js";import{n as B,b as E,a as J}from"./colors-BtO5_zlx.js";import{a as f}from"./api-Co9aQ2Jw.js";import{t as R}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./Provider-B2xuo3rf.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";function P(a){return a.localNode?.advertiseScope==="mesh"}function U(a){const t=new Map;for(const i of a){const r=(i.harness??i.agentClass??"agent").toLowerCase(),c=t.get(r)??{total:0,working:0};c.total+=1,J(i.state)&&(c.working+=1),t.set(r,c)}return Array.from(t.entries()).map(([i,r])=>({label:i,total:r.total,working:r.working})).sort((i,r)=>r.total-i.total).slice(0,6)}function w(a){return a?a.replace(/^https?:\/\//,"").split("/")[0]??a:"Unavailable"}function _(a){return a.split("/")[0]}function W(a){return new Promise(t=>window.setTimeout(t,a))}async function z(a,t){let i=null,r=null;for(let c=0;c<=t.attempts;c+=1){try{if(i=await f("/api/mesh"),g(i),a(i))return i}catch(h){r=h}c<t.attempts&&await W(t.intervalMs)}if(i)return i;throw r instanceof Error?r:new Error("Mesh status is temporarily unavailable.")}function D(a){return a.issues.find(t=>t.code==="local_only"||t.code==="mesh_loopback"||t.code==="tailscale_stopped")?.summary??null}function Is(){const{meshSnapshot:a,selectedId:t,selectedType:i,probeCache:r}=$(),{agents:c}=I(),h=u.useMemo(()=>O(c),[c]),[C,y]=u.useState(!1),[N,p]=u.useState(null),M=u.useCallback(async()=>{y(!0),p({tone:"info",text:"Joining mesh — announcing broker and syncing peers…"});try{const l=await f("/api/mesh/join",{method:"POST",body:"{}"});g(l);const n=l.identity.discoverable?l:await z(e=>e.identity.discoverable,{attempts:6,intervalMs:750});if(n.identity.discoverable){const e=l.discovery,m=e?.discoveredCount!=null?` Found ${e.discoveredCount} peer node${e.discoveredCount===1?"":"s"}.`:"";p(e.error?{tone:"warning",text:`On mesh, but the initial peer sync failed: ${e.error}`}:{tone:"success",text:`On mesh at ${w(n.identity.announceUrl??n.brokerUrl)}.${m}`})}else p({tone:"warning",text:D(n)??"Joined, but this broker is not peer-reachable yet."})}catch(l){p({tone:"error",text:l instanceof Error?l.message:String(l)})}finally{y(!1)}},[]),S=u.useCallback(async()=>{y(!0),p({tone:"info",text:"Leaving mesh…"});try{const l=await f("/api/mesh/leave",{method:"POST",body:"{}"});g(l),p({tone:"success",text:"Local only — peers will no longer discover this broker."})}catch(l){p({tone:"error",text:l instanceof Error?l.message:String(l)})}finally{y(!1)}},[]),x=u.useMemo(()=>{const l={total:h.length,working:0,ready:0,notReady:0};for(const n of h){const e=B(n.state);e==="in_turn"||e==="in_flight"?l.working+=1:e==="callable"?l.ready+=1:l.notReady+=1}return l},[h]),k=u.useMemo(()=>U(h),[h]);if(!a)return s.jsx("div",{className:"sys-inspector-empty",children:s.jsx("p",{children:"Loading mesh…"})});if(t?.startsWith("tailnet:")&&i==="node"){const l=t.slice(8),n=a.tailscale.peers.find(d=>d.id===l),e=r[t]??null,m=n?.addresses?.[0]?_(n.addresses[0]):null,j=n?.hostName?.split(".")[0]??n?.hostName??"Tailnet peer";return s.jsxs("div",{className:"sys-inspector-content",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:j}),s.jsx("span",{className:`sys-chip sys-chip-${n?.online?"success":"failed"}`,children:n?.online?"Online":"Offline"})]}),s.jsxs("div",{className:"sys-detail-grid",children:[m&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Address"}),s.jsx("code",{className:"sys-detail-value",children:m})]}),n?.os&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Platform"}),s.jsx("span",{className:"sys-detail-value",children:n.os})]}),e?.result?.node?.meshId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Mesh ID"}),s.jsxs("code",{className:"sys-detail-value",children:[e.result.node.meshId.slice(0,14),"…"]})]}),e?.result?.node?.name&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Node name"}),s.jsx("span",{className:"sys-detail-value",children:e.result.node.name})]})]}),(!e||e.status==="loading")&&s.jsx("div",{className:"sys-banner sys-banner-muted",style:{marginTop:8},children:s.jsx("span",{children:"Connecting to Scout broker…"})}),e?.status==="error"&&s.jsxs("div",{className:"sys-banner sys-banner-warning",style:{marginTop:8},children:[s.jsx("strong",{children:"Broker unreachable."}),s.jsx("span",{children:e.result?.error??"Could not reach the remote broker."})]}),e?.status==="done"&&e.result?.node?.capabilities?.length&&s.jsxs("div",{style:{marginTop:10},children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Capabilities"}),s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:e.result.node.capabilities.map(d=>s.jsx("span",{className:"sys-chip sys-chip-neutral",children:d},d))})]}),e?.status==="done"&&e.result?.home&&s.jsxs("div",{style:{marginTop:14},children:[s.jsxs("div",{className:"sys-inspector-section-label",children:["Agents — ",e.result.home.agents.length," registered"]}),e.result.home.agents.length===0?s.jsx("div",{className:"sys-list-empty",style:{marginTop:4},children:s.jsx("p",{children:"No agents registered on this broker."})}):s.jsx("div",{className:"mesh-agent-table",style:{marginTop:4},children:e.result.home.agents.map(d=>{const v=E(d.state);return s.jsxs("div",{className:"mesh-detail-agent",style:{padding:"4px 0"},children:[s.jsx("span",{className:`mesh-detail-dot mesh-detail-dot--${v}`}),s.jsxs("div",{className:"mesh-detail-agent-body",children:[s.jsx("span",{className:"mesh-detail-agent-name",style:{fontSize:12},children:d.title}),d.activeTask&&s.jsx("span",{className:"mesh-detail-agent-task",children:d.activeTask})]}),s.jsx("span",{className:`mesh-detail-agent-state mesh-detail-agent-state--${v}`,children:d.statusLabel||v})]},d.id)})})]}),s.jsx("button",{type:"button",className:"s-btn",style:{marginTop:14},onClick:()=>b(null,null),children:"Clear selection"})]})}if(t&&i==="node"){const n=Object.values(a.nodes).find(m=>m.id===t)??(a.localNode?.id===t?a.localNode:null),e=a.localNode?.id===t;return n?s.jsxs("div",{className:"sys-inspector-content",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:n.hostName?.split(".")[0]??n.name??"Node"}),e&&s.jsx("span",{className:"sys-chip sys-chip-neutral",children:"this broker"})]}),s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Node ID"}),s.jsxs("code",{className:"sys-detail-value",children:[n.id.slice(0,16),"…"]})]}),n.brokerUrl&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Broker URL"}),s.jsx("code",{className:"sys-detail-value",children:w(n.brokerUrl)})]}),n.hostName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Host"}),s.jsx("span",{className:"sys-detail-value",children:n.hostName})]}),!e&&"lastSeenAt"in n&&typeof n.lastSeenAt=="number"&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Last seen"}),s.jsx("span",{className:"sys-detail-value",children:R(n.lastSeenAt)})]}),!e&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Scope"}),s.jsx("span",{className:"sys-detail-value",children:n.advertiseScope==="mesh"?"Announced to mesh":"Local only"})]})]}),e&&a.issues.length>0&&s.jsx("div",{className:"sys-issue-grid",style:{marginTop:12},children:a.issues.map((m,j)=>s.jsxs("article",{className:`sys-issue-card sys-issue-card-${m.severity==="error"?"error":"warning"}`,children:[s.jsx("div",{className:"sys-issue-head",children:s.jsx("h3",{className:"sys-issue-title",children:m.title})}),s.jsx("p",{className:"sys-issue-body",children:m.summary}),m.actionCommand&&s.jsx("div",{className:"sys-issue-action",children:s.jsx("code",{className:"sys-code-inline",children:m.actionCommand})})]},j))}),s.jsx("button",{type:"button",className:"s-btn",style:{marginTop:12},onClick:()=>b(null,null),children:"Clear selection"})]}):s.jsxs("div",{className:"sys-inspector-empty",children:[s.jsx("p",{children:"Node not found."}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>b(null,null),children:"Clear"})]})}const o=a,T=Object.values(o.nodes).filter(l=>l.id!==o.localNode?.id).length,A=o.tailscale.onlineCount??0,L=o.localNode?.hostName?.split(".")[0]??o.localNode?.name??o.identity.name??"this broker";return s.jsxs("div",{className:"sys-inspector-content mesh-summary",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:L}),s.jsx("span",{className:"mesh-summary-mode",children:o.identity.modeLabel})]}),s.jsx("section",{className:"mesh-summary-section",children:s.jsxs("div",{className:"mesh-summary-counts",children:[s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:x.total}),s.jsx("span",{className:"mesh-summary-count-label",children:"agents"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--working",children:[s.jsx("span",{className:"mesh-summary-count-value",children:x.working}),s.jsx("span",{className:"mesh-summary-count-label",children:"working"})]}),s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:x.ready}),s.jsx("span",{className:"mesh-summary-count-label",children:"ready"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--offline",children:[s.jsx("span",{className:"mesh-summary-count-value",children:x.notReady}),s.jsx("span",{className:"mesh-summary-count-label",children:"not ready"})]})]})}),k.length>0&&s.jsxs("section",{className:"mesh-summary-section",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"By harness"}),s.jsx("div",{className:"mesh-summary-harness",children:k.map(l=>s.jsxs("div",{className:"mesh-summary-harness-row",children:[s.jsx("span",{className:"mesh-summary-harness-name",children:l.label}),s.jsx("span",{className:"mesh-summary-harness-count",children:l.total}),l.working>0&&s.jsxs("span",{className:"mesh-summary-harness-working",children:[l.working," working"]})]},l.label))})]}),s.jsxs("section",{className:"mesh-summary-section",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Peers"}),s.jsxs("div",{className:"mesh-summary-peers",children:[s.jsxs("div",{className:"mesh-summary-peer-row",children:[s.jsx("span",{className:"mesh-summary-peer-label",children:"Mesh"}),s.jsx("span",{className:"mesh-summary-peer-value",children:T})]}),o.tailscale.available&&s.jsxs("div",{className:"mesh-summary-peer-row",children:[s.jsx("span",{className:"mesh-summary-peer-label",children:"Tailnet"}),s.jsx("span",{className:`mesh-summary-peer-value${o.tailscale.running?"":" mesh-summary-peer-value--dim"}`,children:o.tailscale.running?`${A} online`:"stopped"})]})]})]}),s.jsxs("section",{className:"mesh-summary-section mesh-summary-reach",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Mesh"}),s.jsx(H,{joined:P(o),busy:C,tailscaleAvailable:o.tailscale.available,onJoin:()=>{M()},onLeave:()=>{S()}}),N&&s.jsx("div",{className:`sys-banner mesh-action-message sys-banner-${N.tone}`,children:s.jsx("span",{children:N.text})})]})]})}function H({joined:a,busy:t,tailscaleAvailable:i,onJoin:r,onLeave:c}){return s.jsxs("div",{className:"mesh-reach",children:[s.jsxs("label",{className:"mesh-join-toggle",children:[s.jsx("input",{type:"checkbox",checked:a,disabled:t,onChange:()=>{a?c():r()}}),s.jsx("span",{className:"mesh-join-toggle-copy",children:t?"Working…":a?"On mesh":"Join mesh"})]}),!i&&!a&&s.jsx("p",{className:"mesh-join-hint",children:"Tailscale can add automatic discovery; explicit seeds and LAN peers still work."}),a&&s.jsx("p",{className:"mesh-join-hint",children:"Mesh membership is on. Reachability is reported separately above."})]})}export{Is as MeshInspectorPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,j as e}from"./index-CZ-05hKz.js";import{u as lt}from"./Provider-B2xuo3rf.js";import{o as Me}from"./openContent-C6XO6kr5.js";import{a as W}from"./api-Co9aQ2Jw.js";import{u as ot}from"./sse-CiOSzE5n.js";import{u as dt}from"./tail-events-BMQmSx1n.js";import{n as ut,a as mt,s as _e,c as Be}from"./colors-BtO5_zlx.js";import{A as pt}from"./AgentLiveActions-BwuzOE8h.js";import{i as ht,a as vt,c as xt}from"./message-visibility-DwxgcgYK.js";import{h as ft,j as jt,k as gt,m as Nt,c as We,l as yt}from"./conversation-model-CwF6Y9gx.js";import{c as It,e as wt,t as F,f as oe}from"./time-Dhsh_2EG.js";import{b as St}from"./router-DJj2WbDg.js";import{T as Tt}from"./TmuxPeek-V9dGESfO.js";import{S as bt}from"./scroll-text-DO0GQzvN.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./terminal-takeover-DANQfTcy.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";/* empty css */import"./refresh-cw-BRn9Oxxl.js";const kt=20;function de(t){if(!t)return null;const s=t.replace(/[\\/]+$/,"");return s?s.split(/[\\/]/).filter(Boolean).at(-1)??s:null}function ue(t){const s=t?.trim();return s?s.length>18?`${s.slice(0,8)}...${s.slice(-6)}`:s:null}function b(t){const s=new Set,a=[];for(const c of t){const m=c?.trim();if(!m)continue;const h=m.toLowerCase();s.has(h)||(s.add(h),a.push(m))}return a}function Ue(t,s){const a=t?.trim().replace(/[\\/]+$/,""),c=s.trim().replace(/[\\/]+$/,"");if(!a||!c)return!1;if(a===c)return!0;if(c.startsWith("~/")){const m=c.slice(1);if(a.endsWith(m)||a.includes(`${m}/`))return!0}if(a.startsWith("~/")){const m=a.slice(1);if(c.endsWith(m)||c.includes(`${m}/`))return!0}return a.startsWith(`${c}/`)||c.startsWith(`${a}/`)}function Ve(t,s){const a=t?.trim().toLowerCase(),c=s.trim().toLowerCase();return!a||!c?!1:a.includes(c)||c.includes(a)}function He(t,s){const a=t?.trim().toLowerCase(),c=s.trim().toLowerCase();return!a||!c?!1:a===c}function Ct(t){const{activeSessionId:s,agent:a,sessionMeta:c}=t,m=b([s,a?.harnessSessionId]),h=b([a?.cwd,a?.projectRoot,c?.workspaceRoot]),r=b([a?.project,de(a?.cwd),de(a?.projectRoot),de(c?.workspaceRoot)]).filter(U=>U.length>2),o=b([...m.slice(0,2),...r.slice(0,2)]).join("|");return{sessionIds:m,paths:h,projects:r,query:o}}function he(t,s){return!!(s.sessionIds.some(a=>Ve(t.sessionId,a))||s.paths.some(a=>Ue(t.cwd,a))||s.projects.some(a=>He(t.project,a)))}function At(t,s){const a=s.filter(r=>he(r,t)),c=b(a.filter(r=>t.sessionIds.some(o=>Ve(r.sessionId,o))).map(r=>r.sessionId));if(c[0])return c[0];const m=b(a.filter(r=>t.paths.some(o=>Ue(r.cwd,o))).map(r=>r.sessionId));if(m[0])return m[0];const h=b(a.filter(r=>t.projects.some(o=>He(r.project,o))).map(r=>r.sessionId));return h[0]?h[0]:t.paths[0]?t.paths[0]:t.sessionIds[0]?t.sessionIds[0]:t.projects[0]?t.projects[0]:t.query}function G(t,s){const a=new Map;for(const c of[...s,...t])a.set(c.id,c);return[...a.values()].sort((c,m)=>It(c.ts,m.ts)).slice(0,kt)}function Et(t){return t==="tool-result"?"tool result":t}function Lt(t){const s=t.replace(/\s+/g," ").trim();return s.length<=180?s:`${s.slice(0,177)}...`}const Rt={direct:"Conversation",channel:"Conversation",group_direct:"Conversation",thread:"Thread"},Pt=1800,$t=4800,Fe=2,Mt=120,_t=650,Bt=1800;function me(t,s){try{return JSON.stringify(t)===JSON.stringify(s)?t:s}catch{return s}}function ze(t){if(!t)return null;const s=t.replace(/[\\/]+$/,"");return s?s.split(/[\\/]/).filter(Boolean).at(-1)??s:null}function Wt(t){if(!t)return null;const s=t.replace(/[\\/]+$/,"");return s?s.replace(/^\/Users\/[^/]+(?=\/|$)/,"~"):null}function z(t){switch(t){case"queued":return"Queued";case"waking":return"Waking";case"waiting":return"Thinking";case"running":return"Working";default:return t.replace(/_/g," ")}}function Fs(){const{route:t,agents:s,navigate:a,apiConnection:c,reload:m}=lt(),h=St(t),r=t.view==="conversation"||t.view==="messages"?t.conversationId??null:null,[o,U]=i.useState(null),[E,ve]=i.useState([]),[L,xe]=i.useState(null),[Oe,V]=i.useState(!1),H=i.useCallback(async()=>{if(!r){U(null),ve([]),xe(null),V(!0);return}try{const[n,l,f]=await Promise.all([W(`/api/session/${encodeURIComponent(r)}`).catch(()=>null),W(`/api/flights?conversationId=${encodeURIComponent(r)}`).catch(()=>[]),W(`/api/messages?conversationId=${encodeURIComponent(r)}&limit=8`).catch(()=>[])]);U(p=>me(p,n)),ve(p=>me(p,l??[])),xe(p=>me(p,f?.filter(B=>!ht(B)).sort((B,rt)=>wt(B.createdAt,rt.createdAt)).at(-1)??null)),V(!0)}catch{V(!0)}},[r]);i.useEffect(()=>{V(!1),H()},[H]);const j=o?.agentId??null,d=i.useMemo(()=>j?s.find(n=>n.id===j)??null:null,[s,j]),O=d?.id??null,fe=ft(o),ee=jt({resolvedAgentId:O,sessionId:fe,machineId:h}),[je,ge]=i.useState(null),[R,te]=i.useState([]),[w,se]=i.useState([]),Ne=i.useRef([]),S=i.useRef(null),q=i.useRef(null),x=i.useRef([]),g=i.useRef(null),N=i.useRef(null),P=i.useRef(new Set),D=i.useCallback(()=>{S.current!==null&&(window.clearTimeout(S.current),S.current=null),q.current=null},[]),$=i.useCallback(()=>{if(!r)return;const n=Date.now(),l=q.current??n;q.current=l;const p=n-l>=$t?0:Pt;S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{S.current=null,q.current=null,H()},p)},[r,H]);i.useEffect(()=>D,[D]),i.useEffect(()=>{if(ge(null),!O)return;let n=!1;return W(`/api/agents/${encodeURIComponent(O)}/session-catalog`).then(l=>{n||ge(l)}).catch(()=>{}),()=>{n=!0}},[O]);const qe=gt({name:d?.name,agentName:o?.agentName,id:j,title:o?.title}),ye=d?Nt(d)??We(d.id)??d.id:j?We(j)??j:null,u=i.useMemo(()=>E.filter(yt).sort((n,l)=>(l.startedAt??0)-(n.startedAt??0))[0]??null,[E]);i.useEffect(()=>{P.current=new Set(E.map(n=>n.invocationId))},[E]),i.useEffect(()=>{D(),P.current.clear()},[D,r]),ot(n=>{if(r){if(n.kind==="message.posted"){n.payload?.message?.conversationId===r&&$();return}if(n.kind==="conversation.upserted"){n.payload?.conversation?.id===r&&$();return}if(n.kind==="invocation.requested"){const l=n.payload?.invocation;if(l?.conversationId===r){P.current.add(l.id),$();return}!l?.conversationId&&j&&l?.targetAgentId===j&&(P.current.add(l.id),$());return}if(n.kind==="flight.updated"){const l=n.payload?.flight;if(!l)return;(u?.id===l.id||u?.invocationId===l.invocationId||P.current.has(l.invocationId)||E.some(p=>p.id===l.id||p.invocationId===l.invocationId))&&$()}}});const v=je?.activeSessionId??d?.harnessSessionId??fe??o?.harnessSessionId??null,I=d?.harnessSessionId??o?.harnessSessionId??null,k=d?.harnessLogPath??null,y=i.useMemo(()=>Ct({activeSessionId:v,agent:d,sessionMeta:o}),[v,d,o]),ne=JSON.stringify({sessionIds:y.sessionIds,paths:y.paths,projects:y.projects}),M=y.sessionIds.length>0||y.paths.length>0||y.projects.length>0,K=i.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),N.current!==null&&(window.clearInterval(N.current),N.current=null),x.current=[]},[]),J=i.useCallback(()=>{K()},[K]),Ie=i.useCallback(()=>{if(N.current!==null||(g.current!==null&&(window.clearTimeout(g.current),g.current=null),x.current.length===0))return;const l=()=>{const f=x.current.slice(0,Fe);x.current=x.current.slice(Fe),f.length>0&&se(p=>G(p,f)),!(x.current.length>0)&&N.current!==null&&(window.clearInterval(N.current),N.current=null)};l(),x.current.length>0&&(N.current=window.setInterval(l,Mt))},[]),we=i.useCallback(n=>{N.current===null&&g.current===null&&(g.current=window.setTimeout(()=>{g.current=null,Ie()},n))},[Ie]);i.useEffect(()=>{Ne.current=w},[w]),i.useEffect(()=>K,[K]),i.useEffect(()=>{J(),te([]),se([])},[J,ne]),i.useEffect(()=>{if(!M)return;let n=!1;const l=new URLSearchParams({limit:"180",transcripts:"true"});return W(`/api/tail/recent?${l.toString()}`).then(f=>{if(n)return;const p=(f.events??[]).filter(B=>he(B,y));te(G([],p))}).catch(()=>{}),()=>{n=!0}},[M,ne]),dt(i.useCallback(n=>{M&&he(n,y)&&te(l=>G(l,[n]))},[M,ne])),i.useEffect(()=>{if(R.length===0){J(),se([]);return}const n=Ne.current,l=new Set([...n.map(p=>p.id),...x.current.map(p=>p.id)]),f=R.filter(p=>!l.has(p.id));f.length!==0&&(x.current=G(x.current,f),x.current.length>0&&we(n.length===0?_t:Bt))},[we,J,R]);const ae=i.useMemo(()=>w.flatMap(Ut).slice(0,5),[w]);if(!r)return e.jsx(Ft,{apiOffline:c.status==="offline",onRetry:()=>{m()}});if(!Oe)return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading conversation…"})})});const De=o?.kind?Rt[o.kind]??o.kind:"Conversation",Q=o?.workspaceRoot??null,ie=ze(Q),Y=Wt(Q),Se=o?.currentBranch??null,ce=d?.harness??o?.harness??null,Z=o?.lastMessageAt??L?.createdAt??null,Te=o?.messageCount??null,be=o?o.participantCount??o.participantIds.filter(n=>n!=="operator").length+1:null,C=d?.state??null,Ke=ut(C),Je=L?vt(L):null,ke=L?.body?.trim()||o?.preview?.trim()||null,Ce=ke?xt(ke):null,Ae=Je?null:L?.actorName??null,Ee=ue(v),_=v??I,Le=ue(_),Qe=ue(I),Re=!!(I&&I!==_),Pe=[ce,d?.transport].filter(Boolean).join(" · "),Ye=!!(v||I||k),T=!!(d?.terminalSurface?.backend==="tmux"||d?.transport==="tmux"&&d.harnessSessionId),A=!!(u||mt(C,d)),Ze=A?u?z(u.state):"In motion":"At rest",Xe=u?.summary?.trim()??(Z?`Last update ${F(Z)??"recently"}`:"No recent activity recorded"),re=[Se?`branch ${Se}`:null,ce,d?.transport].filter(Boolean),Ge=!!(ie||Y||re.length>0),et=A?"Live activity":T?"Terminal":"Activity",le=u?.summary?.trim()??(v&&!T?"Terminal session is live.":w.length>0&&!T?"Streaming matching Tail events.":null),X=At(y,R),tt=!!(d&&(u||v||R.length>0||T)),st=!T,nt=v?T?"Terminal session":"Trace session":u?"Session starting":"Session context",at=v?Le??v:u?z(u.state):"Waiting for a session id",$e=v?[ce,d?.transport,u?z(u.state):null].filter(Boolean).join(" · "):u?.summary?.trim()??le??null,it=()=>{ee&&Me(a,ee,{returnTo:t})},ct=()=>{Me(a,{view:"ops",mode:"tail",...X?{tailQuery:X}:{}},{returnTo:t})};return e.jsxs("div",{className:"ctx-panel ctx-panel--conversation",children:[e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:De}),e.jsxs("div",{className:"ctx-panel-conversation-card",children:[e.jsx("div",{className:"ctx-panel-conversation-title",children:qe}),ye&&e.jsxs("div",{className:"ctx-panel-conversation-handle",children:["@",ye]}),e.jsxs("div",{className:"ctx-panel-conversation-state",children:[e.jsx("span",{className:"ctx-panel-conversation-state-dot",style:{background:_e(C)}}),e.jsx("span",{children:Be(C)})]})]})]}),u&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Now"}),e.jsxs("div",{className:"ctx-panel-conversation-flight",children:[e.jsxs("div",{className:"ctx-panel-conversation-flight-row",children:[e.jsx("span",{className:"ctx-panel-conversation-flight-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-conversation-flight-time",children:F(u.startedAt)})]}),u.summary&&e.jsx("div",{className:"ctx-panel-conversation-flight-summary",children:u.summary})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Workspace"}),Ge?e.jsxs("div",{className:"ctx-panel-workspace-card",children:[e.jsxs("div",{className:"ctx-panel-workspace-head",children:[e.jsx("div",{className:"ctx-panel-workspace-kicker",children:"Project"}),e.jsx("div",{className:"ctx-panel-workspace-title",title:Q??ie??void 0,children:ie??"Unscoped workspace"})]}),Y&&e.jsx("div",{className:"ctx-panel-workspace-path",title:Q??Y,children:Y}),re.length>0&&e.jsx("div",{className:"ctx-panel-workspace-strip",children:re.map(n=>e.jsx("span",{className:"ctx-panel-workspace-chip",children:n},n))})]}):e.jsx("div",{className:"ctx-panel-empty",children:"No workspace metadata yet"})]}),Ye&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsxs("div",{className:"ctx-panel-session-card",children:[e.jsx("div",{className:"ctx-panel-session-head",children:e.jsxs("div",{className:"ctx-panel-session-primary",children:[Pe&&e.jsx("div",{className:"ctx-panel-session-kind",children:Pe}),_&&e.jsx("div",{className:"ctx-panel-session-id",title:_,children:Le??_})]})}),(Re||k)&&e.jsxs("div",{className:"ctx-panel-session-meta",children:[Re&&I&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness session"}),e.jsx("strong",{title:I,children:Qe??I})]}),k&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness log"}),e.jsx("strong",{title:k,children:ze(k)??k})]})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsxs("div",{className:`ctx-panel-activity-card${A?" ctx-panel-activity-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-activity-head",children:[e.jsx("span",{className:"ctx-panel-activity-dot",style:{background:A?"var(--green)":_e(C)}}),e.jsxs("div",{className:"ctx-panel-activity-main",children:[e.jsx("div",{className:"ctx-panel-activity-title",children:Ze}),e.jsx("div",{className:"ctx-panel-activity-sub",title:Z?oe(Z):void 0,children:Xe})]})]}),u&&e.jsxs("div",{className:"ctx-panel-activity-ledger",children:[e.jsx("span",{className:"ctx-panel-activity-ledger-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-activity-ledger-time",title:oe(u.startedAt),children:F(u.startedAt)})]}),e.jsxs("div",{className:"ctx-panel-activity-facts",children:[typeof Te=="number"&&e.jsx(pe,{label:"Messages",value:`${Te}`}),typeof be=="number"&&e.jsx(pe,{label:"People",value:`${be}`}),Ke&&e.jsx(pe,{label:"Agent",value:Be(C)})]})]})]}),Ce&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-preview",children:[e.jsx("div",{className:"ctx-panel-section-label",children:Ae?`Latest · ${Ae}`:"Latest"}),e.jsx("div",{className:"ctx-panel-conversation-preview-body",children:Ce})]}),tt&&d&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-live-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:[e.jsx("span",{children:et}),Ee&&e.jsx("span",{className:"ctx-panel-live-session",title:v??void 0,children:Ee})]}),e.jsxs("div",{className:`ctx-panel-live-card${A?" ctx-panel-live-card--active":""}`,children:[e.jsxs("div",{className:`ctx-panel-live-session-card${A?" ctx-panel-live-session-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-live-session-copy",children:[e.jsx("span",{children:nt}),e.jsx("strong",{title:v??void 0,children:at}),$e&&e.jsx("small",{children:$e})]}),e.jsx("div",{className:"ctx-panel-live-session-pulse","aria-hidden":"true",children:e.jsx("span",{})})]}),e.jsx(pt,{agent:d,catalog:je,navigate:a,returnTo:t,variant:"compact",className:"ctx-panel-live-actions"}),le&&e.jsx("div",{className:"ctx-panel-live-summary",children:le}),T&&e.jsx(Tt,{agentId:d.id,lines:24,columns:132,className:"ctx-panel-tmux-peek--conversation"}),ae.length>0&&e.jsxs("div",{className:"ctx-panel-live-files","aria-live":"polite",children:[e.jsxs("div",{className:"ctx-panel-live-files-label",children:[e.jsx("span",{children:"Files"}),e.jsx("strong",{children:ae.length})]}),e.jsx("ol",{className:"ctx-panel-live-file-list",children:ae.map(n=>e.jsxs("li",{className:`ctx-panel-live-file ctx-panel-live-file--${n.tone}`,title:`${n.path} · ${n.verb}`,children:[e.jsx("span",{className:"ctx-panel-live-file-mark",children:n.mark}),e.jsx("span",{className:"ctx-panel-live-file-path",children:qt(n.path)}),e.jsx("span",{className:"ctx-panel-live-file-time",children:F(n.ts)})]},`${n.eventId}:${n.path}`))})]}),st&&e.jsx("div",{className:"ctx-panel-live-stream","aria-live":"polite",children:w.length>0?e.jsx("ol",{className:"ctx-panel-live-events",children:w.map(n=>e.jsxs("li",{className:"ctx-panel-live-event",children:[e.jsx("span",{className:"ctx-panel-live-event-kind",children:Et(n.kind)}),e.jsx("span",{className:"ctx-panel-live-event-summary",children:Lt(n.summary)}),e.jsx("span",{className:"ctx-panel-live-event-time",title:oe(n.ts),children:F(n.ts)})]},n.id))}):e.jsx("div",{className:"ctx-panel-live-stream-empty",children:"Waiting for matching Tail events"})}),M&&e.jsxs("button",{type:"button",className:"ctx-panel-live-tail-button",onClick:ct,title:X?`Tail filter: ${X}`:"Open Tail",children:[e.jsx(bt,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Tail"})]})]})]}),ee&&e.jsx("section",{className:"ctx-panel-section ctx-panel-conversation-profile-section",children:e.jsxs("button",{type:"button",className:"ctx-panel-roster-button ctx-panel-conversation-profile-button",onClick:it,children:[e.jsx("span",{className:"ctx-panel-roster-label",children:d?"Open agent profile":"Open session trace"}),e.jsx("span",{className:"ctx-panel-roster-count",children:e.jsx("span",{children:"→"})})]})})]})}function Ft({apiOffline:t,onRetry:s}){return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsxs("div",{className:"ctx-panel-empty-card","data-tone":t?"error":"neutral",children:[e.jsx("div",{className:"ctx-panel-empty-card-title",children:t?"Context unavailable":"No conversation selected"}),e.jsx("div",{className:"ctx-panel-empty-card-detail",children:t?"Scout context will load after the server reconnects.":"Select a chat to inspect participants, sessions, and recent activity."}),t&&e.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:s,children:"Retry"})]})})})}function pe({label:t,value:s}){return e.jsxs("div",{className:"ctx-panel-fact",children:[e.jsx("span",{className:"ctx-panel-fact-value",children:s}),e.jsx("span",{className:"ctx-panel-fact-label",children:t})]})}const zt=/(?:["'`])?((?:~|\/|\.{1,2}\/|[A-Za-z0-9_.-]+\/)[^\s"'`),;]+?\.(?:ts|tsx|js|jsx|mjs|cjs|css|scss|swift|md|json|jsonc|yml|yaml|toml|sql|py|rs|go|sh|html|m|mm))(?:["'`])?/gi;function Ut(t){const s=new Set,a=[],c=Vt(t.summary);for(const m of t.summary.matchAll(zt)){const h=m[1]?.trim();if(!h)continue;const r=h.toLowerCase();s.has(r)||(s.add(r),a.push({eventId:t.id,path:h,verb:c,mark:Ot(c),tone:Ht(c),ts:t.ts}))}return a}function Vt(t){return/\b(created|create|wrote|write|edited|edit|modified|modify|updated|update|changed|change|patched|patch)\b/i.test(t)?"changed":/\b(read|opened|viewed|cat|sed)\b/i.test(t)?"read":"touched"}function Ht(t){return t==="changed"?"changed":t==="read"?"read":"touched"}function Ot(t){return t==="changed"?"+":t==="read"?"r":"·"}function qt(t){const s=t.replace(/[\\/]+$/g,""),a=s.split(/[\\/]/).filter(Boolean);return a.length<=2?s:`${a.at(-2)}/${a.at(-1)}`}export{Fs as ConversationInspector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as i}from"./index-CZ-05hKz.js";import{u as w}from"./Provider-B2xuo3rf.js";import{a as C}from"./api-Co9aQ2Jw.js";import{u as B}from"./sse-CiOSzE5n.js";import{t as g}from"./time-Dhsh_2EG.js";import{B as E,b as M}from"./BrokerScreen-fbPIouMw.js";import{b as S}from"./broker-display-Q75fupqG.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./index-BWHgHrtv.js";import"./EmptyState-CeBl0iGd.js";import"./clipboard-e3fSpeo7.js";import"./status-tone-BM_zuRy1.js";import"./openContent-C6XO6kr5.js";import"./BrokerMetadataPanel-BbREmsbK.js";import"./DispatchAftermath-DC1u9itO.js";import"./follow-route-BvcGtBIL.js";import"./arrow-up-right-CCfZXPqD.js";import"./ShikiPane-BfHc_3pM.js";import"./types-B0PlfpKc.js";/* empty css */import"./refresh-cw-BRn9Oxxl.js";import"./arrow-down-BydciYFZ.js";import"./external-link-Ckiyzjwo.js";import"./sparkles-Dy8p5xN8.js";import"./paperclip-B1UNGl5d.js";import"./plus-CuU_X0-8.js";import"./send-horizontal-CgLppsIC.js";import"./check-C18YQC90.js";import"./copy-Dtpx4FOE.js";import"./message-square-D9YYWE0x.js";import"./radio-Dm1ItnA4.js";import"./bot-B5sub1-i.js";function $(r){return`${Math.round(r*100)}%`}function R(r){switch(r){case"success":return"sent";case"failed_query":return"query";case"failed_delivery":return"delivery";default:return"attempt"}}function q(r){switch(r){case"dm":return"direct";case"channel":return"channel";case"broadcast":return"broadcast";case null:return"no route";default:return r}}function A(r){const t=new Map;for(const o of r){const n=q(o.route);t.set(n,(t.get(n)??0)+1)}return[...t.entries()].map(([o,n])=>({label:o,count:n})).sort((o,n)=>n.count-o.count||o.label.localeCompare(n.label)).slice(0,5)}function D(r){const t={sent:0,query:0,delivery:0,failures:0};for(const o of r)o.kind==="success"?t.sent+=1:o.kind==="failed_query"?t.query+=1:(o.kind==="failed_delivery"||o.kind==="delivery_attempt")&&(t.delivery+=1),S(o)&&(t.failures+=1);return t}function L(){const{inspectBrokerAttempt:r}=w(),[t,o]=i.useState(null),[n,f]=i.useState(null),l=i.useCallback(async()=>{try{const s=await C(M());o(s),f(null)}catch(s){f(s instanceof Error?s.message:String(s))}},[]);i.useEffect(()=>{l()},[l]),B(s=>{(s.kind==="message.posted"||s.kind==="delivery.planned"||s.kind==="delivery.attempted"||s.kind==="delivery.state.changed"||s.kind==="scout.dispatched")&&l()});const h=i.useMemo(()=>t?[...t.failedQueries,...t.failedDeliveries].sort((s,m)=>m.ts-s.ts).slice(0,4):[],[t]),v=i.useMemo(()=>t?t.attempts.slice().sort((s,m)=>m.ts-s.ts).slice(0,5):[],[t]),j=i.useMemo(()=>t?A(t.attempts):[],[t]),a=i.useMemo(()=>t?D(t.attempts):null,[t]),b=i.useCallback(s=>{r(s),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:420}}))},[r]);if(!t&&!n)return e.jsx("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:e.jsx(u,{title:"Dispatch context",status:"Loading broker ledger..."})});if(!t)return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsx(u,{title:"Dispatch context",status:"Broker diagnostics unavailable"}),e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5 text-sm leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:n})]});const c=t.attempts.length,y=t.ledger.hasMore.attempts?"+":"",N=c>0&&a?a.failures/c:0;return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs(u,{title:"Dispatch context",status:`${c}${y} latest route${c===1?"":"s"}`,children:[e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(d,{label:"Sent",value:`${a?.sent??0}`}),e.jsx(d,{label:"Query",value:`${a?.query??0}`}),e.jsx(d,{label:"Delivery",value:`${a?.delivery??0}`})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-2 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsxs("span",{children:[$(N)," failed"]}),e.jsx("span",{children:g(t.generatedAt)})]})]}),e.jsx(p,{label:"Route mix",children:e.jsx(_,{items:j,empty:"No route records visible"})}),e.jsx(p,{label:"Needs attention",children:h.length===0?e.jsx(x,{children:"No failed routes in history."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:h.map(s=>e.jsx(k,{attempt:s,onOpen:b},s.id))})}),e.jsx(p,{label:"Recent dispatch",children:v.length===0?e.jsx(x,{children:"No recent dispatch rows."}):e.jsx("div",{className:"flex flex-col gap-1",children:v.map(s=>e.jsx(k,{attempt:s,onOpen:b,compact:!0},s.id))})})]})}function u({title:r,status:t,children:o}){return e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5",children:[e.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),e.jsx("div",{className:"mt-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-soft)]",children:t}),o]})}function d({label:r,value:t}){return e.jsxs("div",{className:"min-w-0 rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-bg)] px-1.5 py-1",children:[e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:r}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:t})]})}function p({label:r,children:t}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),t]})}function _({items:r,empty:t}){return r.length===0?e.jsx(x,{children:t}):e.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(o=>e.jsxs("span",{className:"rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 font-mono text-xs text-[var(--scout-chrome-ink-soft)]",title:`${o.count} ${o.label}`,children:[o.label," ",o.count]},o.label))})}function x({children:r}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:r})}function k({attempt:r,onOpen:t,compact:o=!1}){return e.jsxs("button",{type:"button",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5 text-left transition-colors hover:border-[var(--scout-chrome-border)]",onClick:()=>t(r),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-bg)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:R(r.kind)}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:r.detail}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(r.ts)})]}),!o&&e.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{className:"truncate",children:r.actorName??"unknown"}),e.jsx("span",{className:"shrink-0",children:"->"}),e.jsx("span",{className:"truncate",children:r.target??"none"})]})]})}function Ue({selectedAttempt:r,navigate:t,onClose:o}){return r?e.jsx(E,{attempt:r,navigate:t,onClose:o}):e.jsx(L,{})}export{Ue as BrokerRight};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-CZ-05hKz.js";import{u as h}from"./Provider-B2xuo3rf.js";import{o as j}from"./openAgent-Dbv5wfuL.js";import{n as v,i as u,c as d}from"./colors-BtO5_zlx.js";import{A as b}from"./AgentAvatar-CYhf6twS.js";import{t as g}from"./time-Dhsh_2EG.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./openContent-C6XO6kr5.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";function lt(){const{agents:r,agentsLoaded:o,apiConnection:s,navigate:a,route:f}=h(),n=e=>j(a,e,{returnTo:f});if(!o)return t.jsx("div",{className:"flex h-full flex-col justify-center","aria-busy":"true",children:t.jsxs("div",{className:"base-rail-loading",role:"status","aria-label":"Loading agent roster",children:[t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"})]})});if(r.length===0)return t.jsxs("div",{className:"flex h-full flex-col items-center justify-center px-4 text-center font-mono text-sm leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:[t.jsx("div",{className:"mb-1 uppercase tracking-[0.15em]",children:s.status==="offline"?"Roster unavailable":"No agents"}),t.jsx("div",{children:s.status==="offline"?s.message:"Connect an agent to see your roster here."})]});const i=r.filter(e=>{const x=v(e.state,e);return x==="in_turn"||x==="in_flight"}),l=r.filter(e=>u(e.state,e)&&!i.includes(e)),m=r.filter(e=>!u(e.state,e));return t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[i.length>0&&t.jsx(c,{label:"In progress",count:i.length,children:i.map(e=>t.jsx(p,{agent:e,onOpen:n,subLabel:d(e.state,e)},e.id))}),l.length>0&&t.jsx(c,{label:"Callable",count:l.length,children:l.map(e=>t.jsx(p,{agent:e,onOpen:n},e.id))}),m.length>0&&t.jsx(c,{label:"Blocked",count:m.length,children:m.map(e=>t.jsx(p,{agent:e,onOpen:n,subLabel:d(e.state,e),dim:!0},e.id))})]})}function c({label:r,count:o,children:s}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsxs("div",{className:"flex items-baseline justify-between mb-1.5",children:[t.jsx("span",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),t.jsx("span",{className:"text-2xs font-mono tabular-nums text-[var(--scout-chrome-ink-ghost)]",children:o})]}),t.jsx("div",{className:"flex flex-col gap-0.5",children:s})]})}function p({agent:r,onOpen:o,subLabel:s,dim:a}){return t.jsxs("button",{onClick:()=>o(r),className:`group flex items-center gap-2.5 px-2 py-1.5 rounded-sm text-left transition-colors ${a?"opacity-60 hover:opacity-100 hover:bg-[var(--scout-chrome-hover)]":"hover:bg-[var(--scout-chrome-hover)]"}`,children:[t.jsx(b,{agent:r,placement:"row"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"truncate font-medium text-[var(--scout-chrome-ink)]",children:r.name}),s?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:s}):r.updatedAt?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-ghost)]",children:g(r.updatedAt)}):null]})]})}export{lt as HomeRight};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as d,j as s}from"./index-
|
|
2
|
-
`)}function ds({worktree:n,project:t,generatedAt:u}){const[l,p]=d.useState(""),[i,T]=d.useState("scout"),[h,k]=d.useState(!1),[R,g]=d.useState(null),[O,A]=d.useState(null),[B,K]=d.useState(!1),x=d.useMemo(()=>n?U(n):[],[n]),E=d.useMemo(()=>x.slice(0,8),[x]),I=d.useMemo(()=>{if(i==="scout")return"Scout";const e=i.replace(/^agent:/,""),c=E.find(m=>m.id===e);return c?$(c):"Agent"},[E,i]);async function w(){const e=l.trim();if(!(!e||h||!n||!t)){k(!0),g(null),A(null);try{const c=rs(e,n,t);if(i==="scout")await P("/api/send",{method:"POST",body:JSON.stringify({body:c})}),g("Sent to Scout");else{const m=i.replace(/^agent:/,"");await P("/api/ask",{method:"POST",body:JSON.stringify({body:c,targetAgentId:m,targetLabel:m,metadata:{source:"repo-watch",originSurface:"repo-watch",handoffKind:"repo-watch-agent-ask",targetAgentId:m}})}),g(`Sent to ${I}`)}p("")}catch(c){A(c instanceof Error?c.message:String(c))}finally{k(!1)}}}if(!n||!t)return s.jsx("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:s.jsxs("div",{className:"rw-ctx-empty",children:[s.jsx("span",{className:"eb",children:"CONTEXT · WORKTREE"}),s.jsx("span",{className:"msg",children:"Select a worktree to inspect"})]})});const a=n,r=a.branch,N=5,f=x.length+a.sessions.length,b=!B&&f>N,y=b?x.slice(0,N):x,D=b?a.sessions.slice(0,Math.max(0,N-y.length)):a.sessions,q=f-y.length-D.length,L=ts(a),j=M(a),v=H(a),{add:S,del:C,has:G}=X(a),W=S+C||1,F=[{label:"staged",n:a.status.staged},{label:"unstaged",n:a.status.unstaged},{label:"untracked",n:a.status.untracked},{label:"conflicts",n:a.status.conflicts,cls:"conf"}].filter(e=>e.n>0);return s.jsxs("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:[s.jsxs("div",{className:"ctx-h",children:[s.jsx("div",{className:"ctx-eyebrow",children:s.jsx("span",{children:"CONTEXT · WORKTREE"})}),s.jsxs("div",{className:"ctx-repo",children:[s.jsx("span",{className:"dot "+V(a)}),s.jsx("span",{className:"rn",children:t.name}),s.jsx("span",{className:"ctx-state "+L.cls,children:L.label})]}),s.jsx("div",{className:"ctx-branch",children:s.jsx(as,{branch:r,fallback:a.name})}),s.jsxs("div",{className:"ctx-path",children:[a.path,r.upstream?s.jsxs("span",{className:"ref",children:[" · ",r.upstream]}):null]})]}),s.jsxs("div",{className:"ctx-stats",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.ahead>0?" mint":" dim"),children:["↑",r.ahead]}),s.jsx("div",{className:"k",children:"AHEAD"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.behind>0?" amber":" dim"),children:["↓",r.behind]}),s.jsx("div",{className:"k",children:"BEHIND"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"v"+(a.status.changedFiles>0?"":" dim"),children:a.status.changedFiles}),s.jsx("div",{className:"k",children:"FILES"})]})]}),F.length>0?s.jsx("div",{className:"ctx-breakdown",children:F.map(e=>s.jsxs("span",{className:"ctx-chip"+(e.cls?" "+e.cls:""),children:[s.jsx("span",{className:"n",children:e.n}),e.label]},e.label))}):null,s.jsxs("div",{className:"ctx-body",children:[a.attentionReasons.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTENTION"}),s.jsx("span",{className:"n",children:a.attentionReasons.length})]}),s.jsx("div",{className:"ctx-why",children:a.attentionReasons.map((e,c)=>s.jsx("span",{className:"pill",children:e},c))})]}):null,a.error?s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"SCAN ERROR"})}),s.jsx("div",{className:"ctx-err",children:a.error})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"CHURN"}),s.jsx("span",{className:"n",children:j.has?"reviewable":"working tree"})]}),G?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ctx-churn",children:[s.jsxs("span",{className:"nums",children:[s.jsxs("span",{className:"add",children:["+",o(S)]}),s.jsx("span",{className:"sl",children:"/"}),s.jsxs("span",{className:"del",children:["−",o(C)]})]}),s.jsxs("span",{className:"cbar",title:`+${o(S)} −${o(C)}`,children:[s.jsx("span",{className:"g",style:{width:S/W*100+"%"}}),s.jsx("span",{className:"r",style:{width:C/W*100+"%"}})]})]}),s.jsxs("span",{className:"ctx-churn-clean",children:[j.has?`branch +${o(j.add)} −${o(j.del)}`:null,j.has&&v.has?" · ":null,v.has?`working tree +${o(v.add)} −${o(v.del)}`:null]})]}):s.jsx("div",{className:"ctx-churn-clean",children:a.status.clean?"working tree clean":"no line changes"})]}),a.status.files.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"FILES CHANGED"}),s.jsx("span",{className:"n",children:a.status.files.length})]}),a.status.files.map(e=>{const c=Y(e.status),{dir:m,file:J}=ls(e.path);return s.jsxs("div",{className:"ctx-fchg",children:[s.jsx("span",{className:"badge",style:{color:Q(c),background:z(c)},title:e.status,children:_(e.status)}),s.jsxs("span",{className:"fp",title:e.path,children:[s.jsx("span",{className:"dir",children:m}),J]})]},e.path)})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"LAST COMMIT"})}),s.jsx("div",{className:"ctx-commit",children:a.lastCommitAt!=null||r.head?s.jsxs(s.Fragment,{children:[r.head?s.jsx("span",{className:"hash",children:r.head.slice(0,7)}):null,s.jsxs("span",{className:"t",children:[Z(a.lastCommitAt,u)," ago"]})]}):s.jsx("span",{className:"none",children:"no commit data"})})]}),s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTACHED SESSIONS"}),s.jsxs("span",{className:"n",children:[x.length," handle",x.length===1?"":"s",a.sessions.length>0?` · ${a.sessions.length} session${a.sessions.length===1?"":"s"}`:""]})]}),f>0?s.jsxs(s.Fragment,{children:[y.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d "+(ss(e)?"on":"off")}),s.jsx("span",{className:"h",children:$(e)}),s.jsx("span",{className:"role",children:cs(e)})]},$(e))),D.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d off"}),s.jsx("span",{className:"h",children:es(e)}),s.jsx("span",{className:"role",children:"SESSION"})]},e.id)),f>N?s.jsx("button",{type:"button",className:"ctx-more",onClick:()=>K(e=>!e),"aria-expanded":!b,children:b?`+${q} more`:"Show less"}):null]}):s.jsx("div",{className:"ctx-none",children:"no attached sessions"})]})]}),s.jsxs("div",{className:"ctx-ask",children:[s.jsx("textarea",{value:l,onChange:e=>{p(e.currentTarget.value),g(null),A(null)},onKeyDown:e=>{e.stopPropagation(),(e.metaKey||e.ctrlKey)&&e.key==="Enter"&&(e.preventDefault(),w())},disabled:h,rows:3,placeholder:i==="scout"?"Message Scout about this worktree":"Message this agent about the worktree"}),s.jsxs("div",{className:"ctx-ask-bar",children:[s.jsxs("select",{value:i,onChange:e=>T(e.currentTarget.value),onKeyDown:e=>e.stopPropagation(),disabled:h,"aria-label":"Message target",children:[s.jsx("option",{value:"scout",children:"Scout"}),E.map(e=>s.jsx("option",{value:`agent:${e.id}`,children:$(e)},e.id))]}),s.jsx("button",{className:"ctx-btn primary",type:"button",disabled:h||l.trim().length===0,onClick:()=>{w()},children:h?"Sending":"Send"})]}),s.jsxs("div",{className:"ctx-ask-foot",children:[O?s.jsx("span",{className:"err",children:O}):R?s.jsx("span",{className:"ok",children:R}):s.jsxs("span",{children:["Repo Watch context included · ",I]}),s.jsx("button",{type:"button",title:"Copy worktree path",onClick:()=>{navigator.clipboard?.writeText(a.path)},children:"Copy path"})]})]})]})}function
|
|
1
|
+
import{r as d,j as s}from"./index-CZ-05hKz.js";/* empty css */import{a as P}from"./api-Co9aQ2Jw.js";import{u as U,a as $,b as M,c as H,r as X,w as V,f as o,d as Y,e as _,t as z,g as Q,h as Z,i as ss,s as es}from"./ui-LM8pS8qE.js";import{B as as,u as ns}from"./selection-bridge-i2S9zpf8.js";import"./perf-PX8Rx0EP.js";function ts(n){return n.error!=null?{label:"SCAN ERR",cls:"err"}:n.status.conflicts>0?{label:"CONFLICT",cls:"conflict"}:n.status.clean?{label:"CLEAN",cls:"clean"}:{label:"DIRTY",cls:"dirty"}}function cs(n){const t=(n.state??"").toLowerCase();return t==="active"?"ACTIVE":t==="idle"?"IDLE":t==="waiting"?"WAITING":"—"}function ls(n){const t=n.lastIndexOf("/");return t<0?{dir:"",file:n}:{dir:n.slice(0,t+1),file:n.slice(t+1)}}function is(n){return n.status.clean?"clean":`staged ${n.status.staged}, unstaged ${n.status.unstaged}, untracked ${n.status.untracked}, conflicts ${n.status.conflicts}, changed files ${n.status.changedFiles}`}function rs(n,t,u){const l=["Operator request:",n,"","Repo Watch context:",`- Project: ${u.name}`,`- Project root: ${u.root}`,`- Project attention: ${u.attention}`,`- Worktree: ${t.path}`,`- Branch: ${t.branch.name??t.branch.head??"detached"}`];t.branch.upstream&&l.push(`- Upstream: ${t.branch.upstream}`),l.push(`- Drift: ahead ${t.branch.ahead}, behind ${t.branch.behind}`,`- Status: ${is(t)}`);const p=M(t),i=H(t);if(p.has&&l.push(`- Branch churn: +${p.add} -${p.del}`),i.has&&l.push(`- Working-tree churn: +${i.add} -${i.del}`),t.attentionReasons.length>0&&l.push(`- Attention reasons: ${t.attentionReasons.join("; ")}`),t.status.files.length>0){const T=t.status.files.slice(0,8).map(h=>`${h.status}: ${h.path}`).join(", ");l.push(`- Changed files: ${T}`)}return l.join(`
|
|
2
|
+
`)}function ds({worktree:n,project:t,generatedAt:u}){const[l,p]=d.useState(""),[i,T]=d.useState("scout"),[h,k]=d.useState(!1),[R,g]=d.useState(null),[O,A]=d.useState(null),[B,K]=d.useState(!1),x=d.useMemo(()=>n?U(n):[],[n]),E=d.useMemo(()=>x.slice(0,8),[x]),I=d.useMemo(()=>{if(i==="scout")return"Scout";const e=i.replace(/^agent:/,""),c=E.find(m=>m.id===e);return c?$(c):"Agent"},[E,i]);async function w(){const e=l.trim();if(!(!e||h||!n||!t)){k(!0),g(null),A(null);try{const c=rs(e,n,t);if(i==="scout")await P("/api/send",{method:"POST",body:JSON.stringify({body:c})}),g("Sent to Scout");else{const m=i.replace(/^agent:/,"");await P("/api/ask",{method:"POST",body:JSON.stringify({body:c,targetAgentId:m,targetLabel:m,metadata:{source:"repo-watch",originSurface:"repo-watch",handoffKind:"repo-watch-agent-ask",targetAgentId:m}})}),g(`Sent to ${I}`)}p("")}catch(c){A(c instanceof Error?c.message:String(c))}finally{k(!1)}}}if(!n||!t)return s.jsx("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:s.jsxs("div",{className:"rw-ctx-empty",children:[s.jsx("span",{className:"eb",children:"CONTEXT · WORKTREE"}),s.jsx("span",{className:"msg",children:"Select a worktree to inspect"})]})});const a=n,r=a.branch,N=5,f=x.length+a.sessions.length,b=!B&&f>N,y=b?x.slice(0,N):x,D=b?a.sessions.slice(0,Math.max(0,N-y.length)):a.sessions,q=f-y.length-D.length,L=ts(a),j=M(a),v=H(a),{add:S,del:C,has:G}=X(a),W=S+C||1,F=[{label:"staged",n:a.status.staged},{label:"unstaged",n:a.status.unstaged},{label:"untracked",n:a.status.untracked},{label:"conflicts",n:a.status.conflicts,cls:"conf"}].filter(e=>e.n>0);return s.jsxs("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:[s.jsxs("div",{className:"ctx-h",children:[s.jsx("div",{className:"ctx-eyebrow",children:s.jsx("span",{children:"CONTEXT · WORKTREE"})}),s.jsxs("div",{className:"ctx-repo",children:[s.jsx("span",{className:"dot "+V(a)}),s.jsx("span",{className:"rn",children:t.name}),s.jsx("span",{className:"ctx-state "+L.cls,children:L.label})]}),s.jsx("div",{className:"ctx-branch",children:s.jsx(as,{branch:r,fallback:a.name})}),s.jsxs("div",{className:"ctx-path",children:[a.path,r.upstream?s.jsxs("span",{className:"ref",children:[" · ",r.upstream]}):null]})]}),s.jsxs("div",{className:"ctx-stats",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.ahead>0?" mint":" dim"),children:["↑",r.ahead]}),s.jsx("div",{className:"k",children:"AHEAD"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.behind>0?" amber":" dim"),children:["↓",r.behind]}),s.jsx("div",{className:"k",children:"BEHIND"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"v"+(a.status.changedFiles>0?"":" dim"),children:a.status.changedFiles}),s.jsx("div",{className:"k",children:"FILES"})]})]}),F.length>0?s.jsx("div",{className:"ctx-breakdown",children:F.map(e=>s.jsxs("span",{className:"ctx-chip"+(e.cls?" "+e.cls:""),children:[s.jsx("span",{className:"n",children:e.n}),e.label]},e.label))}):null,s.jsxs("div",{className:"ctx-body",children:[a.attentionReasons.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTENTION"}),s.jsx("span",{className:"n",children:a.attentionReasons.length})]}),s.jsx("div",{className:"ctx-why",children:a.attentionReasons.map((e,c)=>s.jsx("span",{className:"pill",children:e},c))})]}):null,a.error?s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"SCAN ERROR"})}),s.jsx("div",{className:"ctx-err",children:a.error})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"CHURN"}),s.jsx("span",{className:"n",children:j.has?"reviewable":"working tree"})]}),G?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ctx-churn",children:[s.jsxs("span",{className:"nums",children:[s.jsxs("span",{className:"add",children:["+",o(S)]}),s.jsx("span",{className:"sl",children:"/"}),s.jsxs("span",{className:"del",children:["−",o(C)]})]}),s.jsxs("span",{className:"cbar",title:`+${o(S)} −${o(C)}`,children:[s.jsx("span",{className:"g",style:{width:S/W*100+"%"}}),s.jsx("span",{className:"r",style:{width:C/W*100+"%"}})]})]}),s.jsxs("span",{className:"ctx-churn-clean",children:[j.has?`branch +${o(j.add)} −${o(j.del)}`:null,j.has&&v.has?" · ":null,v.has?`working tree +${o(v.add)} −${o(v.del)}`:null]})]}):s.jsx("div",{className:"ctx-churn-clean",children:a.status.clean?"working tree clean":"no line changes"})]}),a.status.files.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"FILES CHANGED"}),s.jsx("span",{className:"n",children:a.status.files.length})]}),a.status.files.map(e=>{const c=Y(e.status),{dir:m,file:J}=ls(e.path);return s.jsxs("div",{className:"ctx-fchg",children:[s.jsx("span",{className:"badge",style:{color:Q(c),background:z(c)},title:e.status,children:_(e.status)}),s.jsxs("span",{className:"fp",title:e.path,children:[s.jsx("span",{className:"dir",children:m}),J]})]},e.path)})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"LAST COMMIT"})}),s.jsx("div",{className:"ctx-commit",children:a.lastCommitAt!=null||r.head?s.jsxs(s.Fragment,{children:[r.head?s.jsx("span",{className:"hash",children:r.head.slice(0,7)}):null,s.jsxs("span",{className:"t",children:[Z(a.lastCommitAt,u)," ago"]})]}):s.jsx("span",{className:"none",children:"no commit data"})})]}),s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTACHED SESSIONS"}),s.jsxs("span",{className:"n",children:[x.length," handle",x.length===1?"":"s",a.sessions.length>0?` · ${a.sessions.length} session${a.sessions.length===1?"":"s"}`:""]})]}),f>0?s.jsxs(s.Fragment,{children:[y.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d "+(ss(e)?"on":"off")}),s.jsx("span",{className:"h",children:$(e)}),s.jsx("span",{className:"role",children:cs(e)})]},$(e))),D.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d off"}),s.jsx("span",{className:"h",children:es(e)}),s.jsx("span",{className:"role",children:"SESSION"})]},e.id)),f>N?s.jsx("button",{type:"button",className:"ctx-more",onClick:()=>K(e=>!e),"aria-expanded":!b,children:b?`+${q} more`:"Show less"}):null]}):s.jsx("div",{className:"ctx-none",children:"no attached sessions"})]})]}),s.jsxs("div",{className:"ctx-ask",children:[s.jsx("textarea",{value:l,onChange:e=>{p(e.currentTarget.value),g(null),A(null)},onKeyDown:e=>{e.stopPropagation(),(e.metaKey||e.ctrlKey)&&e.key==="Enter"&&(e.preventDefault(),w())},disabled:h,rows:3,placeholder:i==="scout"?"Message Scout about this worktree":"Message this agent about the worktree"}),s.jsxs("div",{className:"ctx-ask-bar",children:[s.jsxs("select",{value:i,onChange:e=>T(e.currentTarget.value),onKeyDown:e=>e.stopPropagation(),disabled:h,"aria-label":"Message target",children:[s.jsx("option",{value:"scout",children:"Scout"}),E.map(e=>s.jsx("option",{value:`agent:${e.id}`,children:$(e)},e.id))]}),s.jsx("button",{className:"ctx-btn primary",type:"button",disabled:h||l.trim().length===0,onClick:()=>{w()},children:h?"Sending":"Send"})]}),s.jsxs("div",{className:"ctx-ask-foot",children:[O?s.jsx("span",{className:"err",children:O}):R?s.jsx("span",{className:"ok",children:R}):s.jsxs("span",{children:["Repo Watch context included · ",I]}),s.jsx("button",{type:"button",title:"Copy worktree path",onClick:()=>{navigator.clipboard?.writeText(a.path)},children:"Copy path"})]})]})]})}function js(){const{worktree:n,project:t,generatedAt:u,tone:l}=ns();return s.jsx("div",{className:"rw-scope rw-ctx-rail-scope tone-"+l,children:s.jsx(ds,{worktree:n,project:t,generatedAt:u})})}export{js as ReposInspector,js as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as e}from"./index-CZ-05hKz.js";import{u as P}from"./Provider-B2xuo3rf.js";import{a as g}from"./api-Co9aQ2Jw.js";import{u as A}from"./sse-CiOSzE5n.js";import{t as b}from"./time-Dhsh_2EG.js";import{o as k}from"./openContent-C6XO6kr5.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./index-BWHgHrtv.js";function f(t){const r=t.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return r[r.length-1]??t}function N(t){const n=t?.trim();if(!n)return null;const r=f(n);return r.endsWith(".jsonl")?r.slice(0,-6):r}function C(t){return t.workspaceRoot?f(t.workspaceRoot):t.agentName??"unassigned"}function L(t){return t.harness?.trim()||t.kind?.trim()||"scout"}function w(t){return t.project?.trim()||(t.cwd?f(t.cwd):null)||"unknown"}function y(t,n=4){const r=new Map;for(const c of t){const a=c.trim()||"unknown";r.set(a,(r.get(a)??0)+1)}return[...r.entries()].map(([c,a])=>({label:c,count:a})).sort((c,a)=>a.count-c.count||c.label.localeCompare(a.label)).slice(0,n)}function fe(){const{route:t,navigate:n}=P(),[r,c]=l.useState([]),[a,h]=l.useState(null),p=l.useCallback(async()=>{const[u,d]=await Promise.allSettled([g("/api/sessions"),g("/api/tail/discover")]);u.status==="fulfilled"&&c(u.value),d.status==="fulfilled"&&h(d.value)},[]);if(l.useEffect(()=>{p()},[p]),A(()=>{p()}),t.view!=="sessions")return null;const s=t.sessionId?r.find(u=>u.id===t.sessionId)??null:null;return s?e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:[e.jsx("div",{className:"text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:s.title}),e.jsx("div",{className:"text-xs font-mono uppercase tracking-wider text-cyan-400/70 mt-1",children:s.kind})]}),s.agentName&&e.jsxs(m,{label:"Agent",children:[e.jsx(x,{label:"Name",value:s.agentName}),s.harness&&e.jsx(x,{label:"Harness",value:s.harness})]}),(s.currentBranch||s.workspaceRoot)&&e.jsxs(m,{label:"Workspace",children:[s.currentBranch&&e.jsx(x,{label:"Branch",value:s.currentBranch}),s.workspaceRoot&&e.jsx(x,{label:"Root",value:s.workspaceRoot})]}),e.jsxs(m,{label:"Activity",children:[e.jsx(x,{label:"Messages",value:`${s.messageCount}`}),s.lastMessageAt&&e.jsx(x,{label:"Last",value:b(s.lastMessageAt)}),(s.participantCount??s.participantIds.length)>0&&e.jsx(x,{label:"Participants",value:`${s.participantCount??s.participantIds.length}`})]}),s.preview&&e.jsx(m,{label:"Preview",children:e.jsxs("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:['"',s.preview,'"']})})]}):e.jsx($,{sessions:r,discovery:a,navigate:n,route:t})}function $({sessions:t,discovery:n,navigate:r,route:c}){const a=n?.transcripts??[],h=l.useMemo(()=>y([...t.map(L),...a.map(o=>o.source||"unknown")],5),[t,a]),p=l.useMemo(()=>y([...t.map(C),...a.map(w)],5),[t,a]),s=l.useMemo(()=>a.slice().sort((o,i)=>i.mtimeMs-o.mtimeMs).slice(0,5),[a]),u=l.useMemo(()=>t.filter(o=>o.lastMessageAt).slice().sort((o,i)=>(i.lastMessageAt??0)-(o.lastMessageAt??0)).slice(0,5),[t]),d=n?.processes?.length??0,S=n?.totals.transcripts??a.length,R=d>0?"Live harness activity":"Quiet session surface";return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5",children:[e.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:"Sessions context"}),e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(v,{label:"Scout",value:`${t.length}`}),e.jsx(v,{label:"Raw",value:`${S}`}),e.jsx(v,{label:"Live",value:`${d}`})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-2 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{children:R}),e.jsxs("span",{children:[h.length," sources"]})]})]}),e.jsx(m,{label:"Sources",children:e.jsx(M,{items:h,empty:"No sources visible"})}),e.jsx(m,{label:"Project mix",children:e.jsx(M,{items:p,empty:"No projects visible"})}),e.jsx(m,{label:"Recent raw",children:s.length===0?e.jsx(j,{children:"No raw transcripts discovered."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:s.map(o=>{const i=N(o.sessionId)??N(o.transcriptPath);return e.jsxs("button",{type:"button",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5 text-left transition-colors hover:border-[var(--scout-chrome-border)]",onClick:()=>{i&&k(r,{view:"sessions",sessionId:i},{returnTo:c})},disabled:!i,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-bg)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:o.source||"raw"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:w(o)}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:b(o.mtimeMs)})]}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:i??f(o.transcriptPath)})]},`${o.source}:${o.transcriptPath}`)})})}),e.jsx(m,{label:"Recent Scout sessions",children:u.length===0?e.jsx(j,{children:"No recent Scout session messages."}):e.jsx("div",{className:"flex flex-col gap-1",children:u.map(o=>e.jsxs("button",{type:"button",className:"flex items-center gap-2 bg-transparent px-0 py-0.5 text-left",onClick:()=>k(r,{view:"sessions",sessionId:o.id},{returnTo:c}),children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink-soft)]",children:o.title}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:o.lastMessageAt?b(o.lastMessageAt):"-"})]},o.id))})})]})}function v({label:t,value:n}){return e.jsxs("div",{className:"min-w-0 rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-bg)] px-1.5 py-1",children:[e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:n})]})}function M({items:t,empty:n}){return t.length===0?e.jsx(j,{children:n}):e.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>e.jsxs("span",{className:"rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 font-mono text-xs text-[var(--scout-chrome-ink-soft)]",title:`${r.count} ${r.label}`,children:[r.label," ",r.count]},r.label))})}function j({children:t}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:t})}function m({label:t,children:n}){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}),n]})}function x({label:t,value:n}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",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-sm font-mono text-[var(--scout-chrome-ink)]",children:n})]})}export{fe as SessionsInspector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as y,j as e}from"./index-CZ-05hKz.js";import{a as O}from"./api-Co9aQ2Jw.js";import{a as r,t as f}from"./time-Dhsh_2EG.js";import{u as M,j as R}from"./mesh-ops-CvGyjK84.js";import{u as L}from"./mesh-view-store-BpxGm71b.js";import{u as H}from"./Provider-B2xuo3rf.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";function E(o){return o.state==="waiting"&&o.nextMoveOwnerId==="operator"&&o.waitingOn?.label==="Held by operator"}function t({label:o,value:c}){return c?e.jsxs("div",{className:"mesh-ops-detail-row",children:[e.jsx("span",{className:"mesh-ops-detail-label",children:o}),e.jsx("span",{className:"mesh-ops-detail-value",children:c})]}):null}function ye(){const{navigate:o}=H(),{items:c,hosts:h,selectedItemId:w,lab:A}=M(),{meshSnapshot:p}=L(),[i,x]=y.useState(null),[v,j]=y.useState(null),s=c.find(l=>l.id===w)??null,u=async l=>{if(!(!s||i)){x(l),j(null);try{await O(`/api/mesh-ops/items/${encodeURIComponent(s.id)}/${l}`,{method:"POST",body:"{}"}),R()}catch(d){j(d instanceof Error?d.message:String(d))}finally{x(null)}}};if(!s){const l=new Map;for(const n of c)n.hostNodeId&&l.set(n.hostNodeId,(l.get(n.hostNodeId)??0)+1);const d=p?.localNode?.id??null;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Mesh"}),h.map(n=>e.jsx(t,{label:n.nodeId===d?"this host":"peer",value:`${n.label} · ${l.get(n.nodeId)??0} items${n.liveSessionCount>0?` · ${n.liveSessionCount} live`:""}`},n.nodeId)),h.length===0&&e.jsx("div",{className:"ctx-panel-empty",children:"No hosts yet."})]}),e.jsx("div",{className:"ctx-panel-section",children:e.jsx("p",{className:"mesh-ops-inspector-note",children:"Select an item to inspect it. Counts are items attributed to each host; the map stays in the mesh screen."})})]})}if(s.kind==="session"&&s.session){const l=s.session;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"mesh-ops-inspector-header",children:[e.jsx("div",{className:"mesh-ops-inspector-title",children:s.title}),e.jsxs("div",{className:"mesh-ops-inspector-summary",children:[l.live?`Live ${l.harness} session`:l.endedAt!==null?`Ended ${l.harness} session`:`Lost ${l.harness} session — no end marker, last seen ${r(l.lastSeenAt)}`,l.alias?` · ${l.alias}`:""]})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsx(t,{label:"harness",value:l.harness}),e.jsx(t,{label:"state",value:l.endedAt!==null?"ended":l.state}),e.jsx(t,{label:"agent",value:s.ownerId}),e.jsx(t,{label:"started",value:l.startedAt!==null?r(l.startedAt):null}),e.jsx(t,{label:"last seen",value:r(l.lastSeenAt)}),e.jsx(t,{label:"ended",value:l.endedAt!==null?r(l.endedAt):null})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Venue"}),e.jsx(t,{label:"host",value:s.hostLabel}),e.jsx(t,{label:"project",value:s.projectRoot}),e.jsx(t,{label:"cwd",value:l.cwd})]})]})}const S=E(s),I=s.state==="done"||s.state==="cancelled",$=s.state==="open"||s.state==="working",C=S,m=s.state==="review",a=s.latestFlight,k=a!==null&&(a.state==="running"||a.state==="queued"),b=p?.localNode?.hostName?.split(".")[0]??p?.localNode?.name??"here",N=s.hostLabel??"unattributed",g=N===b||s.hostNodeId===null;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"mesh-ops-inspector-header",children:[e.jsx("div",{className:"mesh-ops-inspector-title",children:s.title}),s.summary&&e.jsx("div",{className:"mesh-ops-inspector-summary",children:s.summary})]}),A.routeStrip&&e.jsx("div",{className:"mesh-ops-routestrip","aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 260 40",className:"mesh-ops-routestrip-svg",children:[e.jsx("line",{x1:"24",y1:"18",x2:"236",y2:"18",className:`mesh-ops-routestrip-line${k&&!g?" mesh-ops-routestrip-line--moving":""}`}),e.jsx("rect",{x:"14",y:"12",width:"12",height:"12",rx:"2",className:"mesh-ops-routestrip-node"}),e.jsx("rect",{x:"234",y:"12",width:"12",height:"12",rx:"2",className:"mesh-ops-routestrip-node"}),e.jsx("text",{x:"20",y:"36",textAnchor:"middle",className:"mesh-ops-routestrip-label",children:b}),e.jsx("text",{x:"246",y:"36",textAnchor:"end",className:"mesh-ops-routestrip-label",children:g?"(same host)":N})]})}),!I&&e.jsxs("div",{className:"mesh-ops-actions",children:[C?e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u("release")},children:i==="release"?"Releasing…":"Release"}):$?e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u("hold")},children:i==="hold"?"Holding…":"Hold"}):null,(s.state==="review"||s.attention!=="silent")&&e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u(m?"accept":"clear")},title:m?"Accept this work item":"Dismiss this item from the attention queue",children:i==="accept"||i==="clear"?m?"Accepting…":"Clearing…":m?"Accept":"Clear"}),e.jsx("button",{type:"button",className:"mesh-ops-button",onClick:()=>o({view:"work",workId:s.id}),title:"Open the full work item",children:"Open item"})]}),v&&e.jsx("div",{className:"ctx-panel-empty","data-tone":"error",children:v}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"State"}),e.jsx(t,{label:"phase",value:s.currentPhase}),e.jsx(t,{label:"state",value:s.state}),e.jsx(t,{label:"attention",value:s.attention==="silent"?null:s.attention}),e.jsx(t,{label:"waiting on",value:s.waitingOn?.label??null}),e.jsx(t,{label:"acceptance",value:s.acceptanceState==="none"?null:s.acceptanceState}),e.jsx(t,{label:"priority",value:s.priority}),e.jsx(t,{label:"labels",value:s.labels.length>0?s.labels.join(", "):null})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Venue"}),e.jsx(t,{label:"owner",value:s.ownerName??s.ownerId}),e.jsx(t,{label:"host",value:s.hostLabel??(s.hostNodeId?s.hostNodeId:null)}),e.jsx(t,{label:"project",value:s.projectRoot})]}),a&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Latest flight"}),e.jsx(t,{label:"state",value:a.state}),e.jsx(t,{label:"summary",value:a.summary}),e.jsx(t,{label:"started",value:a.startedAt!==null?r(a.startedAt):null}),e.jsx(t,{label:"completed",value:a.completedAt!==null?r(a.completedAt):null}),s.activeFlightCount>0&&e.jsx(t,{label:"active",value:`${s.activeFlightCount} in flight`})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsx(t,{label:"last",value:s.lastMeaningfulSummary}),e.jsx(t,{label:"updated",value:`${f(s.updatedAt)} · created ${f(s.createdAt)}`})]})]})}export{ye as MeshOpsInspector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as d,j as e}from"./index-CZ-05hKz.js";import{u as k}from"./Provider-B2xuo3rf.js";import{c as y}from"./colors-BtO5_zlx.js";import{A as S}from"./AgentAvatar-CYhf6twS.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./text-CnZ0e1-V.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-BQ6t92tJ.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./api-Co9aQ2Jw.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./loader-circle-BiohlpM3.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";import"./voice-levels-Dcr3jglk.js";function ge(){const{route:t,agents:o,navigate:s}=k();if(t.view!=="terminal")return null;const r=t.agentId?o.find(i=>i.id===t.agentId)??null:null,l=t.mode??"takeover",[f,p]=d.useState(null);d.useEffect(()=>{if(t.view!=="terminal"||t.agentId||!t.terminalSurfaceKey){p(null);return}let i=!1;return T().then(g=>{i||p(C(g,t.terminalSessionId,t.terminalSurfaceKey))}).catch(()=>{i||p(null)}),()=>{i=!0}},[t.agentId,t.terminalSessionId,t.terminalSurfaceKey,t.view]);const j=f?R(f.surface):null,n=(r?$(r):null)??j,c=d.useMemo(()=>n?A(n):null,[n]);return r?e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsx(D,{agent:r}),e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),e.jsx(a,{label:"Backend",value:n?.backend??"pty"}),n&&e.jsx(a,{label:"Session",value:n.sessionName}),n?.paneId&&e.jsx(a,{label:"Pane",value:n.paneId}),e.jsx(a,{label:"State",value:y(r.state)})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c}),e.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[n&&e.jsx(m,{active:l==="observe",label:"Observe",onClick:()=>s(b(r.id,"observe"))}),e.jsx(m,{active:l==="takeover",label:"Takeover",onClick:()=>s(b(r.id,"takeover"))}),e.jsx(m,{label:"Profile",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"profile"})}),e.jsx(m,{label:"Trace",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"observe"})})]}),e.jsxs(u,{label:"Agent",children:[e.jsx(a,{label:"Harness",value:r.harness??"-"}),e.jsx(a,{label:"Transport",value:r.transport??"-"}),r.role&&e.jsx(a,{label:"Role",value:w(r.role)??r.role}),r.handle&&e.jsx(a,{label:"Handle",value:`@${r.handle}`}),r.updatedAt&&e.jsx(a,{label:"Updated",value:N(r.updatedAt)})]}),(r.project||r.branch||r.cwd||r.projectRoot)&&e.jsxs(u,{label:"Workspace",children:[r.project&&e.jsx(a,{label:"Name",value:r.project}),r.branch&&e.jsx(a,{label:"Branch",value:r.branch}),r.cwd&&e.jsx(a,{label:"Cwd",value:r.cwd}),!r.cwd&&r.projectRoot&&e.jsx(a,{label:"Root",value:r.projectRoot})]})]}):e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),t.agentId&&e.jsx(a,{label:"Agent",value:t.agentId}),n&&e.jsx(a,{label:"Backend",value:n.backend}),n&&e.jsx(a,{label:"Session",value:n.sessionName})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c})]})}function x(t){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(t)?t:`'${t.replace(/'/gu,"'\\''")}'`}function A(t){return t.backend==="tmux"?`tmux attach -t ${x(t.sessionName)}`:`${t.socketDir?`ZELLIJ_SOCKET_DIR=${x(t.socketDir)} `:""}zellij attach ${x(t.sessionName)}`}function b(t,o){return{view:"terminal",agentId:t,mode:o}}function $(t){return t.terminalSurface?t.terminalSurface:t.transport==="tmux"&&t.harnessSessionId?{backend:"tmux",sessionName:t.harnessSessionId,paneId:null,socketDir:null}:null}function v(t){return t==="observe"?"Read-only observe":"Interactive takeover"}function D({agent:t}){return e.jsx("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(S,{agent:t,placement:"row",size:32,presence:!1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.name}),t.handle&&e.jsxs("div",{className:"truncate font-mono text-xs text-cyan-400/70",children:["@",t.handle]})]})]})})}function m({active:t,label:o,onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:`h-7 rounded border px-2 font-mono text-2xs uppercase tracking-[0.1em] transition-colors ${t?"border-cyan-400/35 bg-cyan-400/[0.12] text-cyan-200":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] text-[var(--scout-chrome-ink-soft)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]"}`,children:o})}function h({label:t,command:o}){const[s,r]=d.useState(!1);return e.jsxs("details",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2",children:[e.jsx("summary",{className:"cursor-pointer select-none font-mono text-2xs uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mb-1.5 mt-2 flex items-center justify-end gap-2",children:e.jsx("button",{type:"button",className:"rounded border border-cyan-400/20 bg-cyan-400/[0.08] px-2 py-1 font-mono text-2xs uppercase tracking-[0.1em] text-cyan-100/80 hover:bg-cyan-400/[0.14]",onClick:()=>{I(o).then(l=>{l&&(r(!0),window.setTimeout(()=>r(!1),1200))})},children:s?"Copied":"Copy"})}),e.jsx("code",{className:"block select-text break-all rounded bg-black/25 p-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink)]",children:o})]})}function u({label:t,children:o}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),o]})}function a({label:t,value:o}){return e.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-right text-sm font-mono text-[var(--scout-chrome-ink)]",children:o})]})}export{ge as TerminalInspector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as e}from"./index-CZ-05hKz.js";import{u as j}from"./Provider-B2xuo3rf.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-Co9aQ2Jw.js";import{u as w}from"./sse-CiOSzE5n.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-Mp9mu_yd.js";import{C as I}from"./chevron-right-CzH-TaSF.js";import{M as C}from"./message-square-D9YYWE0x.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./index-BWHgHrtv.js";const M=5;function ve(){const{route:t,navigate:s}=j(),a=t.view==="work"?t.workId:null,[r,o]=u.useState(null),i=u.useCallback(async()=>{if(!a){o(null);return}try{o(await N(`/api/work/${encodeURIComponent(a)}`))}catch{o(null)}},[a]);if(u.useEffect(()=>{i()},[i]),w(()=>{a&&i()}),t.view!=="work")return null;if(!r)return e.jsx("div",{className:"flex h-full items-center justify-center px-4 text-center text-sm font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-ghost)]",children:"Loading work item…"});const d=O(r.state),m=T(r.attention),f=r.ownerName??r.ownerId??"Unassigned",l=r.nextMoveOwnerName??r.nextMoveOwnerId??null,h=l!==null&&(r.ownerId??null)!==(r.nextMoveOwnerId??null)&&l!==f,k=1+(h?1:0)+(r.priority?1:0)+2+(r.parentId?1:0)+(r.conversationId?1:0);return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar text-sm",children:[e.jsx("div",{className:"sticky top-0 z-10 border-b border-[var(--scout-chrome-border-soft)] bg-black/55 px-4 py-2 backdrop-blur",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.dot}`}),e.jsx("span",{className:`font-mono text-xs uppercase tracking-[0.15em] ${d.text}`,children:L(r.state)}),e.jsxs("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:f}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"px-1 text-[var(--scout-chrome-ink-ghost)]",children:"→"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:l})]})]}),m&&e.jsx("span",{className:"shrink-0 rounded border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-amber-300/90",children:m})]})}),e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[e.jsxs(c,{label:"Case facts",children:[e.jsx(n,{label:"Phase",value:r.currentPhase}),e.jsx(n,{label:"Acceptance",value:r.acceptanceState.replace(/_/g," ")}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority})]}),e.jsx(c,{label:"Timeline",children:r.timeline.length===0?e.jsx("div",{className:"text-xs text-[var(--scout-chrome-ink-faint)]",children:"No activity yet."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:r.timeline.slice(0,M).map(x=>e.jsx(W,{item:x,onOpen:x.conversationId?()=>b(s,{view:"conversation",conversationId:x.conversationId},{returnTo:t}):void 0},x.id))})}),e.jsxs(c,{label:"Routing",collapsible:!0,defaultOpen:!1,count:k,children:[e.jsx(n,{label:"Owner",value:f}),h&&l&&e.jsx(n,{label:"Next move",value:l}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority}),e.jsx(n,{label:"Children",value:`${r.activeChildWorkCount}`}),e.jsx(n,{label:"Flights",value:`${r.activeFlightCount}`}),r.lastMeaningfulAt&&e.jsx(n,{label:"Last update",value:g(r.lastMeaningfulAt)}),(r.conversationId||r.parentId)&&e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.conversationId&&e.jsx(v,{label:"Open thread",onClick:()=>b(s,{view:"conversation",conversationId:r.conversationId},{returnTo:t})}),r.parentId&&r.parentTitle&&e.jsx(v,{label:r.parentTitle,eyebrow:"Parent",onClick:()=>b(s,{view:"work",workId:r.parentId},{returnTo:t})})]})]}),e.jsxs(c,{label:"Record",collapsible:!0,defaultOpen:!1,children:[e.jsx(n,{label:"Case ID",value:r.id}),e.jsx(n,{label:"Created",value:p(r.createdAt)}),e.jsx(n,{label:"Updated",value:p(r.updatedAt)}),e.jsx(n,{label:"Last activity",value:p(r.lastMeaningfulAt)})]}),r.lastMeaningfulSummary&&e.jsxs(c,{label:"Hudson context",collapsible:!0,defaultOpen:!1,children:[e.jsx("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:r.lastMeaningfulSummary}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Plan"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Docs"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Code"})]})]})]})]})}function L(t){switch(t){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return t.replace(/_/g," ")}}function T(t){switch(t){case"badge":return"Noteworthy";case"interrupt":return"Blocked";default:return null}}function O(t){return/complete|done|finished/i.test(t)?{dot:"bg-emerald-400",text:"text-emerald-300/90"}:/fail|error/i.test(t)?{dot:"bg-red-400",text:"text-red-300/90"}:/block|wait|pause/i.test(t)?{dot:"bg-amber-400",text:"text-amber-300/90"}:/active|working|in[_-]?progress/i.test(t)?{dot:"bg-cyan-400",text:"text-cyan-300/90"}:{dot:"bg-[var(--scout-chrome-ink-faint)]",text:"text-[var(--scout-chrome-ink)]"}}function c({label:t,children:s,collapsible:a=!1,defaultOpen:r=!0,count:o}){const[i,d]=u.useState(r);return a?e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("button",{type:"button",onClick:()=>d(m=>!m),className:"flex items-center gap-1.5 text-left text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink)]",children:[i?e.jsx(y,{"aria-hidden":"true",size:10,strokeWidth:2}):e.jsx(I,{"aria-hidden":"true",size:10,strokeWidth:2}),e.jsx("span",{children:t}),typeof o=="number"&&o>0&&e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0 font-mono text-3xs tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:o})]}),i&&e.jsx("div",{className:"mt-1.5",children:s})]}):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}),s]})}function v({label:t,eyebrow:s,onClick:a}){return e.jsxs("button",{type:"button",onClick:a,className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-white/[0.025] px-2 py-1.5 text-left hover:border-cyan-400/25 hover:bg-cyan-400/10",children:[e.jsxs("span",{className:"min-w-0",children:[s&&e.jsx("span",{className:"block font-mono text-2xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:s}),e.jsx("span",{className:"block truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:t})]}),e.jsx(C,{"aria-hidden":"true",size:11,strokeWidth:1.8,className:"shrink-0 text-cyan-300/75"})]})}function W({item:t,onOpen:s}){const a=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`mt-1 h-1.5 w-1.5 shrink-0 rounded-full ${A(t)}`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(t.at)}),e.jsx("span",{className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:_(t)})]}),e.jsx("span",{className:"mt-0.5 block truncate text-xs font-semibold text-[var(--scout-chrome-ink-strong)]",children:t.actorName??"system"}),t.title&&e.jsx("span",{className:"mt-0.5 block truncate text-xs leading-snug text-[var(--scout-chrome-ink)]",children:t.title}),t.summary&&e.jsx("span",{className:"mt-0.5 block text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"},children:t.summary})]})]}),r="flex gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-1.5 first:border-t-0 first:pt-0",o=p(t.at);return s?e.jsx("button",{type:"button",onClick:s,title:o,className:`${r} text-left hover:text-cyan-300/90`,children:a}):e.jsx("div",{className:r,title:o,children:a})}function _(t){switch(t.kind){case"flight_started":return"flight started";case"flight_completed":return t.detailKind?`flight ${t.detailKind}`:"flight ended";case"message":return"message";default:return t.title??t.detailKind??"event"}}function A(t){return t.kind==="message"?"bg-cyan-400":t.kind==="flight_started"?"bg-lime-400":t.kind==="flight_completed"?t.detailKind?.includes("fail")?"bg-red-400":"bg-emerald-400":t.detailKind?.includes("interrupt")||t.detailKind?.includes("block")?"bg-amber-400":"bg-[var(--scout-chrome-ink-faint)]"}function n({label:t,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",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-sm font-mono text-[var(--scout-chrome-ink)]",children:s})]})}export{ve as WorkInspector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,r as h}from"./index-CZ-05hKz.js";import{u as Z,a as pe}from"./Provider-B2xuo3rf.js";import{o as ee}from"./openAgent-Dbv5wfuL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{i as fe,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-CnZ0e1-V.js";import{a as R}from"./api-Co9aQ2Jw.js";import{u as L}from"./sse-CiOSzE5n.js";import{r as E}from"./terminal-relay-9lhzEp2V.js";import{q as re}from"./terminal-takeover-DANQfTcy.js";import{r as ve,s as be,a as je,b as ke,c as ge}from"./session-catalog-DNaOEzoQ.js";import{p as ae}from"./NewChatComposer-hlWT-nbR.js";import{A as Ne}from"./AgentAvatar-CYhf6twS.js";import{A as we}from"./AgentLiveActions-BwuzOE8h.js";import{T as H}from"./TmuxPeek-V9dGESfO.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./index-BWHgHrtv.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";/* empty css */import"./refresh-cw-BRn9Oxxl.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 Pt(){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=fe(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=ve(e,f),S=h.useMemo(()=>be(f?.sessions??[],N),[f?.sessions,N]),$=r.view==="agents-v2"&&r.agentId===e.id?r.sessionId:null,I=je(e.id,d,N,S,$),P=ke($,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?ge(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=pe(),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{Pt as AgentsInspector};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-DXpqZP7I.js";const e=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],t=c("rocket",e);export{t as R};
|