@openscout/scout 0.2.86 → 0.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/{ActivityScreen-C7AwUogt.js → ActivityScreen-DRHTQIxu.js} +1 -1
- package/dist/client/assets/{AddProjectForm-BNRpRPod.js → AddProjectForm-Dw2oyCcz.js} +1 -1
- package/dist/client/assets/AgentAvatar-CQqJcwOQ.js +1 -0
- package/dist/client/assets/AgentAvatar-CUZZARWG.css +1 -0
- package/dist/client/assets/{AgentConfigurationScreen-BoBQpyz5.js → AgentConfigurationScreen-C3OI6JmZ.js} +1 -1
- package/dist/client/assets/{AgentDefinitionsWorkspace-rw3vh8Lm.js → AgentDefinitionsWorkspace-D0LDEqfl.js} +1 -1
- package/dist/client/assets/{AgentDetailCard-FelCxQrT.js → AgentDetailCard-2DZQahiN.js} +1 -1
- package/dist/client/assets/{AgentFloorView-Crdw8Uo5.js → AgentFloorView-CoGh2q5f.js} +1 -1
- package/dist/client/assets/{AgentInfoScreen-Cge7HHbV.js → AgentInfoScreen-5ybfIL9p.js} +1 -1
- package/dist/client/assets/{AgentLaneCard-CRDG74C1.js → AgentLaneCard-CeSjWWwh.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CWFqUdch.js → AgentLaneChrome-Do7CXwin.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-DCIIg3Zp.js → AgentLaneDetailSheet-BD8B51ka.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-yTM4GQAJ.js → AgentLaneSummaryResize--lHgnncr.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-FRTVASPw.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-DJeDRTAN.js → AgentLanesPreflight-BwkGk8JH.js} +1 -1
- package/dist/client/assets/{AgentLanesView-CbY9qD0z.js → AgentLanesView-Bm85ittm.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-Bn3zeZBN.js → AgentLiveActions-BmXDRxER.js} +1 -1
- package/dist/client/assets/{AgentSessions-czl5zT7A.js → AgentSessions-C_tAfGN2.js} +1 -1
- package/dist/client/assets/{AgentsConsole-CoT2crwq.js → AgentsConsole-DsHWsaOJ.js} +1 -1
- package/dist/client/assets/{AgentsScreen-BcPM-z1T.js → AgentsScreen-Bod6AHlA.js} +1 -1
- package/dist/client/assets/AgentsSubnav-CsvYzzQ-.js +1 -0
- package/dist/client/assets/{AstronautSuit-BADl7m8x.js → AstronautSuit-C05Ezxl9.js} +1 -1
- package/dist/client/assets/{AtopView-DymBCiXv.js → AtopView-DOKJbiJL.js} +1 -1
- package/dist/client/assets/{BackToPicker-CqYhOaLB.js → BackToPicker-CXsbxbHM.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-DDfZ8ci1.js → BriefingDetailScreen-Uvnk3t0v.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-CLvSOJjy.js → BriefingsScreen-DLIJ8eYj.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-DFAH-NO6.js → BrokerMetadataPanel-C8WERmHF.js} +1 -1
- package/dist/client/assets/{BrokerScreen-Bkvu92jk.js → BrokerScreen-LZ3T7hGG.js} +1 -1
- package/dist/client/assets/{Canvas-KyTsDJlB.js → Canvas-BO9mx5_P.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-Bjjqa30K.js → ChatCollapsedStrip-CtLPTLTY.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-C9HT1dCT.js → CodeDiffPane-CtgqIuS0.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-5Y3GvXkM.js → CodeProjectPicker-C4W_udc7.js} +1 -1
- package/dist/client/assets/{CodeScreen-DpN9kQvm.js → CodeScreen-WhTvVUKY.js} +1 -1
- package/dist/client/assets/{ConversationComposer-Ce7Byw48.js → ConversationComposer-DPWu3HvK.js} +1 -1
- package/dist/client/assets/{ConversationFeedRows-DygDfQn_.js → ConversationFeedRows-MhcPfxUr.js} +1 -1
- package/dist/client/assets/{ConversationHeader-C3sg0ULI.js → ConversationHeader-Ce7TENb9.js} +1 -1
- package/dist/client/assets/{ConversationPanels-Dg4Y2GgX.js → ConversationPanels-D-b5SLO-.js} +2 -2
- package/dist/client/assets/ConversationScreen-C5HnXd5w.css +1 -0
- package/dist/client/assets/{ConversationScreen-CjWWmuuh.js → ConversationScreen-D77SoLos.js} +1 -1
- package/dist/client/assets/{ConversationStatus-BhVIYQza.js → ConversationStatus-lIvSKRic.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +1 -0
- package/dist/client/assets/CrewWorkspaces-CdojnRMG.js +1 -0
- package/dist/client/assets/{DataTable-oJP339bX.js → DataTable-DFacT2uu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CH02HAVw.js → DispatchAftermath-D797PbCe.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DmtFisY9.js → DocumentFocusViewer-CetjnYut.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-84b9I3fy.js → EmbeddableSurfacesLab-JczLmmF-.js} +1 -1
- package/dist/client/assets/{EmptyState-BnDda92b.js → EmptyState-uQbB-bvP.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Dg7_88pv.js → FileViewerPane-ebbCtnHE.js} +1 -1
- package/dist/client/assets/{FlightObserveScreen-DL3Xhl0h.js → FlightObserveScreen-sqvt7HUO.js} +1 -1
- package/dist/client/assets/{FollowScreen-DcFBqr6l.js → FollowScreen-Bfu2_KtU.js} +1 -1
- package/dist/client/assets/{HarnessMark-DGZ6o6Ct.js → HarnessMark-CEzmPFHC.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-DTDL-XaA.js → HarnessesScreen-CGhRsqD5.js} +1 -1
- package/dist/client/assets/{HerdrSession-DV2hD6Yh.js → HerdrSession-BDLa_rrK.js} +1 -1
- package/dist/client/assets/{HomeHero-CENwVZ45.js → HomeHero-DdxTQ-6a.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-PgiZUkd_.js → HostAdvisorView-BAUi5ZxX.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-DNQjeWZO.js → KnowledgeSearchInspector-GjmxYBi_.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchScreen-Bj80IgR0.js → KnowledgeSearchScreen-CRei9pyl.js} +1 -1
- package/dist/client/assets/{LaneToolHoverCard-197xYmRp.js → LaneToolHoverCard-DCY-m0JK.js} +1 -1
- package/dist/client/assets/{LaneTraceDetailSheet-BztwvOv9.js → LaneTraceDetailSheet-CFsCvKa3.js} +1 -1
- package/dist/client/assets/{LaneTraceEventFocus-C9cmqxnK.js → LaneTraceEventFocus-BfKZ7G5c.js} +1 -1
- package/dist/client/assets/{MeshCanvas-C3_2p9B6.js → MeshCanvas-CZYHLTvw.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-ZTjYWXTZ.js → MeshCanvasMinimap-D3mJ78CM.js} +1 -1
- package/dist/client/assets/{MeshScreen-lJKaOyGB.js → MeshScreen-dxNxRtKm.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-CBjHbAZw.js → MeshTopologyView-A-wh0Ad1.js} +2 -2
- package/dist/client/assets/{MessagesScreen-D6MVLvdg.js → MessagesScreen-CR5v-WIE.js} +1 -1
- package/dist/client/assets/{MissionContextRail-DXkrbcnZ.js → MissionContextRail-MTL2EAnr.js} +1 -1
- package/dist/client/assets/{MissionControlView-BCH-Zsp4.js → MissionControlView-BGj1qnI2.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-DbAliOSF.js → MissionFocusOverlay-hWi6y87j.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-Bx6Pg8_O.js → MissionLeftAgentRow-BSRRiiig.js} +1 -1
- package/dist/client/assets/{MissionLogPane-D06c29Y8.js → MissionLogPane-bbG_pM9B.js} +1 -1
- package/dist/client/assets/{NewAgentModal-C18Ajovd.js → NewAgentModal-Ctixol4_.js} +1 -1
- package/dist/client/assets/{NewChatComposer-Bgqes0UQ.js → NewChatComposer-BPsg8shF.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-DpHS2Wmt.js → NewChatOrigin-CCiPg_WR.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-Cmhwai4X.js → ObserveEmbedScreen-Be87Chod.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-C1f5oize.js → ObserveTextFlow-CKYltTPJ.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-D85P6RAk.js → ObservedTopologyPanel-CfHYu-4Z.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-IDI4fuUE.js → OpenScoutAppShell-DPeP1vtK.js} +2 -2
- package/dist/client/assets/{OpsAgentsView-yt0JavoB.js → OpsAgentsView-dEtw9yt-.js} +1 -1
- package/dist/client/assets/OpsScreen-QXRJY8Vf.js +1 -0
- package/dist/client/assets/OpsSubnav-BK9Fj3gU.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BjykZ2Xd.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-IDEpKZvI.js → ProjectAgentProfileBar-B4RqrI0Q.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-Bh_aISs-.js → ProjectAgentProfileHero-Bc0g8rhW.js} +1 -1
- package/dist/client/assets/{ProjectsInbox-B8Srlklk.js → ProjectsInbox--ZIqo-IE.js} +1 -1
- package/dist/client/assets/{ProjectsRail-DqAbdvCf.js → ProjectsRail-CzS0qTCI.js} +1 -1
- package/dist/client/assets/ProjectsScreen-0gx7f30h.js +1 -0
- package/dist/client/assets/{ProjectsThreadAside-DpkjYLL2.js → ProjectsThreadAside-BsQRFbdy.js} +1 -1
- package/dist/client/assets/{Provider-Ve8yXaWR.js → Provider-Cd-QZltN.js} +1 -1
- package/dist/client/assets/{RailRow-C4GNGR80.js → RailRow-BY6fxePa.js} +1 -1
- package/dist/client/assets/{RawSessionsTable-Co3vzwsf.js → RawSessionsTable-CbopOF34.js} +1 -1
- package/dist/client/assets/{RealtimeVoiceScreen-DMd1CBAf.js → RealtimeVoiceScreen-CU4uXz4C.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-C97Euf4s.js → RepoDiffEmbedScreen-Cr1SL5ht.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DUKLzkrW.js → RepoDiffPageScreen-DeC8fsh_.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-CovKjSgb.js → RepoDiffViewer-CiTOWK_Z.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-zIiEmh-e.js → RepoDiffViewerLazy-BU3V7Kwq.js} +2 -2
- package/dist/client/assets/{ReposScreen-BR1LqTf1.js → ReposScreen-BQwIShXf.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-BGsVicc2.js → ScoutDeckSurface-BncYKicb.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BMKW7hSu.js → ScoutSurface-DdVzN3DA.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-0O2iDRrF.js → ScoutbotFxLab-sLjfSKtS.js} +1 -1
- package/dist/client/assets/{SecondaryNav-cYTw2p39.js → SecondaryNav-CCQqTT3e.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-mNjT0R6j.js → SessionEmbedScreen-BrLMZJ3N.js} +1 -1
- package/dist/client/assets/{SessionObserve-zAlFbwFn.js → SessionObserve-pbozyqVv.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-BVawzqoE.js → SessionObserveEvidence-C54Xvbps.js} +1 -1
- package/dist/client/assets/{SessionRefScreen-BmKhf29o.js → SessionRefScreen-UVNVrwAf.js} +1 -1
- package/dist/client/assets/SessionsScreen-KeDb5gz4.js +1 -0
- package/dist/client/assets/SettingsDrawer-CWdj0VvN.js +3 -0
- package/dist/client/assets/SettingsDrawer-J-8x1eII.css +1 -0
- package/dist/client/assets/SettingsScreen-C7zJgZzj.js +1 -0
- package/dist/client/assets/{ShikiPane-DyEJdcvb.js → ShikiPane-CiVH-45m.js} +1 -1
- package/dist/client/assets/{SlidePanel-Dg8_styW.js → SlidePanel-BLrLF9dt.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-DMrSssNZ.js → SpriteAvatar-vpHO-rXs.js} +1 -1
- package/dist/client/assets/{StatusPill-NFFnphtx.js → StatusPill-a3XBw1GG.js} +1 -1
- package/dist/client/assets/{TailView-BfObcZu3.js → TailView-C3rjOV7i.js} +1 -1
- package/dist/client/assets/{Terminal-Dr-M9U4u.js → Terminal-CMQFmHnn.js} +1 -1
- package/dist/client/assets/{TerminalEmbedScreen-BmyZkonh.js → TerminalEmbedScreen-GvpoGERN.js} +1 -1
- package/dist/client/assets/{TerminalRelay-lJ2KdMCW.js → TerminalRelay-CIHlLVf1.js} +3 -3
- package/dist/client/assets/{TextDocumentSurface-C7fGlzY8.js → TextDocumentSurface-B29xZNlI.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BSeKIjnX.js → TmuxPeek-eVfqPB4m.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-BkIGTzgw.js → VoicePermissionsPanel-DpInOlVq.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Cwe-KWK4.js → WorkDetailScreen-DYwgGaJs.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-BBtKRBPv.js → WorkFilesViewer-C7H5fXaZ.js} +1 -1
- package/dist/client/assets/{activity-D4W2XZY2.js → activity-DTqqWiyV.js} +1 -1
- package/dist/client/assets/{addon-fit-Celjj2yn.js → addon-fit-CcaylYTX.js} +1 -1
- package/dist/client/assets/{addon-webgl-Cu4tJ21-.js → addon-webgl-B37iuzOG.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-Dv-_9dAw.js → agent-autocomplete-cOPLtuhM.js} +1 -1
- package/dist/client/assets/{agent-essentials-CngjUhQj.js → agent-essentials-DbbJm3ne.js} +1 -1
- package/dist/client/assets/{agent-identity-DzHGhLdJ.js → agent-identity-CIMT7oV6.js} +1 -1
- package/dist/client/assets/{agent-specialization-CNrsRbKA.js → agent-specialization-D3-sqwhU.js} +1 -1
- package/dist/client/assets/{arc.es-DNT50Y-_.js → arc.es-BRPqOKIx.js} +1 -1
- package/dist/client/assets/{archive-DH49QqFG.js → archive-DPMdoW_D.js} +1 -1
- package/dist/client/assets/{arrow-left-i-h6JAgs.js → arrow-left-B0CdJdAC.js} +1 -1
- package/dist/client/assets/{arrow-right-B0Yi01Zr.js → arrow-right-YRBoTTyf.js} +1 -1
- package/dist/client/assets/{arrow-up-right-RBC6k8nn.js → arrow-up-right-CilNLf4t.js} +1 -1
- package/dist/client/assets/{bot-r2IuAuJd.js → bot-Ba3gcRVa.js} +1 -1
- package/dist/client/assets/{check-Bfs7hMb1.js → check-BdovFDz8.js} +1 -1
- package/dist/client/assets/{chevron-down-Da5tV19_.js → chevron-down-Jh540uf3.js} +1 -1
- package/dist/client/assets/{chevron-right-BMqtBds_.js → chevron-right-CV7sEVBS.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-BUVYXXAp.js → chunk-HRAB3GC3-BYQZ1LOn.js} +1 -1
- package/dist/client/assets/{clock-DaKLp6Xd.js → clock-DpfYdWcr.js} +1 -1
- package/dist/client/assets/{code-xml-ByQsfOI_.js → code-xml-CPzpZkhu.js} +1 -1
- package/dist/client/assets/{compass-BepM5iWH.js → compass-D5Io6BIV.js} +1 -1
- package/dist/client/assets/{content-Bgl_X3ao.js → content-3b_jmxEx.js} +1 -1
- package/dist/client/assets/content-B-i0XY-t.js +1 -0
- package/dist/client/assets/content-BD-DNFmb.js +1 -0
- package/dist/client/assets/content-BGeo5tgd.js +1 -0
- package/dist/client/assets/content-BMvXPLiQ.js +1 -0
- package/dist/client/assets/content-BWTbfMDg.js +1 -0
- package/dist/client/assets/content-BwCmeUmF.js +1 -0
- package/dist/client/assets/content-C1K3NcZa.js +1 -0
- package/dist/client/assets/{content-Cv2tSAbv.js → content-C34J5_Af.js} +1 -1
- package/dist/client/assets/content-CGRtIS2m.js +1 -0
- package/dist/client/assets/content-CIJo_-JS.js +1 -0
- package/dist/client/assets/content-CvqIqVAV.js +1 -0
- package/dist/client/assets/content-DRnwm-Vu.js +1 -0
- package/dist/client/assets/{content-5hnDC9WE.js → content-Dh39SSvP.js} +1 -1
- package/dist/client/assets/content-DoypqDj5.js +1 -0
- package/dist/client/assets/content-n3mvc6NQ.js +1 -0
- package/dist/client/assets/{conversation-icons-C4amK8Sa.js → conversation-icons-bHIIZ9z3.js} +1 -1
- package/dist/client/assets/{conversation-model-CigSPlKA.js → conversation-model-CIzM7aXT.js} +1 -1
- package/dist/client/assets/conversation-motion-features-CrP5K-dk.js +1 -0
- package/dist/client/assets/{copy-De4s38o2.js → copy-DQAM0eSY.js} +1 -1
- package/dist/client/assets/{cpu-Bc268H9Q.js → cpu-CtQc0Z9D.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DLlxGjKt.js → createLucideIcon-Da0lq809.js} +1 -1
- package/dist/client/assets/discover-DdkMhTAV.js +2 -0
- package/dist/client/assets/embed-entry-DoSM1GZB.js +2 -0
- package/dist/client/assets/{external-link-BGHC_naA.js → external-link-BheHazeW.js} +1 -1
- package/dist/client/assets/{eye-BeCSqJn1.js → eye-B908WSFH.js} +1 -1
- package/dist/client/assets/{file-code-corner-CX53Cd9y.js → file-code-corner-C5Pc6znt.js} +1 -1
- package/dist/client/assets/{file-text-BVhkMWyC.js → file-text-BGVkHS4_.js} +1 -1
- package/dist/client/assets/{gauge-CPcEPmNt.js → gauge-sc_gb5Zw.js} +1 -1
- package/dist/client/assets/{gestures-BXIGYk_p.js → gestures-AzPBSf20.js} +1 -1
- package/dist/client/assets/{git-branch-q8Ayc8py.js → git-branch-CdJU49Af.js} +1 -1
- package/dist/client/assets/{home-moving-signal-Dm2Z2x0p.js → home-moving-signal-CZo2bYBi.js} +1 -1
- package/dist/client/assets/{home-now-card-xU5LGP7q.js → home-now-card-DgxfZHcR.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-Djhy6ax0.js → home-now-card-nano-iwd10r9G.js} +1 -1
- package/dist/client/assets/{hooks-CdKx1CxP.js → hooks-CeCCO6Yg.js} +1 -1
- package/dist/client/assets/{index-DhfOMK0D.js → index-BIiI9gfa.js} +1 -1
- package/dist/client/assets/index-CD2foMB8.js +1 -0
- package/dist/client/assets/{index-D7UEHxaY.js → index-DReHD_4U.js} +1 -1
- package/dist/client/assets/{index-Bli6bTLU.js → index-NRbRrZw-.js} +6 -6
- package/dist/client/assets/{inspector-panel-B8pigRsg.js → inspector-panel-CBf8pW7s.js} +1 -1
- package/dist/client/assets/{keyboard-nav-7iEtvu9P.js → keyboard-nav-feLCB3Zm.js} +1 -1
- package/dist/client/assets/{lane-roster-store-pHT3TAVs.js → lane-roster-store-BAmj273z.js} +1 -1
- package/dist/client/assets/{layers-BiZA-Clc.js → layers-D9fblkql.js} +1 -1
- package/dist/client/assets/{layout-grid-DMpv9CZM.js → layout-grid-Vd1chalc.js} +1 -1
- package/dist/client/assets/left-41_3QKk1.js +1 -0
- package/dist/client/assets/{left-Dy403II2.js → left-B3ofA1Pr.js} +2 -2
- package/dist/client/assets/{left-BhgU6NOA.js → left-BWBZQhxQ.js} +1 -1
- package/dist/client/assets/{left-CY_FGnN7.js → left-BhA6essi.js} +1 -1
- package/dist/client/assets/{left-Cq8mjamr.js → left-BmTKCv4f.js} +1 -1
- package/dist/client/assets/{left-Dnqla0b5.js → left-CCGR6tIF.js} +1 -1
- package/dist/client/assets/{left-BhZhSrS2.js → left-Dfwzkwh_.js} +1 -1
- package/dist/client/assets/{left-advisor-oOAtJ9YE.js → left-advisor-yrzW1Kwz.js} +1 -1
- package/dist/client/assets/{left-agents-TIKe8vW8.js → left-agents-Bgahk0FF.js} +1 -1
- package/dist/client/assets/{left-default-owH0Lwxo.js → left-default-CtkfAquc.js} +1 -1
- package/dist/client/assets/{left-lanes-BE_co2lP.js → left-lanes-CpujaVN3.js} +1 -1
- package/dist/client/assets/{left-mission-C_nWUtfA.js → left-mission-Bbd-fW6W.js} +1 -1
- package/dist/client/assets/{library-BSVrjn_m.js → library-Dx14WNGd.js} +1 -1
- package/dist/client/assets/{loader-circle-DoT8gpw6.js → loader-circle-Be0T8xv2.js} +1 -1
- package/dist/client/assets/{local-agents-BMadXuP1.js → local-agents-Q6KQ12B9.js} +1 -1
- package/dist/client/assets/{mentions-Cd6XticV.js → mentions-KNASbAjG.js} +1 -1
- package/dist/client/assets/{mesh-ops-C0zCLTR8.js → mesh-ops-C-i8OMiM.js} +1 -1
- package/dist/client/assets/{mesh-view-store-Cpqil_2D.js → mesh-view-store-B0lqpw8M.js} +1 -1
- package/dist/client/assets/{message-circle-44KSmbvQ.js → message-circle-2v9Udia0.js} +1 -1
- package/dist/client/assets/{message-markup-DAnnGpWr.js → message-markup-BP2nH9kQ.js} +1 -1
- package/dist/client/assets/{message-square-DlY4EneU.js → message-square-DURSOrUr.js} +1 -1
- package/dist/client/assets/{mission-control-store-DtjtRs9Z.js → mission-control-store-HeCy97KT.js} +1 -1
- package/dist/client/assets/{observe-DL5_8-Zj.js → observe-DkAhvkfn.js} +1 -1
- package/dist/client/assets/{page-status-CW8co39E.js → page-status-CEP5pGf3.js} +1 -1
- package/dist/client/assets/{persistent-state-DYjP8lqN.js → persistent-state-Bm_0TmZL.js} +1 -1
- package/dist/client/assets/{plus-64n9qucr.js → plus-ZReaTFF-.js} +1 -1
- package/dist/client/assets/{profile-BkmuseW7.js → profile-Y0X7HZHc.js} +1 -1
- package/dist/client/assets/{projects-inbox-C0umZMSY.js → projects-inbox-Cbfj4Hx7.js} +1 -1
- package/dist/client/assets/{provider-CX9EWecp.js → provider-Bq0ScH3v.js} +1 -1
- package/dist/client/assets/{proxy-C35W-YHZ.js → proxy-DtC2iXnT.js} +1 -1
- package/dist/client/assets/{radio-BjpQTKT0.js → radio-BC9TO5Pl.js} +1 -1
- package/dist/client/assets/{refresh-cw-IgN2fZLM.js → refresh-cw-C4E58VJK.js} +1 -1
- package/dist/client/assets/resolve-panes-BI3WdDS-.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-_g0pIxOr.js +1 -0
- package/dist/client/assets/{right-B3PQUHd5.js → right-BA0F8fPI.js} +1 -1
- package/dist/client/assets/{right-B96CBzrV.js → right-BarpRgcv.js} +1 -1
- package/dist/client/assets/{right-BPirlFC8.js → right-C4GXB45w.js} +1 -1
- package/dist/client/assets/{right-DqiVyo8v.js → right-CIzaNH58.js} +1 -1
- package/dist/client/assets/{right-C2aOC2li.js → right-CXetlD8X.js} +1 -1
- package/dist/client/assets/{right-CtPJjgOV.js → right-CnRcQS_I.js} +1 -1
- package/dist/client/assets/{right-BVWYPIFX.js → right-D2_rmbAH.js} +1 -1
- package/dist/client/assets/{right-SfSu0zHC.js → right-Dqp--KwX.js} +1 -1
- package/dist/client/assets/{right-BUP2Ro_M.js → right-HJJzRuGD.js} +1 -1
- package/dist/client/assets/{right-BoAJxwA3.js → right-WCMb8YXJ.js} +1 -1
- package/dist/client/assets/{rocket-DnmN_YOD.js → rocket-BahfIwFz.js} +1 -1
- package/dist/client/assets/{router-B0YclXYg.js → router-Bx1tiwVe.js} +1 -1
- package/dist/client/assets/{scope-views-Z8aoAmtU.js → scope-views-CmG2X_S0.js} +1 -1
- package/dist/client/assets/{scout-voice-DvG_3stJ.js → scout-voice-BT3gYDhU.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-BJJyaPu2.js → scoutbot-markdown-DIhLsYxz.js} +1 -1
- package/dist/client/assets/{scroll-text-DRidbcse.js → scroll-text-uulNqrf7.js} +1 -1
- package/dist/client/assets/{search-BbgsEMXa.js → search-HmdKXdtR.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-DyC_P9Wx.js → secondaryNavConfig-BVQiyAXu.js} +1 -1
- package/dist/client/assets/{selection-bridge-CpzFGx3-.js → selection-bridge-n4wNTm1B.js} +1 -1
- package/dist/client/assets/{send-horizontal-BXo2uz3Z.js → send-horizontal-DOjHkZCD.js} +1 -1
- package/dist/client/assets/{server-Dt3tpiBj.js → server-CX-xQjJA.js} +1 -1
- package/dist/client/assets/{session-catalog-CUQ8LUJY.js → session-catalog-b7B1Sof1.js} +1 -1
- package/dist/client/assets/{session-table-B4JOKevn.js → session-table-Djain1Qr.js} +1 -1
- package/dist/client/assets/{settings-BzWCF3NF.js → settings-BpKRzxOD.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-7V8B3xsf.js → sliders-horizontal-D2O6QiDN.js} +1 -1
- package/dist/client/assets/{sparkles-ytTwpCbZ.js → sparkles-CgTby-ap.js} +1 -1
- package/dist/client/assets/{sse-CSozY6mp.js → sse-QSbhyq9A.js} +1 -1
- package/dist/client/assets/{tail-events-CrN-Rmxj.js → tail-events-B7BrDaFi.js} +1 -1
- package/dist/client/assets/{terminal-BiNIXhna.js → terminal-DNZTCr6a.js} +1 -1
- package/dist/client/assets/{terminal-relay-pSm7_An6.js → terminal-relay-C2TUIuh1.js} +1 -1
- package/dist/client/assets/{terminal-takeover-CtA3wcXh.js → terminal-takeover-BArLfNtd.js} +1 -1
- package/dist/client/assets/{text-BR9Bap0E.js → text-B2UZi3l9.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C0bEXFeH.js → use-conversation-list-htp0Ui63.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-CK4aw-3G.js → use-fleet-active-asks-BhuTn5mV.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-QixBijmT.js → use-mesh-ops-items-CD-qsvNX.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-BLn59zLn.js → use-reduced-motion-0fAsybdo.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-JKb1EhFh.js → use-scout-dev-flags-DV_I6URU.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-6N8b7qsU.js → useAgentHoverCard-BIrm8esH.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-4atpGgFw.js +1 -0
- package/dist/client/assets/{usePersistentState-DOEahRlt.js → usePersistentState-InmPXIN4.js} +1 -1
- package/dist/client/assets/{usePierreRuntime-Bq6mXrgd.js → usePierreRuntime-CVTMzChM.js} +1 -1
- package/dist/client/assets/{wrench-CQvdf7KT.js → wrench-DwFKomxg.js} +1 -1
- package/dist/client/assets/{x-BJyPzFnn.js → x-DuzAbpk5.js} +1 -1
- package/dist/client/assets/{xterm-D6dE_wMr.js → xterm-xQGYNyB-.js} +1 -1
- package/dist/client/assets/{zap-rw7uwZht.js → zap-CocRNtyr.js} +1 -1
- package/dist/client/crew/brik-bust.webp +0 -0
- package/dist/client/crew/brik-chip-id.webp +0 -0
- package/dist/client/crew/lulu-bust.webp +0 -0
- package/dist/client/crew/milo-bust.webp +0 -0
- package/dist/client/crew/milo-chip-id.webp +0 -0
- package/dist/client/crew/nori-bust.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/blink-half.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/rest.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/crew/sprout-bust.webp +0 -0
- package/dist/client/crew/sprout-chip-id.webp +0 -0
- package/dist/client/crew/vex-bust.webp +0 -0
- package/dist/client/crew/vex-chip-id.webp +0 -0
- package/dist/client/crew/wrench-bust.webp +0 -0
- package/dist/client/crew/wrench-chip-id.webp +0 -0
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AgentAvatar-B1xvQ7ej.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BJLwXSNp.js +0 -1
- package/dist/client/assets/AgentsSubnav-3_vpn2bT.js +0 -1
- package/dist/client/assets/ConversationScreen-BP5tdz2k.css +0 -1
- package/dist/client/assets/CrewWorkspaces-B6YIyw1z.css +0 -1
- package/dist/client/assets/CrewWorkspaces-CDU-wy1Y.js +0 -1
- package/dist/client/assets/OpsScreen-C3yNQqJE.js +0 -1
- package/dist/client/assets/OpsSubnav-BijKI3yG.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-DnIeC16r.js +0 -1
- package/dist/client/assets/ProjectsScreen-DKHQ2iEv.js +0 -1
- package/dist/client/assets/SessionsScreen-CsSqjIY2.js +0 -1
- package/dist/client/assets/SettingsDrawer-Dsj-On_x.css +0 -1
- package/dist/client/assets/SettingsDrawer-DwYQTGi8.js +0 -3
- package/dist/client/assets/SettingsScreen-Btaku7YM.js +0 -1
- package/dist/client/assets/content-BRFZ-a6m.js +0 -1
- package/dist/client/assets/content-BYykncDo.js +0 -1
- package/dist/client/assets/content-Be6yyWbJ.js +0 -1
- package/dist/client/assets/content-BopJW1Zx.js +0 -1
- package/dist/client/assets/content-Bv2sfg0w.js +0 -1
- package/dist/client/assets/content-CMBiIZTg.js +0 -1
- package/dist/client/assets/content-CPVqvf5o.js +0 -1
- package/dist/client/assets/content-CbwyFqdI.js +0 -1
- package/dist/client/assets/content-ClQjAWYi.js +0 -1
- package/dist/client/assets/content-DFFe3-Ot.js +0 -1
- package/dist/client/assets/content-DY5hwBmm.js +0 -1
- package/dist/client/assets/content-_IXoxGno.js +0 -1
- package/dist/client/assets/content-j_tewJdE.js +0 -1
- package/dist/client/assets/conversation-motion-features-_95aZx_1.js +0 -1
- package/dist/client/assets/discover-DOlk1hG7.js +0 -2
- package/dist/client/assets/embed-entry-BqDJfa87.js +0 -2
- package/dist/client/assets/index-DFdlQs_c.js +0 -1
- package/dist/client/assets/left-BayK4ocL.js +0 -1
- package/dist/client/assets/resolve-panes-CCqRkQdM.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-JkxY8qsV.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-D-hVKzM9.js +0 -1
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.87",
|
|
5
|
+
"commit": "84a70671e3b0c847705628984aad354299893fbd",
|
|
6
6
|
"branch": "main",
|
|
7
7
|
"sourceDirty": false,
|
|
8
|
-
"builtAt": "2026-08-23T21:
|
|
8
|
+
"builtAt": "2026-08-23T21:40:05.085Z"
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as s}from"./index-Bli6bTLU.js";import{a as Y}from"./api-DEHEgJ9m.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as J}from"./sse-CSozY6mp.js";import{d as Q}from"./colors-BtO5_zlx.js";import{u as X,a as Z,m as ss,b as es}from"./Provider-Ve8yXaWR.js";import{d as as}from"./router-B0YclXYg.js";import{r as O}from"./mentions-Cd6XticV.js";import{t as I,b as B}from"./time-Dhsh_2EG.js";import{E as C}from"./EmptyState-BnDda92b.js";/* empty css */import"./index-BWHgHrtv.js";import"./provider-CX9EWecp.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";const ts={"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"},ns=new Set(["ask_failed","ask_replied","flight.completed","flight.updated","flight_updated"]),ls={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 ts[a]??a.replace(/[._]/g," ")}function is(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 rs(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function os(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function cs(a){return`${a.actorName??"system"} ${q(a.kind)}`}function ds(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 te({navigate:a}){const{agents:p,route:z}=X(),[v,U]=n.useState([]),[x,w]=n.useState(null),[y,A]=n.useState(!0),[R,$]=n.useState(!1),[h,S]=n.useState(null),[N,F]=n.useState(null),T=n.useRef([]),b=n.useRef(0),f=n.useRef(null),K=Z(),_=as(z),L=n.useMemo(()=>ss(p,_),[p,_]),l=n.useMemo(()=>es(v,L).filter(e=>!ns.has(e.kind)),[v,L]);n.useEffect(()=>{T.current=v},[v]),n.useEffect(()=>{x&&!l.some(e=>e.id===x)&&w(null)},[x,l]);const m=n.useCallback(async(e="initial")=>{const i=++b.current;!(T.current.length>0)&&e!=="background"?(A(!0),S(null)):$(!0);try{const o=await Y("/api/activity");if(i!==b.current)return;U(o),S(null),F(Date.now()),w(g=>o.some(E=>E.id===g)?g:null)}catch(o){if(i!==b.current)return;S(o instanceof Error?o.message:String(o))}finally{i===b.current&&(A(!1),$(!1))}},[]),P=n.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);n.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),J(P);const G=n.useMemo(()=>{const e=new Set(l.map(c=>c.actorName??"system")),i=new Set(l.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${l.length}`,detail:l.length>0?`Latest ${I(l[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${i.size}`,detail:i.size>0?"Conversation-linked records":"No linked threads"}]},[l]),H=!y&&l.length===0&&!!h,V=!y&&l.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&&l.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||R,onClick:()=>{m("manual")},children:R?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:G.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&&l.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&l.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),H&&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"})}),V&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),l.length>0&&s.jsx("div",{className:"sys-audit-list",children:l.map(e=>{const i=x===e.id,c=is(e.kind),o=ls[c],g=os(e.workspaceRoot),E=e.summary&&e.summary!==e.title?e.summary:ds(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 t=e.agentName??"Agent";r.push({key:"agent",label:t,title:`Open agent ${t}`,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 D=()=>w(i?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${i?" sys-audit-entry-expanded":""}`,onContextMenu:t=>{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 M of r)d.push({kind:"action",label:`Open ${M.label}`,onSelect:()=>a(M.route)})}K(t,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":i,onClick:D,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),D())},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:B(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:O(e.title??cs(e))}),s.jsx("p",{className:"sys-audit-summary",children:O(E)}),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:Q(e.actorName??"system")},children:rs(e.actorName)}),e.actorName??"system"]}),g&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",g]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(t=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:t.title,onClick:j=>{j.stopPropagation(),a(t.route)},children:t.label},t.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:i?"Close":"Details"})]}),i&&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:B(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(t=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(t.route),children:["Open ",t.label]},t.key))})]})]},e.id)})})]})}export{te as ActivityScreen};
|
|
1
|
+
import{r as n,j as s}from"./index-NRbRrZw-.js";import{a as Y}from"./api-DEHEgJ9m.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as J}from"./sse-QSbhyq9A.js";import{d as Q}from"./colors-BtO5_zlx.js";import{u as X,a as Z,m as ss,b as es}from"./Provider-Cd-QZltN.js";import{d as as}from"./router-Bx1tiwVe.js";import{r as O}from"./mentions-KNASbAjG.js";import{t as I,b as B}from"./time-Dhsh_2EG.js";import{E as C}from"./EmptyState-uQbB-bvP.js";/* empty css */import"./index-BWHgHrtv.js";import"./provider-Bq0ScH3v.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./AgentDetailCard-2DZQahiN.js";import"./AgentLiveActions-BmXDRxER.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";const ts={"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"},ns=new Set(["ask_failed","ask_replied","flight.completed","flight.updated","flight_updated"]),ls={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 ts[a]??a.replace(/[._]/g," ")}function is(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 rs(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function os(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function cs(a){return`${a.actorName??"system"} ${q(a.kind)}`}function ds(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 te({navigate:a}){const{agents:p,route:z}=X(),[v,U]=n.useState([]),[x,w]=n.useState(null),[y,A]=n.useState(!0),[R,$]=n.useState(!1),[h,S]=n.useState(null),[N,F]=n.useState(null),T=n.useRef([]),b=n.useRef(0),f=n.useRef(null),K=Z(),_=as(z),L=n.useMemo(()=>ss(p,_),[p,_]),l=n.useMemo(()=>es(v,L).filter(e=>!ns.has(e.kind)),[v,L]);n.useEffect(()=>{T.current=v},[v]),n.useEffect(()=>{x&&!l.some(e=>e.id===x)&&w(null)},[x,l]);const m=n.useCallback(async(e="initial")=>{const i=++b.current;!(T.current.length>0)&&e!=="background"?(A(!0),S(null)):$(!0);try{const o=await Y("/api/activity");if(i!==b.current)return;U(o),S(null),F(Date.now()),w(g=>o.some(E=>E.id===g)?g:null)}catch(o){if(i!==b.current)return;S(o instanceof Error?o.message:String(o))}finally{i===b.current&&(A(!1),$(!1))}},[]),P=n.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);n.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),J(P);const G=n.useMemo(()=>{const e=new Set(l.map(c=>c.actorName??"system")),i=new Set(l.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${l.length}`,detail:l.length>0?`Latest ${I(l[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${i.size}`,detail:i.size>0?"Conversation-linked records":"No linked threads"}]},[l]),H=!y&&l.length===0&&!!h,V=!y&&l.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&&l.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||R,onClick:()=>{m("manual")},children:R?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:G.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&&l.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&l.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),H&&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"})}),V&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),l.length>0&&s.jsx("div",{className:"sys-audit-list",children:l.map(e=>{const i=x===e.id,c=is(e.kind),o=ls[c],g=os(e.workspaceRoot),E=e.summary&&e.summary!==e.title?e.summary:ds(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 t=e.agentName??"Agent";r.push({key:"agent",label:t,title:`Open agent ${t}`,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 D=()=>w(i?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${i?" sys-audit-entry-expanded":""}`,onContextMenu:t=>{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 M of r)d.push({kind:"action",label:`Open ${M.label}`,onSelect:()=>a(M.route)})}K(t,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":i,onClick:D,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),D())},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:B(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:O(e.title??cs(e))}),s.jsx("p",{className:"sys-audit-summary",children:O(E)}),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:Q(e.actorName??"system")},children:rs(e.actorName)}),e.actorName??"system"]}),g&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",g]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(t=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:t.title,onClick:j=>{j.stopPropagation(),a(t.route)},children:t.label},t.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:i?"Close":"Details"})]}),i&&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:B(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(t=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(t.route),children:["Open ",t.label]},t.key))})]})]},e.id)})})]})}export{te as ActivityScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as o}from"./index-
|
|
1
|
+
import{r as n,j as o}from"./index-NRbRrZw-.js";import{a as y}from"./api-DEHEgJ9m.js";import{c as j}from"./createLucideIcon-Da0lq809.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as A,j as o}from"./index-NRbRrZw-.js";import{h as Z}from"./Provider-Cd-QZltN.js";import{a as J,S as Q}from"./SpriteAvatar-vpHO-rXs.js";import{H as ee}from"./HarnessMark-CEzmPFHC.js";import{m as Y}from"./agent-identity-CIMT7oV6.js";import{i as te,s as re,e as ne}from"./colors-BtO5_zlx.js";const oe="/crew";function W(e){return`${oe}/${e.replace(/^\/+/u,"")}`}const H={id:"eye-plate-v1"},D={module:H.id,origin:[190,180],size:[96,40]},G={module:H.id,origin:[149,203],size:[96,40]},x={milo:{w:492,h:512,coin:[145,16,213],ink:.75,kernel:"dome·antennae·visor"},brik:{w:490,h:512,coin:[73,-29,273],ink:.37,kernel:"slab·bare·screen"},sprout:{w:516,h:512,coin:[146,-3,223],ink:.74,kernel:"bell·leaves·painted"},wrench:{w:509,h:512,coin:[123,-26,261],ink:.52,kernel:"cone·knob·lens"},vex:{w:512,h:512,coin:[129,0,254],ink:.33,kernel:"orb·ears·slit"},lulu:{w:475,h:512,coin:[-24,-153,522],ink:.75,kernel:"orb·gills·eye-plate",face:D},nori:{w:394,h:512,coin:[-20,-109,433],ink:.71,kernel:"cap·lamp·eye-plate",face:G}},I={milo:{fill:.86,ink:.5},brik:{fill:.86,ink:.81},sprout:{fill:.88,ink:.64,nudge:[0,-.01]},wrench:{fill:.88,ink:.53,nudge:[0,-.01]},vex:{fill:.86,ink:.49}},ie=Object.keys(I);function se(e){return!!(e&&I[e.toLowerCase()])}function Ae(e){if(e==="sprite")return null;const t=ae.length;return{covered:e==="chip"?ie.length:Object.keys(x).length,total:t}}const le={sprout:{patch:[210,133,96,29],roles:["blink-half","blink-shut","look-left","look-right","look-up"],dir:"sheets/sprout"},lulu:{patch:[...D.origin,...D.size],roles:["blink-half","blink-shut","look-left","look-right","look-up"],dir:`sheets/${H.id}`},nori:{patch:[...G.origin,...G.size],roles:["blink-half","blink-shut","look-left","look-right","look-up"],dir:`sheets/${H.id}`}},ae=[{slug:"milo",name:"Milo",kernel:"dome·antennae·visor",title:"Navigator",blurb:"Curious scout with sensory antennae and panoramic visor."},{slug:"brik",name:"Brik",kernel:"slab·bare·screen",title:"Heavy Ops",blurb:"Resilient bedrock unit with bevelled chassis and glyph screen."},{slug:"sprout",name:"Sprout",kernel:"bell·leaves·painted",title:"Botanist & Growth",blurb:"Bio-mechanical explorer with sprouted leaf crest and painted smile."},{slug:"wrench",name:"Wrench",kernel:"cone·knob·lens",title:"Field Mechanic",blurb:"Precision troubleshooter with pressure valve knob and heavy lens."},{slug:"vex",name:"Vex",kernel:"orb·ears·slit",title:"Signal Watcher",blurb:"Agile acoustic observer with radar ears and slit optics."},{slug:"lulu",name:"Lulu",kernel:"orb·gills·eye-plate",title:"Deep Explorer",blurb:"Aquatic hydro-scout with atmospheric gills and modular eye-plate."},{slug:"nori",name:"Nori",kernel:"cap·lamp·eye-plate",title:"Cave & Tunnel Scout",blurb:"Underground explorer with wide cap canopy and headlamp housing."}],ce=[{role:"rest",note:"eyes open, forward"},{role:"blink-half",note:"lids half down"},{role:"blink-shut",note:"lids closed"},{role:"look-left",note:"eyes left"},{role:"look-right",note:"eyes right"},{role:"look-up",note:"eyes up"}];function ue(e,t){const[r,n,l]=e.coin;if(t>=28)return[r,n,l];const a=Math.min(1.65,28/Math.max(t,12)),m=l*a,C=r+l/2,w=n+l/2;return[C-m/2,w-m/2,m]}function de(e){return e?Math.floor(Y("crew:"+e.trim().toLowerCase()).next()*360):210}const pe=.45;function he(e,t=1){return e==null?"color-mix(in srgb, var(--hud-ink, #fff) 8%, var(--hud-surface, #1e2029))":t>=pe?`radial-gradient(115% 105% at 50% 112%, oklch(0.34 0.1 ${e}) 0%, oklch(0.25 0.07 ${e}) 52%, oklch(0.17 0.04 ${e}) 100%)`:`radial-gradient(115% 105% at 50% 112%, oklch(0.9 0.035 ${e}) 0%, oklch(0.84 0.05 ${e}) 52%, oklch(0.75 0.06 ${e}) 100%)`}function N(e){if(!e)return;const t=e.trim().toLowerCase().replace(/^@/,"");if(x[t])return t;const r=t.split(/[^a-z0-9]+/).filter(Boolean);for(const n of Object.keys(x))if(r.includes(n))return n}function V(e){const t=Object.keys(x),r=Y("crew:cast:"+e.trim().toLowerCase());return t[Math.floor(r.next()*t.length)]}function Ee(e,t=!1){if(e)return N(e)??(t?V(e):void 0)}const fe={idle:{label:"Idle",colour:"var(--scout-chrome-ink-dim, #71717a)"},thinking:{label:"Thinking",colour:"#6fb7c7"},working:{label:"Working",colour:"#7fb069"},needs:{label:"Needs attention",colour:"#d9a441"},error:{label:"Error",colour:"#c74a4a"},offline:{label:"Offline",colour:"#6e6e72"}};function me(e){if(!e)return"idle";const t=e.toLowerCase();return t.includes("think")?"thinking":t.includes("work")||t.includes("turn")||t.includes("stream")||t.includes("run")||t.includes("busy")?"working":t.includes("need")||t.includes("wait")||t.includes("block")||t.includes("ask")||t.includes("prompt")?"needs":t.includes("err")||t.includes("fail")||t.includes("crash")?"error":t.includes("off")||t.includes("stop")||t.includes("down")||t.includes("dead")?"offline":"idle"}function ge(e){const[t,r]=A.useState(0),n=A.useRef([]);return A.useEffect(()=>{if(e<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const l=()=>{n.current.push(window.setTimeout(()=>{r(1),n.current.push(window.setTimeout(()=>r(2),40)),n.current.push(window.setTimeout(()=>r(1),90)),n.current.push(window.setTimeout(()=>{r(0),l()},130))},2800+Math.random()*4500))};l();const a=n.current;return()=>{a.forEach(m=>window.clearTimeout(m)),a.length=0}},[e]),e<3?0:t}function ke({slug:e,name:t,project:r,harness:n,state:l,size:a,badge:m=!0,ring:C=!0,chip:w=!1,glow:E=!1,className:z,style:y,title:O}){const b=e.toLowerCase(),s=x[b],c=le[b],u=me(l),g=fe[u],i=ge(c?c.roles.length+1:1),k=c&&i>0?ce[i]?.role:void 0,j=A.useMemo(()=>de(r),[r]),S=(w?I[b]?.ink:void 0)??s?.ink??1,M=A.useMemo(()=>he(j,S),[j,S]);if(!s)return null;const d=w?I[b]:void 0,h=a??40,[T,f,p]=ue(s,h),v=`${s.w/p*100}%`,L=`${s.h/p*100}%`,R=`${-T/p*100}%`,B=`${-f/p*100}%`,P=t||e.toUpperCase(),F=O??`${P} · ${r||"openscout"} · ${n||"scout"} · ${g.label}`,$=m&&h>=28&&!!(n&&n!=="unknown"),_=a!=null?{width:a,height:a}:{width:"100%",height:"100%"};return o.jsxs("span",{className:`xc-avatar-root ${z||""}`,style:{..._,boxShadow:E?`0 0 ${Math.round(h*.3)}px ${g.colour}`:void 0,...y},title:F,children:[o.jsx("span",{className:"xc-avatar-shell",style:{background:M,opacity:u==="offline"?.55:1},children:d?o.jsx("img",{src:W(`${b}-chip-id.webp`),alt:"",className:"xc-avatar-img xc-avatar-img--pixel",style:{width:`${d.fill*100}%`,height:`${d.fill*100}%`,left:`${(.5-d.fill/2+(d.nudge?.[0]??0))*100}%`,top:`${(.5-d.fill/2+(d.nudge?.[1]??0))*100}%`}}):o.jsxs(o.Fragment,{children:[o.jsx("img",{src:W(`${e.toLowerCase()}-bust.webp`),alt:"",className:"xc-avatar-img",style:{width:v,height:L,left:R,top:B}}),c&&k&&o.jsx("img",{src:W(`${c.dir}/${k}.webp`),alt:"",className:"xc-avatar-patch",style:{width:`${c.patch[2]/p*100}%`,height:`${c.patch[3]/p*100}%`,left:`${(-T+c.patch[0])/p*100}%`,top:`${(-f+c.patch[1])/p*100}%`}})]})}),C&&o.jsx("span",{className:"xc-ring","data-ring":u,style:{"--xc-c":g.colour}}),$&&o.jsx(ee,{harness:n,size:Math.max(8,Math.round(h*.22)),className:"xc-badge-mark",style:{right:"0%",bottom:"0%",width:"32%",height:"32%",minWidth:12,minHeight:12},title:null})]})}const q={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}},we={compact:.85,regular:1,large:1.25};function je(e,t){return q[e].sizes?.[t]}function be(e,t){if(t==="regular")return e;const r=Math.round(e*we[t]);return t==="compact"?Math.max(20,Math.min(e,r)):r}function Me({agent:e,name:t,slug:r,avatarStyle:n,project:l,harness:a,state:m,kind:C="agent",placement:w="row",size:E,scaleWithPreference:z=!0,presence:y,tile:O,salt:b,className:s,channelClassName:c,style:u,title:g}){const i=e?.name??t??"?";if(C==="channel")return o.jsx("span",{className:c??s,style:u,title:g??i,children:"#"});const k=Z(),j=k?.operatorName||k?.onboarding?.operatorName?.trim()||k?.onboarding?.operatorNameSuggestion?.trim()||"operator",S=i.toLowerCase()==="operator"||i.toLowerCase()==="you"||i.toLowerCase()===j.toLowerCase()||i.toLowerCase()==="art",M=k?.appearanceDetails?.operatorCharacter||"milo",d=n??k?.appearanceDetails?.avatarStyle??"crew",h=r?N(r)??V(r):S?N(M)??V(M):N(e?.slug||i),T=h!=null&&x[h]!=null&&(d!=="chip"||se(h)),f=q[w],p=z?k?.appearanceDetails?.avatarSize??"regular":"regular",v=E!=null?be(E,p):f.sizes?.[p];if(d!=="sprite"&&T&&h){const _=a??e?.harness??void 0,K=m??e?.state??null,X=l??e?.project??"openscout",U=o.jsx(ke,{slug:h,name:i,project:X,harness:_,state:K,size:v,badge:_?y??f.presence:!1,ring:y??(w==="hero"||w==="turn"?!1:f.presence),chip:d==="chip",glow:f.glow,title:g??i});return v==null?o.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",display:"inline-grid",placeItems:"center",...u},title:g??i,children:U}):s||u?o.jsx("span",{className:s,style:{display:"inline-grid",placeItems:"center",...u},children:U}):U}const L=e?J(e):null,R=y??f.presence,B=te(e?.state??null),P=R&&B?re(e?.state??null):void 0,F=R&&ne(e?.state??null),$=o.jsx(Q,{name:i,size:v,hue:L?.hue,tone:L?.tone,salt:b,tile:O??f.tile,glow:f.glow,corner:P,cornerPulse:F,title:g??i});return v==null?o.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",...u},title:g??i,children:$}):s||u?o.jsx("span",{className:s,style:u,children:$}):$}export{Me as A,x as C,ce as S,ae as a,le as b,he as c,W as d,ke as e,Ae as f,je as p,Ee as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.xc-avatar-root{position:relative;display:inline-grid;place-items:center;flex:none;box-sizing:border-box;-webkit-user-select:none;user-select:none}.xc-avatar-root>svg{display:none!important}.xc-avatar-shell{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:50%;box-sizing:border-box;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--hud-ink, #fff) 16%,transparent)}.xc-avatar-img{position:absolute;display:block;max-width:none;pointer-events:none}.xc-avatar-img--pixel{image-rendering:pixelated;image-rendering:crisp-edges}.xc-avatar-patch{position:absolute;display:block;max-width:none;pointer-events:none}.xc-ring{position:absolute;inset:0;border-radius:50%;pointer-events:none}.xc-ring:before{content:"";position:absolute;inset:0;border-radius:50%;border:1.5px solid var(--xc-c, var(--scout-chrome-ink, #7fb069));box-sizing:border-box}.xc-ring[data-ring=idle]:before,.xc-ring[data-ring=ready]:before{border-width:1px;opacity:.45}.xc-ring[data-ring=offline]:before{border-style:dashed;opacity:.5}.xc-ring[data-ring=thinking]:before{animation:xc-pulse 2.4s ease-in-out infinite}.xc-ring[data-ring=needs]:before,.xc-ring[data-ring=waiting]:before,.xc-ring[data-ring=blocked]:before{border-width:2px}.xc-ring[data-ring=error]:before,.xc-ring[data-ring=failed]:before{animation:xc-blink 1.1s steps(1,end) infinite}.xc-ring[data-ring=working]:before{opacity:.25}.xc-ring[data-ring=working]:after{content:"";position:absolute;inset:-1px;border-radius:50%;background:conic-gradient(from 0deg,transparent 0deg,var(--xc-c, #7fb069) 72deg,transparent 132deg);-webkit-mask:radial-gradient(closest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2.5px));mask:radial-gradient(closest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2.5px));animation:xc-sweep 2.6s linear infinite}@keyframes xc-pulse{0%,to{opacity:.28}50%{opacity:1}}@keyframes xc-blink{0%,49%{opacity:1}50%,to{opacity:.16}}@keyframes xc-sweep{to{transform:rotate(360deg)}}.xc-badge-mark{position:absolute;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--hud-surface, #1e2029) 88%,var(--hud-bg, #000));color:color-mix(in srgb,var(--hud-ink, #fff) 76%,transparent);box-shadow:0 0 0 1.5px var(--hud-bg, #161820);pointer-events:none}.xc-stage-wrapper{position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center}.xc-stage{position:relative;overflow:hidden;display:inline-block;flex:none;box-sizing:border-box;box-shadow:0 4px 20px color-mix(in srgb,black 35%,transparent);transition:width .56s cubic-bezier(.2,.8,.2,1),height .56s cubic-bezier(.2,.8,.2,1),border-radius .56s cubic-bezier(.2,.8,.2,1),box-shadow .4s ease,transform .2s ease;-webkit-user-select:none;user-select:none}.xc-stage[role=button]{cursor:pointer}.xc-stage[role=button]:hover{transform:scale(1.02);box-shadow:0 8px 30px color-mix(in srgb,black 45%,transparent)}.xc-stage[role=button]:focus-visible{outline:2px solid color-mix(in srgb,var(--hud-border) 40%,white 60%);outline-offset:3px}.xc-stage-ground{position:absolute;inset:0;border-radius:inherit;pointer-events:none;transition:opacity .4s ease,background .4s ease}.xc-stage-img,.xc-stage-patch{position:absolute;max-width:none;pointer-events:none;display:block;transition:width .56s cubic-bezier(.2,.8,.2,1),height .56s cubic-bezier(.2,.8,.2,1),left .56s cubic-bezier(.2,.8,.2,1),top .56s cubic-bezier(.2,.8,.2,1)}@media(prefers-reduced-motion:reduce){.xc-ring[data-ring]:before,.xc-ring[data-ring]:after{animation:none}.xc-ring[data-ring=working]:before{opacity:1}.xc-stage,.xc-stage-img,.xc-stage-patch,.xc-stage-ground{transition:none!important}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as s}from"./index-Bli6bTLU.js";import{E as L}from"./EmptyState-BnDda92b.js";import{a as R}from"./api-DEHEgJ9m.js";import{h as _}from"./NewChatComposer-Bgqes0UQ.js";import{d as K}from"./time-Dhsh_2EG.js";import{u as D}from"./Provider-Ve8yXaWR.js";import{o as U}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as q}from"./AgentsSubnav-3_vpn2bT.js";/* empty css */import{R as W}from"./refresh-cw-IgN2fZLM.js";import{S as V}from"./settings-BzWCF3NF.js";import{c as I}from"./createLucideIcon-DLlxGjKt.js";import{B as O}from"./bot-r2IuAuJd.js";import{W as Y}from"./wrench-CQvdf7KT.js";import{S as F}from"./server-Dt3tpiBj.js";import{C as J}from"./cpu-Bc268H9Q.js";import"./text-BR9Bap0E.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./colors-BtO5_zlx.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./keyboard-nav-7iEtvu9P.js";import"./x-BJyPzFnn.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./file-text-BVhkMWyC.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./SecondaryNav-cYTw2p39.js";import"./secondaryNavConfig-DyC_P9Wx.js";import"./message-square-DlY4EneU.js";import"./compass-BepM5iWH.js";import"./terminal-BiNIXhna.js";import"./git-branch-q8Ayc8py.js";import"./scroll-text-DRidbcse.js";const G=[["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"}]],B=I("key-round",G);const Q=[["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"}]],X=I("save",Q);function C(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 A(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function E(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function Z(e){return e.length>0?e.join(", "):"No capabilities reported"}function ss({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(J,{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 ${C(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function es({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(B,{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 ${C(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function as({agent:e,selected:l,navigate:p}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${l?" agent-config-row-selected":""}`,onClick:()=>p({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(O,{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 ${C(e.status)}`,children:A(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:E(e.projectRoot??e.cwd)})]})]})}function T(e,l,p,n,o){l(e),p(e.model??""),n(e.runtime.cwd),o(e.runtime.harness)}function ns({agent:e,navigate:l,onConfigSaved:p}){const{route:n}=D(),o=e?.id??null,[c,f]=t.useState(null),[u,v]=t.useState(!1),[N,g]=t.useState(null),[x,d]=t.useState(""),[w,h]=t.useState(""),[y,a]=t.useState(""),[b,m]=t.useState(!1),[j,M]=t.useState("idle"),[$,k]=t.useState(null),S=t.useRef(0),z=t.useCallback(async()=>{const i=++S.current;if(k(null),m(!1),!o){f(null),g(null),v(!1);return}v(!0),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`);if(i!==S.current)return;T(r,f,d,h,a)}catch(r){if(i!==S.current)return;f(null),d(""),h(""),a(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===S.current&&v(!1)}},[e?.harness,o]);t.useEffect(()=>{z()},[z]);const P=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,y].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,y]),H=async i=>{if(i.preventDefault(),!(!o||!c||j==="saving")){M("saving"),k(null),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`,{method:"POST",body:JSON.stringify({model:x.trim()||null,runtime:{cwd:w.trim()||c.runtime.cwd,harness:y.trim()||c.runtime.harness},restart:b})});T(r.config,f,d,h,a),m(!1),k(r.restarted?"Saved and restarted":"Saved"),p?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{M("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:()=>l({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{_(e).then(i=>{U(l,{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 ${C(e.status)}`,children:A(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:u?"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:E(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:E(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:Z(e.capabilities)})]})]}),u&&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..."})}),!u&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:H,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:x,placeholder:"Harness default",disabled:!c.editable||j==="saving",onChange:i=>d(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:y,disabled:!c.editable||j==="saving",onChange:i=>a(i.currentTarget.value),children:P.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:w,disabled:!c.editable||j==="saving",onChange:i=>h(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:b,disabled:!c.editable||j==="saving",onChange:i=>m(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||j==="saving",children:[s.jsx(X,{size:13}),j==="saving"?"Saving...":"Save config"]}),$&&s.jsx("span",{className:"agent-config-save-note",children:$}),N&&s.jsx("span",{className:"agent-config-save-error",children:N})]})]}),!u&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:N??"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 ne({navigate:e,selectedAgentId:l}){const{route:p}=D(),[n,o]=t.useState(null),[c,f]=t.useState(!0),[u,v]=t.useState(!1),[N,g]=t.useState(null),x=t.useRef(0),d=t.useCallback(async(a="initial")=>{const b=++x.current;a==="initial"?f(!0):v(!0),g(null);try{const m=await R("/api/agent-config/snapshot");if(b!==x.current)return;o(m)}catch(m){if(b!==x.current)return;g(m instanceof Error?m.message:String(m))}finally{b===x.current&&(f(!1),v(!1))}},[]);t.useEffect(()=>{d()},[d]);const w=t.useMemo(()=>n?n.agents.find(a=>a.id===l)??n.agents[0]??null:null,[l,n]),h=n?.providers??[],y=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(h.length),detail:`${h.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>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(q,{activeRoute:p,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 ",K(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:c||u,onClick:()=>{d("manual")},children:[s.jsx(W,{size:13}),u?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:y.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))}),N&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:N})]}),c&&!n&&s.jsx(L,{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(V,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(ss,{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(B,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:h.map(a=>s.jsx(es,{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(O,{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(as,{agent:a,selected:a.id===w?.id,navigate:e},a.id))})]}),s.jsx(ns,{agent:w,navigate:e,onConfigSaved:()=>{d("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(Y,{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(F,{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{ne as AgentConfigurationScreen};
|
|
1
|
+
import{r as t,j as s}from"./index-NRbRrZw-.js";import{E as L}from"./EmptyState-uQbB-bvP.js";import{a as R}from"./api-DEHEgJ9m.js";import{h as _}from"./NewChatComposer-BPsg8shF.js";import{d as K}from"./time-Dhsh_2EG.js";import{u as D}from"./Provider-Cd-QZltN.js";import{o as U}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as q}from"./AgentsSubnav-CsvYzzQ-.js";/* empty css */import{R as W}from"./refresh-cw-C4E58VJK.js";import{S as V}from"./settings-BpKRzxOD.js";import{c as I}from"./createLucideIcon-Da0lq809.js";import{B as O}from"./bot-Ba3gcRVa.js";import{W as Y}from"./wrench-DwFKomxg.js";import{S as F}from"./server-CX-xQjJA.js";import{C as J}from"./cpu-CtQc0Z9D.js";import"./text-B2UZi3l9.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./colors-BtO5_zlx.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./keyboard-nav-feLCB3Zm.js";import"./x-DuzAbpk5.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./file-text-BGVkHS4_.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./TextDocumentSurface-B29xZNlI.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./SecondaryNav-CCQqTT3e.js";import"./secondaryNavConfig-BVQiyAXu.js";import"./message-square-DURSOrUr.js";import"./compass-D5Io6BIV.js";import"./terminal-DNZTCr6a.js";import"./git-branch-CdJU49Af.js";import"./scroll-text-uulNqrf7.js";const G=[["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"}]],B=I("key-round",G);const Q=[["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"}]],X=I("save",Q);function C(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 A(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function E(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function Z(e){return e.length>0?e.join(", "):"No capabilities reported"}function ss({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(J,{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 ${C(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function es({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(B,{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 ${C(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function as({agent:e,selected:l,navigate:p}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${l?" agent-config-row-selected":""}`,onClick:()=>p({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(O,{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 ${C(e.status)}`,children:A(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:E(e.projectRoot??e.cwd)})]})]})}function T(e,l,p,n,o){l(e),p(e.model??""),n(e.runtime.cwd),o(e.runtime.harness)}function ns({agent:e,navigate:l,onConfigSaved:p}){const{route:n}=D(),o=e?.id??null,[c,f]=t.useState(null),[u,v]=t.useState(!1),[N,g]=t.useState(null),[x,d]=t.useState(""),[w,h]=t.useState(""),[y,a]=t.useState(""),[b,m]=t.useState(!1),[j,M]=t.useState("idle"),[$,k]=t.useState(null),S=t.useRef(0),z=t.useCallback(async()=>{const i=++S.current;if(k(null),m(!1),!o){f(null),g(null),v(!1);return}v(!0),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`);if(i!==S.current)return;T(r,f,d,h,a)}catch(r){if(i!==S.current)return;f(null),d(""),h(""),a(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===S.current&&v(!1)}},[e?.harness,o]);t.useEffect(()=>{z()},[z]);const P=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,y].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,y]),H=async i=>{if(i.preventDefault(),!(!o||!c||j==="saving")){M("saving"),k(null),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`,{method:"POST",body:JSON.stringify({model:x.trim()||null,runtime:{cwd:w.trim()||c.runtime.cwd,harness:y.trim()||c.runtime.harness},restart:b})});T(r.config,f,d,h,a),m(!1),k(r.restarted?"Saved and restarted":"Saved"),p?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{M("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:()=>l({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{_(e).then(i=>{U(l,{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 ${C(e.status)}`,children:A(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:u?"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:E(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:E(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:Z(e.capabilities)})]})]}),u&&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..."})}),!u&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:H,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:x,placeholder:"Harness default",disabled:!c.editable||j==="saving",onChange:i=>d(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:y,disabled:!c.editable||j==="saving",onChange:i=>a(i.currentTarget.value),children:P.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:w,disabled:!c.editable||j==="saving",onChange:i=>h(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:b,disabled:!c.editable||j==="saving",onChange:i=>m(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||j==="saving",children:[s.jsx(X,{size:13}),j==="saving"?"Saving...":"Save config"]}),$&&s.jsx("span",{className:"agent-config-save-note",children:$}),N&&s.jsx("span",{className:"agent-config-save-error",children:N})]})]}),!u&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:N??"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 ne({navigate:e,selectedAgentId:l}){const{route:p}=D(),[n,o]=t.useState(null),[c,f]=t.useState(!0),[u,v]=t.useState(!1),[N,g]=t.useState(null),x=t.useRef(0),d=t.useCallback(async(a="initial")=>{const b=++x.current;a==="initial"?f(!0):v(!0),g(null);try{const m=await R("/api/agent-config/snapshot");if(b!==x.current)return;o(m)}catch(m){if(b!==x.current)return;g(m instanceof Error?m.message:String(m))}finally{b===x.current&&(f(!1),v(!1))}},[]);t.useEffect(()=>{d()},[d]);const w=t.useMemo(()=>n?n.agents.find(a=>a.id===l)??n.agents[0]??null:null,[l,n]),h=n?.providers??[],y=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(h.length),detail:`${h.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>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(q,{activeRoute:p,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 ",K(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:c||u,onClick:()=>{d("manual")},children:[s.jsx(W,{size:13}),u?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:y.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))}),N&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:N})]}),c&&!n&&s.jsx(L,{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(V,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(ss,{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(B,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:h.map(a=>s.jsx(es,{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(O,{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(as,{agent:a,selected:a.id===w?.id,navigate:e},a.id))})]}),s.jsx(ns,{agent:w,navigate:e,onConfigSaved:()=>{d("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(Y,{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(F,{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{ne as AgentConfigurationScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-
|
|
1
|
+
import{r as l,j as e}from"./index-NRbRrZw-.js";import{A as k}from"./AgentAvatar-CQqJcwOQ.js";import{a as R}from"./api-DEHEgJ9m.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-Cd-QZltN.js";import{a as I}from"./agent-specialization-D3-sqwhU.js";import{p as O}from"./project-overview-helpers-BQTc_Ous.js";import{FileViewerPane as $}from"./FileViewerPane-ebbCtnHE.js";/* empty css */import{C as z}from"./chevron-right-CV7sEVBS.js";import{C as L}from"./chevron-down-Jh540uf3.js";import{F as H,a as U}from"./DocumentFocusViewer-CetjnYut.js";import{F as G}from"./file-text-BGVkHS4_.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./HarnessMark-CEzmPFHC.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./TextDocumentSurface-B29xZNlI.js";import"./createLucideIcon-Da0lq809.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./NewChatOrigin-CCiPg_WR.js";import"./x-DuzAbpk5.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.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-NRbRrZw-.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-BmXDRxER.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-Bli6bTLU.js";/* empty css */import{H as Me}from"./HarnessMark-DGZ6o6Ct.js";import{a as ue,S as fe}from"./SpriteAvatar-DMrSssNZ.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-zAlFbwFn.js";import{l as X,i as Ge}from"./agent-lanes-model-BKOs_32K.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-pHT3TAVs.js";import"./agent-identity-DzHGhLdJ.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-197xYmRp.js";import"./index-DFdlQs_c.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-DEHEgJ9m.js";import"./mentions-Cd6XticV.js";import"./Provider-Ve8yXaWR.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";import"./message-markup-DAnnGpWr.js";import"./ObservedTopologyPanel-D85P6RAk.js";import"./ObserveTextFlow-C1f5oize.js";import"./use-reduced-motion-BLn59zLn.js";import"./proxy-C35W-YHZ.js";import"./SessionObserveEvidence-BVawzqoE.js";import"./message-circle-44KSmbvQ.js";import"./wrench-CQvdf7KT.js";import"./external-link-BGHC_naA.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 ys({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{ys as AgentFloorView};
|
|
1
|
+
import{r as i,j as e}from"./index-NRbRrZw-.js";/* empty css */import{H as Me}from"./HarnessMark-CEzmPFHC.js";import{a as ue,S as fe}from"./SpriteAvatar-vpHO-rXs.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-pbozyqVv.js";import{l as X,i as Ge}from"./agent-lanes-model-BKOs_32K.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-BAmj273z.js";import"./agent-identity-CIMT7oV6.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-DCY-m0JK.js";import"./index-CD2foMB8.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-DEHEgJ9m.js";import"./mentions-KNASbAjG.js";import"./Provider-Cd-QZltN.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./AgentDetailCard-2DZQahiN.js";import"./AgentLiveActions-BmXDRxER.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./message-markup-BP2nH9kQ.js";import"./ObservedTopologyPanel-CfHYu-4Z.js";import"./ObserveTextFlow-CKYltTPJ.js";import"./use-reduced-motion-0fAsybdo.js";import"./proxy-DtC2iXnT.js";import"./SessionObserveEvidence-C54Xvbps.js";import"./message-circle-2v9Udia0.js";import"./wrench-DwFKomxg.js";import"./external-link-BheHazeW.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 ys({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{ys as AgentFloorView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as a}from"./index-Bli6bTLU.js";/* empty css */import{c as q,d as K,s as V,b as G}from"./colors-BtO5_zlx.js";import{m as J,c as X}from"./conversation-model-CigSPlKA.js";import{a as D}from"./api-DEHEgJ9m.js";import{u as Y}from"./sse-CSozY6mp.js";import{b as Z,t as ee}from"./time-Dhsh_2EG.js";import{f as h}from"./text-BR9Bap0E.js";import{u as ae}from"./Provider-Ve8yXaWR.js";import{o as te}from"./openContent-C6XO6kr5.js";import{B as E}from"./BackToPicker-CqYhOaLB.js";import{A as se}from"./AgentLiveActions-Bn3zeZBN.js";import{O as le}from"./ObservedTopologyPanel-D85P6RAk.js";import{a as re}from"./NewChatComposer-Bgqes0UQ.js";import"./createLucideIcon-DLlxGjKt.js";import"./index-BWHgHrtv.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./keyboard-nav-7iEtvu9P.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./terminal-takeover-CtA3wcXh.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";function k({values:t}){return a.jsx("span",{className:"s-agent-token-list",children:t.map(s=>a.jsx("span",{className:"s-agent-token",children:s},s))})}function r({value:t}){return a.jsx("span",{className:"s-agent-code-value",children:t})}function w({label:t,value:s}){return s?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:t}),a.jsx("span",{className:"s-agent-profile-chip-value",children:s})]}):null}function $(t){return(t??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function oe(t){return t.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(s=>s.slice(0,1).toUpperCase()+s.slice(1)).join(" ")}function ie(t,s,i,c){let l=t.trim().replace(/^@+/,"");const f=[s,i,c,c?h(c):null].filter(d=>!!d?.trim());for(const d of f){const p=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${p}[-_.:\\s·]+`,"iu"),"")}return l}function ne(t,s,i,c){const l=s?.participants?.find(u=>u.agentId===t.id||u.actorId===t.id),f=$(t.harness),d=$(i),p=[l?.scopedAlias,s?.alias,t.handle,l?.displayName,s?.agentName,t.name];for(const u of p){if(!u?.trim())continue;const j=ie(u,i,c,t.harness),v=oe(j),n=$(v);if(!(!n||n===d||n===f))return v}return null}function ce(t){const s=t?.trim();return s?s.toLowerCase()==="a2a"?"A2A":h(s)??s:null}function ue({name:t,url:s}){return s?a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:t}):a.jsx(a.Fragment,{children:t})}function x({title:t,subtitle:s,items:i,variant:c}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${c?` s-agent-profile-card-${c}`:""}`,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:t}),s&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:s})]})}),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 aa({conversationId:t,navigate:s}){const{agents:i,route:c}=ae(),[l,f]=m.useState(null),[d,p]=m.useState(null),[u,j]=m.useState(null),v=m.useCallback(async()=>{j(null);try{const o=await D(`/api/session/${encodeURIComponent(t)}`).catch(()=>null);f(o)}catch(o){j(o instanceof Error?o.message:String(o)),f(null)}},[t]);m.useEffect(()=>{v()},[v]),Y(()=>{v()});const n=l?.agentId??null;m.useEffect(()=>{if(!n||i.some(P=>P.id===n)){p(null);return}let o=!1;return D(`/api/agents/${encodeURIComponent(n)}`).then(P=>{o||p(P)}).catch(()=>{o||p(null)}),()=>{o=!0}},[i,n]);const e=m.useMemo(()=>n?i.find(o=>o.id===n)??(d?.id===n?d:null):null,[d,i,n]);if(!e)return a.jsxs("div",{children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),u&&a.jsx("p",{className:"s-error",children:u}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const H=J(e),A=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,I=e.selector??e.defaultSelector??A,S=q(e.state),L=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,R=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,C=e.skills??[],b=ce(e.protocol),N=!!(e.providerName||b||C.length>0),T=re(e),g=T.title,y=ne(e,l,g,T.slug),F=y?`${g} · ${y}`:g,B=l?.participants?.find(o=>o.agentId===e.id||o.actorId===e.id),M=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,U=[h(e.harness??"")??e.harness,M].filter(o=>!!o).join(" · "),W=[{label:"Project",value:g},{label:"Alias",value:y??"Default project participant"},...I?[{label:"Primary selector",value:a.jsx(r,{value:I})}]:[],...B?.scopedAlias?[{label:"Scoped alias",value:a.jsx(r,{value:B.scopedAlias})}]:[],...A?[{label:"Handle",value:a.jsx(r,{value:A})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(r,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(r,{value:e.definitionId})}],z=[{label:"Routable agent ID",value:a.jsx(r,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(ue,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...C.length>0?[{label:"Skills",value:a.jsx(k,{values:C})}]:[],...N?[]:[{label:"Class",value:h(e.agentClass)??"—"}],...!N&&e.role?[{label:"Role",value:h(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(r,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(r,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(r,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],O=[...e.projectRoot?[{label:"Project path",value:a.jsx(r,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(r,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...L?[{label:"Authority node",value:a.jsx(r,{value:L})}]:[],...R?[{label:"Home node",value:a.jsx(r,{value:R})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(r,{value:e.conversationId})}]:[]],Q=[...!N&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!N&&e.transport?[{label:"Transport",value:h(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:h(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(r,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(r,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(k,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(k,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(k,{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}]:[]],_=[{label:"Conversation ID",value:a.jsx(r,{value:t})},...l?.alias?[{label:"Conversation alias",value:a.jsx(r,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(r,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(r,{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:Z(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>s({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),u&&a.jsx("p",{className:"s-error",children:u}),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:K(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:I??H??X(e.id)??e.id}),S&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${G(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:V(e.state)}}),S]}),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:F}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(w,{label:"Project",value:g}),a.jsx(w,{label:"Alias",value:y??"Default"}),a.jsx(w,{label:"Runtime",value:U||null}),a.jsx(w,{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 ${ee(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(se,{agent:e,navigate:s,returnTo:c}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>te(s,{view:"conversation",conversationId:t},{returnTo:c}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(x,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:W,variant:"primary"}),a.jsx(x,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:_}),a.jsx(x,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:Q}),a.jsx(x,{title:"Location",subtitle:"Where this alias resolves right now.",items:O}),a.jsx(x,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:z,variant:"secondary"})]}),a.jsx(le,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{aa as AgentInfoScreen};
|
|
1
|
+
import{r as m,j as a}from"./index-NRbRrZw-.js";/* empty css */import{c as q,d as K,s as V,b as G}from"./colors-BtO5_zlx.js";import{m as J,c as X}from"./conversation-model-CIzM7aXT.js";import{a as D}from"./api-DEHEgJ9m.js";import{u as Y}from"./sse-QSbhyq9A.js";import{b as Z,t as ee}from"./time-Dhsh_2EG.js";import{f as h}from"./text-B2UZi3l9.js";import{u as ae}from"./Provider-Cd-QZltN.js";import{o as te}from"./openContent-C6XO6kr5.js";import{B as E}from"./BackToPicker-CXsbxbHM.js";import{A as se}from"./AgentLiveActions-BmXDRxER.js";import{O as le}from"./ObservedTopologyPanel-CfHYu-4Z.js";import{a as re}from"./NewChatComposer-BPsg8shF.js";import"./createLucideIcon-Da0lq809.js";import"./index-BWHgHrtv.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./keyboard-nav-feLCB3Zm.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./terminal-takeover-BArLfNtd.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";function k({values:t}){return a.jsx("span",{className:"s-agent-token-list",children:t.map(s=>a.jsx("span",{className:"s-agent-token",children:s},s))})}function r({value:t}){return a.jsx("span",{className:"s-agent-code-value",children:t})}function w({label:t,value:s}){return s?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:t}),a.jsx("span",{className:"s-agent-profile-chip-value",children:s})]}):null}function $(t){return(t??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function oe(t){return t.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(s=>s.slice(0,1).toUpperCase()+s.slice(1)).join(" ")}function ie(t,s,i,c){let l=t.trim().replace(/^@+/,"");const f=[s,i,c,c?h(c):null].filter(d=>!!d?.trim());for(const d of f){const p=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${p}[-_.:\\s·]+`,"iu"),"")}return l}function ne(t,s,i,c){const l=s?.participants?.find(u=>u.agentId===t.id||u.actorId===t.id),f=$(t.harness),d=$(i),p=[l?.scopedAlias,s?.alias,t.handle,l?.displayName,s?.agentName,t.name];for(const u of p){if(!u?.trim())continue;const j=ie(u,i,c,t.harness),v=oe(j),n=$(v);if(!(!n||n===d||n===f))return v}return null}function ce(t){const s=t?.trim();return s?s.toLowerCase()==="a2a"?"A2A":h(s)??s:null}function ue({name:t,url:s}){return s?a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:t}):a.jsx(a.Fragment,{children:t})}function x({title:t,subtitle:s,items:i,variant:c}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${c?` s-agent-profile-card-${c}`:""}`,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:t}),s&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:s})]})}),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 aa({conversationId:t,navigate:s}){const{agents:i,route:c}=ae(),[l,f]=m.useState(null),[d,p]=m.useState(null),[u,j]=m.useState(null),v=m.useCallback(async()=>{j(null);try{const o=await D(`/api/session/${encodeURIComponent(t)}`).catch(()=>null);f(o)}catch(o){j(o instanceof Error?o.message:String(o)),f(null)}},[t]);m.useEffect(()=>{v()},[v]),Y(()=>{v()});const n=l?.agentId??null;m.useEffect(()=>{if(!n||i.some(P=>P.id===n)){p(null);return}let o=!1;return D(`/api/agents/${encodeURIComponent(n)}`).then(P=>{o||p(P)}).catch(()=>{o||p(null)}),()=>{o=!0}},[i,n]);const e=m.useMemo(()=>n?i.find(o=>o.id===n)??(d?.id===n?d:null):null,[d,i,n]);if(!e)return a.jsxs("div",{children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),u&&a.jsx("p",{className:"s-error",children:u}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const H=J(e),A=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,I=e.selector??e.defaultSelector??A,S=q(e.state),L=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,R=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,C=e.skills??[],b=ce(e.protocol),N=!!(e.providerName||b||C.length>0),T=re(e),g=T.title,y=ne(e,l,g,T.slug),F=y?`${g} · ${y}`:g,B=l?.participants?.find(o=>o.agentId===e.id||o.actorId===e.id),M=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,U=[h(e.harness??"")??e.harness,M].filter(o=>!!o).join(" · "),W=[{label:"Project",value:g},{label:"Alias",value:y??"Default project participant"},...I?[{label:"Primary selector",value:a.jsx(r,{value:I})}]:[],...B?.scopedAlias?[{label:"Scoped alias",value:a.jsx(r,{value:B.scopedAlias})}]:[],...A?[{label:"Handle",value:a.jsx(r,{value:A})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(r,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(r,{value:e.definitionId})}],z=[{label:"Routable agent ID",value:a.jsx(r,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(ue,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...C.length>0?[{label:"Skills",value:a.jsx(k,{values:C})}]:[],...N?[]:[{label:"Class",value:h(e.agentClass)??"—"}],...!N&&e.role?[{label:"Role",value:h(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(r,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(r,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(r,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],O=[...e.projectRoot?[{label:"Project path",value:a.jsx(r,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(r,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...L?[{label:"Authority node",value:a.jsx(r,{value:L})}]:[],...R?[{label:"Home node",value:a.jsx(r,{value:R})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(r,{value:e.conversationId})}]:[]],Q=[...!N&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!N&&e.transport?[{label:"Transport",value:h(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:h(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(r,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(r,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(k,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(k,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(k,{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}]:[]],_=[{label:"Conversation ID",value:a.jsx(r,{value:t})},...l?.alias?[{label:"Conversation alias",value:a.jsx(r,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(r,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(r,{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:Z(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>s({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),u&&a.jsx("p",{className:"s-error",children:u}),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:K(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:I??H??X(e.id)??e.id}),S&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${G(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:V(e.state)}}),S]}),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:F}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(w,{label:"Project",value:g}),a.jsx(w,{label:"Alias",value:y??"Default"}),a.jsx(w,{label:"Runtime",value:U||null}),a.jsx(w,{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 ${ee(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(se,{agent:e,navigate:s,returnTo:c}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>te(s,{view:"conversation",conversationId:t},{returnTo:c}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(x,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:W,variant:"primary"}),a.jsx(x,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:_}),a.jsx(x,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:Q}),a.jsx(x,{title:"Location",subtitle:"Where this alias resolves right now.",items:O}),a.jsx(x,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:z,variant:"secondary"})]}),a.jsx(le,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{aa as AgentInfoScreen};
|