@openscout/scout 0.2.102 → 0.2.106

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.
Files changed (605) hide show
  1. package/README.md +37 -0
  2. package/bin/scout.mjs +6 -0
  3. package/bin/scoutd +0 -0
  4. package/dist/build-manifest.json +4 -4
  5. package/dist/chat.mjs +307 -0
  6. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
  7. package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CusDRiVO.js} +1 -1
  8. package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-CyegKk1V.js} +1 -1
  9. package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-X-hbTOi0.js} +1 -1
  10. package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-LPXSVP67.js} +1 -1
  11. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
  12. package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
  13. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
  14. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
  15. package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-DtHT3sCo.js} +1 -1
  16. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
  17. package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
  18. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
  19. package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
  20. package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
  21. package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
  22. package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
  23. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
  24. package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
  25. package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
  26. package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-CfTupTEl.js} +1 -1
  27. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
  28. package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
  29. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
  30. package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
  31. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
  32. package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-Cchnc4Ug.js} +1 -1
  33. package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-gkEp4y__.js} +1 -1
  34. package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CUkjnoVk.js} +1 -1
  35. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
  36. package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
  37. package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
  38. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
  39. package/dist/client/assets/Canvas-X9pVSkw3.js +1 -0
  40. package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-BXUtPAGC.js} +1 -1
  41. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
  42. package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
  43. package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
  44. package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +1 -0
  45. package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
  46. package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
  47. package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
  48. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
  49. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
  50. package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
  51. package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
  52. package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-DuQRwpgK.js} +1 -1
  53. package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
  54. package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-BXyKeL5T.js} +1 -1
  55. package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-THp0r_U8.js} +1 -1
  56. package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-BVmSMV2V.js} +1 -1
  57. package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
  58. package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
  59. package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BUoRbu9o.js} +1 -1
  60. package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
  61. package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
  62. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
  63. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
  64. package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js} +2 -2
  65. package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
  66. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
  67. package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
  68. package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
  69. package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
  70. package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dhryjx2c.js} +1 -1
  71. package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
  72. package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
  73. package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
  74. package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-aH-jCyDq.js} +1 -1
  75. package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-66uQAorV.js} +1 -1
  76. package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
  77. package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
  78. package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CZlrHXy-.js} +1 -1
  79. package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-BAO6mtjD.js} +1 -1
  80. package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
  81. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
  82. package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-2_NVPQor.js} +1 -1
  83. package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
  84. package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
  85. package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-VFzA6Kxc.js} +1 -1
  86. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
  87. package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-BeHDejWz.js} +1 -1
  88. package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
  89. package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CFfkIbc6.js} +1 -1
  90. package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
  91. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
  92. package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-_t7yM8vX.js} +2 -2
  93. package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-DouPyNmz.js} +1 -1
  94. package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-CnM1i8hW.js} +1 -1
  95. package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
  96. package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
  97. package/dist/client/assets/JumpPalette-O1aJE9gR.js +1 -0
  98. package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
  99. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
  100. package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-CJa110yk.js} +1 -1
  101. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
  102. package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
  103. package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-DWZHYh1A.js} +2 -2
  104. package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
  105. package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
  106. package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BVvtqI8q.js} +2 -2
  107. package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
  108. package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
  109. package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-D62-Wis8.js} +1 -1
  110. package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
  111. package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
  112. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
  113. package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-B19lYSY9.js} +1 -1
  114. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
  115. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
  116. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
  117. package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-Bh-L-emz.js} +1 -1
  118. package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
  119. package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-DFbF_XvR.js} +1 -1
  120. package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-CElOEpCh.js} +1 -1
  121. package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-B-jjHf1c.js} +1 -1
  122. package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
  123. package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-PFnG_10h.js} +2 -2
  124. package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
  125. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
  126. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
  127. package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
  128. package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
  129. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
  130. package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
  131. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
  132. package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
  133. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
  134. package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
  135. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
  136. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
  137. package/dist/client/assets/Provider-C35yu29I.js +5 -0
  138. package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-BjmWK420.js} +1 -1
  139. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
  140. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
  141. package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
  142. package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-348f17bW.js} +1 -1
  143. package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-CBnAM3ui.js} +1 -1
  144. package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DyRPfNFx.js} +1 -1
  145. package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
  146. package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
  147. package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
  148. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
  149. package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-uMCpt0e9.js} +2 -2
  150. package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
  151. package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-CNDhZhgD.js} +1 -1
  152. package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
  153. package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-3_25USO_.js} +1 -1
  154. package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
  155. package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-D7dbV2qo.js} +1 -1
  156. package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
  157. package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
  158. package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
  159. package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
  160. package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
  161. package/dist/client/assets/SessionObserve-DXxBvejJ.js +12 -0
  162. package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
  163. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
  164. package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
  165. package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
  166. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
  167. package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
  168. package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
  169. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
  170. package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-CRtTYkMj.js} +1 -1
  171. package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-_CHAQdOa.js} +1 -1
  172. package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
  173. package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-CpZWf54-.js} +1 -1
  174. package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-BSiTS4en.js} +1 -1
  175. package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-2gCP6H7A.js} +1 -1
  176. package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-CYSijNTy.js} +2 -2
  177. package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
  178. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
  179. package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
  180. package/dist/client/assets/TerminalRelay-DrikpUSJ.js +46 -0
  181. package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
  182. package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-CXFeweMg.js} +1 -1
  183. package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
  184. package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
  185. package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
  186. package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
  187. package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
  188. package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
  189. package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
  190. package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-vNt01sDd.js} +1 -1
  191. package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-BDkR7Edq.js} +1 -1
  192. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
  193. package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-CIIlutQq.js} +1 -1
  194. package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
  195. package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-Jm2Z6dfW.js} +1 -1
  196. package/dist/client/assets/{activity-CSUhvjD0.js → activity-CIlFrfPJ.js} +1 -1
  197. package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-dFpj9Kfq.js} +1 -1
  198. package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-BFCGRtGh.js} +1 -1
  199. package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-BGGvT5G6.js} +1 -1
  200. package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
  201. package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
  202. package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
  203. package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
  204. package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
  205. package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
  206. package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-DDc7mLCW.js} +1 -1
  207. package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
  208. package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
  209. package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
  210. package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-C1SQHJ3k.js} +1 -1
  211. package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-MVUKauwQ.js} +1 -1
  212. package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-Bp-FpE5V.js} +1 -1
  213. package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-BPedAgxO.js} +1 -1
  214. package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-CV98WMSp.js} +1 -1
  215. package/dist/client/assets/{bot-CfN9PSBF.js → bot-B4zLQ4IN.js} +1 -1
  216. package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
  217. package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
  218. package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
  219. package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
  220. package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
  221. package/dist/client/assets/{check-B8dMv3Is.js → check-lrJ3a73a.js} +1 -1
  222. package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-l1mrh5S9.js} +1 -1
  223. package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DrfqcerI.js} +1 -1
  224. package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-CETZJzjV.js} +1 -1
  225. package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
  226. package/dist/client/assets/{clock-DFcRbtrl.js → clock-BV1aqPkK.js} +1 -1
  227. package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-BhcNbLWU.js} +1 -1
  228. package/dist/client/assets/{coffee-C_D9zooM.js → coffee-D7EAOdCk.js} +1 -1
  229. package/dist/client/assets/{compass-DTZdCpv9.js → compass-63TUaz5_.js} +1 -1
  230. package/dist/client/assets/content-B1lgE8qr.js +1 -0
  231. package/dist/client/assets/content-B5l11YyQ.js +1 -0
  232. package/dist/client/assets/content-BNZOZEpX.js +1 -0
  233. package/dist/client/assets/content-BRIxP155.js +1 -0
  234. package/dist/client/assets/content-BWd8gt8L.js +1 -0
  235. package/dist/client/assets/content-BfwS2jAK.js +1 -0
  236. package/dist/client/assets/content-C4p43_eT.js +1 -0
  237. package/dist/client/assets/content-CdYfaoDV.js +1 -0
  238. package/dist/client/assets/content-CzldLxw0.js +1 -0
  239. package/dist/client/assets/content-D-olnc4U.js +1 -0
  240. package/dist/client/assets/content-DTioimq4.js +1 -0
  241. package/dist/client/assets/content-LOebm3_d.js +1 -0
  242. package/dist/client/assets/content-nGlEZhUI.js +1 -0
  243. package/dist/client/assets/content-oyzDM-LK.js +1 -0
  244. package/dist/client/assets/content-x1PHxED7.js +1 -0
  245. package/dist/client/assets/content-zX3ZY3T9.js +1 -0
  246. package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
  247. package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-Tqba2d56.js} +1 -1
  248. package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
  249. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
  250. package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
  251. package/dist/client/assets/{copy-D9WUpQRf.js → copy-xKeM5ZtU.js} +1 -1
  252. package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-BOTa_WLr.js} +1 -1
  253. package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-zZ8Hx7er.js} +1 -1
  254. package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
  255. package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
  256. package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
  257. package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
  258. package/dist/client/assets/discover-DJFxyV1k.js +2 -0
  259. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
  260. package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-CUObqmgX.js} +1 -1
  261. package/dist/client/assets/{eye-CtqSV8BS.js → eye-LrO-cXQt.js} +1 -1
  262. package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-CsU7jJpu.js} +1 -1
  263. package/dist/client/assets/{file-text-ChtICwub.js → file-text-CnISiiw6.js} +1 -1
  264. package/dist/client/assets/{flag-CqdOxVkI.js → flag-C4wl8z2-.js} +1 -1
  265. package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
  266. package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
  267. package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
  268. package/dist/client/assets/{folder-0fWevPvQ.js → folder-D5prSkzz.js} +1 -1
  269. package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-D9_5iJEm.js} +1 -1
  270. package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-QZub3Ot9.js} +1 -1
  271. package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-B0_fPLO7.js} +1 -1
  272. package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-DicR7sUf.js} +1 -1
  273. package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
  274. package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
  275. package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
  276. package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
  277. package/dist/client/assets/index-724SdE6r.js +1 -0
  278. package/dist/client/assets/{index-CvsM3jm8.js → index-CHD0qcfL.js} +1 -1
  279. package/dist/client/assets/index-CN4rBB_s.css +1 -0
  280. package/dist/client/assets/index-D1d98iYf.js +1 -0
  281. package/dist/client/assets/index-EsrkGBcv.js +10 -0
  282. package/dist/client/assets/index-gGHPA-By.js +1 -0
  283. package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-BkgUDn6G.js} +2 -2
  284. package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-DDHegDbx.js} +1 -1
  285. package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
  286. package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
  287. package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-D-RSWjb-.js} +1 -1
  288. package/dist/client/assets/{layers-Bolb8ejU.js → layers-C8PDiMul.js} +1 -1
  289. package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-Cor2frzj.js} +1 -1
  290. package/dist/client/assets/left-Bn5X7x2o.js +2 -0
  291. package/dist/client/assets/left-BqS0fYX1.js +1 -0
  292. package/dist/client/assets/left-CTCeeeD3.js +1 -0
  293. package/dist/client/assets/left-DhtVPVux.js +1 -0
  294. package/dist/client/assets/left-K39b-Wvx.js +2 -0
  295. package/dist/client/assets/left-KGmueNPt.js +1 -0
  296. package/dist/client/assets/left-P_GOYB-s.js +1 -0
  297. package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
  298. package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
  299. package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
  300. package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
  301. package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
  302. package/dist/client/assets/library-CkWNPHRp.js +1 -0
  303. package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-OvccU82H.js} +1 -1
  304. package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-BqnoxJrq.js} +1 -1
  305. package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
  306. package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-DxcqCLmd.js} +1 -1
  307. package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
  308. package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-ByUvhS-v.js} +1 -1
  309. package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-CiZ8xSAx.js} +1 -1
  310. package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-DZvJC4KU.js} +1 -1
  311. package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-CxRVKNE-.js} +1 -1
  312. package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
  313. package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
  314. package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-BxesYglW.js} +1 -1
  315. package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
  316. package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-elEEsIvb.js} +1 -1
  317. package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
  318. package/dist/client/assets/monitor-DTTYEb73.js +1 -0
  319. package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-uorRqFxf.js} +1 -1
  320. package/dist/client/assets/{observe-CkfOxYx_.js → observe-BJqERJVj.js} +1 -1
  321. package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
  322. package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-BswZLqvA.js} +1 -1
  323. package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-Bv7sP_fc.js} +1 -1
  324. package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
  325. package/dist/client/assets/{pause-DWS7YGQ3.js → pause-C2XTlkjs.js} +1 -1
  326. package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-KRk_yb0q.js} +1 -1
  327. package/dist/client/assets/{pin-DWlD1BOF.js → pin-C2mFOV1l.js} +1 -1
  328. package/dist/client/assets/{play-D_Pggug4.js → play-FT6K3It1.js} +1 -1
  329. package/dist/client/assets/{plus-D_wLGJGT.js → plus-DFDDeGKu.js} +1 -1
  330. package/dist/client/assets/profile-DTmzN16I.js +1 -0
  331. package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-C0FUCv_p.js} +1 -1
  332. package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
  333. package/dist/client/assets/provider-Dojd8quC.js +1 -0
  334. package/dist/client/assets/{proxy-DOG46ja4.js → proxy-AJsmwA6h.js} +1 -1
  335. package/dist/client/assets/{radio-C_jtwbFP.js → radio-DRoOZsws.js} +1 -1
  336. package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-BmVr7sCD.js} +1 -1
  337. package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
  338. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
  339. package/dist/client/assets/right-49kO-6nD.js +1 -0
  340. package/dist/client/assets/right-APtItA8A.js +1 -0
  341. package/dist/client/assets/right-BJwhPqtn.js +1 -0
  342. package/dist/client/assets/right-BPqrf4ek.js +1 -0
  343. package/dist/client/assets/right-D7djOy6K.js +1 -0
  344. package/dist/client/assets/right-DKOUCRob.js +1 -0
  345. package/dist/client/assets/right-DMNrVzg7.js +1 -0
  346. package/dist/client/assets/{right-BLJsc2-p.js → right-DWPVB-nK.js} +1 -1
  347. package/dist/client/assets/right-DppeMCy4.js +1 -0
  348. package/dist/client/assets/right-GAL5Mw1v.js +1 -0
  349. package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-CGl4RTV7.js} +1 -1
  350. package/dist/client/assets/router-DCtl8wqb.js +1 -0
  351. package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
  352. package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-RUWwCVAr.js} +1 -1
  353. package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
  354. package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
  355. package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-DNjxhyO2.js} +1 -1
  356. package/dist/client/assets/{search-C4VlW_0l.js → search-DT42oyRW.js} +1 -1
  357. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
  358. package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
  359. package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-x3wFUjxj.js} +1 -1
  360. package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-CH0-fbZE.js} +1 -1
  361. package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
  362. package/dist/client/assets/{server-ms1yxUYJ.js → server-QfsgMLk1.js} +1 -1
  363. package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CvSdPHPe.js} +1 -1
  364. package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
  365. package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
  366. package/dist/client/assets/{session-table-CDx_16xf.js → session-table-L-pns6Zl.js} +1 -1
  367. package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Dc-QAa7O.js} +1 -1
  368. package/dist/client/assets/{settings-TJIkkZ0P.js → settings-BVh7kldq.js} +1 -1
  369. package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
  370. package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-782VC_yy.js} +1 -1
  371. package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-BjHq_DNK.js} +1 -1
  372. package/dist/client/assets/{sse-v5QLsOHV.js → sse-BCPRocpq.js} +1 -1
  373. package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
  374. package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-d0yAYxR0.js} +1 -1
  375. package/dist/client/assets/{terminal-96JWDYDL.js → terminal-hQKQygcf.js} +1 -1
  376. package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-Bxs1hp-j.js} +1 -1
  377. package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
  378. package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-Ay5C2c-M.js} +1 -1
  379. package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
  380. package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
  381. package/dist/client/assets/use-beside-DoRC1nt0.js +1 -0
  382. package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-CY4JciOV.js} +1 -1
  383. package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
  384. package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-BvaqtODo.js} +1 -1
  385. package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
  386. package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-3gMYZNIp.js} +1 -1
  387. package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +1 -0
  388. package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-BANmpjMh.js} +1 -1
  389. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
  390. package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
  391. package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
  392. package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
  393. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
  394. package/dist/client/assets/users-BUjx36gx.js +1 -0
  395. package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
  396. package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
  397. package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
  398. package/dist/client/assets/{wrench-BsMTSeji.js → wrench-DR0i5BU7.js} +1 -1
  399. package/dist/client/assets/{x-DI1ktCYb.js → x-DAehov0E.js} +1 -1
  400. package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-BXQiLVnI.js} +1 -1
  401. package/dist/client/assets/{zap-sKPkh4sQ.js → zap-CEjZNZbI.js} +1 -1
  402. package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
  403. package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
  404. package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
  405. package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
  406. package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
  407. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  408. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  409. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  410. package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
  411. package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
  412. package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
  413. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  414. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  415. package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
  416. package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
  417. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  418. package/dist/client/index.html +15 -3
  419. package/dist/drizzle/0019_session_actor_targets.sql +227 -0
  420. package/dist/drizzle/0020_message_reactions.sql +11 -0
  421. package/dist/drizzle/README.md +19 -0
  422. package/dist/drizzle/meta/_journal.json +14 -0
  423. package/dist/highlights-eq9cgrbb.scm +604 -0
  424. package/dist/highlights-ghv9g403.scm +205 -0
  425. package/dist/highlights-hk7bwhj4.scm +284 -0
  426. package/dist/highlights-r812a2qc.scm +150 -0
  427. package/dist/highlights-x6tmsnaa.scm +115 -0
  428. package/dist/injections-73j83es3.scm +27 -0
  429. package/dist/main.mjs +1721 -837
  430. package/dist/node/main.mjs +264 -39
  431. package/dist/pairing-runtime-controller.mjs +1090 -570
  432. package/dist/runtime/base-daemon.mjs +14272 -61
  433. package/dist/runtime/broker-daemon.mjs +16999 -1243
  434. package/dist/runtime/broker-process-manager.mjs +101 -6
  435. package/dist/runtime/mesh-discover.mjs +101 -6
  436. package/dist/scout-control-plane-web.mjs +27057 -6178
  437. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  438. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  439. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  440. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  441. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  442. package/dist/update-helper.mjs +294 -56
  443. package/package.json +2 -2
  444. package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
  445. package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
  446. package/dist/client/assets/AgentAvatar-BIwg54Tj.js +0 -1
  447. package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
  448. package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
  449. package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
  450. package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
  451. package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
  452. package/dist/client/assets/AgentLanesView-aAyC7lHf.js +0 -2
  453. package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
  454. package/dist/client/assets/AgentSessions-Cox2zS-e.js +0 -6
  455. package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
  456. package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
  457. package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
  458. package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
  459. package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
  460. package/dist/client/assets/ConversationComposer-B7RU6LKd.js +0 -1
  461. package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
  462. package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
  463. package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
  464. package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
  465. package/dist/client/assets/ConversationStatus-CK-YfLpi.js +0 -1
  466. package/dist/client/assets/CrewAvatar-CJhuqTsJ.js +0 -1
  467. package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
  468. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
  469. package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
  470. package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
  471. package/dist/client/assets/FloorTacticalHUD-Bngao6sn.js +0 -1
  472. package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
  473. package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
  474. package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
  475. package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
  476. package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
  477. package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
  478. package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
  479. package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
  480. package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
  481. package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
  482. package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
  483. package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
  484. package/dist/client/assets/ObserveEmbedScreen-BPiSXXvm.js +0 -2
  485. package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
  486. package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
  487. package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
  488. package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
  489. package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
  490. package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
  491. package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
  492. package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
  493. package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
  494. package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
  495. package/dist/client/assets/Provider-5Hotn7NQ.js +0 -5
  496. package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
  497. package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
  498. package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
  499. package/dist/client/assets/SessionObserve-DaqDhqDI.js +0 -12
  500. package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +0 -1
  501. package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
  502. package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
  503. package/dist/client/assets/SettingsDrawer-BDapR4E9.js +0 -3
  504. package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
  505. package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
  506. package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
  507. package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
  508. package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
  509. package/dist/client/assets/WorkDetailScreen-CwtRCm_-.js +0 -5
  510. package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
  511. package/dist/client/assets/WorldMinimap-Blqg0d5r.js +0 -1
  512. package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
  513. package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
  514. package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
  515. package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
  516. package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
  517. package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
  518. package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
  519. package/dist/client/assets/content-B5Q4pb9R.js +0 -1
  520. package/dist/client/assets/content-BK1IfOZs.js +0 -1
  521. package/dist/client/assets/content-BeEsWLEm.js +0 -1
  522. package/dist/client/assets/content-BkOwEknW.js +0 -1
  523. package/dist/client/assets/content-C32W5kAG.js +0 -1
  524. package/dist/client/assets/content-CoqyLs9v.js +0 -1
  525. package/dist/client/assets/content-CwpdIS5b.js +0 -1
  526. package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
  527. package/dist/client/assets/content-DXKaPDfn.js +0 -1
  528. package/dist/client/assets/content-DZt5-dkI.js +0 -1
  529. package/dist/client/assets/content-DbQJH8L1.js +0 -1
  530. package/dist/client/assets/content-DetoiaHq.js +0 -1
  531. package/dist/client/assets/content-Dhu3wL7J.js +0 -1
  532. package/dist/client/assets/content-Dpv34iZu.js +0 -1
  533. package/dist/client/assets/content-TtQJb61D.js +0 -1
  534. package/dist/client/assets/content-ymNb2R7g.js +0 -1
  535. package/dist/client/assets/conversation-model-BGFHoxQ0.js +0 -1
  536. package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
  537. package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
  538. package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
  539. package/dist/client/assets/discover-C8IOY7_K.js +0 -2
  540. package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
  541. package/dist/client/assets/home-moving-signal-B7m-ngb2.js +0 -1
  542. package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
  543. package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
  544. package/dist/client/assets/index-C5cX8dkl.js +0 -1
  545. package/dist/client/assets/index-C8uS5szO.js +0 -10
  546. package/dist/client/assets/index-Ck1__1yL.css +0 -1
  547. package/dist/client/assets/index-ClOOrVG1.js +0 -1
  548. package/dist/client/assets/index-Crtgfc9I.js +0 -1
  549. package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
  550. package/dist/client/assets/left-B-_z_nqj.js +0 -2
  551. package/dist/client/assets/left-B1LY7rJc.js +0 -1
  552. package/dist/client/assets/left-C6bdjWcG.js +0 -2
  553. package/dist/client/assets/left-CF4iuqlz.js +0 -1
  554. package/dist/client/assets/left-DLtNyZl1.js +0 -1
  555. package/dist/client/assets/left-Fpxoq-VY.js +0 -1
  556. package/dist/client/assets/left-N2wXfTlp.js +0 -1
  557. package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
  558. package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
  559. package/dist/client/assets/left-default-08gmdCtb.js +0 -1
  560. package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
  561. package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
  562. package/dist/client/assets/library-DLKBVUJ6.js +0 -1
  563. package/dist/client/assets/message-markup-DgFSyb3f.js +0 -15
  564. package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
  565. package/dist/client/assets/profile-C3KgiZvc.js +0 -1
  566. package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
  567. package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
  568. package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
  569. package/dist/client/assets/right-B9OUA6Ho.js +0 -1
  570. package/dist/client/assets/right-BDQnjetX.js +0 -1
  571. package/dist/client/assets/right-BUbKHmRH.js +0 -1
  572. package/dist/client/assets/right-Ci2IcD4s.js +0 -1
  573. package/dist/client/assets/right-CmCce3e5.js +0 -1
  574. package/dist/client/assets/right-D7w0zM5a.js +0 -1
  575. package/dist/client/assets/right-DIoON_bv.js +0 -1
  576. package/dist/client/assets/right-E0Jr3VN5.js +0 -1
  577. package/dist/client/assets/right-lCdAk9dW.js +0 -1
  578. package/dist/client/assets/router-BKiMcYa7.js +0 -1
  579. package/dist/client/assets/runtime-picker-DdsttHHc.js +0 -1
  580. package/dist/client/assets/scout-voice-DOQ_B77g.js +0 -1
  581. package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
  582. package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
  583. package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
  584. package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
  585. package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
  586. package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
  587. package/dist/drizzle/meta/0000_snapshot.json +0 -4575
  588. package/dist/drizzle/meta/0001_snapshot.json +0 -4624
  589. package/dist/drizzle/meta/0002_snapshot.json +0 -4631
  590. package/dist/drizzle/meta/0003_snapshot.json +0 -4952
  591. package/dist/drizzle/meta/0004_snapshot.json +0 -5235
  592. package/dist/drizzle/meta/0005_snapshot.json +0 -5599
  593. package/dist/drizzle/meta/0006_snapshot.json +0 -5606
  594. package/dist/drizzle/meta/0007_snapshot.json +0 -5767
  595. package/dist/drizzle/meta/0008_snapshot.json +0 -5774
  596. package/dist/drizzle/meta/0009_snapshot.json +0 -6262
  597. package/dist/drizzle/meta/0010_snapshot.json +0 -6286
  598. package/dist/drizzle/meta/0011_snapshot.json +0 -6337
  599. package/dist/drizzle/meta/0012_snapshot.json +0 -6458
  600. package/dist/drizzle/meta/0013_snapshot.json +0 -6465
  601. package/dist/drizzle/meta/0014_snapshot.json +0 -6503
  602. package/dist/drizzle/meta/0015_snapshot.json +0 -6596
  603. package/dist/drizzle/meta/0016_snapshot.json +0 -6611
  604. package/dist/drizzle/meta/0017_snapshot.json +0 -6785
  605. package/dist/drizzle/meta/0018_snapshot.json +0 -6804
