@openscout/scout 0.2.108 → 0.2.110
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 +206 -122
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/chat.mjs +211 -30
- package/dist/client/assets/conversation-motion-features-BeAplMGv.js +1 -0
- package/dist/client/assets/index-CMbTY75G.js +91 -0
- package/dist/client/assets/index-DYfh8pn_.css +1 -0
- package/dist/client/index.html +3 -3
- package/dist/main.mjs +7628 -3047
- package/dist/node/main.mjs +671 -115
- package/dist/openscout-terminal-relay.mjs +12 -3
- package/dist/pairing-runtime-controller.mjs +17539 -6059
- package/dist/runtime/base-daemon.mjs +410 -54
- package/dist/runtime/broker-daemon.mjs +67463 -52744
- package/dist/runtime/broker-process-manager.mjs +41 -14
- package/dist/runtime/mesh-discover.mjs +39 -13
- package/dist/scout-control-plane-web.mjs +80047 -58867
- package/dist/statusline.mjs +10 -3
- package/dist/update-helper.mjs +1105 -69
- package/package.json +2 -2
- package/server.json +2 -2
- package/dist/client/assets/ActivityScreen-C1H-vL0L.js +0 -1
- package/dist/client/assets/AddProjectForm-4sVXmjfN.js +0 -1
- package/dist/client/assets/AdventureEvidence-D5wq1vu8.js +0 -5
- package/dist/client/assets/AdventureReader-BICypcDY.js +0 -4
- package/dist/client/assets/AdventureScenery-CGEcG0zV.js +0 -1
- package/dist/client/assets/AgentAdventures-5yBt-Zl3.js +0 -1
- package/dist/client/assets/AgentAvatar-Dn8TUv5W.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-C0D9WNyL.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-BzcBdC_s.js +0 -1
- package/dist/client/assets/AgentDetailCard-C4WVeJvJ.css +0 -1
- package/dist/client/assets/AgentDetailCard-CI-ufaEP.js +0 -1
- package/dist/client/assets/AgentFloorView-D8tlGlgy.js +0 -1
- package/dist/client/assets/AgentFloorWorld-DqmnQexg.js +0 -1
- package/dist/client/assets/AgentInfoScreen-BnRhfcFy.js +0 -1
- package/dist/client/assets/AgentLaneCard-pppHFROz.js +0 -1
- package/dist/client/assets/AgentLaneChrome-RptImDFc.js +0 -1
- package/dist/client/assets/AgentLaneDetailSheet-BqbwGskh.js +0 -4
- package/dist/client/assets/AgentLaneSummaryResize-DaIgwyVh.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-De6C4ZOw.js +0 -1
- package/dist/client/assets/AgentLanesPreflight-BQfj2twF.js +0 -1
- package/dist/client/assets/AgentLanesView-CiISx7pu.js +0 -2
- package/dist/client/assets/AgentLiveActions-CGS-Bxb7.css +0 -1
- package/dist/client/assets/AgentLiveActions-CkRGkv13.js +0 -1
- package/dist/client/assets/AgentMasterScreen-CijN_4tN.js +0 -1
- package/dist/client/assets/AgentSessions-ghjQcSrh.js +0 -6
- package/dist/client/assets/AgentsConsole-BjSTs-TV.css +0 -1
- package/dist/client/assets/AgentsConsole-D8upjDpn.js +0 -1
- package/dist/client/assets/AgentsScreen-C17BFqjf.js +0 -1
- package/dist/client/assets/AgentsSubnav-_1GVC4hj.js +0 -1
- package/dist/client/assets/AstronautSuit-Dzu4GOMR.js +0 -1
- package/dist/client/assets/AtopView-DJK5b3lZ.js +0 -1
- package/dist/client/assets/BackToPicker-BPU7kbXq.js +0 -1
- package/dist/client/assets/BackToPicker-CdgVu-to.css +0 -1
- package/dist/client/assets/BriefingDetailScreen-CTvFw523.js +0 -1
- package/dist/client/assets/BriefingsScreen-DpVC3OUk.js +0 -1
- package/dist/client/assets/BrokerMetadataPanel-glRVdwkU.js +0 -1
- package/dist/client/assets/BrokerScreen-CqKsBwEx.js +0 -8
- package/dist/client/assets/CastPicker-Y29K5kKk.js +0 -1
- package/dist/client/assets/CastPicker-zXsnkTIy.css +0 -1
- package/dist/client/assets/ChannelComposer-D4EY9jVW.js +0 -1
- package/dist/client/assets/ChannelSidebar-CVmykV4d.js +0 -1
- package/dist/client/assets/CharacterFamilyPreview-Bj8oMD-5.js +0 -1
- package/dist/client/assets/CharacterFamilyPreview-BniL8sEL.css +0 -1
- package/dist/client/assets/ChatAvatar-BsAOShUr.js +0 -1
- package/dist/client/assets/ChatBits-Cq54CmyB.js +0 -1
- package/dist/client/assets/ChatCollapsedStrip-B0DdrOo2.js +0 -1
- package/dist/client/assets/ChatRichInput-DYJRhGTP.js +0 -31
- package/dist/client/assets/ChatRightPanel-D94Lw7ud.js +0 -1
- package/dist/client/assets/ChatSpaceSurface-Cp532VmZ.js +0 -1
- package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +0 -1
- package/dist/client/assets/ChatSpaceTheme-DPzYpw-v.js +0 -1
- package/dist/client/assets/CodeDiffPane-DCgMUi39.js +0 -1
- package/dist/client/assets/CodeProjectPicker-Dq787L77.js +0 -2
- package/dist/client/assets/CodeScreen-BN4TkiR0.js +0 -1
- package/dist/client/assets/CommsCanvas-BR2YS76H.css +0 -1
- package/dist/client/assets/CommsCanvas-Dh056d91.js +0 -1
- package/dist/client/assets/CommsDeck-CRXKIerH.js +0 -1
- package/dist/client/assets/CommsFlowGraph-Cc48o9u_.js +0 -1
- package/dist/client/assets/CommsFlowGraph-vQucylxF.css +0 -1
- package/dist/client/assets/CommsFlowMap-Ckasql5e.js +0 -1
- package/dist/client/assets/CommsSelection-CuphnUny.js +0 -1
- package/dist/client/assets/ComposerAttachments-9uYp_Lh5.js +0 -1
- package/dist/client/assets/ConversationComposer-hYtLurqy.js +0 -1
- package/dist/client/assets/ConversationFeedRows-Bu0ZJcy8.js +0 -1
- package/dist/client/assets/ConversationHeader-L9738YVP.js +0 -1
- package/dist/client/assets/ConversationPanels-D6KuqvGu.js +0 -6
- package/dist/client/assets/ConversationScreen-9MlMnEo4.css +0 -1
- package/dist/client/assets/ConversationScreen-Pzxy9x4m.js +0 -2
- package/dist/client/assets/ConversationStatus-BEefIbXq.js +0 -1
- package/dist/client/assets/CrewAvatar-BnIPIn_Z.css +0 -1
- package/dist/client/assets/CrewAvatar-a_C_F9r_.js +0 -1
- package/dist/client/assets/CrewSprite-CguHb2Ny.js +0 -1
- package/dist/client/assets/CrewSprite-DsQJdu3Z.css +0 -1
- package/dist/client/assets/CrewStage-IPpS3Oja.js +0 -1
- package/dist/client/assets/CrewWorkspaces-BTPtcEcx.js +0 -1
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +0 -1
- package/dist/client/assets/DataTable-DnL_8SAu.js +0 -1
- package/dist/client/assets/DispatchAftermath-CoAYaL3B.js +0 -1
- package/dist/client/assets/DocumentFocusViewer-BSC_JwVE.css +0 -1
- package/dist/client/assets/DocumentFocusViewer-mxzPxQQW.js +0 -1
- package/dist/client/assets/EmbeddableSurfacesLab-BAZ_eRMc.js +0 -1
- package/dist/client/assets/EmptyState-DLiLgtPK.js +0 -1
- package/dist/client/assets/FileViewerPane-Dc7AoVod.js +0 -3
- package/dist/client/assets/FleetRollCallHud-VhpxVcGO.js +0 -1
- package/dist/client/assets/FlightObserveScreen-C1kASP3J.js +0 -1
- package/dist/client/assets/FloorContextSheet-BfrXNoBn.js +0 -1
- package/dist/client/assets/FloorExchangePanel-B3TFhjLk.css +0 -1
- package/dist/client/assets/FloorExchangePanel-DsG1cRzu.js +0 -1
- package/dist/client/assets/FloorMessagePasses-Cm3LbkHd.js +0 -1
- package/dist/client/assets/FloorMessagePasses-nxwwiUom.css +0 -1
- package/dist/client/assets/FloorReplay-Bg7kA-tR.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-Ba9HubO2.js +0 -1
- package/dist/client/assets/FloorSavedWork-BDOvV3mA.js +0 -1
- package/dist/client/assets/FloorTacticalHUD-4d-Hr-YL.js +0 -1
- package/dist/client/assets/FollowScreen-DFVSlsQV.js +0 -1
- package/dist/client/assets/HarnessMark-CP-PWk2W.js +0 -1
- package/dist/client/assets/HarnessesScreen-j-91IoOo.js +0 -1
- package/dist/client/assets/HerdrSession-H2mmxeTK.js +0 -4
- package/dist/client/assets/HomeHero-7JwycwFY.css +0 -1
- package/dist/client/assets/HomeHero-g4H3Ctxg.js +0 -1
- package/dist/client/assets/HostAdvisorView-Cyt3b5Fq.js +0 -1
- package/dist/client/assets/InviteLandingScreen-C3DtAGD4.js +0 -1
- package/dist/client/assets/InviteSheet-BiGMNpsE.js +0 -1
- package/dist/client/assets/JumpPalette-goXAVByA.js +0 -1
- package/dist/client/assets/KnowledgeSearchInspector-BbOQIqdF.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DC8yX-kA.js +0 -1
- package/dist/client/assets/LaneToolHoverCard-B8Am_1DC.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-CngYIxdI.js +0 -1
- package/dist/client/assets/LaneTraceEventFocus-BRR_jcl9.js +0 -1
- package/dist/client/assets/MeshCanvas-DzkuY_XI.js +0 -3
- package/dist/client/assets/MeshCanvasMinimap-BrscEPAH.js +0 -1
- package/dist/client/assets/MeshCanvasMinimap-Dv7nMbl5.css +0 -1
- package/dist/client/assets/MeshScreen-CAtRB8K6.js +0 -1
- package/dist/client/assets/MeshTopologyView-B1I2dAhu.js +0 -2
- package/dist/client/assets/MessageEmbeds-B-FbWI7a.js +0 -1
- package/dist/client/assets/MessagesScreen-hq7D3Lfi.js +0 -1
- package/dist/client/assets/MissionContextRail-ClR8amG1.js +0 -1
- package/dist/client/assets/MissionControlView-D6gbMrgx.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-CzeNgI9Q.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-CB3cgeYr.js +0 -1
- package/dist/client/assets/MissionLogPane-2PMEoG44.js +0 -1
- package/dist/client/assets/NativeAreaScreen-BnlrAWT8.js +0 -1
- package/dist/client/assets/NativeAreaScreen-DSR5Tf6F.js +0 -1
- package/dist/client/assets/NativeAreaScreen-fGsxyeC3.js +0 -1
- package/dist/client/assets/NewAgentModal-4b_3aoZE.js +0 -1
- package/dist/client/assets/NewAgentModal-ru8u5YdJ.css +0 -1
- package/dist/client/assets/NewChatComposer-C5LT7MF7.css +0 -1
- package/dist/client/assets/NewChatComposer-D-VB5vdt.js +0 -19
- package/dist/client/assets/NewChatOrigin-BYsEu9dZ.js +0 -1
- package/dist/client/assets/NodeDetailPanel-9NaEnZAQ.js +0 -1
- package/dist/client/assets/NodeMenu-BgJMmffZ.js +0 -1
- package/dist/client/assets/ObserveEmbedScreen-W7Q5HbXP.js +0 -2
- package/dist/client/assets/ObserveTextFlow-C0oQEerY.js +0 -2
- package/dist/client/assets/ObservedTopologyPanel-BsBsvVPL.css +0 -1
- package/dist/client/assets/ObservedTopologyPanel-Ci7emnnj.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-Bh6FnEJO.css +0 -1
- package/dist/client/assets/OpenScoutAppShell-Di9qdmI0.js +0 -22
- package/dist/client/assets/OpsAgentsView-DVotOMg2.js +0 -1
- package/dist/client/assets/OpsScreen-C955zgr3.js +0 -1
- package/dist/client/assets/OpsSubnav-CjMVj7Sk.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-B1VqGSmu.js +0 -1
- package/dist/client/assets/ProjectAgentProfileBar-DhVU7zew.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-CJk-Dx4t.js +0 -1
- package/dist/client/assets/ProjectsInbox-B7kap8nR.js +0 -2
- package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +0 -1
- package/dist/client/assets/ProjectsRail-BhSaqbv0.js +0 -1
- package/dist/client/assets/ProjectsScreen-CSb7nwjb.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-pEJutIO8.js +0 -1
- package/dist/client/assets/Provider-BEXAZWd9.js +0 -5
- package/dist/client/assets/Provider-CCzjtkda.css +0 -1
- package/dist/client/assets/RailRow-B25zKEub.css +0 -1
- package/dist/client/assets/RailRow-Ddz90weI.js +0 -1
- package/dist/client/assets/RawSessionsTable-TdKlJIPl.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-BU5KmlNo.js +0 -8
- package/dist/client/assets/RenderedWorkerSprite-BNhFXMIo.js +0 -1
- package/dist/client/assets/RenderedWorkerSprite-qnTfkd_4.css +0 -1
- package/dist/client/assets/ReplayClock-wLpb4VqN.js +0 -1
- package/dist/client/assets/ReplayLog-IUyQdklN.js +0 -1
- package/dist/client/assets/ReplayOutpost-C4djhjZJ.js +0 -1
- package/dist/client/assets/ReplayOutpost-Y1DvZgeu.css +0 -1
- package/dist/client/assets/RepoDiffEmbedScreen-BmQX_8E-.js +0 -1
- package/dist/client/assets/RepoDiffPageScreen-B9oAjrC6.js +0 -1
- package/dist/client/assets/RepoDiffViewer-Ch_lIMt-.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-DL6A2o_z.js +0 -2
- package/dist/client/assets/ReposScreen-D-E7fSAB.js +0 -6
- package/dist/client/assets/RiggedWorkerCharacter-BpYECnyK.css +0 -1
- package/dist/client/assets/RiggedWorkerCharacter-CF6fhzGd.js +0 -1
- package/dist/client/assets/SageModelStudio-768dRQr4.css +0 -1
- package/dist/client/assets/SageModelStudio-CSet_ITs.js +0 -4108
- package/dist/client/assets/ScoutDeckSurface-BJ-fl8AX.js +0 -1
- package/dist/client/assets/ScoutDeckSurface-uhmuZRzC.css +0 -1
- package/dist/client/assets/ScoutSurface-BvFRdce6.js +0 -1
- package/dist/client/assets/ScoutbotFxLab-CfPzycZ7.js +0 -4
- package/dist/client/assets/SecondaryNav-1FjBDWuY.js +0 -1
- package/dist/client/assets/SessionContextStrip-BoiIxXvS.js +0 -1
- package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +0 -1
- package/dist/client/assets/SessionEmbedScreen-BizGNGOz.js +0 -1
- package/dist/client/assets/SessionHopMenu-DX6PJPNk.js +0 -1
- package/dist/client/assets/SessionObserve-CDdJ7fAE.css +0 -1
- package/dist/client/assets/SessionObserve-Dw3bVQYF.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-uD1OX-R5.js +0 -1
- package/dist/client/assets/SessionRefScreen-Ch9H-qVk.js +0 -1
- package/dist/client/assets/SessionsScreen-DUeP23Xy.js +0 -1
- package/dist/client/assets/SettingsDrawer-BVrP6J52.js +0 -3
- package/dist/client/assets/SettingsDrawer-R8a0TlJD.css +0 -1
- package/dist/client/assets/SettingsScreen-BcJ05LE5.js +0 -1
- package/dist/client/assets/SharedFloorCharacter-Bi5_md4R.css +0 -1
- package/dist/client/assets/SharedFloorCharacter-dnamlt1p.js +0 -1
- package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +0 -1
- package/dist/client/assets/SharedWorkFloor-H-e2TVj9.js +0 -2
- package/dist/client/assets/ShikiPane-CDiIT_qn.js +0 -15
- package/dist/client/assets/SlidePanel-Bg5dVaIa.css +0 -1
- package/dist/client/assets/SlidePanel-D5oPQocF.js +0 -1
- package/dist/client/assets/SpaceSwitcher-WccPJ0fS.js +0 -1
- package/dist/client/assets/SpriteAvatar-D53GaaK3.js +0 -1
- package/dist/client/assets/SproutActionSprite-BrFCmgWS.js +0 -1
- package/dist/client/assets/StatusPill-jT--OXbn.js +0 -1
- package/dist/client/assets/TailView-B44cSuyl.js +0 -2
- package/dist/client/assets/TailView-Mj3AU2u0.css +0 -1
- package/dist/client/assets/Terminal-D0PanmIk.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-Eddi4sts.js +0 -1
- package/dist/client/assets/TerminalHeaderMount-CYYcKxQ-.js +0 -1
- package/dist/client/assets/TextDocumentSurface-DBslUq9k.js +0 -4
- package/dist/client/assets/TmuxPeek-Ctw5yYO5.js +0 -1
- package/dist/client/assets/VoiceControlWell-BkjuWjYu.js +0 -1
- package/dist/client/assets/VoicePathDiagram-u0i6ntbx.js +0 -1
- package/dist/client/assets/VoicePermissionsPanel-9Nuw-xCr.js +0 -1
- package/dist/client/assets/VoicePermissionsPanel-RijAZ1gP.css +0 -1
- package/dist/client/assets/VoiceTurnDetails-kS7lfbmt.js +0 -8
- package/dist/client/assets/VoiceTurnStage-DLY6aYDg.js +0 -1
- package/dist/client/assets/VoiceTurnView-CF4tIldB.js +0 -1
- package/dist/client/assets/WorkDetailScreen-BrrkENYq.js +0 -5
- package/dist/client/assets/WorkFilesViewer-B63sKRYZ.js +0 -1
- package/dist/client/assets/WorkRunView-CxwAZ2QQ.css +0 -1
- package/dist/client/assets/WorkRunView-DLIzAsc3.js +0 -1
- package/dist/client/assets/WorldActorTalk-CHhFTiQV.js +0 -1
- package/dist/client/assets/WorldCharacter-CJGx2DVy.js +0 -1
- package/dist/client/assets/WorldMinimap-DL12pBw3.js +0 -1
- package/dist/client/assets/WorldSky-BlPNvGLo.js +0 -1
- package/dist/client/assets/activity-CXkZ620t.js +0 -1
- package/dist/client/assets/addon-fit-G3qi01sy.js +0 -1
- package/dist/client/assets/addon-webgl-Bo7kSgOB.js +0 -82
- package/dist/client/assets/adventure-evidence-DgQbBmfa.css +0 -1
- package/dist/client/assets/adventure-habitats-v1-CVMbdB_Z.png +0 -0
- package/dist/client/assets/adventure-habitats-v1-M1lcpTJh.js +0 -1
- package/dist/client/assets/adventure-playback-DTfkhIc0.js +0 -3
- package/dist/client/assets/adventure-reader-DM5UDDm9.css +0 -1
- package/dist/client/assets/agent-adventures-DZtWpj6k.css +0 -1
- package/dist/client/assets/agent-definitions-CymTYqvo.css +0 -1
- package/dist/client/assets/agent-directory-studio-injection-Bc8590z5.css +0 -1
- package/dist/client/assets/agent-essentials-DnfdGmIX.js +0 -1
- package/dist/client/assets/agent-floor-Dmr9hZHL.css +0 -1
- package/dist/client/assets/agent-floor-actor-DW8zLht0.js +0 -1
- package/dist/client/assets/agent-floor-world-Bnd1AtwK.css +0 -1
- package/dist/client/assets/agent-floor-world-layout-hfMjuoui.js +0 -1
- package/dist/client/assets/agent-lane-card-BkWVDYM8.css +0 -1
- package/dist/client/assets/agent-lane-card-model-CeqQGp-8.js +0 -1
- package/dist/client/assets/agent-lane-detail-Ti3trpfH.js +0 -2
- package/dist/client/assets/agent-lane-preview-Dpa3DuOn.js +0 -4
- package/dist/client/assets/agent-lanes-DmgipV9D.css +0 -1
- package/dist/client/assets/agent-lanes-model-DMAdqCmK.js +0 -4
- package/dist/client/assets/agent-master-THmq-1k8.css +0 -1
- package/dist/client/assets/agent-master-model-Bk_yuUXJ.js +0 -1
- package/dist/client/assets/agent-specialization-DYX_DSlY.js +0 -1
- package/dist/client/assets/agent-state-DDhnFEEP.js +0 -1
- package/dist/client/assets/agents-detail-redesign-h34ROjOW.css +0 -1
- package/dist/client/assets/agents-project-DgbqDc65.css +0 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +0 -1
- package/dist/client/assets/api-BQYTwoz6.js +0 -1
- package/dist/client/assets/api-DSqpVKC7.js +0 -1
- package/dist/client/assets/arc.es-CLA3XI14.js +0 -188
- package/dist/client/assets/arrow-down--OUDFWIq.js +0 -1
- package/dist/client/assets/arrow-left-DNjQHf4C.js +0 -1
- package/dist/client/assets/arrow-right-A_yyXwoH.js +0 -1
- package/dist/client/assets/arrow-up-DFy-9ghF.js +0 -1
- package/dist/client/assets/arrow-up-right-DUW1A1Hb.js +0 -1
- package/dist/client/assets/bash-format-BRV5C6Gv.js +0 -1
- package/dist/client/assets/book-open-B_idZgTF.js +0 -1
- package/dist/client/assets/bot-BNv_ZJzi.js +0 -1
- package/dist/client/assets/briefings-BwuAFQK6.css +0 -1
- package/dist/client/assets/broker-display-BkBzyvbR.js +0 -2
- package/dist/client/assets/cache-DGBo3vIf.js +0 -2
- package/dist/client/assets/chat-api-BHGHALv2.js +0 -2
- package/dist/client/assets/chat-message-markup-esR-YLtN.js +0 -1
- package/dist/client/assets/chat-space-model-aW3Fd8_U.js +0 -4
- package/dist/client/assets/chat-transport-CtxnPLMU.js +0 -1
- package/dist/client/assets/check-BM6QtbB7.js +0 -1
- package/dist/client/assets/chevron-down-DEDSNJNY.js +0 -1
- package/dist/client/assets/chevron-right-B02kAw12.js +0 -1
- package/dist/client/assets/chevron-up-CzveykKG.js +0 -1
- package/dist/client/assets/chunk-HRAB3GC3-DVhUsgOw.js +0 -1
- package/dist/client/assets/chunk-JTPDIGGW-hdpdYwXb.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-G_Z0lqtn.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-apgUnfXh.js +0 -2
- package/dist/client/assets/clipboard-e3fSpeo7.js +0 -1
- package/dist/client/assets/clock-8tb9t2t9.js +0 -1
- package/dist/client/assets/code-screen-DrKinCyh.css +0 -1
- package/dist/client/assets/code-xml-E9gBuiVs.js +0 -1
- package/dist/client/assets/coffee-D0YEK6-l.js +0 -1
- package/dist/client/assets/collapsed-strip-raJWthAH.css +0 -1
- package/dist/client/assets/colors-CFlbwC25.js +0 -1
- package/dist/client/assets/comms-deck-C8nVeMBh.css +0 -1
- package/dist/client/assets/comms-deck-CBhsXnY-.js +0 -2
- package/dist/client/assets/comms-gesture-_aGFo6g3.js +0 -2
- package/dist/client/assets/compass-EmGkpxIe.js +0 -1
- package/dist/client/assets/console-B1IBqLI_.css +0 -1
- package/dist/client/assets/content-B-rn1rka.js +0 -1
- package/dist/client/assets/content-BHV-ZU8_.js +0 -1
- package/dist/client/assets/content-BI9yWpWC.js +0 -1
- package/dist/client/assets/content-BLVuukzF.js +0 -1
- package/dist/client/assets/content-BP3cQkAj.js +0 -1
- package/dist/client/assets/content-BRY-UTkP.js +0 -1
- package/dist/client/assets/content-BXTmYOPB.js +0 -1
- package/dist/client/assets/content-C3DZ77HZ.js +0 -1
- package/dist/client/assets/content-CINHz-rZ.css +0 -1
- package/dist/client/assets/content-CPchclaV.js +0 -1
- package/dist/client/assets/content-CVqPTQnr.js +0 -1
- package/dist/client/assets/content-CjAERU44.js +0 -1
- package/dist/client/assets/content-CoYG0nWL.js +0 -1
- package/dist/client/assets/content-DK1KeRPw.js +0 -1
- package/dist/client/assets/content-iWBSSXa6.js +0 -1
- package/dist/client/assets/content-ryJeaQk8.js +0 -1
- package/dist/client/assets/content-srNyLgDt.js +0 -1
- package/dist/client/assets/context-budget-8qFKqM-j.js +0 -1
- package/dist/client/assets/conversation-icons-Dxn9N1Kx.js +0 -1
- package/dist/client/assets/conversation-model-FxDeWlle.js +0 -1
- package/dist/client/assets/conversation-motion-features-BfmPlONx.js +0 -1
- package/dist/client/assets/conversation-prefs-DNre-Lcx.js +0 -1
- package/dist/client/assets/conversations-DoAAO6kA.js +0 -1
- package/dist/client/assets/copy-C1XrY27_.js +0 -1
- package/dist/client/assets/cpu-DVZ_LhPn.js +0 -1
- package/dist/client/assets/createLucideIcon-CKbjXlwv.js +0 -1
- package/dist/client/assets/credentials-OeoF-VKJ.js +0 -1
- package/dist/client/assets/ctx-panel-BC8fpcWJ.css +0 -1
- package/dist/client/assets/direct-voice-DAOUU-kc.js +0 -10
- package/dist/client/assets/direct-voice-DbO7CSv_.css +0 -1
- package/dist/client/assets/discover-BNa3BPr_.js +0 -2
- package/dist/client/assets/embed-entry-gK3z8Yxi.js +0 -2
- package/dist/client/assets/embed-navigation-DayfkQau.js +0 -1
- package/dist/client/assets/external-link-Df1R34rX.js +0 -1
- package/dist/client/assets/eye-CD-_aphP.js +0 -1
- package/dist/client/assets/file-code-corner-DtMWHBN3.js +0 -1
- package/dist/client/assets/file-text-BOJQiS8p.js +0 -1
- package/dist/client/assets/flag-CeKO8NoD.js +0 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +0 -1
- package/dist/client/assets/flight-observe-GFg9L8ft.css +0 -1
- package/dist/client/assets/floor-character-name-CqJPOlXb.js +0 -1
- package/dist/client/assets/floor-context-model-rWKqaKmV.js +0 -1
- package/dist/client/assets/floor-context-sheet-BFnkFiY3.css +0 -1
- package/dist/client/assets/floor-memory-YMM8AlLY.js +0 -1
- package/dist/client/assets/floor-message-passes-CO3Ix_wR.js +0 -1
- package/dist/client/assets/floor-preview-text-HrORUJ7D.js +0 -1
- package/dist/client/assets/floor-replay-CccYqE-f.css +0 -1
- package/dist/client/assets/floor-tactical-hud-HL5Vja5Y.css +0 -1
- package/dist/client/assets/folder-C2emmTHq.js +0 -1
- package/dist/client/assets/follow-route-BvcGtBIL.js +0 -1
- package/dist/client/assets/fx-z37u1o2z.js +0 -1
- package/dist/client/assets/gauge-BR5CrhRM.js +0 -1
- package/dist/client/assets/gestures-Dh8szhcU.js +0 -1
- package/dist/client/assets/git-branch-C45vy8qT.js +0 -1
- package/dist/client/assets/go-shortcuts--25Qg0lD.js +0 -1
- package/dist/client/assets/harnesses-screen-2z36fJKE.css +0 -1
- package/dist/client/assets/home-live-action-BkqGLVRY.js +0 -1
- package/dist/client/assets/home-moving-signal-BiiyEKEb.js +0 -1
- package/dist/client/assets/home-moving-signal-DMguaRWR.css +0 -1
- package/dist/client/assets/home-now-card-DaCpqUZe.js +0 -1
- package/dist/client/assets/home-now-card-nano-wbxgyY4q.js +0 -1
- package/dist/client/assets/hooks-D787lBmm.css +0 -1
- package/dist/client/assets/hooks-JNwYSH18.js +0 -2
- package/dist/client/assets/host-advisor-B2Fqs5Dd.css +0 -1
- package/dist/client/assets/inbox-thread-redesign-B_1ocqaX.css +0 -1
- package/dist/client/assets/index-BFbLvCJn.js +0 -10
- package/dist/client/assets/index-BRNHY2fp.css +0 -1
- package/dist/client/assets/index-BWHgHrtv.js +0 -1
- package/dist/client/assets/index-BrXaMEdK.js +0 -1
- package/dist/client/assets/index-CXzJ_hGx.js +0 -1
- package/dist/client/assets/index-V8FYEUpD.js +0 -1
- package/dist/client/assets/index-mYtyYeAe.js +0 -1
- package/dist/client/assets/index-wLwc74Pu.css +0 -1
- package/dist/client/assets/inspector-panel-BgU5xUln.js +0 -2
- package/dist/client/assets/keyboard-nav-CEe-ApvZ.js +0 -1
- package/dist/client/assets/knowledge-search-BNdQweGz.css +0 -1
- package/dist/client/assets/lane-ask-display-BTVSakyo.js +0 -18
- package/dist/client/assets/lane-edit-display-BjdT9oZl.js +0 -9
- package/dist/client/assets/lane-observe-CteDwdD-.js +0 -7
- package/dist/client/assets/lane-roster-store-MraynTHP.js +0 -1
- package/dist/client/assets/lane-tool-detail-Czggx8oM.js +0 -9
- package/dist/client/assets/layers-ClmyjwpB.js +0 -1
- package/dist/client/assets/layout-grid-DG2-JaPn.js +0 -1
- package/dist/client/assets/left-B66YR0c5.js +0 -1
- package/dist/client/assets/left-BP5P8lzw.js +0 -2
- package/dist/client/assets/left-BV9yMiTL.css +0 -1
- package/dist/client/assets/left-BbCKRDbW.js +0 -1
- package/dist/client/assets/left-CAaRBK9S.css +0 -1
- package/dist/client/assets/left-CaY5FK2k.js +0 -1
- package/dist/client/assets/left-CemrfeSs.js +0 -1
- package/dist/client/assets/left-DcYA26sH.js +0 -1
- package/dist/client/assets/left-DdMMaqFT.js +0 -2
- package/dist/client/assets/left-R2OOE7VG.css +0 -1
- package/dist/client/assets/left-advisor-DBml48M5.js +0 -1
- package/dist/client/assets/left-agents-DowYF2ag.js +0 -1
- package/dist/client/assets/left-default-Bifaeg_V.js +0 -1
- package/dist/client/assets/left-lanes-BGhjdqpD.js +0 -1
- package/dist/client/assets/left-mission-CvXPUovR.js +0 -1
- package/dist/client/assets/left-mission-DENnfshd.css +0 -1
- package/dist/client/assets/library-CnC8uzJt.js +0 -1
- package/dist/client/assets/loader-circle-CCG7hG7z.js +0 -1
- package/dist/client/assets/local-agents-BMcFlY_x.js +0 -1
- package/dist/client/assets/log-in-VL9mdgeE.js +0 -1
- package/dist/client/assets/machine-children-DvCiQxwA.js +0 -1
- package/dist/client/assets/machine-scope-DJt9RZ2w.js +0 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +0 -1
- package/dist/client/assets/mentions-s5oW4aQU.js +0 -1
- package/dist/client/assets/mesh-ops-9SzD3sPw.js +0 -1
- package/dist/client/assets/mesh-ops-B1kDjizF.css +0 -1
- package/dist/client/assets/mesh-screen-DjA4mOaN.css +0 -1
- package/dist/client/assets/mesh-view-store-CVqzYz4K.js +0 -1
- package/dist/client/assets/message-circle-BB3rFCVD.js +0 -1
- package/dist/client/assets/message-markup-BQW5jdJw.js +0 -15
- package/dist/client/assets/message-markup-D1C7GzHo.js +0 -1
- package/dist/client/assets/message-square-BwqBIfv5.js +0 -1
- package/dist/client/assets/message-visibility-DwxgcgYK.js +0 -1
- package/dist/client/assets/mission-control-CsX3Yc58.css +0 -1
- package/dist/client/assets/mission-control-model-BpJHDV5D.js +0 -1
- package/dist/client/assets/mission-control-store-e8F85JhP.js +0 -1
- package/dist/client/assets/mission-wall-CAo4BKfa.js +0 -1
- package/dist/client/assets/model-CBkMvT1w.js +0 -1
- package/dist/client/assets/monitor-M0VSmHQ-.js +0 -1
- package/dist/client/assets/nav-destinations-B3R5zxFX.js +0 -1
- package/dist/client/assets/observe-M3rLosT5.js +0 -1
- package/dist/client/assets/openAgent-Dbv5wfuL.js +0 -1
- package/dist/client/assets/openContent-C6XO6kr5.js +0 -1
- package/dist/client/assets/operator-attention-DBaRg5ep.js +0 -1
- package/dist/client/assets/ops-agents-BOYxzPTm.css +0 -1
- package/dist/client/assets/ops-atop-BB4B4JdE.css +0 -1
- package/dist/client/assets/ops-screen-CxYM0VOW.css +0 -1
- package/dist/client/assets/page-status-BIuh3C5p.js +0 -1
- package/dist/client/assets/page-status-bar-ByUD7VPM.css +0 -1
- package/dist/client/assets/panel-right-WKLdPm0F.js +0 -1
- package/dist/client/assets/paperclip-DLf_ABSv.js +0 -1
- package/dist/client/assets/pause-7mmEEvVx.js +0 -1
- package/dist/client/assets/persistent-state-3mbBFRDO.js +0 -1
- package/dist/client/assets/pin-q_0gAA6i.js +0 -1
- package/dist/client/assets/pip-idle-v1-Tt-CZsRG.png +0 -0
- package/dist/client/assets/pip-thinking-v1-BoHWSEye.png +0 -0
- package/dist/client/assets/pip-waiting-v1-DkuvJ-dN.png +0 -0
- package/dist/client/assets/pip-working-v1-wWQLRS1z.png +0 -0
- package/dist/client/assets/play-N5-hnPCV.js +0 -1
- package/dist/client/assets/plus-B0hdY0fF.js +0 -1
- package/dist/client/assets/profile-B7ZGToTo.js +0 -1
- package/dist/client/assets/project-overview-helpers-BQTc_Ous.js +0 -1
- package/dist/client/assets/projects-inbox-CMFBjQt0.js +0 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +0 -1
- package/dist/client/assets/proxy-k0ILOVkK.js +0 -1
- package/dist/client/assets/radio-Bjqmv997.js +0 -1
- package/dist/client/assets/refresh-cw-BcqctLqo.js +0 -1
- package/dist/client/assets/repo-diff-DyYmQMSA.css +0 -1
- package/dist/client/assets/resizable-columns-C7ygvLt8.css +0 -1
- package/dist/client/assets/resolve-panes-wzGu9d8o.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-C8SOo5oZ.js +0 -1
- package/dist/client/assets/right-9rMRZN_r.js +0 -1
- package/dist/client/assets/right-BHZq648O.js +0 -1
- package/dist/client/assets/right-BNJzCaH9.js +0 -2
- package/dist/client/assets/right-CAd7lTvY.js +0 -1
- package/dist/client/assets/right-Cc57bCTW.js +0 -1
- package/dist/client/assets/right-DY49Prjj.js +0 -1
- package/dist/client/assets/right-DfU47xKY.js +0 -1
- package/dist/client/assets/right-Dr7vxdZl.js +0 -1
- package/dist/client/assets/right-DsE4aR3A.js +0 -1
- package/dist/client/assets/right-zlkRjnkv.js +0 -1
- package/dist/client/assets/rocket-BahsdUe6.js +0 -1
- package/dist/client/assets/router-CJIx83Ia.js +0 -1
- package/dist/client/assets/runtime-picker-C3JwrDKP.css +0 -1
- package/dist/client/assets/runtime-picker-IRcTkMZ5.js +0 -1
- package/dist/client/assets/scope-views-4khCg2_z.css +0 -1
- package/dist/client/assets/scope-views-KDtZoLUC.js +0 -1
- package/dist/client/assets/scout-voice-Cdh6pCsb.js +0 -1
- package/dist/client/assets/scoutbot-Bk3nyrkj.js +0 -3
- package/dist/client/assets/scoutbot-markdown-7PRQHaAc.js +0 -6
- package/dist/client/assets/scroll-text-CA0QxBHu.js +0 -1
- package/dist/client/assets/search-Bv2IONmc.js +0 -1
- package/dist/client/assets/secondaryNavConfig-Bmb-oRvD.js +0 -1
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +0 -1
- package/dist/client/assets/selection-bridge-CthAuPRw.js +0 -1
- package/dist/client/assets/send-horizontal-_Tf_It04.js +0 -1
- package/dist/client/assets/send-to-agent-session-CWDHHgFB.js +0 -1
- package/dist/client/assets/server-U_l8A83n.js +0 -1
- package/dist/client/assets/session-catalog-Dx4tl3sx.js +0 -1
- package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +0 -1
- package/dist/client/assets/session-recap-queue-GeicPLsQ.js +0 -1
- package/dist/client/assets/session-ref-lookup-state-SATH_jAP.js +0 -1
- package/dist/client/assets/session-table-BI62J4NP.js +0 -1
- package/dist/client/assets/sessionRead-CvFz2RHv.js +0 -1
- package/dist/client/assets/sessions-view-lGMwwZY7.js +0 -1
- package/dist/client/assets/settings-bo9X410k.js +0 -1
- package/dist/client/assets/shared-work-artifacts-DfNl9KTo.js +0 -1
- package/dist/client/assets/sliders-horizontal-CPSx6wd2.js +0 -1
- package/dist/client/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png +0 -0
- package/dist/client/assets/sparkles-Br-bA2aZ.js +0 -1
- package/dist/client/assets/sprout-action-sprite-DZ8C0fTl.css +0 -1
- package/dist/client/assets/sprout-actions-proof-v1-BzUdc812.png +0 -0
- package/dist/client/assets/sse-BVxO0zNp.js +0 -1
- package/dist/client/assets/status-tone-BM_zuRy1.js +0 -1
- package/dist/client/assets/surface-activity-B1rgWB1i.js +0 -1
- package/dist/client/assets/synthetic-agent-routing-aduMYO7P.js +0 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +0 -1
- package/dist/client/assets/tail-display-DHSNmvor.js +0 -2
- package/dist/client/assets/tail-events-C6NWFB1N.js +0 -1
- package/dist/client/assets/terminal-DMBAZjPP.js +0 -1
- package/dist/client/assets/terminal-relay-CpGHpDa8.js +0 -1
- package/dist/client/assets/terminal-screen-Bpb2SZrn.css +0 -1
- package/dist/client/assets/terminal-sessions-3RfJpen8.js +0 -1
- package/dist/client/assets/terminal-takeover-CXwdoZ5j.js +0 -1
- package/dist/client/assets/theme-vars-DNK0nn3k.js +0 -1
- package/dist/client/assets/time-Dhsh_2EG.js +0 -1
- package/dist/client/assets/triangle-alert-BZikHKuT.js +0 -1
- package/dist/client/assets/types-B0PlfpKc.js +0 -1
- package/dist/client/assets/ui-LM8pS8qE.js +0 -1
- package/dist/client/assets/use-beside-DopIbJwf.js +0 -1
- package/dist/client/assets/use-conversation-list-CGtcpdPd.js +0 -1
- package/dist/client/assets/use-fleet-active-asks-DAHOPYPV.js +0 -1
- package/dist/client/assets/use-mesh-node-state-BlWIPTc4.js +0 -1
- package/dist/client/assets/use-mesh-ops-items-pKWBro7o.js +0 -1
- package/dist/client/assets/use-reduced-motion-DkdIQBwh.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-CduUFb7l.js +0 -1
- package/dist/client/assets/useAgentHoverCard-DNlXPYQf.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-LJGNYG3U.js +0 -1
- package/dist/client/assets/useEmbedHeadline-BeeBDb7E.js +0 -1
- package/dist/client/assets/usePierreRuntime-DUXZ-DTK.js +0 -50
- package/dist/client/assets/useSidebarCollapse-DoMvU_2R.js +0 -1
- package/dist/client/assets/users-BQPEIUfd.js +0 -1
- package/dist/client/assets/voice-levels-Dcr3jglk.js +0 -1
- package/dist/client/assets/voice-paths-CJUuBPh3.css +0 -1
- package/dist/client/assets/voice-turn-DftA0iIb.css +0 -1
- package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +0 -1
- package/dist/client/assets/worker-rendered-v1-DmGVMlVi.png +0 -0
- package/dist/client/assets/worker-thinking-v1-ujakpzrK.png +0 -0
- package/dist/client/assets/worker-waiting-v1-DbTSsfJJ.png +0 -0
- package/dist/client/assets/worker-working-v1-BROAvJ_z.png +0 -0
- package/dist/client/assets/world-outposts-v1-DOt0i98W.png +0 -0
- package/dist/client/assets/wrench-C-wjicn5.js +0 -1
- package/dist/client/assets/x-BcfhXYiF.js +0 -1
- package/dist/client/assets/xterm-qXD45dc0.js +0 -34
- package/dist/client/assets/zap-BqL8ttGz.js +0 -1
- package/dist/client/characters/sage/sage.glb +0 -0
- package/dist/highlights-eq9cgrbb.scm +0 -604
- package/dist/highlights-ghv9g403.scm +0 -205
- package/dist/highlights-hk7bwhj4.scm +0 -284
- package/dist/highlights-r812a2qc.scm +0 -150
- package/dist/highlights-x6tmsnaa.scm +0 -115
- package/dist/injections-73j83es3.scm +0 -27
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as j,j as t}from"./index-BFbLvCJn.js";import{FloorSavedWork as z}from"./FloorSavedWork-BDOvV3mA.js";import{f as d}from"./agent-floor-actor-DW8zLht0.js";import{b as y,F as _,a as b,f as M}from"./agent-floor-world-layout-hfMjuoui.js";import{f as F}from"./floor-context-model-rWKqaKmV.js";import{l as h}from"./agent-lanes-model-DMAdqCmK.js";import{t as A}from"./time-Dhsh_2EG.js";/* empty css */import{c as S}from"./createLucideIcon-CKbjXlwv.js";import{C as g}from"./chevron-down-DEDSNJNY.js";import{C as T}from"./chevron-up-CzveykKG.js";import{P as E}from"./play-N5-hnPCV.js";import{P as D}from"./pause-7mmEEvVx.js";import{T as W}from"./triangle-alert-BZikHKuT.js";import{A as H}from"./arrow-up-right-DUW1A1Hb.js";import"./pin-q_0gAA6i.js";import"./x-BcfhXYiF.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./terminal-sessions-3RfJpen8.js";import"./api-DSqpVKC7.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./agent-state-DDhnFEEP.js";const L=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],P=S("radar",L),k={home:"Crew",tools:"Execution",edit:"Build",message:"Comms"};function pt({berths:O,allLanes:r,lanes:m,now:i,selectedId:x,sheetOpen:N,motionPaused:c,onPause:C,onRoom:$,onActor:l}){const[n,R]=j.useState(!0),[p,f]=j.useState(!1),a=r.filter(e=>["attention","blocked"].includes(d(e,i).posture)),u=F(r,i,["tool","message","ask"]).slice(0,4);return t.jsxs(t.Fragment,{children:[t.jsxs("aside",{className:"floor-tactical floor-tactical__radar","aria-label":"Tactical overview",children:[t.jsx("header",{children:t.jsxs("button",{type:"button",className:"floor-tactical__radar-toggle","aria-expanded":n,onClick:()=>R(!n),children:[t.jsx(P,{size:14}),"Sector radar ",n?t.jsx(g,{size:13}):t.jsx(T,{size:13})]})}),n?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"floor-tactical__map","aria-label":"Current sector rooms",children:[Object.keys(y).map(e=>{const s=y[e],o=m.filter(v=>d(v,i).station===e).length;return t.jsx("button",{type:"button",className:`floor-tactical__room${o?" is-occupied":""}`,style:{left:`${s.x/b*100}%`,top:`${s.y/_*100}%`},"aria-label":`Open ${k[e]} sheet from radar, ${o} actors`,onClick:()=>$(e),children:t.jsx("span",{children:k[e]})},e)}),m.map(e=>{const s=d(e,i),o=M(s.station,O[e.id]??0);return t.jsx("button",{type:"button",className:`floor-tactical__dot is-${s.posture}${x===e.id?" is-selected":""}`,style:{left:`${o.x/b*100}%`,top:`${o.y/_*100}%`},"aria-label":`Locate ${h(e.agent,e.source)} ${e.id.slice(-5)}`,onClick:()=>l(e)},e.id)})]}),t.jsxs("p",{children:[m.length," in sector · ",r.length," in fleet"]})]}):null,t.jsxs("button",{type:"button",className:"floor-tactical__motion","aria-pressed":c,onClick:C,children:[c?t.jsx(E,{size:13}):t.jsx(D,{size:13}),c?"Resume scene motion":"Pause scene motion"]}),t.jsx(z,{lanes:r,selected:r.find(e=>e.id===x)??null,onActor:l}),c?t.jsx("small",{className:"floor-tactical__paused",children:"Motion paused · data stays live"}):null]}),N?null:t.jsxs("aside",{className:"floor-tactical floor-tactical__activity","aria-label":"Fleet activity and attention",children:[t.jsxs("button",{type:"button",className:`floor-tactical__attention${a.length?" has-attention":""}`,"aria-expanded":p,onClick:()=>f(!p),children:[t.jsx(W,{size:14}),t.jsx("span",{children:a.length?`${a.length} need attention`:"No attention signals"}),t.jsx(g,{size:13})]}),p?t.jsx("div",{className:"floor-tactical__attention-list",children:a.length?a.map(e=>t.jsxs("button",{type:"button",onClick:()=>{f(!1),l(e)},children:[t.jsx("strong",{children:h(e.agent,e.source)}),t.jsxs("small",{children:[e.id.slice(-5)," · ",d(e,i).label]})]},e.id)):t.jsx("p",{children:"No blocked or needs-attention actors reported in this fleet."})}):null,t.jsxs("h3",{children:["Recent activity ",t.jsx("span",{children:"15m"})]}),u.length?u.map(({lane:e,event:s,at:o})=>t.jsxs("button",{className:"floor-tactical__activity-item",type:"button",onClick:()=>l(e),children:[t.jsxs("span",{children:[t.jsx("strong",{children:s.kind==="tool"?s.tool||"Tool":s.kind==="ask"?"Request":"Message"}),t.jsx("time",{children:A(o,i)})]}),t.jsxs("span",{children:[t.jsxs("small",{children:[h(e.agent,e.source)," · ",e.id.slice(-5)]}),t.jsx(H,{size:11})]})]},`${e.id}:${s.id}`)):t.jsx("p",{className:"floor-tactical__empty",children:"No recent events."})]})]})}export{pt as FloorTacticalHUD};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,j as r}from"./index-BFbLvCJn.js";import{a as h}from"./api-DSqpVKC7.js";import{t as p,r as c,m as g}from"./follow-route-BvcGtBIL.js";import{s as l}from"./router-CJIx83Ia.js";/* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.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 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./index-BFbLvCJn.js";function p(i){const o=i?.trim().toLowerCase();if(!o)return"unknown";const r=o.replace(/[\s(].*$/,"").replace(/[_-].*$/,""),t={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",devin:"devin",cognition:"devin",swe:"devin",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 t[r]??t[o.replace(/[\s(].*$/,"")]??o}const g={claude:"Claude",codex:"Codex",grok:"Grok",kimi:"Kimi",devin:"Devin",gemini:"Gemini",cursor:"Cursor",github:"GitHub",opencode:"OpenCode",amp:"Amp",pi:"Pi",claw:"Claw",native:"Native",worker:"Worker",quad:"Quad"};function m(i){const o=p(i);return g[o]??(i?.trim()||"Unknown")}const n={fill:{fill:"currentColor"},line:{fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},c={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"},l=i=>e.jsx("path",{d:i,fill:"currentColor"}),v={devin:{viewBox:"0 0 1400 1600",paths:["M6.0724,539.4025V210.1092c.0001-14.4719,7.7208-27.8445,20.2538-35.0804L311.4249,10.427c12.533-7.236,27.9744-7.236,40.5074,0l285.0989,164.6019c12.533,7.2359,20.2537,20.6085,20.2537,35.0804v168.1715c1.2505,55.8821,30.7856,109.7814,82.7306,139.7719,51.945,29.9905,113.3907,28.6189,162.4117,1.7606l145.6404-84.0855c12.533-7.2359,27.9744-7.2359,40.5074,0l285.0989,164.6019c12.533,7.2359,20.2537,20.6085,20.2537,35.0804v329.2037c0,14.4719-7.7206,27.8445-20.2536,35.0804l-285.0989,164.6019c-12.533,7.2359-27.9744,7.236-40.5074,0l-144.4618-83.4051c-49.2104-27.4815-111.2175-29.1254-163.5765,1.104-51.9443,29.9901-81.4793,83.8883-82.7305,139.7699v168.1257c0,14.4719-7.7207,27.8445-20.2537,35.0804l-285.0989,164.6019c-12.533,7.2359-27.9744,7.2359-40.5074,0L26.3399,1424.9711c-12.533-7.236-20.2537-20.6085-20.2537-35.0804v-329.2038c.0001-14.4719,7.7208-27.8445,20.2538-35.0804l285.0988-164.6019c12.533-7.236,27.9744-7.236,40.5074,0l145.9702,84.276c48.9621,26.6706,110.2347,27.967,162.0542-1.951,52.359-30.2296,81.9388-84.7522,82.7443-141.1106-1.2502-55.8826-30.7855-115.5579-82.7306-145.5484-51.945-29.9905-113.3905-28.6192-162.4113-1.7608l-146.31,84.9496c-12.5874,7.3084-28.1283,7.3017-40.7093-.0178L26.2098,574.4156c-12.4675-7.2533-20.1375-20.5892-20.1374-35.0131Z"]},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"]}},k=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"}),C=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"})]}),j=e.jsxs("g",{...n.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",{...n.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",{...n.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",{...n.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",{...n.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:l(c.claude),codex:k,kimi:C,gemini:l(c.gemini),cursor:l(c.cursor),github:l(c.github),opencode:l(c.opencode),pi:j,native:w,worker:M,quad:y,claw:f};function G({harness:i,size:o=14,className:r,style:t,title:h}){const a=p(i),s=v[a],x=b[a],d=h===null?void 0:h??m(i);return e.jsx("span",{className:r,style:t,title:d,"aria-hidden":d?void 0:!0,children:e.jsx("svg",{viewBox:s?.viewBox??"0 0 24 24",width:o,height:o,style:{display:"block"},role:"img","aria-label":d,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,m as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as e}from"./index-BFbLvCJn.js";import{H as L,h as pe}from"./HarnessMark-CP-PWk2W.js";import{p as me,a as Z}from"./api-DSqpVKC7.js";import{b as fe}from"./router-CJIx83Ia.js";import{n as S,t as J,f as O}from"./time-Dhsh_2EG.js";import{u as ge}from"./Provider-BEXAZWd9.js";import{u as xe}from"./useContentSecondaryNav-LJGNYG3U.js";import{OpsSubnav as be}from"./OpsSubnav-CjMVj7Sk.js";/* empty css */import{R as ve}from"./refresh-cw-BcqctLqo.js";import{E as Y}from"./external-link-Df1R34rX.js";import{c as je}from"./createLucideIcon-CKbjXlwv.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./theme-vars-DNK0nn3k.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./SecondaryNav-1FjBDWuY.js";import"./secondaryNavConfig-Bmb-oRvD.js";import"./nav-destinations-B3R5zxFX.js";import"./message-square-BwqBIfv5.js";import"./terminal-DMBAZjPP.js";import"./compass-EmGkpxIe.js";import"./settings-bo9X410k.js";import"./git-branch-C45vy8qT.js";import"./scroll-text-CA0QxBHu.js";/* empty css */const ke=[["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"}]],ye=je("clipboard-paste",ke),D=60*6e4,N=24*D,Ne=["product_judgment","large_context_synthesis","adversarial_critique","evidence_inventory","implementation","code_review"],V={fable:j("Fable 5","claude","claude","claude-fable-5","max","Fable","Premium product taste, rapid design iterations, and premise-level critique.","Uses the premium shared Claude allowance; do not spend it on routine mechanical work."),sol:j("GPT-5.6 Sol","codex","codex","gpt-5.6-sol","xhigh",null,"Load-bearing coding, debugging, integration, and technically grounded judgment.","Highest Codex tier; reserve deep turns for work where failure is expensive."),grok:j("Grok 4.6","grok","grok","grok-4.6",null,"Grok","Independent assumption checking, deletion pressure, and adversarial critique.","Do not make it the sole implementation authority; verify conclusions against repository evidence."),kimi:j("Kimi Code","kimi","kimi",null,null,"Kimi","Dense repository and study synthesis through the native Kimi harness.","The harness owns the concrete model and quota telemetry can be stale; probe before large fan-out."),opus:j("Opus 5","claude","claude","claude-opus-5","high","Opus","Long-context synthesis, nuanced architecture, and coherent product reasoning.","Premium shared Claude quota; avoid routine scans and repetitive verification."),glm:j("GLM-5.2","opencode","opencode","opencode-go/glm-5.2",null,"OpenCode","Independent broad-context synthesis through OpenCode.","OpenCode quota is not visible in Scout; use a bounded canary before scaling."),terra:j("GPT-5.6 Terra","codex","codex","gpt-5.6-terra","high",null,"Balanced implementation, correctness review, and technical critique.","Prefer Sol for the hardest integration boundary when its additional spend is justified."),minimax:j("MiniMax M3","minimax","opencode","opencode-go/minimax-m3",null,"OpenCode","Cost-effective structured evidence collection and comparison.","Verify load-bearing conclusions with a stronger reviewer before acceptance."),luna:j("GPT-5.6 Luna","codex","codex","gpt-5.6-luna","medium",null,"Inexpensive source mapping, test enumeration, and mechanical audit work.","Keep it out of sole high-stakes product judgment and final acceptance."),haiku:j("Haiku 4.5","claude","claude","claude-haiku-4-5","low",null,"Fast narrow scans and classification inside the Claude harness.","Lighter reasoning and a smaller context window make broad synthesis a poor fit."),sonnet:j("Sonnet 4.6","claude","claude","claude-sonnet-4-6","high",null,"Strong generalist implementation with a large context window.","Shares Claude's provider allowance and can become a poor choice when that pool is guarded."),deepseek:j("DeepSeek V4 Pro","opencode","opencode","opencode-go/deepseek-v4-pro",null,"OpenCode","Code-centric review through an independent model lineage.","Quota is opaque and findings should not be the sole acceptance authority.")},ee={product_judgment:{label:"Product judgment",objective:"Strategic tradeoffs, UX prioritization, scope shaping, and high-level product decisions.",strategy:"Select models with high nuanced taste, product-level synthesis, and clear communication of architectural tradeoffs.",candidates:[b("fable",100,"Unmatched product taste, rapid design iteration synthesis, and high-fidelity UX direction."),b("sol",87,"Technically grounded product decisions with strong execution realism."),b("grok",82,"Unfiltered perspective on feature bloat and aggressive scope reduction.")]},large_context_synthesis:{label:"Large-context synthesis",objective:"Repository-wide investigations, deep architectural archaeology, and multi-file code synthesis.",strategy:"Select models with expansive effective context windows and high-density information compression.",candidates:[b("kimi",100,"Native long-context retrieval and dense codebase relationship synthesis."),b("opus",91,"Deep structural understanding across complex multi-package repositories."),b("glm",84,"Independent wide-window scanning and structural cross-referencing.")]},adversarial_critique:{label:"Adversarial critique",objective:"Challenging design assumptions, rapid design iteration critique, identifying UX/logic gaps, and applying deletion pressure.",strategy:"Select high-taste and contrarian model lineages that stress-test design iterations and probe corner cases without sycophantic approval.",candidates:[b("fable",100,"High-fidelity design critique, rapid UX/visual iteration stress-testing, and premise challenge."),b("grok",91,"Contrarian perspective, uncompromising edge-case discovery, and aggressive premise challenge."),b("terra",84,"Rigorous technical inspection of code correctness and runtime invariants.")]},evidence_inventory:{label:"Evidence inventory",objective:"Grep and AST inventory, reference tracing, log audit, and structured fact collection.",strategy:"Select fast, cost-effective models with high precision on structured evidence gathering.",candidates:[b("minimax",100,"Fast, cost-effective structured evidence indexing and pattern enumeration."),b("luna",95,"Low-latency source tracing, test inventory, and reference mapping."),b("haiku",87,"Rapid mechanical file scans and categorization.")]},implementation:{label:"Implementation",objective:"Code creation, refactoring, type checking, unit test writing, and bug fixing.",strategy:"Select code-generation champions with high instruction following and strong language typing skills.",candidates:[b("sol",100,"Deep technical accuracy, robust multi-file refactors, and complex logic execution."),b("terra",91,"Reliable structured implementation with strong type-system adherence."),b("sonnet",87,"Strong generalist coding with fast turn times and clear explanations.")]},code_review:{label:"Code review",objective:"Diff analysis, security audit, regression detection, and style conformity.",strategy:"Select models with high sensitivity to subtle bugs, invariant violations, and edge-case behaviors.",candidates:[b("terra",100,"Strict invariant checking, subtle logic flaw detection, and boundary test coverage."),b("opus",96,"High-level architectural consistency and API surface evolution review."),b("deepseek",87,"Independent second-opinion review focused on code-level edge cases.")]}};function $(s){return s.availability==="constrained"||s.availability==="guarded"||s.minimumRemainingPercent!==null&&s.minimumRemainingPercent<=20||s.pacing==="ahead"&&(s.minimumRemainingPercent??100)<=35}function se(s){return s.confidence==="fresh"&&s.minimumRemainingPercent!==null&&!$(s)}function Re(s){return $(s)?s.minimumRemainingPercent!==null&&s.minimumRemainingPercent<=15?`${s.providerLabel} is near capacity (${s.minimumRemainingPercent}% remaining). High risk of quota exhaustion.`:s.pacing==="ahead"?`${s.providerLabel} consumption rate exceeds window pace with limited buffer.`:`${s.providerLabel} quota availability is ${s.availability}. Failover recommended.`:null}function k(s){return[s.providerId,s.harness,s.model,s.effort,s.profile].join("|")}function we(s){return[s.profile?`profile ${s.profile}`:s.harness,s.model,s.effort].filter(Boolean).join(" / ")}function Se(s,n="<request>"){const a=s.profile?.trim().toLowerCase()??null,t=a!=="opencode"&&a!=="oc",i=s.profile&&t?["--profile",s.profile]:["--harness",s.harness,...s.model?["--model",s.model]:[]];return s.effort&&i.push("--effort",s.effort),i.push(n),i}function B(s,n="<request>"){return["scout","ask",...Se(s,n)].map(De).join(" ")}function qe(s,n={}){const a=ne(n.now)??Date.now(),t=n.bias??"balanced",i=Le(t),o=new Map(s.providers.map(h=>[h.id,Ce(h,a)])),r=n.role?[n.role]:[...Ne],c=r.map(h=>{const u=ee[h],d=u.candidates.map(f=>{const g=o.get(f.route.providerId)??ae(f.route.providerId);return{runtime:f,quota:g,score:f.fit+Pe(g,a)*i}}).sort((f,g)=>g.score-f.score||g.runtime.fit-f.runtime.fit),p=d[0],x=$(p.quota),v=d.slice(1);return x&&v.sort((f,g)=>{const q=K(f,p.runtime.route.providerId),T=K(g,p.runtime.route.providerId);return q-T||g.score-f.score||g.runtime.fit-f.runtime.fit}),{role:h,roleLabel:u.label,modelLabel:p.runtime.label,route:p.runtime.route,score:p.score,fit:p.runtime.fit,objective:u.objective,taskRationale:p.runtime.taskRationale,capability:p.runtime.capability,caution:p.runtime.caution,assertion:Ie(p.quota),quotaRisk:x,quotaRiskMessage:Re(p.quota),quota:p.quota,alternatives:v.slice(0,2).map(({runtime:f,quota:g,score:q})=>({label:f.label,route:f.route,score:q,fit:f.fit,capability:f.capability,caution:f.caution,taskRationale:f.taskRationale,quotaRisk:$(g),quota:g}))}}),l=$e(r,o,a);return{generatedAt:s.generatedAt,generatedAtLocal:s.generatedAtLocal,evaluatedAt:a,assignments:c,models:l,bias:t}}function $e(s,n,a){const t=new Map;for(const i of s){const o=ee[i];for(const r of o.candidates){const c=k(r.route),l=t.get(c);l?l.roles.push({role:i,label:o.label}):t.set(c,{runtime:r,roles:[{role:i,label:o.label}]})}}return[...t.values()].map(({runtime:i,roles:o})=>{const r=n.get(i.route.providerId)??ae(i.route.providerId);return{modelLabel:i.label,route:i.route,roles:o,strengths:[i.capability],cautions:[i.caution],guidance:Ae(r,a),quotaRisk:$(r),quota:r}})}function Ce(s,n){const a=s.windows.filter(h=>!/^video\b/iu.test(h.label)).map(h=>Me(h,n)),t=[...a].sort((h,u)=>h.percentRemaining-u.percentRemaining)[0]??null,i=a.filter(h=>h.paceRatio!==null).sort((h,u)=>u.paceRatio-h.paceRatio)[0]??null,o=a.map(h=>h.confidence),r=o.includes("stale")?"stale":o.includes("fresh")?"fresh":"unknown",c=[...a].filter(h=>h.resetAt!==null&&h.resetAt>n).sort((h,u)=>h.resetAt-u.resetAt)[0]??null,l=t?.percentRemaining??null;return{providerId:s.id,providerLabel:s.label,plan:s.plan,availability:Oe(l),pacing:i?.status??"unknown",confidence:r,minimumRemainingPercent:l,bindingWindow:t?.label??null,nextResetAt:c?.resetAt??null,nextResetIn:c?.resetIn??"",windows:a}}function Me(s,n){const a=ne(s.windowMs)??Te(s.label,s.resetAt),t=a!==null&&s.resetAt!==null?X(Fe(100-(s.resetAt-n)/a*100,0,100)):null,i=t!==null&&t>=1?Ee(s.usedPercent/t):null,o=i===null?null:X(i*100),r=_e(s.usedPercent,t,i),c=a===null?N:Math.min(N,Math.max(D,a/4)),l=s.freshness.ageMs===null?"unknown":s.freshness.ageMs>c?"stale":"fresh";return{label:s.label,usedPercent:s.usedPercent,percentRemaining:s.percentRemaining,durationMs:a,elapsedPercent:t,paceRatio:i,projectedUsedPercent:o,status:r,resetAt:s.resetAt,resetIn:s.resetIn,freshness:s.freshness.label,confidence:l}}function j(s,n,a,t,i,o,r,c){return{label:s,route:{providerId:n,harness:a,model:t,effort:i,profile:o},capability:r,caution:c}}function b(s,n,a){return{...V[s],fit:n,taskRationale:a??V[s].capability}}function Ae(s,n){return $(s)?"conserve":s.confidence!=="fresh"?"probe_first":s.availability==="constrained"?"conserve":s.nextResetAt!==null&&s.nextResetAt>n&&s.nextResetAt-n<=N&&s.pacing!=="ahead"&&(s.minimumRemainingPercent??0)>=10?"use_now":s.availability==="guarded"?"conserve":s.pacing==="ahead"?"use_deliberately":s.availability==="abundant"&&s.pacing==="underused"?"use_now":"available"}function Le(s){switch(s){case"capability":return .25;case"quota":return 1.75;case"balanced":return 1}}function Pe(s,n){let a=0;switch(s.availability){case"abundant":a+=10;break;case"available":a+=5;break;case"guarded":a-=5;break;case"constrained":a-=30;break;case"unknown":a-=2;break}return s.pacing==="underused"&&(a+=5),s.pacing==="ahead"&&(a-=8),s.confidence==="stale"&&(a-=8),s.confidence==="unknown"&&(a-=3),s.pacing==="underused"&&s.nextResetAt!==null&&s.nextResetAt>n&&s.nextResetAt-n<=2*N&&(a+=3),a}function Ie(s){if(s.minimumRemainingPercent===null)return`${te(s.providerId)} quota telemetry unavailable; use a bounded canary before scaling.`;const n=s.pacing==="on_track"?"usage tracks elapsed time":s.pacing==="underused"?"usage trails elapsed time":s.pacing==="ahead"?"usage exceeds elapsed time":"pace unknown",a=s.nextResetIn?` · next reset ${s.nextResetIn}`:"";return`${Ue(s.minimumRemainingPercent)} minimum remaining · ${n} · telemetry ${s.confidence}${a}.`}function ae(s){return{providerId:s,providerLabel:te(s),plan:null,availability:"unknown",pacing:"unknown",confidence:"unknown",minimumRemainingPercent:null,bindingWindow:null,nextResetAt:null,nextResetIn:"",windows:[]}}function Te(s,n){const a=s.trim().toLowerCase(),t=a.match(/(?:^|\s)(\d+(?:\.\d+)?)([hd])$/u);if(t){const i=Number(t[1]);return t[2]==="h"?i*D:i*N}if(a==="weekly"||a==="week"||a==="7-day")return 7*N;if(a==="5-hour")return 5*D;if(a==="monthly"||a==="month"){if(n===null)return 30*N;const i=new Date(n),o=new Date(n);o.setUTCMonth(o.getUTCMonth()-1);const r=i.getTime()-o.getTime();return r>0?r:30*N}return null}function _e(s,n,a){if(n===null||a===null)return"unknown";const t=s-n;return a>1.1&&t>3?"ahead":a<.7&&t<-10?"underused":"on_track"}function Oe(s){return s===null?"unknown":s>=60?"abundant":s>=30?"available":s>=15?"guarded":"constrained"}function K(s,n){const a=se(s.quota),t=s.runtime.route.providerId!==n;return a&&t?0:a?1:t?2:3}function De(s){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(s)?s:`'${s.replaceAll("'",`'"'"'`)}'`}function te(s){return s.split(/[-_\s]+/u).filter(Boolean).map(n=>`${n.charAt(0).toUpperCase()}${n.slice(1)}`).join(" ")||"Unknown"}function Ue(s){return`${Number.isInteger(s)?s.toFixed(0):s.toFixed(1)}%`}function ne(s){return typeof s=="number"&&Number.isFinite(s)?s:null}function X(s){return Math.round(s*10)/10}function Ee(s){return Math.round(s*100)/100}function Fe(s,n,a){return Math.min(a,Math.max(n,s))}const Ge=3e4,M=[{value:"capability",label:"Capability"},{value:"balanced",label:"Balanced"},{value:"quota",label:"Quota"}],Be={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"},ie=[{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"}]}],He={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"}]},ze={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 Qe({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 n=(s??"").trim().toLowerCase();return n?n.includes("claude")?"claude":n.includes("codex")?"codex":n.includes("cursor")?"cursor":n.includes("kimi")||n.includes("moonshot")?"kimi":n.includes("minimax")?"minimax":n.includes("github")?"github":n.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown":"unknown"}function P(s){return Be[s]??pe(s)}function We(s){switch(s){case"weekly":return"7d";case"req/h":return"1h";default:return s||"quota"}}function I(s){return s.windows&&s.windows.length>0?s.windows:[{label:We(s.unitLabel),fill:s.fill,usedLabel:s.usedLabel,capLabel:s.capLabel,unitLabel:s.unitLabel,resetAt:s.resetAt}]}function Ve(s){return s.capLabel==="100%"&&s.usedLabel.endsWith("%")?s.usedLabel:`${s.usedLabel}/${s.capLabel}`}function re(s){return s>=.9?"err":s>=.75?"warn":"ok"}function Ke(s,n=30){const a=s??[];if(a.length<=n)return a;if(n<=1)return[a[a.length-1]];const t=(a.length-1)/(n-1);return Array.from({length:n},(i,o)=>a[Math.round(o*t)])}function H(s){const n=Math.floor((s-Date.now())/1e3),a=n<0,t=Math.abs(n);let i;if(t>=86400){const o=Math.floor(t/86400),r=Math.floor(t%86400/3600);i=r>0?`${o}d ${r}h`:`${o}d`}else if(t>=3600){const o=Math.floor(t/3600),r=Math.floor(t%3600/60);i=r>0?`${o}h ${r}m`:`${o}h`}else i=`${Math.max(1,Math.floor(t/60))}m`;return a?`stale ${i}`:i}function Xe(s){if(!s)return null;const n=S(s.capturedAt);if(n)return n;if(s.kind!=="quota")return null;const a=I(s).reduce((t,i)=>{const o=S(i.capturedAt);return Math.max(t??0,o??0)||t},null);return a||I(s).flatMap(t=>t.history??[]).reduce((t,i)=>{const o=S(i.capturedAt);return Math.max(t??0,o??0)||t},null)}function Ze({provider:s,onImported:n}){const[a,t]=m.useState(!1),[i,o]=m.useState(""),[r,c]=m.useState(!1),[l,h]=m.useState(null),u=`hs-${s}-dashboard-capture`,d=P(s);if(!a)return e.jsxs("button",{type:"button",className:"hs-dashboard-capture-trigger",onClick:()=>t(!0),children:[e.jsx(ye,{size:12,"aria-hidden":"true"}),"Import dashboard"]});const p=async x=>{if(x.preventDefault(),!(!i.trim()||r)){c(!0),h(null);try{await Z("/api/service-budgets/dashboard-import",{method:"POST",body:JSON.stringify({provider:s,text:i})}),o(""),h("Usage snapshot imported."),await n()}catch(v){h(v instanceof Error?v.message:String(v))}finally{c(!1)}}};return e.jsxs("form",{className:"hs-dashboard-capture",onSubmit:x=>{p(x)},children:[e.jsxs("label",{htmlFor:u,children:[d," 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:u,value:i,onChange:x=>o(x.target.value),maxLength:128*1024,rows:5,placeholder:s==="cursor"?"Date (UTC),Type,Model,Tokens,Cost…":"Weekly SuperGrok… Limit · 12% used · Resets…","aria-describedby":l?`${u}-message`:void 0}),l?e.jsx("span",{id:`${u}-message`,className:"hs-dashboard-capture-message",role:"status",children:l}):null,e.jsxs("div",{className:"hs-dashboard-capture-actions",children:[e.jsx("button",{type:"button",onClick:()=>{t(!1),h(null)},disabled:r,children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!i.trim()||r,children:r?"Importing…":"Use snapshot"})]})]})}function Je(s){const n=new Map(s.map(a=>[F(a.id),a]));return ie.map(({id:a})=>({id:a,label:P(a),gauge:n.get(a)??null}))}function Ye({points:s}){const n=Ke(s);return n.length===0?e.jsx("span",{className:"hs-history hs-history-empty",children:"live"}):e.jsx("span",{className:"hs-history","aria-label":`${n.length} budget samples`,children:n.map((a,t)=>{const i=Math.max(.06,Math.min(1,a.fill));return e.jsx("span",{className:`hs-history-bar hs-history-bar--${re(a.fill)}`,style:{height:`${Math.round(i*100)}%`},title:`${O(a.capturedAt)||"unknown"} ${a.usedLabel}`},`${a.capturedAt}:${t}`)})})}function es({gauge:s,window:n}){const a=Math.max(0,Math.min(100,Math.round(n.fill*100))),t=100-a,i=re(n.fill),o=Number.isFinite(n.resetAt)?new Date(n.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:[n.label," window"]}),e.jsxs("strong",{className:`hs-subscription-usage hs-subscription-usage--${i}`,children:[a,"% used"]})]}),e.jsxs("div",{className:"hs-subscription-remaining",children:[e.jsxs("strong",{children:[t,"%"]}),e.jsx("span",{children:"available"})]})]}),e.jsx("div",{className:"hs-subscription-meter",role:"progressbar","aria-label":`${s.label} ${n.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:e.jsx("span",{className:`hs-subscription-meter-fill hs-subscription-meter-fill--${i}`,style:{width:`${a}%`}})}),e.jsxs("div",{className:"hs-subscription-window-meta",children:[e.jsxs("span",{children:[Ve(n)," ",n.unitLabel==="quota"?"quota":n.unitLabel]}),e.jsxs("span",{children:["resets in ",H(n.resetAt),o?e.jsx("time",{dateTime:o,title:O(n.resetAt)||void 0,children:` · ${O(n.resetAt)||""}`}):null]})]}),e.jsx(Ye,{points:n.history})]})}function ss(){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 as(s,n,a){const t=s.flatMap(i=>{if(i.kind!=="quota")return[];const o=I(i).map(r=>{const c=S(r.capturedAt??i.capturedAt),l=Math.round(Math.max(0,Math.min(1,r.fill))*1e3)/10;return{label:r.label,usedPercent:l,percentRemaining:Math.round((100-l)*10)/10,windowMs:r.windowMs??null,resetAt:S(r.resetAt),resetIn:Number.isFinite(r.resetAt)?H(r.resetAt):"",freshness:{ageMs:c?Math.max(0,a-c):null,label:c?J(c)||"now":"unknown"}}});return[{id:F(i.id),label:P(F(i.id)),plan:i.plan??null,windows:o}]});return{generatedAt:n,generatedAtLocal:O(n)||"now",providers:t}}function U(s){switch(s){case"underused":return"usage trails elapsed time";case"on_track":return"usage tracks elapsed time";case"ahead":return"usage exceeds elapsed time";default:return"pace unknown"}}function A(s){return we(s)}function z({text:s,label:n="Copy rule"}){const[a,t]=m.useState("idle");m.useEffect(()=>{if(a==="idle")return;const o=window.setTimeout(()=>t("idle"),1800);return()=>window.clearTimeout(o)},[a]);const i=m.useCallback(async()=>{if(typeof navigator>"u"||!navigator.clipboard){t("failed");return}try{await navigator.clipboard.writeText(s),t("copied")}catch{t("failed")}},[s]);return e.jsx("button",{type:"button",className:"hs-advisor-dispatch-copy",onClick:()=>{i()},"aria-live":"polite","aria-atomic":"true",children:a==="copied"?"Copied!":a==="failed"?"Copy failed":n})}function G(s,n){return!!(s.quotaRisk&&n&&!n.quotaRisk&&se(n.quota)&&n.route.providerId!==s.route.providerId)}function oe(s){return s.minimumRemainingPercent===null?"quota unknown":`${s.minimumRemainingPercent}% minimum remaining`}function ts(s){switch(s){case"use_now":return"Use now";case"available":return"Available";case"use_deliberately":return"Use deliberately";case"probe_first":return"Probe first";case"conserve":return"Conserve"}}function le({providerLabel:s,quota:n}){return n.windows.length===0?e.jsxs("div",{className:"hs-advisor-no-quota",children:[e.jsx("strong",{children:"No quota telemetry"}),e.jsx("span",{children:"Use one bounded ask as a canary before scaling this route."})]}):e.jsx("div",{className:"hs-advisor-windows",children:n.windows.map(a=>{const t=Math.max(0,Math.min(100,a.usedPercent)),i=a.elapsedPercent===null?null:Math.max(0,Math.min(100,a.elapsedPercent)),o=i===null?"elapsed time unavailable":`${i}% of the window elapsed`,r=a.projectedUsedPercent===null?"projection unavailable":`${a.projectedUsedPercent}% projected at reset`;return e.jsxs("div",{className:"hs-advisor-window",children:[e.jsxs("div",{className:"hs-advisor-window-head",children:[e.jsx("strong",{children:a.label}),e.jsxs("span",{children:[a.usedPercent,"% used"]}),e.jsx("span",{children:U(a.status)})]}),e.jsxs("div",{className:"hs-advisor-window-meter",role:"progressbar","aria-label":`${s} ${a.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),"aria-valuetext":`${a.usedPercent}% used; ${o}; ${r}; ${U(a.status)}`,children:[e.jsx("span",{className:`hs-advisor-window-fill hs-advisor-window-fill--${a.status}`,style:{width:`${t}%`}}),i!==null?e.jsx("span",{className:"hs-advisor-window-now",style:{left:`${i}%`},title:`${i}% of the window has elapsed`,"aria-hidden":"true"}):null]}),e.jsxs("div",{className:"hs-advisor-window-meta",children:[e.jsxs("span",{children:[a.percentRemaining,"% available"]}),e.jsx("span",{children:r}),e.jsx("span",{children:a.resetIn?`resets in ${a.resetIn}`:"reset unknown"})]})]},a.label)})})}function ce({assignment:s,selected:n,onSelect:a}){return e.jsxs("button",{type:"button",className:"hs-advisor-role","data-selected":n?"true":void 0,onClick:a,"aria-pressed":n,children:[e.jsx("span",{className:"hs-advisor-role-mark",children:e.jsx(L,{harness:s.route.harness,size:25,title:null})}),e.jsxs("span",{className:"hs-advisor-role-copy",children:[e.jsx("strong",{children:s.roleLabel}),e.jsx("span",{children:s.modelLabel}),e.jsxs("small",{children:[s.route.profile?`profile ${s.route.profile}`:s.route.harness," · Fit $",s.fit]})]}),e.jsx("span",{className:`hs-advisor-role-tag ${s.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:s.quotaRisk?`⚠️ ${s.quota.minimumRemainingPercent!==null?`${s.quota.minimumRemainingPercent}%`:"Risk"}`:s.fit>=100?"Primary":`Fit ${s.fit}`})]})}function ns({map:s}){const[n,a]=m.useState("implementation"),t=s.assignments.find(r=>r.role===n)??s.assignments[0];if(!t)return null;const i=B(t.route),o=t.alternatives.find(r=>G(t,r));return e.jsxs("div",{className:"hs-advisor-layout",children:[e.jsx("nav",{className:"hs-advisor-roles","aria-label":"Work roles",children:s.assignments.map(r=>e.jsx(ce,{assignment:r,selected:r.role===t.role,onSelect:()=>a(r.role)},r.role))}),e.jsxs("article",{className:"hs-advisor-detail","aria-live":"polite",children:[e.jsxs("header",{className:"hs-advisor-detail-head",children:[e.jsxs("div",{className:"hs-advisor-model",children:[e.jsx(L,{harness:t.route.harness,size:26,title:null}),e.jsxs("div",{children:[e.jsxs("span",{children:[t.roleLabel," · Role Routing"]}),e.jsx("h4",{children:t.modelLabel}),e.jsx("code",{children:A(t.route)})]})]}),e.jsx("span",{className:`hs-advisor-fit-badge ${t.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:t.quotaRisk?"⚠️ Quota Risk · Failover Active":`Primary Route · Fit ${t.fit}`})]}),t.quotaRisk?e.jsxs("div",{className:"hs-advisor-quota-alert",role:"alert",children:[e.jsxs("div",{className:"hs-advisor-quota-alert-head",children:[e.jsx("span",{className:"hs-advisor-quota-alert-badge",children:"⚠️ Quota Risk"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Quota Exhaustion Imminent · Elevated to Primary Concern"}),e.jsx("p",{children:t.quotaRiskMessage??`${t.quota.providerLabel} quota is near capacity.`})]})]}),e.jsx("div",{className:"hs-advisor-quota-alert-action",children:o?e.jsxs("span",{children:["Failover to ",e.jsx("strong",{children:o.label})," to move work off the constrained provider."]}):e.jsx("span",{children:"No quota-safe cross-provider fallback is currently available; keep the task bounded or wait for reset."})})]}):null,e.jsxs("div",{className:"hs-advisor-task-hero",children:[e.jsxs("div",{className:"hs-advisor-task-hero-head",children:[e.jsx("h5",{children:"Task Objective"}),e.jsx("span",{children:"Cognitive Strategy"})]}),e.jsx("p",{children:t.objective}),e.jsxs("small",{children:[e.jsx("strong",{children:"Execution Rationale:"})," ",t.taskRationale]})]}),e.jsxs("div",{className:"hs-advisor-assessment",children:[e.jsxs("section",{children:[e.jsx("h5",{children:"Strengths for this task"}),e.jsx("p",{children:t.capability})]}),e.jsxs("section",{children:[e.jsx("h5",{children:"Watchouts & Guardrails"}),e.jsx("p",{children:t.caution})]})]}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Dispatch rule"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:i}),e.jsx(z,{text:i,label:"Copy rule"})]})]}),e.jsxs("section",{className:"hs-advisor-ladder",children:[e.jsx("h5",{children:"Failover ladder"}),e.jsxs("div",{className:"hs-advisor-ladder-nodes",children:[e.jsxs("div",{className:`hs-advisor-ladder-node ${t.quotaRisk?"hs-advisor-ladder-node--primary hs-advisor-ladder-node--risk":"hs-advisor-ladder-node--primary"}`,children:[e.jsx("span",{className:"hs-advisor-ladder-badge",children:t.quotaRisk?"⚠️ Primary (Quota Risk)":"Primary"}),e.jsxs("div",{className:"hs-advisor-ladder-body",children:[e.jsx("strong",{children:t.modelLabel}),e.jsx("code",{children:A(t.route)}),e.jsx("small",{children:t.quotaRisk?`Exhaustion risk (${t.quota.minimumRemainingPercent}% remaining) · ${t.taskRationale}`:`Initial execution target · ${t.taskRationale}`})]})]}),t.alternatives.map((r,c)=>{const l=G(t,r);return e.jsxs("div",{className:`hs-advisor-ladder-node ${l?"hs-advisor-ladder-node--fallback-rec":""}`,children:[e.jsx("span",{className:"hs-advisor-ladder-badge",children:l?"⭐️ Quota-safe fallback":c===0?"Secondary":"Tertiary"}),e.jsxs("div",{className:"hs-advisor-ladder-body",children:[e.jsx("strong",{children:r.label}),e.jsx("code",{children:A(r.route)}),e.jsx("small",{children:l?`Moves work off ${t.quota.providerLabel} · ${r.taskRationale}`:r.quotaRisk?`Also quota constrained; use only if operationally necessary · ${r.taskRationale}`:`Fallback if ${t.modelLabel} encounters rate limits or errors · ${r.taskRationale}`})]})]},k(r.route))})]})]}),e.jsxs("section",{className:"hs-advisor-quota-secondary",children:[e.jsxs("div",{className:"hs-advisor-quota-secondary-head",children:[e.jsxs("h5",{children:["Provider Telemetry ",t.quotaRisk?"(Active Constraint)":"(Secondary)"]}),e.jsxs("span",{children:[t.quota.providerLabel,t.quota.plan?` · ${t.quota.plan}`:""]})]}),e.jsxs("div",{className:"hs-advisor-quota-compact-bar",children:[e.jsxs("span",{children:["Allowance: ",e.jsx("strong",{children:oe(t.quota)})]}),e.jsxs("span",{children:["Pacing: ",e.jsx("strong",{children:U(t.quota.pacing)})]}),e.jsxs("span",{children:["Telemetry: ",e.jsx("strong",{children:t.quota.confidence})]}),t.quota.nextResetIn?e.jsxs("span",{children:["Next reset: ",e.jsx("strong",{children:t.quota.nextResetIn})]}):null]}),t.quotaRisk?e.jsx("div",{style:{marginTop:"var(--space-sm)"},children:e.jsx(le,{providerLabel:t.quota.providerLabel,quota:t.quota})}):null]})]})]})}function is({models:s}){const n=s.find(r=>r.modelLabel==="GPT-5.6 Sol")??s[0],[a,t]=m.useState(()=>n?k(n.route):""),i=s.find(r=>k(r.route)===a)??n;if(!i)return null;const o=B(i.route);return e.jsxs("div",{className:"hs-model-guide-layout",children:[e.jsx("nav",{className:"hs-model-guide-list","aria-label":"Model Fleet",children:s.map(r=>{const c=k(r.route);return e.jsxs("button",{type:"button",className:"hs-model-guide-item","data-selected":c===k(i.route)?"true":void 0,"aria-pressed":c===k(i.route),onClick:()=>t(c),children:[e.jsx("span",{className:"hs-model-guide-mark",children:e.jsx(L,{harness:r.route.harness,size:23,title:null})}),e.jsxs("span",{className:"hs-model-guide-item-copy",children:[e.jsx("strong",{children:r.modelLabel}),e.jsxs("span",{children:[r.quota.providerLabel," · ",r.route.profile?`profile ${r.route.profile}`:r.route.harness]})]}),e.jsx("span",{className:`hs-advisor-role-tag ${r.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:r.quotaRisk?"⚠️ Conserve":ts(r.guidance)})]},c)})}),e.jsxs("article",{className:"hs-model-guide-detail","aria-live":"polite",children:[e.jsxs("header",{className:"hs-advisor-detail-head",children:[e.jsxs("div",{className:"hs-advisor-model",children:[e.jsx(L,{harness:i.route.harness,size:25,title:null}),e.jsxs("div",{children:[e.jsxs("span",{children:[i.quota.providerLabel,i.quota.plan?` · ${i.quota.plan}`:""]}),e.jsx("h4",{children:i.modelLabel}),e.jsx("code",{children:A(i.route)})]})]}),e.jsx("span",{className:`hs-advisor-fit-badge ${i.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:i.quotaRisk?"⚠️ Quota Risk · Conserve":i.roles.length>0?`${i.roles.length} Assigned Roles`:"Model Fleet"})]}),i.quotaRisk?e.jsx("div",{className:"hs-advisor-quota-alert",role:"alert",children:e.jsxs("div",{className:"hs-advisor-quota-alert-head",children:[e.jsx("span",{className:"hs-advisor-quota-alert-badge",children:"⚠️ Quota Risk"}),e.jsxs("div",{children:[e.jsx("strong",{children:"High Quota Depletion · Conserve Model"}),e.jsxs("p",{children:[i.quota.providerLabel," allowance is near capacity (",i.quota.minimumRemainingPercent,"% remaining). Conserve this model for essential high-fit tasks."]})]})]})}):null,e.jsxs("div",{className:"hs-model-guide-roles",children:[e.jsx("strong",{children:"Assigned task roles"}),e.jsx("div",{className:"hs-model-guide-role-chips",children:i.roles.map(r=>e.jsx("span",{className:"hs-model-guide-role-chip",children:r.label},r.role))})]}),e.jsxs("div",{className:"hs-advisor-assessment",children:[e.jsxs("section",{children:[e.jsx("h5",{children:"Strengths & Cognitive Profile"}),e.jsx("p",{children:i.strengths.join(" ")})]}),e.jsxs("section",{children:[e.jsx("h5",{children:"Watchouts & Guardrails"}),e.jsx("p",{children:i.cautions.join(" ")})]})]}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Direct dispatch"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:o}),e.jsx(z,{text:o,label:"Copy command"})]})]}),e.jsxs("section",{className:"hs-advisor-quota-secondary",children:[e.jsxs("div",{className:"hs-advisor-quota-secondary-head",children:[e.jsxs("h5",{children:["Provider Telemetry ",i.quotaRisk?"(Active Constraint)":"(Secondary)"]}),e.jsxs("span",{children:[i.quota.providerLabel,i.quota.plan?` · ${i.quota.plan}`:""]})]}),e.jsxs("div",{className:"hs-advisor-quota-compact-bar",children:[e.jsxs("span",{children:["Allowance: ",e.jsx("strong",{children:oe(i.quota)})]}),e.jsxs("span",{children:["Pacing: ",e.jsx("strong",{children:U(i.quota.pacing)})]}),e.jsxs("span",{children:["Telemetry: ",e.jsx("strong",{children:i.quota.confidence})]}),i.quota.nextResetIn?e.jsxs("span",{children:["Next reset: ",e.jsx("strong",{children:i.quota.nextResetIn})]}):null]}),i.quotaRisk?e.jsx("div",{style:{marginTop:"var(--space-sm)"},children:e.jsx(le,{providerLabel:i.quota.providerLabel,quota:i.quota})}):null]})]})]})}function rs({assignments:s}){const[n,a]=m.useState("implementation"),[t,i]=m.useState({}),o=s.find(d=>d.role===n)??s[0];if(!o)return null;const r=[{label:o.modelLabel,route:o.route,capability:o.capability,taskRationale:o.taskRationale,quota:o.quota,quotaRisk:o.quotaRisk},...o.alternatives.map(d=>({label:d.label,route:d.route,capability:d.capability,taskRationale:d.taskRationale,quota:d.quota,quotaRisk:d.quotaRisk}))],c=t[o.role],l=c?c.flatMap(d=>{const p=r.find(x=>k(x.route)===d);return p?[p]:[]}):r,h=d=>{const p=l.map(x=>k(x.route));i(x=>({...x,[o.role]:[d,...p.filter(v=>v!==d)]}))},u=B(l[0].route);return e.jsxs("div",{className:"hs-cascade-layout",children:[e.jsx("nav",{className:"hs-advisor-roles","aria-label":"Cascade roles",children:s.map(d=>e.jsx(ce,{assignment:d,selected:d.role===o.role,onSelect:()=>a(d.role)},d.role))}),e.jsxs("article",{className:"hs-cascade-editor",children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("span",{children:[o.roleLabel," · Failover Hierarchy"]}),e.jsx("h4",{children:"Task Escalation Sequence"}),e.jsx("p",{children:"Hierarchical fallback sequence when models encounter rate limits, timeouts, or task complexity thresholds."})]}),c?e.jsx("button",{type:"button",onClick:()=>i(d=>{const p={...d};return delete p[o.role],p}),children:"Reset suggested order"}):e.jsx("span",{children:"Default policy"})]}),e.jsx("ol",{className:"hs-cascade-workflow",children:l.map((d,p)=>{const x=k(d.route),v=p>0&&G(l[0],d),f=p===0?"Primary Route":p===1?"Secondary Fallback":"Tertiary Fallback",g=p===0?d.quotaRisk?`Initial target (⚠️ Quota Risk: ${d.quota.minimumRemainingPercent}% remaining) · ${d.taskRationale}`:`Initial execution target · ${d.taskRationale}`:p===1?v?`⭐️ Quota-safe route off ${l[0].quota.providerLabel} · ${d.taskRationale}`:`Triggered if primary encounters rate limits, errors, or complexity threshold · ${d.taskRationale}`:`Emergency baseline fallback · ${d.taskRationale}`;return e.jsxs("li",{className:"hs-cascade-node",children:[e.jsx("span",{className:"hs-cascade-node-index",children:p+1}),e.jsxs("div",{className:"hs-cascade-node-main",children:[e.jsx("span",{children:f}),e.jsx("strong",{children:d.label}),e.jsx("code",{children:A(d.route)}),e.jsx("p",{children:d.capability}),e.jsx("small",{children:g})]}),e.jsxs("div",{className:"hs-cascade-node-side",children:[e.jsx("em",{className:d.quotaRisk?"hs-advisor-tone--warn":"",children:d.quota.minimumRemainingPercent===null?"quota unknown":`${d.quota.minimumRemainingPercent}% quota remaining`}),p>0?e.jsx("button",{type:"button",onClick:()=>h(x),children:"Make primary"}):null]})]},`${o.role}:${x}`)})}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Primary dispatch command"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:u}),e.jsx(z,{text:u,label:"Copy primary command"})]})]})]})]})}function os({map:s,loading:n,bias:a,onBiasChange:t}){const[i,o]=m.useState("tasks"),r={tasks:"Task-first model routing: Map each role to the optimal cognitive profile and failover ladder.",models:"Model fleet inventory: Inspect cognitive strengths, guardrails, and assigned roles across all models.",cascades:"Failover & escalation rules: Review and customize the task escalation sequence for each role."};return e.jsxs("section",{className:"hs-advisor","aria-labelledby":"hs-orchestrator-map-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-advisor-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-orchestrator-map-title",children:"Orchestrator map"}),e.jsx("p",{children:r[i]})]}),e.jsxs("div",{className:"hs-advisor-head-tools",children:[e.jsx("span",{className:"hs-section-meta",children:n?"refreshing inputs":"advisory · no dispatch"}),e.jsxs("label",{className:"hs-routing-bias",children:[e.jsx("span",{children:"Routing bias"}),e.jsx("input",{type:"range",min:0,max:M.length-1,step:1,value:M.findIndex(c=>c.value===a),"aria-valuetext":M.find(c=>c.value===a)?.label,onChange:c=>{const l=M[Number(c.target.value)];l&&t(l.value)}}),e.jsx("small",{"aria-hidden":"true",children:M.map(c=>e.jsx("i",{"data-active":c.value===a?"true":void 0,children:c.label},c.value))})]})]})]}),e.jsx("div",{className:"hs-routing-angles",role:"group","aria-label":"Orchestrator map angle",children:[["tasks","Task map"],["models","Model fleet"],["cascades","Cascades"]].map(([c,l])=>e.jsx("button",{type:"button","aria-pressed":i===c,onClick:()=>o(c),children:l},c))}),i==="tasks"?e.jsx(ns,{map:s}):null,i==="models"?e.jsx(is,{models:s.models}):null,i==="cascades"?e.jsx(rs,{assignments:s.assignments}):null]})}function ls({rows:s,loading:n,onImported:a}){const t=ie.map(l=>({provider:l,row:s.find(h=>h.id===l.id)??null})),i=t.filter(({row:l})=>l?.gauge).length,o=t.filter(({row:l})=>l?.gauge?.kind==="quota").length,r=t.filter(({row:l})=>l?.gauge?.kind==="quota"&&l.gauge.plan||l?.gauge?.kind==="status").length,c=t.flatMap(({row:l})=>l?.gauge?.kind==="quota"?I(l.gauge):[]).map(l=>l.resetAt).filter(l=>l>Date.now()).sort((l,h)=>l-h)[0];return e.jsxs("section",{className:"hs-subscriptions","aria-labelledby":"hs-subscriptions-title","aria-busy":n,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:n?"—":i})," detected"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":o})," usage feeds"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":r})," plans named"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":c?H(c):"-"})," next reset"]})]})]}),e.jsx("div",{className:"hs-subscription-grid",children:t.map(({provider:l,row:h})=>{const u=h?.gauge??null,d=n&&!u,p=d?"loading":u?"connected":"missing",x=u?.kind==="quota"?u.plan:u?.kind==="status"?u.statusLabel:null,v=Xe(u),f=u?.kind==="quota"?"Usage connected":u?.kind==="status"?u.detailLabel||"Subscription detected":d?"Checking":"Not detected";return e.jsxs("article",{className:`hs-subscription-card hs-subscription-card--${p}`,children:[e.jsxs("header",{className:"hs-subscription-card-head",children:[e.jsxs("div",{className:"hs-subscription-provider",children:[e.jsx(L,{harness:l.id,size:18,title:null,className:"hs-subscription-mark"}),e.jsxs("div",{children:[e.jsx("h4",{children:P(l.id)}),e.jsx("span",{children:d?"Checking local plan…":x||"Plan not reported"})]})]}),e.jsx("span",{className:`hs-subscription-state hs-subscription-state--${p}`,children:f})]}),e.jsx("p",{className:"hs-subscription-description",children:l.description}),d?e.jsx(ss,{}):u?.kind==="quota"?e.jsx("div",{className:"hs-subscription-windows",children:I(u).map(g=>e.jsx(es,{gauge:u,window:g},`${l.id}:${g.label}`))}):u?.kind==="status"?e.jsxs("div",{className:"hs-subscription-status-detail",children:[e.jsx("strong",{children:u.statusLabel}),e.jsx("span",{children:u.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."})]}),l.id==="cursor"||l.id==="grok"&&u?.kind!=="quota"?e.jsx(Ze,{provider:l.id,onImported:a}):null,e.jsxs("footer",{className:"hs-subscription-footer",children:[e.jsxs("span",{children:[d?"checking local feed":v?`updated ${J(v)||"now"}`:u?"detected locally":"waiting for provider data",u?.source?` · ${u.source}`:""]}),e.jsx("nav",{"aria-label":`${P(l.id)} quick links`,children:l.links.map(g=>e.jsxs("a",{href:g.href,target:"_blank",rel:"noreferrer",children:[g.label,e.jsx(Y,{size:11,"aria-hidden":"true"})]},g.href))})]})]},l.id)})})]})}function cs({accounts:s,loading:n}){return s.length===0&&!n?null:e.jsxs("section",{className:"hs-cloud-accounts","aria-labelledby":"hs-cloud-accounts-title","aria-busy":n,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:n?"checking accounts":`${s.length} connected`})]}),e.jsxs("div",{className:"hs-cloud-grid",children:[n&&s.length===0?Array.from({length:3},(a,t)=>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"})]})]},t)):null,s.map(a=>{const t=ze[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(Qe,{provider:a.id}),e.jsxs("div",{children:[e.jsx("span",{className:"hs-cloud-category",children:t.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:t.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:He[a.id].map(i=>e.jsxs("a",{href:i.href,target:"_blank",rel:"noreferrer",children:[i.label,e.jsx(Y,{size:11,"aria-hidden":"true"})]},i.href))})]})]},a.id)})]})]})}function ga({navigate:s}){const{route:n}=ge(),a=fe(n),[t]=m.useState(()=>me("/api/service-budgets",Ge)),[i,o]=m.useState(t?.gauges??[]),[r,c]=m.useState(t?.cloudAccounts??[]),[l,h]=m.useState("budget"),[u,d]=m.useState(()=>S(t?.generatedAt)??Date.now()),[p,x]=m.useState("balanced"),[v,f]=m.useState(t===null),[g,q]=m.useState(!1),[T,Q]=m.useState(null),_=m.useRef(0),W=m.useRef(t!==null),R=m.useCallback(async(y=!1,C=!1)=>{const E=++_.current;C&&!W.current&&f(!0),q(!0),Q(null);try{const w=await Z(`/api/service-budgets${y?"?refresh=1":""}`);if(E!==_.current)return;W.current=!0,o(w.gauges??[]),d(S(w.generatedAt)??Date.now()),c(w.cloudAccounts??[])}catch(w){E===_.current&&Q(w instanceof Error?w.message:String(w))}finally{E===_.current&&(f(!1),q(!1))}},[]);m.useEffect(()=>{let y=!1,C;return R(!1,!0).then(()=>{y||(C=window.setTimeout(()=>{R(!0)},600))}),()=>{y=!0,C!==void 0&&window.clearTimeout(C)}},[R]),m.useEffect(()=>{const y=window.setInterval(()=>{R(!1)},3e4);return()=>window.clearInterval(y)},[R]);const de=m.useMemo(()=>Je(i),[i]),ue=m.useMemo(()=>{const y=Date.now();return qe(as(i,u,y),{now:y,bias:p})},[u,p,i]),he=xe();return e.jsxs("div",{className:"s-ops",children:[he?e.jsx("div",{className:"s-ops-header",children:e.jsx(be,{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:l==="budget"?"See what you pay for, how much remains, and where to use it.":"Map each kind of work to a model and provider route using live quota posture."})]}),e.jsxs("div",{className:"hs-page-actions",children:[e.jsxs("div",{className:"hs-view-switch",role:"group","aria-label":"Provider view",children:[e.jsx("button",{type:"button","aria-pressed":l==="budget",onClick:()=>h("budget"),children:"Budget"}),e.jsx("button",{type:"button","aria-pressed":l==="routing",onClick:()=>h("routing"),children:"Routing"})]}),e.jsxs("button",{type:"button",className:"hs-refresh",disabled:g,onClick:()=>{R(!0)},children:[e.jsx(ve,{size:14,className:g?"hs-refresh-icon-spinning":"","aria-hidden":"true"}),e.jsx("span",{children:g?"Refreshing":"Refresh"})]})]})]}),T&&e.jsxs("div",{className:"hs-error",role:"status","aria-live":"polite",children:["refresh: ",T]}),l==="budget"?e.jsxs("div",{id:"hs-budget-view",className:"hs-provider-view",children:[e.jsx(ls,{rows:de,loading:v,onImported:()=>R(!1)}),e.jsx(cs,{accounts:r,loading:v})]}):e.jsx("div",{id:"hs-routing-view",className:"hs-provider-view",children:e.jsx(os,{map:ue,loading:v,bias:p,onBiasChange:x})})]})})]})}export{ga as HarnessesScreen};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-BFbLvCJn.js";import{u as X}from"./chunk-YOZR3KYS-apgUnfXh.js";import{c as Q}from"./clipboard-e3fSpeo7.js";import{e as A}from"./terminal-sessions-3RfJpen8.js";import{a as C}from"./api-DSqpVKC7.js";import{H as D}from"./HarnessMark-CP-PWk2W.js";import{T as $}from"./terminal-DMBAZjPP.js";import{L as K}from"./log-in-VL9mdgeE.js";import{R as V}from"./refresh-cw-BcqctLqo.js";import{C as Z}from"./check-BM6QtbB7.js";import{C as ee}from"./copy-C1XrY27_.js";import{E as G}from"./eye-CD-_aphP.js";import{c as te}from"./createLucideIcon-CKbjXlwv.js";import{X as se}from"./x-BcfhXYiF.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 H=null,O=null;function le(){return H?Promise.resolve(H):(O??=re().then(t=>(H=t,t)).finally(()=>{O=null}),O)}function Fe(){const[t,s]=d.useState(H);return d.useEffect(()=>{if(t)return;let n=!1;return le().then(a=>{n||s(a)}).catch(()=>{}),()=>{n=!0}},[t]),{hosts:t?.hosts??[],preferredHostId:t?.preferredHostId??null,loaded:t!==null}}async function ie(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)}),l=await C(`/api/terminal-sessions/peek?${a.toString()}`);return l.available?{body:l.body,reason:null}:{body:null,reason:l.reason??"No preview available."}}const oe=3e3;function ce(t,s,n={}){const a=n.enabled??!0,l=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 i=!1;m(null);const b=()=>{Y(t,s,l).then(h=>{i||m(h)}).catch(h=>{if(i)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()=>{i=!0,window.clearInterval(j)}},[t,s,l,a,c,u]),{body:p?.body??null,reason:p?.reason??null,loading:p===null,refresh:()=>o(i=>i+1)}}const de=15e3;function ue(t,s,n={}){const a=n.enabled??!0,l=n.lines??6,c=n.pollMs??de,[p,m]=d.useState({}),u=s.join(`
|
|
2
|
-
`);return d.useEffect(()=>{const o=u?u.split(`
|
|
3
|
-
`):[];if(!t||!a||o.length===0)return;let i=!1;const b=()=>{Promise.all(o.map(async h=>{try{const r=await Y(t,h,l);return[h,r.body]}catch{return[h,void 0]}})).then(h=>{i||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()=>{i=!0,window.clearInterval(j)}},[t,u,l,a,c]),p}const he=3e3;function pe(t,s={}){const n=s.enabled??!0,a=s.pollMs??he,[l,c]=d.useState(null),[p,m]=d.useState(null),[u,o]=d.useState(0);return d.useEffect(()=>{if(!t||!n)return;let i=!1;const b=()=>{ie(t).then(h=>{i||(c(h),m(null))}).catch(h=>{i||m(h instanceof Error?h.message:String(h))})};b();const j=window.setInterval(()=>{document.visibilityState!=="hidden"&&b()},a);return()=>{i=!0,window.clearInterval(j)}},[t,n,a,u]),{topology:l,error:p,refresh:()=>o(i=>i+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 E(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
|
-
`);for(let a=n.length-1;a>=0;a-=1){const l=n[a].trim();if(l)return l}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,l)=>{const c=fe(a,l,s.column);if(c!==0)return c;const p=xe(a,l,s.column)*n;return p!==0?p:N(E(a.pane),E(l.pane))})}function fe(t,s,n){const a=p=>n==="drift"?R(p.pane):n==="output"?L(p.output):!0,l=a(t),c=a(s);return l===null&&c===null?0:l===null?1:c===null?-1:0}function xe(t,s,n){switch(n){case"pane":return N(E(t.pane),E(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:l}=pe(t),[c,p]=d.useState(null),[m,u]=d.useState(null),[o,i]=d.useState("idle"),[b,j]=d.useState(null),h=t==="default"?"herdr":`herdr session attach ${t}`,r=n?.running??!1,g=d.useCallback(()=>{i("starting"),j(null),ae("herdr",{sessionName:t}).then(()=>{i("idle"),l()}).catch(y=>{i("failed"),j(y instanceof Error?y.message:String(y))})},[t,l]),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($,{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:l,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($,{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($,{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,T=y.find(f=>f.tab.tabId===c)??y.find(f=>f.tab.tabId===v)??y[0],{workspace:w,tab:I}=T,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 l=t.layout;if(!l)return null;const{area:c}=l,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??""}`," — ",l.panes.length," ",l.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:l.panes.map(u=>{const o=p.get(u.paneId),{rect:i}=u,b={left:`${(i.x-c.x)/c.width*100}%`,top:`${(i.y-c.y)/c.height*100}%`,width:`${i.width/c.width*100}%`,height:`${i.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,l]=X(ye,me),[c,p]=d.useState(null),[m,u]=d.useState(null),o=d.useMemo(()=>s.panes.map(r=>r.paneId),[s.panes]),i=ue(t,o,{lines:6}),b=s.label??`Tab ${s.number??""}`,j=d.useMemo(()=>be(s.panes.map(r=>({pane:r,tabLabel:b,output:i[r.paneId]??null})),a),[s.panes,b,i,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:()=>l(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),T=M(r);return e.jsxs(d.Fragment,{children:[e.jsxs("tr",{className:r.focused?"is-focused":void 0,onClick:()=>n(r),title:`Enter ${E(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:E(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($,{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:T||void 0,children:T?A(T):"—"}),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:l,loading:c,refresh:p}=ce(t,s.paneId,{lines:48}),[m,u]=d.useState(null);d.useEffect(()=>{const i=b=>{b.key==="Escape"&&n()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[n]);const o=d.useCallback(()=>{u(null),F(t,s.terminalId??s.paneId).catch(i=>u(i instanceof Error?i.message:String(i)))},[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:i=>i.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:l??"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 Ee(t,s){const n=t.label??t.workspaceId,a=t.number!=null?`${n} ${t.number}`:n,l=s.label&&s.label!==String(s.number??"")?s.label:null;return{label:l?`${a} · ${l}`:a,statuses:s.panes.map(c=>c.agentStatus)}}const Ue=Object.freeze(Object.defineProperty({__proto__:null,AgentStatusBadge:_,AgentStatusDot:P,HerdrSessionScreen:ge,herdrAgentStatusLabel:Ie,herdrTabSummary:Ee,herdrTerminalRoute:W},Symbol.toStringTag,{value:"Module"}));export{P as A,ge as H,pe as a,Ee as b,ae as c,Ue as d,ie as f,W as h,Fe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.hd{display:flex;flex-direction:column;gap:var(--space-md);margin-bottom:var(--space-xl)}.hd-vitals-band{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);flex-wrap:wrap;padding:var(--space-xs) var(--space-md);border-radius:var(--radius-lg);background:color-mix(in srgb,var(--surface) 60%,var(--bg));border:1px solid color-mix(in srgb,var(--border) 70%,transparent)}.hd-vitals-left{display:flex;align-items:center;gap:var(--space-sm);flex-wrap:wrap}.hd-vitals-title{color:var(--ink);letter-spacing:var(--tracking-lg)}.hd-vitals-callsign{font-weight:500}.hd-vitals-right{display:flex;align-items:center;gap:var(--space-xs);margin-left:auto}.hd-meta{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--dim);font-variant-numeric:tabular-nums}.hd-meta--err{color:var(--red)}.hd-refresh-btn{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border-radius:var(--radius-sm);border:1px solid color-mix(in srgb,var(--border) 70%,transparent);background:color-mix(in srgb,var(--ink) 3%,transparent);color:var(--dim);cursor:pointer;transition:background var(--motion-duration-fast) ease,color var(--motion-duration-fast) ease,border-color var(--motion-duration-fast) ease}.hd-refresh-btn:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 8%,transparent);color:var(--ink);border-color:var(--border)}.hd-refresh-btn:disabled{opacity:.5;cursor:default}.hd-spin{animation:hd-spin .8s linear infinite}@keyframes hd-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.hd-telemetry-grid{display:grid;gap:var(--space-md)}.hd-telemetry-grid--split{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}.hd-telemetry-grid--single{grid-template-columns:minmax(0,1fr)}.hd-card{border:1px solid var(--border);border-radius:var(--radius-xl);background:color-mix(in srgb,var(--surface) 80%,var(--bg));overflow:hidden;display:flex;flex-direction:column}.hd-card-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);padding:var(--space-sm) var(--space-lg);border-bottom:1px solid color-mix(in srgb,var(--border) 70%,transparent);background:color-mix(in srgb,var(--bg) 30%,var(--surface))}.hd-card-head-left,.hd-card-head-right{display:flex;align-items:center;gap:var(--space-sm)}.hd-card-title{color:var(--ink);letter-spacing:var(--tracking-lg)}.hd-card-sub{color:var(--dim)}.hd-heartrate-icon{color:var(--accent)}.hd-gauge-set{display:flex;flex-direction:column;padding:var(--space-2xs) 0}.hd-gauge-table-head{display:grid;grid-template-columns:88px minmax(100px,1.1fr) minmax(68px,.7fr) minmax(100px,1.1fr) minmax(90px,1fr);gap:var(--space-xs) var(--space-sm);padding:var(--space-xs) var(--space-lg);color:var(--dim);letter-spacing:var(--tracking-md);border-bottom:1px solid color-mix(in srgb,var(--border) 40%,transparent)}.hd-gauge-wrap{display:block;border-bottom:1px solid color-mix(in srgb,var(--border) 45%,transparent)}.hd-gauge-wrap:last-child{border-bottom:none}.hd-gauge{display:grid;grid-template-columns:88px minmax(100px,1.1fr) minmax(68px,.7fr) minmax(100px,1.1fr) minmax(90px,1fr);gap:var(--space-xs) var(--space-sm);align-items:center;width:100%;padding:7px var(--space-lg);border:0;background:transparent;color:inherit;font:inherit;text-align:left;transition:background var(--motion-duration-hover) ease}.hd-gauge--interactive{cursor:pointer}.hd-gauge--interactive:hover{background:color-mix(in srgb,var(--ink) 4%,transparent)}.hd-gauge-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-xs);min-width:0}.hd-gauge-label{font-family:var(--font-mono);font-size:var(--text-xs);font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hd-gauge-pct{font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:600;font-variant-numeric:tabular-nums}.hd-gauge-pct--ok{color:var(--accent)}.hd-gauge-pct--warn{color:var(--amber)}.hd-gauge-pct--err{color:var(--red)}.hd-gauge-cell{min-width:0;display:flex;align-items:center;font-family:var(--font-mono);font-size:var(--text-xs)}.hd-gauge-cell--empty{color:var(--dim)}.hd-gauge-cell--usage{display:flex;align-items:center;gap:var(--space-xs)}.hd-gauge-window-name{color:var(--dim);min-width:18px}.hd-gauge-bar{flex:1 1 auto;height:5px;border-radius:var(--radius-xs);background:color-mix(in srgb,var(--ink) 12%,transparent);overflow:hidden;position:relative;min-width:32px}.hd-gauge-bar-fill{position:absolute;inset:0 auto 0 0;height:100%;border-radius:var(--radius-xs);transition:width .2s ease}.hd-gauge-bar-fill--ok{background:var(--accent)}.hd-gauge-bar-fill--warn{background:var(--amber)}.hd-gauge-bar-fill--err{background:var(--red)}.hd-gauge-window-used{font-size:var(--text-2xs);color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}.hd-gauge-reset{color:var(--dim);font-size:var(--text-2xs);font-variant-numeric:tabular-nums;white-space:nowrap}.hd-gauge-reset--imminent{color:var(--amber)}.hd-gauge-reset--featured{display:flex;flex-direction:column;line-height:1.15;gap:1px}.hd-gauge-reset--featured strong{font-weight:600;color:var(--ink);font-size:var(--text-xs)}.hd-gauge-reset--featured time,.hd-gauge-reset--featured span{font-size:10px;color:var(--dim)}.hd-gauge-reset--imminent strong{color:var(--amber)}.hd-gauge-reset--due strong{color:var(--accent)}.hd-gauge-reset--stale strong{color:var(--red)}.hd-gauge-toggle{background:transparent;border:0;padding:0;font-family:var(--font-mono);font-size:var(--text-2xs);color:var(--dim);cursor:pointer;letter-spacing:var(--tracking-md);text-transform:uppercase}.hd-gauge-toggle:hover{color:var(--ink)}.hd-heartrate-plot-body{padding:var(--space-sm) var(--space-lg) var(--space-md);display:flex;flex-direction:column;justify-content:flex-end}.hd-heartrate-svg-wrap{width:100%;overflow:hidden}@media(max-width:900px){.hd-telemetry-grid--split{grid-template-columns:1fr}}@media(max-width:680px){.hd-gauge-table-head,.hd-gauge{grid-template-columns:80px 1fr auto}.hd-gauge-table-head span:nth-child(2),.hd-gauge-table-head span:nth-child(3),.hd-gauge>.hd-gauge-cell:nth-child(2),.hd-gauge>.hd-gauge-cell:nth-child(3){display:none}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,j as t}from"./index-BFbLvCJn.js";import{R as H}from"./refresh-cw-BcqctLqo.js";import{A as _}from"./activity-CXkZ620t.js";import"./createLucideIcon-CKbjXlwv.js";const q=3,I=2;function W(e){return e>=.9?"err":e>=.75?"warn":"ok"}const O=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function A(e,a){const s=e-a.getTime(),c=new Date(e).toDateString()===a.toDateString(),r=new Date(e),n=String(r.getHours()).padStart(2,"0"),l=String(r.getMinutes()).padStart(2,"0"),i=s>0&&s<6*3600*1e3;return c?{label:`${n}:${l}`,imminent:i}:{label:`${O[r.getDay()]} ${n}:${l}`,imminent:i}}function G(e,a){const s=Math.floor((e-a.getTime())/1e3),c=s<0,r=Math.abs(s);let n;if(r>=86400){const l=Math.floor(r/86400),i=Math.floor(r%86400/3600);n=i>0?`${l}d ${i}h`:`${l}d`}else if(r>=3600){const l=Math.floor(r/3600),i=Math.floor(r%3600/60);n=i>0?`${l}h ${i}m`:`${l}h`}else n=`${Math.max(1,Math.floor(r/60))}m`;return c?`stale ${n}`:n}function w(e){return e.windows&&e.windows.length>0?e.windows:[{label:z(e.unitLabel),fill:e.fill,usedLabel:e.usedLabel,capLabel:e.capLabel,unitLabel:e.unitLabel,resetAt:e.resetAt}]}function z(e){switch(e){case"weekly":return"7d";case"req/h":return"1h";default:return e||"quota"}}function E(e,a){return w(e).map(s=>{const c=A(s.resetAt,a),r=G(s.resetAt,a);return`${s.label}: ${s.usedLabel} / ${s.capLabel} ${s.unitLabel} · resets ${c.label} (in ${r})`}).join(" · ")}function S(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 Q(e){const a=[...e].sort((r,n)=>(S(r.label)??Number.MAX_SAFE_INTEGER)-(S(n.label)??Number.MAX_SAFE_INTEGER)),s=a.find(r=>(S(r.label)??0)>=1440)??(a.length>1?a[a.length-1]:null);return{shortWindow:a.find(r=>r!==s)??null,longWindow:s}}function V(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 T({window:e}){if(!e)return t.jsx(N,{});const a=Math.round(e.fill*100),s=W(e.fill);return t.jsxs("span",{className:"hd-gauge-cell hd-gauge-cell--usage",children:[t.jsx("span",{className:"hd-gauge-window-name label-xs",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:V(e)})]})}function R({window:e,now:a,featured:s=!1}){if(!e)return t.jsx(N,{});if(s){const n=P(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 c=A(e.resetAt,a),r=G(e.resetAt,a);return t.jsxs("span",{className:`hd-gauge-cell hd-gauge-reset${c.imminent?" hd-gauge-reset--imminent":""}`,children:["↻ ",r]})}function P(e,a){if(!Number.isFinite(e))return{primary:"—",secondary:"unknown",ariaLabel:"Weekly reset time unknown",tone:"stale"};const s=e-a.getTime(),c=new Date(e);if(!Number.isFinite(c.getTime()))return{primary:"—",secondary:"unknown",ariaLabel:"Weekly reset time unknown",tone:"stale"};const r=c.toISOString();if(s<=0){const u=Math.abs(s);if(u<=9e4)return{primary:"reset due",secondary:"refreshing…",ariaLabel:"Weekly reset due; refreshing usage",tone:"due",dateTime:r};const x=Math.floor(u/6e4),$=x>=60?`+${Math.floor(x/60)}h ${x%60}m`:`+${Math.max(1,x)}m`;return{primary:u<=360*6e4?"reset due":"stale",secondary:$,ariaLabel:`Weekly reset data ${$} overdue`,tone:u<=360*6e4?"due":"stale",dateTime:r}}const n=Math.floor(s/1e3),l=Math.floor(n/86400),i=Math.floor(n%86400/3600),o=Math.floor(n%3600/60),d=n%60,h=[i,o,d].map(u=>String(u).padStart(2,"0")).join(":"),b=l>0?`${l}d ${h}`:h,m=c.toDateString()===a.toDateString(),f=c.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),g=m?`today ${f}`:`${c.toLocaleDateString([],{weekday:"short"})} ${f}`,p=l>0?`${l} ${l===1?"day":"days"} ${i} hours`:`${i} hours ${o} minutes`;return{primary:b,secondary:g,ariaLabel:`Weekly quota resets in ${p}; ${g}`,tone:s<360*6e4?"imminent":"normal",dateTime:r}}function B(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 c=e[s-1]??e[s],r=e[s],n=e[s+1],l=e[s+2]??n,i=r.x+(n.x-c.x)/6,o=r.y+(n.y-c.y)/6,d=n.x-(l.x-r.x)/6,h=n.y-(l.y-r.y)/6;a.push(`C ${i} ${o}, ${d} ${h}, ${n.x} ${n.y}`)}return a.join(" ")}function U(e){const a=v.useRef(null),[s,c]=v.useState(e);return v.useLayoutEffect(()=>{const r=a.current;if(!r)return;const n=i=>{const o=Math.round(i);o>0&&c(d=>d===o?d:o)};n(r.getBoundingClientRect().width);const l=new ResizeObserver(i=>{n(i[0]?.contentRect.width??0)});return l.observe(r),()=>l.disconnect()},[]),[a,s]}function X({buckets:e}){const[a,s]=U(372),c=72,r=8,n=54,l=67,i=e.length,o=i<2||e.every(p=>p.count===0),d=Math.max(1,s-4),h={viewBox:`0 0 ${s} ${c}`,style:{width:"100%",height:c,display:"block"}};if(o)return t.jsx("div",{ref:a,className:"hd-heartrate-svg-wrap",children:t.jsx("svg",{...h,children:t.jsx("line",{x1:"0",y1:n,x2:s,y2:n,stroke:"var(--border)"})})});const b=d/(i-1),m=e.map((p,u)=>({x:u*b,y:n-Math.max(0,Math.min(1,p.value))*(n-r)})),f=B(m),g=`${f} L ${d} ${n} L 0 ${n} Z`;return t.jsx("div",{ref:a,className:"hd-heartrate-svg-wrap",children:t.jsxs("svg",{...h,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.28"}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:"0.0"})]})}),t.jsx("line",{x1:"0",y1:r,x2:s,y2:r,stroke:"var(--border)",opacity:"0.25"}),t.jsx("line",{x1:"0",y1:(r+n)/2,x2:s,y2:(r+n)/2,stroke:"var(--border)",opacity:"0.25"}),t.jsx("line",{x1:"0",y1:n,x2:s,y2:n,stroke:"var(--border)"}),t.jsx("path",{d:g,fill:"url(#hrdFill)"}),t.jsx("path",{d:f,fill:"none",stroke:"var(--accent)",strokeWidth:"1.75",strokeLinecap:"round"}),t.jsx("circle",{cx:m[i-1].x,cy:m[i-1].y,r:"3",fill:"var(--accent)"}),t.jsx("circle",{cx:m[i-1].x,cy:m[i-1].y,r:"6",fill:"var(--accent)",opacity:"0.25"}),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 K({gauge:e,now:a,onClick:s}){const c=s?"button":"span",r=s?{type:"button",onClick:s}:{};if(e.kind==="status")return t.jsxs(c,{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 label-xs",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=w(e),{shortWindow:l,longWindow:i}=Q(n),o=W(Math.max(...n.map(h=>h.fill))),d=Math.round(Math.max(...n.map(h=>h.fill))*100);return t.jsxs(c,{className:`hd-gauge hd-gauge--${o}${s?" hd-gauge--interactive":""}`,title:E(e,a),"aria-label":`${e.label} subscription usage. ${E(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--${o}`,children:[d,"%"]})]}),t.jsx(T,{window:l}),t.jsx(R,{window:l,now:a}),t.jsx(T,{window:i}),t.jsx(R,{window:i,now:a,featured:!0})]})}function Y(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 Z(e){return e.kind==="quota"?Math.max(e.fill,...w(e).map(a=>a.fill)):Y(e.statusLabel)>0?.01:0}function J(e){return e.kind==="quota"}function ee(e){return C(e).slice(0,I)}function C(e){return e.map((a,s)=>({gauge:a,index:s,score:Z(a)})).sort((a,s)=>s.score-a.score||a.index-s.index).map(({gauge:a})=>a)}function re(e){const{now:a,operatorName:s,syncLabel:c,error:r,loading:n,refreshing:l,onRefresh:i,navigate:o,heartrate:d,heartrateWindow:h,heartrateBucketLabel:b,heartrateVisibleEventThreshold:m=q,serviceGauges:f}=e,[g,p]=v.useState(!1),u=r?"err":"ok",x=f.filter(J),$=C(x),k=ee(x),y=g?$:k,F=x.length>k.length,L=d.reduce((j,D)=>j+D.count,0),M=L>=m;return t.jsxs("section",{className:"hd","aria-label":"Fleet Cockpit and Service Cluster",children:[t.jsxs("div",{className:"hd-vitals-band",children:[t.jsxs("div",{className:"hd-vitals-left",children:[t.jsx("span",{className:"label-sm hd-vitals-title",children:"Fleet Cockpit"}),s&&t.jsx("span",{className:"chip chip--neutral chip--mono chip--sm hd-vitals-callsign",children:s})]}),t.jsxs("div",{className:"hd-vitals-right",children:[r&&t.jsx("span",{className:"dot dot--warning","aria-hidden":"true"}),t.jsx("span",{className:`hd-meta hd-meta--${u}`,children:c}),t.jsx("button",{type:"button",className:"hd-refresh-btn",disabled:n||l,onClick:i,title:"Refresh status (r)","aria-label":l?"Refreshing status":"Refresh status",children:t.jsx(H,{size:11,className:l?"hd-spin":"","aria-hidden":"true"})})]})]}),(y.length>0||M)&&t.jsxs("div",{className:`hd-telemetry-grid ${M&&y.length>0?"hd-telemetry-grid--split":"hd-telemetry-grid--single"}`,children:[y.length>0&&t.jsxs("div",{className:"hd-card hd-card--quotas",children:[t.jsxs("div",{className:"hd-card-head",children:[t.jsxs("div",{className:"hd-card-head-left",children:[t.jsx("span",{className:"label-xs hd-card-title",children:"Subscriptions & Quotas"}),t.jsxs("span",{className:"chip chip--neutral chip--mono chip--sm",children:[y.length," Active"]})]}),F&&t.jsxs("button",{type:"button",className:"hd-gauge-toggle","aria-expanded":g,onClick:()=>p(j=>!j),children:["[",g?"Top 2":`All ${x.length}`,"]"]})]}),t.jsxs("div",{className:"hd-gauge-set",children:[t.jsxs("div",{className:"hd-gauge-table-head label-xs","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:"Reset Countdown"})]}),y.map(j=>t.jsx("span",{className:"hd-gauge-wrap",children:t.jsx(K,{gauge:j,now:a,onClick:()=>o({view:"harnesses"})})},j.id))]})]}),M&&t.jsxs("div",{className:"hd-card hd-card--heartrate",children:[t.jsxs("div",{className:"hd-card-head",children:[t.jsxs("div",{className:"hd-card-head-left",children:[t.jsx(_,{size:12,className:"hd-heartrate-icon","aria-hidden":"true"}),t.jsx("span",{className:"label-xs hd-card-title",children:"Fleet Velocity"})]}),t.jsxs("div",{className:"hd-card-head-right",children:[t.jsxs("span",{className:"label-xs hd-card-sub",children:[h," ",b?`· ${b}`:""]}),t.jsxs("span",{className:"chip chip--working chip--mono chip--sm",children:[L," ",L===1?"Event":"Events"]})]})]}),t.jsx("div",{className:"hd-heartrate-plot-body",children:t.jsx(X,{buckets:d})})]})]})]})}export{re as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,j as s}from"./index-BFbLvCJn.js";/* empty css */import{H as ds}from"./HarnessMark-CP-PWk2W.js";import{a as b}from"./api-DSqpVKC7.js";import{u as hs}from"./sse-BVxO0zNp.js";import{t as C}from"./time-Dhsh_2EG.js";import{C as ms}from"./compass-EmGkpxIe.js";import{F as us}from"./file-text-BOJQiS8p.js";import{L as ps}from"./layout-grid-DG2-JaPn.js";import{R as xs}from"./refresh-cw-BcqctLqo.js";import{A as H}from"./arrow-up-right-DUW1A1Hb.js";import{C as Ns}from"./cpu-DVZ_LhPn.js";import{G as fs,D as js}from"./gauge-BR5CrhRM.js";import{c as gs}from"./createLucideIcon-CKbjXlwv.js";import"./index-BWHgHrtv.js";const bs=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],ks=gs("folder-git-2",bs),vs=.8,ws=20,F="░",T="·",Ss=["▏","▎","▍","▌","▋","▊","▉"];function ys(a,r=ws){const o=Number.isFinite(a)?Math.min(1,Math.max(0,a)):0,d=Math.round(o*100);if(o<=0)return{filled:"",rest:T.repeat(r),cells:r,percent:0};const i=o*r;let h=Math.floor(i),m=Math.round((i-h)*8);return m===8&&(h+=1,m=0),h>=r?{filled:F.repeat(r),rest:"",cells:r,percent:d}:m===0?h===0?{filled:"▏",rest:T.repeat(r-1),cells:r,percent:d}:{filled:F.repeat(h),rest:T.repeat(r-h),cells:r,percent:d}:{filled:F.repeat(h)+Ss[m-1],rest:T.repeat(r-h-1),cells:r,percent:d}}function S(a){return a.kind==="status"||typeof a.fill!="number"||!Number.isFinite(a.fill)?null:Math.min(1,Math.max(0,a.fill))}function _(a){const r=S(a);return r!==null&&r>=vs}function J(a){return S(a)===0}function $s(a){if(a===null)return{verdict:"Reading",figures:"provider budgets still arriving",showGauges:!1,near:[],unused:0,configured:0,peakPercent:null};if(a.length===0)return{verdict:"All clear",figures:"no provider budgets reported",showGauges:!1,near:[],unused:0,configured:0,peakPercent:null};const r=[...a].filter(_).sort((v,D)=>(S(D)??0)-(S(v)??0)),o=a.filter(J).length,d=a.map(S).filter(v=>v!==null),i=d.length>0?Math.round(Math.max(...d)*100):null,h=a.length-o;let m;r.length>0?m=`${r.length} near ceiling`:h===0?m="Unused":m=`Peak ${i??0}%`;const f=[r.length>0?r.map(v=>`${v.label} ${Math.round((S(v)??0)*100)}%`).join(" · "):null,`${a.length} configured`,o>0&&h>0?`${o} unused`:null].filter(Boolean).join(" · ");return{verdict:m,figures:f,showGauges:!0,near:r,unused:o,configured:a.length,peakPercent:i}}function Es(a,r){if(!a)return r||"process";if(a.includes("--append-system-prompt")){const o=a.match(/session-[a-zA-Z0-9_-]+/);return o?`${r||"harness"} (relay ${o[0]})`:`${r||"harness"} (prompted relay)`}return a.length>70?`${a.slice(0,67)}...`:a}function I(a){if(!a)return"workspace";const r=a.replace(/\/+$/,"").split("/");return r[r.length-1]||a}function Rs(a){if(!a)return;const[r,o]=a.includes("-")?a.split("-"):["0",a],d=o.split(":").map(f=>Number.parseInt(f,10));if(d.length<2||d.some(f=>!Number.isFinite(f)))return;const[i,h,m]=d.length===3?d:[0,d[0],d[1]];return((Number.parseInt(r,10)||0)*24+i)*3600+h*60+m}function Z(a){if(a<60)return`${Math.round(a)}s`;const r=Math.floor(a/60);if(r<60)return`${r}m`;const o=Math.floor(r/60),d=r%60;return o<24?d?`${o}h${String(d).padStart(2,"0")}m`:`${o}h`:`${Math.floor(o/24)}d${o%24}h`}function As(a){const r=a.split("/").filter(Boolean);return r[r.length-1]||a}const X={stalled_relay:"relay",idle_process:"process",uncommitted_branch:"branch",unresumed_session:"session"};function Ps({gauge:a}){const r=S(a),o=_(a),d=J(a),i=ys(r??0),h=r!==null,m=o?"warn":d||!h?"unused":"ok",f=d?"UNUSED":a.resetAt?`RESET ${C(a.resetAt)}`:a.statusLabel||a.usedLabel||"";return s.jsxs("div",{className:`s-host-rack-row ${o?"s-host-rack-row--warn":""} ${d||!h?"s-host-rack-row--unused":""}`,children:[s.jsx("span",{className:"s-host-rack-name font-mono",children:a.label}),s.jsxs("span",{className:`s-host-gauge s-host-gauge--${m}`,role:"meter","aria-label":h?`${a.label} ${i.percent} percent`:`${a.label} ${a.statusLabel||"no quota"}`,"aria-valuemin":h?0:void 0,"aria-valuemax":h?100:void 0,"aria-valuenow":h?i.percent:void 0,children:[s.jsx("span",{className:"s-host-gauge-chrome","aria-hidden":"true",children:"["}),s.jsx("span",{className:"s-host-gauge-fill","aria-hidden":"true",children:i.filled}),s.jsx("span",{className:"s-host-gauge-rest","aria-hidden":"true",children:i.rest}),s.jsx("span",{className:"s-host-gauge-chrome","aria-hidden":"true",children:"]"})]}),s.jsx("span",{className:`s-host-rack-right font-mono ${o?"s-host-rack-age--warn":""} ${d||!h?"s-host-rack-dim":""}`,children:h?`${i.percent}%`:"—"}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono s-host-rack-truncate",children:f})]})}function Js({navigate:a,agents:r}){const[o,d]=c.useState(null),[i,h]=c.useState(null),[m,f]=c.useState(null),[v,D]=c.useState(null),[z,ss]=c.useState(null),[L,es]=c.useState(null),[O,ts]=c.useState([]),[Ms,as]=c.useState(null),[V,ns]=c.useState([]),[Ts,rs]=c.useState([]),[Is,K]=c.useState(!0),[E,W]=c.useState(!1),[Cs,os]=c.useState(Date.now()),[G,Y]=c.useState("inquiry"),[ls,Ds]=c.useState(!1),[Ls,Os]=c.useState({"q-attention":!0,"q-dropped":!0,"q-quotas":!0,"q-posture":!0}),R=c.useCallback(async(e=!1)=>{e?W(!0):K(!0);try{const[t,n,l,k,P,p,N,M,B,q]=await Promise.allSettled([b("/.host-info"),b("/api/build"),b("/api/service-budgets"),b("/api/tail/discover"),b("/api/knowledge/status"),b("/api/pairing-state"),b("/api/terminal-sessions"),b("/api/fleet"),b("/api/sessions"),b("/api/activity")]);t.status==="fulfilled"&&d(t.value),n.status==="fulfilled"&&h(n.value),l.status==="fulfilled"?f(l.value?.gauges??[]):l.status==="rejected"&&f([]),k.status==="fulfilled"&&D(k.value),P.status==="fulfilled"&&ss(P.value),p.status==="fulfilled"&&es(p.value),N.status==="fulfilled"&&N.value?.sessions&&ts(N.value.sessions),M.status==="fulfilled"&&as(M.value),B.status==="fulfilled"&&Array.isArray(B.value)&&ns(B.value),q.status==="fulfilled"&&Array.isArray(q.value)&&rs(q.value),os(Date.now())}finally{K(!1),W(!1)}},[]);c.useEffect(()=>{R()},[R]),hs(()=>{R(!0)});const x=v?.processes??[],is=ls?x:x.slice(0,5);c.useMemo(()=>{const e={};for(const t of r){const n=t.harness||"other";e[n]||(e[n]={total:0,active:0}),e[n].total+=1,t.state==="working"&&(e[n].active+=1)}for(const t of x){const n=t.harness||"other";e[n]||(e[n]={total:0,active:0}),e[n].total=Math.max(e[n].total,1),e[n].active=Math.max(e[n].active,1)}return e},[r,x]);const $=c.useMemo(()=>{const e=new Map;for(const t of r){const n=t.projectRoot||t.cwd||"unknown";e.has(n)||e.set(n,{root:n,name:I(n),agents:[],branches:new Set,processes:[]});const l=e.get(n);l.agents.push(t),t.branch&&l.branches.add(t.branch)}for(const t of x)if(t.cwd)for(const[n,l]of e.entries())(t.cwd.startsWith(n)||n.startsWith(t.cwd))&&l.processes.push(t);return Array.from(e.values())},[r,x]),w=c.useMemo(()=>{const e=$.reduce((p,N)=>p+Math.max(1,N.agents.length+N.processes.length*3),0),t=$.map(p=>{const N=Math.max(1,p.agents.length+p.processes.length*3),M=e>0?Math.round(N/e*100):0;return{...p,weight:N,percent:M,primaryBranch:Array.from(p.branches)[0]||p.name==="openscout"&&i?.gitBranch||"main"}}).sort((p,N)=>N.weight-p.weight),n=t.slice(0,5),l=t[0],k=t.slice(5),P=k.reduce((p,N)=>p+N.percent,0);return{ranked:t,topProjects:n,topProject:l,otherProjects:k,otherPercent:P,totalProjects:t.length}},[$,i]),j=c.useMemo(()=>{const e=[];for(const t of x)if(t.command&&t.command.includes("--append-system-prompt")){const n=t.command.match(/session-[a-zA-Z0-9_-]+/),l=n?n[0]:`PID ${t.pid}`;e.push({id:`relay-${t.pid}`,kind:"stalled_relay",title:l,subtitle:`Launched in ${I(t.cwd)} · PID ${t.pid} · Runtime ${t.etime||"active"}`,ageLabel:t.etime||"active",ageSeconds:Rs(t.etime),projectRoot:t.cwd||void 0,harness:t.harness,pid:t.pid,severity:"warn",actionLabel:"Tail Process",actionRoute:{view:"ops",mode:"mission"}})}i?.gitBranch&&i.gitBranch!=="main"&&e.push({id:"branch-divergence",kind:"uncommitted_branch",title:i.gitBranch,subtitle:`Local worktree is ahead with uncommitted edits on ${i.runtime?.platform||"darwin"}`,ageLabel:"Unmerged",projectRoot:"/Users/art/dev/openscout",severity:"neutral",actionLabel:"Inspect Repos",actionRoute:{view:"repos"}});for(const t of V.slice(0,4))t.lastMessageAt&&Date.now()-t.lastMessageAt>3600*1e3&&e.push({id:`session-${t.id}`,kind:"unresumed_session",title:t.title||t.id,subtitle:`Last turn recorded ${C(t.lastMessageAt)} · ${t.messageCount} messages · ${I(t.workspaceRoot)}`,ageLabel:C(t.lastMessageAt),ageSeconds:(Date.now()-t.lastMessageAt)/1e3,conversationId:t.id,projectRoot:t.workspaceRoot||void 0,harness:t.harness||void 0,severity:"info",actionLabel:"Open Chat",actionRoute:{view:"conversation",conversationId:t.id}});return e},[x,i,V]),g=c.useMemo(()=>m?.length?[...m].sort((e,t)=>(t.fill??0)-(e.fill??0))[0]:null,[m]),u=c.useMemo(()=>{const e=w.ranked;if(e.length===0)return null;const t=e[0].percent,n=w.otherProjects;return{verdict:t>=50?"Concentrated":t>=25?"Weighted":"Scattered",topPercent:t,tailPercent:w.otherPercent,tailCount:n.length,tailAgents:n.reduce((l,k)=>l+k.agents.length,0),tailProcesses:n.reduce((l,k)=>l+k.processes.length,0),aboveTen:e.filter(l=>l.percent>=10).length}},[w]),y=c.useMemo(()=>{const e=j.reduce((n,l)=>(n[l.kind]=(n[l.kind]??0)+1,n),{}),t=j.map(n=>n.ageSeconds).filter(n=>typeof n=="number").sort((n,l)=>l-n)[0];return{verdict:j.length===0?"Nothing unattended":`${j.length} unattended`,byKind:e,oldestLabel:t?Z(t):null}},[j]),U=c.useMemo(()=>$s(m),[m]),A=c.useMemo(()=>{const e=O.length,t=z?.indexedSessions??0,n=L?.trustedPeerCount??0,l=o?.brokerUrl||(o?.ports?.broker?`127.0.0.1:${o.ports.broker}`:null);return[{key:"broker",label:"broker",detail:l?[l,o?.brokerSocketPath?As(o.brokerSocketPath):null].filter(Boolean).join(" · "):"endpoint not reported",state:l?"UP":"UNKNOWN",tone:l?"ok":"unknown"},{key:"pty",label:"pty relay",detail:e>0?`${e} socket${e===1?"":"s"}`:"0 sockets · latency unmeasured",state:e>0?"ACTIVE":"IDLE",tone:e>0?"ok":"idle"},{key:"knowledge",label:"knowledge",detail:t>0?`${t.toLocaleString()} transcript${t===1?"":"s"} indexed`:"0 transcripts indexed",state:t>0?"INDEXED":"EMPTY",tone:t>0?"ok":"warn",action:t>0?void 0:{label:"Index",route:{view:"search"}}},{key:"mesh",label:"mesh",detail:n>0?`${n} trusted peer${n===1?"":"s"} · scope ${o?.advertiseScope||"mesh"}`:`no trusted peers · scope ${o?.advertiseScope||"mesh"}`,state:n>0?"PAIRED":"UNPAIRED",tone:n>0?"ok":"idle"}]},[o,O,z,L]),Q=c.useMemo(()=>{const e=A.reduce((n,l)=>(n[l.tone]=(n[l.tone]??0)+1,n),{}),t=A.filter(n=>n.tone==="warn");return{verdict:t.length>0?`${t.length} ${t.length===1?"needs":"need"} attention`:"All nominal",figures:[e.ok?`${e.ok} up`:null,e.idle?`${e.idle} idle`:null,e.warn?`${e.warn} empty`:null,e.unknown?`${e.unknown} unknown`:null].filter(Boolean).join(" · ")}},[A]);o?.nodeName||o?.hostName;const cs=i?.runtime?`${i.runtime.platform} ${i.runtime.arch} · ${i.runtime.engine} ${i.runtime.engineVersion}`:"Darwin arm64";return s.jsxs("div",{className:"s-host-view",children:[s.jsxs("header",{className:"s-host-header",children:[s.jsxs("div",{className:"s-host-header-left",children:[s.jsxs("div",{className:"s-host-header-status-line",children:[s.jsx("span",{className:"dot dot--sm dot--working dot--pulse","aria-hidden":"true"}),s.jsxs("span",{className:"label-xs s-host-mono-dim",children:["NODE: ",o?.nodeId||"local"]}),s.jsx("span",{className:"s-host-header-divider",children:"/"}),s.jsx("span",{className:"label-xs s-host-mono-dim",children:cs}),i?.gitHash&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"s-host-header-divider",children:"/"}),s.jsxs("span",{className:"label-xs s-host-mono-dim",children:["git:",i.gitHash.slice(0,7)]})]})]}),s.jsxs("h1",{className:"s-host-title",children:[s.jsx(ms,{size:22,className:"s-host-title-icon"}),s.jsx("span",{children:"Host Advisor"})]})]}),s.jsxs("div",{className:"s-host-header-right",children:[s.jsxs("div",{className:"s-host-mode-toggle",role:"group","aria-label":"Advisor Format",children:[s.jsxs("button",{type:"button",className:`s-host-mode-btn ${G==="inquiry"?"s-host-mode-btn--active":""}`,onClick:()=>Y("inquiry"),title:"Formatted Executive Inquiries & Operator Answers",children:[s.jsx(us,{size:12}),s.jsx("span",{children:"Inquiries"})]}),s.jsxs("button",{type:"button",className:`s-host-mode-btn ${G==="matrix"?"s-host-mode-btn--active":""}`,onClick:()=>Y("matrix"),title:"Compact Infrastructure Matrix",children:[s.jsx(ps,{size:12}),s.jsx("span",{children:"Matrix"})]})]}),s.jsxs("button",{type:"button",className:`btn btn--sm ${E?"btn--accent":""}`,disabled:E,onClick:()=>{R(!0)},children:[s.jsx(xs,{size:12,className:E?"s-spin":""}),s.jsx("span",{children:E?"Scanning...":"Refresh"})]})]})]}),s.jsxs("section",{className:"s-host-readouts","aria-label":"Host Readouts",children:[s.jsxs("div",{className:"s-host-readout",children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"AGENTS"}),s.jsx("span",{className:"s-host-readout-figure",children:r.length}),s.jsxs("span",{className:"label-xs s-host-readout-qual",children:[x.length," PROCESS",x.length===1?"":"ES"]})]}),s.jsxs("div",{className:"s-host-readout",children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"ROOTS"}),s.jsx("span",{className:"s-host-readout-figure",children:$.length}),s.jsx("span",{className:"label-xs s-host-readout-qual",children:u?`TOP SHARE ${u.topPercent}%`:"NONE ACTIVE"})]}),s.jsxs("div",{className:`s-host-readout ${g&&_(g)?"s-host-readout--warn":""}`,children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"PEAK BUDGET"}),s.jsx("span",{className:"s-host-readout-figure",children:g?`${Math.round((g.fill??0)*100)}%`:"—"}),s.jsx("span",{className:"label-xs s-host-readout-qual",children:g?`${g.label}${g.resetAt?` · RESET ${C(g.resetAt)}`:""}`:"NO PROVIDERS CONFIGURED"})]}),s.jsxs("div",{className:`s-host-readout ${j.length>0?"s-host-readout--flag":""}`,children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"UNATTENDED"}),s.jsx("span",{className:"s-host-readout-figure",children:j.length}),s.jsx("span",{className:"label-xs s-host-readout-qual",children:y.oldestLabel?`OLDEST ${y.oldestLabel}`:"NONE OPEN"})]}),s.jsxs("div",{className:"s-host-readout",children:[s.jsx("span",{className:"label-xs s-host-readout-label",children:"MESH PEERS"}),s.jsx("span",{className:"s-host-readout-figure",children:L?.trustedPeerCount??0}),s.jsxs("span",{className:"label-xs s-host-readout-qual",children:["SCOPE ",(o?.advertiseScope||"mesh").toUpperCase()]})]})]}),G==="inquiry"?s.jsxs("div",{className:"s-host-readings","aria-label":"Host Readings",children:[s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"01 // ATTENTION"}),s.jsx("span",{className:"s-host-reading-verdict",children:u?.verdict??"No active roots"}),s.jsx("span",{className:"s-host-reading-figures",children:u?s.jsxs(s.Fragment,{children:["top ",u.topPercent,"%",s.jsx("span",{className:"s-host-sep",children:"·"}),"tail ",u.tailPercent,"%",s.jsx("span",{className:"s-host-sep",children:"·"}),u.aboveTen," root",u.aboveTen===1?"":"s"," above 10%"]}):s.jsx(s.Fragment,{children:"no agents or processes bound to a workspace"})}),s.jsxs("button",{type:"button",className:"btn btn--sm",onClick:()=>a({view:"repos"}),children:[s.jsx("span",{children:"Repos"}),s.jsx(H,{size:10})]})]}),w.ranked.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"s-host-share-bar",children:[w.topProjects.map((e,t)=>s.jsx("div",{className:`s-host-share-seg s-host-share-seg--${Math.min(t,4)}`,style:{width:`${e.percent}%`},title:`${e.name} ${e.percent}%`,children:s.jsxs("span",{className:"s-host-share-seg-label font-mono text-2xs",children:[e.name," ",e.percent,"%"]})},e.root)),u&&u.tailCount>0&&s.jsx("div",{className:"s-host-share-seg s-host-share-seg--tail",style:{flex:1},children:s.jsxs("span",{className:"s-host-share-seg-label font-mono text-2xs",children:[u.tailCount," OTHER ROOTS — ",u.tailPercent,"%"]})})]}),s.jsxs("div",{className:"s-host-rack s-host-rack--roots",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs",children:"ROOT"}),s.jsx("span",{className:"label-xs",children:"SHARE"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"PCT"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"AGENTS"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"PROCS"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"BRANCH"})]}),w.topProjects.map(e=>s.jsxs("div",{className:"s-host-rack-row",children:[s.jsx("span",{className:"s-host-rack-name font-mono",children:e.name}),s.jsx("span",{className:"s-host-rack-track",children:s.jsx("span",{className:"s-host-rack-fill",style:{width:`${u&&u.topPercent>0?Math.round(e.percent/u.topPercent*100):0}%`}})}),s.jsxs("span",{className:"s-host-rack-right font-mono",children:[e.percent,"%"]}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:e.agents.length}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:e.processes.length}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono s-host-rack-truncate",children:e.primaryBranch})]},e.root)),u&&u.tailCount>0&&s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--tail",children:[s.jsxs("span",{className:"s-host-rack-name font-mono",children:["tail — ",u.tailCount," roots"]}),s.jsx("span",{className:"s-host-rack-track s-host-rack-track--hatch"}),s.jsxs("span",{className:"s-host-rack-right font-mono",children:[u.tailPercent,"%"]}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:u.tailAgents}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:u.tailProcesses}),s.jsxs("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:["each below ",w.topProjects.at(-1)?.percent??0,"%"]})]})]})]})]}),s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"02 // UNATTENDED"}),s.jsx("span",{className:"s-host-reading-verdict",children:y.verdict}),s.jsx("span",{className:"s-host-reading-figures",children:j.length>0?s.jsxs(s.Fragment,{children:[y.oldestLabel&&s.jsxs(s.Fragment,{children:["oldest ",y.oldestLabel,s.jsx("span",{className:"s-host-sep",children:"·"})]}),Object.entries(y.byKind).map(([e,t])=>`${t} ${X[e]??e}`).join(" · "),s.jsx("span",{className:"s-host-sep",children:"·"}),"of ",x.length," processes"]}):s.jsx(s.Fragment,{children:"no idle relays, diverged branches or stale conversations"})})]}),j.length>0&&s.jsxs("div",{className:"s-host-rack s-host-rack--unattended",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs"}),s.jsx("span",{className:"label-xs",children:"SIGNAL"}),s.jsx("span",{className:"label-xs",children:"ROOT"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"REF"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"AGE"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"ACTION"})]}),j.map(e=>s.jsxs("div",{className:"s-host-rack-row",children:[s.jsx("span",{className:`dot dot--sm ${e.severity==="warn"?"dot--warning":"dot--neutral"}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-host-rack-name font-mono s-host-rack-truncate",children:e.title}),s.jsx("span",{className:"s-host-rack-dim font-mono s-host-rack-truncate",children:e.projectRoot?I(e.projectRoot):"—"}),s.jsx("span",{className:"s-host-rack-right s-host-rack-dim font-mono",children:e.pid?`pid ${e.pid}`:X[e.kind]??e.kind}),s.jsx("span",{className:`s-host-rack-right font-mono s-host-rack-age ${e.severity==="warn"?"s-host-rack-age--warn":""}`,children:e.ageSeconds?Z(e.ageSeconds):e.ageLabel}),s.jsx("span",{className:"s-host-rack-right s-host-rack-actions",children:e.actionRoute&&s.jsx("button",{type:"button",className:"btn btn--sm",onClick:()=>e.actionRoute&&a(e.actionRoute),children:e.actionLabel})})]},e.id))]})]}),s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"03 // BUDGETS"}),s.jsx("span",{className:"s-host-reading-verdict",children:U.verdict}),s.jsx("span",{className:"s-host-reading-figures",children:U.figures}),s.jsxs("button",{type:"button",className:"btn btn--sm",onClick:()=>a({view:"harnesses"}),children:[s.jsx("span",{children:"Providers"}),s.jsx(H,{size:10})]})]}),U.showGauges&&m&&s.jsxs("div",{className:"s-host-rack s-host-rack--budgets",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs",children:"PROVIDER"}),s.jsx("span",{className:"label-xs",children:"GAUGE"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"PCT"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"NOTE"})]}),m.map(e=>s.jsx(Ps,{gauge:e},e.id))]})]}),s.jsxs("article",{className:"s-host-reading",children:[s.jsxs("div",{className:"s-host-reading-head",children:[s.jsx("span",{className:"label-xs s-host-reading-num",children:"04 // SUBSYSTEMS"}),s.jsx("span",{className:"s-host-reading-verdict",children:Q.verdict}),s.jsx("span",{className:"s-host-reading-figures",children:Q.figures})]}),s.jsxs("div",{className:"s-host-rack s-host-rack--subsystems",children:[s.jsxs("div",{className:"s-host-rack-row s-host-rack-row--head",children:[s.jsx("span",{className:"label-xs"}),s.jsx("span",{className:"label-xs",children:"SUBSYSTEM"}),s.jsx("span",{className:"label-xs",children:"DETAIL"}),s.jsx("span",{className:"label-xs s-host-rack-right",children:"STATE"})]}),A.map(e=>s.jsxs("div",{className:"s-host-rack-row",children:[s.jsx("span",{className:`dot dot--sm s-host-dot--${e.tone}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-host-rack-name font-mono",children:e.label}),s.jsx("span",{className:"s-host-rack-dim font-mono s-host-rack-truncate",children:e.detail}),s.jsxs("span",{className:"s-host-rack-right s-host-rack-actions",children:[e.action&&s.jsx("button",{type:"button",className:"btn btn--sm s-host-btn-accent",onClick:()=>e.action&&a(e.action.route),children:e.action.label}),s.jsx("span",{className:`chip chip--sm chip--mono s-host-state s-host-state--${e.tone}`,children:e.state})]})]},e.key))]})]})]}):s.jsxs("div",{className:"s-host-matrix-container",children:[s.jsxs("section",{className:"s-host-telemetry-grid","aria-label":"Host Telemetry Overview",children:[s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"REGISTERED AGENTS"}),s.jsx(Ns,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:r.length}),s.jsxs("span",{className:"s-host-stat-kicker",children:[x.length," background processes"]})]})]}),s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"SERVICE QUOTA RADAR"}),s.jsx(fs,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:g?`${Math.round((g.fill??0)*100)}%`:"Nominal"}),s.jsx("span",{className:"s-host-stat-kicker",children:"peak token consumption"})]})]}),s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"WORKSPACES & REPOS"}),s.jsx(ks,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:$.length}),s.jsx("span",{className:"s-host-stat-kicker",children:"registered project roots"})]})]}),s.jsxs("div",{className:"s-host-stat-box",children:[s.jsxs("div",{className:"s-host-stat-head",children:[s.jsx("span",{className:"label-xs s-host-stat-label",children:"SUBSYSTEM RELAYS"}),s.jsx(js,{size:13,className:"s-host-stat-icon"})]}),s.jsxs("div",{className:"s-host-stat-body",children:[s.jsx("span",{className:"s-host-stat-big",children:O.length}),s.jsx("span",{className:"s-host-stat-kicker",children:"live terminal relays"})]})]})]}),s.jsxs("section",{className:"s-host-block","aria-label":"Active Processes",children:[s.jsx("div",{className:"s-host-block-head",children:s.jsxs("span",{className:"label-xs",children:["ACTIVE HARNESS PROCESSES (",x.length,")"]})}),s.jsx("div",{className:"s-host-table-box",children:s.jsx("div",{className:"s-host-table",children:is.map(e=>s.jsxs("div",{className:"s-host-table-row",children:[s.jsxs("div",{className:"s-host-table-cell-main",children:[s.jsx("span",{className:"dot dot--sm dot--working dot--pulse","aria-hidden":"true"}),s.jsx(ds,{harness:e.harness,size:13}),s.jsx("span",{className:"font-semibold text-xs font-mono",children:Es(e.command,e.harness)}),s.jsxs("span",{className:"chip chip--sm chip--ghost chip--mono",children:["PID ",e.pid]}),e.etime&&s.jsx("span",{className:"chip chip--sm chip--ghost chip--mono",children:e.etime})]}),s.jsx("div",{className:"s-host-table-cell-action",children:s.jsxs("button",{type:"button",className:"btn btn--sm",onClick:()=>a({view:"ops",mode:"mission"}),children:[s.jsx("span",{children:"Tail"}),s.jsx(H,{size:10})]})})]},e.pid))})})]})]})]})}export{Js as HostAdvisorView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,j as e}from"./index-BFbLvCJn.js";import{c as p,C}from"./chat-api-BHGHALv2.js";import{useScoutStandaloneTheme as J,ChatSpaceTheme as v}from"./ChatSpaceTheme-DPzYpw-v.js";import{i as L,r as F}from"./chat-space-model-aW3Fd8_U.js";import"./api-DSqpVKC7.js";import"./theme-vars-DNK0nn3k.js";const E="scout.chat.invite.displayName";function M(){try{return window.localStorage.getItem(E)??""}catch{return""}}function P(s){try{window.localStorage.setItem(E,s)}catch{}}function q({token:s}){const o=J(),[t,T]=a.useState(null),[j,I]=a.useState(null),[k,f]=a.useState(null),[R,x]=a.useState(!0),[r,$]=a.useState(()=>M()),[b,d]=a.useState(null),[N,g]=a.useState(!1);a.useEffect(()=>{let n=!1;return x(!0),Promise.allSettled([p.invitePreview(s),p.me()]).then(c=>{if(n)return;const[u,y]=c;if(u.status==="fulfilled")T(u.value),f(null);else{const S=u.reason;f(S instanceof C?S.message:"This invitation link could not be checked.")}y.status==="fulfilled"&&I(y.value.member),x(!1)}),()=>{n=!0}},[s]);const h=a.useCallback(n=>{window.location.href=`/chat?channel=${encodeURIComponent(n)}`},[]),w=a.useCallback(async()=>{if(!t)return;const n=r.trim();if(!n){d("A name is required to join.");return}g(!0),d(null);try{const c=await p.joinInvite(s,n);P(n),h(c.conversationId)}catch(c){d(c instanceof C?c.message:"Joining did not work. Try again."),g(!1)}},[r,h,t,s]);if(R)return e.jsx(v,{theme:o,className:"chat-centered",children:e.jsx("p",{className:"chat-card-meta",children:"Checking this invitation…"})});if(!t)return e.jsx(v,{theme:o,className:"chat-centered",children:e.jsxs("div",{className:"chat-card",children:[e.jsx("span",{className:"chat-card-eyebrow",children:"Scout Chat"}),e.jsx("h1",{children:"This invitation is not valid"}),e.jsx("p",{children:k??"This invitation link is not valid."})]})});const A=!!(j&&j.channelIds.includes(t.channel.id)),m=t.inviter?.displayName?.trim()||null,i=L({channelTitle:t.channel.title,invite:t.invite,inviterName:m,alreadyMember:A}),l=F(t.invite.route,t.reachability??null);return e.jsx(v,{theme:o,className:"chat-centered",children:e.jsxs("div",{className:"chat-card",children:[e.jsx("span",{className:"chat-card-eyebrow",children:`Scout Chat on ${t.invite.route.host}`}),e.jsx("h1",{children:i.channelTitle??t.channel.title}),t.channel.topic?e.jsx("p",{children:t.channel.topic}):null,e.jsx("p",{className:"chat-card-meta",children:[m?`Invited by ${m}`:null,`${t.channel.memberCount} in this channel`].filter(Boolean).join(" · ")}),i.mode==="closed"?e.jsx("p",{children:i.message}):i.mode==="open"?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"btn btn--accent",onClick:()=>h(t.channel.id),children:i.cta}),e.jsx("p",{className:"chat-card-note",children:i.note})]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"chat-card-field",children:[e.jsx("span",{className:"label-md",children:"Join as"}),e.jsx("input",{className:"chat-input",value:r,autoFocus:!0,placeholder:"Your name","aria-label":"Your name",onChange:n=>$(n.target.value),onKeyDown:n=>{n.key==="Enter"&&(n.preventDefault(),w())}})]}),b?e.jsx("p",{className:"chat-card-error",children:b}):null,e.jsx("button",{type:"button",className:"btn btn--accent",disabled:N||r.trim().length===0,onClick:()=>{w()},children:N?"Joining…":i.cta}),e.jsx("p",{className:"chat-card-note",children:i.note})]}),e.jsx("p",{className:"chat-card-note",children:`${l.state} — ${l.line}`}),l.caveat?e.jsx("p",{className:"chat-card-note",children:l.caveat}):null]})})}export{q as InviteLandingScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p,j as e}from"./index-BFbLvCJn.js";import{u as S}from"./keyboard-nav-CEe-ApvZ.js";import{C as U}from"./chat-api-BHGHALv2.js";import{a as A,u as E}from"./chat-transport-CtxnPLMU.js";import{CopyAction as P}from"./ChatBits-Cq54CmyB.js";import{c as w,D as _,j as F,r as z}from"./chat-space-model-aW3Fd8_U.js";import{U as D,C as O}from"./users-BQPEIUfd.js";import{B as C}from"./bot-BNv_ZJzi.js";import{c as f}from"./createLucideIcon-CKbjXlwv.js";import{M as B}from"./monitor-M0VSmHQ-.js";import"./api-DSqpVKC7.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-B-FbWI7a.js";import"./chat-message-markup-esR-YLtN.js";import"./message-markup-BQW5jdJw.js";import"./ChatAvatar-BsAOShUr.js";import"./SpriteAvatar-D53GaaK3.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";const K=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],R=f("globe",K);const q=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],H=f("link-2",q);const $=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],L=f("webhook",$),W={teammate:{ariaLabel:"Teammate invitation",heading:"Make room for a teammate",explain:"Share a link. They join in their browser and can bring their own agent.",mintLabel:"Create invite link",preMintNote:"They choose their own name when they join.",copyLabel:"Copy invite link",copiedLabel:"Link copied",postCopyNote:"Send it to your teammate.",metaFacts:"Reusable link",previewLabel:"Preview invite link"},agent:{ariaLabel:"Agent invitation",heading:"Bring your agent into the conversation",explain:"Bring an agent you already have running. Its session and workspace stay right where they are.",mintLabel:"Create agent invitation",preMintNote:"You’ll get instructions to paste into your agent’s chat.",copyLabel:"Copy agent instructions",copiedLabel:"Instructions copied",postCopyNote:"Paste into your agent’s current chat.",metaFacts:"One agent · Joins as yours",previewLabel:"Preview agent instructions"},api:{ariaLabel:"No-install agent invitation",heading:"Invite an agent with nothing installed",explain:"For an agent that can make HTTP requests and nothing else. It joins over plain HTTP, reads the room by polling, and posts its replies — it can’t be woken or sent tracked asks.",mintLabel:"Create no-install invitation",preMintNote:"You’ll get one instruction to paste into any agent’s chat.",copyLabel:"Copy no-install instructions",copiedLabel:"Instructions copied",postCopyNote:"Paste into the agent’s chat. It joins over HTTP — nothing to install.",metaFacts:"One agent · Reads by polling",previewLabel:"Preview no-install instructions"}};function Y({invite:a}){const n=z(a.invite.route,a.reachability??null),r=a.invite.route.reachability,s=n.remoteUsable?R:r==="local_only"?B:O,c=n.remoteUsable?"Works through your Scout network.":r==="local_only"?"Use this link on this Mac. It cannot be opened on another machine.":r==="lan"?"Use this link on the same local network.":"Other machines may not be able to open this link.";return e.jsxs("div",{className:"chat-invite-connection","data-restricted":!n.remoteUsable,children:[e.jsx(s,{size:16,"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("p",{className:"chat-invite-connection-title",children:n.remoteUsable?"Network invitation":r==="local_only"?"This Mac only":r==="lan"?"Same network only":"Connection not verified"}),e.jsx("p",{children:c}),e.jsxs("details",{className:"chat-invite-details",children:[e.jsx("summary",{children:"Connection details"}),e.jsxs("p",{children:[n.state," — ",n.line]}),n.caveat?e.jsx("p",{children:n.caveat}):null]})]})]})}function V({kind:a,channel:n,inviterName:r,invite:s,error:c,pending:d,onMint:y}){const b=Date.now(),[h,l]=p.useState(!1),i=W[a],x=a==="teammate"?H:a==="agent"?C:L,g=s?_({kind:a,channelTitle:n.title,channelTopic:n.topic??null,inviterName:r,inviteUrl:s.inviteUrl,agentInstructionsUrl:s.agentInstructionsUrl}):null,u=a==="teammate"?s?.inviteUrl:g;return e.jsxs("section",{className:"chat-sheet-sec","aria-label":i.ariaLabel,children:[e.jsx("h3",{className:"chat-invite-heading",children:i.heading}),e.jsx("p",{className:"chat-sheet-explain",children:i.explain}),c?e.jsx("p",{className:"chat-sheet-error",role:"alert",children:c}):null,s&&g&&u?e.jsxs(e.Fragment,{children:[e.jsx(Y,{invite:s}),e.jsxs("div",{className:"chat-invite-primary",children:[e.jsx(P,{value:u,label:i.copyLabel,copiedLabel:i.copiedLabel,className:"btn btn--accent chat-invite-copy",onCopyFailed:()=>l(!0)}),e.jsx("p",{className:"chat-invite-next",children:i.postCopyNote})]}),e.jsxs("p",{className:"chat-invite-meta",children:[F(s.invite.expiresAt,b)," · ",i.metaFacts]}),e.jsxs("details",{className:"chat-invite-preview",open:h,onToggle:j=>l(j.currentTarget.open),children:[e.jsx("summary",{children:i.previewLabel}),e.jsx("div",{className:"surface-card--inset chat-copy-block",tabIndex:0,children:u}),e.jsx("p",{className:"chat-invite-meta",children:"Copy before closing. This invitation is not shown again."})]})]}):e.jsxs("div",{className:"chat-invite-primary",children:[e.jsxs("button",{type:"button",className:"btn btn--accent chat-invite-copy",onClick:y,disabled:d,children:[e.jsx(x,{size:16,"aria-hidden":"true"}),d?"Creating invitation…":i.mintLabel]}),e.jsx("p",{className:"chat-invite-next",children:i.preMintNote})]})]})}function ue({channel:a,space:n,viewerActorId:r,viewerName:s,onClose:c,onInvitesChanged:d}){const y=A(),b=E(),h=b.inviteKinds,[l,i]=p.useState(()=>h[0]??"teammate"),{ref:x}=S(),[g,u]=p.useState({teammate:null,agent:null,api:null}),[j,k]=p.useState({teammate:null,agent:null,api:null}),[T,N]=p.useState(null),I=p.useCallback(async t=>{N(t),k(o=>({...o,[t]:null}));try{const o=await y.createInvite(a.id,{kind:t,space:n,createdByActorId:r,...t==="agent"?{inviteeDisplayName:s,inviteeActorId:r}:{}});u(m=>({...m,[t]:o})),d()}catch(o){const m=o instanceof U?o.message:"Could not create this invitation.";k(v=>({...v,[t]:m}))}finally{N(null)}},[a.id,y,n,d,r,s]);return p.useEffect(()=>{const t=o=>{o.key==="Escape"&&c()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[c]),e.jsx("div",{className:"chat-scrim",role:"presentation",onClick:t=>{t.target===t.currentTarget&&c()},children:e.jsxs("div",{ref:x,onKeyDown:t=>{if(t.key!=="Tab")return;const o=Array.from(t.currentTarget.querySelectorAll('button:not([disabled]), a[href], summary, [tabindex="0"]')).filter(M=>M.getClientRects().length>0),m=o[0],v=o[o.length-1];t.shiftKey&&document.activeElement===m?(t.preventDefault(),v?.focus()):!t.shiftKey&&document.activeElement===v&&(t.preventDefault(),m?.focus())},tabIndex:-1,className:"chat-sheet",role:"dialog","aria-modal":"true","aria-label":`Invite to ${w(a.title)}`,children:[e.jsxs("div",{className:"chat-sheet-title",children:[e.jsx("h2",{children:`Invite to ${w(a.title)}`}),e.jsx("button",{type:"button",className:"chat-rpanel-close",style:{marginLeft:"auto"},onClick:c,"aria-label":"Close invite sheet",children:"×"})]}),h.length>1?e.jsxs("div",{className:"chat-invite-switch",role:"group","aria-label":"Who are you inviting?",children:[h.includes("teammate")?e.jsxs("button",{type:"button","aria-pressed":l==="teammate",onClick:()=>i("teammate"),children:[e.jsx(D,{size:16,"aria-hidden":"true"})," Teammate"]}):null,h.includes("agent")?e.jsxs("button",{type:"button","aria-pressed":l==="agent",onClick:()=>i("agent"),children:[e.jsx(C,{size:16,"aria-hidden":"true"})," Agent"]}):null,h.includes("api")?e.jsxs("button",{type:"button","aria-pressed":l==="api",onClick:()=>i("api"),children:[e.jsx(L,{size:16,"aria-hidden":"true"})," No install"]}):null]}):null,e.jsx(V,{kind:l,channel:a,inviterName:s,invite:g[l],error:j[l],pending:T!==null,onMint:()=>{I(l)}},l),b.inviteList?e.jsx("p",{className:"chat-sheet-foot",children:"Manage or revoke invitations in Members."}):null]})})}export{ue as InviteSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,j as r}from"./index-BFbLvCJn.js";import{MemberAvatar as f}from"./ChatAvatar-BsAOShUr.js";import{c as x,b}from"./chat-space-model-aW3Fd8_U.js";import"./SpriteAvatar-D53GaaK3.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";function E({channels:c,members:p,onPick:m,onClose:u}){const[n,h]=s.useState(""),[i,o]=s.useState(0),d=s.useRef(null);s.useEffect(()=>{d.current?.focus()},[]);const l=s.useMemo(()=>{const e=n.trim().toLowerCase(),a=[...c.map(t=>({kind:"channel",id:t.id,label:x(t.title)})),...p.map(t=>({kind:"member",id:t.actorId,label:b(t),member:t}))];return e?a.filter(t=>t.label.toLowerCase().includes(e)).slice(0,20):a.slice(0,20)},[c,p,n]);return s.useEffect(()=>{o(0)},[n]),r.jsx("div",{className:"chat-scrim",role:"presentation",onClick:e=>{e.target===e.currentTarget&&u()},children:r.jsxs("div",{className:"chat-palette",role:"dialog","aria-modal":"true","aria-label":"Jump to a channel or person",children:[r.jsx("input",{ref:d,value:n,placeholder:"Jump to a channel or person","aria-label":"Jump to a channel or person",onChange:e=>h(e.target.value),onKeyDown:e=>{if(e.key==="ArrowDown"){e.preventDefault(),o(a=>(a+1)%Math.max(1,l.length));return}if(e.key==="ArrowUp"){e.preventDefault(),o(a=>(a-1+l.length)%Math.max(1,l.length));return}if(e.key==="Enter"){e.preventDefault();const a=l[i];a&&m(a);return}e.key==="Escape"&&(e.preventDefault(),u())}}),r.jsx("div",{className:"chat-palette-list",role:"listbox",children:l.length===0?r.jsx("div",{className:"chat-palette-empty",children:"Nothing matches that."}):l.map((e,a)=>r.jsxs("button",{type:"button",role:"option","aria-selected":a===i,"data-active":a===i,className:"chat-palette-option",onMouseDown:t=>{t.preventDefault(),m(e)},children:[e.kind==="member"?r.jsx(f,{member:e.member,size:18}):r.jsx("span",{className:"chat-hash",children:"#"}),e.kind==="member"?e.label:e.label.replace(/^#/u,"")]},`${e.kind}:${e.id}`))})]})})}export{E as JumpPalette};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as e}from"./index-BFbLvCJn.js";/* empty css */import{a as re}from"./api-DSqpVKC7.js";import{J as te,ax as ae,ay as A,I as ie,az as ce,aA as de,aB as B,aC as oe,aD as J,aE as le,aF as he,aG as pe,P as ue}from"./router-CJIx83Ia.js";import{u as xe}from"./Provider-BEXAZWd9.js";import{c as P}from"./createLucideIcon-CKbjXlwv.js";import{X as me}from"./x-BcfhXYiF.js";import{C as V}from"./check-BM6QtbB7.js";import{C as D}from"./copy-C1XrY27_.js";import{E as je}from"./external-link-Df1R34rX.js";import{L as fe}from"./loader-circle-CCG7hG7z.js";const ye=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],ve=P("file-braces",ye);const ge=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],G=P("message-square-text",ge);const ke=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],we=P("radio-tower",ke);function N({text:i,query:n}){return e.jsx(e.Fragment,{children:ue(i,n).map((h,c)=>h.match?e.jsx("mark",{children:h.text},c):e.jsx("span",{children:h.text},c))})}function U(i){return i.renderedText||i.summary||i.raw}function be({record:i,role:n,query:h,expanded:c,onToggle:w}){const j=t.useRef(null),[b,f]=t.useState(!1),u=U(i),y=t.useCallback(()=>{const d=j.current;!d||c||f(d.scrollHeight>d.clientHeight+1)},[c]);return t.useEffect(()=>{y();const d=j.current;if(!d||c||typeof ResizeObserver>"u")return;const v=new ResizeObserver(y);return v.observe(d),()=>v.disconnect()},[c,y,h,u]),e.jsxs("article",{className:`ks-excerpt-turn${i.matched?" ks-excerpt-turn--matched":""}`,children:[e.jsxs("header",{children:[e.jsx("span",{children:String(i.index).padStart(4,"0")}),e.jsx("strong",{children:n}),i.matched?e.jsx("em",{children:"match"}):null]}),e.jsx("p",{ref:j,className:c?"is-expanded":void 0,children:e.jsx(N,{text:u,query:h})}),b?e.jsx("button",{type:"button",className:"ks-excerpt-turn-expand","aria-expanded":c,onClick:w,children:c?"Collapse turn":"Show full turn"}):null]})}function X({navigate:i}={}){const{selectedKnowledgeHit:n,selectedKnowledgeQuery:h,clearKnowledgeHit:c,openFilePreview:w,navigate:j}=xe(),b=i??j,[f,u]=t.useState(null),[y,d]=t.useState(!1),[v,_]=t.useState(null),[W,I]=t.useState(!1),[C,M]=t.useState(!1),[Y,K]=t.useState({}),[Z,$]=t.useState({}),o=f&&f.hitId===n?.id?f.value:null,r=n?te(n):null,g=n?ae(n):null,F=n?A(n,"project"):"",L=n?A(n,"harness"):"",p=h.trim(),z=ie(r),T=ce(r),q=r?.path??g?.path,x=n?de(n):"",E=t.useMemo(()=>o?.records.filter(s=>s.matched).sort((s,l)=>{const a=B(s)-B(l);return a!==0?a:(l.matchCount??0)-(s.matchCount??0)}).at(0)??null,[o]),R=t.useMemo(()=>oe(o?.records??[],{contextRadius:4,maxTurns:6,centerRecordIndex:E?.index}),[o,E?.index]),O=t.useMemo(()=>{const s=R.flatMap(l=>l.kind==="turn"?[l.record.index]:l.records.map(a=>a.index));return s.length>0?[Math.min(...s),Math.max(...s)]:null},[R]),ee=o?.records.find(s=>s.matched)?.index??r?.recordRange?.[0];t.useEffect(()=>{K({}),$({}),M(!1),I(!1)},[n?.id]),t.useEffect(()=>{let s=!1;return(async()=>{if(u(null),_(null),!n||!r){d(!1);return}d(!0);try{const a=await re("/api/knowledge/source-preview",{method:"POST",body:JSON.stringify({sourceRef:r,contextRecords:4,maxRecords:80,q:p})});s||u({hitId:n.id,value:a})}catch(a){s||(u(null),_(a instanceof Error?a.message:String(a)))}finally{s||d(!1)}})(),()=>{s=!0}},[n?.id,r?.recordRange?.[0],r?.recordRange?.[1],p]);const se=t.useCallback(()=>{const s=r??g;s&&w(J(s.path))},[r,g,w]),H=t.useCallback(async()=>{if(x)try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(x);else if(typeof document<"u"){const s=document.createElement("textarea");s.value=x,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}M(!0),window.setTimeout(()=>M(!1),1600)}catch{}},[x]);return e.jsxs("div",{className:"ks-inspector",children:[v?e.jsx("div",{className:"ks-inspector-error",role:"alert",children:v}):null,e.jsx("section",{className:"ks-preview-panel","aria-label":"Selected search result preview",children:n?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"ks-preview-head",children:[e.jsxs("div",{children:[e.jsx("span",{className:"ks-panel-eyebrow",children:"Result"}),e.jsx("h2",{children:n.title})]}),e.jsx("button",{type:"button","aria-label":"Clear selected result",onClick:c,className:"ks-preview-close",children:e.jsx(me,{size:14,"aria-hidden":"true"})})]}),e.jsxs("div",{className:"ks-preview-meta",children:[F?e.jsx("span",{children:F}):null,L?e.jsx("span",{children:L}):null,n.freshness&&n.freshness!=="unknown"&&e.jsx("span",{children:n.freshness}),r?.recordRange?e.jsxs("span",{children:["records ",r.recordRange[0],"..",r.recordRange[1]]}):null]}),z||T||r||g||x?e.jsxs("div",{className:"ks-preview-actions","aria-label":"Selected result actions",children:[z?e.jsxs("button",{type:"button",className:"ks-action-primary",onClick:()=>b({view:"sessions",sessionId:z}),children:[e.jsx(G,{size:13,"aria-hidden":"true"}),"Open conversation"]}):null,T?e.jsxs("button",{type:"button",onClick:()=>b({view:"ops",mode:"tail",tailQuery:T}),children:[e.jsx(we,{size:13,"aria-hidden":"true"}),"Observe window"]}):null,x?e.jsxs("button",{type:"button",onClick:()=>{H()},children:[C?e.jsx(V,{size:13,"aria-hidden":"true"}):e.jsx(D,{size:13,"aria-hidden":"true"}),C?"Copied":"Copy ref"]}):null,r||g?e.jsxs("button",{type:"button",onClick:se,children:[e.jsx(je,{size:13,"aria-hidden":"true"}),"Open file"]}):null]}):null,e.jsxs("details",{className:"ks-why-matched",children:[e.jsxs("summary",{children:[e.jsx("span",{children:le(n,p,E)}),e.jsx("em",{children:he(n)})]}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Index signal"}),e.jsx("dd",{children:n.scoreSource||"fts"})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Origin"}),e.jsxs("dd",{children:[n.origin," · ",n.ownership]})]}),r?.recordRange?e.jsxs("div",{children:[e.jsx("dt",{children:"Records"}),e.jsxs("dd",{children:[r.recordRange[0],"…",r.recordRange[1]]})]}):null]})]}),y?e.jsxs("div",{className:"ks-preview-loading",children:[e.jsx(fe,{size:15,className:"ks-spin","aria-hidden":"true"}),"Loading conversation…"]}):R.length>0?e.jsxs("section",{className:"ks-conversation-excerpt","aria-label":"Conversation excerpt",children:[e.jsxs("div",{className:"ks-rendered-head",children:[e.jsx(G,{size:14,"aria-hidden":"true"}),e.jsx("strong",{children:"Conversation"}),O?e.jsxs("span",{children:["records ",O[0],"…",O[1]]}):null]}),R.map((s,l)=>{if(s.kind==="folded"){const k=s.records[0]?.index??l,S=Y[k]===!0;return e.jsxs("div",{className:"ks-excerpt-fold",children:[e.jsxs("button",{type:"button",className:"ks-excerpt-fold-toggle","aria-expanded":S,onClick:()=>K(m=>({...m,[k]:!S})),children:[e.jsx("span",{"aria-hidden":"true",children:S?"▾":"▸"}),s.summary]}),S?e.jsx("div",{className:"ks-excerpt-fold-body",children:s.records.map(m=>e.jsxs("article",{className:"ks-excerpt-turn ks-excerpt-turn--muted",children:[e.jsxs("header",{children:[e.jsx("span",{children:String(m.index).padStart(4,"0")}),e.jsx("strong",{children:pe(m)})]}),e.jsx("p",{tabIndex:0,children:e.jsx(N,{text:U(m),query:p})})]},`fold-record:${m.index}`))}):null]},`fold:${k}`)}const{record:a,role:ne}=s,Q=Z[a.index]===!0;return e.jsx(be,{record:a,role:ne,query:p,expanded:Q,onToggle:()=>$(k=>({...k,[a.index]:!Q}))},`turn:${a.index}`)})]}):e.jsxs("section",{className:"ks-indexed-snippet","aria-label":"Match snippet",children:[e.jsx("span",{children:"Match"}),e.jsx("p",{children:e.jsx(N,{text:n.snippet,query:p})})]}),q?e.jsxs("div",{className:"ks-preview-source",children:[e.jsx("span",{children:"Source"}),e.jsx("code",{children:J(q)}),e.jsxs("button",{type:"button",onClick:()=>{H()},"aria-label":"Copy source reference",children:[C?e.jsx(V,{size:12,"aria-hidden":"true"}):e.jsx(D,{size:12,"aria-hidden":"true"}),C?"Copied":"Copy ref"]})]}):null,o?e.jsxs("details",{className:"ks-jsonl-window",open:W,onToggle:s=>I(s.target.open),children:[e.jsxs("summary",{className:"ks-jsonl-window-head",children:[e.jsx("strong",{children:"Raw evidence (advanced)"}),e.jsxs("span",{children:["records ",o.previewRange[0],"..",o.previewRange[1]]})]}),o.records.map(s=>e.jsxs("details",{className:`ks-jsonl-record${s.matched?" ks-jsonl-record--matched":""}`,open:s.index===ee,children:[e.jsxs("summary",{children:[e.jsx("span",{children:String(s.index).padStart(4,"0")}),e.jsx("strong",{children:s.kind||s.role||s.type||"record"}),e.jsx("em",{children:e.jsx(N,{text:s.summary||"no summary",query:p})})]}),e.jsx("pre",{children:s.raw})]},`${o.path}:${s.index}`))]}):null]}):e.jsxs("div",{className:"ks-inspector-empty",children:[e.jsx(ve,{size:18,"aria-hidden":"true"}),e.jsx("strong",{children:"Select a result"}),e.jsx("span",{children:"Pick a match to see the conversation moment, jump to the session, or open the file."}),e.jsxs("span",{className:"ks-inspector-empty-hint",children:["Use ",e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," to walk the list, ",e.jsx("kbd",{children:"↵"})," to pick, ",e.jsx("kbd",{children:"⌘↵"})," to open the session."]})]})})]})}const Ie=Object.freeze(Object.defineProperty({__proto__:null,KnowledgeSearchInspector:X},Symbol.toStringTag,{value:"Module"})),Ke=Object.freeze(Object.defineProperty({__proto__:null,KnowledgeSearchInspector:X},Symbol.toStringTag,{value:"Module"}));export{X as K,Ke as a,Ie as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,j as e}from"./index-BFbLvCJn.js";/* empty css */import{a as _}from"./api-DSqpVKC7.js";import{d as Pe}from"./time-Dhsh_2EG.js";import{u as We}from"./Provider-BEXAZWd9.js";import{v as $e,x as Se,y as Oe,z as _e,A as Ue,B as Ne,K as k,C as ze,D as Fe,E as Be,G as Ge,H as Je,I as be,J as we,L as Xe,M as Qe,N as Ve,O as Ye,P as Ze,Q as es}from"./router-CJIx83Ia.js";import{S as ss}from"./search-Bv2IONmc.js";import{X as ts}from"./x-BcfhXYiF.js";import{L as ve}from"./loader-circle-CCG7hG7z.js";import{c as ns}from"./createLucideIcon-CKbjXlwv.js";import{S as as}from"./sparkles-Br-bA2aZ.js";import{C as is}from"./chevron-down-DEDSNJNY.js";import{C as rs}from"./clock-8tb9t2t9.js";import"./theme-vars-DNK0nn3k.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";const ls=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],os=ns("funnel",ls);function cs(t){return!!t.query.trim()&&t.hasIndex&&t.filterKey!==t.settledFilterKey&&t.filterKey!==t.failedFilterKey}const us=5*6e4;function y(t){return $e(t).toString()}let ae={status:null,results:[],lastFilterKey:"",facets:null,indexedAt:null};function Ce(){return ae}function I(t){ae={...ae,...t}}const ds=220;function N(t){return new Intl.NumberFormat("en-US").format(t||0)}function hs({text:t,query:a}){return e.jsx(e.Fragment,{children:Ze(t,a).map((c,u)=>c.match?e.jsx("mark",{children:c.text},u):e.jsx("span",{children:c.text},u))})}function ms(t,a){t.target===t.currentTarget&&(t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),a()))}async function ps(){return _("/api/knowledge/status")}async function fs(t){const a=new URLSearchParams;for(const c of t)a.append("key",c);return a.set("limit","200"),_(`/api/knowledge/search-primitives?${a.toString()}`)}async function ne(t,a){const c=new URLSearchParams({q:t,limit:String(k.hitLimit)});if(a.sourceKinds.length>0)for(const m of a.sourceKinds)c.append("sourceKind",m);for(const m of a.harness)c.append("harness",m);for(const m of a.project)c.append("project",m);const u=Ye(a.timeWindow);return u!=null&&c.set("updatedAfterMs",String(u)),_(`/api/knowledge/search?${c.toString()}`)}async function Ke(t=!1){return _("/api/knowledge/sessions/index",{method:"POST",body:JSON.stringify({days:k.days,limit:k.sessionLimit,force:t})})}const ks=Be;function R({active:t,onClick:a,count:c,label:u,ariaLabel:m}){return e.jsxs("button",{type:"button",className:`ks-chip${t?" ks-chip--active":""}`,onClick:a,"aria-pressed":t,"aria-label":m??u,children:[e.jsx("span",{className:"ks-chip-label",children:u}),typeof c=="number"?e.jsx("span",{className:"ks-chip-count","aria-hidden":"true",children:N(c)}):null]})}function qe(t){return t&&t.split(/[\s_-]+/u).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function Ee(t,a,c=6){return t?t.filter(u=>u.key===a&&u.value.length>0).sort((u,m)=>m.count-u.count||u.value.localeCompare(m.value)).slice(0,c):[]}function Ae(t){return t.sourceKinds.length>0||t.harness.length>0||t.project.length>0||t.timeWindow!=="all"}function xs(t){const a=[];return t.sourceKinds.length>0&&a.push(t.sourceKinds.map(c=>Fe[c]??c).join(" + ")),t.harness.length>0&&a.push(t.harness.map(qe).join(" + ")),t.project.length>0&&a.push(t.project.join(" + ")),t.timeWindow!=="all"&&a.push(es(t.timeWindow)),a.length>0?`Filters: ${a.join(" · ")}`:""}function ht({navigate:t,mode:a,hitId:c,routeFilters:u}){const{selectedKnowledgeHit:m,inspectKnowledgeHit:b,clearKnowledgeHit:E}=We(),D=r.useMemo(()=>u||(typeof window>"u"?Se():Oe(window.location.search)),[u]),[g]=r.useState(()=>Ce()),[q,H]=r.useState(g.status),[ie,Le]=r.useState(g.facets),[i,U]=r.useState(D),[A,re]=r.useState(()=>g.lastFilterKey&&g.lastFilterKey===y(D)?g.results:[]),[z,B]=r.useState(!1),[le,oe]=r.useState(!1),[Te,ce]=r.useState(()=>g.lastFilterKey===y(D)?y(D):null),[G,M]=r.useState(null),J=r.useRef(0),[L,P]=r.useState(!1),[X,w]=r.useState(null),[Ie,W]=r.useState(g.status!==null),[ue,de]=r.useState(g.facets!==null),v=r.useRef(i);v.current=i;const f=(q?.chunks??0)>0,$=q?.activeJobs[0]??null,C=r.useMemo(()=>_e(A),[A]),he=L||!!$,K=i.query.trim(),Q=y(i),me=cs({query:K,hasIndex:f,filterKey:Q,settledFilterKey:Te,failedFilterKey:G}),V=!!K&&(me||z),Y=Ue(i);r.useEffect(()=>{u&&U(s=>Ne(s,u)?s:u)},[u]);const x=r.useMemo(()=>{const s=[];for(const n of C)s.push(...n.moments);return s},[C]),F=r.useCallback((s,n)=>{const l=y(s);if(l!==y(v.current))return;re(n.hits),ce(l),M(null),H(n.status),I({results:n.hits,status:n.status,lastFilterKey:y(s)});const o=(c?n.hits.find(d=>d.id===c):void 0)??n.hits[0];o?b(o,s.query,s):E()},[c,b,E]),Z=r.useCallback(async s=>{const n=++J.current,l=y(s),h=()=>n===J.current&&l===y(v.current),o=s.query.trim();if(!o){re([]),ce(l),M(null),B(!1),E();return}B(!0),M(null);try{w(null);const d=await ne(o,s);h()&&F(s,d)}catch(d){h()&&(M(l),w(d instanceof Error?d.message:String(d)))}finally{n===J.current&&B(!1)}},[F,E]),pe=r.useCallback(async(s=!1)=>{P(!0);try{w(null);const n=await Ke(s);H(n.status),W(!0),I({status:n.status,indexedAt:Date.now()});const l=v.current;n.status.chunks>0&&l.query.trim()&&F(l,await ne(l.query.trim(),l))}catch(n){w(n instanceof Error?n.message:String(n))}finally{P(!1)}},[F]);r.useEffect(()=>{let s=!1;return(async()=>{let n=null;try{const o=await ps();if(s)return;n=o,H(o),W(!0),I({status:o}),w(null)}catch{}if(s)return;const{indexedAt:l}=Ce();if(!(l!==null&&Date.now()-l<us&&(n?.chunks??0)>0)){P(!0);try{w(null);const o=await Ke(!1);if(s)return;H(o.status),W(!0),I({status:o.status,indexedAt:Date.now()});const d=v.current;o.status.chunks>0&&d.query.trim()&&F(d,await ne(d.query.trim(),d))}catch(o){s||(w(o instanceof Error?o.message:String(o)),W(!0))}finally{s||P(!1)}}})(),()=>{s=!0}},[F]),r.useEffect(()=>{if(!f||ue)return;let s=!1;return(async()=>{try{const n=await fs(["harness","project","sourceKind"]);s||(Le(n),de(!0),I({facets:n}))}catch{s||de(!0)}})(),()=>{s=!0}},[f,ue]),r.useEffect(()=>{if(!V){oe(!1);return}const s=window.setTimeout(()=>oe(!0),ds);return()=>window.clearTimeout(s)},[V]),r.useEffect(()=>{if(!f)return;const s=window.setTimeout(()=>{Z(i)},k.debounceMs);return()=>window.clearTimeout(s)},[i,f,Z]);const Re=s=>{if(s.preventDefault(),!f&&!L){pe(!1);return}Z(i)},S=r.useCallback(s=>{U(n=>{const l={...n,...s};return Ne(n,l)?n:(t({view:"search",...a?{mode:a}:{},filters:l},{replace:!0}),l)})},[a,t]),T=r.useCallback(()=>{const s=Se();U(s),t({view:"search",...a?{mode:a}:{},filters:s},{replace:!0})},[a,t]),De=r.useCallback(()=>{x[0]&&b(x[0],v.current.query)},[x,b]);r.useEffect(()=>{function s(n){const l=n.target,h=l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable);if(n.key==="/"&&!h){n.preventDefault();const o=document.querySelector(".ks-search-input");o?.focus(),o?.select()}else if(n.key==="Escape"&&!h)x.length>0?E():T();else if(!h&&(n.key==="j"||n.key==="k")){if(x.length===0)return;n.preventDefault();const o=m?x.findIndex(ee=>ee.id===m.id):-1,d=n.key==="j"?Math.min(x.length-1,o+1):Math.max(0,o-1),O=x[d];O&&b(O,v.current.query)}}return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[x,b,E,m,T]);const He=q?Pe(q.generatedAt)||"just now":"—",Me=he?$?`Indexing ${N($.progress.indexed??0)} of ${N($.progress.discovered??0)}`:f?`Refreshing last ${k.days} days in the background`:`Building last ${k.days} days of sessions`:f?`${N(q?.chunks??0)} moments · last ${k.days} days · updated ${He}`:Ie?"No index yet":"Loading index",fe=Ee(ie?.facets,"harness"),ke=Ee(ie?.facets,"project");return e.jsxs("main",{className:"ks-page",children:[e.jsxs("div",{className:"ks-shell",children:[e.jsx("header",{className:"ks-header",children:e.jsxs("div",{className:"ks-header-titles",children:[e.jsx("span",{className:"ks-eyebrow",children:"Search"}),e.jsx("h1",{children:"Find anything you ran, opened, or decided"}),e.jsxs("p",{children:["Search across sessions, skills, MCP tools, codebase, and context packs from the last ",k.days," days."]})]})}),e.jsxs("form",{className:"ks-search-form",onSubmit:Re,role:"search",children:[e.jsx(ss,{size:17,strokeWidth:1.75,"aria-hidden":"true"}),e.jsx("input",{value:i.query,onChange:s=>S({query:s.target.value}),placeholder:"Search topics, files, decisions, agents…",className:"ks-search-input",spellCheck:!1,autoFocus:!0,"aria-label":"Search OpenScout knowledge"}),i.query?e.jsx("button",{type:"button",className:"ks-search-clear",onClick:()=>S({query:""}),"aria-label":"Clear search",children:e.jsx(ts,{size:14,"aria-hidden":"true"})}):e.jsx("span",{className:"ks-search-hint","aria-hidden":"true",children:"/"}),le?e.jsx(ve,{size:15,className:"ks-spin","aria-hidden":"true"}):null]}),e.jsxs("section",{className:"ks-filterbar","aria-label":"Search filters",children:[e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(os,{size:12,"aria-hidden":"true"}),"Source"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Source kind filters",children:ze.map(s=>e.jsx(R,{active:i.sourceKinds.includes(s),onClick:()=>S({sourceKinds:i.sourceKinds.includes(s)?i.sourceKinds.filter(n=>n!==s):[...i.sourceKinds,s]}),label:Fe[s]??s},s))})]}),fe.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(as,{size:12,"aria-hidden":"true"}),"Agent"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Harness filters",children:fe.map(s=>e.jsx(R,{active:i.harness.includes(s.value),onClick:()=>S({harness:i.harness.includes(s.value)?i.harness.filter(n=>n!==s.value):[...i.harness,s.value]}),label:qe(s.value),count:s.count},`harness:${s.value}`))})]}):null,ke.length>0?e.jsxs("div",{className:"ks-filterbar-row",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(is,{size:12,"aria-hidden":"true"}),"Project"]}),e.jsx("div",{className:"ks-chip-row",role:"group","aria-label":"Project filters",children:ke.map(s=>e.jsx(R,{active:i.project.includes(s.value),onClick:()=>S({project:i.project.includes(s.value)?i.project.filter(n=>n!==s.value):[...i.project,s.value]}),label:s.value,count:s.count},`project:${s.value}`))})]}):null,e.jsxs("div",{className:"ks-filterbar-row ks-filterbar-row--inline",children:[e.jsxs("span",{className:"ks-filterbar-label",children:[e.jsx(rs,{size:12,"aria-hidden":"true"}),"Time"]}),e.jsxs("div",{className:"ks-chip-row",role:"group","aria-label":"Time window filter",children:[e.jsx(R,{active:i.timeWindow==="all",onClick:()=>S({timeWindow:"all"}),label:"Any time"}),ks.map(s=>e.jsx(R,{active:i.timeWindow===s.value,onClick:()=>S({timeWindow:s.value}),label:s.label},s.value))]}),Ae(i)?e.jsx("button",{type:"button",className:"ks-clear-all",onClick:T,children:"Clear filters"}):null]})]}),X?e.jsx("section",{className:"ks-error",role:"alert",children:X}):null,!f&&!X?e.jsxs("div",{className:"ks-empty-state",children:[e.jsx("strong",{children:L?"Preparing your session index":"Preparing search"}),e.jsxs("span",{children:["First load builds the last ",k.days," days"," ","(up to ",N(k.sessionLimit)," sessions). You can keep this page open — results appear as soon as the index is ready."]})]}):null,f?e.jsxs("div",{className:"ks-hit-list",role:"listbox","aria-label":"Search results",children:[e.jsxs("div",{className:"ks-hit-list-head","aria-live":"polite",children:[e.jsx("span",{children:G===Q?"Search failed":V?"Searching…":K?`${N(C.length)} session${C.length===1?"":"s"}`:"Ready"}),K&&A.length>0?e.jsxs("span",{className:"ks-hit-list-meta",children:[N(A.length)," moment",A.length===1?"":"s",Y?e.jsxs(e.Fragment,{children:[" · ",e.jsx("button",{type:"button",className:"ks-text-action",onClick:T,children:"Clear filters"})]}):null]}):null]}),le&&C.length===0?e.jsx("div",{className:"ks-skeleton","aria-hidden":"true",children:[0,1,2].map(s=>e.jsxs("section",{className:"ks-skeleton-session",children:[e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--meta"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--goal"}),e.jsxs("div",{className:"ks-skeleton-moments",children:[e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--title"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--snippet"}),e.jsx("span",{className:"ks-skeleton-line ks-skeleton-line--snippet-short"})]})]},s))}):null,K&&C.length===0&&!me&&!z&&G!==Q?e.jsxs("div",{className:"ks-empty-hit",children:[e.jsxs("strong",{children:["No matches for “",K,"”"]}),e.jsxs("span",{children:["Try a project name, file path, or topic from recent work",Y?", or clear one of the filters above.":"."]}),e.jsxs("div",{className:"ks-empty-hit-actions",children:[e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>S({query:""}),children:"Clear query"}),Y?e.jsx("button",{type:"button",className:"ks-text-action",onClick:T,children:"Clear all filters"}):null]})]}):null,K?null:e.jsxs("div",{className:"ks-empty-hit ks-empty-hit--quiet",children:[e.jsx("strong",{children:"Start with a query"}),e.jsxs("span",{children:["Type a topic, file path, agent, or session hint. Use"," ",e.jsx("kbd",{children:"/"})," to focus this field, ",e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," to walk results, ",e.jsx("kbd",{children:"↵"})," to select, ",e.jsx("kbd",{children:"⌘↵"})," to open the session."]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:De,disabled:A.length===0,children:"Pick the first result automatically"})]}),e.jsx("div",{className:"ks-hit-list-body","aria-busy":z,children:C.map((s,n)=>{const l=s.best,h=Ge(l),o=Je(l),d=be(we(l)),O=()=>{d&&t({view:"sessions",sessionId:d})},ee=s.moments.some(j=>m?.id===j.id);return e.jsxs("section",{className:`ks-session${ee?" ks-session--selected":""}`,"aria-label":`Session ${n+1}`,children:[e.jsxs("header",{className:"ks-session-head",children:[e.jsxs("div",{className:"ks-session-topline",children:[e.jsxs("div",{className:"ks-session-meta",children:[h.agent?e.jsx("span",{className:"ks-hit-chip",children:h.agent}):null,h.project?e.jsx("span",{children:h.project}):null,h.session?e.jsxs("span",{className:"ks-hit-session",title:d??h.session,children:["session ",h.session]}):null,e.jsxs("span",{className:"ks-session-count",children:[N(s.moments.length)," match",s.moments.length===1?"":"es"]})]}),h.when?e.jsx("time",{className:"ks-hit-when",children:h.when}):null]}),e.jsx("button",{type:"button",className:"ks-session-goal",onClick:O,title:d?"Open session":void 0,children:o})]}),e.jsx("div",{className:"ks-session-moments",children:s.moments.map(j=>{const xe=Xe(j,i.query),je=m?.id===j.id,se=Qe(j,i.query,200),ye=Ve(j),te=()=>b(j,i.query),ge=()=>{const p=be(we(j))??d;if(!p){te();return}t({view:"sessions",sessionId:p})};return e.jsx("article",{className:`ks-hit${je?" ks-hit--selected":""}`,role:"option","aria-selected":je,tabIndex:0,onClick:te,onDoubleClick:ge,onKeyDown:p=>{if(p.key==="Enter"&&(p.metaKey||p.ctrlKey)){p.preventDefault(),ge();return}ms(p,te)},children:e.jsxs("div",{className:"ks-hit-body",children:[ye.length>0?e.jsx("div",{className:"ks-hit-details ks-hit-details--moment","aria-label":"Turn",children:ye.map(p=>e.jsx("span",{className:"ks-hit-details-strong",children:p},p))}):null,e.jsx("h3",{className:"ks-hit-title",children:xe}),se&&se!==xe?e.jsx("p",{className:"ks-hit-snippet",children:e.jsx(hs,{text:se,query:i.query})}):null]})},j.id)})})]},s.collectionId)})})]}):null]}),e.jsx("footer",{className:"ks-foot-status","aria-live":"polite",children:e.jsxs("div",{className:"ks-foot-status-shell",children:[e.jsxs("span",{className:"ks-foot-status-facts",children:[he?e.jsx(ve,{size:12,className:"ks-spin","aria-hidden":"true"}):null,Me,Ae(i)?e.jsxs(e.Fragment,{children:[" · ",xs(i)]}):null]}),e.jsx("button",{type:"button",className:"ks-text-action",onClick:()=>{pe(!0)},disabled:L,children:L?"Updating…":"Update index"})]})})]})}export{ht as KnowledgeSearchScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as T}from"./index-BFbLvCJn.js";import{r as j}from"./index-CXzJ_hGx.js";import{b as D,l as N}from"./lane-tool-detail-Czggx8oM.js";import"./lane-edit-display-BjdT9oZl.js";const _=140,k=100,p=320,v=4,u=8,S=7;function y(e){return(e.querySelector(".s-observe-tool")??e).getBoundingClientRect()}function F(){return document.querySelector("[data-scout-theme]")??document.body}function q(e,t){return e===t?!0:!e||!t?!1:e.top===t.top&&e.left===t.left&&e.side===t.side&&e.caretTop===t.caretTop}function W(e,t){const l=window.innerWidth,f=window.innerHeight,E=e.top+e.height/2,d=l-e.right-u,m=e.left-u,R=d>=p+v,a=m>=p+v;let c="right",s=e.right+v,o=e.top;R?(c="right",s=e.right+v):a?(c="left",s=e.left-v-p):(c="right",s=Math.max(u,Math.min(e.right+v,l-p-u)),o=e.bottom+v),o+t>f-u&&(o=Math.max(u,e.top-t+e.height)),o=Math.max(u,Math.min(o,f-t-u)),s=Math.max(u,Math.min(s,l-p-u));const x=Math.max(S+4,Math.min(E-o,t-S-4));return{top:o,left:s,side:c,caretTop:x}}function G({model:e,position:t,cardRef:l,onMouseEnter:f,onMouseLeave:E}){const d=N(e),m=e.hoverFields.find(a=>a.label==="when"),R={position:"fixed",top:t.top,left:t.left,width:p,maxWidth:p,"--hover-caret-top":`${t.caretTop}px`};return T.jsxs("div",{ref:l,className:`s-observe-tool-hover-card s-observe-tool-hover-card--side-${t.side}`,style:R,onMouseEnter:f,onMouseLeave:E,role:"tooltip",children:[T.jsx("div",{className:"s-observe-tool-hover-card-cmd",children:e.command}),m&&T.jsx("div",{className:"s-observe-tool-hover-card-meta",children:m.value}),d.slice(1).map((a,c)=>T.jsx("div",{className:"s-observe-tool-hover-card-line",children:a},c)),T.jsx("div",{className:"s-observe-tool-hover-card-hint",children:"Click row for full detail"})]})}function $(e=!0){const[t,l]=n.useState(null),[f,E]=n.useState(null),d=n.useRef(new Map),m=n.useRef(new Map),R=n.useRef(new Map),a=n.useRef(new Map),c=n.useRef(null),s=n.useRef(null),o=n.useRef(null),x=n.useRef(null);c.current=t;const L=n.useCallback(()=>{s.current&&clearTimeout(s.current),o.current&&clearTimeout(o.current),s.current=null,o.current=null},[]),I=n.useMemo(()=>{if(!e||!t)return null;const r=R.current.get(t);if(!r)return null;const i=m.current.get(t);return D(r,i)},[e,t]),M=n.useCallback(r=>{E(i=>q(i,r)?i:r)},[]),g=n.useCallback(()=>{const r=c.current;if(!r){M(null);return}const i=d.current.get(r);if(!i)return;const w=y(i),h=x.current?.offsetHeight??132;M(W(w,h))},[M]);n.useEffect(()=>()=>L(),[L]),n.useLayoutEffect(()=>{if(!t){M(null);return}g();const r=requestAnimationFrame(g);return()=>cancelAnimationFrame(r)},[t,M,g]),n.useEffect(()=>{if(!t)return;const r=()=>g();return window.addEventListener("scroll",r,!0),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",r,!0),window.removeEventListener("resize",r)}},[t,g]);const C=n.useCallback(r=>{e&&(o.current&&clearTimeout(o.current),o.current=null,c.current!==r&&(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{l(r),s.current=null},_)))},[e]),b=n.useCallback(()=>{s.current&&clearTimeout(s.current),s.current=null,c.current&&(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{l(null),o.current=null},k))},[]),A=n.useCallback((r,i)=>{R.current.set(r.id,r),m.current.set(r.id,i);let w=a.current.get(r.id);if(!w){const h=r.id;w={ref:P=>{P?d.current.set(h,P):d.current.delete(h)},onMouseEnter:()=>C(h),onMouseLeave:b,onFocus:()=>C(h),onBlur:b},a.current.set(h,w)}return w},[C,b]),H=e&&I&&f&&typeof document<"u"?j.createPortal(T.jsx(G,{model:I,position:f,cardRef:x,onMouseEnter:()=>{const r=c.current;r&&C(r)},onMouseLeave:b}),F()):null;return{bind:A,card:H,hoveredEventId:t}}export{$ as useLaneToolHoverCard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,j as t}from"./index-BFbLvCJn.js";import{S as L}from"./SlidePanel-D5oPQocF.js";import{A as j}from"./AgentAvatar-Dn8TUv5W.js";import{H as S}from"./HarnessMark-CP-PWk2W.js";import{t as N}from"./time-Dhsh_2EG.js";import{o as g,f as k,a as y}from"./lane-observe-CteDwdD-.js";import{S as A}from"./SessionObserve-Dw3bVQYF.js";import{LaneTraceEventFocus as E}from"./LaneTraceEventFocus-BRR_jcl9.js";import{b as T}from"./agent-lane-detail-Ti3trpfH.js";import{l as I,a as z}from"./agent-lanes-model-DMAdqCmK.js";import"./Provider-BEXAZWd9.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-B8Am_1DC.js";import"./lane-ask-display-BTVSakyo.js";import"./mentions-s5oW4aQU.js";import"./AgentDetailCard-CI-ufaEP.js";import"./AgentLiveActions-CkRGkv13.js";import"./terminal-takeover-CXwdoZ5j.js";import"./openContent-C6XO6kr5.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";import"./message-markup-D1C7GzHo.js";import"./message-markup-BQW5jdJw.js";import"./SessionHopMenu-DX6PJPNk.js";import"./external-link-Df1R34rX.js";import"./ObservedTopologyPanel-Ci7emnnj.js";import"./ObserveTextFlow-C0oQEerY.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./SessionObserveEvidence-uD1OX-R5.js";import"./SessionContextStrip-BoiIxXvS.js";import"./message-circle-BB3rFCVD.js";import"./wrench-C-wjicn5.js";import"./context-budget-8qFKqM-j.js";const M={think:"Thought",tool:"Tool",ask:"Request",message:"Message",note:"Note",system:"System",boot:"Boot"};function ie({target:d,onClose:n}){const{lane:i,event:e}=d,{agent:o,observe:p,source:r,lastActiveAt:a}=i,l=f.useMemo(()=>T(i),[i]),c=I(o,r),v=z(o,r),h=M[e.kind]??e.kind,u=p?.metadata?.session?.sessionStart,s=g(e,u),b=s!=null?k(s,a):void 0,x=s!=null?y(s):void 0,m=e.kind==="tool"||e.kind==="ask"?e:void 0;return t.jsxs(L,{open:!0,onClose:n,side:"right",owner:"openscout.lane-trace",layer:"elevated",resizable:!0,defaultSize:980,minSize:560,maxSize:1280,scrollLock:!0,ariaLabel:`${c} session trace`,className:"s-lane-trace-sheet",children:[t.jsxs("div",{className:"s-slide-header s-lane-trace-sheet-header",children:[t.jsx(j,{agent:o,placement:"row",size:28,presence:!1,className:"s-agent-lane-avatar"}),t.jsxs("div",{className:"s-lane-trace-sheet-header-copy",children:[t.jsx("div",{className:"s-lane-trace-sheet-title",children:c}),t.jsxs("div",{className:"s-lane-trace-sheet-sub",children:[v," · ",h,a?` · ${N(a)}`:""]})]}),t.jsx("span",{className:"s-slide-spacer"}),t.jsx(S,{harness:o.harness??l.harness,size:18,className:"s-lane-trace-sheet-hmark"}),t.jsx("button",{type:"button",className:"s-slide-close",onClick:n,"aria-label":"Close",children:"×"})]}),t.jsx("div",{className:"s-slide-body s-lane-trace-sheet-body",children:t.jsx(A,{data:p??void 0,agentId:r==="scout"?o.id:void 0,sessionId:o.harnessSessionId??l.sessionId,showRail:!0,variant:"default",initialCursorT:e.t,focusEventId:e.id,inlineFocusEventId:m?.id,inlineFocusContent:m?t.jsx(E,{event:m,wallLabel:b,wallTitle:x,variant:"inline"}):void 0})})]})}export{ie as LaneTraceDetailSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,r as o}from"./index-BFbLvCJn.js";import{i as x,l as h}from"./lane-edit-display-BjdT9oZl.js";import{b as p}from"./lane-ask-display-BTVSakyo.js";import{f as m,b as j}from"./lane-tool-detail-Czggx8oM.js";const N=new Set(["detail","output","result","diff","change"]);function f({text:c,label:t}){return e.jsx("button",{type:"button",className:"s-lane-trace-focus-copy",onClick:()=>{navigator.clipboard?.writeText(c)},title:t,"aria-label":t,children:"Copy"})}function q({event:c,wallLabel:t,wallTitle:r,variant:n="sheet"}){return c.kind==="ask"?e.jsx(v,{event:c,wallLabel:t,wallTitle:r,variant:n}):e.jsx(y,{event:c,wallLabel:t,wallTitle:r,variant:n})}function y({event:c,wallLabel:t,wallTitle:r,variant:n}){const s=o.useMemo(()=>j(c,{wallLabel:t,wallTitle:r,sessionOffset:`${m(c.t)} from start`}),[c,t,r]),{primarySection:i,secondarySections:d}=o.useMemo(()=>{if(!s)return{primarySection:null,secondarySections:[]};const a=s.sections.find(u=>N.has(u.title))??s.sections[0]??null,l=a?s.sections.filter(u=>u!==a):s.sections;return{primarySection:a,secondarySections:l}},[s]);return s?e.jsxs("section",{className:`s-lane-trace-focus${n==="inline"?" s-lane-trace-focus--inline":""}`,"aria-label":"Selected trace event",children:[e.jsxs("div",{className:"s-lane-trace-focus-eyebrow",children:[e.jsx("span",{className:"s-lane-trace-focus-eyebrow-dot","aria-hidden":!0}),n==="inline"?"Expanded at this step":"Selected command"]}),e.jsxs("div",{className:"s-lane-trace-focus-head",children:[e.jsxs("div",{className:"s-lane-trace-focus-head-copy",children:[e.jsx("div",{className:"s-lane-trace-focus-cmd",children:s.command}),x(c.tool)&&c.arg?.trim()&&(()=>{const a=h(c.arg.trim()),l=a.split("/").pop()??a;return a===l?null:e.jsx("div",{className:"s-lane-trace-focus-path",title:c.arg.trim(),children:a})})()]}),e.jsx(f,{text:s.copyText,label:"Copy event detail"})]}),s.hoverFields.length>0&&e.jsx("dl",{className:"s-lane-trace-focus-meta",children:s.hoverFields.map(a=>e.jsxs("div",{className:"s-lane-trace-focus-meta-row",children:[e.jsx("dt",{children:a.label}),e.jsx("dd",{title:a.value,children:a.value})]},a.label))}),i&&e.jsxs("div",{className:"s-lane-trace-focus-section s-lane-trace-focus-section--primary",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:i.title}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:i.content})]}),d.map(a=>e.jsxs("div",{className:"s-lane-trace-focus-section",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:a.title}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:a.content})]},a.title))]}):null}function v({event:c,wallLabel:t,wallTitle:r,variant:n}){const s=o.useMemo(()=>p(c),[c]),i=o.useMemo(()=>{const l=[...s.fields];return t&&l.unshift({label:"when",value:r?`${t} · ${r}`:t}),l.push({label:"offset",value:`${m(c.t)} from start`}),l},[s.fields,c.t,t,r]),d=s.preview&&s.preview!==s.fullText,a=s.requestText&&s.requestText!==s.fullText&&s.requestText!==s.preview;return e.jsxs("section",{className:`s-lane-trace-focus s-lane-trace-focus--ask${n==="inline"?" s-lane-trace-focus--inline":""}`,"aria-label":"Selected request",children:[e.jsxs("div",{className:"s-lane-trace-focus-eyebrow",children:[e.jsx("span",{className:"s-lane-trace-focus-eyebrow-dot","aria-hidden":!0}),n==="inline"?"Expanded at this request":"Selected request"]}),e.jsxs("div",{className:"s-lane-trace-focus-head",children:[e.jsxs("div",{className:"s-lane-trace-focus-head-copy",children:[e.jsx("div",{className:"s-lane-trace-focus-cmd",children:s.title}),d?e.jsx("div",{className:"s-lane-trace-focus-ask-preview",children:s.preview}):null]}),e.jsx(f,{text:s.copyText,label:"Copy full request"})]}),i.length>0&&e.jsx("dl",{className:"s-lane-trace-focus-meta",children:i.map(l=>e.jsxs("div",{className:"s-lane-trace-focus-meta-row",children:[e.jsx("dt",{children:l.label}),e.jsx("dd",{title:l.value,children:l.value})]},`${l.label}:${l.value}`))}),e.jsxs("div",{className:"s-lane-trace-focus-section s-lane-trace-focus-section--primary",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:"full request"}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:s.fullText})]}),a?e.jsxs("div",{className:"s-lane-trace-focus-section",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:"request preview"}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:s.requestText})]}):null,s.answer?e.jsxs("div",{className:"s-lane-trace-focus-section",children:[e.jsx("div",{className:"s-lane-trace-focus-section-title",children:s.answer.label}),e.jsx("pre",{className:"s-lane-trace-focus-section-body",children:s.answer.text})]}):null]})}export{q as LaneTraceEventFocus};
|