@openscout/scout 0.2.91 → 0.2.92
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 +12 -4
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/{ActivityScreen-BUeb4ERK.js → ActivityScreen-DkUP7V7M.js} +1 -1
- package/dist/client/assets/{AddProjectForm-DtTfn4Zk.js → AddProjectForm-CpyytDf2.js} +1 -1
- package/dist/client/assets/{AgentAvatar-CneOa70z.js → AgentAvatar-D8ZtMluU.js} +1 -1
- package/dist/client/assets/{AgentConfigurationScreen-CkZ7EjZh.js → AgentConfigurationScreen-BlGI6fuM.js} +1 -1
- package/dist/client/assets/{AgentDefinitionsWorkspace-0Y3kqMtv.js → AgentDefinitionsWorkspace-CfaDVCVt.js} +1 -1
- package/dist/client/assets/{AgentDetailCard-Dtc02KUO.js → AgentDetailCard-BTiOmh-a.js} +1 -1
- package/dist/client/assets/{AgentFloorView-B5raPB_U.js → AgentFloorView-DjNLILLt.js} +1 -1
- package/dist/client/assets/{AgentInfoScreen-DFG4ElZD.js → AgentInfoScreen-DG5dlHb_.js} +1 -1
- package/dist/client/assets/{AgentLaneCard-BRAkw8YJ.js → AgentLaneCard-lfRNb7JD.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-T8QE5742.js → AgentLaneChrome-Dlwrbq3g.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-C8RYotnv.js → AgentLaneDetailSheet-BzYzBfcW.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-FyYweLo_.js → AgentLaneSummaryResize-6SOEWUnr.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-Crxx1srt.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-Cil3dNwu.js → AgentLanesPreflight-C3uOiOzd.js} +1 -1
- package/dist/client/assets/{AgentLanesView-DPfO8MOo.js → AgentLanesView-ChNlmY-F.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-DwScaVRF.js → AgentLiveActions-BJ5dIfL3.js} +1 -1
- package/dist/client/assets/{AgentSessions-DKoWA0Lm.js → AgentSessions-DpY0htZV.js} +1 -1
- package/dist/client/assets/{AgentsConsole-DoBIWGoq.js → AgentsConsole-CHyXrjhm.js} +1 -1
- package/dist/client/assets/{AgentsScreen-JuUiSuwY.js → AgentsScreen-BhCjX2lD.js} +1 -1
- package/dist/client/assets/AgentsSubnav-az_VDkri.js +1 -0
- package/dist/client/assets/{AtopView-ycxMrRwp.js → AtopView-BjjPM8OX.js} +1 -1
- package/dist/client/assets/{BackToPicker-D6WgIDb-.js → BackToPicker-D1LV6Cqp.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-Zw-taW1s.js → BriefingDetailScreen-B7qJ90Np.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-BerYOoWS.js → BriefingsScreen-CW6N829d.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-Cu93j-Ga.js → BrokerMetadataPanel-BhjECqOK.js} +1 -1
- package/dist/client/assets/{BrokerScreen-CeN90URH.js → BrokerScreen-X3z50712.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-DdKyMSEM.js → ChatCollapsedStrip-DNR9osDy.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-BjCOBLze.js → CodeDiffPane-Bx_2VAzv.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-NSGdCaK0.js → CodeProjectPicker-C1yOJKvs.js} +1 -1
- package/dist/client/assets/{CodeScreen-CA9Sq6Dx.js → CodeScreen-CIKK1LcZ.js} +1 -1
- package/dist/client/assets/{ContextMenu-DnFcmfMR.js → ContextMenu-CHIuVKz7.js} +1 -1
- package/dist/client/assets/{ConversationComposer-CjRXFkvY.js → ConversationComposer-Bf7Ga_49.js} +1 -1
- package/dist/client/assets/{ConversationFeedRows-CgRTIpAv.js → ConversationFeedRows-Cm1Lgo43.js} +1 -1
- package/dist/client/assets/{ConversationHeader-CRmdtuL7.js → ConversationHeader-B_GXrKR0.js} +1 -1
- package/dist/client/assets/{ConversationPanels-DCkcLIHk.js → ConversationPanels-BTBbEvrP.js} +2 -2
- package/dist/client/assets/{ConversationScreen-Br0QQ3xo.js → ConversationScreen-B3l2m3JI.js} +1 -1
- package/dist/client/assets/{ConversationStatus-BJ1CMbAv.js → ConversationStatus-BqhUHD85.js} +1 -1
- package/dist/client/assets/{DataTable-Dzqiaha4.js → DataTable-CJbbgBdA.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-B0WMg_z3.js → DispatchAftermath-BDA9CrOd.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-CZVVIAD5.js → DocumentFocusViewer-B9vodVmG.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-C3a7hJWO.js → EmbeddableSurfacesLab-BdsYRDky.js} +1 -1
- package/dist/client/assets/{EmptyState-CYNJZMrZ.js → EmptyState-BRY5jTpz.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Fwt8_KmD.js → FileViewerPane-9Bveqm9c.js} +1 -1
- package/dist/client/assets/{FleetSearch-Dsi_l2KW.js → FleetSearch-Bj9SCl2f.js} +1 -1
- package/dist/client/assets/{FlightObserveScreen-g_tiGmvz.js → FlightObserveScreen-BVMdsiCC.js} +1 -1
- package/dist/client/assets/{FollowScreen-Bb_rcrzi.js → FollowScreen-BifwHWOV.js} +1 -1
- package/dist/client/assets/{HarnessMark-DrE57dUq.js → HarnessMark-BPAphNjx.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-CAsCJ_tG.js → HarnessesScreen-fMnbnrD4.js} +1 -1
- package/dist/client/assets/{HerdrSession-1eVu9Owj.js → HerdrSession-BujfGzrP.js} +1 -1
- package/dist/client/assets/{HomeHero-W445QrG1.js → HomeHero-BgM6S39l.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-CbPVg3fr.js → KnowledgeSearchInspector-B4ZY24xE.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchScreen-C1lN1xJk.js → KnowledgeSearchScreen-Ch_WENUC.js} +1 -1
- package/dist/client/assets/{LaneToolHoverCard-BkBcDYm-.js → LaneToolHoverCard-B7KdvQvf.js} +1 -1
- package/dist/client/assets/{LaneTraceDetailSheet-CzTd44rf.js → LaneTraceDetailSheet-H3AnN-vN.js} +1 -1
- package/dist/client/assets/{LaneTraceEventFocus-BmMmPTyJ.js → LaneTraceEventFocus-mkMw2wJU.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DwkjsiJ5.js → MeshCanvas-CpKcWxKy.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-vmCpU1sD.js → MeshCanvasMinimap-C9IoGHbe.js} +1 -1
- package/dist/client/assets/{MeshScreen-CkMepUpT.js → MeshScreen-48QkJSDI.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-BD2xLE2C.js → MeshTopologyView-DFzr0IZM.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-qbalTne_.js → MessageComposerSuggestions-FdVHnT_q.js} +1 -1
- package/dist/client/assets/{MessagesScreen-C8UynyLC.js → MessagesScreen-BMOOfbWX.js} +1 -1
- package/dist/client/assets/{MissionContextRail-D5MEP2f4.js → MissionContextRail-Y8QxUZGE.js} +1 -1
- package/dist/client/assets/{MissionControlView-K_I7eftL.js → MissionControlView-BpsHKu1F.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-CWKLdUKG.js → MissionFocusOverlay-BPnAEA3F.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-ByGrNAcs.js → MissionLeftAgentRow-iOZ6ds9L.js} +1 -1
- package/dist/client/assets/{MissionLogPane-ZwHJ137T.js → MissionLogPane-B0csI89E.js} +1 -1
- package/dist/client/assets/{NewAgentModal-Do9aVvan.js → NewAgentModal-DBHJR9Qm.js} +1 -1
- package/dist/client/assets/{NewChatComposer-DKlNX1UA.js → NewChatComposer-Hd7pI5Ac.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-DXPvX-hh.js → NewChatOrigin-DmuJ32wa.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-Dghsq2on.js → ObserveEmbedScreen-DyArn7Id.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-DWNlmTVm.js → ObserveTextFlow-CkMrtT8s.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BlmGoxCE.js → ObservedTopologyPanel-CaSZZP05.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-DDqQi-oe.js → OpenScoutAppShell-BtlKkiuF.js} +1 -1
- package/dist/client/assets/{OpsAgentsView-Bn_fGBdo.js → OpsAgentsView-CnqrwbC2.js} +1 -1
- package/dist/client/assets/OpsScreen-DOlmlVkP.js +1 -0
- package/dist/client/assets/OpsSubnav-Dj3ShAKv.js +1 -0
- package/dist/client/assets/{PlanView-B6gKo543.js → PlanView-BLGdWDx6.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-Dv1sVnQl.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C5QWwZCn.js → ProjectAgentProfileBar-BLVg5EeA.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-DC7Dd8VL.js → ProjectAgentProfileHero-0-GDhsPT.js} +1 -1
- package/dist/client/assets/{ProjectsInbox-DCLrDmj1.js → ProjectsInbox-B3DpAI5b.js} +1 -1
- package/dist/client/assets/{ProjectsRail-C4hiXYSb.js → ProjectsRail-BDl7U9Jq.js} +1 -1
- package/dist/client/assets/ProjectsScreen-Dl2FcGrR.js +1 -0
- package/dist/client/assets/{ProjectsThreadAside-DYmL2dCY.js → ProjectsThreadAside-BcGC5mHE.js} +1 -1
- package/dist/client/assets/{Provider-p-xuaAoE.js → Provider-cJCdHAxu.js} +1 -1
- package/dist/client/assets/{RailRow-bRkkXIpR.js → RailRow-CLcVmywd.js} +1 -1
- package/dist/client/assets/{RawSessionsTable-B7WKmXrk.js → RawSessionsTable-DBto4Ts-.js} +1 -1
- package/dist/client/assets/{RealtimeVoiceScreen-BzP3BQq9.js → RealtimeVoiceScreen-DXEU5v3g.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-xjzjcJ_c.js → RepoDiffEmbedScreen-BCDXFE3D.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DRzIY-dk.js → RepoDiffPageScreen-m62FiWXC.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-CNDp01KM.js → RepoDiffViewer-PaNeZMhJ.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-CWE5GxMP.js +2 -0
- package/dist/client/assets/{ReposScreen-CpaLC_NU.js → ReposScreen-Cksv1cAD.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-DkpZ-0DH.js → ScoutDeckSurface-BCjPl7C4.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BENBUt5-.js → ScoutSurface-CkgT7A-c.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-CGZyxS5H.js → ScoutbotBroadcastChip-DkiRCHuK.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-Bk2ZsfPp.js → ScoutbotFxLab-D-kV5j4T.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-n63LdBZs.js → ScoutbotRealtimeVoiceCall-1ixiEn1L.js} +1 -1
- package/dist/client/assets/{SecondaryNav-B4IsujYh.js → SecondaryNav-_wyKjwNf.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CPfH-jqN.js → SessionEmbedScreen-CJZmIBV7.js} +1 -1
- package/dist/client/assets/{SessionObserve-B-SkP3tu.js → SessionObserve-yYA8Gy5s.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-CF5jnH3-.js → SessionObserveEvidence-cHdjYOJe.js} +1 -1
- package/dist/client/assets/{SessionRefScreen-C-4jjmVG.js → SessionRefScreen-OkTY7Szg.js} +1 -1
- package/dist/client/assets/SessionsScreen-B-GFjxIA.js +1 -0
- package/dist/client/assets/{SettingsDrawer-DATxwZrn.js → SettingsDrawer-Co11RFX0.js} +1 -1
- package/dist/client/assets/{SettingsScreen-Bu53X7J_.js → SettingsScreen-Cn09nq5_.js} +1 -1
- package/dist/client/assets/{ShikiPane-DH8yYDks.js → ShikiPane-dBS9hD-z.js} +1 -1
- package/dist/client/assets/{SlidePanel-RFXJpfUa.js → SlidePanel-CH-3-8_2.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-CEYdCzem.js → SpriteAvatar-DS6Tmyua.js} +1 -1
- package/dist/client/assets/{StatusPill-9uy70ttd.js → StatusPill-C8m9ZymF.js} +1 -1
- package/dist/client/assets/{TailView-6bIrgdxN.js → TailView-B0BSopPs.js} +1 -1
- package/dist/client/assets/{Terminal-BI6km7H4.js → Terminal-U8gjIdm3.js} +1 -1
- package/dist/client/assets/{TerminalEmbedScreen-D4JOWwtm.js → TerminalEmbedScreen-CTmdE7us.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-BcP9vvji.js → TextDocumentSurface-BWJCGBZf.js} +1 -1
- package/dist/client/assets/{TmuxPeek-IaWqCgyJ.js → TmuxPeek-B4QdHbGm.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-C80iZxgy.js → VoicePermissionsPanel-Dd4ITJy_.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-CweZ6fEd.js → WorkDetailScreen-mJs0mb99.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-Dy_-06iI.js → WorkFilesViewer-ODzLXKxj.js} +1 -1
- package/dist/client/assets/{activity-DS0u0Itf.js → activity-CC8JzJNH.js} +1 -1
- package/dist/client/assets/{addon-fit-CN888B3D.js → addon-fit-CaZ-uLrg.js} +1 -1
- package/dist/client/assets/{addon-webgl-CoAnanQS.js → addon-webgl-B8utL3bM.js} +1 -1
- package/dist/client/assets/{agent-essentials-CuK4G_zS.js → agent-essentials-B3wcxg_v.js} +1 -1
- package/dist/client/assets/{arc.es-BET9ev6q.js → arc.es-uFv9UrHn.js} +1 -1
- package/dist/client/assets/{arrow-down-DxxPnPwh.js → arrow-down-w1HPzDSE.js} +1 -1
- package/dist/client/assets/{arrow-left-CXDkJuCg.js → arrow-left-B-3GJ7ct.js} +1 -1
- package/dist/client/assets/{arrow-up-right-Bj8RjSqW.js → arrow-up-right-G6bJXxhK.js} +1 -1
- package/dist/client/assets/{bot-BSGSicKC.js → bot-DzCOGKi6.js} +1 -1
- package/dist/client/assets/{check-BfA0T8UD.js → check-BX8nRgop.js} +1 -1
- package/dist/client/assets/{chevron-down-BVg09D6U.js → chevron-down-B3VVRJcV.js} +1 -1
- package/dist/client/assets/{chevron-right-CaEwYkxE.js → chevron-right-BYMV1511.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-HhKwnZCi.js → chunk-HRAB3GC3-dRd2eQMJ.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-DX2eTIQ_.js → chunk-JTPDIGGW-BjX67kHU.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-D-bOfuCH.js → chunk-T65CQEWV-kP6nJjkU.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-oS9dlQCI.js → chunk-YOZR3KYS-C13bZPVd.js} +1 -1
- package/dist/client/assets/{clock-C3TUL7D7.js → clock-B9ukVaVn.js} +1 -1
- package/dist/client/assets/{code-xml-Dbvjk9Kw.js → code-xml-BFc3TMSm.js} +1 -1
- package/dist/client/assets/{content-CiOMtgQc.js → content-B8gahuBy.js} +1 -1
- package/dist/client/assets/content-BIqX06OQ.js +1 -0
- package/dist/client/assets/content-BKDZ6Fxe.js +1 -0
- package/dist/client/assets/content-C15Ya-iu.js +1 -0
- package/dist/client/assets/content-CDE9tJDF.js +1 -0
- package/dist/client/assets/content-CSAfI-PX.js +1 -0
- package/dist/client/assets/content-CTF9D60D.js +1 -0
- package/dist/client/assets/{content-CJuH5cDP.js → content-CbAGkYQO.js} +1 -1
- package/dist/client/assets/content-CtqLJOVp.js +1 -0
- package/dist/client/assets/content-Dvs1KRfo.js +1 -0
- package/dist/client/assets/content-DyJdVZjI.js +1 -0
- package/dist/client/assets/{content-C2TZOKSE.js → content-Ji7ATaf7.js} +1 -1
- package/dist/client/assets/content-eqZXKWcP.js +1 -0
- package/dist/client/assets/content-iyyQKwvA.js +1 -0
- package/dist/client/assets/content-pDE7Fpb9.js +1 -0
- package/dist/client/assets/content-pPSd2dua.js +1 -0
- package/dist/client/assets/{conversation-icons-DmC_Ak3z.js → conversation-icons-gpsv650H.js} +1 -1
- package/dist/client/assets/conversation-motion-features-DXtKlmuM.js +1 -0
- package/dist/client/assets/{copy-C79v_7D-.js → copy-BFmOcWof.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DCq_3fQn.js → createLucideIcon-CFBn0Sdk.js} +1 -1
- package/dist/client/assets/{discover-IEnbrH8_.js → discover-DKf0aTr_.js} +2 -2
- package/dist/client/assets/embed-entry-RlQUTtc4.js +2 -0
- package/dist/client/assets/{external-link-Dd8xaveL.js → external-link-B1TI5yIt.js} +1 -1
- package/dist/client/assets/{eye-DkU59kfl.js → eye-1J4yOUoG.js} +1 -1
- package/dist/client/assets/{file-text-BITQqGtF.js → file-text-DcYSrI4v.js} +1 -1
- package/dist/client/assets/{gestures-B5rLNRpi.js → gestures-CcEOV6Sr.js} +1 -1
- package/dist/client/assets/{home-moving-signal-Bs635mVw.js → home-moving-signal-Bh2FugbH.js} +1 -1
- package/dist/client/assets/{home-now-card-VxlLjg1A.js → home-now-card-ByRH5fFx.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-C06GMiwD.js → home-now-card-nano-y1EhBvVL.js} +1 -1
- package/dist/client/assets/{hooks-BWiLxTw1.js → hooks-DUZwL3Aq.js} +1 -1
- package/dist/client/assets/index-BBznYVWk.css +1 -0
- package/dist/client/assets/{index-BTj2MguM.js → index-BTuq-8Iv.js} +1 -1
- package/dist/client/assets/index-CmwGCxUk.js +1 -0
- package/dist/client/assets/{index-BZovGpDk.js → index-DmFAhGPj.js} +2 -2
- package/dist/client/assets/{index-vbaJ8sin.js → index-Dtaswdsh.js} +1 -1
- package/dist/client/assets/{inspector-panel-C96HcyK5.js → inspector-panel-DzgS5_Mv.js} +1 -1
- package/dist/client/assets/{keyboard-nav-CHo_xmjw.js → keyboard-nav-h1IdakpD.js} +1 -1
- package/dist/client/assets/{lane-roster-store-B6ybJlHJ.js → lane-roster-store-71vFgAem.js} +1 -1
- package/dist/client/assets/{left-DMJkmJOF.js → left-8NITBvFX.js} +1 -1
- package/dist/client/assets/{left-COMAiMfB.js → left-B2HEqrTM.js} +1 -1
- package/dist/client/assets/{left-C6Zj3cR4.js → left-CTYUvXbe.js} +1 -1
- package/dist/client/assets/{left-BuJ0wJW1.js → left-CwDRT50z.js} +1 -1
- package/dist/client/assets/{left-l92tw5Kc.js → left-CxlDLJlw.js} +1 -1
- package/dist/client/assets/{left-Ce4WKYPK.js → left-XFXxNd4g.js} +1 -1
- package/dist/client/assets/{left-agents-BuSyVNGE.js → left-agents-Ck4Xn-R8.js} +1 -1
- package/dist/client/assets/{left-default-DRHywOKX.js → left-default-BeOyS0bR.js} +1 -1
- package/dist/client/assets/{left-lanes-4-aUyyrV.js → left-lanes-DZp3jJMo.js} +1 -1
- package/dist/client/assets/{left-mission-e849d_Td.js → left-mission-CuKFQ5xL.js} +1 -1
- package/dist/client/assets/left-p1hkO6P0.js +1 -0
- package/dist/client/assets/{left-plan-MchYwAB_.js → left-plan-3rrFENhp.js} +1 -1
- package/dist/client/assets/{library-DygjpA6u.js → library-E--gKzEZ.js} +1 -1
- package/dist/client/assets/{loader-circle-B-l2Wj3-.js → loader-circle-d6PKL_KD.js} +1 -1
- package/dist/client/assets/{local-agents-Wof5knTJ.js → local-agents-B5pq17tZ.js} +1 -1
- package/dist/client/assets/{mentions-BjXfeF7t.js → mentions-agCGDgyA.js} +1 -1
- package/dist/client/assets/{mesh-ops-C1gq8zKf.js → mesh-ops-5pZCYptW.js} +1 -1
- package/dist/client/assets/{mesh-view-store-B56D3f77.js → mesh-view-store-KJzABIkN.js} +1 -1
- package/dist/client/assets/{message-circle-BwVx5X0q.js → message-circle-CJO-pi7b.js} +1 -1
- package/dist/client/assets/{message-markup-DlVX-iuc.js → message-markup-CyRDLdOn.js} +1 -1
- package/dist/client/assets/{message-square-BnkG6tae.js → message-square-D1hMsMj_.js} +1 -1
- package/dist/client/assets/{mission-control-store-CMgIVjLJ.js → mission-control-store-Ce6dOvnZ.js} +1 -1
- package/dist/client/assets/{observe-DVHAcIrv.js → observe-BSWVM8YA.js} +1 -1
- package/dist/client/assets/{page-status-Bg2hd27j.js → page-status-D2FQLJOX.js} +1 -1
- package/dist/client/assets/{paperclip-DblaLD_N.js → paperclip-iZmDMOS5.js} +1 -1
- package/dist/client/assets/{plus-BAI0t5g9.js → plus-gZ0T0eBI.js} +1 -1
- package/dist/client/assets/{profile-3Q4sUtvJ.js → profile-Dxj3VVOM.js} +1 -1
- package/dist/client/assets/{projects-inbox-Da2hYEn6.js → projects-inbox-Dzt_GQDv.js} +1 -1
- package/dist/client/assets/{radio-BGtkyCG9.js → radio-RMLfV4EO.js} +1 -1
- package/dist/client/assets/{refresh-cw-DtF8xPqX.js → refresh-cw-C4x1x6b_.js} +1 -1
- package/dist/client/assets/resolve-panes-C9gF0w4e.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-DxbY5RCH.js +1 -0
- package/dist/client/assets/{right-Dd2DscRz.js → right-5L7Tn0zG.js} +1 -1
- package/dist/client/assets/{right-BU_W1kSH.js → right-CYtkMmRu.js} +1 -1
- package/dist/client/assets/{right-CUP-NIDG.js → right-CreoQzPP.js} +1 -1
- package/dist/client/assets/{right-c4PAdFYZ.js → right-D-k9Z1Fe.js} +1 -1
- package/dist/client/assets/{right-ByptvkVX.js → right-D9xFfy2b.js} +1 -1
- package/dist/client/assets/{right-BlR7h0US.js → right-DI7zHADe.js} +1 -1
- package/dist/client/assets/{right-BwgwTGGd.js → right-DUbJ3WVc.js} +1 -1
- package/dist/client/assets/{right-DmVHd8Xj.js → right-DiybhsiK.js} +1 -1
- package/dist/client/assets/{right-Ch_jrNe2.js → right-Jh_1Q88s.js} +1 -1
- package/dist/client/assets/{right-B8qg3JdB.js → right-udr1qTJG.js} +1 -1
- package/dist/client/assets/{rocket-BWh18pt_.js → rocket-CMM-IdLy.js} +1 -1
- package/dist/client/assets/{router-63XV_E7f.js → router-Cn_s9IGH.js} +1 -1
- package/dist/client/assets/{runtime-picker-BXKJbLot.js → runtime-picker--IW3cRry.js} +1 -1
- package/dist/client/assets/{scope-views-Dm2_-NPi.js → scope-views-BIfMTXU4.js} +1 -1
- package/dist/client/assets/{scout-voice-D8Q5sZOL.js → scout-voice-CwbOz6EN.js} +1 -1
- package/dist/client/assets/{scroll-text-DZb3mmYo.js → scroll-text-DPPYrqB9.js} +1 -1
- package/dist/client/assets/{search-1QMVOxF3.js → search-DAyagUtF.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-c0cz3MkJ.js → secondaryNavConfig-Dw3gS1jR.js} +1 -1
- package/dist/client/assets/{selection-bridge-O9C4kGfF.js → selection-bridge-BXw09aRF.js} +1 -1
- package/dist/client/assets/{send-horizontal-DbyEkGql.js → send-horizontal-IcG46D2M.js} +1 -1
- package/dist/client/assets/{server-Bncn9S7r.js → server-BySujhDV.js} +1 -1
- package/dist/client/assets/{session-catalog-DC6BlBBC.js → session-catalog-ClS9xf6i.js} +1 -1
- package/dist/client/assets/{session-table-BUPq9Viy.js → session-table-BdpHs1GN.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-CMe8Bay1.js → sliders-horizontal-R5pWUUcH.js} +1 -1
- package/dist/client/assets/{sparkles-_7cTZsIH.js → sparkles-DJOBD_8l.js} +1 -1
- package/dist/client/assets/{sse-Bb0EOcU9.js → sse-CxXt4tqI.js} +1 -1
- package/dist/client/assets/{tail-events-C12pfUax.js → tail-events-BdvqZHLr.js} +1 -1
- package/dist/client/assets/{terminal-xGf_F3y7.js → terminal-DJPUp_Qn.js} +1 -1
- package/dist/client/assets/{terminal-relay-BgfVJXIL.js → terminal-relay-TffuSPGs.js} +1 -1
- package/dist/client/assets/{terminal-takeover--05EYhJm.js → terminal-takeover-BOFPRPjR.js} +1 -1
- package/dist/client/assets/{use-conversation-list-DWX02INv.js → use-conversation-list-C-dPcjQe.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-Cnwa4hTK.js → use-fleet-active-asks-BHzeBZSW.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-BRFm37oY.js → use-mesh-ops-items-KmaauBr_.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-C8cWvIZ3.js → use-reduced-motion-CYqhYqHO.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-FkMreOOb.js → use-scout-dev-flags-BJbw87PK.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-DvPZSJK3.js → useAgentHoverCard-C6o0tlat.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DjHBrgnS.js +1 -0
- package/dist/client/assets/{usePierreRuntime-C8WJ0X3F.js → usePierreRuntime-Cm7-qdm0.js} +1 -1
- package/dist/client/assets/{wrench-_tHBGTop.js → wrench-CvRjjByE.js} +1 -1
- package/dist/client/assets/{x-CrGUKNRv.js → x-C8ayPBtj.js} +1 -1
- package/dist/client/assets/{xterm-Ks-VlLTq.js → xterm-B0ci4Q9a.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +348 -254
- package/dist/scout-web-server.mjs +2 -96660
- package/package.json +3 -3
- package/dist/client/assets/AgentLanesEmbedScreen-Br7cmZVO.js +0 -1
- package/dist/client/assets/AgentsSubnav-BV0WAgzf.js +0 -1
- package/dist/client/assets/OpsScreen-DHnT-Q9R.js +0 -1
- package/dist/client/assets/OpsSubnav-CJRD7MjM.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Be1VOkI4.js +0 -1
- package/dist/client/assets/ProjectsScreen-jruZRjgD.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-b6vjYxez.js +0 -2
- package/dist/client/assets/SessionsScreen-HAjFvmIq.js +0 -1
- package/dist/client/assets/content-BQuEedeL.js +0 -1
- package/dist/client/assets/content-BUae-L_N.js +0 -1
- package/dist/client/assets/content-BfG98J1k.js +0 -1
- package/dist/client/assets/content-BkVTfkAC.js +0 -1
- package/dist/client/assets/content-BsNMos_d.js +0 -1
- package/dist/client/assets/content-CCn98eSk.js +0 -1
- package/dist/client/assets/content-CYnPp9yo.js +0 -1
- package/dist/client/assets/content-CcrUhm4P.js +0 -1
- package/dist/client/assets/content-CxuVONeQ.js +0 -1
- package/dist/client/assets/content-Dmq9n1_L.js +0 -1
- package/dist/client/assets/content-DskHP2NI.js +0 -1
- package/dist/client/assets/content-DvvzL2HK.js +0 -1
- package/dist/client/assets/content-snCAUbwv.js +0 -1
- package/dist/client/assets/conversation-motion-features-DPiGTO21.js +0 -1
- package/dist/client/assets/embed-entry-XUPb-AzL.js +0 -2
- package/dist/client/assets/index-9as_JTUs.css +0 -1
- package/dist/client/assets/index-DiiEQwdc.js +0 -1
- package/dist/client/assets/left-DrCbY6ja.js +0 -1
- package/dist/client/assets/resolve-panes-D4tlKNCT.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-B27lj3Ci.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-CNlrhvvx.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as o}from"./index-
|
|
1
|
+
import{r as m,j as o}from"./index-DmFAhGPj.js";/* empty css */const $=48,I=720;function _(e){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);if(!n)return null;const a=JSON.parse(n);if(!a||typeof a!="object")return null;const f={};for(const[c,d]of Object.entries(a))typeof d=="number"&&Number.isFinite(d)&&d>0&&(f[c]=d);return f}catch{return null}}function z(e,n){if(e&&!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(n))}catch{}}function H({storageKey:e,columns:n}){const a=m.useMemo(()=>{const r=_(e)??{},s={};for(const p of n)s[p.key]=r[p.key]??p.defaultWidth;return s},[e,n]),[f,c]=m.useState(a);m.useEffect(()=>{c(r=>{let s=!1;const p={...r};for(const b of n)p[b.key]==null&&(p[b.key]=b.defaultWidth,s=!0);return s?p:r})},[n]);const d=m.useMemo(()=>{const r=new Map;for(const s of n)r.set(s.key,s);return r},[n]),N=m.useRef(null),x=m.useCallback(r=>{const s=N.current;if(!s)return;const p=r.clientX-s.startX,b=Math.min(s.max,Math.max(s.min,s.startWidth+p));c(u=>u[s.key]===b?u:{...u,[s.key]:b})},[]),y=m.useCallback(()=>{N.current&&(N.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),c(r=>(z(e,r),r)))},[x,e]);m.useEffect(()=>()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y)},[x,y]);const D=m.useCallback(r=>{const s=f[r],p=d.get(r),b=p?.minWidth??$,u=p?.maxWidth??I;return{style:{width:s,minWidth:b,maxWidth:u},"data-resize-key":r}},[f,d]),E=m.useCallback(r=>({onPointerDown:u=>{if(u.button!==0)return;u.preventDefault(),u.stopPropagation();const h=d.get(r),j=h?.minWidth??$,v=h?.maxWidth??I,S=f[r]??h?.defaultWidth??j;N.current={key:r,startX:u.clientX,startWidth:S,min:j,max:v},document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",x),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},onClick:u=>{u.stopPropagation()},onDoubleClick:u=>{u.preventDefault(),u.stopPropagation();const h=d.get(r);h&&c(j=>{const v={...j,[r]:h.defaultWidth};return z(e,v),v})},role:"separator","aria-orientation":"vertical","aria-label":"Resize column",className:"s-resize-handle"}),[f,d,x,y,e]),C=m.useCallback(()=>{c(()=>{const r={};for(const s of n)r[s.key]=s.defaultWidth;return z(e,r),r})},[n,e]);return{widths:f,getColumnProps:D,getResizeHandleProps:E,resetAll:C}}function J(e){return e==="number"||e==="time"?"right":"left"}function B(e){return e==="number"||e==="time"?-1:1}function T(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):Array.isArray(e)?e.map(n=>T(n)).join(""):""}function F(e,n){if(e.sortValue)return e.sortValue(n);const a=e.render(n),f=T(a).trim();return f||null}function R(e){if(typeof e=="number")return e;const n=Date.parse(e);return Number.isFinite(n)?n:Number.NaN}function q(e,n,a,f){const c=F(a,e),d=F(a,n);return c==null&&d==null?0:c==null?1:d==null?-1:a.kind==="number"?((Number(c)||0)-(Number(d)||0))*f:a.kind==="time"?(R(c)-R(d))*f:String(c).localeCompare(String(d),void 0,{numeric:!0,sensitivity:"base"})*f}function G(e,n){return a=>{typeof e=="function"&&e(a),a.defaultPrevented||n?.(a)}}function K(e,n){return a=>{typeof e=="function"&&e(a),a.defaultPrevented||n?.(a)}}function Z({rows:e,columns:n,rowId:a,storageKey:f,initialSort:c,sort:d,onSortChange:N,secondarySort:x,onRowClick:y,rowBindings:D,rowState:E,empty:C={title:"No rows"},loading:r=!1,rowClassName:s,density:p="comfortable",className:b,ariaLabel:u="Data table"}){const h=m.useMemo(()=>n.map(t=>{const l=t.kind??"text";return{...t,kind:l,align:t.align??J(l),sortable:t.sortable??l!=="custom",resizable:t.resizable??!0}}),[n]),j=m.useMemo(()=>new Map(h.map(t=>[t.key,t])),[h]),[v,S]=m.useState(()=>{if(!c)return null;const l=n.find(i=>i.key===c.key)?.kind??"text";return{key:c.key,dir:c.dir??B(l)}}),k=d??v,{getColumnProps:X,getResizeHandleProps:O}=H({storageKey:f,columns:h.map(t=>({key:t.key,defaultWidth:t.defaultWidth,minWidth:t.minWidth,maxWidth:t.maxWidth}))}),M=m.useMemo(()=>{const t=e.map((i,w)=>({row:i,index:w}));if(!k)return t.map(i=>i.row);const l=j.get(k.key);return l?.sortable?t.slice().sort((i,w)=>{const W=q(i.row,w.row,l,k.dir);if(W!==0)return W;const P=x?.(i.row,w.row)??0;return P!==0?P:i.index-w.index}).map(i=>i.row):t.map(i=>i.row)},[e,k,j,x]),A=t=>{d==null&&S(t),N?.(t)};return o.jsx("div",{className:`dt-wrap dt-wrap--${p}${b?` ${b}`:""}`,children:o.jsxs("table",{className:"dt-table","aria-label":u,"aria-busy":r||void 0,children:[o.jsx("thead",{children:o.jsx("tr",{children:h.map(t=>{const l=k?.key===t.key,i=l?k.dir===1?"ascending":"descending":"none",w=["dt-th",`dt-align-${t.align}`,t.cls,l?"dt-th--sorted":""].filter(Boolean).join(" ");return o.jsxs("th",{className:w,title:t.tip,"aria-sort":i,...X(t.key),children:[t.sortable?o.jsxs("button",{type:"button",className:"dt-th-sort",onClick:()=>{if(k?.key===t.key){A({key:t.key,dir:k.dir===1?-1:1});return}A({key:t.key,dir:B(t.kind)})},children:[o.jsx("span",{className:"dt-th-label",children:t.label}),o.jsx("span",{className:`dt-th-arrow${l?" dt-th-arrow--active":""}`,"aria-hidden":"true",children:l?k?.dir===1?"↑":"↓":"↕"})]}):o.jsx("div",{className:"dt-th-static",children:o.jsx("span",{className:"dt-th-label",children:t.label})}),t.resizable?o.jsx("span",{...O(t.key)}):null]},t.key)})})}),o.jsx("tbody",{children:r&&M.length===0?o.jsx("tr",{className:"dt-loading-row",children:o.jsx("td",{colSpan:h.length,children:o.jsx("div",{className:"dt-loading",role:"status","aria-label":`Loading ${u.toLowerCase()}`,children:Array.from({length:7},(t,l)=>o.jsx("div",{className:"dt-loading-line","aria-hidden":"true",children:h.map(i=>o.jsx("span",{style:{width:`${Math.min(i.defaultWidth,220)}px`}},i.key))},l))})})}):M.length===0?o.jsx("tr",{className:"dt-empty-row",children:o.jsx("td",{colSpan:h.length,children:o.jsxs("div",{className:"dt-empty",children:[o.jsx("div",{className:"dt-empty-title",children:C.title}),C.body?o.jsx("div",{children:C.body}):null]})})}):M.map(t=>{const l=a(t),i=D?.(l)??{},w=E?.(l)??{isActive:!1,isPinned:!1},W=!!(y||D),P=["dt-row",W?"dt-row--interactive":"",w.isActive?"dt-row--active":"",w.isPinned?"dt-row--pinned":"",s?.(t),typeof i.className=="string"?i.className:""].filter(Boolean).join(" "),U=y?()=>y(t):void 0,V=W?K(i.onKeyDown,g=>{y&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),y(t))}):typeof i.onKeyDown=="function"?i.onKeyDown:void 0,L={...i,className:P,onClick:G(i.onClick,U),onKeyDown:V};return W&&L.tabIndex==null&&(L.tabIndex=0),o.jsx("tr",{...L,children:h.map(g=>o.jsx("td",{className:["dt-td",`dt-align-${g.align}`,g.cls].filter(Boolean).join(" "),children:g.render(t)},g.key))},l)})})]})})}export{Z as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as r}from"./index-
|
|
1
|
+
import{r as f,j as r}from"./index-DmFAhGPj.js";import{a as y}from"./api-h5zurxmi.js";import{i as j}from"./scoutbot-BTIErYHo.js";import{u as S}from"./sse-CxXt4tqI.js";import{t as E}from"./time-Dhsh_2EG.js";import{o as M}from"./openContent-C6XO6kr5.js";import{e as k}from"./broker-display-pp33bLsu.js";import{r as R}from"./follow-route-BvcGtBIL.js";import{L as C}from"./loader-circle-d6PKL_KD.js";import{A as L}from"./arrow-up-right-G6bJXxhK.js";import"./index-BWHgHrtv.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-CFBn0Sdk.js";const _=3,$=80;function h(e){return Number(e.createdAt)||0}function F(e,s){if(!e.conversationId)return{status:"no-conversation"};const t=s.slice().sort((o,i)=>h(o)-h(i)),n=e.messageId?t.find(o=>o.id===e.messageId)??null:null;let l;if(n){const o=h(n);l=t.filter(i=>i.id!==n.id&&h(i)>=o)}else{const o=t[0];if(o&&h(o)>e.ts)return{status:"beyond-page"};l=t.filter(i=>h(i)>e.ts)}if(l.length===0)return{status:"no-reply"};const u=n?h(n):e.ts,d=l.slice(0,_).map(o=>({id:o.id,actorName:o.actorName||"Unknown",body:o.body??"",createdAt:h(o),afterMs:Math.max(0,h(o)-u),answersDispatch:!!(e.messageId&&o.replyToMessageId===e.messageId)}));return{status:"replies",replies:d,more:Math.max(0,l.length-d.length)}}function b(e,...s){const t=e.metadata??{},n=t.raw&&typeof t.raw=="object"&&!Array.isArray(t.raw)?t.raw:null;for(const l of s)for(const u of[t,n]){const d=u?.[l];if(typeof d=="string"&&d.trim())return d.trim()}return null}function D(e,s){const t=new URLSearchParams,n=e.invocationId??b(e,"invocationId"),l=b(e,"flightId"),u=b(e,"collaborationRecordId","workId","recordId");return l&&t.set("flightId",l),n&&t.set("invocationId",n),e.conversationId&&t.set("conversationId",e.conversationId),u&&t.set("workId",u),s&&t.set("targetAgentId",s),[...t.keys()].length>0?t:null}function H(e,s={}){const t=[];return e.conversationId&&t.push({key:"conversation",label:"Conversation",hint:"The thread this dispatch landed in",route:{view:"conversation",conversationId:e.conversationId}}),(e.flightId||e.sessionId)&&t.push({key:"trace",label:"Live trace",hint:"The session that ran the work",route:{view:"sessions",...e.flightId?{flightId:e.flightId}:{},...e.sessionId?{sessionId:e.sessionId}:{},...e.targetAgentId?{agentId:e.targetAgentId}:{}}}),e.workId&&!s.nativeHost&&t.push({key:"work",label:"Work item",hint:"The collaboration record it belongs to",route:{view:"work",workId:e.workId}}),e.targetAgentId&&t.push({key:"agent",label:"Recipient",hint:"The agent that received it",route:{view:"agents-v2",agentId:e.targetAgentId,tab:"observe"}}),t.length>0&&t.push({key:"tail",label:"Tail",hint:"Raw events for these ids",route:R(e,"tail")}),t}const P={queued:"Queued",dispatched:"Dispatched",running:"Running",succeeded:"Completed",completed:"Completed",failed:"Failed",errored:"Failed",cancelled:"Cancelled",canceled:"Cancelled",timed_out:"Timed out",expired:"Expired"},U=new Set(["failed","errored","timed_out","expired"]),v=new Set(["queued","dispatched","running"]),G=new Set(["succeeded","completed"]);function q(e){if(!e)return null;const s=e.state?.trim().toLowerCase()||"unknown",t=U.has(s)?"danger":v.has(s)?"working":G.has(s)?"success":"neutral",n=e.startedAt&&e.completedAt?Math.max(0,e.completedAt-e.startedAt):null;return{state:s,label:P[s]??s.replace(/_/g," "),tone:t,summary:e.summary?.trim()||null,durationMs:n,settled:!v.has(s)}}function O(e){if(e<1e3)return"instant";const s=Math.round(e/1e3);if(s<60)return`${s}s later`;const t=Math.round(s/60);if(t<60)return`${t}m later`;const n=Math.round(t/60);return n<48?`${n}h later`:`${Math.round(n/24)}d later`}function B(e){if(e<1e3)return`${e}ms`;const s=e/1e3;if(s<60)return`${s.toFixed(s<10?1:0)}s`;const t=Math.floor(s/60),n=Math.round(s%60);return t<60?n>0?`${t}m ${n}s`:`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}const w=180,Q=250,W={loading:!0,target:null,targetUnknown:!1,flight:null,aftermath:{status:"no-conversation"}};function z(e,s){const[t,n]=f.useState(W),[l,u]=f.useState(0),d=f.useRef(0),o=e.conversationId,i=f.useMemo(()=>D(e,s)?.toString()??null,[e,s]);f.useEffect(()=>{const a=++d.current;n(p=>({...p,loading:!0}));const x=i?y(`/api/follow?${i}`).catch(()=>null):Promise.resolve(null),A=o?y(`/api/messages?conversationId=${encodeURIComponent(o)}&limit=${$}`).catch(()=>null):Promise.resolve(null);return(async()=>{const[p,g]=await Promise.all([x,A]);if(a!==d.current)return;const T=p?.flightId?await y(`/api/flights?active=false&flightId=${encodeURIComponent(p.flightId)}`).then(N=>N[0]??null).catch(()=>null):null;a===d.current&&n({loading:!1,target:p,targetUnknown:!!i&&!p,flight:T,aftermath:o?g?F(e,g):{status:"unavailable"}:{status:"no-conversation"}})})(),()=>{d.current+=1}},[e,o,i,l]);const c=f.useRef(null),m=f.useCallback(()=>{c.current||(c.current=setTimeout(()=>{c.current=null,u(a=>a+1)},Q))},[]);f.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const I=t.flight?.id??t.target?.flightId??null;return S(a=>{switch(a.kind){case"message.posted":o&&a.payload.message.conversationId===o&&m();return;case"delivery.state.changed":e.messageId&&a.payload.delivery.messageId===e.messageId&&m();return;case"flight.updated":I&&a.payload.flight.id===I&&m();return}}),{...t,reload:m}}function ie({attempt:e,targetAgentId:s,navigate:t,returnTo:n}){const{loading:l,target:u,targetUnknown:d,flight:o,aftermath:i}=z(e,s),c=q(o),m=u?H(u,{nativeHost:j()}):[],I=f.useCallback(a=>M(t,a,{returnTo:n}),[t,n]);return r.jsxs("section",{className:"sys-broker-aftermath","aria-labelledby":"dispatch-aftermath-title",children:[r.jsxs("div",{className:"sys-broker-aftermath-head",children:[r.jsx("span",{id:"dispatch-aftermath-title",className:"sys-detail-label",children:"What happened next"}),l&&r.jsx(C,{className:"sys-broker-action-spinner",size:12,"aria-hidden":"true"})]}),c&&r.jsxs("div",{className:`sys-broker-aftermath-outcome sys-broker-aftermath-outcome--${c.tone}`,children:[r.jsx("span",{className:`sys-broker-dot sys-broker-dot--${c.tone}`,"aria-hidden":"true"}),r.jsx("strong",{children:c.label}),c.durationMs!==null&&r.jsxs("span",{className:"sys-broker-aftermath-duration",children:["ran ",B(c.durationMs)]}),c.summary&&r.jsx("p",{children:k(c.summary,w)})]}),i.status==="replies"?r.jsxs("ol",{className:"sys-broker-aftermath-replies",children:[i.replies.map(a=>r.jsx("li",{children:r.jsxs("button",{type:"button",className:"sys-broker-aftermath-reply",disabled:!e.conversationId,onClick:()=>e.conversationId&&I({view:"conversation",conversationId:e.conversationId}),children:[r.jsxs("span",{className:"sys-broker-aftermath-reply-head",children:[r.jsx("strong",{children:a.actorName}),a.answersDispatch&&r.jsx("span",{className:"sys-broker-aftermath-answer",children:"reply"}),r.jsx("span",{className:"sys-broker-aftermath-gap",children:O(a.afterMs)})]}),r.jsx("span",{className:"sys-broker-aftermath-reply-body",children:k(a.body,w)})]})},a.id)),i.more>0&&r.jsxs("li",{className:"sys-broker-aftermath-more",children:["+",i.more," more in the thread"]})]}):!l&&r.jsx("p",{className:"sys-broker-aftermath-empty",children:i.status==="no-conversation"?"No conversation followed this dispatch, so there is nothing to open.":i.status==="unavailable"?"The conversation could not be read, so what followed is unknown.":i.status==="beyond-page"?"This dispatch is older than the loaded transcript. Open the conversation to read it in place.":c&&!c.settled?"Still running. Nothing has come back yet.":"Nothing followed this dispatch in its conversation."}),m.length>0?r.jsx("div",{className:"sys-broker-aftermath-links",children:m.map(a=>r.jsxs("button",{type:"button",className:"sys-broker-aftermath-link",title:a.hint,onClick:()=>I(a.route),children:[a.label,r.jsx(L,{size:11,"aria-hidden":"true"})]},a.key))}):!l&&i.status!=="no-conversation"&&r.jsx("p",{className:"sys-broker-aftermath-empty",children:d?"Where this went could not be looked up, so there is nothing to link to yet.":"No session, work item, or recipient could be resolved from this row."}),o?.completedAt&&r.jsxs("div",{className:"sys-broker-aftermath-foot",children:["Settled ",E(o.completedAt)]})]})}export{ie as DispatchAftermath};
|
package/dist/client/assets/{DocumentFocusViewer-CZVVIAD5.js → DocumentFocusViewer-B9vodVmG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./createLucideIcon-
|
|
1
|
+
import{c as u}from"./createLucideIcon-CFBn0Sdk.js";import{r,j as e}from"./index-DmFAhGPj.js";import{T as H}from"./TextDocumentSurface-BWJCGBZf.js";/* empty css */import{F as A}from"./file-text-DcYSrI4v.js";import{X as R}from"./x-C8ayPBtj.js";const S=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],G=u("folder-open",S);const W=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],J=u("folder",W);const B=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],T=u("maximize-2",B);const V=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],C=u("minimize-2",V);function P({open:a=!0,focusable:M=!0,kind:F,document:t,title:z,eyebrow:v,subtitle:w,meta:x=[],mode:$,actions:L=[],state:p,error:c,notice:j,body:d,onClose:o}){const[i,m]=r.useState(!1),[g,y]=r.useState({}),b=r.useRef(null);if(r.useEffect(()=>{a||m(!1)},[a]),r.useEffect(()=>{if(!a)return;let s=null;const l=b.current?.closest(".frame-scrollbar, .s-content")??null,N=()=>{if(!l){y({});return}const n=l.getBoundingClientRect();y({"--doc-focus-layer-top":`${Math.max(0,n.top)}px`,"--doc-focus-layer-right":`${Math.max(0,window.innerWidth-n.right)}px`,"--doc-focus-layer-bottom":`${Math.max(0,window.innerHeight-n.bottom)}px`,"--doc-focus-layer-left":`${Math.max(0,n.left)}px`})},h=()=>{s!==null&&cancelAnimationFrame(s),s=requestAnimationFrame(N)};N();const E=l?new ResizeObserver(h):null;return l&&E?.observe(l),window.addEventListener("resize",h),()=>{s!==null&&cancelAnimationFrame(s),E?.disconnect(),window.removeEventListener("resize",h)}},[a]),r.useEffect(()=>{if(!a)return;const s=f=>{f.key==="Escape"&&(f.preventDefault(),i?m(!1):o?.())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[i,o,a]),!a)return null;const k=z??t?.title??"Document",D=$??(t?.kind==="markdown"?"preview":"read"),_=M&&!!(t||d);return e.jsxs("div",{ref:b,className:`s-doc-focus-layer${i?" s-doc-focus-layer-focused":""}`,style:g,children:[o&&e.jsx("button",{type:"button",className:"s-doc-focus-scrim","aria-label":"Dismiss document viewer",tabIndex:-1,onClick:o}),e.jsxs("section",{className:`s-doc-focus-viewer s-doc-focus-viewer-${F}${i?" s-doc-focus-viewer-focused":""}`,"aria-label":k,role:"dialog","aria-modal":"true",children:[e.jsxs("div",{className:"s-doc-focus-viewer-head",children:[e.jsxs("div",{className:"s-doc-focus-viewer-title-wrap",children:[e.jsx("div",{className:"s-doc-focus-viewer-icon","aria-hidden":"true",children:e.jsx(A,{size:15,strokeWidth:1.8})}),e.jsxs("div",{className:"s-doc-focus-viewer-title-main",children:[v&&e.jsx("div",{className:"s-doc-focus-viewer-eyebrow",children:v}),e.jsx("h3",{className:"s-doc-focus-viewer-title",children:k}),w&&e.jsx("div",{className:"s-doc-focus-viewer-subtitle",children:w})]})]}),e.jsxs("div",{className:"s-doc-focus-viewer-actions",children:[x.length>0&&e.jsx("div",{className:"s-doc-focus-viewer-meta","aria-label":"Document metadata",children:x.map(s=>e.jsx("span",{children:s},s))}),L.map(s=>e.jsxs("button",{type:"button",className:`s-doc-focus-viewer-action${s.hideLabel?" s-doc-focus-viewer-action-icon":""}`,onClick:s.onClick,title:s.title??s.label,disabled:s.disabled,"aria-label":s.hideLabel?s.label:void 0,children:[s.icon,!s.hideLabel&&e.jsx("span",{children:s.label})]},s.label)),_&&e.jsx("button",{type:"button",className:"s-doc-focus-viewer-close",onClick:()=>m(s=>!s),"aria-label":i?"Exit focus mode":"Enter focus mode",title:i?"Exit focus mode":"Focus",children:i?e.jsx(C,{"aria-hidden":"true",size:14,strokeWidth:1.8}):e.jsx(T,{"aria-hidden":"true",size:14,strokeWidth:1.8})}),o&&e.jsx("button",{type:"button",className:"s-doc-focus-viewer-close",onClick:o,"aria-label":"Close document viewer",title:"Close",children:e.jsx(R,{"aria-hidden":"true",size:14,strokeWidth:1.8})})]})]}),p&&!c&&!t&&!d&&e.jsx("div",{className:"s-doc-focus-viewer-state",children:p}),c&&e.jsx("div",{className:"s-doc-focus-viewer-state s-doc-focus-viewer-error",children:c}),!c&&d&&e.jsx("div",{className:"s-doc-focus-viewer-body",children:d}),!c&&!d&&t&&e.jsx(H,{document:t,mode:D,showHeader:!1,className:"s-doc-focus-document"}),!c&&j&&e.jsx("div",{className:"s-doc-focus-viewer-notice",children:j})]})]})}export{P as D,J as F,C as M,G as a,T as b};
|
package/dist/client/assets/{EmbeddableSurfacesLab-C3a7hJWO.js → EmbeddableSurfacesLab-BdsYRDky.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-
|
|
1
|
+
import{r as l,j as e}from"./index-DmFAhGPj.js";import{l as c}from"./discover-DKf0aTr_.js";import"./types-B0PlfpKc.js";function n(){const[r,a]=l.useState([]);return l.useEffect(()=>{let s=!1;return c().then(d=>{s||a(d)}),()=>{s=!0}},[]),e.jsxs("div",{className:"s-embeddable-surfaces-lab","data-scout-theme":!0,children:[e.jsxs("header",{className:"s-embeddable-surfaces-lab__header",children:[e.jsx("h1",{children:"Embeddable surfaces"}),e.jsxs("p",{children:["Screens that exported ",e.jsx("code",{children:"scoutSurface.embed"})," and were discovered from"," ",e.jsx("code",{children:"client/screens/**"}),". No separate embed registry file — parity comes from the screen declaration."]})]}),e.jsxs("table",{className:"s-embeddable-surfaces-lab__table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"ID"}),e.jsx("th",{children:"Label"}),e.jsx("th",{children:"Web"}),e.jsx("th",{children:"Embed"}),e.jsx("th",{children:"Profile"}),e.jsx("th",{children:"Module"})]})}),e.jsx("tbody",{children:r.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:s.id})}),e.jsx("td",{children:s.label}),e.jsx("td",{children:e.jsx("a",{href:s.webPath,children:s.webPath})}),e.jsxs("td",{children:[e.jsx("div",{children:e.jsx("a",{href:s.embedPath,children:s.embedPath})}),s.embedAliases.length>0&&e.jsx("div",{className:"s-embeddable-surfaces-lab__aliases",children:s.embedAliases.map(d=>e.jsx("a",{href:d,children:d},d))})]}),e.jsx("td",{children:e.jsx("code",{children:s.profile})}),e.jsx("td",{children:e.jsx("code",{children:s.modulePath.replace("../","")})})]},s.id))})]}),r.length===0&&e.jsx("p",{className:"s-embeddable-surfaces-lab__empty",children:"No embeddable screens discovered yet."})]})}export{n as EmbeddableSurfacesLab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DmFAhGPj.js";function c({title:n,body:s,icon:i,action:t,className:a}){const l=a?`sys-panel sys-state-card ${a}`:"sys-panel sys-state-card";return e.jsxs("div",{className:l,children:[i,e.jsx("h3",{className:"sys-state-title",children:n}),s!=null&&(typeof s=="string"?e.jsx("p",{className:"sys-state-body",children:s}):s),t&&e.jsx("div",{className:"sys-inline-actions",children:t})]})}export{c as E};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as n,j as t}from"./index-
|
|
1
|
+
import{r as n,j as t}from"./index-DmFAhGPj.js";import{T as b,c as j}from"./TextDocumentSurface-BWJCGBZf.js";import{a as N}from"./api-h5zurxmi.js";function V(e,a,u){const o=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx"),s=e.relativePath.endsWith(".json");return j({id:e.absolutePath,title:e.relativePath,uri:e.absolutePath,filename:e.relativePath.split("/").pop(),kind:o?"markdown":"code",language:s?"json":o?"markdown":"plain",value:u?`${a}
|
|
2
2
|
|
|
3
3
|
— excerpt —`:a,readOnly:!0})}function y({artifact:e,onOpen:a,onReveal:u,onBrowse:o}){const[s,l]=n.useState(e.excerpt),[c,i]=n.useState(!0),[w,h]=n.useState(!1),[m,p]=n.useState(null);n.useEffect(()=>{l(e.excerpt),i(!0),p(null);let d=!1;return h(!0),N(`/api/file/preview?path=${encodeURIComponent(e.absolutePath)}`).then(r=>{if(!d)if(r.kind==="file"&&r.previewable){const x=r;l(x.content),i(x.truncated)}else e.excerpt?(l(e.excerpt),i(!0)):(l(null),p("Preview not available for this file type."))}).catch(r=>{d||(e.excerpt?(l(e.excerpt),i(!0)):p(r instanceof Error?r.message:"Could not load file."))}).finally(()=>{d||h(!1)}),()=>{d=!0}},[e.absolutePath,e.excerpt]);const v=n.useMemo(()=>s?V(e,s,c):null,[e,s,c]),P=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx");return t.jsxs(t.Fragment,{children:[t.jsxs("header",{className:"av2-repoViewerHead",children:[t.jsxs("div",{className:"av2-repoViewerPath",children:[t.jsx("span",{className:"av2-repoViewerPathFile",children:e.relativePath}),t.jsx("span",{className:"av2-repoViewerPathAbs",title:e.absolutePath,children:e.absolutePath})]}),t.jsxs("div",{className:"av2-repoViewerActs",children:[t.jsx("button",{type:"button",className:"av2-repoViewerAct","data-primary":!0,onClick:()=>a(e.absolutePath),children:"open"}),o?t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>o(e.absolutePath),children:"browse"}):null,t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>{u(e.absolutePath)},children:"reveal"})]})]}),t.jsxs("div",{className:"av2-repoViewerBody",children:[w&&!s?t.jsx("div",{className:"av2-repoViewerState",children:"Loading file…"}):m&&!s?t.jsx("div",{className:"av2-repoViewerState av2-repoViewerState--error",children:m}):v?t.jsx(b,{document:v,mode:P?"preview":"read",className:"av2-repoViewerDoc"}):t.jsx("div",{className:"av2-repoViewerState",children:"No content."}),c?t.jsx("div",{className:"av2-repoViewerNotice",children:"Showing excerpt — use open for the full file."}):null]})]})}export{y as FileViewerPane};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./index-
|
|
1
|
+
import{j as s}from"./index-DmFAhGPj.js";function f({value:e,onChange:a,placeholder:t="Search…",onKeyDown:r}){return s.jsx("input",{type:"search",className:"fleet-search",placeholder:t,value:e,onChange:o=>a(o.target.value),onKeyDown:r,spellCheck:!1,autoCorrect:"off",autoCapitalize:"off"})}export{f as F};
|
package/dist/client/assets/{FlightObserveScreen-g_tiGmvz.js → FlightObserveScreen-BVMdsiCC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as s}from"./index-
|
|
1
|
+
import{r as c,j as s}from"./index-DmFAhGPj.js";import{a as k}from"./api-h5zurxmi.js";import{u as R}from"./sse-CxXt4tqI.js";import{d as $,t as F}from"./time-Dhsh_2EG.js";import{SessionRefScreen as j}from"./SessionRefScreen-OkTY7Szg.js";/* empty css */import{c as E}from"./createLucideIcon-CFBn0Sdk.js";import{X as A}from"./x-C8ayPBtj.js";import"./index-BWHgHrtv.js";import"./tail-events-BdvqZHLr.js";import"./BackToPicker-D1LV6Cqp.js";import"./router-Cn_s9IGH.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./ConversationScreen-B3l2m3JI.js";import"./NewChatComposer-Hd7pI5Ac.js";import"./runtime-picker--IW3cRry.js";import"./scout-voice-CwbOz6EN.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-d6PKL_KD.js";import"./MessageComposerSuggestions-FdVHnT_q.js";import"./index-CmwGCxUk.js";import"./HarnessMark-BPAphNjx.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./NewChatOrigin-DmuJ32wa.js";import"./keyboard-nav-h1IdakpD.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-B3VVRJcV.js";import"./search-DAyagUtF.js";import"./file-text-DcYSrI4v.js";import"./ConversationComposer-Bf7Ga_49.js";import"./Provider-cJCdHAxu.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CHIuVKz7.js";import"./DocumentFocusViewer-B9vodVmG.js";import"./TextDocumentSurface-BWJCGBZf.js";/* empty css */import"./chevron-right-BYMV1511.js";import"./code-xml-BFc3TMSm.js";import"./arrow-left-B-3GJ7ct.js";import"./chunk-HRAB3GC3-dRd2eQMJ.js";import"./message-markup-CyRDLdOn.js";import"./mentions-agCGDgyA.js";import"./AgentDetailCard-BTiOmh-a.js";import"./AgentLiveActions-BJ5dIfL3.js";import"./terminal-takeover-BOFPRPjR.js";import"./openContent-C6XO6kr5.js";import"./eye-1J4yOUoG.js";import"./terminal-DJPUp_Qn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./AgentAvatar-D8ZtMluU.js";import"./SpriteAvatar-DS6Tmyua.js";import"./agent-identity-BxCsXnDp.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-B_GXrKR0.js";import"./ConversationFeedRows-Cm1Lgo43.js";import"./ConversationPanels-BTBbEvrP.js";import"./use-reduced-motion-CYqhYqHO.js";import"./activity-CC8JzJNH.js";import"./message-circle-CJO-pi7b.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./ConversationStatus-BqhUHD85.js";import"./SessionObserve-yYA8Gy5s.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-B7KdvQvf.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-CaSZZP05.js";import"./ObserveTextFlow-CkMrtT8s.js";import"./SessionObserveEvidence-cHdjYOJe.js";import"./wrench-CvRjjByE.js";import"./external-link-B1TI5yIt.js";/* empty css */const T=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],L=E("columns-2",T);function S(t){const o=new Map;for(const r of t)o.delete(r.sessionId),o.set(r.sessionId,r);return[...o.values()]}function M(t,o){const r=S(t),p=o?.trim()||null;return r.find(n=>n.sessionId===p)?.sessionId??r.at(-1)?.sessionId??p}function O(t){return t.length<=34?t:`${t.slice(0,15)}…${t.slice(-14)}`}function q(t,o){return o===0?t.strategy||"dispatch":t.strategy?`switched via ${t.strategy}`:"session changed"}function y({label:t,sessions:o,value:r,onChange:p}){return s.jsxs("label",{className:"s-flight-observe-select-wrap",children:[s.jsx("span",{children:t}),s.jsx("select",{className:"s-flight-observe-select",value:r,onChange:n=>p(n.currentTarget.value),children:o.map(n=>s.jsxs("option",{value:n.sessionId,children:[n.harness?`${n.harness} · `:"",n.sessionId]},n.sessionId))})]})}function pe({route:t,navigate:o}){const[r,p]=c.useState(null),[n,I]=c.useState(!0),[h,N]=c.useState(null),u=c.useCallback(async()=>{try{const e=await k(`/api/flights?active=false&flightId=${encodeURIComponent(t.flightId)}`);p(e[0]??null),N(e.length===0?"This flight is not available on the connected broker.":null)}catch(e){N(e instanceof Error?e.message:String(e))}finally{I(!1)}},[t.flightId]);c.useEffect(()=>{I(!0),u()},[u]),R(()=>{u()});const v=r?.sessions??[],a=c.useMemo(()=>S(v),[v]),g=M(v,t.sessionId),i=a.find(e=>e.sessionId===g)??null,l=a.find(e=>e.sessionId===t.compareSessionId)??null,f=!!(i&&l&&i.sessionId!==l.sessionId),m=c.useCallback((e,d)=>{o({...t,sessionId:e,...d?{compareSessionId:d}:{compareSessionId:void 0}})},[o,t]),w=c.useCallback(()=>{if(!i||a.length<2)return;const e=[...a].reverse().find(d=>d.sessionId!==i.sessionId);e&&m(i.sessionId,e.sessionId)},[i,a,m]),C=c.useCallback(e=>{if(!f||!i||!l){m(e);return}m(e,e===l.sessionId?i.sessionId:l.sessionId)},[l,i,f,m]);return s.jsxs("div",{className:"s-flight-observe",children:[s.jsxs("header",{className:"s-flight-observe-header",children:[s.jsxs("div",{className:"s-flight-observe-heading",children:[s.jsx("div",{className:"s-flight-observe-eyebrow",children:"Flight observe"}),s.jsxs("div",{className:"s-flight-observe-title-row",children:[s.jsx("h2",{children:r?.agentName||r?.agentId||"Flight"}),s.jsx("span",{className:`s-flight-observe-state s-flight-observe-state--${r?.state??"loading"}`,children:r?.state??(n?"loading":"unknown")})]}),s.jsx("div",{className:"s-flight-observe-id",title:t.flightId,children:t.flightId}),r?.summary&&s.jsx("p",{children:r.summary})]}),s.jsxs("div",{className:"s-flight-observe-actions",children:[a.length>1&&!f&&s.jsxs("button",{type:"button",onClick:w,children:[s.jsx(L,{size:13})," Split view"]}),f&&i&&s.jsxs("button",{type:"button",onClick:()=>m(i.sessionId),children:[s.jsx(A,{size:13})," Close split"]})]})]}),v.length>0&&s.jsx("nav",{className:"s-flight-observe-trace","aria-label":"Flight session history",children:v.map((e,d)=>{const b=i?.sessionId===e.sessionId,x=l?.sessionId===e.sessionId;return s.jsxs("div",{className:"s-flight-observe-trace-step",children:[d>0&&s.jsx("span",{className:"s-flight-observe-trace-arrow","aria-hidden":"true",children:"→"}),s.jsxs("button",{type:"button",className:"s-flight-observe-session-chip","data-selected":b||x,"data-observe-role":b?"primary":x?"compare":"idle","aria-pressed":b||x,title:e.sessionId,onClick:()=>C(e.sessionId),children:[s.jsxs("span",{className:"s-flight-observe-session-chip-top",children:[s.jsx("span",{children:e.harness||e.transport||"session"}),s.jsx("time",{title:new Date(e.startedAt).toLocaleString(),children:$(e.startedAt)||F(e.startedAt)})]}),s.jsx("strong",{children:O(e.sessionId)}),s.jsx("small",{children:q(e,d)})]})]},`${e.sessionId}:${e.startedAt}:${d}`)})}),h&&!g&&s.jsx("div",{className:"s-flight-observe-message s-flight-observe-message--error",children:h}),h&&g&&s.jsxs("div",{className:"s-flight-observe-message",children:[s.jsx("strong",{children:"Flight record unavailable"}),s.jsx("span",{children:"Showing the concrete session captured by this link."})]}),!h&&n&&s.jsx("div",{className:"s-flight-observe-message",children:"Resolving the flight’s session trace…"}),!h&&!n&&a.length===0&&!g&&s.jsxs("div",{className:"s-flight-observe-message",children:[s.jsx("strong",{children:"Waiting for a session"}),s.jsx("span",{children:"The flight is stable here; its trace will appear as soon as a harness acknowledges dispatch."})]}),g&&!f&&s.jsx("main",{className:"s-flight-observe-single",children:s.jsx(j,{sessionRef:g,navigate:o})}),!h&&i&&l&&f&&s.jsxs("main",{className:"s-flight-observe-split",children:[s.jsxs("section",{className:"s-flight-observe-pane",children:[s.jsx(y,{label:"Primary session",sessions:a,value:i.sessionId,onChange:e=>m(e,e===l.sessionId?i.sessionId:l.sessionId)}),s.jsx("div",{className:"s-flight-observe-pane-content",children:s.jsx(j,{sessionRef:i.sessionId,navigate:o,showObserveRail:!1})})]}),s.jsxs("section",{className:"s-flight-observe-pane",children:[s.jsx(y,{label:"Compare session",sessions:a.filter(e=>e.sessionId!==i.sessionId),value:l.sessionId,onChange:e=>m(i.sessionId,e)}),s.jsx("div",{className:"s-flight-observe-pane-content",children:s.jsx(j,{sessionRef:l.sessionId,navigate:o,showObserveRail:!1})})]})]})]})}export{pe as FlightObserveScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as r}from"./index-
|
|
1
|
+
import{r as o,j as r}from"./index-DmFAhGPj.js";import{a as h}from"./api-h5zurxmi.js";import{t as p,r as c,m as g}from"./follow-route-BvcGtBIL.js";import{s as l}from"./router-Cn_s9IGH.js";/* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";function N({route:e,navigate:t}){const[d,m]=o.useState(null),i=o.useMemo(()=>p(e),[e]);return o.useEffect(()=>{let n=!1;const s=new URLSearchParams;return e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),(async()=>{try{const a=s.toString(),f=a?await h(`/api/follow?${a}`):i;if(n)return;t(l(c(g(f,i),e.preferredView),e.machineId??null))}catch(a){if(n)return;m(a instanceof Error?a.message:String(a)),t(l(c(i,e.preferredView),e.machineId??null))}})(),()=>{n=!0}},[i,t,e]),r.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:r.jsx("section",{className:"s-thread-overview",children:r.jsxs("div",{className:"s-thread-overview-copy",children:[r.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[r.jsx("h2",{className:"s-page-title",children:"Follow"}),r.jsx("span",{className:"s-meta s-tabular",children:e.preferredView??"auto"})]}),r.jsx("p",{className:"s-thread-overview-summary",children:d?"Opening the closest available Scout view.":"Resolving Scout context..."})]})})})}export{N as FollowScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./index-
|
|
1
|
+
import{j as e}from"./index-DmFAhGPj.js";function p(o){const i=o?.trim().toLowerCase();if(!i)return"unknown";const n=i.replace(/[\s(].*$/,"").replace(/[_-].*$/,""),l={anthropic:"claude",claude:"claude",claudecode:"claude",sonnet:"claude",opus:"claude",openai:"codex",codex:"codex",gpt:"codex",chatgpt:"codex",oai:"codex",xai:"grok",grok:"grok",kimi:"kimi",moonshot:"kimi",google:"gemini",gemini:"gemini",vertex:"gemini",cursor:"cursor",github:"github",opencode:"opencode",oc:"opencode",amp:"amp",sourcegraph:"amp",pi:"pi",inflection:"pi",omp:"pi","oh-my-pi":"pi",claw:"claw",native:"native",worker:"worker",quad:"quad"};return l[n]??l[i.replace(/[\s(].*$/,"")]??i}const m={claude:"Claude",codex:"Codex",grok:"Grok",kimi:"Kimi",gemini:"Gemini",cursor:"Cursor",github:"GitHub",opencode:"OpenCode",amp:"Amp",pi:"Pi",claw:"Claw",native:"Native",worker:"Worker",quad:"Quad"};function g(o){const i=p(o);return m[i]??(o?.trim()||"Unknown")}const c={fill:{fill:"currentColor"},line:{fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},t={claude:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",gemini:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81",cursor:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",opencode:"M22 24H2V0h20zM17 4.8H7v14.4h10z"},r=o=>e.jsx("path",{d:o,fill:"currentColor"}),k={amp:{viewBox:"0.6 1.4 8.8 8.8",paths:["M2.37694 9.23487L4.34679 7.23716L5.06365 9.95891L6.10505 9.67408L5.06749 5.72214L1.17831 4.6688L0.901367 5.73289L3.5775 6.45984L1.61584 8.45465L2.37694 9.23487Z","M8.05742 6.91898L9.09885 6.63416L8.0613 2.68224L4.17209 1.62891L3.89515 2.693L7.17936 3.58514L8.05742 6.91898Z","M6.56226 8.43797L7.60365 8.15314L6.5661 4.20121L2.67692 3.14787L2.39998 4.21196L5.68416 5.10411L6.56226 8.43797Z"]},grok:{viewBox:"0 0 34 33",paths:["M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436","M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341"]}},C=e.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),j=e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M4.5 3h3.4v7.4L14.7 3h4.5l-7.9 8.5L19.8 21h-4.6l-7.3-8.2V21H4.5Z"}),e.jsx("circle",{cx:"20.2",cy:"3.8",r:"1.8"})]}),v=e.jsxs("g",{...c.line,strokeWidth:2,children:[e.jsx("path",{d:"M6.5 8.5h11"}),e.jsx("path",{d:"M10 8.5 9 17M14.2 8.5 15.2 17"})]}),w=e.jsxs("g",{...c.line,children:[e.jsx("path",{d:"M6.5 8 11 12l-4.5 4"}),e.jsx("path",{d:"M12.5 16.5H18",strokeWidth:1.8})]}),M=e.jsxs("g",{...c.line,strokeWidth:1.8,children:[e.jsx("path",{d:"M12 4.5 18.5 8.2v7.6L12 19.5 5.5 15.8V8.2L12 4.5Z"}),e.jsx("circle",{cx:12,cy:12,r:2.7})]}),y=e.jsxs("g",{...c.fill,children:[e.jsx("rect",{x:5.5,y:5.5,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:13.1,y:5.5,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:5.5,y:13.1,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:13.1,y:13.1,width:5.4,height:5.4,rx:1.3})]}),f=e.jsxs("g",{...c.line,strokeWidth:2,children:[e.jsx("path",{d:"M7.5 6Q9.5 12 8.5 18"}),e.jsx("path",{d:"M12 5.5Q14 12 13 18.5"}),e.jsx("path",{d:"M16.5 6Q18.5 12 17.5 18"})]}),b={claude:r(t.claude),codex:C,kimi:j,gemini:r(t.gemini),cursor:r(t.cursor),github:r(t.github),opencode:r(t.opencode),pi:v,native:w,worker:M,quad:y,claw:f};function G({harness:o,size:i=14,className:n,style:l,title:d}){const a=p(o),s=k[a],x=b[a],h=d===null?void 0:d??g(o);return e.jsx("span",{className:n,style:l,title:h,"aria-hidden":h?void 0:!0,children:e.jsx("svg",{viewBox:s?.viewBox??"0 0 24 24",width:i,height:i,style:{display:"block"},role:"img","aria-label":h,children:s?s.paths.map((u,L)=>e.jsx("path",{d:u,fill:"currentColor"},L)):x??e.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"13",fontWeight:"600",fontFamily:"var(--font-mono)",fill:"currentColor",children:(a[0]??"?").toUpperCase()})})})}export{G as H,g as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,j as e}from"./index-BZovGpDk.js";import{H as R,h as q}from"./HarnessMark-DrE57dUq.js";import{a as M}from"./api-h5zurxmi.js";import{b as D}from"./router-63XV_E7f.js";import{t as O,n as S,f as L}from"./time-Dhsh_2EG.js";import{u as P}from"./Provider-p-xuaAoE.js";import{u as T}from"./useContentSecondaryNav-CNlrhvvx.js";import{OpsSubnav as E}from"./OpsSubnav-CJRD7MjM.js";/* empty css */import{R as U}from"./refresh-cw-DtF8xPqX.js";import{E as $}from"./external-link-Dd8xaveL.js";import{c as H}from"./createLucideIcon-DCq_3fQn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./sse-Bb0EOcU9.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./file-text-BITQqGtF.js";import"./x-CrGUKNRv.js";import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./index-DiiEQwdc.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DXPvX-hh.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./SecondaryNav-B4IsujYh.js";import"./secondaryNavConfig-c0cz3MkJ.js";import"./message-square-BnkG6tae.js";import"./terminal-xGf_F3y7.js";import"./scroll-text-DZb3mmYo.js";/* empty css */const _=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],z=H("clipboard-paste",_),B={codex:"Codex",claude:"Claude",kimi:"Kimi",minimax:"MiniMax",cursor:"Cursor",native:"Native",worker:"Worker",bridge:"Bridge",http:"HTTP",pi:"Pi",flue:"Flue",github:"GitHub",unknown:"Unknown"},C=[{id:"claude",description:"Anthropic plan windows captured from Claude Code.",links:[{label:"Usage",href:"https://claude.ai/settings/usage"},{label:"Manage plan",href:"https://claude.ai/settings/billing"}]},{id:"codex",description:"OpenAI plan windows reported by local Codex sessions.",links:[{label:"Usage",href:"https://chatgpt.com/codex/settings/usage"},{label:"Open Codex",href:"https://chatgpt.com/codex"}]},{id:"kimi",description:"Kimi Code subscription windows and membership level.",links:[{label:"Kimi Code",href:"https://www.kimi.com/code"},{label:"Docs",href:"https://www.kimi.com/code/docs/en/"}]},{id:"grok",description:"SuperGrok quota reported by local Grok, with dashboard capture and local activity as fallbacks.",links:[{label:"Open Grok",href:"https://grok.com/"},{label:"Billing",href:"https://grok.com/?_s=billing"},{label:"Help",href:"https://docs.x.ai/grok/faq"}]},{id:"minimax",description:"MiniMax Token Plan 5-hour and weekly allowance.",links:[{label:"Usage",href:"https://platform.minimax.io/console/plan"},{label:"Docs",href:"https://platform.minimax.io/docs/token-plan/intro"}]},{id:"cursor",description:"Cursor membership detected locally, plus usage totals from an exported dashboard capture.",links:[{label:"Usage",href:"https://cursor.com/dashboard/usage"},{label:"Manage plan",href:"https://cursor.com/dashboard/billing"}]}],G={cloudflare:[{label:"Dashboard",href:"https://dash.cloudflare.com/"},{label:"Billing",href:"https://dash.cloudflare.com/?to=/:account/billing"}],vercel:[{label:"Dashboard",href:"https://vercel.com/dashboard"},{label:"Billing",href:"https://vercel.com/account/billing"}],exe:[{label:"VMs",href:"https://exe.dev/"},{label:"Billing",href:"https://exe.dev/user/billing"},{label:"Docs",href:"https://exe.dev/docs/what-is-exe"}]},V={exe:{category:"Agent compute",description:"Persistent VMs for remote Scout agents and isolated workloads."},cloudflare:{category:"Edge platform",description:"Workers, networking, and edge infrastructure available for deployment."},vercel:{category:"App hosting",description:"Projects, preview environments, and production deployments."}};function W({provider:s}){return e.jsx("span",{className:`hs-cloud-mark hs-cloud-mark--${s}`,"aria-hidden":"true",children:s==="exe"?e.jsx("img",{src:"https://exe.dev/apple-touch-icon.png",alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer"}):e.jsx("svg",{viewBox:"0 0 24 24",focusable:"false",children:s==="cloudflare"?e.jsx("path",{d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268Zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"}):e.jsx("path",{d:"m12 1.608 12 20.784H0Z"})})})}function F(s){const t=(s??"").trim().toLowerCase();return t?t.includes("claude")?"claude":t.includes("codex")?"codex":t.includes("cursor")?"cursor":t.includes("kimi")||t.includes("moonshot")?"kimi":t.includes("minimax")?"minimax":t.includes("github")?"github":t.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown":"unknown"}function N(s){return B[s]??q(s)}function K(s){switch(s){case"weekly":return"7d";case"req/h":return"1h";default:return s||"quota"}}function v(s){return s.windows&&s.windows.length>0?s.windows:[{label:K(s.unitLabel),fill:s.fill,usedLabel:s.usedLabel,capLabel:s.capLabel,unitLabel:s.unitLabel,resetAt:s.resetAt}]}function Q(s){return s.capLabel==="100%"&&s.usedLabel.endsWith("%")?s.usedLabel:`${s.usedLabel}/${s.capLabel}`}function A(s){return s>=.9?"err":s>=.75?"warn":"ok"}function Z(s,t=30){const a=s??[];if(a.length<=t)return a;if(t<=1)return[a[a.length-1]];const r=(a.length-1)/(t-1);return Array.from({length:t},(n,o)=>a[Math.round(o*r)])}function I(s){const t=Math.floor((s-Date.now())/1e3),a=t<0,r=Math.abs(t);let n;if(r>=86400){const o=Math.floor(r/86400),c=Math.floor(r%86400/3600);n=c>0?`${o}d ${c}h`:`${o}d`}else if(r>=3600){const o=Math.floor(r/3600),c=Math.floor(r%3600/60);n=c>0?`${o}h ${c}m`:`${o}h`}else n=`${Math.max(1,Math.floor(r/60))}m`;return a?`stale ${n}`:n}function J(s){if(!s)return null;const t=S(s.capturedAt);if(t)return t;if(s.kind!=="quota")return null;const a=v(s).reduce((r,n)=>{const o=S(n.capturedAt);return Math.max(r??0,o??0)||r},null);return a||v(s).flatMap(r=>r.history??[]).reduce((r,n)=>{const o=S(n.capturedAt);return Math.max(r??0,o??0)||r},null)}function X({provider:s,onImported:t}){const[a,r]=u.useState(!1),[n,o]=u.useState(""),[c,b]=u.useState(!1),[i,d]=u.useState(null),l=`hs-${s}-dashboard-capture`,m=N(s);if(!a)return e.jsxs("button",{type:"button",className:"hs-dashboard-capture-trigger",onClick:()=>r(!0),children:[e.jsx(z,{size:12,"aria-hidden":"true"}),"Import dashboard"]});const x=async p=>{if(p.preventDefault(),!(!n.trim()||c)){b(!0),d(null);try{await M("/api/service-budgets/dashboard-import",{method:"POST",body:JSON.stringify({provider:s,text:n})}),o(""),d("Usage snapshot imported."),await t()}catch(h){d(h instanceof Error?h.message:String(h))}finally{b(!1)}}};return e.jsxs("form",{className:"hs-dashboard-capture",onSubmit:p=>{x(p)},children:[e.jsxs("label",{htmlFor:l,children:[m," usage snapshot"]}),e.jsxs("p",{children:[s==="cursor"?"Paste the exported Usage CSV or copied usage table.":"Copy the signed-in Usage panel and paste it here."," ","Scout keeps only normalized totals, not this text."]}),e.jsx("textarea",{id:l,value:n,onChange:p=>o(p.target.value),maxLength:128*1024,rows:5,placeholder:s==="cursor"?"Date (UTC),Type,Model,Tokens,Cost…":"Weekly SuperGrok… Limit · 12% used · Resets…","aria-describedby":i?`${l}-message`:void 0}),i?e.jsx("span",{id:`${l}-message`,className:"hs-dashboard-capture-message",role:"status",children:i}):null,e.jsxs("div",{className:"hs-dashboard-capture-actions",children:[e.jsx("button",{type:"button",onClick:()=>{r(!1),d(null)},disabled:c,children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!n.trim()||c,children:c?"Importing…":"Use snapshot"})]})]})}function Y(s){const t=new Map(s.map(a=>[F(a.id),a]));return C.map(({id:a})=>({id:a,label:N(a),gauge:t.get(a)??null}))}function ee({points:s}){const t=Z(s);return t.length===0?e.jsx("span",{className:"hs-history hs-history-empty",children:"live"}):e.jsx("span",{className:"hs-history","aria-label":`${t.length} budget samples`,children:t.map((a,r)=>{const n=Math.max(.06,Math.min(1,a.fill));return e.jsx("span",{className:`hs-history-bar hs-history-bar--${A(a.fill)}`,style:{height:`${Math.round(n*100)}%`},title:`${L(a.capturedAt)||"unknown"} ${a.usedLabel}`},`${a.capturedAt}:${r}`)})})}function se({gauge:s,window:t}){const a=Math.max(0,Math.min(100,Math.round(t.fill*100))),r=100-a,n=A(t.fill),o=Number.isFinite(t.resetAt)?new Date(t.resetAt).toISOString():void 0;return e.jsxs("div",{className:"hs-subscription-window",children:[e.jsxs("div",{className:"hs-subscription-window-head",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"hs-subscription-window-label",children:[t.label," window"]}),e.jsxs("strong",{className:`hs-subscription-usage hs-subscription-usage--${n}`,children:[a,"% used"]})]}),e.jsxs("div",{className:"hs-subscription-remaining",children:[e.jsxs("strong",{children:[r,"%"]}),e.jsx("span",{children:"available"})]})]}),e.jsx("div",{className:"hs-subscription-meter",role:"progressbar","aria-label":`${s.label} ${t.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:e.jsx("span",{className:`hs-subscription-meter-fill hs-subscription-meter-fill--${n}`,style:{width:`${a}%`}})}),e.jsxs("div",{className:"hs-subscription-window-meta",children:[e.jsxs("span",{children:[Q(t)," ",t.unitLabel==="quota"?"quota":t.unitLabel]}),e.jsxs("span",{children:["resets in ",I(t.resetAt),o?e.jsx("time",{dateTime:o,title:L(t.resetAt)||void 0,children:` · ${L(t.resetAt)||""}`}):null]})]}),e.jsx(ee,{points:t.history})]})}function te(){return e.jsxs("div",{className:"hs-subscription-loading","aria-hidden":"true",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--label"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--value"}),e.jsx("span",{className:"hs-loading-meter"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--meta"}),e.jsx("span",{className:"hs-loading-history"})]})}function ae({rows:s,loading:t,onImported:a}){const r=C.map(i=>({provider:i,row:s.find(d=>d.id===i.id)??null})),n=r.filter(({row:i})=>i?.gauge).length,o=r.filter(({row:i})=>i?.gauge?.kind==="quota").length,c=r.filter(({row:i})=>i?.gauge?.kind==="quota"&&i.gauge.plan||i?.gauge?.kind==="status").length,b=r.flatMap(({row:i})=>i?.gauge?.kind==="quota"?v(i.gauge):[]).map(i=>i.resetAt).filter(i=>i>Date.now()).sort((i,d)=>i-d)[0];return e.jsxs("section",{className:"hs-subscriptions","aria-labelledby":"hs-subscriptions-title","aria-busy":t,children:[e.jsxs("div",{className:"hs-section-head hs-subscriptions-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-subscriptions-title",children:"Subscriptions"}),e.jsx("p",{children:"Plans, remaining allowance, reset windows, and the fastest path to each provider dashboard."})]}),e.jsxs("div",{className:"hs-subscription-summary","aria-label":"Subscription feed summary",children:[e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":n})," detected"]}),e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":o})," usage feeds"]}),e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":c})," plans named"]}),e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":b?I(b):"-"})," next reset"]})]})]}),e.jsx("div",{className:"hs-subscription-grid",children:r.map(({provider:i,row:d})=>{const l=d?.gauge??null,m=t&&!l,x=m?"loading":l?"connected":"missing",p=l?.kind==="quota"?l.plan:l?.kind==="status"?l.statusLabel:null,h=J(l),y=l?.kind==="quota"?"Usage connected":l?.kind==="status"?l.detailLabel||"Subscription detected":m?"Checking":"Not detected";return e.jsxs("article",{className:`hs-subscription-card hs-subscription-card--${x}`,children:[e.jsxs("header",{className:"hs-subscription-card-head",children:[e.jsxs("div",{className:"hs-subscription-provider",children:[e.jsx(R,{harness:i.id,size:18,title:null,className:"hs-subscription-mark"}),e.jsxs("div",{children:[e.jsx("h4",{children:N(i.id)}),e.jsx("span",{children:m?"Checking local plan…":p||"Plan not reported"})]})]}),e.jsx("span",{className:`hs-subscription-state hs-subscription-state--${x}`,children:y})]}),e.jsx("p",{className:"hs-subscription-description",children:i.description}),m?e.jsx(te,{}):l?.kind==="quota"?e.jsx("div",{className:"hs-subscription-windows",children:v(l).map(f=>e.jsx(se,{gauge:l,window:f},`${i.id}:${f.label}`))}):l?.kind==="status"?e.jsxs("div",{className:"hs-subscription-status-detail",children:[e.jsx("strong",{children:l.statusLabel}),e.jsx("span",{children:l.detailLabel||"Subscription detected locally. Open the provider dashboard for live usage."})]}):e.jsxs("div",{className:"hs-subscription-missing",children:[e.jsx("strong",{children:"No local subscription feed yet"}),e.jsx("span",{children:"Open the provider locally, then refresh Scout."})]}),i.id==="cursor"||i.id==="grok"&&l?.kind!=="quota"?e.jsx(X,{provider:i.id,onImported:a}):null,e.jsxs("footer",{className:"hs-subscription-footer",children:[e.jsxs("span",{children:[m?"checking local feed":h?`updated ${O(h)||"now"}`:l?"detected locally":"waiting for provider data",l?.source?` · ${l.source}`:""]}),e.jsx("nav",{"aria-label":`${N(i.id)} quick links`,children:i.links.map(f=>e.jsxs("a",{href:f.href,target:"_blank",rel:"noreferrer",children:[f.label,e.jsx($,{size:11,"aria-hidden":"true"})]},f.href))})]})]},i.id)})})]})}function re({accounts:s,loading:t}){return s.length===0&&!t?null:e.jsxs("section",{className:"hs-cloud-accounts","aria-labelledby":"hs-cloud-accounts-title","aria-busy":t,children:[e.jsxs("div",{className:"hs-section-head hs-cloud-accounts-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-cloud-accounts-title",children:"Cloud accounts"}),e.jsx("p",{children:"Infrastructure available to Scout for deployment and agent compute."})]}),e.jsx("span",{className:"hs-section-meta",children:t?"checking accounts":`${s.length} connected`})]}),e.jsxs("div",{className:"hs-cloud-grid",children:[t&&s.length===0?Array.from({length:3},(a,r)=>e.jsxs("article",{className:"hs-cloud-card hs-cloud-card--loading","aria-hidden":"true",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsx("span",{className:"hs-loading-mark"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-title"})]}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-copy"}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-meta"}),e.jsx("span",{className:"hs-loading-actions"})]})]},r)):null,s.map(a=>{const r=V[a.id];return e.jsxs("article",{className:"hs-cloud-card",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsxs("div",{className:"hs-cloud-identity",children:[e.jsx(W,{provider:a.id}),e.jsxs("div",{children:[e.jsx("span",{className:"hs-cloud-category",children:r.category}),e.jsx("h4",{children:a.label})]})]}),e.jsx("span",{className:"hs-subscription-state hs-subscription-state--connected",children:a.statusLabel})]}),e.jsx("p",{className:"hs-cloud-description",children:r.description}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsxs("span",{className:"hs-cloud-connection",children:[e.jsx("span",{className:"hs-cloud-dot","aria-hidden":"true"}),a.detailLabel]}),e.jsx("nav",{"aria-label":`${a.label} quick links`,children:G[a.id].map(n=>e.jsxs("a",{href:n.href,target:"_blank",rel:"noreferrer",children:[n.label,e.jsx($,{size:11,"aria-hidden":"true"})]},n.href))})]})]},a.id)})]})]})}function ss({navigate:s}){const{route:t}=P(),a=D(t),[r,n]=u.useState([]),[o,c]=u.useState([]),[b,i]=u.useState(!0),[d,l]=u.useState(!1),[m,x]=u.useState(null),p=u.useRef(0),h=u.useCallback(async(g=!1,k=!1)=>{const w=++p.current;k&&i(!0),l(!0),x(null);try{const j=await M(`/api/service-budgets${g?"?refresh=1":""}`);if(w!==p.current)return;n(j.gauges??[]),c(j.cloudAccounts??[])}catch(j){w===p.current&&x(j instanceof Error?j.message:String(j))}finally{w===p.current&&(i(!1),l(!1))}},[]);u.useEffect(()=>{let g=!1,k;return h(!1,!0).then(()=>{g||(k=window.setTimeout(()=>{h(!0)},600))}),()=>{g=!0,k!==void 0&&window.clearTimeout(k)}},[h]),u.useEffect(()=>{const g=window.setInterval(()=>{h(!1)},3e4);return()=>window.clearInterval(g)},[h]);const y=u.useMemo(()=>Y(r),[r]),f=T();return e.jsxs("div",{className:"s-ops",children:[f?e.jsx("div",{className:"s-ops-header",children:e.jsx(E,{activeRoute:{view:"harnesses",...a?{machineId:a}:{}},navigate:s})}):null,e.jsx("div",{className:"s-ops-body hs-body",children:e.jsxs("div",{className:"hs-page",children:[e.jsxs("header",{className:"hs-page-head",children:[e.jsxs("div",{className:"hs-title-group",children:[e.jsx("span",{className:"hs-kicker",children:"ops / provider central"}),e.jsx("h2",{children:"Agent Providers"}),e.jsx("p",{children:"See what you pay for, how much remains, and where to use it."})]}),e.jsxs("button",{type:"button",className:"hs-refresh",disabled:d,onClick:()=>{h(!0)},children:[e.jsx(U,{size:14,className:d?"hs-refresh-icon-spinning":"","aria-hidden":"true"}),e.jsx("span",{children:d?"Refreshing":"Refresh"})]})]}),m&&e.jsxs("div",{className:"hs-error",role:"status","aria-live":"polite",children:["refresh: ",m]}),e.jsx(ae,{rows:y,loading:b,onImported:()=>h(!1)}),e.jsx(re,{accounts:o,loading:b})]})})]})}export{ss as HarnessesScreen};
|
|
1
|
+
import{r as u,j as e}from"./index-DmFAhGPj.js";import{H as R,h as q}from"./HarnessMark-BPAphNjx.js";import{a as M}from"./api-h5zurxmi.js";import{b as D}from"./router-Cn_s9IGH.js";import{t as O,n as S,f as L}from"./time-Dhsh_2EG.js";import{u as P}from"./Provider-cJCdHAxu.js";import{u as T}from"./useContentSecondaryNav-DjHBrgnS.js";import{OpsSubnav as E}from"./OpsSubnav-Dj3ShAKv.js";/* empty css */import{R as U}from"./refresh-cw-C4x1x6b_.js";import{E as $}from"./external-link-B1TI5yIt.js";import{c as H}from"./createLucideIcon-CFBn0Sdk.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./sse-CxXt4tqI.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CHIuVKz7.js";import"./DocumentFocusViewer-B9vodVmG.js";import"./TextDocumentSurface-BWJCGBZf.js";/* empty css */import"./file-text-DcYSrI4v.js";import"./x-C8ayPBtj.js";import"./chevron-right-BYMV1511.js";import"./code-xml-BFc3TMSm.js";import"./arrow-left-B-3GJ7ct.js";import"./scout-voice-CwbOz6EN.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-h1IdakpD.js";import"./MessageComposerSuggestions-FdVHnT_q.js";import"./NewChatComposer-Hd7pI5Ac.js";import"./runtime-picker--IW3cRry.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-d6PKL_KD.js";import"./index-CmwGCxUk.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DmuJ32wa.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-B3VVRJcV.js";import"./search-DAyagUtF.js";import"./chunk-HRAB3GC3-dRd2eQMJ.js";import"./SecondaryNav-_wyKjwNf.js";import"./secondaryNavConfig-Dw3gS1jR.js";import"./message-square-D1hMsMj_.js";import"./terminal-DJPUp_Qn.js";import"./scroll-text-DPPYrqB9.js";/* empty css */const _=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],z=H("clipboard-paste",_),B={codex:"Codex",claude:"Claude",kimi:"Kimi",minimax:"MiniMax",cursor:"Cursor",native:"Native",worker:"Worker",bridge:"Bridge",http:"HTTP",pi:"Pi",flue:"Flue",github:"GitHub",unknown:"Unknown"},C=[{id:"claude",description:"Anthropic plan windows captured from Claude Code.",links:[{label:"Usage",href:"https://claude.ai/settings/usage"},{label:"Manage plan",href:"https://claude.ai/settings/billing"}]},{id:"codex",description:"OpenAI plan windows reported by local Codex sessions.",links:[{label:"Usage",href:"https://chatgpt.com/codex/settings/usage"},{label:"Open Codex",href:"https://chatgpt.com/codex"}]},{id:"kimi",description:"Kimi Code subscription windows and membership level.",links:[{label:"Kimi Code",href:"https://www.kimi.com/code"},{label:"Docs",href:"https://www.kimi.com/code/docs/en/"}]},{id:"grok",description:"SuperGrok quota reported by local Grok, with dashboard capture and local activity as fallbacks.",links:[{label:"Open Grok",href:"https://grok.com/"},{label:"Billing",href:"https://grok.com/?_s=billing"},{label:"Help",href:"https://docs.x.ai/grok/faq"}]},{id:"minimax",description:"MiniMax Token Plan 5-hour and weekly allowance.",links:[{label:"Usage",href:"https://platform.minimax.io/console/plan"},{label:"Docs",href:"https://platform.minimax.io/docs/token-plan/intro"}]},{id:"cursor",description:"Cursor membership detected locally, plus usage totals from an exported dashboard capture.",links:[{label:"Usage",href:"https://cursor.com/dashboard/usage"},{label:"Manage plan",href:"https://cursor.com/dashboard/billing"}]}],G={cloudflare:[{label:"Dashboard",href:"https://dash.cloudflare.com/"},{label:"Billing",href:"https://dash.cloudflare.com/?to=/:account/billing"}],vercel:[{label:"Dashboard",href:"https://vercel.com/dashboard"},{label:"Billing",href:"https://vercel.com/account/billing"}],exe:[{label:"VMs",href:"https://exe.dev/"},{label:"Billing",href:"https://exe.dev/user/billing"},{label:"Docs",href:"https://exe.dev/docs/what-is-exe"}]},V={exe:{category:"Agent compute",description:"Persistent VMs for remote Scout agents and isolated workloads."},cloudflare:{category:"Edge platform",description:"Workers, networking, and edge infrastructure available for deployment."},vercel:{category:"App hosting",description:"Projects, preview environments, and production deployments."}};function W({provider:s}){return e.jsx("span",{className:`hs-cloud-mark hs-cloud-mark--${s}`,"aria-hidden":"true",children:s==="exe"?e.jsx("img",{src:"https://exe.dev/apple-touch-icon.png",alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer"}):e.jsx("svg",{viewBox:"0 0 24 24",focusable:"false",children:s==="cloudflare"?e.jsx("path",{d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268Zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"}):e.jsx("path",{d:"m12 1.608 12 20.784H0Z"})})})}function F(s){const t=(s??"").trim().toLowerCase();return t?t.includes("claude")?"claude":t.includes("codex")?"codex":t.includes("cursor")?"cursor":t.includes("kimi")||t.includes("moonshot")?"kimi":t.includes("minimax")?"minimax":t.includes("github")?"github":t.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown":"unknown"}function N(s){return B[s]??q(s)}function K(s){switch(s){case"weekly":return"7d";case"req/h":return"1h";default:return s||"quota"}}function v(s){return s.windows&&s.windows.length>0?s.windows:[{label:K(s.unitLabel),fill:s.fill,usedLabel:s.usedLabel,capLabel:s.capLabel,unitLabel:s.unitLabel,resetAt:s.resetAt}]}function Q(s){return s.capLabel==="100%"&&s.usedLabel.endsWith("%")?s.usedLabel:`${s.usedLabel}/${s.capLabel}`}function A(s){return s>=.9?"err":s>=.75?"warn":"ok"}function Z(s,t=30){const a=s??[];if(a.length<=t)return a;if(t<=1)return[a[a.length-1]];const r=(a.length-1)/(t-1);return Array.from({length:t},(n,o)=>a[Math.round(o*r)])}function I(s){const t=Math.floor((s-Date.now())/1e3),a=t<0,r=Math.abs(t);let n;if(r>=86400){const o=Math.floor(r/86400),c=Math.floor(r%86400/3600);n=c>0?`${o}d ${c}h`:`${o}d`}else if(r>=3600){const o=Math.floor(r/3600),c=Math.floor(r%3600/60);n=c>0?`${o}h ${c}m`:`${o}h`}else n=`${Math.max(1,Math.floor(r/60))}m`;return a?`stale ${n}`:n}function J(s){if(!s)return null;const t=S(s.capturedAt);if(t)return t;if(s.kind!=="quota")return null;const a=v(s).reduce((r,n)=>{const o=S(n.capturedAt);return Math.max(r??0,o??0)||r},null);return a||v(s).flatMap(r=>r.history??[]).reduce((r,n)=>{const o=S(n.capturedAt);return Math.max(r??0,o??0)||r},null)}function X({provider:s,onImported:t}){const[a,r]=u.useState(!1),[n,o]=u.useState(""),[c,b]=u.useState(!1),[i,d]=u.useState(null),l=`hs-${s}-dashboard-capture`,m=N(s);if(!a)return e.jsxs("button",{type:"button",className:"hs-dashboard-capture-trigger",onClick:()=>r(!0),children:[e.jsx(z,{size:12,"aria-hidden":"true"}),"Import dashboard"]});const x=async p=>{if(p.preventDefault(),!(!n.trim()||c)){b(!0),d(null);try{await M("/api/service-budgets/dashboard-import",{method:"POST",body:JSON.stringify({provider:s,text:n})}),o(""),d("Usage snapshot imported."),await t()}catch(h){d(h instanceof Error?h.message:String(h))}finally{b(!1)}}};return e.jsxs("form",{className:"hs-dashboard-capture",onSubmit:p=>{x(p)},children:[e.jsxs("label",{htmlFor:l,children:[m," usage snapshot"]}),e.jsxs("p",{children:[s==="cursor"?"Paste the exported Usage CSV or copied usage table.":"Copy the signed-in Usage panel and paste it here."," ","Scout keeps only normalized totals, not this text."]}),e.jsx("textarea",{id:l,value:n,onChange:p=>o(p.target.value),maxLength:128*1024,rows:5,placeholder:s==="cursor"?"Date (UTC),Type,Model,Tokens,Cost…":"Weekly SuperGrok… Limit · 12% used · Resets…","aria-describedby":i?`${l}-message`:void 0}),i?e.jsx("span",{id:`${l}-message`,className:"hs-dashboard-capture-message",role:"status",children:i}):null,e.jsxs("div",{className:"hs-dashboard-capture-actions",children:[e.jsx("button",{type:"button",onClick:()=>{r(!1),d(null)},disabled:c,children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!n.trim()||c,children:c?"Importing…":"Use snapshot"})]})]})}function Y(s){const t=new Map(s.map(a=>[F(a.id),a]));return C.map(({id:a})=>({id:a,label:N(a),gauge:t.get(a)??null}))}function ee({points:s}){const t=Z(s);return t.length===0?e.jsx("span",{className:"hs-history hs-history-empty",children:"live"}):e.jsx("span",{className:"hs-history","aria-label":`${t.length} budget samples`,children:t.map((a,r)=>{const n=Math.max(.06,Math.min(1,a.fill));return e.jsx("span",{className:`hs-history-bar hs-history-bar--${A(a.fill)}`,style:{height:`${Math.round(n*100)}%`},title:`${L(a.capturedAt)||"unknown"} ${a.usedLabel}`},`${a.capturedAt}:${r}`)})})}function se({gauge:s,window:t}){const a=Math.max(0,Math.min(100,Math.round(t.fill*100))),r=100-a,n=A(t.fill),o=Number.isFinite(t.resetAt)?new Date(t.resetAt).toISOString():void 0;return e.jsxs("div",{className:"hs-subscription-window",children:[e.jsxs("div",{className:"hs-subscription-window-head",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"hs-subscription-window-label",children:[t.label," window"]}),e.jsxs("strong",{className:`hs-subscription-usage hs-subscription-usage--${n}`,children:[a,"% used"]})]}),e.jsxs("div",{className:"hs-subscription-remaining",children:[e.jsxs("strong",{children:[r,"%"]}),e.jsx("span",{children:"available"})]})]}),e.jsx("div",{className:"hs-subscription-meter",role:"progressbar","aria-label":`${s.label} ${t.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:e.jsx("span",{className:`hs-subscription-meter-fill hs-subscription-meter-fill--${n}`,style:{width:`${a}%`}})}),e.jsxs("div",{className:"hs-subscription-window-meta",children:[e.jsxs("span",{children:[Q(t)," ",t.unitLabel==="quota"?"quota":t.unitLabel]}),e.jsxs("span",{children:["resets in ",I(t.resetAt),o?e.jsx("time",{dateTime:o,title:L(t.resetAt)||void 0,children:` · ${L(t.resetAt)||""}`}):null]})]}),e.jsx(ee,{points:t.history})]})}function te(){return e.jsxs("div",{className:"hs-subscription-loading","aria-hidden":"true",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--label"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--value"}),e.jsx("span",{className:"hs-loading-meter"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--meta"}),e.jsx("span",{className:"hs-loading-history"})]})}function ae({rows:s,loading:t,onImported:a}){const r=C.map(i=>({provider:i,row:s.find(d=>d.id===i.id)??null})),n=r.filter(({row:i})=>i?.gauge).length,o=r.filter(({row:i})=>i?.gauge?.kind==="quota").length,c=r.filter(({row:i})=>i?.gauge?.kind==="quota"&&i.gauge.plan||i?.gauge?.kind==="status").length,b=r.flatMap(({row:i})=>i?.gauge?.kind==="quota"?v(i.gauge):[]).map(i=>i.resetAt).filter(i=>i>Date.now()).sort((i,d)=>i-d)[0];return e.jsxs("section",{className:"hs-subscriptions","aria-labelledby":"hs-subscriptions-title","aria-busy":t,children:[e.jsxs("div",{className:"hs-section-head hs-subscriptions-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-subscriptions-title",children:"Subscriptions"}),e.jsx("p",{children:"Plans, remaining allowance, reset windows, and the fastest path to each provider dashboard."})]}),e.jsxs("div",{className:"hs-subscription-summary","aria-label":"Subscription feed summary",children:[e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":n})," detected"]}),e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":o})," usage feeds"]}),e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":c})," plans named"]}),e.jsxs("span",{children:[e.jsx("strong",{children:t?"—":b?I(b):"-"})," next reset"]})]})]}),e.jsx("div",{className:"hs-subscription-grid",children:r.map(({provider:i,row:d})=>{const l=d?.gauge??null,m=t&&!l,x=m?"loading":l?"connected":"missing",p=l?.kind==="quota"?l.plan:l?.kind==="status"?l.statusLabel:null,h=J(l),y=l?.kind==="quota"?"Usage connected":l?.kind==="status"?l.detailLabel||"Subscription detected":m?"Checking":"Not detected";return e.jsxs("article",{className:`hs-subscription-card hs-subscription-card--${x}`,children:[e.jsxs("header",{className:"hs-subscription-card-head",children:[e.jsxs("div",{className:"hs-subscription-provider",children:[e.jsx(R,{harness:i.id,size:18,title:null,className:"hs-subscription-mark"}),e.jsxs("div",{children:[e.jsx("h4",{children:N(i.id)}),e.jsx("span",{children:m?"Checking local plan…":p||"Plan not reported"})]})]}),e.jsx("span",{className:`hs-subscription-state hs-subscription-state--${x}`,children:y})]}),e.jsx("p",{className:"hs-subscription-description",children:i.description}),m?e.jsx(te,{}):l?.kind==="quota"?e.jsx("div",{className:"hs-subscription-windows",children:v(l).map(f=>e.jsx(se,{gauge:l,window:f},`${i.id}:${f.label}`))}):l?.kind==="status"?e.jsxs("div",{className:"hs-subscription-status-detail",children:[e.jsx("strong",{children:l.statusLabel}),e.jsx("span",{children:l.detailLabel||"Subscription detected locally. Open the provider dashboard for live usage."})]}):e.jsxs("div",{className:"hs-subscription-missing",children:[e.jsx("strong",{children:"No local subscription feed yet"}),e.jsx("span",{children:"Open the provider locally, then refresh Scout."})]}),i.id==="cursor"||i.id==="grok"&&l?.kind!=="quota"?e.jsx(X,{provider:i.id,onImported:a}):null,e.jsxs("footer",{className:"hs-subscription-footer",children:[e.jsxs("span",{children:[m?"checking local feed":h?`updated ${O(h)||"now"}`:l?"detected locally":"waiting for provider data",l?.source?` · ${l.source}`:""]}),e.jsx("nav",{"aria-label":`${N(i.id)} quick links`,children:i.links.map(f=>e.jsxs("a",{href:f.href,target:"_blank",rel:"noreferrer",children:[f.label,e.jsx($,{size:11,"aria-hidden":"true"})]},f.href))})]})]},i.id)})})]})}function re({accounts:s,loading:t}){return s.length===0&&!t?null:e.jsxs("section",{className:"hs-cloud-accounts","aria-labelledby":"hs-cloud-accounts-title","aria-busy":t,children:[e.jsxs("div",{className:"hs-section-head hs-cloud-accounts-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-cloud-accounts-title",children:"Cloud accounts"}),e.jsx("p",{children:"Infrastructure available to Scout for deployment and agent compute."})]}),e.jsx("span",{className:"hs-section-meta",children:t?"checking accounts":`${s.length} connected`})]}),e.jsxs("div",{className:"hs-cloud-grid",children:[t&&s.length===0?Array.from({length:3},(a,r)=>e.jsxs("article",{className:"hs-cloud-card hs-cloud-card--loading","aria-hidden":"true",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsx("span",{className:"hs-loading-mark"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-title"})]}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-copy"}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-meta"}),e.jsx("span",{className:"hs-loading-actions"})]})]},r)):null,s.map(a=>{const r=V[a.id];return e.jsxs("article",{className:"hs-cloud-card",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsxs("div",{className:"hs-cloud-identity",children:[e.jsx(W,{provider:a.id}),e.jsxs("div",{children:[e.jsx("span",{className:"hs-cloud-category",children:r.category}),e.jsx("h4",{children:a.label})]})]}),e.jsx("span",{className:"hs-subscription-state hs-subscription-state--connected",children:a.statusLabel})]}),e.jsx("p",{className:"hs-cloud-description",children:r.description}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsxs("span",{className:"hs-cloud-connection",children:[e.jsx("span",{className:"hs-cloud-dot","aria-hidden":"true"}),a.detailLabel]}),e.jsx("nav",{"aria-label":`${a.label} quick links`,children:G[a.id].map(n=>e.jsxs("a",{href:n.href,target:"_blank",rel:"noreferrer",children:[n.label,e.jsx($,{size:11,"aria-hidden":"true"})]},n.href))})]})]},a.id)})]})]})}function ss({navigate:s}){const{route:t}=P(),a=D(t),[r,n]=u.useState([]),[o,c]=u.useState([]),[b,i]=u.useState(!0),[d,l]=u.useState(!1),[m,x]=u.useState(null),p=u.useRef(0),h=u.useCallback(async(g=!1,k=!1)=>{const w=++p.current;k&&i(!0),l(!0),x(null);try{const j=await M(`/api/service-budgets${g?"?refresh=1":""}`);if(w!==p.current)return;n(j.gauges??[]),c(j.cloudAccounts??[])}catch(j){w===p.current&&x(j instanceof Error?j.message:String(j))}finally{w===p.current&&(i(!1),l(!1))}},[]);u.useEffect(()=>{let g=!1,k;return h(!1,!0).then(()=>{g||(k=window.setTimeout(()=>{h(!0)},600))}),()=>{g=!0,k!==void 0&&window.clearTimeout(k)}},[h]),u.useEffect(()=>{const g=window.setInterval(()=>{h(!1)},3e4);return()=>window.clearInterval(g)},[h]);const y=u.useMemo(()=>Y(r),[r]),f=T();return e.jsxs("div",{className:"s-ops",children:[f?e.jsx("div",{className:"s-ops-header",children:e.jsx(E,{activeRoute:{view:"harnesses",...a?{machineId:a}:{}},navigate:s})}):null,e.jsx("div",{className:"s-ops-body hs-body",children:e.jsxs("div",{className:"hs-page",children:[e.jsxs("header",{className:"hs-page-head",children:[e.jsxs("div",{className:"hs-title-group",children:[e.jsx("span",{className:"hs-kicker",children:"ops / provider central"}),e.jsx("h2",{children:"Agent Providers"}),e.jsx("p",{children:"See what you pay for, how much remains, and where to use it."})]}),e.jsxs("button",{type:"button",className:"hs-refresh",disabled:d,onClick:()=>{h(!0)},children:[e.jsx(U,{size:14,className:d?"hs-refresh-icon-spinning":"","aria-hidden":"true"}),e.jsx("span",{children:d?"Refreshing":"Refresh"})]})]}),m&&e.jsxs("div",{className:"hs-error",role:"status","aria-live":"polite",children:["refresh: ",m]}),e.jsx(ae,{rows:y,loading:b,onImported:()=>h(!1)}),e.jsx(re,{accounts:o,loading:b})]})})]})}export{ss as HarnessesScreen};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-
|
|
1
|
+
import{r as d,j as e}from"./index-DmFAhGPj.js";import{L as K,u as X}from"./chunk-YOZR3KYS-C13bZPVd.js";import{c as Q}from"./clipboard-e3fSpeo7.js";import{e as A}from"./terminal-sessions-AmSgHklm.js";import{a as C}from"./api-h5zurxmi.js";import{H as D}from"./HarnessMark-BPAphNjx.js";import{T as H}from"./terminal-DJPUp_Qn.js";import{R as V}from"./refresh-cw-C4x1x6b_.js";import{C as Z}from"./check-BX8nRgop.js";import{C as ee}from"./copy-BFmOcWof.js";import{E as G}from"./eye-1J4yOUoG.js";import{c as te}from"./createLucideIcon-CFBn0Sdk.js";import{X as se}from"./x-C8ayPBtj.js";const ne=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]],J=te("crosshair",ne);async function re(){return C("/api/terminal-hosts")}async function ae(t,s){return C(`/api/terminal-hosts/${encodeURIComponent(t)}/sessions`,{method:"POST",body:JSON.stringify(s)})}let $=null,O=null;function ie(){return $?Promise.resolve($):(O??=re().then(t=>($=t,t)).finally(()=>{O=null}),O)}function Ae(){const[t,s]=d.useState($);return d.useEffect(()=>{if(t)return;let n=!1;return ie().then(a=>{n||s(a)}).catch(()=>{}),()=>{n=!0}},[t]),{hosts:t?.hosts??[],preferredHostId:t?.preferredHostId??null,loaded:t!==null}}async function le(t){return(await C(`/api/terminal-hosts/herdr/sessions/${encodeURIComponent(t)}/topology`)).topology}async function F(t,s){await C(`/api/terminal-hosts/herdr/sessions/${encodeURIComponent(t)}/focus`,{method:"POST",body:JSON.stringify({target:s})})}async function Y(t,s,n=48){const a=new URLSearchParams({backend:"herdr",sessionName:t,paneId:s,lines:String(n)}),i=await C(`/api/terminal-sessions/peek?${a.toString()}`);return i.available?{body:i.body,reason:null}:{body:null,reason:i.reason??"No preview available."}}const oe=3e3;function ce(t,s,n={}){const a=n.enabled??!0,i=n.lines??48,c=n.pollMs??oe,[p,m]=d.useState(null),[u,o]=d.useState(0);return d.useEffect(()=>{if(!t||!s||!a)return;let l=!1;m(null);const b=()=>{Y(t,s,i).then(h=>{l||m(h)}).catch(h=>{if(l)return;const r=h instanceof Error?h.message:String(h);m(g=>({body:g?.body??null,reason:r}))})};b();const j=window.setInterval(()=>{document.visibilityState!=="hidden"&&b()},c);return()=>{l=!0,window.clearInterval(j)}},[t,s,i,a,c,u]),{body:p?.body??null,reason:p?.reason??null,loading:p===null,refresh:()=>o(l=>l+1)}}const de=15e3;function ue(t,s,n={}){const a=n.enabled??!0,i=n.lines??6,c=n.pollMs??de,[p,m]=d.useState({}),u=s.join(`
|
|
2
2
|
`);return d.useEffect(()=>{const o=u?u.split(`
|
|
3
3
|
`):[];if(!t||!a||o.length===0)return;let l=!1;const b=()=>{Promise.all(o.map(async h=>{try{const r=await Y(t,h,i);return[h,r.body]}catch{return[h,void 0]}})).then(h=>{l||m(r=>{const g={};for(const[S,k]of h)g[S]=k===void 0?r[S]??null:k;return g})})};b();const j=window.setInterval(()=>{document.visibilityState!=="hidden"&&b()},c);return()=>{l=!0,window.clearInterval(j)}},[t,u,i,a,c]),p}const he=3e3;function pe(t,s={}){const n=s.enabled??!0,a=s.pollMs??he,[i,c]=d.useState(null),[p,m]=d.useState(null),[u,o]=d.useState(0);return d.useEffect(()=>{if(!t||!n)return;let l=!1;const b=()=>{le(t).then(h=>{l||(c(h),m(null))}).catch(h=>{l||m(h instanceof Error?h.message:String(h))})};b();const j=window.setInterval(()=>{document.visibilityState!=="hidden"&&b()},a);return()=>{l=!0,window.clearInterval(j)}},[t,n,a,u]),{topology:i,error:p,refresh:()=>o(l=>l+1)}}const me={column:"status",direction:"desc"},z=[{id:"pane",label:"Pane",initialDirection:"asc"},{id:"harness",label:"Harness",initialDirection:"asc"},{id:"status",label:"Status",initialDirection:"desc"},{id:"directory",label:"Directory",initialDirection:"asc"},{id:"tab",label:"Tab",initialDirection:"asc"},{id:"drift",label:"Drift",initialDirection:"desc"},{id:"output",label:"Last output",initialDirection:"asc"}];function U(t){switch(t){case"working":return 4;case"blocked":return 3;case"idle":return 2;case"done":return 1;case"unknown":return 0}}function T(t){return t.label??t.paneId}function M(t){return t.foregroundCwd??t.cwd??""}function R(t){return t.scroll?.offsetFromBottom??null}function L(t){if(!t)return null;const n=t.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g,"").split(`
|
|
4
4
|
`);for(let a=n.length-1;a>=0;a-=1){const i=n[a].trim();if(i)return i}return null}function N(t,s){return t.localeCompare(s,void 0,{numeric:!0,sensitivity:"base"})}function be(t,s){const n=s.direction==="asc"?1:-1;return[...t].sort((a,i)=>{const c=fe(a,i,s.column);if(c!==0)return c;const p=xe(a,i,s.column)*n;return p!==0?p:N(T(a.pane),T(i.pane))})}function fe(t,s,n){const a=p=>n==="drift"?R(p.pane):n==="output"?L(p.output):!0,i=a(t),c=a(s);return i===null&&c===null?0:i===null?1:c===null?-1:0}function xe(t,s,n){switch(n){case"pane":return N(T(t.pane),T(s.pane));case"harness":return N(t.pane.agent??"",s.pane.agent??"");case"status":return U(t.pane.agentStatus)-U(s.pane.agentStatus);case"directory":return N(M(t.pane),M(s.pane));case"tab":return N(t.tabLabel,s.tabLabel);case"drift":return B(R(t.pane),R(s.pane));case"output":return B(L(t.output),L(s.output))}}function B(t,s){return t===null&&s===null?0:t===null?-1:s===null?1:typeof t=="string"&&typeof s=="string"?N(t,s):Number(t)-Number(s)}function je(t,s){if(t.column===s)return{column:s,direction:t.direction==="asc"?"desc":"asc"};const n=z.find(a=>a.id===s)?.initialDirection??"asc";return{column:s,direction:n}}const ye="openscout.herdr.pane-table-sort.v1";function W(t){return{view:"terminal",terminalBackend:"herdr",terminalAgent:"shell",terminalTabId:`herdr-${t}`,terminalSessionName:t}}function ge({sessionName:t,navigate:s}){const{topology:n,error:a,refresh:i}=pe(t),[c,p]=d.useState(null),[m,u]=d.useState(null),[o,l]=d.useState("idle"),[b,j]=d.useState(null),h=t==="default"?"herdr":`herdr session attach ${t}`,r=n?.running??!1,g=d.useCallback(()=>{l("starting"),j(null),ae("herdr",{sessionName:t}).then(()=>{l("idle"),i()}).catch(y=>{l("failed"),j(y instanceof Error?y.message:String(y))})},[t,i]),S=d.useCallback(()=>{s(W(t))},[s,t]),k=d.useCallback(y=>{F(t,y.terminalId??y.paneId).catch(()=>{}),s(W(t))},[s,t]);return e.jsxs("div",{className:"s-term s-herdr",children:[e.jsxs("header",{className:"s-herdr-header",children:[e.jsxs("div",{className:"s-herdr-title",children:[e.jsx("span",{className:"s-herdr-mark",children:e.jsx(H,{size:16,strokeWidth:1.8})}),e.jsx("strong",{children:t}),e.jsx("span",{className:`s-herdr-state ${r?"s-herdr-state--live":""}`,children:n?r?"running":"stopped":"loading"})]}),e.jsxs("div",{className:"s-herdr-actions",children:[r&&e.jsxs("button",{type:"button",className:"s-term-workspace-action s-term-workspace-action--primary",onClick:S,title:"Open a live web terminal attached to this session",children:[e.jsx(K,{size:13,strokeWidth:1.8}),"Open terminal"]}),e.jsx(we,{command:h}),e.jsx("button",{type:"button",className:"s-term-icon-button",onClick:i,title:"Refresh","aria-label":"Refresh",children:e.jsx(V,{size:14,strokeWidth:1.8})})]})]}),a&&e.jsx("div",{className:"s-herdr-error",children:a}),n&&!r&&e.jsxs("div",{className:"s-herdr-empty",children:[e.jsx(H,{size:22,strokeWidth:1.5}),e.jsx("strong",{children:"This herdr session is stopped."}),e.jsx("span",{children:"The session still exists — herdr sessions are persistent. Start it and the projection fills in."}),e.jsx("button",{type:"button",className:"s-term-workspace-action s-term-workspace-action--primary",onClick:g,disabled:o==="starting",children:o==="starting"?"Starting…":"Start it"}),b&&e.jsx("code",{children:b})]}),n&&r&&n.workspaces.length===0&&e.jsxs("div",{className:"s-herdr-empty",children:[e.jsx(H,{size:22,strokeWidth:1.5}),e.jsx("strong",{children:"No workspaces yet."}),e.jsx("span",{children:"Open this session in herdr to create one — layout is herdr's job, Scout just watches."})]}),n&&r&&n.workspaces.length>0&&(()=>{const y=n.workspaces.flatMap(f=>f.tabs.map(x=>({workspace:f,tab:x})));if(y.length===0)return null;const v=n.workspaces.find(f=>f.focused)?.activeTabId??n.workspaces[0]?.activeTabId??null,E=y.find(f=>f.tab.tabId===c)??y.find(f=>f.tab.tabId===v)??y[0],{workspace:w,tab:I}=E,q=f=>{p(f),u(null)};return e.jsxs("section",{className:"s-herdr-workspace",children:[e.jsxs("div",{className:"s-herdr-workspace-head",children:[e.jsx("span",{className:"s-herdr-workspace-label",children:w.label??w.workspaceId}),e.jsx(_,{status:w.agentStatus})]}),e.jsx("div",{className:"s-herdr-tabs",role:"tablist",children:y.map(({workspace:f,tab:x})=>e.jsxs("button",{type:"button",role:"tab","aria-selected":x.tabId===I.tabId,className:`s-herdr-tab ${x.tabId===I.tabId?"s-herdr-tab--active":""}`,title:`${f.label??f.workspaceId} · ${x.label??x.tabId}`,onClick:()=>q(x.tabId),children:[e.jsx(P,{status:x.agentStatus}),e.jsx("span",{children:x.label??`Tab ${x.number??""}`}),e.jsx(Ne,{tab:x}),e.jsx("span",{className:"s-herdr-tab-count",children:x.panes.length})]},x.tabId))}),I.layout&&e.jsx(ke,{tab:I,diveInPaneId:m,onEnterPane:k,onToggleDiveIn:f=>u(x=>x===f?null:f)}),e.jsx(ve,{sessionName:t,tab:I,onEnterPane:k}),m&&(()=>{const f=I.panes.find(x=>x.paneId===m);return f?e.jsx(Se,{sessionName:t,pane:f,onClose:()=>u(null)}):null})()]})})()]})}function ke({tab:t,diveInPaneId:s,onEnterPane:n,onToggleDiveIn:a}){const i=t.layout;if(!i)return null;const{area:c}=i,p=new Map(t.panes.map(u=>[u.paneId,u])),m=`${c.width} / ${Math.max(c.height*2,1)}`;return e.jsxs("div",{className:"s-herdr-layout-window",children:[e.jsxs("div",{className:"s-herdr-layout-titlebar",children:[e.jsxs("span",{className:"s-herdr-layout-lights","aria-hidden":"true",children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsxs("span",{className:"s-herdr-layout-title",children:[t.label??`Tab ${t.number??""}`," — ",i.panes.length," ",i.panes.length===1?"pane":"panes"]}),e.jsx("span",{className:"s-herdr-layout-hint",children:"click a pane to enter"})]}),e.jsx("div",{className:"s-herdr-layout",style:{aspectRatio:m},role:"group","aria-label":`Layout of ${t.label??t.tabId}`,children:i.panes.map(u=>{const o=p.get(u.paneId),{rect:l}=u,b={left:`${(l.x-c.x)/c.width*100}%`,top:`${(l.y-c.y)/c.height*100}%`,width:`${l.width/c.width*100}%`,height:`${l.height/c.height*100}%`},j=o?.paneId===s;return e.jsxs("div",{role:"button",tabIndex:0,className:`s-herdr-layout-pane ${u.focused?"s-herdr-layout-pane--focused":""}`,style:b,onClick:()=>o&&n(o),onKeyDown:h=>{o&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),n(o))},title:o?`Enter ${o.label??o.paneId} — focus it and open the web terminal`:u.paneId,children:[e.jsxs("span",{className:"s-herdr-layout-pane-head",children:[o&&e.jsx(P,{status:o.agentStatus}),o?.agent&&e.jsx(D,{harness:o.agent,size:12,className:"s-herdr-agent-mark"}),e.jsx("strong",{className:"s-herdr-pane-label",children:o?.label??u.paneId})]}),o?.foregroundCwd&&e.jsx("span",{className:"s-herdr-cwd",children:A(o.foregroundCwd)}),o&&e.jsx("button",{type:"button",className:`s-herdr-layout-pane-peek ${j?"s-herdr-layout-pane-peek--active":""}`,onClick:h=>{h.stopPropagation(),a(o.paneId)},title:j?"Close the live view":"Watch this pane live","aria-label":j?"Close the live view":"Watch this pane live","aria-pressed":j,children:e.jsx(G,{size:13,strokeWidth:1.8})})]},u.paneId)})})]})}function ve({sessionName:t,tab:s,onEnterPane:n}){const[a,i]=X(ye,me),[c,p]=d.useState(null),[m,u]=d.useState(null),o=d.useMemo(()=>s.panes.map(r=>r.paneId),[s.panes]),l=ue(t,o,{lines:6}),b=s.label??`Tab ${s.number??""}`,j=d.useMemo(()=>be(s.panes.map(r=>({pane:r,tabLabel:b,output:l[r.paneId]??null})),a),[s.panes,b,l,a]),h=d.useCallback(r=>{u(null),F(t,r.terminalId??r.paneId).catch(g=>u(g instanceof Error?g.message:String(g)))},[t]);return e.jsxs("div",{className:"s-herdr-table-wrap",children:[e.jsxs("table",{className:"s-herdr-table","aria-label":`Panes of ${b}`,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[z.map(r=>e.jsx("th",{scope:"col","aria-sort":a.column===r.id?a.direction==="asc"?"ascending":"descending":"none",children:e.jsxs("button",{type:"button",onClick:()=>i(je(a,r.id)),children:[e.jsx("span",{children:r.label}),e.jsx("em",{"aria-hidden":"true",children:a.column===r.id?a.direction==="asc"?"▲":"▼":"·"})]})},r.id)),e.jsx("th",{scope:"col","aria-label":"Actions"})]})}),e.jsx("tbody",{children:j.map(({pane:r,tabLabel:g,output:S})=>{const k=r.paneId===c,y=L(S),v=R(r),E=M(r);return e.jsxs(d.Fragment,{children:[e.jsxs("tr",{className:r.focused?"is-focused":void 0,onClick:()=>n(r),title:`Enter ${T(r)} — focus it and open the web terminal`,children:[e.jsxs("td",{className:"s-herdr-table-pane",children:[e.jsx(P,{status:r.agentStatus}),e.jsx("strong",{title:r.paneId,children:T(r)}),r.focused&&e.jsx("span",{className:"s-herdr-focused",children:"focused in herdr"})]}),e.jsx("td",{className:"s-herdr-table-harness",children:r.agent?e.jsx("span",{title:r.agent,className:"s-herdr-table-harness-mark",children:e.jsx(D,{harness:r.agent,size:13,className:"s-herdr-agent-mark"})}):e.jsx("span",{title:"shell — no agent running",className:"s-herdr-table-harness-mark",children:e.jsx(H,{size:12,strokeWidth:1.8})})}),e.jsx("td",{children:r.agentStatus==="unknown"?"—":e.jsx(_,{status:r.agentStatus})}),e.jsx("td",{className:"s-herdr-table-dir",title:E||void 0,children:E?A(E):"—"}),e.jsx("td",{children:g}),e.jsx("td",{className:"s-herdr-table-drift",title:v===null?void 0:v===0?"Pinned to live output":`Scrolled up ${v} ${v===1?"line":"lines"} from the live edge`,children:v===null?"—":v===0?"live":`↑${v}`}),e.jsx("td",{className:"s-herdr-table-output",title:y??void 0,children:y??"—"}),e.jsxs("td",{className:"s-herdr-table-actions",children:[e.jsx("button",{type:"button",className:`s-term-icon-button${k?" is-active":""}`,onClick:w=>{w.stopPropagation(),p(I=>I===r.paneId?null:r.paneId)},title:k?"Hide the pane's last lines":"Show the pane's last lines","aria-label":k?"Hide the pane's last lines":"Show the pane's last lines","aria-pressed":k,children:e.jsx(G,{size:13,strokeWidth:1.8})}),e.jsx("button",{type:"button",className:"s-term-icon-button",onClick:w=>{w.stopPropagation(),h(r)},title:"Focus this pane in the herdr client","aria-label":"Focus this pane in the herdr client",children:e.jsx(J,{size:13,strokeWidth:1.8})}),e.jsx("button",{type:"button",className:"s-term-icon-button",onClick:w=>{w.stopPropagation(),n(r)},title:"Enter — focus it and open the web terminal","aria-label":"Enter — focus it and open the web terminal",children:e.jsx(K,{size:13,strokeWidth:1.8})})]})]}),k&&e.jsx("tr",{className:"s-herdr-table-expand",children:e.jsx("td",{colSpan:z.length+1,children:S?e.jsx("pre",{children:S}):e.jsx("span",{className:"s-herdr-peek-reason",children:"No output captured yet."})})})]},r.paneId)})})]}),m&&e.jsx("div",{className:"s-herdr-error",children:m})]})}function we({command:t}){const[s,n]=d.useState(!1);return e.jsxs("button",{type:"button",className:"s-herdr-attach",title:"Copy attach command — open this session in the herdr client",onClick:()=>{Q(t).then(()=>{n(!0),window.setTimeout(()=>n(!1),1500)})},children:[s?e.jsx(Z,{size:13,strokeWidth:2}):e.jsx(ee,{size:13,strokeWidth:1.8}),e.jsx("code",{children:t})]})}function Se({sessionName:t,pane:s,onClose:n}){const{body:a,reason:i,loading:c,refresh:p}=ce(t,s.paneId,{lines:48}),[m,u]=d.useState(null);d.useEffect(()=>{const l=b=>{b.key==="Escape"&&n()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[n]);const o=d.useCallback(()=>{u(null),F(t,s.terminalId??s.paneId).catch(l=>u(l instanceof Error?l.message:String(l)))},[t,s.terminalId,s.paneId]);return e.jsx("div",{className:"s-herdr-lightbox",onClick:n,role:"presentation",children:e.jsxs("section",{className:"s-herdr-live","aria-label":`Live view of ${s.label??s.paneId}`,onClick:l=>l.stopPropagation(),children:[e.jsxs("div",{className:"s-herdr-live-head",children:[e.jsx(P,{status:s.agentStatus}),s.agent&&e.jsx(D,{harness:s.agent,size:13,className:"s-herdr-agent-mark"}),e.jsx("strong",{className:"s-herdr-pane-label",children:s.label??s.paneId}),e.jsx(_,{status:s.agentStatus}),s.foregroundCwd&&e.jsx("span",{className:"s-herdr-cwd",children:A(s.foregroundCwd)}),e.jsx("span",{className:"s-herdr-pane-spacer"}),e.jsx("button",{type:"button",className:"s-term-icon-button",onClick:o,title:"Focus this pane in the herdr client","aria-label":"Focus this pane in the herdr client",children:e.jsx(J,{size:14,strokeWidth:1.8})}),e.jsx("button",{type:"button",className:"s-term-icon-button",onClick:p,title:"Refresh now","aria-label":"Refresh now",children:e.jsx(V,{size:14,strokeWidth:1.8})}),e.jsx("button",{type:"button",className:"s-term-icon-button s-term-icon-button--danger",onClick:n,title:"Close the live view (Esc)","aria-label":"Close the live view",children:e.jsx(se,{size:14,strokeWidth:1.8})})]}),e.jsx("div",{className:"s-herdr-live-body",children:a!==null?e.jsx("pre",{children:a}):c?e.jsx("span",{className:"s-herdr-peek-reason",children:"Loading…"}):e.jsx("span",{className:"s-herdr-peek-reason",children:i??"No preview available."})}),m&&e.jsx("div",{className:"s-herdr-error",children:m})]})})}function Ie(t){return t}function P({status:t}){return e.jsx("span",{className:`s-herdr-dot s-herdr-dot--${t}`,"aria-hidden":"true"})}function _({status:t}){return t==="unknown"?null:e.jsx("span",{className:`s-herdr-badge s-herdr-badge--${t}`,children:t})}function Ne({tab:t}){const s=[...new Set(t.panes.map(n=>n.agent).filter(n=>!!n))].slice(0,4);return s.length===0?null:e.jsx("span",{className:"s-herdr-tab-marks",children:s.map(n=>e.jsx(D,{harness:n,size:11,className:"s-herdr-agent-mark"},n))})}function Te(t){return{label:t.label??`Tab ${t.number??""}`,statuses:t.panes.map(s=>s.agentStatus)}}const Fe=Object.freeze(Object.defineProperty({__proto__:null,AgentStatusBadge:_,AgentStatusDot:P,HerdrSessionScreen:ge,herdrAgentStatusLabel:Ie,herdrTabSummary:Te,herdrTerminalRoute:W},Symbol.toStringTag,{value:"Module"}));export{P as A,ge as H,pe as a,Te as b,ae as c,Fe as d,W as h,Ae as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as $,j as t}from"./index-BZovGpDk.js";const F=3,H=2;function k(e){return e>=.9?"err":e>=.75?"warn":"ok"}const C=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function E(e,a){const s=e-a.getTime(),i=new Date(e).toDateString()===a.toDateString(),r=new Date(e),n=String(r.getHours()).padStart(2,"0"),l=String(r.getMinutes()).padStart(2,"0"),o=s>0&&s<6*3600*1e3;return i?{label:`${n}:${l}`,imminent:o}:{label:`${C[r.getDay()]} ${n}:${l}`,imminent:o}}function W(e,a){const s=Math.floor((e-a.getTime())/1e3),i=s<0,r=Math.abs(s);let n;if(r>=86400){const l=Math.floor(r/86400),o=Math.floor(r%86400/3600);n=o>0?`${l}d ${o}h`:`${l}d`}else if(r>=3600){const l=Math.floor(r/3600),o=Math.floor(r%3600/60);n=o>0?`${l}h ${o}m`:`${l}h`}else n=`${Math.max(1,Math.floor(r/60))}m`;return i?`stale ${n}`:n}function M(e){return e.windows&&e.windows.length>0?e.windows:[{label:_(e.unitLabel),fill:e.fill,usedLabel:e.usedLabel,capLabel:e.capLabel,unitLabel:e.unitLabel,resetAt:e.resetAt}]}function _(e){switch(e){case"weekly":return"7d";case"req/h":return"1h";default:return e||"quota"}}function S(e,a){return M(e).map(s=>{const i=E(s.resetAt,a),r=W(s.resetAt,a);return`${s.label}: ${s.usedLabel} / ${s.capLabel} ${s.unitLabel} · resets ${i.label} (in ${r})`}).join(" · ")}function L(e){const a=e.trim().match(/^(\d+(?:\.\d+)?)([mhd])$/i);if(!a)return null;const s=Number(a[1]);if(!Number.isFinite(s))return null;switch(a[2]?.toLowerCase()){case"m":return s;case"h":return s*60;case"d":return s*24*60;default:return null}}function I(e){const a=[...e].sort((r,n)=>(L(r.label)??Number.MAX_SAFE_INTEGER)-(L(n.label)??Number.MAX_SAFE_INTEGER)),s=a.find(r=>(L(r.label)??0)>=1440)??(a.length>1?a[a.length-1]:null);return{shortWindow:a.find(r=>r!==s)??null,longWindow:s}}function q(e){return e.capLabel==="100%"&&e.usedLabel.endsWith("%")?e.usedLabel:`${e.usedLabel}/${e.capLabel}`}function N(){return t.jsx("span",{className:"hd-gauge-cell hd-gauge-cell--empty",children:"—"})}function w({window:e}){if(!e)return t.jsx(N,{});const a=Math.round(e.fill*100),s=k(e.fill);return t.jsxs("span",{className:"hd-gauge-cell hd-gauge-cell--usage",children:[t.jsx("span",{className:"hd-gauge-window-name",children:e.label}),t.jsx("span",{className:"hd-gauge-bar","aria-hidden":"true",children:t.jsx("span",{className:`hd-gauge-bar-fill hd-gauge-bar-fill--${s}`,style:{width:`${a}%`}})}),t.jsx("span",{className:"hd-gauge-window-used",children:q(e)})]})}function T({window:e,now:a,featured:s=!1}){if(!e)return t.jsx(N,{});if(s){const n=O(e.resetAt,a);return t.jsxs("span",{className:`hd-gauge-cell hd-gauge-reset hd-gauge-reset--featured hd-gauge-reset--${n.tone}`,"aria-live":"off","aria-label":n.ariaLabel,children:[t.jsx("strong",{children:n.primary}),n.dateTime?t.jsx("time",{dateTime:n.dateTime,children:n.secondary}):t.jsx("span",{children:n.secondary})]})}const i=E(e.resetAt,a),r=W(e.resetAt,a);return t.jsxs("span",{className:`hd-gauge-cell hd-gauge-reset${i.imminent?" hd-gauge-reset--imminent":""}`,children:["↻ ",r]})}function O(e,a){if(!Number.isFinite(e))return{primary:"—",secondary:"unknown",ariaLabel:"Weekly reset time unknown",tone:"stale"};const s=e-a.getTime(),i=new Date(e);if(!Number.isFinite(i.getTime()))return{primary:"—",secondary:"unknown",ariaLabel:"Weekly reset time unknown",tone:"stale"};const r=i.toISOString();if(s<=0){const h=Math.abs(s);if(h<=9e4)return{primary:"reset due",secondary:"refreshing…",ariaLabel:"Weekly reset due; refreshing usage",tone:"due",dateTime:r};const p=Math.floor(h/6e4),y=p>=60?`+${Math.floor(p/60)}h ${p%60}m`:`+${Math.max(1,p)}m`;return{primary:h<=360*6e4?"reset due":"stale",secondary:y,ariaLabel:`Weekly reset data ${y} overdue`,tone:h<=360*6e4?"due":"stale",dateTime:r}}const n=Math.floor(s/1e3),l=Math.floor(n/86400),o=Math.floor(n%86400/3600),c=Math.floor(n%3600/60),u=n%60,d=[o,c,u].map(h=>String(h).padStart(2,"0")).join(":"),j=l>0?`${l}d ${d}`:d,f=i.toDateString()===a.toDateString(),m=i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),x=f?`today ${m}`:`${i.toLocaleDateString([],{weekday:"short"})} ${m}`,g=l>0?`${l} ${l===1?"day":"days"} ${o} hours`:`${o} hours ${c} minutes`;return{primary:j,secondary:x,ariaLabel:`Weekly quota resets in ${g}; ${x}`,tone:s<360*6e4?"imminent":"normal",dateTime:r}}function P(e){if(e.length===0)return"";if(e.length===1)return`M ${e[0].x} ${e[0].y}`;const a=[`M ${e[0].x} ${e[0].y}`];for(let s=0;s<e.length-1;s++){const i=e[s-1]??e[s],r=e[s],n=e[s+1],l=e[s+2]??n,o=r.x+(n.x-i.x)/6,c=r.y+(n.y-i.y)/6,u=n.x-(l.x-r.x)/6,d=n.y-(l.y-r.y)/6;a.push(`C ${o} ${c}, ${u} ${d}, ${n.x} ${n.y}`)}return a.join(" ")}function B(e){const a=$.useRef(null),[s,i]=$.useState(e);return $.useLayoutEffect(()=>{const r=a.current;if(!r)return;const n=o=>{const c=Math.round(o);c>0&&i(u=>u===c?u:c)};n(r.getBoundingClientRect().width);const l=new ResizeObserver(o=>{n(o[0]?.contentRect.width??0)});return l.observe(r),()=>l.disconnect()},[]),[a,s]}function Q({buckets:e}){const[a,s]=B(372),i=70,r=6,n=56,l=67,o=e.length,c=o<2||e.every(g=>g.count===0),u=Math.max(1,s-3),d={viewBox:`0 0 ${s} ${i}`,style:{width:"100%",height:i,display:"block"}};if(c)return t.jsx("div",{ref:a,children:t.jsx("svg",{...d,children:t.jsx("line",{x1:"0",y1:n,x2:s,y2:n,stroke:"var(--border)"})})});const j=u/(o-1),f=e.map((g,h)=>({x:h*j,y:n-Math.max(0,Math.min(1,g.value))*(n-r)})),m=P(f),x=`${m} L ${u} ${n} L 0 ${n} Z`;return t.jsx("div",{ref:a,children:t.jsxs("svg",{...d,children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"hrdFill",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--accent)",stopOpacity:"0.22"}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:"0"})]})}),t.jsx("line",{x1:"0",y1:r,x2:s,y2:r,stroke:"var(--border)",opacity:"0.18"}),t.jsx("line",{x1:"0",y1:(r+n)/2,x2:s,y2:(r+n)/2,stroke:"var(--border)",opacity:"0.22"}),t.jsx("line",{x1:"0",y1:n,x2:s,y2:n,stroke:"var(--border)"}),t.jsx("path",{d:x,fill:"url(#hrdFill)"}),t.jsx("path",{d:m,fill:"none",stroke:"var(--accent)",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("circle",{cx:f[o-1].x,cy:f[o-1].y,r:"2.5",fill:"var(--accent)"}),t.jsx("text",{x:"0",y:l,fill:"var(--dim)",fontSize:"9",fontFamily:"var(--font-mono)",children:"7d"}),t.jsx("text",{x:s/2,y:l,textAnchor:"middle",fill:"var(--dim)",fontSize:"9",fontFamily:"var(--font-mono)",children:"3d"}),t.jsx("text",{x:s,y:l,textAnchor:"end",fill:"var(--dim)",fontSize:"9",fontFamily:"var(--font-mono)",children:"now"})]})})}function V({gauge:e,now:a,onClick:s}){const i=s?"button":"span",r=s?{type:"button",onClick:s}:{};if(e.kind==="status")return t.jsxs(i,{className:`hd-gauge hd-gauge--status hd-gauge--${e.tone}${s?" hd-gauge--interactive":""}`,"aria-label":`${e.label} subscription usage`,...r,children:[t.jsxs("span",{className:"hd-gauge-head",children:[t.jsx("span",{className:"hd-gauge-label",children:e.label}),t.jsx("span",{className:`hd-gauge-dot hd-gauge-dot--${e.tone}`,"aria-hidden":"true"})]}),t.jsx(N,{}),t.jsx(N,{}),t.jsxs("span",{className:"hd-gauge-cell hd-gauge-cell--usage hd-gauge-cell--status",children:[t.jsx("span",{className:"hd-gauge-window-name",children:e.windowLabel??"usage"}),t.jsx("span",{className:"hd-gauge-status",children:e.statusLabel})]}),t.jsx("span",{className:"hd-gauge-cell hd-gauge-reset",children:e.detailLabel??"quota n/a"})]});const n=M(e),{shortWindow:l,longWindow:o}=I(n),c=k(Math.max(...n.map(d=>d.fill))),u=Math.round(Math.max(...n.map(d=>d.fill))*100);return t.jsxs(i,{className:`hd-gauge hd-gauge--${c}${s?" hd-gauge--interactive":""}`,title:S(e,a),"aria-label":`${e.label} subscription usage. ${S(e,a)}`,...r,children:[t.jsxs("span",{className:"hd-gauge-head",children:[t.jsx("span",{className:"hd-gauge-label",children:e.label}),t.jsxs("span",{className:`hd-gauge-pct hd-gauge-pct--${c}`,children:[u,"%"]})]}),t.jsx(w,{window:l}),t.jsx(T,{window:l,now:a}),t.jsx(w,{window:o}),t.jsx(T,{window:o,now:a,featured:!0})]})}function z(e){const a=e.trim().match(/^(\d+(?:\.\d+)?)([kKmM])?$/u);if(!a)return 0;const s=Number(a[1]);if(!Number.isFinite(s))return 0;switch(a[2]?.toLowerCase()){case"m":return s*1e6;case"k":return s*1e3;default:return s}}function U(e){return e.kind==="quota"?Math.max(e.fill,...M(e).map(a=>a.fill)):z(e.statusLabel)>0?.01:0}function X(e){return e.kind==="quota"}function K(e){return R(e).slice(0,H)}function R(e){return e.map((a,s)=>({gauge:a,index:s,score:U(a)})).sort((a,s)=>s.score-a.score||a.index-s.index).map(({gauge:a})=>a)}function Z(e){const{now:a,syncLabel:s,error:i,loading:r,refreshing:n,onRefresh:l,navigate:o,heartrate:c,heartrateWindow:u,heartrateBucketLabel:d,heartrateVisibleEventThreshold:j=F,serviceGauges:f}=e,[m,x]=$.useState(!1),g=i?"err":"ok",h=f.filter(X),p=R(h),y=K(h),v=m?p:y,G=h.length>y.length,A=c.reduce((b,D)=>b+D.count,0)>=j;return t.jsxs("section",{className:"hd",children:[t.jsxs("div",{className:`hd-topbar${v.length>0?"":" hd-topbar--bare"}`,children:[t.jsxs("div",{className:"hd-topbar-r",children:[t.jsx("span",{className:`hd-dot hd-dot--${g}`,"aria-hidden":"true"}),t.jsx("span",{className:`hd-meta hd-meta--${g}`,children:s}),t.jsx("span",{className:"hd-topbar-actions",children:t.jsxs("button",{type:"button",className:"hd-btn",disabled:r||n,onClick:l,children:["[",n?"refreshing":"r refresh","]"]})})]}),v.length>0&&t.jsxs("div",{className:"hd-topbar-c","aria-label":"subscription usage",children:[t.jsxs("div",{className:"hd-gauge-title-row",children:[t.jsx("span",{className:"hd-gauge-window",children:"SUBSCRIPTIONS"}),G&&t.jsxs("button",{type:"button",className:"hd-gauge-toggle","aria-expanded":m,onClick:()=>x(b=>!b),children:["[",m?"top 2":`all ${h.length}`,"]"]})]}),t.jsxs("div",{className:"hd-gauge-set",children:[t.jsxs("div",{className:"hd-gauge-table-head","aria-hidden":"true",children:[t.jsx("span",{children:"service"}),t.jsx("span",{children:"short window"}),t.jsx("span",{children:"resets"}),t.jsx("span",{children:"long window"}),t.jsx("span",{children:"resets in"})]}),v.map(b=>t.jsx("span",{className:"hd-gauge-wrap",children:t.jsx(V,{gauge:b,now:a,onClick:()=>o({view:"harnesses"})})},b.id))]})]})]}),A&&t.jsx("div",{className:"hd-grid hd-grid--single",children:t.jsxs("div",{className:"hd-panel hd-panel--hr",children:[t.jsxs("div",{className:"hd-panel-title",children:[t.jsx("span",{children:"HEART-RATE"}),t.jsx("span",{className:"hd-sep",children:"·"}),t.jsx("span",{children:u}),d?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"hd-sep",children:"·"}),t.jsx("span",{children:d})]}):null]}),t.jsx(Q,{buckets:c})]})})]})}export{Z as default};
|
|
1
|
+
import{r as $,j as t}from"./index-DmFAhGPj.js";const F=3,H=2;function k(e){return e>=.9?"err":e>=.75?"warn":"ok"}const C=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function E(e,a){const s=e-a.getTime(),i=new Date(e).toDateString()===a.toDateString(),r=new Date(e),n=String(r.getHours()).padStart(2,"0"),l=String(r.getMinutes()).padStart(2,"0"),o=s>0&&s<6*3600*1e3;return i?{label:`${n}:${l}`,imminent:o}:{label:`${C[r.getDay()]} ${n}:${l}`,imminent:o}}function W(e,a){const s=Math.floor((e-a.getTime())/1e3),i=s<0,r=Math.abs(s);let n;if(r>=86400){const l=Math.floor(r/86400),o=Math.floor(r%86400/3600);n=o>0?`${l}d ${o}h`:`${l}d`}else if(r>=3600){const l=Math.floor(r/3600),o=Math.floor(r%3600/60);n=o>0?`${l}h ${o}m`:`${l}h`}else n=`${Math.max(1,Math.floor(r/60))}m`;return i?`stale ${n}`:n}function M(e){return e.windows&&e.windows.length>0?e.windows:[{label:_(e.unitLabel),fill:e.fill,usedLabel:e.usedLabel,capLabel:e.capLabel,unitLabel:e.unitLabel,resetAt:e.resetAt}]}function _(e){switch(e){case"weekly":return"7d";case"req/h":return"1h";default:return e||"quota"}}function S(e,a){return M(e).map(s=>{const i=E(s.resetAt,a),r=W(s.resetAt,a);return`${s.label}: ${s.usedLabel} / ${s.capLabel} ${s.unitLabel} · resets ${i.label} (in ${r})`}).join(" · ")}function L(e){const a=e.trim().match(/^(\d+(?:\.\d+)?)([mhd])$/i);if(!a)return null;const s=Number(a[1]);if(!Number.isFinite(s))return null;switch(a[2]?.toLowerCase()){case"m":return s;case"h":return s*60;case"d":return s*24*60;default:return null}}function I(e){const a=[...e].sort((r,n)=>(L(r.label)??Number.MAX_SAFE_INTEGER)-(L(n.label)??Number.MAX_SAFE_INTEGER)),s=a.find(r=>(L(r.label)??0)>=1440)??(a.length>1?a[a.length-1]:null);return{shortWindow:a.find(r=>r!==s)??null,longWindow:s}}function q(e){return e.capLabel==="100%"&&e.usedLabel.endsWith("%")?e.usedLabel:`${e.usedLabel}/${e.capLabel}`}function N(){return t.jsx("span",{className:"hd-gauge-cell hd-gauge-cell--empty",children:"—"})}function w({window:e}){if(!e)return t.jsx(N,{});const a=Math.round(e.fill*100),s=k(e.fill);return t.jsxs("span",{className:"hd-gauge-cell hd-gauge-cell--usage",children:[t.jsx("span",{className:"hd-gauge-window-name",children:e.label}),t.jsx("span",{className:"hd-gauge-bar","aria-hidden":"true",children:t.jsx("span",{className:`hd-gauge-bar-fill hd-gauge-bar-fill--${s}`,style:{width:`${a}%`}})}),t.jsx("span",{className:"hd-gauge-window-used",children:q(e)})]})}function T({window:e,now:a,featured:s=!1}){if(!e)return t.jsx(N,{});if(s){const n=O(e.resetAt,a);return t.jsxs("span",{className:`hd-gauge-cell hd-gauge-reset hd-gauge-reset--featured hd-gauge-reset--${n.tone}`,"aria-live":"off","aria-label":n.ariaLabel,children:[t.jsx("strong",{children:n.primary}),n.dateTime?t.jsx("time",{dateTime:n.dateTime,children:n.secondary}):t.jsx("span",{children:n.secondary})]})}const i=E(e.resetAt,a),r=W(e.resetAt,a);return t.jsxs("span",{className:`hd-gauge-cell hd-gauge-reset${i.imminent?" hd-gauge-reset--imminent":""}`,children:["↻ ",r]})}function O(e,a){if(!Number.isFinite(e))return{primary:"—",secondary:"unknown",ariaLabel:"Weekly reset time unknown",tone:"stale"};const s=e-a.getTime(),i=new Date(e);if(!Number.isFinite(i.getTime()))return{primary:"—",secondary:"unknown",ariaLabel:"Weekly reset time unknown",tone:"stale"};const r=i.toISOString();if(s<=0){const h=Math.abs(s);if(h<=9e4)return{primary:"reset due",secondary:"refreshing…",ariaLabel:"Weekly reset due; refreshing usage",tone:"due",dateTime:r};const p=Math.floor(h/6e4),y=p>=60?`+${Math.floor(p/60)}h ${p%60}m`:`+${Math.max(1,p)}m`;return{primary:h<=360*6e4?"reset due":"stale",secondary:y,ariaLabel:`Weekly reset data ${y} overdue`,tone:h<=360*6e4?"due":"stale",dateTime:r}}const n=Math.floor(s/1e3),l=Math.floor(n/86400),o=Math.floor(n%86400/3600),c=Math.floor(n%3600/60),u=n%60,d=[o,c,u].map(h=>String(h).padStart(2,"0")).join(":"),j=l>0?`${l}d ${d}`:d,f=i.toDateString()===a.toDateString(),m=i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),x=f?`today ${m}`:`${i.toLocaleDateString([],{weekday:"short"})} ${m}`,g=l>0?`${l} ${l===1?"day":"days"} ${o} hours`:`${o} hours ${c} minutes`;return{primary:j,secondary:x,ariaLabel:`Weekly quota resets in ${g}; ${x}`,tone:s<360*6e4?"imminent":"normal",dateTime:r}}function P(e){if(e.length===0)return"";if(e.length===1)return`M ${e[0].x} ${e[0].y}`;const a=[`M ${e[0].x} ${e[0].y}`];for(let s=0;s<e.length-1;s++){const i=e[s-1]??e[s],r=e[s],n=e[s+1],l=e[s+2]??n,o=r.x+(n.x-i.x)/6,c=r.y+(n.y-i.y)/6,u=n.x-(l.x-r.x)/6,d=n.y-(l.y-r.y)/6;a.push(`C ${o} ${c}, ${u} ${d}, ${n.x} ${n.y}`)}return a.join(" ")}function B(e){const a=$.useRef(null),[s,i]=$.useState(e);return $.useLayoutEffect(()=>{const r=a.current;if(!r)return;const n=o=>{const c=Math.round(o);c>0&&i(u=>u===c?u:c)};n(r.getBoundingClientRect().width);const l=new ResizeObserver(o=>{n(o[0]?.contentRect.width??0)});return l.observe(r),()=>l.disconnect()},[]),[a,s]}function Q({buckets:e}){const[a,s]=B(372),i=70,r=6,n=56,l=67,o=e.length,c=o<2||e.every(g=>g.count===0),u=Math.max(1,s-3),d={viewBox:`0 0 ${s} ${i}`,style:{width:"100%",height:i,display:"block"}};if(c)return t.jsx("div",{ref:a,children:t.jsx("svg",{...d,children:t.jsx("line",{x1:"0",y1:n,x2:s,y2:n,stroke:"var(--border)"})})});const j=u/(o-1),f=e.map((g,h)=>({x:h*j,y:n-Math.max(0,Math.min(1,g.value))*(n-r)})),m=P(f),x=`${m} L ${u} ${n} L 0 ${n} Z`;return t.jsx("div",{ref:a,children:t.jsxs("svg",{...d,children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"hrdFill",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--accent)",stopOpacity:"0.22"}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:"0"})]})}),t.jsx("line",{x1:"0",y1:r,x2:s,y2:r,stroke:"var(--border)",opacity:"0.18"}),t.jsx("line",{x1:"0",y1:(r+n)/2,x2:s,y2:(r+n)/2,stroke:"var(--border)",opacity:"0.22"}),t.jsx("line",{x1:"0",y1:n,x2:s,y2:n,stroke:"var(--border)"}),t.jsx("path",{d:x,fill:"url(#hrdFill)"}),t.jsx("path",{d:m,fill:"none",stroke:"var(--accent)",strokeWidth:"1.5",strokeLinecap:"round"}),t.jsx("circle",{cx:f[o-1].x,cy:f[o-1].y,r:"2.5",fill:"var(--accent)"}),t.jsx("text",{x:"0",y:l,fill:"var(--dim)",fontSize:"9",fontFamily:"var(--font-mono)",children:"7d"}),t.jsx("text",{x:s/2,y:l,textAnchor:"middle",fill:"var(--dim)",fontSize:"9",fontFamily:"var(--font-mono)",children:"3d"}),t.jsx("text",{x:s,y:l,textAnchor:"end",fill:"var(--dim)",fontSize:"9",fontFamily:"var(--font-mono)",children:"now"})]})})}function V({gauge:e,now:a,onClick:s}){const i=s?"button":"span",r=s?{type:"button",onClick:s}:{};if(e.kind==="status")return t.jsxs(i,{className:`hd-gauge hd-gauge--status hd-gauge--${e.tone}${s?" hd-gauge--interactive":""}`,"aria-label":`${e.label} subscription usage`,...r,children:[t.jsxs("span",{className:"hd-gauge-head",children:[t.jsx("span",{className:"hd-gauge-label",children:e.label}),t.jsx("span",{className:`hd-gauge-dot hd-gauge-dot--${e.tone}`,"aria-hidden":"true"})]}),t.jsx(N,{}),t.jsx(N,{}),t.jsxs("span",{className:"hd-gauge-cell hd-gauge-cell--usage hd-gauge-cell--status",children:[t.jsx("span",{className:"hd-gauge-window-name",children:e.windowLabel??"usage"}),t.jsx("span",{className:"hd-gauge-status",children:e.statusLabel})]}),t.jsx("span",{className:"hd-gauge-cell hd-gauge-reset",children:e.detailLabel??"quota n/a"})]});const n=M(e),{shortWindow:l,longWindow:o}=I(n),c=k(Math.max(...n.map(d=>d.fill))),u=Math.round(Math.max(...n.map(d=>d.fill))*100);return t.jsxs(i,{className:`hd-gauge hd-gauge--${c}${s?" hd-gauge--interactive":""}`,title:S(e,a),"aria-label":`${e.label} subscription usage. ${S(e,a)}`,...r,children:[t.jsxs("span",{className:"hd-gauge-head",children:[t.jsx("span",{className:"hd-gauge-label",children:e.label}),t.jsxs("span",{className:`hd-gauge-pct hd-gauge-pct--${c}`,children:[u,"%"]})]}),t.jsx(w,{window:l}),t.jsx(T,{window:l,now:a}),t.jsx(w,{window:o}),t.jsx(T,{window:o,now:a,featured:!0})]})}function z(e){const a=e.trim().match(/^(\d+(?:\.\d+)?)([kKmM])?$/u);if(!a)return 0;const s=Number(a[1]);if(!Number.isFinite(s))return 0;switch(a[2]?.toLowerCase()){case"m":return s*1e6;case"k":return s*1e3;default:return s}}function U(e){return e.kind==="quota"?Math.max(e.fill,...M(e).map(a=>a.fill)):z(e.statusLabel)>0?.01:0}function X(e){return e.kind==="quota"}function K(e){return R(e).slice(0,H)}function R(e){return e.map((a,s)=>({gauge:a,index:s,score:U(a)})).sort((a,s)=>s.score-a.score||a.index-s.index).map(({gauge:a})=>a)}function Z(e){const{now:a,syncLabel:s,error:i,loading:r,refreshing:n,onRefresh:l,navigate:o,heartrate:c,heartrateWindow:u,heartrateBucketLabel:d,heartrateVisibleEventThreshold:j=F,serviceGauges:f}=e,[m,x]=$.useState(!1),g=i?"err":"ok",h=f.filter(X),p=R(h),y=K(h),v=m?p:y,G=h.length>y.length,A=c.reduce((b,D)=>b+D.count,0)>=j;return t.jsxs("section",{className:"hd",children:[t.jsxs("div",{className:`hd-topbar${v.length>0?"":" hd-topbar--bare"}`,children:[t.jsxs("div",{className:"hd-topbar-r",children:[t.jsx("span",{className:`hd-dot hd-dot--${g}`,"aria-hidden":"true"}),t.jsx("span",{className:`hd-meta hd-meta--${g}`,children:s}),t.jsx("span",{className:"hd-topbar-actions",children:t.jsxs("button",{type:"button",className:"hd-btn",disabled:r||n,onClick:l,children:["[",n?"refreshing":"r refresh","]"]})})]}),v.length>0&&t.jsxs("div",{className:"hd-topbar-c","aria-label":"subscription usage",children:[t.jsxs("div",{className:"hd-gauge-title-row",children:[t.jsx("span",{className:"hd-gauge-window",children:"SUBSCRIPTIONS"}),G&&t.jsxs("button",{type:"button",className:"hd-gauge-toggle","aria-expanded":m,onClick:()=>x(b=>!b),children:["[",m?"top 2":`all ${h.length}`,"]"]})]}),t.jsxs("div",{className:"hd-gauge-set",children:[t.jsxs("div",{className:"hd-gauge-table-head","aria-hidden":"true",children:[t.jsx("span",{children:"service"}),t.jsx("span",{children:"short window"}),t.jsx("span",{children:"resets"}),t.jsx("span",{children:"long window"}),t.jsx("span",{children:"resets in"})]}),v.map(b=>t.jsx("span",{className:"hd-gauge-wrap",children:t.jsx(V,{gauge:b,now:a,onClick:()=>o({view:"harnesses"})})},b.id))]})]})]}),A&&t.jsx("div",{className:"hd-grid hd-grid--single",children:t.jsxs("div",{className:"hd-panel hd-panel--hr",children:[t.jsxs("div",{className:"hd-panel-title",children:[t.jsx("span",{children:"HEART-RATE"}),t.jsx("span",{className:"hd-sep",children:"·"}),t.jsx("span",{children:u}),d?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"hd-sep",children:"·"}),t.jsx("span",{children:d})]}):null]}),t.jsx(Q,{buckets:c})]})})]})}export{Z as default};
|