@@ -1 +1 @@
1
- import{r as f,j as r}from"./index-C8uS5szO.js";import{a as y}from"./api-CaROe5_H.js";import{i as j}from"./scoutbot-Bk3nyrkj.js";import{u as S}from"./sse-v5QLsOHV.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-DurUYl7E.js";import{A as L}from"./arrow-up-right-Hn754ybA.js";import"./index-BWHgHrtv.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-DkjnzvcJ.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
+ import{r as f,j as r}from"./index-EsrkGBcv.js";import{a as y}from"./api-DSqpVKC7.js";import{i as j}from"./scoutbot-Bk3nyrkj.js";import{u as S}from"./sse-BCPRocpq.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-OvccU82H.js";import{A as L}from"./arrow-up-right-BPedAgxO.js";import"./index-BWHgHrtv.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-zZ8Hx7er.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 +1 @@
1
- import{c as h}from"./createLucideIcon-DkjnzvcJ.js";import{r,j as e}from"./index-C8uS5szO.js";import{T as _}from"./TextDocumentSurface-BhYvAB0o.js";import{F as R}from"./file-text-ChtICwub.js";import{X as S}from"./x-DI1ktCYb.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
+ import{c as h}from"./createLucideIcon-zZ8Hx7er.js";import{r,j as e}from"./index-EsrkGBcv.js";import{T as _}from"./TextDocumentSurface-D52m7Vd8.js";import{F as R}from"./file-text-CnISiiw6.js";import{X as S}from"./x-DAehov0E.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 +1 @@
1
- import{r as l,j as e}from"./index-C8uS5szO.js";import{l as c}from"./discover-C8IOY7_K.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
+ import{r as l,j as e}from"./index-EsrkGBcv.js";import{l as c}from"./discover-DJFxyV1k.js";import"./types-B0PlfpKc.js";function n(){const[r,a]=l.useState([]);return l.useEffect(()=>{let s=!1;return c().then(d=>{s||a(d)}),()=>{s=!0}},[]),e.jsxs("div",{className:"s-embeddable-surfaces-lab","data-scout-theme":!0,children:[e.jsxs("header",{className:"s-embeddable-surfaces-lab__header",children:[e.jsx("h1",{children:"Embeddable surfaces"}),e.jsxs("p",{children:["Screens that exported ",e.jsx("code",{children:"scoutSurface.embed"})," and were discovered from"," ",e.jsx("code",{children:"client/screens/**"}),". No separate embed registry file — parity comes from the screen declaration."]})]}),e.jsxs("table",{className:"s-embeddable-surfaces-lab__table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"ID"}),e.jsx("th",{children:"Label"}),e.jsx("th",{children:"Web"}),e.jsx("th",{children:"Embed"}),e.jsx("th",{children:"Profile"}),e.jsx("th",{children:"Module"})]})}),e.jsx("tbody",{children:r.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:s.id})}),e.jsx("td",{children:s.label}),e.jsx("td",{children:e.jsx("a",{href:s.webPath,children:s.webPath})}),e.jsxs("td",{children:[e.jsx("div",{children:e.jsx("a",{href:s.embedPath,children:s.embedPath})}),s.embedAliases.length>0&&e.jsx("div",{className:"s-embeddable-surfaces-lab__aliases",children:s.embedAliases.map(d=>e.jsx("a",{href:d,children:d},d))})]}),e.jsx("td",{children:e.jsx("code",{children:s.profile})}),e.jsx("td",{children:e.jsx("code",{children:s.modulePath.replace("../","")})})]},s.id))})]}),r.length===0&&e.jsx("p",{className:"s-embeddable-surfaces-lab__empty",children:"No embeddable screens discovered yet."})]})}export{n as EmbeddableSurfacesLab};
@@ -1 +1 @@
1
- import{j as e}from"./index-C8uS5szO.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
+ import{j as e}from"./index-EsrkGBcv.js";function c({title:n,body:s,icon:i,action:t,className:a}){const l=a?`sys-panel sys-state-card ${a}`:"sys-panel sys-state-card";return e.jsxs("div",{className:l,children:[i,e.jsx("h3",{className:"sys-state-title",children:n}),s!=null&&(typeof s=="string"?e.jsx("p",{className:"sys-state-body",children:s}):s),t&&e.jsx("div",{className:"sys-inline-actions",children:t})]})}export{c as E};
@@ -1,3 +1,3 @@
1
- import{r as n,j as t}from"./index-C8uS5szO.js";import{T as b,c as j}from"./TextDocumentSurface-BhYvAB0o.js";import{a as N}from"./api-CaROe5_H.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}
1
+ import{r as n,j as t}from"./index-EsrkGBcv.js";import{T as b,c as j}from"./TextDocumentSurface-D52m7Vd8.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
2
 
3
3
  — excerpt —`:a,readOnly:!0})}function y({artifact:e,onOpen:a,onReveal:u,onBrowse:o}){const[s,l]=n.useState(e.excerpt),[c,i]=n.useState(!0),[w,h]=n.useState(!1),[m,p]=n.useState(null);n.useEffect(()=>{l(e.excerpt),i(!0),p(null);let d=!1;return h(!0),N(`/api/file/preview?path=${encodeURIComponent(e.absolutePath)}`).then(r=>{if(!d)if(r.kind==="file"&&r.previewable){const x=r;l(x.content),i(x.truncated)}else e.excerpt?(l(e.excerpt),i(!0)):(l(null),p("Preview not available for this file type."))}).catch(r=>{d||(e.excerpt?(l(e.excerpt),i(!0)):p(r instanceof Error?r.message:"Could not load file."))}).finally(()=>{d||h(!1)}),()=>{d=!0}},[e.absolutePath,e.excerpt]);const v=n.useMemo(()=>s?V(e,s,c):null,[e,s,c]),P=e.relativePath.endsWith(".md")||e.relativePath.endsWith(".mdx");return t.jsxs(t.Fragment,{children:[t.jsxs("header",{className:"av2-repoViewerHead",children:[t.jsxs("div",{className:"av2-repoViewerPath",children:[t.jsx("span",{className:"av2-repoViewerPathFile",children:e.relativePath}),t.jsx("span",{className:"av2-repoViewerPathAbs",title:e.absolutePath,children:e.absolutePath})]}),t.jsxs("div",{className:"av2-repoViewerActs",children:[t.jsx("button",{type:"button",className:"av2-repoViewerAct","data-primary":!0,onClick:()=>a(e.absolutePath),children:"open"}),o?t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>o(e.absolutePath),children:"browse"}):null,t.jsx("button",{type:"button",className:"av2-repoViewerAct",onClick:()=>{u(e.absolutePath)},children:"reveal"})]})]}),t.jsxs("div",{className:"av2-repoViewerBody",children:[w&&!s?t.jsx("div",{className:"av2-repoViewerState",children:"Loading file…"}):m&&!s?t.jsx("div",{className:"av2-repoViewerState av2-repoViewerState--error",children:m}):v?t.jsx(b,{document:v,mode:P?"preview":"read",className:"av2-repoViewerDoc"}):t.jsx("div",{className:"av2-repoViewerState",children:"No content."}),c?t.jsx("div",{className:"av2-repoViewerNotice",children:"Showing excerpt — use open for the full file."}):null]})]})}export{y as FileViewerPane};
@@ -0,0 +1 @@
1
+ import{r as n,j as r}from"./index-EsrkGBcv.js";import{s as l,g as s,a as o}from"./session-recap-queue-41l2XVkI.js";/* empty css */import"./api-DSqpVKC7.js";import"./scout-voice-CZx60X6E.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};
@@ -0,0 +1 @@
1
+ import{r as m,j as s}from"./index-EsrkGBcv.js";import{a as k}from"./api-DSqpVKC7.js";import{u as R}from"./sse-BCPRocpq.js";import{d as $,t as F}from"./time-Dhsh_2EG.js";import{SessionRefScreen as I}from"./SessionRefScreen-DqLSUlCE.js";/* empty css */import{c as E}from"./createLucideIcon-zZ8Hx7er.js";import{X as A}from"./x-DAehov0E.js";import"./index-BWHgHrtv.js";import"./tail-events-d0yAYxR0.js";import"./BackToPicker-CUkjnoVk.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./ConversationScreen-CUfsQ4MR.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./ComposerAttachments-DW0AIb8k.js";import"./machine-scope-DJt9RZ2w.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-ksPazAKH.js";import"./AgentAvatar-CrP1eXxk.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-C-ZWscKj.js";import"./AstronautSuit-Cchnc4Ug.js";import"./panel-right-Bv7sP_fc.js";import"./CommsFlowGraph-DxoOaLF_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-THp0r_U8.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Vi8ziCPg.js";import"./CommsSelection-BUoRbu9o.js";/* empty css */import"./use-conversation-list-CY4JciOV.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DoRC1nt0.js";import"./ConversationComposer-CUQyArlk.js";import"./zap-CEjZNZbI.js";import"./ConversationFeedRows-DWiOfT-y.js";import"./ConversationPanels-D9oC0xG5.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./activity-CIlFrfPJ.js";import"./message-circle-CxRVKNE-.js";import"./ConversationStatus--IPm2nGh.js";import"./check-lrJ3a73a.js";import"./sparkles-BjHq_DNK.js";import"./triangle-alert-CHoRGdVO.js";import"./SessionContextStrip-CXfs9hUD.js";import"./SessionObserve-DXxBvejJ.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-CJa110yk.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-E6VJZrE0.js";import"./external-link-CUObqmgX.js";import"./ObservedTopologyPanel-CUTIoLZJ.js";import"./ObserveTextFlow-PFnG_10h.js";import"./SessionObserveEvidence-Cuj_KHxR.js";import"./wrench-DR0i5BU7.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 Ue({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{Ue as FlightObserveScreen};
@@ -1 +1 @@
1
- import{j as s}from"./index-C8uS5szO.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-BW1JzkDt.js";import{f as q}from"./floor-context-model-DZBpo_oD.js";import{t as E}from"./time-Dhsh_2EG.js";import{f as b}from"./agent-floor-actor-3v9drnxh.js";import{l as d}from"./agent-lanes-model-CX0wTcnF.js";import{b as M,a as I,l as B}from"./agent-lane-detail-Db7KyAlf.js";/* empty css */import{R as U}from"./radio-C_jtwbFP.js";import{F as g}from"./file-code-corner-D_Aptal2.js";import{T as y}from"./terminal-96JWDYDL.js";import{C as W}from"./coffee-C_D9zooM.js";import{X}from"./x-DI1ktCYb.js";import{A as _}from"./arrow-up-right-Hn754ybA.js";import"./agent-state-DDhnFEEP.js";import"./lane-observe-BD21P8BB.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";import"./terminal-sessions-Ch9aYlgi.js";import"./api-CaROe5_H.js";import"./createLucideIcon-DkjnzvcJ.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
+ import{j as s}from"./index-EsrkGBcv.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-CpZWf54-.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-DRoOZsws.js";import{F as g}from"./file-code-corner-CsU7jJpu.js";import{T as y}from"./terminal-hQKQygcf.js";import{C as W}from"./coffee-D7EAOdCk.js";import{X}from"./x-DAehov0E.js";import{A as _}from"./arrow-up-right-BPedAgxO.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-zZ8Hx7er.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 +1 @@
1
- import{r as a,j as t}from"./index-C8uS5szO.js";import{f as T}from"./floor-character-name-CqJPOlXb.js";import{a as D}from"./floor-message-passes-CJh9f8Jp.js";import{f as I}from"./floor-preview-text-HrORUJ7D.js";import{b as F}from"./shared-work-artifacts-4IIQXQfc.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
+ import{r as a,j as t}from"./index-EsrkGBcv.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 +1 @@
1
- import{r as m,j as a}from"./index-C8uS5szO.js";import{f as j,F as $}from"./floor-message-passes-CJh9f8Jp.js";import"./lane-observe-BD21P8BB.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
+ import{r as m,j as a}from"./index-EsrkGBcv.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 +1 @@
1
- import{r,j as e}from"./index-C8uS5szO.js";import{f as z}from"./agent-floor-actor-3v9drnxh.js";import{AgentFloorWorld as D}from"./AgentFloorWorld-BDJmXl3C.js";import{o as O}from"./lane-observe-BD21P8BB.js";import{f as A}from"./floor-context-model-DZBpo_oD.js";import{l as C}from"./agent-lanes-model-CX0wTcnF.js";/* empty css */import"./agent-state-DDhnFEEP.js";import"./SpriteAvatar-BW1JzkDt.js";/* empty css */import"./agent-floor-world-layout-hfMjuoui.js";import"./coffee-C_D9zooM.js";import"./createLucideIcon-DkjnzvcJ.js";import"./terminal-96JWDYDL.js";import"./radio-C_jtwbFP.js";import"./file-code-corner-D_Aptal2.js";import"./git-branch-CA3cHKCI.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";import"./terminal-sessions-Ch9aYlgi.js";import"./api-CaROe5_H.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
+ import{r,j as e}from"./index-EsrkGBcv.js";import{f as z}from"./agent-floor-actor-DW8zLht0.js";import{AgentFloorWorld as D}from"./AgentFloorWorld-CjoIa6jA.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-CpZWf54-.js";/* empty css */import"./agent-floor-world-layout-hfMjuoui.js";import"./coffee-D7EAOdCk.js";import"./createLucideIcon-zZ8Hx7er.js";import"./terminal-hQKQygcf.js";import"./radio-DRoOZsws.js";import"./file-code-corner-CsU7jJpu.js";import"./git-branch-B0_fPLO7.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};
@@ -0,0 +1 @@
1
+ import{r as n,j as s}from"./index-EsrkGBcv.js";import{b as O}from"./shared-work-artifacts-DfNl9KTo.js";import{u as E}from"./Provider-C35yu29I.js";import{a as R}from"./router-DCtl8wqb.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-CsU7jJpu.js";import{G as C}from"./git-branch-B0_fPLO7.js";import{T as z}from"./terminal-hQKQygcf.js";import{X as G}from"./x-DAehov0E.js";import{A as m}from"./arrow-up-right-BPedAgxO.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./api-DSqpVKC7.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.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 Qe({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{Qe as FloorResourcesSheet};
@@ -1 +1 @@
1
- import{r as p,j as e}from"./index-C8uS5szO.js";import{l as h}from"./agent-lanes-model-CX0wTcnF.js";import{P as x}from"./pin-DWlD1BOF.js";import{X as v}from"./x-DI1ktCYb.js";import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";import"./terminal-sessions-Ch9aYlgi.js";import"./api-CaROe5_H.js";import"./lane-observe-BD21P8BB.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./createLucideIcon-DkjnzvcJ.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};
1
+ import{r as p,j as e}from"./index-EsrkGBcv.js";import{l as h}from"./agent-lanes-model-DMAdqCmK.js";import{P as x}from"./pin-C2mFOV1l.js";import{X as v}from"./x-DAehov0E.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-zZ8Hx7er.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};
@@ -0,0 +1 @@
1
+ import{r as j,j as t}from"./index-EsrkGBcv.js";import{FloorSavedWork as z}from"./FloorSavedWork-BeHDejWz.js";import{f as d}from"./agent-floor-actor-DW8zLht0.js";import{b as y,F as _,a as b,f as M}from"./agent-floor-world-layout-hfMjuoui.js";import{f as F}from"./floor-context-model-rWKqaKmV.js";import{l as h}from"./agent-lanes-model-DMAdqCmK.js";import{t as A}from"./time-Dhsh_2EG.js";/* empty css */import{c as S}from"./createLucideIcon-zZ8Hx7er.js";import{C as g}from"./chevron-down-l1mrh5S9.js";import{C as T}from"./chevron-up-CETZJzjV.js";import{P as E}from"./play-FT6K3It1.js";import{P as D}from"./pause-C2XTlkjs.js";import{T as W}from"./triangle-alert-CHoRGdVO.js";import{A as H}from"./arrow-up-right-BPedAgxO.js";import"./pin-C2mFOV1l.js";import"./x-DAehov0E.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./terminal-sessions-3RfJpen8.js";import"./api-DSqpVKC7.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./agent-state-DDhnFEEP.js";const L=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],P=S("radar",L),k={home:"Crew",tools:"Execution",edit:"Build",message:"Comms"};function pt({berths:O,allLanes:r,lanes:m,now:i,selectedId:x,sheetOpen:N,motionPaused:c,onPause:C,onRoom:$,onActor:l}){const[n,R]=j.useState(!0),[p,f]=j.useState(!1),a=r.filter(e=>["attention","blocked"].includes(d(e,i).posture)),u=F(r,i,["tool","message","ask"]).slice(0,4);return t.jsxs(t.Fragment,{children:[t.jsxs("aside",{className:"floor-tactical floor-tactical__radar","aria-label":"Tactical overview",children:[t.jsx("header",{children:t.jsxs("button",{type:"button",className:"floor-tactical__radar-toggle","aria-expanded":n,onClick:()=>R(!n),children:[t.jsx(P,{size:14}),"Sector radar ",n?t.jsx(g,{size:13}):t.jsx(T,{size:13})]})}),n?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"floor-tactical__map","aria-label":"Current sector rooms",children:[Object.keys(y).map(e=>{const s=y[e],o=m.filter(v=>d(v,i).station===e).length;return t.jsx("button",{type:"button",className:`floor-tactical__room${o?" is-occupied":""}`,style:{left:`${s.x/b*100}%`,top:`${s.y/_*100}%`},"aria-label":`Open ${k[e]} sheet from radar, ${o} actors`,onClick:()=>$(e),children:t.jsx("span",{children:k[e]})},e)}),m.map(e=>{const s=d(e,i),o=M(s.station,O[e.id]??0);return t.jsx("button",{type:"button",className:`floor-tactical__dot is-${s.posture}${x===e.id?" is-selected":""}`,style:{left:`${o.x/b*100}%`,top:`${o.y/_*100}%`},"aria-label":`Locate ${h(e.agent,e.source)} ${e.id.slice(-5)}`,onClick:()=>l(e)},e.id)})]}),t.jsxs("p",{children:[m.length," in sector · ",r.length," in fleet"]})]}):null,t.jsxs("button",{type:"button",className:"floor-tactical__motion","aria-pressed":c,onClick:C,children:[c?t.jsx(E,{size:13}):t.jsx(D,{size:13}),c?"Resume scene motion":"Pause scene motion"]}),t.jsx(z,{lanes:r,selected:r.find(e=>e.id===x)??null,onActor:l}),c?t.jsx("small",{className:"floor-tactical__paused",children:"Motion paused · data stays live"}):null]}),N?null:t.jsxs("aside",{className:"floor-tactical floor-tactical__activity","aria-label":"Fleet activity and attention",children:[t.jsxs("button",{type:"button",className:`floor-tactical__attention${a.length?" has-attention":""}`,"aria-expanded":p,onClick:()=>f(!p),children:[t.jsx(W,{size:14}),t.jsx("span",{children:a.length?`${a.length} need attention`:"No attention signals"}),t.jsx(g,{size:13})]}),p?t.jsx("div",{className:"floor-tactical__attention-list",children:a.length?a.map(e=>t.jsxs("button",{type:"button",onClick:()=>{f(!1),l(e)},children:[t.jsx("strong",{children:h(e.agent,e.source)}),t.jsxs("small",{children:[e.id.slice(-5)," · ",d(e,i).label]})]},e.id)):t.jsx("p",{children:"No blocked or needs-attention actors reported in this fleet."})}):null,t.jsxs("h3",{children:["Recent activity ",t.jsx("span",{children:"15m"})]}),u.length?u.map(({lane:e,event:s,at:o})=>t.jsxs("button",{className:"floor-tactical__activity-item",type:"button",onClick:()=>l(e),children:[t.jsxs("span",{children:[t.jsx("strong",{children:s.kind==="tool"?s.tool||"Tool":s.kind==="ask"?"Request":"Message"}),t.jsx("time",{children:A(o,i)})]}),t.jsxs("span",{children:[t.jsxs("small",{children:[h(e.agent,e.source)," · ",e.id.slice(-5)]}),t.jsx(H,{size:11})]})]},`${e.id}:${s.id}`)):t.jsx("p",{className:"floor-tactical__empty",children:"No recent events."})]})]})}export{pt as FloorTacticalHUD};
@@ -1 +1 @@
1
- import{r as o,j as r}from"./index-C8uS5szO.js";import{a as h}from"./api-CaROe5_H.js";import{t as p,r as c,m as g}from"./follow-route-BvcGtBIL.js";import{s as l}from"./router-BKiMcYa7.js";/* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";function N({route:e,navigate:t}){const[d,m]=o.useState(null),i=o.useMemo(()=>p(e),[e]);return o.useEffect(()=>{let n=!1;const s=new URLSearchParams;return e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),(async()=>{try{const a=s.toString(),f=a?await h(`/api/follow?${a}`):i;if(n)return;t(l(c(g(f,i),e.preferredView),e.machineId??null))}catch(a){if(n)return;m(a instanceof Error?a.message:String(a)),t(l(c(i,e.preferredView),e.machineId??null))}})(),()=>{n=!0}},[i,t,e]),r.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:r.jsx("section",{className:"s-thread-overview",children:r.jsxs("div",{className:"s-thread-overview-copy",children:[r.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[r.jsx("h2",{className:"s-page-title",children:"Follow"}),r.jsx("span",{className:"s-meta s-tabular",children:e.preferredView??"auto"})]}),r.jsx("p",{className:"s-thread-overview-summary",children:d?"Opening the closest available Scout view.":"Resolving Scout context..."})]})})})}export{N as FollowScreen};
1
+ import{r as o,j as r}from"./index-EsrkGBcv.js";import{a as h}from"./api-DSqpVKC7.js";import{t as p,r as c,m as g}from"./follow-route-BvcGtBIL.js";import{s as l}from"./router-DCtl8wqb.js";/* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";function N({route:e,navigate:t}){const[d,m]=o.useState(null),i=o.useMemo(()=>p(e),[e]);return o.useEffect(()=>{let n=!1;const s=new URLSearchParams;return e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),(async()=>{try{const a=s.toString(),f=a?await h(`/api/follow?${a}`):i;if(n)return;t(l(c(g(f,i),e.preferredView),e.machineId??null))}catch(a){if(n)return;m(a instanceof Error?a.message:String(a)),t(l(c(i,e.preferredView),e.machineId??null))}})(),()=>{n=!0}},[i,t,e]),r.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:r.jsx("section",{className:"s-thread-overview",children:r.jsxs("div",{className:"s-thread-overview-copy",children:[r.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[r.jsx("h2",{className:"s-page-title",children:"Follow"}),r.jsx("span",{className:"s-meta s-tabular",children:e.preferredView??"auto"})]}),r.jsx("p",{className:"s-thread-overview-summary",children:d?"Opening the closest available Scout view.":"Resolving Scout context..."})]})})})}export{N as FollowScreen};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-EsrkGBcv.js";function p(i){const o=i?.trim().toLowerCase();if(!o)return"unknown";const r=o.replace(/[\s(].*$/,"").replace(/[_-].*$/,""),t={anthropic:"claude",claude:"claude",claudecode:"claude",sonnet:"claude",opus:"claude",openai:"codex",codex:"codex",gpt:"codex",chatgpt:"codex",oai:"codex",xai:"grok",grok:"grok",kimi:"kimi",moonshot:"kimi",devin:"devin",cognition:"devin",swe:"devin",google:"gemini",gemini:"gemini",vertex:"gemini",cursor:"cursor",github:"github",opencode:"opencode",oc:"opencode",amp:"amp",sourcegraph:"amp",pi:"pi",inflection:"pi",omp:"pi","oh-my-pi":"pi",claw:"claw",native:"native",worker:"worker",quad:"quad"};return t[r]??t[o.replace(/[\s(].*$/,"")]??o}const g={claude:"Claude",codex:"Codex",grok:"Grok",kimi:"Kimi",devin:"Devin",gemini:"Gemini",cursor:"Cursor",github:"GitHub",opencode:"OpenCode",amp:"Amp",pi:"Pi",claw:"Claw",native:"Native",worker:"Worker",quad:"Quad"};function m(i){const o=p(i);return g[o]??(i?.trim()||"Unknown")}const n={fill:{fill:"currentColor"},line:{fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},c={claude:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",gemini:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81",cursor:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23",github:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",opencode:"M22 24H2V0h20zM17 4.8H7v14.4h10z"},l=i=>e.jsx("path",{d:i,fill:"currentColor"}),v={devin:{viewBox:"0 0 1400 1600",paths:["M6.0724,539.4025V210.1092c.0001-14.4719,7.7208-27.8445,20.2538-35.0804L311.4249,10.427c12.533-7.236,27.9744-7.236,40.5074,0l285.0989,164.6019c12.533,7.2359,20.2537,20.6085,20.2537,35.0804v168.1715c1.2505,55.8821,30.7856,109.7814,82.7306,139.7719,51.945,29.9905,113.3907,28.6189,162.4117,1.7606l145.6404-84.0855c12.533-7.2359,27.9744-7.2359,40.5074,0l285.0989,164.6019c12.533,7.2359,20.2537,20.6085,20.2537,35.0804v329.2037c0,14.4719-7.7206,27.8445-20.2536,35.0804l-285.0989,164.6019c-12.533,7.2359-27.9744,7.236-40.5074,0l-144.4618-83.4051c-49.2104-27.4815-111.2175-29.1254-163.5765,1.104-51.9443,29.9901-81.4793,83.8883-82.7305,139.7699v168.1257c0,14.4719-7.7207,27.8445-20.2537,35.0804l-285.0989,164.6019c-12.533,7.2359-27.9744,7.2359-40.5074,0L26.3399,1424.9711c-12.533-7.236-20.2537-20.6085-20.2537-35.0804v-329.2038c.0001-14.4719,7.7208-27.8445,20.2538-35.0804l285.0988-164.6019c12.533-7.236,27.9744-7.236,40.5074,0l145.9702,84.276c48.9621,26.6706,110.2347,27.967,162.0542-1.951,52.359-30.2296,81.9388-84.7522,82.7443-141.1106-1.2502-55.8826-30.7855-115.5579-82.7306-145.5484-51.945-29.9905-113.3905-28.6192-162.4113-1.7608l-146.31,84.9496c-12.5874,7.3084-28.1283,7.3017-40.7093-.0178L26.2098,574.4156c-12.4675-7.2533-20.1375-20.5892-20.1374-35.0131Z"]},amp:{viewBox:"0.6 1.4 8.8 8.8",paths:["M2.37694 9.23487L4.34679 7.23716L5.06365 9.95891L6.10505 9.67408L5.06749 5.72214L1.17831 4.6688L0.901367 5.73289L3.5775 6.45984L1.61584 8.45465L2.37694 9.23487Z","M8.05742 6.91898L9.09885 6.63416L8.0613 2.68224L4.17209 1.62891L3.89515 2.693L7.17936 3.58514L8.05742 6.91898Z","M6.56226 8.43797L7.60365 8.15314L6.5661 4.20121L2.67692 3.14787L2.39998 4.21196L5.68416 5.10411L6.56226 8.43797Z"]},grok:{viewBox:"0 0 34 33",paths:["M13.2371 21.0407L24.3186 12.8506C24.8619 12.4491 25.6384 12.6057 25.8973 13.2294C27.2597 16.5185 26.651 20.4712 23.9403 23.1851C21.2297 25.8989 17.4581 26.4941 14.0108 25.1386L10.2449 26.8843C15.6463 30.5806 22.2053 29.6665 26.304 25.5601C29.5551 22.3051 30.562 17.8683 29.6205 13.8673L29.629 13.8758C28.2637 7.99809 29.9647 5.64871 33.449 0.844576C33.5314 0.730667 33.6139 0.616757 33.6964 0.5L29.1113 5.09055V5.07631L13.2343 21.0436","M10.9503 23.0313C7.07343 19.3235 7.74185 13.5853 11.0498 10.2763C13.4959 7.82722 17.5036 6.82767 21.0021 8.2971L24.7595 6.55998C24.0826 6.07017 23.215 5.54334 22.2195 5.17313C17.7198 3.31926 12.3326 4.24192 8.67479 7.90126C5.15635 11.4239 4.0499 16.8403 5.94992 21.4622C7.36924 24.9165 5.04257 27.3598 2.69884 29.826C1.86829 30.7002 1.0349 31.5745 0.36364 32.5L10.9474 23.0341"]}},k=e.jsx("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),C=e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M4.5 3h3.4v7.4L14.7 3h4.5l-7.9 8.5L19.8 21h-4.6l-7.3-8.2V21H4.5Z"}),e.jsx("circle",{cx:"20.2",cy:"3.8",r:"1.8"})]}),j=e.jsxs("g",{...n.line,strokeWidth:2,children:[e.jsx("path",{d:"M6.5 8.5h11"}),e.jsx("path",{d:"M10 8.5 9 17M14.2 8.5 15.2 17"})]}),w=e.jsxs("g",{...n.line,children:[e.jsx("path",{d:"M6.5 8 11 12l-4.5 4"}),e.jsx("path",{d:"M12.5 16.5H18",strokeWidth:1.8})]}),M=e.jsxs("g",{...n.line,strokeWidth:1.8,children:[e.jsx("path",{d:"M12 4.5 18.5 8.2v7.6L12 19.5 5.5 15.8V8.2L12 4.5Z"}),e.jsx("circle",{cx:12,cy:12,r:2.7})]}),y=e.jsxs("g",{...n.fill,children:[e.jsx("rect",{x:5.5,y:5.5,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:13.1,y:5.5,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:5.5,y:13.1,width:5.4,height:5.4,rx:1.3}),e.jsx("rect",{x:13.1,y:13.1,width:5.4,height:5.4,rx:1.3})]}),f=e.jsxs("g",{...n.line,strokeWidth:2,children:[e.jsx("path",{d:"M7.5 6Q9.5 12 8.5 18"}),e.jsx("path",{d:"M12 5.5Q14 12 13 18.5"}),e.jsx("path",{d:"M16.5 6Q18.5 12 17.5 18"})]}),b={claude:l(c.claude),codex:k,kimi:C,gemini:l(c.gemini),cursor:l(c.cursor),github:l(c.github),opencode:l(c.opencode),pi:j,native:w,worker:M,quad:y,claw:f};function G({harness:i,size:o=14,className:r,style:t,title:h}){const a=p(i),s=v[a],x=b[a],d=h===null?void 0:h??m(i);return e.jsx("span",{className:r,style:t,title:d,"aria-hidden":d?void 0:!0,children:e.jsx("svg",{viewBox:s?.viewBox??"0 0 24 24",width:o,height:o,style:{display:"block"},role:"img","aria-label":d,children:s?s.paths.map((u,L)=>e.jsx("path",{d:u,fill:"currentColor"},L)):x??e.jsx("text",{x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",fontSize:"13",fontWeight:"600",fontFamily:"var(--font-mono)",fill:"currentColor",children:(a[0]??"?").toUpperCase()})})})}export{G as H,m as h};
@@ -0,0 +1 @@
1
+ import{r as m,j as e}from"./index-EsrkGBcv.js";import{H as L,h as pe}from"./HarnessMark-C4naWc16.js";import{p as me,a as Z}from"./api-DSqpVKC7.js";import{d as fe}from"./router-DCtl8wqb.js";import{n as S,t as J,f as O}from"./time-Dhsh_2EG.js";import{u as ge}from"./Provider-C35yu29I.js";import{u as xe}from"./useContentSecondaryNav-C6OBu-3_.js";import{OpsSubnav as be}from"./OpsSubnav-BOOYShHE.js";/* empty css */import{R as ve}from"./refresh-cw-BmVr7sCD.js";import{E as Y}from"./external-link-CUObqmgX.js";import{c as je}from"./createLucideIcon-zZ8Hx7er.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SecondaryNav-D7dbV2qo.js";import"./secondaryNavConfig-CS1svh6n.js";import"./nav-destinations-uorRqFxf.js";import"./message-square-BxesYglW.js";import"./terminal-hQKQygcf.js";import"./compass-63TUaz5_.js";import"./settings-BVh7kldq.js";import"./git-branch-B0_fPLO7.js";import"./scroll-text-DNjxhyO2.js";/* empty css */const ke=[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]],ye=je("clipboard-paste",ke),D=60*6e4,N=24*D,Ne=["product_judgment","large_context_synthesis","adversarial_critique","evidence_inventory","implementation","code_review"],V={fable:j("Fable 5","claude","claude","claude-fable-5","max","Fable","Premium product taste, rapid design iterations, and premise-level critique.","Uses the premium shared Claude allowance; do not spend it on routine mechanical work."),sol:j("GPT-5.6 Sol","codex","codex","gpt-5.6-sol","xhigh",null,"Load-bearing coding, debugging, integration, and technically grounded judgment.","Highest Codex tier; reserve deep turns for work where failure is expensive."),grok:j("Grok 4.6","grok","grok","grok-4.6",null,"Grok","Independent assumption checking, deletion pressure, and adversarial critique.","Do not make it the sole implementation authority; verify conclusions against repository evidence."),kimi:j("Kimi Code","kimi","kimi",null,null,"Kimi","Dense repository and study synthesis through the native Kimi harness.","The harness owns the concrete model and quota telemetry can be stale; probe before large fan-out."),opus:j("Opus 5","claude","claude","claude-opus-5","high","Opus","Long-context synthesis, nuanced architecture, and coherent product reasoning.","Premium shared Claude quota; avoid routine scans and repetitive verification."),glm:j("GLM-5.2","opencode","opencode","opencode-go/glm-5.2",null,"OpenCode","Independent broad-context synthesis through OpenCode.","OpenCode quota is not visible in Scout; use a bounded canary before scaling."),terra:j("GPT-5.6 Terra","codex","codex","gpt-5.6-terra","high",null,"Balanced implementation, correctness review, and technical critique.","Prefer Sol for the hardest integration boundary when its additional spend is justified."),minimax:j("MiniMax M3","minimax","opencode","opencode-go/minimax-m3",null,"OpenCode","Cost-effective structured evidence collection and comparison.","Verify load-bearing conclusions with a stronger reviewer before acceptance."),luna:j("GPT-5.6 Luna","codex","codex","gpt-5.6-luna","medium",null,"Inexpensive source mapping, test enumeration, and mechanical audit work.","Keep it out of sole high-stakes product judgment and final acceptance."),haiku:j("Haiku 4.5","claude","claude","claude-haiku-4-5","low",null,"Fast narrow scans and classification inside the Claude harness.","Lighter reasoning and a smaller context window make broad synthesis a poor fit."),sonnet:j("Sonnet 4.6","claude","claude","claude-sonnet-4-6","high",null,"Strong generalist implementation with a large context window.","Shares Claude's provider allowance and can become a poor choice when that pool is guarded."),deepseek:j("DeepSeek V4 Pro","opencode","opencode","opencode-go/deepseek-v4-pro",null,"OpenCode","Code-centric review through an independent model lineage.","Quota is opaque and findings should not be the sole acceptance authority.")},ee={product_judgment:{label:"Product judgment",objective:"Strategic tradeoffs, UX prioritization, scope shaping, and high-level product decisions.",strategy:"Select models with high nuanced taste, product-level synthesis, and clear communication of architectural tradeoffs.",candidates:[b("fable",100,"Unmatched product taste, rapid design iteration synthesis, and high-fidelity UX direction."),b("sol",87,"Technically grounded product decisions with strong execution realism."),b("grok",82,"Unfiltered perspective on feature bloat and aggressive scope reduction.")]},large_context_synthesis:{label:"Large-context synthesis",objective:"Repository-wide investigations, deep architectural archaeology, and multi-file code synthesis.",strategy:"Select models with expansive effective context windows and high-density information compression.",candidates:[b("kimi",100,"Native long-context retrieval and dense codebase relationship synthesis."),b("opus",91,"Deep structural understanding across complex multi-package repositories."),b("glm",84,"Independent wide-window scanning and structural cross-referencing.")]},adversarial_critique:{label:"Adversarial critique",objective:"Challenging design assumptions, rapid design iteration critique, identifying UX/logic gaps, and applying deletion pressure.",strategy:"Select high-taste and contrarian model lineages that stress-test design iterations and probe corner cases without sycophantic approval.",candidates:[b("fable",100,"High-fidelity design critique, rapid UX/visual iteration stress-testing, and premise challenge."),b("grok",91,"Contrarian perspective, uncompromising edge-case discovery, and aggressive premise challenge."),b("terra",84,"Rigorous technical inspection of code correctness and runtime invariants.")]},evidence_inventory:{label:"Evidence inventory",objective:"Grep and AST inventory, reference tracing, log audit, and structured fact collection.",strategy:"Select fast, cost-effective models with high precision on structured evidence gathering.",candidates:[b("minimax",100,"Fast, cost-effective structured evidence indexing and pattern enumeration."),b("luna",95,"Low-latency source tracing, test inventory, and reference mapping."),b("haiku",87,"Rapid mechanical file scans and categorization.")]},implementation:{label:"Implementation",objective:"Code creation, refactoring, type checking, unit test writing, and bug fixing.",strategy:"Select code-generation champions with high instruction following and strong language typing skills.",candidates:[b("sol",100,"Deep technical accuracy, robust multi-file refactors, and complex logic execution."),b("terra",91,"Reliable structured implementation with strong type-system adherence."),b("sonnet",87,"Strong generalist coding with fast turn times and clear explanations.")]},code_review:{label:"Code review",objective:"Diff analysis, security audit, regression detection, and style conformity.",strategy:"Select models with high sensitivity to subtle bugs, invariant violations, and edge-case behaviors.",candidates:[b("terra",100,"Strict invariant checking, subtle logic flaw detection, and boundary test coverage."),b("opus",96,"High-level architectural consistency and API surface evolution review."),b("deepseek",87,"Independent second-opinion review focused on code-level edge cases.")]}};function $(s){return s.availability==="constrained"||s.availability==="guarded"||s.minimumRemainingPercent!==null&&s.minimumRemainingPercent<=20||s.pacing==="ahead"&&(s.minimumRemainingPercent??100)<=35}function se(s){return s.confidence==="fresh"&&s.minimumRemainingPercent!==null&&!$(s)}function Re(s){return $(s)?s.minimumRemainingPercent!==null&&s.minimumRemainingPercent<=15?`${s.providerLabel} is near capacity (${s.minimumRemainingPercent}% remaining). High risk of quota exhaustion.`:s.pacing==="ahead"?`${s.providerLabel} consumption rate exceeds window pace with limited buffer.`:`${s.providerLabel} quota availability is ${s.availability}. Failover recommended.`:null}function k(s){return[s.providerId,s.harness,s.model,s.effort,s.profile].join("|")}function we(s){return[s.profile?`profile ${s.profile}`:s.harness,s.model,s.effort].filter(Boolean).join(" / ")}function Se(s,n="<request>"){const a=s.profile?.trim().toLowerCase()??null,t=a!=="opencode"&&a!=="oc",i=s.profile&&t?["--profile",s.profile]:["--harness",s.harness,...s.model?["--model",s.model]:[]];return s.effort&&i.push("--effort",s.effort),i.push(n),i}function B(s,n="<request>"){return["scout","ask",...Se(s,n)].map(De).join(" ")}function qe(s,n={}){const a=ne(n.now)??Date.now(),t=n.bias??"balanced",i=Le(t),o=new Map(s.providers.map(h=>[h.id,Ce(h,a)])),r=n.role?[n.role]:[...Ne],c=r.map(h=>{const u=ee[h],d=u.candidates.map(f=>{const g=o.get(f.route.providerId)??ae(f.route.providerId);return{runtime:f,quota:g,score:f.fit+Pe(g,a)*i}}).sort((f,g)=>g.score-f.score||g.runtime.fit-f.runtime.fit),p=d[0],x=$(p.quota),v=d.slice(1);return x&&v.sort((f,g)=>{const q=K(f,p.runtime.route.providerId),T=K(g,p.runtime.route.providerId);return q-T||g.score-f.score||g.runtime.fit-f.runtime.fit}),{role:h,roleLabel:u.label,modelLabel:p.runtime.label,route:p.runtime.route,score:p.score,fit:p.runtime.fit,objective:u.objective,taskRationale:p.runtime.taskRationale,capability:p.runtime.capability,caution:p.runtime.caution,assertion:Ie(p.quota),quotaRisk:x,quotaRiskMessage:Re(p.quota),quota:p.quota,alternatives:v.slice(0,2).map(({runtime:f,quota:g,score:q})=>({label:f.label,route:f.route,score:q,fit:f.fit,capability:f.capability,caution:f.caution,taskRationale:f.taskRationale,quotaRisk:$(g),quota:g}))}}),l=$e(r,o,a);return{generatedAt:s.generatedAt,generatedAtLocal:s.generatedAtLocal,evaluatedAt:a,assignments:c,models:l,bias:t}}function $e(s,n,a){const t=new Map;for(const i of s){const o=ee[i];for(const r of o.candidates){const c=k(r.route),l=t.get(c);l?l.roles.push({role:i,label:o.label}):t.set(c,{runtime:r,roles:[{role:i,label:o.label}]})}}return[...t.values()].map(({runtime:i,roles:o})=>{const r=n.get(i.route.providerId)??ae(i.route.providerId);return{modelLabel:i.label,route:i.route,roles:o,strengths:[i.capability],cautions:[i.caution],guidance:Ae(r,a),quotaRisk:$(r),quota:r}})}function Ce(s,n){const a=s.windows.filter(h=>!/^video\b/iu.test(h.label)).map(h=>Me(h,n)),t=[...a].sort((h,u)=>h.percentRemaining-u.percentRemaining)[0]??null,i=a.filter(h=>h.paceRatio!==null).sort((h,u)=>u.paceRatio-h.paceRatio)[0]??null,o=a.map(h=>h.confidence),r=o.includes("stale")?"stale":o.includes("fresh")?"fresh":"unknown",c=[...a].filter(h=>h.resetAt!==null&&h.resetAt>n).sort((h,u)=>h.resetAt-u.resetAt)[0]??null,l=t?.percentRemaining??null;return{providerId:s.id,providerLabel:s.label,plan:s.plan,availability:Oe(l),pacing:i?.status??"unknown",confidence:r,minimumRemainingPercent:l,bindingWindow:t?.label??null,nextResetAt:c?.resetAt??null,nextResetIn:c?.resetIn??"",windows:a}}function Me(s,n){const a=ne(s.windowMs)??Te(s.label,s.resetAt),t=a!==null&&s.resetAt!==null?X(Fe(100-(s.resetAt-n)/a*100,0,100)):null,i=t!==null&&t>=1?Ee(s.usedPercent/t):null,o=i===null?null:X(i*100),r=_e(s.usedPercent,t,i),c=a===null?N:Math.min(N,Math.max(D,a/4)),l=s.freshness.ageMs===null?"unknown":s.freshness.ageMs>c?"stale":"fresh";return{label:s.label,usedPercent:s.usedPercent,percentRemaining:s.percentRemaining,durationMs:a,elapsedPercent:t,paceRatio:i,projectedUsedPercent:o,status:r,resetAt:s.resetAt,resetIn:s.resetIn,freshness:s.freshness.label,confidence:l}}function j(s,n,a,t,i,o,r,c){return{label:s,route:{providerId:n,harness:a,model:t,effort:i,profile:o},capability:r,caution:c}}function b(s,n,a){return{...V[s],fit:n,taskRationale:a??V[s].capability}}function Ae(s,n){return $(s)?"conserve":s.confidence!=="fresh"?"probe_first":s.availability==="constrained"?"conserve":s.nextResetAt!==null&&s.nextResetAt>n&&s.nextResetAt-n<=N&&s.pacing!=="ahead"&&(s.minimumRemainingPercent??0)>=10?"use_now":s.availability==="guarded"?"conserve":s.pacing==="ahead"?"use_deliberately":s.availability==="abundant"&&s.pacing==="underused"?"use_now":"available"}function Le(s){switch(s){case"capability":return .25;case"quota":return 1.75;case"balanced":return 1}}function Pe(s,n){let a=0;switch(s.availability){case"abundant":a+=10;break;case"available":a+=5;break;case"guarded":a-=5;break;case"constrained":a-=30;break;case"unknown":a-=2;break}return s.pacing==="underused"&&(a+=5),s.pacing==="ahead"&&(a-=8),s.confidence==="stale"&&(a-=8),s.confidence==="unknown"&&(a-=3),s.pacing==="underused"&&s.nextResetAt!==null&&s.nextResetAt>n&&s.nextResetAt-n<=2*N&&(a+=3),a}function Ie(s){if(s.minimumRemainingPercent===null)return`${te(s.providerId)} quota telemetry unavailable; use a bounded canary before scaling.`;const n=s.pacing==="on_track"?"usage tracks elapsed time":s.pacing==="underused"?"usage trails elapsed time":s.pacing==="ahead"?"usage exceeds elapsed time":"pace unknown",a=s.nextResetIn?` · next reset ${s.nextResetIn}`:"";return`${Ue(s.minimumRemainingPercent)} minimum remaining · ${n} · telemetry ${s.confidence}${a}.`}function ae(s){return{providerId:s,providerLabel:te(s),plan:null,availability:"unknown",pacing:"unknown",confidence:"unknown",minimumRemainingPercent:null,bindingWindow:null,nextResetAt:null,nextResetIn:"",windows:[]}}function Te(s,n){const a=s.trim().toLowerCase(),t=a.match(/(?:^|\s)(\d+(?:\.\d+)?)([hd])$/u);if(t){const i=Number(t[1]);return t[2]==="h"?i*D:i*N}if(a==="weekly"||a==="week"||a==="7-day")return 7*N;if(a==="5-hour")return 5*D;if(a==="monthly"||a==="month"){if(n===null)return 30*N;const i=new Date(n),o=new Date(n);o.setUTCMonth(o.getUTCMonth()-1);const r=i.getTime()-o.getTime();return r>0?r:30*N}return null}function _e(s,n,a){if(n===null||a===null)return"unknown";const t=s-n;return a>1.1&&t>3?"ahead":a<.7&&t<-10?"underused":"on_track"}function Oe(s){return s===null?"unknown":s>=60?"abundant":s>=30?"available":s>=15?"guarded":"constrained"}function K(s,n){const a=se(s.quota),t=s.runtime.route.providerId!==n;return a&&t?0:a?1:t?2:3}function De(s){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(s)?s:`'${s.replaceAll("'",`'"'"'`)}'`}function te(s){return s.split(/[-_\s]+/u).filter(Boolean).map(n=>`${n.charAt(0).toUpperCase()}${n.slice(1)}`).join(" ")||"Unknown"}function Ue(s){return`${Number.isInteger(s)?s.toFixed(0):s.toFixed(1)}%`}function ne(s){return typeof s=="number"&&Number.isFinite(s)?s:null}function X(s){return Math.round(s*10)/10}function Ee(s){return Math.round(s*100)/100}function Fe(s,n,a){return Math.min(a,Math.max(n,s))}const Ge=3e4,M=[{value:"capability",label:"Capability"},{value:"balanced",label:"Balanced"},{value:"quota",label:"Quota"}],Be={codex:"Codex",claude:"Claude",kimi:"Kimi",minimax:"MiniMax",cursor:"Cursor",native:"Native",worker:"Worker",bridge:"Bridge",http:"HTTP",pi:"Pi",flue:"Flue",github:"GitHub",unknown:"Unknown"},ie=[{id:"claude",description:"Anthropic plan windows captured from Claude Code.",links:[{label:"Usage",href:"https://claude.ai/settings/usage"},{label:"Manage plan",href:"https://claude.ai/settings/billing"}]},{id:"codex",description:"OpenAI plan windows reported by local Codex sessions.",links:[{label:"Usage",href:"https://chatgpt.com/codex/settings/usage"},{label:"Open Codex",href:"https://chatgpt.com/codex"}]},{id:"kimi",description:"Kimi Code subscription windows and membership level.",links:[{label:"Kimi Code",href:"https://www.kimi.com/code"},{label:"Docs",href:"https://www.kimi.com/code/docs/en/"}]},{id:"grok",description:"SuperGrok quota reported by local Grok, with dashboard capture and local activity as fallbacks.",links:[{label:"Open Grok",href:"https://grok.com/"},{label:"Billing",href:"https://grok.com/?_s=billing"},{label:"Help",href:"https://docs.x.ai/grok/faq"}]},{id:"minimax",description:"MiniMax Token Plan 5-hour and weekly allowance.",links:[{label:"Usage",href:"https://platform.minimax.io/console/plan"},{label:"Docs",href:"https://platform.minimax.io/docs/token-plan/intro"}]},{id:"cursor",description:"Cursor membership detected locally, plus usage totals from an exported dashboard capture.",links:[{label:"Usage",href:"https://cursor.com/dashboard/usage"},{label:"Manage plan",href:"https://cursor.com/dashboard/billing"}]}],He={cloudflare:[{label:"Dashboard",href:"https://dash.cloudflare.com/"},{label:"Billing",href:"https://dash.cloudflare.com/?to=/:account/billing"}],vercel:[{label:"Dashboard",href:"https://vercel.com/dashboard"},{label:"Billing",href:"https://vercel.com/account/billing"}],exe:[{label:"VMs",href:"https://exe.dev/"},{label:"Billing",href:"https://exe.dev/user/billing"},{label:"Docs",href:"https://exe.dev/docs/what-is-exe"}]},ze={exe:{category:"Agent compute",description:"Persistent VMs for remote Scout agents and isolated workloads."},cloudflare:{category:"Edge platform",description:"Workers, networking, and edge infrastructure available for deployment."},vercel:{category:"App hosting",description:"Projects, preview environments, and production deployments."}};function Qe({provider:s}){return e.jsx("span",{className:`hs-cloud-mark hs-cloud-mark--${s}`,"aria-hidden":"true",children:s==="exe"?e.jsx("img",{src:"https://exe.dev/apple-touch-icon.png",alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer"}):e.jsx("svg",{viewBox:"0 0 24 24",focusable:"false",children:s==="cloudflare"?e.jsx("path",{d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268Zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"}):e.jsx("path",{d:"m12 1.608 12 20.784H0Z"})})})}function F(s){const n=(s??"").trim().toLowerCase();return n?n.includes("claude")?"claude":n.includes("codex")?"codex":n.includes("cursor")?"cursor":n.includes("kimi")||n.includes("moonshot")?"kimi":n.includes("minimax")?"minimax":n.includes("github")?"github":n.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown":"unknown"}function P(s){return Be[s]??pe(s)}function We(s){switch(s){case"weekly":return"7d";case"req/h":return"1h";default:return s||"quota"}}function I(s){return s.windows&&s.windows.length>0?s.windows:[{label:We(s.unitLabel),fill:s.fill,usedLabel:s.usedLabel,capLabel:s.capLabel,unitLabel:s.unitLabel,resetAt:s.resetAt}]}function Ve(s){return s.capLabel==="100%"&&s.usedLabel.endsWith("%")?s.usedLabel:`${s.usedLabel}/${s.capLabel}`}function re(s){return s>=.9?"err":s>=.75?"warn":"ok"}function Ke(s,n=30){const a=s??[];if(a.length<=n)return a;if(n<=1)return[a[a.length-1]];const t=(a.length-1)/(n-1);return Array.from({length:n},(i,o)=>a[Math.round(o*t)])}function H(s){const n=Math.floor((s-Date.now())/1e3),a=n<0,t=Math.abs(n);let i;if(t>=86400){const o=Math.floor(t/86400),r=Math.floor(t%86400/3600);i=r>0?`${o}d ${r}h`:`${o}d`}else if(t>=3600){const o=Math.floor(t/3600),r=Math.floor(t%3600/60);i=r>0?`${o}h ${r}m`:`${o}h`}else i=`${Math.max(1,Math.floor(t/60))}m`;return a?`stale ${i}`:i}function Xe(s){if(!s)return null;const n=S(s.capturedAt);if(n)return n;if(s.kind!=="quota")return null;const a=I(s).reduce((t,i)=>{const o=S(i.capturedAt);return Math.max(t??0,o??0)||t},null);return a||I(s).flatMap(t=>t.history??[]).reduce((t,i)=>{const o=S(i.capturedAt);return Math.max(t??0,o??0)||t},null)}function Ze({provider:s,onImported:n}){const[a,t]=m.useState(!1),[i,o]=m.useState(""),[r,c]=m.useState(!1),[l,h]=m.useState(null),u=`hs-${s}-dashboard-capture`,d=P(s);if(!a)return e.jsxs("button",{type:"button",className:"hs-dashboard-capture-trigger",onClick:()=>t(!0),children:[e.jsx(ye,{size:12,"aria-hidden":"true"}),"Import dashboard"]});const p=async x=>{if(x.preventDefault(),!(!i.trim()||r)){c(!0),h(null);try{await Z("/api/service-budgets/dashboard-import",{method:"POST",body:JSON.stringify({provider:s,text:i})}),o(""),h("Usage snapshot imported."),await n()}catch(v){h(v instanceof Error?v.message:String(v))}finally{c(!1)}}};return e.jsxs("form",{className:"hs-dashboard-capture",onSubmit:x=>{p(x)},children:[e.jsxs("label",{htmlFor:u,children:[d," usage snapshot"]}),e.jsxs("p",{children:[s==="cursor"?"Paste the exported Usage CSV or copied usage table.":"Copy the signed-in Usage panel and paste it here."," ","Scout keeps only normalized totals, not this text."]}),e.jsx("textarea",{id:u,value:i,onChange:x=>o(x.target.value),maxLength:128*1024,rows:5,placeholder:s==="cursor"?"Date (UTC),Type,Model,Tokens,Cost…":"Weekly SuperGrok… Limit · 12% used · Resets…","aria-describedby":l?`${u}-message`:void 0}),l?e.jsx("span",{id:`${u}-message`,className:"hs-dashboard-capture-message",role:"status",children:l}):null,e.jsxs("div",{className:"hs-dashboard-capture-actions",children:[e.jsx("button",{type:"button",onClick:()=>{t(!1),h(null)},disabled:r,children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!i.trim()||r,children:r?"Importing…":"Use snapshot"})]})]})}function Je(s){const n=new Map(s.map(a=>[F(a.id),a]));return ie.map(({id:a})=>({id:a,label:P(a),gauge:n.get(a)??null}))}function Ye({points:s}){const n=Ke(s);return n.length===0?e.jsx("span",{className:"hs-history hs-history-empty",children:"live"}):e.jsx("span",{className:"hs-history","aria-label":`${n.length} budget samples`,children:n.map((a,t)=>{const i=Math.max(.06,Math.min(1,a.fill));return e.jsx("span",{className:`hs-history-bar hs-history-bar--${re(a.fill)}`,style:{height:`${Math.round(i*100)}%`},title:`${O(a.capturedAt)||"unknown"} ${a.usedLabel}`},`${a.capturedAt}:${t}`)})})}function es({gauge:s,window:n}){const a=Math.max(0,Math.min(100,Math.round(n.fill*100))),t=100-a,i=re(n.fill),o=Number.isFinite(n.resetAt)?new Date(n.resetAt).toISOString():void 0;return e.jsxs("div",{className:"hs-subscription-window",children:[e.jsxs("div",{className:"hs-subscription-window-head",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"hs-subscription-window-label",children:[n.label," window"]}),e.jsxs("strong",{className:`hs-subscription-usage hs-subscription-usage--${i}`,children:[a,"% used"]})]}),e.jsxs("div",{className:"hs-subscription-remaining",children:[e.jsxs("strong",{children:[t,"%"]}),e.jsx("span",{children:"available"})]})]}),e.jsx("div",{className:"hs-subscription-meter",role:"progressbar","aria-label":`${s.label} ${n.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:e.jsx("span",{className:`hs-subscription-meter-fill hs-subscription-meter-fill--${i}`,style:{width:`${a}%`}})}),e.jsxs("div",{className:"hs-subscription-window-meta",children:[e.jsxs("span",{children:[Ve(n)," ",n.unitLabel==="quota"?"quota":n.unitLabel]}),e.jsxs("span",{children:["resets in ",H(n.resetAt),o?e.jsx("time",{dateTime:o,title:O(n.resetAt)||void 0,children:` · ${O(n.resetAt)||""}`}):null]})]}),e.jsx(Ye,{points:n.history})]})}function ss(){return e.jsxs("div",{className:"hs-subscription-loading","aria-hidden":"true",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--label"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--value"}),e.jsx("span",{className:"hs-loading-meter"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--meta"}),e.jsx("span",{className:"hs-loading-history"})]})}function as(s,n,a){const t=s.flatMap(i=>{if(i.kind!=="quota")return[];const o=I(i).map(r=>{const c=S(r.capturedAt??i.capturedAt),l=Math.round(Math.max(0,Math.min(1,r.fill))*1e3)/10;return{label:r.label,usedPercent:l,percentRemaining:Math.round((100-l)*10)/10,windowMs:r.windowMs??null,resetAt:S(r.resetAt),resetIn:Number.isFinite(r.resetAt)?H(r.resetAt):"",freshness:{ageMs:c?Math.max(0,a-c):null,label:c?J(c)||"now":"unknown"}}});return[{id:F(i.id),label:P(F(i.id)),plan:i.plan??null,windows:o}]});return{generatedAt:n,generatedAtLocal:O(n)||"now",providers:t}}function U(s){switch(s){case"underused":return"usage trails elapsed time";case"on_track":return"usage tracks elapsed time";case"ahead":return"usage exceeds elapsed time";default:return"pace unknown"}}function A(s){return we(s)}function z({text:s,label:n="Copy rule"}){const[a,t]=m.useState("idle");m.useEffect(()=>{if(a==="idle")return;const o=window.setTimeout(()=>t("idle"),1800);return()=>window.clearTimeout(o)},[a]);const i=m.useCallback(async()=>{if(typeof navigator>"u"||!navigator.clipboard){t("failed");return}try{await navigator.clipboard.writeText(s),t("copied")}catch{t("failed")}},[s]);return e.jsx("button",{type:"button",className:"hs-advisor-dispatch-copy",onClick:()=>{i()},"aria-live":"polite","aria-atomic":"true",children:a==="copied"?"Copied!":a==="failed"?"Copy failed":n})}function G(s,n){return!!(s.quotaRisk&&n&&!n.quotaRisk&&se(n.quota)&&n.route.providerId!==s.route.providerId)}function oe(s){return s.minimumRemainingPercent===null?"quota unknown":`${s.minimumRemainingPercent}% minimum remaining`}function ts(s){switch(s){case"use_now":return"Use now";case"available":return"Available";case"use_deliberately":return"Use deliberately";case"probe_first":return"Probe first";case"conserve":return"Conserve"}}function le({providerLabel:s,quota:n}){return n.windows.length===0?e.jsxs("div",{className:"hs-advisor-no-quota",children:[e.jsx("strong",{children:"No quota telemetry"}),e.jsx("span",{children:"Use one bounded ask as a canary before scaling this route."})]}):e.jsx("div",{className:"hs-advisor-windows",children:n.windows.map(a=>{const t=Math.max(0,Math.min(100,a.usedPercent)),i=a.elapsedPercent===null?null:Math.max(0,Math.min(100,a.elapsedPercent)),o=i===null?"elapsed time unavailable":`${i}% of the window elapsed`,r=a.projectedUsedPercent===null?"projection unavailable":`${a.projectedUsedPercent}% projected at reset`;return e.jsxs("div",{className:"hs-advisor-window",children:[e.jsxs("div",{className:"hs-advisor-window-head",children:[e.jsx("strong",{children:a.label}),e.jsxs("span",{children:[a.usedPercent,"% used"]}),e.jsx("span",{children:U(a.status)})]}),e.jsxs("div",{className:"hs-advisor-window-meter",role:"progressbar","aria-label":`${s} ${a.label} usage`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),"aria-valuetext":`${a.usedPercent}% used; ${o}; ${r}; ${U(a.status)}`,children:[e.jsx("span",{className:`hs-advisor-window-fill hs-advisor-window-fill--${a.status}`,style:{width:`${t}%`}}),i!==null?e.jsx("span",{className:"hs-advisor-window-now",style:{left:`${i}%`},title:`${i}% of the window has elapsed`,"aria-hidden":"true"}):null]}),e.jsxs("div",{className:"hs-advisor-window-meta",children:[e.jsxs("span",{children:[a.percentRemaining,"% available"]}),e.jsx("span",{children:r}),e.jsx("span",{children:a.resetIn?`resets in ${a.resetIn}`:"reset unknown"})]})]},a.label)})})}function ce({assignment:s,selected:n,onSelect:a}){return e.jsxs("button",{type:"button",className:"hs-advisor-role","data-selected":n?"true":void 0,onClick:a,"aria-pressed":n,children:[e.jsx("span",{className:"hs-advisor-role-mark",children:e.jsx(L,{harness:s.route.harness,size:25,title:null})}),e.jsxs("span",{className:"hs-advisor-role-copy",children:[e.jsx("strong",{children:s.roleLabel}),e.jsx("span",{children:s.modelLabel}),e.jsxs("small",{children:[s.route.profile?`profile ${s.route.profile}`:s.route.harness," · Fit $",s.fit]})]}),e.jsx("span",{className:`hs-advisor-role-tag ${s.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:s.quotaRisk?`⚠️ ${s.quota.minimumRemainingPercent!==null?`${s.quota.minimumRemainingPercent}%`:"Risk"}`:s.fit>=100?"Primary":`Fit ${s.fit}`})]})}function ns({map:s}){const[n,a]=m.useState("implementation"),t=s.assignments.find(r=>r.role===n)??s.assignments[0];if(!t)return null;const i=B(t.route),o=t.alternatives.find(r=>G(t,r));return e.jsxs("div",{className:"hs-advisor-layout",children:[e.jsx("nav",{className:"hs-advisor-roles","aria-label":"Work roles",children:s.assignments.map(r=>e.jsx(ce,{assignment:r,selected:r.role===t.role,onSelect:()=>a(r.role)},r.role))}),e.jsxs("article",{className:"hs-advisor-detail","aria-live":"polite",children:[e.jsxs("header",{className:"hs-advisor-detail-head",children:[e.jsxs("div",{className:"hs-advisor-model",children:[e.jsx(L,{harness:t.route.harness,size:26,title:null}),e.jsxs("div",{children:[e.jsxs("span",{children:[t.roleLabel," · Role Routing"]}),e.jsx("h4",{children:t.modelLabel}),e.jsx("code",{children:A(t.route)})]})]}),e.jsx("span",{className:`hs-advisor-fit-badge ${t.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:t.quotaRisk?"⚠️ Quota Risk · Failover Active":`Primary Route · Fit ${t.fit}`})]}),t.quotaRisk?e.jsxs("div",{className:"hs-advisor-quota-alert",role:"alert",children:[e.jsxs("div",{className:"hs-advisor-quota-alert-head",children:[e.jsx("span",{className:"hs-advisor-quota-alert-badge",children:"⚠️ Quota Risk"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Quota Exhaustion Imminent · Elevated to Primary Concern"}),e.jsx("p",{children:t.quotaRiskMessage??`${t.quota.providerLabel} quota is near capacity.`})]})]}),e.jsx("div",{className:"hs-advisor-quota-alert-action",children:o?e.jsxs("span",{children:["Failover to ",e.jsx("strong",{children:o.label})," to move work off the constrained provider."]}):e.jsx("span",{children:"No quota-safe cross-provider fallback is currently available; keep the task bounded or wait for reset."})})]}):null,e.jsxs("div",{className:"hs-advisor-task-hero",children:[e.jsxs("div",{className:"hs-advisor-task-hero-head",children:[e.jsx("h5",{children:"Task Objective"}),e.jsx("span",{children:"Cognitive Strategy"})]}),e.jsx("p",{children:t.objective}),e.jsxs("small",{children:[e.jsx("strong",{children:"Execution Rationale:"})," ",t.taskRationale]})]}),e.jsxs("div",{className:"hs-advisor-assessment",children:[e.jsxs("section",{children:[e.jsx("h5",{children:"Strengths for this task"}),e.jsx("p",{children:t.capability})]}),e.jsxs("section",{children:[e.jsx("h5",{children:"Watchouts & Guardrails"}),e.jsx("p",{children:t.caution})]})]}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Dispatch rule"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:i}),e.jsx(z,{text:i,label:"Copy rule"})]})]}),e.jsxs("section",{className:"hs-advisor-ladder",children:[e.jsx("h5",{children:"Failover ladder"}),e.jsxs("div",{className:"hs-advisor-ladder-nodes",children:[e.jsxs("div",{className:`hs-advisor-ladder-node ${t.quotaRisk?"hs-advisor-ladder-node--primary hs-advisor-ladder-node--risk":"hs-advisor-ladder-node--primary"}`,children:[e.jsx("span",{className:"hs-advisor-ladder-badge",children:t.quotaRisk?"⚠️ Primary (Quota Risk)":"Primary"}),e.jsxs("div",{className:"hs-advisor-ladder-body",children:[e.jsx("strong",{children:t.modelLabel}),e.jsx("code",{children:A(t.route)}),e.jsx("small",{children:t.quotaRisk?`Exhaustion risk (${t.quota.minimumRemainingPercent}% remaining) · ${t.taskRationale}`:`Initial execution target · ${t.taskRationale}`})]})]}),t.alternatives.map((r,c)=>{const l=G(t,r);return e.jsxs("div",{className:`hs-advisor-ladder-node ${l?"hs-advisor-ladder-node--fallback-rec":""}`,children:[e.jsx("span",{className:"hs-advisor-ladder-badge",children:l?"⭐️ Quota-safe fallback":c===0?"Secondary":"Tertiary"}),e.jsxs("div",{className:"hs-advisor-ladder-body",children:[e.jsx("strong",{children:r.label}),e.jsx("code",{children:A(r.route)}),e.jsx("small",{children:l?`Moves work off ${t.quota.providerLabel} · ${r.taskRationale}`:r.quotaRisk?`Also quota constrained; use only if operationally necessary · ${r.taskRationale}`:`Fallback if ${t.modelLabel} encounters rate limits or errors · ${r.taskRationale}`})]})]},k(r.route))})]})]}),e.jsxs("section",{className:"hs-advisor-quota-secondary",children:[e.jsxs("div",{className:"hs-advisor-quota-secondary-head",children:[e.jsxs("h5",{children:["Provider Telemetry ",t.quotaRisk?"(Active Constraint)":"(Secondary)"]}),e.jsxs("span",{children:[t.quota.providerLabel,t.quota.plan?` · ${t.quota.plan}`:""]})]}),e.jsxs("div",{className:"hs-advisor-quota-compact-bar",children:[e.jsxs("span",{children:["Allowance: ",e.jsx("strong",{children:oe(t.quota)})]}),e.jsxs("span",{children:["Pacing: ",e.jsx("strong",{children:U(t.quota.pacing)})]}),e.jsxs("span",{children:["Telemetry: ",e.jsx("strong",{children:t.quota.confidence})]}),t.quota.nextResetIn?e.jsxs("span",{children:["Next reset: ",e.jsx("strong",{children:t.quota.nextResetIn})]}):null]}),t.quotaRisk?e.jsx("div",{style:{marginTop:"var(--space-sm)"},children:e.jsx(le,{providerLabel:t.quota.providerLabel,quota:t.quota})}):null]})]})]})}function is({models:s}){const n=s.find(r=>r.modelLabel==="GPT-5.6 Sol")??s[0],[a,t]=m.useState(()=>n?k(n.route):""),i=s.find(r=>k(r.route)===a)??n;if(!i)return null;const o=B(i.route);return e.jsxs("div",{className:"hs-model-guide-layout",children:[e.jsx("nav",{className:"hs-model-guide-list","aria-label":"Model Fleet",children:s.map(r=>{const c=k(r.route);return e.jsxs("button",{type:"button",className:"hs-model-guide-item","data-selected":c===k(i.route)?"true":void 0,"aria-pressed":c===k(i.route),onClick:()=>t(c),children:[e.jsx("span",{className:"hs-model-guide-mark",children:e.jsx(L,{harness:r.route.harness,size:23,title:null})}),e.jsxs("span",{className:"hs-model-guide-item-copy",children:[e.jsx("strong",{children:r.modelLabel}),e.jsxs("span",{children:[r.quota.providerLabel," · ",r.route.profile?`profile ${r.route.profile}`:r.route.harness]})]}),e.jsx("span",{className:`hs-advisor-role-tag ${r.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:r.quotaRisk?"⚠️ Conserve":ts(r.guidance)})]},c)})}),e.jsxs("article",{className:"hs-model-guide-detail","aria-live":"polite",children:[e.jsxs("header",{className:"hs-advisor-detail-head",children:[e.jsxs("div",{className:"hs-advisor-model",children:[e.jsx(L,{harness:i.route.harness,size:25,title:null}),e.jsxs("div",{children:[e.jsxs("span",{children:[i.quota.providerLabel,i.quota.plan?` · ${i.quota.plan}`:""]}),e.jsx("h4",{children:i.modelLabel}),e.jsx("code",{children:A(i.route)})]})]}),e.jsx("span",{className:`hs-advisor-fit-badge ${i.quotaRisk?"hs-advisor-role-tag--risk":""}`,children:i.quotaRisk?"⚠️ Quota Risk · Conserve":i.roles.length>0?`${i.roles.length} Assigned Roles`:"Model Fleet"})]}),i.quotaRisk?e.jsx("div",{className:"hs-advisor-quota-alert",role:"alert",children:e.jsxs("div",{className:"hs-advisor-quota-alert-head",children:[e.jsx("span",{className:"hs-advisor-quota-alert-badge",children:"⚠️ Quota Risk"}),e.jsxs("div",{children:[e.jsx("strong",{children:"High Quota Depletion · Conserve Model"}),e.jsxs("p",{children:[i.quota.providerLabel," allowance is near capacity (",i.quota.minimumRemainingPercent,"% remaining). Conserve this model for essential high-fit tasks."]})]})]})}):null,e.jsxs("div",{className:"hs-model-guide-roles",children:[e.jsx("strong",{children:"Assigned task roles"}),e.jsx("div",{className:"hs-model-guide-role-chips",children:i.roles.map(r=>e.jsx("span",{className:"hs-model-guide-role-chip",children:r.label},r.role))})]}),e.jsxs("div",{className:"hs-advisor-assessment",children:[e.jsxs("section",{children:[e.jsx("h5",{children:"Strengths & Cognitive Profile"}),e.jsx("p",{children:i.strengths.join(" ")})]}),e.jsxs("section",{children:[e.jsx("h5",{children:"Watchouts & Guardrails"}),e.jsx("p",{children:i.cautions.join(" ")})]})]}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Direct dispatch"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:o}),e.jsx(z,{text:o,label:"Copy command"})]})]}),e.jsxs("section",{className:"hs-advisor-quota-secondary",children:[e.jsxs("div",{className:"hs-advisor-quota-secondary-head",children:[e.jsxs("h5",{children:["Provider Telemetry ",i.quotaRisk?"(Active Constraint)":"(Secondary)"]}),e.jsxs("span",{children:[i.quota.providerLabel,i.quota.plan?` · ${i.quota.plan}`:""]})]}),e.jsxs("div",{className:"hs-advisor-quota-compact-bar",children:[e.jsxs("span",{children:["Allowance: ",e.jsx("strong",{children:oe(i.quota)})]}),e.jsxs("span",{children:["Pacing: ",e.jsx("strong",{children:U(i.quota.pacing)})]}),e.jsxs("span",{children:["Telemetry: ",e.jsx("strong",{children:i.quota.confidence})]}),i.quota.nextResetIn?e.jsxs("span",{children:["Next reset: ",e.jsx("strong",{children:i.quota.nextResetIn})]}):null]}),i.quotaRisk?e.jsx("div",{style:{marginTop:"var(--space-sm)"},children:e.jsx(le,{providerLabel:i.quota.providerLabel,quota:i.quota})}):null]})]})]})}function rs({assignments:s}){const[n,a]=m.useState("implementation"),[t,i]=m.useState({}),o=s.find(d=>d.role===n)??s[0];if(!o)return null;const r=[{label:o.modelLabel,route:o.route,capability:o.capability,taskRationale:o.taskRationale,quota:o.quota,quotaRisk:o.quotaRisk},...o.alternatives.map(d=>({label:d.label,route:d.route,capability:d.capability,taskRationale:d.taskRationale,quota:d.quota,quotaRisk:d.quotaRisk}))],c=t[o.role],l=c?c.flatMap(d=>{const p=r.find(x=>k(x.route)===d);return p?[p]:[]}):r,h=d=>{const p=l.map(x=>k(x.route));i(x=>({...x,[o.role]:[d,...p.filter(v=>v!==d)]}))},u=B(l[0].route);return e.jsxs("div",{className:"hs-cascade-layout",children:[e.jsx("nav",{className:"hs-advisor-roles","aria-label":"Cascade roles",children:s.map(d=>e.jsx(ce,{assignment:d,selected:d.role===o.role,onSelect:()=>a(d.role)},d.role))}),e.jsxs("article",{className:"hs-cascade-editor",children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("span",{children:[o.roleLabel," · Failover Hierarchy"]}),e.jsx("h4",{children:"Task Escalation Sequence"}),e.jsx("p",{children:"Hierarchical fallback sequence when models encounter rate limits, timeouts, or task complexity thresholds."})]}),c?e.jsx("button",{type:"button",onClick:()=>i(d=>{const p={...d};return delete p[o.role],p}),children:"Reset suggested order"}):e.jsx("span",{children:"Default policy"})]}),e.jsx("ol",{className:"hs-cascade-workflow",children:l.map((d,p)=>{const x=k(d.route),v=p>0&&G(l[0],d),f=p===0?"Primary Route":p===1?"Secondary Fallback":"Tertiary Fallback",g=p===0?d.quotaRisk?`Initial target (⚠️ Quota Risk: ${d.quota.minimumRemainingPercent}% remaining) · ${d.taskRationale}`:`Initial execution target · ${d.taskRationale}`:p===1?v?`⭐️ Quota-safe route off ${l[0].quota.providerLabel} · ${d.taskRationale}`:`Triggered if primary encounters rate limits, errors, or complexity threshold · ${d.taskRationale}`:`Emergency baseline fallback · ${d.taskRationale}`;return e.jsxs("li",{className:"hs-cascade-node",children:[e.jsx("span",{className:"hs-cascade-node-index",children:p+1}),e.jsxs("div",{className:"hs-cascade-node-main",children:[e.jsx("span",{children:f}),e.jsx("strong",{children:d.label}),e.jsx("code",{children:A(d.route)}),e.jsx("p",{children:d.capability}),e.jsx("small",{children:g})]}),e.jsxs("div",{className:"hs-cascade-node-side",children:[e.jsx("em",{className:d.quotaRisk?"hs-advisor-tone--warn":"",children:d.quota.minimumRemainingPercent===null?"quota unknown":`${d.quota.minimumRemainingPercent}% quota remaining`}),p>0?e.jsx("button",{type:"button",onClick:()=>h(x),children:"Make primary"}):null]})]},`${o.role}:${x}`)})}),e.jsxs("section",{className:"hs-advisor-dispatch",children:[e.jsx("h5",{children:"Primary dispatch command"}),e.jsxs("div",{className:"hs-advisor-dispatch-snippet",children:[e.jsx("code",{children:u}),e.jsx(z,{text:u,label:"Copy primary command"})]})]})]})]})}function os({map:s,loading:n,bias:a,onBiasChange:t}){const[i,o]=m.useState("tasks"),r={tasks:"Task-first model routing: Map each role to the optimal cognitive profile and failover ladder.",models:"Model fleet inventory: Inspect cognitive strengths, guardrails, and assigned roles across all models.",cascades:"Failover & escalation rules: Review and customize the task escalation sequence for each role."};return e.jsxs("section",{className:"hs-advisor","aria-labelledby":"hs-orchestrator-map-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-advisor-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-orchestrator-map-title",children:"Orchestrator map"}),e.jsx("p",{children:r[i]})]}),e.jsxs("div",{className:"hs-advisor-head-tools",children:[e.jsx("span",{className:"hs-section-meta",children:n?"refreshing inputs":"advisory · no dispatch"}),e.jsxs("label",{className:"hs-routing-bias",children:[e.jsx("span",{children:"Routing bias"}),e.jsx("input",{type:"range",min:0,max:M.length-1,step:1,value:M.findIndex(c=>c.value===a),"aria-valuetext":M.find(c=>c.value===a)?.label,onChange:c=>{const l=M[Number(c.target.value)];l&&t(l.value)}}),e.jsx("small",{"aria-hidden":"true",children:M.map(c=>e.jsx("i",{"data-active":c.value===a?"true":void 0,children:c.label},c.value))})]})]})]}),e.jsx("div",{className:"hs-routing-angles",role:"group","aria-label":"Orchestrator map angle",children:[["tasks","Task map"],["models","Model fleet"],["cascades","Cascades"]].map(([c,l])=>e.jsx("button",{type:"button","aria-pressed":i===c,onClick:()=>o(c),children:l},c))}),i==="tasks"?e.jsx(ns,{map:s}):null,i==="models"?e.jsx(is,{models:s.models}):null,i==="cascades"?e.jsx(rs,{assignments:s.assignments}):null]})}function ls({rows:s,loading:n,onImported:a}){const t=ie.map(l=>({provider:l,row:s.find(h=>h.id===l.id)??null})),i=t.filter(({row:l})=>l?.gauge).length,o=t.filter(({row:l})=>l?.gauge?.kind==="quota").length,r=t.filter(({row:l})=>l?.gauge?.kind==="quota"&&l.gauge.plan||l?.gauge?.kind==="status").length,c=t.flatMap(({row:l})=>l?.gauge?.kind==="quota"?I(l.gauge):[]).map(l=>l.resetAt).filter(l=>l>Date.now()).sort((l,h)=>l-h)[0];return e.jsxs("section",{className:"hs-subscriptions","aria-labelledby":"hs-subscriptions-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-subscriptions-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-subscriptions-title",children:"Subscriptions"}),e.jsx("p",{children:"Plans, remaining allowance, reset windows, and the fastest path to each provider dashboard."})]}),e.jsxs("div",{className:"hs-subscription-summary","aria-label":"Subscription feed summary",children:[e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":i})," detected"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":o})," usage feeds"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":r})," plans named"]}),e.jsxs("span",{children:[e.jsx("strong",{children:n?"—":c?H(c):"-"})," next reset"]})]})]}),e.jsx("div",{className:"hs-subscription-grid",children:t.map(({provider:l,row:h})=>{const u=h?.gauge??null,d=n&&!u,p=d?"loading":u?"connected":"missing",x=u?.kind==="quota"?u.plan:u?.kind==="status"?u.statusLabel:null,v=Xe(u),f=u?.kind==="quota"?"Usage connected":u?.kind==="status"?u.detailLabel||"Subscription detected":d?"Checking":"Not detected";return e.jsxs("article",{className:`hs-subscription-card hs-subscription-card--${p}`,children:[e.jsxs("header",{className:"hs-subscription-card-head",children:[e.jsxs("div",{className:"hs-subscription-provider",children:[e.jsx(L,{harness:l.id,size:18,title:null,className:"hs-subscription-mark"}),e.jsxs("div",{children:[e.jsx("h4",{children:P(l.id)}),e.jsx("span",{children:d?"Checking local plan…":x||"Plan not reported"})]})]}),e.jsx("span",{className:`hs-subscription-state hs-subscription-state--${p}`,children:f})]}),e.jsx("p",{className:"hs-subscription-description",children:l.description}),d?e.jsx(ss,{}):u?.kind==="quota"?e.jsx("div",{className:"hs-subscription-windows",children:I(u).map(g=>e.jsx(es,{gauge:u,window:g},`${l.id}:${g.label}`))}):u?.kind==="status"?e.jsxs("div",{className:"hs-subscription-status-detail",children:[e.jsx("strong",{children:u.statusLabel}),e.jsx("span",{children:u.detailLabel||"Subscription detected locally. Open the provider dashboard for live usage."})]}):e.jsxs("div",{className:"hs-subscription-missing",children:[e.jsx("strong",{children:"No local subscription feed yet"}),e.jsx("span",{children:"Open the provider locally, then refresh Scout."})]}),l.id==="cursor"||l.id==="grok"&&u?.kind!=="quota"?e.jsx(Ze,{provider:l.id,onImported:a}):null,e.jsxs("footer",{className:"hs-subscription-footer",children:[e.jsxs("span",{children:[d?"checking local feed":v?`updated ${J(v)||"now"}`:u?"detected locally":"waiting for provider data",u?.source?` · ${u.source}`:""]}),e.jsx("nav",{"aria-label":`${P(l.id)} quick links`,children:l.links.map(g=>e.jsxs("a",{href:g.href,target:"_blank",rel:"noreferrer",children:[g.label,e.jsx(Y,{size:11,"aria-hidden":"true"})]},g.href))})]})]},l.id)})})]})}function cs({accounts:s,loading:n}){return s.length===0&&!n?null:e.jsxs("section",{className:"hs-cloud-accounts","aria-labelledby":"hs-cloud-accounts-title","aria-busy":n,children:[e.jsxs("div",{className:"hs-section-head hs-cloud-accounts-head",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"hs-cloud-accounts-title",children:"Cloud accounts"}),e.jsx("p",{children:"Infrastructure available to Scout for deployment and agent compute."})]}),e.jsx("span",{className:"hs-section-meta",children:n?"checking accounts":`${s.length} connected`})]}),e.jsxs("div",{className:"hs-cloud-grid",children:[n&&s.length===0?Array.from({length:3},(a,t)=>e.jsxs("article",{className:"hs-cloud-card hs-cloud-card--loading","aria-hidden":"true",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsx("span",{className:"hs-loading-mark"}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-title"})]}),e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-copy"}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsx("span",{className:"hs-loading-line hs-loading-line--cloud-meta"}),e.jsx("span",{className:"hs-loading-actions"})]})]},t)):null,s.map(a=>{const t=ze[a.id];return e.jsxs("article",{className:"hs-cloud-card",children:[e.jsxs("header",{className:"hs-cloud-card-head",children:[e.jsxs("div",{className:"hs-cloud-identity",children:[e.jsx(Qe,{provider:a.id}),e.jsxs("div",{children:[e.jsx("span",{className:"hs-cloud-category",children:t.category}),e.jsx("h4",{children:a.label})]})]}),e.jsx("span",{className:"hs-subscription-state hs-subscription-state--connected",children:a.statusLabel})]}),e.jsx("p",{className:"hs-cloud-description",children:t.description}),e.jsxs("footer",{className:"hs-cloud-card-footer",children:[e.jsxs("span",{className:"hs-cloud-connection",children:[e.jsx("span",{className:"hs-cloud-dot","aria-hidden":"true"}),a.detailLabel]}),e.jsx("nav",{"aria-label":`${a.label} quick links`,children:He[a.id].map(i=>e.jsxs("a",{href:i.href,target:"_blank",rel:"noreferrer",children:[i.label,e.jsx(Y,{size:11,"aria-hidden":"true"})]},i.href))})]})]},a.id)})]})]})}function xa({navigate:s}){const{route:n}=ge(),a=fe(n),[t]=m.useState(()=>me("/api/service-budgets",Ge)),[i,o]=m.useState(t?.gauges??[]),[r,c]=m.useState(t?.cloudAccounts??[]),[l,h]=m.useState("budget"),[u,d]=m.useState(()=>S(t?.generatedAt)??Date.now()),[p,x]=m.useState("balanced"),[v,f]=m.useState(t===null),[g,q]=m.useState(!1),[T,Q]=m.useState(null),_=m.useRef(0),W=m.useRef(t!==null),R=m.useCallback(async(y=!1,C=!1)=>{const E=++_.current;C&&!W.current&&f(!0),q(!0),Q(null);try{const w=await Z(`/api/service-budgets${y?"?refresh=1":""}`);if(E!==_.current)return;W.current=!0,o(w.gauges??[]),d(S(w.generatedAt)??Date.now()),c(w.cloudAccounts??[])}catch(w){E===_.current&&Q(w instanceof Error?w.message:String(w))}finally{E===_.current&&(f(!1),q(!1))}},[]);m.useEffect(()=>{let y=!1,C;return R(!1,!0).then(()=>{y||(C=window.setTimeout(()=>{R(!0)},600))}),()=>{y=!0,C!==void 0&&window.clearTimeout(C)}},[R]),m.useEffect(()=>{const y=window.setInterval(()=>{R(!1)},3e4);return()=>window.clearInterval(y)},[R]);const de=m.useMemo(()=>Je(i),[i]),ue=m.useMemo(()=>{const y=Date.now();return qe(as(i,u,y),{now:y,bias:p})},[u,p,i]),he=xe();return e.jsxs("div",{className:"s-ops",children:[he?e.jsx("div",{className:"s-ops-header",children:e.jsx(be,{activeRoute:{view:"harnesses",...a?{machineId:a}:{}},navigate:s})}):null,e.jsx("div",{className:"s-ops-body hs-body",children:e.jsxs("div",{className:"hs-page",children:[e.jsxs("header",{className:"hs-page-head",children:[e.jsxs("div",{className:"hs-title-group",children:[e.jsx("span",{className:"hs-kicker",children:"ops / provider central"}),e.jsx("h2",{children:"Agent Providers"}),e.jsx("p",{children:l==="budget"?"See what you pay for, how much remains, and where to use it.":"Map each kind of work to a model and provider route using live quota posture."})]}),e.jsxs("div",{className:"hs-page-actions",children:[e.jsxs("div",{className:"hs-view-switch",role:"group","aria-label":"Provider view",children:[e.jsx("button",{type:"button","aria-pressed":l==="budget",onClick:()=>h("budget"),children:"Budget"}),e.jsx("button",{type:"button","aria-pressed":l==="routing",onClick:()=>h("routing"),children:"Routing"})]}),e.jsxs("button",{type:"button",className:"hs-refresh",disabled:g,onClick:()=>{R(!0)},children:[e.jsx(ve,{size:14,className:g?"hs-refresh-icon-spinning":"","aria-hidden":"true"}),e.jsx("span",{children:g?"Refreshing":"Refresh"})]})]})]}),T&&e.jsxs("div",{className:"hs-error",role:"status","aria-live":"polite",children:["refresh: ",T]}),l==="budget"?e.jsxs("div",{id:"hs-budget-view",className:"hs-provider-view",children:[e.jsx(ls,{rows:de,loading:v,onImported:()=>R(!1)}),e.jsx(cs,{accounts:r,loading:v})]}):e.jsx("div",{id:"hs-routing-view",className:"hs-provider-view",children:e.jsx(os,{map:ue,loading:v,bias:p,onBiasChange:x})})]})})]})}export{xa as HarnessesScreen};