@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,2 +0,0 @@
|
|
|
1
|
-
import{r as a,j as r}from"./index-BFbLvCJn.js";import{j as wt,w as ya,k as Zt,l as Ws,m as wa,o as Sa,q as va,s as Us,t as Ta,u as xa,v as ba}from"./NewChatComposer-D-VB5vdt.js";import{a as q}from"./api-DSqpVKC7.js";import{uploadMediaFiles as Ca}from"./media-blobs-Bi8pxr1u.js";import"./runtime-picker-IRcTkMZ5.js";import{b as _s,u as Ma}from"./router-CJIx83Ia.js";import{u as ka}from"./ComposerAttachments-9uYp_Lh5.js";import"./index-CXzJ_hGx.js";import{b as Ia}from"./machine-scope-DJt9RZ2w.js";import{d as Aa,b as Na,e as ja,l as J,q as Vs,u as Ra,v as Me,w as Ea,x as La,y as Fa,z as $a,s as Oa,c as Ks,S as Qs,A as Pa,B as qa,C as Da,D as Ba,g as zs,E as Ha,F as Wa,k as Ua,p as _a,r as es,G as Va,H as Ka,I as Qa,J as za,K as Ja,L as Js,M as Ga,N as Ya,O as Ge,P as Xa,Q as Za,R as Gs,T as er,U as tr,V as sr,W as nr,X as Ys,Y as ar,Z as Xs,_ as rr,a as or,$ as ir,a0 as lr}from"./conversation-model-FxDeWlle.js";import{u as cr}from"./sse-BVxO0zNp.js";import{n as ts,t as St,f as Zs}from"./time-Dhsh_2EG.js";import{s as dr,h as ur,e as mr,T as en,b as hr,j as pr,k as fr,g as gr}from"./conversations-DoAAO6kA.js";import{M as yr}from"./message-markup-D1C7GzHo.js";import{a as ss,i as ns,b as wr}from"./message-visibility-DwxgcgYK.js";import{d as Sr}from"./operator-attention-DBaRg5ep.js";import{f as as,a as vr}from"./scoutbot-Bk3nyrkj.js";import{s as Tr}from"./sessionRead-CvFz2RHv.js";import{u as xr,a as br}from"./Provider-BEXAZWd9.js";import{o as Ye}from"./openContent-C6XO6kr5.js";import{c as Xe}from"./clipboard-e3fSpeo7.js";import{M as Cr}from"./MessageEmbeds-B-FbWI7a.js";import{A as rs}from"./AgentAvatar-Dn8TUv5W.js";import{d as Mr}from"./types-B0PlfpKc.js";/* empty css */import{ConversationHeader as kr,ConversationIdentityRow as Ir,AddParticipantForm as Ar}from"./ConversationHeader-L9738YVP.js";import{CommsFlowPane as Nr}from"./CommsFlowGraph-Cc48o9u_.js";import{a as jr}from"./use-beside-DopIbJwf.js";import{ConversationComposer as Rr}from"./ConversationComposer-hYtLurqy.js";import{FanOutRow as Er,ThreadDayDivider as Lr}from"./ConversationFeedRows-Bu0ZJcy8.js";import{T as Fr,t as tn,m as sn,a as $r,b as Or,o as Pr,d as qr,s as Dr,l as Br,c as Hr,e as Wr,W as Ur,f as _r,g as Vr}from"./ConversationPanels-D6KuqvGu.js";import{u as Kr}from"./tail-events-C6NWFB1N.js";import{PinnedAskCard as Qr,ConversationStatusStrip as zr,ConversationFlightOutcome as Jr}from"./ConversationStatus-BEefIbXq.js";import{S as Gr}from"./SessionContextStrip-BoiIxXvS.js";import"./createLucideIcon-CKbjXlwv.js";import"./HarnessMark-CP-PWk2W.js";import"./colors-CFlbwC25.js";import"./agent-state-DDhnFEEP.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"./loader-circle-CCG7hG7z.js";import"./file-text-BOJQiS8p.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./index-BWHgHrtv.js";import"./message-markup-BQW5jdJw.js";import"./mentions-s5oW4aQU.js";import"./AgentDetailCard-CI-ufaEP.js";import"./AgentLiveActions-CkRGkv13.js";import"./terminal-takeover-CXwdoZ5j.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";import"./theme-vars-DNK0nn3k.js";import"./surface-activity-B1rgWB1i.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"./BackToPicker-BPU7kbXq.js";import"./AstronautSuit-Dzu4GOMR.js";import"./panel-right-WKLdPm0F.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-Dh056d91.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Ckasql5e.js";import"./CommsSelection-CuphnUny.js";/* empty css */import"./use-conversation-list-CGtcpdPd.js";import"./agent-master-model-Bk_yuUXJ.js";import"./zap-BqL8ttGz.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./activity-CXkZ620t.js";import"./message-circle-BB3rFCVD.js";import"./check-BM6QtbB7.js";import"./sparkles-Br-bA2aZ.js";import"./triangle-alert-BZikHKuT.js";const ln="scout:conversations:failure-dismissals:v1",Yr=64;let is={};function cn(){try{if(typeof localStorage<"u"){const o=JSON.parse(localStorage.getItem(ln)??"null");eo(o)&&(is=ls(o))}}catch{}return ls(is)}function Xr(o){is=ls(o);try{typeof localStorage<"u"&&localStorage.setItem(ln,JSON.stringify(o))}catch{}}function nn(o){return new Set(cn()[o]??[])}function Zr(o,m){const u=cn(),S=(u[o]??[]).filter(D=>D!==m);S.push(m),u[o]=S.slice(-100);const C=Object.keys(u);for(const D of C.slice(0,Math.max(0,C.length-Yr)))delete u[D];return Xr(u),new Set(u[o])}function ls(o){return Object.fromEntries(Object.entries(o).map(([m,u])=>[m,[...u]]))}function eo(o){return!o||typeof o!="object"||Array.isArray(o)?!1:Object.values(o).every(m=>Array.isArray(m)&&m.every(u=>typeof u=="string"&&u.length>0))}function to(o){const{sessionIds:m,active:u}=o,S=m.join("|"),C=u&&m.length>0,[D,ke]=a.useState([]);return a.useEffect(()=>{ke([])},[S]),a.useEffect(()=>{if(!C)return;let G=!1;const pe=new URLSearchParams({limit:String(Fr*3),transcripts:"true"});return q(`/api/tail/recent?${pe.toString()}`).then(O=>{if(G)return;const Ie=(O.events??[]).filter(B=>tn(B,m));Ie.length!==0&&ke(B=>sn(B,Ie))}).catch(()=>{}),()=>{G=!0}},[C,S]),Kr(G=>{C&&tn(G,m)&&ke(pe=>sn(pe,[G]))},C),a.useMemo(()=>C?$r(D):[],[C,D])}const so=3500;function an(o){const m=o?.trim().replace(/^#/,"");if(!m?.startsWith("msg-"))return null;const u=m.slice(4).trim();if(!u)return null;try{return decodeURIComponent(u)}catch{return u}}const no=64;function ao(o){const m=o?.clientMessageId;return typeof m=="string"&&m.trim()?m.trim():null}function rn(o){const m=o.body.replace(/\s+/gu," ").trim();if(m)return m.length>180?`${m.slice(0,179).trimEnd()}…`:m;const u=o.attachments?.length??0;return u===1?"Attachment":u>1?`${u} attachments`:"Message"}function on(o,m){const u=o.toLocaleLowerCase().indexOf(m.toLocaleLowerCase());if(u<0)return o;const S=o.slice(0,u),C=o.slice(u+m.length);return!S&&C.startsWith(" ")?C.slice(1):S.endsWith(" ")&&C.startsWith(" ")?`${S}${C.slice(1)}`:`${S}${C}`}function ro(o){return o instanceof TypeError||typeof DOMException<"u"&&o instanceof DOMException&&o.name==="AbortError"}function zi({conversationId:o,initialDraft:m,navigate:u,embedded:S,showBackNav:C=!0,beside:D,backLabel:ke,treatment:G="standard"}){const{agents:pe,route:O,openContextCapture:Ie}=xr(),B=_s(O),T=a.useMemo(()=>Ia(pe,B),[pe,B]),[c,vt]=a.useState(null),cs=a.useRef(null);cs.current=c;const Ze=a.useMemo(()=>wt(o),[o]),[dn,un]=a.useState(()=>Ze?{[o]:Ze}:{}),y=dn[o]??Ze??[],[mn,ds]=a.useState(()=>Ze!==null),Ae=a.useRef(null),us=a.useMemo(()=>{const e=Ae.current;return e===null?null:new Set(y.filter(t=>!e.has(t.id)).map(t=>t.id))},[y]),et=Ae.current===null&&y.length>0;a.useEffect(()=>{if(y.length===0)return;const e=Ae.current??new Set;for(const t of y)e.add(t.id);Ae.current=e},[y]),a.useEffect(()=>{Ae.current=null,ds(wt(o)!==null)},[o]);const ms=!mn&&y.length===0,K=a.useCallback(e=>{un(t=>{const s=t[o]??wt(o)??[],n=typeof e=="function"?e(s):e,i=ya(o,n);return{...t,[o]:i}})},[o]),hn=Zt(o),[p,fe]=a.useState(hn),[Tt,xt]=a.useState(null),[Ne,je]=a.useState([]),[tt,bt]=a.useState(null),[st,Re]=a.useState(null),[nt,pn]=a.useState(()=>typeof window>"u"?null:an(window.location.hash)),[hs,se]=a.useState(null),[Ct,ps]=a.useState(()=>nn(o)),[ge,Mt]=a.useState(!1),[fn,Ee]=a.useState(!1),[kt,at]=a.useState(0),Le=a.useRef(null),Fe=a.useRef(null),gn=a.useRef(null),$e=a.useRef(!0),rt=a.useRef(!1),ye=a.useRef(null),M=a.useRef(null),Oe=a.useRef(new Set),Pe=a.useRef(null),fs=a.useRef(0),gs=a.useRef(null),qe=a.useRef(null),De=a.useRef(new Set),Y=a.useRef(o);Y.current=o;const ne=a.useRef(new Map),yn=Ws(o),ot=a.useRef(!1);a.useLayoutEffect(()=>{const e=Fe.current,t=Le.current;!e||!t||(t.scrollTop=e.scrollTop+(t.scrollHeight-e.scrollHeight),Fe.current=null,ot.current=!0)}),a.useEffect(()=>{Mt(!1),Fe.current=null,ot.current=!1,$e.current=!0,rt.current=!1,Ee(!1),at(0),Vt(new Set),ne.current.clear(),fe(Zt(o)),xt(null),ps(nn(o))},[o]);const it=a.useCallback(async e=>{let s=typeof e.metadata?.flightId=="string"?e.metadata.flightId.trim():"";if(!s&&e.replyToMessageId)try{s=(await q(`/api/flights?conversationId=${encodeURIComponent(o)}&active=false`)).find(i=>i.messageId===e.replyToMessageId)?.id??""}catch{}await Sr({...s?{flightId:s}:{},conversationId:o,messageId:e.replyToMessageId??e.id,itemUpdatedAt:ts(e.createdAt)??Date.now()})},[o]),ys=a.useCallback(e=>{const t=e.replyToMessageId??e.id;ps(Zr(o,e.id)),as({type:"dismiss-conversation-failure",conversationId:o,messageId:t,reason:"The operator cleared this delivery issue"});const s=`${o}:${e.id}`;De.current.add(s),it(e).catch(()=>{De.current.delete(s)})},[o,it]);a.useEffect(()=>{for(const e of y){if(!Ct.has(e.id)||!ss(e))continue;const t=`${o}:${e.id}`;De.current.has(t)||(De.current.add(t),it(e).catch(()=>{De.current.delete(t)}))}},[o,Ct,y,it]);const x=c?.agentId??null,b=c?.kind==="direct",lt=a.useMemo(()=>new Set([o,...c?.equivalentConversationIds??[]]),[o,c?.equivalentConversationIds]),_=a.useMemo(()=>x?T.find(e=>e.id===x)??null:null,[T,x]),ws=Aa(c),Ss=Na(c),wn=ja({resolvedAgentId:_?.id,sessionId:ws,machineId:B}),[It,vs]=a.useState(null);a.useEffect(()=>{q("/api/fleet").then(e=>{vs(t=>J(t,Vs(e.activeAsks,o,x)))}).catch(()=>{})},[o,x]);const R=a.useCallback(async(e={})=>{const t=e.messageMode??"none",s=e.includeMetadata??!0;se(null);try{const n=s?await q(`/api/session/${encodeURIComponent(o)}`).catch(()=>null):cs.current;if(Y.current!==o)return;vt(w=>J(w,n));const i=n?.agentId??null,l=n?.id&&n.id!==o?n.id:o;if(l!==o){u({view:"conversation",conversationId:l});return}const d=wt(l),A=wa(l),f=t==="initial"&&!A,h=t==="refresh"||t==="initial",g=Promise.all([q(`/api/flights?conversationId=${encodeURIComponent(l)}&active=false`).catch(()=>[]),q("/api/fleet?limit=24&activityLimit=160").catch(()=>Ra())]),W=await(f?Sa(l):h?va(l,{refresh:!0}):Promise.resolve(d));if(Y.current!==o)return;const j=Me(W??[]),he=j.filter(w=>!ns(w));W&&K(w=>J(w,Ea(w,he))),ds(!0),Tr(l);const N=j.at(-1);N&&qe.current!==N.id&&(qe.current=N.id,q(`/api/conversations/${encodeURIComponent(l)}/read-cursor`,{method:"POST",body:JSON.stringify({lastReadMessageId:N.id})}).catch(()=>{qe.current===N.id&&(qe.current=null)}));const[Q,V]=await g;if(Y.current!==o)return;const U=La(Q),z=Zt(l),Ce=U??z;Oe.current=new Set([...Q.map(w=>w.invocationId),...z?.invocationId?.startsWith("pending:")?[]:z?.invocationId?[z.invocationId]:[]]),U&&z?.id===U.id&&Us(l,U.id);const F=Ce?.agentId??i??null,Xt=Fa(V.activity,Ce,l,F),yt=$a(V.activeAsks,Ce,l,F);fe(w=>J(w,Ce)),xt(w=>J(w,Oa(Q))),je(w=>J(w,Xt)),Re(w=>J(w,yt)),vs(w=>J(w,Vs(V.activeAsks,l,i)))}catch(n){if(Y.current!==o)return;se(n instanceof Error?n.message:String(n))}},[o,u,K]);a.useEffect(()=>{R({messageMode:"initial"})},[R]),a.useEffect(()=>{qe.current=null},[o]),a.useEffect(()=>{Pe.current=p},[p]);const Sn=a.useCallback(async()=>{if(ge||!Ws(o))return;const e=Le.current,t=e?{scrollHeight:e.scrollHeight,scrollTop:e.scrollTop}:null;Mt(!0),se(null);try{const s=await Ta(o);if(Y.current!==o)return;t&&(Fe.current=t),K(Me(s).filter(n=>!ns(n)))}catch(s){Y.current===o&&se(s instanceof Error?s.message:String(s))}finally{Y.current===o&&Mt(!1)}},[o,ge,K]),[k,P]=a.useState(()=>m??""),[ae,re]=a.useState(null),[H,ct]=a.useState(!1),[v,vn]=a.useState("operator"),[oe,Be]=a.useState({open:!1,query:"",triggerStart:-1,index:0}),[ie,He]=a.useState({open:!1,query:"",triggerStart:-1,index:0}),[E,X]=a.useState(null),[At,dt]=a.useState(!1),[Nt,ut]=a.useState(""),[Tn,We]=a.useState(null),[xn,jt]=a.useState(!1);a.useEffect(()=>{dt(!1),ut(""),We(null),jt(!1)},[o]),a.useEffect(()=>{if(!m)return;const e=`${o}:${m}`;gs.current!==e&&(gs.current=e,P(m),requestAnimationFrame(()=>M.current?.focus()))},[o,m]);const Z=a.useMemo(()=>{const e=new Map;for(const t of c?.participants??[])e.set(t.actorId,t),t.agentId&&e.set(t.agentId,t);return e},[c]),Rt=a.useMemo(()=>{const e=new Set,t=[];for(const s of c?.participantIds??[]){if(s==="operator")continue;const n=Z.get(s),i=n?.scopedAlias?.trim().replace(/^@+/,"");if(!i)continue;const l=i.toLowerCase();e.has(l)||(e.add(l),t.push({id:s,label:n?.label??n?.displayName??i,name:n?.displayName??i,handle:i}))}for(const s of T){const n=s.handle?.trim().replace(/^@+/,"")??Ks(s.id)??s.id;if(!n)continue;const i=n.toLowerCase();e.has(i)||(e.add(i),t.push({id:s.id,label:n,name:s.name??n,handle:n}))}return t.sort((s,n)=>s.handle.localeCompare(n.handle))},[Z,T,c]),bn=a.useMemo(()=>{if(!oe.open)return[];const e=oe.query.toLowerCase();return e?Qs.filter(t=>t.command.toLowerCase().startsWith("/"+e)||t.command.toLowerCase().includes(e)):Qs},[oe.open,oe.query]),Cn=a.useMemo(()=>{if(!ie.open)return[];const e=ie.query.toLowerCase();return e?Rt.filter(t=>t.handle.toLowerCase().includes(e)||t.name.toLowerCase().includes(e)||t.label.toLowerCase().includes(e)).slice(0,8):Rt.slice(0,8)},[ie.open,ie.query,Rt]),Mn=a.useCallback(()=>{Be(e=>e.open?{...e,open:!1}:e),He(e=>e.open?{...e,open:!1}:e)},[]),kn=a.useCallback((e,t)=>{const s=Pa(e,t);Be(s?i=>({open:!0,query:s.query,triggerStart:s.start,index:i.open&&i.triggerStart===s.start?i.index:0}):i=>i.open?{...i,open:!1}:i);const n=qa(e,t);He(n?i=>({open:!0,query:n.query,triggerStart:n.start,index:i.open&&i.triggerStart===n.start?i.index:0}):i=>i.open?{...i,open:!1}:i)},[]),In=a.useCallback(e=>{const t=M.current,s=oe.triggerStart;if(s<0)return;const n=t?.selectionStart??k.length,i=k.slice(0,s),l=k.slice(n),d=e.insert,A=`${i}${d}${l}`;P(A),Be(f=>({...f,open:!1})),requestAnimationFrame(()=>{const f=M.current;if(!f)return;const h=i.length+d.length;f.focus(),f.setSelectionRange(h,h)})},[k,oe.triggerStart]),An=a.useCallback(e=>{const t=M.current,s=ie.triggerStart;if(s<0)return;const n=t?.selectionStart??k.length,i=k.slice(0,s),l=k.slice(n),d=l.length===0||!l.startsWith(" "),A=`@${e.handle}${d?" ":""}`,f=`${i}${A}${l}`;P(f),He(h=>({...h,open:!1})),requestAnimationFrame(()=>{const h=M.current;if(!h)return;const g=i.length+A.length;h.focus(),h.setSelectionRange(g,g)})},[k,ie.triggerStart]);a.useEffect(()=>{const e=M.current;if(!e)return;e.style.height="0px";const t=Math.min(Math.max(e.scrollHeight,40),160);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?"auto":"hidden"},[k]),a.useEffect(()=>{q("/api/user").then(e=>vn(e.name)).catch(()=>{})},[]);const mt=a.useMemo(()=>Da(y,v),[y,v]);a.useEffect(()=>{E===null||mt===null||mt>=E&&X(null)},[E,mt]);const Nn=a.useMemo(()=>dr(p),[p]),we=Date.now(),jn=ur(p,mt,we),Et=Nn&&!mr(p)&&!jn,Ts=b&&(H||E!==null||Et),xs=b&&Ba({sending:H,awaitingResponse:E!==null,currentFlight:p}),L=zs({name:_?.name,agentName:c?.agentName,id:x,title:c?.title}),I=a.useMemo(()=>b?Ha({agentName:L,agentState:_?.state??null,sending:H,currentFlight:p,showWorkingTurn:Et,awaitingResponse:E!==null}):{label:"Open",detail:"",tone:"idle",showStrip:!1,showTyping:!1},[_?.state,L,E,p,we,b,H,Et]),Lt=p?.startedAt??st?.startedAt??E,Ft=ts(Lt),bs=ar(Lt,we),[,Rn]=a.useState(0);a.useEffect(()=>{if(!I.showTyping||Ft===null)return;const e=Math.max(0,Date.now()-Ft),t=[Ys.sustained,Ys.long].find(n=>n>e);if(t===void 0)return;const s=window.setTimeout(()=>Rn(n=>n+1),t-e+50);return()=>window.clearTimeout(s)},[Ft,I.showTyping,bs]);const En="Live",$t=a.useMemo(()=>Wa({currentFlight:p,presence:I,turnActivity:Ne,turnAsk:st,awaitingResponseSince:E,nowMs:we}),[E,p,we,I,Ne,st]),Ln="s-thread-msg-card s-thread-msg-working-card s-thread-msg-card--avatar-row",Fn="s-thread-msg-kind",$n="s-thread-turn-snapshot",On="s-thread-turn-snapshot-pulse",Pn="s-thread-presence-line",qn=["s-thread-presence-strip",`s-thread-presence-strip--${bs}`].filter(Boolean).join(" "),Ot=c?Ua(c):L,Ue=c?.id??o,Dn=c?.alias?.trim()||null,ht=_a(c?.workspaceRoot),Bn=I.tone,Pt=y.length===0&&b&&(I.showTyping||p!==null||Ne.length>0||st!==null||E!==null),Se=Tt&&en.has(Tt.state)?Tt:null,Hn=!!(Se&&y.some(e=>ss(e)!==null&&e.metadata?.flightId===Se.id)),Cs=Se?.sessions.at(-1)?.sessionId??Ss,Wn=Se&&Cs?()=>{const e=or({sessionId:Cs,machineId:B});e&&Ye(u,e,{returnTo:O})}:void 0,Ms=a.useMemo(()=>c?c.participantIds.includes("operator"):b,[b,c]),_e=p?.agentId??x,Ve=_e?es(T,[_e]):null,Ke=Ve?.id??_e,Qe=p?.sessions.at(-1)?.sessionId??Ve?.harnessSessionId??void 0,ks=p?.id?()=>{Ye(u,{view:"sessions",flightId:p.id,...Ke?{agentId:Ke}:{},...Qe?{sessionId:Qe}:{},...B?{machineId:B}:{}},{returnTo:O})}:void 0,Is=p?.id??null;a.useEffect(()=>{if(!Is||!Ke){bt(null);return}let e=!1;const t=Qe?`?sessionId=${encodeURIComponent(Qe)}`:"",s=async()=>{try{const i=await q(`/api/agents/${encodeURIComponent(Ke)}/observe${t}`);if(e)return;bt(l=>J(l,i))}catch{}};s();const n=window.setInterval(()=>{s()},so);return()=>{e=!0,window.clearInterval(n),bt(null)}},[Is,Ke,Qe]);const qt=a.useMemo(()=>Or({flight:p,agent:Ve??_,sessionMeta:c,observeSessionId:tt?.sessionId}),[_,p,c,tt?.sessionId,Ve]),As=to({sessionIds:qt,active:I.showTyping||Pt}),Un=a.useMemo(()=>Pr({observe:tt,flight:p}),[p,tt]),ee=As.length>0?As:Un,Dt=a.useMemo(()=>ee.length>0?null:qr({flight:p,hasSessionScope:qt.length>0,awaitingResponse:E!==null}),[E,p,qt.length,ee.length]),Bt=Dr(ee),Ht=Br(ee),Ns=ee.at(-1)??null,Wt=Ns?St(Ns.ts,we):null,le=a.useMemo(()=>Ht?{...$t,latest:Ht,...Bt?{activityLabel:Bt}:{},...Wt?{lastActivityLabel:Wt}:{}}:$t,[Wt,Ht,$t,Bt]),_n=`${L}: ${le.latest}`,js=_e&&Va(Ve)?()=>{Ye(u,{view:"terminal",agentId:_e,mode:"takeover"},{returnTo:O})}:void 0,Ut=b?()=>{S&&as({type:"focus-composer",reason:"Steer the active conversation"})||requestAnimationFrame(()=>{M.current?.focus({preventScroll:!0}),M.current?.scrollIntoView({block:"nearest"})})}:void 0,[ve,Rs]=a.useState(()=>{if(S||typeof window>"u")return"thread";const e=new URLSearchParams(window.location.search).get("view");return e==="flow"||e==="map"||e==="canvas"?e:"thread"}),Vn=a.useCallback(e=>Rs(e),[]),Es=jr(u,_s(O)??void 0),Kn=a.useCallback(e=>{Rs("thread"),Es(e)},[Es]),Qn=Ma();a.useEffect(()=>{if(S||typeof window>"u")return;const e=new URL(window.location.href),t=ve==="thread"?"":ve;(e.searchParams.get("view")??"")!==t&&(t?e.searchParams.set("view",t):e.searchParams.delete("view"),window.history.replaceState(window.history.state,"",`${e.pathname}${e.search}${e.hash}`))},[S,ve,Qn.searchStr]);const zn=a.useMemo(()=>(c?c.participantIds.filter(t=>t!=="operator"):x?[x]:[]).map(t=>{const s=es(T,[t]),n=Z.get(t);return{id:t,name:n?.scopedAlias??s?.name??n?.displayName??Ks(t)??t,title:n?.label??s?.id??t,agent:s,sessionId:n?.sessionId??null,harness:s?.harness??n?.harness??null,model:s?.model??null,reasoningEffort:s?.reasoningEffort??null}}),[x,Z,T,c]),Jn=a.useMemo(()=>({name:v,active:Ms}),[Ms,v]),ce=a.useMemo(()=>new Map(y.map(e=>[e.id,e])),[y]),_t=a.useMemo(()=>T.find(e=>vr(e)&&!!e.conversationId?.trim())?.conversationId?.trim()??null,[T]),ze=a.useMemo(()=>Ka(y),[y]),[Gn,Vt]=a.useState(()=>new Set),Yn=a.useCallback(e=>{Vt(t=>{const s=new Set(t);return s.delete(e)||s.add(e),s})},[]),Ls=a.useMemo(()=>{const e=new Map;for(const t of ze)if(t.kind==="fanout")for(const s of t.messages)e.set(s.id,t.key);return e},[ze]),pt=a.useCallback(e=>{const t=Ls.get(e);t&&Vt(l=>l.has(t)?l:new Set(l).add(t));const s=document.getElementById(`msg-${e}`);if(!s)return;const n=s.closest(".s-thread-fanout")??s,i=n===s?"s-thread-msg--flash":"s-thread-fanout--flash";n.scrollIntoView({behavior:"smooth",block:"center"}),n.classList.add(i),window.setTimeout(()=>n.classList.remove(i),1200)},[Ls]);a.useEffect(()=>{const e=()=>pn(an(window.location.hash));return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]),a.useEffect(()=>{if(!nt||!ce.has(nt))return;const e=window.setTimeout(()=>pt(nt),50);return()=>window.clearTimeout(e)},[nt,ce,pt]),cr(a.useCallback(e=>{if(e.kind==="message.posted"){const t=e.payload?.message;if(!t||!lt.has(t.conversationId))return;const s=t.actorId==="operator",n=b&&!s&&t.class==="agent",i={id:t.id,conversationId:t.conversationId,actorId:t.actorId,actorName:n?L:Qa(t.actorId,T,v),body:t.body,createdAt:t.createdAt,class:s?"operator":t.class,attachments:t.attachments,metadata:t.metadata,replyToMessageId:t.replyToMessageId??t.n??null};if(ns(i))return;if(K(l=>{const d=ao(t.metadata),A=d?ne.current.get(d):void 0;if(l.some(f=>f.id===t.id))return d&&ne.current.delete(d),l;if(s&&d){const f=za(l,d,A);if(f!==-1){const h=[...l];return h[f]=i,ne.current.delete(d),Me(h)}}return Me([...l,i])}),n){const l=ts(t.createdAt)??Date.now();X(d=>d===null||l<d||hr(Pe.current)?d:null),fe(d=>pr(d)?null:d)}return}if(e.kind==="invocation.requested"){const t=e.payload?.invocation;if(!Ja(t,lt))return;Oe.current.add(t.id),je([]),Re(null),X(s=>s??Date.now()),R({messageMode:"none",includeMetadata:!1});return}if(e.kind==="conversation.upserted"){const t=e.payload?.conversation;t?.id&<.has(t.id)&&R({messageMode:"none",includeMetadata:!1});return}if(e.kind==="flight.updated"){const t=e.payload?.flight;if(!t||!(Oe.current.has(t.invocationId)||Pe.current?.id===t.id))return;const n=Js(t,o,x??"",Pe.current);if(xt(l=>Ga(l,n)),en.has(t.state)){Us(o,t.id),fe(l=>l?.id===t.id?null:l),je([]),Re(null),X(null),R({messageMode:"refresh",includeMetadata:!1});return}Oe.current.add(t.invocationId);const i=Pe.current?.id===t.id;fr(n)&&X(null),fe(n),i||(je([]),Re(null));return}e.kind!=="agent.endpoint.upserted"&&e.kind==="unknown"&&R({messageMode:"refresh"})},[x,L,o,lt,b,R,v,T])),a.useEffect(()=>{if(!Ts)return;const e=setInterval(()=>{R({messageMode:"refresh",includeMetadata:!1})},5e3);return()=>clearInterval(e)},[Ts,R]),a.useEffect(()=>{const e=()=>{if(document.visibilityState!=="visible")return;const t=Date.now();t-fs.current<1e3||(fs.current=t,R({messageMode:"refresh"}))};return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[R]);const Kt=a.useRef(null),Fs=a.useRef(!1),Qt=a.useRef(!1),zt=a.useCallback(e=>{const t=Le.current;t&&(rt.current=!0,ye.current!==null&&clearTimeout(ye.current),e==="instant"?t.scrollTop=t.scrollHeight:t.scrollTo({top:t.scrollHeight,behavior:"smooth"}),ye.current=setTimeout(()=>{rt.current=!1,ye.current=null},e==="smooth"?700:0))},[]);a.useEffect(()=>()=>{ye.current!==null&&clearTimeout(ye.current)},[]);const Xn=a.useCallback(()=>{const e=Le.current;if(!e||rt.current)return;const s=e.scrollHeight-e.clientHeight-e.scrollTop<=no;$e.current=s,s?(Ee(!1),at(0)):Ee(!0)},[]),Zn=a.useCallback(()=>{$e.current=!0,Ee(!1),at(0),zt("smooth")},[zt]);a.useEffect(()=>{const e=y.at(-1)?.id??null,t=!!(e&&e!==Kt.current),s=Ya({newestMessageId:e,previousNewestMessageId:Kt.current,showTyping:I.showTyping,previousShowTyping:Fs.current,historyRestorePending:ot.current||Fe.current!==null,initialScrollDone:Qt.current,nearBottom:$e.current});s!=="none"?(zt(s),Qt.current=!0):t&&Qt.current&&!$e.current&&(Ee(!0),at(n=>n+1)),ot.current=!1,Kt.current=e,Fs.current=I.showTyping});const[,ea]=a.useState(0);a.useEffect(()=>{const e=setInterval(()=>ea(t=>t+1),15e3);return()=>clearInterval(e)},[]);const de=ka(),[ue,te]=a.useState([]),[$s,ft]=a.useState("queue"),[Te,xe]=a.useState(null),be=async(e,t)=>{const s=e.trim(),n=t?.attachments??[],i=t?.replyTarget??null;if(!s&&n.length===0||H)return"failed";const d=t?.forceAction??Xs({isDm:b,hasOutstandingReply:xs}),A=Date.now(),f=ba(),h={id:`optimistic-${f}`,conversationId:o,actorId:"operator",actorName:v,body:s,createdAt:A,class:"operator",...i?{replyToMessageId:i.messageId}:{},metadata:{clientMessageId:f,deliveryState:"sending"},...n.length>0?{attachments:n}:{}};ct(!0),d!=="message"&&X(A),se(null),ne.current.set(f,h.id),K(g=>Me([...g,h]));try{const g=await q(`/api/chats/${encodeURIComponent(o)}/messages`,{method:"POST",body:JSON.stringify({body:s,clientMessageId:f,...i?{replyToMessageId:i.messageId}:{},...n.length>0?{attachments:n}:{}})}),W=g.chatId?.trim()??g.conversationId?.trim();if(W&&W!==o)throw new Error(`Send returned a different Chat (${W}) instead of appending to ${o}.`);if(g.messageId?.trim()){const j=g.messageId.trim();K(he=>Me(he.map(N=>N.id===h.id?{...N,id:j,metadata:{clientMessageId:f}}:N))),ne.current.delete(f)}return g.flight?(Oe.current.add(g.flight.invocationId),fe(Js(g.flight,o,x??"")),je([]),Re(null)):d!=="message"&&X(null),"sent"}catch(g){return ro(g)?(K(W=>W.map(j=>j.id===h.id?{...j,metadata:{...j.metadata??{},deliveryState:"unknown"}}:j)),"unknown"):(K(W=>W.filter(j=>j.id!==h.id)),ne.current.delete(f),X(null),se(g instanceof Error?g.message:String(g)),"failed")}finally{ct(!1)}},ta=async e=>{const t=e.replyToMessageId?ce.get(e.replyToMessageId):null;if(!t||H)return;const s=[];for(const i of t.attachments??[]){if(!i.url){se("This request includes an attachment that can’t be reused. Add it again, then retry."),requestAnimationFrame(()=>M.current?.focus());return}s.push({id:i.id,mediaType:i.mediaType,...i.fileName?{fileName:i.fileName}:{},url:i.url})}await be(t.body,{forceAction:"invoke",attachments:s})!=="failed"&&ys(e)},sa=(e,t,s)=>{if(!_t)return;const n=e.replyToMessageId?ce.get(e.replyToMessageId)?.body.trim():"",i=n?`${n.slice(0,1200)}${n.length>1200?"…":""}`:"(The original request is no longer available in this transcript.)",l=[`Help me recover a failed request to ${t}.`,s,"","Original request:",i].join(`
|
|
2
|
-
`),d={view:"conversation",conversationId:_t,composeDraft:l};S&&as({type:"navigate",route:d,reason:"Ask @scoutbot to help recover a failed conversation request"})||u(d)},na=async()=>{const e=k.trim(),t=ae,s=de.files,n=Te?.attachments??[];if(!e&&s.length===0&&n.length===0)return null;let i=[];if(s.length>0){ct(!0);try{i=await Ca(s)}catch(l){return de.setError(l instanceof Error?l.message:String(l)),null}finally{ct(!1)}}return P(""),re(null),de.clear(),xe(null),{body:e,attachments:[...n,...i],replyTarget:t}},aa=async()=>{const e=ir({isAgentBusy:me,intent:$s}),t=Te?.id??null,s=await na();if(!s)return;if(e==="queue"){te(l=>t?l.map(d=>d.id===t?{...d,body:s.body,attachments:s.attachments,replyTarget:s.replyTarget}:d):[...l,{id:`queued-${Date.now()}-${l.length}`,body:s.body,attachments:s.attachments,replyTarget:s.replyTarget,queuedAt:Date.now()}]);return}t&&te(l=>l.filter(d=>d.id!==t));const n=()=>{P(s.body),xe(s.attachments.length>0?{id:null,attachments:s.attachments}:null),re(s.replyTarget),requestAnimationFrame(()=>M.current?.focus())};if(e==="steer"){ft("queue"),await Gt(),await be(s.body,{forceAction:"steer",attachments:s.attachments,replyTarget:s.replyTarget})==="failed"&&n();return}await be(s.body,{attachments:s.attachments,replyTarget:s.replyTarget})==="failed"&&n()},ra=e=>{te(t=>t.filter(s=>s.id!==e)),xe(t=>t?.id===e?null:t)},oa=e=>{const t=ue.find(s=>s.id===e);t&&(P(t.body),re(t.replyTarget??null),xe({id:e,attachments:t.attachments}),requestAnimationFrame(()=>{const s=M.current;s&&(s.focus(),s.setSelectionRange(s.value.length,s.value.length))}))},ia=()=>{xe(null),P(""),re(null),de.clear()},la=async e=>{const t=ue.find(n=>n.id===e);if(!t)return;te(n=>n.filter(i=>i.id!==e)),await Gt(),await be(t.body,{forceAction:"steer",attachments:t.attachments,replyTarget:t.replyTarget??null})==="failed"&&te(n=>[t,...n])},gt=a.useCallback((e,t)=>{const s=t?.trim().replace(/^@+/,"")||null,n=s?`@${s}`:null,i=ae?.insertedMention?on(k,ae.insertedMention):k,l=!!(!b&&n&&!i.toLocaleLowerCase().includes(n.toLocaleLowerCase())),d=l&&n?i.trim()?`${i.trimEnd()} ${n} `:`${n} `:i;P(d),re({messageId:e.id,actorLabel:s?`@${s}`:e.actorName,preview:rn(e),insertedMention:l?n:null}),requestAnimationFrame(()=>M.current?.focus())},[k,b,ae?.insertedMention]),ca=a.useCallback(()=>{const e=ae?.insertedMention;re(null),e&&P(t=>on(t,e)),requestAnimationFrame(()=>M.current?.focus())},[ae]),Jt=a.useCallback(e=>{const t=new URL(window.location.href);O.view==="agents-v2"&&t.searchParams.set("tab","message"),t.hash=`msg-${e}`,Xe(t.toString())},[O.view]),Os=a.useCallback((e,t,s)=>{const n=xa({conversationId:o,selectedMessageId:e.id,messages:y.map(i=>({id:i.id,actorLabel:i.id===e.id?t:Ge(i,v)?v:i.actorName,body:i.body,attachmentCount:i.attachments?.length??0}))});Ie({intent:"forward-message",forwardContext:n,forwardContextMode:"selected-message",...s?{projectPath:s}:{}})},[o,y,Ie,v]),Gt=async()=>{if(x)try{await q("/api/agents/"+encodeURIComponent(x)+"/interrupt",{method:"POST",body:JSON.stringify({})})}catch{}},me=I.tone==="working"||I.tone==="pending",da=Xs({isDm:b,hasOutstandingReply:xs}),ua=b?`Message ${L} — type / to route or @ to mention an agent`:c?.kind==="channel"?`Comment in #${gr(c)} — mention @agent to request a reply`:`Comment in ${Ot} — mention @agent to request a reply`,Ps=Te?.attachments??[],ma=!k.trim()&&!de.hasFiles&&Ps.length===0&&me,Yt=a.useRef(!1);a.useEffect(()=>{const e=Te?.id??null,t=e?ue.filter(n=>n.id!==e):ue;if(!Xa({isAgentBusy:me,sending:H,queued:t})||Yt.current)return;const s=t[0];s&&(Yt.current=!0,te(n=>n.filter(i=>i.id!==s.id)),be(s.body,{attachments:s.attachments,replyTarget:s.replyTarget??null}).then(n=>{n==="failed"&&te(i=>[s,...i])}).finally(()=>{Yt.current=!1}))},[me,H,ue,Te]),a.useEffect(()=>{me||ft("queue")},[me]),a.useEffect(()=>{te([]),xe(null),re(null),ft("queue"),de.clear()},[o]);const ha=Za(ue),qs=br(),pa=a.useCallback((e,t)=>{const s=window.getSelection()?.toString().trim(),n=Ge(t,v),i=t.actorId?Z.get(t.actorId):null,l=n?null:Gs(t,T,x),d=(i?.scopedAlias?.trim()||l?.handle?.trim()||null)?.replace(/^@+/,"")??null,A=d?`@${d}`:t.actorName,f=(l?.id||i?.agentId||t.actorId||"").trim(),h=[];n||h.push({kind:"action",label:"Reply",onSelect:()=>gt(t,d)}),h.push({kind:"action",label:"Forward to new task…",onSelect:()=>Os(t,A,i?.workspaceRoot??l?.projectRoot??l?.cwd??void 0)}),h.push({kind:"separator"}),s&&h.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{Xe(s)}}),h.push({kind:"action",label:"Copy Message",onSelect:()=>{Xe(t.body)}}),h.push({kind:"action",label:"Copy Link",onSelect:()=>Jt(t.id)}),h.push({kind:"separator"}),!n&&f&&h.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{Xe(f)}}),h.push({kind:"action",label:"Copy Message ID",onSelect:()=>{Xe(t.id)}}),qs(e,h)},[x,gt,Jt,Os,v,Z,T,qs]),fa=async(e,t)=>{const s=`@${t.agentId} `,n=k.trim();if(n){P(""),await be(`${s}${n}`,{forceAction:"invoke"});return}P(s),M.current?.focus()},Je=a.useMemo(()=>{if(!c)return[];const e=new Set(c.participantIds);return T.filter(t=>!e.has(t.id)&&!t.retiredFromFleet).sort((t,s)=>t.name.localeCompare(s.name))},[c,T]);a.useEffect(()=>{At&&ut(e=>e&&Je.some(t=>t.id===e)?e:Je[0]?.id??"")},[At,Je]);const Ds=!!(c&&["direct","group_direct","channel"].includes(c.kind)&&Je.length>0),ga=a.useCallback(async()=>{if(!c)return;const e=Nt.trim();if(e){jt(!0),We(null);try{const t=await q(`/api/conversations/${encodeURIComponent(c.id)}/members`,{method:"POST",body:JSON.stringify({actorId:e})});t.session?vt(t.session):vt(s=>s&&{...s,kind:t.kind,participantIds:t.participantIds}),dt(!1),ut(""),await R({messageMode:"none"})}catch(t){We(t instanceof Error?t.message:String(t))}finally{jt(!1)}}},[Nt,R,c]);return r.jsx("div",{className:`s-thread-layout${S?" s-thread-layout--embedded":""}`,"data-thread-treatment":G==="standard"?void 0:G,children:r.jsxs("div",{className:"s-thread-center",children:[!S&&r.jsx(kr,{showBackNav:C,backLabel:ke,beside:D&&Ue?{on:D.has(Ue),toggle:()=>D.toggle(Ue)}:void 0,isDm:b,navigate:u,route:O,canonicalConversationId:Ue,threadTitle:Ot,agentId:_?.id??null,sessionId:ws,detailRoute:wn,participants:zn,operator:Jn,canAddParticipants:Ds,view:ve,onChangeView:Vn,onToggleAddParticipant:()=>{We(null),dt(e=>!e)}}),!S&&c&&r.jsx(Ir,{canonicalConversationId:Ue,conversationAlias:Dn}),!S&&At&&Ds&&r.jsx(Ar,{agents:Je,addParticipantId:Nt,setAddParticipantId:ut,addingParticipant:xn,addParticipantError:Tn,onCancel:()=>{dt(!1),We(null)},onSubmit:()=>{ga()}}),It&&r.jsx(Qr,{pinnedAsk:It,onAnswer:()=>{const e=[...y].reverse().find(t=>t.actorId===It.agentId)??[...y].reverse().find(t=>!Ge(t,v)&&t.class!=="status"&&t.class!=="system");e?gt(e,e.actorId?Z.get(e.actorId)?.scopedAlias??null:null):M.current?.focus()},onSteer:Ut}),r.jsx(zr,{presence:I,agent:_}),c&&r.jsx(Gr,{harness:c.harness,model:c.model,hostName:c.executionNodeName,workspaceRoot:c.workspaceRoot,sessionId:Ss,machineId:B,navigate:u}),hs&&r.jsx("p",{className:"s-thread-error",children:hs}),ve!=="thread"?r.jsx(Nr,{messages:y,view:ve,participants:c?.participants,onStage:Kn,beside:D}):r.jsxs("div",{className:"s-thread-feed","data-conversation-id":o,ref:Le,onScroll:Xn,children:[!ms&&y.length>0&&yn&&r.jsx("div",{className:"s-thread-history-control",children:r.jsxs("button",{type:"button",className:"s-thread-history-button",disabled:ge,"aria-busy":ge,onClick:()=>{Sn()},children:[ge&&r.jsx("span",{className:"s-thread-history-spinner","aria-hidden":"true"}),ge?"Loading earlier messages…":"Load earlier messages"]})}),ms?r.jsx(Hr,{}):y.length===0?Pt?r.jsx(Wr,{agentName:L,title:I.label,detail:I.detail||le.latest,snapshot:le,events:Ne,steps:ee,phase:Dt,tone:Bn,workspaceName:ht,branch:c?.currentBranch,startedAt:Lt,onOpenTrace:ks,onOpenTerminal:js,onSteer:Ut}):r.jsxs("div",{className:"s-thread-empty",children:[r.jsx("div",{className:"s-thread-empty-glyph","aria-hidden":"true",children:b?"@":"#"}),r.jsx("p",{children:Ot}),r.jsx("p",{children:b?"No messages yet. Send a message to start working with this agent.":"No messages yet. Start the conversation below."}),(ht||c?.currentBranch)&&r.jsxs("div",{className:"s-thread-empty-chips",children:[ht&&r.jsx("span",{className:"s-thread-empty-chip",children:ht}),c?.currentBranch&&r.jsx("span",{className:"s-thread-empty-chip",children:c.currentBranch})]})]}):ze.map((e,t)=>{const s=er(e,t);if(e.kind==="fanout")return r.jsx(Er,{row:e,expanded:Gn.has(e.key),showDayDivider:s,onToggle:()=>Yn(e.key)},e.key);const n=e.message,i=Ge(n,v),l=tr(n),d=l?"scout.dispatch":n.class,A=rr(d),f=d==="status",h=Zs(n.createdAt),g=i?null:Gs(n,T,x),j=(n.actorId?Z.get(n.actorId):void 0)?.scopedAlias?.trim()||null,he=!i&&j?j:n.actorName,N=i?v.toLowerCase():j??g?.handle??null,Q=sr(n.body),V=Q?nr({flightId:Q.flightId,replyToMessageId:n.replyToMessageId,messagesById:ce,agents:T,operatorName:v}):null,U=!Q&&n.replyToMessageId?ce.get(n.replyToMessageId)??null:null,z=U?Ge(U,v)?v:U.actorName:null,Ce=Q?Q.body:n.body,F=ss(n);if(F&&Ct.has(n.id))return null;const Xt=typeof n.metadata?.targetAgentId=="string"?n.metadata.targetAgentId:null,yt=F?es(T,[Xt,F.target]):null,w=F?zs({name:yt?.name,id:yt?.id,title:wr(F.target)}):null;return r.jsxs("div",{className:["s-thread-feed-block",i&&"s-thread-feed-block--you",s&&"s-thread-feed-block--full-width"].filter(Boolean).join(" "),children:[s&&r.jsx(Lr,{at:n.createdAt}),F&&w?r.jsxs("article",{id:`msg-${n.id}`,className:["s-thread-msg","s-thread-failure-notice",(et||us?.has(n.id))&&"s-thread-msg--enter"].filter(Boolean).join(" "),style:et?{animationDelay:`${Math.max(0,7-(ze.length-1-t))*26}ms`}:void 0,"data-class":d,"aria-label":"Delivery issue",children:[r.jsx("span",{className:"s-thread-failure-notice-mark","aria-hidden":"true",children:"!"}),r.jsxs("div",{className:"s-thread-failure-notice-content",children:[r.jsxs("p",{children:[r.jsxs("strong",{children:[w," couldn’t reply."]})," ",r.jsx("span",{children:F.explanation})]}),F.technicalDetail&&r.jsxs("details",{className:"s-thread-failure-notice-details",children:[r.jsx("summary",{children:"Technical details"}),r.jsx("pre",{children:F.technicalDetail})]}),r.jsxs("div",{className:"s-thread-failure-notice-actions",children:[n.replyToMessageId&&ce.has(n.replyToMessageId)&&r.jsx("button",{className:"s-thread-failure-notice-action s-thread-failure-notice-action--primary",type:"button",disabled:H,onClick:()=>{ta(n)},children:H?"Retrying…":"Retry"}),_t&&r.jsx("button",{className:"s-thread-failure-notice-action",type:"button",onClick:()=>sa(n,w,F.explanation),children:"Ask @scoutbot"}),r.jsx("button",{className:"s-thread-failure-notice-action s-thread-failure-notice-action--clear",type:"button",onClick:()=>ys(n),"aria-label":`Clear delivery issue for ${w}`,children:"Clear"})]})]}),r.jsx("span",{className:"s-thread-failure-notice-time",title:h,children:St(n.createdAt)})]}):r.jsx("article",{id:`msg-${n.id}`,className:["s-thread-msg",i&&"s-thread-msg--you",f&&"s-thread-msg--tool",(et||us?.has(n.id))&&"s-thread-msg--enter"].filter(Boolean).join(" "),style:et?{animationDelay:`${Math.max(0,7-(ze.length-1-t))*26}ms`}:void 0,"data-class":d,onContextMenu:$=>pa($,n),children:r.jsx("div",{className:"s-thread-msg-card",children:r.jsxs("div",{className:"s-thread-msg-card-content",children:[r.jsxs("div",{className:"s-thread-msg-header",children:[r.jsxs("div",{className:"s-thread-msg-meta",children:[(()=>{const $=!i&&g?()=>Ye(u,{view:"agents-v2",agentId:g.id},{returnTo:O}):null,Bs=i?v:he??"?",Hs=r.jsx(rs,{agent:g??void 0,name:Bs,placement:"turn",size:28,className:"s-thread-msg-avatar",title:Bs,gaze:"pointer"});return $?r.jsx("button",{type:"button",className:"s-thread-msg-avatar--nav",onClick:$,"aria-label":`View profile for ${n.actorName??"agent"}`,title:`View profile for ${n.actorName??"agent"}`,children:Hs}):Hs})(),!i&&g?r.jsx("button",{type:"button",className:"s-thread-msg-actor s-thread-msg-actor--nav",onClick:()=>Ye(u,{view:"agents-v2",agentId:g.id},{returnTo:O}),title:`View profile for ${n.actorName}`,children:he}):r.jsx("span",{className:"s-thread-msg-actor",children:i?v:he}),N&&r.jsxs("span",{className:"s-thread-msg-handle",children:["@",N]}),A&&r.jsx("span",{className:"s-thread-msg-kind",children:A})]}),r.jsx("span",{className:"s-thread-msg-time",title:h,children:St(n.createdAt)}),r.jsxs("span",{className:"s-thread-msg-actions",children:[!i&&N&&r.jsx("button",{type:"button",className:"s-thread-msg-permalink","aria-label":`Reply to @${N}`,title:`Reply to @${N}`,onClick:()=>gt(n,N),children:r.jsx(os,{})}),r.jsx("button",{type:"button",className:"s-thread-msg-permalink","aria-label":"Copy link to message",title:"Copy link to message",onClick:()=>Jt(n.id),children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M6.5 9.5a2.5 2.5 0 0 0 3.54 0l2.12-2.12a2.5 2.5 0 0 0-3.54-3.54l-.7.7"}),r.jsx("path",{d:"M9.5 6.5a2.5 2.5 0 0 0-3.54 0L3.84 8.62a2.5 2.5 0 0 0 3.54 3.54l.7-.7"})]})})]})]}),V&&r.jsxs("button",{type:"button",className:"s-thread-reply-ctx",title:`Open the originating request${V.flightId?` · ${V.flightId}`:""}`,onClick:()=>pt(V.originatingMessageId),children:[r.jsx(os,{}),r.jsx("span",{className:"s-thread-reply-ctx-label",children:"reply to"}),r.jsx("span",{className:"s-thread-reply-ctx-title",children:V.title}),r.jsxs("span",{className:"s-thread-reply-ctx-from",children:["· ",V.from]}),r.jsx("span",{className:"s-thread-reply-ctx-status",children:"· done"})]}),U&&z&&r.jsxs("button",{type:"button",className:"s-thread-reply-ctx",title:`Open message from ${z}`,onClick:()=>pt(U.id),children:[r.jsx(os,{}),r.jsx("span",{className:"s-thread-reply-ctx-label",children:"reply to"}),r.jsx("span",{className:"s-thread-reply-ctx-title",children:rn(U)}),r.jsxs("span",{className:"s-thread-reply-ctx-from",children:["· ",z]})]}),r.jsx("div",{className:"s-thread-msg-body",children:r.jsx(yr,{text:Ce})}),r.jsx(Cr,{message:n}),l&&l.candidates.length>0&&r.jsx("div",{className:"s-thread-dispatch",children:l.candidates.map($=>r.jsxs("button",{type:"button",className:"s-thread-dispatch-tile",onClick:()=>{fa(l,$)},children:[r.jsxs("span",{className:"s-thread-dispatch-tile-id",children:["@",$.agentId]}),r.jsx("span",{className:"s-thread-dispatch-tile-state",children:$.endpointState}),r.jsx("span",{className:"s-thread-dispatch-tile-meta",children:[$.workspace,$.node,$.projectRoot].filter(Boolean).join(" · ")||$.displayName})]},$.agentId))})]})})})]},n.id)}),Se&&!Hn&&r.jsx("div",{className:"s-thread-feed-block",children:r.jsx(Jr,{flight:Se,onOpenSession:Wn})}),I.showTyping&&!Pt&&r.jsx("div",{className:"s-thread-feed-block",children:r.jsx("div",{className:"s-thread-msg","aria-live":"polite",children:r.jsxs("div",{className:Ln,children:[r.jsx(rs,{agent:_??void 0,name:L,placement:"turn",size:28,className:"s-thread-msg-avatar s-thread-msg-avatar--working",title:L,gaze:"pointer"}),r.jsxs("div",{className:"s-thread-msg-card-content",children:[r.jsxs("div",{className:"s-thread-msg-header",children:[r.jsxs("div",{className:"s-thread-msg-meta",children:[r.jsx("span",{className:"s-thread-msg-actor",children:L}),r.jsx("span",{className:Fn,children:En})]}),r.jsx("span",{className:"s-thread-msg-time",title:p?.startedAt?Zs(p.startedAt):"now",children:p?.startedAt?St(p.startedAt):"now"})]}),r.jsxs("div",{className:"s-thread-msg-working-body",children:[r.jsxs("div",{className:$n,children:[r.jsx("span",{className:On,"aria-hidden":"true"}),r.jsxs("div",{className:"s-thread-turn-snapshot-main",children:[r.jsx("span",{className:"s-thread-turn-snapshot-label",children:"Latest"}),r.jsx("span",{className:"s-thread-msg-working-copy",children:le.latest})]})]}),r.jsxs("dl",{className:"s-thread-turn-snapshot-stats",children:[r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Activity"}),r.jsx("dd",{children:le.activityLabel})]}),r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Elapsed"}),r.jsx("dd",{children:le.elapsedLabel})]}),r.jsxs("div",{className:"s-thread-turn-snapshot-stat",children:[r.jsx("dt",{children:"Last"}),r.jsx("dd",{children:le.lastActivityLabel})]})]}),ee.length>0||Dt?r.jsx(Ur,{steps:ee,phase:Dt,limit:5,compact:!0}):r.jsx(_r,{events:Ne,limit:4,compact:!0}),r.jsx(Vr,{onOpenTrace:ks,onOpenTerminal:js,onSteer:Ut,compact:!0})]})]})]})})}),fn&&kt>0&&r.jsxs("button",{type:"button",className:"s-thread-new-messages",onClick:Zn,children:[r.jsx("span",{"aria-hidden":"true",children:"↓"})," ",kt," new ",kt===1?"message":"messages"," · jump to latest"]}),r.jsx("div",{ref:gn})]}),I.showTyping&&r.jsxs("div",{className:Pn,children:[r.jsx("div",{className:"s-thread-presence-line-avatars",children:r.jsx(rs,{agent:_??void 0,name:L,placement:"turn",size:22,className:"s-thread-presence-line-avatar",title:L})}),r.jsx("span",{className:"s-thread-presence-line-label",children:_n}),r.jsx("div",{className:qn,"aria-hidden":"true"})]}),r.jsx(Rr,{composeRef:M,draft:k,setDraft:P,composePlaceholder:ua,slashState:oe,setSlashState:Be,filteredSlashCommands:bn,applySlashCommand:In,mentionState:ie,setMentionState:He,filteredMentions:Cn,applyMention:An,updateTriggersFromDraft:kn,closeSuggestions:Mn,replyTarget:ae,onCancelReply:ca,isStopMode:ma,sending:H,composeAction:da,onSend:()=>{aa()},onInterrupt:()=>{Gt()},attachments:de,isAgentBusy:me,busyIntent:$s,onBusyIntentChange:ft,queued:ue,queueNote:ha,onEditQueued:oa,editingQueuedId:Te?.id??null,editingAttachmentCount:Ps.length,onCancelEdit:ia,onUnqueue:ra,onSendQueuedNow:e=>{la(e)}})]})})}function os(){return r.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("polyline",{points:"9 14 4 9 9 4"}),r.jsx("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})]})}const Ji=Mr({id:"thread",label:"Thread",route:{view:"conversation",conversationId:""},webPath:"/chat",screen:"ConversationScreen",embed:{path:"/embed/thread",profile:"macos.thread",rootClassName:"s-thread-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:lr}});export{zi as ConversationScreen,Ji as scoutSurface};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as j,j as e}from"./index-BFbLvCJn.js";import{c as v}from"./conversation-model-FxDeWlle.js";import{A as y}from"./AgentAvatar-Dn8TUv5W.js";import{C as b}from"./check-BM6QtbB7.js";import{C as w}from"./NewChatComposer-D-VB5vdt.js";import{S as C}from"./sparkles-Br-bA2aZ.js";import{X as f}from"./x-BcfhXYiF.js";import{T as I}from"./triangle-alert-BZikHKuT.js";import{c as E}from"./createLucideIcon-CKbjXlwv.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.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"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./file-text-BOJQiS8p.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"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./keyboard-nav-CEe-ApvZ.js";import"./media-blobs-Bi8pxr1u.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";import"./HarnessMark-CP-PWk2W.js";import"./runtime-picker-IRcTkMZ5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./colors-CFlbwC25.js";import"./index-CXzJ_hGx.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";const z=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],S=E("shield-alert",z);function L(t){const s=t.split(/\r?\n/).map(r=>r.trim()).find(Boolean)??"",a=110;return s.length>a?`${s.slice(0,a-1).trimEnd()}…`:s}function Te({pinnedAsk:t,onAnswer:s,onApprove:a,onReject:r,onSteer:n,enableKeyboard:d=!0}){const l=t.summary?.trim()||null,o=L(t.task),p=l&&l!==t.task.trim()?l:o,N=p!==o&&o.length>0,c=/\b(?:approve|approval|permission|allow|proceed|confirm|gate)\b/i.test(p),h=t.agentName??v(t.agentId)??t.agentId,g=c?`${h} needs approval`:`${h} asks`,u=j.useCallback(()=>{a?a():s()},[a,s]),x=j.useCallback(()=>{n?n():s()},[n,s]);return j.useEffect(()=>{if(!d)return;const k=i=>{const m=document.activeElement;m instanceof HTMLInputElement||m instanceof HTMLTextAreaElement||m instanceof HTMLElement&&m.isContentEditable||i.metaKey||i.ctrlKey||i.altKey||(i.key==="y"||i.key==="Y"?(i.preventDefault(),u()):i.key==="s"||i.key==="S"?(i.preventDefault(),x()):(i.key==="n"||i.key==="N")&&r&&(i.preventDefault(),r()))};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[d,u,x,r]),e.jsxs("div",{className:`s-thread-pinned-ask surface-card ${c?"s-thread-pinned-ask--approval":"s-thread-pinned-ask--question"}`,role:"alert","aria-live":"assertive",children:[e.jsx(y,{agent:{id:t.agentId,name:h,harness:t.harness,state:"needs"},size:44,placement:"row",presence:!0,gaze:"up",className:"s-thread-pinned-ask-coin"}),e.jsxs("div",{className:"s-thread-pinned-ask-body",children:[e.jsx("span",{className:"s-thread-pinned-ask-eyebrow",children:g}),e.jsx("p",{className:"s-thread-pinned-ask-text",children:p}),N&&e.jsxs("p",{className:"s-thread-pinned-ask-context",children:["Re: ",o]})]}),e.jsxs("div",{className:"s-thread-pinned-ask-actions",children:[e.jsxs("button",{type:"button",className:"btn btn--primary s-thread-pinned-ask-btn",onClick:u,title:c?"Approve this gate [Y]":"Answer this question [Y]",children:[e.jsx("kbd",{className:"s-kbd",children:"[Y]"}),c?e.jsx(b,{size:13,strokeWidth:2.2}):e.jsx(w,{size:13}),e.jsx("span",{children:c?"Approve":"Answer"})]}),e.jsxs("button",{type:"button",className:"btn btn--ghost s-thread-pinned-ask-btn",onClick:x,title:"Provide guidance or steer [S]",children:[e.jsx("kbd",{className:"s-kbd",children:"[S]"}),e.jsx(C,{size:13,strokeWidth:1.9}),e.jsx("span",{children:"Steer"})]}),r&&e.jsxs("button",{type:"button",className:"btn btn--danger s-thread-pinned-ask-btn",onClick:r,title:"Reject or decline [N]",children:[e.jsx("kbd",{className:"s-kbd",children:"[N]"}),e.jsx(f,{size:13,strokeWidth:2.2}),e.jsx("span",{children:"Reject"})]})]})]})}function $e({title:t,description:s,diff:a,command:r,risk:n="medium",onApprove:d,onReject:l,onSteer:o}){return e.jsxs("div",{className:"s-thread-approval-gate surface-card",role:"alert",children:[e.jsxs("div",{className:"s-thread-approval-gate-head",children:[e.jsxs("div",{className:"s-thread-approval-gate-title-wrap",children:[e.jsx(S,{size:16,className:"text-amber","aria-hidden":"true"}),e.jsx("span",{className:"label-sm text-amber",children:"Execution Approval Gate"}),n&&e.jsxs("span",{className:"chip chip--sm chip--mono chip--neutral",children:[n.toUpperCase()," RISK"]})]}),e.jsx("h3",{className:"s-thread-approval-gate-title",children:t}),s&&e.jsx("p",{className:"s-thread-approval-gate-desc",children:s})]}),r&&e.jsxs("div",{className:"s-thread-approval-gate-command surface-card surface-card--inset",children:[e.jsx("span",{className:"label-xs text-muted",children:"Command"}),e.jsx("code",{className:"s-thread-approval-gate-code",children:r})]}),a&&e.jsxs("div",{className:"s-thread-approval-gate-diff surface-card surface-card--inset",children:[e.jsx("span",{className:"label-xs text-muted",children:"Diff Preview"}),e.jsx("pre",{className:"s-thread-approval-gate-diff-pre",children:e.jsx("code",{children:a})})]}),e.jsxs("div",{className:"s-thread-approval-gate-actions",children:[e.jsxs("button",{type:"button",className:"btn btn--primary",onClick:d,children:[e.jsx("kbd",{className:"s-kbd",children:"[Y]"}),e.jsx(b,{size:13}),e.jsx("span",{children:"Approve Action"})]}),e.jsxs("button",{type:"button",className:"btn btn--danger",onClick:l,children:[e.jsx("kbd",{className:"s-kbd",children:"[N]"}),e.jsx(f,{size:13}),e.jsx("span",{children:"Reject"})]}),o&&e.jsxs("button",{type:"button",className:"btn btn--ghost",onClick:o,children:[e.jsx("kbd",{className:"s-kbd",children:"[S]"}),e.jsx("span",{children:"Steer…"})]})]})]})}function Ae({presence:t}){if(!t.showStrip)return null;const s=t.tone==="working";return e.jsxs("div",{className:`s-thread-status s-thread-status--${t.tone}`,"aria-live":"polite",children:[e.jsx("span",{className:"s-thread-status-dot-wrap","aria-hidden":"true",children:e.jsx("span",{className:`dot dot--sm ${s?"dot--working dot--pulse":"dot--neutral"}`})}),e.jsxs("div",{className:"s-thread-status-copy",children:[e.jsx("span",{className:"s-thread-status-label label-xs",children:t.label}),e.jsx("span",{className:"s-thread-status-detail",children:t.detail})]})]})}function T(t){switch(t){case"completed":return"Invocation completed";case"failed":return"Invocation failed";case"cancelled":return"Invocation cancelled";case"queued":return"Invocation queued";case"waking":return"Invocation waking";case"waiting":return"Invocation waiting";case"running":return"Invocation running";default:return`Invocation ${t.replace(/_/g," ")}`}}function $(t){switch(t){case"failed":return"failed";case"cancelled":return"cancelled";case"completed":return"completed";default:return"active"}}function De({flight:t,onOpenSession:s}){const a=$(t.state),r=t.summary?.trim()||null,n=a==="failed"?I:a==="cancelled"?f:b;return e.jsxs("div",{className:`s-thread-flight-outcome s-thread-flight-outcome--${a}`,role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"s-thread-flight-outcome-head",children:[e.jsx("span",{className:"s-thread-flight-outcome-mark","aria-hidden":"true",children:e.jsx(n,{size:12,strokeWidth:2.2})}),e.jsx("span",{className:"label-sm s-thread-flight-outcome-title",children:T(t.state)})]}),r&&e.jsx("p",{className:"s-thread-flight-outcome-summary",children:r}),e.jsx("p",{className:"s-thread-flight-outcome-note text-muted",children:"Broker outcome · observed turns are shown in the session when available."}),s&&e.jsx("div",{className:"s-thread-flight-outcome-actions",children:e.jsx("button",{type:"button",className:"btn btn--ghost",onClick:s,children:e.jsx("span",{children:"Open session"})})})]})}export{$e as ApprovalGateCard,De as ConversationFlightOutcome,Ae as ConversationStatusStrip,Te as PinnedAskCard};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.xc-avatar-root{position:relative;display:inline-grid;place-items:center;flex:none;box-sizing:border-box;-webkit-user-select:none;user-select:none}.xc-avatar-root>svg{display:none!important}.xc-avatar-shell{position:relative;display:block;width:100%;height:100%;overflow:hidden;border-radius:50%;box-sizing:border-box;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--hud-ink, #fff) 16%,transparent),inset 0 1px color-mix(in srgb,#000 26%,transparent)}.xc-avatar-shell:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:radial-gradient(120% 100% at 50% 118%,color-mix(in srgb,#fff 10%,transparent) 0%,transparent 48%),linear-gradient(180deg,color-mix(in srgb,#000 20%,transparent) 0%,color-mix(in srgb,#000 5%,transparent) 34%,transparent 62%)}.xc-avatar-img{position:absolute;display:block;max-width:none;pointer-events:none}.xc-avatar-img--pixel{image-rendering:pixelated;image-rendering:crisp-edges}.xc-avatar-patch{position:absolute;display:block;max-width:none;pointer-events:none}.xc-ring{position:absolute;inset:0;border-radius:50%;pointer-events:none}.xc-ring:before{content:"";position:absolute;inset:0;border-radius:50%;border:1px solid var(--xc-c, var(--hud-status-ok, #7fb069));box-sizing:border-box}.xc-ring[data-ring=idle]:before,.xc-ring[data-ring=ready]:before{border-width:1px;opacity:.45}.xc-ring[data-ring=offline]:before{border-style:dashed;opacity:.5}.xc-ring[data-ring=thinking]:before{animation:xc-pulse 2.4s ease-in-out infinite}.xc-ring[data-ring=needs]:before,.xc-ring[data-ring=waiting]:before,.xc-ring[data-ring=blocked]:before{border-width:1.5px}.xc-ring[data-ring=error]:before,.xc-ring[data-ring=failed]:before{animation:xc-blink 1.1s steps(1,end) infinite}.xc-ring[data-ring=working]:before{opacity:.25}.xc-ring[data-ring=working]:after{content:"";position:absolute;inset:-1px;border-radius:50%;background:conic-gradient(from 0deg,transparent 0deg,var(--xc-c, var(--hud-status-ok, #7fb069)) 72deg,transparent 132deg);-webkit-mask:radial-gradient(closest-side,transparent calc(100% - 2px),#000 calc(100% - 2px));mask:radial-gradient(closest-side,transparent calc(100% - 2px),#000 calc(100% - 2px));animation:xc-sweep 2.6s linear infinite}@keyframes xc-pulse{0%,to{opacity:.28}50%{opacity:1}}@keyframes xc-blink{0%,49%{opacity:1}50%,to{opacity:.16}}@keyframes xc-sweep{to{transform:rotate(360deg)}}.xc-badge-mark{position:absolute;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--hud-surface, #1e2029) 88%,var(--hud-bg, #000));color:color-mix(in srgb,var(--hud-ink, #fff) 76%,transparent);box-shadow:0 0 0 1.5px var(--hud-bg, #161820);pointer-events:none}.xc-stage-wrapper{position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center}.xc-stage{position:relative;overflow:hidden;display:inline-block;flex:none;box-sizing:border-box;background:var(--hud-surface);transition:width .56s cubic-bezier(.2,.8,.2,1),height .56s cubic-bezier(.2,.8,.2,1),border-radius .56s cubic-bezier(.2,.8,.2,1);-webkit-user-select:none;user-select:none}.xc-stage[role=button]{cursor:pointer}.xc-stage:after{content:"";position:absolute;inset:0;border:1px solid var(--hud-border);border-radius:inherit;pointer-events:none;transition:border-color var(--motion-duration-hover) ease}.xc-stage[role=button]:hover:after{border-color:var(--scout-chrome-ink-faint)}.xc-stage[role=button]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.xc-stage-ground{position:absolute;inset:0;border-radius:inherit;pointer-events:none;transition:opacity .4s ease,background .4s ease}.xc-stage-img,.xc-stage-patch{position:absolute;max-width:none;pointer-events:none;display:block;transition:width .56s cubic-bezier(.2,.8,.2,1),height .56s cubic-bezier(.2,.8,.2,1),left .56s cubic-bezier(.2,.8,.2,1),top .56s cubic-bezier(.2,.8,.2,1)}@media(prefers-reduced-motion:reduce){.xc-ring[data-ring]:before,.xc-ring[data-ring]:after{animation:none}.xc-ring[data-ring=working]:before{opacity:1}.xc-stage,.xc-stage-img,.xc-stage-patch,.xc-stage-ground{transition:none!important}}.xc-figure{position:relative;display:inline-block;flex:none;box-sizing:border-box;-webkit-user-select:none;user-select:none}.xc-figure-img{position:relative;display:block;width:100%;height:100%;max-width:none;pointer-events:none;z-index:1}.xc-figure-patch{position:absolute;display:block;max-width:none;pointer-events:none;z-index:2}.xc-figure-halo{position:absolute;left:50%;top:2%;width:calc(var(--xc-fig-h, 200px) * .79);height:calc(var(--xc-fig-h, 200px) * .79);transform:translate(-50%);border-radius:50%;opacity:.9;pointer-events:none;z-index:0}.xc-figure-floor{position:absolute;left:50%;bottom:0;width:calc(var(--xc-fig-h, 200px) * .75);height:calc(var(--xc-fig-h, 200px) * .07);transform:translate(-50%);border-radius:50%;pointer-events:none;z-index:0;background:radial-gradient(closest-side,color-mix(in srgb,#000 42%,transparent),transparent)}.xc-breathe{animation:xc-breathe 3.4s ease-in-out infinite;animation-delay:var(--xc-breathe-delay, 0ms)}@keyframes xc-breathe{0%,to{transform:translateY(0)}50%{transform:translateY(-1.5px)}}@media(prefers-reduced-motion:reduce){.xc-breathe{animation:none}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,l as X,n as Y,p as J,B as G,C as K,q as Q,o as V,j as a,t as M,D as ee}from"./index-BFbLvCJn.js";import{H as te}from"./HarnessMark-CP-PWk2W.js";import{g as re,s as ne,a as se,G as ie,b as oe,c as ce,d as ae}from"./runtime-picker-IRcTkMZ5.js";const le={idle:{label:"Idle",colour:"var(--hud-dim, #71717a)"},thinking:{label:"Thinking",colour:"var(--info, #6fb7c7)"},working:{label:"Working",colour:"var(--hud-status-ok, #7fb069)"},needs:{label:"Needs attention",colour:"var(--hud-status-warn, #d9a441)"},error:{label:"Error",colour:"var(--hud-status-error, #c74a4a)"},offline:{label:"Offline",colour:"var(--hud-dim, #6e6e72)"}};function ue(r){if(!r)return"idle";const e=r.toLowerCase();return e.includes("think")?"thinking":e.includes("work")||e.includes("turn")||e.includes("stream")||e.includes("run")||e.includes("busy")?"working":e.includes("need")||e.includes("wait")||e.includes("block")||e.includes("ask")||e.includes("prompt")?"needs":e.includes("err")||e.includes("fail")||e.includes("crash")?"error":e.includes("off")||e.includes("stop")||e.includes("down")||e.includes("dead")?"offline":"idle"}function de(r,e=0){const[l,t]=c.useState(0),o=c.useRef([]);return c.useEffect(()=>{if(r<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const i=()=>{o.current.push(window.setTimeout(()=>{t(1),o.current.push(window.setTimeout(()=>t(2),40)),o.current.push(window.setTimeout(()=>t(1),90)),o.current.push(window.setTimeout(()=>{t(0),i()},130))},2800+Math.random()*4500))};i();const u=o.current;return()=>{u.forEach(T=>window.clearTimeout(T)),u.length=0}},[r]),c.useEffect(()=>{if(e===0||r<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const i=[window.setTimeout(()=>t(1),0),window.setTimeout(()=>t(2),40),window.setTimeout(()=>t(1),90),window.setTimeout(()=>t(0),130)];return()=>i.forEach(u=>window.clearTimeout(u))},[e,r]),r<3?0:l}function fe(r,e,l){const[t,o]=c.useState("rest"),[i,u]=c.useState(0);return c.useEffect(()=>{if(!e){o("rest");return}if(typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const T=ae(l),x=()=>r.current?.getBoundingClientRect()??null;let w="rest",d="rest",b="rest",p=0,k=0;const g=()=>{const n=w!=="rest"?w:d;n!==b&&(b=n,o(n))},$=ne(n=>{w=T.sample(n,x),g(),window.clearTimeout(p),w!=="rest"&&(p=window.setTimeout(()=>{w="rest",g()},ie))}),f=se(n=>{window.clearTimeout(k),d=n?oe(n,x()):"rest",g(),d!=="rest"&&(k=window.setTimeout(()=>{d="rest",g(),u(s=>s+1)},ce))});return()=>{$(),f(),window.clearTimeout(p),window.clearTimeout(k)}},[e,l,r]),{dir:e?t:"rest",blinkNonce:i}}function ge({slug:r,name:e,project:l,harness:t,state:o,size:i,badge:u=!0,ring:T=!0,chip:x=!1,glow:w=!1,gaze:d,pose:b="rest",bustSrc:p,className:k,style:g,title:$}){const f=r.toLowerCase(),n=K[f],s=p?void 0:X[f],E=ue(o),y=le[E],N=c.useRef(null),A=b==="rest",{dir:B,blinkNonce:D}=fe(N,d==="pointer"&&A&&!!s,i??40),R=de(s&&A?s.roles.length+1:1,D),F=s&&R>0?Y[R]?.role:void 0,S=A?F??re(d==="pointer"?B:d??"rest",s?.roles):void 0,C=c.useMemo(()=>J(l),[l]),j=(x?G[f]?.ink:void 0)??n?.ink??1,I=c.useMemo(()=>Q(C,j),[C,j]);if(!n)return null;const h=x?G[f]:void 0,v=i??40,[H,_,m]=V(n,v),L=`${n.w/m*100}%`,W=`${n.h/m*100}%`,P=`${-H/m*100}%`,O=`${-_/m*100}%`,U=e||r.toUpperCase(),Z=$??`${U} · ${l||"openscout"} · ${t||"scout"} · ${y.label}`,q=u&&v>=28&&!!(t&&t!=="unknown"),z=i!=null?{width:i,height:i}:{width:"100%",height:"100%"};return a.jsxs("span",{className:`xc-avatar-root ${k||""}`,style:{...z,boxShadow:w?`0 0 ${Math.round(v*.3)}px ${y.colour}`:void 0,...g},title:Z,children:[a.jsx("span",{ref:N,className:"xc-avatar-shell",style:{background:I,opacity:E==="offline"?.55:1},children:h?a.jsx("img",{src:M(`${f}-chip-id.webp`),alt:"",className:"xc-avatar-img xc-avatar-img--pixel",style:{width:`${h.fill*100}%`,height:`${h.fill*100}%`,left:`${(.5-h.fill/2+(h.nudge?.[0]??0))*100}%`,top:`${(.5-h.fill/2+(h.nudge?.[1]??0))*100}%`}}):a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p??M(ee(f,b)),alt:"",className:"xc-avatar-img",style:{width:L,height:W,left:P,top:O}}),s&&S&&a.jsx("img",{src:M(`${s.dir}/${S}.webp`),alt:"",className:"xc-avatar-patch",style:{width:`${s.patch[2]/m*100}%`,height:`${s.patch[3]/m*100}%`,left:`${(-H+s.patch[0])/m*100}%`,top:`${(-_+s.patch[1])/m*100}%`}})]})}),T&&a.jsx("span",{className:"xc-ring","data-ring":E,style:{"--xc-c":y.colour}}),q&&a.jsx(te,{harness:t,size:Math.max(8,Math.round(v*.22)),className:"xc-badge-mark",style:{right:"0%",bottom:"0%",width:"32%",height:"32%",minWidth:12,minHeight:12},title:null})]})}export{ge as C,de as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,l as j,E as B,j as l,t as b,C as R,B as x}from"./index-BFbLvCJn.js";function N({slug:p,size:h,pixel:a=!1,paused:g=!1,expression:v="rest"}){const i=p.toLowerCase(),s=R[i],e=a?void 0:j[i],d=r.useRef(null),[E,k]=r.useState(!0),[$,y]=r.useState(()=>typeof document>"u"||!document.hidden),[_,T]=r.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),[w,c]=r.useState(null),m=!!s&&(!a||!!x[i]);r.useEffect(()=>{if(!d.current)return;const n=new IntersectionObserver(([S])=>k(S.isIntersecting));n.observe(d.current);const t=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>T(t.matches),f=()=>y(!document.hidden);return t.addEventListener("change",o),document.addEventListener("visibilitychange",f),()=>{n.disconnect(),t.removeEventListener("change",o),document.removeEventListener("visibilitychange",f)}},[m]);const u=!!(e?.roles.includes("blink-half")&&e.roles.includes("blink-shut"))&&!g&&E&&$&&!_;if(r.useEffect(()=>{if(!u)return;const n=B(`crew-blink:${i}`);let t;const o=()=>{t=window.setTimeout(()=>{c("blink-half"),t=window.setTimeout(()=>{c("blink-shut"),t=window.setTimeout(()=>{c("blink-half"),t=window.setTimeout(()=>{c(null),o()},40)},50)},40)},n.float(2800,6800))};return c(null),o(),()=>window.clearTimeout(t)},[i,u]),!m||!s)return null;const C=u&&w?w:v;return l.jsxs("span",{ref:d,className:`crew-sprite${a?" is-pixel":""}`,style:{width:h*s.w/s.h,height:h},"aria-hidden":"true",children:[i==="milo"&&!a?l.jsx("span",{className:"crew-sprite__visor-backing"}):null,l.jsx("img",{className:"crew-sprite__art",src:b(`${i}-${a?"chip-id":"bust"}.webp`),alt:"",draggable:!1}),e?e.roles.map(n=>l.jsx("img",{className:"crew-sprite__patch",src:b(`${e.dir}/${n}.webp`),alt:"",draggable:!1,style:{left:`${e.patch[0]/s.w*100}%`,top:`${e.patch[1]/s.h*100}%`,width:`${e.patch[2]/s.w*100}%`,height:`${e.patch[3]/s.h*100}%`,visibility:C===n?"visible":"hidden"}},n)):null]})}export{N as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.crew-sprite{position:relative;display:inline-block;flex:none;vertical-align:bottom;pointer-events:none;-webkit-user-select:none;user-select:none}.crew-sprite__art{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.crew-sprite__patch{position:absolute;display:block;pointer-events:none}.crew-sprite.is-pixel .crew-sprite__art{image-rendering:pixelated}.crew-sprite__visor-backing{position:absolute;left:38%;top:24.6%;width:26%;height:8%;border-radius:40%;background:#172329;pointer-events:none}.crew-sprite__art{position:relative}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as R,l as K,n as U,o as Y,C as S,r as g,q as J,j as n,t as T}from"./index-BFbLvCJn.js";import"./CrewAvatar-a_C_F9r_.js";function O(c){const[t,a]=g.useState(0),e=g.useRef([]);return g.useEffect(()=>{if(c<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const r=()=>{e.current.push(window.setTimeout(()=>{a(1),e.current.push(window.setTimeout(()=>a(2),40)),e.current.push(window.setTimeout(()=>a(1),90)),e.current.push(window.setTimeout(()=>{a(0),r()},130))},2600+Math.random()*4200))};r();const d=e.current;return()=>{d.forEach(f=>window.clearTimeout(f)),d.length=0}},[c]),c<3?0:t}function V({slug:c,open:t=!1,onToggle:a,coin:e=56,figure:r=240,hue:d,state:f="idle",interactive:l=!0,radius:M=16,floor:j=!1,className:v,style:C,children:$}){const u=c.toLowerCase(),o=S[u]??S.milo,s=K[u],p=R.find(h=>h.slug===u)??R[0],x=O(s?s.roles.length+1:1),b=s&&x>0?U[x]?.role:void 0,[N,W,A]=Y(o,e),i=e/A,w=r*o.w/o.h,m=r/o.h,F=t?w:e,H=t?r:e,_=t?w:o.w*i,L=t?r:o.h*i,E=t?0:-N*i,y=t?0:-W*i,B=g.useMemo(()=>J(d??null,o.ink),[d,o.ink]),k=`${M}px`,D=Math.round(w*.68),I=Math.max(8,Math.round(r*.072)),X=s?s.patch[2]*(t?m:i):0,q=s?s.patch[3]*(t?m:i):0,z=s?(t?0:E)+s.patch[0]*(t?m:i):0,G=s?(t?0:y)+s.patch[1]*(t?m:i):0;return n.jsxs("div",{className:`xc-stage-wrapper ${v||""}`,style:C,"data-open":t?"true":"false",children:[n.jsxs("div",{className:"xc-stage",role:l?"button":void 0,tabIndex:l?0:void 0,"aria-expanded":l?t:void 0,"aria-label":`${p.name} (${t?"Full figure":"Avatar"})`,onClick:l?a:void 0,onKeyDown:l&&a?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),a())}:void 0,style:{width:F,height:H,borderRadius:t?k:"50%"},children:[n.jsx("span",{className:"xc-stage-ground",style:{background:B,opacity:t?.92:1,borderRadius:t?k:"50%"}}),j&&n.jsx("span",{className:"xc-stage-floor","aria-hidden":!0,style:{position:"absolute",left:"50%",bottom:0,width:D,height:I,transform:"translateX(-50%)",borderRadius:"50%",background:"radial-gradient(closest-side at 50% 50%, color-mix(in srgb, black 45%, transparent) 0%, color-mix(in srgb, black 22%, transparent) 46%, transparent 100%)",opacity:t?1:0,transition:"opacity 400ms ease",pointerEvents:"none"}}),n.jsx("img",{src:T(`${u}-bust.webp`),alt:p.name,className:"xc-stage-img",style:{width:_,height:L,left:E,top:y}}),s&&b&&n.jsx("img",{src:T(`${s.dir}/${b}.webp`),alt:"",className:"xc-stage-patch",style:{width:X,height:q,left:z,top:G}})]}),$]})}export{V as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,r as m}from"./index-BFbLvCJn.js";import{A as _}from"./AgentAvatar-Dn8TUv5W.js";import{H}from"./HarnessMark-CP-PWk2W.js";import{t as T}from"./time-Dhsh_2EG.js";import{A as Q}from"./AddProjectForm-4sVXmjfN.js";import{m as D,n as O}from"./Provider-BEXAZWd9.js";import{b as q}from"./machine-scope-DJt9RZ2w.js";import{a as U}from"./agent-specialization-DYX_DSlY.js";import{o as J}from"./model-CBkMvT1w.js";import{s as z}from"./project-overview-helpers-BQTc_Ous.js";/* empty css */import{S as K}from"./search-Bv2IONmc.js";import{P as G}from"./plus-B0hdY0fF.js";import{F as C}from"./folder-C2emmTHq.js";import{F as V}from"./DocumentFocusViewer-mxzPxQQW.js";import{M as X}from"./message-square-BwqBIfv5.js";import{c as Y}from"./createLucideIcon-CKbjXlwv.js";const Z=[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]],ee=Y("telescope",Z);function M(e){return e.needs?3:e.working?2:1}function $(e){return[...e].sort((n,s)=>M(s)-M(n)||s.lastActivityAt-n.lastActivityAt)}function S(e){return[...new Set(e.map(n=>n?.trim().toLowerCase()).filter(n=>!!n))].sort()}function W(e){const n=[...new Set(e.map(s=>s?.trim()).filter(s=>!!s))];return n.length===0?null:n.length===1?n[0]:`${n.length} branches`}function B(e){return e.needs>0?"needs":e.working>0||e.liveSessionCount>0?"working":"idle"}function te(e){if(e.needs>0)return`${e.needs} ${e.needs===1?"item needs":"items need"} attention`;const n=Math.max(e.working,e.liveSessionCount);return n>0?`${n} active work ${n===1?"stream":"streams"}`:"No active work"}function se(e,n){const s=$(n.filter(i=>i.projectSlug===e.slug)),r=S(s.map(i=>i.harness)),o={threadId:`project:${e.slug}`,projectSlug:e.slug,projectTitle:e.title,projectRoot:e.root,branch:W(e.branches.length>0?e.branches:s.map(i=>i.branch)),working:e.working>0||e.liveSessionCount>0,needs:e.needs>0,lastActivityAt:e.lastActivityAt,sessionCount:e.sessionCount,work:te(e),conversationId:null};return{kind:"project",key:`project:${e.slug}`,agentId:null,name:e.title,headline:"Project agent",harnesses:r,model:null,effort:null,status:B(e),needs:o.needs,working:o.working,substrates:[o],primary:o,work:o.work,conversationId:null,lastActivityAt:e.lastActivityAt,sessionCount:e.sessionCount}}function ne(e){const n=$(e),s=n[0];return{threadId:s.id,projectSlug:s.projectSlug,projectTitle:s.projectTitle,projectRoot:s.projectRoot,branch:W(n.map(r=>r.branch)),working:n.some(r=>r.working),needs:n.some(r=>r.needs),lastActivityAt:Math.max(...n.map(r=>r.lastActivityAt)),sessionCount:n.reduce((r,o)=>r+o.sessionCount,0),work:s.work,conversationId:s.conversationId}}function re(e){const n=new Map;for(const s of e){const r=n.get(s.projectSlug)??[];r.push(s),n.set(s.projectSlug,r)}return[...n.values()].map(ne).sort((s,r)=>Number(r.needs)-Number(s.needs)||Number(r.working)-Number(s.working)||r.lastActivityAt-s.lastActivityAt)}function ie(e,n){return n.some(s=>s.needs)?"needs":e.some(s=>(s.state??"").toLowerCase().includes("think"))?"thinking":n.some(s=>s.working)||e.some(s=>/work|running|in_turn/iu.test(s.state??""))?"working":"idle"}function b(e){const n=e?.trim().replace(/\/+$/u,"");return n?n.replace(/^\/(?:Users|home)\/[^/]+(?=\/)/u,"~"):null}function oe(e,n){return[n.root,...n.worktrees.map(r=>r.root)].map(b).filter(r=>!!r).some(r=>e===r||e.startsWith(`${r}/`))}function ae(e,n,s){const r=new Set;for(const i of s)i.agentId===e.id&&r.add(i.projectSlug);const o=[e.projectRoot,e.cwd].map(b).filter(i=>!!i);for(const i of n){const a=[i.slug,i.title].map(c=>c.trim().toLowerCase());e.project&&a.includes(e.project.trim().toLowerCase())&&r.add(i.slug),e.workspaceQualifier&&a.includes(e.workspaceQualifier.trim().toLowerCase())&&r.add(i.slug),o.some(c=>oe(c,i))&&r.add(i.slug)}if(r.size===0){const i=b(e.projectRoot??e.cwd);i?r.add(`root:${i}`):e.project?.trim()?r.add(`project:${e.project.trim().toLowerCase()}`):e.workspaceQualifier?.trim()&&r.add(`workspace:${e.workspaceQualifier.trim().toLowerCase()}`)}return r}function ce(e,n,s){const r=new Set;for(const o of e)for(const i of ae(o,n,s))r.add(i);return r.size>1?!0:e.some(o=>!O(o)&&!o.workspaceQualifier?.trim()&&!o.cwd?.trim())}function le(e,n,s){const r=e.filter(D),o=new Map;for(const i of r){const a=i.definitionId.trim()||i.id,c=o.get(a)??[];c.push(i),o.set(a,c)}return[...o.entries()].flatMap(([i,a])=>{if(!ce(a,n,s))return[];const u=[...a].sort((d,x)=>(x.updatedAt??0)-(d.updatedAt??0))[0],h=new Set(a.map(d=>d.id)),v=s.filter(d=>d.agentId&&h.has(d.agentId)),w=re(v),f=w[0]??null,p=S([...a.map(d=>d.harness),...v.map(d=>d.harness)]),y=S(a.map(d=>d.model)),A=S(a.map(d=>d.reasoningEffort)),j=ie(a,w),g=Math.max(0,...a.map(d=>d.updatedAt??0),...w.map(d=>d.lastActivityAt)),k=U(u);return[{kind:"role",key:`role:${i}`,agentId:u.id,name:u.name,headline:k.headline,harnesses:p,model:y.length===1?y[0]:null,effort:A.length===1?A[0]:null,status:j,needs:j==="needs",working:j==="working"||j==="thinking",substrates:w,primary:f,work:f?.work??k.headline,conversationId:f?.conversationId??u.conversationId,lastActivityAt:g,sessionCount:w.reduce((d,x)=>d+x.sessionCount,0)}]})}function L(e){switch(e.status){case"needs":return 3;case"working":return 2;case"thinking":return 1;case"idle":return 0}}function E(e,n,s,r=null){const o=q(s,r);return[...e.map(a=>se(a,n)),...le(o,e,n)].sort((a,c)=>L(c)-L(a)||c.lastActivityAt-a.lastActivityAt||a.name.localeCompare(c.name))}function de(e,n){switch(n){case"all":return!0;case"active":return e.status==="working"||e.status==="thinking";case"needs":return e.status==="needs";case"idle":return e.status==="idle"}}function ue(e,n){const s=B(e);switch(n){case"all":return!0;case"active":return s==="working";case"needs":return s==="needs";case"idle":return s==="idle"}}function he(e,n){const s=n.trim().toLowerCase();return!s||e.name.toLowerCase().includes(s)||e.headline.toLowerCase().includes(s)||e.work.toLowerCase().includes(s)?!0:e.substrates.some(r=>r.projectTitle.toLowerCase().includes(s)||r.projectSlug.toLowerCase().includes(s)||(r.projectRoot?.toLowerCase().includes(s)??!1))}function pe(e,n){const s=n.trim().toLowerCase();return s?e.title.toLowerCase().includes(s)||e.slug.toLowerCase().includes(s)||(e.root?.toLowerCase().includes(s)??!1):!0}function me(e){switch(e){case"needs":return"Needs attention";case"working":return"Working";case"thinking":return"Thinking";case"idle":return"Idle"}}const we=[{id:"all",label:"All"},{id:"active",label:"Live"},{id:"idle",label:"Idle"}];function je(e,n){if(n){e({view:"conversation",conversationId:n});return}e({view:"messages"})}function R(e,n){e({view:"code",project:n})}function fe(e,n,s){e(J(n,s))}function P(e,n,s){e({view:"agents-v2",projectSlug:s,...n.machineId?{machineId:n.machineId}:{},...n.showEphemeral?{showEphemeral:!0}:{}})}function ge({model:e,agents:n,route:s,navigate:r,nowMs:o}){const[i,a]=m.useState("projects"),[c,u]=m.useState("all"),[h,v]=m.useState(""),[w,f]=m.useState(!1),p=m.useMemo(()=>E(e.projects,e.threads,n,s.machineId??null),[n,e.projects,e.threads,s.machineId]),y=m.useMemo(()=>p.filter(l=>de(l,c)&&he(l,h)),[p,h,c]),A=m.useMemo(()=>e.projects.filter(l=>ue(l,c)&&pe(l,h)),[e.projects,h,c]),j=e.projects.filter(l=>l.working>0||l.liveSessionCount>0).length,g=e.projects.filter(l=>l.needs>0).length,k=p.filter(l=>l.status==="working"||l.status==="thinking").length,d=p.filter(l=>l.status==="needs").length,x=p.filter(l=>l.kind==="project").length,N=p.filter(l=>l.kind==="role").length;return t.jsxs("main",{className:"cw-root","aria-label":"Projects and agents",children:[t.jsxs("div",{className:"cw-toolbar",children:[t.jsxs("div",{className:"cw-modeToggle",role:"group","aria-label":"Directory view",children:[t.jsx("button",{type:"button","data-active":i==="projects"||void 0,"aria-pressed":i==="projects",onClick:()=>a("projects"),title:"Browse tracked projects",children:"Projects"}),t.jsx("button",{type:"button","data-active":i==="agents"||void 0,"aria-pressed":i==="agents",onClick:()=>a("agents"),title:"Browse durable agent identities",children:"Agents"})]}),t.jsxs("label",{className:"cw-search",role:"search",children:[t.jsx(K,{size:12,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("input",{type:"search",value:h,placeholder:i==="projects"?"Find project":"Find agent or project","aria-label":i==="projects"?"Find project":"Find agent or project",onChange:l=>v(l.currentTarget.value)})]}),t.jsx("div",{className:"cw-filters","aria-label":"Status filter",children:we.map(l=>t.jsx("button",{type:"button","data-active":c===l.id||void 0,"aria-pressed":c===l.id,onClick:()=>u(l.id),children:l.label},l.id))}),t.jsxs("button",{type:"button",className:"cw-addProject","aria-expanded":w,onClick:()=>f(l=>!l),children:[t.jsx(G,{size:11,strokeWidth:1.9,"aria-hidden":!0}),"Add project"]})]}),w?t.jsx(Q,{onClose:()=>f(!1)}):null,t.jsx("div",{className:"cw-digest",children:i==="projects"?t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[e.projects.length," projects"]}),t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":j>0?"live":void 0,children:[j," live"]}),g>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":"needs",children:[g," ",g===1?"ask":"asks"]})]}):null]}):t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[x," project agents"]}),N>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{children:[N," role ",N===1?"agent":"agents"]})]}):null,t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":k>0?"live":void 0,children:[k," live"]}),d>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"cw-digestSep",children:"·"}),t.jsxs("span",{"data-tone":"needs",children:[d," ",d===1?"ask":"asks"]})]}):null]})}),i==="projects"?t.jsx(xe,{projects:A,route:s,navigate:r,nowMs:o,allEmpty:e.projects.length===0}):t.jsx(ye,{members:y,route:s,navigate:r,nowMs:o,allEmpty:p.length===0})]})}function ke({project:e,threads:n,route:s,navigate:r,nowMs:o}){const i=E([e],n,[])[0];return t.jsx("main",{className:"cw-root cw-root--scoped","aria-label":`${e.title} agent`,children:t.jsx(I,{title:"Project agent",members:[i],route:s,navigate:r,nowMs:o})})}const F=5;function xe({projects:e,route:n,navigate:s,nowMs:r,allEmpty:o}){const[i,a]=m.useState(!1);if(e.length===0)return t.jsx("div",{className:"cw-empty",children:o?"No projects are tracked yet.":"No projects match these filters."});const c=i?e:e.slice(0,F),u=Math.max(0,e.length-F);return t.jsxs("div",{className:"cw-workspaceList",children:[c.map(h=>t.jsx(ve,{project:h,route:n,navigate:s,nowMs:r},h.slug)),u>0?t.jsx("button",{type:"button",className:"cw-showMore",onClick:()=>a(h=>!h),children:i?"Show fewer":`Show ${u} more`}):null]})}function ve({project:e,route:n,navigate:s,nowMs:r}){const o=e.working>0||e.liveSessionCount>0;return t.jsx("article",{className:"cw-workspace","data-state":e.needs>0?"needs":o?"live":void 0,children:t.jsxs("button",{type:"button",className:"cw-workspaceHead",onClick:()=>P(s,n,e.slug),children:[t.jsxs("span",{className:"cw-workspaceTitle",children:["/",e.title]}),t.jsx("span",{className:"cw-workspaceRoot",title:e.root??void 0,children:e.root?z(e.root):"Discovered project"}),t.jsxs("span",{className:"cw-workspaceMeta",children:[t.jsxs("span",{children:[e.worktreeCount," ",e.worktreeCount===1?"worktree":"worktrees"," · ",e.sessionCount," ",e.sessionCount===1?"session":"sessions"]}),e.needs>0?t.jsxs("span",{className:"cw-workspaceAsks",children:[e.needs," ",e.needs===1?"ask":"asks"]}):t.jsx("time",{"data-tone":o?"live":void 0,children:o?"now":e.lastActivityAt?T(e.lastActivityAt,r):"no activity"})]})]})})}function ye({members:e,route:n,navigate:s,nowMs:r,allEmpty:o}){if(e.length===0)return t.jsx("div",{className:"cw-empty",children:o?"No durable agents are registered yet.":"No agents match these filters."});const i=e.filter(c=>c.kind==="role"),a=e.filter(c=>c.kind==="project");return t.jsxs("div",{className:"cw-agentDirectory",children:[i.length>0?t.jsx(I,{title:"Role agents",members:i,route:n,navigate:s,nowMs:r}):null,a.length>0?t.jsx(I,{title:"Project agents",members:a,route:n,navigate:s,nowMs:r}):null]})}function I({title:e,members:n,route:s,navigate:r,nowMs:o}){return t.jsxs("section",{className:"cw-agentSection","aria-label":e,children:[t.jsxs("div",{className:"cw-agentSectionHead",children:[t.jsx("h2",{children:e}),t.jsx("span",{children:n.length})]}),t.jsx("div",{className:"cw-grid",children:n.map((i,a)=>t.jsx(Ae,{member:i,index:a,route:s,navigate:r,nowMs:o},i.key))})]})}function Ae({member:e,index:n,route:s,navigate:r,nowMs:o}){const i=e.primary,[a,c]=m.useState(!1);return t.jsxs("article",{className:"cw-card sys-panel","data-status":e.status,"data-kind":e.kind,onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),onFocus:()=>c(!0),onBlur:()=>c(!1),children:[t.jsxs("header",{className:"cw-cardHead",children:[t.jsx(_,{agent:{name:e.name,state:Ce(e.status)},placement:"hero",size:44,presence:!0,gaze:"pointer",pose:a?"rest":"turn-left",className:"xc-breathe",style:{"--xc-breathe-delay":`${-(n*1.1%3.4)}s`}}),t.jsxs("div",{className:"cw-cardIdentity",children:[t.jsxs("div",{className:"cw-cardNameRow",children:[e.harnesses.length>0?t.jsx("span",{className:"cw-cardHarness","data-idle":e.status==="idle"||void 0,"aria-hidden":!0,children:e.harnesses.map(u=>t.jsx(H,{harness:u,size:13},u))}):null,t.jsx("b",{title:e.name,children:e.name}),t.jsx("span",{className:"cw-statusPill","data-status":e.status,children:me(e.status)})]}),t.jsx("div",{className:"cw-cardSubline",children:t.jsx("span",{className:"cw-headline",children:e.headline})})]})]}),e.kind==="project"&&i?t.jsxs("div",{className:"cw-projectContext",title:i.projectRoot??void 0,children:[t.jsx(C,{size:11,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("span",{children:i.projectRoot?z(i.projectRoot):`/${i.projectTitle}`}),t.jsxs("em",{children:[e.sessionCount," ",e.sessionCount===1?"session":"sessions"]})]}):e.substrates.length>0?t.jsx("div",{className:"cw-substrates",children:e.substrates.map((u,h)=>t.jsx(Se,{substrate:u,route:s,navigate:r,primary:h===0},u.threadId))}):null,t.jsxs("div",{className:"cw-work",children:[t.jsx("p",{title:e.work,children:e.work}),t.jsx("time",{children:e.lastActivityAt?T(e.lastActivityAt,o):"—"})]}),t.jsx("footer",{className:"cw-cardActions",children:e.kind==="project"&&i?t.jsxs(t.Fragment,{children:[t.jsxs("button",{type:"button",onClick:()=>P(r,s,i.projectSlug),children:[t.jsx(V,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Open project"]}),t.jsxs("button",{type:"button",onClick:()=>R(r,i.projectSlug),children:[t.jsx(C,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Browse code"]})]}):t.jsxs(t.Fragment,{children:[e.conversationId?t.jsxs("button",{type:"button",onClick:()=>je(r,e.conversationId),children:[t.jsx(X,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Chat"]}):null,i?t.jsxs("button",{type:"button",onClick:()=>R(r,i.projectSlug),children:[t.jsx(C,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Browse code"]}):null,e.agentId?t.jsxs("button",{type:"button",onClick:()=>fe(r,s,e.agentId),children:[t.jsx(ee,{size:12,strokeWidth:1.9,"aria-hidden":!0}),"Inspect"]}):null]})})]})}function Ce(e){switch(e){case"needs":return"needs_attention";case"working":return"in_turn";case"thinking":return"thinking";case"idle":return"idle"}}function Se({substrate:e,route:n,navigate:s,primary:r=!1}){return t.jsxs("button",{type:"button",className:"cw-substrateChip","data-primary":r||void 0,"data-live":e.working||void 0,title:e.projectRoot??void 0,onClick:()=>P(s,n,e.projectSlug),children:[t.jsx(C,{size:11,strokeWidth:1.8,"aria-hidden":!0}),t.jsx("span",{children:e.projectTitle}),e.branch?t.jsxs("em",{children:["git: ",e.branch]}):null]})}const De=Object.freeze(Object.defineProperty({__proto__:null,CrewWorkspaces:ge,ProjectAgentDirectory:ke},Symbol.toStringTag,{value:"Module"}));export{ge as C,ke as P,De as a,E as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.cw-root{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-2xs);padding:0 var(--space-2xl) var(--space-6xl)}.cw-root--scoped{padding-top:var(--space-lg)}.cw-toolbar{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-2xl);min-height:36px}.cw-modeToggle,.cw-filters{display:flex;align-items:center;gap:var(--space-sm)}.cw-modeToggle button,.cw-filters button{display:flex;align-items:center;height:22px;padding:0 6px;border:none;border-radius:6px;background:transparent;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;cursor:pointer;transition:background .12s var(--pi-ease),color .12s var(--pi-ease)}.cw-modeToggle button:hover,.cw-filters button:hover{color:var(--pi-ink)}.cw-modeToggle button[data-active],.cw-filters button[data-active]{background:color-mix(in srgb,var(--hud-ink) 8%,transparent);color:var(--pi-ink)}.cw-search{flex:0 1 200px;min-width:140px;display:flex;align-items:center;gap:7px;height:24px;padding:0 8px;border-radius:6px;background:color-mix(in srgb,var(--hud-ink) 4%,transparent);color:var(--pi-dim);transition:background .12s var(--pi-ease),color .12s var(--pi-ease)}.cw-search:focus-within{background:color-mix(in srgb,var(--hud-ink) 8%,transparent);color:var(--pi-muted)}.cw-search input{flex:1;min-width:0;border:none;background:transparent;color:var(--pi-ink);font-size:var(--text-md);font-family:var(--pi-sans)}.cw-search input:focus{outline:none}.cw-search input::placeholder{color:var(--pi-dim)}.cw-addProject{margin-left:auto;display:flex;align-items:center;gap:6px;height:24px;padding:0 6px;border:none;border-radius:6px;background:transparent;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;cursor:pointer;transition:background .12s var(--pi-ease),color .12s var(--pi-ease)}.cw-addProject:hover{color:var(--pi-ink)}.cw-addProject[aria-expanded=true]{background:color-mix(in srgb,var(--hud-ink) 8%,transparent);color:var(--pi-ink)}.cw-digest{flex:none;display:flex;align-items:center;gap:5px;min-height:24px;color:var(--pi-dim);font-family:var(--pi-mono);font-size:var(--text-xs);font-weight:600;letter-spacing:.12em;text-transform:uppercase;font-variant-numeric:tabular-nums}.cw-digest span[data-tone=live]{color:var(--pi-accent)}.cw-digest span[data-tone=needs]{color:var(--pi-muted)}.cw-digestSep{opacity:.5}.cw-empty{padding:48px 12px;text-align:center;color:var(--pi-dim);font-size:var(--text-sm)}.cw-agentDirectory,.cw-agentSection{display:flex;flex-direction:column;gap:var(--space-lg)}.cw-agentDirectory{padding-top:var(--space-sm)}.cw-agentSectionHead{display:flex;align-items:baseline;gap:8px;padding-bottom:var(--space-xs);border-bottom:1px solid var(--pi-hairline)}.cw-agentSectionHead h2{margin:0;color:var(--pi-ink);font-size:var(--text-sm);font-weight:650}.cw-agentSectionHead span{color:var(--pi-dim);font-family:var(--pi-mono);font-size:var(--text-2xs)}.cw-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:var(--space-lg)}.cw-card{display:flex;flex-direction:column;gap:var(--space-md);padding:var(--space-lg);border:1px solid var(--pi-hairline);border-radius:12px;background:linear-gradient(180deg,color-mix(in srgb,white 2.5%,transparent),transparent 40%),color-mix(in srgb,var(--hud-surface) 30%,transparent);transition:border-color .16s var(--pi-ease),transform .16s var(--pi-ease),background .16s var(--pi-ease)}.cw-card:hover{border-color:var(--pi-hairline-strong);transform:translateY(-1px)}.cw-card[data-status=needs]{border-color:color-mix(in srgb,#d9a441 45%,var(--pi-hairline))}.cw-card[data-status=working]{border-color:color-mix(in srgb,var(--pi-accent) 32%,var(--pi-hairline))}.cw-cardHead{display:flex;align-items:flex-start;gap:var(--space-md)}.cw-cardIdentity{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.cw-cardNameRow{display:flex;align-items:center;gap:8px;min-width:0}.cw-cardHarness{flex:none;display:inline-flex;align-items:center;gap:4px;color:var(--pi-ink)}.cw-cardHarness[data-idle]{color:var(--pi-dim)}.cw-cardNameRow b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-ink);font-size:var(--text-md);font-weight:650}.cw-statusPill{flex:none;padding:2px 8px;border-radius:999px;font-size:var(--text-2xs);font-weight:650;letter-spacing:.01em;color:var(--pi-dim);background:color-mix(in srgb,var(--hud-ink) 8%,transparent);box-shadow:inset 0 0 0 1px var(--pi-hairline)}.cw-statusPill[data-status=needs]{color:color-mix(in srgb,#d9a441 88%,var(--pi-ink));background:color-mix(in srgb,#d9a441 14%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,#d9a441 40%,transparent)}.cw-statusPill[data-status=working]{color:color-mix(in srgb,var(--pi-accent) 84%,var(--pi-ink));background:color-mix(in srgb,var(--pi-accent) 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--pi-accent) 32%,transparent)}.cw-statusPill[data-status=thinking]{color:color-mix(in srgb,#6fb7c7 86%,var(--pi-ink));background:color-mix(in srgb,#6fb7c7 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,#6fb7c7 32%,transparent)}.cw-cardSubline{display:flex;align-items:center;gap:6px;min-width:0;color:var(--pi-muted);font-size:var(--text-xs)}.cw-headline{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cw-substrates{display:flex;flex-wrap:wrap;gap:6px}.cw-substrateChip{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border:1px solid var(--pi-hairline);border-radius:999px;background:color-mix(in srgb,var(--hud-surface) 26%,transparent);color:var(--pi-muted);font-size:var(--text-2xs);cursor:pointer;transition:border-color .15s var(--pi-ease),color .15s var(--pi-ease)}.cw-substrateChip:hover{border-color:var(--pi-hairline-strong);color:var(--pi-ink)}.cw-substrateChip[data-primary]{color:var(--pi-ink);background:color-mix(in srgb,var(--hud-ink) 6%,transparent)}.cw-substrateChip[data-live]{border-color:color-mix(in srgb,var(--pi-accent) 34%,var(--pi-hairline))}.cw-substrateChip em{font-style:normal;color:var(--pi-dim);font-family:var(--pi-mono)}.cw-work{display:flex;align-items:baseline;justify-content:space-between;gap:var(--space-md);padding-top:var(--space-2xs);border-top:1px solid var(--pi-hairline)}.cw-work p{flex:1;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-ink);font-size:var(--text-sm)}.cw-work time{flex:none;color:var(--pi-dim);font-size:var(--text-2xs);font-family:var(--pi-mono)}.cw-cardActions{display:flex;gap:6px}.cw-cardActions:empty{display:none}.cw-cardActions button{flex:1;display:flex;align-items:center;justify-content:center;gap:5px;height:26px;border:1px solid var(--pi-hairline);border-radius:7px;background:transparent;color:var(--pi-muted);font-size:var(--text-2xs);font-weight:600;cursor:pointer;transition:background .15s var(--pi-ease),color .15s var(--pi-ease),border-color .15s var(--pi-ease)}.cw-cardActions button:hover{color:var(--pi-ink);border-color:var(--pi-hairline-strong);background:color-mix(in srgb,var(--hud-ink) 5%,transparent)}.cw-projectContext{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;padding:5px 8px;border:1px solid var(--pi-hairline);border-radius:7px;background:color-mix(in srgb,var(--hud-surface) 28%,transparent);color:var(--pi-muted);font-size:var(--text-2xs)}.cw-projectContext span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--pi-mono)}.cw-projectContext em{font-style:normal;color:var(--pi-dim)}.cw-workspaceList{display:flex;flex-direction:column;gap:0;margin:0 -12px}.cw-workspace{border:none;border-radius:0;background:none;overflow:hidden}.cw-workspaceHead{width:100%;display:flex;align-items:center;gap:var(--space-lg);min-height:32px;padding:0 12px;border:none;border-radius:6px;background:transparent;color:inherit;text-align:left;cursor:pointer;transition:background .12s var(--pi-ease)}.cw-workspaceHead:hover{background:color-mix(in srgb,var(--hud-ink) 4%,transparent)}.cw-workspace[data-selected] .cw-workspaceHead{background:color-mix(in srgb,var(--hud-ink) 8%,transparent)}.cw-workspaceTitle{flex:none;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;transition:color .12s var(--pi-ease)}.cw-workspaceHead:hover .cw-workspaceTitle{color:var(--pi-ink)}.cw-workspace[data-state=live] .cw-workspaceTitle,.cw-workspace[data-selected] .cw-workspaceTitle{color:var(--pi-ink);font-weight:600}.cw-workspaceRoot{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pi-dim);font-family:var(--pi-mono);font-size:var(--text-xs)}.cw-workspaceMeta{flex:none;display:flex;align-items:center;gap:8px;color:var(--pi-muted);font-family:var(--pi-mono);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.cw-workspaceMeta time{min-width:3ch;text-align:right;color:var(--pi-dim)}.cw-workspaceMeta time[data-tone=live]{color:var(--pi-accent)}.cw-workspaceAsks{padding:1px 7px;border-radius:999px;color:var(--pi-accent);background:color-mix(in srgb,var(--pi-accent) 14%,transparent);font-size:var(--text-2xs);font-weight:600}.cw-showMore{align-self:flex-start;height:26px;padding:0 12px;border:none;background:transparent;color:var(--pi-muted);font-size:var(--text-md);font-weight:500;cursor:pointer;transition:color .12s var(--pi-ease)}.cw-showMore:hover{color:var(--pi-ink)}.cw-modeToggle button:focus-visible,.cw-filters button:focus-visible,.cw-addProject:focus-visible,.cw-showMore:focus-visible,.cw-workspaceHead:focus-visible,.cw-substrateChip:focus-visible,.cw-cardActions button:focus-visible{outline:2px solid color-mix(in srgb,var(--pi-accent) 70%,white);outline-offset:2px}@media(max-width:600px){.cw-toolbar{flex-direction:column;align-items:stretch}.cw-search{flex:none;width:100%;min-width:0;max-width:none}.cw-addProject{margin-left:0}.cw-grid{grid-template-columns:1fr}.cw-workspaceHead{flex-wrap:wrap}.cw-workspaceRoot{flex:1 1 100%;order:3}.cw-workspaceMeta{flex-wrap:wrap}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as o}from"./index-BFbLvCJn.js";/* empty css */const $=48,I=720;function _(e){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);if(!n)return null;const a=JSON.parse(n);if(!a||typeof a!="object")return null;const f={};for(const[c,d]of Object.entries(a))typeof d=="number"&&Number.isFinite(d)&&d>0&&(f[c]=d);return f}catch{return null}}function z(e,n){if(e&&!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(n))}catch{}}function H({storageKey:e,columns:n}){const a=m.useMemo(()=>{const r=_(e)??{},s={};for(const p of n)s[p.key]=r[p.key]??p.defaultWidth;return s},[e,n]),[f,c]=m.useState(a);m.useEffect(()=>{c(r=>{let s=!1;const p={...r};for(const b of n)p[b.key]==null&&(p[b.key]=b.defaultWidth,s=!0);return s?p:r})},[n]);const d=m.useMemo(()=>{const r=new Map;for(const s of n)r.set(s.key,s);return r},[n]),N=m.useRef(null),x=m.useCallback(r=>{const s=N.current;if(!s)return;const p=r.clientX-s.startX,b=Math.min(s.max,Math.max(s.min,s.startWidth+p));c(u=>u[s.key]===b?u:{...u,[s.key]:b})},[]),y=m.useCallback(()=>{N.current&&(N.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),c(r=>(z(e,r),r)))},[x,e]);m.useEffect(()=>()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y)},[x,y]);const D=m.useCallback(r=>{const s=f[r],p=d.get(r),b=p?.minWidth??$,u=p?.maxWidth??I;return{style:{width:s,minWidth:b,maxWidth:u},"data-resize-key":r}},[f,d]),E=m.useCallback(r=>({onPointerDown:u=>{if(u.button!==0)return;u.preventDefault(),u.stopPropagation();const h=d.get(r),j=h?.minWidth??$,v=h?.maxWidth??I,S=f[r]??h?.defaultWidth??j;N.current={key:r,startX:u.clientX,startWidth:S,min:j,max:v},document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",x),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},onClick:u=>{u.stopPropagation()},onDoubleClick:u=>{u.preventDefault(),u.stopPropagation();const h=d.get(r);h&&c(j=>{const v={...j,[r]:h.defaultWidth};return z(e,v),v})},role:"separator","aria-orientation":"vertical","aria-label":"Resize column",className:"s-resize-handle"}),[f,d,x,y,e]),C=m.useCallback(()=>{c(()=>{const r={};for(const s of n)r[s.key]=s.defaultWidth;return z(e,r),r})},[n,e]);return{widths:f,getColumnProps:D,getResizeHandleProps:E,resetAll:C}}function J(e){return e==="number"||e==="time"?"right":"left"}function B(e){return e==="number"||e==="time"?-1:1}function T(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"||typeof e=="bigint"?String(e):Array.isArray(e)?e.map(n=>T(n)).join(""):""}function F(e,n){if(e.sortValue)return e.sortValue(n);const a=e.render(n),f=T(a).trim();return f||null}function R(e){if(typeof e=="number")return e;const n=Date.parse(e);return Number.isFinite(n)?n:Number.NaN}function q(e,n,a,f){const c=F(a,e),d=F(a,n);return c==null&&d==null?0:c==null?1:d==null?-1:a.kind==="number"?((Number(c)||0)-(Number(d)||0))*f:a.kind==="time"?(R(c)-R(d))*f:String(c).localeCompare(String(d),void 0,{numeric:!0,sensitivity:"base"})*f}function G(e,n){return a=>{typeof e=="function"&&e(a),a.defaultPrevented||n?.(a)}}function K(e,n){return a=>{typeof e=="function"&&e(a),a.defaultPrevented||n?.(a)}}function Z({rows:e,columns:n,rowId:a,storageKey:f,initialSort:c,sort:d,onSortChange:N,secondarySort:x,onRowClick:y,rowBindings:D,rowState:E,empty:C={title:"No rows"},loading:r=!1,rowClassName:s,density:p="comfortable",className:b,ariaLabel:u="Data table"}){const h=m.useMemo(()=>n.map(t=>{const l=t.kind??"text";return{...t,kind:l,align:t.align??J(l),sortable:t.sortable??l!=="custom",resizable:t.resizable??!0}}),[n]),j=m.useMemo(()=>new Map(h.map(t=>[t.key,t])),[h]),[v,S]=m.useState(()=>{if(!c)return null;const l=n.find(i=>i.key===c.key)?.kind??"text";return{key:c.key,dir:c.dir??B(l)}}),k=d??v,{getColumnProps:X,getResizeHandleProps:O}=H({storageKey:f,columns:h.map(t=>({key:t.key,defaultWidth:t.defaultWidth,minWidth:t.minWidth,maxWidth:t.maxWidth}))}),M=m.useMemo(()=>{const t=e.map((i,w)=>({row:i,index:w}));if(!k)return t.map(i=>i.row);const l=j.get(k.key);return l?.sortable?t.slice().sort((i,w)=>{const W=q(i.row,w.row,l,k.dir);if(W!==0)return W;const P=x?.(i.row,w.row)??0;return P!==0?P:i.index-w.index}).map(i=>i.row):t.map(i=>i.row)},[e,k,j,x]),A=t=>{d==null&&S(t),N?.(t)};return o.jsx("div",{className:`dt-wrap dt-wrap--${p}${b?` ${b}`:""}`,children:o.jsxs("table",{className:"dt-table","aria-label":u,"aria-busy":r||void 0,children:[o.jsx("thead",{children:o.jsx("tr",{children:h.map(t=>{const l=k?.key===t.key,i=l?k.dir===1?"ascending":"descending":"none",w=["dt-th",`dt-align-${t.align}`,t.cls,l?"dt-th--sorted":""].filter(Boolean).join(" ");return o.jsxs("th",{className:w,title:t.tip,"aria-sort":i,...X(t.key),children:[t.sortable?o.jsxs("button",{type:"button",className:"dt-th-sort",onClick:()=>{if(k?.key===t.key){A({key:t.key,dir:k.dir===1?-1:1});return}A({key:t.key,dir:B(t.kind)})},children:[o.jsx("span",{className:"dt-th-label",children:t.label}),o.jsx("span",{className:`dt-th-arrow${l?" dt-th-arrow--active":""}`,"aria-hidden":"true",children:l?k?.dir===1?"↑":"↓":"↕"})]}):o.jsx("div",{className:"dt-th-static",children:o.jsx("span",{className:"dt-th-label",children:t.label})}),t.resizable?o.jsx("span",{...O(t.key)}):null]},t.key)})})}),o.jsx("tbody",{children:r&&M.length===0?o.jsx("tr",{className:"dt-loading-row",children:o.jsx("td",{colSpan:h.length,children:o.jsx("div",{className:"dt-loading",role:"status","aria-label":`Loading ${u.toLowerCase()}`,children:Array.from({length:7},(t,l)=>o.jsx("div",{className:"dt-loading-line","aria-hidden":"true",children:h.map(i=>o.jsx("span",{style:{width:`${Math.min(i.defaultWidth,220)}px`}},i.key))},l))})})}):M.length===0?o.jsx("tr",{className:"dt-empty-row",children:o.jsx("td",{colSpan:h.length,children:o.jsxs("div",{className:"dt-empty",children:[o.jsx("div",{className:"dt-empty-title",children:C.title}),C.body?o.jsx("div",{children:C.body}):null]})})}):M.map(t=>{const l=a(t),i=D?.(l)??{},w=E?.(l)??{isActive:!1,isPinned:!1},W=!!(y||D),P=["dt-row",W?"dt-row--interactive":"",w.isActive?"dt-row--active":"",w.isPinned?"dt-row--pinned":"",s?.(t),typeof i.className=="string"?i.className:""].filter(Boolean).join(" "),U=y?()=>y(t):void 0,V=W?K(i.onKeyDown,g=>{y&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),y(t))}):typeof i.onKeyDown=="function"?i.onKeyDown:void 0,L={...i,className:P,onClick:G(i.onClick,U),onKeyDown:V};return W&&L.tabIndex==null&&(L.tabIndex=0),o.jsx("tr",{...L,children:h.map(g=>o.jsx("td",{className:["dt-td",`dt-align-${g.align}`,g.cls].filter(Boolean).join(" "),children:g.render(t)},g.key))},l)})})]})})}export{Z as D};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,j as r}from"./index-BFbLvCJn.js";import{a as y}from"./api-DSqpVKC7.js";import{i as j}from"./scoutbot-Bk3nyrkj.js";import{u as S}from"./sse-BVxO0zNp.js";import{t as E}from"./time-Dhsh_2EG.js";import{o as M}from"./openContent-C6XO6kr5.js";import{e as k}from"./broker-display-BkBzyvbR.js";import{r as R}from"./follow-route-BvcGtBIL.js";import{L as C}from"./loader-circle-CCG7hG7z.js";import{A as L}from"./arrow-up-right-DUW1A1Hb.js";import"./index-BWHgHrtv.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-CKbjXlwv.js";const _=3,$=80;function h(e){return Number(e.createdAt)||0}function F(e,s){if(!e.conversationId)return{status:"no-conversation"};const t=s.slice().sort((o,i)=>h(o)-h(i)),n=e.messageId?t.find(o=>o.id===e.messageId)??null:null;let l;if(n){const o=h(n);l=t.filter(i=>i.id!==n.id&&h(i)>=o)}else{const o=t[0];if(o&&h(o)>e.ts)return{status:"beyond-page"};l=t.filter(i=>h(i)>e.ts)}if(l.length===0)return{status:"no-reply"};const u=n?h(n):e.ts,d=l.slice(0,_).map(o=>({id:o.id,actorName:o.actorName||"Unknown",body:o.body??"",createdAt:h(o),afterMs:Math.max(0,h(o)-u),answersDispatch:!!(e.messageId&&o.replyToMessageId===e.messageId)}));return{status:"replies",replies:d,more:Math.max(0,l.length-d.length)}}function b(e,...s){const t=e.metadata??{},n=t.raw&&typeof t.raw=="object"&&!Array.isArray(t.raw)?t.raw:null;for(const l of s)for(const u of[t,n]){const d=u?.[l];if(typeof d=="string"&&d.trim())return d.trim()}return null}function D(e,s){const t=new URLSearchParams,n=e.invocationId??b(e,"invocationId"),l=b(e,"flightId"),u=b(e,"collaborationRecordId","workId","recordId");return l&&t.set("flightId",l),n&&t.set("invocationId",n),e.conversationId&&t.set("conversationId",e.conversationId),u&&t.set("workId",u),s&&t.set("targetAgentId",s),[...t.keys()].length>0?t:null}function H(e,s={}){const t=[];return e.conversationId&&t.push({key:"conversation",label:"Conversation",hint:"The thread this dispatch landed in",route:{view:"conversation",conversationId:e.conversationId}}),(e.flightId||e.sessionId)&&t.push({key:"trace",label:"Live trace",hint:"The session that ran the work",route:{view:"sessions",...e.flightId?{flightId:e.flightId}:{},...e.sessionId?{sessionId:e.sessionId}:{},...e.targetAgentId?{agentId:e.targetAgentId}:{}}}),e.workId&&!s.nativeHost&&t.push({key:"work",label:"Work item",hint:"The collaboration record it belongs to",route:{view:"work",workId:e.workId}}),e.targetAgentId&&t.push({key:"agent",label:"Recipient",hint:"The agent that received it",route:{view:"agents-v2",agentId:e.targetAgentId,tab:"observe"}}),t.length>0&&t.push({key:"tail",label:"Tail",hint:"Raw events for these ids",route:R(e,"tail")}),t}const P={queued:"Queued",dispatched:"Dispatched",running:"Running",succeeded:"Completed",completed:"Completed",failed:"Failed",errored:"Failed",cancelled:"Cancelled",canceled:"Cancelled",timed_out:"Timed out",expired:"Expired"},U=new Set(["failed","errored","timed_out","expired"]),v=new Set(["queued","dispatched","running"]),G=new Set(["succeeded","completed"]);function q(e){if(!e)return null;const s=e.state?.trim().toLowerCase()||"unknown",t=U.has(s)?"danger":v.has(s)?"working":G.has(s)?"success":"neutral",n=e.startedAt&&e.completedAt?Math.max(0,e.completedAt-e.startedAt):null;return{state:s,label:P[s]??s.replace(/_/g," "),tone:t,summary:e.summary?.trim()||null,durationMs:n,settled:!v.has(s)}}function O(e){if(e<1e3)return"instant";const s=Math.round(e/1e3);if(s<60)return`${s}s later`;const t=Math.round(s/60);if(t<60)return`${t}m later`;const n=Math.round(t/60);return n<48?`${n}h later`:`${Math.round(n/24)}d later`}function B(e){if(e<1e3)return`${e}ms`;const s=e/1e3;if(s<60)return`${s.toFixed(s<10?1:0)}s`;const t=Math.floor(s/60),n=Math.round(s%60);return t<60?n>0?`${t}m ${n}s`:`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}const w=180,Q=250,W={loading:!0,target:null,targetUnknown:!1,flight:null,aftermath:{status:"no-conversation"}};function z(e,s){const[t,n]=f.useState(W),[l,u]=f.useState(0),d=f.useRef(0),o=e.conversationId,i=f.useMemo(()=>D(e,s)?.toString()??null,[e,s]);f.useEffect(()=>{const a=++d.current;n(p=>({...p,loading:!0}));const x=i?y(`/api/follow?${i}`).catch(()=>null):Promise.resolve(null),A=o?y(`/api/messages?conversationId=${encodeURIComponent(o)}&limit=${$}`).catch(()=>null):Promise.resolve(null);return(async()=>{const[p,g]=await Promise.all([x,A]);if(a!==d.current)return;const T=p?.flightId?await y(`/api/flights?active=false&flightId=${encodeURIComponent(p.flightId)}`).then(N=>N[0]??null).catch(()=>null):null;a===d.current&&n({loading:!1,target:p,targetUnknown:!!i&&!p,flight:T,aftermath:o?g?F(e,g):{status:"unavailable"}:{status:"no-conversation"}})})(),()=>{d.current+=1}},[e,o,i,l]);const c=f.useRef(null),m=f.useCallback(()=>{c.current||(c.current=setTimeout(()=>{c.current=null,u(a=>a+1)},Q))},[]);f.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const I=t.flight?.id??t.target?.flightId??null;return S(a=>{switch(a.kind){case"message.posted":o&&a.payload.message.conversationId===o&&m();return;case"delivery.state.changed":e.messageId&&a.payload.delivery.messageId===e.messageId&&m();return;case"flight.updated":I&&a.payload.flight.id===I&&m();return}}),{...t,reload:m}}function ie({attempt:e,targetAgentId:s,navigate:t,returnTo:n}){const{loading:l,target:u,targetUnknown:d,flight:o,aftermath:i}=z(e,s),c=q(o),m=u?H(u,{nativeHost:j()}):[],I=f.useCallback(a=>M(t,a,{returnTo:n}),[t,n]);return r.jsxs("section",{className:"sys-broker-aftermath","aria-labelledby":"dispatch-aftermath-title",children:[r.jsxs("div",{className:"sys-broker-aftermath-head",children:[r.jsx("span",{id:"dispatch-aftermath-title",className:"sys-detail-label",children:"What happened next"}),l&&r.jsx(C,{className:"sys-broker-action-spinner",size:12,"aria-hidden":"true"})]}),c&&r.jsxs("div",{className:`sys-broker-aftermath-outcome sys-broker-aftermath-outcome--${c.tone}`,children:[r.jsx("span",{className:`sys-broker-dot sys-broker-dot--${c.tone}`,"aria-hidden":"true"}),r.jsx("strong",{children:c.label}),c.durationMs!==null&&r.jsxs("span",{className:"sys-broker-aftermath-duration",children:["ran ",B(c.durationMs)]}),c.summary&&r.jsx("p",{children:k(c.summary,w)})]}),i.status==="replies"?r.jsxs("ol",{className:"sys-broker-aftermath-replies",children:[i.replies.map(a=>r.jsx("li",{children:r.jsxs("button",{type:"button",className:"sys-broker-aftermath-reply",disabled:!e.conversationId,onClick:()=>e.conversationId&&I({view:"conversation",conversationId:e.conversationId}),children:[r.jsxs("span",{className:"sys-broker-aftermath-reply-head",children:[r.jsx("strong",{children:a.actorName}),a.answersDispatch&&r.jsx("span",{className:"sys-broker-aftermath-answer",children:"reply"}),r.jsx("span",{className:"sys-broker-aftermath-gap",children:O(a.afterMs)})]}),r.jsx("span",{className:"sys-broker-aftermath-reply-body",children:k(a.body,w)})]})},a.id)),i.more>0&&r.jsxs("li",{className:"sys-broker-aftermath-more",children:["+",i.more," more in the thread"]})]}):!l&&r.jsx("p",{className:"sys-broker-aftermath-empty",children:i.status==="no-conversation"?"No conversation followed this dispatch, so there is nothing to open.":i.status==="unavailable"?"The conversation could not be read, so what followed is unknown.":i.status==="beyond-page"?"This dispatch is older than the loaded transcript. Open the conversation to read it in place.":c&&!c.settled?"Still running. Nothing has come back yet.":"Nothing followed this dispatch in its conversation."}),m.length>0?r.jsx("div",{className:"sys-broker-aftermath-links",children:m.map(a=>r.jsxs("button",{type:"button",className:"sys-broker-aftermath-link",title:a.hint,onClick:()=>I(a.route),children:[a.label,r.jsx(L,{size:11,"aria-hidden":"true"})]},a.key))}):!l&&i.status!=="no-conversation"&&r.jsx("p",{className:"sys-broker-aftermath-empty",children:d?"Where this went could not be looked up, so there is nothing to link to yet.":"No session, work item, or recipient could be resolved from this row."}),o?.completedAt&&r.jsxs("div",{className:"sys-broker-aftermath-foot",children:["Settled ",E(o.completedAt)]})]})}export{ie as DispatchAftermath};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.s-doc-focus-layer{position:fixed;z-index:88;top:var(--doc-focus-layer-top, 48px);right:var(--doc-focus-layer-right, 0);bottom:var(--doc-focus-layer-bottom, 28px);left:var(--doc-focus-layer-left, 0);display:grid;place-items:center;padding:clamp(18px,2vw,30px);pointer-events:none}.s-doc-focus-scrim{position:absolute;inset:0;border:0;background:linear-gradient(180deg,#0000002e,#00000047),color-mix(in srgb,var(--bg) 18%,transparent);backdrop-filter:blur(3px) saturate(.78) brightness(.78);-webkit-backdrop-filter:blur(3px) saturate(.78) brightness(.78);cursor:default;pointer-events:auto}.s-doc-focus-layer-focused .s-doc-focus-scrim{background:linear-gradient(180deg,#00000052,#0000007a),color-mix(in srgb,var(--bg) 28%,transparent);backdrop-filter:blur(4px) saturate(.72) brightness(.68);-webkit-backdrop-filter:blur(4px) saturate(.72) brightness(.68)}.s-doc-focus-viewer{--doc-focus-accent: var(--accent);--doc-focus-accent-soft: color-mix(in srgb, var(--doc-focus-accent) 12%, transparent);position:relative;width:min(84%,1280px);height:84%;min-height:min(620px,calc(100% - 40px));max-width:calc(100% - 40px);max-height:calc(100% - 40px);display:flex;flex-direction:column;margin:0;overflow:hidden;border:1px solid color-mix(in srgb,var(--doc-focus-accent) 22%,var(--border));border-radius:var(--radius-lg);background:color-mix(in srgb,var(--bg) 93%,var(--surface));box-shadow:0 32px 96px #00000070,0 0 0 1px #ffffff05,inset 0 1px #ffffff0b;pointer-events:auto}.s-doc-focus-viewer:before{content:"";position:absolute;inset:0 0 auto;height:2px;background:var(--doc-focus-accent);opacity:.82}.s-doc-focus-viewer-ask{--doc-focus-accent: #d7b85f}.s-doc-focus-viewer-plan{--doc-focus-accent: #67c7d8}.s-doc-focus-viewer-doc{--doc-focus-accent: #9ccf7a}.s-doc-focus-viewer-code{--doc-focus-accent: #8fb6c8}.s-doc-focus-viewer-focused{position:absolute;inset:18px;width:auto;max-width:none;max-height:none;min-height:0;height:auto;margin:0;box-shadow:0 28px 90px #00000094}.s-doc-focus-viewer-head{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:var(--space-lg);padding:var(--space-md) var(--space-lg);border-bottom:1px solid color-mix(in srgb,var(--border) 76%,transparent);background:linear-gradient(90deg,color-mix(in srgb,var(--doc-focus-accent) 6%,transparent),transparent 44%),color-mix(in srgb,var(--surface) 82%,transparent)}.s-doc-focus-viewer-title-wrap{min-width:0;display:flex;align-items:center;gap:var(--space-sm)}.s-doc-focus-viewer-icon{width:28px;height:28px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--doc-focus-accent) 28%,transparent);border-radius:var(--radius-lg);background:var(--doc-focus-accent-soft);color:var(--doc-focus-accent)}.s-doc-focus-viewer-title-main{min-width:0}.s-doc-focus-viewer-eyebrow{color:var(--doc-focus-accent);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;line-height:var(--leading-tight);text-transform:uppercase;letter-spacing:var(--tracking-sm)}.s-doc-focus-viewer-title{margin:1px 0 0;overflow:hidden;color:var(--ink);font-size:var(--text-lg);font-weight:650;line-height:var(--leading-tight);text-overflow:ellipsis;white-space:nowrap}.s-doc-focus-viewer-subtitle{overflow:hidden;margin-top:var(--space-3xs);color:var(--dim);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--leading-tight);text-overflow:ellipsis;white-space:nowrap}.s-doc-focus-viewer-actions{display:flex;flex-shrink:0;align-items:center;gap:var(--space-sm)}.s-doc-focus-viewer-meta{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--space-2xs)}.s-doc-focus-viewer-meta span{min-height:22px;display:inline-flex;align-items:center;padding:var(--space-2xs) var(--space-sm);border:1px solid color-mix(in srgb,var(--border) 72%,transparent);border-radius:var(--radius-pill);color:var(--muted);font-family:var(--font-mono);font-size:var(--text-2xs);line-height:var(--leading-none);text-transform:uppercase;letter-spacing:var(--tracking-sm)}.s-doc-focus-viewer-action,.s-doc-focus-viewer-close{min-height:26px;display:inline-flex;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--border) 75%,transparent);border-radius:var(--radius-lg);background:color-mix(in srgb,var(--surface) 76%,transparent);color:var(--muted);cursor:pointer}.s-doc-focus-viewer-action{gap:var(--space-xs);padding:var(--space-xs) var(--space-sm);font-family:var(--font-mono);font-size:var(--text-xs);font-weight:650;text-transform:uppercase;letter-spacing:var(--tracking-sm)}.s-doc-focus-viewer-close{width:26px;padding:0}.s-doc-focus-viewer-action:hover,.s-doc-focus-viewer-close:hover{border-color:color-mix(in srgb,var(--doc-focus-accent) 34%,var(--border));color:var(--ink);background:color-mix(in srgb,var(--doc-focus-accent) 9%,var(--surface))}.s-doc-focus-viewer-action-icon{width:26px;padding:0}.s-doc-focus-viewer-action:disabled,.s-doc-focus-viewer-action:disabled:hover{cursor:default;color:color-mix(in srgb,var(--muted) 55%,transparent);border-color:color-mix(in srgb,var(--border) 50%,transparent);background:color-mix(in srgb,var(--surface) 50%,transparent)}.s-doc-focus-document{flex:1;min-height:0;border:0!important;border-radius:0!important;background:color-mix(in srgb,var(--bg) 96%,black)!important}.s-doc-focus-viewer-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto;background:color-mix(in srgb,var(--bg) 96%,black)}.s-doc-focus-viewer:not(.s-doc-focus-viewer-focused) .s-doc-focus-document{min-height:300px}.s-doc-focus-viewer-focused .s-doc-focus-document{min-height:0}.s-text-document-surface{min-height:0;display:flex;flex-direction:column;overflow:hidden;color:color-mix(in srgb,var(--ink) 78%,transparent)}.s-text-document-code,.s-text-document-markdown{flex:1;min-height:0;overflow:auto}.s-text-document-code,.s-text-document-fenced-code{margin:0;background:color-mix(in srgb,var(--bg) 96%,black);color:color-mix(in srgb,var(--ink) 76%,transparent);font-family:var(--font-mono);font-size:var(--text-md);line-height:var(--leading-normal);tab-size:2;white-space:pre-wrap;word-break:break-word}.s-text-document-code{padding:var(--space-3xl) var(--space-3xl)}.s-syntax-comment{color:#6f7a6e;font-style:italic}.s-syntax-keyword{color:#7aa8ff}.s-syntax-string{color:#c9a66b}.s-syntax-number,.s-syntax-literal{color:#c98edb}.s-syntax-property,.s-syntax-attribute{color:#8dc5c3}.s-syntax-function,.s-syntax-tag{color:#d99a73}.s-syntax-type{color:#9fcf86}.s-syntax-operator,.s-syntax-punctuation,.s-syntax-meta{color:#7c8489}.s-text-document-markdown{padding:clamp(18px,2.5vw,34px);color:color-mix(in srgb,var(--ink) 76%,transparent);font-family:var(--font-sans);font-size:var(--text-lg);line-height:var(--leading-normal)}.s-text-document-markdown>:first-child{margin-top:0}.s-text-document-markdown>:last-child{margin-bottom:0}.s-text-document-markdown h1,.s-text-document-markdown h2,.s-text-document-markdown h3,.s-text-document-markdown h4,.s-text-document-markdown h5,.s-text-document-markdown h6{margin:var(--space-4xl) 0 var(--space-sm);color:var(--ink);font-weight:680;letter-spacing:0;line-height:var(--leading-tight)}.s-text-document-markdown h1{font-size:var(--text-4xl)}.s-text-document-markdown h2{font-size:var(--text-2xl)}.s-text-document-markdown h3,.s-text-document-markdown h4,.s-text-document-markdown h5,.s-text-document-markdown h6{font-size:var(--text-xl)}.s-text-document-markdown p,.s-text-document-markdown ul,.s-text-document-markdown ol,.s-text-document-markdown blockquote,.s-text-document-markdown pre,.s-text-document-table-wrap{margin:var(--space-lg) 0}.s-text-document-markdown ul,.s-text-document-markdown ol{padding-left:var(--space-4xl)}.s-text-document-markdown li+li{margin-top:var(--space-2xs)}.s-text-document-markdown blockquote{padding:var(--space-3xs) 0 var(--space-3xs) var(--space-lg);border-left:2px solid color-mix(in srgb,var(--doc-focus-accent) 52%,transparent);color:color-mix(in srgb,var(--ink) 62%,transparent)}.s-text-document-markdown a{color:color-mix(in srgb,var(--doc-focus-accent) 82%,var(--ink));text-decoration:underline;text-underline-offset:2px}.s-text-document-markdown strong{color:var(--ink);font-weight:650}.s-text-document-markdown em{font-style:italic}.s-text-document-markdown del{color:color-mix(in srgb,var(--ink) 50%,transparent);text-decoration-thickness:1px}.s-text-document-markdown code{border:1px solid color-mix(in srgb,var(--border) 65%,transparent);border-radius:5px;background:color-mix(in srgb,var(--surface) 76%,transparent);color:color-mix(in srgb,var(--doc-focus-accent) 76%,var(--ink));font-family:var(--font-mono);font-size:var(--text-md);padding:1px 4px}.s-text-document-fenced-code{overflow:auto;padding:var(--space-lg) var(--space-xl);border:1px solid color-mix(in srgb,var(--border) 70%,transparent);border-radius:var(--radius-lg)}.s-text-document-fenced-code code{border:0;background:transparent;color:inherit;padding:0}.s-text-document-table-wrap{overflow-x:auto;border:1px solid color-mix(in srgb,var(--border) 70%,transparent);border-radius:var(--radius-lg);background:color-mix(in srgb,var(--bg) 96%,black)}.s-text-document-table{width:100%;min-width:560px;border-collapse:collapse;font-size:var(--text-md);line-height:var(--leading-normal)}.s-text-document-table th,.s-text-document-table td{padding:var(--space-sm) var(--space-lg);border-right:1px solid color-mix(in srgb,var(--border) 62%,transparent);border-bottom:1px solid color-mix(in srgb,var(--border) 62%,transparent);vertical-align:top;text-align:left}.s-text-document-table th{background:color-mix(in srgb,var(--surface) 78%,transparent);color:var(--ink);font-weight:650}.s-text-document-table th[data-align=center],.s-text-document-table td[data-align=center]{text-align:center}.s-text-document-table th[data-align=right],.s-text-document-table td[data-align=right]{text-align:right}.s-text-document-table tr:last-child td{border-bottom:0}.s-text-document-table th:last-child,.s-text-document-table td:last-child{border-right:0}.s-text-document-table code{font-size:var(--text-sm)}.s-text-document-markdown hr{margin:var(--space-3xl) 0;border:0;border-top:1px solid color-mix(in srgb,var(--border) 76%,transparent)}.s-doc-focus-viewer-state,.s-doc-focus-viewer-notice{padding:var(--space-2xl);color:var(--muted);font-size:var(--text-md);line-height:var(--leading-normal)}.s-doc-focus-viewer-error{color:var(--warning)}.s-doc-focus-viewer-notice{flex-shrink:0;padding:var(--space-sm) var(--space-lg);border-top:1px solid color-mix(in srgb,var(--border) 70%,transparent);color:var(--dim);font-family:var(--font-mono);font-size:var(--text-xs)}.s-work-files-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(220px,280px) minmax(0,1fr);height:100%;background:color-mix(in srgb,var(--bg) 96%,black)}.s-work-files-tree{min-height:0;display:flex;flex-direction:column;border-right:1px solid color-mix(in srgb,var(--border) 70%,transparent);background:color-mix(in srgb,var(--surface) 64%,transparent)}.s-work-files-tree-filters{display:flex;flex-wrap:wrap;gap:var(--space-2xs);padding:var(--space-sm) var(--space-md);border-bottom:1px solid color-mix(in srgb,var(--border) 60%,transparent)}.s-work-files-tree-filter{display:inline-flex;align-items:center;gap:var(--space-2xs);padding:var(--space-2xs) var(--space-sm);border:1px solid color-mix(in srgb,var(--border) 60%,transparent);border-radius:var(--radius-pill);background:color-mix(in srgb,var(--surface) 60%,transparent);color:var(--muted);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:650;letter-spacing:var(--tracking-sm);text-transform:uppercase;cursor:pointer}.s-work-files-tree-filter:hover{border-color:color-mix(in srgb,var(--doc-focus-accent) 34%,var(--border));color:var(--ink)}.s-work-files-tree-filter-active{border-color:color-mix(in srgb,var(--doc-focus-accent) 50%,var(--border));background:color-mix(in srgb,var(--doc-focus-accent) 14%,var(--surface));color:var(--ink)}.s-work-files-tree-filter-count{min-width:14px;padding:0 var(--space-2xs);border-radius:var(--radius-pill);background:color-mix(in srgb,var(--bg) 80%,var(--border));color:var(--muted);font-size:var(--text-2xs);text-align:center}.s-work-files-tree-filter-active .s-work-files-tree-filter-count{background:color-mix(in srgb,var(--doc-focus-accent) 24%,transparent);color:var(--ink)}.s-work-files-tree-list{flex:1;min-height:0;overflow:auto;padding:var(--space-2xs) 0 var(--space-lg)}.s-work-files-tree-empty{padding:var(--space-lg) var(--space-xl);color:var(--dim);font-size:var(--text-sm)}.s-work-files-tree-row{width:100%;display:flex;align-items:center;gap:var(--space-xs);padding:var(--space-2xs) var(--space-md) var(--space-2xs) var(--space-sm);border:0;background:transparent;color:var(--ink);font-size:var(--text-md);text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden}.s-work-files-tree-row:hover{background:color-mix(in srgb,var(--doc-focus-accent) 9%,transparent)}.s-work-files-tree-row:disabled{cursor:default;opacity:.5}.s-work-files-tree-row:disabled:hover{background:transparent}.s-work-files-tree-dir{color:color-mix(in srgb,var(--ink) 85%,transparent);font-weight:600}.s-work-files-tree-file-selected{background:color-mix(in srgb,var(--doc-focus-accent) 16%,transparent)}.s-work-files-tree-file-selected:hover{background:color-mix(in srgb,var(--doc-focus-accent) 22%,transparent)}.s-work-files-tree-chevron,.s-work-files-tree-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:color-mix(in srgb,var(--ink) 55%,transparent)}.s-work-files-tree-file .s-work-files-tree-icon{color:color-mix(in srgb,var(--doc-focus-accent) 70%,var(--ink))}.s-work-files-tree-name{flex:1;overflow:hidden;text-overflow:ellipsis;font-family:var(--font-mono);font-size:var(--text-sm);line-height:var(--leading-snug)}.s-work-files-tree-status{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:var(--radius-sm);background:color-mix(in srgb,var(--border) 60%,transparent);color:var(--muted);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700}.s-work-files-tree-status-added{background:color-mix(in srgb,#6abf6a 30%,transparent);color:#cbe9c8}.s-work-files-tree-status-modified{background:color-mix(in srgb,#d7b85f 30%,transparent);color:#f3e2a8}.s-work-files-tree-status-deleted{background:color-mix(in srgb,#d27676 30%,transparent);color:#f1c4c4}.s-work-files-tree-status-renamed{background:color-mix(in srgb,#67c7d8 30%,transparent);color:#c6ecf2}.s-work-files-tree-status-untracked{background:color-mix(in srgb,var(--border) 70%,transparent);color:var(--muted)}.s-work-files-content{min-width:0;min-height:0;display:flex;flex-direction:column;background:color-mix(in srgb,var(--bg) 96%,black)}.s-work-files-content-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-lg);padding:var(--space-sm) var(--space-xl);border-bottom:1px solid color-mix(in srgb,var(--border) 60%,transparent);background:color-mix(in srgb,var(--surface) 56%,transparent)}.s-work-files-breadcrumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);font-size:var(--text-sm)}.s-work-files-breadcrumb-folder{color:var(--dim)}.s-work-files-breadcrumb-name{color:var(--ink);font-weight:650}.s-work-files-content-meta{display:flex;align-items:center;gap:var(--space-xs)}.s-work-files-content-meta span{min-height:20px;display:inline-flex;align-items:center;padding:var(--space-3xs) var(--space-xs);border:1px solid color-mix(in srgb,var(--border) 60%,transparent);border-radius:var(--radius-pill);color:var(--muted);font-family:var(--font-mono);font-size:var(--text-2xs);text-transform:uppercase;letter-spacing:var(--tracking-sm)}.s-work-files-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.s-work-files-pane .s-text-document-surface{flex:1;min-height:0}.s-work-files-pane-image{align-items:center;justify-content:center;overflow:auto;padding:var(--space-2xl);background:repeating-conic-gradient(color-mix(in srgb,var(--bg) 88%,white) 0% 25%,color-mix(in srgb,var(--bg) 96%,black) 0% 50%) 0 0 / 18px 18px}.s-work-files-image{max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 8px 24px #00000052}.s-work-files-pane-state{flex:1;display:flex;align-items:center;justify-content:center;padding:var(--space-2xl);color:var(--muted);font-size:var(--text-md);text-align:center}.s-work-files-pane-error{color:var(--warning)}.s-work-files-pane-notice{flex-shrink:0;padding:var(--space-sm) var(--space-lg);border-top:1px solid color-mix(in srgb,var(--border) 60%,transparent);color:var(--dim);font-family:var(--font-mono);font-size:var(--text-xs)}.s-work-material-card-actions{display:flex;flex-wrap:wrap;gap:var(--space-sm);margin-top:var(--space-sm)}@media(max-width:760px){.s-work-files-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,.4fr) minmax(0,1fr)}.s-work-files-tree{border-right:0;border-bottom:1px solid color-mix(in srgb,var(--border) 70%,transparent)}}@media(max-width:760px){.s-doc-focus-layer{inset:44px 0 24px;padding:var(--space-sm)}.s-doc-focus-viewer{width:calc(100vw - 16px);height:min(78vh,calc(100vh - 16px));min-height:0;max-width:none;max-height:none}.s-doc-focus-viewer-focused{inset:8px;height:calc(100vh - 16px)}.s-doc-focus-viewer-head{align-items:flex-start;flex-direction:column}.s-doc-focus-viewer-actions{width:100%;justify-content:flex-end}.s-doc-focus-viewer-meta{margin-right:auto;justify-content:flex-start}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as h}from"./createLucideIcon-CKbjXlwv.js";import{r,j as e}from"./index-BFbLvCJn.js";import{T as _}from"./TextDocumentSurface-DBslUq9k.js";import{F as R}from"./file-text-BOJQiS8p.js";import{X as S}from"./x-BcfhXYiF.js";const W=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],X=h("folder-open",W);const A=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],B=h("maximize-2",A);const T=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],C=h("minimize-2",T);function G({open:i=!0,focusable:M=!0,kind:z,document:c,title:F,eyebrow:v,subtitle:w,meta:x=[],mode:$,actions:L=[],state:j,error:t,notice:p,body:l,onClose:o}){const[a,u]=r.useState(!1),[g,y]=r.useState({}),b=r.useRef(null);if(r.useEffect(()=>{i||u(!1)},[i]),r.useEffect(()=>{if(!i)return;let s=null;const d=b.current?.closest(".frame-scrollbar, .s-content")??null,N=()=>{if(!d){y({});return}const n=d.getBoundingClientRect();y({"--doc-focus-layer-top":`${Math.max(0,n.top)}px`,"--doc-focus-layer-right":`${Math.max(0,window.innerWidth-n.right)}px`,"--doc-focus-layer-bottom":`${Math.max(0,window.innerHeight-n.bottom)}px`,"--doc-focus-layer-left":`${Math.max(0,n.left)}px`})},f=()=>{s!==null&&cancelAnimationFrame(s),s=requestAnimationFrame(N)};N();const E=d?new ResizeObserver(f):null;return d&&E?.observe(d),window.addEventListener("resize",f),()=>{s!==null&&cancelAnimationFrame(s),E?.disconnect(),window.removeEventListener("resize",f)}},[i]),r.useEffect(()=>{if(!i)return;const s=m=>{m.key==="Escape"&&(m.preventDefault(),a?u(!1):o?.())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a,o,i]),!i)return null;const k=F??c?.title??"Document",D=$??(c?.kind==="markdown"?"preview":"read"),H=M&&!!(c||l);return e.jsxs("div",{ref:b,className:`s-doc-focus-layer${a?" s-doc-focus-layer-focused":""}`,style:g,children:[o&&e.jsx("button",{type:"button",className:"s-doc-focus-scrim","aria-label":"Dismiss document viewer",tabIndex:-1,onClick:o}),e.jsxs("section",{className:`s-doc-focus-viewer s-doc-focus-viewer-${z}${a?" s-doc-focus-viewer-focused":""}`,"aria-label":k,role:"dialog","aria-modal":"true",children:[e.jsxs("div",{className:"s-doc-focus-viewer-head",children:[e.jsxs("div",{className:"s-doc-focus-viewer-title-wrap",children:[e.jsx("div",{className:"s-doc-focus-viewer-icon","aria-hidden":"true",children:e.jsx(R,{size:15,strokeWidth:1.8})}),e.jsxs("div",{className:"s-doc-focus-viewer-title-main",children:[v&&e.jsx("div",{className:"s-doc-focus-viewer-eyebrow",children:v}),e.jsx("h3",{className:"s-doc-focus-viewer-title",children:k}),w&&e.jsx("div",{className:"s-doc-focus-viewer-subtitle",children:w})]})]}),e.jsxs("div",{className:"s-doc-focus-viewer-actions",children:[x.length>0&&e.jsx("div",{className:"s-doc-focus-viewer-meta","aria-label":"Document metadata",children:x.map(s=>e.jsx("span",{children:s},s))}),L.map(s=>e.jsxs("button",{type:"button",className:`s-doc-focus-viewer-action${s.hideLabel?" s-doc-focus-viewer-action-icon":""}`,onClick:s.onClick,title:s.title??s.label,disabled:s.disabled,"aria-label":s.hideLabel?s.label:void 0,children:[s.icon,!s.hideLabel&&e.jsx("span",{children:s.label})]},s.label)),H&&e.jsx("button",{type:"button",className:"s-doc-focus-viewer-close",onClick:()=>u(s=>!s),"aria-label":a?"Exit focus mode":"Enter focus mode",title:a?"Exit focus mode":"Focus",children:a?e.jsx(C,{"aria-hidden":"true",size:14,strokeWidth:1.8}):e.jsx(B,{"aria-hidden":"true",size:14,strokeWidth:1.8})}),o&&e.jsx("button",{type:"button",className:"s-doc-focus-viewer-close",onClick:o,"aria-label":"Close document viewer",title:"Close",children:e.jsx(S,{"aria-hidden":"true",size:14,strokeWidth:1.8})})]})]}),j&&!t&&!c&&!l&&e.jsx("div",{className:"s-doc-focus-viewer-state",children:j}),t&&e.jsx("div",{className:"s-doc-focus-viewer-state s-doc-focus-viewer-error",children:t}),!t&&l&&e.jsx("div",{className:"s-doc-focus-viewer-body",children:l}),!t&&!l&&c&&e.jsx(_,{document:c,mode:D,showHeader:!1,className:"s-doc-focus-document"}),!t&&p&&e.jsx("div",{className:"s-doc-focus-viewer-notice",children:p})]})]})}export{G as D,X as F,B as M,C as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-BFbLvCJn.js";import{l as c}from"./discover-BNa3BPr_.js";import"./types-B0PlfpKc.js";function n(){const[r,a]=l.useState([]);return l.useEffect(()=>{let s=!1;return c().then(d=>{s||a(d)}),()=>{s=!0}},[]),e.jsxs("div",{className:"s-embeddable-surfaces-lab","data-scout-theme":!0,children:[e.jsxs("header",{className:"s-embeddable-surfaces-lab__header",children:[e.jsx("h1",{children:"Embeddable surfaces"}),e.jsxs("p",{children:["Screens that exported ",e.jsx("code",{children:"scoutSurface.embed"})," and were discovered from"," ",e.jsx("code",{children:"client/screens/**"}),". No separate embed registry file — parity comes from the screen declaration."]})]}),e.jsxs("table",{className:"s-embeddable-surfaces-lab__table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"ID"}),e.jsx("th",{children:"Label"}),e.jsx("th",{children:"Web"}),e.jsx("th",{children:"Embed"}),e.jsx("th",{children:"Profile"}),e.jsx("th",{children:"Module"})]})}),e.jsx("tbody",{children:r.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:s.id})}),e.jsx("td",{children:s.label}),e.jsx("td",{children:e.jsx("a",{href:s.webPath,children:s.webPath})}),e.jsxs("td",{children:[e.jsx("div",{children:e.jsx("a",{href:s.embedPath,children:s.embedPath})}),s.embedAliases.length>0&&e.jsx("div",{className:"s-embeddable-surfaces-lab__aliases",children:s.embedAliases.map(d=>e.jsx("a",{href:d,children:d},d))})]}),e.jsx("td",{children:e.jsx("code",{children:s.profile})}),e.jsx("td",{children:e.jsx("code",{children:s.modulePath.replace("../","")})})]},s.id))})]}),r.length===0&&e.jsx("p",{className:"s-embeddable-surfaces-lab__empty",children:"No embeddable screens discovered yet."})]})}export{n as EmbeddableSurfacesLab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./index-BFbLvCJn.js";function c({title:n,body:s,icon:i,action:t,className:a}){const l=a?`sys-panel sys-state-card ${a}`:"sys-panel sys-state-card";return e.jsxs("div",{className:l,children:[i,e.jsx("h3",{className:"sys-state-title",children:n}),s!=null&&(typeof s=="string"?e.jsx("p",{className:"sys-state-body",children:s}):s),t&&e.jsx("div",{className:"sys-inline-actions",children:t})]})}export{c as E};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as n,j as t}from"./index-BFbLvCJn.js";import{T as b,c as j}from"./TextDocumentSurface-DBslUq9k.js";import{a as N}from"./api-DSqpVKC7.js";function V(e,a,u){const o=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx"),s=e.relativePath.endsWith(".json");return j({id:e.absolutePath,title:e.relativePath,uri:e.absolutePath,filename:e.relativePath.split("/").pop(),kind:o?"markdown":"code",language:s?"json":o?"markdown":"plain",value:u?`${a}
|
|
2
|
-
|
|
3
|
-
— excerpt —`:a,readOnly:!0})}function y({artifact:e,onOpen:a,onReveal:u,onBrowse:o}){const[s,l]=n.useState(e.excerpt),[c,i]=n.useState(!0),[w,h]=n.useState(!1),[m,p]=n.useState(null);n.useEffect(()=>{l(e.excerpt),i(!0),p(null);let d=!1;return h(!0),N(`/api/file/preview?path=${encodeURIComponent(e.absolutePath)}`).then(r=>{if(!d)if(r.kind==="file"&&r.previewable){const x=r;l(x.content),i(x.truncated)}else e.excerpt?(l(e.excerpt),i(!0)):(l(null),p("Preview not available for this file type."))}).catch(r=>{d||(e.excerpt?(l(e.excerpt),i(!0)):p(r instanceof Error?r.message:"Could not load file."))}).finally(()=>{d||h(!1)}),()=>{d=!0}},[e.absolutePath,e.excerpt]);const v=n.useMemo(()=>s?V(e,s,c):null,[e,s,c]),P=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx");return t.jsxs(t.Fragment,{children:[t.jsxs("header",{className:"av2-repoViewerHead",children:[t.jsxs("div",{className:"av2-repoViewerPath",children:[t.jsx("span",{className:"av2-repoViewerPathFile",children:e.relativePath}),t.jsx("span",{className:"av2-repoViewerPathAbs",title:e.absolutePath,children:e.absolutePath})]}),t.jsxs("div",{className:"av2-repoViewerActs",children:[t.jsx("button",{type:"button",className:"av2-repoViewerAct","data-primary":!0,onClick:()=>a(e.absolutePath),children:"open"}),o?t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>o(e.absolutePath),children:"browse"}):null,t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>{u(e.absolutePath)},children:"reveal"})]})]}),t.jsxs("div",{className:"av2-repoViewerBody",children:[w&&!s?t.jsx("div",{className:"av2-repoViewerState",children:"Loading file…"}):m&&!s?t.jsx("div",{className:"av2-repoViewerState av2-repoViewerState--error",children:m}):v?t.jsx(b,{document:v,mode:P?"preview":"read",className:"av2-repoViewerDoc"}):t.jsx("div",{className:"av2-repoViewerState",children:"No content."}),c?t.jsx("div",{className:"av2-repoViewerNotice",children:"Showing excerpt — use open for the full file."}):null]})]})}export{y as FileViewerPane};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as r}from"./index-BFbLvCJn.js";import{s as l,g as s,a as o}from"./session-recap-queue-GeicPLsQ.js";/* empty css */import"./api-DSqpVKC7.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./session-recap-lanes-D-eVJnpY.js";function h(){const t=n.useSyncExternalStore(l,s,s);return!t.running&&t.items.length===0&&!t.notice?null:r.jsxs("aside",{className:"fleet-roll-call",role:"status","aria-live":"polite",children:[r.jsx("h2",{children:"Fleet roll call"}),t.speaker?r.jsxs("p",{children:["Speaking ",r.jsx("strong",{children:t.speaker})]}):null,t.notice?r.jsx("p",{children:t.notice}):null,t.items.length>0?r.jsx("ol",{children:t.items.map(e=>r.jsxs("li",{children:[r.jsx("strong",{children:e.target.displayLabel})," · ",e.target.sourceExact,e.summary?` — ${e.summary}`:e.reason?` — ${e.reason}`:` — ${e.status}`,e.target.observedAt?r.jsx("time",{dateTime:new Date(e.target.observedAt).toISOString(),children:new Date(e.target.observedAt).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}):null]},e.target.voiceKey))}):null,t.running?r.jsx("button",{type:"button",onClick:()=>o(),children:"Stop spoken summaries"}):null]})}export{h as FleetRollCallHud};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as s}from"./index-BFbLvCJn.js";import{a as k}from"./api-DSqpVKC7.js";import{u as R}from"./sse-BVxO0zNp.js";import{d as $,t as F}from"./time-Dhsh_2EG.js";import{SessionRefScreen as I}from"./SessionRefScreen-Ch9H-qVk.js";/* empty css */import{c as E}from"./createLucideIcon-CKbjXlwv.js";import{X as A}from"./x-BcfhXYiF.js";import"./index-BWHgHrtv.js";import"./tail-events-C6NWFB1N.js";import"./BackToPicker-BPU7kbXq.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./ConversationScreen-Pzxy9x4m.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"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./ComposerAttachments-9uYp_Lh5.js";import"./machine-scope-DJt9RZ2w.js";import"./message-markup-D1C7GzHo.js";import"./message-markup-BQW5jdJw.js";import"./mentions-s5oW4aQU.js";import"./Provider-BEXAZWd9.js";import"./theme-vars-DNK0nn3k.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.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"./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-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-B-FbWI7a.js";import"./AgentAvatar-Dn8TUv5W.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-L9738YVP.js";import"./AstronautSuit-Dzu4GOMR.js";import"./panel-right-WKLdPm0F.js";import"./CommsFlowGraph-Cc48o9u_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-Dh056d91.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Ckasql5e.js";import"./CommsSelection-CuphnUny.js";/* empty css */import"./use-conversation-list-CGtcpdPd.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DopIbJwf.js";import"./ConversationComposer-hYtLurqy.js";import"./zap-BqL8ttGz.js";import"./ConversationFeedRows-Bu0ZJcy8.js";import"./ConversationPanels-D6KuqvGu.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./activity-CXkZ620t.js";import"./message-circle-BB3rFCVD.js";import"./ConversationStatus-BEefIbXq.js";import"./check-BM6QtbB7.js";import"./sparkles-Br-bA2aZ.js";import"./triangle-alert-BZikHKuT.js";import"./SessionContextStrip-BoiIxXvS.js";import"./SessionObserve-Dw3bVQYF.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-B8Am_1DC.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-DX6PJPNk.js";import"./external-link-Df1R34rX.js";import"./ObservedTopologyPanel-Ci7emnnj.js";import"./ObserveTextFlow-C0oQEerY.js";import"./SessionObserveEvidence-uD1OX-R5.js";import"./wrench-C-wjicn5.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */const T=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],L=E("columns-2",T);function S(i){const o=new Map;for(const r of i)o.delete(r.sessionId),o.set(r.sessionId,r);return[...o.values()]}function M(i,o){const r=S(i),d=o?.trim()||null;return r.find(n=>n.sessionId===d)?.sessionId??r.at(-1)?.sessionId??d}function O(i){return i.length<=34?i:`${i.slice(0,15)}…${i.slice(-14)}`}function q(i,o){return o===0?i.strategy||"dispatch":i.strategy?`switched via ${i.strategy}`:"session changed"}function y({label:i,sessions:o,value:r,onChange:d}){return s.jsxs("label",{className:"s-flight-observe-select-wrap",children:[s.jsx("span",{children:i}),s.jsx("select",{className:"s-flight-observe-select",value:r,onChange:n=>d(n.currentTarget.value),children:o.map(n=>s.jsxs("option",{value:n.sessionId,children:[n.harness?`${n.harness} · `:"",n.sessionId]},n.sessionId))})]})}function Pe({route:i,navigate:o}){const[r,d]=m.useState(null),[n,j]=m.useState(!0),[h,N]=m.useState(null),u=m.useCallback(async()=>{try{const e=await k(`/api/flights?active=false&flightId=${encodeURIComponent(i.flightId)}`);d(e[0]??null),N(e.length===0?"This flight is not available on the connected broker.":null)}catch(e){N(e instanceof Error?e.message:String(e))}finally{j(!1)}},[i.flightId]);m.useEffect(()=>{j(!0),u()},[u]),R(()=>{u()});const v=r?.sessions??[],a=m.useMemo(()=>S(v),[v]),g=M(v,i.sessionId),t=a.find(e=>e.sessionId===g)??null,l=a.find(e=>e.sessionId===i.compareSessionId)??null,f=!!(t&&l&&t.sessionId!==l.sessionId),c=m.useCallback((e,p)=>{o({...i,sessionId:e,...p?{compareSessionId:p}:{compareSessionId:void 0}})},[o,i]),w=m.useCallback(()=>{if(!t||a.length<2)return;const e=[...a].reverse().find(p=>p.sessionId!==t.sessionId);e&&c(t.sessionId,e.sessionId)},[t,a,c]),C=m.useCallback(e=>{if(!f||!t||!l){c(e);return}c(e,e===l.sessionId?t.sessionId:l.sessionId)},[l,t,f,c]);return s.jsxs("div",{className:"s-flight-observe",children:[s.jsxs("header",{className:"s-flight-observe-header",children:[s.jsxs("div",{className:"s-flight-observe-heading",children:[s.jsx("div",{className:"s-flight-observe-eyebrow",children:"Flight observe"}),s.jsxs("div",{className:"s-flight-observe-title-row",children:[s.jsx("h2",{children:r?.agentName||r?.agentId||"Flight"}),s.jsx("span",{className:`s-flight-observe-state s-flight-observe-state--${r?.state??"loading"}`,children:r?.state??(n?"loading":"unknown")})]}),s.jsx("div",{className:"s-flight-observe-id",title:i.flightId,children:i.flightId}),r?.summary&&s.jsx("p",{children:r.summary})]}),s.jsxs("div",{className:"s-flight-observe-actions",children:[a.length>1&&!f&&s.jsxs("button",{type:"button",onClick:w,children:[s.jsx(L,{size:13})," Split view"]}),f&&t&&s.jsxs("button",{type:"button",onClick:()=>c(t.sessionId),children:[s.jsx(A,{size:13})," Close split"]})]})]}),v.length>0&&s.jsx("nav",{className:"s-flight-observe-trace","aria-label":"Flight session history",children:v.map((e,p)=>{const b=t?.sessionId===e.sessionId,x=l?.sessionId===e.sessionId;return s.jsxs("div",{className:"s-flight-observe-trace-step",children:[p>0&&s.jsx("span",{className:"s-flight-observe-trace-arrow","aria-hidden":"true",children:"→"}),s.jsxs("button",{type:"button",className:"s-flight-observe-session-chip","data-selected":b||x,"data-observe-role":b?"primary":x?"compare":"idle","aria-pressed":b||x,title:e.sessionId,onClick:()=>C(e.sessionId),children:[s.jsxs("span",{className:"s-flight-observe-session-chip-top",children:[s.jsx("span",{children:e.harness||e.transport||"session"}),s.jsx("time",{title:new Date(e.startedAt).toLocaleString(),children:$(e.startedAt)||F(e.startedAt)})]}),s.jsx("strong",{children:O(e.sessionId)}),s.jsx("small",{children:q(e,p)})]})]},`${e.sessionId}:${e.startedAt}:${p}`)})}),h&&!g&&s.jsx("div",{className:"s-flight-observe-message s-flight-observe-message--error",children:h}),h&&g&&s.jsxs("div",{className:"s-flight-observe-message",children:[s.jsx("strong",{children:"Flight record unavailable"}),s.jsx("span",{children:"Showing the concrete session captured by this link."})]}),!h&&n&&s.jsx("div",{className:"s-flight-observe-message",children:"Resolving the flight’s session trace…"}),!h&&!n&&a.length===0&&!g&&s.jsxs("div",{className:"s-flight-observe-message",children:[s.jsx("strong",{children:"Waiting for a session"}),s.jsx("span",{children:"The flight is stable here; its trace will appear as soon as a harness acknowledges dispatch."})]}),g&&!f&&s.jsx("main",{className:"s-flight-observe-single",children:s.jsx(I,{sessionRef:g,navigate:o,machineId:i.machineId})}),!h&&t&&l&&f&&s.jsxs("main",{className:"s-flight-observe-split",children:[s.jsxs("section",{className:"s-flight-observe-pane",children:[s.jsx(y,{label:"Primary session",sessions:a,value:t.sessionId,onChange:e=>c(e,e===l.sessionId?t.sessionId:l.sessionId)}),s.jsx("div",{className:"s-flight-observe-pane-content",children:s.jsx(I,{sessionRef:t.sessionId,navigate:o,machineId:i.machineId,showObserveRail:!1})})]}),s.jsxs("section",{className:"s-flight-observe-pane",children:[s.jsx(y,{label:"Compare session",sessions:a.filter(e=>e.sessionId!==t.sessionId),value:l.sessionId,onChange:e=>c(t.sessionId,e)}),s.jsx("div",{className:"s-flight-observe-pane-content",children:s.jsx(I,{sessionRef:l.sessionId,navigate:o,machineId:i.machineId,showObserveRail:!1})})]})]})]})}export{Pe as FlightObserveScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./index-BFbLvCJn.js";import{f as u}from"./floor-preview-text-HrORUJ7D.js";import{f as F}from"./floor-memory-YMM8AlLY.js";import{a as O,S as P}from"./SpriteAvatar-D53GaaK3.js";import{f as q}from"./floor-context-model-rWKqaKmV.js";import{t as E}from"./time-Dhsh_2EG.js";import{f as b}from"./agent-floor-actor-DW8zLht0.js";import{l as d}from"./agent-lanes-model-DMAdqCmK.js";import{b as M,a as I,l as B}from"./agent-lane-detail-Ti3trpfH.js";/* empty css */import{R as U}from"./radio-Bjqmv997.js";import{F as g}from"./file-code-corner-DtMWHBN3.js";import{T as y}from"./terminal-DMBAZjPP.js";import{C as W}from"./coffee-D0YEK6-l.js";import{X}from"./x-BcfhXYiF.js";import{A as _}from"./arrow-up-right-DUW1A1Hb.js";import"./agent-state-DDhnFEEP.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./terminal-sessions-3RfJpen8.js";import"./api-DSqpVKC7.js";import"./createLucideIcon-CKbjXlwv.js";const w={home:{title:"Crew quarters",subtitle:"Readiness & attention",icon:W},tools:{title:"Execution lab",subtitle:"Recent commands & tool activity",icon:y},edit:{title:"Build workshop",subtitle:"Observed files & changes",icon:g},message:{title:"Communications",subtitle:"Observed messages & requests",icon:U}};function C({lane:t,now:o,onSelect:c}){const h=O(t.agent),r=b(t,o);return s.jsxs("button",{className:"floor-context__actor-row",type:"button",onClick:()=>c(t),children:[s.jsx(P,{name:t.agent.name,size:28,hue:h.hue,tone:h.tone}),s.jsxs("span",{children:[s.jsx("strong",{children:d(t.agent,t.source)}),s.jsxs("small",{children:[t.agent.harness," · ",t.id.slice(-5)]})]}),s.jsx("span",{className:`floor-context__posture is-${r.posture}`,children:r.label}),s.jsx(_,{size:13})]})}function l({children:t}){return s.jsx("p",{className:"floor-context__empty",children:t})}function js({lane:t,room:o,lanes:c,allLanes:h,now:r,onClose:R,onSelectRoom:T,onSelectLane:a,onOpenTrace:S}){const $=F(h),m=t?$.filter(e=>e.parent.id===t.id||e.child.id===t.id):[],p=o?w[o]:null,z=p?.icon??y,N=t?d(t.agent,t.source):p?.title??"Floor",j=o?c.filter(e=>b(e,r).station===o):[],v=q(c,r,o==="message"?["message","ask"]:["tool"]),f=t?M(t):null,n=(t?[t]:c).flatMap(e=>I({events:e.observe?.events??[],files:e.facts?.touchedFiles??e.observe?.files??[]},50).map(i=>({lane:e,file:i}))).filter(e=>o!=="edit"||e.file.state!=="read"),k=t?B(t.observe,4):[],A=t?b(t,r):null;return s.jsxs("aside",{className:"agent-floor__trace-panel floor-context","aria-label":`${N} context sheet`,children:[s.jsxs("header",{className:"floor-context__header",children:[s.jsx(z,{size:20}),s.jsxs("div",{children:[s.jsx("h2",{children:N}),s.jsx("p",{children:t?`${t.agent.harness??"Agent"} · ${t.id.slice(-8)} · ${A?.label}`:p?.subtitle})]}),s.jsx("button",{type:"button",onClick:R,"aria-label":"Close context sheet",children:s.jsx(X,{size:17})})]}),t?null:s.jsx("nav",{className:"floor-context__tabs","aria-label":"Room sheets",children:[["home","Crew"],["tools","Execution"],["edit","Build"],["message","Comms"]].map(([e,i])=>s.jsx("button",{type:"button","aria-pressed":o===e,onClick:()=>T(e),children:i},e))}),s.jsx("div",{className:"floor-context__body",children:t?s.jsxs(s.Fragment,{children:[s.jsxs("section",{children:[s.jsx("h3",{children:"Current task"}),s.jsx("p",{className:"floor-context__task",children:u(t.facts?.currentTask)||"No task summary reported for this session."})]}),s.jsx("dl",{className:"floor-context__facts",children:[["Model",t.facts?.model||f?.model],["Branch",t.facts?.branch||f?.branch],["Workspace",t.facts?.cwd||f?.cwd],["Parent",t.facts?.parentAgentName]].filter(([,e])=>e).map(([e,i])=>s.jsxs("div",{children:[s.jsx("dt",{children:e}),s.jsx("dd",{title:i??void 0,children:i})]},e))}),s.jsxs("section",{children:[s.jsx("h3",{children:"Capabilities & tools"}),t.agent.capabilities?.length||t.agent.skills?.length?s.jsx("div",{className:"floor-context__abilities",children:[...new Set([...t.agent.capabilities??[],...t.agent.skills??[]])].map(e=>s.jsx("span",{children:e},e))}):s.jsx(l,{children:"No capabilities reported by this actor."}),s.jsx("p",{className:"floor-context__scope",children:"Tools observed in loaded session history"}),s.jsx("div",{className:"floor-context__abilities",children:[...new Set((t.observe?.events??[]).filter(e=>e.kind==="tool"&&e.tool).map(e=>e.tool))].slice(0,20).map(e=>s.jsx("span",{children:e},e))})]}),s.jsxs("section",{children:[s.jsxs("h3",{children:["Session relationships ",s.jsx("span",{children:m.length})]}),m.length?m.map(e=>{const i=e.child.id===t.id,x=i?e.parent:e.child;return s.jsxs("div",{children:[s.jsx("p",{className:"floor-context__scope",children:i?"Parent session":"Child session"}),s.jsx(C,{lane:x,now:r,onSelect:a})]},x.id)}):s.jsx(l,{children:t.facts?.parentSessionId?"Parent session is outside the loaded fleet.":"No parent or child sessions reported in the loaded fleet."})]}),s.jsxs("section",{children:[s.jsxs("h3",{children:["Touched files ",s.jsx("span",{children:n.length})]}),n.length?n.slice(0,10).map(({file:e})=>s.jsxs("div",{className:"floor-context__file",children:[s.jsx(g,{size:14}),s.jsx("code",{title:e.path,children:e.path}),s.jsx("small",{children:e.state})]},e.path)):s.jsx(l,{children:"No files observed yet."})]}),s.jsxs("section",{children:[s.jsx("h3",{children:"Recent commands"}),k.length?k.map(e=>s.jsxs("div",{className:"floor-context__command",children:[s.jsx("pre",{children:e.command}),e.outcome?s.jsx("small",{children:e.outcome}):null]},e.id)):s.jsx(l,{children:"No shell commands observed yet."})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("section",{children:[s.jsxs("h3",{children:["In this room ",s.jsx("span",{children:j.length})]}),j.length?j.map(e=>s.jsx(C,{lane:e,now:r,onSelect:a},e.id)):s.jsx(l,{children:"No actors in this room right now."})]}),o==="home"?s.jsxs("section",{children:[s.jsx("h3",{children:"Tasks in this sector"}),c.map(e=>s.jsxs("button",{type:"button",className:"floor-context__task-row",onClick:()=>a(e),children:[s.jsxs("strong",{children:[d(e.agent,e.source)," ",s.jsx("small",{children:e.id.slice(-5)})]}),s.jsx("p",{children:u(e.facts?.currentTask)||"No task summary reported."})]},e.id))]}):null,o==="edit"?s.jsxs("section",{children:[s.jsxs("h3",{children:["Changed files ",s.jsx("span",{children:n.length})]}),s.jsx("p",{className:"floor-context__scope",children:"Observed in this sector’s loaded session history."}),n.length?n.map(({lane:e,file:i})=>s.jsxs("button",{type:"button",className:"floor-context__file is-action",title:`Inspect the actor that touched ${i.path}`,onClick:()=>a(e),children:[s.jsx(g,{size:14}),s.jsxs("span",{children:[s.jsx("code",{title:i.path,children:i.path}),s.jsxs("small",{children:[d(e.agent,e.source)," · ",e.id.slice(-5)]})]}),s.jsx("small",{children:i.state})]},`${e.id}:${i.path}`)):s.jsx(l,{children:"No changed files observed in this sector."})]}):null,o==="tools"||o==="message"?s.jsxs("section",{children:[s.jsx("h3",{children:o==="tools"?"Tool activity":"Messages & requests"}),s.jsx("p",{className:"floor-context__scope",children:"This sector · last 15 minutes · observed harness activity"}),v.length?v.map(({lane:e,event:i,at:x})=>s.jsxs("article",{className:"floor-context__event",children:[s.jsxs("header",{children:[s.jsx("strong",{children:o==="tools"?i.tool||"Tool":i.kind==="ask"?"Request":"Message"}),s.jsx("time",{children:E(x,r)})]}),s.jsx("p",{children:u(i.arg||i.text,800)}),i.diff?s.jsxs("small",{className:"floor-context__diff",children:["+",i.diff.add," −",i.diff.del]}):null,s.jsxs("button",{type:"button",onClick:()=>a(e),children:[d(e.agent,e.source)," · ",e.id.slice(-5)," ",s.jsx(_,{size:12})]})]},`${e.id}:${i.id}`)):s.jsx(l,{children:o==="tools"?"No recent tool activity in this sector.":"No recent messages or requests in this sector."})]}):null]})}),t?s.jsxs("footer",{className:"floor-context__footer",children:[s.jsx("span",{children:"Observed session context"}),s.jsxs("button",{type:"button",onClick:()=>S(t),children:["Open full trace ",s.jsx(_,{size:14})]})]}):null]})}export{js as FloorContextSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.floor-exchange-panel{position:absolute;z-index:25;top:56px;right:16px;width:min(360px,calc(100% - 32px));max-height:calc(100% - 120px);overflow:auto;padding:18px;background:#141c19;border:1px solid #ffffff26;border-radius:14px;color:#e8ede7;box-shadow:0 16px 45px #0005}.floor-exchange-panel header,.floor-exchange-panel li>div{display:flex;justify-content:space-between;gap:12px}.floor-exchange-panel header small{display:block;margin-top:5px}.floor-exchange-panel small{color:#9baaa2;font-size:11px}.floor-exchange-panel button{color:inherit;background:#ffffff0a;border:1px solid #ffffff15;border-radius:6px;padding:6px 10px;cursor:pointer}.floor-exchange-panel button:disabled{opacity:.4;cursor:default}.floor-exchange-panel__actions{display:flex;gap:8px;margin:14px 0}.floor-exchange-panel ol{padding:0;list-style:none}.floor-exchange-panel li{border-bottom:1px solid #ffffff0b;padding:12px 8px;border-radius:6px}.floor-exchange-panel li.is-speaking{background:#b6d98920}.floor-exchange-panel p{font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.floor-exchange-panel section{display:grid;gap:8px}.floor-exchange-links{position:absolute;inset:0;overflow:visible;pointer-events:none;z-index:1}.floor-exchange-links .exchange-line{fill:none;stroke:#b1ca87;stroke-opacity:.28;stroke-width:1.5}.floor-exchange-links .exchange-hit{fill:none;stroke:transparent;stroke-width:18;pointer-events:stroke;cursor:pointer}.floor-exchange-links g:hover .exchange-line,.floor-exchange-links g:focus .exchange-line,.floor-exchange-links g.is-active .exchange-line{stroke-opacity:.9;stroke-width:2}.shared-floor__wanderer.is-speaking .shared-floor-character__sprite{filter:drop-shadow(0 0 7px #c9ef93)}.floor-exchange-links g:focus{outline:none}.floor-exchange-links g:focus-visible .exchange-line{stroke:#d2efaa;stroke-width:3;stroke-opacity:1}.floor-exchange-links .is-family .exchange-line{stroke-dasharray:2 7;stroke-linecap:round;stroke:#a8b5b0}.floor-exchange-panel__relationship{margin-top:16px;padding-bottom:12px;border-bottom:1px solid #ffffff12}.floor-exchange-panel__relationship p{margin:0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,j as t}from"./index-BFbLvCJn.js";import{f as T}from"./floor-character-name-CqJPOlXb.js";import{a as D}from"./floor-message-passes-CO3Ix_wR.js";import{f as I}from"./floor-preview-text-HrORUJ7D.js";import{b as F}from"./shared-work-artifacts-DfNl9KTo.js";import{f as O}from"./floor-memory-YMM8AlLY.js";function V(l,v,S=[]){const k=new Map;for(const n of D(l,v,15*6e4,S)){const[i,f]=[n.from,n.to].sort(),u=JSON.stringify([i,f]);let r=k.get(u);r||(r={id:u,from:i,to:f,messages:[],lastAt:n.at},k.set(u,r)),!(r.messages.length>=50)&&r.messages.push({id:n.id,from:n.from,to:n.to,at:n.at,bodyAvailable:n.bodyAvailable,text:I(n.label,2e3)||"Message sent"})}return[...k.values()].map(n=>({...n,messages:n.messages.sort((i,f)=>i.at-f.at||i.id.localeCompare(f.id))})).sort((n,i)=>i.lastAt-n.lastAt||n.id.localeCompare(i.id))}let R=null;function B(l){return I(l.replace(/```[\s\S]*?```/g," ")).replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/https?:\/\/\S+/g,"").replace(/<[^>]*>/g," ").replace(/[`*_#>|]/g,"").replace(/\s+/g," ").trim().slice(0,400)}function L(){const[l]=a.useState(()=>typeof window<"u"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window),[v,S]=a.useState(0),[k,n]=a.useState(!1),[i,f]=a.useState(null),[u,r]=a.useState(null),b=a.useRef(Symbol("exchange-speech")),m=a.useRef(0),y=a.useRef(!0),s=a.useRef(null),d=a.useRef(new Map),g=a.useCallback(()=>{m.current++,s.current&&(s.current.onend=null,s.current.onerror=null,s.current=null),l&&R===b.current&&(window.speechSynthesis.cancel(),R=null),y.current&&(n(!1),f(null))},[l]);a.useEffect(()=>{if(y.current=!0,!l)return()=>{y.current=!1};const w=window.speechSynthesis,h=()=>S(w.getVoices().filter(e=>e.localService).length);return h(),w.addEventListener("voiceschanged",h),()=>{y.current=!1,g(),w.removeEventListener("voiceschanged",h)}},[l,g]);const E=a.useCallback(w=>{if(r(null),!l){r("Speech playback is unavailable in this browser.");return}const h=window.speechSynthesis;if(R!==b.current&&(R!==null||h.speaking||h.pending)){r("Another playback is active. Stop it before listening here.");return}g();const e=h.getVoices().filter(c=>c.localService).sort((c,p)=>c.voiceURI.localeCompare(p.voiceURI));if(S(e.length),!e.length){r("No local browser voices are available yet.");return}const o=w.slice(-12).map(c=>({...c,text:B(c.text)})).filter(c=>c.text);if(!o.length){r("No readable message text to play.");return}const j=new Set;for(const c of new Set(o.map(p=>p.from))){const p=d.current.get(c);if(p&&!j.has(p)&&e.some(C=>C.voiceURI===p)){j.add(p);continue}const x=[...c].reduce((C,_)=>C*31+_.charCodeAt(0)>>>0,0),P=e.filter(C=>!j.has(C.voiceURI)),N=P.length?P:e,U=N[x%N.length];d.current.set(c,U.voiceURI),j.add(U.voiceURI)}R=b.current;const A=m.current;n(!0);const M=c=>{if(!y.current||m.current!==A||R!==b.current)return;if(c>=o.length){R=null,s.current=null,n(!1),f(null);return}const p=o[c],x=new SpeechSynthesisUtterance(p.text);x.voice=e.find(P=>P.voiceURI===d.current.get(p.from))??e[0],x.lang=x.voice.lang,x.rate=1,x.onend=()=>M(c+1),x.onerror=()=>{m.current!==A||!y.current||(g(),r("Browser speech stopped before the exchange finished."))},s.current=x,f(p.id);try{h.speak(x)}catch{g(),r("Browser speech could not start.")}};M(0)},[l,g]);return{supported:l,voiceCount:v,playing:k,speakingId:i,error:u,play:E,stop:g}}function W({pair:l,lanes:v,now:S,onClose:k,onFile:n,onSpeaker:i}){const u=V(v,S).find(e=>l.includes(e.from)&&l.includes(e.to))?.messages??[],r=u.filter(e=>e.bodyAvailable!==!1),b=O(v).find(e=>l.includes(e.parent.id)&&l.includes(e.child.id)),m=e=>{const o=v.find(j=>j.id===e);return o?T(o).label:"Departed actor"},y=F(v).filter(e=>l.every(o=>e.owners.some(j=>j.id===o))),s=L(),[d,g]=a.useState(null),[E,w]=a.useState([]),h=d!==null||s.playing?E:u;return a.useEffect(()=>{const e=h.find(o=>o.id===s.speakingId);return i(e?.from??(d===null?null:h[d]?.from??null)),()=>i(null)},[s.speakingId,d]),a.useEffect(()=>{if(d===null)return;const e=window.setTimeout(()=>g(o=>o===null||o+1>=E.length?null:o+1),1800);return()=>window.clearTimeout(e)},[d]),t.jsxs("aside",{className:"floor-exchange-panel","aria-label":u.length?"Recent exchange":"Agent relationship",onPointerDown:e=>e.stopPropagation(),children:[t.jsxs("header",{children:[t.jsxs("div",{children:[t.jsxs("strong",{children:[m(l[0])," ↔ ",m(l[1])]}),t.jsx("small",{children:u.length?"Recent exchanges · last 15 minutes":"Parent → subagent"})]}),t.jsx("button",{type:"button",onClick:k,"aria-label":"Close exchange",children:"×"})]}),b?t.jsxs("section",{className:"floor-exchange-panel__relationship",children:[t.jsx("small",{children:"Delegation relationship"}),t.jsxs("p",{children:[m(b.parent.id)," → ",m(b.child.id)]}),t.jsx("strong",{children:"Subagent’s current task"}),t.jsx("p",{children:I(b.child.facts?.currentTask)||"Task details have not been reported yet."})]}):null,r.length>0?t.jsxs("div",{className:"floor-exchange-panel__actions",children:[t.jsx("button",{type:"button",disabled:!u.length,onClick:()=>{s.stop(),w(r),g(d===null?0:null)},children:d===null?"Replay":"Stop replay"}),t.jsx("button",{type:"button",disabled:!s.supported||!u.length,onClick:()=>{g(null),w(r),s.playing?s.stop():s.play(r)},children:s.playing?"Stop voice":"Listen"})]}):null,r.length>0&&(s.supported?s.voiceCount<2?t.jsx("small",{children:"Distinct character voices depend on available browser voices."}):null:t.jsx("small",{children:"Voice playback isn’t available in this browser."})),s.error?t.jsx("p",{role:"status",children:s.error}):null,t.jsx("ol",{children:h.map((e,o)=>t.jsxs("li",{className:s.speakingId===e.id||d===o?"is-speaking":"",children:[t.jsxs("div",{children:[t.jsx("strong",{children:m(e.from)}),t.jsxs("small",{children:[Math.max(0,Math.floor((S-e.at)/6e4)),"m ago"]})]}),t.jsx("p",{children:e.text}),e.bodyAvailable===!1?t.jsxs("details",{children:[t.jsx("summary",{children:"Why unavailable?"}),t.jsx("small",{children:"The harness recorded the exchange without readable message contents. Playback skips this entry."})]}):null]},e.id))}),u.length?null:t.jsx("p",{children:"This dotted link shows who the subagent belongs to. Recorded exchanges appear here when available."}),y.length?t.jsxs("section",{children:[t.jsx("strong",{children:"Files both touched"}),y.slice(0,6).map(e=>t.jsx("button",{type:"button",disabled:!e.resolvedPath,onClick:()=>e.resolvedPath&&n(e.resolvedPath),children:e.path.split("/").at(-1)},e.id))]}):null]})}const K=Object.freeze(Object.defineProperty({__proto__:null,FloorExchangePanel:W},Symbol.toStringTag,{value:"Module"}));export{W as F,K as a,V as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as a}from"./index-BFbLvCJn.js";import{f as j,F as $}from"./floor-message-passes-CO3Ix_wR.js";import"./lane-observe-CteDwdD-.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";function k({lanes:h,now:c,positions:x,paused:r,broker:_}){const n=m.useRef(null),o=m.useRef(new Map),p=r?n.current??c:c;m.useEffect(()=>{n.current=r?n.current??c:null},[r,c]);const i=j(h,p,_);return m.useEffect(()=>{const t=new Set(i.map(s=>`${s.id}:${r}`));for(const s of o.current.keys())t.has(s)||o.current.delete(s)},[i,r]),a.jsx("svg",{className:`floor-message-passes${r?" is-paused":""}`,"aria-label":"Recent messages between agents",children:i.map(t=>{const s=x.get(t.from),e=x.get(t.to);if(!s||!e)return null;const y=(s.x+e.x)/2,u=(s.y+e.y)/2-Math.min(110,30+Math.hypot(e.x-s.x,e.y-s.y)*.3),f=`M ${s.x} ${s.y} Q ${y} ${u} ${e.x} ${e.y}`,g=Math.max(0,p-t.at),l=`${t.id}:${r}`;return o.current.has(l)||o.current.set(l,g),a.jsxs("g",{className:"floor-message-passes__pass",style:{opacity:Math.min(1,($-g)/3e3),"--pass-age":`${-o.current.get(l)}ms`},children:[a.jsx("title",{children:t.label}),a.jsx("path",{className:"floor-message-passes__trail",d:f}),a.jsx("path",{className:"floor-message-passes__hit",d:f}),a.jsxs("g",{className:"floor-message-passes__marker",style:{offsetPath:`path('${f}')`},children:[a.jsx("circle",{className:"floor-message-passes__aura",r:"12"}),a.jsx("ellipse",{className:"floor-message-passes__ball",rx:"6",ry:"4.5"}),a.jsx("path",{className:"floor-message-passes__seam",d:"M -2.5 0 H 2.5 M -1.3 -1.2 V 1.2 M 1.3 -1.2 V 1.2"})]}),a.jsx("circle",{className:"floor-message-passes__arrival",cx:e.x,cy:e.y,r:"7"}),a.jsx("circle",{className:"floor-message-passes__still",cx:e.x,cy:e.y,r:"4"})]},l)})})}export{k as FloorMessagePasses};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.floor-message-passes{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:3}.floor-message-passes__trail{fill:none;stroke:#edc78e;stroke-width:1.3;stroke-linecap:round;stroke-dasharray:2 9;animation:floor-message-trail 3.1s linear both;animation-delay:var(--pass-age)}.floor-message-passes__hit{fill:none;stroke:transparent;stroke-width:14;pointer-events:stroke;animation:floor-message-hit 3.1s step-end both;animation-delay:var(--pass-age)}.floor-message-passes__marker{offset-distance:0%;offset-rotate:auto;animation:floor-message-delivery 2.2s cubic-bezier(.22,.38,.55,1) both;animation-delay:var(--pass-age);filter:drop-shadow(0 0 5px #f5c17488)}.floor-message-passes__aura{fill:#efbf7420}.floor-message-passes__ball{fill:#f1c37f;stroke:#ffe4b5;stroke-width:.8}.floor-message-passes__seam{fill:none;stroke:#9b693c;stroke-width:.7;stroke-linecap:round}.floor-message-passes__arrival{fill:none;stroke:#f1c37f;stroke-width:1.6;transform-box:fill-box;transform-origin:center;animation:floor-message-arrival 3.1s linear both;animation-delay:var(--pass-age)}.floor-message-passes__still{display:none;fill:#f1c37f}.floor-message-passes.is-paused *{animation-play-state:paused}@keyframes floor-message-delivery{0%{offset-distance:0%;opacity:0}8%{opacity:1}96%{opacity:1}to{offset-distance:100%;opacity:0}}@keyframes floor-message-arrival{0%,70%{opacity:0;transform:scale(.5)}72%{opacity:.85;transform:scale(.6)}to{opacity:0;transform:scale(2.6)}}@keyframes floor-message-trail{0%{opacity:0}12%,65%{opacity:.24}to{opacity:0}}@keyframes floor-message-hit{0%{visibility:visible}to{visibility:hidden}}@media(prefers-reduced-motion:reduce){.floor-message-passes__marker,.floor-message-passes__arrival{display:none;animation:none}.floor-message-passes__trail{animation:none;opacity:.16}.floor-message-passes__still{display:block}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,j as e}from"./index-BFbLvCJn.js";import{f as z}from"./agent-floor-actor-DW8zLht0.js";import{AgentFloorWorld as D}from"./AgentFloorWorld-DqmnQexg.js";import{o as O}from"./lane-observe-CteDwdD-.js";import{f as A}from"./floor-context-model-rWKqaKmV.js";import{l as C}from"./agent-lanes-model-DMAdqCmK.js";/* empty css */import"./agent-state-DDhnFEEP.js";import"./SpriteAvatar-D53GaaK3.js";/* empty css */import"./agent-floor-world-layout-hfMjuoui.js";import"./coffee-D0YEK6-l.js";import"./createLucideIcon-CKbjXlwv.js";import"./terminal-DMBAZjPP.js";import"./radio-Bjqmv997.js";import"./file-code-corner-DtMWHBN3.js";import"./git-branch-C45vy8qT.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./terminal-sessions-3RfJpen8.js";import"./api-DSqpVKC7.js";function B(n,g){if(!n.observe)return null;const d=n.observe.events.filter(u=>{const m=O(u,n.observe?.metadata?.session?.sessionStart);return m!==null&&m<=g});return d.length?{...n,facts:void 0,agent:{...n.agent,state:"idle",staleLocalRegistration:!1},observe:{...n.observe,events:d}}:null}const p=15*6e4;function me({lanes:n,now:g,onActor:d}){const[u,m]=r.useState("both"),[h,$]=r.useState("flat"),[a,R]=r.useState(0),[L,M]=r.useState(null),[_,S]=r.useState(null),N=r.useRef(null),[E,I]=r.useState({width:800,height:300});r.useEffect(()=>{if(!N.current)return;const t=new ResizeObserver(([s])=>I({width:s.contentRect.width,height:s.contentRect.height}));return t.observe(N.current),()=>t.disconnect()},[]);const[o]=r.useState(g),[l,f]=r.useState(o),[x,j]=r.useState(!1),[k,P]=r.useState(10),[b]=r.useState(n),[v]=r.useState(()=>A(n,o,["tool","message","ask"],2e3).reverse());r.useEffect(()=>{if(!x)return;const t=window.setInterval(()=>f(s=>Math.min(o,s+250*k)),250);return()=>window.clearInterval(t)},[x,k,o]),r.useEffect(()=>{l>=o&&j(!1)},[l,o]);const F=b.slice(a*8,a*8+8),w=F.flatMap(t=>{const s=B(t,l);return s?[s]:[]}),T=Object.fromEntries(F.map((t,s)=>[t.id,s])),W=Math.max(.1,Math.min((E.width-20)/(h==="iso"?1395:960),(E.height-20)/(h==="iso"?805:650))),c=_?v.filter(t=>t.lane.id===_&&t.at<=l).slice(-1)[0]:null,i=v.filter(t=>t.at<=l).slice(-1)[0];return e.jsxs("section",{className:`floor-replay is-${u}`,"aria-label":"History replay",children:[e.jsxs("header",{children:[e.jsx("div",{role:"group","aria-label":"Replay layout",children:["both","timeline","map"].map(t=>e.jsx("button",{type:"button","aria-pressed":u===t,onClick:()=>m(t),children:t==="both"?"Both":t==="timeline"?"Timeline":"Map"},t))}),e.jsxs("div",{className:"floor-replay__projection",role:"group","aria-label":"Replay map projection",children:[["flat","iso"].map(t=>e.jsx("button",{type:"button","aria-pressed":h===t,onClick:()=>$(t),children:t==="iso"?"Iso":"Flat"},t)),b.length>8?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button","aria-label":"Previous replay sector",disabled:a===0,onClick:()=>R(a-1),children:"←"}),e.jsxs("span",{children:["Sector ",a+1]}),e.jsx("button",{type:"button","aria-label":"Next replay sector",disabled:(a+1)*8>=b.length,onClick:()=>R(a+1),children:"→"})]}):null]})]}),e.jsxs("div",{className:"floor-replay__map",ref:N,children:[e.jsx("div",{className:"floor-replay__world",style:{transform:`scale(${W})${h==="iso"?" matrix(0.8660254, 0.5, -0.8660254, 0.5, 0, 0)":""}`},children:e.jsx(D,{lanes:w,now:l,berths:T,instant:!0,motionPaused:!1,selectedId:_??L,onFocus:M,onSelect:t=>S(t.id),onFocusRoom:t=>S(w.find(s=>z(s,l).station===t)?.id??null)})}),w.length?null:e.jsx("p",{className:"floor-replay__map-empty",children:"No actors observed yet at this point"})]}),e.jsxs("div",{className:"floor-replay__controls",children:[e.jsx("button",{type:"button",onClick:()=>{l>=o&&f(o-p),j(!x)},children:x?"Pause replay":"Play replay"}),e.jsxs("select",{"aria-label":"Replay speed",value:k,onChange:t=>P(Number(t.target.value)),children:[e.jsx("option",{value:1,children:"1×"}),e.jsx("option",{value:10,children:"10×"}),e.jsx("option",{value:30,children:"30×"})]}),e.jsx("input",{type:"range","aria-label":"Replay time",min:o-p,max:o,step:1e3,value:l,onChange:t=>{j(!1),f(Number(t.target.value))}}),e.jsx("time",{children:new Date(l).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),e.jsxs("div",{className:"floor-replay__details",children:[e.jsxs("div",{className:"floor-replay__track-label",children:[e.jsxs("span",{children:["Actor timelines · ",v.length," observations"]}),e.jsxs("div",{className:"floor-replay__legend","aria-label":"Timeline event colors",children:[e.jsx("span",{children:"Tools"}),e.jsx("span",{children:"Messages / asks"})]})]}),e.jsxs("div",{className:"floor-replay__axis",children:[e.jsx("span",{children:"15 minutes before opening"}),e.jsx("span",{children:"Snapshot end"})]}),e.jsx("div",{className:"floor-replay__tracks",children:b.map(t=>e.jsxs("div",{className:"floor-replay__row",children:[e.jsxs("button",{type:"button",onClick:()=>d(t),children:[C(t.agent,t.source),e.jsx("small",{children:t.id.slice(-5)})]}),e.jsxs("div",{className:"floor-replay__track",children:[e.jsx("i",{style:{left:`${(l-o+p)/p*100}%`}}),v.filter(s=>s.lane.id===t.id).map(({event:s,at:y})=>e.jsx("button",{type:"button",className:`is-${s.kind}${y>l?" is-future":""}`,style:{left:`${(y-o+p)/p*100}%`},"aria-label":`${s.tool||s.kind} at ${new Date(y).toLocaleTimeString()}`,title:s.tool||s.kind,onClick:()=>{j(!1),f(y)}},s.id))]})]},t.id))})]}),c?e.jsxs("div",{className:"floor-replay__selection",children:[e.jsx("strong",{children:C(c.lane.agent,c.lane.source)})," · ",c.event.tool||c.event.kind,e.jsx("button",{type:"button",onClick:()=>S(null),children:"Clear selection"}),e.jsx("p",{children:(c.event.arg||c.event.text).slice(0,500)})]}):null,e.jsx("article",{className:"floor-replay__event",children:i?e.jsxs(e.Fragment,{children:[e.jsxs("header",{children:[e.jsx("strong",{children:i.event.tool||i.event.kind}),e.jsxs("button",{type:"button",onClick:()=>d(i.lane),children:["Inspect ",C(i.lane.agent,i.lane.source)]})]}),e.jsx("pre",{children:(i.event.arg||i.event.text).slice(0,1600)})]}):e.jsx("p",{children:"No loaded event before this point."})})]})}export{me as FloorReplay};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as s}from"./index-BFbLvCJn.js";import{b as O}from"./shared-work-artifacts-DfNl9KTo.js";import{u as E}from"./Provider-BEXAZWd9.js";import{a as R}from"./router-CJIx83Ia.js";import{f as P,a as B}from"./terminal-sessions-3RfJpen8.js";import{b as H}from"./agent-lane-detail-Ti3trpfH.js";import{l as k}from"./agent-lanes-model-DMAdqCmK.js";/* empty css */import{F as S}from"./file-code-corner-DtMWHBN3.js";import{G as C}from"./git-branch-C45vy8qT.js";import{T as z}from"./terminal-DMBAZjPP.js";import{X as G}from"./x-BcfhXYiF.js";import{A as m}from"./arrow-up-right-DUW1A1Hb.js";import"./theme-vars-DNK0nn3k.js";import"./api-DSqpVKC7.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"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.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"./synthetic-agent-routing-aduMYO7P.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";const p={artifacts:"Artifact shelf",branches:"Branch board",terminals:"Terminal bay"};function Ke({view:o,lanes:h,onView:F,onClose:L,onActor:x}){const{openFilePreview:T}=E(),[f,$]=n.useState([]),[u,j]=n.useState(null),[b,w]=n.useState(!0),[l,_]=n.useState(!1),[y,v]=n.useState("");n.useEffect(()=>{if(o!=="terminals")return;let e=!0;const r=()=>P().then(c=>{e&&($(B(c)),j(null))}).catch(()=>{e&&j("Terminal discovery is unavailable. Retry or open the terminal workspace.")}).finally(()=>{e&&w(!1)});r();const t=window.setInterval(()=>{document.hidden||r()},15e3);return()=>{e=!1,window.clearInterval(t)}},[o]);const A=h.map(e=>({lane:e,stats:H(e)})),i=new Map,d=new Map(O(h).map(e=>[e.id,{path:e.path,resolved:e.resolvedPath,owners:e.owners,state:e.state}]));for(const{lane:e,stats:r}of A){const t=e.facts?.cwd||r.cwd||"",c=e.facts?.branch||r.branch;if(c){const N=`${t}\0${c}`,g=i.get(N)??{branch:c,cwd:t,owners:[]};g.owners.push(e),i.set(N,g)}}const a=e=>e.toLowerCase().includes(y.toLowerCase()),I=o==="artifacts"?S:o==="branches"?C:z;return s.jsxs("aside",{className:"agent-floor__trace-panel floor-context","aria-label":`${p[o]} context sheet`,children:[s.jsxs("header",{className:"floor-context__header",children:[s.jsx(I,{size:20}),s.jsxs("div",{children:[s.jsx("h2",{children:p[o]}),s.jsx("p",{children:o==="terminals"?"Discovered sessions · refreshes every 15s":"Across the loaded fleet"})]}),s.jsx("button",{type:"button",onClick:L,"aria-label":"Close resource sheet",children:s.jsx(G,{size:17})})]}),s.jsx("nav",{className:"floor-context__tabs","aria-label":"Resource sheets",children:["artifacts","branches","terminals"].map(e=>s.jsx("button",{type:"button","aria-pressed":o===e,onClick:()=>{v(""),F(e)},children:p[e]},e))}),s.jsxs("div",{className:"floor-context__body",children:[s.jsx("input",{className:"floor-context__search","aria-label":"Filter floor resources",placeholder:o==="terminals"?"Find a session or workspace…":"Filter by path or branch…",value:y,onChange:e=>v(e.target.value)}),o==="artifacts"?s.jsxs("section",{children:[s.jsxs("h3",{children:["Observed changed files ",s.jsx("span",{children:d.size})]}),s.jsx("p",{className:"floor-context__scope",children:"Files changed in loaded session history. Select a file to preview."}),[...d].filter(([,e])=>a(e.path)).map(([e,r])=>s.jsxs("article",{className:"floor-context__resource",children:[s.jsxs("button",{className:"floor-context__resource-title",type:"button",disabled:!r.resolved,onClick:()=>r.resolved&&T(r.resolved),children:[s.jsx(S,{size:15}),s.jsx("strong",{children:r.path.split("/").at(-1)}),s.jsx(m,{size:13})]}),s.jsx("code",{title:r.resolved??r.path,children:r.resolved??r.path}),s.jsxs("small",{children:[r.state,r.owners.length>1?` · ${r.owners.length} {row.owners.length === 1 ? "actor" : "actors"} touched this file`:""]}),s.jsx("div",{className:"floor-context__owners",children:r.owners.map(t=>s.jsxs("button",{type:"button",onClick:()=>x(t),children:[k(t.agent,t.source)," · ",t.id.slice(-5)]},t.id))})]},e)),[...d.values()].some(e=>a(e.path))?null:s.jsx("p",{className:"floor-context__empty",children:"No observed changed files match this view."})]}):null,o==="branches"?s.jsxs("section",{children:[s.jsxs("h3",{children:["Observed branches ",s.jsx("span",{children:i.size})]}),s.jsx("p",{className:"floor-context__scope",children:"Branches and workspaces reported by these sessions."}),[...i].filter(([,e])=>a(`${e.branch} ${e.cwd}`)).map(([e,r])=>s.jsxs("article",{className:"floor-context__resource",children:[s.jsxs("h3",{children:[s.jsx(C,{size:15}),r.branch,s.jsxs("span",{children:[r.owners.length," ",r.owners.length===1?"actor":"actors"]})]}),s.jsx("code",{children:r.cwd||"Workspace not reported"}),s.jsx("div",{className:"floor-context__owners",children:r.owners.map(t=>s.jsxs("button",{type:"button",onClick:()=>x(t),children:[k(t.agent,t.source)," · ",t.id.slice(-5)]},t.id))})]},e)),[...i.values()].some(e=>a(`${e.branch} ${e.cwd}`))?null:s.jsx("p",{className:"floor-context__empty",children:"No reported branches match this view."})]}):null,o==="terminals"?s.jsxs("section",{children:[s.jsxs("nav",{className:"floor-context__tabs",children:[s.jsx("button",{type:"button","aria-pressed":!l,onClick:()=>_(!1),children:"All terminals"}),s.jsx("button",{type:"button","aria-pressed":l,onClick:()=>_(!0),children:"Herdr"})]}),s.jsx("p",{className:"floor-context__scope",children:"All discovered terminal surfaces. Opening a session uses observe mode."}),u?s.jsx("p",{role:"alert",className:"floor-context__empty",children:u}):null,b?s.jsx("p",{className:"floor-context__empty",children:"Loading terminals…"}):f.filter(e=>(!l||e.surface.backend==="herdr")&&a(e.searchable)).map(e=>s.jsxs("article",{className:"floor-context__resource",children:[s.jsxs("a",{className:"floor-context__resource-title",href:R({view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:e.key,mode:"observe"}),children:[s.jsx(z,{size:15}),s.jsx("strong",{children:e.title}),s.jsx(m,{size:13})]}),s.jsxs("small",{children:[e.surface.backend," · ",e.condition]}),s.jsx("code",{children:e.session.cwd||e.project})]},e.id)),!b&&!f.some(e=>(!l||e.surface.backend==="herdr")&&a(e.searchable))?s.jsxs("p",{className:"floor-context__empty",children:["No ",l?"Herdr ":"","terminals match this view."]}):null,s.jsxs("a",{className:"floor-context__resource-title",href:"/terminal",children:["Open terminal workspace ",s.jsx(m,{size:13})]})]}):null]})]})}export{Ke as FloorResourcesSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p,j as e}from"./index-BFbLvCJn.js";import{l as h}from"./agent-lanes-model-DMAdqCmK.js";import{P as x}from"./pin-q_0gAA6i.js";import{X as v}from"./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"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./createLucideIcon-CKbjXlwv.js";const m="openscout:floor-saved-work";function j(){try{const r=JSON.parse(localStorage.getItem(m)??"[]");return Array.isArray(r)?r.filter(a=>!!a&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.task=="string"&&typeof a.savedAt=="number").slice(0,24):[]}catch{return[]}}function O({lanes:r,selected:a,onActor:f}){const[s,u]=p.useState(j),[n,c]=p.useState(!1),l=t=>{u(t);try{localStorage.setItem(m,JSON.stringify(t))}catch{}},i=a&&s.some(t=>t.id===a.id);return e.jsxs("div",{className:"floor-saved",children:[e.jsxs("button",{type:"button",className:"floor-tactical__motion","aria-expanded":n,onClick:()=>c(!n),children:[e.jsx(x,{size:13}),"Saved work · ",s.length]}),a?e.jsx("button",{type:"button",className:"floor-tactical__motion","aria-pressed":!!i,disabled:!i&&s.length>=24,onClick:()=>{i?l(s.filter(t=>t.id!==a.id)):(l([...s,{id:a.id,name:h(a.agent,a.source),task:a.facts?.currentTask||"No task summary reported.",savedAt:Date.now()}]),c(!0))},children:i?"Unpin selected actor":"Pin selected work"}):null,n?e.jsx("div",{className:"floor-saved__list",children:s.length?s.map(t=>{const o=r.find(d=>d.id===t.id);return e.jsxs("article",{children:[e.jsxs("button",{type:"button",disabled:!o,onClick:()=>o&&f(o),children:[e.jsxs("strong",{children:[t.name," · ",t.id.slice(-5)]}),e.jsx("small",{children:o?"Inspect actor":"Outside loaded fleet"})]}),e.jsx("p",{children:t.task}),e.jsxs("footer",{children:[e.jsxs("small",{children:["Saved ",new Date(t.savedAt).toLocaleDateString()]}),e.jsx("button",{type:"button","aria-label":`Remove saved work for ${t.name} ${t.id.slice(-5)}`,onClick:()=>l(s.filter(d=>d.id!==t.id)),children:e.jsx(v,{size:12})})]})]},t.id)}):e.jsx("p",{children:"Select an actor, then pin its work here. Saved task excerpts stay available after the actor leaves the floor."})}):null]})}export{O as FloorSavedWork};
|