@openscout/scout 0.2.79 → 0.2.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/client/assets/ActivityScreen-aewI4Ul1.js +1 -0
- package/dist/client/assets/{AddProjectForm-BoVtelSP.js → AddProjectForm-Czb5uwou.js} +1 -1
- package/dist/client/assets/{AgentAvatar-CufDA4A-.js → AgentAvatar-DMov24_o.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-BjG6ECjl.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-D4MbSMXp.js +1 -0
- package/dist/client/assets/{AgentDetailCard-DxxVkgT1.js → AgentDetailCard-Biq8b2gv.js} +1 -1
- package/dist/client/assets/AgentFloorView-h9KDJdw0.js +1 -0
- package/dist/client/assets/AgentInfoScreen-SjhK_SBh.js +1 -0
- package/dist/client/assets/{AgentLaneCard-DTUvE96I.js → AgentLaneCard-C4DMQR-c.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-BfVygkgL.js → AgentLaneChrome-D1xNNf7A.js} +1 -1
- package/dist/client/assets/AgentLaneDetailSheet-DnAKe4e3.js +4 -0
- package/dist/client/assets/{AgentLaneSummaryResize-CMgzYvAA.js → AgentLaneSummaryResize-C9loK-st.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BNOYF16R.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-KWfLcaNB.js → AgentLanesPreflight-M7iDXdP2.js} +1 -1
- package/dist/client/assets/{AgentLanesView-CxfbV8Kd.js → AgentLanesView-Ct-Gz5WD.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-CZdAInEu.js → AgentLiveActions-0iy8QZ1T.js} +1 -1
- package/dist/client/assets/{AgentSessions-Bkr0lyry.js → AgentSessions-CDfSfNiE.js} +2 -2
- package/dist/client/assets/{AgentsConsole-WtFVqaPJ.js → AgentsConsole-BVxhBqRa.js} +1 -1
- package/dist/client/assets/AgentsScreen-Bww6HgFs.js +1 -0
- package/dist/client/assets/AgentsSubnav-CiIuzxnZ.js +1 -0
- package/dist/client/assets/{AtopView-_OKDlZ1h.js → AtopView-h_aFoNkP.js} +1 -1
- package/dist/client/assets/BackToPicker-BXp5E2ck.js +1 -0
- package/dist/client/assets/{BriefingDetailScreen-i54EtZKW.js → BriefingDetailScreen-C83o2YfN.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-CBrHojlQ.js → BriefingsScreen-BTsvr5fv.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-opTLuZU6.js → BrokerMetadataPanel-jg7odHQp.js} +1 -1
- package/dist/client/assets/BrokerScreen-DplF8d_X.js +5 -0
- package/dist/client/assets/Canvas-BePL08RR.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-Dr2vmKXQ.js → ChatCollapsedStrip-BRljIymi.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-CLOGjwul.js → CodeDiffPane-86odpBSt.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-DTV8hR6A.js → CodeProjectPicker-8svr_S_A.js} +1 -1
- package/dist/client/assets/CodeScreen-CJ2RgB32.js +1 -0
- package/dist/client/assets/{ContextMenu-BlBQhpax.js → ContextMenu-CxkmFQcN.js} +1 -1
- package/dist/client/assets/ConversationComposer-CWohCCmn.js +1 -0
- package/dist/client/assets/ConversationFeedRows-IWh0JSIL.js +1 -0
- package/dist/client/assets/ConversationHeader-BxTzXl8e.js +1 -0
- package/dist/client/assets/ConversationPanels-D9UCwNkS.js +2 -0
- package/dist/client/assets/ConversationScreen-oZSitVtX.js +1 -0
- package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
- package/dist/client/assets/{ConversationStatus-DSgdVofa.js → ConversationStatus-B6pAbo2w.js} +1 -1
- package/dist/client/assets/{DataTable-0DwuXyvW.js → DataTable-CGw5CECG.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-BrreQifA.js → DispatchAftermath-DowTb7uO.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DU_9BHsD.js → DocumentFocusViewer-DRKjNG9s.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DdaswbfI.js → EmbeddableSurfacesLab-CxfJXS2g.js} +1 -1
- package/dist/client/assets/{EmptyState-CoL-QuUO.js → EmptyState-BUvllvA6.js} +1 -1
- package/dist/client/assets/{FileViewerPane-C9Ly01Ef.js → FileViewerPane-BM4AD_bo.js} +1 -1
- package/dist/client/assets/{FleetSearch-DlWTLl-v.js → FleetSearch-CYeWn85V.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-DYJJ3Z2B.js +1 -0
- package/dist/client/assets/FollowScreen-DG0osbUp.js +1 -0
- package/dist/client/assets/HarnessMark-MztYnrGK.js +1 -0
- package/dist/client/assets/HarnessesScreen-BWqirBjK.js +1 -0
- package/dist/client/assets/HerdrSession-6sFln7WX.js +4 -0
- package/dist/client/assets/{HomeHero-Cfsow7qL.js → HomeHero-BPBArHXa.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-DKashKoH.js → KnowledgeSearchInspector-BOIhFWd2.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-BP8tD-Bh.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-BzehBmdi.js → LaneToolHoverCard-CcEiQC6B.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-B4i1Ut4R.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-DYvHfs_3.js → LaneTraceEventFocus-Bl9L0EYb.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DIjlrMPU.js → MeshCanvas-ZjIuMiRo.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-DEq-PkF0.js → MeshCanvasMinimap-C-LQtiX6.js} +1 -1
- package/dist/client/assets/MeshScreen-Bs3soujg.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BMHpH5BU.js → MeshTopologyView-C0LUyT3K.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-zAUUcLOv.js → MessageComposerSuggestions-Dfc3PH2y.js} +1 -1
- package/dist/client/assets/MessagesScreen-TgSL5KMc.js +1 -0
- package/dist/client/assets/MissionContextRail-CjGAEGu8.js +1 -0
- package/dist/client/assets/MissionControlView-D629w2A8.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-C7cPt6eU.js → MissionFocusOverlay-Bubrr8Gc.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-CxlH3dON.js → MissionLeftAgentRow-DokImu4Y.js} +1 -1
- package/dist/client/assets/MissionLogPane-Cs0LuIkn.js +1 -0
- package/dist/client/assets/{NewAgentModal-DprvD4EK.js → NewAgentModal-D5e0YUAo.js} +1 -1
- package/dist/client/assets/NewChatComposer-C5LT7MF7.css +1 -0
- package/dist/client/assets/NewChatComposer-S08F6_La.js +19 -0
- package/dist/client/assets/{NewChatOrigin--pHWUb4V.js → NewChatOrigin-BEz6jyqf.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-CfvrnOiZ.js → ObserveEmbedScreen-CHx2sEAA.js} +2 -2
- package/dist/client/assets/ObserveTextFlow-_ApDwRCO.js +2 -0
- package/dist/client/assets/{ObservedTopologyPanel-Dv6fbHzW.js → ObservedTopologyPanel-ByW7Ar7p.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-DTmnbG-h.js +88 -0
- package/dist/client/assets/OpsAgentsView-DiFuHcJs.js +1 -0
- package/dist/client/assets/OpsScreen-CCR3U_9P.js +1 -0
- package/dist/client/assets/OpsSubnav-CZs_OL2N.js +1 -0
- package/dist/client/assets/{PlanView-DYtt8H37.js → PlanView-C54eAzig.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-BEfYOaxc.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-B3IvVbqS.js → ProjectAgentProfileBar-B1VpwzGD.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-D5E8yvDj.js → ProjectAgentProfileHero-B4f_AoCr.js} +1 -1
- package/dist/client/assets/ProjectsInbox-DoPZ17FC.js +2 -0
- package/dist/client/assets/{ProjectsRail-DEDS-M1c.js → ProjectsRail-CWOkZjsY.js} +1 -1
- package/dist/client/assets/ProjectsScreen-Dse0Q6p6.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-DMnfyPLE.js +1 -0
- package/dist/client/assets/Provider-DKZWuzSR.js +1 -0
- package/dist/client/assets/{RailRow-BTlVAnHS.js → RailRow-DIGd3MMM.js} +1 -1
- package/dist/client/assets/RawSessionsTable-Zkl4YDvz.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B_PMJxY_.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-CtTdlQ2A.js → RepoDiffEmbedScreen-VLg4caej.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-BRvaVYoC.js → RepoDiffPageScreen-BelnvgnP.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-Bo0gREMj.js → RepoDiffViewer-VrUJw33u.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-BPg_JkYW.js +2 -0
- package/dist/client/assets/{ReposScreen-BBkJf8xT.js → ReposScreen-IINK-CFn.js} +2 -2
- package/dist/client/assets/ScoutDeckSurface-MbwGp6Ab.js +1 -0
- package/dist/client/assets/{ScoutSurface-DEQg_7Io.js → ScoutSurface-x_QbcRyk.js} +1 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DAKQKB25.js +2 -0
- package/dist/client/assets/{ScoutbotFxLab-BgsuLDjo.js → ScoutbotFxLab-7t9JVvZg.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-Bzyl0BCS.js → ScoutbotRealtimeVoiceCall-Br4bYVAx.js} +1 -1
- package/dist/client/assets/{SecondaryNav-Bks0CO2h.js → SecondaryNav-Dj30epYF.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-b0Zgmfx5.js → SessionEmbedScreen-s2mJ5Fg9.js} +1 -1
- package/dist/client/assets/{SessionObserve-Dlx5vDaV.js → SessionObserve-DaUrJCMq.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-ChBD1d4c.js → SessionObserveEvidence-ClUW8jpV.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DLZNFZFK.js +1 -0
- package/dist/client/assets/SessionsScreen-D-hN1n4k.js +1 -0
- package/dist/client/assets/{SettingsDrawer-C587L1i1.js → SettingsDrawer-BFsnww-k.js} +3 -3
- package/dist/client/assets/SettingsScreen-Bc3Xtv5V.js +1 -0
- package/dist/client/assets/{ShikiPane-I_OTW5NO.js → ShikiPane-Dkwyx--r.js} +1 -1
- package/dist/client/assets/{SlidePanel-FCqT1zO3.js → SlidePanel-CuTeirnk.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-CQs-jC-v.js → SpriteAvatar-DQ3PTb8L.js} +1 -1
- package/dist/client/assets/{StatusPill-CbABggnQ.js → StatusPill-BJ1ierIR.js} +1 -1
- package/dist/client/assets/{TailView-C_MXVSum.js → TailView-CufWcrvf.js} +2 -2
- package/dist/client/assets/Terminal-D_OmdFmr.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-D21ytNXW.js +1 -0
- package/dist/client/assets/TerminalRelay-rvUzI9Ek.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-C-9EtYqt.js → TextDocumentSurface-Bc-kHPgG.js} +1 -1
- package/dist/client/assets/{TmuxPeek-Dz1gJ2pU.js → TmuxPeek-DLyDkq_D.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-MfICy9kk.js → VoicePermissionsPanel-CD903y9K.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Cs7kdllj.js → WorkDetailScreen-D51oI0dH.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-CF-nhtZ4.js → WorkFilesViewer-BDMNbxE4.js} +1 -1
- package/dist/client/assets/{activity-WhBf3FXP.js → activity-BvGruxWG.js} +1 -1
- package/dist/client/assets/{addon-fit-q-x_HytU.js → addon-fit-Cfq4Ayjd.js} +1 -1
- package/dist/client/assets/{addon-webgl-fhhvEA9h.js → addon-webgl-B8sIf9-s.js} +1 -1
- package/dist/client/assets/{agent-essentials-DyJiUGpZ.js → agent-essentials-yb4wIJlX.js} +1 -1
- package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
- package/dist/client/assets/{agent-lane-card-model-BCIwPjEh.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
- package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +2 -0
- package/dist/client/assets/{agent-lane-preview-BtnfNyFR.js → agent-lane-preview-C33Dwpn7.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-Bl6xfviL.js → agent-lanes-model-VYQ5a68i.js} +2 -2
- package/dist/client/assets/{arc.es-DPJ0xRV6.js → arc.es-BBTfhvLE.js} +1 -1
- package/dist/client/assets/{arrow-left-WjQIN9J6.js → arrow-left-BOht-YQu.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CtTDrZJr.js → arrow-up-right-hoR8_oUz.js} +1 -1
- package/dist/client/assets/{bot-B_Uzf4_O.js → bot-BUK7dOPS.js} +1 -1
- package/dist/client/assets/{check-BbgHJX8u.js → check--esHw52j.js} +1 -1
- package/dist/client/assets/{chevron-down-BFai6ZfE.js → chevron-down-NAhBUkFd.js} +1 -1
- package/dist/client/assets/{chevron-right-CyUa1zXx.js → chevron-right-C10o7t_X.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-CvwpNg-G.js → chunk-HRAB3GC3-DF8R9rPv.js} +1 -1
- package/dist/client/assets/{clock-DviOalxA.js → clock-of01sAB6.js} +1 -1
- package/dist/client/assets/{code-xml-05TD3uOC.js → code-xml-CLn3TDWF.js} +1 -1
- package/dist/client/assets/content-B-SUUhXj.js +1 -0
- package/dist/client/assets/content-BRY2vo1_.js +1 -0
- package/dist/client/assets/content-BTm0mVyD.js +1 -0
- package/dist/client/assets/content-BTqvyb5E.js +1 -0
- package/dist/client/assets/content-BjDaXmSD.js +1 -0
- package/dist/client/assets/content-BrR6deGh.js +1 -0
- package/dist/client/assets/content-C5yvBEMy.js +1 -0
- package/dist/client/assets/content-Cgj5AWqT.js +1 -0
- package/dist/client/assets/content-CkhG__-v.js +1 -0
- package/dist/client/assets/content-CudIBsiP.js +1 -0
- package/dist/client/assets/content-DBb7ppd5.js +1 -0
- package/dist/client/assets/content-DEw_kGyK.js +1 -0
- package/dist/client/assets/content-DIy0DCzK.js +1 -0
- package/dist/client/assets/content-THl9hRAo.js +1 -0
- package/dist/client/assets/content-Uqt8AG-s.css +1 -0
- package/dist/client/assets/content-vi9FbmV9.js +1 -0
- package/dist/client/assets/content-wcgPMGVf.js +1 -0
- package/dist/client/assets/{conversation-icons-DohQL6GI.js → conversation-icons-ClBJi21l.js} +1 -1
- package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
- package/dist/client/assets/conversation-motion-features-zU0k3Agz.js +1 -0
- package/dist/client/assets/{copy-CwCAivnc.js → copy-Dty8ZYsM.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DlxlBfLC.js → createLucideIcon-Bt67PWH-.js} +1 -1
- package/dist/client/assets/discover-NDAqNvKt.js +2 -0
- package/dist/client/assets/embed-entry-BVR09F6e.js +2 -0
- package/dist/client/assets/{external-link-CnjcXf32.js → external-link-Dem738OJ.js} +1 -1
- package/dist/client/assets/{eye-So8tNNK6.js → eye-B3lBIwJZ.js} +1 -1
- package/dist/client/assets/{file-text-i3xTDUjJ.js → file-text-iF0hyVyU.js} +1 -1
- package/dist/client/assets/home-live-action-BkqGLVRY.js +1 -0
- package/dist/client/assets/home-moving-signal-C8dTXieA.js +1 -0
- package/dist/client/assets/home-now-card-BgvVcE83.js +1 -0
- package/dist/client/assets/{home-now-card-nano-CkLHUQ4J.js → home-now-card-nano-hZl9klbP.js} +1 -1
- package/dist/client/assets/hooks-DBIezYS2.js +2 -0
- package/dist/client/assets/index-BMwKgdz_.js +1 -0
- package/dist/client/assets/index-Bu-fckyR.css +1 -0
- package/dist/client/assets/index-BxoufAPA.js +1 -0
- package/dist/client/assets/index-Cj7NnSxI.js +1 -0
- package/dist/client/assets/{index-sUomXsrf.js → index-o4FKpU7Z.js} +2 -2
- package/dist/client/assets/{inspector-panel-DhXd-YbT.js → inspector-panel-Dy2cVTCi.js} +2 -2
- package/dist/client/assets/keyboard-nav-Chf51dns.js +1 -0
- package/dist/client/assets/{lane-observe-DrhKkQ3A.js → lane-observe-BA3g9aVd.js} +1 -1
- package/dist/client/assets/{lane-roster-store-NE15Oe6M.js → lane-roster-store-BiIVlYmG.js} +1 -1
- package/dist/client/assets/left-BC7p5QbT.js +1 -0
- package/dist/client/assets/left-BCSGqccQ.js +1 -0
- package/dist/client/assets/left-BSyj8PuJ.js +2 -0
- package/dist/client/assets/left-DDnxNUxd.js +1 -0
- package/dist/client/assets/left-DLoDKxT5.js +2 -0
- package/dist/client/assets/left-O-TBH7JB.js +1 -0
- package/dist/client/assets/left-agents-Dk9Y89lb.js +1 -0
- package/dist/client/assets/left-default-B3JBRQNJ.js +1 -0
- package/dist/client/assets/left-lanes-30Oe_3RM.js +1 -0
- package/dist/client/assets/left-mission-DEl4-7xu.js +1 -0
- package/dist/client/assets/left-plan-B4qdm4Gn.js +2 -0
- package/dist/client/assets/left-rvUOB14X.js +1 -0
- package/dist/client/assets/library-DDKSLFJ_.js +1 -0
- package/dist/client/assets/{loader-circle-lWOOKezu.js → loader-circle-4LDsy4Ke.js} +1 -1
- package/dist/client/assets/{local-agents-C7fDHLVC.js → local-agents-DIi2EacM.js} +1 -1
- package/dist/client/assets/{mentions-CY_wPZc5.js → mentions-CvDaviLJ.js} +1 -1
- package/dist/client/assets/{mesh-ops-Kn8pCtyJ.js → mesh-ops-JZwGuAPn.js} +1 -1
- package/dist/client/assets/{mesh-view-store-D14ihwkF.js → mesh-view-store-Du7VqIT_.js} +1 -1
- package/dist/client/assets/{message-circle-C5UZ6fO7.js → message-circle-BM3XgevU.js} +1 -1
- package/dist/client/assets/{message-markup-C8Nx04sP.js → message-markup-BcY1lShv.js} +1 -1
- package/dist/client/assets/{message-square-BD-4UUdc.js → message-square-ER1_q2pe.js} +1 -1
- package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
- package/dist/client/assets/{mission-control-store-xQHVQdm8.js → mission-control-store-C6w5iVfg.js} +1 -1
- package/dist/client/assets/mission-wall-CocIM1cF.js +1 -0
- package/dist/client/assets/{observe-uJfIlIUV.js → observe-3-jn4SXb.js} +1 -1
- package/dist/client/assets/openAgent-Dbv5wfuL.js +1 -0
- package/dist/client/assets/{page-status-BymFEFai.js → page-status-0LPfBC8S.js} +1 -1
- package/dist/client/assets/{plus-C9lTjsgd.js → plus-C-2gTcPK.js} +1 -1
- package/dist/client/assets/profile-DW80Gn5k.js +1 -0
- package/dist/client/assets/{projects-inbox-DfVmGFFk.js → projects-inbox-DCeD3FfV.js} +1 -1
- package/dist/client/assets/provider-BvAxRQfE.js +1 -0
- package/dist/client/assets/{radio-DedMyP8J.js → radio-v7UAMZGh.js} +1 -1
- package/dist/client/assets/{refresh-cw-D8PFyhUa.js → refresh-cw-B5To7b6B.js} +1 -1
- package/dist/client/assets/resolve-panes-BDi9Qx4R.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-HE-5eZYa.js +1 -0
- package/dist/client/assets/right-BDf_yTv6.js +1 -0
- package/dist/client/assets/{right-C1sIsSHR.js → right-BvoGOUKH.js} +1 -1
- package/dist/client/assets/right-C-bgjYg-.js +1 -0
- package/dist/client/assets/right-C3JdEfYQ.js +1 -0
- package/dist/client/assets/right-CYIs2tEe.js +1 -0
- package/dist/client/assets/right-CyRCv6Up.js +1 -0
- package/dist/client/assets/right-DBYGtoRv.js +1 -0
- package/dist/client/assets/right-o3LHMiKa.js +1 -0
- package/dist/client/assets/right-oPrcx9MX.js +1 -0
- package/dist/client/assets/right-sSvBUK-j.js +1 -0
- package/dist/client/assets/{rocket-CriBwkHM.js → rocket-BQQQv2L5.js} +1 -1
- package/dist/client/assets/router-C65cZYPn.js +1 -0
- package/dist/client/assets/{runtime-picker-DOZpZOlt.js → runtime-picker-eDEvx2Mz.js} +1 -1
- package/dist/client/assets/{scope-views-BF_RvGKU.js → scope-views-BOOmgmwx.js} +1 -1
- package/dist/client/assets/{scout-voice-BZ4KqADJ.js → scout-voice-B7kXlkcl.js} +1 -1
- package/dist/client/assets/{scroll-text-BIYf6g6N.js → scroll-text-BuneRiAD.js} +1 -1
- package/dist/client/assets/{search-DCT_EvPr.js → search-7_n7CxWl.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-Drb7wPG4.js → secondaryNavConfig-CSFDCQAf.js} +1 -1
- package/dist/client/assets/{selection-bridge-CJOTyYQs.js → selection-bridge-SlGsgHw2.js} +1 -1
- package/dist/client/assets/{send-horizontal-DDwOgEs3.js → send-horizontal-DP16OOIW.js} +1 -1
- package/dist/client/assets/{server-CHZCp3cF.js → server-pYOMFjrT.js} +1 -1
- package/dist/client/assets/{session-catalog-XhGxCtP-.js → session-catalog-_QfQ7fhZ.js} +1 -1
- package/dist/client/assets/session-table-CYN8e4s3.js +1 -0
- package/dist/client/assets/{sliders-horizontal-B9Nj-Y4J.js → sliders-horizontal-D2Z8gz6J.js} +1 -1
- package/dist/client/assets/{sparkles-up7pVlX-.js → sparkles-Bth2iK7t.js} +1 -1
- package/dist/client/assets/{sse-CVoGDiKW.js → sse-CL6gctHY.js} +1 -1
- package/dist/client/assets/synthetic-agent-routing-aduMYO7P.js +1 -0
- package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
- package/dist/client/assets/{tail-display-BdyoLvzY.js → tail-display-BRcJltQa.js} +2 -2
- package/dist/client/assets/{tail-events-CTipUIli.js → tail-events-NLIWLq27.js} +1 -1
- package/dist/client/assets/{terminal-DXQISjZn.js → terminal-By1Lw2i2.js} +1 -1
- package/dist/client/assets/{terminal-relay-B5Sma7fK.js → terminal-relay-CjkI5aUy.js} +1 -1
- package/dist/client/assets/{terminal-screen-19jAI0Cw.css → terminal-screen-BqVnCwl0.css} +1 -1
- package/dist/client/assets/terminal-sessions-AmSgHklm.js +1 -0
- package/dist/client/assets/{terminal-takeover-X97KCSJk.js → terminal-takeover-7AvNpnkC.js} +1 -1
- package/dist/client/assets/{use-conversation-list-B1T6J_qE.js → use-conversation-list-BCzY032j.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DLofGhhK.js → use-fleet-active-asks-CJ6-oj5k.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-ByGZk8rU.js → use-mesh-ops-items-D5L-CKe_.js} +1 -1
- package/dist/client/assets/use-reduced-motion-CqXpVXv-.js +1 -0
- package/dist/client/assets/use-scout-dev-flags-BohC8seq.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-D5e8Qg1z.js → useAgentHoverCard-RsLUYyeh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DOr5yHbT.js +1 -0
- package/dist/client/assets/usePersistentState-D3M4m2Ou.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DIVunfX0.js → usePierreRuntime-B4hbNWTz.js} +1 -1
- package/dist/client/assets/{wrench-pEVd8JnN.js → wrench-M4G7WtYB.js} +1 -1
- package/dist/client/assets/{x-0XjXwGqq.js → x-ynOfVadO.js} +1 -1
- package/dist/client/assets/{xterm-CRLlV1Xp.js → xterm-DZHyijPp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +1444 -381
- package/dist/node/main.mjs +82 -20
- package/dist/openscout-terminal-relay.mjs +16 -4
- package/dist/pairing-runtime-controller.mjs +3030 -2948
- package/dist/runtime/broker-daemon.mjs +358 -136
- package/dist/scout-control-plane-web.mjs +5646 -5184
- package/dist/scout-web-server.mjs +5646 -5184
- package/package.json +4 -4
- package/dist/client/assets/ActivityScreen-DnqqRSlS.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-CJqoMA0J.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-FpEkb-tu.js +0 -1
- package/dist/client/assets/AgentFloorView-CycUn0Lv.js +0 -1
- package/dist/client/assets/AgentInfoScreen-CAQAxpAK.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-CWs9wKWk.js +0 -5
- package/dist/client/assets/AgentLanesEmbedScreen-BUCW4nUj.js +0 -1
- package/dist/client/assets/AgentsScreen-BMXvuiA2.js +0 -1
- package/dist/client/assets/AgentsSubnav-BTNjPYoA.js +0 -1
- package/dist/client/assets/BackToPicker-CkUmHuuo.js +0 -1
- package/dist/client/assets/BrokerScreen-CObCQvoy.js +0 -5
- package/dist/client/assets/CodeScreen-BXqi72NK.js +0 -1
- package/dist/client/assets/ConversationComposer-BBNPa5S9.js +0 -1
- package/dist/client/assets/ConversationFeedRows-BuejHMCY.js +0 -1
- package/dist/client/assets/ConversationHeader-DXMT-YXv.js +0 -1
- package/dist/client/assets/ConversationPanels-DHCtilQF.js +0 -2
- package/dist/client/assets/ConversationScreen-DSxIt9pq.css +0 -1
- package/dist/client/assets/ConversationScreen-Dz2d_Z_F.js +0 -1
- package/dist/client/assets/FlightObserveScreen-C-9S0nA5.js +0 -1
- package/dist/client/assets/FollowScreen--Q04xSSE.js +0 -1
- package/dist/client/assets/HarnessMark-Dm_qm1Ku.js +0 -1
- package/dist/client/assets/HarnessesScreen-Y54viPX8.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DsdDz8wY.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-CBf_aNZx.js +0 -1
- package/dist/client/assets/MeshScreen-TgDtz-1l.js +0 -1
- package/dist/client/assets/MessagesScreen-BTQL0UcE.js +0 -1
- package/dist/client/assets/MissionControlView-D59SPnAm.js +0 -1
- package/dist/client/assets/MissionLogPane-Ye3YlF9s.js +0 -1
- package/dist/client/assets/NewChatComposer-B5FnPyzS.js +0 -19
- package/dist/client/assets/NewChatComposer-W-t-L4oV.css +0 -1
- package/dist/client/assets/ObserveTextFlow-CBitljxi.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-BIp0WitK.js +0 -87
- package/dist/client/assets/OpsAgentsView-CoBfAigH.js +0 -1
- package/dist/client/assets/OpsScreen-Bbo0W64T.js +0 -1
- package/dist/client/assets/OpsSubnav-CoN8utF8.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-FiiIcB5R.js +0 -1
- package/dist/client/assets/ProjectsInbox-BWiXjGi7.js +0 -2
- package/dist/client/assets/ProjectsScreen-Cxk4CuYn.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BF66ugT5.js +0 -1
- package/dist/client/assets/Provider-tFc3jqZ4.js +0 -1
- package/dist/client/assets/RawSessionsTable-BsGVgZB3.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-B0Bem5Rc.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-C8UPk4oo.js +0 -2
- package/dist/client/assets/ScoutDeckSurface-Bi9ov9Bm.js +0 -1
- package/dist/client/assets/ScoutbotBroadcastChip-DJXuyn73.js +0 -2
- package/dist/client/assets/SessionRefScreen-D7TfPYPN.js +0 -1
- package/dist/client/assets/SessionsScreen-BlknOWAd.js +0 -1
- package/dist/client/assets/SettingsScreen-BIlYxv_a.js +0 -1
- package/dist/client/assets/Terminal-DwZyo8kA.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-Czp3tQyd.js +0 -1
- package/dist/client/assets/agent-chat-Bfjd9y6c.js +0 -1
- package/dist/client/assets/agent-identity-xQHedtLl.js +0 -1
- package/dist/client/assets/agent-lane-detail-Cw4QVAgH.js +0 -1
- package/dist/client/assets/arrow-down-DsD-dYj-.js +0 -1
- package/dist/client/assets/chunk-T65CQEWV-DI4NKdNq.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-BW85tiCr.js +0 -47
- package/dist/client/assets/content-2u_eV3fX.js +0 -1
- package/dist/client/assets/content-5irOghrY.js +0 -1
- package/dist/client/assets/content-8Z_0CwtD.js +0 -1
- package/dist/client/assets/content-B38YRDBu.js +0 -1
- package/dist/client/assets/content-BE3uK0LB.js +0 -1
- package/dist/client/assets/content-BtIxSqVY.js +0 -1
- package/dist/client/assets/content-CFsPAihU.js +0 -1
- package/dist/client/assets/content-CHU0wwA3.css +0 -1
- package/dist/client/assets/content-CKj5g5tu.js +0 -1
- package/dist/client/assets/content-CLDWXf9Z.js +0 -1
- package/dist/client/assets/content-CRr73E0r.js +0 -1
- package/dist/client/assets/content-CVR75_Uj.js +0 -1
- package/dist/client/assets/content-Czdp7_JQ.js +0 -1
- package/dist/client/assets/content-D0_EJ6nP.js +0 -1
- package/dist/client/assets/content-DNmxpNhD.js +0 -1
- package/dist/client/assets/content-XpbI9uxd.js +0 -1
- package/dist/client/assets/content-cyxWdgKQ.js +0 -1
- package/dist/client/assets/conversation-model-C4yb6_FA.js +0 -1
- package/dist/client/assets/conversation-motion-features-CifSdJtm.js +0 -1
- package/dist/client/assets/discover-DoiAJo4Z.js +0 -2
- package/dist/client/assets/embed-entry-D1Or9S4d.js +0 -2
- package/dist/client/assets/gestures-CgvAMd6F.js +0 -1
- package/dist/client/assets/home-live-action-B22u89j7.js +0 -1
- package/dist/client/assets/home-moving-signal-BdkERL6B.js +0 -1
- package/dist/client/assets/home-now-card-lLkv6nQs.js +0 -1
- package/dist/client/assets/hooks-BPLDD9yu.js +0 -2
- package/dist/client/assets/index-DGoLx89y.js +0 -1
- package/dist/client/assets/index-DITWsjFb.css +0 -1
- package/dist/client/assets/index-m6dFtY5f.js +0 -1
- package/dist/client/assets/index-pY8-Mz7y.js +0 -1
- package/dist/client/assets/keyboard-nav-BhZZ5HEq.js +0 -1
- package/dist/client/assets/left-B6eawimv.js +0 -1
- package/dist/client/assets/left-BL2uBHe0.js +0 -2
- package/dist/client/assets/left-BNJguPDG.js +0 -1
- package/dist/client/assets/left-BvCtvN0f.js +0 -1
- package/dist/client/assets/left-CfBb6bxM.js +0 -1
- package/dist/client/assets/left-DTrlBF0h.js +0 -2
- package/dist/client/assets/left-agents-DsOHgDCY.js +0 -1
- package/dist/client/assets/left-d4hlBBxY.js +0 -1
- package/dist/client/assets/left-default-BRCwoCJr.js +0 -1
- package/dist/client/assets/left-lanes-DNtoRzoV.js +0 -1
- package/dist/client/assets/left-mission-DsTu2X5Y.js +0 -1
- package/dist/client/assets/left-plan-CtySjsXC.js +0 -2
- package/dist/client/assets/library-CLpgWNJO.js +0 -1
- package/dist/client/assets/mission-control-D3ikEPND.css +0 -1
- package/dist/client/assets/openAgent-Bjt57GdM.js +0 -1
- package/dist/client/assets/paperclip-DL9BXPp2.js +0 -1
- package/dist/client/assets/profile-BqY5tesX.js +0 -1
- package/dist/client/assets/resolve-panes-1xeZMuaw.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-PLr32WHN.js +0 -1
- package/dist/client/assets/right-1x7HzabC.js +0 -1
- package/dist/client/assets/right-CFzPUzlF.js +0 -1
- package/dist/client/assets/right-CRKyeJDk.js +0 -1
- package/dist/client/assets/right-CagzkLWg.js +0 -1
- package/dist/client/assets/right-CsV149pN.js +0 -1
- package/dist/client/assets/right-DITNyG2s.js +0 -1
- package/dist/client/assets/right-E3nNcLE3.js +0 -1
- package/dist/client/assets/right-eUQvSjd7.js +0 -1
- package/dist/client/assets/right-ozp4nM44.js +0 -1
- package/dist/client/assets/router-Dja9_ygK.js +0 -1
- package/dist/client/assets/session-table-sAVe44a4.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-CD26LFc0.css +0 -1
- package/dist/client/assets/terminal-sessions-D5CIR2OL.js +0 -1
- package/dist/client/assets/use-reduced-motion-Cvk-HRKg.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-BHvg3G2c.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-ZfBNi3d4.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p,j as t}from"./index-sUomXsrf.js";/* empty css */import{i as J,n as Z,s as ee}from"./colors-BtO5_zlx.js";import{a as A}from"./api-h5zurxmi.js";import{u as te}from"./sse-CVoGDiKW.js";import{t as re}from"./time-Dhsh_2EG.js";import{D as ne}from"./DataTable-0DwuXyvW.js";import{u as ae}from"./useAgentHoverCard-D5e8Qg1z.js";import{S as se}from"./search-DCT_EvPr.js";import{S as oe}from"./sliders-horizontal-B9Nj-Y4J.js";import"./index-BWHgHrtv.js";/* empty css */import"./index-m6dFtY5f.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./Provider-tFc3jqZ4.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./openContent-C6XO6kr5.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";const ie=["openai","codex","codex_app_server"],ce=["anthropic","claude","claude-code","claude_stream_json"],W={"openai:gpt-5.5":{provider:"openai",model:"gpt-5.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:30,webSearchPer1K:10},"openai:gpt-5.5-pro":{provider:"openai",model:"gpt-5.5-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.4":{provider:"openai",model:"gpt-5.4",inputPerM:2.5,cachedInputPerM:.25,cacheWritePerM:null,outputPerM:15,webSearchPer1K:10},"openai:gpt-5.4-mini":{provider:"openai",model:"gpt-5.4-mini",inputPerM:.75,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:4.5,webSearchPer1K:10},"openai:gpt-5.4-nano":{provider:"openai",model:"gpt-5.4-nano",inputPerM:.2,cachedInputPerM:.02,cacheWritePerM:null,outputPerM:1.25,webSearchPer1K:10},"openai:gpt-5.4-pro":{provider:"openai",model:"gpt-5.4-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.3-codex":{provider:"openai",model:"gpt-5.3-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.3-chat-latest":{provider:"openai",model:"gpt-5.3-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2":{provider:"openai",model:"gpt-5.2",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-codex":{provider:"openai",model:"gpt-5.2-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-chat-latest":{provider:"openai",model:"gpt-5.2-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-pro":{provider:"openai",model:"gpt-5.2-pro",inputPerM:21,cachedInputPerM:null,cacheWritePerM:null,outputPerM:168,webSearchPer1K:10},"openai:gpt-5.1":{provider:"openai",model:"gpt-5.1",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex":{provider:"openai",model:"gpt-5.1-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex-max":{provider:"openai",model:"gpt-5.1-codex-max",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-chat-latest":{provider:"openai",model:"gpt-5.1-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5":{provider:"openai",model:"gpt-5",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-codex":{provider:"openai",model:"gpt-5-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-chat-latest":{provider:"openai",model:"gpt-5-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-mini":{provider:"openai",model:"gpt-5-mini",inputPerM:.25,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:2,webSearchPer1K:10},"openai:gpt-5-nano":{provider:"openai",model:"gpt-5-nano",inputPerM:.05,cachedInputPerM:.005,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-5-pro":{provider:"openai",model:"gpt-5-pro",inputPerM:15,cachedInputPerM:null,cacheWritePerM:null,outputPerM:120,webSearchPer1K:10},"openai:gpt-4.1":{provider:"openai",model:"gpt-4.1",inputPerM:2,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:8,webSearchPer1K:10},"openai:gpt-4.1-mini":{provider:"openai",model:"gpt-4.1-mini",inputPerM:.4,cachedInputPerM:.1,cacheWritePerM:null,outputPerM:1.6,webSearchPer1K:10},"openai:gpt-4.1-nano":{provider:"openai",model:"gpt-4.1-nano",inputPerM:.1,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-4o":{provider:"openai",model:"gpt-4o",inputPerM:2.5,cachedInputPerM:1.25,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-4o-mini":{provider:"openai",model:"gpt-4o-mini",inputPerM:.15,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:.6,webSearchPer1K:10},"anthropic:claude-opus-4.6":{provider:"anthropic",model:"claude-opus-4.6",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.5":{provider:"anthropic",model:"claude-opus-4.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.1":{provider:"anthropic",model:"claude-opus-4.1",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-opus-4":{provider:"anthropic",model:"claude-opus-4",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-sonnet-4.6":{provider:"anthropic",model:"claude-sonnet-4.6",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4.5":{provider:"anthropic",model:"claude-sonnet-4.5",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4":{provider:"anthropic",model:"claude-sonnet-4",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-3-7-sonnet":{provider:"anthropic",model:"claude-3-7-sonnet",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-haiku-4.5":{provider:"anthropic",model:"claude-haiku-4.5",inputPerM:1,cachedInputPerM:.1,cacheWritePerM:1.25,outputPerM:5,webSearchPer1K:10}},ue={"claude-sonnet-4-5":"anthropic:claude-sonnet-4.5","claude-sonnet-4-6":"anthropic:claude-sonnet-4.6","claude-opus-4-5":"anthropic:claude-opus-4.5","claude-opus-4-6":"anthropic:claude-opus-4.6","claude-haiku-4-5":"anthropic:claude-haiku-4.5"};function le(e){const r=e.provider?.trim().toLowerCase()??"",s=e.adapterType?.trim().toLowerCase()??"",a=V(e.model)??"",i=[r,s].filter(Boolean);return i.some(o=>ie.some(c=>o.includes(c)))?"openai":i.some(o=>ce.some(c=>o.includes(c)))?"anthropic":a.startsWith("gpt-")||a.startsWith("o")||a.includes("codex")?"openai":a.startsWith("claude-")?"anthropic":"unknown"}function V(e){return e?e.trim().toLowerCase().replace(/^(openai|anthropic)\//,"").replace(/_/g,"-").replace(/-\d{8}$/,""):null}function pe(e){const r=x(e?.inputTokens),s=x(e?.cacheReadInputTokens),a=x(e?.cacheCreationInputTokens),i=x(e?.outputTokens),o=x(e?.reasoningOutputTokens),c=[r,i].reduce((g,b)=>g+(b??0),0),h=x(e?.totalTokens)??(c||null);return{input:r,uncachedInput:r==null?null:Math.max(0,r-(s??0)-(a??0)),cachedInput:s,cacheWrite:a,output:i,reasoningOutput:o,total:h,webSearchRequests:x(e?.webSearchRequests),webFetchRequests:x(e?.webFetchRequests)}}function de(e){const r=le(e),s=V(e.model),a=pe(e.usage),i=he(r,s),o=me(e);if(!i.rateCard)return{provider:r,model:s,rateCard:null,rateCardSource:"unknown",capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:[],totalUsd:null,billedTotalUsd:null,billingMode:o,subscriptionWindows:e.subscriptionWindows??[]};const c=i.rateCard,h=a.uncachedInput??a.input??0,g=a.cachedInput??0,b=a.cacheWrite??0,m=a.output??0,v=a.webSearchRequests??0,f=[j("input","Input",h,c.inputPerM,o),j("cached_input","Cached input",g,c.cachedInputPerM??c.inputPerM,o),j("cache_write","Cache write",b,c.cacheWritePerM??c.inputPerM,o),j("output","Output",m,c.outputPerM,o),{key:"web_search",label:"Web search",quantity:v,unit:"requests",rate:c.webSearchPer1K??0,billedRate:o==="subscription"?0:c.webSearchPer1K??0,costUsd:v/1e3*(c.webSearchPer1K??0),billedCostUsd:o==="subscription"?0:v/1e3*(c.webSearchPer1K??0)}].filter(P=>P.quantity>0);return{provider:r,model:s,rateCard:c,rateCardSource:i.source,capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:f,totalUsd:f.reduce((P,d)=>P+d.costUsd,0),billedTotalUsd:f.reduce((P,d)=>P+d.billedCostUsd,0),billingMode:o,subscriptionWindows:e.subscriptionWindows??[]}}function he(e,r){if(e==="unknown")return{rateCard:null,source:"unknown"};const s=r?`${e}:${r}`:null;if(s&&W[s])return{rateCard:W[s],source:"exact"};const a=r?ue[r]:null;if(a&&W[a])return{rateCard:W[a],source:"alias"};if(e==="anthropic"){if(r?.includes("opus"))return{rateCard:W["anthropic:claude-opus-4.5"],source:"provider-default"};if(r?.includes("haiku"))return{rateCard:W["anthropic:claude-haiku-4.5"],source:"provider-default"};if(r?.includes("sonnet")||!r)return{rateCard:W["anthropic:claude-sonnet-4.5"],source:"provider-default"}}return{rateCard:null,source:"unknown"}}function j(e,r,s,a,i){const o=i==="subscription"?0:a;return{key:e,label:r,quantity:s,unit:"tokens",rate:a,billedRate:o,costUsd:s/1e6*a,billedCostUsd:s/1e6*o}}function x(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function me(e){if(e.billingMode)return e.billingMode;const r=e.adapterType?.trim().toLowerCase();if(r==="claude-code"||r==="claude_stream_json")return"subscription";const s=e.usage?.planType?.trim().toLowerCase();return!s||s==="api"||s.includes("api")?"api":"subscription"}const ge=1500,T=1440*6e4,Pe=90*6e4,E={needs_attention:0,in_turn:1,in_flight:2,callable:3,blocked:4},Me=[{key:"agent",label:"Agent",kind:"custom",sortable:!0,sortValue:e=>e.agent.name.toLowerCase(),defaultWidth:220,minWidth:160,render:e=>t.jsxs("div",{className:"s-ops-agents-agent-cell",children:[t.jsx("span",{className:"s-ops-agents-dot",style:{background:ee(e.state)},"aria-hidden":!0}),t.jsx("span",{className:"s-ops-agents-agent-name",title:e.agent.name,children:e.agent.handle??e.agent.name})]})},{key:"task",label:"Active task",kind:"custom",sortable:!0,sortValue:e=>(e.activeTask??"").toLowerCase()||null,defaultWidth:240,minWidth:140,render:e=>e.activeTask?t.jsx("span",{className:"s-ops-agents-task",title:e.activeTask,children:e.activeTask}):t.jsx("span",{className:"s-ops-agents-task s-ops-agents-task--idle",children:"—"})},{key:"team",label:"Project",kind:"text",defaultWidth:140,minWidth:90,cls:"s-ops-agents-meta",render:e=>t.jsx("span",{className:"s-ops-agents-meta-cell",children:e.team}),sortValue:e=>e.team.toLowerCase()},{key:"machine",label:"Machine",kind:"text",defaultWidth:120,minWidth:88,cls:"s-ops-agents-meta",render:e=>t.jsx("span",{className:"s-ops-agents-meta-cell",children:e.machine}),sortValue:e=>e.machine.toLowerCase()},{key:"active",label:"Active",kind:"number",defaultWidth:90,minWidth:64,cls:"s-ops-agents-num",render:e=>e.activeFlights,sortValue:e=>e.activeFlights},{key:"sessions24h",label:"24h sessions",kind:"number",defaultWidth:108,minWidth:78,cls:"s-ops-agents-num",render:e=>e.sessions24h,sortValue:e=>e.sessions24h},{key:"throughput",label:"Throughput",kind:"custom",sortable:!1,defaultWidth:110,minWidth:90,render:e=>t.jsx(ve,{values:e.throughput,warn:e.errors>0})},{key:"avgLatency",label:"Avg latency",kind:"number",defaultWidth:108,minWidth:80,cls:"s-ops-agents-num",render:e=>D(e.avgLatencyMs),sortValue:e=>e.avgLatencyMs},{key:"input",label:"Input",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.uncachedInput??e.usage.input),sortValue:e=>e.usage.uncachedInput??e.usage.input??null},{key:"cacheRead",label:"Cache read",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cachedInput),sortValue:e=>e.usage.cachedInput??null},{key:"cacheWrite",label:"Cache write",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cacheWrite),sortValue:e=>e.usage.cacheWrite??null},{key:"output",label:"Output",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.output),sortValue:e=>e.usage.output??null},{key:"apiEquiv",label:"API equiv",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>t.jsx("span",{className:e.cost.rateCardSource==="unknown"?"s-ops-agents-num--dim":void 0,children:N(e.cost.totalUsd)}),sortValue:e=>e.cost.totalUsd??null},{key:"billed",label:"Billed",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>t.jsx("span",{className:e.cost.billingMode==="subscription"?"s-ops-agents-num--covered":void 0,children:N(e.cost.billedTotalUsd)}),sortValue:e=>e.cost.billedTotalUsd??null},{key:"errors",label:"Errors",kind:"number",defaultWidth:72,minWidth:58,cls:"s-ops-agents-num",render:e=>t.jsx("span",{className:e.errors>0?"s-ops-agents-num--warn":void 0,children:e.errors}),sortValue:e=>e.errors},{key:"lastActive",label:"Last active",kind:"time",defaultWidth:104,minWidth:78,cls:"s-ops-agents-last",render:e=>e.lastActiveAt?re(e.lastActiveAt):"—",sortValue:e=>e.lastActiveAt}];function U(e){if(!e)return null;const r=e.replace(/\/+$/,""),s=r.lastIndexOf("/");return s>=0?r.slice(s+1):r}function w(e){return e==null?"—":e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)}function D(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function N(e){return e==null?"$—":e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}function be(e,r){if(!e)return null;const s=e.data.events.filter(i=>i.kind==="message"||i.kind==="tool").filter(i=>r-i.t<=Pe).sort((i,o)=>i.t-o.t);if(s.length<2)return null;const a=[];for(let i=1;i<s.length;i+=1){const o=s[i].t-s[i-1].t;o>0&&o<12e4&&a.push(o)}return a.length===0?null:Math.round(a.reduce((i,o)=>i+o,0)/a.length)}function fe(e,r){const s=new Array(24).fill(0),a=r-T;for(const i of e){if(i.ts<a||i.ts>r)continue;const o=Math.min(23,Math.max(0,Math.floor((i.ts-a)/T*s.length)));s[o]+=1}return s}function ve({values:e,warn:r=!1}){const i=Math.max(1,...e),o=e.map((c,h)=>{const g=h/Math.max(1,e.length-1)*92,b=22-c/i*19-1.5;return`${g.toFixed(1)},${b.toFixed(1)}`}).join(" ");return t.jsx("svg",{className:`s-ops-agents-spark${r?" s-ops-agents-spark--warn":""}`,viewBox:"0 0 92 22","aria-hidden":"true",children:t.jsx("polyline",{points:o,fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function ke(e){return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??U(e.cwd)??U(e.projectRoot)??"local"}function xe(e){return e.project??e.role??e.agentClass??"Unassigned"}function We(e){if(e.length===0)return null;const r={working:0,needs_attention:1,queued:2,failed:3,completed:4},a=[...e].sort((o,c)=>{const h=r[o.status]-r[c.status];return h!==0?h:(c.updatedAt??0)-(o.updatedAt??0)})[0];return(a.task??a.summary??"").trim()||null}function Se(e,r,s,a,i,o){const c=r.filter(l=>l.agentId===e.id),h=c.filter(l=>{const I=l.lastMessageAt??0;return I>0&&o-I<=T}),g=e.conversationId,b=s.filter(l=>l.actorName===e.name||!!(g&&l.conversationId===g)),m=i.get(e.id),v=m?.data.metadata?.session?.model??null,f=m?.data.metadata?.session?.modelProvider??null,P=de({adapterType:m?.data.metadata?.session?.adapterType,capturedAt:m?.updatedAt??o,model:v,provider:f,usage:m?.data.metadata?.usage}),d=a.filter(l=>l.agentId===e.id);return{agent:e,team:xe(e),machine:ke(e),model:v,provider:f,state:Z(e.state),activeFlights:d.length,activeTask:We(d),sessions24h:h.length,throughput:fe(b,o),avgLatencyMs:be(m,o),usage:P.usage,cost:P,errors:d.filter(l=>l.status==="failed"||l.status==="needs_attention").length,lastActiveAt:Math.max(0,...c.map(l=>l.lastMessageAt??0),...b.map(l=>l.ts),e.updatedAt??0)||null}}function kt({navigate:e,agents:r}){const[s,a]=p.useState(null),[i,o]=p.useState([]),[c,h]=p.useState([]),[g,b]=p.useState([]),[m,v]=p.useState(""),[f,P]=p.useState(()=>Date.now()),d=p.useRef(null),l=p.useCallback(async()=>{const n=r.map(X=>X.id).join(","),[u,k,L,$]=await Promise.allSettled([A("/api/fleet"),A("/api/conversations"),A("/api/activity"),n?A(`/api/observe/agents?ids=${encodeURIComponent(n)}`):Promise.resolve([])]);u.status==="fulfilled"&&a(u.value),k.status==="fulfilled"&&o(k.value),L.status==="fulfilled"&&h(L.value),$.status==="fulfilled"&&b($.value),P(Date.now())},[r]);p.useEffect(()=>{l()},[l]);const I=p.useCallback(()=>{d.current||(d.current=setTimeout(()=>{d.current=null,l()},ge))},[l]);te(I),p.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),p.useEffect(()=>{const n=setInterval(()=>P(Date.now()),1e3);return()=>clearInterval(n)},[]);const R=p.useMemo(()=>new Map(g.map(n=>[n.agentId,n])),[g]),M=p.useMemo(()=>{const n=s?.activeAsks??[];return r.map(u=>Se(u,i,c,n,R,f))},[c,r,s?.activeAsks,f,R,i]),S=p.useMemo(()=>{const n=m.trim().toLowerCase();return n?M.filter(u=>`${u.agent.name} ${u.team} ${u.machine} ${u.agent.handle??""} ${u.agent.harness??""} ${u.activeTask??""}`.toLowerCase().includes(n)):M},[m,M]),[K,F]=p.useState({key:"lastActive",dir:-1}),O=p.useMemo(()=>K?.key==="agent"?void 0:(n,u)=>E[n.state]-E[u.state],[K?.key]),q=p.useMemo(()=>S.map(n=>n.agent),[S]),B=p.useMemo(()=>S.map(n=>n.agent.id),[S]),y=ae({agents:q,orderedIds:B,navigate:e,selectMode:"preview"}),z=M.filter(n=>n.state==="in_turn"||n.state==="in_flight").length,H=M.filter(n=>J(n.agent.state,n.agent)).length,Y=M.reduce((n,u)=>n+(u.usage.total??0),0),_=M.some(n=>n.cost.totalUsd!=null)?M.reduce((n,u)=>n+(u.cost.totalUsd??0),0):null,G=M.some(n=>n.cost.billedTotalUsd!=null)?M.reduce((n,u)=>n+(u.cost.billedTotalUsd??0),0):null,Q=(()=>{const n=M.map(u=>u.avgLatencyMs).filter(u=>u!=null);return n.length===0?null:Math.round(n.reduce((u,k)=>u+k,0)/n.length)})();return t.jsxs("div",{className:"s-ops-agents",children:[t.jsxs("main",{className:"s-ops-agents-main",children:[t.jsxs("div",{className:"s-ops-agents-toolbar",children:[t.jsxs("div",{className:"s-ops-agents-breadcrumb",children:["Agents ",t.jsx("span",{children:"/"})," Directory"]}),t.jsxs("div",{className:"s-ops-agents-live",children:[t.jsx("span",{className:"s-ops-agents-live-dot"}),H," active"]}),t.jsxs("div",{className:"s-ops-agents-search",children:[t.jsx(se,{size:13}),t.jsx("input",{value:m,onChange:n=>v(n.target.value),placeholder:"Search agents, tasks, projects, machines…"})]}),t.jsx("button",{className:"s-ops-agents-icon-btn",type:"button",title:"Filters",children:t.jsx(oe,{size:14})})]}),t.jsx("section",{className:"s-ops-agents-hero",children:t.jsxs("div",{children:[t.jsx("div",{className:"s-ops-agents-kicker",children:"Agents"}),t.jsx("h1",{children:"All agents"}),t.jsx("p",{children:"Every registered agent across the local fleet, sorted by live status."})]})}),t.jsxs("section",{className:"s-ops-agents-stats",children:[t.jsx(C,{label:"Running",value:String(z),sub:`of ${r.length} total`}),t.jsx(C,{label:"Tokens",value:w(Y||null),sub:_==null?"usage metadata pending":`${N(_)} API equiv`}),t.jsx(C,{label:"Avg latency",value:D(Q),sub:"recent observe events"}),t.jsx(C,{label:"Billed",value:N(G),sub:"subscription usage can mark this down"})]}),t.jsxs("section",{className:"s-ops-agents-table-panel",children:[t.jsxs("div",{className:"s-ops-agents-table-title",children:["Agents ",t.jsx("span",{children:S.length}),t.jsxs("span",{className:"s-ops-agents-hint","aria-hidden":!0,children:[t.jsx("kbd",{children:"↑"}),t.jsx("kbd",{children:"↓"})," navigate · ",t.jsx("kbd",{children:"enter"})," pin · ",t.jsx("kbd",{children:"o"})," open · ",t.jsx("kbd",{children:"esc"})," clear"]})]}),t.jsx("div",{className:"s-ops-agents-table-wrap",ref:y.containerRef,children:t.jsx(ne,{rows:S,columns:Me,rowId:n=>n.agent.id,storageKey:"openscout.opsAgents.cols",sort:K,onSortChange:F,secondarySort:O,density:"compact",rowBindings:n=>{const u=y.bind(n);return{...u,onKeyDown:k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),u.onClick())}}},rowState:n=>y.getState(n),empty:{title:"No agents match",body:"Adjust the search to find a different slice of the fleet."},className:"s-ops-agents-data-table",ariaLabel:"Agents directory"})})]})]}),y.card]})}function C({label:e,value:r,sub:s,tone:a="default"}){return t.jsxs("div",{className:`s-ops-agents-metric s-ops-agents-metric--${a}`,children:[t.jsx("div",{className:"s-ops-agents-metric-label",children:e}),t.jsx("div",{className:"s-ops-agents-metric-value",children:r}),t.jsx("div",{className:"s-ops-agents-metric-sub",children:s})]})}export{kt as OpsAgentsView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as t}from"./index-sUomXsrf.js";/* empty css */import{u as d}from"./Provider-tFc3jqZ4.js";/* empty css */import{u as v}from"./page-status-BymFEFai.js";import{A as x}from"./AgentLanesView-CxfbV8Kd.js";import{MissionControlView as j}from"./MissionControlView-D59SPnAm.js";import{OpsAgentsView as f}from"./OpsAgentsView-CoBfAigH.js";import{PlanView as w}from"./PlanView-DYtt8H37.js";import{AtopView as N}from"./AtopView-_OKDlZ1h.js";import{TailView as c}from"./TailView-C_MXVSum.js";import{u as g}from"./useContentSecondaryNav-ZfBNi3d4.js";import{OpsSubnav as S}from"./OpsSubnav-CoN8utF8.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";/* empty css */import"./tail-events-CTipUIli.js";import"./observe-uJfIlIUV.js";import"./types-B0PlfpKc.js";import"./AgentAvatar-CufDA4A-.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./SessionObserve-Dlx5vDaV.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./openContent-C6XO6kr5.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./message-markup-C8Nx04sP.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./ObserveTextFlow-CBitljxi.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./message-circle-C5UZ6fO7.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";import"./AgentFloorView-CycUn0Lv.js";/* empty css */import"./agent-lanes-model-Bl6xfviL.js";import"./context-budget-DX_fwUs3.js";import"./lane-roster-store-NE15Oe6M.js";import"./AgentLanesPreflight-KWfLcaNB.js";import"./AgentLaneChrome-BfVygkgL.js";import"./AgentLaneCard-DTUvE96I.js";/* empty css */import"./AgentLaneSummaryResize-CMgzYvAA.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-BCIwPjEh.js";import"./agent-lane-preview-BtnfNyFR.js";import"./AgentLaneDetailSheet-CWs9wKWk.js";import"./SlidePanel-FCqT1zO3.js";import"./agent-lane-detail-Cw4QVAgH.js";import"./LaneTraceDetailSheet-CBf_aNZx.js";import"./LaneTraceEventFocus-DYvHfs_3.js";/* empty css */import"./mission-control-store-xQHVQdm8.js";import"./MissionFocusOverlay-C7cPt6eU.js";import"./mission-control-model-C0fByIjm.js";import"./MissionLogPane-Ye3YlF9s.js";/* empty css */import"./DataTable-0DwuXyvW.js";/* empty css */import"./useAgentHoverCard-D5e8Qg1z.js";import"./sliders-horizontal-B9Nj-Y4J.js";/* empty css *//* empty css */import"./SecondaryNav-Bks0CO2h.js";import"./secondaryNavConfig-Drb7wPG4.js";import"./message-square-BD-4UUdc.js";import"./scroll-text-BIYf6g6N.js";const A=220;function F(){const r=v(),o=!!(r.hover||r.content),[i,s]=n.useState(o?{hover:r.hover,content:r.content}:null),[p,m]=n.useState(o?"enter":"hidden"),e=n.useRef(null);if(n.useEffect(()=>{if(o){e.current&&(clearTimeout(e.current),e.current=null),s({hover:r.hover,content:r.content}),m(h=>h==="show"?"show":"enter");const u=requestAnimationFrame(()=>m("show"));return()=>cancelAnimationFrame(u)}return m("leave"),e.current=setTimeout(()=>{m("hidden"),s(null),e.current=null},A),()=>{e.current&&(clearTimeout(e.current),e.current=null)}},[o,r.hover,r.content]),p==="hidden"||!i)return null;const a=i.hover?.label??i.hover?.route??null,l=i.hover?.label&&i.hover?.route?i.hover.route:null;return t.jsxs("div",{className:`s-page-status s-page-status--${p}`,role:"status","aria-live":"polite",children:[t.jsx("div",{className:"s-page-status-left",children:a&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"s-page-status-arrow","aria-hidden":!0,children:"→"}),t.jsx("span",{className:"s-page-status-target",children:a}),l&&t.jsx("span",{className:"s-page-status-route",children:l})]})}),t.jsx("div",{className:"s-page-status-right",children:i.content&&t.jsx("span",{className:"s-page-status-content",children:i.content})})]})}function Dr({navigate:r,mode:o="mission",tailQuery:i}){const{agents:s,route:p}=d(),m=g(),e=p.view==="ops"&&p.mode==="plan"?p.planDocumentId:void 0;return t.jsxs("div",{className:"s-ops",children:[m?t.jsx("div",{className:"s-ops-header",children:t.jsx(S,{activeRoute:p,navigate:r})}):null,t.jsxs("div",{className:"s-ops-body",children:[o==="mission"&&t.jsx(j,{navigate:r,agents:s}),o==="agents"&&t.jsx(f,{navigate:r,agents:s}),o==="plan"&&t.jsx(w,{navigate:r,agents:s,selectedPlanDocumentId:e}),o==="issues"&&t.jsx(c,{navigate:r,initialFilter:i,variant:"issues"}),o==="tail"&&t.jsx(c,{navigate:r,initialFilter:i,variant:"tail"}),o==="atop"&&t.jsx(N,{}),o==="lanes"&&t.jsx(x,{navigate:r,agents:s})]}),t.jsx(F,{})]})}export{Dr as OpsScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./index-sUomXsrf.js";import{S as p}from"./SecondaryNav-Bks0CO2h.js";import{O as i}from"./secondaryNavConfig-Drb7wPG4.js";/* empty css */import"./createLucideIcon-DlxlBfLC.js";import"./message-square-BD-4UUdc.js";import"./file-text-i3xTDUjJ.js";import"./search-DCT_EvPr.js";import"./terminal-DXQISjZn.js";import"./code-xml-05TD3uOC.js";import"./scroll-text-BIYf6g6N.js";function j({activeRoute:r,navigate:o}){return t.jsx(p,{ariaLabel:"Ops sections",activeRoute:r,groups:i,navigate:o})}export{j as OpsSubnav};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as o}from"./index-sUomXsrf.js";import{a as A}from"./api-h5zurxmi.js";import{u as b,e as S}from"./Provider-tFc3jqZ4.js";import{b as y}from"./router-Dja9_ygK.js";import{u as P}from"./sse-CVoGDiKW.js";import{AgentsSubnav as N}from"./AgentsSubnav-BTNjPYoA.js";import{AgentDetailWithRail as B,AgentProfileSessionsCenter as E}from"./profile-BqY5tesX.js";import{r as R,d as C,b as M}from"./model-Co0zkMIc.js";/* empty css *//* empty css *//* empty css */import{ProjectAgentProfileBar as w}from"./ProjectAgentProfileBar-B3IvVbqS.js";/* empty css */import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./terminal-sessions-D5CIR2OL.js";import"./index-BWHgHrtv.js";import"./SecondaryNav-Bks0CO2h.js";import"./secondaryNavConfig-Drb7wPG4.js";import"./message-square-BD-4UUdc.js";import"./terminal-DXQISjZn.js";import"./scroll-text-BIYf6g6N.js";import"./AgentAvatar-CufDA4A-.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-XhGxCtP-.js";import"./terminal-relay-B5Sma7fK.js";import"./BackToPicker-CkUmHuuo.js";import"./openContent-C6XO6kr5.js";import"./ConversationScreen-Dz2d_Z_F.js";import"./ConversationComposer-BBNPa5S9.js";import"./message-markup-C8Nx04sP.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./eye-So8tNNK6.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-DXMT-YXv.js";import"./ConversationFeedRows-BuejHMCY.js";import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-CTipUIli.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./SessionObserve-Dlx5vDaV.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";/* empty css */import"./AgentDefinitionsWorkspace-FpEkb-tu.js";import"./text-DsBWV_4k.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-C9Ly01Ef.js";import"./agent-essentials-DyJiUGpZ.js";import"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";function No({route:t,navigate:r}){const{agents:e}=b(),p=y(t),n=m.useMemo(()=>S(e,p),[e,p]),[f,g]=m.useState([]),a=m.useCallback(async()=>{const s=await A("/api/conversations").catch(()=>[]);g(s)},[]);m.useEffect(()=>{a()},[a]),P(()=>{a()});const i=R(n,t.agentId),c=!!(t.agentId&&i&&i.id!==t.agentId),{conversationByAgentId:j}=C(f);if(m.useEffect(()=>{!t.agentId||!i||!c||r({...t,view:"agents-v2",agentId:i.id})},[r,t,i,t.agentId,c]),!i)return o.jsx(v,{activeRoute:t,navigate:r,children:o.jsx("div",{className:"av2-empty",children:"Agent not found."})});const d=t.conversationId??j.get(i.id)??i.conversationId??null,l=t.tab??(t.conversationId?"message":"profile");return o.jsx("div",{className:"s-av2-profileShell",children:o.jsx(v,{activeRoute:t,navigate:r,bar:o.jsx(w,{agent:i,conversationId:d,activeTab:l,route:t,navigate:r}),children:o.jsx("div",{className:"av2-profileCanvas",children:o.jsx(B,{agent:i,allAgents:n,conversationId:d,navigate:r,activeTab:l,renderProfile:({agent:s,sessionCatalog:x,conversationId:h,navigate:I,route:u})=>o.jsx(E,{agent:s,name:M(s,n).name,sessionCatalog:x,conversationId:h,navigate:I,route:u,homeView:"agents-v2"})})})})})}function v({activeRoute:t,children:r,navigate:e,bar:p}){return o.jsxs("div",{className:"s-secondary-nav-shell",children:[o.jsx("div",{className:"s-secondary-nav-bar",children:p??o.jsx(N,{activeRoute:t,navigate:e})}),o.jsx("div",{className:"s-secondary-nav-body",children:r})]})}export{No as ProjectAgentProfile};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as p,j as s}from"./index-sUomXsrf.js";import{A as Fe}from"./AgentAvatar-CufDA4A-.js";import{H as be}from"./HarnessMark-Dm_qm1Ku.js";import{a as $e}from"./api-h5zurxmi.js";import{g as ie,a as De,f as ae,b as Oe}from"./api-BkjHJfgJ.js";import{r as ve,i as Be}from"./ui-LM8pS8qE.js";import{t as q,d as He,n as se}from"./time-Dhsh_2EG.js";import{p as ze,l as qe,s as _e,f as Ve}from"./terminal-sessions-D5CIR2OL.js";import{u as Ge,A as Ke}from"./Provider-tFc3jqZ4.js";import{o as Ue}from"./openContent-C6XO6kr5.js";import{p as Z}from"./model-Co0zkMIc.js";import{SessionRefScreen as Je}from"./SessionRefScreen-D7TfPYPN.js";import{F as we,A as Xe}from"./AddProjectForm-BoVtelSP.js";import{r as J,s as _}from"./project-overview-helpers-BQTc_Ous.js";import{u as Ze,e as Y,d as le,g as Qe,s as ce,a as de,f as Ye,h as Ne,b as es,j as ss,r as ts}from"./projects-inbox-DfVmGFFk.js";import{f as ns}from"./cache-Dr0why2k.js";import{A as ue}from"./arrow-up-right-CtTDrZJr.js";import{S as ke}from"./search-DCT_EvPr.js";import{C as is}from"./chevron-right-CyUa1zXx.js";import{E as as}from"./external-link-CnjcXf32.js";import{F as os}from"./DocumentFocusViewer-DU_9BHsD.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./colors-BtO5_zlx.js";import"./router-Dja9_ygK.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./TextDocumentSurface-C-9EtYqt.js";import"./file-text-i3xTDUjJ.js";import"./createLucideIcon-DlxlBfLC.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./x-0XjXwGqq.js";import"./chevron-down-BFai6ZfE.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./text-DsBWV_4k.js";import"./tail-events-CTipUIli.js";import"./BackToPicker-CkUmHuuo.js";import"./ConversationScreen-Dz2d_Z_F.js";import"./ConversationComposer-BBNPa5S9.js";import"./message-markup-C8Nx04sP.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-DXMT-YXv.js";import"./ConversationFeedRows-BuejHMCY.js";/* empty css */import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./SessionObserve-Dlx5vDaV.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";/* empty css */import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";function pe(e){const t=e?.trim();if(!t)return null;const i=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return i.endsWith(".jsonl")?i.slice(0,-6):i}function rs(e){return e.surfaces.filter(t=>t.backend==="tmux")}function ls(e,t){return{terminalSessionId:e.id,terminalSurfaceKey:_e(t),sessionName:t.sessionName}}function cs(e,t){const i=pe(t.agentId),n=new Set(t.sessionRefs.map(pe).filter(r=>!!r)),o=i?.split(".",1)[0]??null;o?.startsWith("session-")&&n.add(o);for(const r of e){const a=rs(r).find(l=>n.has(l.sessionName));if(a)return ls(r,a)}return null}function ds(e,t){const i=ze(e.terminalSurfaceKey);return i?`scout://terminal?${new URLSearchParams({session:e.terminalSessionId,surface:qe(i),mode:t}).toString()}`:null}const us=1e4,ps=2e4,hs=6e4,ms=15e3,fs=45e3,js=["branch","unstaged","staged"];function ee(e){const t=()=>{document.visibilityState==="visible"&&e()};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",t)}}function xs(e,t){const i=new Set;for(const n of[e,...t]){const o=n?.trim();o&&i.add(o.replace(/\/+$/u,""))}return[...i].slice(0,6)}function gs(e){return e.replace(/\/+$/u,"").split("/").pop()?.toLocaleLowerCase()??e.toLocaleLowerCase()}function bs(e,t,i){return e.path===t||i?.worktrees.some(o=>o.path===e.path)?!0:e.repo.split("/").pop()?.toLocaleLowerCase()===(i?.name.toLocaleLowerCase()??gs(t))}function Q(e){return e&&typeof e=="object"&&"name"in e&&e.name==="AbortError"?"The repository scan timed out.":e instanceof Error?e.message:String(e)}function vs(e,t=[]){const i=xs(e,t).join("\0"),n=p.useMemo(()=>i?i.split("\0"):[],[i]),[o,r]=p.useState(()=>ie()),[a,l]=p.useState(()=>De()),[c,g]=p.useState(!!(e&&!J(o,e))),[x,N]=p.useState(!!e),[S,j]=p.useState(!!e),[T,M]=p.useState(null),[y,F]=p.useState(null),[O,$]=p.useState(()=>new Map),[E,L]=p.useState(()=>new Map),[C,k]=p.useState(0),b=p.useRef(null),h=p.useCallback(()=>{b.current=null,k(f=>f+1)},[]);p.useEffect(()=>{if(!e){g(!1),M(null);return}let f=!1,v=!1,P=!0;const D=async()=>{if(v)return;v=!0,f||(g(!0),M(null));let B=null;try{let W=null;const H=C>0&&P;P=!1;try{W=await ae("standard",H,ms)}catch(R){B=Q(R)}if((!W||!J(W,e))&&b.current!==e){b.current=e;try{const R=await ae("expanded",H,fs);J(R,e)&&(W=R)}catch(R){B=Q(R)}}!f&&W&&r(R=>J(W,e)?W:R&&J(R,e)?R:W),!f&&!J(W,e)&&M(B??"Repo Watch did not include this project in its latest scan.")}finally{v=!1,f||g(!1)}};D();const u=window.setInterval(()=>{document.visibilityState==="visible"&&D()},us),I=ee(()=>{D()});return()=>{f=!0,window.clearInterval(u),I()}},[e,C]),p.useEffect(()=>{if(n.length===0){j(!1),L(new Map);return}let f=!1,v=!1,P=!0;const D=async()=>{if(v)return;v=!0,f||j(!0);const B=await Promise.allSettled(n.map(W=>ns(W,[...js],{force:C>0&&P,tier:"summary"})));if(P=!1,!f){const W=new Map,H=new Map;B.forEach((R,K)=>{const V=n[K];R.status==="fulfilled"?W.set(V,R.value.snapshot):H.set(V,Q(R.reason))}),$(R=>{const K=new Map(R);for(const V of n)K.delete(V);for(const[V,te]of W)K.set(V,te);return K}),L(H),j(!1)}v=!1};D();const u=window.setInterval(()=>{document.visibilityState==="visible"&&D()},ps),I=ee(()=>{D()});return()=>{f=!0,window.clearInterval(u),I()}},[n,C]),p.useEffect(()=>{if(n.length===0){N(!1),F(null);return}let f=!1,v=!1;const P=async()=>{if(!v){v=!0;try{const I=await Oe(n);f||(l(I),F(null))}catch(I){f||F(Q(I))}finally{v=!1,f||N(!1)}}};N(!0),F(null),P();const D=window.setInterval(()=>{document.visibilityState==="visible"&&P()},hs),u=ee(()=>{P()});return()=>{f=!0,window.clearInterval(D),u()}},[n,C]);const d=p.useMemo(()=>J(o,e),[e,o]),m=p.useMemo(()=>e?(a?.pullRequests??[]).filter(f=>bs(f,e,d)):[],[d,e,a]),A=p.useMemo(()=>{const f=a?.paths.some(v=>n.includes(v))?a.warnings:[];return y?[y,...f]:f},[n,y,a]);return{project:d,pullRequests:m,pullRequestsLoading:x,pullRequestWarnings:A,repoLoading:c,repoError:T,diffSnapshots:O,diffErrors:E,diffLoading:S,refresh:h}}function ws(e,t){return e.thread===t.thread&&e.crossProject===t.crossProject&&e.selected===t.selected&&e.cursor===t.cursor&&e.nowMs===t.nowMs&&e.workLabel===t.workLabel}const Ns=p.memo(function({thread:t,crossProject:i,selected:n,cursor:o,nowMs:r,onSelect:a,onOpen:l,rowRef:c,workLabel:g}){return s.jsxs("button",{ref:c,type:"button",className:"pi-row","data-state":t.group,"data-selected":n||void 0,"data-cursor":o||void 0,onClick:a,onDoubleClick:l,children:[s.jsx("span",{className:"pi-rowDot","aria-hidden":!0}),s.jsxs("span",{className:"pi-rowBody",children:[s.jsx("span",{className:"pi-rowWork",title:t.work,children:g??t.work}),s.jsxs("span",{className:"pi-rowAttr",children:[s.jsx("span",{className:"pi-rowAvatar",children:s.jsx(Fe,{agent:{name:t.agentName,harness:t.harness,state:t.working?"in_turn":null},placement:"row",size:22})}),s.jsx("span",{className:"pi-rowAgent",title:t.agentName,children:t.agentName}),s.jsx("span",{className:"pi-rowHmark","aria-hidden":!0,children:s.jsx(be,{harness:t.harness,size:11})}),i?s.jsxs("span",{className:"pi-rowChip",title:`/${t.projectTitle}`,children:["/",t.projectTitle]}):t.branch?s.jsx("span",{className:"pi-rowBranch",title:t.branch,children:t.branch}):null]})]}),s.jsxs("span",{className:"pi-rowVitals",children:[t.working?s.jsx("span",{className:"pi-rowLiveTag",children:"live"}):null,s.jsx("span",{className:"pi-rowAgo",children:t.lastActivityAt?q(t.lastActivityAt,r):"—"}),t.contextPct!=null?s.jsxs("span",{className:"pi-rowCtx",children:[t.contextPct,"%"]}):null]}),s.jsxs("span",{className:"pi-rowOpen","aria-hidden":!0,children:[s.jsx("span",{children:"Open"}),s.jsx(is,{size:14,strokeWidth:1.8})]})]})},ws);function he({title:e,detail:t,tone:i="muted"}){return s.jsxs("div",{className:"pi-stateBlock","data-tone":i,role:i==="loading"?"status":"note",children:[s.jsx("span",{className:"pi-statePulse","aria-hidden":!0}),s.jsx("span",{className:"pi-stateTitle",children:e}),t?s.jsx("span",{className:"pi-stateDetail",children:t}):null]})}function ks({rows:e=7}){return s.jsxs("div",{className:"pi-loadingRows","aria-hidden":"true",children:[s.jsxs("div",{className:"pi-sectionHead pi-sectionHead--loading",children:[s.jsx("span",{className:"pi-loadingLine pi-loadingLine--label"}),s.jsx("span",{className:"pi-loadingLine pi-loadingLine--count"})]}),Array.from({length:e},(t,i)=>s.jsxs("div",{className:"pi-row pi-row--loading",children:[s.jsx("span",{className:"pi-rowDot"}),s.jsxs("span",{className:"pi-rowBody",children:[s.jsx("span",{className:"pi-loadingLine pi-loadingLine--title"}),s.jsx("span",{className:"pi-loadingLine pi-loadingLine--meta"})]}),s.jsx("span",{className:"pi-rowVitals",children:s.jsx("span",{className:"pi-loadingLine pi-loadingLine--time"})})]},i))]})}function Ss({route:e,navigate:t,slug:i,model:n,mode:o,repoProject:r}){const a=n.projects.find(y=>y.slug===i)??null,l=Y(n.threads,i),c=l.filter(y=>y.kind==="agent"),g=a?.title??i,x=a?.root??null,N=(a?.agentCount??c.length)>1,S=e.machineId?{machineId:e.machineId}:{},j={view:"agents-v2",projectSlug:i,...S},T=ys(a?.needs??0,a?.working??0,l.length),M=r?.worktrees.length??a?.worktreeCount??0;return s.jsxs("header",{className:"pi-projectHead",children:[s.jsx("div",{className:"pi-projectHeadTop",children:s.jsxs("div",{className:"pi-projectIdent",children:[s.jsx("h1",{className:"pi-projectTitle",children:g}),s.jsxs("div",{className:"pi-projectMeta",children:[x?s.jsx("span",{title:x,children:_(x)}):null,s.jsx("span",{className:"pi-projectDigest",children:T})]})]})}),s.jsxs("div",{className:"pi-projectFacets","aria-label":"Project sections",children:[s.jsx("button",{type:"button",className:"pi-projectFacet","data-selected":o==="overview"||void 0,onClick:()=>t(j),children:s.jsx("span",{children:"Overview"})}),s.jsxs("button",{type:"button",className:"pi-projectFacet","data-selected":o==="sessions"||void 0,onClick:()=>t({...j,indexView:"sessions"}),children:[s.jsx("span",{children:"Sessions"}),s.jsx("b",{children:a?.sessionCount??0})]}),N?s.jsxs("button",{type:"button",className:"pi-projectFacet","data-selected":o==="agents"||void 0,onClick:()=>t({...j,indexView:"agents"}),children:[s.jsx("span",{children:"Agents"}),s.jsx("b",{children:a?.agentCount??c.length})]}):null,s.jsxs("button",{type:"button",className:"pi-projectFacet",title:"Open worktrees in Repos",onClick:()=>t({view:"repos",...x?{root:x}:{},...S}),children:[s.jsx("span",{children:"Worktrees"}),s.jsx("b",{children:M}),s.jsx(ue,{className:"pi-projectFacetOut",size:11,strokeWidth:2,"aria-hidden":!0})]}),s.jsxs("button",{type:"button",className:"pi-projectFacet",disabled:!x,title:x?"Open this project's AGENTS.md":"No project root known",onClick:()=>t({view:"code",project:i,path:"AGENTS.md"}),children:[s.jsx("span",{children:"Rules"}),s.jsx("b",{children:x?"set":"—"}),s.jsx(ue,{className:"pi-projectFacetOut",size:11,strokeWidth:2,"aria-hidden":!0})]})]})]})}function ys(e,t,i){if(i===0)return s.jsx("span",{children:"No conversations yet."});const n=[];return t>0&&n.push(s.jsxs("b",{children:[t," moving"]},"w")),e>0&&n.push(s.jsxs("b",{children:[e," needs you"]},"n")),n.push(s.jsxs("span",{children:[i," conversation",i===1?"":"s"]},"t")),n.reduce((o,r,a)=>(a>0&&o.push(s.jsx("span",{children:" · "},`sep${a}`)),o.push(r),o),[])}function Se(e){if(e.length<=18)return e;const t=e.match(/^([0-9a-f]{8})-[0-9a-f-]{27,}$/iu);return t?t[1]:`${e.slice(0,10)}…${e.slice(-5)}`}function Cs(e,t){return`${t?0:e.projects.length} tracked`}function As({route:e,navigate:t,projects:i}){const{onboarding:n,refreshOnboarding:o,reload:r}=Ge(),a=Rs(n?.defaultHarness),[l,c]=p.useState(""),[g,x]=p.useState(""),[N,S]=p.useState(a),[j,T]=p.useState(!1),[M,y]=p.useState(null),[F,O]=p.useState(null),[$,E]=p.useState(null);p.useEffect(()=>{S(a)},[a]);const L=p.useMemo(()=>Ts(i),[i]),C=p.useMemo(()=>Ls(L,l),[l,L]),k=p.useMemo(()=>L.find(u=>u.slug===g)??fe(L,l),[l,L,g]),b=l.trim(),h=Ms(b)&&!fe(L,b),d=k??(!h&&b?C[0]??null:null),m=d?"Open project":h?"Create project":"Find project",A=!!(d||h||b);p.useEffect(()=>{g&&(L.some(u=>u.slug===g)||x(""))},[L,g]),p.useEffect(()=>{if(!$)return;const u=L.find(I=>Es(I,$));u&&(E(null),t(me(e,u.slug)))},[$,t,L,e]);const f=u=>{x(u.slug),c(u.title),y(null),O(null)},v=u=>{t(me(e,u.slug))},P=async u=>{T(!0),y(null),O(null);try{await $e("/api/onboarding/project",{method:"POST",body:JSON.stringify({contextRoot:u,sourceRoots:[u],defaultHarness:N})}),E(u),O("Project created. Refreshing inventory."),x(""),c(""),ts(),await Promise.all([o(),r()])}catch(I){y(I instanceof Error?I.message:"Could not create project.")}finally{T(!1)}},D=u=>{if(u.preventDefault(),!j){if(d){v(d);return}if(h){P(b);return}if(b){y("No project matches that search. Paste a repo path to create one.");return}y("Choose a project or paste a repo path.")}};return s.jsxs("div",{className:"pi-zero",children:[s.jsxs("div",{className:"pi-zeroHead",children:[s.jsxs("span",{className:"pi-zeroKicker",children:[s.jsx(we,{size:13,strokeWidth:1.9,"aria-hidden":!0}),"Projects"]}),s.jsx("h2",{children:"Pick a project to start."})]}),s.jsxs("form",{className:"pi-zeroComposer",onSubmit:D,children:[s.jsxs("div",{className:"pi-zeroBar",children:[s.jsxs("label",{className:"pi-zeroSelect",children:[s.jsx(ke,{size:13,strokeWidth:1.8,"aria-hidden":!0}),s.jsxs("select",{value:g,"aria-label":"Choose project",onChange:u=>{const I=L.find(B=>B.slug===u.currentTarget.value);I?f(I):x("")},children:[s.jsx("option",{value:"",children:"Choose project"}),L.slice(0,80).map(u=>s.jsx("option",{value:u.slug,children:u.title},u.slug))]})]}),s.jsx("div",{className:"pi-zeroHarness",role:"group","aria-label":"Default harness",children:["claude","codex"].map(u=>s.jsx("button",{type:"button","data-on":N===u||void 0,onClick:()=>S(u),children:u==="claude"?"Claude":"Codex"},u))})]}),s.jsxs("div",{className:"pi-zeroInputRow",children:[s.jsx("textarea",{value:l,rows:2,placeholder:"Find project or paste /path/to/repo","aria-label":"Find or create project",onChange:u=>{c(u.currentTarget.value),x(""),y(null),O(null)},onKeyDown:u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),u.currentTarget.form?.requestSubmit())}}),s.jsxs("button",{type:"submit",className:"pi-zeroSend",disabled:j||!A,title:m,children:[s.jsx(Ke,{size:15,strokeWidth:2,"aria-hidden":!0}),s.jsx("span",{children:j?"Working":m})]})]}),C.length>0?s.jsx("div",{className:"pi-zeroMatches","aria-label":"Matching projects",children:C.map(u=>s.jsxs("button",{type:"button",className:"pi-zeroMatch","data-selected":k?.slug===u.slug||void 0,onClick:()=>f(u),onDoubleClick:()=>v(u),children:[s.jsxs("span",{className:"pi-zeroMatchMain",children:[s.jsxs("span",{className:"pi-zeroMatchTitle",children:["/",u.title]}),s.jsx("span",{className:"pi-zeroMatchRoot",title:u.root??void 0,children:u.root?_(u.root):u.slug})]}),s.jsx("span",{className:"pi-zeroMatchMeta",children:Is(u)})]},u.slug))}):b?s.jsx("div",{className:"pi-zeroEmpty",children:"No project matches."}):null,M?s.jsx("div",{className:"pi-zeroError",children:M}):null,F?s.jsx("div",{className:"pi-zeroStatus",children:F}):null]})]})}function Rs(e){return e==="codex"?"codex":"claude"}function me(e,t){return{view:"agents-v2",projectSlug:t,...e.showEphemeral?{showEphemeral:!0}:{},...e.machineId?{machineId:e.machineId}:{}}}function Ts(e){return e.map(t=>({slug:t.slug,title:t.title,root:t.root,agentCount:t.agentCount,sessionCount:t.sessionCount,lastActivityAt:t.lastActivityAt})).sort((t,i)=>i.lastActivityAt-t.lastActivityAt||i.agentCount-t.agentCount||i.sessionCount-t.sessionCount||t.title.localeCompare(i.title))}function Ls(e,t){const i=z(t);return i?e.map(n=>({option:n,score:Ps(n,i)})).filter(n=>n.score!==null).sort((n,o)=>n.score-o.score||o.option.lastActivityAt-n.option.lastActivityAt||n.option.title.localeCompare(o.option.title)).slice(0,6).map(n=>n.option):e.slice(0,6)}function fe(e,t){const i=z(t);return i?e.find(n=>{const o=z(n.root??""),r=z(n.root?Z(n.root):"");return z(n.title)===i||z(n.slug)===i||o===i||r===i||z(n.root?_(n.root):"")===i})??null:null}function Ps(e,t){const i=z(e.title),n=z(e.slug),o=z(e.root??""),r=z(e.root?Z(e.root):"");return i===t||n===t||o===t||r===t?0:i.startsWith(t)||n.startsWith(t)||r.startsWith(t)?1:i.includes(t)||n.includes(t)||r.includes(t)?2:o.includes(t)?3:null}function z(e){return e.trim().toLowerCase().replace(/^~(?=\/)/u,"").replace(/\s+/g," ")}function Ms(e){const t=e.trim();return/^(~\/|\/|\.{1,2}\/)/u.test(t)||t.includes("/")}function Es(e,t){const i=z(t);return i?[e.root??"",e.root?_(e.root):"",e.root?Z(e.root):"",e.slug,e.title].map(z).some(o=>o===i||o.endsWith(i)):!1}function Is(e){return[je(e.agentCount,"agent"),je(e.sessionCount,"session"),e.lastActivityAt?q(e.lastActivityAt):null].filter(Boolean).join(" · ")}function je(e,t){return`${e} ${t}${e===1?"":"s"}`}function Ws(e,t){return t.sessionId?e.find(i=>i.sessionId===t.sessionId||i.conversationId===t.sessionId||i.id===t.sessionId)??null:null}function xe(e){return/^native:process:/iu.test(e??"")}function Fs(e){return e.startsWith("/")||e.startsWith("~/")||e.includes("/")&&/\.(jsonl?|events)$/i.test(e)}function ye(e,t,i){const n=e?.trim()??"";return!n||Fs(n)?t:n}function $s({session:e,sessionRef:t,threads:i,lookup:n,route:o,navigate:r,nowMs:a}){const[l,c]=p.useState(null),g=e?.agentName??o.selectedAgentId??o.agentId??"Session",x=e?.harness??"session",N=n?.kind==="observe"?n.observe.data:null,S=N?.metadata?.session,j=e?.lastActivityAt??n?.session?.lastMessageAt??null,[T,M,y]=p.useMemo(()=>[re(N),Ae(N,j),zs(N,j)],[N,j]),F=S?.gitBranch??n?.session?.currentBranch??e?.branch??null,O=S?.model??null,$=S?.turnCount??N?.metadata?.usage?.assistantMessages??(n?.kind==="conversation"?n.session.messageCount:null),E=M?q(M,a):e?.lastActivityAt?q(e.lastActivityAt,a):"—",L=e?.working?`live · last ${E}`:E!=="—"?`last ${E}`:"trace resolving",C=ye(e?.work,g),k=Se(t),b=n?.session??null,h=n?.kind==="observe"?n.observe.agentId??b?.agentId??e?.agentId:b?.agentId??e?.agentId,d=n?.kind==="observe"?n.observe.sessionId:b?.harnessSessionId,m=[g,x,O,F,T?`started ${He(T)}`:null,y,$!=null?`turn ${w($)}`:null,k].filter(v=>!!v&&v!=="—");p.useEffect(()=>{let v=!0;return c(null),!h&&!d&&!t?()=>{v=!1}:(Ve({includeDiscovered:!0}).then(P=>{v&&c(cs(P,{agentId:h,sessionRefs:[t,d,e?.sessionId]}))}).catch(()=>{v&&c(null)}),()=>{v=!1})},[e?.sessionId,t,h,d]);const A=()=>{l&&Ue(r,{view:"terminal",terminalSessionId:l.terminalSessionId,terminalSurfaceKey:l.terminalSurfaceKey,mode:"takeover"},{returnTo:o})},f=l?ds(l,"takeover"):null;return s.jsxs("section",{className:"pi-sessionOverview","aria-label":"Session overview",children:[s.jsxs("section",{className:"pi-sessionMasthead","data-state":e?.working?"working":"recent",children:[s.jsxs("div",{className:"pi-sessionMastTop",children:[s.jsx("span",{className:"pi-sessionCrumb",children:"Sessions ▸"}),s.jsx("h2",{className:"pi-sessionHeadline",title:C,children:C}),s.jsxs("span",{className:"pi-sessionState",children:[e?.working?s.jsx("span",{className:"pi-sessionLiveDot","aria-hidden":!0}):null,L]})]}),s.jsx("div",{className:"pi-sessionMeta",children:m.map((v,P)=>s.jsxs("span",{title:P===m.length-1?t:v,children:[P===1?s.jsx(be,{harness:x,size:11}):null,v]},`${v}:${P}`))}),l?s.jsxs("div",{className:"pi-sessionTerminalActions","aria-label":"tmux terminal actions",children:[s.jsxs("span",{className:"pi-sessionTerminalName",title:l.sessionName,children:["tmux · ",l.sessionName]}),s.jsx("button",{type:"button",onClick:A,children:"Open in web terminal"}),f?s.jsxs("a",{href:f,children:["Open in native terminal",s.jsx(as,{size:11,strokeWidth:1.8,"aria-hidden":!0})]}):null]}):null]}),s.jsx(Js,{lookup:n,session:e,threads:i,nowMs:a,route:o,navigate:r})]})}function Ds({session:e,sessionRef:t,threads:i,route:n,navigate:o,nowMs:r}){const[a,l]=p.useState(null);return p.useEffect(()=>{l(null)},[t]),s.jsx("main",{className:"pi-sessionDetail","aria-label":"Selected session",children:s.jsxs("div",{className:"pi-sessionContent",children:[s.jsx($s,{session:e,sessionRef:t,threads:i,lookup:a,route:n,navigate:o,nowMs:r}),s.jsx(Je,{sessionRef:t,navigate:o,showObserveRail:!1,onLookup:l})]})})}function w(e){return typeof e!="number"||!Number.isFinite(e)?"—":Math.abs(e)<1e3?e.toLocaleString("en-US"):Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(e).toLowerCase()}function Ce(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?"—":`${w(e)} tok`}function G(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}function Os(e){const t=G(e?.contextInputTokens),i=G(e?.contextWindowTokens);return t===null||i===null?null:Math.max(0,Math.min(1,t/i))}function Bs(e){const t=[{key:"input",label:"input",value:G(e?.inputTokens)??0},{key:"cache-read",label:"cache rd",value:G(e?.cacheReadInputTokens)??0},{key:"cache-write",label:"cache wr",value:G(e?.cacheCreationInputTokens)??0},{key:"output",label:"output",value:G(e?.outputTokens)??0},{key:"reasoning",label:"reasoning",value:G(e?.reasoningOutputTokens)??0}].filter(r=>r.value>0),i=t.reduce((r,a)=>r+a.value,0),n=t.filter(r=>r.key!=="reasoning"||i>0&&r.value/i>=.02);if(n.length>0)return n;const o=G(e?.totalTokens);return o!==null?[{key:"total",label:"total",value:o}]:[]}function Hs({buckets:e}){const t=e.reduce((i,n)=>i+n.value,0);return e.length===0?null:s.jsxs("div",{className:"pi-sessionGlanceTokens","aria-label":"Token usage",children:[s.jsx("div",{className:"pi-sessionGlanceTokenBars",children:e.map(i=>s.jsx("span",{className:"pi-sessionGlanceTokenSeg","data-kind":i.key,style:{flexGrow:t>0?Math.max(.035,i.value/t):1,flexBasis:0},title:`${i.label}: ${Ce(i.value)}`},i.key))}),s.jsx("div",{className:"pi-sessionGlanceTokenLegend",children:e.map(i=>s.jsxs("span",{children:[s.jsx("i",{"data-kind":i.key,"aria-hidden":!0}),i.label," ",s.jsx("b",{children:w(i.value)})]},i.key))})]})}function re(e){const t=se(e?.metadata?.session?.sessionStart);if(t!==null)return t;for(const i of e?.events??[]){const n=se(i.at);if(n!==null)return n}return null}function Ae(e,t){for(let o=(e?.events.length??0)-1;o>=0;o-=1){const r=se(e?.events[o]?.at);if(r!==null)return r}const i=re(e),n=e?.events.at(-1)?.t;return i!==null&&typeof n=="number"&&Number.isFinite(n)?i+n*1e3:se(t)}function zs(e,t){const i=re(e),n=Ae(e,t);if(i!==null&&n!==null)return oe(Math.max(0,n-i))||"—";const o=e?.events.at(-1)?.t;return typeof o=="number"&&Number.isFinite(o)&&oe(o*1e3)||"—"}function oe(e){if(typeof e!="number"||!Number.isFinite(e)||e<0)return"";const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const i=Math.floor(t/60);if(i<60)return`${i}m`;const n=Math.floor(i/60),o=i%60;if(n<48)return o>0?`${n}h ${o}m`:`${n}h`;const r=Math.floor(n/24),a=n%24;return a>0?`${r}d ${a}h`:`${r}d`}function qs(e){const t=e?.metadata?.topology;if(!t)return null;const i=t.agents.length,n=t.agents.filter(l=>l.role!=="lead").length,o=t.groups.filter(l=>l.kind==="workflow").length,r=t.tasks.length,a=[];return n>0?a.push(`${n} worker${n===1?"":"s"}`):i>0&&a.push(`${i} agent${i===1?"":"s"}`),o>0&&a.push(`${o} workflow${o===1?"":"s"}`),r>0&&a.push(`${r} task${r===1?"":"s"}`),a.length?a.join(" · "):null}function _s(e){return[...e].sort((t,i)=>ge(i.state)-ge(t.state)||i.touches-t.touches||i.lastT-t.lastT||t.path.localeCompare(i.path)).slice(0,5).map(t=>({path:t.path,kind:t.state,detail:[t.touches>1?`${w(t.touches)} touches`:"1 touch",t.lastT>0?`last ${oe(t.lastT*1e3)}`:null].filter(Boolean).join(" · ")}))}function ge(e){switch(e){case"created":return 3;case"modified":return 2;case"read":return 1}}function Vs(e){const t=new Map;for(const i of e){if(i.kind!=="tool")continue;const n=Gs(i.tool||i.text),o=t.get(n)??{count:0,samples:[]};o.count+=1;const r=i.arg||i.detail||i.text;r&&o.samples.length<2&&o.samples.push(r),t.set(n,o)}return[...t.entries()].sort((i,n)=>n[1].count-i[1].count||i[0].localeCompare(n[0])).slice(0,5).map(([i,n])=>({name:i,count:n.count,detail:n.samples.join(" · ")||`${w(n.count)} uses`}))}function Gs(e){return(e.trim().split(/\s+/u)[0]??"tool").replace(/[_-]+/gu," ").toLowerCase()}function Ks({usage:e,contextPct:t,topology:i,workspace:n,projectRoot:o,branch:r}){const a=[];return t!==null&&a.push({label:"Context",value:`${t}%`,detail:t>=80?"approaching limit":"within window",tone:t>=80?"warn":void 0}),(e?.serviceTier||e?.planType||e?.speed)&&a.push({label:"Budget",value:e.serviceTier??e.planType??e.speed??"usage",detail:[e.planType,e.speed].filter(Boolean).join(" · ")||"provider metadata"}),n&&o&&n!==o?a.push({label:"Worktree",value:_(n),detail:"session cwd differs from project root",tone:"warn"}):r&&a.push({label:"Repo",value:r,detail:"session branch"}),i&&a.push({label:"Topology",value:i,detail:"observed harness hierarchy"}),(e?.webSearchRequests||e?.webFetchRequests)&&a.push({label:"Network",value:`${w((e.webSearchRequests??0)+(e.webFetchRequests??0))} req`,detail:[e.webSearchRequests?`${w(e.webSearchRequests)} search`:null,e.webFetchRequests?`${w(e.webFetchRequests)} fetch`:null].filter(Boolean).join(" · ")}),a.slice(0,4)}function Us({session:e,threads:t,nowMs:i}){return t.filter(n=>n.kind==="agent").filter(n=>n.agentId!==e?.agentId||n.work!==e?.work).sort((n,o)=>Number(o.working)-Number(n.working)||o.lastActivityAt-n.lastActivityAt).slice(0,4).map(n=>{const o=!!(e?.branch&&n.branch===e.branch),r=!!(e?.agentName&&n.agentName===e.agentName);return{thread:n,title:ye(n.work,n.agentName,n.id),channel:n.conversationId?Se(n.conversationId):n.agentName,state:n.needs?"needs":n.working?"working":"recent",time:n.lastActivityAt?q(n.lastActivityAt,i):"—",participants:n.agentName,why:o?"same branch":r?"same agent":n.working?"active in project":"project thread"}})}function X({label:e,value:t,title:i,detail:n}){return s.jsxs("span",{className:"pi-sessionGlanceField",title:i,children:[s.jsx("span",{children:e}),s.jsx("b",{children:t}),n?s.jsx("small",{children:n}):null]})}function Js({lookup:e,session:t,threads:i,nowMs:n,route:o,navigate:r}){const[a,l]=p.useState(!1),c=p.useMemo(()=>{const h=e?.kind==="observe"?e.observe.data:null,d=h?.metadata?.session,m=h?.metadata?.usage,A=h?.events??[],f=h?.files??[],v=d?.turnCount??m?.assistantMessages??(e?.kind==="conversation"?e.session.messageCount:null),P=A.filter(U=>U.kind==="tool").length,D=f.filter(U=>U.state==="created").length,u=f.filter(U=>U.state==="modified").length,I=f.filter(U=>U.state==="read").length,B=D+u,W=Os(m),H=W!==null?Math.round(W*100):null,R=d?.cwd??e?.session?.workspaceRoot??t?.projectRoot??null,K=d?.gitBranch??e?.session?.currentBranch??t?.branch??null,V=qs(h),te=Ce(m?.totalTokens??(typeof m?.inputTokens=="number"||typeof m?.outputTokens=="number"?(m?.inputTokens??0)+(m?.outputTokens??0):null)),Te=Bs(m),Le=B>0?[u>0?`${w(u)} mod`:null,D>0?`${w(D)} new`:null].filter(Boolean).join(" · "):I>0?"read-only":"no file trace",Pe=f.length>0?`${w(f.length)} touched`:"—",Me=_s(f),Ee=Vs(A),Ie=Ks({usage:m,contextPct:H,topology:V,workspace:R,projectRoot:t?.projectRoot,branch:K}),We=Us({session:t,threads:i,nowMs:n});return{turnCount:v,toolCount:P,editCount:B,fileCountLabel:Pe,fileStateLabel:Le,workspace:R,contextPct:H,showContext:H!==null,contextWarn:H!==null&&H>=80,tokenTotal:te,buckets:Te,fileSignals:Me,toolSignals:Ee,contextSignals:Ie,threadSignals:We,projectRoot:t?.projectRoot??null}},[e,t,i,n]),{turnCount:g,toolCount:x,editCount:N,fileCountLabel:S,fileStateLabel:j,workspace:T,contextPct:M,showContext:y,contextWarn:F,tokenTotal:O,buckets:$,fileSignals:E,toolSignals:L,contextSignals:C,threadSignals:k,projectRoot:b}=c;return s.jsxs("section",{className:"pi-sessionGlance","aria-label":"Session glance",children:[s.jsxs("div",{className:"pi-sessionVitals","aria-label":"Session vitals",children:[s.jsx(X,{label:"Turns",value:w(g)}),s.jsx(X,{label:"Tools",value:w(x)}),s.jsx(X,{label:"Edits",value:w(N)}),s.jsx(X,{label:"Files",value:S,detail:j!=="no file trace"?j:null}),T&&b&&T!==b?s.jsx(X,{label:"Worktree",value:_(T),title:T}):null,y?s.jsxs("span",{className:"pi-sessionContextVital",title:"Context window usage",children:[s.jsx("span",{children:"Ctx"}),s.jsx("span",{className:"pi-sessionContextBar","aria-hidden":!0,children:s.jsx("span",{"data-warn":F||void 0,style:{width:`${M}%`}})}),s.jsxs("b",{"data-warn":F||void 0,children:[M,"%"]})]}):null,$.length>0?s.jsxs("button",{type:"button",className:"pi-sessionTokenToggle","aria-expanded":a,onClick:()=>l(h=>!h),children:[s.jsx("span",{children:"Tokens"}),s.jsx("b",{children:O}),s.jsx("i",{children:a?"▾":"▸"})]}):null]}),a&&$.length>0?s.jsx(Hs,{buckets:$}):null,s.jsx(Xs,{files:E,tools:L,context:C,threads:k,route:o,navigate:r})]})}function Xs({files:e,tools:t,context:i,threads:n,route:o,navigate:r}){return s.jsxs("section",{className:"pi-sessionSignals","aria-label":"Session work signals",children:[s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsxs("div",{className:"pi-sessionSignalHead",children:[s.jsx("span",{children:"Files"}),s.jsx("b",{children:w(e.length)})]}),e.length>0?s.jsx("div",{className:"pi-sessionFileList",children:e.map(a=>s.jsxs("div",{className:"pi-sessionFileRow",children:[s.jsx("span",{"data-kind":a.kind,children:a.kind}),s.jsx("code",{title:a.path,children:a.path}),s.jsx("small",{children:a.detail})]},`${a.kind}:${a.path}`))}):s.jsx("span",{className:"pi-sessionSignalEmpty",children:"No file trace yet."})]}),s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsx("div",{className:"pi-sessionSignalHead",children:s.jsx("span",{children:"Tools · Context · Topology"})}),t.length>0?s.jsx("div",{className:"pi-sessionToolGrid",children:t.map(a=>s.jsxs("span",{className:"pi-sessionToolPill",title:a.detail,children:[s.jsx("b",{children:a.name}),s.jsx("em",{children:w(a.count)})]},a.name))}):null,i.length>0?s.jsx("div",{className:"pi-sessionContextList",children:i.map(a=>s.jsxs("div",{className:"pi-sessionContextRow",children:[s.jsx("span",{children:a.label}),s.jsx("b",{"data-tone":a.tone,children:a.value}),s.jsx("small",{children:a.detail})]},`${a.label}:${a.value}`))}):t.length===0?s.jsx("span",{className:"pi-sessionSignalEmpty",children:"Trace metadata is still resolving."}):null]}),s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsxs("div",{className:"pi-sessionSignalHead",children:[s.jsx("span",{children:"Recent threads"}),s.jsx("b",{children:w(n.length)})]}),n.length>0?s.jsx("div",{className:"pi-sessionThreadList",children:n.map(a=>s.jsxs("button",{type:"button",className:"pi-sessionThreadRow",onClick:()=>r(Ne(a.thread,o)),children:[s.jsx("span",{className:"pi-sessionThreadTitle",title:a.title,children:a.title}),s.jsxs("span",{className:"pi-sessionThreadMeta",children:[s.jsx("b",{children:a.channel}),s.jsx("em",{children:a.state}),s.jsx("small",{children:a.time})]}),s.jsxs("span",{className:"pi-sessionThreadWhy",children:[a.participants," · ",a.why]})]},a.thread.id))}):s.jsx("span",{className:"pi-sessionSignalEmpty",children:"No recent agent threads."})]})]})}function ne(e){return!e||e==="—"||/^\d+\s+branches$/iu.test(e)?null:e}function Re(e,t,i,n){const o=new Map,r=(l,c)=>{const g=l??e,x=ne(c),N=g??"project",S=o.get(N);if(S)return!S.branch&&x&&(S.branch=x),S;const j={key:N,root:g,branch:x,sessions:0,work:0,moving:0,lastActivityAt:0,repoWatch:null};return o.set(N,j),j};for(const l of t){const c=r(l.root,l.branch);l.working&&(c.moving+=1),c.lastActivityAt=Math.max(c.lastActivityAt,l.lastActivityAt)}const a=(l,c)=>{const g=l??e,x=o.get(g??"project");return x||(t.length>0?o.get(e??"")??o.values().next().value:r(l,c))};for(const l of i){const c=a(l.workspaceRoot??l.projectRoot,l.branch);c.sessions+=1,l.working&&(c.moving+=1,c.branch=ne(l.branch)??c.branch),c.lastActivityAt=Math.max(c.lastActivityAt,l.lastActivityAt)}for(const l of n){const c=a(l.workspaceRoot??l.projectRoot,l.branch);c.work+=1,l.working&&(c.moving+=1,c.branch=ne(l.branch)??c.branch),c.lastActivityAt=Math.max(c.lastActivityAt,l.lastActivityAt)}return o.size===0&&r(e,null),[...o.values()].sort((l,c)=>c.moving-l.moving||c.lastActivityAt-l.lastActivityAt||(l.root??"").localeCompare(c.root??""))}function Zs(e){return e.worktrees.map(t=>({key:t.id,root:t.path,branch:t.branch.name,sessions:t.sessions.length,work:t.agents.length,moving:t.agents.some(Be)?1:0,lastActivityAt:t.lastCommitAt??0,repoWatch:t}))}function Qs({pullRequests:e,loading:t,warnings:i,onRefresh:n,nowMs:o}){return s.jsxs("section",{className:"pi-projectPullRequests","aria-label":"Open pull requests",children:[s.jsxs("div",{className:"pi-projectPullRequestsHead",children:[s.jsx("span",{children:"Open PRs"}),s.jsx("b",{children:t&&e.length===0?"…":w(e.length)})]}),e.length>0?s.jsx("div",{className:"pi-projectPullRequestList",children:e.slice(0,6).map(r=>{const a=r.updatedAt?Date.parse(r.updatedAt):Number.NaN;return s.jsxs("a",{className:"pi-projectPullRequest",href:r.url,target:"_blank",rel:"noreferrer",children:[s.jsxs("span",{className:"pi-projectPullRequestNumber",children:["#",r.number]}),s.jsx("b",{title:r.title,children:r.title}),s.jsxs("span",{className:"pi-projectPullRequestBranch",title:`${r.headRefName} → ${r.baseRefName}`,children:[r.headRefName," → ",r.baseRefName]}),s.jsx("em",{children:r.isDraft?"draft":"open"}),s.jsx("time",{children:Number.isFinite(a)?q(a,o):"updated"})]},r.id)})}):s.jsxs("div",{className:"pi-projectPullRequestState","data-loading":t||void 0,children:[s.jsx("span",{children:t?"Checking GitHub for open pull requests…":i[0]??"No open pull requests for this repository."}),!t&&i.length>0?s.jsx("button",{type:"button",onClick:n,children:"Retry"}):null]})]})}function Ys(e){const t=new Set;let i=0,n=0;const o=[];for(const r of e.layers){r.files.length>0&&o.push(r.kind);for(const a of r.files)t.add(a.newPath??a.oldPath??"unknown"),i+=a.additions??0,n+=a.deletions??0}return{additions:i,deletions:n,files:[...t],layers:o}}function et({additions:e,deletions:t}){return e+t===0?s.jsx("span",{className:"pi-projectWorktreeChurnBar","data-empty":!0}):s.jsxs("span",{className:"pi-projectWorktreeChurnBar","aria-label":`${e} additions and ${t} deletions`,children:[e>0?s.jsx("i",{"data-add":!0,style:{flexGrow:e}}):null,t>0?s.jsx("i",{"data-delete":!0,style:{flexGrow:t}}):null]})}function st({project:e,repoProject:t,repoLoading:i,repoError:n,diffSnapshots:o,diffErrors:r,diffLoading:a,pullRequests:l,pullRequestsLoading:c,pullRequestWarnings:g,onRepositoryRefresh:x,threads:N,sessions:S,route:j,navigate:T,nowMs:M}){const y=e?.root??S[0]?.projectRoot??N[0]?.projectRoot??null,F=N.length,O=e?.sessionCount??S.length,$=e?.agentCount??0,E=Math.max(e?.lastActivityAt??0,S[0]?.lastActivityAt??0,N[0]?.lastActivityAt??0),L=e?.branches.length?e.branches:[...new Set([...S.map(d=>d.branch),...N.map(d=>d.branch)].filter(d=>!!d&&d!=="—"&&d!=="main"))],C=t?.worktrees.length?Zs(t):Re(y,e?.worktrees??[],S,N),k=C.find(d=>d.moving>0&&d.branch)?.branch??C.find(d=>d.branch)?.branch??L[0]??"main",b=y?Z(y):e?.title??j.projectSlug??"project",h=C.find(d=>d.moving>0)?.key??C.find(d=>d.branch===k)?.key??C[0]?.key;return s.jsxs("main",{className:"pi-projectOverview","aria-label":"Project overview",children:[s.jsxs("section",{className:"pi-projectSnapshot","aria-label":"Project snapshot",children:[s.jsxs("div",{className:"pi-projectRepository",children:[s.jsxs("div",{className:"pi-projectRepositoryHead",children:[s.jsx("span",{children:"Repository"}),s.jsx(os,{size:13,strokeWidth:1.7,"aria-hidden":!0})]}),s.jsxs("div",{className:"pi-projectRepositoryIdentity",children:[s.jsx("b",{children:b}),s.jsx("span",{title:y??void 0,children:y?_(y):j.projectSlug??"project"})]}),s.jsxs("div",{className:"pi-projectRepositoryCurrent",children:[C.some(d=>d.moving>0)?s.jsx("span",{className:"pi-projectRepositoryPulse","aria-label":"Active now"}):null,s.jsxs("span",{children:[s.jsx("small",{children:"Current branch"}),s.jsx("b",{title:k,children:k})]}),s.jsx("time",{children:E?q(E,M):"no activity"})]}),O>0||$>0||F>0?s.jsxs("div",{className:"pi-projectRepositoryStats","aria-label":"Repository activity",children:[O>0?s.jsxs("span",{children:[s.jsx("b",{children:w(O)})," sessions"]}):null,$>0?s.jsxs("span",{children:[s.jsx("b",{children:w($)})," agents"]}):null,F>0?s.jsxs("span",{children:[s.jsx("b",{children:w(F)})," threads"]}):null]}):null]}),s.jsxs("div",{className:"pi-projectWorktrees",children:[s.jsxs("div",{className:"pi-projectWorktreesHead",children:[s.jsx("span",{children:"Worktree preview"}),s.jsx("b",{children:w(C.length)})]}),s.jsx("div",{className:"pi-projectWorktreeList",children:C.slice(0,6).map(d=>{const m=d.repoWatch,A=d.root?o.get(d.root)??null:null,f=A?Ys(A):null,v=m?ve(m):null,P=f?.additions??v?.add??0,D=f?.deletions??v?.del??0,u=f?.files.length??(m?Math.max(m.status.changedFiles,v?.files??0):0),I=!!(u>0||m&&(!m.status.clean||m.branch.ahead>0||m.branch.behind>0)),B=l.filter(R=>R.headRefName===d.branch),W=!!(d.root&&a&&!A&&!r.has(d.root)),H=d.root?r.get(d.root)??null:"No worktree path is available.";return s.jsxs("article",{className:"pi-projectWorktree","data-active":d.key===h||void 0,"data-stranded":I||void 0,children:[s.jsx("span",{className:"pi-projectWorktreeTop",children:s.jsx("b",{title:d.branch??"main",children:d.branch??"main"})}),s.jsx("em",{title:d.root??void 0,children:d.root?_(d.root):"workspace"}),A||m?s.jsxs("div",{className:"pi-projectWorktreeDiff","data-clean":!I||void 0,children:[I?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"pi-projectWorktreeChurn",children:[s.jsxs("b",{className:"pi-projectWorktreeAdd",children:["+",w(P)]}),s.jsxs("b",{className:"pi-projectWorktreeDel",children:["−",w(D)]}),s.jsx(et,{additions:P,deletions:D})]}),s.jsxs("small",{children:[w(u)," changed"]})]}):s.jsx("small",{children:"clean"}),d.root?s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:()=>T({view:"repo-diff",path:d.root}),children:"View diff"}):null]}):s.jsxs("div",{className:"pi-projectWorktreeDiff","data-pending":!0,children:[s.jsx("small",{children:W||i?"Reading worktree diff…":H??n??"No diff data returned."}),!W&&!i?s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:x,children:"Retry"}):null]}),f&&f.files.length>0?s.jsxs("span",{className:"pi-projectWorktreeFiles",title:f.files.join(`
|
|
2
|
-
`),children:[f.files.slice(0,2).map(R=>Z(R)).join(" · "),f.files.length>2?` · +${f.files.length-2} more`:""]}):null,s.jsx("span",{className:"pi-projectWorktreeMeta",children:m?s.jsxs(s.Fragment,{children:[s.jsx("small",{children:m.branch.ahead>0||m.branch.behind>0?`${m.branch.ahead}↑ ${m.branch.behind}↓`:"synced"}),m.status.staged>0?s.jsxs("small",{children:[w(m.status.staged)," staged"]}):null,m.status.unstaged>0?s.jsxs("small",{children:[w(m.status.unstaged)," unstaged"]}):null,m.status.untracked>0?s.jsxs("small",{children:[w(m.status.untracked)," untracked"]}):null,m.status.conflicts>0?s.jsxs("small",{children:[w(m.status.conflicts)," conflicts"]}):null,f?.layers.map(R=>s.jsx("small",{children:R},R)),B.length>0?s.jsxs("small",{children:[B.length," PR",B.length===1?"":"s"]}):null]}):s.jsxs(s.Fragment,{children:[s.jsx("small",{children:d.lastActivityAt?q(d.lastActivityAt,M):"idle"}),s.jsxs("small",{children:[w(d.sessions)," sessions"]}),s.jsxs("small",{children:[w(d.work)," threads"]})]})})]},d.key)})}),C.length>6?s.jsxs("div",{className:"pi-projectWorktreeMore",children:["+",C.length-6," more worktrees"]}):null]})]}),s.jsx(Qs,{pullRequests:l,loading:c,warnings:g,onRefresh:x,nowMs:M})]})}const tt=8,nt=6,it=3e4,at=15e3;function ot(){const[e,t]=p.useState(()=>ie()),[i,n]=p.useState(()=>ie()===null);return p.useEffect(()=>{let o=!1,r=!1;const a=async()=>{if(!r){r=!0;try{const g=await ae("standard",!1,at);o||(t(g),n(!1))}catch{o||n(!1)}finally{r=!1}}};a();const l=window.setInterval(()=>{document.visibilityState==="visible"&&a()},it),c=ee(()=>{a()});return()=>{o=!0,window.clearInterval(l),c()}},[]),{snapshot:e,loading:i}}function rt(e){if(!e)return[];const t=[];for(const i of e.projects)for(const n of i.worktrees)n.status.changedFiles<=0&&n.branch.ahead<=0||t.push({projectName:i.name,projectRoot:i.root,worktree:n});return t.sort((i,n)=>n.worktree.status.changedFiles-i.worktree.status.changedFiles||(n.worktree.lastCommitAt??0)-(i.worktree.lastCommitAt??0)||i.projectName.localeCompare(n.projectName))}function lt({model:e,route:t,navigate:i,nowMs:n}){const[o,r]=p.useState(!1),a=t.machineId?{machineId:t.machineId}:{},l=t.showEphemeral?{showEphemeral:!0}:{},c=p.useMemo(()=>[...e.projects].sort((j,T)=>T.lastActivityAt-j.lastActivityAt||j.title.localeCompare(T.title)).slice(0,tt),[e.projects]),{snapshot:g,loading:x}=ot(),N=p.useMemo(()=>rt(g).slice(0,nt),[g]),S=j=>i({view:"agents-v2",projectSlug:j.slug,...a,...l});return s.jsxs("main",{className:"pi-meta","aria-label":"Projects overview",children:[s.jsxs("div",{className:"pi-metaShortcuts",children:[s.jsxs("button",{type:"button",className:"pi-shortcut","aria-expanded":o,onClick:()=>r(j=>!j),children:[s.jsx(we,{size:13,strokeWidth:1.8,"aria-hidden":!0}),"Add project"]}),s.jsxs("button",{type:"button",className:"pi-shortcut",onClick:()=>i({view:"search"}),children:[s.jsx(ke,{size:13,strokeWidth:1.8,"aria-hidden":!0}),"Search agents & sessions"]}),s.jsx("button",{type:"button",className:"pi-shortcut",onClick:()=>i({view:"sessions",...a}),children:"Browse sessions"})]}),o?s.jsx(Xe,{onClose:()=>r(!1)}):null,s.jsxs("section",{className:"pi-metaSection","aria-label":"Recent projects",children:[s.jsxs("div",{className:"pi-sectionHead",children:[s.jsx("span",{className:"pi-sectionLabel",children:"Recent projects"}),s.jsx("span",{className:"pi-sectionCount",children:e.projects.length})]}),c.map(j=>s.jsx(ct,{project:j,nowMs:n,onOpen:()=>S(j)},j.slug))]}),s.jsxs("section",{className:"pi-metaSection","aria-label":"Active diffs",children:[s.jsxs("div",{className:"pi-sectionHead",children:[s.jsx("span",{className:"pi-sectionLabel",children:"Active diffs"}),s.jsx("span",{className:"pi-sectionCount",children:N.length})]}),N.length>0?N.map(j=>s.jsx(dt,{diff:j,machineScope:a,navigate:i},j.worktree.id)):s.jsx("div",{className:"pi-metaEmpty",children:x?"Reading repositories…":"No uncommitted changes across your repos."})]})]})}function ct({project:e,nowMs:t,onOpen:i}){const n=e.needs>0,o=Math.max(e.liveSessionCount,e.working);return s.jsxs("button",{type:"button",className:"pi-recentRow","data-state":n?"needs":o>0?"live":void 0,onClick:i,children:[s.jsx("span",{className:"pi-recentDot","aria-hidden":!0}),s.jsxs("span",{className:"pi-recentMain",children:[s.jsxs("span",{className:"pi-recentTitle",children:["/",e.title]}),s.jsx("span",{className:"pi-recentRoot",children:e.root?_(e.root):"Discovered project"})]}),s.jsxs("span",{className:"pi-recentMeta",children:[n?s.jsxs("b",{children:[e.needs," needs you"]}):null,o>0?s.jsxs("span",{children:[o," live"]}):null,s.jsx("time",{children:e.lastActivityAt?q(e.lastActivityAt,t):"—"})]})]})}function dt({diff:e,machineScope:t,navigate:i}){const n=ve(e.worktree);return s.jsxs("div",{className:"pi-diffRow",children:[s.jsxs("button",{type:"button",className:"pi-diffMain",title:e.worktree.path,onClick:()=>i({view:"repos",root:e.projectRoot,...t}),children:[s.jsxs("span",{className:"pi-diffProject",children:["/",e.projectName]}),s.jsx("span",{className:"pi-diffBranch",children:e.worktree.branch.name??"main"})]}),s.jsxs("span",{className:"pi-diffChurn",children:[s.jsxs("b",{className:"pi-projectWorktreeAdd",children:["+",w(n.add)]}),s.jsxs("b",{className:"pi-projectWorktreeDel",children:["−",w(n.del)]}),s.jsxs("small",{children:[w(e.worktree.status.changedFiles)," changed"]})]}),s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:()=>i({view:"repo-diff",path:e.worktree.path}),children:"View diff"})]})}function ut({project:e,threads:t,sessions:i,route:n,navigate:o,nowMs:r}){const a=e?.root??i[0]?.projectRoot??t[0]?.projectRoot??null,l=p.useMemo(()=>Re(a,e?.worktrees??[],i,t).map(g=>g.root).filter(g=>!!g),[e?.worktrees,a,i,t]),c=vs(a,l);return s.jsx(st,{project:e,repoProject:c.project,repoLoading:c.repoLoading,repoError:c.repoError,diffSnapshots:c.diffSnapshots,diffErrors:c.diffErrors,diffLoading:c.diffLoading,pullRequests:c.pullRequests,pullRequestsLoading:c.pullRequestsLoading,pullRequestWarnings:c.pullRequestWarnings,onRepositoryRefresh:c.refresh,threads:t,sessions:i,route:n,navigate:o,nowMs:r})}function Zn({route:e,navigate:t,zeroPreview:i=!1}){const{model:n,nowMs:o,loading:r,error:a}=Ze(e),l=!!e.projectSlug,c=l&&!xe(e.sessionId)?e.sessionId??null:null,g=p.useMemo(()=>c?Ws(n.sessions,e):null,[n.sessions,e,c]),x=l?e.indexView==="agents"?"agents":e.indexView==="sessions"?"sessions":"overview":"overview",N=l?n.projects.find(k=>k.slug===e.projectSlug)??null:null,S=p.useMemo(()=>{if(i)return[];if(!l)return[];const k=e.projectSlug,b=Y(n.threads,k),h=le(n.sessions,k);return x==="overview"?[]:x==="agents"?b.filter(d=>d.kind==="agent"):h.length>0?h:b},[n.sessions,n.threads,x,e.projectSlug,l,i]),j=p.useMemo(()=>Qe(S),[S]),T=p.useMemo(()=>j.flatMap(k=>k.items),[j]),M=n.projects.length>0||n.threads.length>0||n.sessions.length>0,y=r&&!M,F=r&&!i,O=!l&&!F&&(i||n.projects.length===0&&S.length===0),$=!l&&!O,[E,L]=p.useState(-1),C=p.useRef(new Map);return p.useEffect(()=>{!l||!e.sessionId||!xe(e.sessionId)||t({...e,indexView:"sessions",sessionId:void 0,selectedAgentId:void 0})},[t,e,l]),p.useEffect(()=>{L(-1)},[e.projectSlug]),p.useEffect(()=>{function k(b){const h=document.activeElement;if(!!h&&(h.tagName==="INPUT"||h.tagName==="TEXTAREA"||h.isContentEditable))return;const m=T.length;if(m){if(b.key==="ArrowDown"||b.key==="j")b.preventDefault(),L(A=>A<0?0:Math.min(m-1,A+1));else if(b.key==="ArrowUp"||b.key==="k")b.preventDefault(),L(A=>A<0?0:Math.max(0,A-1));else if(b.key==="Enter"){const A=T[E<0?0:E];A&&(b.preventDefault(),t(A.kind==="session"?ce(A,e):de(A,e)))}}}return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[E,T,t,e]),p.useEffect(()=>{if(E<0)return;const k=T[E];k&&C.current.get(k.id)?.scrollIntoView({block:"nearest"})},[E,T]),s.jsxs("div",{className:"s-pi s-pi-inbox","aria-busy":r||void 0,"data-loading":r||void 0,children:[l?s.jsx(Ss,{route:e,navigate:t,slug:e.projectSlug,model:n,mode:x,repoProject:null}):s.jsx("div",{className:"pi-inboxHead",children:s.jsxs("div",{className:"pi-inboxHeading",children:[s.jsx("h1",{className:"pi-inboxTitle",children:"Projects"}),s.jsx("span",{className:"pi-inboxDigest",children:Cs(n,i)})]})}),c?s.jsx(Ds,{session:g,sessionRef:c,threads:Y(n.threads,e.projectSlug),route:e,navigate:t,nowMs:o}):l&&x==="overview"?s.jsx(ut,{project:N,threads:Y(n.threads,e.projectSlug),sessions:le(n.sessions,e.projectSlug),route:e,navigate:t,nowMs:o}):$?s.jsx(lt,{model:n,route:e,navigate:t,nowMs:o}):s.jsxs("div",{className:"pi-threads",children:[y?s.jsx(ks,{}):null,!y&&j.map(k=>{let b=0;for(const h of j){if(h.group===k.group)break;b+=h.items.length}return s.jsxs("div",{children:[s.jsxs("div",{className:"pi-sectionHead","data-tone":k.group,children:[s.jsx("span",{className:"pi-sectionLabel",children:k.label}),s.jsx("span",{className:"pi-sectionCount",children:k.items.length})]}),k.items.map((h,d)=>{const m=b+d;return s.jsx(Ns,{thread:h,crossProject:!l,selected:h.kind==="session"?es(h,e):ss(h,e),cursor:E===m,nowMs:o,onSelect:()=>{const A=h.kind==="session"?Ye(h,e):Ne(h,e);t(A)},onOpen:()=>t(h.kind==="session"?ce(h,e):de(h,e)),rowRef:A=>{A?C.current.set(h.id,A):C.current.delete(h.id)}},h.id)})]},k.group)}),!y&&S.length===0?a&&!M?s.jsx(he,{tone:"error",title:"Projects unavailable",detail:a}):O?s.jsx("div",{className:"pi-empty",children:s.jsx(As,{route:e,navigate:t,projects:n.projects})}):F?s.jsx("div",{className:"pi-empty",children:"Loading…"}):s.jsx(he,{title:pt(l,x)}):null]})]})}function pt(e,t){return e&&t==="agents"?"No visible agents in this project.":e?"No sessions in this project yet.":"No projects yet."}export{Zn as ProjectsInbox,Ns as ThreadRow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./index-sUomXsrf.js";import{u as e}from"./Provider-tFc3jqZ4.js";import{d as s}from"./types-B0PlfpKc.js";import{ProjectsInbox as c}from"./ProjectsInbox-BWiXjGi7.js";import{P as a}from"./ProjectsRail-DEDS-M1c.js";import{ProjectAgentProfile as n}from"./ProjectAgentProfile-FiiIcB5R.js";import{i as l}from"./model-IGCUEsMy.js";/* empty css */import"./projects-inbox-DfVmGFFk.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./AgentAvatar-CufDA4A-.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./openContent-C6XO6kr5.js";import"./SessionRefScreen-D7TfPYPN.js";import"./tail-events-CTipUIli.js";import"./BackToPicker-CkUmHuuo.js";import"./ConversationScreen-Dz2d_Z_F.js";import"./ConversationComposer-BBNPa5S9.js";import"./message-markup-C8Nx04sP.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";/* empty css */import"./ConversationHeader-DXMT-YXv.js";import"./ConversationFeedRows-BuejHMCY.js";import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./SessionObserve-Dlx5vDaV.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";/* empty css */import"./AddProjectForm-BoVtelSP.js";import"./project-overview-helpers-BQTc_Ous.js";import"./cache-Dr0why2k.js";import"./arrow-up-right-CtTDrZJr.js";import"./AgentsSubnav-BTNjPYoA.js";import"./SecondaryNav-Bks0CO2h.js";import"./secondaryNavConfig-Drb7wPG4.js";import"./message-square-BD-4UUdc.js";import"./scroll-text-BIYf6g6N.js";import"./profile-BqY5tesX.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-XhGxCtP-.js";import"./terminal-relay-B5Sma7fK.js";/* empty css */import"./AgentDefinitionsWorkspace-FpEkb-tu.js";import"./FileViewerPane-C9Ly01Ef.js";import"./agent-essentials-DyJiUGpZ.js";/* empty css *//* empty css */import"./ProjectAgentProfileBar-B3IvVbqS.js";import"./agents-project-model-UYiamtrU.js";function f({route:o,navigate:r}){const t=l(o),m=t?`profile:${o.agentId}`:"index",p=!t&&j();return i.jsx("div",{className:"s-av2","data-view":t?"profile":"index",children:i.jsx("div",{className:"av2-stagePane",children:t?i.jsx(n,{route:o,navigate:r}):i.jsx(c,{route:o,navigate:r,zeroPreview:p})},m)})}function hr({navigate:o}){const{route:r}=e(),t=r.view==="agents-v2"?r:{view:"agents-v2"};return i.jsxs("div",{className:"pi-projectsEmbedShell",children:[i.jsx(a,{route:t,navigate:o}),i.jsx(f,{route:t,navigate:o})]})}const vr=s({id:"projects",label:"Projects",route:{view:"agents-v2"},webPath:"/projects",screen:"ProjectsEmbedScreen",embed:{path:"/embed/projects",profile:"macos.projects",rootClassName:"s-projects-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0}}});function j(){if(typeof window>"u")return!1;const o=window.location.hostname.toLowerCase();if(o!=="localhost"&&o!=="127.0.0.1"&&o!=="::1")return!1;const r=new URLSearchParams(window.location.search).get("zero")?.trim().toLowerCase();return r==="projects"||r==="project"||r==="1"||r==="true"}export{hr as ProjectsEmbedScreen,f as ProjectsScreen,vr as scoutSurface};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./index-sUomXsrf.js";import{A as R}from"./AgentAvatar-CufDA4A-.js";import{H as O}from"./HarnessMark-Dm_qm1Ku.js";import{t as P}from"./time-Dhsh_2EG.js";import{s as y}from"./project-overview-helpers-BQTc_Ous.js";import{u as H,t as T,a as B,s as C}from"./projects-inbox-DfVmGFFk.js";import{A as g}from"./arrow-up-right-CtTDrZJr.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./colors-BtO5_zlx.js";import"./api-h5zurxmi.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./Provider-tFc3jqZ4.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";function L(i,r,t){if(t.sessionId){const d=r.find(a=>a.sessionId===t.sessionId||a.conversationId===t.sessionId||a.id===t.sessionId);if(d)return{kind:"session",session:d};const o=i.find(a=>a.kind==="native"&&a.sessionId===t.sessionId)??null;if(o)return{kind:"thread",thread:o}}if(t.selectedAgentId){const d=i.find(a=>a.agentId===t.selectedAgentId)??null;if(d)return{kind:"thread",thread:d};const o=r.find(a=>!a.sessionId&&a.agentId===t.selectedAgentId)??null;if(o)return{kind:"session",session:o}}return null}function p({label:i,value:r}){return s.jsxs("span",{className:"pi-stat",children:[s.jsx("span",{className:"pi-statLabel",children:i}),s.jsx("span",{className:"pi-statValue",children:r})]})}function Ps({route:i,navigate:r}){const{model:t,nowMs:d,loading:o,error:a}=H(i);if(!i.sessionId&&!i.selectedAgentId)return null;const l=L(t.threads,t.sessions,i);if(!l)return s.jsxs("div",{className:"s-pi s-pi-aside",children:[s.jsx("header",{className:"pi-asideHead",children:s.jsxs("div",{className:"pi-asideIdent",children:[s.jsx("div",{className:"pi-asideTop",children:s.jsx("span",{className:"pi-asideName",children:o?"Resolving selection":a?"Project data unavailable":"Selection unavailable"})}),s.jsx("div",{className:"pi-asideSub",children:s.jsxs("span",{className:"pi-asideStatus","data-tone":o?"working":"recent",children:[o?s.jsx("span",{className:"pi-asidePulse","aria-hidden":!0}):null,o?"loading":"idle"]})})]})}),s.jsx("div",{className:"pi-asideBody",children:s.jsx("p",{className:"pi-asideMuted",children:a??"The selected item is not in the current project snapshot."})})]});const n=l.kind==="thread"?l.thread:null,e=l.kind==="session"?l.session:null,m=n?.agentName??e?.agentName??"Session",h=n?.harness??e?.harness??"session",I=n?.projectTitle??e?.projectTitle??i.projectSlug??"project",x=n?.branch??e?.branch??null,c=n?.working??e?.working??!1,f=n?.needs?"needs":c?"working":"recent",b=n?.needs?"your turn":c?"working":e?"selected":"idle",k=n?.work??e?.work??"No session detail available.",v=n?.lastActivityAt??e?.lastActivityAt??0,j=e?.sessionId??n?.sessionId??null,u=n?.projectRoot??e?.projectRoot??null,N=n?T(n,i):null,w=n?B(n,i):e?C(e,i):i,A=e?e.route?.view==="conversation"?"Open conversation":e.route?.view==="sessions"?"Open session":e.agentId?"Open agent":"Open project":n?.kind==="native"?"Open session":n?.conversationId?"Open conversation":"Open agent",S={view:"agents-v2",...i.projectSlug?{projectSlug:i.projectSlug}:{},...i.indexView?{indexView:i.indexView}:{},...i.machineId?{machineId:i.machineId}:{},...i.showEphemeral?{showEphemeral:!0}:{}};return s.jsxs("div",{className:"s-pi s-pi-aside",children:[s.jsxs("header",{className:"pi-asideHead",children:[s.jsx("span",{className:"pi-asideAvatar",children:s.jsx(R,{agent:{name:m,harness:h,state:c?"in_turn":null},placement:"row",size:38})}),s.jsxs("div",{className:"pi-asideIdent",children:[s.jsxs("div",{className:"pi-asideTop",children:[s.jsx("span",{className:"pi-asideName",title:m,children:m}),s.jsx("span",{className:"pi-asideHmark","aria-hidden":!0,children:s.jsx(O,{harness:h,size:13})}),s.jsxs("span",{className:"pi-asideProj",children:["/",I]})]}),s.jsxs("div",{className:"pi-asideSub",children:[x?s.jsx("span",{className:"pi-asideBranch",children:x}):null,s.jsxs("span",{className:"pi-asideStatus","data-tone":f,children:[c?s.jsx("span",{className:"pi-asidePulse","aria-hidden":!0}):null,b]})]})]})]}),s.jsxs("div",{className:"pi-asideBody",children:[s.jsx("h2",{className:"pi-asideHeadline",children:k}),s.jsxs("div",{className:"pi-asideReadouts",children:[s.jsx(p,{label:"Last active",value:v?P(v,d):"—"}),s.jsx(p,{label:e?"Session":"Conversations",value:e?"1":String(n?.sessionCount??0)}),s.jsx(p,{label:"Harness",value:h}),n?.contextPct!=null?s.jsx(p,{label:"Context",value:`${n.contextPct}%`}):null]}),e?s.jsxs("div",{className:"pi-asideSection",children:[s.jsx("div",{className:"pi-asideSectionHead",children:"Session context"}),s.jsxs("div",{className:"pi-asideLine",children:[j?s.jsxs("span",{title:j,children:["ref · ",j]}):s.jsx("span",{children:"No stable session reference yet."}),u?s.jsxs("span",{title:u,children:["root · ",y(u)]}):null,e.conversationId?s.jsxs("span",{title:e.conversationId,children:["conversation · ",e.conversationId]}):null]})]}):null,s.jsxs("div",{className:"pi-asideActions",children:[s.jsxs("button",{type:"button",className:"pi-asideBtn pi-asideBtnPrimary",onClick:()=>r(w),children:[A,s.jsx(g,{size:13,strokeWidth:2,"aria-hidden":!0})]}),N?s.jsxs("button",{type:"button",className:"pi-asideBtn",onClick:()=>r(N),children:["Observe",s.jsx(g,{size:13,strokeWidth:2,"aria-hidden":!0})]}):null,s.jsx("button",{type:"button",className:"pi-asideBtn",onClick:()=>r(S),children:"Clear"})]})]})]})}export{Ps as ProjectsThreadAside};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i,r as o,J as xe,b as Ye,K as Ze,L as et,C as tt}from"./index-sUomXsrf.js";import{u as je,b as nt,as as rt}from"./router-Dja9_ygK.js";import{a as J}from"./api-h5zurxmi.js";import{u as ot}from"./sse-CVoGDiKW.js";import{o as st,i as Ae}from"./surface-activity-B1rgWB1i.js";import{i as it}from"./colors-BtO5_zlx.js";import{e as De,s as at,i as Te,r as ct,a as lt,f as ut}from"./scoutbot-BTIErYHo.js";import{C as dt}from"./ContextMenu-BlBQhpax.js";import{F as ft,a as pt,D as ht}from"./DocumentFocusViewer-DU_9BHsD.js";import{c as Pe,T as Me}from"./TextDocumentSurface-C-9EtYqt.js";import{C as mt}from"./chevron-right-CyUa1zXx.js";import{F as vt}from"./file-text-i3xTDUjJ.js";import{c as Fe}from"./createLucideIcon-DlxlBfLC.js";import{C as gt}from"./code-xml-05TD3uOC.js";import{A as wt}from"./arrow-left-WjQIN9J6.js";import{h as bt}from"./scout-voice-BZ4KqADJ.js";import{i as yt}from"./keyboard-nav-BhZZ5HEq.js";import{d as pe,b as Re,i as Ie}from"./MessageComposerSuggestions-zAUUcLOv.js";import{n as St,N as Ct}from"./NewChatComposer-B5FnPyzS.js";import{u as kt}from"./chunk-HRAB3GC3-CvwpNg-G.js";function Et(e){const t=e instanceof Error?e.message:String(e);return At(t)?"Scout server is unreachable":t}function xt(e){return e==="Scout server is unreachable"}function At(e){return/failed to fetch|fetch failed|networkerror|load failed|couldn'?t connect|could not connect|connection refused|econnrefused|server is unreachable/i.test(e)}const Tt=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Rt=Fe("arrow-right",Tt);const It=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Nt=Fe("chevron-up",It),Ot={id:"audio",canHandle:e=>e.kind==="file"&&e.mediaType.startsWith("audio/"),render:({resource:e})=>{const t=e;return i.jsx("div",{className:"s-file-preview-media-wrap",children:i.jsx("div",{className:"s-file-preview-audio-stage",children:i.jsx("audio",{className:"s-file-preview-audio",src:t.rawUrl,controls:!0})})})}},_t={id:"binary",canHandle:()=>!0,render:({resource:e})=>{const t=e;return i.jsxs("div",{className:"s-file-preview-callout",children:[i.jsxs("div",{className:"s-file-preview-callout-title",children:[t.previewReason," — open in OS"]}),i.jsxs("div",{className:"s-file-preview-callout-copy",children:["Scout can resolve this file, but it does not have an inline preview for ",t.mediaType," yet."]})]})}},Lt=new Set(["text/typescript","text/javascript","text/css","text/html","application/json","text/yaml","text/toml","text/x-shellscript","text/plain"]),jt={id:"code",canHandle:e=>e.kind==="file"&&e.previewable&&Lt.has(e.mediaType),render:({resource:e})=>{const t=e,n=Pe({id:t.realPath,title:t.title,uri:t.realPath,mediaType:t.mediaType,value:t.content,filename:t.title,kind:"code",readOnly:!0});return i.jsx(Me,{document:n,mode:"read",className:"s-doc-focus-document"})}},Dt={id:"directory",canHandle:e=>e.kind==="directory",render:({resource:e,openFilePreview:t})=>{const n=e,r=Pt(n.realPath,n.rootPath);return i.jsxs("div",{className:"s-file-preview-directory",children:[i.jsx("div",{className:"s-file-preview-breadcrumb","aria-label":"Directory breadcrumb",children:r.map((s,c)=>{const a=c===r.length-1;return i.jsxs("div",{className:"s-file-preview-breadcrumb-item",children:[c>0&&i.jsx(mt,{size:12,"aria-hidden":"true"}),a?i.jsx("span",{className:"s-file-preview-breadcrumb-current",children:s.label}):i.jsx("button",{type:"button",className:"s-file-preview-breadcrumb-link",onClick:()=>t(s.path),children:s.label})]},s.path)})}),i.jsxs("div",{className:"s-file-preview-directory-list",role:"list",children:[n.entries.map(s=>i.jsxs("button",{type:"button",className:"s-file-preview-entry",onClick:()=>t(s.path),children:[i.jsx("span",{className:"s-file-preview-entry-icon","aria-hidden":"true",children:s.kind==="directory"?i.jsx(ft,{size:14}):i.jsx(vt,{size:14})}),i.jsx("span",{className:"s-file-preview-entry-name",children:s.name}),i.jsx("span",{className:"s-file-preview-entry-kind",children:s.kind==="directory"?"dir":"file"})]},s.realPath)),n.entries.length===0&&i.jsx("div",{className:"s-file-preview-directory-empty",children:"This directory is empty."})]})]})}};function Pt(e,t){const n=t==="/"?"/":t.replace(/\/+$/u,""),r=e==="/"?"/":e.replace(/\/+$/u,""),s=n.split("/").filter(Boolean),c=r.split("/").filter(Boolean),a=[{label:s[s.length-1]??"/",path:n||"/"}];let f=n||"/";for(let w=s.length;w<c.length;w+=1){const A=c[w];A&&(f=f==="/"?`/${A}`:`${f}/${A}`,a.push({label:A,path:f}))}return a}const Mt={id:"html",canHandle:e=>e.kind==="file"&&e.previewable&&e.mediaType==="text/html",render:({resource:e})=>i.jsx("div",{className:"s-file-preview-html-wrap",children:i.jsx("iframe",{className:"s-file-preview-html-frame",src:e.kind==="file"?e.rawUrl:"",title:e.title,sandbox:"allow-forms allow-popups allow-popups-to-escape-sandbox allow-scripts",referrerPolicy:"no-referrer"})})},Ft={id:"image",canHandle:e=>e.kind==="file"&&e.mediaType.startsWith("image/"),render:({resource:e})=>i.jsx("div",{className:"s-file-preview-image-wrap",children:i.jsx("div",{className:"s-file-preview-image-stage",children:i.jsx("img",{className:"s-file-preview-image",src:e.kind==="file"?e.rawUrl:"",alt:e.title})})})},Ut={id:"markdown",canHandle:e=>e.kind==="file"&&e.previewable&&e.mediaType==="text/markdown",render:({resource:e})=>{const t=e,n=Pe({id:t.realPath,title:t.title,uri:t.realPath,mediaType:t.mediaType,value:t.content,filename:t.title,kind:"markdown",readOnly:!0});return i.jsx(Me,{document:n,mode:"preview",className:"s-doc-focus-document"})}},Bt={id:"video",canHandle:e=>e.kind==="file"&&e.mediaType.startsWith("video/"),render:({resource:e})=>{const t=e;return i.jsx("div",{className:"s-file-preview-media-wrap",children:i.jsx("div",{className:"s-file-preview-media-stage",children:i.jsx("video",{className:"s-file-preview-video",src:t.rawUrl,controls:!0})})})}},qt=[Dt,Ut,Mt,jt,Ft,Bt,Ot,_t];function Vt({path:e,onOpenPath:t,onOpenInCode:n,onClose:r}){const[s,c]=o.useState(null),[a,f]=o.useState(null),[w,A]=o.useState(!1),[g,T]=o.useState(null),R=o.useRef(null);o.useEffect(()=>{R.current=g},[g]),o.useEffect(()=>{if(!e){c(null),f(null),A(!1);return}let u=!1;return A(!0),f(null),c(null),J(`/api/file/preview?path=${encodeURIComponent(e)}`).then(p=>{u||(c(p),Ht(p,R.current,T))}).catch(p=>{u||f(p instanceof Error?p.message:"could not load file")}).finally(()=>{u||A(!1)}),()=>{u=!0}},[e]);const{currentIndex:L,prevPath:d,nextPath:m}=o.useMemo(()=>{if(!s||s.kind!=="file"||!g)return{currentIndex:-1,prevPath:null,nextPath:null};const u=g.files.findIndex(p=>p.realPath===s.realPath);return u<0?{currentIndex:-1,prevPath:null,nextPath:null}:{currentIndex:u,prevPath:u>0?g.files[u-1].path:null,nextPath:u<g.files.length-1?g.files[u+1].path:null}},[s,g]);if(o.useEffect(()=>{if(!e)return;const u=p=>{if(p.key==="Escape"){r();return}if(p.target instanceof HTMLElement){const C=p.target.tagName;if(C==="INPUT"||C==="TEXTAREA"||p.target.isContentEditable)return}p.metaKey||p.ctrlKey||p.altKey||(p.key==="ArrowLeft"&&d?(p.preventDefault(),t(d)):p.key==="ArrowRight"&&m?(p.preventDefault(),t(m)):p.key==="Backspace"&&g&&s?.kind==="file"&&(p.preventDefault(),t(g.dirPath)))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e,r,t,d,m,g,s]),!e)return null;const y=()=>{J("/api/file/reveal",{method:"POST",body:JSON.stringify({path:s?.realPath??e})}).catch(u=>{f(u instanceof Error?u.message:"reveal failed")})},j=s?qt.find(u=>u.canHandle(s))??null:null,S=!!(s&&s.kind==="file"&&g&&L>=0&&g.files.length>1),E=[];S&&g&&E.push({label:`Folder: ${g.dirTitle}`,icon:i.jsx(Nt,{size:12}),onClick:()=>t(g.dirPath),title:`Back to ${g.dirTitle} (Backspace)`}),E.push({label:"Open in Code",icon:i.jsx(gt,{size:12}),onClick:()=>{s?.kind==="file"&&n(s.realPath,s.rootPath)},title:"Continue with this file in Scout’s Code browser",disabled:s?.kind!=="file"}),E.push({label:"Show in folder",icon:i.jsx(pt,{size:12}),onClick:y,title:"Show this file in its operating system folder",hideLabel:!0});const O=s?Jt(s):[];S&&O.unshift(`${L+1} / ${g.files.length}`);const N=s&&j?j.render({resource:s,openFilePreview:t}):null;return i.jsx(ht,{open:!0,kind:$t(s),document:null,title:s?.title??e.split("/").pop()??"File",eyebrow:"File preview",subtitle:s?.realPath??e,meta:O,state:w?"Loading…":null,error:a,body:N?i.jsxs("div",{className:`s-file-preview-shell${S?" s-file-preview-shell-nav":""}`,children:[S&&i.jsx("button",{type:"button",className:"s-file-preview-side-nav s-file-preview-side-nav-left",onClick:()=>d&&t(d),disabled:!d,"aria-label":"Previous file",title:"Previous file (←)",children:i.jsx(wt,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}),i.jsx("div",{className:"s-file-preview-shell-body",children:N}),S&&i.jsx("button",{type:"button",className:"s-file-preview-side-nav s-file-preview-side-nav-right",onClick:()=>m&&t(m),disabled:!m,"aria-label":"Next file",title:"Next file (→)",children:i.jsx(Rt,{size:18,strokeWidth:1.8,"aria-hidden":"true"})})]}):null,actions:E,onClose:r})}function Ht(e,t,n){if(e.kind==="directory"){const s=e.entries.filter(c=>c.kind==="file");n({dirPath:e.path,dirTitle:e.title,files:s});return}if(!t){n(null);return}t.files.some(s=>s.realPath===e.realPath)||n(null)}function $t(e){return!e||e.kind==="directory"||e.mediaType==="text/markdown"||e.mediaType==="text/plain"?"doc":"code"}function Jt(e){return e.kind==="directory"?[`${e.entries.length} ${e.entries.length===1?"entry":"entries"}`]:[...e.previewable&&e.truncated?["truncated"]:[],Kt(e.sizeBytes),e.mediaType]}function Kt(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const Ue={activity:"idle",brief:{lastDeliveredAt:null},reminders:{dueCount:0,upcomingCount:0,due:[],next:null},voice:{available:null,setupBlocked:!1,replies:!1},error:null,session:{title:null,lastActivityAt:null},conversation:{messageCount:0,loading:!0}},z=()=>{},Be={focusScoutbot:z,triggerBrief:z,triggerAskState:z,toggleVoiceReplies:z,openScoutbotSettings:z,startNewChat:z,dismissReminder:z,askReminderStatus:z},we=o.createContext(null);function zt({children:e}){const[t,n]=o.useState(Ue),r=o.useRef(Be),s=o.useCallback(w=>{n(A=>Gt(A,w)?A:w)},[]),c=o.useCallback(w=>{r.current=w},[]),a=o.useMemo(()=>({focusScoutbot:()=>r.current.focusScoutbot(),triggerBrief:()=>r.current.triggerBrief(),triggerAskState:()=>r.current.triggerAskState(),toggleVoiceReplies:()=>r.current.toggleVoiceReplies(),openScoutbotSettings:()=>r.current.openScoutbotSettings(),startNewChat:()=>r.current.startNewChat(),dismissReminder:w=>r.current.dismissReminder(w),askReminderStatus:w=>r.current.askReminderStatus(w)}),[]),f=o.useMemo(()=>({state:t,actions:a,publishState:s,registerActions:c}),[t,a,s,c]);return i.jsx(we.Provider,{value:f,children:e})}function ur(){const e=o.useContext(we);return e?{state:e.state,actions:e.actions}:{state:Ue,actions:Be}}function dr(){const e=o.useContext(we);return e?{publishState:e.publishState,registerActions:e.registerActions}:null}function Gt(e,t){return e.activity===t.activity&&e.brief.lastDeliveredAt===t.brief.lastDeliveredAt&&e.reminders.dueCount===t.reminders.dueCount&&e.reminders.upcomingCount===t.reminders.upcomingCount&&Wt(e.reminders.due,t.reminders.due)&&qe(e.reminders.next,t.reminders.next)&&e.voice.available===t.voice.available&&e.voice.setupBlocked===t.voice.setupBlocked&&e.voice.replies===t.voice.replies&&e.error===t.error&&e.session.title===t.session.title&&e.session.lastActivityAt===t.session.lastActivityAt&&e.conversation.messageCount===t.conversation.messageCount&&e.conversation.loading===t.conversation.loading}function Wt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!qe(e[n],t[n]))return!1;return!0}function qe(e,t){return e===t?!0:!e||!t?!1:e.id===t.id&&e.body===t.body&&e.status===t.status&&e.dueAt===t.dueAt}const Qt="/api/voice/realtime/call",Ve="/api/voice/realtime/lease",Xt="x-openscout-realtime-voice-lease",He="surface.realtime-voice",fr="scout:realtime-voice-stop",Yt={noise_reduction:{type:"far_field"},turn_detection:{type:"server_vad",threshold:.6,prefix_padding_ms:300,silence_duration_ms:500,create_response:!0,interrupt_response:!0}},Zt={noise_reduction:{type:"near_field"},turn_detection:{type:"server_vad",threshold:.5,prefix_padding_ms:300,silence_duration_ms:500,create_response:!0,interrupt_response:!0}},en="/api/scoutbot/chat",tn=25e3;async function nn(e={}){if(se(e.signal),!globalThis.RTCPeerConnection||!navigator.mediaDevices?.getUserMedia)throw new Error("This browser does not support realtime audio calls.");e.onState?.("connecting");const t=new RTCPeerConnection,n=new Audio;n.autoplay=!0;let r=!1,s=null,c=null,a=null,f=0,w=0;const A=(d,m,y="voice")=>{w+=1,e.onTrace?.({id:`voice-${w}`,at:Date.now(),kind:y,label:d,...m?{detail:m}:{}})};let g=null;const T=()=>{if(g)return g;r=!0,e.signal?.removeEventListener("abort",L),a&&clearInterval(a),a=null,s?.getTracks().forEach(m=>m.stop()),n.pause(),n.srcObject=null,t.close();const d=c;return c=null,g=(async()=>{d&&await hn(d),e.onState?.("ended")})(),g},R=()=>{T().catch(d=>{e.onError?.(d instanceof Error?d.message:"Could not release the realtime voice lease."),e.onState?.("error")})},L=()=>{R()};e.signal?.addEventListener("abort",L,{once:!0}),t.ontrack=({streams:d})=>{const m=d[0];if(!m||r)return;const[y]=m.getAudioTracks();y&&y.addEventListener("ended",()=>{r||e.onError?.("Realtime voice audio ended unexpectedly.")}),n.srcObject=m,n.play().catch(()=>{e.onError?.("Browser playback was blocked. Interact with the page, then start the call again.")})},t.onconnectionstatechange=()=>{r||(t.connectionState==="connected"?(e.onState?.("live"),A("Realtime channel connected","Scoutbot bridge is ready")):(t.connectionState==="failed"||t.connectionState==="disconnected")&&(e.onError?.("Realtime voice connection ended unexpectedly."),R()))};try{s=await fn(e.inputDeviceName,e.signal),se(e.signal);for(const h of s.getTracks())t.addTrack(h,s);const d=t.createDataChannel("oai-events"),m=new Set;let y=Promise.resolve(),j=!1,S=null;const E=[],O=h=>{if(r||d.readyState!=="open")return!1;try{return d.send(JSON.stringify(h)),!0}catch{return e.onError?.("Realtime voice events channel closed unexpectedly."),!1}},N=()=>{if(j||S||E.length===0)return;const h=E.shift();if(h){if(S=h,!O({type:"response.create",response:{instructions:h}})){S=null,E.unshift(h);return}j=!0}},u=h=>{E.push(h),N()};d.addEventListener("open",()=>{if(r)return;const h=dn(e.inputDeviceName);if(!O({type:"session.update",session:{type:"realtime",audio:{input:h}}})){e.onError?.("Could not configure Scout's realtime microphone processing.");return}A("Scoutbot bridge ready","Live fleet context is available"),u("Open with one brief audible greeting: 'Hi, I’m Scoutbot. I can check the fleet and coordinate through Scout. What would you like to work on?'")}),d.addEventListener("error",()=>{r||e.onError?.("Realtime voice events channel closed unexpectedly.")}),d.addEventListener("message",h=>{const _=on(h.data);if(_?.type==="error"){if($e(_.message)){S&&(E.unshift(S),S=null),j=!0,A("Scoutbot reply queued","Waiting for the current spoken response to finish","scoutbot");return}e.onError?.(_.message??"OpenAI Realtime reported an error.");return}if(_?.type==="response.created"){j=!0,S=null;return}if(_?.type==="response.done"){j=!1,S=null;for(const D of sn(_))D.name!=="ask_scoutbot"||m.has(D.callId)||(m.add(D.callId),y=y.then(()=>rn({functionCall:D,route:e.getRoute?.()??e.route,uiContext:e.getUiContext?.(),onReply:e.onScoutbotReply,onTrace:A,send:O,requestResponse:u})).catch(H=>{e.onError?.(H instanceof Error?H.message:"Scoutbot could not complete the voice request.")}));N()}});const p=await he(t.createOffer(),e.signal);if(await he(t.setLocalDescription(p),e.signal),!p.sdp)throw new Error("Could not create a WebRTC offer.");const C=await fetch(Qt,{method:"POST",headers:{"content-type":"application/sdp"},body:p.sdp,signal:e.signal});c=C.headers.get(Xt)?.trim()||null;const b=await he(C.text(),e.signal);if(!C.ok)throw new Error(ln(b,C.status));if(!c)throw new Error("Scout started the audio connection without a concurrency lease. Please try again.");return a=setInterval(()=>{if(!c||r)return;const h=c;pn(h).then(_=>{if(!(r||h!==c)){if(_){f=0;return}e.onError?.("Realtime voice lost its server lease. Reconnect to continue safely."),R()}}).catch(()=>{f+=1,!(f<2||r)&&(e.onError?.("Realtime voice could not renew its server lease. Check the connection and try again."),R())})},tn),await he(t.setRemoteDescription({type:"answer",sdp:b}),e.signal),se(e.signal),{leaseId:c,stop:T}}catch(d){throw await T(),d}}async function rn(e){const t=an(e.functionCall.arguments);if(!t){e.onTrace("Scoutbot request could not be read",void 0,"error"),ve(e,{ok:!1,error:"The voice request did not include a usable Scoutbot prompt."});return}e.onTrace("Scoutbot is checking the control plane",t,"scoutbot");try{const n=await fetch(en,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({body:t,route:e.route,uiContext:e.uiContext})}),r=await n.text();if(!n.ok)throw new Error(cn(r,n.status));const s=JSON.parse(r),c=typeof s.reply?.body=="string"?s.reply.body.trim():"";if(!c)throw new Error("Scoutbot returned an empty reply.");const a=De(c).filter(A=>A.type==="ask-agent").length,f=e.onReply?await e.onReply(c):{agentRequests:{requested:a,sent:0,failed:a}},w=at(c);e.onTrace("Scoutbot reply ready",void 0,"scoutbot"),ve(e,{ok:!0,reply:w,...f.agentRequests.requested>0?{agentRequests:f.agentRequests}:{}})}catch(n){const r=n instanceof Error?n.message:"Scoutbot could not complete the voice request.";e.onTrace("Scoutbot request failed",r,"error"),ve(e,{ok:!1,error:r})}}function ve(e,t){if(!e.send({type:"conversation.item.create",item:{type:"function_call_output",call_id:e.functionCall.callId,output:JSON.stringify(t)}}))return;const r=t.agentRequests;e.requestResponse(t.ok?r&&r.requested>0?r.failed>0?"Answer using the Scoutbot result. Say clearly that Scoutbot tried to send the agent request automatically but delivery failed, and tell the operator to check the activity log. Be concise and do not mention tools, JSON, fences, or implementation details.":"Answer using the Scoutbot result. Say clearly that the agent request was sent automatically. Do not claim the requested work is complete. Be concise and do not mention tools, JSON, fences, or implementation details.":"Answer using the Scoutbot result. Speak the useful answer naturally and concisely. Do not mention tools, JSON, fences, or implementation details.":"Briefly tell the operator that Scoutbot could not complete the live lookup and state the returned error plainly.")}function $e(e){const t=e?.toLowerCase()??"";return t.includes("active response in progress")||t.includes("conversation already has an active response")||t.includes("response is already in progress")}function on(e){if(typeof e!="string")return null;try{const t=JSON.parse(e);return{...typeof t.type=="string"?{type:t.type}:{},...typeof t.error?.message=="string"?{message:t.error.message}:{},...t.response&&typeof t.response=="object"?{response:t.response}:{}}}catch{return null}}function sn(e){return Array.isArray(e.response?.output)?e.response.output.flatMap(t=>{if(!t||typeof t!="object")return[];const n=t;return n.type!=="function_call"||typeof n.call_id!="string"||typeof n.name!="string"||typeof n.arguments!="string"?[]:[{callId:n.call_id,name:n.name,arguments:n.arguments}]}):[]}function an(e){try{const t=JSON.parse(e);if(typeof t.request!="string")return null;const n=t.request.trim();return n?n.slice(0,8e3):null}catch{return null}}function cn(e,t){try{const n=JSON.parse(e);if(typeof n.error=="string"&&n.error.trim())return n.error}catch{}return`Scoutbot could not complete the live lookup (HTTP ${t}).`}function ln(e,t){try{const n=JSON.parse(e);if(typeof n.error=="string"&&n.error.trim())return n.error}catch{}return`Could not start realtime voice (HTTP ${t}).`}async function he(e,t){return t?(se(t),new Promise((n,r)=>{const s=()=>r(be(t));t.addEventListener("abort",s,{once:!0}),e.then(c=>{t.removeEventListener("abort",s),n(c)},c=>{t.removeEventListener("abort",s),r(c)})})):e}async function Ne(e,t){return t?(se(t),new Promise((n,r)=>{let s=!1;const c=()=>{s=!0,r(be(t))};t.addEventListener("abort",c,{once:!0}),e.then(a=>{if(t.removeEventListener("abort",c),s||t.aborted){a.getTracks().forEach(f=>f.stop());return}n(a)},a=>{t.removeEventListener("abort",c),s||r(a)})})):e}const Oe={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1},un=/\b(?:airpods?|earbuds?|earphones?|headsets?|headphones?|buds?|hands[- ]?free)\b/iu;function dn(e){return un.test(e?.trim()??"")?Zt:Yt}async function fn(e,t){const n=await _e(e);let r=await Ne(navigator.mediaDevices.getUserMedia({audio:{...Oe,...n?{deviceId:{exact:n.deviceId}}:{}}}),t);if(!n&&e?.trim()){const s=await _e(e),c=r.getAudioTracks?.()[0]?.label?.trim().toLocaleLowerCase()??"";if(s&&s.label.trim().toLocaleLowerCase()!==c)try{const a=await Ne(navigator.mediaDevices.getUserMedia({audio:{...Oe,deviceId:{exact:s.deviceId}}}),t);r.getTracks().forEach(f=>f.stop()),r=a}catch(a){if(t?.aborted)throw r.getTracks().forEach(f=>f.stop()),a}}for(const s of r.getAudioTracks?.()??[])s.contentHint="speech";return r}async function _e(e){const t=e?.trim().toLocaleLowerCase();if(!t||typeof navigator.mediaDevices.enumerateDevices!="function")return null;try{const n=(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="audioinput"&&r.deviceId&&r.label.trim());return n.find(r=>r.label.trim().toLocaleLowerCase()===t)??n.find(r=>{const s=r.label.trim().toLocaleLowerCase();return s.includes(t)||t.includes(s)})??null}catch{return null}}function se(e){if(e?.aborted)throw be(e)}function be(e){return e.reason instanceof Error?e.reason:new DOMException("Realtime voice connection was cancelled.","AbortError")}async function pn(e){return(await fetch(`${Ve}/${encodeURIComponent(e)}`,{method:"PUT"})).ok}async function hn(e){const t=await fetch(`${Ve}/${encodeURIComponent(e)}`,{method:"DELETE",keepalive:!0});if(!t.ok&&t.status!==404)throw new Error(`Could not release realtime voice lease (HTTP ${t.status}).`)}const mn=[{id:"home",label:"Home",description:"Fleet overview, briefings, and recent activity.",route:{view:"inbox"}},{id:"projects",label:"Projects",description:"Projects, agents, and project-scoped work.",route:{view:"agents-v2"},deepActions:["Open a project by projectSlug.","Open an agent by agentId."]},{id:"sessions",label:"Sessions",description:"Active and recent harness sessions.",route:{view:"sessions"},deepActions:["Open a session by sessionId."]},{id:"messages",label:"Messages",description:"Direct conversations and channels.",route:{view:"messages"},deepActions:["Open a conversation by conversationId.","Filter by all, direct messages, or channels."]},{id:"dispatch",label:"Dispatch",description:"Requests, flights, work, and delivery state.",route:{view:"broker"}},{id:"search",label:"Search",description:"Knowledge and indexed workspace search.",route:{view:"search"}},{id:"operations",label:"Operations",description:"Mission Control, live activity, agent lanes, runtime, and mesh health.",route:{view:"ops",mode:"mission"}},{id:"repositories",label:"Repositories",description:"Repository and worktree status, including diffs.",route:{view:"repos"},deepActions:["Open a repository by absolute root."]},{id:"code-browser",label:"Code Browser",description:"Read files in a project or worktree.",route:{view:"code"},deepActions:["Select a project with the project field; it accepts the displayed project name or slug.","Open a file inside it with path and optional wt.","Alternatively use absolute root and file fields.","Focus a line with line and optional endLine.","Deep links: scout://{project}/{path}, scout:///{absolute/path}, or legacy scout://code/{project}/{path}."]},{id:"terminals",label:"Terminals",description:"Observe or take over terminal sessions.",route:{view:"terminal"}},{id:"settings",label:"Settings",description:"Connections, agents, communications, credentials, voice, and devices.",route:{view:"settings"}}],vn=[{id:"comms",label:"Comms",description:"Native conversations and channels.",route:{view:"messages"},deepActions:["Open a conversation by conversationId.","Open a channel by channelId."]},{id:"projects",label:"Projects",description:"Native project and agent browser.",route:{view:"agents-v2"},deepActions:["Filter to a project by projectSlug.","Select an agent by agentId."]},{id:"terminals",label:"Terminals",description:"Native terminal workspace.",route:{view:"terminal"},deepActions:["Select an agent terminal by agentId."]},{id:"tail",label:"Tail",description:"Live agent and harness activity.",route:{view:"ops",mode:"tail"}},{id:"dispatch",label:"Dispatch",description:"Dispatch and coordination overview.",route:{view:"broker"}},{id:"agent-lanes",label:"Agent Lanes",description:"Native lane overview for active agents.",route:{view:"ops",mode:"lanes"}},{id:"repositories",label:"Repositories",description:"Native repository and worktree status.",route:{view:"repos"}},{id:"code-browser",label:"Code Browser",description:"Embedded read-only project browser.",route:{view:"code"},deepActions:["Select a project with the project field; it accepts the displayed project name or slug.","Open a file inside it with path and optional wt.","Alternatively use absolute root and file fields.","Focus a line with line and optional endLine.","Deep links: scout://{project}/{path}, scout:///{absolute/path}, or legacy scout://code/{project}/{path}."]},{id:"settings",label:"Settings",description:"Native app settings; Voice is directly addressable.",route:{view:"settings"},deepActions:["Open Voice settings with section=voice."]}];function gn(e){const t=e==="macos";return{host:e,shellLabel:t?"Scout for macOS":"OpenScout web",destinations:t?vn:mn,rules:["When asked what navigation is available, list only these human labels and short descriptions.","Never expose internal Route.view names, aliases, URL fragments, or implementation vocabulary in the human reply.","Emit only a destination route or deep action explicitly described by this host context.","If the requested destination or deep action is absent, say it is not available in this app instead of approximating it with another page."]}}const wn="scout:scoutbot-realtime-reply",me="scout:scoutbot-session-changed",bn={enabled:!1,open:!1,state:"idle",leaseId:null,error:null,trace:[],chatState:null,sessionAction:null,setOpen:()=>{},startCall:async()=>{},endCall:async()=>!0,startNewChat:async()=>{},switchChat:async()=>{},updatePreferredModel:async e=>e,clearTrace:()=>{},openVoiceSettings:()=>{}},Je=o.createContext(bn);function yn({children:e}){const{route:t,applyScoutbotUiAction:n}=Ge(),r=je(He,!1),[s,c]=o.useState(!1),[a,f]=o.useState("idle"),[w,A]=o.useState(null),[g,T]=o.useState(null),[R,L]=o.useState([]),[d,m]=o.useState(null),[y,j]=o.useState(null),S=o.useRef(null),E=o.useRef(null),O=o.useRef(null),N=o.useRef(0),u=o.useRef(!1),p=o.useRef(!1),C=o.useRef({route:t,applyScoutbotUiAction:n});C.current={route:t,applyScoutbotUiAction:n};const b=o.useCallback((v,k,I="voice")=>{L(P=>[...P,{id:`voice-ui-${Date.now()}-${P.length}`,at:Date.now(),kind:I,label:v,...k?{detail:k}:{}}].slice(-100))},[]),h=o.useCallback(()=>L([]),[]),_=o.useCallback(async()=>{const v=await J("/api/scoutbot/session");return u.current||m(v),v},[]);o.useEffect(()=>{if(!r)return;const v=()=>{_().catch(k=>{u.current||T(k instanceof Error?k.message:"Could not load Scoutbot chats.")})};return v(),window.addEventListener(me,v),()=>window.removeEventListener(me,v)},[r,_]);const D=o.useCallback(async()=>{N.current+=1;const v=O.current;E.current?.abort(),E.current=null;const k=S.current;S.current=null;try{await k?.stop(),await v}catch(I){return u.current||(f("error"),T(I instanceof Error?I.message:"Could not end realtime voice cleanly.")),!1}return u.current||(A(null),f("ended"),b("Live voice ended","Microphone and host lease released","voice")),!0},[b]);o.useEffect(()=>{r||(c(!1),(S.current||a==="connecting"||a==="live")&&D())},[r,D,a]),o.useEffect(()=>(u.current=!1,()=>{u.current=!0,N.current+=1,E.current?.abort(),E.current=null,S.current?.stop().catch(()=>{}),S.current=null}),[]);const H=o.useCallback(async v=>{window.dispatchEvent(new CustomEvent(wn,{detail:{body:v}}));const k=v.replace(/```[\s\S]*?```/gu,"").trim();k&&b("Scoutbot replied",k.slice(0,2e3),"scoutbot");let I=0,P=0,q=0;for(const M of De(v))if(M.type==="ask-agent")I+=1,await En(M,b,T)?P+=1:q+=1;else if(M.type!=="reminder"){const F=kn(M),V=M.type==="navigate"||M.type==="view-file"?"navigation":"scoutbot";b(Cn(M),F,V),C.current.applyScoutbotUiAction(M),b(Te()?"Action sent to Scout for macOS":"Action applied in OpenScout",F,V)}return await _().catch(()=>null),{agentRequests:{requested:I,sent:P,failed:q}}},[b,_]),ee=o.useCallback(()=>{const v={type:"navigate",route:{view:"settings",section:"voice"}};b("Voice settings requested",void 0,"navigation"),C.current.applyScoutbotUiAction(v)},[b]),te=o.useCallback(async()=>{if(!r){T("Turn on live voice in Settings → Voice before starting a call."),c(!1);return}if(p.current||a==="connecting"||a==="live")return;p.current=!0,E.current?.abort();const v=S.current;S.current=null;try{await v?.stop(),A(null)}catch(F){f("error"),T(F instanceof Error?F.message:"Could not end the previous realtime voice call."),p.current=!1;return}const k=new AbortController;E.current=k;const I=N.current+1;N.current=I;let P=()=>{};const q=new Promise(F=>{P=F});O.current=q;let M=!1;T(null),L([{id:"connecting",at:Date.now(),label:"Connecting secure audio"}]),f("connecting");try{const F=await bt().then(({settings:B})=>B.inputDeviceName).catch(()=>null),V=await nn({signal:k.signal,inputDeviceName:F,getRoute:()=>C.current.route,getUiContext:()=>gn(Te()?"macos":"web"),onState:B=>{!u.current&&N.current===I&&f(B)},onError:B=>{if(!(u.current||N.current!==I)){if($e(B)){b("Scoutbot reply queued","Waiting for the current spoken response to finish","scoutbot");return}T(B),b("Voice issue",B,"error")}},onTrace:B=>{!u.current&&N.current===I&&L(ae=>[...ae,B].slice(-100))},onScoutbotReply:B=>!u.current&&N.current===I?H(B):{agentRequests:{requested:0,sent:0,failed:0}}});if(u.current||k.signal.aborted||N.current!==I){await V.stop();return}S.current=V,A(V.leaseId),M=!0}catch(F){if(!u.current&&N.current===I&&!Sn(F)){f("error");const V=F instanceof Error?F.message:"Could not start realtime voice.";T(V),b("Live voice could not start",V,"error")}}finally{!M&&E.current===k&&(E.current=null),P(),O.current===q&&(O.current=null),p.current=!1}},[b,H,r,a]),ne=o.useCallback(async()=>{if(!y){j("new"),T(null);try{if((S.current||a==="connecting"||a==="live")&&!await D())return;if(d?.session.messages.length===0){L([{id:`voice-chat-${Date.now()}`,at:Date.now(),kind:"scoutbot",label:"New live chat ready"}]);return}const v=await J("/api/scoutbot/session/reset",{method:"POST"});m(v),L([{id:`voice-chat-${Date.now()}`,at:Date.now(),kind:"scoutbot",label:"New live chat ready"}]),window.dispatchEvent(new CustomEvent(me,{detail:{id:v.session.id}}))}catch(v){const k=v instanceof Error?v.message:"Could not start a new Scoutbot chat.";T(k),b("Could not start a new live chat",k,"error")}finally{j(null)}}},[b,d?.session.messages.length,D,y,a]),W=o.useCallback(async v=>{if(!(!v||y||v===d?.session.id)){j(v),T(null);try{if((S.current||a==="connecting"||a==="live")&&!await D())return;const k=await J("/api/scoutbot/session/switch",{method:"POST",body:JSON.stringify({id:v})});m(k),L([{id:`voice-chat-${Date.now()}`,at:Date.now(),kind:"scoutbot",label:"Live chat restored",detail:k.session.title}]),window.dispatchEvent(new CustomEvent(me,{detail:{id:k.session.id}}))}catch(k){const I=k instanceof Error?k.message:"Could not switch Scoutbot chats.";T(I),b("Could not restore the live chat",I,"error")}finally{j(null)}}},[b,d?.session.id,D,y,a]),Q=o.useCallback(async v=>{const k=v.trim();if(!k)throw new Error("Preferred model is required.");const I=await J("/api/scoutbot/config",{method:"POST",body:JSON.stringify({model:k})});return m(P=>P&&{...P,config:{...P.config,...I.config}}),b("Scoutbot preferred model updated",I.config.model,"scoutbot"),I.config.model},[b]),ie=o.useMemo(()=>({enabled:r,open:s,state:a,leaseId:w,error:g,trace:R,chatState:d,sessionAction:y,setOpen:c,startCall:te,endCall:D,startNewChat:ne,switchChat:W,updatePreferredModel:Q,clearTrace:h,openVoiceSettings:ee}),[r,s,a,w,g,R,d,y,te,D,ne,W,Q,h,ee]);return i.jsx(Je.Provider,{value:ie,children:e})}function Sn(e){return(e instanceof DOMException||e instanceof Error)&&e.name==="AbortError"}function pr(){return o.useContext(Je)}function Cn(e){return e.type==="navigate"?"Navigation requested":e.type==="open-scoutbot"?"Scoutbot opened its panel":e.type==="refresh"?"Scoutbot refreshed live state":"Scoutbot opened the requested file"}function kn(e){return e.type==="navigate"?JSON.stringify(e.route):e.type==="view-file"?e.path:e.reason?.trim()||e.type}async function En(e,t,n){t("Scoutbot is coordinating",`Asking ${e.targetLabel}`,"agent");try{const r=await J("/api/scoutbot/actions/ask",{method:"POST",body:JSON.stringify({targetLabel:e.targetLabel,targetAgentId:e.targetAgentId,body:e.body,channel:e.channel})});return t("Scoutbot sent the request",r.flightId?`${r.targetAgentId??r.targetLabel} · run ${r.flightId}`:r.targetAgentId??r.targetLabel,"agent"),!0}catch(r){const s=r instanceof Error?r.message:"Could not send to agent.";return t("Scoutbot could not send the request",s,"error"),n(s),!1}}function ge(e,t){const n=t?.trim();n&&e.add(n)}function xn(e,t){const n=new Set;return ge(n,e.authorityNodeId),ge(n,e.homeNodeId),n.size===0&&ge(n,t),n}function Ke(e,t,n){return t?xn(e,n).has(t):!0}function An(e,t,n){return t?e.filter(r=>Ke(r,t,n)):e}function hr(e,t,n){return t?new Set(e.filter(r=>Ke(r,t,n)).map(r=>r.id)):null}function G(e,t,n){return!t&&!n||n&&e.authorityNodeId===n?!0:t?e.agentId&&t.has(e.agentId)||e.actorId&&t.has(e.actorId)||e.ownerId&&t.has(e.ownerId)||e.nextMoveOwnerId&&t.has(e.nextMoveOwnerId)?!0:!!e.participantIds?.some(r=>t.has(r)):!1}function Tn(e,t,n){return G(e,t,n)}function mr(e,t,n){return!t&&!n?e:e.filter(r=>Tn(r,t,n))}function Rn(e,t){return G(e,t)}function In(e,t){return t?e.filter(n=>Rn(n,t)):e}function Le(e,t){return G(e,t)}function vr(e,t){if(!e||!t)return e;const n=e.activeAsks.filter(a=>G(a,t)),r=e.recentCompleted.filter(a=>G(a,t)),s=e.needsAttention.filter(a=>G(a,t)),c=In(e.activity,t);return{...e,totals:{active:n.length,recentCompleted:r.length,needsAttention:s.length,activity:c.length},activeAsks:n,recentCompleted:r,needsAttention:s,activity:c}}function gr(e,t){if(!t)return e;const n=e.activeFlights.filter(c=>G(c,t)),r=e.childWork.filter(c=>Le(c,t));return Le(e,t)||n.length>0||r.length>0?{...e,activeFlights:n,childWork:r}:null}function Nn(e){return!!(e&&(e.message.trim().length>0||e.files.length>0||e.forwardContext))}function On(e){return[e.name,e.type,e.size,e.lastModified].join(":")}function _n(e,t){const n=new Set;return[...e,...t].filter(r=>{const s=On(r);return n.has(s)?!1:(n.add(s),!0)})}function Ln(e,t){const n=t.intent??e?.intent??"new-task",r=n==="route-capture",s=n==="forward-message";return{intent:n,...r&&(t.agentId??e?.agentId)?{agentId:t.agentId??e?.agentId}:{},...r&&(t.conversationId??e?.conversationId)?{conversationId:t.conversationId??e?.conversationId}:{},message:t.message??e?.message??"",files:_n(e?.files??[],t.files??[]),attachmentFeedback:t.attachmentFeedback??e?.attachmentFeedback??null,mode:r?t.preferExistingChat===void 0?e?.mode??"new-session":t.preferExistingChat?"existing-chat":"new-session":"new-session",projectPath:t.projectPath??e?.projectPath??"",projectQuery:e?.projectQuery??"",...s&&(t.forwardContext??e?.forwardContext)?{forwardContext:t.forwardContext??e?.forwardContext}:{},forwardContextMode:s?t.forwardContextMode??e?.forwardContextMode??"selected-message":"selected-message"}}function jn({request:e,onClose:t,onOpenCapture:n}){const{agents:r,route:s,navigate:c}=Ge(),a=nt(s),f=An(r,a),w=St(s,f),[A,g]=o.useState(0),[T,R]=o.useState(null),[L,d]=o.useState(null),m=o.useRef(0),y=e?Ln(L,e):null,j=o.useCallback((E,O)=>{if(E.length===0)return;const N=!!(w.agentId||w.conversationId);n({intent:N?"route-capture":"new-task",files:E,attachmentFeedback:O,agentId:w.agentId??void 0,conversationId:w.conversationId??void 0,preferExistingChat:w.canUseExistingChat})},[n,w]);o.useEffect(()=>{if(!T)return;const E=window.setTimeout(()=>R(null),5e3);return()=>window.clearTimeout(E)},[T]),o.useEffect(()=>{const E=C=>{pe(C.dataTransfer)&&(C.preventDefault(),m.current+=1,g(m.current))},O=C=>{pe(C.dataTransfer)&&(C.preventDefault(),C.dataTransfer&&(C.dataTransfer.dropEffect="copy"))},N=()=>{m.current!==0&&(m.current=Math.max(0,m.current-1),g(m.current))},u=C=>{if(!pe(C.dataTransfer))return;C.preventDefault();const b=Re(C.dataTransfer),h=b.filter(Ie),_=b.length-h.length;if(m.current=0,g(0),h.length===0){R(b.length===0?"Scout could not read that file. Try the attachment picker instead.":"That file type is not supported. Drop markdown, code, an image, or a video clip.");return}const D=h.length===1?`Dropped ${h[0]?.name||"1 attachment"}.`:`Dropped ${h.length} attachments.`,H=_>0?`${D} Skipped ${_} unsupported ${_===1?"file":"files"}.`:D;R(null),j(h,H)},p=C=>{if(yt(C.target)||!pe(C.clipboardData))return;C.preventDefault();const b=Re(C.clipboardData),h=b.filter(Ie);if(h.length===0){R(b.length===0?"Scout could not read that pasted file. Try the attachment picker instead.":"That pasted file type is not supported. Paste an image or video, or attach markdown or code.");return}j(h,h.length===1?`Pasted ${h[0]?.name||"1 attachment"}.`:`Pasted ${h.length} attachments.`)};return window.addEventListener("dragenter",E),window.addEventListener("dragover",O),window.addEventListener("dragleave",N),window.addEventListener("drop",u),window.addEventListener("paste",p),()=>{window.removeEventListener("dragenter",E),window.removeEventListener("dragover",O),window.removeEventListener("dragleave",N),window.removeEventListener("drop",u),window.removeEventListener("paste",p)}},[j]);const S=A>0&&!e;return i.jsxs(i.Fragment,{children:[S?i.jsx("div",{className:"s-capture-drop",role:"presentation",children:i.jsxs("div",{className:"s-capture-drop-card",children:[i.jsx("div",{className:"s-capture-drop-title",children:"Route capture"}),i.jsx("div",{className:"s-capture-drop-copy",children:"Drop markdown, code, an image, or a video clip to send it to the right agent or chat."})]})}):null,T?i.jsx("div",{className:"s-capture-feedback",role:"alert",children:T}):null,e?i.jsx(Ct,{agents:f,route:s,navigate:c,onClose:t,initialAgentId:y?.agentId,initialConversationId:y?.conversationId,initialMessage:y?.message,initialFiles:y?.files,initialAttachmentFeedback:y?.attachmentFeedback??void 0,initialIntent:y?.intent,initialProjectPath:y?.projectPath,initialProjectQuery:y?.projectQuery,initialForwardContext:y?.forwardContext,initialForwardContextMode:y?.forwardContextMode,defaultMode:y?.mode,draftRestored:Nn(L),onDraftChange:d,onDraftConsumed:()=>d(null)}):null]})}const ze=o.createContext(null),Dn=["hello","node.upserted","actor.registered","agent.registered","agent.endpoint.upserted","invocation.requested","flight.updated","delivery.state.changed","scout.dispatched"],Pn=new Set(Dn),Mn=3e4,Fn=250;function Un(e,t){try{return JSON.stringify(e)===JSON.stringify(t)?e:t}catch{return t}}const Bn={"--hud-bg":"oklch(0.132 0.004 260)","--hud-surface":"oklch(0.178 0.005 260)","--hud-ink":"oklch(0.965 0.006 260)","--hud-muted":"oklch(0.72 0.008 260)","--hud-dim":"oklch(0.57 0.007 260)","--hud-border":"oklch(0.965 0.006 260 / 0.04)","--hud-accent":"oklch(0.86 0.17 125)","--hud-accent-soft":"oklch(0.86 0.17 125 / 0.08)","--hud-shadow-soft":"oklch(0.08 0.004 260 / 0.42)","--hud-chrome-border":"oklch(0.965 0.006 260 / 0.012)","--hud-shadow-panel":"0 12px 34px oklch(0.08 0.004 260 / 0.45)","--hud-shadow-panel-hover":"0 14px 38px oklch(0.08 0.004 260 / 0.52)","--hud-shadow-bar":"0 -10px 28px oklch(0.08 0.004 260 / 0.38)","--hud-shadow-nav":"0 8px 24px oklch(0.08 0.004 260 / 0.32)","--hud-shadow-minimap":"0 10px 24px oklch(0.08 0.004 260 / 0.38)","--hud-status-ok":"oklch(0.80 0.15 155)","--hud-status-warn":"oklch(0.82 0.15 85)","--hud-status-error":"oklch(0.72 0.18 25)","--background":"0.132 0.004 260","--foreground":"0.965 0.006 260","--card":"0.178 0.005 260","--card-foreground":"0.965 0.006 260","--popover":"0.178 0.005 260","--popover-foreground":"0.965 0.006 260","--muted-foreground":"0.72 0.008 260","--scrim":"rgba(0, 0, 0, 0.5)","--scrim-soft":"rgba(0, 0, 0, 0.3)","--info":"#62b6ff","--shadow-card":"0 8px 22px rgba(0, 0, 0, 0.22)","--shadow-card-hover":"0 14px 36px rgba(0, 0, 0, 0.30)","--cat-gold":"#d7a978","--cat-purple":"#c58cff","--cat-sky":"#38bdf8","--scout-chrome-ink-strong":"color-mix(in srgb, var(--hud-ink) 92%, transparent)","--scout-chrome-ink":"color-mix(in srgb, var(--hud-ink) 78%, transparent)","--scout-chrome-ink-soft":"color-mix(in srgb, var(--hud-ink) 58%, transparent)","--scout-chrome-ink-faint":"color-mix(in srgb, var(--hud-ink) 55%, transparent)","--scout-chrome-ink-ghost":"color-mix(in srgb, var(--hud-ink) 48%, transparent)","--scout-chrome-hover":"color-mix(in srgb, var(--hud-ink) 4%, transparent)","--scout-chrome-active":"color-mix(in srgb, var(--hud-ink) 8%, transparent)","--scout-chrome-border-soft":"color-mix(in srgb, var(--hud-ink) 4%, transparent)","--scout-chrome-avatar-ink":"#111111","--hud-font-sans":"'Inter', ui-sans-serif, system-ui, sans-serif","--hud-font-mono":"'JetBrains Mono', ui-monospace, Menlo, monospace","--hud-font-serif":"'Spectral', 'Cormorant Garamond', Georgia, serif","--hud-font-accent-title":"'Inter Tight', var(--hud-font-sans)"},qn={"--hud-bg":"oklch(0.982 0.008 78)","--hud-surface":"oklch(0.994 0.006 78)","--hud-ink":"oklch(0.26 0.018 72)","--hud-muted":"oklch(0.50 0.028 70)","--hud-dim":"oklch(0.64 0.022 72)","--hud-border":"oklch(0.86 0.016 75 / 0.92)","--hud-accent":"oklch(0.72 0.16 125)","--hud-accent-soft":"oklch(0.72 0.16 125 / 0.11)","--hud-shadow-soft":"oklch(0.42 0.02 70 / 0.11)","--hud-status-ok":"oklch(0.64 0.16 155)","--hud-status-warn":"oklch(0.72 0.15 85)","--hud-status-error":"oklch(0.62 0.19 25)","--background":"0.978 0.004 85","--foreground":"0.24 0.01 80","--card":"0.992 0.003 85","--card-foreground":"0.24 0.01 80","--popover":"0.992 0.003 85","--popover-foreground":"0.24 0.01 80","--muted-foreground":"0.56 0.014 80","--scrim":"rgba(28, 24, 20, 0.30)","--scrim-soft":"rgba(28, 24, 20, 0.16)","--info":"#2f7fd6","--shadow-card":"0 8px 22px oklch(0.42 0.02 70 / 0.09)","--shadow-card-hover":"0 14px 36px oklch(0.42 0.02 70 / 0.13)","--cat-gold":"#a9824f","--cat-purple":"#8b5cf6","--cat-sky":"#0ea5e9","--scout-chrome-ink-strong":"color-mix(in srgb, var(--hud-ink) 94%, transparent)","--scout-chrome-ink":"color-mix(in srgb, var(--hud-ink) 78%, transparent)","--scout-chrome-ink-soft":"color-mix(in srgb, var(--hud-ink) 60%, transparent)","--scout-chrome-ink-faint":"color-mix(in srgb, var(--hud-ink) 56%, transparent)","--scout-chrome-ink-ghost":"color-mix(in srgb, var(--hud-ink) 50%, transparent)","--scout-chrome-hover":"color-mix(in srgb, var(--hud-ink) 4%, transparent)","--scout-chrome-active":"color-mix(in srgb, var(--hud-ink) 8%, transparent)","--scout-chrome-border-soft":"color-mix(in srgb, var(--hud-border) 80%, transparent)","--scout-chrome-avatar-ink":"#ffffff","--hud-font-sans":"'Inter', ui-sans-serif, system-ui, sans-serif","--hud-font-mono":"'JetBrains Mono', ui-monospace, Menlo, monospace","--hud-font-serif":"'Spectral', 'Cormorant Garamond', Georgia, serif","--hud-font-accent-title":"'Inter Tight', var(--hud-font-sans)"},Vn=new Set(["--hud-bg","--hud-surface","--hud-ink","--hud-muted","--hud-dim","--hud-border","--hud-accent","--hud-accent-soft","--hud-shadow-soft","--hud-chrome-border","--hud-shadow-panel","--hud-shadow-panel-hover","--hud-shadow-bar","--hud-shadow-nav","--hud-shadow-minimap","--hud-status-ok","--hud-status-warn","--hud-status-error"]);function Hn(e){return Object.fromEntries(Object.entries(e==="light"?qn:Bn).filter(([n])=>!Vn.has(n)))}function Ge(){const e=o.useContext(ze);if(!e)throw new Error("useScout must be used inside ScoutProvider");return e}function wr({children:e,initialTheme:t="dark"}){const{route:n,navigate:r}=rt(),s=kt(),c=je(He,!1),[a,f]=o.useState([]),[w,A]=o.useState(!1),[g,T]=o.useState({status:"checking",message:null,lastCheckedAt:null}),[R,L]=o.useState(xe),[d,m]=o.useState(null),[y,j]=o.useState(!1),[S,E]=o.useState(null),[O,N]=o.useState(null),[u,p]=o.useState(""),[C,b]=o.useState(null),h=n.view==="settings",_=o.useMemo(()=>n.view!=="broker"||!n.attemptId?null:S?.id===n.attemptId?S:null,[S,n]),D=o.useMemo(()=>n.view!=="search"||!n.hitId?null:O?.id===n.hitId?O:null,[O,n]),H=o.useMemo(()=>n.view==="agents-v2"&&n.agentId&&n.sessionId?{agentId:n.agentId,sessionId:n.sessionId}:n.view==="sessions"&&n.sessionId?{agentId:n.agentId??"",sessionId:n.sessionId}:null,[n]),ee=o.useCallback((l,x)=>{if(n.view==="agents-v2"&&n.agentId===l){r({...n,sessionId:x},{replace:!0});return}if(n.view==="sessions"){r({view:"sessions",sessionId:x,agentId:l},{replace:!0});return}r({view:"agents-v2",agentId:l,sessionId:x},{replace:!0})},[r,n]),te=o.useCallback(()=>{r({view:"settings",section:"appearance"})},[r]),ne=o.useCallback(()=>{n.view==="settings"&&r({view:"inbox"})},[r,n.view]),W=o.useCallback(l=>{b(l??{intent:"new-task"})},[]),Q=o.useCallback(()=>b(null),[]),ie=o.useCallback(l=>{E(l),!(n.view==="broker"&&n.attemptId===l.id)&&r({view:"broker",attemptId:l.id,...n.view==="broker"&&n.filter?{filter:n.filter}:{}},{replace:n.view==="broker"})},[r,n]),v=o.useCallback(()=>{E(null),n.view==="broker"&&n.attemptId&&r({view:"broker",...n.filter?{filter:n.filter}:{}},{replace:!0})},[r,n]),k=o.useCallback((l,x,U)=>{if(N(l),typeof x=="string"&&p(x.trim()),n.view==="search"&&n.hitId===l.id)return;const $=U??(n.view==="search"?n.filters:void 0);r({view:"search",...n.view==="search"&&n.mode?{mode:n.mode}:{},...$?{filters:$}:{},hitId:l.id},{replace:n.view==="search"})},[r,n]),I=o.useCallback(()=>{N(null),p(""),n.view==="search"&&n.hitId&&r({view:"search",...n.mode?{mode:n.mode}:{},...n.filters?{filters:n.filters}:{}},{replace:!0})},[r,n]),P=o.useMemo(()=>Ye(),[]),q=s?.resolvedTheme??t,M=s?.template??"hudson",F=o.useMemo(()=>({...Hn(q),...P??{}}),[P,q]),V=o.useCallback(l=>{L(x=>({...x,...l}))},[]);o.useEffect(()=>{Ze(q,M,R),et(R)},[M,R,q]),o.useEffect(()=>{const l=x=>{x.key!==null&&x.key!==tt||L(xe())};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[]);const B=o.useMemo(()=>ct(a),[a]),ae=B?.id??lt(a),ye=B?.conversationId??null,ce=o.useRef(null),X=o.useRef(null),le=n.view==="ops"?"/api/agents":"/api/agents?detail=summary",ue=o.useCallback(()=>{T({status:"online",message:null,lastCheckedAt:Date.now()})},[]),de=o.useCallback(l=>{const x=Et(l);T({status:xt(x)?"offline":"degraded",message:x,lastCheckedAt:Date.now()})},[]),K=o.useCallback(async()=>{const l=ce.current;if(l&&(await l.promise,l.url===le))return;const x=(async()=>{try{const U=await J(le);f($=>Un($,U)),ue()}catch(U){de(U)}finally{A(!0)}})();ce.current={url:le,promise:x};try{await x}finally{ce.current?.promise===x&&(ce.current=null)}},[le,de,ue]),Y=o.useCallback(async()=>{try{const l=await J("/api/onboarding/state");m(l),ue()}catch(l){de(l),m({hasLocalConfig:!0,hasProjectConfig:!0,hasOperatorName:!0,localConfigPath:null,projectRoot:null,currentDirectory:null,operatorName:null,operatorNameSuggestion:null})}},[de,ue]),Se=o.useCallback(()=>{j(!0),J("/api/onboarding/skip",{method:"POST",body:"{}"}).then(()=>Y()).catch(()=>null)},[Y]);o.useEffect(()=>{K(),Y()},[K,Y]),o.useEffect(()=>{const l=()=>{Ae()&&K()},x=window.setInterval(l,Mn),U=st(l);return()=>{window.clearInterval(x),U()}},[K]);const Ce=o.useMemo(()=>a.filter(l=>it(l.state)).length,[a]),[We,ke]=o.useState(null),re=o.useCallback(l=>{l?.trim()&&ke(l.trim())},[]),oe=o.useCallback(()=>ke(null),[]),Z=o.useCallback(l=>{if(!ut(l))switch(l.type){case"navigate":r(l.route);break;case"focus-composer":window.dispatchEvent(new CustomEvent("scout:composer-focus"));break;case"open-scoutbot":window.dispatchEvent(new CustomEvent("scout:scoutbot-panel-open",{detail:l}));break;case"refresh":K();break;case"view-file":re(l.path);break}},[r,re,K]),Qe=o.useCallback((l,x)=>{const U=l.trim(),$=x.trim();if(!U||!$)return;const Ee=n.view==="conversation"||n.view==="messages"?n.conversationId:window.location.pathname==="/embed/thread"&&new URLSearchParams(window.location.search).get("conversationId")?.trim()||void 0;oe(),Z({type:"navigate",route:{view:"code",root:$,file:U,...Ee?{returnConversationId:Ee}:{}}})},[Z,oe,n]),fe=o.useRef({applyScoutbotUiAction:Z});fe.current={applyScoutbotUiAction:Z},ot(l=>{Ae()&&Pn.has(l.kind)&&(X.current!==null&&window.clearTimeout(X.current),X.current=window.setTimeout(()=>{X.current=null,K()},Fn))}),o.useEffect(()=>()=>{X.current!==null&&window.clearTimeout(X.current)},[]),o.useEffect(()=>{const l=x=>{const U=x.detail,$=U&&typeof U=="object"&&"type"in U?U:null;$&&fe.current.applyScoutbotUiAction($)};return window.addEventListener("scout:scoutbot-ui-action",l),window.scoutScoutbot={applyUiAction:x=>fe.current.applyScoutbotUiAction(x),navigate:x=>fe.current.applyScoutbotUiAction({type:"navigate",route:x})},()=>{window.removeEventListener("scout:scoutbot-ui-action",l),window.scoutScoutbot?.applyUiAction&&delete window.scoutScoutbot}},[]);const Xe=o.useMemo(()=>({route:n,navigate:r,agents:a,agentsLoaded:w,onlineCount:Ce,apiConnection:g,reload:K,appearanceDetails:R,updateAppearanceDetails:V,onboarding:d,refreshOnboarding:Y,onboardingSkipped:y,skipOnboarding:Se,settingsOpen:h,openSettings:te,closeSettings:ne,scoutbotAgentId:ae,scoutbotConversationId:ye,applyScoutbotUiAction:Z,selectedBrokerAttempt:_,inspectBrokerAttempt:ie,clearBrokerAttempt:v,selectedKnowledgeHit:D,selectedKnowledgeQuery:u,inspectKnowledgeHit:k,clearKnowledgeHit:I,focusedSession:H,focusSession:ee,openFilePreview:re,closeFilePreview:oe,openContextCapture:W,closeContextCapture:Q}),[n,r,a,w,Ce,g,K,R,V,d,Y,y,Se,h,te,ne,ae,ye,Z,_,ie,v,D,u,k,I,H,ee,re,oe,W,Q]);return i.jsx(ze.Provider,{value:Xe,children:i.jsx("div",{"data-scout-theme-mode":q,"data-scout-palette":R.palette,"data-scout-contrast":R.contrast,"data-scout-accent":R.accent,"data-scout-shell":R.shell,"data-hudson-theme":q,"data-hudson-template":M,style:{...F},children:i.jsx("div",{"data-scout-theme":q,style:{display:"contents"},children:i.jsx(dt,{children:i.jsxs(zt,{children:[c?i.jsx(yn,{children:e}):e,i.jsx(Vt,{path:We,onOpenPath:re,onOpenInCode:Qe,onClose:oe}),i.jsx(jn,{request:C,onClose:Q,onOpenCapture:W})]})})})})})}export{Rt as A,Nt as C,Bn as D,qn as L,ze as S,He as a,pr as b,fr as c,In as d,An as e,Et as f,mr as g,vr as h,xt as i,wr as j,gr as k,ur as l,hr as m,dr as n,me as o,wn as p,gn as s,Ge as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,j as n}from"./index-sUomXsrf.js";/* empty css */import{D as O}from"./DataTable-0DwuXyvW.js";import{p as W,a as L}from"./api-h5zurxmi.js";import{t as U,n as R,f as Y}from"./time-Dhsh_2EG.js";import{u as G}from"./tail-events-CTipUIli.js";import{o as Q}from"./openContent-C6XO6kr5.js";import{u as X}from"./Provider-tFc3jqZ4.js";/* empty css */import"./index-BWHgHrtv.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CVoGDiKW.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";const q=1e4,J=500,$=1e3,Z=6e4,D="/api/tail/discover",_=`/api/tail/recent?limit=${J}`,P=3e4,tt=[{key:"status",label:"status",cls:"s-atop-col-status",kind:"text",sortable:!1,defaultWidth:96,minWidth:70,render:t=>n.jsxs("span",{className:`s-atop-status s-atop-status--${t.status}`,children:[n.jsx("span",{className:"s-atop-status-dot","aria-hidden":"true"}),t.statusLabel]})},{key:"session",label:"session",cls:"s-atop-col-agent",kind:"text",sortable:!1,defaultWidth:168,minWidth:110,maxWidth:280,render:t=>n.jsxs("div",{className:"s-atop-agent-cell",title:t.sessionId??t.refId,children:[n.jsx("span",{className:`s-atop-chip s-atop-chip--harness s-atop-chip--harness-${st(t.source)}`,children:t.source}),n.jsx("span",{className:"s-atop-agent-id",children:t.refId.slice(0,8)})]})},{key:"project",label:"project",cls:"s-atop-col-project",kind:"text",sortable:!1,defaultWidth:200,minWidth:96,maxWidth:360,render:t=>n.jsx("span",{title:t.cwd??t.project,children:t.project})},{key:"updated",label:"updated",cls:"s-atop-col-last",kind:"time",sortable:!1,defaultWidth:86,minWidth:64,render:t=>n.jsx("span",{title:Y(t.mtimeMs),children:U(Math.max(R(t.mtimeMs)??0,R(t.lastEvent?.ts)??0))||"-"})},{key:"size",label:"size",cls:"s-atop-col-runtime",kind:"number",sortable:!1,defaultWidth:80,minWidth:64,render:t=>nt(t.size)},{key:"path",label:"path",kind:"text",sortable:!1,defaultWidth:360,minWidth:160,maxWidth:800,render:t=>n.jsx("span",{title:t.transcriptPath,children:t.cwd??t.transcriptPath})}];function z(t){const i=t?.trim();if(!i)return null;const r=F(i);return r.endsWith(".jsonl")?r.slice(0,-6):r}function F(t){const i=t.replace(/[\\/]+$/,"");return i.split(/[\\/]/).filter(Boolean).at(-1)??i}function et(t){const r=t.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return r.pop(),r.at(-1)??""}function st(t){return t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function nt(t){if(!Number.isFinite(t)||t<0)return"-";if(t<1024)return`${t} B`;const i=t/1024;if(i<1024)return`${i.toFixed(i>=10?0:1)} KiB`;const r=i/1024;return`${r.toFixed(r>=10?0:1)} MiB`}function at(t,i){return i?[t.refId,t.sessionId??"",t.source,t.project,t.cwd??"",t.transcriptPath,t.lastEvent?.summary??"",t.process?.command??""].join(" ").toLowerCase().includes(i.toLowerCase()):!0}function B(t){return`${t.source}\0${t.cwd??""}`}function ot(t){return`${t.source}\0${t.cwd??""}`}function it(t,i,r){if(!t?.transcripts?.length)return[];const d=new Map;for(const s of i){const l=d.get(s.sessionId);(!l||s.ts>l.ts)&&d.set(s.sessionId,s)}const h=new Map;for(const s of t.processes){if(!s.cwd)continue;const l=h.get(B(s));(!l||s.pid<l.pid)&&h.set(B(s),s)}return t.transcripts.map(s=>{const l=z(s.sessionId)??z(s.transcriptPath);if(!l)return null;const u=s.sessionId?d.get(s.sessionId)??null:null,x=h.get(ot(s))??null,m=Math.max(s.mtimeMs,u?.ts??0),j=!!x||r-m<=Z,p=s.project?.trim()||(s.cwd?F(s.cwd):et(s.transcriptPath))||"unknown";return{refId:l,source:s.source||"unknown",project:p,cwd:s.cwd,transcriptPath:s.transcriptPath,sessionId:s.sessionId,mtimeMs:s.mtimeMs,size:s.size,status:j?"run":"idle",statusLabel:j?"active":"idle",lastEvent:u,process:x}}).filter(s=>s!==null).sort((s,l)=>{const u=Math.max(s.mtimeMs,s.lastEvent?.ts??0);return Math.max(l.mtimeMs,l.lastEvent?.ts??0)-u||s.project.localeCompare(l.project)})}function qt({navigate:t}){const{route:i}=X(),[r]=o.useState(()=>W(D,P)),[d,h]=o.useState(r),[s,l]=o.useState(()=>W(_,P)?.events??[]),[u,x]=o.useState(r===null),[m,j]=o.useState(""),[p,S]=o.useState("all"),[y,k]=o.useState(0),[N,C]=o.useState(null),[T,V]=o.useState(Date.now()),b=o.useRef(null),I=o.useCallback(async()=>{C(null);try{h(await L(D))}catch(e){C(e instanceof Error?e.message:String(e))}finally{x(!1)}},[]);o.useEffect(()=>{I();const e=setInterval(()=>{I()},q);return()=>clearInterval(e)},[I]),o.useEffect(()=>{let e=!1;return(async()=>{try{const a=await L(_);e||l(a.events??[])}catch{}})(),()=>{e=!0}},[]),G(e=>{l(a=>a.length>=$?[...a.slice(a.length-$+1),e]:[...a,e])}),o.useEffect(()=>{const e=setInterval(()=>V(Date.now()),15e3);return()=>clearInterval(e)},[]);const f=o.useMemo(()=>it(d,s,T),[d,s,T]),H=o.useMemo(()=>[...new Set(f.map(e=>e.source))].sort(),[f]),c=o.useMemo(()=>f.filter(e=>(p==="all"||e.source===p)&&at(e,m.trim())),[f,p,m]);o.useEffect(()=>{y>=c.length&&k(Math.max(0,c.length-1))},[c.length,y]);const M=o.useCallback(e=>{e&&Q(t,{view:"sessions",sessionId:e.refId},{returnTo:i})},[t,i]);o.useEffect(()=>{const e=a=>{const E=a.target,A=E instanceof HTMLInputElement||E instanceof HTMLTextAreaElement||(E?.isContentEditable??!1);if(a.key==="/"&&!A){a.preventDefault(),b.current?.focus();return}if(A){a.key==="Escape"&&E===b.current&&(j(""),b.current?.blur());return}if(a.key==="ArrowDown"||a.key==="j"){a.preventDefault(),k(w=>c.length===0?0:Math.min(c.length-1,w+1));return}if(a.key==="ArrowUp"||a.key==="k"){a.preventDefault(),k(w=>Math.max(0,w-1));return}(a.key==="Enter"||a.key==="o")&&(a.preventDefault(),M(c[y]))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,y,M]);const K=N?[]:c,g=o.useCallback(e=>`${e.source}:${e.transcriptPath}`,[]),v=o.useMemo(()=>new Map(c.map((e,a)=>[g(e),a])),[c,g]);return n.jsxs("div",{className:"s-atop s-atop--sessions",children:[n.jsxs("div",{className:"s-atop-fbar",children:[n.jsxs("label",{className:"s-atop-search",children:[n.jsx("span",{className:"s-atop-search-prompt",children:"/"}),n.jsx("input",{ref:b,className:"s-atop-search-input",placeholder:"filter sessions",value:m,onChange:e=>j(e.target.value)}),n.jsx("kbd",{className:"s-atop-search-kbd",children:"/"})]}),n.jsx("span",{className:"s-atop-fbar-label",children:"source"}),n.jsxs("button",{type:"button",className:`s-atop-pill${p==="all"?" s-atop-pill--on":""}`,onClick:()=>S("all"),children:["all",n.jsx("span",{className:"s-atop-pill-ct",children:f.length})]}),H.map(e=>n.jsxs("button",{type:"button",className:`s-atop-pill${p===e?" s-atop-pill--on":""}`,onClick:()=>S(e),children:[e,n.jsx("span",{className:"s-atop-pill-ct",children:f.filter(a=>a.source===e).length})]},e)),n.jsx("div",{className:"s-atop-fbar-spacer"})]}),n.jsx(O,{rows:K,columns:tt,rowId:g,storageKey:"openscout.sessions.cols",rowBindings:e=>({onMouseEnter:()=>{const a=v.get(e);a!=null&&k(a)},onFocus:()=>{const a=v.get(e);a!=null&&k(a)}}),onRowClick:e=>M(e),rowClassName:e=>v.get(g(e))===y?"s-atop-row--selected":void 0,empty:N?{title:"Discovery failed",body:N}:{title:"No raw sessions",body:m?"No sessions match the current filter.":"No transcript sessions were discovered."},loading:u,density:"compact",className:"s-atop-data-table",ariaLabel:"Raw sessions"}),n.jsxs("div",{className:"s-atop-keys",children:[n.jsxs("span",{children:[n.jsx("kbd",{children:"/"}),"filter"]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"j/k"}),"select"]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"enter"}),"open"]}),n.jsx("span",{className:"s-atop-keys-spacer"}),n.jsxs("span",{className:"s-atop-keys-count",children:[n.jsx("strong",{children:c.length})," sessions"]})]})]})}export{qt as RawSessionsTable};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r}from"./index-sUomXsrf.js";import{u as w}from"./router-Dja9_ygK.js";import{a as p,b,c as g}from"./Provider-tFc3jqZ4.js";import{S as j,a as E}from"./ScoutbotRealtimeVoiceCall-Bzyl0BCS.js";import{d as _}from"./types-B0PlfpKc.js";import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./radio-DedMyP8J.js";import"./plus-C9lTjsgd.js";function N({dictationActive:t=!1,autoStart:c=!1}){const a=w(p,!1),{enabled:l,state:i,leaseId:u,startCall:f,endCall:x}=b(),h=r.useRef(!1),n=r.useRef(null),[m,S]=r.useState(()=>window.innerWidth>=720&&window.innerHeight>=520?"page":"compact"),s=window.webkit?.messageHandlers?.scoutRealtimeVoice;return r.useEffect(()=>{const o=()=>{S(window.innerWidth>=720&&window.innerHeight>=520?"page":"compact")};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),r.useEffect(()=>{s?.postMessage({kind:"session-state",state:i,leaseId:u})},[u,s,i]),r.useEffect(()=>{const o=()=>{if(n.current)return n.current;const d=x().finally(()=>{n.current===d&&(n.current=null)});return n.current=d,d},v=()=>{o()};return window.__scoutRealtimeVoiceStop=o,window.addEventListener(g,v),window.__scoutRealtimeVoiceStopRequested&&o(),()=>{window.removeEventListener(g,v),window.__scoutRealtimeVoiceStop===o&&delete window.__scoutRealtimeVoiceStop}},[x]),r.useEffect(()=>{!c||t||!a||!l||h.current||i!=="idle"&&i!=="ended"&&i!=="error"||(h.current=!0,f())},[c,t,a,l,f,i]),a?l?e.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsx(j,{state:i,onMinimize:s?()=>s.postMessage("minimize"):void 0,onExpand:s?()=>s.postMessage(m==="page"?"restore":"expand"):void 0,layout:m}),e.jsx(E,{dictationActive:t,layout:m})]}):e.jsxs("div",{className:"flex h-full flex-col justify-center gap-2 p-4",children:[e.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Live voice is disabled"}),e.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Enable realtime voice in Settings → Voice. The footer Voice control starts and manages calls."})]}):e.jsxs("div",{className:"flex h-full flex-col justify-center gap-2 p-4",children:[e.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Live voice is off"}),e.jsxs("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:["Turn on the ",e.jsx("span",{className:"font-mono",children:p})," flag to hold live conversations with Scoutbot. Calls use the configured OpenAI API account."]})]})}function xe(){const t=w(p,!1),{enabled:c,state:a}=b();return!t||!c?e.jsx(N,{}):e.jsxs("main",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-[var(--scout-chrome-bg)]",children:[e.jsxs("div",{className:"border-b border-[var(--scout-chrome-border-soft)] px-6 py-5",children:[e.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:"Scoutbot"}),e.jsx("h1",{className:"mt-1 text-3xl font-medium text-[var(--scout-chrome-ink-strong)]",children:"Live voice"}),e.jsx("p",{className:"mt-1 max-w-2xl text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Hold a live conversation, inspect navigation attempts, and audit what Scoutbot tried without leaving the call."})]}),e.jsx("div",{className:"min-h-0 flex-1 p-5",children:e.jsxs("section",{className:"mx-auto flex h-full min-h-[26rem] w-full max-w-5xl flex-col overflow-hidden rounded-xl border border-[color-mix(in_srgb,var(--hud-ink)_11%,transparent)] bg-[color-mix(in_srgb,var(--scout-chrome-bg)_96%,black)] shadow-[0_18px_48px_rgba(0,0,0,0.24)]",children:[e.jsx(j,{state:a,layout:"page"}),e.jsx(E,{dictationActive:!1,layout:"page"})]})})]})}const he=_({id:"voice",label:"Live voice",route:{view:"voice"},webPath:"/voice",screen:"RealtimeVoiceScreen",embed:{path:"/embed/voice",profile:"macos.voice",rootClassName:"s-voice-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:t=>({dictationActive:t.get("dictationActive")==="1",autoStart:t.get("autoStart")==="1"})}});export{xe as RealtimeVoicePage,N as RealtimeVoiceScreen,he as scoutSurface};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RepoDiffViewer-Bo0gREMj.js","assets/index-sUomXsrf.js","assets/index-DITWsjFb.css","assets/ui-LM8pS8qE.js","assets/usePierreRuntime-DIVunfX0.js","assets/chunk-HRAB3GC3-CvwpNg-G.js","assets/chevron-down-BFai6ZfE.js","assets/createLucideIcon-DlxlBfLC.js","assets/check-BbgHJX8u.js","assets/loader-circle-lWOOKezu.js","assets/send-horizontal-DDwOgEs3.js","assets/code-xml-05TD3uOC.js","assets/x-0XjXwGqq.js","assets/cache-Dr0why2k.js","assets/api-h5zurxmi.js","assets/message-square-BD-4UUdc.js","assets/refresh-cw-D8PFyhUa.js","assets/plus-C9lTjsgd.js","assets/repo-diff-DyYmQMSA.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as e,r as i,_ as s}from"./index-sUomXsrf.js";/* empty css */const a=i.lazy(()=>s(()=>import("./RepoDiffViewer-Bo0gREMj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])).then(r=>({default:r.RepoDiffViewer})));function t(){return e.jsx("div",{className:"rd-viewer","data-scout-theme":!0,children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-spinner","aria-hidden":!0}),e.jsx("div",{className:"rd-center-title",children:"Opening diff viewer…"})]})})})}function c(r){return e.jsx(i.Suspense,{fallback:e.jsx(t,{}),children:e.jsx(a,{...r})})}export{c as R};
|