@openscout/scout 0.2.95 → 0.2.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/scout +26 -10
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/{ActivityScreen--eANwuxa.js → ActivityScreen-y-5DLleY.js} +1 -1
- package/dist/client/assets/{AddProjectForm-CcD6qvV8.js → AddProjectForm-r_1tVuWk.js} +1 -1
- package/dist/client/assets/{AgentAvatar-CYhf6twS.js → AgentAvatar-B7c0egdP.js} +1 -1
- package/dist/client/assets/{AgentConfigurationScreen-BTI24HQX.js → AgentConfigurationScreen-BD7Unt2P.js} +1 -1
- package/dist/client/assets/{AgentDefinitionsWorkspace-srmN6-vj.js → AgentDefinitionsWorkspace-BbcZc9Xk.js} +1 -1
- package/dist/client/assets/{AgentDetailCard-UqPNpcvB.js → AgentDetailCard-B_KLcgsP.js} +1 -1
- package/dist/client/assets/{AgentFloorView-XXNgI5Cj.js → AgentFloorView-DMFiHs21.js} +1 -1
- package/dist/client/assets/{AgentInfoScreen-CimdOnZ9.js → AgentInfoScreen-DHGLRddI.js} +1 -1
- package/dist/client/assets/{AgentLaneCard-Z-aOBR3W.js → AgentLaneCard-ajZvcfdW.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CyhA1reW.js → AgentLaneChrome-CTp39syR.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BNzjMjIH.js → AgentLaneDetailSheet-DRc-TpMB.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-Box8-_rS.js → AgentLaneSummaryResize-VMNDo7kD.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +1 -0
- package/dist/client/assets/AgentLanesPreflight-CFadSaia.js +1 -0
- package/dist/client/assets/AgentLanesView-u5vpLwQf.js +2 -0
- package/dist/client/assets/{AgentLiveActions-BwuzOE8h.js → AgentLiveActions-CsQA3pu_.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-C5WlWNmk.js +1 -0
- package/dist/client/assets/{AgentSessions-CsZwoukw.js → AgentSessions-BePq5Lgc.js} +1 -1
- package/dist/client/assets/{AgentsConsole-KCao4XmX.js → AgentsConsole-BuiZ_bDo.js} +1 -1
- package/dist/client/assets/{AgentsScreen-CtPAmwRX.js → AgentsScreen-CRi-hG2k.js} +1 -1
- package/dist/client/assets/AgentsSubnav-DUsya4WK.js +1 -0
- package/dist/client/assets/{AstronautSuit-Ckx7lu7G.js → AstronautSuit-Cjjcv6yQ.js} +1 -1
- package/dist/client/assets/{AtopView-DYlpgEHf.js → AtopView-PxWQd-sX.js} +1 -1
- package/dist/client/assets/{BackToPicker-4JaeRvDm.js → BackToPicker-Cto0Ioz9.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-D6-xqrpo.js → BriefingDetailScreen-C29smC5d.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-DKxSDEmk.js → BriefingsScreen-DNyFBrPn.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-BbREmsbK.js → BrokerMetadataPanel-DbaCQlhw.js} +1 -1
- package/dist/client/assets/{BrokerScreen-fbPIouMw.js → BrokerScreen-CS0s4Gm4.js} +1 -1
- package/dist/client/assets/{CastPicker-BcA2vDDV.js → CastPicker-CTBHjjGw.js} +1 -1
- package/dist/client/assets/ChatCollapsedStrip-D4rc7wBQ.js +1 -0
- package/dist/client/assets/{CodeDiffPane-Cn8Y9hAt.js → CodeDiffPane-QvxCUzTi.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-nPFktrco.js → CodeProjectPicker-DplkpM7f.js} +1 -1
- package/dist/client/assets/{CodeScreen-BlAxtxE5.js → CodeScreen-CrR2JaVj.js} +1 -1
- package/dist/client/assets/{ConversationComposer-2HjbGPL9.js → ConversationComposer-H8_hsYSc.js} +1 -1
- package/dist/client/assets/{ConversationFeedRows-C6wUqJrx.js → ConversationFeedRows-hlEFlURs.js} +1 -1
- package/dist/client/assets/{ConversationHeader-C8vfXaTF.js → ConversationHeader-B0ZBhE_E.js} +1 -1
- package/dist/client/assets/{ConversationPanels-CNCIbpqU.js → ConversationPanels-fMo6Uy1v.js} +2 -2
- package/dist/client/assets/ConversationScreen-CXAHQwQ3.js +2 -0
- package/dist/client/assets/{ConversationStatus-DZuyKsWN.js → ConversationStatus-DI5GCiyW.js} +1 -1
- package/dist/client/assets/{CrewAvatar-CTIuxp4G.js → CrewAvatar-CXJHLNVM.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +1 -0
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
- package/dist/client/assets/{DataTable-6IDhanr5.js → DataTable-DXIlOlVu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DC1u9itO.js → DispatchAftermath-CrELgl2e.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DZVhS7as.js → DocumentFocusViewer-DFFE85Tq.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-BKUFJMCV.js → EmbeddableSurfacesLab-DgpewB3y.js} +1 -1
- package/dist/client/assets/{EmptyState-CeBl0iGd.js → EmptyState-D9X16fKq.js} +1 -1
- package/dist/client/assets/{FileViewerPane-DQlpNt2S.js → FileViewerPane-CY0RN78e.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-qyzHzxLa.js +1 -0
- package/dist/client/assets/{FollowScreen-BXHOp3gb.js → FollowScreen-wZ-z67mX.js} +1 -1
- package/dist/client/assets/{HarnessMark-D5CA5uSp.js → HarnessMark-DAaWPiT_.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-DhFXq1qz.js → HarnessesScreen-DbKkQM4o.js} +1 -1
- package/dist/client/assets/{HerdrSession-BRhs5LIR.js → HerdrSession-CYKRfBad.js} +1 -1
- package/dist/client/assets/{HomeHero-DMABJuze.js → HomeHero-DYyd3cpz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-RAociATV.js → HostAdvisorView-NtM0bsg8.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-CZPyVNSw.js → KnowledgeSearchInspector-CU6BCFcS.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchScreen-mGTKIg00.js → KnowledgeSearchScreen-DvbRRPQB.js} +1 -1
- package/dist/client/assets/{LaneToolHoverCard-D_DMlBeT.js → LaneToolHoverCard-Bo2Zl-1a.js} +1 -1
- package/dist/client/assets/{LaneTraceDetailSheet-BEHg3LmH.js → LaneTraceDetailSheet-C3C8UjXv.js} +1 -1
- package/dist/client/assets/{LaneTraceEventFocus-DVimcizS.js → LaneTraceEventFocus-Cek_64zR.js} +1 -1
- package/dist/client/assets/{MeshCanvas-BOuZx4AM.js → MeshCanvas-TvsID4fe.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-wL-1N94e.js → MeshCanvasMinimap-CxqeVVco.js} +1 -1
- package/dist/client/assets/{MeshScreen-DMY9Bmh5.js → MeshScreen-BJ-j9YXv.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-DiDcX5f4.js → MeshTopologyView-BjprutE8.js} +2 -2
- package/dist/client/assets/MessagesScreen-CyNIZ3-X.js +1 -0
- package/dist/client/assets/{MissionContextRail-DrNKXG5u.js → MissionContextRail-Be0uXljQ.js} +1 -1
- package/dist/client/assets/{MissionControlView-ByBlHVN8.js → MissionControlView-Bj7cAbZd.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-D1i6R6Zt.js → MissionFocusOverlay-DvTw6ts5.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-DN9NcCML.js → MissionLeftAgentRow-B0QG7Gys.js} +1 -1
- package/dist/client/assets/{MissionLogPane-DSeIv3Xo.js → MissionLogPane-EsM_S3ro.js} +1 -1
- package/dist/client/assets/{NewAgentModal-V7yK6J6j.js → NewAgentModal-Cqiq1CE1.js} +1 -1
- package/dist/client/assets/NewChatComposer-C_1op4dH.js +19 -0
- package/dist/client/assets/{NewChatOrigin-DdpzE4kz.js → NewChatOrigin-D7hwp6dm.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-l_Q3ts2q.js → ObserveEmbedScreen-CGHI_hb5.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-BSEtYTxU.js → ObserveTextFlow-BcrGQet8.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-CdGUXxGR.js → ObservedTopologyPanel-BhVsvwkh.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-DN8dOSK4.js → OpenScoutAppShell-BtfvMkAp.js} +25 -25
- package/dist/client/assets/{OpsAgentsView-ntGr4pz4.js → OpsAgentsView-DBYtmLnh.js} +1 -1
- package/dist/client/assets/OpsScreen-CuYVgkC_.js +1 -0
- package/dist/client/assets/OpsSubnav-BEU4kKXm.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-BQET-qrY.js → ProjectAgentProfileBar-uJw9Wdfk.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-Ck8mThtx.js → ProjectAgentProfileHero-CIMS4Dy_.js} +1 -1
- package/dist/client/assets/ProjectsInbox-JgU0lrY8.js +2 -0
- package/dist/client/assets/ProjectsRail-p99BRBOa.js +1 -0
- package/dist/client/assets/ProjectsScreen-BB45DU53.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-BHDTJWOz.js +1 -0
- package/dist/client/assets/{Provider-B2xuo3rf.js → Provider-Bu-C8Hxc.js} +1 -1
- package/dist/client/assets/{RailRow-B-GycCBx.js → RailRow-ClMmtaIE.js} +1 -1
- package/dist/client/assets/{RawSessionsTable-AQThi6sm.js → RawSessionsTable-BtKdQPiv.js} +1 -1
- package/dist/client/assets/RealtimeVoiceScreen-KPHJgO1l.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-DXWoRF_c.js → RepoDiffEmbedScreen-CjZ5ew3y.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-D_274ExO.js → RepoDiffPageScreen-CdTFfmbk.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-DbedmHDX.js → RepoDiffViewer-BFperHQg.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-C0--fPtk.js → RepoDiffViewerLazy-BkBmbi1Z.js} +2 -2
- package/dist/client/assets/{ReposScreen-D39_YG4H.js → ReposScreen-C8dT4bK0.js} +1 -1
- package/dist/client/assets/ScoutDeckSurface-BcJsm2Kq.js +1 -0
- package/dist/client/assets/{ScoutSurface-UsRy0t-I.js → ScoutSurface-DmzEtrx8.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-Fmdfboxs.js → ScoutbotFxLab-DU15Plja.js} +1 -1
- package/dist/client/assets/{SecondaryNav-o2RL9H8H.js → SecondaryNav-BrXMtvKE.js} +1 -1
- package/dist/client/assets/SessionEmbedScreen-Bt4flmAx.js +1 -0
- package/dist/client/assets/{SessionObserve-Dsd0j05N.js → SessionObserve-BCehTlO8.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-DopQYDkD.js → SessionObserveEvidence-Bb6U-dem.js} +1 -1
- package/dist/client/assets/SessionRefScreen-C8BiRVPx.js +1 -0
- package/dist/client/assets/SessionsScreen-BNvjUflN.js +1 -0
- package/dist/client/assets/{SettingsDrawer-_AwuopMS.js → SettingsDrawer-BieUmb8g.js} +1 -1
- package/dist/client/assets/{SettingsScreen-Cw4DDfJP.js → SettingsScreen-3JvX1WFL.js} +1 -1
- package/dist/client/assets/{ShikiPane-BfHc_3pM.js → ShikiPane-DPWsVNtn.js} +1 -1
- package/dist/client/assets/{SlidePanel-C-q7XwTa.js → SlidePanel-BMRIR6bH.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-Bs68ZENy.js → SpriteAvatar-56DTXxSV.js} +1 -1
- package/dist/client/assets/{StatusPill-ZZQwxB1a.js → StatusPill-BcuYUgsD.js} +1 -1
- package/dist/client/assets/{TailView-Q4FVMsUH.js → TailView-BDy8c2VB.js} +1 -1
- package/dist/client/assets/{Terminal-D7zqHwHV.js → Terminal-BlUQY9_Z.js} +1 -1
- package/dist/client/assets/{TerminalEmbedScreen-CXIJ7qv6.js → TerminalEmbedScreen-DTjxktyr.js} +1 -1
- package/dist/client/assets/{TerminalHeaderMount-BnBLOPbb.js → TerminalHeaderMount-Cy-uxkey.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-CKQP-cBT.js → TextDocumentSurface-BeSwe3Yl.js} +1 -1
- package/dist/client/assets/{TmuxPeek-V9dGESfO.js → TmuxPeek-B4no_aGI.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-k7sbLXx2.js → VoicePermissionsPanel-Bd16scwz.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-60p9litn.js → WorkDetailScreen-DIFQufak.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-BjJS7GyM.js → WorkFilesViewer-CT5XEFGf.js} +1 -1
- package/dist/client/assets/{activity-Bj3Hnbj3.js → activity-CqZafWfx.js} +1 -1
- package/dist/client/assets/{addon-fit-BL-NTWRU.js → addon-fit-CM6F_JRD.js} +1 -1
- package/dist/client/assets/{addon-webgl-CIMgmNjg.js → addon-webgl-DRTiePFC.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-DXlvdc4b.js → agent-autocomplete-DXUBnlkN.js} +1 -1
- package/dist/client/assets/{agent-essentials-BOMHR0_U.js → agent-essentials-vytdybaX.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-CTLxf3R4.js → agent-lane-card-model-CNZMPkhc.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-AfrjRNK5.js → agent-lanes-model-DXqjs0OK.js} +2 -2
- package/dist/client/assets/agent-master-I1W-5d-x.css +1 -0
- package/dist/client/assets/agent-master-model-DAZL92oe.js +1 -0
- package/dist/client/assets/{agent-specialization-BIPIBW8u.js → agent-specialization-BtxLN4UR.js} +1 -1
- package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
- package/dist/client/assets/{arc.es-IR5r6sj_.js → arc.es-Bh84oHJ7.js} +1 -1
- package/dist/client/assets/{arrow-down-BydciYFZ.js → arrow-down-DvTsLokL.js} +1 -1
- package/dist/client/assets/{arrow-left-CghA0kTw.js → arrow-left-DHfdXJVZ.js} +1 -1
- package/dist/client/assets/{arrow-right-iJFv3jNh.js → arrow-right-BBsrogWf.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CCfZXPqD.js → arrow-up-right-CY0Vw_67.js} +1 -1
- package/dist/client/assets/{bot-B5sub1-i.js → bot-DzkOUFBb.js} +1 -1
- package/dist/client/assets/{check-C18YQC90.js → check-DbIkldnK.js} +1 -1
- package/dist/client/assets/{chevron-down-Mp9mu_yd.js → chevron-down-C475vltS.js} +1 -1
- package/dist/client/assets/{chevron-right-CzH-TaSF.js → chevron-right-CnZRSd-V.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-swV8PA2k.js → chunk-HRAB3GC3-DLNT8aOo.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-BKXqcLKw.js → chunk-JTPDIGGW-Ci5j4vzV.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-vYbNJ8E6.js → chunk-T65CQEWV-BtNvicWs.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-U65yUmqt.js → chunk-YOZR3KYS-DN5EJulq.js} +1 -1
- package/dist/client/assets/{clock-B4PTFi5m.js → clock-DVvENUU5.js} +1 -1
- package/dist/client/assets/{code-xml-Jtxsp5d1.js → code-xml-CvKBY3KA.js} +1 -1
- package/dist/client/assets/{compass-0_54-vz3.js → compass-BcRI_YXo.js} +1 -1
- package/dist/client/assets/content--T3p6akp.js +1 -0
- package/dist/client/assets/content-4nFMLuzF.js +1 -0
- package/dist/client/assets/content-BJ4nHvcu.js +1 -0
- package/dist/client/assets/{content-DMbawvqU.js → content-BNyAjpUl.js} +1 -1
- package/dist/client/assets/content-BmGp9wNl.js +1 -0
- package/dist/client/assets/content-CBWhwaRo.js +1 -0
- package/dist/client/assets/content-CQlykFbe.js +1 -0
- package/dist/client/assets/content-CevL0DgF.js +1 -0
- package/dist/client/assets/content-Ch8pf2bj.js +1 -0
- package/dist/client/assets/content-Cpvdcm_l.js +1 -0
- package/dist/client/assets/content-DfS3vgAu.js +1 -0
- package/dist/client/assets/content-DpQdNePJ.js +1 -0
- package/dist/client/assets/content-Dqpibejl.js +1 -0
- package/dist/client/assets/content-TV0nd6-r.js +1 -0
- package/dist/client/assets/{content-CHghn-rT.js → content-odbb5H4U.js} +1 -1
- package/dist/client/assets/content-uXHLPHe0.js +1 -0
- package/dist/client/assets/{conversation-icons-BV10B2Me.js → conversation-icons-CBMKBGHd.js} +1 -1
- package/dist/client/assets/{conversation-model-CwF6Y9gx.js → conversation-model-QsJVfSeG.js} +1 -1
- package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +1 -0
- package/dist/client/assets/{copy-Dtpx4FOE.js → copy-Cj-owMb-.js} +1 -1
- package/dist/client/assets/{cpu-BjVis9mc.js → cpu-DuD3RFX5.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DXpqZP7I.js → createLucideIcon-DthwWQIg.js} +1 -1
- package/dist/client/assets/{ctx-panel-D_HJ3nhb.css → ctx-panel-F05jXK4Q.css} +1 -1
- package/dist/client/assets/discover-B3uQlh5L.js +2 -0
- package/dist/client/assets/embed-entry-DkRcHKTh.js +2 -0
- package/dist/client/assets/{external-link-Ckiyzjwo.js → external-link-C_nxk0MJ.js} +1 -1
- package/dist/client/assets/{eye-CpfyvdLq.js → eye-FnaaPfja.js} +1 -1
- package/dist/client/assets/{file-code-corner-7mo7EviR.js → file-code-corner-DDPq4Cur.js} +1 -1
- package/dist/client/assets/{file-text-KijGBnME.js → file-text--hfhwZH1.js} +1 -1
- package/dist/client/assets/{gauge-y-Xg8Mrv.js → gauge-BVEknshP.js} +1 -1
- package/dist/client/assets/{gestures-Bq9XnSqY.js → gestures-3gw5VgUS.js} +1 -1
- package/dist/client/assets/{git-branch-BQ_x8KZL.js → git-branch-DJyvr0k-.js} +1 -1
- package/dist/client/assets/{home-moving-signal-DtRpiNa0.js → home-moving-signal-BPqBoNSm.js} +1 -1
- package/dist/client/assets/{home-now-card-DFb4GOgM.js → home-now-card-UspVW2-2.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-D--m9jpq.js → home-now-card-nano-G8kMB32m.js} +1 -1
- package/dist/client/assets/{hooks-9d1SoaQA.js → hooks-BMsQzo9j.js} +1 -1
- package/dist/client/assets/{index-CZ-05hKz.js → index-BI9AljSD.js} +5 -5
- package/dist/client/assets/index-C-v0Z6ZS.js +1 -0
- package/dist/client/assets/index-D9DzUORB.js +1 -0
- package/dist/client/assets/index-DfsTyYDx.js +1 -0
- package/dist/client/assets/{inspector-panel-C-EhEDYy.js → inspector-panel-CFSArQ8Y.js} +1 -1
- package/dist/client/assets/{keyboard-nav-DFhAJkW3.js → keyboard-nav-e6yGeorb.js} +1 -1
- package/dist/client/assets/{lane-roster-store-gUBsydNf.js → lane-roster-store-Q7pcblY5.js} +1 -1
- package/dist/client/assets/{layers-CGou-LwV.js → layers-Dz2dKOnU.js} +1 -1
- package/dist/client/assets/{layout-grid-BrZt31QH.js → layout-grid-Bvs5fdB4.js} +1 -1
- package/dist/client/assets/{left-CwHZCGO3.js → left-B4Ak-Ibt.js} +1 -1
- package/dist/client/assets/{left-DA0amyfu.js → left-BMb493FZ.js} +1 -1
- package/dist/client/assets/{left-CwLs0okF.js → left-BjFLvVOC.js} +1 -1
- package/dist/client/assets/{left-B_o51JV6.js → left-CsXQ8Q3G.js} +1 -1
- package/dist/client/assets/left-FNH7faCI.js +1 -0
- package/dist/client/assets/left-POkqE8gI.js +2 -0
- package/dist/client/assets/left-UulOTcWh.js +1 -0
- package/dist/client/assets/{left-advisor-DU3s01gk.js → left-advisor-CJkQS2d6.js} +1 -1
- package/dist/client/assets/left-agents-CFMxyEjT.js +1 -0
- package/dist/client/assets/{left-default-uvuvDmt0.js → left-default-rnX5HANc.js} +1 -1
- package/dist/client/assets/{left-lanes-DnNLgec8.js → left-lanes-BpLXT_qH.js} +1 -1
- package/dist/client/assets/{left-mission-DN3-NLPC.js → left-mission-B0bhseWw.js} +1 -1
- package/dist/client/assets/library-D1iXfda2.js +1 -0
- package/dist/client/assets/{loader-circle-BiohlpM3.js → loader-circle-B2W9DPG5.js} +1 -1
- package/dist/client/assets/{local-agents-wUIaBcEr.js → local-agents-DKr-gIDC.js} +1 -1
- package/dist/client/assets/{mentions-CcPFMbmZ.js → mentions-DuLQnEcn.js} +1 -1
- package/dist/client/assets/{mesh-buckets-ByyFXdKT.js → mesh-buckets-6y3ZIibI.js} +1 -1
- package/dist/client/assets/{mesh-ops-CvGyjK84.js → mesh-ops-CRR-KnCG.js} +1 -1
- package/dist/client/assets/{mesh-roster-n2nDpEmA.js → mesh-roster-Bc7T4b7z.js} +1 -1
- package/dist/client/assets/{mesh-view-store-BpxGm71b.js → mesh-view-store-CiET-yN8.js} +1 -1
- package/dist/client/assets/{message-circle-B2ddzBrX.js → message-circle-B2DoYKDO.js} +1 -1
- package/dist/client/assets/{message-markup-RkfmDfME.js → message-markup-Cc_O-WdA.js} +1 -1
- package/dist/client/assets/{message-square-D9YYWE0x.js → message-square-O-Hu9Mk2.js} +1 -1
- package/dist/client/assets/{message-visibility-DwxgcgYK.js → message-visibility-CGOmSSKs.js} +1 -1
- package/dist/client/assets/{mission-control-store-Bf4b54MV.js → mission-control-store-DDAgWKUl.js} +1 -1
- package/dist/client/assets/{observe-CJRIvOCn.js → observe-Da2mRAsc.js} +1 -1
- package/dist/client/assets/{page-status-BptpTdQ-.js → page-status-Crtgjbq3.js} +1 -1
- package/dist/client/assets/{paperclip-B1UNGl5d.js → paperclip-BudMKSyr.js} +1 -1
- package/dist/client/assets/{persistent-state-YI-WHSCF.js → persistent-state-xJz-qAFc.js} +1 -1
- package/dist/client/assets/{plus-CuU_X0-8.js → plus-BJ1If8vj.js} +1 -1
- package/dist/client/assets/{profile-rY8jO38P.js → profile-B3qDSbrH.js} +1 -1
- package/dist/client/assets/projects-inbox-CLek3QaG.js +1 -0
- package/dist/client/assets/projects-inbox-DRBl2N85.css +1 -0
- package/dist/client/assets/{proxy-DnLpZIi9.js → proxy-1BABCaDb.js} +1 -1
- package/dist/client/assets/{radio-Dm1ItnA4.js → radio-B5OpHrrK.js} +1 -1
- package/dist/client/assets/{refresh-cw-BRn9Oxxl.js → refresh-cw-DmNAhaH0.js} +1 -1
- package/dist/client/assets/resolve-panes-DXw-cHaj.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +1 -0
- package/dist/client/assets/{right-BJltPRnd.js → right-BgJ4mQLf.js} +1 -1
- package/dist/client/assets/{right-DtsRNX5b.js → right-Bk6h7o-Z.js} +1 -1
- package/dist/client/assets/{right-C1yumXNx.js → right-BrICCmEt.js} +1 -1
- package/dist/client/assets/{right-BbyYdzHn.js → right-C1QIbqFZ.js} +1 -1
- package/dist/client/assets/{right-Shpw_xDy.js → right-CfliKiHY.js} +1 -1
- package/dist/client/assets/{right-D3aTKf1F.js → right-CtOLXB9s.js} +1 -1
- package/dist/client/assets/{right-CJnB_Bg7.js → right-D8id_DWQ.js} +1 -1
- package/dist/client/assets/{right-CPP7GyOm.js → right-DJ34yMAi.js} +1 -1
- package/dist/client/assets/{right-DI1B79nR.js → right-DiFmtw6d.js} +1 -1
- package/dist/client/assets/{right-Beh3nCUB.js → right-Lx79pxpG.js} +1 -1
- package/dist/client/assets/{rocket-DOwXHKWA.js → rocket-D3-TUJ2m.js} +1 -1
- package/dist/client/assets/router-DTtux5sP.js +1 -0
- package/dist/client/assets/{scope-views-A4_vP97W.js → scope-views-CPM0sBw_.js} +1 -1
- package/dist/client/assets/{scout-voice-BhPzrc6P.js → scout-voice-BZKsdquE.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-jh7tzFB1.js → scoutbot-markdown-CQ7Y1McC.js} +1 -1
- package/dist/client/assets/{scroll-text-DO0GQzvN.js → scroll-text-kPhYbh-M.js} +1 -1
- package/dist/client/assets/{search-D1tJSAWe.js → search-DmFM_9jm.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-B9IF8wXl.js → secondaryNavConfig-C9bQ9_IA.js} +1 -1
- package/dist/client/assets/{selection-bridge-i2S9zpf8.js → selection-bridge-Dy2mtMyi.js} +1 -1
- package/dist/client/assets/{send-horizontal-CgLppsIC.js → send-horizontal-qyjNgEaV.js} +1 -1
- package/dist/client/assets/{server-Dymv5Emh.js → server-nWqndnxu.js} +1 -1
- package/dist/client/assets/{session-catalog-DNaOEzoQ.js → session-catalog-BkmktBHI.js} +1 -1
- package/dist/client/assets/session-ref-lookup-state-SATH_jAP.js +1 -0
- package/dist/client/assets/{session-table-PTQVoTyc.js → session-table-DKSF0mrS.js} +1 -1
- package/dist/client/assets/{settings-2fC_G9nX.js → settings-C6h9y5XX.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-BPSMHhbm.js → sliders-horizontal-BhHKxsCO.js} +1 -1
- package/dist/client/assets/{sparkles-Dy8p5xN8.js → sparkles-Cf8gin88.js} +1 -1
- package/dist/client/assets/{sse-CiOSzE5n.js → sse-DDHEHUgz.js} +1 -1
- package/dist/client/assets/{tail-events-BMQmSx1n.js → tail-events-BdUrO0kb.js} +1 -1
- package/dist/client/assets/{terminal-yN9xN-h9.js → terminal-C3YRPfyz.js} +1 -1
- package/dist/client/assets/{terminal-relay-9lhzEp2V.js → terminal-relay-BFhdIstF.js} +1 -1
- package/dist/client/assets/{terminal-takeover-DANQfTcy.js → terminal-takeover-B6H4llRR.js} +1 -1
- package/dist/client/assets/{text-rLpBg4_z.css → text-BYAFNLNq.css} +1 -1
- package/dist/client/assets/{text-CnZ0e1-V.js → text-Faa3ZStB.js} +1 -1
- package/dist/client/assets/{use-conversation-list-D9BNLfnW.js → use-conversation-list-DO5J8T1H.js} +1 -1
- package/dist/client/assets/use-fleet-active-asks-BtgNnRgK.js +1 -0
- package/dist/client/assets/{use-mesh-ops-items-BIvIHlqe.js → use-mesh-ops-items-N1HHhChY.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-CKkhq9c5.js → use-reduced-motion-8WuxLa5l.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-B2KCzPxn.js → use-scout-dev-flags-B31qTy6m.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-CHBsxcbp.js → useAgentHoverCard-Bkv-Uz_V.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DUuXH5yp.js → usePierreRuntime-BfZHKAkI.js} +1 -1
- package/dist/client/assets/{wrench-YcXMlsh2.js → wrench-DkxnZRlR.js} +1 -1
- package/dist/client/assets/{x-e3h2hDsp.js → x-DfRJbqrh.js} +1 -1
- package/dist/client/assets/{xterm-Byp1Hep_.js → xterm-CJw8Epxv.js} +1 -1
- package/dist/client/assets/{zap-nMcjPoWB.js → zap-CIo8msJB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/drizzle/0009_old_korg.sql +72 -0
- package/dist/drizzle/0010_sparkling_colonel_america.sql +2 -0
- package/dist/drizzle/0011_funny_onslaught.sql +4 -0
- package/dist/drizzle/0012_high_blazing_skull.sql +16 -0
- package/dist/drizzle/0013_perfect_juggernaut.sql +1 -0
- package/dist/drizzle/0014_legal_meggan.sql +6 -0
- package/dist/drizzle/0015_lame_marvel_boy.sql +12 -0
- package/dist/drizzle/0016_early_goliath.sql +6 -0
- package/dist/drizzle/meta/0009_snapshot.json +6262 -0
- package/dist/drizzle/meta/0010_snapshot.json +6286 -0
- package/dist/drizzle/meta/0011_snapshot.json +6337 -0
- package/dist/drizzle/meta/0012_snapshot.json +6458 -0
- package/dist/drizzle/meta/0013_snapshot.json +6465 -0
- package/dist/drizzle/meta/0014_snapshot.json +6503 -0
- package/dist/drizzle/meta/0015_snapshot.json +6596 -0
- package/dist/drizzle/meta/0016_snapshot.json +6611 -0
- package/dist/drizzle/meta/_journal.json +56 -0
- package/dist/main.mjs +1355 -365
- package/dist/node/main.mjs +314 -12
- package/dist/pairing-runtime-controller.mjs +616 -108
- package/dist/runtime/base-daemon.mjs +30 -3
- package/dist/runtime/broker-daemon.mjs +4822 -532
- package/dist/runtime/broker-process-manager.mjs +23 -2
- package/dist/runtime/mesh-discover.mjs +23 -2
- package/dist/scout-control-plane-web.mjs +1922 -478
- package/package.json +2 -2
- package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +0 -1
- package/dist/client/assets/AgentLanesPreflight-5B6sXvRB.js +0 -1
- package/dist/client/assets/AgentLanesView-DHyzVBk6.js +0 -2
- package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +0 -1
- package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +0 -1
- package/dist/client/assets/ConversationScreen-BNULZAp2.js +0 -2
- package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +0 -1
- package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +0 -1
- package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +0 -1
- package/dist/client/assets/MessagesScreen-Eulveud3.js +0 -1
- package/dist/client/assets/NewChatComposer-hlWT-nbR.js +0 -19
- package/dist/client/assets/OpsScreen-Ppen_Lmj.js +0 -1
- package/dist/client/assets/OpsSubnav-GAKsoSor.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +0 -1
- package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +0 -2
- package/dist/client/assets/ProjectsRail-DCfNMmnW.js +0 -1
- package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +0 -1
- package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +0 -1
- package/dist/client/assets/SessionEmbedScreen-RD5XOx7R.js +0 -1
- package/dist/client/assets/SessionRefScreen-B_cTv47v.js +0 -1
- package/dist/client/assets/SessionsScreen-Bq0Z77On.js +0 -1
- package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
- package/dist/client/assets/archive-BjcGiAy8.js +0 -1
- package/dist/client/assets/content-6RvWTrtk.js +0 -1
- package/dist/client/assets/content-BCgwMUqz.js +0 -1
- package/dist/client/assets/content-Bf2VLhx0.js +0 -1
- package/dist/client/assets/content-BrU_38-m.js +0 -1
- package/dist/client/assets/content-BvvJN8rN.js +0 -1
- package/dist/client/assets/content-CAeEqYPw.js +0 -1
- package/dist/client/assets/content-CI_Z9DXk.js +0 -1
- package/dist/client/assets/content-CbyKONhW.js +0 -1
- package/dist/client/assets/content-Czogvp43.js +0 -1
- package/dist/client/assets/content-DFk0zNzX.js +0 -1
- package/dist/client/assets/content-DHe4DgkA.js +0 -1
- package/dist/client/assets/content-DTz7cKjo.js +0 -1
- package/dist/client/assets/content-E3kudY-W.js +0 -1
- package/dist/client/assets/content-LpO0aO_U.js +0 -1
- package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +0 -1
- package/dist/client/assets/discover-CHbrEItO.js +0 -2
- package/dist/client/assets/embed-entry-vil28MyU.js +0 -2
- package/dist/client/assets/index-BVlMw8x_.js +0 -1
- package/dist/client/assets/index-Cn0GR-q1.js +0 -1
- package/dist/client/assets/index-DosI4AG9.js +0 -1
- package/dist/client/assets/left-BpgWnaah.js +0 -1
- package/dist/client/assets/left-Cx0kv6pe.js +0 -1
- package/dist/client/assets/left-agents-qL5PpUY-.js +0 -1
- package/dist/client/assets/left-z-6CkuBe.js +0 -2
- package/dist/client/assets/library-DIo5NiGP.js +0 -1
- package/dist/client/assets/projects-inbox-BBs1hG13.css +0 -1
- package/dist/client/assets/projects-inbox-D-zAb9Gp.js +0 -1
- package/dist/client/assets/resolve-panes-DO6LkwhQ.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +0 -1
- package/dist/client/assets/router-DJj2WbDg.js +0 -1
- package/dist/client/assets/use-fleet-active-asks-BeAdcl09.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +0 -1
package/bin/scout
CHANGED
|
@@ -6,20 +6,36 @@
|
|
|
6
6
|
#
|
|
7
7
|
# Latency: this is on the statusline hot path (invoked per prompt). `command -v`
|
|
8
8
|
# is a shell builtin (no fork). We only fork `readlink` when the CLI is reached
|
|
9
|
-
# through a bin symlink and the fast sibling lookup misses.
|
|
9
|
+
# through a bin symlink and the fast sibling lookup misses. Global installs can
|
|
10
|
+
# be two or more hops (for example ~/.local/bin/scout -> ~/.bun/bin/scout ->
|
|
11
|
+
# the package bin/scout), so follow a bounded POSIX chain. Keep relative
|
|
12
|
+
# targets relative to the current hop; do not canonicalize with pwd.
|
|
10
13
|
self="$0"
|
|
11
14
|
dir="${self%/*}"
|
|
12
|
-
if [
|
|
13
|
-
|
|
14
|
-
if [ -n "$link" ]; then
|
|
15
|
-
case "$link" in
|
|
16
|
-
/*) self="$link" ;;
|
|
17
|
-
*) self="$dir/$link" ;;
|
|
18
|
-
esac
|
|
19
|
-
dir="${self%/*}"
|
|
20
|
-
fi
|
|
15
|
+
if [ "$dir" = "$self" ]; then
|
|
16
|
+
dir="."
|
|
21
17
|
fi
|
|
22
18
|
|
|
19
|
+
hops=0
|
|
20
|
+
while [ ! -f "$dir/scout.mjs" ]; do
|
|
21
|
+
hops=$((hops + 1))
|
|
22
|
+
if [ "$hops" -gt 32 ]; then
|
|
23
|
+
break
|
|
24
|
+
fi
|
|
25
|
+
link=$(readlink "$self" 2>/dev/null) || break
|
|
26
|
+
if [ -z "$link" ]; then
|
|
27
|
+
break
|
|
28
|
+
fi
|
|
29
|
+
case "$link" in
|
|
30
|
+
/*) self="$link" ;;
|
|
31
|
+
*) self="$dir/$link" ;;
|
|
32
|
+
esac
|
|
33
|
+
dir="${self%/*}"
|
|
34
|
+
if [ "$dir" = "$self" ]; then
|
|
35
|
+
dir="."
|
|
36
|
+
fi
|
|
37
|
+
done
|
|
38
|
+
|
|
23
39
|
if command -v bun >/dev/null 2>&1; then
|
|
24
40
|
exec bun "$dir/scout.mjs" "$@"
|
|
25
41
|
fi
|
package/bin/scoutd
CHANGED
|
Binary file
|
package/dist/build-manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "@openscout/scout",
|
|
4
|
-
"version": "0.2.
|
|
5
|
-
"commit": "
|
|
4
|
+
"version": "0.2.97",
|
|
5
|
+
"commit": "aa8585053c67291fbdf44d664f7f00ef4f5bf637",
|
|
6
6
|
"branch": "HEAD",
|
|
7
7
|
"sourceDirty": false,
|
|
8
|
-
"builtAt": "2026-
|
|
8
|
+
"builtAt": "2026-09-03T18:07:12.491Z"
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as s}from"./index-CZ-05hKz.js";import{p as Y,a as J}from"./api-Co9aQ2Jw.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as Q}from"./sse-CiOSzE5n.js";import{d as Z}from"./colors-BtO5_zlx.js";import{u as ss,a as es,m as as,b as ts}from"./Provider-B2xuo3rf.js";import{b as ns}from"./router-DJj2WbDg.js";import{r as B}from"./mentions-CcPFMbmZ.js";import{t as I,b as U}from"./time-Dhsh_2EG.js";import{E as C}from"./EmptyState-CeBl0iGd.js";/* empty css */import"./perf-PX8Rx0EP.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"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./AgentDetailCard-UqPNpcvB.js";import"./AgentLiveActions-BwuzOE8h.js";import"./terminal-takeover-DANQfTcy.js";import"./openContent-C6XO6kr5.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";const is=3e4,ls={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered",ask_sent:"sent a request",ask_working:"working",flight_created:"started task",message_sent:"sent",message_received:"received"},rs=new Set(["ask_failed","ask_replied","flight.completed","flight.updated","flight_updated"]),os={presence:{label:"Presence",tone:"notice"},work:{label:"Execution",tone:"working"},message:{label:"Delivery",tone:"completed"},collaboration:{label:"Coordination",tone:"working"},system:{label:"System",tone:"notice"}};function q(a){return ls[a]??a.replace(/[._]/g," ")}function cs(a){return a.startsWith("agent.")||a.includes("registered")||a.includes("online")||a.includes("offline")?"presence":a.startsWith("flight")||a.startsWith("ask_")?"work":a.startsWith("message")?"message":a.startsWith("collaboration")?"collaboration":"system"}function ds(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function us(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function ps(a){return`${a.actorName??"system"} ${q(a.kind)}`}function hs(a){return a.workspaceRoot?`Recorded from ${a.workspaceRoot}.`:a.conversationId?`Linked to thread ${u(a.conversationId)}.`:"No additional detail was captured for this event."}function le({navigate:a}){const{agents:p,route:z}=ss(),[w]=t.useState(()=>Y("/api/activity",is)),[g,F]=t.useState(w??[]),[x,S]=t.useState(null),[y,R]=t.useState(w===null),[_,T]=t.useState(!1),[h,E]=t.useState(null),[N,G]=t.useState(null),$=t.useRef(w??[]),b=t.useRef(0),f=t.useRef(null),K=es(),L=ns(z),D=t.useMemo(()=>as(p,L),[p,L]),i=t.useMemo(()=>ts(g,D).filter(e=>!rs.has(e.kind)),[g,D]);t.useEffect(()=>{$.current=g},[g]),t.useEffect(()=>{x&&!i.some(e=>e.id===x)&&S(null)},[x,i]);const m=t.useCallback(async(e="initial")=>{const l=++b.current;!($.current.length>0)&&e!=="background"?(R(!0),E(null)):T(!0);try{const o=await J("/api/activity");if(l!==b.current)return;F(o),E(null),G(Date.now()),S(v=>o.some(A=>A.id===v)?v:null)}catch(o){if(l!==b.current)return;E(o instanceof Error?o.message:String(o))}finally{l===b.current&&(R(!1),T(!1))}},[]),P=t.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);t.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),Q(P);const H=t.useMemo(()=>{const e=new Set(i.map(c=>c.actorName??"system")),l=new Set(i.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${i.length}`,detail:i.length>0?`Latest ${I(i[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${l.size}`,detail:l.size>0?"Conversation-linked records":"No linked threads"}]},[i]),V=!y&&i.length===0&&!!h,X=!y&&i.length===0&&!h;return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Activity Log"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker events, task execution, and collaboration handoffs."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("div",{className:"sys-sync-note",children:y?"Loading audit ledger...":h&&i.length>0?`Showing last confirmed snapshot from ${N?I(N):"earlier"}`:N?`Updated ${I(N)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:y||_,onClick:()=>{m("manual")},children:_?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:H.map(e=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:e.label}),s.jsx("strong",{className:"sys-stat-value",children:e.value}),s.jsx("span",{className:"sys-stat-detail",children:e.detail})]},e.label))}),h&&i.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&i.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),V&&s.jsx(C,{className:"sys-state-card-error",title:"Activity is unavailable",body:h,action:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{m("manual")},children:"Try again"})}),X&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),i.length>0&&s.jsx("div",{className:"sys-audit-list",children:i.map(e=>{const l=x===e.id,c=cs(e.kind),o=os[c],v=us(e.workspaceRoot),A=e.summary&&e.summary!==e.title?e.summary:hs(e),r=[];if(e.conversationId&&r.push({key:"thread",label:"Thread",title:`Open thread ${u(e.conversationId)}`,route:{view:"conversation",conversationId:e.conversationId}}),e.recordId&&r.push({key:"work",label:"Work",title:"Open work item",route:{view:"work",workId:e.recordId}}),e.agentId){const n=e.agentName??"Agent";r.push({key:"agent",label:n,title:`Open agent ${n}`,route:{view:"agents-v2",agentId:e.agentId}})}e.sessionId&&r.push({key:"session",label:"Session",title:"Open session",route:{view:"sessions",sessionId:e.sessionId}}),(e.flightId||e.invocationId)&&r.push({key:"follow",label:"Follow",title:"Follow live execution",route:{view:"follow",...e.flightId?{flightId:e.flightId}:{},...e.invocationId?{invocationId:e.invocationId}:{},...e.conversationId?{conversationId:e.conversationId}:{}}});const M=()=>S(l?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${l?" sys-audit-entry-expanded":""}`,onContextMenu:n=>{const j=window.getSelection()?.toString().trim(),d=[];j&&(d.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{k(j)}}),d.push({kind:"separator"}));const W=e.title??e.summary??"";if(W&&d.push({kind:"action",label:"Copy Details",onSelect:()=>{k(W)}}),e.actorName&&d.push({kind:"action",label:"Copy Actor",onSelect:()=>{k(e.actorName)}}),d.push({kind:"action",label:"Copy Event ID",onSelect:()=>{k(e.id)}}),r.length>0){d.push({kind:"separator"});for(const O of r)d.push({kind:"action",label:`Open ${O.label}`,onSelect:()=>a(O.route)})}K(n,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":l,onClick:M,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),M())},children:[s.jsxs("div",{className:"sys-audit-stamp",children:[s.jsx("span",{className:"sys-audit-time",children:I(e.ts)}),s.jsx("span",{className:"sys-audit-date",children:U(e.ts)})]}),s.jsx("div",{className:`sys-audit-marker sys-audit-marker-${o.tone}`,children:s.jsx("span",{})}),s.jsxs("div",{className:"sys-audit-body",children:[s.jsxs("div",{className:"sys-audit-topline",children:[s.jsx("span",{className:"sys-audit-category",children:o.label}),s.jsx("span",{className:"sys-audit-kind",children:q(e.kind)})]}),s.jsx("h3",{className:"sys-audit-title",children:B(e.title??ps(e))}),s.jsx("p",{className:"sys-audit-summary",children:B(A)}),s.jsxs("div",{className:"sys-audit-meta",children:[s.jsxs("span",{className:"sys-audit-meta-item",children:[s.jsx("span",{className:"sys-audit-avatar",style:{background:Z(e.actorName??"system")},children:ds(e.actorName)}),e.actorName??"system"]}),v&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",v]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(n=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:n.title,onClick:j=>{j.stopPropagation(),a(n.route)},children:n.label},n.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:l?"Close":"Details"})]}),l&&s.jsxs("div",{className:"sys-audit-details",children:[s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Event"}),s.jsx("code",{className:"sys-detail-value",children:e.kind})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Recorded"}),s.jsx("span",{className:"sys-detail-value",children:U(e.ts)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Actor"}),s.jsx("span",{className:"sys-detail-value",children:e.actorName??"system"})]}),e.agentName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Agent"}),s.jsx("span",{className:"sys-detail-value",children:e.agentName})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Workspace"}),s.jsx("span",{className:"sys-detail-value",children:e.workspaceRoot??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Thread"}),s.jsx("span",{className:"sys-detail-value",children:e.conversationId?u(e.conversationId):"Not attached"})]}),e.recordId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Work"}),s.jsx("span",{className:"sys-detail-value",children:u(e.recordId)})]}),e.sessionId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Session"}),s.jsx("span",{className:"sys-detail-value",children:u(e.sessionId)})]}),e.flightId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Flight"}),s.jsx("span",{className:"sys-detail-value",children:u(e.flightId)})]}),e.invocationId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Invocation"}),s.jsx("span",{className:"sys-detail-value",children:u(e.invocationId)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Record id"}),s.jsx("code",{className:"sys-detail-value",children:e.id})]})]}),r.length>0&&s.jsx("div",{className:"sys-inline-actions",children:r.map(n=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(n.route),children:["Open ",n.label]},n.key))})]})]},e.id)})})]})}export{le as ActivityScreen};
|
|
1
|
+
import{r as t,j as s}from"./index-BI9AljSD.js";import{p as Y,a as J}from"./api-Co9aQ2Jw.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as Q}from"./sse-DDHEHUgz.js";import{d as Z}from"./colors-BtO5_zlx.js";import{u as ss,a as es,m as as,b as ts}from"./Provider-Bu-C8Hxc.js";import{b as ns}from"./router-DTtux5sP.js";import{r as B}from"./mentions-DuLQnEcn.js";import{t as I,b as U}from"./time-Dhsh_2EG.js";import{E as C}from"./EmptyState-D9X16fKq.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";const is=3e4,ls={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered",ask_sent:"sent a request",ask_working:"working",flight_created:"started task",message_sent:"sent",message_received:"received"},rs=new Set(["ask_failed","ask_replied","flight.completed","flight.updated","flight_updated"]),os={presence:{label:"Presence",tone:"notice"},work:{label:"Execution",tone:"working"},message:{label:"Delivery",tone:"completed"},collaboration:{label:"Coordination",tone:"working"},system:{label:"System",tone:"notice"}};function q(a){return ls[a]??a.replace(/[._]/g," ")}function cs(a){return a.startsWith("agent.")||a.includes("registered")||a.includes("online")||a.includes("offline")?"presence":a.startsWith("flight")||a.startsWith("ask_")?"work":a.startsWith("message")?"message":a.startsWith("collaboration")?"collaboration":"system"}function ds(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function us(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function ps(a){return`${a.actorName??"system"} ${q(a.kind)}`}function hs(a){return a.workspaceRoot?`Recorded from ${a.workspaceRoot}.`:a.conversationId?`Linked to thread ${u(a.conversationId)}.`:"No additional detail was captured for this event."}function le({navigate:a}){const{agents:p,route:z}=ss(),[w]=t.useState(()=>Y("/api/activity",is)),[g,F]=t.useState(w??[]),[x,S]=t.useState(null),[y,R]=t.useState(w===null),[_,T]=t.useState(!1),[h,E]=t.useState(null),[N,G]=t.useState(null),$=t.useRef(w??[]),b=t.useRef(0),f=t.useRef(null),K=es(),L=ns(z),D=t.useMemo(()=>as(p,L),[p,L]),i=t.useMemo(()=>ts(g,D).filter(e=>!rs.has(e.kind)),[g,D]);t.useEffect(()=>{$.current=g},[g]),t.useEffect(()=>{x&&!i.some(e=>e.id===x)&&S(null)},[x,i]);const m=t.useCallback(async(e="initial")=>{const l=++b.current;!($.current.length>0)&&e!=="background"?(R(!0),E(null)):T(!0);try{const o=await J("/api/activity");if(l!==b.current)return;F(o),E(null),G(Date.now()),S(v=>o.some(A=>A.id===v)?v:null)}catch(o){if(l!==b.current)return;E(o instanceof Error?o.message:String(o))}finally{l===b.current&&(R(!1),T(!1))}},[]),P=t.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);t.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),Q(P);const H=t.useMemo(()=>{const e=new Set(i.map(c=>c.actorName??"system")),l=new Set(i.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${i.length}`,detail:i.length>0?`Latest ${I(i[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${l.size}`,detail:l.size>0?"Conversation-linked records":"No linked threads"}]},[i]),V=!y&&i.length===0&&!!h,X=!y&&i.length===0&&!h;return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Activity Log"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker events, task execution, and collaboration handoffs."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("div",{className:"sys-sync-note",children:y?"Loading audit ledger...":h&&i.length>0?`Showing last confirmed snapshot from ${N?I(N):"earlier"}`:N?`Updated ${I(N)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:y||_,onClick:()=>{m("manual")},children:_?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:H.map(e=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:e.label}),s.jsx("strong",{className:"sys-stat-value",children:e.value}),s.jsx("span",{className:"sys-stat-detail",children:e.detail})]},e.label))}),h&&i.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&i.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),V&&s.jsx(C,{className:"sys-state-card-error",title:"Activity is unavailable",body:h,action:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{m("manual")},children:"Try again"})}),X&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),i.length>0&&s.jsx("div",{className:"sys-audit-list",children:i.map(e=>{const l=x===e.id,c=cs(e.kind),o=os[c],v=us(e.workspaceRoot),A=e.summary&&e.summary!==e.title?e.summary:hs(e),r=[];if(e.conversationId&&r.push({key:"thread",label:"Thread",title:`Open thread ${u(e.conversationId)}`,route:{view:"conversation",conversationId:e.conversationId}}),e.recordId&&r.push({key:"work",label:"Work",title:"Open work item",route:{view:"work",workId:e.recordId}}),e.agentId){const n=e.agentName??"Agent";r.push({key:"agent",label:n,title:`Open agent ${n}`,route:{view:"agents-v2",agentId:e.agentId}})}e.sessionId&&r.push({key:"session",label:"Session",title:"Open session",route:{view:"sessions",sessionId:e.sessionId}}),(e.flightId||e.invocationId)&&r.push({key:"follow",label:"Follow",title:"Follow live execution",route:{view:"follow",...e.flightId?{flightId:e.flightId}:{},...e.invocationId?{invocationId:e.invocationId}:{},...e.conversationId?{conversationId:e.conversationId}:{}}});const M=()=>S(l?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${l?" sys-audit-entry-expanded":""}`,onContextMenu:n=>{const j=window.getSelection()?.toString().trim(),d=[];j&&(d.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{k(j)}}),d.push({kind:"separator"}));const W=e.title??e.summary??"";if(W&&d.push({kind:"action",label:"Copy Details",onSelect:()=>{k(W)}}),e.actorName&&d.push({kind:"action",label:"Copy Actor",onSelect:()=>{k(e.actorName)}}),d.push({kind:"action",label:"Copy Event ID",onSelect:()=>{k(e.id)}}),r.length>0){d.push({kind:"separator"});for(const O of r)d.push({kind:"action",label:`Open ${O.label}`,onSelect:()=>a(O.route)})}K(n,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":l,onClick:M,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),M())},children:[s.jsxs("div",{className:"sys-audit-stamp",children:[s.jsx("span",{className:"sys-audit-time",children:I(e.ts)}),s.jsx("span",{className:"sys-audit-date",children:U(e.ts)})]}),s.jsx("div",{className:`sys-audit-marker sys-audit-marker-${o.tone}`,children:s.jsx("span",{})}),s.jsxs("div",{className:"sys-audit-body",children:[s.jsxs("div",{className:"sys-audit-topline",children:[s.jsx("span",{className:"sys-audit-category",children:o.label}),s.jsx("span",{className:"sys-audit-kind",children:q(e.kind)})]}),s.jsx("h3",{className:"sys-audit-title",children:B(e.title??ps(e))}),s.jsx("p",{className:"sys-audit-summary",children:B(A)}),s.jsxs("div",{className:"sys-audit-meta",children:[s.jsxs("span",{className:"sys-audit-meta-item",children:[s.jsx("span",{className:"sys-audit-avatar",style:{background:Z(e.actorName??"system")},children:ds(e.actorName)}),e.actorName??"system"]}),v&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",v]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(n=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:n.title,onClick:j=>{j.stopPropagation(),a(n.route)},children:n.label},n.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:l?"Close":"Details"})]}),l&&s.jsxs("div",{className:"sys-audit-details",children:[s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Event"}),s.jsx("code",{className:"sys-detail-value",children:e.kind})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Recorded"}),s.jsx("span",{className:"sys-detail-value",children:U(e.ts)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Actor"}),s.jsx("span",{className:"sys-detail-value",children:e.actorName??"system"})]}),e.agentName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Agent"}),s.jsx("span",{className:"sys-detail-value",children:e.agentName})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Workspace"}),s.jsx("span",{className:"sys-detail-value",children:e.workspaceRoot??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Thread"}),s.jsx("span",{className:"sys-detail-value",children:e.conversationId?u(e.conversationId):"Not attached"})]}),e.recordId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Work"}),s.jsx("span",{className:"sys-detail-value",children:u(e.recordId)})]}),e.sessionId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Session"}),s.jsx("span",{className:"sys-detail-value",children:u(e.sessionId)})]}),e.flightId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Flight"}),s.jsx("span",{className:"sys-detail-value",children:u(e.flightId)})]}),e.invocationId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Invocation"}),s.jsx("span",{className:"sys-detail-value",children:u(e.invocationId)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Record id"}),s.jsx("code",{className:"sys-detail-value",children:e.id})]})]}),r.length>0&&s.jsx("div",{className:"sys-inline-actions",children:r.map(n=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(n.route),children:["Open ",n.label]},n.key))})]})]},e.id)})})]})}export{le as ActivityScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as o}from"./index-
|
|
1
|
+
import{r as n,j as o}from"./index-BI9AljSD.js";import{a as y}from"./api-Co9aQ2Jw.js";import{c as j}from"./createLucideIcon-DthwWQIg.js";const m=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],f=j("folder-plus",m);function h({onClose:p}){const[d,l]=n.useState(""),[r,c]=n.useState(!1),[i,a]=n.useState(null),u=async()=>{const e=d.trim();if(!(!e||r)){c(!0),a(null);try{const t=await y("/api/projects/add",{method:"POST",body:JSON.stringify({root:e})}),s=t.projects[0]?.title??null;t.alreadyRegistered?a({text:s?`/${s} is already registered`:"Already registered",tone:"ok"}):s?(a({text:`Registered /${s}`,tone:"ok"}),l("")):a({text:"Root added, but no project found there yet",tone:"error"})}catch(t){a({text:t instanceof Error?t.message:String(t),tone:"error"})}finally{c(!1)}}};return o.jsxs("div",{className:"pi-addProject",children:[o.jsxs("div",{className:"pi-addProjectBox","data-busy":r||void 0,children:[o.jsx(f,{size:13,strokeWidth:1.8,"aria-hidden":!0}),o.jsx("input",{className:"pi-addProjectInput",type:"text",value:d,placeholder:"~/dev/my-project","aria-label":"Project folder path",autoFocus:!0,disabled:r,spellCheck:!1,onChange:e=>l(e.currentTarget.value),onKeyDown:e=>{e.key==="Enter"&&u(),e.key==="Escape"&&p()}}),o.jsx("button",{type:"button",className:"pi-addProjectSubmit",disabled:r||!d.trim(),onClick:()=>{u()},children:r?"Adding...":"Add"})]}),i?o.jsx("div",{className:"pi-addProjectNote","data-tone":i.tone,role:"status",children:i.text}):null]})}const k=Object.freeze(Object.defineProperty({__proto__:null,AddProjectForm:h},Symbol.toStringTag,{value:"Module"}));export{h as A,f as F,k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i,f as B,m as f,g as L,C as F,h as G}from"./index-
|
|
1
|
+
import{j as i,f as B,m as f,g as L,C as F,h as G}from"./index-BI9AljSD.js";import{c as J}from"./Provider-Bu-C8Hxc.js";import{a as K,S as Q}from"./SpriteAvatar-56DTXxSV.js";import{C as U}from"./CrewAvatar-CXJHLNVM.js";import{i as X,s as Y,e as $}from"./colors-BtO5_zlx.js";const z={hero:{tile:!1,presence:!1,glow:!0},inspector:{sizes:{compact:32,regular:40,large:52},tile:!0,presence:!0},row:{sizes:{compact:20,regular:24,large:32},tile:!0,presence:!0},turn:{tile:!1,presence:!1},list:{tile:!1,presence:!1},roster:{tile:!1,presence:!1},node:{sizes:{compact:14,regular:16,large:20},tile:!1,presence:!1}},ee={compact:.85,regular:1,large:1.25};function ie(e,a){return z[e].sizes?.[a]}function re(e,a){if(a==="regular")return e;const l=Math.round(e*ee[a]);return a==="compact"?Math.max(20,Math.min(e,l)):l}function le({agent:e,name:a,slug:l,avatarStyle:E,project:D,harness:R,state:I,kind:M="agent",placement:g="row",size:w,scaleWithPreference:P=!0,presence:d,tile:T,salt:O,className:s,channelClassName:_,style:o,title:c}){const r=e?.name??a??"?";if(M==="channel")return i.jsx("span",{className:_??s,style:o,title:c??r,children:"#"});const t=J(),k=t?.operatorName||t?.onboarding?.operatorName?.trim()||t?.onboarding?.operatorNameSuggestion?.trim()||"operator",h=r.toLowerCase()==="operator"||r.toLowerCase()==="you"||r.toLowerCase()===k.toLowerCase()||r.toLowerCase()==="art",A=t?.appearanceDetails?.operatorCharacter||"milo",m=E??t?.appearanceDetails?.avatarStyle??"crew",y=h?void 0:B(t?.appearanceDetails?.agentCharacters,{id:e?.id,name:r},t?.agents??[]),p=l?f(l)??L(l):h?f(A)??L(A):f(y)??f(e?.slug||r),H=p!=null&&F[p]!=null&&(m!=="chip"||G(p)),n=z[g],S=P?t?.appearanceDetails?.avatarSize??"regular":"regular",u=w!=null?re(w,S):n.sizes?.[S];if(m!=="sprite"&&H&&p){const b=R??e?.harness??void 0,Z=I??e?.state??null,q=D??e?.project??"openscout",C=i.jsx(U,{slug:p,name:r,project:q,harness:b,state:Z,size:u,badge:b?d??n.presence:!1,ring:d??(g==="hero"||g==="turn"?!1:n.presence),chip:m==="chip",glow:n.glow,title:c??r});return u==null?i.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",display:"inline-grid",placeItems:"center",...o},title:c??r,children:C}):s||o?i.jsx("span",{className:s,style:{display:"inline-grid",placeItems:"center",...o},children:C}):C}const j=e?K(e):null,x=d??n.presence,N=X(e?.state??null),V=x&&N?Y(e?.state??null):void 0,W=x&&$(e?.state??null),v=i.jsx(Q,{name:r,size:u,hue:j?.hue,tone:j?.tone,salt:O,tile:T??n.tile,glow:n.glow,corner:V,cornerPulse:W,title:c??r});return u==null?i.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",...o},title:c??r,children:v}):s||o?i.jsx("span",{className:s,style:o,children:v}):v}export{le as A,ie as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as s,f as W,y as V}from"./index-CZ-05hKz.js";import{E as Y}from"./EmptyState-CeBl0iGd.js";import{C as F}from"./CastPicker-BcA2vDDV.js";import{a as I}from"./api-Co9aQ2Jw.js";import{h as G}from"./NewChatComposer-hlWT-nbR.js";import{d as J}from"./time-Dhsh_2EG.js";import{u as L}from"./Provider-B2xuo3rf.js";import{o as Q}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as X}from"./AgentsSubnav-CDMjKeYC.js";/* empty css */import{R as Z}from"./refresh-cw-BRn9Oxxl.js";import{S as ss}from"./settings-2fC_G9nX.js";import{c as H}from"./createLucideIcon-DXpqZP7I.js";import{B as _}from"./bot-B5sub1-i.js";import{W as es}from"./wrench-YcXMlsh2.js";import{S as as}from"./server-Dymv5Emh.js";import{C as ns}from"./cpu-BjVis9mc.js";import"./CrewAvatar-CTIuxp4G.js";import"./HarnessMark-D5CA5uSp.js";import"./check-C18YQC90.js";import"./perf-PX8Rx0EP.js";import"./text-CnZ0e1-V.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./colors-BtO5_zlx.js";import"./index-BVlMw8x_.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"./file-text-KijGBnME.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"./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"./chunk-HRAB3GC3-swV8PA2k.js";import"./SecondaryNav-o2RL9H8H.js";import"./secondaryNavConfig-B9IF8wXl.js";import"./message-square-D9YYWE0x.js";import"./compass-0_54-vz3.js";import"./terminal-yN9xN-h9.js";import"./git-branch-BQ_x8KZL.js";import"./scroll-text-DO0GQzvN.js";const is=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],K=H("key-round",is);const ts=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],cs=H("save",ts);function A(e){switch(e){case"ready":case"running":case"available":case"enabled":return"sys-chip-success";case"configured":case"installed":case"working":return"sys-chip-warning";case"missing":case"offline":case"not_ready":case"error":return"sys-chip-danger";default:return"sys-chip-neutral"}}function $(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function M(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function rs(e){return e.length>0?e.join(", "):"No capabilities reported"}function ls({runtime:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(ns,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.label}),s.jsx("div",{className:"agent-config-row-detail",children:e.description}),s.jsx("div",{className:"agent-config-row-meta",children:e.detail})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function os({provider:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(K,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.protocol}),s.jsx("code",{className:"agent-config-code",children:e.baseUrl}),s.jsxs("div",{className:"agent-config-row-meta",children:["Keys: ",e.envKeys.join(", ")]}),s.jsx("div",{className:"agent-config-row-meta",children:e.note})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function ds({agent:e,selected:o,navigate:m}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${o?" agent-config-row-selected":""}`,onClick:()=>m({view:"agents-v2",agentId:e.id,tab:"config"}),children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(_,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.id}),s.jsxs("div",{className:"agent-config-row-meta",children:[e.harness??"unknown harness"," / ",e.transport??"unknown transport",e.model?` / ${e.model}`:""]})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:$(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:M(e.projectRoot??e.cwd)})]})]})}function B(e,o,m,n,N){o(e),m(e.model??""),n(e.runtime.cwd),N(e.runtime.harness)}function gs({agent:e,agents:o,navigate:m,onConfigSaved:n}){const{route:N,appearanceDetails:y,updateAppearanceDetails:b}=L(),h=e?.id??null,x=e?W(y.agentCharacters,e,o):void 0,[c,f]=t.useState(null),[d,p]=t.useState(!1),[j,g]=t.useState(null),[w,a]=t.useState(""),[v,l]=t.useState(""),[C,S]=t.useState(""),[z,E]=t.useState(!1),[u,T]=t.useState("idle"),[O,D]=t.useState(null),k=t.useRef(0),P=t.useCallback(async()=>{const i=++k.current;if(D(null),E(!1),!h){f(null),g(null),p(!1);return}p(!0),g(null);try{const r=await I(`/api/agents/${encodeURIComponent(h)}/config`);if(i!==k.current)return;B(r,f,a,l,S)}catch(r){if(i!==k.current)return;f(null),a(""),l(""),S(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===k.current&&p(!1)}},[e?.harness,h]);t.useEffect(()=>{P()},[P]);const U=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,C].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,C]),q=async i=>{if(i.preventDefault(),!(!h||!c||u==="saving")){T("saving"),D(null),g(null);try{const r=await I(`/api/agents/${encodeURIComponent(h)}/config`,{method:"POST",body:JSON.stringify({model:w.trim()||null,runtime:{cwd:v.trim()||c.runtime.cwd,harness:C.trim()||c.runtime.harness},restart:z})});B(r.config,f,a,l,S),E(!1),D(r.restarted?"Saved and restarted":"Saved"),n?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{T("idle")}}};return e?s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:e.name}),s.jsx("p",{className:"sys-section-subtitle",children:e.id})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("button",{type:"button",className:"s-btn",onClick:()=>m({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{G(e).then(i=>{Q(m,{view:"conversation",conversationId:i},{returnTo:N})})},children:"Open Chat"})]})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Status"}),s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:$(e.status)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Harness"}),s.jsx("strong",{className:"agent-config-selectable",children:e.harness??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Transport"}),s.jsx("strong",{className:"agent-config-selectable",children:e.transport??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Reported model"}),s.jsx("strong",{className:"agent-config-selectable",children:e.model??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Configured model"}),s.jsx("strong",{className:"agent-config-selectable",children:d?"Loading...":c?c.model??"Harness default":"Not editable"})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Project"}),s.jsx("code",{className:"agent-config-inline-code",title:e.projectRoot??void 0,children:M(e.projectRoot)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Working dir"}),s.jsx("code",{className:"agent-config-inline-code",title:e.cwd??c?.runtime.cwd??void 0,children:M(e.cwd??c?.runtime.cwd??null)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Capabilities"}),s.jsx("span",{className:"agent-config-selectable",children:rs(e.capabilities)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Character"}),x?s.jsx("span",{className:"sys-chip sys-chip-neutral",children:x}):s.jsx("span",{className:"agent-config-selectable",children:"Generative sprite"})]})]}),s.jsx("div",{className:"agent-config-cast",children:s.jsx(F,{selectedSlug:x,onSelect:i=>{const r=V(y.agentCharacters,o),R={...r.byId};R[e.id]===i?delete R[e.id]:R[e.id]=i,b({agentCharacters:{...r,byId:R}})}})}),d&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-note",children:"Loading editable launch config..."})}),!d&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:q,children:[s.jsxs("div",{className:"agent-config-edit-grid",children:[s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Model"}),s.jsx("input",{name:"model",value:w,placeholder:"Harness default",disabled:!c.editable||u==="saving",onChange:i=>a(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:C,disabled:!c.editable||u==="saving",onChange:i=>S(i.currentTarget.value),children:U.map(i=>s.jsx("option",{value:i,children:i},i))})]}),s.jsxs("label",{className:"agent-config-field agent-config-field-wide",children:[s.jsx("span",{children:"Working dir"}),s.jsx("input",{name:"cwd",value:v,disabled:!c.editable||u==="saving",onChange:i=>l(i.currentTarget.value)})]})]}),s.jsxs("div",{className:"agent-config-save-row",children:[s.jsxs("label",{className:"agent-config-check",children:[s.jsx("input",{type:"checkbox",checked:z,disabled:!c.editable||u==="saving",onChange:i=>E(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||u==="saving",children:[s.jsx(cs,{size:13}),u==="saving"?"Saving...":"Save config"]}),O&&s.jsx("span",{className:"agent-config-save-note",children:O}),j&&s.jsx("span",{className:"agent-config-save-error",children:j})]})]}),!d&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:j??"No editable local config found"})})]}):s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agent Details"}),s.jsx("p",{className:"sys-section-subtitle",children:"Select an agent to inspect runtime, model, and tool context."})]})}),s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agent selected"}),s.jsx("p",{children:"Choose an agent from the configuration roster."})]})]})}function pe({navigate:e,selectedAgentId:o}){const{route:m}=L(),[n,N]=t.useState(null),[y,b]=t.useState(!0),[h,x]=t.useState(!1),[c,f]=t.useState(null),d=t.useRef(0),p=t.useCallback(async(a="initial")=>{const v=++d.current;a==="initial"?b(!0):x(!0),f(null);try{const l=await I("/api/agent-config/snapshot");if(v!==d.current)return;N(l)}catch(l){if(v!==d.current)return;f(l instanceof Error?l.message:String(l))}finally{v===d.current&&(b(!1),x(!1))}},[]);t.useEffect(()=>{p()},[p]);const j=t.useMemo(()=>n?n.agents.find(a=>a.id===o)??n.agents[0]??null:null,[o,n]),g=n?.providers??[],w=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(g.length),detail:`${g.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>$(a.status)!=="not ready").length} ready`},{label:"Broker",value:n.broker.label,detail:n.broker.nodeId??"No node id"}]:[];return s.jsxs("div",{className:"s-secondary-nav-shell",children:[s.jsx("div",{className:"s-secondary-nav-bar",children:s.jsx(X,{activeRoute:m,navigate:e})}),s.jsx("div",{className:"s-secondary-nav-body s-secondary-nav-body--scroll",children:s.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Agent Configuration"}),s.jsx("p",{className:"sys-page-subtitle",children:"Runtimes, agents, project inventory, delivery bridges, and the missing tool/provider surfaces in one control plane."})]}),s.jsxs("div",{className:"sys-page-actions",children:[n&&s.jsxs("div",{className:"sys-sync-note",children:["Updated ",J(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:y||h,onClick:()=>{p("manual")},children:[s.jsx(Z,{size:13}),h?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:w.map(a=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:a.label}),s.jsx("strong",{className:"sys-stat-value",children:a.value}),s.jsx("span",{className:"sys-stat-detail",children:a.detail})]},a.label))}),c&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:c})]}),y&&!n&&s.jsx(Y,{title:"Loading configuration",body:"Reading Scout settings, runtime readiness, broker agents, and project inventory."}),n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Runtimes"}),s.jsx("p",{className:"sys-section-subtitle",children:"Harness readiness replaces provider auth for the current local-first posture."})]}),s.jsx(ss,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(ls,{runtime:a},a.id))})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"BYOK Providers"}),s.jsx("p",{className:"sys-section-subtitle",children:"OpenAI-compatible vendors OpenScout can discover from local environment configuration."})]}),s.jsx(K,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:g.map(a=>s.jsx(os,{provider:a},a.id))})]})]}),s.jsxs("div",{className:"agent-config-layout agent-config-layout-primary",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agents"}),s.jsx("p",{className:"sys-section-subtitle",children:"Broker-visible endpoints with runtime, model, and source state."})]}),s.jsx(_,{size:15})]}),s.jsx("div",{className:"agent-config-list agent-config-list-scroll",children:n.agents.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agents registered"}),s.jsx("p",{children:"Run setup or start a local agent to populate this roster."})]}):n.agents.map(a=>s.jsx(ds,{agent:a,selected:a.id===j?.id,navigate:e},a.id))})]}),s.jsx(gs,{agent:j,agents:n.agents,navigate:e,onConfigSaved:()=>{p("manual")}})]}),s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Tools & Context"}),s.jsx("p",{className:"sys-section-subtitle",children:"The next model boundary to make first-class."})]}),s.jsx(es,{size:15})]}),s.jsx("p",{className:"agent-config-copy",children:n.toolContext.note}),s.jsxs("div",{className:"agent-config-chip-row",children:[s.jsxs("span",{className:"sys-chip sys-chip-neutral",children:[n.toolContext.mcpServerCount," MCP servers"]}),s.jsx("span",{className:"sys-chip sys-chip-warning",children:"loadouts pending"})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Broker & Delivery"}),s.jsx("p",{className:"sys-section-subtitle",children:"Control-plane state and bridges that route attention back to you."})]}),s.jsx(as,{size:15})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Broker"}),s.jsx("span",{className:`sys-chip ${n.broker.healthy?"sys-chip-success":"sys-chip-danger"}`,children:n.broker.label})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Messages"}),s.jsx("strong",{children:n.broker.messageCount})]}),n.integrations.map(a=>s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:a.name}),s.jsx("span",{children:a.detail})]},a.id))]})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Known Missing Pieces"}),s.jsx("p",{className:"sys-section-subtitle",children:"The configuration model is now visible; these are the next root-cause surfaces to build."})]})}),s.jsx("div",{className:"agent-config-gap-list",children:n.gaps.map(a=>s.jsx("span",{children:a},a))})]})]})]})})]})}export{pe as AgentConfigurationScreen};
|
|
1
|
+
import{r as t,j as s,f as W,y as V}from"./index-BI9AljSD.js";import{E as Y}from"./EmptyState-D9X16fKq.js";import{C as F}from"./CastPicker-CTBHjjGw.js";import{a as I}from"./api-Co9aQ2Jw.js";import{h as G}from"./NewChatComposer-C_1op4dH.js";import{d as J}from"./time-Dhsh_2EG.js";import{u as L}from"./Provider-Bu-C8Hxc.js";import{o as Q}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as X}from"./AgentsSubnav-DUsya4WK.js";/* empty css */import{R as Z}from"./refresh-cw-DmNAhaH0.js";import{S as ss}from"./settings-C6h9y5XX.js";import{c as H}from"./createLucideIcon-DthwWQIg.js";import{B as _}from"./bot-DzkOUFBb.js";import{W as es}from"./wrench-DkxnZRlR.js";import{S as as}from"./server-nWqndnxu.js";import{C as ns}from"./cpu-DuD3RFX5.js";import"./CrewAvatar-CXJHLNVM.js";import"./HarnessMark-DAaWPiT_.js";import"./check-DbIkldnK.js";import"./perf-PX8Rx0EP.js";import"./text-Faa3ZStB.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./colors-BtO5_zlx.js";import"./index-DfsTyYDx.js";import"./NewChatOrigin-D7hwp6dm.js";import"./keyboard-nav-e6yGeorb.js";import"./x-DfRJbqrh.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./file-text--hfhwZH1.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./SecondaryNav-BrXMtvKE.js";import"./secondaryNavConfig-C9bQ9_IA.js";import"./message-square-O-Hu9Mk2.js";import"./compass-BcRI_YXo.js";import"./terminal-C3YRPfyz.js";import"./git-branch-DJyvr0k-.js";import"./scroll-text-kPhYbh-M.js";const is=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],K=H("key-round",is);const ts=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],cs=H("save",ts);function A(e){switch(e){case"ready":case"running":case"available":case"enabled":return"sys-chip-success";case"configured":case"installed":case"working":return"sys-chip-warning";case"missing":case"offline":case"not_ready":case"error":return"sys-chip-danger";default:return"sys-chip-neutral"}}function $(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function M(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function rs(e){return e.length>0?e.join(", "):"No capabilities reported"}function ls({runtime:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(ns,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.label}),s.jsx("div",{className:"agent-config-row-detail",children:e.description}),s.jsx("div",{className:"agent-config-row-meta",children:e.detail})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function os({provider:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(K,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.protocol}),s.jsx("code",{className:"agent-config-code",children:e.baseUrl}),s.jsxs("div",{className:"agent-config-row-meta",children:["Keys: ",e.envKeys.join(", ")]}),s.jsx("div",{className:"agent-config-row-meta",children:e.note})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function ds({agent:e,selected:o,navigate:m}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${o?" agent-config-row-selected":""}`,onClick:()=>m({view:"agents-v2",agentId:e.id,tab:"config"}),children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(_,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.id}),s.jsxs("div",{className:"agent-config-row-meta",children:[e.harness??"unknown harness"," / ",e.transport??"unknown transport",e.model?` / ${e.model}`:""]})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:$(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:M(e.projectRoot??e.cwd)})]})]})}function B(e,o,m,n,N){o(e),m(e.model??""),n(e.runtime.cwd),N(e.runtime.harness)}function gs({agent:e,agents:o,navigate:m,onConfigSaved:n}){const{route:N,appearanceDetails:y,updateAppearanceDetails:b}=L(),h=e?.id??null,x=e?W(y.agentCharacters,e,o):void 0,[c,f]=t.useState(null),[d,p]=t.useState(!1),[j,g]=t.useState(null),[w,a]=t.useState(""),[v,l]=t.useState(""),[C,S]=t.useState(""),[z,E]=t.useState(!1),[u,T]=t.useState("idle"),[O,D]=t.useState(null),k=t.useRef(0),P=t.useCallback(async()=>{const i=++k.current;if(D(null),E(!1),!h){f(null),g(null),p(!1);return}p(!0),g(null);try{const r=await I(`/api/agents/${encodeURIComponent(h)}/config`);if(i!==k.current)return;B(r,f,a,l,S)}catch(r){if(i!==k.current)return;f(null),a(""),l(""),S(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===k.current&&p(!1)}},[e?.harness,h]);t.useEffect(()=>{P()},[P]);const U=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,C].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,C]),q=async i=>{if(i.preventDefault(),!(!h||!c||u==="saving")){T("saving"),D(null),g(null);try{const r=await I(`/api/agents/${encodeURIComponent(h)}/config`,{method:"POST",body:JSON.stringify({model:w.trim()||null,runtime:{cwd:v.trim()||c.runtime.cwd,harness:C.trim()||c.runtime.harness},restart:z})});B(r.config,f,a,l,S),E(!1),D(r.restarted?"Saved and restarted":"Saved"),n?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{T("idle")}}};return e?s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:e.name}),s.jsx("p",{className:"sys-section-subtitle",children:e.id})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("button",{type:"button",className:"s-btn",onClick:()=>m({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{G(e).then(i=>{Q(m,{view:"conversation",conversationId:i},{returnTo:N})})},children:"Open Chat"})]})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Status"}),s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:$(e.status)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Harness"}),s.jsx("strong",{className:"agent-config-selectable",children:e.harness??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Transport"}),s.jsx("strong",{className:"agent-config-selectable",children:e.transport??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Reported model"}),s.jsx("strong",{className:"agent-config-selectable",children:e.model??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Configured model"}),s.jsx("strong",{className:"agent-config-selectable",children:d?"Loading...":c?c.model??"Harness default":"Not editable"})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Project"}),s.jsx("code",{className:"agent-config-inline-code",title:e.projectRoot??void 0,children:M(e.projectRoot)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Working dir"}),s.jsx("code",{className:"agent-config-inline-code",title:e.cwd??c?.runtime.cwd??void 0,children:M(e.cwd??c?.runtime.cwd??null)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Capabilities"}),s.jsx("span",{className:"agent-config-selectable",children:rs(e.capabilities)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Character"}),x?s.jsx("span",{className:"sys-chip sys-chip-neutral",children:x}):s.jsx("span",{className:"agent-config-selectable",children:"Generative sprite"})]})]}),s.jsx("div",{className:"agent-config-cast",children:s.jsx(F,{selectedSlug:x,onSelect:i=>{const r=V(y.agentCharacters,o),R={...r.byId};R[e.id]===i?delete R[e.id]:R[e.id]=i,b({agentCharacters:{...r,byId:R}})}})}),d&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-note",children:"Loading editable launch config..."})}),!d&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:q,children:[s.jsxs("div",{className:"agent-config-edit-grid",children:[s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Model"}),s.jsx("input",{name:"model",value:w,placeholder:"Harness default",disabled:!c.editable||u==="saving",onChange:i=>a(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:C,disabled:!c.editable||u==="saving",onChange:i=>S(i.currentTarget.value),children:U.map(i=>s.jsx("option",{value:i,children:i},i))})]}),s.jsxs("label",{className:"agent-config-field agent-config-field-wide",children:[s.jsx("span",{children:"Working dir"}),s.jsx("input",{name:"cwd",value:v,disabled:!c.editable||u==="saving",onChange:i=>l(i.currentTarget.value)})]})]}),s.jsxs("div",{className:"agent-config-save-row",children:[s.jsxs("label",{className:"agent-config-check",children:[s.jsx("input",{type:"checkbox",checked:z,disabled:!c.editable||u==="saving",onChange:i=>E(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||u==="saving",children:[s.jsx(cs,{size:13}),u==="saving"?"Saving...":"Save config"]}),O&&s.jsx("span",{className:"agent-config-save-note",children:O}),j&&s.jsx("span",{className:"agent-config-save-error",children:j})]})]}),!d&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:j??"No editable local config found"})})]}):s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agent Details"}),s.jsx("p",{className:"sys-section-subtitle",children:"Select an agent to inspect runtime, model, and tool context."})]})}),s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agent selected"}),s.jsx("p",{children:"Choose an agent from the configuration roster."})]})]})}function pe({navigate:e,selectedAgentId:o}){const{route:m}=L(),[n,N]=t.useState(null),[y,b]=t.useState(!0),[h,x]=t.useState(!1),[c,f]=t.useState(null),d=t.useRef(0),p=t.useCallback(async(a="initial")=>{const v=++d.current;a==="initial"?b(!0):x(!0),f(null);try{const l=await I("/api/agent-config/snapshot");if(v!==d.current)return;N(l)}catch(l){if(v!==d.current)return;f(l instanceof Error?l.message:String(l))}finally{v===d.current&&(b(!1),x(!1))}},[]);t.useEffect(()=>{p()},[p]);const j=t.useMemo(()=>n?n.agents.find(a=>a.id===o)??n.agents[0]??null:null,[o,n]),g=n?.providers??[],w=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(g.length),detail:`${g.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>$(a.status)!=="not ready").length} ready`},{label:"Broker",value:n.broker.label,detail:n.broker.nodeId??"No node id"}]:[];return s.jsxs("div",{className:"s-secondary-nav-shell",children:[s.jsx("div",{className:"s-secondary-nav-bar",children:s.jsx(X,{activeRoute:m,navigate:e})}),s.jsx("div",{className:"s-secondary-nav-body s-secondary-nav-body--scroll",children:s.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Agent Configuration"}),s.jsx("p",{className:"sys-page-subtitle",children:"Runtimes, agents, project inventory, delivery bridges, and the missing tool/provider surfaces in one control plane."})]}),s.jsxs("div",{className:"sys-page-actions",children:[n&&s.jsxs("div",{className:"sys-sync-note",children:["Updated ",J(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:y||h,onClick:()=>{p("manual")},children:[s.jsx(Z,{size:13}),h?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:w.map(a=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:a.label}),s.jsx("strong",{className:"sys-stat-value",children:a.value}),s.jsx("span",{className:"sys-stat-detail",children:a.detail})]},a.label))}),c&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:c})]}),y&&!n&&s.jsx(Y,{title:"Loading configuration",body:"Reading Scout settings, runtime readiness, broker agents, and project inventory."}),n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Runtimes"}),s.jsx("p",{className:"sys-section-subtitle",children:"Harness readiness replaces provider auth for the current local-first posture."})]}),s.jsx(ss,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(ls,{runtime:a},a.id))})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"BYOK Providers"}),s.jsx("p",{className:"sys-section-subtitle",children:"OpenAI-compatible vendors OpenScout can discover from local environment configuration."})]}),s.jsx(K,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:g.map(a=>s.jsx(os,{provider:a},a.id))})]})]}),s.jsxs("div",{className:"agent-config-layout agent-config-layout-primary",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agents"}),s.jsx("p",{className:"sys-section-subtitle",children:"Broker-visible endpoints with runtime, model, and source state."})]}),s.jsx(_,{size:15})]}),s.jsx("div",{className:"agent-config-list agent-config-list-scroll",children:n.agents.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agents registered"}),s.jsx("p",{children:"Run setup or start a local agent to populate this roster."})]}):n.agents.map(a=>s.jsx(ds,{agent:a,selected:a.id===j?.id,navigate:e},a.id))})]}),s.jsx(gs,{agent:j,agents:n.agents,navigate:e,onConfigSaved:()=>{p("manual")}})]}),s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Tools & Context"}),s.jsx("p",{className:"sys-section-subtitle",children:"The next model boundary to make first-class."})]}),s.jsx(es,{size:15})]}),s.jsx("p",{className:"agent-config-copy",children:n.toolContext.note}),s.jsxs("div",{className:"agent-config-chip-row",children:[s.jsxs("span",{className:"sys-chip sys-chip-neutral",children:[n.toolContext.mcpServerCount," MCP servers"]}),s.jsx("span",{className:"sys-chip sys-chip-warning",children:"loadouts pending"})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Broker & Delivery"}),s.jsx("p",{className:"sys-section-subtitle",children:"Control-plane state and bridges that route attention back to you."})]}),s.jsx(as,{size:15})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Broker"}),s.jsx("span",{className:`sys-chip ${n.broker.healthy?"sys-chip-success":"sys-chip-danger"}`,children:n.broker.label})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Messages"}),s.jsx("strong",{children:n.broker.messageCount})]}),n.integrations.map(a=>s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:a.name}),s.jsx("span",{children:a.detail})]},a.id))]})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Known Missing Pieces"}),s.jsx("p",{className:"sys-section-subtitle",children:"The configuration model is now visible; these are the next root-cause surfaces to build."})]})}),s.jsx("div",{className:"agent-config-gap-list",children:n.gaps.map(a=>s.jsx("span",{children:a},a))})]})]})]})})]})}export{pe as AgentConfigurationScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-
|
|
1
|
+
import{r as l,j as e}from"./index-BI9AljSD.js";import{A as k}from"./AgentAvatar-B7c0egdP.js";import{a as R}from"./api-Co9aQ2Jw.js";import{c as T}from"./colors-BtO5_zlx.js";import{t as D}from"./time-Dhsh_2EG.js";import{u as M}from"./Provider-Bu-C8Hxc.js";import{a as I}from"./agent-specialization-BtxLN4UR.js";import{p as O}from"./project-overview-helpers-BQTc_Ous.js";import{FileViewerPane as $}from"./FileViewerPane-CY0RN78e.js";/* empty css */import{C as z}from"./chevron-right-CnZRSd-V.js";import{C as L}from"./chevron-down-C475vltS.js";import{F as H,a as U}from"./DocumentFocusViewer-DFFE85Tq.js";import{F as G}from"./file-text--hfhwZH1.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./HarnessMark-DAaWPiT_.js";import"./perf-PX8Rx0EP.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./createLucideIcon-DthwWQIg.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./NewChatOrigin-D7hwp6dm.js";import"./x-DfRJbqrh.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";function B({payload:t,selectedSlug:i,selectedFile:v,filter:S,collapsed:n,onToggleFolder:N,onSelectFile:h}){const p=S.trim().toLowerCase(),b=t.folders.filter(o=>!p||o.slug.includes(p)?!0:o.files.some(c=>c.name.toLowerCase().includes(p)||c.relativePath.toLowerCase().includes(p)));return b.length===0?e.jsx("div",{className:"adef-treeEmpty",children:t.agentsRootExists?"No agent folders in .agents yet.":"No .agents directory on disk."}):e.jsx(e.Fragment,{children:b.map(o=>{const c=n.has(o.slug),C=o.slug===i;return e.jsxs("div",{className:"adef-folder","data-selected-agent":C||void 0,children:[e.jsxs("button",{type:"button",className:"adef-folderRow",onClick:()=>N(o.slug),children:[e.jsx("span",{className:"adef-folderChevron","aria-hidden":!0,children:c?e.jsx(z,{size:12}):e.jsx(L,{size:12})}),e.jsx("span",{className:"adef-folderIcon","aria-hidden":!0,children:c?e.jsx(H,{size:13}):e.jsx(U,{size:13})}),e.jsx("span",{className:"adef-folderName",children:o.slug})]}),c?null:o.files.map(d=>{const f=v?.absolutePath===d.absolutePath;return e.jsxs("button",{type:"button",className:"adef-fileRow","data-selected":f||void 0,onClick:()=>h({slug:o.slug,name:d.name,relativePath:`.agents/${d.relativePath}`,absolutePath:d.absolutePath,excerpt:d.excerpt}),children:[e.jsx("span",{className:"adef-fileIcon","aria-hidden":!0,children:e.jsx(G,{size:12})}),e.jsx("span",{className:"adef-fileName",children:d.name})]},d.absolutePath)})]},o.slug)})})}function J({agent:t,config:i,onConfigSaved:v,sessionCatalog:S,navigate:n,homeView:N}){const h=I(t,i),p=t.handle?.replace(/^@+/,"")||t.name,b=S?.sessions.length??0,[o,c]=l.useState(""),[C,d]=l.useState(""),[f,x]=l.useState(""),[E,w]=l.useState(!1),[m,g]=l.useState("idle"),[P,y]=l.useState(null),[j,F]=l.useState(null);l.useEffect(()=>{if(!i){c(""),d(""),x(t.harness??"");return}c(i.model??""),d(i.runtime.cwd),x(i.runtime.harness),w(!1),y(null),F(null)},[t.harness,t.id,i]);const A=l.useMemo(()=>{const s=["claude","codex","pi",i?.runtime.harness,t.harness,f].filter(u=>!!u?.trim());return Array.from(new Set(s))},[t.harness,i?.runtime.harness,f]),a=async s=>{if(s.preventDefault(),!(!i||m==="saving")){g("saving"),y(null),F(null);try{const u=await R(`/api/agents/${encodeURIComponent(t.id)}/config`,{method:"POST",body:JSON.stringify({model:o.trim()||null,runtime:{cwd:C.trim()||i.runtime.cwd,harness:f.trim()||i.runtime.harness},restart:E})});v(u.config),w(!1),y(u.restarted?"Saved and restarted":"Saved")}catch(u){F(u instanceof Error?u.message:"Could not save config")}finally{g("idle")}}},r=()=>n({view:N,agentId:t.id,tab:"profile"});return e.jsxs("aside",{className:"adef-inspector",children:[e.jsxs("header",{className:"adef-inspectorHead",children:[e.jsx(k,{agent:t,size:36,tile:!0,presence:!1}),e.jsxs("div",{className:"adef-inspectorIdent",children:[e.jsxs("span",{className:"adef-inspectorHandle",children:["@",p]}),e.jsx("span",{className:"adef-inspectorSpec",children:h.headline})]})]}),e.jsxs("dl",{className:"adef-inspectorFacts",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"State"}),e.jsx("dd",{children:T(t.state,t)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sessions"}),e.jsx("dd",{children:b})]})]}),i?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"adef-inspectorSec",children:"Runtime"}),e.jsxs("form",{className:"adef-configEdit",onSubmit:a,children:[e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Model"}),e.jsx("input",{value:o,placeholder:"Harness default",disabled:!i.editable||m==="saving",onChange:s=>c(s.currentTarget.value)})]}),e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Harness"}),e.jsx("select",{value:f,disabled:!i.editable||m==="saving",onChange:s=>x(s.currentTarget.value),children:A.map(s=>e.jsx("option",{value:s,children:s},s))})]}),e.jsxs("label",{className:"adef-configField adef-configField--wide",children:[e.jsx("span",{children:"Working dir"}),e.jsx("input",{value:C,disabled:!i.editable||m==="saving",onChange:s=>d(s.currentTarget.value)})]}),e.jsxs("div",{className:"adef-configSaveRow",children:[e.jsxs("label",{className:"adef-configCheck",children:[e.jsx("input",{type:"checkbox",checked:E,disabled:!i.editable||m==="saving",onChange:s=>w(s.currentTarget.checked)}),e.jsx("span",{children:"Restart"})]}),e.jsx("button",{type:"submit",className:"adef-inspectorAct","data-primary":!0,disabled:!i.editable||m==="saving",children:m==="saving"?"Saving…":"Save"})]}),P?e.jsx("p",{className:"adef-inspectorMeta",children:P}):null,j?e.jsx("p",{className:"adef-configError",children:j}):null]}),e.jsx("div",{className:"adef-inspectorSec",children:"Permissions"}),e.jsx("p",{className:"adef-inspectorMono",children:O(i.permissionProfile)}),e.jsx("div",{className:"adef-inspectorSec",children:"Tools"}),e.jsx("div",{className:"adef-inspectorChips",children:(h.capabilities.length>0?h.capabilities:["—"]).map(s=>e.jsx("span",{className:"adef-inspectorChip",children:s},s))})]}):e.jsx("p",{className:"adef-inspectorMeta",children:"No editable local config on disk."}),t.updatedAt?e.jsxs("p",{className:"adef-inspectorMeta",children:["Updated ",D(t.updatedAt)]}):null,e.jsx("div",{className:"adef-inspectorActs",children:e.jsx("button",{type:"button",className:"adef-inspectorAct","data-primary":!0,onClick:r,children:"Sessions"})})]})}function Me({agent:t,navigate:i,homeView:v="agents-v2"}){const{openFilePreview:S}=M(),[n,N]=l.useState(null),[h,p]=l.useState(null),[b,o]=l.useState(null),[c,C]=l.useState(null),[d,f]=l.useState("loading"),[x,E]=l.useState(""),[w,m]=l.useState(()=>new Set),[g,P]=l.useState(null),y=l.useCallback(async a=>{await R("/api/file/reveal",{method:"POST",body:JSON.stringify({path:a})}).catch(()=>{})},[]);l.useEffect(()=>{let a=!1;return f("loading"),(async()=>{const[r,s,u]=await Promise.allSettled([R(`/api/agents/${encodeURIComponent(t.id)}/definitions`),R(`/api/agents/${encodeURIComponent(t.id)}/config`).catch(()=>null),R(`/api/agents/${encodeURIComponent(t.id)}/session-catalog`).catch(()=>null)]);a||(r.status==="fulfilled"&&N(r.value),s.status==="fulfilled"&&p(s.value),u.status==="fulfilled"&&o(u.value),f("ready"))})(),()=>{a=!0}},[t.id]);const j=l.useMemo(()=>{if(!n)return null;const a=n.folders.find(s=>s.slug===n.selectedSlug)??n.folders[0]??null,r=a?.files.find(s=>s.name==="AGENT.md")??a?.files[0]??null;return!a||!r?null:{slug:a.slug,name:r.name,relativePath:`.agents/${r.relativePath}`,absolutePath:r.absolutePath,excerpt:r.excerpt}},[n]);l.useEffect(()=>{j&&(P(a=>a&&n?.folders.some(r=>r.files.some(s=>s.absolutePath===a.absolutePath))?a:j),n?.selectedSlug&&m(a=>{const r=new Set(a);return r.delete(n.selectedSlug),r}))},[j,n]);const F=n?.folders.reduce((a,r)=>a+r.files.length,0)??0,A=l.useCallback(a=>{m(r=>{const s=new Set(r);return s.has(a)?s.delete(a):s.add(a),s})},[]);return e.jsxs("div",{className:"adef-workspace",children:[e.jsxs("header",{className:"adef-head",children:[e.jsxs("div",{className:"adef-headCopy",children:[e.jsx("span",{className:"adef-headKind",children:"Config"}),e.jsxs("span",{className:"adef-headPath",title:n?.agentsRoot,children:[n?.agentsRootExists?".agents · explore & edit":"explore & edit",n?` · ${n.folders.length} agents · ${F} files`:""]})]}),e.jsx("input",{type:"search",className:"adef-filter",placeholder:"Filter agents & files…",value:x,onChange:a=>E(a.target.value)})]}),d==="loading"?e.jsx("div",{className:"adef-loading",children:"Loading agent config…"}):e.jsxs("div",{className:"adef-frame",children:[e.jsx("aside",{className:"adef-tree","aria-label":"Agent definition files",children:n?e.jsx(B,{payload:n,selectedSlug:n.selectedSlug,selectedFile:g,filter:x,collapsed:w,onToggleFolder:A,onSelectFile:P}):null}),e.jsx("section",{className:"adef-viewer","aria-label":"Definition file",children:g?e.jsx($,{artifact:g,onOpen:S,onReveal:a=>{y(a)},onBrowse:n?a=>i({view:"code",root:n.projectRoot,file:a}):void 0}):e.jsx("div",{className:"av2-repoViewerState",children:n?.agentsRootExists?"Select a definition file — or create .agents/<handle>/AGENT.md":"Create .agents/<handle>/AGENT.md in the project root to define this expert on disk."})}),e.jsx(J,{agent:t,config:h,onConfigSaved:p,sessionCatalog:c,navigate:i,homeView:v})]})]})}export{Me as AgentDefinitionsWorkspace};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as a}from"./index-
|
|
1
|
+
import{r as v,j as a}from"./index-BI9AljSD.js";import{n as A,b as C,c as y,s as $}from"./colors-BtO5_zlx.js";import{t as k}from"./time-Dhsh_2EG.js";import{A as w}from"./AgentLiveActions-CsQA3pu_.js";function F(c){return c?c.replace(/^\/Users\/[^/]+/,"~"):null}const E=v.forwardRef(function({agent:e,pinned:l,onOpen:N,onClose:b,onAction:u,style:g,className:o},f){const r=A(e.state),m=C(e.state),n=e.cwd??e.projectRoot,d=l?n:F(n),t=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,h=e.selector??e.defaultSelector,p=t??e.name,j=e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId,i=y(r);return a.jsxs("div",{ref:f,className:`agent-card${l?" agent-card--pinned":""}${o?` ${o}`:""}`,style:g,role:"dialog","aria-label":`${p} details`,children:[a.jsxs("header",{className:"agent-card-head",children:[a.jsx("div",{className:"agent-card-name",children:p}),a.jsxs("div",{className:"agent-card-meta",children:[a.jsx("span",{className:`agent-card-dot agent-card-dot--${m}`,style:r==="in_turn"||r==="in_flight"?{background:$(e.state)}:void 0}),i&&a.jsx("span",{className:`agent-card-state agent-card-state--${m}`,children:i}),e.updatedAt&&a.jsxs(a.Fragment,{children:[i&&a.jsx("span",{className:"agent-card-sep",children:"·"}),a.jsx("span",{className:"agent-card-time",children:k(e.updatedAt)})]})]})]}),a.jsxs("div",{className:"agent-card-body",children:[t&&a.jsx(s,{label:"handle",children:a.jsx("code",{className:"agent-card-mono",children:t})}),h&&a.jsx(s,{label:"selector",children:a.jsx("code",{className:"agent-card-mono",children:h})}),d&&a.jsx(s,{label:"cwd",children:a.jsx("code",{className:"agent-card-mono",title:n??d,children:d})}),j&&a.jsx(s,{label:"machine",children:a.jsx("span",{className:"agent-card-mono",children:j})}),(e.project||e.branch)&&a.jsx(s,{label:"project",children:a.jsxs("span",{className:"agent-card-mono",children:[e.project??"—",e.branch&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"agent-card-sep agent-card-sep--inline",children:"·"}),a.jsx("span",{className:"agent-card-branch",children:e.branch})]})]})}),(e.harness||e.model)&&a.jsx(s,{label:"runtime",children:a.jsxs("span",{className:"agent-card-mono",children:[e.harness??"—",e.model&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"agent-card-sep agent-card-sep--inline",children:"·"}),a.jsx("span",{className:"agent-card-model",children:e.model})]})]})}),e.transport&&a.jsx(s,{label:"launch transport",children:a.jsx("span",{className:"agent-card-mono",children:e.transport})}),e.role&&a.jsx(s,{label:"role",children:a.jsx("span",{className:"agent-card-mono",children:e.role})}),e.capabilities&&e.capabilities.length>0&&a.jsx(s,{label:"capabilities",children:a.jsxs("div",{className:"agent-card-caps",children:[e.capabilities.slice(0,8).map(x=>a.jsx("span",{className:"agent-card-cap",children:x},x)),e.capabilities.length>8&&a.jsxs("span",{className:"agent-card-cap agent-card-cap--more",children:["+",e.capabilities.length-8]})]})})]}),a.jsx(w,{agent:e,variant:"compact",onNavigate:u}),a.jsxs("footer",{className:"agent-card-foot",children:[a.jsxs("button",{type:"button",className:"agent-card-link",onClick:N,children:["Open agent ",a.jsx("span",{"aria-hidden":!0,children:"→"})]}),l&&a.jsx("button",{type:"button",className:"agent-card-close",onClick:b,"aria-label":"Close",children:"esc"})]})]})});function s({label:c,children:e}){return a.jsxs("div",{className:"agent-card-field",children:[a.jsx("span",{className:"agent-card-label",children:c}),a.jsx("div",{className:"agent-card-value",children:e})]})}export{E as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-CZ-05hKz.js";/* empty css */import{H as Me}from"./HarnessMark-D5CA5uSp.js";import{a as ue,S as fe}from"./SpriteAvatar-Bs68ZENy.js";import{n as Ze}from"./colors-BtO5_zlx.js";import{o as He,l as Ke}from"./lane-observe-vfyACHi0.js";import{t as We}from"./time-Dhsh_2EG.js";import{S as Be}from"./SessionObserve-Dsd0j05N.js";import{l as X,i as Ge}from"./agent-lanes-model-AfrjRNK5.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-gUBsydNf.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-D_DMlBeT.js";import"./index-BVlMw8x_.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./mentions-CcPFMbmZ.js";import"./Provider-B2xuo3rf.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"./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"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentDetailCard-UqPNpcvB.js";import"./AgentLiveActions-BwuzOE8h.js";import"./terminal-takeover-DANQfTcy.js";import"./openContent-C6XO6kr5.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";import"./message-markup-RkfmDfME.js";import"./ObservedTopologyPanel-CdGUXxGR.js";import"./ObserveTextFlow-BSEtYTxU.js";import"./use-reduced-motion-CKkhq9c5.js";import"./proxy-DnLpZIi9.js";import"./SessionObserveEvidence-DopQYDkD.js";import"./message-circle-B2ddzBrX.js";import"./wrench-YcXMlsh2.js";import"./external-link-Ckiyzjwo.js";import"./context-budget-DX_fwUs3.js";const z=5*6e4,qe=6,Z=qe+1,be=8,Ue=30*6e4,ye=.65,Ae=1.45,ke=.1,ve=360,Se=260;function pe(t){return Math.round(Math.min(Ae,Math.max(ye,t))*100)/100}function se(t,o){return Math.round(Math.min(o,Math.max(-o,t)))}const I=164,ne=56,$e=14,Le=12,C=66,me=7,P=96,ce=12,D=88,M=150,Je=48,Qe=24,et=480,tt=38,Oe="openscout:agent-floor-orient",Ee="openscout:agent-floor-lane-order";function st(){try{const t=localStorage.getItem(Oe);if(t==="past-left"||t==="past-right")return t}catch{}return"past-left"}function nt(){try{const t=JSON.parse(sessionStorage.getItem(Ee)??"[]");return Array.isArray(t)?t.filter(o=>typeof o=="string"):[]}catch{return[]}}function ae(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}const at=/^(edit|multi_?edit|write|apply_?patch|patch_apply|str_?replace|notebook_?edit|create_file)/i;function ot(t){return t.kind==="tool"?t.diff||t.tool&&at.test(t.tool.trim())?"edit":"tool":t.kind==="message"||t.kind==="ask"?"msg":null}function lt(t,o){const a=t.observe?.metadata?.session?.sessionStart,l={tool:0,edit:0,msg:0},c=Array.from({length:Z},()=>({blocks:[],counts:{tool:0,edit:0,msg:0},tools:new Map,total:0})),u=[];let b=0,g=null;for(const m of t.observe?.events??[]){const r=ot(m);if(!r)continue;const d=He(m,a),w=d===null||d>=o?0:Math.floor((o-d)/z)+1;if(w>=Z)continue;const _=c[w];_.blocks.push(r),_.counts[r]+=1,_.total+=1,l[r]+=1,b+=1;const x=r==="msg"?null:m.tool?.trim()||"tool";x&&_.tools.set(x,(_.tools.get(x)??0)+1),u.push({kind:r,label:r==="msg"?Ke(m.text,44,1):m.text.trim()||x||"tool",at:d}),g={at:d,label:r==="msg"?"message":m.tool?.trim()||"tool"}}return{lane:t,live:Ge(t.observe)&&b>0,slots:c.map(m=>({blocks:m.blocks.slice(-8),counts:m.counts,tools:[...m.tools.entries()].sort((r,d)=>d[1]-r[1]),total:m.total})),counts:l,strip:u.slice(-10).map(m=>m.kind),lastLabel:g?.label??null,lastAt:g?.at??(t.lastActiveAt||null)}}function oe(t){const o=(a,l,c)=>`${a} ${a===1?l:c}`;return[o(t.tool,"tool","tools"),o(t.edit,"edit","edits"),o(t.msg,"msg","msgs")].join(" · ")}function rt(t){return/^(working|active|running|in_turn|in_flight)/i.test(t.lane.agent.state??"")?"quiet":"idle"}function F(t){return t.tool+t.edit+t.msg}function we(t){if(F(t)===0)return"quiet";const a=[["tool-led",t.tool],["edit-heavy",t.edit],["conversation-led",t.msg]].sort((l,c)=>c[1]-l[1]);return a[0][1]===a[1][1]?"balanced":a[0][0]}function it(t){const o=new Map;for(const l of t.slots)for(const[c,u]of l.tools)o.set(c,(o.get(c)??0)+u);const[a]=[...o.entries()].sort((l,c)=>c[1]-l[1]);return a?{value:a[0],detail:`${a[1]} call${a[1]===1?"":"s"} · 30m`}:{value:"no tool pattern",detail:"messages and edits only"}}function ct(t){const o=t.slots[0]?.total??0,a=t.slots[1]?.total??0;return o===0&&a===0?{value:"quiet",detail:"no work in the last 10m"}:o===0?{value:"paused",detail:`${a} in the prior 5m`}:a===0?{value:"new burst",detail:`${o} in the current 5m`}:o>=a+3?{value:"building",detail:`${o} now · ${a} prior`}:a>=o+3?{value:"easing",detail:`${o} now · ${a} prior`}:{value:"steady",detail:`${o} now · ${a} prior`}}function L({label:t,value:o,detail:a,mix:l}){const c=l?Math.max(1,F(l)):1;return e.jsxs("span",{className:"agent-floor__dock-insight",children:[e.jsx("span",{className:"agent-floor__dock-insight-label",children:t}),e.jsx("span",{className:"agent-floor__dock-insight-value",children:o}),e.jsx("span",{className:"agent-floor__dock-insight-detail",children:a}),l?e.jsx("span",{className:"agent-floor__dock-mix",style:{"--mix-tool":`${l.tool/c*100}%`,"--mix-edit":`${(l.tool+l.edit)/c*100}%`},"aria-hidden":"true"}):null]})}function Ce(t,o){const a=t.lastAt?We(t.lastAt,o):null;return t.live?{glyph:"▸",label:t.lastLabel??"working",meta:a??"now"}:{glyph:"⏸",label:rt(t),meta:a?`· ${a}`:""}}function Fe({series:t,now:o}){const a=Ce(t,o);return t.live?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-run",children:a.glyph}),e.jsx("span",{className:"agent-floor__card-tool",children:a.label}),e.jsx("span",{className:"agent-floor__card-ago",children:a.meta})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-pause",children:a.glyph}),e.jsxs("span",{className:"agent-floor__card-idle",children:[a.label,a.meta?` ${a.meta}`:""]})]})}function de({kind:t,z:o,size:a=ne,faceH:l=Le,pad:c,live:u}){return e.jsxs("span",{className:`agent-floor__block is-${t}${c?" is-pedestal":""}${u?" is-live":""}`,style:{"--z":`${o}px`,"--bs":`${a}px`,"--bh":`${l}px`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function dt({slot:t}){const o=Math.max(1,t.total),a=t.counts.tool/o*100,l=t.counts.edit/o*100;return e.jsxs("span",{className:"agent-floor__block agent-floor__slab",style:{"--z":"0px","--bs":`${C}px`,"--bh":`${me}px`,"--mix-a":`${a.toFixed(1)}%`,"--mix-b":`${(a+l).toFixed(1)}%`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function pt({slot:t,slotIndex:o,periodStart:a}){const l=o===0?`${ae(a)} — now`:`${ae(a-o*z)} – ${ae(a-(o-1)*z)}`;return e.jsxs("span",{className:"agent-floor__peek",children:[e.jsx("span",{className:"agent-floor__peek-range",children:l}),e.jsxs("span",{className:"agent-floor__peek-cols",children:[e.jsxs("span",{className:"agent-floor__peek-col",children:[t.tools.slice(0,3).map(([c,u])=>e.jsxs("span",{className:"agent-floor__peek-tool",children:[c,u>1?` ×${u}`:""]},c)),t.tools.length===0?e.jsx("span",{className:"agent-floor__peek-tool is-empty",children:"no tools"}):null]}),e.jsxs("span",{className:"agent-floor__peek-col is-right",children:[e.jsxs("span",{children:[t.counts.edit," edit",t.counts.edit===1?"":"s"]}),e.jsxs("span",{children:[t.counts.msg," msg",t.counts.msg===1?"":"s"]})]})]})]})}function mt({series:t,index:o,planeW:a,flip:l,periodStart:c,now:u,focused:b,pinned:g,dimmed:m,peekSlot:r,onFocus:d,onPeek:w,onSelect:_}){const{lane:x,live:j,slots:S}=t,O=x.agent,$=X(O,x.source),R=ue(O),H=l?(M-P)/2:a-M+(M-P)/2,Y=(I-P)/2,K=(I-C)/2,le=k=>{const N=(D-C)/2;return l?M+k*D+N:a-M-(k+1)*D+N},W=ce+tt+o%2*14;return e.jsxs("button",{type:"button",className:`agent-floor__lane${j?" is-live":""}${o%2===1?" is-alt":""}${b?" is-focus":""}${g?" is-pinned":""}${m?" is-dim":""}`,style:{left:0,top:o*I,width:a,height:I},onClick:()=>_(x),onMouseEnter:()=>d(x.id),onMouseLeave:()=>{d(null),w(x.id,null)},"aria-label":g?`${$} — open timeline`:`${$} — pin details`,children:[e.jsx("span",{className:"agent-floor__lane-strip","aria-hidden":"true"}),S.map((k,N)=>{if(k.total===0)return null;const B=b&&r===N,T=me+2+k.blocks.length*$e;return e.jsxs("span",{className:`agent-floor__stack${N===0?" is-now":" is-minted"}${B?" is-peeking":""}`,style:{left:le(N),top:K},onMouseEnter:()=>w(x.id,N),children:[e.jsx(dt,{slot:k}),e.jsx("span",{className:"agent-floor__stack-blocks",style:{left:(C-ne)/2,top:(C-ne)/2},children:k.blocks.map((re,y)=>e.jsx(de,{kind:re,z:me+2+y*$e},y))}),B?e.jsx("span",{className:"agent-floor__bb agent-floor__peek-anchor",style:{left:C/2,top:C/2,"--z":`${T+46}px`},children:e.jsx(pt,{slot:k,slotIndex:N,periodStart:c})}):null]},N)}),e.jsxs("span",{className:"agent-floor__pad",style:{left:H,top:Y},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__ground"}),e.jsx(de,{kind:"pad",z:0,size:P,faceH:ce,pad:!0}),j?e.jsx(de,{kind:"head",z:ce+2,size:ne,faceH:Le,live:!0}):null]}),e.jsx("span",{className:"agent-floor__bb agent-floor__flag-anchor",style:{left:H+P/2,top:Y+P/2,"--z":`${W}px`},children:e.jsxs("span",{className:`agent-floor__flag${b?" is-focus":""}${g?" is-pinned":""}`,children:[e.jsx(fe,{name:O.name,size:15,tile:!0,hue:R.hue,tone:R.tone}),e.jsx("span",{className:"agent-floor__flag-name",children:$}),e.jsx("span",{className:"agent-floor__flag-action",children:e.jsx(Fe,{series:t,now:u})}),e.jsx("span",{className:`agent-floor__card-dot${j?" is-live":""}`})]})})]})}function ut({focus:t,pinned:o,ledger:a,liveCount:l,now:c}){if(!t){const d=a.reduce((j,S)=>(j.tool+=S.counts.tool,j.edit+=S.counts.edit,j.msg+=S.counts.msg,j),{tool:0,edit:0,msg:0}),w=a.filter(j=>F(j.counts)>0).length,_=[...a].sort((j,S)=>F(S.counts)-F(j.counts))[0]??null,x=_?F(_.counts):0;return e.jsxs("div",{className:"agent-floor__dock is-resting",children:[e.jsx("span",{className:"agent-floor__dock-id agent-floor__dock-fleet",children:e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsx("span",{className:"agent-floor__dock-title",children:"fleet at a glance"}),e.jsxs("span",{children:[a.length," lane",a.length===1?"":"s"," · ",l," live"]})]})}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"coverage",value:`${w}/${a.length} lanes`,detail:"showed work · 30m"}),e.jsx(L,{label:"hottest lane",value:_?X(_.lane.agent,_.lane.source):"none yet",detail:_?`${x} classified events`:"waiting for activity"}),e.jsx(L,{label:"throughput",value:`${F(d)} events`,detail:"classified · 30m"}),e.jsx(L,{label:"activity mix",value:we(d),detail:oe(d),mix:d})]})]})}const u=t.lane.agent,b=ue(u),g=ct(t),m=it(t),r=t.slots.filter(d=>d.total>0).length;return e.jsxs("div",{className:`agent-floor__dock${o?" is-pinned":""}`,children:[e.jsxs("span",{className:"agent-floor__dock-id",children:[e.jsx(fe,{name:u.name,size:30,tile:!0,hue:b.hue,tone:b.tone}),e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsxs("span",{className:"agent-floor__dock-name",children:[X(u,t.lane.source),e.jsx(Me,{harness:u.harness,size:12,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${t.live?" is-live":""}`}),o?e.jsx("span",{className:"agent-floor__dock-lock",children:"locked"}):null]}),e.jsx("span",{className:"agent-floor__dock-action",children:e.jsx(Fe,{series:t,now:c})})]})]}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"momentum",value:g.value,detail:g.detail}),e.jsx(L,{label:"cadence",value:`${r}/${t.slots.length} windows`,detail:"active five-minute bands"}),e.jsx(L,{label:"signature",value:m.value,detail:m.detail}),e.jsx(L,{label:"activity mix",value:we(t.counts),detail:oe(t.counts),mix:t.counts})]})]})}function ft({series:t,now:o,concise:a,onConciseChange:l,onClose:c,onOpenFull:u,operatorName:b}){const{agent:g,observe:m,source:r}=t.lane,d=X(g,r);return e.jsxs("aside",{className:"agent-floor__trace-panel","aria-label":`${d} selected lane trace`,children:[e.jsx("button",{type:"button",className:"agent-floor__trace-close",onClick:c,"aria-label":"Close selected lane trace",children:"×"}),e.jsx("div",{className:"agent-floor__trace-body",children:m?e.jsx(Be,{data:m,agentId:r==="scout"?g.id:void 0,sessionId:g.harnessSessionId,showRail:!1,variant:"lane",nowMs:o,traceWindowMs:Ue,traceWindowLabel:"30m",laneCollapseTechnicalEvents:a,onLaneCollapseTechnicalEventsChange:l,laneOperatorName:b,onLaneEventSelect:u}):e.jsx("div",{className:"agent-floor__trace-empty",children:"Waiting for trace activity…"})})]})}function gt({zoom:t,fit:o,onZoomChange:a,onReset:l}){const c=Math.round(t*100);return e.jsxs("div",{className:"agent-floor__zoom",role:"group","aria-label":"Floor zoom",children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:t<=ye,onClick:()=>a(pe(t-ke)),children:"−"}),e.jsx("button",{type:"button",className:"agent-floor__zoom-reset","aria-label":"Reset floor zoom to fit",title:"Reset zoom and position to automatic fit",onClick:l,children:o?"fit":`${c}%`}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:t>=Ae,onClick:()=>a(pe(t+ke)),children:"+"})]})}function Ms({lanes:t,now:o,onOpenTrace:a,railLedger:l=!1,operatorName:c}){const[u,b]=i.useState(st),[g,m]=i.useState(null),[r,d]=i.useState(null),[w,_]=i.useState(null),[x,j]=i.useState(!1),[S,O]=i.useState(1),[$,R]=i.useState({x:0,y:0}),[H,Y]=i.useState(!1),[K,le]=i.useState(nt),W=i.useRef(null),k=i.useRef(null),[N,B]=i.useState(null),T=u==="past-right";i.useEffect(()=>{const s=W.current;if(!s)return;const n=new ResizeObserver(p=>{const h=p[0]?.contentRect;h&&B(f=>f&&Math.abs(f.w-h.width)<2&&Math.abs(f.h-h.height)<2?f:{w:h.width,h:h.height})});return n.observe(s),()=>n.disconnect()},[]);const re=i.useCallback(()=>{b(s=>{const n=s==="past-left"?"past-right":"past-left";try{localStorage.setItem(Oe,n)}catch{}return n})},[]),y=i.useCallback(s=>{m(s),s===null&&_(null)},[]),Re=i.useCallback((s,n)=>{_(n===null?null:{laneId:s,slot:n})},[]),G=i.useCallback(s=>{r===s.id?a(s):d(s.id)},[r,a]),Te=i.useCallback(()=>{O(1),R({x:0,y:0})},[]),Pe=i.useCallback(s=>{if(!(s.target instanceof Element?s.target:null)?.closest(".agent-floor__trace-panel, .agent-floor__zoom")){if(s.preventDefault(),s.metaKey||s.ctrlKey){O(p=>pe(p-s.deltaY*.002));return}R(p=>({x:se(p.x-s.deltaX,ve),y:se(p.y-s.deltaY,Se)}))}},[]),Ie=i.useCallback(s=>{const n=s.target instanceof Element?s.target:null;s.button!==0||n?.closest("button, .agent-floor__trace-panel")||(k.current={pointerId:s.pointerId,startX:s.clientX,startY:s.clientY,panX:$.x,panY:$.y},s.currentTarget.setPointerCapture(s.pointerId),Y(!0))},[$]),ze=i.useCallback(s=>{const n=k.current;!n||n.pointerId!==s.pointerId||R({x:se(n.panX+s.clientX-n.startX,ve),y:se(n.panY+s.clientY-n.startY,Se)})},[]),ge=i.useCallback(s=>{k.current?.pointerId===s.pointerId&&(k.current=null,s.currentTarget.hasPointerCapture(s.pointerId)&&s.currentTarget.releasePointerCapture(s.pointerId),Y(!1))},[]);i.useEffect(()=>{if(r===null)return;const s=n=>{n.key==="Escape"&&d(null)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[r]);const V=Math.floor(o/z)*z,q=i.useMemo(()=>{const s=new Map(t.map(f=>[f.id,f])),n=K.flatMap(f=>{const te=s.get(f);return te?[te]:[]}),p=new Set(n.map(f=>f.id)),h=t.filter(f=>!p.has(f.id)).sort((f,te)=>te.lastActiveAt-f.lastActiveAt);return n.concat(h)},[t,K]);i.useEffect(()=>{const s=q.map(n=>n.id);le(n=>n.length===s.length&&n.every((p,h)=>p===s[h])?n:s);try{sessionStorage.setItem(Ee,JSON.stringify(s))}catch{}},[q]);const{series:U,hidden:J,planeW:E,planeD:Q,lanesStartY:_e}=i.useMemo(()=>{const s=q.map(f=>lt(f,V)),n=s.slice(0,be),p=n.length*I,h=Math.max(et,p+Qe*2);return{series:n,hidden:s.slice(be),planeW:Je+Z*D+M,planeD:h,lanesStartY:(h-p)/2}},[q,V]),v=i.useMemo(()=>U.concat(J),[U,J]),ie=v.filter(s=>s.live).length,A=g??r,De=A===null?null:v.find(s=>s.lane.id===A)??null,ee=r===null?null:v.find(s=>s.lane.id===r)??null;i.useEffect(()=>{r!==null&&!v.some(s=>s.lane.id===r)&&d(null)},[v,r]),i.useEffect(()=>{j(!1)},[r]),i.useEffect(()=>{if(!l)return;const s=v.map(n=>{const p=Ce(n,o);return{id:n.lane.id,label:X(n.lane.agent,n.lane.source),statusLabel:n.lane.agent.harness?.trim()||"lane",tone:Ze(n.lane.agent.state,n.lane.agent),updatedAt:n.lane.lastActiveAt>0?n.lane.lastActiveAt:void 0,floor:{live:n.live,harness:n.lane.agent.harness,actionGlyph:p.glyph,actionLabel:p.label,actionMeta:p.meta,strip:n.strip,countsLabel:oe(n.counts)}}});Ve(s)},[l,v,o]),i.useEffect(()=>{if(l)return je({onHover:y,onSelect:s=>{const n=v.find(p=>p.lane.id===s);n&&G(n.lane)}}),()=>je(null)},[l,v,y,G]),i.useEffect(()=>{if(l)return Ne(A),()=>Ne(null)},[l,A]);const he=s=>T?M+s*D:E-M-s*D,xe=_e+U.length*I+26,Xe=i.useMemo(()=>{if(!N)return 1;const s=E+Q,n=.708*s+60,p=.386*s+250,h=Math.min(N.w/n,N.h/p);return Math.round(Math.min(1.6,Math.max(.7,h))*100)/100},[N,E,Q]),Ye=Math.round(Xe*S*100)/100;return e.jsxs("div",{className:`agent-floor${l?" is-rail-ledger":""}`,"data-live-count":ie,"data-floor-orient":u,children:[e.jsxs("div",{className:"agent-floor__body",children:[l?null:e.jsxs("aside",{className:"agent-floor__ledger","aria-label":"Fleet ledger",children:[e.jsxs("header",{className:"agent-floor__ledger-head",children:[e.jsx("span",{className:"agent-floor__ledger-title",children:"fleet"}),e.jsxs("span",{className:"agent-floor__ledger-meta",children:[v.length," lane",v.length===1?"":"s"," · ",ie," live"]}),e.jsx("span",{className:"agent-floor__ledger-trace",children:"trace 30m"})]}),e.jsx("div",{className:"agent-floor__ledger-rows",children:v.map(s=>{const n=s.lane.agent,p=ue(n);return e.jsxs("button",{type:"button",className:`agent-floor__ledger-row${A===s.lane.id?" is-focus":""}`,onClick:()=>G(s.lane),onMouseEnter:()=>y(s.lane.id),onMouseLeave:()=>y(null),children:[e.jsxs("span",{className:"agent-floor__ledger-id",children:[e.jsx(fe,{name:n.name,size:18,tile:!0,hue:p.hue,tone:p.tone}),e.jsx("span",{className:"agent-floor__ledger-name",children:X(n,s.lane.source)}),e.jsx(Me,{harness:n.harness,size:11,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${s.live?" is-live":""}`})]}),e.jsxs("span",{className:"agent-floor__ledger-tally",children:[e.jsx("span",{className:"agent-floor__ledger-strip",children:s.strip.map((h,f)=>e.jsx("span",{className:`agent-floor__ledger-cell is-${h}`},f))}),e.jsx("span",{className:"agent-floor__ledger-counts",children:oe(s.counts)})]})]},s.lane.id)})}),e.jsx("footer",{className:"agent-floor__ledger-foot",children:"rows and flags are linked — hover to unroll, click to pin"})]}),e.jsxs("div",{className:`agent-floor__viewport${ee?" is-inspecting":""}${H?" is-dragging":""}`,ref:W,onWheel:Pe,onPointerDown:Ie,onPointerMove:ze,onPointerUp:ge,onPointerCancel:ge,children:[e.jsx(gt,{zoom:S,fit:S===1&&$.x===0&&$.y===0,onZoomChange:O,onReset:Te}),e.jsx("div",{className:"agent-floor__stage",style:{transform:`translate3d(${$.x}px, ${$.y}px, 0) scale(${Ye}) rotateX(57deg) rotateZ(45deg)`},children:e.jsxs("div",{className:"agent-floor__field",style:{width:E,height:Q,left:-E/2,top:-Q/2},children:[e.jsx("div",{className:"agent-floor__plane"}),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__seam${n===0?" is-front":""}`,style:{left:he(n)}},n)),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__bb agent-floor__tick${n===0?" is-now":""}`,style:{left:he(n),top:xe},children:n===0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__tick-pulse"}),e.jsx("span",{children:"now"})]}):ae(V-(n-1)*z)},n)),e.jsx("div",{className:"agent-floor__lanes",style:{left:0,top:_e},"data-focus":A!==null||void 0,children:U.map((s,n)=>e.jsx(mt,{series:s,index:n,planeW:E,flip:T,periodStart:V,now:o,focused:A===s.lane.id,pinned:r===s.lane.id,dimmed:r===null&&g!==null&&g!==s.lane.id,peekSlot:w?.laneId===s.lane.id?w.slot:null,onFocus:y,onPeek:Re,onSelect:G},s.lane.id))}),J.length>0?e.jsxs("div",{className:"agent-floor__bb agent-floor__chip",style:{left:T?M/2:E-M/2,top:xe+30},children:["+",J.length," more in the ledger"]}):null]})}),ee?e.jsx(ft,{series:ee,now:o,concise:x,onConciseChange:j,onClose:()=>d(null),onOpenFull:()=>a(ee.lane),operatorName:c}):null]})]}),e.jsx(ut,{focus:De,pinned:r!==null&&A===r,ledger:v,liveCount:ie,now:o}),e.jsxs("footer",{className:"agent-floor__legend",children:[e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-tool"}),"tool call"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-edit"}),"file edit"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-msg"}),"message"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-pulse"}),"live — pad glows"]}),e.jsxs("button",{type:"button",className:"agent-floor__legend-flip",onClick:re,title:"Flip which side history accumulates on",children:["past ",T?"→":"←"]}),e.jsx("span",{className:"agent-floor__legend-note",children:"Towers mint every 5 min · details land in the dock · click to pin, click again for the timeline"})]})]})}export{Ms as AgentFloorView};
|
|
1
|
+
import{r as i,j as e}from"./index-BI9AljSD.js";/* empty css */import{H as Me}from"./HarnessMark-DAaWPiT_.js";import{a as ue,S as fe}from"./SpriteAvatar-56DTXxSV.js";import{n as Ze}from"./colors-BtO5_zlx.js";import{o as He,l as Ke}from"./lane-observe-vfyACHi0.js";import{t as We}from"./time-Dhsh_2EG.js";import{S as Be}from"./SessionObserve-BCehTlO8.js";import{l as X,i as Ge}from"./agent-lanes-model-DXqjs0OK.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-Q7pcblY5.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./index-DfsTyYDx.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./mentions-DuLQnEcn.js";import"./Provider-Bu-C8Hxc.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./message-markup-Cc_O-WdA.js";import"./ObservedTopologyPanel-BhVsvwkh.js";import"./ObserveTextFlow-BcrGQet8.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./message-circle-B2DoYKDO.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";import"./context-budget-DX_fwUs3.js";const z=5*6e4,qe=6,Z=qe+1,be=8,Ue=30*6e4,ye=.65,Ae=1.45,ke=.1,ve=360,Se=260;function pe(t){return Math.round(Math.min(Ae,Math.max(ye,t))*100)/100}function se(t,o){return Math.round(Math.min(o,Math.max(-o,t)))}const I=164,ne=56,$e=14,Le=12,C=66,me=7,P=96,ce=12,D=88,M=150,Je=48,Qe=24,et=480,tt=38,Oe="openscout:agent-floor-orient",Ee="openscout:agent-floor-lane-order";function st(){try{const t=localStorage.getItem(Oe);if(t==="past-left"||t==="past-right")return t}catch{}return"past-left"}function nt(){try{const t=JSON.parse(sessionStorage.getItem(Ee)??"[]");return Array.isArray(t)?t.filter(o=>typeof o=="string"):[]}catch{return[]}}function ae(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}const at=/^(edit|multi_?edit|write|apply_?patch|patch_apply|str_?replace|notebook_?edit|create_file)/i;function ot(t){return t.kind==="tool"?t.diff||t.tool&&at.test(t.tool.trim())?"edit":"tool":t.kind==="message"||t.kind==="ask"?"msg":null}function lt(t,o){const a=t.observe?.metadata?.session?.sessionStart,l={tool:0,edit:0,msg:0},c=Array.from({length:Z},()=>({blocks:[],counts:{tool:0,edit:0,msg:0},tools:new Map,total:0})),u=[];let b=0,g=null;for(const m of t.observe?.events??[]){const r=ot(m);if(!r)continue;const d=He(m,a),w=d===null||d>=o?0:Math.floor((o-d)/z)+1;if(w>=Z)continue;const _=c[w];_.blocks.push(r),_.counts[r]+=1,_.total+=1,l[r]+=1,b+=1;const x=r==="msg"?null:m.tool?.trim()||"tool";x&&_.tools.set(x,(_.tools.get(x)??0)+1),u.push({kind:r,label:r==="msg"?Ke(m.text,44,1):m.text.trim()||x||"tool",at:d}),g={at:d,label:r==="msg"?"message":m.tool?.trim()||"tool"}}return{lane:t,live:Ge(t.observe)&&b>0,slots:c.map(m=>({blocks:m.blocks.slice(-8),counts:m.counts,tools:[...m.tools.entries()].sort((r,d)=>d[1]-r[1]),total:m.total})),counts:l,strip:u.slice(-10).map(m=>m.kind),lastLabel:g?.label??null,lastAt:g?.at??(t.lastActiveAt||null)}}function oe(t){const o=(a,l,c)=>`${a} ${a===1?l:c}`;return[o(t.tool,"tool","tools"),o(t.edit,"edit","edits"),o(t.msg,"msg","msgs")].join(" · ")}function rt(t){return/^(working|active|running|in_turn|in_flight)/i.test(t.lane.agent.state??"")?"quiet":"idle"}function F(t){return t.tool+t.edit+t.msg}function we(t){if(F(t)===0)return"quiet";const a=[["tool-led",t.tool],["edit-heavy",t.edit],["conversation-led",t.msg]].sort((l,c)=>c[1]-l[1]);return a[0][1]===a[1][1]?"balanced":a[0][0]}function it(t){const o=new Map;for(const l of t.slots)for(const[c,u]of l.tools)o.set(c,(o.get(c)??0)+u);const[a]=[...o.entries()].sort((l,c)=>c[1]-l[1]);return a?{value:a[0],detail:`${a[1]} call${a[1]===1?"":"s"} · 30m`}:{value:"no tool pattern",detail:"messages and edits only"}}function ct(t){const o=t.slots[0]?.total??0,a=t.slots[1]?.total??0;return o===0&&a===0?{value:"quiet",detail:"no work in the last 10m"}:o===0?{value:"paused",detail:`${a} in the prior 5m`}:a===0?{value:"new burst",detail:`${o} in the current 5m`}:o>=a+3?{value:"building",detail:`${o} now · ${a} prior`}:a>=o+3?{value:"easing",detail:`${o} now · ${a} prior`}:{value:"steady",detail:`${o} now · ${a} prior`}}function L({label:t,value:o,detail:a,mix:l}){const c=l?Math.max(1,F(l)):1;return e.jsxs("span",{className:"agent-floor__dock-insight",children:[e.jsx("span",{className:"agent-floor__dock-insight-label",children:t}),e.jsx("span",{className:"agent-floor__dock-insight-value",children:o}),e.jsx("span",{className:"agent-floor__dock-insight-detail",children:a}),l?e.jsx("span",{className:"agent-floor__dock-mix",style:{"--mix-tool":`${l.tool/c*100}%`,"--mix-edit":`${(l.tool+l.edit)/c*100}%`},"aria-hidden":"true"}):null]})}function Ce(t,o){const a=t.lastAt?We(t.lastAt,o):null;return t.live?{glyph:"▸",label:t.lastLabel??"working",meta:a??"now"}:{glyph:"⏸",label:rt(t),meta:a?`· ${a}`:""}}function Fe({series:t,now:o}){const a=Ce(t,o);return t.live?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-run",children:a.glyph}),e.jsx("span",{className:"agent-floor__card-tool",children:a.label}),e.jsx("span",{className:"agent-floor__card-ago",children:a.meta})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-pause",children:a.glyph}),e.jsxs("span",{className:"agent-floor__card-idle",children:[a.label,a.meta?` ${a.meta}`:""]})]})}function de({kind:t,z:o,size:a=ne,faceH:l=Le,pad:c,live:u}){return e.jsxs("span",{className:`agent-floor__block is-${t}${c?" is-pedestal":""}${u?" is-live":""}`,style:{"--z":`${o}px`,"--bs":`${a}px`,"--bh":`${l}px`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function dt({slot:t}){const o=Math.max(1,t.total),a=t.counts.tool/o*100,l=t.counts.edit/o*100;return e.jsxs("span",{className:"agent-floor__block agent-floor__slab",style:{"--z":"0px","--bs":`${C}px`,"--bh":`${me}px`,"--mix-a":`${a.toFixed(1)}%`,"--mix-b":`${(a+l).toFixed(1)}%`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function pt({slot:t,slotIndex:o,periodStart:a}){const l=o===0?`${ae(a)} — now`:`${ae(a-o*z)} – ${ae(a-(o-1)*z)}`;return e.jsxs("span",{className:"agent-floor__peek",children:[e.jsx("span",{className:"agent-floor__peek-range",children:l}),e.jsxs("span",{className:"agent-floor__peek-cols",children:[e.jsxs("span",{className:"agent-floor__peek-col",children:[t.tools.slice(0,3).map(([c,u])=>e.jsxs("span",{className:"agent-floor__peek-tool",children:[c,u>1?` ×${u}`:""]},c)),t.tools.length===0?e.jsx("span",{className:"agent-floor__peek-tool is-empty",children:"no tools"}):null]}),e.jsxs("span",{className:"agent-floor__peek-col is-right",children:[e.jsxs("span",{children:[t.counts.edit," edit",t.counts.edit===1?"":"s"]}),e.jsxs("span",{children:[t.counts.msg," msg",t.counts.msg===1?"":"s"]})]})]})]})}function mt({series:t,index:o,planeW:a,flip:l,periodStart:c,now:u,focused:b,pinned:g,dimmed:m,peekSlot:r,onFocus:d,onPeek:w,onSelect:_}){const{lane:x,live:j,slots:S}=t,O=x.agent,$=X(O,x.source),R=ue(O),H=l?(M-P)/2:a-M+(M-P)/2,Y=(I-P)/2,K=(I-C)/2,le=k=>{const N=(D-C)/2;return l?M+k*D+N:a-M-(k+1)*D+N},W=ce+tt+o%2*14;return e.jsxs("button",{type:"button",className:`agent-floor__lane${j?" is-live":""}${o%2===1?" is-alt":""}${b?" is-focus":""}${g?" is-pinned":""}${m?" is-dim":""}`,style:{left:0,top:o*I,width:a,height:I},onClick:()=>_(x),onMouseEnter:()=>d(x.id),onMouseLeave:()=>{d(null),w(x.id,null)},"aria-label":g?`${$} — open timeline`:`${$} — pin details`,children:[e.jsx("span",{className:"agent-floor__lane-strip","aria-hidden":"true"}),S.map((k,N)=>{if(k.total===0)return null;const B=b&&r===N,T=me+2+k.blocks.length*$e;return e.jsxs("span",{className:`agent-floor__stack${N===0?" is-now":" is-minted"}${B?" is-peeking":""}`,style:{left:le(N),top:K},onMouseEnter:()=>w(x.id,N),children:[e.jsx(dt,{slot:k}),e.jsx("span",{className:"agent-floor__stack-blocks",style:{left:(C-ne)/2,top:(C-ne)/2},children:k.blocks.map((re,y)=>e.jsx(de,{kind:re,z:me+2+y*$e},y))}),B?e.jsx("span",{className:"agent-floor__bb agent-floor__peek-anchor",style:{left:C/2,top:C/2,"--z":`${T+46}px`},children:e.jsx(pt,{slot:k,slotIndex:N,periodStart:c})}):null]},N)}),e.jsxs("span",{className:"agent-floor__pad",style:{left:H,top:Y},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__ground"}),e.jsx(de,{kind:"pad",z:0,size:P,faceH:ce,pad:!0}),j?e.jsx(de,{kind:"head",z:ce+2,size:ne,faceH:Le,live:!0}):null]}),e.jsx("span",{className:"agent-floor__bb agent-floor__flag-anchor",style:{left:H+P/2,top:Y+P/2,"--z":`${W}px`},children:e.jsxs("span",{className:`agent-floor__flag${b?" is-focus":""}${g?" is-pinned":""}`,children:[e.jsx(fe,{name:O.name,size:15,tile:!0,hue:R.hue,tone:R.tone}),e.jsx("span",{className:"agent-floor__flag-name",children:$}),e.jsx("span",{className:"agent-floor__flag-action",children:e.jsx(Fe,{series:t,now:u})}),e.jsx("span",{className:`agent-floor__card-dot${j?" is-live":""}`})]})})]})}function ut({focus:t,pinned:o,ledger:a,liveCount:l,now:c}){if(!t){const d=a.reduce((j,S)=>(j.tool+=S.counts.tool,j.edit+=S.counts.edit,j.msg+=S.counts.msg,j),{tool:0,edit:0,msg:0}),w=a.filter(j=>F(j.counts)>0).length,_=[...a].sort((j,S)=>F(S.counts)-F(j.counts))[0]??null,x=_?F(_.counts):0;return e.jsxs("div",{className:"agent-floor__dock is-resting",children:[e.jsx("span",{className:"agent-floor__dock-id agent-floor__dock-fleet",children:e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsx("span",{className:"agent-floor__dock-title",children:"fleet at a glance"}),e.jsxs("span",{children:[a.length," lane",a.length===1?"":"s"," · ",l," live"]})]})}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"coverage",value:`${w}/${a.length} lanes`,detail:"showed work · 30m"}),e.jsx(L,{label:"hottest lane",value:_?X(_.lane.agent,_.lane.source):"none yet",detail:_?`${x} classified events`:"waiting for activity"}),e.jsx(L,{label:"throughput",value:`${F(d)} events`,detail:"classified · 30m"}),e.jsx(L,{label:"activity mix",value:we(d),detail:oe(d),mix:d})]})]})}const u=t.lane.agent,b=ue(u),g=ct(t),m=it(t),r=t.slots.filter(d=>d.total>0).length;return e.jsxs("div",{className:`agent-floor__dock${o?" is-pinned":""}`,children:[e.jsxs("span",{className:"agent-floor__dock-id",children:[e.jsx(fe,{name:u.name,size:30,tile:!0,hue:b.hue,tone:b.tone}),e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsxs("span",{className:"agent-floor__dock-name",children:[X(u,t.lane.source),e.jsx(Me,{harness:u.harness,size:12,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${t.live?" is-live":""}`}),o?e.jsx("span",{className:"agent-floor__dock-lock",children:"locked"}):null]}),e.jsx("span",{className:"agent-floor__dock-action",children:e.jsx(Fe,{series:t,now:c})})]})]}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"momentum",value:g.value,detail:g.detail}),e.jsx(L,{label:"cadence",value:`${r}/${t.slots.length} windows`,detail:"active five-minute bands"}),e.jsx(L,{label:"signature",value:m.value,detail:m.detail}),e.jsx(L,{label:"activity mix",value:we(t.counts),detail:oe(t.counts),mix:t.counts})]})]})}function ft({series:t,now:o,concise:a,onConciseChange:l,onClose:c,onOpenFull:u,operatorName:b}){const{agent:g,observe:m,source:r}=t.lane,d=X(g,r);return e.jsxs("aside",{className:"agent-floor__trace-panel","aria-label":`${d} selected lane trace`,children:[e.jsx("button",{type:"button",className:"agent-floor__trace-close",onClick:c,"aria-label":"Close selected lane trace",children:"×"}),e.jsx("div",{className:"agent-floor__trace-body",children:m?e.jsx(Be,{data:m,agentId:r==="scout"?g.id:void 0,sessionId:g.harnessSessionId,showRail:!1,variant:"lane",nowMs:o,traceWindowMs:Ue,traceWindowLabel:"30m",laneCollapseTechnicalEvents:a,onLaneCollapseTechnicalEventsChange:l,laneOperatorName:b,onLaneEventSelect:u}):e.jsx("div",{className:"agent-floor__trace-empty",children:"Waiting for trace activity…"})})]})}function gt({zoom:t,fit:o,onZoomChange:a,onReset:l}){const c=Math.round(t*100);return e.jsxs("div",{className:"agent-floor__zoom",role:"group","aria-label":"Floor zoom",children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:t<=ye,onClick:()=>a(pe(t-ke)),children:"−"}),e.jsx("button",{type:"button",className:"agent-floor__zoom-reset","aria-label":"Reset floor zoom to fit",title:"Reset zoom and position to automatic fit",onClick:l,children:o?"fit":`${c}%`}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:t>=Ae,onClick:()=>a(pe(t+ke)),children:"+"})]})}function Ms({lanes:t,now:o,onOpenTrace:a,railLedger:l=!1,operatorName:c}){const[u,b]=i.useState(st),[g,m]=i.useState(null),[r,d]=i.useState(null),[w,_]=i.useState(null),[x,j]=i.useState(!1),[S,O]=i.useState(1),[$,R]=i.useState({x:0,y:0}),[H,Y]=i.useState(!1),[K,le]=i.useState(nt),W=i.useRef(null),k=i.useRef(null),[N,B]=i.useState(null),T=u==="past-right";i.useEffect(()=>{const s=W.current;if(!s)return;const n=new ResizeObserver(p=>{const h=p[0]?.contentRect;h&&B(f=>f&&Math.abs(f.w-h.width)<2&&Math.abs(f.h-h.height)<2?f:{w:h.width,h:h.height})});return n.observe(s),()=>n.disconnect()},[]);const re=i.useCallback(()=>{b(s=>{const n=s==="past-left"?"past-right":"past-left";try{localStorage.setItem(Oe,n)}catch{}return n})},[]),y=i.useCallback(s=>{m(s),s===null&&_(null)},[]),Re=i.useCallback((s,n)=>{_(n===null?null:{laneId:s,slot:n})},[]),G=i.useCallback(s=>{r===s.id?a(s):d(s.id)},[r,a]),Te=i.useCallback(()=>{O(1),R({x:0,y:0})},[]),Pe=i.useCallback(s=>{if(!(s.target instanceof Element?s.target:null)?.closest(".agent-floor__trace-panel, .agent-floor__zoom")){if(s.preventDefault(),s.metaKey||s.ctrlKey){O(p=>pe(p-s.deltaY*.002));return}R(p=>({x:se(p.x-s.deltaX,ve),y:se(p.y-s.deltaY,Se)}))}},[]),Ie=i.useCallback(s=>{const n=s.target instanceof Element?s.target:null;s.button!==0||n?.closest("button, .agent-floor__trace-panel")||(k.current={pointerId:s.pointerId,startX:s.clientX,startY:s.clientY,panX:$.x,panY:$.y},s.currentTarget.setPointerCapture(s.pointerId),Y(!0))},[$]),ze=i.useCallback(s=>{const n=k.current;!n||n.pointerId!==s.pointerId||R({x:se(n.panX+s.clientX-n.startX,ve),y:se(n.panY+s.clientY-n.startY,Se)})},[]),ge=i.useCallback(s=>{k.current?.pointerId===s.pointerId&&(k.current=null,s.currentTarget.hasPointerCapture(s.pointerId)&&s.currentTarget.releasePointerCapture(s.pointerId),Y(!1))},[]);i.useEffect(()=>{if(r===null)return;const s=n=>{n.key==="Escape"&&d(null)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[r]);const V=Math.floor(o/z)*z,q=i.useMemo(()=>{const s=new Map(t.map(f=>[f.id,f])),n=K.flatMap(f=>{const te=s.get(f);return te?[te]:[]}),p=new Set(n.map(f=>f.id)),h=t.filter(f=>!p.has(f.id)).sort((f,te)=>te.lastActiveAt-f.lastActiveAt);return n.concat(h)},[t,K]);i.useEffect(()=>{const s=q.map(n=>n.id);le(n=>n.length===s.length&&n.every((p,h)=>p===s[h])?n:s);try{sessionStorage.setItem(Ee,JSON.stringify(s))}catch{}},[q]);const{series:U,hidden:J,planeW:E,planeD:Q,lanesStartY:_e}=i.useMemo(()=>{const s=q.map(f=>lt(f,V)),n=s.slice(0,be),p=n.length*I,h=Math.max(et,p+Qe*2);return{series:n,hidden:s.slice(be),planeW:Je+Z*D+M,planeD:h,lanesStartY:(h-p)/2}},[q,V]),v=i.useMemo(()=>U.concat(J),[U,J]),ie=v.filter(s=>s.live).length,A=g??r,De=A===null?null:v.find(s=>s.lane.id===A)??null,ee=r===null?null:v.find(s=>s.lane.id===r)??null;i.useEffect(()=>{r!==null&&!v.some(s=>s.lane.id===r)&&d(null)},[v,r]),i.useEffect(()=>{j(!1)},[r]),i.useEffect(()=>{if(!l)return;const s=v.map(n=>{const p=Ce(n,o);return{id:n.lane.id,label:X(n.lane.agent,n.lane.source),statusLabel:n.lane.agent.harness?.trim()||"lane",tone:Ze(n.lane.agent.state,n.lane.agent),updatedAt:n.lane.lastActiveAt>0?n.lane.lastActiveAt:void 0,floor:{live:n.live,harness:n.lane.agent.harness,actionGlyph:p.glyph,actionLabel:p.label,actionMeta:p.meta,strip:n.strip,countsLabel:oe(n.counts)}}});Ve(s)},[l,v,o]),i.useEffect(()=>{if(l)return je({onHover:y,onSelect:s=>{const n=v.find(p=>p.lane.id===s);n&&G(n.lane)}}),()=>je(null)},[l,v,y,G]),i.useEffect(()=>{if(l)return Ne(A),()=>Ne(null)},[l,A]);const he=s=>T?M+s*D:E-M-s*D,xe=_e+U.length*I+26,Xe=i.useMemo(()=>{if(!N)return 1;const s=E+Q,n=.708*s+60,p=.386*s+250,h=Math.min(N.w/n,N.h/p);return Math.round(Math.min(1.6,Math.max(.7,h))*100)/100},[N,E,Q]),Ye=Math.round(Xe*S*100)/100;return e.jsxs("div",{className:`agent-floor${l?" is-rail-ledger":""}`,"data-live-count":ie,"data-floor-orient":u,children:[e.jsxs("div",{className:"agent-floor__body",children:[l?null:e.jsxs("aside",{className:"agent-floor__ledger","aria-label":"Fleet ledger",children:[e.jsxs("header",{className:"agent-floor__ledger-head",children:[e.jsx("span",{className:"agent-floor__ledger-title",children:"fleet"}),e.jsxs("span",{className:"agent-floor__ledger-meta",children:[v.length," lane",v.length===1?"":"s"," · ",ie," live"]}),e.jsx("span",{className:"agent-floor__ledger-trace",children:"trace 30m"})]}),e.jsx("div",{className:"agent-floor__ledger-rows",children:v.map(s=>{const n=s.lane.agent,p=ue(n);return e.jsxs("button",{type:"button",className:`agent-floor__ledger-row${A===s.lane.id?" is-focus":""}`,onClick:()=>G(s.lane),onMouseEnter:()=>y(s.lane.id),onMouseLeave:()=>y(null),children:[e.jsxs("span",{className:"agent-floor__ledger-id",children:[e.jsx(fe,{name:n.name,size:18,tile:!0,hue:p.hue,tone:p.tone}),e.jsx("span",{className:"agent-floor__ledger-name",children:X(n,s.lane.source)}),e.jsx(Me,{harness:n.harness,size:11,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${s.live?" is-live":""}`})]}),e.jsxs("span",{className:"agent-floor__ledger-tally",children:[e.jsx("span",{className:"agent-floor__ledger-strip",children:s.strip.map((h,f)=>e.jsx("span",{className:`agent-floor__ledger-cell is-${h}`},f))}),e.jsx("span",{className:"agent-floor__ledger-counts",children:oe(s.counts)})]})]},s.lane.id)})}),e.jsx("footer",{className:"agent-floor__ledger-foot",children:"rows and flags are linked — hover to unroll, click to pin"})]}),e.jsxs("div",{className:`agent-floor__viewport${ee?" is-inspecting":""}${H?" is-dragging":""}`,ref:W,onWheel:Pe,onPointerDown:Ie,onPointerMove:ze,onPointerUp:ge,onPointerCancel:ge,children:[e.jsx(gt,{zoom:S,fit:S===1&&$.x===0&&$.y===0,onZoomChange:O,onReset:Te}),e.jsx("div",{className:"agent-floor__stage",style:{transform:`translate3d(${$.x}px, ${$.y}px, 0) scale(${Ye}) rotateX(57deg) rotateZ(45deg)`},children:e.jsxs("div",{className:"agent-floor__field",style:{width:E,height:Q,left:-E/2,top:-Q/2},children:[e.jsx("div",{className:"agent-floor__plane"}),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__seam${n===0?" is-front":""}`,style:{left:he(n)}},n)),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__bb agent-floor__tick${n===0?" is-now":""}`,style:{left:he(n),top:xe},children:n===0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__tick-pulse"}),e.jsx("span",{children:"now"})]}):ae(V-(n-1)*z)},n)),e.jsx("div",{className:"agent-floor__lanes",style:{left:0,top:_e},"data-focus":A!==null||void 0,children:U.map((s,n)=>e.jsx(mt,{series:s,index:n,planeW:E,flip:T,periodStart:V,now:o,focused:A===s.lane.id,pinned:r===s.lane.id,dimmed:r===null&&g!==null&&g!==s.lane.id,peekSlot:w?.laneId===s.lane.id?w.slot:null,onFocus:y,onPeek:Re,onSelect:G},s.lane.id))}),J.length>0?e.jsxs("div",{className:"agent-floor__bb agent-floor__chip",style:{left:T?M/2:E-M/2,top:xe+30},children:["+",J.length," more in the ledger"]}):null]})}),ee?e.jsx(ft,{series:ee,now:o,concise:x,onConciseChange:j,onClose:()=>d(null),onOpenFull:()=>a(ee.lane),operatorName:c}):null]})]}),e.jsx(ut,{focus:De,pinned:r!==null&&A===r,ledger:v,liveCount:ie,now:o}),e.jsxs("footer",{className:"agent-floor__legend",children:[e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-tool"}),"tool call"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-edit"}),"file edit"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-msg"}),"message"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-pulse"}),"live — pad glows"]}),e.jsxs("button",{type:"button",className:"agent-floor__legend-flip",onClick:re,title:"Flip which side history accumulates on",children:["past ",T?"→":"←"]}),e.jsx("span",{className:"agent-floor__legend-note",children:"Towers mint every 5 min · details land in the dock · click to pin, click again for the timeline"})]})]})}export{Ms as AgentFloorView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,j as a}from"./index-CZ-05hKz.js";/* empty css */import{c as J,d as X,s as Y,b as Z}from"./colors-BtO5_zlx.js";import{m as ee,c as ae}from"./conversation-model-CwF6Y9gx.js";import{a as U}from"./api-Co9aQ2Jw.js";import{u as se}from"./sse-CiOSzE5n.js";import{b as te,t as le}from"./time-Dhsh_2EG.js";import{f as m}from"./text-CnZ0e1-V.js";import{u as oe}from"./Provider-B2xuo3rf.js";import{o as re}from"./openContent-C6XO6kr5.js";import{B as L}from"./BackToPicker-4JaeRvDm.js";import{A as ie}from"./AgentLiveActions-BwuzOE8h.js";import{O as ne}from"./ObservedTopologyPanel-CdGUXxGR.js";import{a as ce}from"./NewChatComposer-hlWT-nbR.js";import"./createLucideIcon-DXpqZP7I.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./router-DJj2WbDg.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"./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"./keyboard-nav-DFhAJkW3.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./terminal-takeover-DANQfTcy.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";function A({values:s}){return a.jsx("span",{className:"s-agent-token-list",children:s.map(t=>a.jsx("span",{className:"s-agent-token",children:t},t))})}function o({value:s}){return a.jsx("span",{className:"s-agent-code-value",children:s})}function I({label:s,value:t}){return t?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:s}),a.jsx("span",{className:"s-agent-profile-chip-value",children:t})]}):null}function T(s){return(s??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function de(s){return s.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(t=>t.slice(0,1).toUpperCase()+t.slice(1)).join(" ")}function ue(s,t,i,n){let l=s.trim().replace(/^@+/,"");const h=[t,i,n,n?m(n):null].filter(p=>!!p?.trim());for(const p of h){const f=p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${f}[-_.:\\s·]+`,"iu"),"")}return l}function pe(s,t,i,n){const l=t?.participants?.find(d=>d.agentId===s.id||d.actorId===s.id),h=T(s.harness),p=T(i),f=[l?.scopedAlias,t?.alias,s.handle,l?.displayName,t?.agentName,s.name];for(const d of f){if(!d?.trim())continue;const v=ue(d,i,n,s.harness),N=de(v),g=T(N);if(!(!g||g===p||g===h))return N}return null}function me(s){const t=s?.trim();return t?t.toLowerCase()==="a2a"?"A2A":m(t)??t:null}function he({name:s,url:t}){return t?a.jsx("a",{href:t,target:"_blank",rel:"noreferrer",children:s}):a.jsx(a.Fragment,{children:s})}function j({title:s,subtitle:t,items:i,variant:n}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${n?` s-agent-profile-card-${n}`:""}`,children:[a.jsx("div",{className:"s-agent-profile-card-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"s-agent-profile-card-title",children:s}),t&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:t})]})}),a.jsx("div",{className:"s-agent-meta-card-body",children:i.map(l=>a.jsxs("div",{className:"s-agent-meta-row",children:[a.jsx("span",{className:"s-agent-meta-label",children:l.label}),a.jsx("span",{className:"s-agent-meta-value",children:l.value})]},l.label))})]})}function oa({conversationId:s,navigate:t}){const{agents:i,route:n}=oe(),[l,h]=u.useState(null),[p,f]=u.useState(!1),[d,v]=u.useState(null),[N,g]=u.useState(null),[y,B]=u.useState(null),S=u.useCallback(async()=>{B(null);try{const r=await U(`/api/session/${encodeURIComponent(s)}`).catch(()=>null);h(r)}catch(r){B(r instanceof Error?r.message:String(r)),h(null)}finally{f(!0)}},[s]);u.useEffect(()=>{f(!1),S()},[S]),se(()=>{S()});const c=l?.agentId??null;u.useEffect(()=>{if(!c||i.some(R=>R.id===c)){v(null);return}let r=!1;return U(`/api/agents/${encodeURIComponent(c)}`).then(R=>{r||v(R)}).catch(()=>{r||v(null)}).finally(()=>{r||g(c)}),()=>{r=!0}},[i,c]);const e=u.useMemo(()=>c?i.find(r=>r.id===c)??(d?.id===c?d:null):null,[d,i,c]);if(!e)return!p||c!==null&&N!==c?a.jsxs("div",{children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:s},navigate:t}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Loading…"})})]}):a.jsxs("div",{children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:s},navigate:t}),y&&a.jsx("p",{className:"s-error",children:y}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const W=ee(e),C=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,P=e.selector??e.defaultSelector??C,D=J(e.state),E=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,H=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,$=e.skills??[],b=me(e.protocol),k=!!(e.providerName||b||$.length>0),F=ce(e),x=F.title,w=pe(e,l,x,F.slug),z=w?`${x} · ${w}`:x,M=l?.participants?.find(r=>r.agentId===e.id||r.actorId===e.id),O=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,Q=[m(e.harness??"")??e.harness,O].filter(r=>!!r).join(" · "),_=[{label:"Project",value:x},{label:"Alias",value:w??"Default project participant"},...P?[{label:"Primary selector",value:a.jsx(o,{value:P})}]:[],...M?.scopedAlias?[{label:"Scoped alias",value:a.jsx(o,{value:M.scopedAlias})}]:[],...C?[{label:"Handle",value:a.jsx(o,{value:C})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(o,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(o,{value:e.definitionId})}],q=[{label:"Routable agent ID",value:a.jsx(o,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(he,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...$.length>0?[{label:"Skills",value:a.jsx(A,{values:$})}]:[],...k?[]:[{label:"Class",value:m(e.agentClass)??"—"}],...!k&&e.role?[{label:"Role",value:m(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(o,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(o,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(o,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],K=[...e.projectRoot?[{label:"Project path",value:a.jsx(o,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(o,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...E?[{label:"Authority node",value:a.jsx(o,{value:E})}]:[],...H?[{label:"Home node",value:a.jsx(o,{value:H})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(o,{value:e.conversationId})}]:[]],V=[...!k&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!k&&e.transport?[{label:"Transport",value:m(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:m(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(o,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(o,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(A,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(A,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(A,{values:e.authorityProfile.writeTools})}]:[],...e.authorityProfile?[{label:"Machine access",value:`shell ${e.authorityProfile.shell?"allowed":"blocked"} · code writes ${e.authorityProfile.codebaseWrites?"allowed":"blocked"}`}]:[],...e.runtimePolicy?.sandbox?[{label:"Sandbox",value:e.runtimePolicy.sandbox}]:[]],G=[{label:"Conversation ID",value:a.jsx(o,{value:s})},...l?.alias?[{label:"Conversation alias",value:a.jsx(o,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(o,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(o,{value:l.workspaceRoot})}]:[],...l?.currentBranch?[{label:"Session branch",value:l.currentBranch}]:[],...l?.messageCount!=null?[{label:"Messages",value:String(l.messageCount)}]:[],...l?.lastMessageAt?[{label:"Last message",value:te(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:s},navigate:t}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>t({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),y&&a.jsx("p",{className:"s-error",children:y}),a.jsxs("section",{className:"s-agent-profile-hero",children:[a.jsx("div",{className:"s-agent-profile-hero-main",children:a.jsxs("div",{className:"s-agent-profile-hero-title-row",children:[a.jsx("div",{className:"s-avatar s-agent-profile-hero-avatar",style:{background:X(e.name)},children:e.name[0].toUpperCase()}),a.jsxs("div",{className:"s-agent-profile-hero-copy",children:[a.jsxs("div",{className:"s-agent-casefile-title-meta",children:[a.jsx("span",{className:"s-agent-casefile-record",children:P??W??ae(e.id)??e.id}),D&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${Z(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:Y(e.state)}}),D]}),e.staleLocalRegistration&&a.jsx("span",{className:"s-agent-state-chip s-agent-state-chip-offline",children:"Superseded registration"})]}),a.jsx("h1",{className:"s-agent-profile-hero-title",children:z}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(I,{label:"Project",value:x}),a.jsx(I,{label:"Alias",value:w??"Default"}),a.jsx(I,{label:"Runtime",value:Q||null}),a.jsx(I,{label:"Host",value:e.homeNodeName?.replace(/\.local$/i,"")??null})]}),a.jsxs("p",{className:"s-agent-profile-hero-context",children:[l?.title?`Conversation: ${l.title}.`:"Attached to this conversation.",e.updatedAt?` Updated ${le(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(ie,{agent:e,navigate:t,returnTo:n}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>re(t,{view:"conversation",conversationId:s},{returnTo:n}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(j,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:_,variant:"primary"}),a.jsx(j,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:G}),a.jsx(j,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:V}),a.jsx(j,{title:"Location",subtitle:"Where this alias resolves right now.",items:K}),a.jsx(j,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:q,variant:"secondary"})]}),a.jsx(ne,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{oa as AgentInfoScreen};
|
|
1
|
+
import{r as u,j as a}from"./index-BI9AljSD.js";/* empty css */import{c as J,d as X,s as Y,b as Z}from"./colors-BtO5_zlx.js";import{m as ee,c as ae}from"./conversation-model-QsJVfSeG.js";import{a as U}from"./api-Co9aQ2Jw.js";import{u as se}from"./sse-DDHEHUgz.js";import{b as te,t as le}from"./time-Dhsh_2EG.js";import{f as m}from"./text-Faa3ZStB.js";import{u as oe}from"./Provider-Bu-C8Hxc.js";import{o as re}from"./openContent-C6XO6kr5.js";import{B as L}from"./BackToPicker-Cto0Ioz9.js";import{A as ie}from"./AgentLiveActions-CsQA3pu_.js";import{O as ne}from"./ObservedTopologyPanel-BhVsvwkh.js";import{a as ce}from"./NewChatComposer-C_1op4dH.js";import"./createLucideIcon-DthwWQIg.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./keyboard-nav-e6yGeorb.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./terminal-takeover-B6H4llRR.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";function A({values:s}){return a.jsx("span",{className:"s-agent-token-list",children:s.map(t=>a.jsx("span",{className:"s-agent-token",children:t},t))})}function o({value:s}){return a.jsx("span",{className:"s-agent-code-value",children:s})}function I({label:s,value:t}){return t?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:s}),a.jsx("span",{className:"s-agent-profile-chip-value",children:t})]}):null}function T(s){return(s??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function de(s){return s.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(t=>t.slice(0,1).toUpperCase()+t.slice(1)).join(" ")}function ue(s,t,i,n){let l=s.trim().replace(/^@+/,"");const h=[t,i,n,n?m(n):null].filter(p=>!!p?.trim());for(const p of h){const f=p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${f}[-_.:\\s·]+`,"iu"),"")}return l}function pe(s,t,i,n){const l=t?.participants?.find(d=>d.agentId===s.id||d.actorId===s.id),h=T(s.harness),p=T(i),f=[l?.scopedAlias,t?.alias,s.handle,l?.displayName,t?.agentName,s.name];for(const d of f){if(!d?.trim())continue;const v=ue(d,i,n,s.harness),N=de(v),g=T(N);if(!(!g||g===p||g===h))return N}return null}function me(s){const t=s?.trim();return t?t.toLowerCase()==="a2a"?"A2A":m(t)??t:null}function he({name:s,url:t}){return t?a.jsx("a",{href:t,target:"_blank",rel:"noreferrer",children:s}):a.jsx(a.Fragment,{children:s})}function j({title:s,subtitle:t,items:i,variant:n}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${n?` s-agent-profile-card-${n}`:""}`,children:[a.jsx("div",{className:"s-agent-profile-card-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"s-agent-profile-card-title",children:s}),t&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:t})]})}),a.jsx("div",{className:"s-agent-meta-card-body",children:i.map(l=>a.jsxs("div",{className:"s-agent-meta-row",children:[a.jsx("span",{className:"s-agent-meta-label",children:l.label}),a.jsx("span",{className:"s-agent-meta-value",children:l.value})]},l.label))})]})}function oa({conversationId:s,navigate:t}){const{agents:i,route:n}=oe(),[l,h]=u.useState(null),[p,f]=u.useState(!1),[d,v]=u.useState(null),[N,g]=u.useState(null),[y,B]=u.useState(null),S=u.useCallback(async()=>{B(null);try{const r=await U(`/api/session/${encodeURIComponent(s)}`).catch(()=>null);h(r)}catch(r){B(r instanceof Error?r.message:String(r)),h(null)}finally{f(!0)}},[s]);u.useEffect(()=>{f(!1),S()},[S]),se(()=>{S()});const c=l?.agentId??null;u.useEffect(()=>{if(!c||i.some(R=>R.id===c)){v(null);return}let r=!1;return U(`/api/agents/${encodeURIComponent(c)}`).then(R=>{r||v(R)}).catch(()=>{r||v(null)}).finally(()=>{r||g(c)}),()=>{r=!0}},[i,c]);const e=u.useMemo(()=>c?i.find(r=>r.id===c)??(d?.id===c?d:null):null,[d,i,c]);if(!e)return!p||c!==null&&N!==c?a.jsxs("div",{children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:s},navigate:t}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Loading…"})})]}):a.jsxs("div",{children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:s},navigate:t}),y&&a.jsx("p",{className:"s-error",children:y}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const W=ee(e),C=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,P=e.selector??e.defaultSelector??C,D=J(e.state),E=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,H=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,$=e.skills??[],b=me(e.protocol),k=!!(e.providerName||b||$.length>0),F=ce(e),x=F.title,w=pe(e,l,x,F.slug),z=w?`${x} · ${w}`:x,M=l?.participants?.find(r=>r.agentId===e.id||r.actorId===e.id),O=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,Q=[m(e.harness??"")??e.harness,O].filter(r=>!!r).join(" · "),_=[{label:"Project",value:x},{label:"Alias",value:w??"Default project participant"},...P?[{label:"Primary selector",value:a.jsx(o,{value:P})}]:[],...M?.scopedAlias?[{label:"Scoped alias",value:a.jsx(o,{value:M.scopedAlias})}]:[],...C?[{label:"Handle",value:a.jsx(o,{value:C})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(o,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(o,{value:e.definitionId})}],q=[{label:"Routable agent ID",value:a.jsx(o,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(he,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...$.length>0?[{label:"Skills",value:a.jsx(A,{values:$})}]:[],...k?[]:[{label:"Class",value:m(e.agentClass)??"—"}],...!k&&e.role?[{label:"Role",value:m(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(o,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(o,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(o,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],K=[...e.projectRoot?[{label:"Project path",value:a.jsx(o,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(o,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...E?[{label:"Authority node",value:a.jsx(o,{value:E})}]:[],...H?[{label:"Home node",value:a.jsx(o,{value:H})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(o,{value:e.conversationId})}]:[]],V=[...!k&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!k&&e.transport?[{label:"Transport",value:m(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:m(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(o,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(o,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(A,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(A,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(A,{values:e.authorityProfile.writeTools})}]:[],...e.authorityProfile?[{label:"Machine access",value:`shell ${e.authorityProfile.shell?"allowed":"blocked"} · code writes ${e.authorityProfile.codebaseWrites?"allowed":"blocked"}`}]:[],...e.runtimePolicy?.sandbox?[{label:"Sandbox",value:e.runtimePolicy.sandbox}]:[]],G=[{label:"Conversation ID",value:a.jsx(o,{value:s})},...l?.alias?[{label:"Conversation alias",value:a.jsx(o,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(o,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(o,{value:l.workspaceRoot})}]:[],...l?.currentBranch?[{label:"Session branch",value:l.currentBranch}]:[],...l?.messageCount!=null?[{label:"Messages",value:String(l.messageCount)}]:[],...l?.lastMessageAt?[{label:"Last message",value:te(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:s},navigate:t}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>t({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),y&&a.jsx("p",{className:"s-error",children:y}),a.jsxs("section",{className:"s-agent-profile-hero",children:[a.jsx("div",{className:"s-agent-profile-hero-main",children:a.jsxs("div",{className:"s-agent-profile-hero-title-row",children:[a.jsx("div",{className:"s-avatar s-agent-profile-hero-avatar",style:{background:X(e.name)},children:e.name[0].toUpperCase()}),a.jsxs("div",{className:"s-agent-profile-hero-copy",children:[a.jsxs("div",{className:"s-agent-casefile-title-meta",children:[a.jsx("span",{className:"s-agent-casefile-record",children:P??W??ae(e.id)??e.id}),D&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${Z(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:Y(e.state)}}),D]}),e.staleLocalRegistration&&a.jsx("span",{className:"s-agent-state-chip s-agent-state-chip-offline",children:"Superseded registration"})]}),a.jsx("h1",{className:"s-agent-profile-hero-title",children:z}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(I,{label:"Project",value:x}),a.jsx(I,{label:"Alias",value:w??"Default"}),a.jsx(I,{label:"Runtime",value:Q||null}),a.jsx(I,{label:"Host",value:e.homeNodeName?.replace(/\.local$/i,"")??null})]}),a.jsxs("p",{className:"s-agent-profile-hero-context",children:[l?.title?`Conversation: ${l.title}.`:"Attached to this conversation.",e.updatedAt?` Updated ${le(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(ie,{agent:e,navigate:t,returnTo:n}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>re(t,{view:"conversation",conversationId:s},{returnTo:n}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(j,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:_,variant:"primary"}),a.jsx(j,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:G}),a.jsx(j,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:V}),a.jsx(j,{title:"Location",subtitle:"Where this alias resolves right now.",items:K}),a.jsx(j,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:q,variant:"secondary"})]}),a.jsx(ne,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{oa as AgentInfoScreen};
|