@openscout/scout 0.2.98 → 0.2.102

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 (622) hide show
  1. package/NOTICE +7 -0
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-DCALiEXY.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-fXndbzXT.js → AddProjectForm-DfbjlFfy.js} +1 -1
  6. package/dist/client/assets/AdventureEvidence-Dzz9VbuE.js +5 -0
  7. package/dist/client/assets/AdventureReader-ClMxT0e4.js +4 -0
  8. package/dist/client/assets/AdventureScenery-D548O0x4.js +1 -0
  9. package/dist/client/assets/AgentAdventures-NwTKeF0F.js +1 -0
  10. package/dist/client/assets/AgentAvatar-BIwg54Tj.js +1 -0
  11. package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +1 -0
  12. package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +1 -0
  13. package/dist/client/assets/AgentDetailCard-CFDE8TLi.js +1 -0
  14. package/dist/client/assets/AgentFloorView-l2wNKFob.js +1 -0
  15. package/dist/client/assets/AgentFloorWorld-BDJmXl3C.js +1 -0
  16. package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +1 -0
  17. package/dist/client/assets/{AgentLaneCard-Cc9uyfBr.js → AgentLaneCard-C6YmwPxQ.js} +1 -1
  18. package/dist/client/assets/{AgentLaneChrome-Dv2lBFoH.js → AgentLaneChrome-D9uJ4QY7.js} +1 -1
  19. package/dist/client/assets/{AgentLaneDetailSheet-CGqtqSHQ.js → AgentLaneDetailSheet-KYckCBCX.js} +2 -2
  20. package/dist/client/assets/{AgentLaneSummaryResize-Di4u6df2.js → AgentLaneSummaryResize-BBYBS3DO.js} +1 -1
  21. package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +1 -0
  22. package/dist/client/assets/{AgentLanesPreflight-CCGBArIb.js → AgentLanesPreflight-pw2vMO3Q.js} +1 -1
  23. package/dist/client/assets/AgentLanesView-aAyC7lHf.js +2 -0
  24. package/dist/client/assets/AgentLiveActions-lYzicnNa.js +1 -0
  25. package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +1 -0
  26. package/dist/client/assets/AgentSessions-Cox2zS-e.js +6 -0
  27. package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +1 -0
  28. package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +1 -0
  29. package/dist/client/assets/AgentsSubnav-BOobgtGE.js +1 -0
  30. package/dist/client/assets/{AstronautSuit-CwB4Dw07.js → AstronautSuit-C-4I5YKi.js} +1 -1
  31. package/dist/client/assets/AtopView-DKm-ERYC.js +1 -0
  32. package/dist/client/assets/BackToPicker-Bys9ColC.js +1 -0
  33. package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +1 -0
  34. package/dist/client/assets/BriefingsScreen-D4Zf31Y6.js +1 -0
  35. package/dist/client/assets/{BrokerMetadataPanel-BJSwU9XZ.js → BrokerMetadataPanel-1GoSl2BV.js} +1 -1
  36. package/dist/client/assets/BrokerScreen-CejzhRsB.js +8 -0
  37. package/dist/client/assets/{CastPicker-CkgTalIt.js → CastPicker-BuwE_JQp.js} +1 -1
  38. package/dist/client/assets/CharacterFamilyPreview-BniL8sEL.css +1 -0
  39. package/dist/client/assets/CharacterFamilyPreview-CfO3j8Of.js +1 -0
  40. package/dist/client/assets/ChatCollapsedStrip-TV0j1xTB.js +1 -0
  41. package/dist/client/assets/{CodeDiffPane-DfluIWmO.js → CodeDiffPane-DB6-mqtX.js} +1 -1
  42. package/dist/client/assets/{CodeProjectPicker-By_Wz9ex.js → CodeProjectPicker-B_LNLpIK.js} +1 -1
  43. package/dist/client/assets/CodeScreen-C9H160XS.js +1 -0
  44. package/dist/client/assets/CommsCanvas-BR2YS76H.css +1 -0
  45. package/dist/client/assets/CommsCanvas-DOKw3Q8i.js +1 -0
  46. package/dist/client/assets/CommsDeck-C18JA7rK.js +1 -0
  47. package/dist/client/assets/CommsFlowGraph-Czg-KTS0.js +1 -0
  48. package/dist/client/assets/CommsFlowGraph-vQucylxF.css +1 -0
  49. package/dist/client/assets/CommsFlowMap-CzBWvSa5.js +1 -0
  50. package/dist/client/assets/CommsSelection-g1twA-Lb.js +1 -0
  51. package/dist/client/assets/{ConversationComposer-BUIjWMBi.js → ConversationComposer-B7RU6LKd.js} +1 -1
  52. package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +1 -0
  53. package/dist/client/assets/ConversationHeader-CCSU8uo_.js +1 -0
  54. package/dist/client/assets/ConversationPanels-C9yCAoJy.js +6 -0
  55. package/dist/client/assets/ConversationScreen-Brfas2y0.css +1 -0
  56. package/dist/client/assets/ConversationScreen-tTP6B_F-.js +2 -0
  57. package/dist/client/assets/ConversationStatus-CK-YfLpi.js +1 -0
  58. package/dist/client/assets/{CrewAvatar-CZ_faQ_s.js → CrewAvatar-CJhuqTsJ.js} +1 -1
  59. package/dist/client/assets/CrewSprite-DsQJdu3Z.css +1 -0
  60. package/dist/client/assets/CrewSprite-hgpA3SWB.js +1 -0
  61. package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +1 -0
  62. package/dist/client/assets/{DataTable-C6aMSilS.js → DataTable-BMOZ1-z8.js} +1 -1
  63. package/dist/client/assets/DispatchAftermath-DDlwqSCY.js +1 -0
  64. package/dist/client/assets/DocumentFocusViewer-f12RRQpV.js +1 -0
  65. package/dist/client/assets/{EmbeddableSurfacesLab-D3iZiS8o.js → EmbeddableSurfacesLab-DGl9EMRV.js} +1 -1
  66. package/dist/client/assets/{EmptyState-CKPWFSjq.js → EmptyState-uyYN5piI.js} +1 -1
  67. package/dist/client/assets/{FileViewerPane-CxNbcTYf.js → FileViewerPane-HtiDbj9N.js} +2 -2
  68. package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +1 -0
  69. package/dist/client/assets/FloorContextSheet-DV-SYA0K.js +1 -0
  70. package/dist/client/assets/FloorExchangePanel-B3TFhjLk.css +1 -0
  71. package/dist/client/assets/FloorExchangePanel-D59nvRCF.js +1 -0
  72. package/dist/client/assets/FloorMessagePasses-BCwsz9VS.js +1 -0
  73. package/dist/client/assets/FloorMessagePasses-nxwwiUom.css +1 -0
  74. package/dist/client/assets/FloorReplay-BHo79HCD.js +1 -0
  75. package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +1 -0
  76. package/dist/client/assets/FloorSavedWork-2tjBoy06.js +1 -0
  77. package/dist/client/assets/FloorTacticalHUD-Bngao6sn.js +1 -0
  78. package/dist/client/assets/FollowScreen-eHXOlK-u.js +1 -0
  79. package/dist/client/assets/{HarnessMark-DttReffF.js → HarnessMark-Bt47OeHy.js} +1 -1
  80. package/dist/client/assets/HarnessesScreen-M84sFjWY.js +1 -0
  81. package/dist/client/assets/{HerdrSession-DsuxCtfX.js → HerdrSession-CtJOUn7H.js} +3 -3
  82. package/dist/client/assets/{HomeHero-DXJo2QSO.js → HomeHero-Cvwx2H0w.js} +1 -1
  83. package/dist/client/assets/HostAdvisorView-CTJXIc1Q.js +1 -0
  84. package/dist/client/assets/KnowledgeSearchInspector-DwGMVmFL.js +1 -0
  85. package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +1 -0
  86. package/dist/client/assets/{LaneToolHoverCard-t7-XJP-h.js → LaneToolHoverCard-C6YehJqD.js} +1 -1
  87. package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +1 -0
  88. package/dist/client/assets/{LaneTraceEventFocus-BB5DhFQm.js → LaneTraceEventFocus-WLNZZVi_.js} +1 -1
  89. package/dist/client/assets/MeshCanvas-FDDGE69h.js +3 -0
  90. package/dist/client/assets/MeshCanvasMinimap-CGRzQCac.js +1 -0
  91. package/dist/client/assets/MeshScreen-DlfiMlaR.js +1 -0
  92. package/dist/client/assets/{MeshTopologyView-Dc0GSrKa.js → MeshTopologyView-C2Cv_2gx.js} +2 -2
  93. package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +1 -0
  94. package/dist/client/assets/MissionContextRail-CVSZJnvX.js +1 -0
  95. package/dist/client/assets/MissionControlView-DpGhxG4a.js +1 -0
  96. package/dist/client/assets/MissionFocusOverlay-B9SiuO-i.js +1 -0
  97. package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +1 -0
  98. package/dist/client/assets/MissionLogPane-CMBiI29U.js +1 -0
  99. package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +1 -0
  100. package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +1 -0
  101. package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +1 -0
  102. package/dist/client/assets/NewAgentModal-Cl4nsGhu.js +1 -0
  103. package/dist/client/assets/NewChatComposer-JjLbm3W2.js +19 -0
  104. package/dist/client/assets/{NewChatOrigin-DCn5cWPZ.js → NewChatOrigin-CyPPWTJP.js} +1 -1
  105. package/dist/client/assets/NodeDetailPanel-BUG8rOb-.js +1 -0
  106. package/dist/client/assets/NodeMenu-Fw8ATWQA.js +1 -0
  107. package/dist/client/assets/ObserveEmbedScreen-BPiSXXvm.js +2 -0
  108. package/dist/client/assets/{ObserveTextFlow-DCJ5EmD8.js → ObserveTextFlow-ET0dD1wO.js} +2 -2
  109. package/dist/client/assets/{ObservedTopologyPanel-CJVqIqQ2.js → ObservedTopologyPanel-DkEkQzo-.js} +1 -1
  110. package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +22 -0
  111. package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +1 -0
  112. package/dist/client/assets/OpsScreen-DJq-aBmX.js +1 -0
  113. package/dist/client/assets/OpsSubnav-9sURjajO.js +1 -0
  114. package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +1 -0
  115. package/dist/client/assets/{ProjectAgentProfileBar-CUzZ4Rpx.js → ProjectAgentProfileBar-C1fR65Eh.js} +1 -1
  116. package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +1 -0
  117. package/dist/client/assets/ProjectsInbox-Bs8I__my.js +2 -0
  118. package/dist/client/assets/ProjectsRail-Deb38OJ1.js +1 -0
  119. package/dist/client/assets/ProjectsScreen-CgLiYiss.js +1 -0
  120. package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +1 -0
  121. package/dist/client/assets/Provider-5Hotn7NQ.js +5 -0
  122. package/dist/client/assets/{RailRow-B0sRaJc6.css → RailRow-B25zKEub.css} +1 -1
  123. package/dist/client/assets/RailRow-BYguXNm4.js +1 -0
  124. package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +1 -0
  125. package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +1 -0
  126. package/dist/client/assets/RenderedWorkerSprite-CvdWO32C.js +1 -0
  127. package/dist/client/assets/RenderedWorkerSprite-qnTfkd_4.css +1 -0
  128. package/dist/client/assets/ReplayClock-B7JLTp8A.js +1 -0
  129. package/dist/client/assets/ReplayLog-DZTpf2CW.js +1 -0
  130. package/dist/client/assets/ReplayOutpost-CvWQa30T.js +1 -0
  131. package/dist/client/assets/ReplayOutpost-Y1DvZgeu.css +1 -0
  132. package/dist/client/assets/{RepoDiffEmbedScreen-mexrJPhW.js → RepoDiffEmbedScreen-Cbu0_PJW.js} +1 -1
  133. package/dist/client/assets/{RepoDiffPageScreen-DbqX4L3q.js → RepoDiffPageScreen-Chwm6GXL.js} +1 -1
  134. package/dist/client/assets/RepoDiffViewer-C2mb0Wj-.js +7 -0
  135. package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +2 -0
  136. package/dist/client/assets/{ReposScreen-CzbO1Fuy.js → ReposScreen-C7JZQmyh.js} +2 -2
  137. package/dist/client/assets/RiggedWorkerCharacter-BpYECnyK.css +1 -0
  138. package/dist/client/assets/RiggedWorkerCharacter-DNe731GE.js +1 -0
  139. package/dist/client/assets/SageModelStudio-768dRQr4.css +1 -0
  140. package/dist/client/assets/SageModelStudio-BR1J2D4R.js +4108 -0
  141. package/dist/client/assets/ScoutDeckSurface-flRamdvE.js +1 -0
  142. package/dist/client/assets/{ScoutSurface-NlhDsPzg.js → ScoutSurface-BpklGmDL.js} +1 -1
  143. package/dist/client/assets/{ScoutbotFxLab-l2WAahCg.js → ScoutbotFxLab-DeK7ySWZ.js} +1 -1
  144. package/dist/client/assets/{SecondaryNav-Cs0_FQdj.js → SecondaryNav-BkTn5tkq.js} +1 -1
  145. package/dist/client/assets/SessionEmbedScreen-CcQN6xlo.js +1 -0
  146. package/dist/client/assets/{SessionObserve-CLrHfAKZ.css → SessionObserve-BOBJSfs0.css} +1 -1
  147. package/dist/client/assets/SessionObserve-DaqDhqDI.js +12 -0
  148. package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +1 -0
  149. package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +1 -0
  150. package/dist/client/assets/SessionsScreen-R8QKvoey.js +1 -0
  151. package/dist/client/assets/SettingsDrawer-BDapR4E9.js +3 -0
  152. package/dist/client/assets/SettingsScreen-DirtO7Z0.js +1 -0
  153. package/dist/client/assets/SharedFloorCharacter-Bi5_md4R.css +1 -0
  154. package/dist/client/assets/SharedFloorCharacter-CSYG_t9t.js +1 -0
  155. package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +1 -0
  156. package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +2 -0
  157. package/dist/client/assets/{ShikiPane-C0TuCATU.js → ShikiPane-BudrOxNK.js} +1 -1
  158. package/dist/client/assets/{SlidePanel-CETQ5NTx.js → SlidePanel-Datu7XG4.js} +1 -1
  159. package/dist/client/assets/SpriteAvatar-BW1JzkDt.js +1 -0
  160. package/dist/client/assets/SproutActionSprite-DveCzg6l.js +1 -0
  161. package/dist/client/assets/{StatusPill-BllrY-eg.js → StatusPill-MxYClPG5.js} +1 -1
  162. package/dist/client/assets/{TailView-_gKWfaQM.js → TailView-Dn7uWmPz.js} +2 -2
  163. package/dist/client/assets/Terminal-D-DsQlmV.js +4 -0
  164. package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +1 -0
  165. package/dist/client/assets/TerminalHeaderMount-DCGstkZ4.js +1 -0
  166. package/dist/client/assets/{TextDocumentSurface-2X1Gw4eA.js → TextDocumentSurface-BhYvAB0o.js} +1 -1
  167. package/dist/client/assets/{TmuxPeek-CqTJRhkI.js → TmuxPeek-BhK0V9Qt.js} +1 -1
  168. package/dist/client/assets/{VoicePermissionsPanel-C4vkU-sU.js → VoicePermissionsPanel-CecFWzva.js} +1 -1
  169. package/dist/client/assets/{WorkDetailScreen-DqGnuK0e.js → WorkDetailScreen-CwtRCm_-.js} +4 -4
  170. package/dist/client/assets/WorkFilesViewer-DJHftsH9.js +1 -0
  171. package/dist/client/assets/WorkRunView-CxwAZ2QQ.css +1 -0
  172. package/dist/client/assets/WorkRunView-x5PH1byG.js +1 -0
  173. package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +1 -0
  174. package/dist/client/assets/WorldCharacter-Dn4sIXNP.js +1 -0
  175. package/dist/client/assets/WorldMinimap-Blqg0d5r.js +1 -0
  176. package/dist/client/assets/WorldSky-DV9bpvXj.js +1 -0
  177. package/dist/client/assets/{activity-CzTJ-YMX.js → activity-CSUhvjD0.js} +1 -1
  178. package/dist/client/assets/{addon-fit-Zx3A7pGS.js → addon-fit-MR98IWES.js} +1 -1
  179. package/dist/client/assets/{addon-webgl-DitJj-N0.js → addon-webgl-CIIKXrvK.js} +1 -1
  180. package/dist/client/assets/adventure-evidence-DgQbBmfa.css +1 -0
  181. package/dist/client/assets/adventure-habitats-v1-CVMbdB_Z.png +0 -0
  182. package/dist/client/assets/adventure-habitats-v1-M1lcpTJh.js +1 -0
  183. package/dist/client/assets/adventure-playback-DTfkhIc0.js +3 -0
  184. package/dist/client/assets/adventure-reader-DM5UDDm9.css +1 -0
  185. package/dist/client/assets/agent-adventures-DZtWpj6k.css +1 -0
  186. package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +10 -0
  187. package/dist/client/assets/{agent-essentials-K9B6kbTS.js → agent-essentials-8t2il7PV.js} +1 -1
  188. package/dist/client/assets/{agent-floor-CuJr1iK1.css → agent-floor-Dmr9hZHL.css} +1 -1
  189. package/dist/client/assets/agent-floor-actor-3v9drnxh.js +1 -0
  190. package/dist/client/assets/agent-floor-world-Bnd1AtwK.css +1 -0
  191. package/dist/client/assets/agent-floor-world-layout-hfMjuoui.js +1 -0
  192. package/dist/client/assets/agent-lane-card-model-l0stnU9N.js +1 -0
  193. package/dist/client/assets/{agent-lane-detail-ppJId6Jc.js → agent-lane-detail-Db7KyAlf.js} +1 -1
  194. package/dist/client/assets/{agent-lane-preview-BhplDYGf.js → agent-lane-preview-B8lsQJOQ.js} +1 -1
  195. package/dist/client/assets/{agent-lanes-DlqcEf0l.css → agent-lanes-DmgipV9D.css} +1 -1
  196. package/dist/client/assets/agent-lanes-model-CX0wTcnF.js +4 -0
  197. package/dist/client/assets/agent-master-THmq-1k8.css +1 -0
  198. package/dist/client/assets/agent-master-model-C-KdOFDK.js +1 -0
  199. package/dist/client/assets/{agent-specialization-CtF_jI34.js → agent-specialization-CiVxQsFT.js} +1 -1
  200. package/dist/client/assets/agent-state-DDhnFEEP.js +1 -0
  201. package/dist/client/assets/{api-HFH8wFyb.js → api-B9_IqFKY.js} +1 -1
  202. package/dist/client/assets/api-CaROe5_H.js +1 -0
  203. package/dist/client/assets/{arc.es-BNXJqSw7.js → arc.es-BzhWalCl.js} +1 -1
  204. package/dist/client/assets/{arrow-down-BAGkhHA6.js → arrow-down-WoVlkUmg.js} +1 -1
  205. package/dist/client/assets/{arrow-left-eToA6GxC.js → arrow-left-PuKdO3NM.js} +1 -1
  206. package/dist/client/assets/{arrow-right-DTX42clh.js → arrow-right-ldbfp4SZ.js} +1 -1
  207. package/dist/client/assets/{arrow-up-right-B09GPwFl.js → arrow-up-right-Hn754ybA.js} +1 -1
  208. package/dist/client/assets/book-open-BlJnpf2U.js +1 -0
  209. package/dist/client/assets/{bot-WxKXYtEX.js → bot-CfN9PSBF.js} +1 -1
  210. package/dist/client/assets/broker-display-BkBzyvbR.js +2 -0
  211. package/dist/client/assets/{cache-CeWH_KzJ.js → cache-DEy9E34b.js} +1 -1
  212. package/dist/client/assets/{check-Dz2SRHft.js → check-B8dMv3Is.js} +1 -1
  213. package/dist/client/assets/{chevron-down-D120PY4g.js → chevron-down-B5eMsn5c.js} +1 -1
  214. package/dist/client/assets/{chevron-right-CowuvuE6.js → chevron-right-C7UGFpkl.js} +1 -1
  215. package/dist/client/assets/chevron-up-BHOEgHcn.js +1 -0
  216. package/dist/client/assets/{chunk-HRAB3GC3-KjjrTLCU.js → chunk-HRAB3GC3-C5X-kFhb.js} +1 -1
  217. package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +46 -0
  218. package/dist/client/assets/{chunk-T65CQEWV-H2QEKfr1.js → chunk-T65CQEWV-CSVUz2rY.js} +1 -1
  219. package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +2 -0
  220. package/dist/client/assets/{clock-_9FDplIT.js → clock-DFcRbtrl.js} +1 -1
  221. package/dist/client/assets/{code-xml-CkkNdRmu.js → code-xml-BmyLM0I2.js} +1 -1
  222. package/dist/client/assets/coffee-C_D9zooM.js +1 -0
  223. package/dist/client/assets/colors-CFlbwC25.js +1 -0
  224. package/dist/client/assets/comms-deck-C8nVeMBh.css +1 -0
  225. package/dist/client/assets/comms-deck-CBhsXnY-.js +2 -0
  226. package/dist/client/assets/comms-gesture-_aGFo6g3.js +2 -0
  227. package/dist/client/assets/{compass-BdpImt_W.js → compass-DTZdCpv9.js} +1 -1
  228. package/dist/client/assets/content-B5Q4pb9R.js +1 -0
  229. package/dist/client/assets/content-BK1IfOZs.js +1 -0
  230. package/dist/client/assets/content-BeEsWLEm.js +1 -0
  231. package/dist/client/assets/content-BkOwEknW.js +1 -0
  232. package/dist/client/assets/content-C32W5kAG.js +1 -0
  233. package/dist/client/assets/content-CoqyLs9v.js +1 -0
  234. package/dist/client/assets/content-CwpdIS5b.js +1 -0
  235. package/dist/client/assets/content-DS2OkJ3Q.js +1 -0
  236. package/dist/client/assets/content-DXKaPDfn.js +1 -0
  237. package/dist/client/assets/content-DZt5-dkI.js +1 -0
  238. package/dist/client/assets/content-DbQJH8L1.js +1 -0
  239. package/dist/client/assets/content-DetoiaHq.js +1 -0
  240. package/dist/client/assets/content-Dhu3wL7J.js +1 -0
  241. package/dist/client/assets/content-Dpv34iZu.js +1 -0
  242. package/dist/client/assets/content-TtQJb61D.js +1 -0
  243. package/dist/client/assets/content-ymNb2R7g.js +1 -0
  244. package/dist/client/assets/{context-budget-DqxWzalx.js → context-budget-DemtXu7E.js} +1 -1
  245. package/dist/client/assets/{conversation-icons-DHGc9wbT.js → conversation-icons-BQ4OeOmr.js} +1 -1
  246. package/dist/client/assets/conversation-model-BGFHoxQ0.js +1 -0
  247. package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +1 -0
  248. package/dist/client/assets/conversations-Cbg9h_Af.js +1 -0
  249. package/dist/client/assets/{copy-BzdzWsQd.js → copy-D9WUpQRf.js} +1 -1
  250. package/dist/client/assets/{cpu-CHFIGw87.js → cpu-Ck_4tB_-.js} +1 -1
  251. package/dist/client/assets/{createLucideIcon-Dv8H8m7J.js → createLucideIcon-DkjnzvcJ.js} +1 -1
  252. package/dist/client/assets/{credentials-BTce3VP1.js → credentials-C4VXz2hr.js} +1 -1
  253. package/dist/client/assets/discover-C8IOY7_K.js +2 -0
  254. package/dist/client/assets/embed-entry-CG3CfCbm.js +2 -0
  255. package/dist/client/assets/embed-navigation-DayfkQau.js +1 -0
  256. package/dist/client/assets/{external-link-BvX5PfLh.js → external-link-RT4Ph-6-.js} +1 -1
  257. package/dist/client/assets/{eye-C9cGk5z6.js → eye-CtqSV8BS.js} +1 -1
  258. package/dist/client/assets/{file-code-corner-jlGFdr8d.js → file-code-corner-D_Aptal2.js} +1 -1
  259. package/dist/client/assets/{file-text-BHro8MkG.js → file-text-ChtICwub.js} +1 -1
  260. package/dist/client/assets/flag-CqdOxVkI.js +1 -0
  261. package/dist/client/assets/floor-character-name-CqJPOlXb.js +1 -0
  262. package/dist/client/assets/floor-context-model-DZBpo_oD.js +1 -0
  263. package/dist/client/assets/floor-context-sheet-BFnkFiY3.css +1 -0
  264. package/dist/client/assets/floor-memory-YMM8AlLY.js +1 -0
  265. package/dist/client/assets/floor-message-passes-CJh9f8Jp.js +1 -0
  266. package/dist/client/assets/floor-preview-text-HrORUJ7D.js +1 -0
  267. package/dist/client/assets/floor-replay-CccYqE-f.css +1 -0
  268. package/dist/client/assets/floor-tactical-hud-HL5Vja5Y.css +1 -0
  269. package/dist/client/assets/folder-0fWevPvQ.js +1 -0
  270. package/dist/client/assets/{gauge-DSflSery.js → gauge-Dgtfxf_o.js} +1 -1
  271. package/dist/client/assets/{gestures-YA5IIwp-.js → gestures-BDCZ1FRG.js} +1 -1
  272. package/dist/client/assets/{git-branch-Bc_eDIpG.js → git-branch-CA3cHKCI.js} +1 -1
  273. package/dist/client/assets/go-shortcuts-DKtw4qYx.js +1 -0
  274. package/dist/client/assets/home-moving-signal-B7m-ngb2.js +1 -0
  275. package/dist/client/assets/home-now-card-DduXkHRR.js +1 -0
  276. package/dist/client/assets/{home-now-card-nano-Jmy7eJ6H.js → home-now-card-nano-D1ScGrgv.js} +1 -1
  277. package/dist/client/assets/hooks-C6VyQTQe.js +2 -0
  278. package/dist/client/assets/{hooks-D6NI15f6.css → hooks-D787lBmm.css} +1 -1
  279. package/dist/client/assets/index-C5cX8dkl.js +1 -0
  280. package/dist/client/assets/{index-C1VaWNuD.js → index-C8uS5szO.js} +5 -5
  281. package/dist/client/assets/index-Ck1__1yL.css +1 -0
  282. package/dist/client/assets/index-ClOOrVG1.js +1 -0
  283. package/dist/client/assets/index-Crtgfc9I.js +1 -0
  284. package/dist/client/assets/index-CvsM3jm8.js +1 -0
  285. package/dist/client/assets/{inspector-panel-CwrHjRaQ.js → inspector-panel-BLhDODb3.js} +2 -2
  286. package/dist/client/assets/{keyboard-nav-B8sQ_8IF.js → keyboard-nav-CXfav14z.js} +1 -1
  287. package/dist/client/assets/knowledge-search-BNdQweGz.css +1 -0
  288. package/dist/client/assets/{lane-edit-display-C_Aujldz.js → lane-edit-display-BjdT9oZl.js} +1 -1
  289. package/dist/client/assets/{lane-observe-vfyACHi0.js → lane-observe-BD21P8BB.js} +2 -2
  290. package/dist/client/assets/lane-roster-store-DzNHP392.js +1 -0
  291. package/dist/client/assets/{lane-tool-detail-0WhMf4Vj.js → lane-tool-detail-Czggx8oM.js} +1 -1
  292. package/dist/client/assets/{layers-CW2-qHsG.js → layers-Bolb8ejU.js} +1 -1
  293. package/dist/client/assets/{layout-grid-BoVnPOk-.js → layout-grid-DI9tVJ2E.js} +1 -1
  294. package/dist/client/assets/left-B-_z_nqj.js +2 -0
  295. package/dist/client/assets/left-B1LY7rJc.js +1 -0
  296. package/dist/client/assets/{left-DH44V4I_.css → left-BV9yMiTL.css} +1 -1
  297. package/dist/client/assets/left-C6bdjWcG.js +2 -0
  298. package/dist/client/assets/left-CF4iuqlz.js +1 -0
  299. package/dist/client/assets/left-DLtNyZl1.js +1 -0
  300. package/dist/client/assets/left-Fpxoq-VY.js +1 -0
  301. package/dist/client/assets/left-N2wXfTlp.js +1 -0
  302. package/dist/client/assets/left-advisor-CeIjCKbd.js +1 -0
  303. package/dist/client/assets/left-agents-upjHVlOj.js +1 -0
  304. package/dist/client/assets/left-default-08gmdCtb.js +1 -0
  305. package/dist/client/assets/left-lanes-Cvsp73Hw.js +1 -0
  306. package/dist/client/assets/left-mission-DENnfshd.css +1 -0
  307. package/dist/client/assets/left-mission-W1LLaz74.js +1 -0
  308. package/dist/client/assets/library-DLKBVUJ6.js +1 -0
  309. package/dist/client/assets/{loader-circle-DmUG_YC7.js → loader-circle-DurUYl7E.js} +1 -1
  310. package/dist/client/assets/{local-agents-VP1-ZlPw.js → local-agents-D9fYYRyj.js} +1 -1
  311. package/dist/client/assets/machine-children-RGS4Q0r6.js +1 -0
  312. package/dist/client/assets/machine-scope-DJt9RZ2w.js +1 -0
  313. package/dist/client/assets/mentions-Ctw1ECUC.js +1 -0
  314. package/dist/client/assets/{mesh-ops-CKSWgax2.js → mesh-ops-CGpRk4ik.js} +1 -1
  315. package/dist/client/assets/{mesh-screen-D1Yvo8fU.css → mesh-screen-DjA4mOaN.css} +1 -1
  316. package/dist/client/assets/mesh-view-store-CliSYsmt.js +1 -0
  317. package/dist/client/assets/{message-circle-joGFxfj1.js → message-circle-CSiJj6yo.js} +1 -1
  318. package/dist/client/assets/{message-markup-DC0QFEZn.js → message-markup-DgFSyb3f.js} +1 -1
  319. package/dist/client/assets/{message-square-BLiFqpe_.js → message-square-NmXWtWLR.js} +1 -1
  320. package/dist/client/assets/{message-visibility-CGOmSSKs.js → message-visibility-DwxgcgYK.js} +1 -1
  321. package/dist/client/assets/mission-control-CsX3Yc58.css +1 -0
  322. package/dist/client/assets/mission-control-model-C30vU1Fe.js +1 -0
  323. package/dist/client/assets/mission-control-store-DZ29Mlj1.js +1 -0
  324. package/dist/client/assets/{mission-wall-CocIM1cF.js → mission-wall-DOuGOxQy.js} +1 -1
  325. package/dist/client/assets/nav-destinations-CyXnw9kh.js +1 -0
  326. package/dist/client/assets/observe-CkfOxYx_.js +1 -0
  327. package/dist/client/assets/{operator-attention-RqieiSY8.js → operator-attention-DGR4kOog.js} +1 -1
  328. package/dist/client/assets/ops-screen-CxYM0VOW.css +1 -0
  329. package/dist/client/assets/page-status-CkS3SZu-.js +1 -0
  330. package/dist/client/assets/panel-right-BNTJhy8M.js +1 -0
  331. package/dist/client/assets/pause-DWS7YGQ3.js +1 -0
  332. package/dist/client/assets/{persistent-state-BubPQ7tT.js → persistent-state-xsuk6Kc-.js} +1 -1
  333. package/dist/client/assets/pin-DWlD1BOF.js +1 -0
  334. package/dist/client/assets/pip-idle-v1-Tt-CZsRG.png +0 -0
  335. package/dist/client/assets/pip-thinking-v1-BoHWSEye.png +0 -0
  336. package/dist/client/assets/pip-waiting-v1-DkuvJ-dN.png +0 -0
  337. package/dist/client/assets/pip-working-v1-wWQLRS1z.png +0 -0
  338. package/dist/client/assets/play-D_Pggug4.js +1 -0
  339. package/dist/client/assets/{plus-BWKhylds.js → plus-D_wLGJGT.js} +1 -1
  340. package/dist/client/assets/profile-C3KgiZvc.js +1 -0
  341. package/dist/client/assets/{projects-inbox-DFbgVlXL.js → projects-inbox-DvbqJO3q.js} +1 -1
  342. package/dist/client/assets/{proxy-DVDRhSRR.js → proxy-DOG46ja4.js} +1 -1
  343. package/dist/client/assets/{radio-CxIXS1nU.js → radio-C_jtwbFP.js} +1 -1
  344. package/dist/client/assets/{refresh-cw-Bkh7Cvnd.js → refresh-cw-Da9DDLk2.js} +1 -1
  345. package/dist/client/assets/resolve-panes-DuowGRTk.js +1 -0
  346. package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +1 -0
  347. package/dist/client/assets/right-B9OUA6Ho.js +1 -0
  348. package/dist/client/assets/right-BDQnjetX.js +1 -0
  349. package/dist/client/assets/{right-DVUq5374.js → right-BLJsc2-p.js} +2 -2
  350. package/dist/client/assets/right-BUbKHmRH.js +1 -0
  351. package/dist/client/assets/right-Ci2IcD4s.js +1 -0
  352. package/dist/client/assets/right-CmCce3e5.js +1 -0
  353. package/dist/client/assets/right-D7w0zM5a.js +1 -0
  354. package/dist/client/assets/right-DIoON_bv.js +1 -0
  355. package/dist/client/assets/right-E0Jr3VN5.js +1 -0
  356. package/dist/client/assets/right-lCdAk9dW.js +1 -0
  357. package/dist/client/assets/{rocket-CnxqjX_K.js → rocket-DyrYDo8V.js} +1 -1
  358. package/dist/client/assets/router-BKiMcYa7.js +1 -0
  359. package/dist/client/assets/{runtime-picker-BYAFNLNq.css → runtime-picker-C3JwrDKP.css} +1 -1
  360. package/dist/client/assets/runtime-picker-DdsttHHc.js +1 -0
  361. package/dist/client/assets/{scope-views-KPY85UUx.js → scope-views-B7PZGlhY.js} +1 -1
  362. package/dist/client/assets/scout-voice-DOQ_B77g.js +1 -0
  363. package/dist/client/assets/{scoutbot-D7kGGyK_.js → scoutbot-Bk3nyrkj.js} +2 -2
  364. package/dist/client/assets/{scoutbot-markdown-yb87JlSE.js → scoutbot-markdown-Bz0Vbto2.js} +1 -1
  365. package/dist/client/assets/{scroll-text-DFcBYy5J.js → scroll-text-DwC8r2g6.js} +1 -1
  366. package/dist/client/assets/{search-FB2vVxCp.js → search-C4VlW_0l.js} +1 -1
  367. package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +1 -0
  368. package/dist/client/assets/{selection-bridge-qBGFCJv8.js → selection-bridge-B5jqyMR9.js} +1 -1
  369. package/dist/client/assets/{send-horizontal-CS7mxVhX.js → send-horizontal-pOtGI7FM.js} +1 -1
  370. package/dist/client/assets/send-to-agent-session-BZGq_ycy.js +1 -0
  371. package/dist/client/assets/{server-WY6gsbZz.js → server-ms1yxUYJ.js} +1 -1
  372. package/dist/client/assets/{session-catalog-CG4oL_yN.js → session-catalog-s-T_w41t.js} +1 -1
  373. package/dist/client/assets/{session-table-uJh3v-ly.js → session-table-CDx_16xf.js} +1 -1
  374. package/dist/client/assets/sessions-view-DzYGsKWS.js +1 -0
  375. package/dist/client/assets/{settings-DQEtqkM9.js → settings-TJIkkZ0P.js} +1 -1
  376. package/dist/client/assets/shared-work-artifacts-4IIQXQfc.js +1 -0
  377. package/dist/client/assets/{sliders-horizontal-57e99_qO.js → sliders-horizontal-CHf3ntw0.js} +1 -1
  378. package/dist/client/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png +0 -0
  379. package/dist/client/assets/{sparkles-D0vWLTyC.js → sparkles-BbOFw3d0.js} +1 -1
  380. package/dist/client/assets/sprout-action-sprite-DZ8C0fTl.css +1 -0
  381. package/dist/client/assets/sprout-actions-proof-v1-BzUdc812.png +0 -0
  382. package/dist/client/assets/{sse-B29iGBnw.js → sse-v5QLsOHV.js} +1 -1
  383. package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +1 -0
  384. package/dist/client/assets/{tail-display-DcliDVkW.js → tail-display-DHSNmvor.js} +2 -2
  385. package/dist/client/assets/{tail-events-LK29oCKm.js → tail-events-DQ46QBW1.js} +1 -1
  386. package/dist/client/assets/{terminal-UDy4lzV1.js → terminal-96JWDYDL.js} +1 -1
  387. package/dist/client/assets/{terminal-relay-CXHMdain.js → terminal-relay-Bfx8pg80.js} +1 -1
  388. package/dist/client/assets/terminal-screen-Bpb2SZrn.css +1 -0
  389. package/dist/client/assets/{terminal-sessions-Bdt2W3Y4.js → terminal-sessions-Ch9aYlgi.js} +1 -1
  390. package/dist/client/assets/{terminal-takeover-BMeBjBB2.js → terminal-takeover-BlpxpvSp.js} +1 -1
  391. package/dist/client/assets/use-beside-Df-F2Uvg.js +1 -0
  392. package/dist/client/assets/use-conversation-list-A_YUf8lo.js +1 -0
  393. package/dist/client/assets/{use-fleet-active-asks-CCGrll5q.js → use-fleet-active-asks-DFs_u-vM.js} +1 -1
  394. package/dist/client/assets/use-mesh-node-state-Ck9CYplv.js +1 -0
  395. package/dist/client/assets/{use-mesh-ops-items-BjyeFJTz.js → use-mesh-ops-items-Be1WmwCg.js} +1 -1
  396. package/dist/client/assets/{use-reduced-motion-CPoX8iV2.js → use-reduced-motion-D7n3vK8t.js} +1 -1
  397. package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +1 -0
  398. package/dist/client/assets/{useAgentHoverCard-BgTLNcF-.js → useAgentHoverCard-Dr-OjNFF.js} +1 -1
  399. package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +1 -0
  400. package/dist/client/assets/{useEmbedHeadline-DuUnwTB7.js → useEmbedHeadline-BL8wQawZ.js} +1 -1
  401. package/dist/client/assets/{usePierreRuntime-35AHf9RQ.js → usePierreRuntime-DJkRHMoe.js} +1 -1
  402. package/dist/client/assets/worker-rendered-v1-DmGVMlVi.png +0 -0
  403. package/dist/client/assets/worker-thinking-v1-ujakpzrK.png +0 -0
  404. package/dist/client/assets/worker-waiting-v1-DbTSsfJJ.png +0 -0
  405. package/dist/client/assets/worker-working-v1-BROAvJ_z.png +0 -0
  406. package/dist/client/assets/world-outposts-v1-DOt0i98W.png +0 -0
  407. package/dist/client/assets/{wrench-BfVeded5.js → wrench-BsMTSeji.js} +1 -1
  408. package/dist/client/assets/{x-DgmmnPKt.js → x-DI1ktCYb.js} +1 -1
  409. package/dist/client/assets/{xterm-DnJJmrCA.js → xterm-B1YBE4Gq.js} +1 -1
  410. package/dist/client/assets/{zap-Bcja1lHG.js → zap-sKPkh4sQ.js} +1 -1
  411. package/dist/client/characters/sage/sage.glb +0 -0
  412. package/dist/client/crew/brik-bust.webp +0 -0
  413. package/dist/client/crew/brik-chip-id.webp +0 -0
  414. package/dist/client/crew/fenn-bust.webp +0 -0
  415. package/dist/client/crew/fenn-chip-id.webp +0 -0
  416. package/dist/client/crew/lulu-bust.webp +0 -0
  417. package/dist/client/crew/milo-bust.webp +0 -0
  418. package/dist/client/crew/milo-chip-id.webp +0 -0
  419. package/dist/client/crew/nori-bust.webp +0 -0
  420. package/dist/client/crew/pip-bust.webp +0 -0
  421. package/dist/client/crew/pip-chip-id.webp +0 -0
  422. package/dist/client/crew/sheets/eye-plate-v1/blink-half.webp +0 -0
  423. package/dist/client/crew/sheets/eye-plate-v1/blink-shut.webp +0 -0
  424. package/dist/client/crew/sheets/eye-plate-v1/look-left.webp +0 -0
  425. package/dist/client/crew/sheets/eye-plate-v1/look-right.webp +0 -0
  426. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  427. package/dist/client/crew/sheets/eye-plate-v1/rest.webp +0 -0
  428. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  429. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  430. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  431. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  432. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  433. package/dist/client/crew/sprout-bust.webp +0 -0
  434. package/dist/client/crew/sprout-chip-id.webp +0 -0
  435. package/dist/client/crew/tuck-bust.webp +0 -0
  436. package/dist/client/crew/tuck-chip-id.webp +0 -0
  437. package/dist/client/crew/vex-bust.webp +0 -0
  438. package/dist/client/crew/vex-chip-id.webp +0 -0
  439. package/dist/client/crew/wrench-bust.webp +0 -0
  440. package/dist/client/crew/wrench-chip-id.webp +0 -0
  441. package/dist/client/index.html +2 -2
  442. package/dist/drizzle/0017_wise_silver_sable.sql +26 -0
  443. package/dist/drizzle/0018_message_epoch_order.sql +1 -0
  444. package/dist/drizzle/meta/0017_snapshot.json +6785 -0
  445. package/dist/drizzle/meta/0018_snapshot.json +6804 -0
  446. package/dist/drizzle/meta/_journal.json +14 -0
  447. package/dist/main.mjs +26906 -24284
  448. package/dist/node/main.mjs +7077 -6284
  449. package/dist/openscout-terminal-relay.mjs +391 -9
  450. package/dist/pairing-runtime-controller.mjs +35541 -34446
  451. package/dist/runtime/base-daemon.mjs +31 -8
  452. package/dist/runtime/broker-daemon.mjs +7864 -2578
  453. package/dist/runtime/broker-process-manager.mjs +15 -3
  454. package/dist/runtime/mesh-discover.mjs +14 -3
  455. package/dist/scout-control-plane-web.mjs +37053 -33186
  456. package/dist/statusline.mjs +1021 -35
  457. package/dist/update-helper.mjs +32169 -0
  458. package/package.json +2 -2
  459. package/dist/client/assets/ActivityScreen-sfonf5SR.js +0 -1
  460. package/dist/client/assets/AgentAvatar-Dz79iTxB.js +0 -1
  461. package/dist/client/assets/AgentConfigurationScreen-DDc3udYM.js +0 -1
  462. package/dist/client/assets/AgentDefinitionsWorkspace-DHDS9Pgd.js +0 -1
  463. package/dist/client/assets/AgentDetailCard-8viaEY8b.js +0 -1
  464. package/dist/client/assets/AgentFloorView-DuyvyMMj.js +0 -1
  465. package/dist/client/assets/AgentInfoScreen-qntgg2q2.js +0 -1
  466. package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +0 -1
  467. package/dist/client/assets/AgentLanesView-96lHsoX7.js +0 -2
  468. package/dist/client/assets/AgentLiveActions-DlSKL60c.js +0 -1
  469. package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +0 -1
  470. package/dist/client/assets/AgentSessions-DV9v34aq.js +0 -6
  471. package/dist/client/assets/AgentsConsole-DTpVhS67.js +0 -1
  472. package/dist/client/assets/AgentsScreen-hZ4o2I-e.js +0 -1
  473. package/dist/client/assets/AgentsSubnav-Ci7uWM7P.js +0 -1
  474. package/dist/client/assets/AtopView-D7vyQDtE.js +0 -1
  475. package/dist/client/assets/BackToPicker-BHicJyfc.js +0 -1
  476. package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +0 -1
  477. package/dist/client/assets/BriefingsScreen-Cn4Mbam9.js +0 -1
  478. package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +0 -5
  479. package/dist/client/assets/ChatCollapsedStrip-7Wrg8Ge0.js +0 -1
  480. package/dist/client/assets/CodeScreen-cLC0tJ4S.js +0 -1
  481. package/dist/client/assets/ConversationFeedRows-Bx0gFyG_.js +0 -1
  482. package/dist/client/assets/ConversationHeader-Bt2RBj93.js +0 -1
  483. package/dist/client/assets/ConversationPanels-o6W-cOoU.js +0 -6
  484. package/dist/client/assets/ConversationScreen-CkWnKXt6.css +0 -1
  485. package/dist/client/assets/ConversationScreen-DIU7m_aC.js +0 -2
  486. package/dist/client/assets/ConversationStatus-CTYOywFh.js +0 -1
  487. package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +0 -1
  488. package/dist/client/assets/DispatchAftermath-ZCEB75hh.js +0 -1
  489. package/dist/client/assets/DocumentFocusViewer-D8iB6SMt.js +0 -1
  490. package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +0 -1
  491. package/dist/client/assets/FollowScreen-CkR-okdL.js +0 -1
  492. package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +0 -1
  493. package/dist/client/assets/HostAdvisorView-DeJ-8RZV.js +0 -1
  494. package/dist/client/assets/KnowledgeSearchInspector-W_zNIBRV.js +0 -1
  495. package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +0 -1
  496. package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +0 -1
  497. package/dist/client/assets/MeshCanvas-DZv2ipsy.js +0 -3
  498. package/dist/client/assets/MeshCanvasMinimap-BXHRNb7l.js +0 -1
  499. package/dist/client/assets/MeshScreen-DuNvpDC5.js +0 -1
  500. package/dist/client/assets/MessagesScreen-dNNPFwAc.js +0 -1
  501. package/dist/client/assets/MissionContextRail-DnCWPzAM.js +0 -1
  502. package/dist/client/assets/MissionControlView-DmaThhNR.js +0 -1
  503. package/dist/client/assets/MissionFocusOverlay-K21ssTxv.js +0 -1
  504. package/dist/client/assets/MissionLeftAgentRow-CbQm4BLv.js +0 -1
  505. package/dist/client/assets/MissionLogPane-BLvSSIdT.js +0 -1
  506. package/dist/client/assets/NewAgentModal-B7qxjZlW.js +0 -1
  507. package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +0 -19
  508. package/dist/client/assets/ObserveEmbedScreen-DvKGsaLv.js +0 -2
  509. package/dist/client/assets/OpenScoutAppShell-C9TOLB7u.js +0 -79
  510. package/dist/client/assets/OpsAgentsView-vIoY-AW1.js +0 -1
  511. package/dist/client/assets/OpsScreen-CJBwshEp.js +0 -1
  512. package/dist/client/assets/OpsSubnav-CjDTnp64.js +0 -1
  513. package/dist/client/assets/ProjectAgentProfile-Br1eTD7G.js +0 -1
  514. package/dist/client/assets/ProjectAgentProfileHero-mjxNcRvw.js +0 -1
  515. package/dist/client/assets/ProjectsInbox-Bq29DE_o.js +0 -2
  516. package/dist/client/assets/ProjectsRail-kMDA0yn4.js +0 -1
  517. package/dist/client/assets/ProjectsScreen-BDaJYhc0.js +0 -1
  518. package/dist/client/assets/ProjectsThreadAside-B940p3vW.js +0 -1
  519. package/dist/client/assets/Provider-D0bB7q6y.js +0 -1
  520. package/dist/client/assets/RailRow-B88JVr62.js +0 -1
  521. package/dist/client/assets/RawSessionsTable-CzGhEdiZ.js +0 -1
  522. package/dist/client/assets/RealtimeVoiceScreen-CyP1CWsX.js +0 -1
  523. package/dist/client/assets/RepoDiffViewer-Bw5yMC4A.js +0 -7
  524. package/dist/client/assets/RepoDiffViewerLazy-DzfoFhbl.js +0 -2
  525. package/dist/client/assets/ScoutDeckSurface-DQoZofzH.js +0 -1
  526. package/dist/client/assets/SessionEmbedScreen-CpduQ0O9.js +0 -1
  527. package/dist/client/assets/SessionObserve-BVeTkcIl.js +0 -12
  528. package/dist/client/assets/SessionObserveEvidence-BkOezTGV.js +0 -1
  529. package/dist/client/assets/SessionRefScreen-DetLMkTT.js +0 -1
  530. package/dist/client/assets/SessionsScreen-B-McKw6d.js +0 -1
  531. package/dist/client/assets/SettingsDrawer-CPB32w0n.js +0 -3
  532. package/dist/client/assets/SettingsScreen-BEzYFdjz.js +0 -1
  533. package/dist/client/assets/SpriteAvatar-DFO4Kb4Z.js +0 -1
  534. package/dist/client/assets/Terminal-DWyZTZdY.js +0 -1
  535. package/dist/client/assets/TerminalEmbedScreen-_SSzwhWa.js +0 -1
  536. package/dist/client/assets/TerminalHeaderMount-CY7uIWBg.js +0 -1
  537. package/dist/client/assets/WorkFilesViewer-D8-4vF5l.js +0 -1
  538. package/dist/client/assets/agent-autocomplete-BlK8wY06.js +0 -10
  539. package/dist/client/assets/agent-lane-card-model-CY3OE1Xu.js +0 -1
  540. package/dist/client/assets/agent-lanes-model-tc-1hE6q.js +0 -2
  541. package/dist/client/assets/agent-master-I1W-5d-x.css +0 -1
  542. package/dist/client/assets/agent-master-model-DMcHeNq3.js +0 -1
  543. package/dist/client/assets/api-Co9aQ2Jw.js +0 -1
  544. package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
  545. package/dist/client/assets/chunk-JTPDIGGW-COJ00z94.js +0 -46
  546. package/dist/client/assets/chunk-YOZR3KYS-CrCgXw9l.js +0 -2
  547. package/dist/client/assets/colors-BtO5_zlx.js +0 -1
  548. package/dist/client/assets/content-0RBfbCIJ.js +0 -1
  549. package/dist/client/assets/content-BTmnk2bl.js +0 -1
  550. package/dist/client/assets/content-Bk5DKhyP.js +0 -1
  551. package/dist/client/assets/content-Bw_8GE_S.js +0 -1
  552. package/dist/client/assets/content-CI4gLEWi.js +0 -1
  553. package/dist/client/assets/content-CLCtp9Rb.js +0 -1
  554. package/dist/client/assets/content-C_FAGTNk.js +0 -1
  555. package/dist/client/assets/content-CnnzWOE3.js +0 -1
  556. package/dist/client/assets/content-DKlY98pO.js +0 -1
  557. package/dist/client/assets/content-Df7ndXTG.js +0 -1
  558. package/dist/client/assets/content-DkZDzzx3.js +0 -1
  559. package/dist/client/assets/content-DnGmb2L0.js +0 -1
  560. package/dist/client/assets/content-Ds-zs-Ss.js +0 -1
  561. package/dist/client/assets/content-JIWSyC0f.js +0 -1
  562. package/dist/client/assets/content-Q3TIYC8q.js +0 -1
  563. package/dist/client/assets/content-evaBfvxD.js +0 -1
  564. package/dist/client/assets/conversation-model-C2KuZUXc.js +0 -1
  565. package/dist/client/assets/conversation-motion-features-BJnHs3Ul.js +0 -1
  566. package/dist/client/assets/discover-DutlV0ZU.js +0 -2
  567. package/dist/client/assets/embed-entry-CJG7WEVw.js +0 -2
  568. package/dist/client/assets/home-moving-signal-PHSqSBu_.js +0 -1
  569. package/dist/client/assets/home-now-card-C_qsI6C6.js +0 -1
  570. package/dist/client/assets/hooks-ME7rmhpE.js +0 -2
  571. package/dist/client/assets/index-C8UCRm2W.js +0 -1
  572. package/dist/client/assets/index-Cn0I2Hgi.js +0 -1
  573. package/dist/client/assets/index-Cx6Gbr6n.js +0 -1
  574. package/dist/client/assets/index-i7TMxlwW.css +0 -1
  575. package/dist/client/assets/knowledge-search-D_bLoYtC.css +0 -1
  576. package/dist/client/assets/lane-roster-store-DN2jxXF-.js +0 -1
  577. package/dist/client/assets/left-BRu9pnqx.js +0 -2
  578. package/dist/client/assets/left-BjS1dKNV.js +0 -2
  579. package/dist/client/assets/left-CL-TVLJ7.js +0 -1
  580. package/dist/client/assets/left-DLpsDi55.js +0 -1
  581. package/dist/client/assets/left-DPcM9o8Y.js +0 -1
  582. package/dist/client/assets/left-MmTJf1tK.js +0 -1
  583. package/dist/client/assets/left-P80i5V8L.js +0 -1
  584. package/dist/client/assets/left-advisor-CbXVzAqS.js +0 -1
  585. package/dist/client/assets/left-agents-7mJsiNyr.js +0 -1
  586. package/dist/client/assets/left-default-COK26l3H.js +0 -1
  587. package/dist/client/assets/left-lanes-Dbdm9Veu.js +0 -1
  588. package/dist/client/assets/left-mission-DSenPIyb.css +0 -1
  589. package/dist/client/assets/left-mission-DqGR5jby.js +0 -1
  590. package/dist/client/assets/library-COnWzUWv.js +0 -1
  591. package/dist/client/assets/mentions-BZ5SBMtc.js +0 -1
  592. package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +0 -1
  593. package/dist/client/assets/mesh-view-store-CBM1za_N.js +0 -1
  594. package/dist/client/assets/mission-control-CnU7dNt1.css +0 -1
  595. package/dist/client/assets/mission-control-model-C0fByIjm.js +0 -1
  596. package/dist/client/assets/mission-control-store-CM8mQGg8.js +0 -1
  597. package/dist/client/assets/observe-BLmy4quB.js +0 -1
  598. package/dist/client/assets/ops-screen-giu3If_N.css +0 -1
  599. package/dist/client/assets/page-status-BE0-J1xY.js +0 -1
  600. package/dist/client/assets/paperclip-Br7wUDFl.js +0 -1
  601. package/dist/client/assets/perf-PX8Rx0EP.js +0 -1
  602. package/dist/client/assets/profile-BCvk8jOQ.js +0 -1
  603. package/dist/client/assets/resolve-panes-DhD5qmQO.js +0 -1
  604. package/dist/client/assets/resolve-sidebar-context-GqhZNRPY.js +0 -1
  605. package/dist/client/assets/right-B_08ilv6.js +0 -1
  606. package/dist/client/assets/right-Brm67HOL.js +0 -1
  607. package/dist/client/assets/right-BveAPKBW.js +0 -1
  608. package/dist/client/assets/right-CpTB_-Ya.js +0 -1
  609. package/dist/client/assets/right-CqC4Qdot.js +0 -1
  610. package/dist/client/assets/right-D91j9d5Y.js +0 -1
  611. package/dist/client/assets/right-DaLRhYl3.js +0 -1
  612. package/dist/client/assets/right-Dt1wOwA5.js +0 -1
  613. package/dist/client/assets/right-DtzqIZQF.js +0 -1
  614. package/dist/client/assets/router-kfcaYqZr.js +0 -1
  615. package/dist/client/assets/runtime-picker-C20lTGhV.js +0 -1
  616. package/dist/client/assets/scout-voice-Cg1qfepC.js +0 -1
  617. package/dist/client/assets/secondaryNavConfig-C0Srrmy8.js +0 -1
  618. package/dist/client/assets/system-surfaces-redesign-kuf3wuE_.css +0 -1
  619. package/dist/client/assets/terminal-screen-vMICbBJh.css +0 -1
  620. package/dist/client/assets/use-conversation-list-UG-tMN67.js +0 -1
  621. package/dist/client/assets/use-scout-dev-flags-DTseRrFi.js +0 -1
  622. package/dist/client/assets/useContentSecondaryNav-CoIoz7JU.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as r,r as d}from"./index-C8uS5szO.js";import{s as $}from"./colors-CFlbwC25.js";import{b as M}from"./agent-state-DDhnFEEP.js";import{A as S}from"./AgentAvatar-BIwg54Tj.js";function H({name:a,meta:i,sub:o,tone:t="neutral",agent:l,avatarName:c,avatarKind:s="user",leadingIcon:n,caret:e,active:v,selected:N,unread:g,depth:k=0,detail:u,expanded:p,activityLabel:h,worktreeLabel:m,activityTone:C="working",actions:w,pinned:x,editing:f,onClick:P,onKeyDown:y,onContextMenu:b,onPointerEnter:R,onPointerLeave:E,title:B,tabIndex:D}){const z=e?e==="open":u!==void 0?!!p:void 0,A=["rr-row",k===1&&"rr-row--child",v&&"rr-row--active",N&&"rr-row--selected",g&&"rr-row--unread",p&&"rr-row--expanded",h&&"rr-row--motion",x&&"rr-row--pinned",w&&"rr-row--has-actions"].filter(Boolean).join(" ");return r.jsxs("div",{className:A,children:[r.jsxs("button",{type:"button",className:"rr-row-head",onClick:P,onKeyDown:y,onContextMenu:b,onPointerEnter:R,onPointerLeave:E,title:B,tabIndex:D,"aria-expanded":z,children:[r.jsx(F,{icon:n,tone:t,caret:e,agent:l,avatarName:c,avatarKind:s}),r.jsxs("span",{className:"rr-row-body",children:[f?r.jsx(T,{...f}):r.jsxs("span",{className:"rr-row-name",children:[x?r.jsx("span",{className:"rr-row-pin-mark","aria-label":"Pinned",title:"Pinned",children:r.jsx(K,{})}):null,a]}),o&&r.jsx("span",{className:"rr-row-sub",children:o}),m&&r.jsx("span",{className:"rr-row-worktree",children:m}),h&&r.jsxs("span",{className:`rr-row-activity rr-row-activity--${C}`,children:[r.jsxs("span",{className:"rr-row-activity-bars","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsx("span",{className:"rr-row-activity-label",children:h})]})]}),i&&r.jsx("span",{className:"rr-row-meta",children:i})]}),w?r.jsx("div",{className:"rr-row-actions",onClick:L=>L.stopPropagation(),children:w}):null,p&&u&&r.jsx("div",{className:"rr-row-detail",children:u})]})}function T({value:a,onCommit:i,onCancel:o}){const t=d.useRef(null),[l,c]=d.useState(a),s=d.useRef(!1);d.useEffect(()=>{const e=t.current;e&&(e.focus(),e.select())},[]);const n=e=>{s.current||(s.current=!0,e?i(l):o())};return r.jsx("input",{ref:t,className:"rr-row-name rr-row-name-field",value:l,spellCheck:!1,"aria-label":"Conversation name",onChange:e=>c(e.target.value),onKeyDown:e=>{e.stopPropagation(),e.key==="Enter"?(e.preventDefault(),n(!0)):e.key==="Escape"&&(e.preventDefault(),n(!1))},onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>e.stopPropagation(),onBlur:()=>n(!0)})}function F({icon:a,tone:i,caret:o,agent:t,avatarName:l,avatarKind:c}){if(o)return r.jsx("span",{className:`rr-row-caret rr-row-caret--leading rr-row-caret--${o}`,"aria-hidden":!0,children:r.jsx(G,{open:o==="open"})});if(l||t){if(c==="channel")return r.jsx("span",{className:"rr-row-hash","aria-hidden":!0,children:"#"});const n=j(i),e=n==="active"||n==="available"||n==="working"||n==="in_turn";return r.jsx("span",{className:"rr-row-avatar-wrap","aria-hidden":!0,children:r.jsx(S,{agent:t,name:l??t?.name,placement:"row",size:20,tile:!0,presence:e})})}if(a)return r.jsx("span",{className:"rr-row-icon","aria-hidden":!0,children:a});const s=j(i);return r.jsx("span",{className:`rr-row-dot rr-row-dot--${s}`,style:s==="active"||s==="available"?{background:$(s)}:void 0,"aria-hidden":!0})}function G({open:a}){return r.jsx("svg",{className:`rr-chevron${a?" rr-chevron--open":""}`,viewBox:"0 0 12 12",width:"12",height:"12",fill:"none","aria-hidden":!0,children:r.jsx("path",{d:"M4.25 3L7.75 6L4.25 9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function j(a){return a==="channel"||a==="dm"||a==="neutral"?a:M(a)}function K(){return r.jsx("svg",{width:"9",height:"9",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":!0,children:r.jsx("path",{d:"M9.8 1.6 14.4 6.2a1 1 0 0 1-.2 1.6l-2.7 1.1-.9 3.4a.7.7 0 0 1-1.2.3L6.3 9.5 2.8 13 1.7 11.9l3.5-3.5L2.1 5.3a.7.7 0 0 1 .3-1.2l3.4-.9 1.1-2.7a1 1 0 0 1 1.6-.2Z"})})}export{H as R};
@@ -0,0 +1 @@
1
+ import{r as o,j as n}from"./index-C8uS5szO.js";/* empty css */import{D as O}from"./DataTable-BMOZ1-z8.js";import{p as W,a as L}from"./api-CaROe5_H.js";import{t as U,n as R,f as Y}from"./time-Dhsh_2EG.js";import{u as G}from"./tail-events-DQ46QBW1.js";import{o as Q}from"./openContent-C6XO6kr5.js";import{u as X}from"./Provider-5Hotn7NQ.js";/* empty css */import"./index-BWHgHrtv.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";const q=1e4,J=500,$=1e3,Z=6e4,D="/api/tail/discover",_=`/api/tail/recent?limit=${J}`,P=3e4,tt=[{key:"status",label:"status",cls:"s-atop-col-status",kind:"text",sortable:!1,defaultWidth:96,minWidth:70,render:t=>n.jsxs("span",{className:`s-atop-status s-atop-status--${t.status}`,children:[n.jsx("span",{className:"s-atop-status-dot","aria-hidden":"true"}),t.statusLabel]})},{key:"session",label:"session",cls:"s-atop-col-agent",kind:"text",sortable:!1,defaultWidth:168,minWidth:110,maxWidth:280,render:t=>n.jsxs("div",{className:"s-atop-agent-cell",title:t.sessionId??t.refId,children:[n.jsx("span",{className:`s-atop-chip s-atop-chip--harness s-atop-chip--harness-${st(t.source)}`,children:t.source}),n.jsx("span",{className:"s-atop-agent-id",children:t.refId.slice(0,8)})]})},{key:"project",label:"project",cls:"s-atop-col-project",kind:"text",sortable:!1,defaultWidth:200,minWidth:96,maxWidth:360,render:t=>n.jsx("span",{title:t.cwd??t.project,children:t.project})},{key:"updated",label:"updated",cls:"s-atop-col-last",kind:"time",sortable:!1,defaultWidth:86,minWidth:64,render:t=>n.jsx("span",{title:Y(t.mtimeMs),children:U(Math.max(R(t.mtimeMs)??0,R(t.lastEvent?.ts)??0))||"-"})},{key:"size",label:"size",cls:"s-atop-col-runtime",kind:"number",sortable:!1,defaultWidth:80,minWidth:64,render:t=>nt(t.size)},{key:"path",label:"path",kind:"text",sortable:!1,defaultWidth:360,minWidth:160,maxWidth:800,render:t=>n.jsx("span",{title:t.transcriptPath,children:t.cwd??t.transcriptPath})}];function z(t){const i=t?.trim();if(!i)return null;const r=F(i);return r.endsWith(".jsonl")?r.slice(0,-6):r}function F(t){const i=t.replace(/[\\/]+$/,"");return i.split(/[\\/]/).filter(Boolean).at(-1)??i}function et(t){const r=t.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return r.pop(),r.at(-1)??""}function st(t){return t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function nt(t){if(!Number.isFinite(t)||t<0)return"-";if(t<1024)return`${t} B`;const i=t/1024;if(i<1024)return`${i.toFixed(i>=10?0:1)} KiB`;const r=i/1024;return`${r.toFixed(r>=10?0:1)} MiB`}function at(t,i){return i?[t.refId,t.sessionId??"",t.source,t.project,t.cwd??"",t.transcriptPath,t.lastEvent?.summary??"",t.process?.command??""].join(" ").toLowerCase().includes(i.toLowerCase()):!0}function B(t){return`${t.source}\0${t.cwd??""}`}function ot(t){return`${t.source}\0${t.cwd??""}`}function it(t,i,r){if(!t?.transcripts?.length)return[];const d=new Map;for(const s of i){const l=d.get(s.sessionId);(!l||s.ts>l.ts)&&d.set(s.sessionId,s)}const h=new Map;for(const s of t.processes){if(!s.cwd)continue;const l=h.get(B(s));(!l||s.pid<l.pid)&&h.set(B(s),s)}return t.transcripts.map(s=>{const l=z(s.sessionId)??z(s.transcriptPath);if(!l)return null;const m=s.sessionId?d.get(s.sessionId)??null:null,x=h.get(ot(s))??null,u=Math.max(s.mtimeMs,m?.ts??0),j=!!x||r-u<=Z,p=s.project?.trim()||(s.cwd?F(s.cwd):et(s.transcriptPath))||"unknown";return{refId:l,source:s.source||"unknown",project:p,cwd:s.cwd,transcriptPath:s.transcriptPath,sessionId:s.sessionId,mtimeMs:s.mtimeMs,size:s.size,status:j?"run":"idle",statusLabel:j?"active":"idle",lastEvent:m,process:x}}).filter(s=>s!==null).sort((s,l)=>{const m=Math.max(s.mtimeMs,s.lastEvent?.ts??0);return Math.max(l.mtimeMs,l.lastEvent?.ts??0)-m||s.project.localeCompare(l.project)})}function te({navigate:t}){const{route:i}=X(),[r]=o.useState(()=>W(D,P)),[d,h]=o.useState(r),[s,l]=o.useState(()=>W(_,P)?.events??[]),[m,x]=o.useState(r===null),[u,j]=o.useState(""),[p,S]=o.useState("all"),[y,k]=o.useState(0),[N,C]=o.useState(null),[T,V]=o.useState(Date.now()),b=o.useRef(null),I=o.useCallback(async()=>{C(null);try{h(await L(D))}catch(e){C(e instanceof Error?e.message:String(e))}finally{x(!1)}},[]);o.useEffect(()=>{I();const e=setInterval(()=>{I()},q);return()=>clearInterval(e)},[I]),o.useEffect(()=>{let e=!1;return(async()=>{try{const a=await L(_);e||l(a.events??[])}catch{}})(),()=>{e=!0}},[]),G(e=>{l(a=>a.length>=$?[...a.slice(a.length-$+1),e]:[...a,e])}),o.useEffect(()=>{const e=setInterval(()=>V(Date.now()),15e3);return()=>clearInterval(e)},[]);const f=o.useMemo(()=>it(d,s,T),[d,s,T]),H=o.useMemo(()=>[...new Set(f.map(e=>e.source))].sort(),[f]),c=o.useMemo(()=>f.filter(e=>(p==="all"||e.source===p)&&at(e,u.trim())),[f,p,u]);o.useEffect(()=>{y>=c.length&&k(Math.max(0,c.length-1))},[c.length,y]);const M=o.useCallback(e=>{e&&Q(t,{view:"sessions",sessionId:e.refId},{returnTo:i})},[t,i]);o.useEffect(()=>{const e=a=>{const E=a.target,A=E instanceof HTMLInputElement||E instanceof HTMLTextAreaElement||(E?.isContentEditable??!1);if(a.key==="/"&&!A){a.preventDefault(),b.current?.focus();return}if(A){a.key==="Escape"&&E===b.current&&(j(""),b.current?.blur());return}if(a.key==="ArrowDown"||a.key==="j"){a.preventDefault(),k(w=>c.length===0?0:Math.min(c.length-1,w+1));return}if(a.key==="ArrowUp"||a.key==="k"){a.preventDefault(),k(w=>Math.max(0,w-1));return}(a.key==="Enter"||a.key==="o")&&(a.preventDefault(),M(c[y]))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[c,y,M]);const K=N?[]:c,g=o.useCallback(e=>`${e.source}:${e.transcriptPath}`,[]),v=o.useMemo(()=>new Map(c.map((e,a)=>[g(e),a])),[c,g]);return n.jsxs("div",{className:"s-atop s-atop--sessions",children:[n.jsxs("div",{className:"s-atop-fbar",children:[n.jsxs("label",{className:"s-atop-search",children:[n.jsx("span",{className:"s-atop-search-prompt",children:"/"}),n.jsx("input",{ref:b,className:"s-atop-search-input",placeholder:"filter sessions",value:u,onChange:e=>j(e.target.value)}),n.jsx("kbd",{className:"s-atop-search-kbd",children:"/"})]}),n.jsx("span",{className:"s-atop-fbar-label",children:"source"}),n.jsxs("button",{type:"button",className:`s-atop-pill${p==="all"?" s-atop-pill--on":""}`,onClick:()=>S("all"),children:["all",n.jsx("span",{className:"s-atop-pill-ct",children:f.length})]}),H.map(e=>n.jsxs("button",{type:"button",className:`s-atop-pill${p===e?" s-atop-pill--on":""}`,onClick:()=>S(e),children:[e,n.jsx("span",{className:"s-atop-pill-ct",children:f.filter(a=>a.source===e).length})]},e)),n.jsx("div",{className:"s-atop-fbar-spacer"})]}),n.jsx(O,{rows:K,columns:tt,rowId:g,storageKey:"openscout.sessions.cols",rowBindings:e=>({onMouseEnter:()=>{const a=v.get(e);a!=null&&k(a)},onFocus:()=>{const a=v.get(e);a!=null&&k(a)}}),onRowClick:e=>M(e),rowClassName:e=>v.get(g(e))===y?"s-atop-row--selected":void 0,empty:N?{title:"Discovery failed",body:N}:{title:"No raw sessions",body:u?"No sessions match the current filter.":"No transcript sessions were discovered."},loading:m,density:"compact",className:"s-atop-data-table",ariaLabel:"Raw sessions"}),n.jsxs("div",{className:"s-atop-keys",children:[n.jsxs("span",{children:[n.jsx("kbd",{children:"/"}),"filter"]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"j/k"}),"select"]}),n.jsxs("span",{children:[n.jsx("kbd",{children:"enter"}),"open"]}),n.jsx("span",{className:"s-atop-keys-spacer"}),n.jsxs("span",{className:"s-atop-keys-count",children:[n.jsx("strong",{children:c.length})," sessions"]})]})]})}export{te as RawSessionsTable};
@@ -0,0 +1 @@
1
+ import{r as n,j as e}from"./index-C8uS5szO.js";import{k as nt}from"./router-BKiMcYa7.js";import{u as At,A as gs,B as rt,E as at,a as ks,F as ve,G as Lt,H as Ss,I as Ot}from"./Provider-5Hotn7NQ.js";import{H as ys,A as ws,S as js,a as Ns,m as Jt,o as Cs,b as Es,c as Qt,d as Kt}from"./agent-autocomplete-CeHQpuG9.js";import{a as H}from"./api-CaROe5_H.js";import{c as $e}from"./clipboard-e3fSpeo7.js";import{e as Ts}from"./credentials-C4VXz2hr.js";import{b as Pt,u as Is,a as ge}from"./persistent-state-xsuk6Kc-.js";import{s as ue,e as _s,S as zt}from"./scoutbot-Bk3nyrkj.js";import{g as Rs,s as Ms,d as Vs,i as As,e as Ls,a as Os}from"./scout-voice-DOQ_B77g.js";import{d as Ps,f as Dt,n as Se}from"./time-Dhsh_2EG.js";import{S as zs}from"./scoutbot-markdown-Bz0Vbto2.js";import{L as X}from"./loader-circle-DurUYl7E.js";import{P as Xt}from"./plus-D_wLGJGT.js";import{C as Ze}from"./chevron-down-B5eMsn5c.js";import{C as Ds}from"./chevron-up-BHOEgHcn.js";import{c as Ue}from"./createLucideIcon-DkjnzvcJ.js";import{S as Zt,a as es}from"./runtime-picker-DdsttHHc.js";import{S as $s}from"./send-horizontal-pOtGI7FM.js";import{C as Bs}from"./copy-D9WUpQRf.js";import{u as ts}from"./use-reduced-motion-D7n3vK8t.js";import{R as $t}from"./rocket-DyrYDo8V.js";import{X as Us}from"./x-DI1ktCYb.js";import{R as Fs}from"./refresh-cw-Da9DDLk2.js";import{S as Hs}from"./settings-TJIkkZ0P.js";import{V as Bt}from"./fx-z37u1o2z.js";import{B as Ws}from"./bot-CfN9PSBF.js";import{d as Gs}from"./types-B0PlfpKc.js";const qs=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Ys=Ue("archive",qs);const Js=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Qs=Ue("circle-check",Js);const Ks=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],ss=Ue("volume-2",Ks);const Xs=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],os=Ue("volume-x",Xs),Zs=new Set(["air-local","local","mini","node"]),eo=new Set(["main","master","trunk"]);function to(t){return t.replace(/```[\s\S]*?```/g," code omitted ").replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^\s*][^*\n]*?[^\s*]|[^\s*])\*(?=[\s)\].,!?;:]|$)/g,"$1$2").replace(/(^|[\s(])_([^\s_][^_\n]*?[^\s_]|[^\s_])_(?=[\s)\].,!?;:]|$)/g,"$1$2").replace(/^\s*[-*]\s+/gm,"").replace(/\bhttps?:\/\/[^\s)]+/gi,o=>so(o)).replace(/\b(session|conversation|message|flight|invocation|work)(?:\s+(?:id|ref))?\s*[:#]?\s+([a-z0-9][a-z0-9._:-]{9,})\b/gi,(o,a,i)=>`${a.toLowerCase()} ending in ${et(i)}`).replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,o=>`ID ending in ${et(o)}`).replace(/@?([a-z][a-z0-9-]*(?:\.[a-z0-9][a-z0-9-]*){2,})\b/gi,(o,a)=>oo(o)?o:no(a)).replace(/`([^`]+)`/g,(o,a)=>ro(a)).replace(/\s+/g," ").trim()}function so(t){try{return new URL(t).hostname.replace(/^www\./,"").replace(/\./g," dot ")}catch{return"link"}}function oo(t){const o=t.replace(/^@/,"").toLowerCase();return/\.(com|app|dev|org|net|io|local)(?:\b|\/)/.test(o)&&!o.endsWith(".air-local")}function no(t){const o=t.split(".").filter(Boolean);if(o.length<2)return t;const a=[...o];for(;a.length>1&&Zs.has(a.at(-1).toLowerCase());)a.pop();const[i,...c]=a,u=c.filter(p=>!eo.has(p.toLowerCase())).map(tt).filter(Boolean);return[tt(i),...u].filter(Boolean).join(", ")}function ro(t){return/^[a-z0-9][a-z0-9._:-]{12,}$/i.test(t)?`ID ending in ${et(t)}`:tt(t)}function et(t){return(t.replace(/[^a-z0-9]/gi,"").slice(-4)||t.slice(-4)).split("").join(" ")}function tt(t){return t.replace(/^@/,"").replace(/[_./:-]+/g," ").replace(/\s+/g," ").trim()}function ao({state:t,chatExpanded:o,onToggleExpanded:a,sessionPickerOpen:i,onToggleSessionPicker:c,onStartNewChat:u,startingNewChat:p,onSwitchSession:w,switchingSessionId:j,sending:v,briefing:M,pendingAsk:N,onArchiveSession:f,archivingSessionId:b,onAssistantContextMenu:h,suggestedPrompts:E,onSelectPrompt:T}){const k=t.session.messages,C=o?k:k.slice(-4),S=o?0:Math.max(0,k.length-C.length),y=k.length,F=t.sessions.length,$=t.retention,l=k.length===0&&!N&&!v&&!M,I=p||v||M||!!j||!!b,W=t.session.createdAt?Ps(t.session.createdAt):null,_=l?"Scout conversation":t.session.title&&t.session.title!=="New Scout Session"?t.session.title:`Session ${t.session.id.slice(0,8)}`,L=n.useRef(null),G=k[k.length-1]?.id??null,q=k[k.length-1]?.body??"";return n.useEffect(()=>{const x=L.current;x&&(x.scrollTop=x.scrollHeight)},[G,q,N,v,o,t.session.id]),e.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-[var(--scout-chrome-border-soft)] px-2.5 py-1.5",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate text-[var(--scout-chrome-ink)]",title:t.session.id,children:_}),W&&!l&&e.jsxs("span",{className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]",children:["· ",W]}),!l&&e.jsxs("span",{className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]",children:["· ",y," msg",y===1?"":"s"]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsxs("button",{type:"button",title:"Start a new chat (keeps this chat in Chats)","aria-label":"Start new chat",onClick:u,disabled:I,className:"flex items-center gap-1 rounded border border-lime-300/30 bg-lime-300/[0.06] px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] text-lime-100 transition-colors hover:border-lime-300/50 hover:bg-lime-300/10 disabled:cursor-not-allowed disabled:opacity-40",children:[p?e.jsx(X,{size:10,className:"animate-spin"}):e.jsx(Xt,{size:10}),e.jsx("span",{children:p?"Starting":"New chat"})]}),e.jsxs("button",{type:"button",title:`Switch chat (${F} total)`,"aria-label":"Switch chat",onClick:c,className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] transition-colors ${i?"border-lime-300/40 bg-lime-300/10 text-lime-100":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[e.jsx(ys,{size:10}),e.jsx("span",{children:"Chats"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink-ghost)]",children:F}),e.jsx(Ze,{size:9,className:i?"rotate-180 transition-transform":"transition-transform"})]}),y>4&&e.jsxs("button",{type:"button",title:o?"Collapse chat":"View full session","aria-label":o?"Collapse chat":"View full session",onClick:a,className:"flex items-center gap-1 rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:[e.jsx("span",{children:o?"Collapse":"Full"}),o?e.jsx(Ds,{size:9}):e.jsx(Ze,{size:9})]})]})]}),i&&e.jsxs("div",{className:"shrink-0 border-b border-[var(--scout-chrome-border-soft)] px-2 py-1.5",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2 px-0.5 text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{children:"Recent chats"}),$&&$.archivedCount>0&&e.jsxs("span",{children:[$.archivedCount," archived"]})]}),e.jsx("div",{className:"flex max-h-40 flex-col gap-0.5 overflow-y-auto pr-0.5",children:t.sessions.map(x=>{const B=x.id===t.session.id,Z=j===x.id,U=b===x.id,V=Dt(x.updatedAt)||"unknown",O=x.title&&x.title!=="New Scout Session"?x.title:`Session ${x.id.slice(0,8)}`;return e.jsxs("div",{className:`flex items-center gap-2 rounded border px-2 py-1 text-left transition-colors ${B?"border-lime-300/40 bg-lime-300/[0.06] text-lime-100":"border-transparent text-[var(--scout-chrome-ink-faint)] hover:border-[var(--scout-chrome-border-soft)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[e.jsxs("button",{type:"button",onClick:()=>{B||w(x.id)},disabled:B||!!j||!!b,className:"flex min-w-0 flex-1 items-center gap-2 text-left disabled:cursor-not-allowed disabled:opacity-40",children:[e.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${B?"bg-lime-300":"bg-[var(--scout-chrome-ink-ghost)]"}`}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink)]",children:O}),e.jsxs("span",{className:"shrink-0 text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[x.messageCount," msg"]}),e.jsx("span",{className:"shrink-0 text-2xs text-[var(--scout-chrome-ink-ghost)]",children:V}),Z&&e.jsx(X,{size:10,className:"shrink-0 animate-spin text-lime-200"})]}),e.jsx("button",{type:"button",title:"Archive chat","aria-label":`Archive chat ${O}`,onClick:()=>f(x.id),disabled:!!j||!!b,className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-transparent text-[var(--scout-chrome-ink-ghost)] transition-colors hover:border-[var(--scout-chrome-border-soft)] hover:bg-black/20 hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-30",children:U?e.jsx(X,{size:10,className:"animate-spin"}):e.jsx(Ys,{size:10})})]},x.id)})})]}),e.jsxs("div",{ref:L,className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-2.5 py-2",children:[S>0&&e.jsxs("button",{type:"button",onClick:a,className:"self-start text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)] hover:text-[var(--scout-chrome-ink)]",children:["↑ ",S," earlier message",S===1?"":"s"]}),l&&e.jsx(io,{suggestedPrompts:E,onSelectPrompt:T}),C.map((x,B)=>{const Z=uo(C[B-1],x),U=mo(x.createdAt);return e.jsxs("div",{className:"flex flex-col gap-1",children:[Z&&e.jsx("div",{className:"self-center rounded-full bg-white/[0.06] px-2.5 py-0.5 font-mono text-2xs font-medium text-[var(--scout-chrome-ink-ghost)]",title:Dt(x.createdAt),"aria-label":U,children:U}),e.jsx(Ut,{role:x.role,body:x.body,onContextMenu:x.role==="assistant"&&h?V=>h(V,x.body):void 0})]},x.id)}),N&&e.jsx(Ut,{role:"user",body:N,pending:!0}),v&&!N&&e.jsx("p",{className:"text-[var(--scout-chrome-ink-ghost)]",children:"Reading the control plane…"}),M&&e.jsxs("div",{className:"flex items-center gap-2 rounded border border-lime-300/30 bg-lime-300/[0.06] px-2.5 py-2 font-mono text-xs leading-relaxed text-lime-100",children:[e.jsx(X,{size:12,className:"shrink-0 animate-spin text-lime-300","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs uppercase tracking-[0.14em] text-lime-300",children:"Briefing"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:"Codex is reviewing the control-plane snapshot. Voice will pick up when it lands."})]})]})]})]})}function io({suggestedPrompts:t=[],onSelectPrompt:o}){return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col justify-start gap-2 px-1 py-2.5",children:[t.length>0?e.jsx("div",{className:"grid gap-1",children:t.slice(0,3).map(a=>e.jsx("button",{type:"button",onClick:()=>o?.(a),className:"min-h-7 truncate rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 px-2.5 text-left font-mono text-xs leading-snug text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:a},a))}):null,e.jsxs("div",{className:"max-w-[30rem]",children:[e.jsx("div",{className:"font-sans text-lg font-semibold leading-tight text-[var(--scout-chrome-ink)]",children:"Start with a question."}),e.jsx("p",{className:"mt-0.5 font-sans text-xs leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Paste a failed result or ask about what you are seeing. Scout replies when you ask."})]})]})}function co({agents:t,draft:o,onDraftChange:a,onSubmit:i,sending:c,recording:u,voiceLabel:p,voiceBusy:w,voiceUnavailable:j,voiceHeld:v=!1,onMicClick:M,prominent:N=!1,autoFocus:f,focusSignal:b}){const h=n.useRef(null),E=n.useCallback(()=>{const C=h.current;C&&(C.textarea?C.textarea.focus({preventScroll:!0}):C.focus())},[]);n.useEffect(()=>{f&&E()},[f,E]),n.useEffect(()=>{b&&E()},[b,E]);let T="Start talking";j&&(T="Set up Scout voice"),u&&(T="Stop talking"),(w||v)&&(T=p);const g=w||u||v,k=["w-full resize-none rounded border font-mono text-sm leading-relaxed text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)]",N?"min-h-[88px] max-h-[170px] border-lime-300/30 bg-black/25 px-3 py-2 text-md":"min-h-[44px] max-h-[124px] border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5"].join(" ");return e.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:C=>{C.preventDefault(),i()},children:[e.jsx(ws,{ref:h,agents:t,value:o,onChange:a,onSubmit:()=>{o.trim()&&!c&&i()},placeholder:v?"Type while live voice is on…":N?"Ask Scout about what you are seeing…":"Ask Scout…",rows:N?4:2,disabled:c,submitOnEnter:!0,className:"min-w-0",textareaClassName:k}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("button",{type:"button",title:T,"aria-label":T,onClick:M,disabled:c||w||v,className:`flex h-8 items-center justify-center rounded border transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${u?"border-lime-300/50 bg-lime-300/10 text-lime-200":v?"border-lime-300/25 bg-lime-300/[0.05] text-lime-100/70":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"} ${g?"gap-1.5 px-3 font-mono text-xs uppercase tracking-[0.12em]":"w-9"}`,children:[w?e.jsx(X,{size:13,className:"animate-spin"}):u?e.jsx(Zt,{size:12,className:"fill-current"}):e.jsx(es,{size:13}),g&&e.jsx("span",{className:"truncate",children:p})]}),e.jsx("button",{type:"submit",title:"Send","aria-label":"Send",disabled:!o.trim()||c,className:"flex h-8 w-9 items-center justify-center rounded bg-lime-300/90 text-black transition-opacity disabled:cursor-not-allowed disabled:opacity-40",children:c?e.jsx(X,{size:13,className:"animate-spin"}):e.jsx($s,{size:13})})]})]})}function Ut({role:t,body:o,pending:a=!1,onContextMenu:i}){const c=t==="user",u=c?o:ue(o),[p,w]=n.useState(!1),j=n.useCallback(()=>{$e(u).then(()=>{w(!0),window.setTimeout(()=>w(!1),1200)}).catch(()=>{})},[u]);return e.jsxs("div",{className:"group flex flex-col gap-0.5",onContextMenu:i,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("span",{className:`text-2xs uppercase tracking-[0.12em] ${c?"text-[var(--scout-chrome-ink-ghost)]":"text-lime-300"}`,children:[c?"You":"Reply",a&&" · sending"]}),e.jsx("button",{type:"button",title:p?"Copied":"Copy message","aria-label":p?"Copied message":"Copy message",disabled:a||!u.trim(),onClick:j,className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-ghost)] opacity-70 transition hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-20 group-hover:opacity-100",children:p?e.jsx(Qs,{size:11}):e.jsx(Bs,{size:11})})]}),c?e.jsx("p",{className:`whitespace-pre-wrap break-words text-sm leading-relaxed text-[var(--scout-chrome-ink)] ${a?"opacity-60":""}`,children:u}):e.jsx("div",{className:a?"opacity-60":"",children:e.jsx(zs,{text:u})})]})}const lo=5*6e4;function uo(t,o){if(!t||!st(t.createdAt,o.createdAt))return!0;const a=Se(t.createdAt),i=Se(o.createdAt);return a===null||i===null?!0:Math.abs(i-a)>=lo}function st(t,o){const a=Se(t),i=Se(o);if(a===null||i===null)return!1;const c=new Date(a),u=new Date(i);return c.getFullYear()===u.getFullYear()&&c.getMonth()===u.getMonth()&&c.getDate()===u.getDate()}function mo(t){const o=Se(t);if(o===null)return"";const a=new Date(o),i=new Date,c=new Date(i);c.setDate(i.getDate()-1);const u=a.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});return st(o,i.getTime())?`Today ${u}`:st(o,c.getTime())?`Yesterday ${u}`:a.getFullYear()===i.getFullYear()?`${a.toLocaleDateString([],{month:"short",day:"numeric"})} ${u}`:`${a.toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})} ${u}`}const ho={"--scout-chrome-bg":"#f3f0e9","--scout-chrome-ink":"#2a2d2f","--scout-chrome-ink-strong":"#171a1c","--scout-chrome-ink-faint":"#6f716e","--scout-chrome-ink-ghost":"#9b9a94","--scout-chrome-border-soft":"#d9d4ca","--scout-chrome-hover":"#e9e5dc","--scout-chrome-active":"#ded8cc","--scout-accent":"#b58a3f"},Ft=[2,4,7,5,3,6,9,5,3,4,8,6,3,5,9,6,3,5,7,4,2,4,6,3],po=Ft.map((t,o)=>{const a=o/Ft.length*Math.PI*2-Math.PI/2,i=24-t/2,c=24+t/2;return{x1:36+Math.cos(a)*i,y1:36+Math.sin(a)*i,x2:36+Math.cos(a)*c,y2:36+Math.sin(a)*c}});function xo({recording:t,sending:o,speaking:a,voiceAvailable:i,voiceProbeState:c,voiceState:u}){return a?"speaking":o?"thinking":t&&u==="processing"?"processing":t?"listening":c!=="idle"||u==="starting"||i===null?"checking":i===!1?"unavailable":"ready"}const fo={checking:{label:"Getting voice ready",helper:"Checking your microphone and speech services"},unavailable:{label:"Voice is offline",helper:"Tap to reconnect"},listening:{label:"Listening",helper:"Tap to finish your turn"},processing:{label:"Transcribing",helper:"Turning speech into text"},thinking:{label:"Scout is thinking",helper:"Your turn is in"},speaking:{label:"Scout is speaking",helper:"Tap to interrupt"},ready:{label:"Ready to listen",helper:"Tap to speak"}};function bo(t){switch(t){case"listening":return"Finish and send voice turn";case"speaking":return"Stop spoken reply";case"unavailable":return"Retry voice connection";case"checking":return"Checking voice";case"processing":return"Transcribing voice turn";case"thinking":return"Scout is thinking";case"ready":return"Start voice turn"}}function vo(t){return t==="listening"||t==="processing"?"listen":t==="thinking"?"think":t==="speaking"?"speak":null}function go({phase:t,disabled:o,onClick:a}){const i=ts(),c=t==="listening"||t==="speaking",u=bo(t);return e.jsx(Jt.div,{animate:c&&!i?{scale:[1,1.025,1]}:{scale:1},transition:c&&!i?{duration:2.2,ease:"easeInOut",repeat:1/0}:{duration:.18},children:e.jsx("button",{type:"button",onClick:a,disabled:o,"aria-label":u,title:u,className:"group grid h-28 w-28 place-items-center rounded-full border border-[#d4cfc5] bg-white text-[#232729] shadow-[0_14px_34px_rgba(55,48,38,0.12)] outline-none transition-[border-color,box-shadow,transform] duration-200 hover:border-[#b9b2a6] hover:shadow-[0_17px_38px_rgba(55,48,38,0.16)] focus-visible:ring-2 focus-visible:ring-[#9c7736] focus-visible:ring-offset-4 focus-visible:ring-offset-[#f3f0e9] active:scale-[0.98] disabled:cursor-wait disabled:opacity-65",children:e.jsxs("svg",{viewBox:"0 0 72 72",className:"h-[72px] w-[72px]","aria-hidden":"true",children:[e.jsx("circle",{cx:"36",cy:"36",r:"24",fill:"none",stroke:"#d2cec6",strokeWidth:"0.8"}),po.map((p,w)=>e.jsx("line",{x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,stroke:c?"#817b71":"#a5a198",strokeWidth:"1.15",strokeLinecap:"round"},w)),e.jsx("circle",{cx:"36",cy:"36",r:"7.5",fill:c?"#b98a3b":"#d3b16d"})]})})})}const ko=[{id:"listen",label:"Listen"},{id:"think",label:"Think"},{id:"speak",label:"Speak"}];function So({messages:t,pendingAsk:o,partial:a,error:i,status:c,recording:u,sending:p,speaking:w,voiceAvailable:j,voiceInputSource:v,voiceProbeState:M,voiceState:N,voiceReplies:f,settingsOpen:b,setupPanel:h,settingsPanel:E,assistantModel:T,onPrimaryAction:g,onToggleVoiceReplies:k,onToggleSettings:C,onNewChat:S,onOpenLive:y}){const F=ts(),$=n.useRef(null),l=xo({recording:u,sending:p,speaking:w,voiceAvailable:j,voiceProbeState:M,voiceState:N}),I=fo[l],W=l==="checking"||l==="processing"||l==="thinking",_=v??(j===!0?"Default input from Scout Menu":"Checking microphone…"),L=t.slice(-12),G=a||(p&&L.at(-1)?.body!==o?o:null),q=L.length===0&&!G,x=vo(l),B=T?.trim()||"Turn-based voice",Z=j===!1?"Mic offline":j===null?"Checking mic":"Mic active",U=l==="unavailable"?"bg-[#a25549]":l==="ready"||l==="checking"?"bg-[#a7a49d]":"bg-[#b58a3f]";return n.useEffect(()=>{$.current?.scrollIntoView({block:"nearest"})},[t.length,o]),e.jsxs("section",{className:"relative flex h-full min-h-0 w-full flex-col overflow-hidden bg-[#f3f0e9] text-[#2a2d2f]",style:ho,"aria-label":"Direct voice conversation",children:[e.jsxs("header",{className:"flex min-h-14 shrink-0 items-center justify-between gap-2 border-b border-[#d9d4ca] px-3 py-2.5 sm:gap-4 sm:px-7",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("h1",{className:"truncate font-[var(--font-accent-title)] text-[15px] font-semibold tracking-[-0.018em] text-[#171a1c] sm:text-[17px]",children:"Direct Voice"}),e.jsx("span",{className:"hidden h-4 w-px bg-[#d6d1c7] sm:block","aria-hidden":"true"}),e.jsxs("div",{className:"hidden min-w-0 items-center gap-2 sm:flex","aria-live":"polite",children:[e.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${U}`,"aria-hidden":"true"}),e.jsx("span",{className:"truncate text-xs text-[#6f716e]",children:I.label})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 sm:gap-2",children:[e.jsxs("div",{className:"flex rounded-md border border-[#cbc5ba] bg-[#e8e3da] p-0.5",role:"tablist","aria-label":"Voice mode",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":"true",className:"rounded-[4px] bg-[#202426] px-2 py-1.5 text-[11px] font-medium text-white shadow-[0_1px_2px_rgba(0,0,0,0.14)] sm:px-3",children:"Direct"}),e.jsx("button",{type:"button",role:"tab","aria-selected":"false",onClick:y,disabled:!y,className:"rounded-[4px] px-2 py-1.5 text-[11px] font-medium text-[#6a6c69] transition-colors hover:bg-white/65 hover:text-[#232628] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#9c7736] disabled:cursor-default disabled:opacity-45 sm:px-3",children:"Live"})]}),e.jsxs("button",{type:"button",onClick:S,className:"hidden h-8 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-[#4f5352] transition-colors hover:bg-[#e7e2d9] hover:text-[#191c1e] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#9c7736] min-[430px]:flex sm:px-2.5","aria-label":"Start a new voice conversation",title:"New conversation",children:[e.jsx(Xt,{size:14,"aria-hidden":"true"}),e.jsx("span",{className:"hidden md:inline",children:"New chat"})]}),e.jsx("button",{type:"button",onClick:k,className:`grid h-8 w-8 place-items-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#9c7736] ${f?"bg-[#e1d5bd] text-[#765923]":"text-[#6e706d] hover:bg-[#e7e2d9] hover:text-[#191c1e]"}`,"aria-pressed":f,"aria-label":f?"Mute spoken replies":"Enable spoken replies",title:f?"Spoken replies on":"Spoken replies off",children:f?e.jsx(ss,{size:15}):e.jsx(os,{size:15})}),e.jsx("button",{type:"button",onClick:C,className:`grid h-8 w-8 place-items-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#9c7736] ${b?"bg-[#e1d5bd] text-[#765923]":"text-[#6e706d] hover:bg-[#e7e2d9] hover:text-[#191c1e]"}`,"aria-expanded":b,"aria-label":"Voice and Scoutbot settings",title:"Voice and Scoutbot settings",children:e.jsx(js,{size:15})})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx("div",{className:"mx-auto flex min-h-full w-full max-w-[880px] flex-col px-6 py-8 sm:px-10 sm:py-10 lg:px-14",children:e.jsxs("div",{className:"w-full max-w-[720px]",children:[q?e.jsxs("div",{className:"pt-1",children:[e.jsx("p",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-[#8b8983]",children:"Conversation"}),e.jsx("p",{className:"mt-2 max-w-[38ch] text-sm leading-6 text-[#737570]",children:"Your voice turns and Scout’s replies will appear here."})]}):e.jsxs("div",{className:"space-y-8 sm:space-y-9",children:[L.map(V=>{const O=V.role==="assistant";return e.jsxs("article",{className:"max-w-[68ch]",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[e.jsx("span",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-[#575a59]",children:O?"Scout":"You"}),O&&e.jsx("span",{className:"text-[10px] text-[#8a8983]",children:B})]}),e.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-[15px] leading-6 text-[#25292a] sm:text-base sm:leading-7",children:O?ue(V.body):V.body})]},V.id)}),G&&e.jsxs("article",{className:"max-w-[68ch]","aria-live":"polite",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.12em] text-[#765923]",children:"You"}),e.jsx("span",{className:"text-[10px] text-[#9a7a40]",children:a?"Listening":"Sending"})]}),e.jsx("p",{className:"mt-1.5 whitespace-pre-wrap text-[15px] leading-6 text-[#25292a] sm:text-base sm:leading-7",children:G})]})]}),e.jsx("div",{ref:$})]})})}),e.jsx(Ns,{initial:!1,children:(h||b||i)&&e.jsx(Jt.div,{initial:F?!1:{opacity:0,y:6},animate:{opacity:1,y:0},exit:F?void 0:{opacity:0,y:6},className:"max-h-[34vh] shrink-0 overflow-y-auto border-y border-[#d9d4ca] bg-[#eeeae2]",children:e.jsxs("div",{className:"mx-auto w-full max-w-[880px] px-6 py-4 sm:px-10 lg:px-14",children:[i&&e.jsx("p",{className:"mb-3 text-sm leading-6 text-[#93483f]",children:i}),h,b&&E]})})}),e.jsxs("div",{className:"shrink-0 px-5 pb-4 pt-3 sm:px-8 sm:pb-5",children:[e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx(go,{phase:l,disabled:W,onClick:g}),e.jsxs("div",{className:"mt-3","aria-live":"polite",children:[e.jsx("p",{className:"text-sm font-semibold text-[#24282a]",children:I.label}),e.jsx("p",{className:"mt-0.5 text-xs text-[#7a7b76]",children:I.helper})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-[#7b6a49]",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[#b58a3f]","aria-hidden":"true"}),e.jsx("span",{children:Z})]})]}),e.jsxs("footer",{className:"mx-auto mt-4 flex w-full max-w-[880px] flex-col items-stretch justify-between gap-2 border-t border-[#d9d4ca] pt-3 text-[11px] text-[#747570] sm:flex-row sm:items-center sm:gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx(es,{size:12,className:"shrink-0 text-[#8b7350]","aria-hidden":"true"}),e.jsxs("span",{className:"truncate",children:["Input: ",_]})]}),e.jsx("div",{className:"flex shrink-0 items-center justify-between gap-3 sm:justify-start","aria-label":`Voice turn state: ${I.label}`,children:ko.map(V=>{const O=x===V.id;return e.jsx("span",{className:O?"font-medium text-[#5e4821]":"text-[#96948e]",children:V.label},V.id)})}),c&&!p&&l!=="listening"&&e.jsx("span",{className:"hidden max-w-48 truncate text-right text-[#96948e] lg:block",children:c})]})]})]})}function Ht({icon:t,title:o,onClick:a,disabled:i,active:c,badge:u}){return e.jsxs("button",{type:"button",title:o,"aria-label":o,onClick:a,disabled:i,className:`flex shrink-0 items-center gap-1 rounded border p-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${c?"border-lime-300/50 bg-lime-300/10 text-lime-200":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[t,u&&e.jsx("span",{className:"font-mono text-3xs tracking-tight",children:u})]})}function Wt({issue:t,probeState:o,onLaunch:a,onRetry:i,onSettings:c,onDismiss:u}){const p=o==="probing"||o==="launching";return e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/15 px-2.5 py-2 font-mono text-xs text-[var(--scout-chrome-ink)]",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx($t,{size:13,className:"mt-0.5 shrink-0 text-[var(--scout-chrome-ink-faint)]"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:"Scout Voice"}),e.jsx("p",{className:"mt-1 leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Open Scout Menu to use speech."}),t&&e.jsx("p",{className:"mt-2 break-words leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:t})]}),u?e.jsx("button",{type:"button",title:"Hide voice setup","aria-label":"Hide voice setup",onClick:u,className:"shrink-0 rounded border border-transparent p-1 text-[var(--scout-chrome-ink-ghost)] transition-colors hover:border-[var(--scout-chrome-border-soft)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:e.jsx(Us,{size:11})}):null]}),e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1.5",children:[e.jsx(Xe,{icon:o==="launching"?e.jsx(X,{size:12,className:"animate-spin"}):e.jsx($t,{size:12}),label:o==="launching"?"Opening":"Open",onClick:a,disabled:o==="probing",title:"Open Scout services"}),e.jsx(Xe,{icon:o==="probing"?e.jsx(X,{size:12,className:"animate-spin"}):e.jsx(Fs,{size:12}),label:"Retry",onClick:i,disabled:p,title:"Check Scout voice again"}),e.jsx(Xe,{icon:e.jsx(Hs,{size:12}),label:"Voice",onClick:c,disabled:o==="probing",title:"Open Scoutbot voice settings"})]})]})}function Xe({icon:t,label:o,onClick:a,disabled:i,title:c}){return e.jsxs("button",{type:"button",title:c,onClick:a,disabled:i,className:"flex min-h-7 items-center justify-center gap-1.5 rounded border border-[var(--scout-chrome-border-soft)] px-2 text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-45",children:[t,o]})}const ke="gpt-4o-mini-tts",yo={openai:"OpenAI",elevenlabs:"ElevenLabs",nvidia:"NVIDIA",system:"System"},ot="us-woman",Be=[{id:"us-woman",label:"US Woman",locale:"US English",presentation:"Woman",voiceName:"Marin",description:"Warm, clear, and conversational.",provider:"openai",accentFromPrompt:!1,speech:{modelId:ke,voiceId:"marin",instructions:"Speak in clear, natural American English with a warm, grounded feminine presentation. Keep the delivery conversational and responsive."}},{id:"us-man",label:"US Man",locale:"US English",presentation:"Man",voiceName:"Cedar",description:"Grounded, calm, and direct.",provider:"openai",accentFromPrompt:!1,speech:{modelId:ke,voiceId:"cedar",instructions:"Speak in clear, natural American English with a warm, grounded masculine presentation. Keep the delivery conversational and responsive."}},{id:"british-woman",label:"British Woman",locale:"British English",presentation:"Woman",voiceName:"Marin",description:"Warm with a subtle British cadence.",provider:"openai",accentFromPrompt:!0,speech:{modelId:ke,voiceId:"marin",instructions:"Speak in natural British English with a subtle contemporary British accent and a warm, grounded feminine presentation. Avoid theatrical or exaggerated delivery."}},{id:"british-man",label:"British Man",locale:"British English",presentation:"Man",voiceName:"Cedar",description:"Calm with a subtle British cadence.",provider:"openai",accentFromPrompt:!0,speech:{modelId:ke,voiceId:"cedar",instructions:"Speak in natural British English with a subtle contemporary British accent and a calm, grounded masculine presentation. Avoid theatrical or exaggerated delivery."}}],me={modelId:ke,voiceId:"marin",instructions:"Speak naturally, clearly, and conversationally."},wo={modelId:"",voiceId:"",instructions:"",playback:"host"};function jo(t){return t==="custom"||t==="device"||Be.some(o=>o.id===t)}function No(t,o={}){return t==="device"?wo:t==="custom"?{modelId:o.modelId?.trim()||me.modelId,voiceId:o.voiceId?.trim()||me.voiceId,instructions:o.instructions?.trim()||me.instructions}:Be.find(a=>a.id===t)?.speech??Be.find(a=>a.id===ot).speech}function Gt({presentation:t,voicePresetId:o,onVoicePresetId:a,speechSelectionId:i,onSpeechSelectionId:c,customSpeechModelId:u,onCustomSpeechModelId:p,customSpeechVoiceId:w,onCustomSpeechVoiceId:j,customSpeechInstructions:v,onCustomSpeechInstructions:M,voiceDefaults:N,modelDraft:f,onModelDraft:b,modelOptions:h=[],promptDraft:E,onPromptDraft:T,configLoading:g,configSaving:k,configError:C,configStatus:S,onSave:y,onReload:F}){const $=t==="direct-voice";return e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-surface)] p-3",children:e.jsxs("div",{className:"flex flex-col gap-3",children:[$?e.jsxs("fieldset",{className:"flex flex-col gap-2",children:[e.jsx("legend",{className:"mb-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Scout voice"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",role:"radiogroup","aria-label":"Scout voice",children:Be.map(l=>{const I=i===l.id;return e.jsxs("button",{type:"button",role:"radio","aria-checked":I,onClick:()=>c(l.id),className:`min-h-20 rounded border p-2.5 text-left transition ${I?"border-[var(--hud-accent)] bg-[var(--hud-accent-soft)] text-[var(--scout-chrome-ink)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)]"}`,children:[e.jsx("span",{className:"block font-mono text-xs font-bold uppercase tracking-[0.1em]",children:l.label}),e.jsxs("span",{className:"mt-1 block font-mono text-2xs leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:[l.voiceName," · ",l.description]}),e.jsxs("span",{className:"mt-1 block font-mono text-2xs leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:[yo[l.provider]," · ",l.speech.modelId," · ",l.speech.voiceId]}),l.accentFromPrompt&&e.jsx("span",{className:"mt-1 block font-mono text-2xs leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Accent is prompted, not a separate voice."})]},l.id)})}),e.jsxs("button",{type:"button",role:"radio","aria-checked":i==="device",onClick:()=>c("device"),className:`rounded border px-2.5 py-2 text-left font-mono text-xs transition ${i==="device"?"border-[var(--hud-accent)] bg-[var(--hud-accent-soft)] text-[var(--scout-chrome-ink)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)]"}`,children:[e.jsx("span",{className:"font-bold uppercase tracking-[0.1em]",children:"This Mac's voice"}),e.jsx("span",{className:"ml-2 text-[var(--scout-chrome-ink-ghost)]",children:"Speaks through Scout Menu in its own Settings › Voice pick. The only way to hear installed voices such as Kokoro."})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":i==="custom",onClick:()=>c("custom"),className:`rounded border px-2.5 py-2 text-left font-mono text-xs transition ${i==="custom"?"border-[var(--hud-accent)] bg-[var(--hud-accent-soft)] text-[var(--scout-chrome-ink)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)]"}`,children:[e.jsx("span",{className:"font-bold uppercase tracking-[0.1em]",children:"Custom voice"}),e.jsx("span",{className:"ml-2 text-[var(--scout-chrome-ink-ghost)]",children:"Use any supported model, voice, and style."})]}),i==="custom"&&e.jsxs("div",{className:"grid gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] p-2.5",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Speech model",e.jsx("input",{value:u,onChange:l=>p(l.target.value),placeholder:"gpt-4o-mini-tts",className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]"})]}),e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Voice ID",e.jsx("input",{value:w,onChange:l=>j(l.target.value),placeholder:"marin",className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]"})]})]}),e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Speaking style",e.jsx("textarea",{value:v,onChange:l=>M(l.target.value),rows:3,placeholder:"Speak naturally, clearly, and conversationally.",className:"w-full resize-y rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]"})]})]}),e.jsx("p",{className:"font-mono text-2xs normal-case leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Request-based TTS, separate from GPT Live. Replies are AI-generated speech."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Voice FX",e.jsx("select",{value:o,onChange:l=>a(l.target.value),className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)]",children:Bt.map(l=>e.jsxs("option",{value:l.id,children:[l.label," — ",l.family]},l.id))}),e.jsx("span",{className:"font-mono text-2xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink-ghost)]",children:Bt.find(l=>l.id===o)?.description??"Custom voice mood for spoken replies."})]}),e.jsxs("div",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Scout Voice",e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--hud-bg)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)]",children:N?`${N.modelId}${N.voiceId?` / ${N.voiceId}`:""}`:"Unavailable"})]})]}),e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Preferred model",h.length>0?e.jsx("select",{value:f,onChange:l=>b(l.target.value),className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)] bg-[var(--hud-bg)]",disabled:g||k,children:h.map(l=>e.jsx("option",{value:l.id,children:l.label},l.id))}):e.jsx("input",{value:f,onChange:l=>b(l.target.value),placeholder:"gpt-5.6-luna",className:"rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)] bg-[var(--hud-bg)]",disabled:g||k})]}),e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["System Prompt",e.jsx("textarea",{value:E,onChange:l=>T(l.target.value),rows:6,className:"w-full resize-y rounded border border-[var(--scout-chrome-border-soft)] px-2 py-1.5 font-mono text-xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink)] bg-[var(--hud-bg)]",disabled:g||k})]}),C&&e.jsx("div",{className:"font-mono text-xs leading-relaxed text-[var(--hud-status-error)]",children:C}),S&&e.jsx("div",{className:"font-mono text-xs leading-relaxed text-[var(--hud-accent)]",children:S}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:y,disabled:g||k||!E.trim(),className:"flex items-center justify-center gap-2 rounded bg-[var(--hud-accent)] px-2.5 py-2 font-mono text-xs font-bold uppercase tracking-[0.12em] text-black transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:[(g||k)&&e.jsx(X,{size:13,className:"animate-spin"}),k?"Saving":"Save"]}),e.jsx("button",{type:"button",onClick:F,disabled:g||k,className:"rounded border border-[var(--scout-chrome-border-soft)] px-2.5 py-2 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] disabled:cursor-not-allowed disabled:opacity-40",children:"Reload"})]})]})})}const Co="chill-dispatcher",Eo=6e4,To=2500,Io=1.2,_o={lowCutHz:160,highCutHz:5200,bandQ:.35,saturationAmount:.035,bitcrushAmount:0,hissGain:0,hissCutoffHz:1800,presencePeakDb:1.5,presenceCenterHz:1500,presenceQ:.65,compressorThresholdDb:-15,compressorRatio:2.2,clickEnabled:!0,clickGain:.24,clickDurationMs:45,squelchTailEnabled:!0,squelchTailGain:.018,squelchTailDurationMs:95,outputGain:1,wetMix:.38};function Ro(t){const o=Math.min(1,t/8);return{saturationAmount:.035+o*.025,presencePeakDb:1.5+o*1.5}}function Mo(t,o){return{...t==="chill-dispatcher"?_o:{},...Ro(o)}}function ns(t,o,a){return new Promise((i,c)=>{const u=window.setTimeout(()=>c(new Error(a)),o);t.then(i,c).finally(()=>window.clearTimeout(u))})}async function De(t,o={}){!t.sessionId&&!o.allowCurrentSession||await ns(t.cancel(),To,"Timed out releasing Scout voice session.").catch(()=>{})}function Vo(t){const o=t instanceof Error?t.message:String(t);return/session_cancelled|was cancelled|cancelled/i.test(o)}const qt=new RegExp("(?:^|(?<=[\\s(`'\"<>]))(?:~\\/|\\/(?:Users|home|opt|var|etc|tmp|private)\\/)[^\\s)`'\"<>]+\\.[A-Za-z0-9]{1,8}\\b","g");function Ao(t){const o=[],a=new Set;qt.lastIndex=0;let i;for(;(i=qt.exec(t))!==null;)a.has(i[0])||(a.add(i[0]),o.push(i[0]));return o}function Yt(t){const o=t.split("/").filter(Boolean);return o.length<=2?t:`…/${o.slice(-2).join("/")}`}function Lo(){return{requesterName:"OpenScout",productName:"Scout Voice",headline:"Turn on local voice",body:"Scout voice handles local speech capture and spoken replies. Start Scout services, then return here to talk with your workspace.",actionLabel:"Return to OpenScout",logo:{url:new URL("/openscout-icon.png",window.location.href).toString(),symbolName:"sparkles"}}}const Oo=["Explain what went wrong here.","Help me rewrite this message.","What should I try next?"];function Po({height:t,forceExpanded:o=!1,fill:a=!1,presentation:i="chat",onOpenLive:c}={}){const{applyScoutbotUiAction:u,agents:p,route:w,onlineCount:j}=At(),v=gs(),M=nt(rt,!0),N=at(),f=M&&(N.state==="connecting"||N.state==="live"),[b,h]=Pt("openscout.scoutbot.collapsed",!0),[E,T]=n.useState(""),[g,k]=n.useState(!1),[C,S]=n.useState(null),[y,F]=n.useState(null),[$,l]=n.useState(null),[I,W]=n.useState("idle"),[_,L]=Pt("openscout.scoutbot.voiceReplies",!1),[G]=Is("openscout.scoutbot.voiceSpeed",Io),[q,x]=ge("openscout.scoutbot.voicePresetId",Co),[B,Z]=ge("openscout.scoutbot.speechProfileId",ot),[U,V]=ge("openscout.scoutbot.customSpeechModelId",me.modelId),[O,it]=ge("openscout.scoutbot.customSpeechVoiceId",me.voiceId),[ye,ct]=ge("openscout.scoutbot.customSpeechInstructions",me.instructions),[Y,we]=n.useState(!1),[Fe,te]=n.useState(null),[He,he]=n.useState(""),[J,We]=n.useState(!1),[as,lt]=n.useState(null),[dt,Ge]=n.useState(null),[$o,je]=n.useState(null),[qe,P]=n.useState(null),[oe,pe]=n.useState(!1),[is,Ne]=n.useState(!1),[D,ne]=n.useState(null),[re,ut]=n.useState(!1),[Ye,mt]=n.useState(null),[ht,pt]=n.useState(!1),[xt,ft]=n.useState(!1),[bt,Ce]=n.useState(null),[vt,Je]=n.useState(null),[Ee,Te]=n.useState(""),[gt,kt]=n.useState([]),[Ie,_e]=n.useState(""),[St,yt]=n.useState(null),[cs,ae]=n.useState(!1),[ls,ie]=n.useState(0),[ds,Re]=n.useState(!1),[Qe,wt]=n.useState(null),Me=jo(B)?B:ot,xe=n.useMemo(()=>No(Me,{modelId:U,voiceId:O,instructions:ye}),[ye,U,O,Me]),Ve=n.useRef(Rs()),ce=n.useRef(!1),Q=n.useRef(null),le=n.useRef(null),se=n.useRef(null),Ae=n.useRef(_);Ae.current=_,n.useEffect(()=>{i==="direct-voice"&&(Ae.current=!0,L(!0))},[i,L]),n.useEffect(()=>(ce.current=!0,()=>{ce.current=!1,le.current="discard";const s=Q.current;Q.current=null,s&&De(s,{allowCurrentSession:!0}),se.current?.stop(),se.current=null}),[]);const R=n.useCallback(()=>{se.current?.stop(),se.current=null,We(!1)},[]),Le=n.useCallback(s=>{if(!s)return;R();const r=to(s),d=i==="direct-voice"?Ms(r,{speed:G,modelId:xe.modelId,voiceId:xe.voiceId,instructions:xe.instructions,playback:xe.playback}):Vs(r,{speed:G,presetId:q,params:Mo(q,j)});se.current=d,We(!0),d.promise.catch(m=>{As(m)||console.warn("[scoutbot] reply speech unavailable",{message:m instanceof Error?m.message:String(m)})}).finally(()=>{se.current===d&&(se.current=null,We(!1))})},[R,G,xe,j,i,q]),jt=n.useCallback(s=>{Ae.current&&Le(s)},[Le]),Nt=n.useCallback(s=>{Le(ue(s))},[Le]),{openFilePreview:Ct}=At(),Et=ks(),us=n.useCallback((s,r)=>{const d=window.getSelection()?.toString().trim(),m=ue(r),A=Ao(m),z=[];if(d&&(z.push({kind:"action",label:"Copy selection",shortcut:"⌘C",onSelect:()=>{$e(d)}}),z.push({kind:"separator"})),z.push({kind:"action",label:"Copy message",onSelect:()=>{$e(m)}}),A.length>0){z.push({kind:"separator"});for(const ee of A.slice(0,5)){const Ke=Yt(ee);z.push({kind:"action",label:`Preview ${Ke}`,onSelect:()=>Ct(ee)})}for(const ee of A.slice(0,5)){const Ke=Yt(ee);z.push({kind:"action",label:`Open ${Ke} in OS`,onSelect:()=>{H("/api/file/reveal",{method:"POST",body:JSON.stringify({path:ee})}).catch(()=>{})}})}z.push({kind:"action",label:A.length===1?"Copy path":"Copy first path",onSelect:()=>{$e(A[0])}})}z.push({kind:"separator"}),z.push({kind:"action",label:J?"Say again (stop current)":"Say",onSelect:()=>Nt(r)}),Et(s,z)},[Ct,Nt,Et,J]);n.useEffect(()=>()=>{R()},[R]);const ms=Oo,de=n.useCallback(s=>{const r=[...s.messages].reverse().find(m=>m.role==="user"),d=[...s.messages].reverse().find(m=>m.role==="assistant");Ge(r?.body??null),je(d?ue(d.body):null)},[]),fe=n.useCallback(async()=>{try{const s=await H("/api/scoutbot/session");ne(s),de(s.session)}catch{ne(null)}},[de]);n.useEffect(()=>{fe()},[fe]);const Oe=n.useCallback(async()=>{pt(!0),Ce(null);try{const s=await H("/api/scoutbot/config");Te(s.model),kt(s.modelOptions??[]),_e(s.systemPrompt),Je(null)}catch(s){Ce(s instanceof Error?s.message:"Could not load settings.")}finally{pt(!1)}},[]);n.useEffect(()=>{oe&&Oe()},[Oe,oe]),n.useEffect(()=>{if(!oe)return;let s=!1;return H("/api/voice/defaults").then(r=>{s||yt(r)}).catch(()=>{s||yt(null)}),()=>{s=!0}},[oe]);const Tt=n.useCallback(async()=>{ft(!0),Ce(null),Je(null);try{const s=await H("/api/scoutbot/config",{method:"POST",body:JSON.stringify({model:Ee,systemPrompt:Ie})});Te(s.config.model),kt(s.config.modelOptions??[]),_e(s.config.systemPrompt),Je("Saved")}catch(s){Ce(s instanceof Error?s.message:"Could not save settings.")}finally{ft(!1)}},[Ee,Ie]),hs=n.useCallback(async s=>{if(!(!s||Qe)){wt(s),S(null),R();try{const r=await H("/api/scoutbot/session/switch",{method:"POST",body:JSON.stringify({id:s})});ne(r),de(r.session),Re(!1),ae(!1),window.dispatchEvent(new CustomEvent(ve,{detail:{id:r.session.id}}))}catch(r){S(r instanceof Error?r.message:"Could not switch session.")}finally{wt(null)}}},[R,Qe,de]),Pe=n.useCallback(async()=>{if(!(re||g)){if(D?.session.messages.length===0){T(""),S(null),ae(!1),Re(!1),P("New chat ready"),ie(s=>s+1);return}ut(!0),S(null),P("Starting new chat"),R();try{const s=await H("/api/scoutbot/session/reset",{method:"POST"});ne(s),T(""),Ge(null),je(null),ae(!1),Re(!1),P("New chat ready"),ie(r=>r+1),window.dispatchEvent(new CustomEvent(ve,{detail:{id:s.session.id}}))}catch(s){P(null),S(s instanceof Error?s.message:"Could not start a new chat.")}finally{ut(!1)}}},[re,g,D,R]),ps=n.useCallback(async s=>{if(!(!s||Ye)){mt(s),S(null),R();try{const r=await H("/api/scoutbot/session/archive",{method:"POST",body:JSON.stringify({id:s})});ne(r),de(r.session),ae(!1),P("session archived"),window.dispatchEvent(new CustomEvent(ve,{detail:{id:r.session.id}}))}catch(r){S(r instanceof Error?r.message:"Could not archive session.")}finally{mt(null)}}},[Ye,R,de]),ze=n.useCallback((s,r)=>{F(r),lt(s.activeInputDeviceName),l(r?null:s.lastUnavailableReason??"Scout voice service is not reachable."),W("idle")},[]),K=n.useCallback(async(s=!1)=>{const r=Ve.current;W(m=>m==="launching"?m:"probing");const d=await r.probe(s?{force:!0}:void 0);return ze(r,d),d},[ze]);n.useEffect(()=>{Ls();const s=Ve.current,r=Os(d=>{F(d.ok),lt(d.inputDeviceName),l(d.ok?null:d.reason),W("idle")});return s.connectionState==="unknown"?K():ze(s,s.connectionState==="connected"),r},[ze,K]);const It=n.useCallback(()=>{const s=Ve.current;S(null),W("launching"),s.launch({source:"openscout",context:Lo()}),window.setTimeout(()=>{K(!0)},2400)},[K]),_t=n.useCallback(s=>{const r=ue(s);je(r);for(const d of _s(s))d.type==="ask-agent"?(P(`Sending to ${d.targetLabel}`),H("/api/scoutbot/actions/ask",{method:"POST",body:JSON.stringify({targetLabel:d.targetLabel,targetAgentId:d.targetAgentId,body:d.body,channel:d.channel})}).then(m=>{P(m.flightId?`Sent to ${m.targetAgentId??m.targetLabel} · run ${m.flightId}`:`Sent to ${m.targetAgentId??m.targetLabel}`)}).catch(m=>{P(null),S(m instanceof Error?m.message:"Could not send to agent.")})):d.type!=="reminder"&&u(d);jt(r)},[u,jt]);n.useEffect(()=>{const s=()=>{P("Scoutbot replied by voice"),fe()},r=()=>{P("Scoutbot chat changed"),fe()};return window.addEventListener(Lt,s),window.addEventListener(ve,r),()=>{window.removeEventListener(Lt,s),window.removeEventListener(ve,r)}},[fe]);const be=n.useCallback(async s=>{const r=s.trim();if(!(!r||g)){k(!0),S(null),Ge(r),je(null),P("Sending"),T(d=>d.trim()===r?"":d);try{await Ts().catch(()=>null);const d=await H("/api/scoutbot/chat",{method:"POST",body:JSON.stringify({body:r,route:w,uiContext:Ss("web")})});ne({session:d.session,sessions:d.sessions,config:d.config}),P("Reply received"),_t(d.reply.body)}catch(d){P(null),S(d instanceof Error?d.message:"Could not send.")}finally{k(!1)}}},[_t,w,g]),Rt=n.useCallback(async()=>{if(Y)return;const s=Ve.current;if(le.current=null,S(null),he(""),te("starting"),y!==!0&&!await K(!0)){te(null);return}let r=null,d=!1;const m=async()=>{!r||d||(d=!0,await De(r,{allowCurrentSession:Q.current===r}),Q.current===r&&(Q.current=null))};try{if(r=await s.startLive({onState:te,onPartial:he},{surface:i==="direct-voice"?"direct-voice":"chat-composer"}),!ce.current){await De(r,{allowCurrentSession:!0});return}Q.current=r,we(!0);const A=await r.result;if(await m(),!ce.current||(we(!1),he(""),le.current))return;te("done"),A.text&&await be(A.text)}catch(A){const z=le.current;if(!ce.current)return;const ee=!!z||Vo(A);if(await m(),we(!1),he(""),z==="stop-failed")return;te(ee?null:"error"),ee||S(A instanceof Error?A.message:"Scout voice recording failed.")}finally{ce.current&&await m(),le.current=null}},[be,i,K,Y,y]),Mt=n.useCallback(async()=>{const s=Q.current;if(s){te("processing");try{await ns(s.stop(),Eo,"Scout voice did not finish processing the recording.")}catch(r){le.current="stop-failed",await De(s,{allowCurrentSession:!0}),Q.current===s&&(Q.current=null,we(!1),he(""),te("error")),S(r instanceof Error?`Scout voice recording did not finish: ${r.message}`:"Scout voice recording did not finish.")}}},[]);n.useEffect(()=>{const s=()=>h(!1);return window.addEventListener("scout:scoutbot-panel-open",s),()=>window.removeEventListener("scout:scoutbot-panel-open",s)},[h]),n.useEffect(()=>Cs(()=>h(!b)),[b,h]),n.useEffect(()=>{const s=r=>{const d=r.detail,m=d&&typeof d=="object"&&"body"in d?d.body:null;typeof m=="string"&&m.trim()&&(h(!1),be(m))};return window.addEventListener(zt,s),()=>window.removeEventListener(zt,s)},[be,h]),n.useEffect(()=>{const s=r=>{const d=r.detail,m=d&&typeof d=="object"&&"body"in d?d.body:null;typeof m=="string"&&m.trim()&&(h(!1),T(m),ie(A=>A+1))};return window.addEventListener("scout:scoutbot-compose",s),()=>window.removeEventListener("scout:scoutbot-compose",s)},[h]);const Vt=n.useMemo(()=>{const s=J?"speaking":g?"thinking":Y?"listening":"idle",r=D?.session??null,d=r&&r.messages.length>0?r.messages[r.messages.length-1]:null;return{activity:s,brief:{lastDeliveredAt:null},reminders:{dueCount:0,upcomingCount:0,due:[],next:null},voice:{available:y,setupBlocked:y===!1,replies:_},error:C,session:{title:r?.title??null,lastActivityAt:d?.createdAt??r?.updatedAt??null},conversation:{messageCount:r?.messages.length??0,loading:D===null}}},[J,g,Y,y,_,C,D]);n.useEffect(()=>{v?.publishState(Vt)},[v,Vt]),n.useEffect(()=>{if(!v)return;const s={focusScoutbot:()=>h(!1),triggerBrief:()=>{h(!1),ie(r=>r+1)},triggerAskState:()=>{h(!1),ie(r=>r+1)},toggleVoiceReplies:()=>{const r=!_;L(r),r||R()},openScoutbotSettings:()=>{h(!1),pe(!0)},startNewChat:()=>{h(!1),re||Pe()},dismissReminder:()=>{},askReminderStatus:()=>{h(!1),ie(r=>r+1)}};v.registerActions(s)},[v,h,_,L,R,pe,re,Pe]),n.useEffect(()=>{y===!0&&Ne(!1)},[y]);const xs=f?"Live call":Y?Fe==="processing"?"Sending":"Stop":I==="probing"?"Checking Voice":I==="launching"?"Opening Scout":y===!1?"Open Scout":"Start Talking",fs=D!==null&&D.session.messages.length===0&&!g;if(i==="direct-voice")return e.jsx(So,{messages:D?.session.messages??[],pendingAsk:g?dt:null,partial:He,error:C,status:qe,recording:Y,sending:g,speaking:J,voiceAvailable:y,voiceInputSource:as,voiceProbeState:I,voiceState:Fe,voiceReplies:_,settingsOpen:oe,assistantModel:D?.session.model??D?.config.model??null,setupPanel:y===!1?e.jsx(Wt,{issue:$,probeState:I,onLaunch:It,onRetry:()=>{K(!0)},onSettings:()=>pe(!0),onDismiss:()=>Ne(!1)}):null,settingsPanel:e.jsx(Gt,{presentation:"direct-voice",voicePresetId:q,onVoicePresetId:x,speechSelectionId:Me,onSpeechSelectionId:Z,customSpeechModelId:U,onCustomSpeechModelId:V,customSpeechVoiceId:O,onCustomSpeechVoiceId:it,customSpeechInstructions:ye,onCustomSpeechInstructions:ct,voiceDefaults:St,modelDraft:Ee,onModelDraft:Te,modelOptions:gt,promptDraft:Ie,onPromptDraft:_e,configLoading:ht,configSaving:xt,configError:bt,configStatus:vt,onSave:()=>{Tt()},onReload:()=>{Oe()}}),onPrimaryAction:()=>{J?R():Y?Mt():y===!1?K(!0):Rt()},onToggleVoiceReplies:()=>{const s=!_;Ae.current=s,L(s),s||R()},onToggleSettings:()=>pe(s=>!s),onNewChat:()=>{re||Pe()},onOpenLive:c});if(b&&!o)return e.jsx("div",{className:"flex shrink-0 items-center border-t border-[var(--scout-chrome-border-soft)] px-3 py-1.5",children:e.jsx(Es,{})});const bs=a?"flex h-full min-h-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]":t===void 0?"flex max-h-[60vh] shrink-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]":"flex shrink-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]",vs=t===void 0||a?void 0:{height:`${t}px`};return e.jsxs("section",{className:bs,style:vs,children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-3 pt-2.5 pb-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-2",children:e.jsx(Ws,{size:20,className:"shrink-0 text-lime-300","aria-hidden":"true"})}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(Ht,{icon:_?e.jsx(ss,{size:11}):e.jsx(os,{size:11}),title:f?_?"Voice replies on for typed chat (live call has its own audio)":"Voice replies off for typed chat (live call has its own audio)":_?"Voice replies on (click to mute)":"Voice replies off (click to enable)",onClick:()=>{const s=!_;L(s),s||R()},active:_}),!o&&e.jsx(Ht,{icon:e.jsx(Ze,{size:11}),title:"Minimize",onClick:()=>h(!0)})]})]}),oe&&e.jsx(Gt,{presentation:"chat",voicePresetId:q,onVoicePresetId:x,speechSelectionId:Me,onSpeechSelectionId:Z,customSpeechModelId:U,onCustomSpeechModelId:V,customSpeechVoiceId:O,onCustomSpeechVoiceId:it,customSpeechInstructions:ye,onCustomSpeechInstructions:ct,voiceDefaults:St,modelDraft:Ee,onModelDraft:Te,modelOptions:gt,promptDraft:Ie,onPromptDraft:_e,configLoading:ht,configSaving:xt,configError:bt,configStatus:vt,onSave:()=>{Tt()},onReload:()=>{Oe()}})]}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col px-3 pb-1.5",children:D&&e.jsx(ao,{state:D,chatExpanded:cs,onToggleExpanded:()=>ae(s=>!s),sessionPickerOpen:ds,onToggleSessionPicker:()=>Re(s=>!s),onStartNewChat:()=>{Pe()},startingNewChat:re,onSwitchSession:s=>{hs(s)},switchingSessionId:Qe,sending:g,briefing:!1,pendingAsk:g?dt:null,onArchiveSession:s=>{ps(s)},archivingSessionId:Ye,onAssistantContextMenu:us,suggestedPrompts:ms,onSelectPrompt:s=>{T(s),ae(!1)}})}),e.jsxs("div",{className:"flex shrink-0 flex-col gap-1.5 border-t border-[var(--scout-chrome-border-soft)] bg-black/10 px-3 pt-2 pb-2.5",children:[y===!1&&is&&!f&&e.jsx(Wt,{issue:$,probeState:I,onLaunch:It,onRetry:()=>{K(!0)},onSettings:()=>pe(!0),onDismiss:()=>Ne(!1)}),(He||J)&&!f&&e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 px-2.5 py-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"min-w-0 truncate",children:J?"Speaking reply…":He}),J&&e.jsx("button",{type:"button",title:"Stop spoken reply",onClick:R,className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] p-1 text-[var(--scout-chrome-ink)] hover:bg-[var(--scout-chrome-hover)]",children:e.jsx(Zt,{size:11,className:"fill-current"})})]}),qe&&!g&&e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:qe}),e.jsx(co,{agents:p,draft:E,onDraftChange:T,onSubmit:()=>{be(E)},sending:g,recording:Y,voiceLabel:xs,voiceBusy:Fe==="processing"||I==="probing"||I==="launching",voiceUnavailable:y===!1,voiceHeld:f,onMicClick:()=>{if(!f){if(y===!1){Ne(!0);return}Y?Mt():Rt()}},prominent:fs&&!f,autoFocus:o,focusSignal:ls}),C&&e.jsx("div",{className:"rounded border border-red-400/30 bg-red-400/10 px-2.5 py-2 font-mono text-xs leading-relaxed text-red-200",children:C})]})]})}function rs({dictationActive:t=!1,autoStart:o=!1}){const a=nt(rt,!0),{enabled:i,state:c,leaseId:u,startCall:p,endCall:w}=at(),j=n.useRef(!1),v=n.useRef(null),[M,N]=n.useState(()=>window.innerWidth>=720&&window.innerHeight>=520?"page":"compact"),f=window.webkit?.messageHandlers?.scoutRealtimeVoice;return n.useEffect(()=>{const b=()=>{N(window.innerWidth>=720&&window.innerHeight>=520?"page":"compact")};return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),n.useEffect(()=>{f?.postMessage({kind:"session-state",state:c,leaseId:u})},[u,f,c]),n.useEffect(()=>{const b=()=>{if(v.current)return v.current;const E=w().finally(()=>{v.current===E&&(v.current=null)});return v.current=E,E},h=()=>{b()};return window.__scoutRealtimeVoiceStop=b,window.addEventListener(Ot,h),window.__scoutRealtimeVoiceStopRequested&&b(),()=>{window.removeEventListener(Ot,h),window.__scoutRealtimeVoiceStop===b&&delete window.__scoutRealtimeVoiceStop}},[w]),n.useEffect(()=>{!o||t||!a||!i||j.current||c!=="idle"&&c!=="ended"&&c!=="error"||(j.current=!0,p())},[o,t,a,i,p,c]),a?i?e.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsx(Qt,{state:c,onMinimize:f?()=>f.postMessage("minimize"):void 0,onExpand:f?()=>f.postMessage(M==="page"?"restore":"expand"):void 0,layout:M}),e.jsx(Kt,{dictationActive:t,layout:M})]}):e.jsxs("div",{className:"flex h-full flex-col justify-center gap-2 p-4",children:[e.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Live voice is disabled"}),e.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Enable realtime voice in Settings → Voice. The footer Voice control starts and manages calls."})]}):e.jsxs("div",{className:"flex h-full flex-col justify-center gap-2 p-4",children:[e.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Live voice is off"}),e.jsx("p",{className:"text-sm leading-snug text-[var(--scout-chrome-ink-faint)]",children:"This Scout build has live conversations disabled. Calls use the configured OpenAI API account when the feature is available."})]})}function zo(){const t=nt(rt,!0),{enabled:o,state:a}=at(),[i,c]=n.useState("direct"),u=t&&o;return i==="direct"?e.jsx("main",{className:"h-full min-h-0 overflow-hidden bg-[#f3f0e9]",children:e.jsx(Po,{forceExpanded:!0,fill:!0,presentation:"direct-voice",onOpenLive:()=>c("realtime")})}):e.jsxs("main",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-[var(--scout-chrome-bg)]",children:[e.jsxs("header",{className:"flex min-h-14 shrink-0 items-center justify-between gap-4 border-b border-[var(--scout-chrome-border-soft)] px-4 py-2.5 sm:px-7",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx("h1",{className:"truncate font-[var(--font-accent-title)] text-[17px] font-semibold tracking-[-0.018em] text-[var(--scout-chrome-ink-strong)]",children:"GPT Live"}),e.jsx("span",{className:"hidden h-4 w-px bg-[var(--scout-chrome-border-soft)] sm:block","aria-hidden":"true"}),e.jsxs("span",{className:"hidden items-center gap-2 text-xs text-[var(--scout-chrome-ink-faint)] sm:flex",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${u?"bg-[var(--scout-accent)]":"bg-[var(--scout-chrome-ink-ghost)]"}`,"aria-hidden":"true"}),u?"Ready for a live call":"Live voice unavailable"]})]}),e.jsxs("div",{className:"flex rounded-md border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-0.5",role:"tablist","aria-label":"Voice mode",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":"false",onClick:()=>c("direct"),className:"rounded-[4px] px-3 py-1.5 text-[11px] font-medium text-[var(--scout-chrome-ink-faint)] transition-colors hover:text-[var(--scout-chrome-ink-strong)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--scout-accent)]",children:"Direct"}),e.jsx("button",{type:"button",role:"tab","aria-selected":"true",className:"rounded-[4px] bg-[var(--scout-chrome-ink-strong)] px-3 py-1.5 text-[11px] font-medium text-[var(--scout-chrome-bg)] shadow-[0_1px_2px_rgba(0,0,0,0.14)]",children:"Live"})]})]}),e.jsx("section",{className:"min-h-0 flex-1 overflow-hidden",children:u?e.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsx(Qt,{state:a,layout:"page"}),e.jsx(Kt,{dictationActive:!1,layout:"page"})]}):e.jsx(rs,{})})]})}const Do=Gs({id:"voice",label:"Voice",route:{view:"voice"},webPath:"/voice",screen:"RealtimeVoiceScreen",embed:{path:"/embed/voice",profile:"macos.voice",rootClassName:"s-voice-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:t=>({dictationActive:t.get("dictationActive")==="1",autoStart:t.get("autoStart")==="1"})}}),fn=Object.freeze(Object.defineProperty({__proto__:null,RealtimeVoicePage:zo,RealtimeVoiceScreen:rs,scoutSurface:Do},Symbol.toStringTag,{value:"Module"}));export{zo as R,Po as S,fn as a};
@@ -0,0 +1 @@
1
+ import{r as i,j as p}from"./index-C8uS5szO.js";const v="/assets/worker-rendered-v1-DmGVMlVi.png",m="/assets/worker-thinking-v1-ujakpzrK.png",b="/assets/worker-working-v1-BROAvJ_z.png",f="/assets/worker-waiting-v1-DbTSsfJJ.png",h="/assets/pip-idle-v1-Tt-CZsRG.png",S="/assets/pip-thinking-v1-BoHWSEye.png",j="/assets/pip-working-v1-wWQLRS1z.png",R="/assets/pip-waiting-v1-DkuvJ-dN.png",d={id:"sage-worker",name:"Sage",poses:{idle:v,thinking:m,working:b,waiting:f}},W={id:"pip-worker",name:"Pip",poses:{idle:h,thinking:S,working:j,waiting:R}},_=[d,W];function x({posture:g,paused:a=!1,size:t=76,character:e=d}){const r=i.useRef(null),[l,k]=i.useState(!0),[c,u]=i.useState(()=>typeof document>"u"||!document.hidden);return i.useEffect(()=>{const s=r.current;if(!s)return;const n=new IntersectionObserver(([w])=>k(w.isIntersecting));n.observe(s);const o=()=>u(!document.hidden);return document.addEventListener("visibilitychange",o),()=>{n.disconnect(),document.removeEventListener("visibilitychange",o)}},[]),p.jsx("span",{ref:r,"aria-hidden":"true",className:`rendered-worker${a||!l||!c?" is-paused":""}`,style:{"--worker-size":`${t}px`},children:Object.entries({idle:e.poses.idle,thinking:e.poses.thinking||e.poses.idle,working:e.poses.working||e.poses.idle,waiting:e.poses.waiting||e.poses.idle}).map(([s,n])=>p.jsx("img",{src:n,alt:"",draggable:!1,width:t,height:t,className:`rendered-worker__pose is-${s}${g===s?" is-current":""}`},s))})}const E=Object.freeze(Object.defineProperty({__proto__:null,RenderedWorkerSprite:x},Symbol.toStringTag,{value:"Module"}));export{x as R,E as a,_ as w};
@@ -0,0 +1 @@
1
+ .rendered-worker{display:inline-block;position:relative;width:var(--worker-size, 76px);height:var(--worker-size, 76px);vertical-align:bottom;pointer-events:none}.rendered-worker__pose{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;opacity:0;-webkit-user-select:none;user-select:none;transition:opacity .16s ease-out;transform-origin:50% 94%}.rendered-worker__pose.is-current{opacity:1;animation:rendered-worker-breathe 5s ease-in-out infinite}.rendered-worker__pose.is-current.is-thinking{animation:rendered-worker-consider 5.8s ease-in-out infinite}.rendered-worker__pose.is-current.is-working{animation:rendered-worker-tap 2.5s ease-in-out infinite}.rendered-worker__pose.is-current.is-waiting{animation-duration:6s}.rendered-worker.is-paused .rendered-worker__pose{animation-play-state:paused}@keyframes rendered-worker-breathe{0%,to{transform:scaleY(1)}50%{transform:scaleY(1.014)}}@keyframes rendered-worker-consider{0%,25%,to{transform:rotate(0)}50%,70%{transform:rotate(-1.5deg)}}@keyframes rendered-worker-tap{0%,45%,to{transform:translateY(0)}52%,66%{transform:translateY(-1px) rotate(.6deg)}59%,73%{transform:translateY(0) rotate(-.5deg)}}@media(prefers-reduced-motion:reduce){.rendered-worker .rendered-worker__pose{animation:none!important;transition:none}}
@@ -0,0 +1 @@
1
+ import{r as f,j as u}from"./index-C8uS5szO.js";function h({at:t,nextAt:o,start:n,duration:s,running:e}){const a=f.useRef(null);return f.useEffect(()=>{const p=performance.now();let c=0;const i=()=>{const l=e?Math.min(1,(performance.now()-p)/s):0,d=t+Math.max(0,o-t)*l,m=Math.max(0,Math.floor(d-n)),r=Math.floor(m/1e3);a.current&&(a.current.textContent=`T+ ${String(Math.floor(r/3600)).padStart(2,"0")}:${String(Math.floor(r/60)%60).padStart(2,"0")}:${String(r%60).padStart(2,"0")}.${String(m%1e3).padStart(3,"0")}`),e&&l<1&&(c=requestAnimationFrame(i))};return i(),()=>cancelAnimationFrame(c)},[t,o,n,s,e]),u.jsx("time",{ref:a,className:"adventures__elapsed-clock",title:"Playback time interpolated between recorded observations","aria-label":"Playback elapsed time"})}export{h as ReplayClock};
@@ -0,0 +1 @@
1
+ import{r as i,j as r}from"./index-C8uS5szO.js";import{s as a}from"./observe-CkfOxYx_.js";import{f as m}from"./floor-preview-text-HrORUJ7D.js";import"./api-CaROe5_H.js";import"./agent-state-DDhnFEEP.js";import"./surface-activity-B1rgWB1i.js";function h({stops:l,index:o,onInspect:s}){const n=i.useRef(null),c=i.useRef(!0);return i.useEffect(()=>{c.current&&n.current&&(n.current.scrollTop=0)},[o,l.length]),r.jsxs("div",{className:"replay-log",ref:n,role:"region","aria-label":"Replay event log",tabIndex:0,onScroll:()=>{const e=n.current;e&&(c.current=e.scrollTop<24)},children:[l.slice(0,o+1).map((e,t)=>({stop:e,position:t})).reverse().map(({stop:e,position:t})=>r.jsxs("button",{type:"button",className:t===o?"is-current":"",onClick:()=>s(t),children:[r.jsx("time",{children:new Date(e.at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),r.jsx("span",{className:"replay-log__kind",children:e.event.tool||e.kind}),r.jsx("span",{children:m(a(e.event))||e.label})]},e.id)),l.length?null:r.jsx("p",{children:"No recorded events yet."})]})}export{h as ReplayLog};
@@ -0,0 +1 @@
1
+ import{r as l,m as ae,j as e}from"./index-C8uS5szO.js";import{C as S}from"./CrewSprite-hgpA3SWB.js";import{S as ye}from"./SproutActionSprite-DveCzg6l.js";import{b as je}from"./adventure-playback-DTfkhIc0.js";import{p as ve}from"./adventure-habitats-v1-M1lcpTJh.js";/* empty css */const O={start:"Starting",think:"Thinking",read:"Reading",edit:"Editing",tool:"Running",message:"Handing off",wait:"Waiting",end:"Turn complete",stopped:"Interrupted"},oe={domes:.16,biodome:.46,hangar:.84},z={start:"domes",end:"domes",stopped:"domes",wait:"domes",message:"domes",think:"biodome",read:"biodome",edit:"hangar",tool:"hangar"},be=2172/724,N=150,ge=70,Ne=.9,we=110,Me=900,T=(t,a,n)=>Math.max(a,Math.min(n,t));function H(t,a){const n=oe[t]*a.panoramaWidth;return T(a.stageWidth/2-n,Math.min(0,a.stageWidth-a.panoramaWidth),0)}function ke(t,a){const n=new Map,r=N/2;return t.map(f=>{const u=z[f],M=(n.get(u)??0)+1;n.set(u,M);const y=H(u,a),c=oe[u]*a.panoramaWidth,k=(M%5-2)*ge;return T(c+k,r-y,a.stageWidth-r-y)})}function Ee(t,a,n){return t+H(a,n)}function Re(t,a,n){const r=Math.abs(a-t);return T(r/Ne,we,Me)/Math.max(.25,n)}function Ce(t,a){return a<t}function Se(t,a){return t==="travel"?a?"jump":"run":t==="land"?"land":"idle"}function Be(t){return t.checkpoint?1:t.routine?.32:.64}function ne(t){return t==="think"?"thought":t==="message"?"speech":null}function Te(t){return ne(t)===null}const $e=14,Le=19,Ae=22,We=12,Ie=3;function De(t,a){return Math.max(0,t-a-N-$e)}function Oe(t){const a=t-Ae-We;return T(Math.floor(a/Le),1,Ie)}const P={start:"var(--s-dim)",think:"var(--s-muted)",read:"var(--cat-sky)",edit:"var(--cat-gold)",tool:"var(--cat-purple)",message:"var(--info)",wait:"var(--color-status-warn-fg)",end:"var(--color-status-ok-fg)",stopped:"var(--color-status-error-fg)"};function B(t){const a=Math.round(t/1e3);return`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`}function Ge({stops:t,index:a,onSeek:n,playing:r,onPlayingChange:f,speed:u,onSpeedChange:M,actor:y,evidence:c,recipient:k,paused:w=!1,header:le,onInspect:$}){const F=l.useRef(null),V=l.useRef(null),G=l.useRef(null),[g,re]=l.useState({stageWidth:1080,panoramaWidth:1410}),[K,ie]=l.useState(420),[L,E]=l.useState("work"),[m,Y]=l.useState(null),[Z,q]=l.useState(null);l.useLayoutEffect(()=>{const s=F.current;if(!s)return;const o=()=>{const{width:C,height:D}=s.getBoundingClientRect(),fe=Math.max(D*1.12,D+50);re({stageWidth:C,panoramaWidth:Math.max(C,fe*be)}),ie(D)};o();const x=new ResizeObserver(o);return x.observe(s),()=>x.disconnect()},[]);const _=l.useMemo(()=>t.map(s=>s.kind),[t]),d=l.useMemo(()=>t.map(s=>je(s)),[t]),ce=l.useMemo(()=>ke(_,g),[_,g]),i=Math.max(0,Math.min(t.length-1,a)),p=t[i],h=d[i],j=_[i],v=p?Ee(ce[i],z[j],g):g.stageWidth/2,ue=p?H(z[j],g):0,J=l.useRef(v),Q=J.current,de=Ce(Q,v),R=Re(Q,v,u);l.useEffect(()=>{J.current=v},[v]);const A=r?R:260;l.useEffect(()=>{if(!r||!h){E("work");return}E("travel");const s=260/Math.max(.25,u),o=window.setTimeout(()=>E(h.checkpoint?"land":"work"),R),x=window.setTimeout(()=>E("work"),R+s);return()=>{window.clearTimeout(o),window.clearTimeout(x)}},[i,r,u,h?.checkpoint]),l.useEffect(()=>{if(!r||!h)return;if(i+1>=t.length){f(!1);return}const s=window.setTimeout(()=>n(i+1),Math.min(h.durationMs,2600)/u);return()=>window.clearTimeout(s)},[r,i,u,h,t.length,n,f]),l.useEffect(()=>{G.current?.scrollIntoView({block:"nearest",behavior:"smooth"})},[i]);const pe=l.useMemo(()=>d.slice(0,i+1).reduce((s,o)=>s+o.durationMs,0),[d,i]),he=l.useMemo(()=>d.reduce((s,o)=>s+o.durationMs,0),[d]),me=l.useCallback(s=>{const o=V.current?.getBoundingClientRect();if(!o||t.length<2)return;const x=(s.clientX-o.left)/o.width;n(Math.max(0,Math.min(t.length-1,Math.round(x*(t.length-1)))))},[n,t.length]),W=l.useCallback(s=>{$?$(s):q(s)},[$]),b=y?ae(y.agent.name):void 0,I=k?ae(k.agent.name):void 0,_e=j==="think"&&L==="work",ee=L==="work"?ne(j):null,te=Oe(De(K,K*.38)),se=Se(L,!!h?.checkpoint),xe=w||!r;return!p||!h?null:e.jsxs("div",{className:"replay-outpost",children:[e.jsxs("div",{className:"replay-outpost__head",children:[b?e.jsx(S,{slug:b,size:26,paused:w}):null,e.jsx("div",{className:"replay-outpost__who",children:y?.agent.name??"Unknown agent"}),e.jsx("div",{className:"replay-outpost__spacer"}),le]}),e.jsxs("div",{className:"replay-outpost__stage",ref:F,children:[e.jsx("img",{className:"replay-outpost__panorama",src:ve,alt:"",draggable:!1,style:{width:g.panoramaWidth,transform:`translateX(${ue}px)`,transitionDuration:`${A}ms`}}),e.jsx("div",{className:"replay-outpost__veil"}),e.jsxs("div",{className:"replay-outpost__hud",children:[e.jsx("span",{className:"replay-outpost__hud-dot","data-failed":h.checkpoint&&j==="stopped"?"":void 0}),e.jsx("span",{className:"replay-outpost__hud-who",children:y?.agent.name??""}),e.jsxs("span",{className:"replay-outpost__hud-step",children:[i+1," / ",t.length]})]}),e.jsxs("div",{className:"replay-outpost__actor",style:{transform:`translateX(${v-N/2}px)`,transitionDuration:`${A}ms`},children:[e.jsx("div",{className:`replay-outpost__art${se==="jump"?" is-hopping":""}`,style:{transform:de?"scaleX(-1)":void 0,animationDuration:`${R}ms`},children:_e&&b?e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:b,size:N,paused:w,expression:"look-up"})}):b==="sprout"?e.jsx(ye,{action:se,size:N,paused:xe,playbackRate:u}):b?e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:b,size:N,paused:w})}):null}),e.jsx("div",{className:"replay-outpost__shadow"}),ee==="thought"?e.jsxs("div",{className:"replay-outpost__bubble is-thought",style:{"--replay-bubble-lines":te},children:[e.jsx("p",{className:"replay-outpost__bubble-text",children:p.event.text.trim()}),e.jsx("span",{className:"replay-outpost__puff is-big"}),e.jsx("span",{className:"replay-outpost__puff is-small"})]}):ee==="speech"?e.jsxs("div",{className:"replay-outpost__bubble is-speech",style:{"--replay-bubble-lines":te},children:[p.event.to&&!I?e.jsxs("span",{className:"replay-outpost__bubble-to",children:["to ",p.event.to]}):null,e.jsx("p",{className:"replay-outpost__bubble-text",children:p.event.text.trim()||h.label||p.label}),e.jsx("span",{className:"replay-outpost__tail"})]}):Te(j)?e.jsxs("div",{className:"replay-outpost__doing",children:[e.jsx("div",{className:"replay-outpost__activity",children:O[j]}),e.jsx("div",{className:"replay-outpost__target",children:h.label||p.artifact||p.label})]}):null]}),p.event.to&&I?e.jsxs("div",{className:"replay-outpost__handoff",style:{left:v+170,transitionDuration:`${A}ms`},children:[e.jsx("span",{className:"replay-outpost__standing",children:e.jsx(S,{slug:I,size:78,paused:w})}),e.jsx("div",{className:"replay-outpost__shadow is-small"}),e.jsxs("div",{className:"replay-outpost__handoff-label",children:["to ",p.event.to]})]}):null]}),e.jsxs("div",{className:"replay-outpost__ridge",children:[e.jsxs("div",{className:"replay-outpost__transport",children:[e.jsx("button",{type:"button",className:"replay-outpost__play",onClick:()=>f(!r),"aria-label":r?"Pause replay":"Play replay",children:r?e.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10","aria-hidden":"true",children:[e.jsx("rect",{width:"3",height:"10",fill:"currentColor"}),e.jsx("rect",{x:"6",width:"3",height:"10",fill:"currentColor"})]}):e.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10","aria-hidden":"true",children:e.jsx("path",{d:"M0 0l9 5-9 5z",fill:"currentColor"})})}),e.jsxs("select",{className:"replay-outpost__speed",value:u,onChange:s=>M(Number(s.target.value)),"aria-label":"Replay speed",children:[e.jsx("option",{value:1,children:"1×"}),e.jsx("option",{value:2,children:"2×"}),e.jsx("option",{value:4,children:"4×"})]})]}),e.jsxs("div",{className:"replay-outpost__bars",ref:V,onClick:me,onMouseLeave:()=>Y(null),children:[t.map((s,o)=>e.jsx("div",{className:`replay-outpost__bar${o<=i?" is-seen":""}${o===i?" is-now":""}`,style:{height:`${Be(d[o])*100}%`,color:P[_[o]]},onMouseEnter:()=>Y(o),children:d[o].checkpoint?e.jsx("span",{className:"replay-outpost__flag"}):null},s.id)),m!==null&&t[m]?e.jsxs("div",{className:"replay-outpost__tip",style:{left:`${(m+.5)/t.length*100}%`},children:[e.jsxs("div",{className:"replay-outpost__tip-kind",style:{color:P[_[m]]},children:[O[_[m]]," · ",B(d[m].durationMs)]}),e.jsx("div",{className:"replay-outpost__tip-title",children:d[m].label||t[m].artifact})]}):null]}),e.jsxs("div",{className:"replay-outpost__elapsed",children:[B(pe)," ",e.jsxs("span",{children:["/ ",B(he)]})]})]}),e.jsxs("div",{className:"replay-outpost__subsurface",children:[e.jsx("div",{className:"replay-outpost__log",children:t.map((s,o)=>e.jsxs("div",{ref:o===i?G:void 0,className:`replay-outpost__row${o===i?" is-now":""}${o>i?" is-ahead":""}`,style:{color:P[_[o]]},children:[e.jsx("span",{className:"replay-outpost__at",children:B(d.slice(0,o+1).reduce((x,C)=>x+C.durationMs,0))}),e.jsx("span",{className:"replay-outpost__pip"}),e.jsxs("span",{className:"replay-outpost__text",children:[e.jsx("span",{className:"replay-outpost__title",children:d[o].label||s.artifact||s.label}),e.jsx("span",{className:"replay-outpost__activity-small",children:O[_[o]]})]}),e.jsxs("span",{className:"replay-outpost__ms",children:[Math.round(d[o].durationMs),"ms"]})]},s.id))}),e.jsxs("div",{className:"replay-outpost__satchel",children:[e.jsxs("div",{className:"replay-outpost__satchel-head",children:[e.jsx("span",{children:"Collected"}),e.jsx("span",{children:c.changed.length+c.runs.length+c.read.length})]}),!c.changed.length&&!c.runs.length&&!c.read.length?e.jsx("p",{className:"replay-outpost__satchel-empty",children:"Nothing gathered yet — the satchel fills as the run proceeds."}):null,e.jsx(U,{name:"Changed",hue:"var(--cat-gold)",count:c.changed.length,children:c.changed.map(s=>e.jsx(X,{label:s.path,onOpen:()=>W({type:"file",path:s.path,changed:!0,clue:s.clue,observations:s.observations})},s.path))}),e.jsx(U,{name:"Proved",hue:"var(--cat-purple)",count:c.runs.length,children:c.runs.map(s=>e.jsx(X,{label:s.command,note:s.outcome==="passed"?"passed":s.outcome==="failed"?"failed":void 0,failed:s.outcome==="failed",onOpen:()=>W({type:"run",id:s.id,command:s.command,outcome:s.outcome,clue:s.clue})},s.id))}),e.jsx(U,{name:"Explored",hue:"var(--cat-sky)",count:c.read.length,children:c.read.map(s=>e.jsx(X,{label:s.path,onOpen:()=>W({type:"file",path:s.path,changed:!1,clue:s.clue,observations:s.observations})},s.path))})]})]}),Z?e.jsx(Pe,{target:Z,onClose:()=>q(null)}):null]})}function U({name:t,hue:a,count:n,children:r}){return n?e.jsxs("div",{className:"replay-outpost__shelf",children:[e.jsxs("div",{className:"replay-outpost__shelf-name",style:{color:a},children:[t," ",e.jsx("span",{children:n})]}),e.jsx("ul",{className:"replay-outpost__shelf-list",children:r})]}):null}function X({label:t,note:a,failed:n,onOpen:r}){return e.jsx("li",{className:"replay-outpost__shelf-item",children:e.jsxs("button",{type:"button",className:"replay-outpost__shelf-button",onClick:r,"data-failed":n?"":void 0,children:[a?e.jsx("b",{children:a}):null,e.jsx("span",{children:t})]})})}function Pe({target:t,onClose:a}){l.useEffect(()=>{const r=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[a]);const n=t.type==="run"&&t.outcome==="failed";return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"replay-outpost__scrim",onClick:a,"aria-label":"Close"}),e.jsxs("aside",{className:"replay-outpost__reader",role:"dialog","aria-label":t.type==="file"?t.path:t.command,children:[e.jsxs("div",{className:"replay-outpost__reader-head",children:[e.jsx("div",{className:"replay-outpost__reader-kind","data-failed":n?"":void 0,children:t.type==="file"?t.changed?"Changed":"Explored":"Proved"}),e.jsx("div",{className:"replay-outpost__reader-title",children:t.type==="file"?t.path:t.command}),e.jsx("div",{className:"replay-outpost__reader-meta",children:t.type==="file"?`${t.observations} observation${t.observations===1?"":"s"}`:t.outcome}),e.jsx("button",{type:"button",className:"replay-outpost__reader-close",onClick:a,"aria-label":"Close",children:e.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9","aria-hidden":"true",children:e.jsx("path",{d:"M1 1l7 7M8 1l-7 7",stroke:"currentColor",strokeWidth:"1.4",fill:"none"})})})]}),e.jsx("div",{className:"replay-outpost__reader-body",children:t.clue||"Nothing captured for this item."})]})]})}export{Ge as ReplayOutpost};
@@ -0,0 +1 @@
1
+ .replay-outpost{--ro-edge: var(--s-hairline, oklch(.975 .006 260 / .08));--ro-edge-soft: oklch(.975 .006 260 / .045);position:relative;display:grid;grid-template-rows:auto minmax(360px,46%) auto minmax(280px,1fr);min-height:0;overflow:hidden;border-radius:12px;background:var(--s-bg, oklch(.118 .004 260));color:var(--s-ink, oklch(.975 .006 260));font-family:var(--s-font-sans, Inter, ui-sans-serif, system-ui, sans-serif);font-size:13px}.replay-outpost__head{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--ro-edge)}.replay-outpost__who{font-weight:600;letter-spacing:-.01em}.replay-outpost__spacer{flex:1}.replay-outpost__stage{position:relative;overflow:hidden;background:#05070c;min-height:0}.replay-outpost__panorama{position:absolute;left:0;bottom:0;max-width:none;height:auto;transition:transform .52s linear;will-change:transform}.replay-outpost__veil{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,oklch(.118 .004 260 / .55) 0%,oklch(.118 .004 260 / .1) 26%,transparent 46%),linear-gradient(0deg,oklch(.118 .004 260 / .52) 0%,oklch(.118 .004 260 / .14) 20%,transparent 33%)}.replay-outpost__hud{position:absolute;top:14px;left:16px;right:16px;display:flex;align-items:baseline;gap:9px}.replay-outpost__hud-dot{width:5px;height:5px;border-radius:999px;flex:none;align-self:center;background:var(--s-accent, oklch(.86 .17 125))}.replay-outpost__hud-dot[data-failed]{background:var(--color-status-error-fg)}.replay-outpost__hud-who{font-family:var(--s-font-mono, "JetBrains Mono", ui-monospace, monospace);font-size:11px;letter-spacing:.14em;text-transform:uppercase}.replay-outpost__hud-step{margin-left:auto;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;color:var(--s-dim);font-variant-numeric:tabular-nums}.replay-outpost__actor{position:absolute;left:0;bottom:38%;display:grid;justify-items:center;transition:transform .52s linear;will-change:transform}.replay-outpost__art{position:relative;display:block}.replay-outpost__standing{display:block;transform:translateY(4.1%)}.replay-outpost__art.is-hopping{animation:replay-outpost-hop .52s cubic-bezier(.33,0,.4,1) 1}@keyframes replay-outpost-hop{0%{translate:0 0}45%{translate:0 -52px}to{translate:0 0}}.replay-outpost__shadow{width:76px;height:9px;margin-top:-6px;border-radius:999px;background:#000;opacity:.5;filter:blur(5px)}.replay-outpost__shadow.is-small{width:52px}.replay-outpost__doing{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);display:grid;justify-items:center;gap:4px;text-align:center;width:460px}.replay-outpost__doing:before,.replay-outpost__handoff-label:before{content:"";position:absolute;inset:-11px -22px -13px;z-index:-1;background:radial-gradient(58% 128% at 50% 50%,oklch(.118 .004 260 / .94) 0%,oklch(.118 .004 260 / .72) 46%,transparent 78%);-webkit-mask-image:radial-gradient(58% 128% at 50% 50%,#000 0%,#000 46%,transparent 78%);mask-image:radial-gradient(58% 128% at 50% 50%,#000 0%,#000 46%,transparent 78%)}.replay-outpost__activity{font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--s-accent)}.replay-outpost__target{font-size:12px;color:var(--s-ink);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.replay-outpost__bubble{position:absolute;bottom:calc(100% + 14px);left:50%;transform:translate(-50%);width:max-content;max-width:min(360px,78%);padding:9px 14px;background:color-mix(in oklab,var(--s-surface) 94%,transparent);border:1px solid color-mix(in oklab,var(--s-ink) 14%,transparent);box-shadow:0 12px 34px #00000080;animation:replay-outpost-bubble-in .22s cubic-bezier(.2,.9,.3,1) 1}.replay-outpost__bubble-text{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--replay-bubble-lines, 3);line-clamp:var(--replay-bubble-lines, 3)}@keyframes replay-outpost-bubble-in{0%{opacity:0;translate:0 6px;scale:.96}to{opacity:1;translate:0 0;scale:1}}.replay-outpost__bubble.is-thought{border-radius:20px}.replay-outpost__bubble.is-thought .replay-outpost__bubble-text{font-family:Spectral,Georgia,serif;font-style:italic;font-size:13.5px;line-height:1.45;color:var(--s-ink)}.replay-outpost__puff{position:absolute;left:50%;border-radius:999px;background:color-mix(in oklab,var(--s-surface) 94%,transparent);border:1px solid color-mix(in oklab,var(--s-ink) 14%,transparent);animation:replay-outpost-puff 1.6s ease-in-out infinite}.replay-outpost__puff.is-big{width:11px;height:11px;bottom:-8px;margin-left:-20px}.replay-outpost__puff.is-small{width:6px;height:6px;bottom:-18px;margin-left:-30px;animation-delay:.28s}@keyframes replay-outpost-puff{0%,to{opacity:.45;scale:.86}45%{opacity:1;scale:1}}.replay-outpost__bubble.is-speech{border-radius:11px}.replay-outpost__bubble.is-speech .replay-outpost__bubble-text{font-size:13px;line-height:1.45;color:var(--s-ink)}.replay-outpost__bubble-to{display:block;margin-bottom:3px;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--s-accent)}.replay-outpost__tail{position:absolute;bottom:-6px;left:50%;width:11px;height:11px;margin-left:-5.5px;background:color-mix(in oklab,var(--s-surface) 94%,transparent);border-right:1px solid color-mix(in oklab,var(--s-ink) 14%,transparent);border-bottom:1px solid color-mix(in oklab,var(--s-ink) 14%,transparent);rotate:45deg}.replay-outpost__handoff{position:absolute;bottom:38%;display:grid;justify-items:center;gap:6px;transition:left .52s linear}.replay-outpost__handoff-label{position:relative;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--s-muted)}.replay-outpost__ridge{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:10px 14px;border-top:1px solid var(--ro-edge);border-bottom:1px solid var(--ro-edge);background:var(--s-surface, oklch(.205 .005 260))}.replay-outpost__transport{display:flex;align-items:center;gap:6px}.replay-outpost__play{width:30px;height:30px;display:grid;place-items:center;padding:0;border-radius:999px;cursor:pointer;border:1px solid var(--s-accent);background:var(--s-accent-soft);color:var(--s-accent)}.replay-outpost__play:hover{background:#b8e45c2e}.replay-outpost__speed{background:none;border:1px solid var(--ro-edge);border-radius:6px;color:var(--s-muted);font-family:var(--s-font-mono, ui-monospace, monospace);font-size:11px;padding:4px 6px;cursor:pointer}.replay-outpost__bars{position:relative;display:flex;align-items:flex-end;gap:2px;height:42px;cursor:pointer}.replay-outpost__bar{flex:1 1 0;min-width:0;position:relative;border-radius:2px 2px 0 0;background:currentColor;opacity:.26;transition:opacity .14s ease}.replay-outpost__bar.is-seen{opacity:1}.replay-outpost__bar.is-now{opacity:1;box-shadow:0 0 0 1px var(--s-accent),0 0 10px var(--s-accent-soft)}.replay-outpost__bars:hover .replay-outpost__bar{opacity:.5}.replay-outpost__bars:hover .replay-outpost__bar.is-seen{opacity:1}.replay-outpost__flag{position:absolute;top:-7px;left:50%;margin-left:-1.5px;width:3px;height:3px;border-radius:999px;background:currentColor}.replay-outpost__elapsed{font-family:var(--s-font-mono, ui-monospace, monospace);font-size:11px;color:var(--s-dim);font-variant-numeric:tabular-nums}.replay-outpost__elapsed span{opacity:.5}.replay-outpost__tip{position:absolute;bottom:calc(100% + 8px);transform:translate(-50%);z-index:3;background:#10141b;border:1px solid var(--ro-edge);border-radius:6px;padding:5px 8px;pointer-events:none;white-space:nowrap;box-shadow:0 8px 24px #00000080}.replay-outpost__tip-kind{font-family:var(--s-font-mono, ui-monospace, monospace);font-size:9px;letter-spacing:.12em;text-transform:uppercase}.replay-outpost__tip-title{font-size:12px;color:var(--s-ink);margin-top:1px}.replay-outpost__subsurface{position:relative;display:grid;grid-template-columns:1fr 320px;min-height:0;background:linear-gradient(180deg,#0c1119,#080c12 52%,#05070b)}.replay-outpost__subsurface:before{content:"";position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(179.4deg,transparent 0 58px,oklch(.975 .006 260 / .022) 58px 59px)}.replay-outpost__subsurface:after{content:"";position:absolute;left:0;right:0;top:0;height:44px;pointer-events:none;background:linear-gradient(180deg,oklch(.86 .17 125 / .05),transparent 78%)}.replay-outpost__log{position:relative;overflow:auto;min-height:0;border-right:1px solid var(--ro-edge)}.replay-outpost__row{display:grid;grid-template-columns:52px 12px 1fr auto;gap:10px;align-items:baseline;padding:7px 14px;border-bottom:1px solid var(--ro-edge-soft)}.replay-outpost__row:last-child{border-bottom:0}.replay-outpost__row.is-now{background:var(--s-accent-soft);box-shadow:inset 2px 0 0 var(--s-accent)}.replay-outpost__row.is-ahead{opacity:.4}.replay-outpost__at,.replay-outpost__ms{font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;color:var(--s-dim);font-variant-numeric:tabular-nums}.replay-outpost__pip{width:6px;height:6px;border-radius:999px;background:currentColor;justify-self:center;transform:translateY(3px)}.replay-outpost__text{min-width:0}.replay-outpost__title{display:block;font-size:12px;color:var(--s-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.replay-outpost__activity-small{display:block;margin-top:2px;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--s-dim)}.replay-outpost__satchel{position:relative;padding:12px 14px;overflow:auto;min-height:0;background:linear-gradient(180deg,#0505078c,#050507cc);box-shadow:inset 10px 0 18px -12px #000}.replay-outpost__satchel-head{display:flex;justify-content:space-between;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--s-dim)}.replay-outpost__satchel-empty{margin-top:14px;font-family:Spectral,Georgia,serif;font-style:italic;font-size:12px;color:var(--s-dim)}.replay-outpost__shelf{margin-top:12px}.replay-outpost__shelf-name{display:flex;align-items:center;gap:6px;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:9px;letter-spacing:.1em;text-transform:uppercase}.replay-outpost__shelf-name span{color:var(--s-muted)}.replay-outpost__shelf-list{margin:6px 0 0;padding:0;list-style:none;display:grid;gap:3px}.replay-outpost__shelf-item{animation:replay-outpost-land .26s cubic-bezier(.22,.61,.36,1)}@keyframes replay-outpost-land{0%{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}.replay-outpost__shelf-button{display:flex;align-items:baseline;gap:6px;width:100%;text-align:left;margin:0 -6px;padding:3px 6px;border:0;border-radius:4px;background:none;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:11px;color:var(--s-muted);cursor:pointer;transition:background .12s ease,color .12s ease}.replay-outpost__shelf-button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.replay-outpost__shelf-button>b{flex:none;font-weight:500;color:var(--s-ink)}.replay-outpost__shelf-button[data-failed]{color:var(--color-status-error-fg)}.replay-outpost__shelf-button:hover{background:#f4f7fb0d;color:var(--s-ink)}.replay-outpost__shelf-button:focus-visible{outline:1px solid var(--s-accent);outline-offset:1px}.replay-outpost__shelf-button:after{content:"";margin-left:auto;width:5px;height:5px;flex:none;align-self:center;border-right:1px solid currentColor;border-top:1px solid currentColor;transform:rotate(45deg);opacity:0;transition:opacity .12s ease}.replay-outpost__shelf-button:hover:after,.replay-outpost__shelf-button:focus-visible:after{opacity:.6}.replay-outpost__scrim{position:absolute;inset:0;z-index:5;border:0;padding:0;cursor:default;background:#0505079e;animation:replay-outpost-fade .16s ease}.replay-outpost__reader{position:absolute;top:0;right:0;bottom:0;width:min(560px,62%);z-index:6;display:grid;grid-template-rows:auto 1fr;background:#0a0e15;border-left:1px solid var(--ro-edge);box-shadow:-24px 0 60px -20px #000;animation:replay-outpost-drawer .24s cubic-bezier(.22,.61,.36,1)}@keyframes replay-outpost-fade{0%{opacity:0}to{opacity:1}}@keyframes replay-outpost-drawer{0%{transform:translate(18px);opacity:0}to{transform:none;opacity:1}}.replay-outpost__reader-head{position:relative;padding:14px 16px;border-bottom:1px solid var(--ro-edge);display:grid;gap:3px}.replay-outpost__reader-kind{font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--s-muted)}.replay-outpost__reader-kind[data-failed]{color:var(--color-status-error-fg)}.replay-outpost__reader-title{font-size:14px;font-weight:600;word-break:break-word}.replay-outpost__reader-meta{font-family:var(--s-font-mono, ui-monospace, monospace);font-size:10px;color:var(--s-dim)}.replay-outpost__reader-close{position:absolute;top:12px;right:12px;width:24px;height:24px;display:grid;place-items:center;border-radius:6px;cursor:pointer;border:1px solid var(--ro-edge);background:none;color:var(--s-muted)}.replay-outpost__reader-close:hover{color:var(--s-ink);background:#f4f7fb0f}.replay-outpost__reader-body{overflow:auto;padding:14px 16px;white-space:pre-wrap;font-family:var(--s-font-mono, ui-monospace, monospace);font-size:11px;line-height:1.6;color:var(--s-muted)}@media(prefers-reduced-motion:reduce){.replay-outpost__actor,.replay-outpost__panorama,.replay-outpost__handoff{transition-duration:1ms}.replay-outpost__art.is-hopping,.replay-outpost__bubble{animation:none}.replay-outpost__puff{animation:none;opacity:.8}}
@@ -1 +1 @@
1
- import{j as s}from"./index-C1VaWNuD.js";import{R as c}from"./RepoDiffViewerLazy-DzfoFhbl.js";/* empty css */const l=["unstaged","staged","branch"];function o(e){const t=e.getAll("layer").filter(r=>l.includes(r));return t.length>0?t:void 0}function p(){const e=typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search),t=e.get("path")?.trim()??"",r=e.getAll("file").map(i=>i.trim()).filter(Boolean),a=e.get("sessionId")?.trim()||void 0,n=e.get("agentId")?.trim()||void 0,d=e.get("include")==="all"||e.get("include")==="touched"?"all":"changed";return t?s.jsx(c,{path:t,layers:o(e),files:r,session:a||n?{sessionId:a,agentId:n,include:d}:null,className:"rd-embed"}):s.jsx("div",{className:"rd-viewer rd-embed","data-scout-theme":!0,children:s.jsx("div",{className:"rd-center",children:s.jsxs("div",{className:"rd-center-card",children:[s.jsx("div",{className:"rd-center-title",children:"No worktree path"}),s.jsxs("div",{className:"rd-center-body",children:["This embed needs a ",s.jsx("code",{children:"?path=<absolute-path>"})," query parameter."]})]})})})}export{p as RepoDiffEmbedScreen,p as default};
1
+ import{j as s}from"./index-C8uS5szO.js";import{R as c}from"./RepoDiffViewerLazy-BQ6ZCrsq.js";/* empty css */const l=["unstaged","staged","branch"];function o(e){const t=e.getAll("layer").filter(r=>l.includes(r));return t.length>0?t:void 0}function p(){const e=typeof window>"u"?new URLSearchParams:new URLSearchParams(window.location.search),t=e.get("path")?.trim()??"",r=e.getAll("file").map(i=>i.trim()).filter(Boolean),a=e.get("sessionId")?.trim()||void 0,n=e.get("agentId")?.trim()||void 0,d=e.get("include")==="all"||e.get("include")==="touched"?"all":"changed";return t?s.jsx(c,{path:t,layers:o(e),files:r,session:a||n?{sessionId:a,agentId:n,include:d}:null,className:"rd-embed"}):s.jsx("div",{className:"rd-viewer rd-embed","data-scout-theme":!0,children:s.jsx("div",{className:"rd-center",children:s.jsxs("div",{className:"rd-center-card",children:[s.jsx("div",{className:"rd-center-title",children:"No worktree path"}),s.jsxs("div",{className:"rd-center-body",children:["This embed needs a ",s.jsx("code",{children:"?path=<absolute-path>"})," query parameter."]})]})})})}export{p as RepoDiffEmbedScreen,p as default};
@@ -1 +1 @@
1
- import{j as e}from"./index-C1VaWNuD.js";import{R as l}from"./RepoDiffViewerLazy-DzfoFhbl.js";/* empty css */const f=1;function m(t=typeof performance>"u"?void 0:performance){const r=(t?.getEntriesByType?.("navigation")??[]).find(i=>typeof i.type=="string");return r?r.type==="reload":t?.navigation?.type===f}function u({path:t,layers:n,files:r,sessionId:i,agentId:o,include:s,navigate:c}){const a=t.trim();if(!a)return e.jsx("div",{className:"rd-viewer",children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-center-title",children:"No worktree path"}),e.jsxs("div",{className:"rd-center-body",children:["This page needs a ",e.jsx("code",{children:"?path=<absolute-path>"})," query parameter."]})]})})});const d=[a,n?.join(",")??"",r?.join("\0")??"",i??"",o??"",s??""].join(""),p=m();return e.jsx(l,{path:a,layers:n,files:r,session:i||o?{sessionId:i,agentId:o,include:s}:null,forceInitialLoad:p,onClose:()=>c({view:"repos"})},d)}export{u as RepoDiffPageScreen,u as default};
1
+ import{j as e}from"./index-C8uS5szO.js";import{R as l}from"./RepoDiffViewerLazy-BQ6ZCrsq.js";/* empty css */const f=1;function m(t=typeof performance>"u"?void 0:performance){const r=(t?.getEntriesByType?.("navigation")??[]).find(i=>typeof i.type=="string");return r?r.type==="reload":t?.navigation?.type===f}function u({path:t,layers:n,files:r,sessionId:i,agentId:o,include:s,navigate:c}){const a=t.trim();if(!a)return e.jsx("div",{className:"rd-viewer",children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-center-title",children:"No worktree path"}),e.jsxs("div",{className:"rd-center-body",children:["This page needs a ",e.jsx("code",{children:"?path=<absolute-path>"})," query parameter."]})]})})});const d=[a,n?.join(",")??"",r?.join("\0")??"",i??"",o??"",s??""].join(""),p=m();return e.jsx(l,{path:a,layers:n,files:r,session:i||o?{sessionId:i,agentId:o,include:s}:null,forceInitialLoad:p,onClose:()=>c({view:"repos"})},d)}export{u as RepoDiffPageScreen,u as default};
@@ -0,0 +1,7 @@
1
+ import{r as l,j as n}from"./index-C8uS5szO.js";import{a as X,p as Z}from"./ui-LM8pS8qE.js";/* empty css */import{a as T,s as q,l as ee,L as te,f as K,S as ne,r as se,b as re,c as _,d as ie,u as ae,V as A,C as H,D as le,e as oe}from"./usePierreRuntime-DJkRHMoe.js";import{C as ce}from"./chevron-down-B5eMsn5c.js";import{C as de}from"./check-B8dMv3Is.js";import{L as ue}from"./loader-circle-DurUYl7E.js";import{S as fe}from"./send-horizontal-pOtGI7FM.js";import{F as he}from"./file-code-corner-D_Aptal2.js";import{C as me}from"./code-xml-BmyLM0I2.js";import{X as pe}from"./x-DI1ktCYb.js";import{r as O,a as Y,f as V}from"./cache-DEy9E34b.js";import{M as xe}from"./message-square-NmXWtWLR.js";import{R as ge}from"./refresh-cw-Da9DDLk2.js";import{P as be}from"./plus-D_wLGJGT.js";import{a as B}from"./api-CaROe5_H.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./createLucideIcon-DkjnzvcJ.js";function je({snapshot:e,selectedFile:t,targets:r,targetId:s,onTargetId:i,draft:c,onDraft:f,contextItems:o,onRemoveContextItem:p,pending:a,status:d,error:g,textareaRef:k,onSubmit:S}){const[u,y]=l.useState(!1),b=l.useRef(null),w=r.find(h=>h.id===s)??null,m=w?.label??"Scout",C=r[0]?.id??null,N=t?T(t):null,I=(c.trim().length>0||o.length>0)&&!a,R=l.useMemo(()=>[...r.map(h=>({id:h.id,label:h.label,suffix:h.id===C?"best context":null})),{id:"scout",label:"Scout",suffix:null}],[C,r]);return l.useEffect(()=>{if(!u)return;const h=$=>{const D=b.current;D&&$.target instanceof Node&&D.contains($.target)||y(!1)};return document.addEventListener("pointerdown",h),()=>document.removeEventListener("pointerdown",h)},[u]),n.jsxs("div",{className:"rd-comment",children:[o.length>0?n.jsx("div",{className:"rd-comment-context","aria-label":"Included diff context",children:o.map(h=>n.jsx(ye,{item:h,disabled:a,onRemove:p},h.id))}):null,n.jsxs("div",{className:"rd-comment-main",children:[n.jsxs("div",{className:"rd-target-picker",ref:b,children:[n.jsxs("button",{type:"button",className:"rd-target-button",onClick:()=>y(h=>!h),onKeyDown:h=>{h.stopPropagation(),h.key==="Escape"&&y(!1)},disabled:a,"aria-label":"Diff comment target","aria-haspopup":"listbox","aria-expanded":u,title:"Diff comment target",children:[n.jsx("span",{children:m}),n.jsx(ce,{size:13,strokeWidth:2,"aria-hidden":!0})]}),u?n.jsx("div",{className:"rd-target-menu",role:"listbox","aria-label":"Diff comment target",children:R.map(h=>{const $=h.id===(w?.id??"scout");return n.jsxs("button",{type:"button",className:"rd-target-option",role:"option","aria-selected":$,onClick:()=>{i(h.id),y(!1)},children:[n.jsx("span",{className:"rd-target-option-label",children:h.label}),h.suffix?n.jsx("span",{className:"rd-target-option-suffix",children:h.suffix}):null,n.jsx("span",{className:"rd-target-option-check","aria-hidden":!0,children:$?n.jsx(de,{size:12,strokeWidth:2.2}):null})]},h.id)})}):null]}),n.jsx("textarea",{ref:k,value:c,onChange:h=>f(h.currentTarget.value),onKeyDown:h=>{h.stopPropagation(),(h.metaKey||h.ctrlKey)&&h.key==="Enter"&&(h.preventDefault(),S())},rows:1,disabled:a,placeholder:o.length>0?`Send to ${m} with included context`:"Leave a note on this diff…","aria-label":"Diff comment"}),n.jsxs("button",{type:"button",className:"rd-comment-send",disabled:!I,onClick:S,title:"Send diff comment","aria-label":"Send diff comment",children:[a?n.jsx(ue,{size:13,className:"rd-comment-spin","aria-hidden":!0}):n.jsx(fe,{size:13,"aria-hidden":!0}),n.jsx("span",{children:a?"Sending":"Send"})]})]}),n.jsx("div",{className:"rd-comment-meta",children:g?n.jsx("span",{className:"err",children:g}):d?n.jsx("span",{className:"ok",children:d}):n.jsxs("span",{children:[e.scope?.kind==="session"?"Session diff":"Worktree diff",N?` · ${N}`:""]})})]})}function ye({item:e,disabled:t,onRemove:r}){const s=e.kind==="file"?he:me;return n.jsxs("div",{className:`rd-context-item ${e.kind}`,children:[n.jsxs("div",{className:"rd-context-head",children:[n.jsx("span",{className:"rd-context-icon","aria-hidden":!0,children:n.jsx(s,{size:12,strokeWidth:2})}),n.jsx("span",{className:"rd-context-label",title:e.label,children:e.label}),n.jsx("span",{className:"rd-context-detail",children:e.detail}),n.jsx("button",{type:"button",className:"rd-context-remove",onClick:()=>r(e.id),disabled:t,title:"Remove included context","aria-label":"Remove included context",children:n.jsx(pe,{size:11,strokeWidth:2.2,"aria-hidden":!0})})]}),e.preview?n.jsx("pre",{className:"rd-context-preview",children:e.preview}):null]})}function Ce({heading:e,worktreePath:t,snapshot:r,freshness:s,activeLayer:i,onLayer:c,layout:f,onLayout:o,refreshing:p,onRefresh:a,onFocusComment:d,onClose:g,onOpenAsPage:k}){const{dir:S}=q(t);return n.jsxs("div",{className:"rd-header",children:[n.jsxs("div",{className:"rd-header-id",children:[n.jsxs("div",{className:"rd-header-title",children:[n.jsx("span",{className:"rd-header-name",title:t,children:e}),r.scope?n.jsx(ke,{snapshot:r}):null,S?n.jsx("span",{className:"rd-header-dir",children:S}):null]}),n.jsx("div",{className:"rd-header-sub",children:n.jsx(Ne,{layers:r.layers,activeLayer:i,onLayer:c})}),n.jsx(Se,{freshness:s,generatedAt:r.generatedAt})]}),n.jsxs("div",{className:"rd-header-actions",children:[n.jsx("button",{type:"button",className:"rd-close","aria-label":"Comment on diff",title:"Comment on diff",onClick:d,children:n.jsx(xe,{size:14,strokeWidth:2,"aria-hidden":!0})}),n.jsxs("div",{className:"rd-segmented",role:"group","aria-label":"Diff layout",children:[n.jsx("button",{type:"button",className:f==="unified"?"on":"","aria-pressed":f==="unified",onClick:()=>o("unified"),children:"Unified"}),n.jsx("button",{type:"button",className:f==="split"?"on":"","aria-pressed":f==="split",onClick:()=>o("split"),children:"Split"})]}),n.jsx("button",{type:"button",className:`rd-close${p?" spinning":""}`,"aria-label":"Refresh diff",title:"Fetch fresh diff",onClick:a,disabled:p,children:n.jsx(ge,{size:14,strokeWidth:2,"aria-hidden":!0})}),k?n.jsx("button",{type:"button",className:"rd-close","aria-label":"Open diff as page",title:"Open as full page",onClick:k,children:"↗"}):null,g?n.jsx("button",{type:"button",className:"rd-close","aria-label":"Close",onClick:g,children:"✕"}):null]})]})}function $e({snapshot:e}){const t=[];e.coverage.truncatedLayers>0&&t.push({level:"warning",text:`${e.coverage.truncatedLayers} layer${e.coverage.truncatedLayers===1?"":"s"} truncated — the native diff hit a size budget; some files or hunks are omitted.`}),e.coverage.scanBudgetReached&&t.push({level:"warning",text:"Scan budget reached — this diff is partial."});for(const r of e.diagnostics)t.push({level:r.level,text:r.path?`${r.message} (${r.path})`:r.message});return t.length===0?null:n.jsx(n.Fragment,{children:t.map((r,s)=>n.jsxs("div",{className:`rd-banner ${r.level}`,children:[n.jsx("span",{className:"rd-banner-dot","aria-hidden":!0}),n.jsx("span",{children:r.text})]},s))})}function ke({snapshot:e}){const t=e.scope;if(!t)return null;const r=t.kind==="session"?`Session · ${t.filteredPaths.length} files`:t.filteredPaths.length>0?`Filtered · ${t.filteredPaths.length} files`:"Worktree",s=t.kind==="session"?`${t.label}: path-filtered diff from ${t.changedFiles} changed / ${t.touchedFiles} touched session files`:t.label;return n.jsx("span",{className:`rd-scope-pill ${t.kind}`,title:s,children:r})}function Se({freshness:e,generatedAt:t}){const r=e?.fetchedAt??t,s=Math.max(0,Date.now()-r),i=e?.cacheHit?`Prefetched ${O(s)}`:`Updated ${O(s)}`;return n.jsxs("div",{className:"rd-freshness",title:new Date(r).toLocaleString(),children:[n.jsx("span",{children:i}),e?.refreshing?n.jsx("span",{children:"Refreshing…"}):null,e?.refreshError?n.jsx("span",{children:"Refresh failed"}):null]})}function Ne({layers:e,activeLayer:t,onLayer:r}){return n.jsx("div",{className:"rd-layers",role:"tablist","aria-label":"Diff layers",children:e.map(s=>{const i=ee(s);return n.jsxs("button",{type:"button",role:"tab","aria-selected":s.kind===t,className:"rd-layer-tab"+(s.kind===t?" on":""),onClick:()=>r(s.kind),title:s.shortstat??void 0,children:[n.jsx("span",{children:te[s.kind]??s.kind}),n.jsx("span",{className:"rd-layer-stat",children:s.files.length===0?"clean":n.jsxs(n.Fragment,{children:[s.files.length,"f"," ",n.jsxs("span",{style:{color:"var(--rd-add)"},children:["+",i.add]})," ",n.jsxs("span",{style:{color:"var(--rd-del)"},children:["−",i.del]}),s.truncated?" ⚠":""]})})]},s.kind)})})}const G="openscout.repo-diff.files-rail-width",U=268,we=196,ve=520;function Ie(e,t){if(e.length<=t)return e;const r=e.lastIndexOf(".");if(r<=0){const p=Math.max(1,Math.floor((t-1)/2)),a=t-p-1;return e.slice(0,p)+"…"+e.slice(-Math.max(1,a))}const s=e.slice(0,r),i=e.slice(r),c=t-i.length-1;if(c<2){const p=Math.max(1,t-i.length-1);return s.slice(0,p)+"…"+i}const f=Math.max(1,Math.floor(c/2)),o=Math.max(1,c-f);return s.slice(0,f)+"…"+s.slice(-o)+i}function De(e,t){return Math.max(8,Math.floor((e-178-t*14)/6.7))}function W(e){return Math.max(we,Math.min(ve,Math.round(e)))}function Re(){if(typeof window>"u")return U;const e=Number(window.localStorage.getItem(G));return Number.isFinite(e)?W(e):U}function Le(e){const t={name:"",path:"",firstIndex:Number.MAX_SAFE_INTEGER,children:new Map,files:[]};for(const r of e){t.firstIndex=Math.min(t.firstIndex,r.index);const s=r.dir?r.dir.split("/").filter(Boolean):[];let i=t;for(const c of s){const f=i.path?`${i.path}/${c}`:c;let o=i.children.get(c);o||(o={name:c,path:f,firstIndex:r.index,children:new Map,files:[]},i.children.set(c,o)),o.firstIndex=Math.min(o.firstIndex,r.index),i=o}i.files.push(r)}return t}function J(e){let t=e.files.length;for(const r of e.children.values())t+=J(r);return t}function Pe({layer:e,selectedFileKey:t,onSelect:r,onIncludeFile:s}){const[i,c]=l.useState(Re),[f,o]=l.useState(()=>new Set),p=l.useMemo(()=>(e?.files??[]).map((u,y)=>{const b=K(u,y),w=T(u),{name:m,dir:C}=q(w),N=(u.status==="renamed"||u.status==="copied")&&u.oldPath&&u.newPath&&u.oldPath!==u.newPath;return{file:u,index:y,key:b,display:w,name:m,dir:C,renamed:!!N}}),[e]),a=l.useMemo(()=>Le(p),[p]),d=l.useCallback(u=>{o(y=>{const b=new Set(y);return b.has(u)?b.delete(u):b.add(u),b})},[]),g=l.useCallback(u=>{u.preventDefault();const y=u.clientX,b=i,w=C=>{c(W(b+C.clientX-y))},m=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",m),c(C=>{const N=W(C);return window.localStorage.setItem(G,String(N)),N})};window.addEventListener("pointermove",w),window.addEventListener("pointerup",m,{once:!0})},[i]),k=(u,y)=>n.jsx(Fe,{entry:u,depth:y,railWidth:i,selected:u.key===t,onSelect:r,onIncludeFile:s},u.key),S=(u,y)=>{const b=[],w=[...u.children.values()].sort((m,C)=>m.firstIndex!==C.firstIndex?m.firstIndex-C.firstIndex:m.name.localeCompare(C.name));for(const m of w){const C=f.has(m.path);b.push(n.jsxs("button",{type:"button",className:"rd-dir-row",style:{paddingLeft:12+y*14},onClick:()=>d(m.path),title:m.path,children:[n.jsx("span",{className:"rd-dir-caret",children:C?"›":"⌄"}),n.jsx("span",{className:"rd-dir-name",children:m.name}),n.jsx("span",{className:"rd-dir-count",children:J(m)})]},`dir:${m.path}`)),C||b.push(...S(m,y+1))}for(const m of u.files)b.push(k(m,y));return b};return n.jsxs("div",{className:"rd-rail",style:{width:i},children:[n.jsx("div",{className:"rd-rail-head",children:e?`Changed files · ${e.files.length}`:"Changed files"}),n.jsx("div",{className:"rd-rail-list",children:S(a,0)}),n.jsx("div",{className:"rd-rail-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize file navigation",onPointerDown:g})]})}function Fe({entry:e,depth:t,railWidth:r,selected:s,onSelect:i,onIncludeFile:c}){const{file:f,key:o,display:p,name:a,dir:d,renamed:g}=e,k=De(r,t),S=Ie(a,k);return n.jsxs("div",{className:"rd-file-row"+(s?" on":""),title:g?`${f.oldPath} → ${f.newPath}`:p,children:[n.jsxs("button",{type:"button",className:"rd-file-pick",style:{paddingLeft:18+t*14},onClick:()=>i(o),children:[n.jsx("span",{className:`rd-file-glyph ${f.status}`,children:ne[f.status]}),n.jsxs("span",{className:"rd-file-id",children:[n.jsx("span",{className:"rd-file-name",children:S}),n.jsx("span",{className:"rd-file-dir",children:g?`${f.oldPath} → ${d||a}`:d}),n.jsx(Ee,{file:f})]})]}),n.jsx("span",{className:"rd-file-churn",children:f.binary?n.jsx("span",{className:"add",style:{color:"var(--muted)"},children:"bin"}):n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"add",children:["+",f.additions??0]}),n.jsxs("span",{className:"del",children:["−",f.deletions??0]})]})}),n.jsx("button",{type:"button",className:"rd-file-include",onClick:u=>{u.stopPropagation(),c(f,o)},"aria-label":`Include ${p} in comment`,title:"Include in comment",children:n.jsx(be,{size:12,strokeWidth:2,"aria-hidden":!0})})]})}function Ee({file:e}){const t=[];return e.binary&&t.push("BINARY"),e.truncated&&t.push("TRUNCATED"),e.status==="conflict"&&t.push("CONFLICT"),t.length===0?null:n.jsx("span",{className:"rd-file-tags",children:t.map(r=>n.jsx("span",{className:"rd-file-tag",children:r},r))})}function Me(e){switch(e?.trim().toLowerCase()){case"active":case"working":case"running":case"in_turn":return 80;case"queued":case"waiting":case"waking":case"in_flight":return 50;case"idle":case"available":return 25;case"offline":case"retired":case"stale":return-40;default:return 0}}function Te(e){return e.newPath??e.oldPath??"(unknown)"}function Q(e){const t=e.scope?.kind==="session"?e.scope.agentId:null,r=new Map;for(const s of e.scout.hints)s.agentId&&r.set(s.agentId,(r.get(s.agentId)??0)+1);return e.scout.agents.map(s=>({id:s.id,label:X(s),score:Me(s.state)+(s.id===t?1e3:0)+(r.get(s.id)??0)*10})).sort((s,i)=>{const c=i.score-s.score;return c!==0?c:s.label.localeCompare(i.label)})}function Ae(e){return Q(e)[0]??null}function Ke(e){const t=e.files.reduce((r,s)=>({add:r.add+(s.additions??0),del:r.del+(s.deletions??0)}),{add:0,del:0});return`${e.kind}: ${e.files.length} file${e.files.length===1?"":"s"}, +${t.add} -${t.del}${e.truncated?", truncated":""}`}function z(e){const t=e.binary?"binary":`+${e.additions??0} -${e.deletions??0}`;return`${e.status}: ${Te(e)} (${t}${e.truncated?", truncated":""})`}function We(e){const t=e.scope;return t?t.kind==="session"?`session ${t.sessionId??t.refId??"(unknown)"} (${t.changedFiles} changed / ${t.touchedFiles} touched files, ${t.include})`:t.filteredPaths.length>0?`filtered worktree (${t.filteredPaths.length} paths)`:"worktree":"worktree"}function ze(e){const{comment:t,includedContext:r=[],snapshot:s,activeLayer:i,selectedFile:c}=e,o=((i?s.layers.find(d=>d.kind===i)??null:null)?.files??s.layers.flatMap(d=>d.files)).slice(0,12).map(z),p=s.scout.agents.map(d=>X(d)).slice(0,8),a=["Operator comment on repo diff:",t,"","Repo Diff context:",`- Worktree: ${s.worktreePath}`,`- Scope: ${We(s)}`,`- Active layer: ${i??"none"}`];return r.length>0&&a.splice(3,0,"Included diff context:",...r.map(d=>d.trim()).filter(Boolean),""),c&&a.push(`- Selected file: ${z(c)}`),a.push(`- Layers: ${s.layers.map(Ke).join("; ")}`),p.length>0&&a.push(`- Attached agents: ${p.join(", ")}`),s.scout.sessions.length>0&&a.push(`- Sessions: ${s.scout.sessions.map(d=>d.id).slice(0,8).join(", ")}`),o.length>0&&a.push(`- Changed files: ${o.join(", ")}`),s.diagnostics.length>0&&a.push(`- Diagnostics: ${s.diagnostics.map(d=>d.message).join("; ")}`),a.join(`
2
+ `)}function _e(e){const{snapshot:t,activeLayer:r,file:s}=e,i=[r??"diff",z(s)];return t.scope?.kind==="session"&&i.push(`session ${t.scope.sessionId??t.scope.refId??"scope"}`),`[Diff context: ${i.join(" · ")}]`}function He(e,t,r){return!e||!t?null:e.files.find((s,i)=>r(s,i)===t)??null}function Oe(e,t=120){const r=e.replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t-3)}...`:r}function Be(e,t=7){const r=e.trimEnd().split(`
3
+ `),s=r.slice(0,t),i=r.length-s.length;return i>0?`${s.join(`
4
+ `)}
5
+ ... ${i} more line${i===1?"":"s"}`:s.join(`
6
+ `)}function Ue(e){return e.newLine!=null?`L${e.newLine}`:e.oldLine!=null?`old L${e.oldLine}`:"line"}function Xe(e){return e.side==="add"?"+":e.side==="del"?"-":" "}function qe(e){const{snapshot:t,activeLayer:r,file:s}=e,i=T(s),c=s.binary?"binary":`+${s.additions??0} -${s.deletions??0}`;return{id:`file:${r??"diff"}:${i}`,kind:"file",label:i,detail:`${r??"diff"} · ${s.status} · ${c}`,preview:null,snippet:_e({snapshot:t,activeLayer:r,file:s})}}function Ye(e){const{line:t}=e,r=Xe(t);return{id:`line:${t.layer}:${t.filePath}:${t.side}:${t.oldLine??""}:${t.newLine??""}`,kind:"line",label:`${t.filePath}:${Ue(t)}`,detail:`${t.layer} · ${r}`,preview:`${r} ${Oe(t.text,180)}`,snippet:se({line:t})}}function Ve(e){const{selection:t}=e,r=t.filePath??"diff selection",s=t.text.trim().split(`
7
+ `).filter(Boolean).length;return{id:`selection:${t.layer??"diff"}:${r}:${t.text}`,kind:"selection",label:r,detail:`${t.layer??"diff"} · ${s} line${s===1?"":"s"}`,preview:Be(t.text),snippet:re({selection:t})}}function Ge({snapshot:e,activeLayer:t,selectedFile:r,setSelectedFileKey:s,resetKey:i}){const[c,f]=l.useState(""),[o,p]=l.useState([]),[a,d]=l.useState("scout"),[g,k]=l.useState(!1),[S,u]=l.useState(!1),[y,b]=l.useState(null),[w,m]=l.useState(null),C=l.useRef(null),N=l.useMemo(()=>e?Q(e):[],[e]),I=l.useMemo(()=>e?Ae(e):null,[e]);l.useEffect(()=>{f(""),p([]),k(!1),b(null),m(null)},[i]),l.useEffect(()=>{d(j=>g&&j==="scout"||N.some(x=>x.id===j)?j:I?.id??"scout")},[g,N,I?.id]);const R=l.useCallback(j=>{f(j),b(null),m(null)},[]),h=l.useCallback(j=>{k(!0),d(j)},[]),$=l.useCallback(j=>{p(x=>x.some(P=>P.id===j.id)?x:[...x,j]),b(null),m(null),queueMicrotask(()=>C.current?.focus())},[]),D=l.useCallback(j=>{p(x=>x.filter(P=>P.id!==j)),b(null),m(null)},[]),F=l.useCallback(async()=>{const j=c.trim();if(!j&&o.length===0||S||!e)return;const x=N.find(M=>M.id===a)??null,P=ze({comment:j||"Please review the included diff context.",includedContext:o.map(M=>M.snippet),snapshot:e,activeLayer:t,selectedFile:r});u(!0),b(null),m(null);try{x?(await B("/api/ask",{method:"POST",body:JSON.stringify({body:P,targetAgentId:x.id,targetLabel:x.label,metadata:{source:"repo-diff",originSurface:"repo-diff",handoffKind:"repo-diff-comment",targetAgentId:x.id,worktreePath:e.worktreePath,activeLayer:t,selectedFile:r?T(r):null,scopeKind:e.scope?.kind??"worktree"}})}),b(`Sent to ${x.label}`)):(await B("/api/send",{method:"POST",body:JSON.stringify({body:P})}),b("Sent to Scout")),f(""),p([])}catch(M){m(M instanceof Error?M.message:String(M))}finally{u(!1)}},[t,o,c,S,a,N,r,e]),v=l.useCallback((j,x)=>{e&&(s(x),$(qe({snapshot:e,activeLayer:t,file:j})))},[t,$,s,e]),L=l.useCallback(j=>{e&&$(Ye({line:j}))},[$,e]),E=l.useCallback(j=>{e&&$(Ve({selection:j}))},[$,e]);return{targets:N,targetId:a,setTargetId:h,draft:c,setDraft:R,contextItems:o,removeContextItem:D,pending:S,status:y,error:w,textareaRef:C,submit:F,includeFileInComment:v,includeLineInComment:L,includeSelectionInComment:E}}function Je({path:e,activeLayer:t,selectedFile:r,snapshotKey:s}){const i=r?T(r):null,c=`${e}\0${t??""}\0${i??""}\0${s}`,[f,o]=l.useState({layer:null,phase:"idle",error:null}),p=l.useRef(c),a=l.useMemo(()=>!t||!i?null:Y(e,[t],{files:[i],tier:"patch",cacheScope:s}),[t,i,e,s]);return l.useEffect(()=>{if(p.current=c,!t||!i){o({layer:null,phase:"idle",error:null});return}if(a?.fresh){o({layer:a.snapshot.layers[0]??null,phase:"ready",error:null});return}o({layer:null,phase:"loading",error:null}),V(e,[t],{files:[i],tier:"patch",cacheScope:s}).then(d=>{p.current===c&&o({layer:d.snapshot.layers[0]??null,phase:"ready",error:null})},d=>{p.current===c&&o(g=>({layer:g.layer,phase:"error",error:d instanceof Error?d.message:String(d)}))})},[t,a,i,e,c]),f}function Qe(e){const[t,r]=l.useState(null),[s,i]=l.useState(null),[c,f]=l.useState("split");l.useEffect(()=>{e&&f(e.render.preferredLayout==="stacked"?"unified":"split")},[e]),l.useEffect(()=>{if(!e)return;const d=e.layers.filter(g=>g.files.length>0)[0]??e.layers[0]??null;r(g=>g&&e.layers.some(k=>k.kind===g)?g:d?d.kind:null)},[e]);const o=l.useMemo(()=>!e||!t?null:e.layers.find(a=>a.kind===t)??null,[e,t]),p=l.useMemo(()=>He(o,s,K),[o,s]);return l.useEffect(()=>{if(!o){i(null);return}i(a=>{const d=o.files.map((g,k)=>K(g,k));return a&&d.includes(a)?a:d[0]??null})},[o]),{activeLayer:t,setActiveLayer:r,layer:o,selectedFileKey:s,setSelectedFileKey:i,selectedFile:p,layout:c,setLayout:f}}function Ze({path:e,layers:t,files:r,session:s,tier:i="summary",forceInitialLoad:c}){const f=t.join(","),o=l.useMemo(()=>f.split(","),[f]),p=(r??[]).join("\0"),a=s?`${s.sessionId??""}\0${s.agentId??""}\0${s.include??"changed"}`:"",d=l.useMemo(()=>({files:p?p.split("\0").filter(Boolean):void 0,tier:i,session:a?{sessionId:s?.sessionId??null,agentId:s?.agentId??null,include:s?.include??"changed"}:null}),[p,s?.agentId,s?.include,s?.sessionId,a,i]),[g,k]=l.useState(null),[S,u]=l.useState("loading"),[y,b]=l.useState(null),[w,m]=l.useState(null),C=l.useRef(null),N=l.useRef(!1);l.useEffect(()=>{C.current=g},[g]);const I=l.useCallback(async(h={})=>{const $=Y(e,o,d),D=h.force===!0||c&&!N.current,F=h.preserveCurrent===!0&&C.current!=null;b(null),$&&!D?(k($.snapshot),m(_($,!0)),u("ready")):F?(m(v=>({fetchedAt:v?.fetchedAt??Date.now(),cacheHit:v?.cacheHit??!1,refreshing:!0,refreshError:null})),u("ready")):(u("loading"),m(null));try{const v=await V(e,o,{force:D||$!=null,...d});D&&(N.current=!0),k(v.snapshot),m(ie(v,!1)),u("ready")}catch(v){const L=v instanceof Error?v.message:String(v);$?(m(_($,!1,L)),u("ready")):F?(m(E=>E&&{...E,refreshing:!1,refreshError:L}),u("ready")):(b(L),u("error"))}},[c,e,o,d]);l.useEffect(()=>{I()},[I]);const R=l.useCallback(()=>{I({force:!0,preserveCurrent:!0})},[I]);return{snapshot:g,fetchPhase:S,fetchError:y,freshness:w,filesKey:p,sessionKey:a,requestedLayers:o,loadSnapshot:I,refreshSnapshot:R}}function bt({path:e,layers:t=oe,files:r,session:s,forceInitialLoad:i=!1,onClose:c,onOpenAsPage:f,className:o,title:p}){const{snapshot:a,fetchPhase:d,fetchError:g,freshness:k,filesKey:S,sessionKey:u,loadSnapshot:y,refreshSnapshot:b}=Ze({path:e,layers:t,files:r,session:s,tier:"summary",forceInitialLoad:i}),{pierre:w,pierrePhase:m,pierreError:C,pierreTheme:N,retryPierre:I}=ae(a),{activeLayer:R,setActiveLayer:h,layer:$,selectedFileKey:D,setSelectedFileKey:F,selectedFile:v,layout:L,setLayout:E}=Qe(a),j=Je({path:e,activeLayer:R,selectedFile:v,snapshotKey:a?.render.renderKey??""}),x=Ge({snapshot:a,activeLayer:R,selectedFile:v,setSelectedFileKey:F,resetKey:`${e}\0${S}\0${u}`});if(d==="loading"&&!a)return n.jsx(A,{className:o,children:n.jsxs(H,{children:[n.jsx("div",{className:"rd-spinner","aria-hidden":!0}),n.jsxs("div",{className:"rd-center-title",children:["Reading ",s?"session":"worktree"," diff…"]}),n.jsx("div",{className:"rd-center-body",children:e})]})});if(d==="error"&&!a)return n.jsx(A,{className:o,children:n.jsxs(H,{children:[n.jsx("div",{className:"rd-center-title",children:"Couldn’t load the diff"}),n.jsx("div",{className:"rd-center-body",children:g??"The broker did not return a diff snapshot."}),n.jsx("div",{className:"rd-center-action",children:n.jsx("button",{type:"button",className:"rd-btn",onClick:()=>{y()},children:"Retry"})})]})});if(!a)return n.jsx(A,{className:o});const P=p??Z(a.worktreePath);return n.jsxs(A,{className:o,children:[n.jsx(Ce,{heading:P,worktreePath:a.worktreePath,snapshot:a,freshness:k,activeLayer:R,onLayer:h,layout:L,onLayout:E,refreshing:k?.refreshing===!0,onRefresh:b,onFocusComment:()=>{x.textareaRef.current?.scrollIntoView({block:"nearest"}),x.textareaRef.current?.focus()},onClose:c,onOpenAsPage:f}),n.jsx($e,{snapshot:a}),n.jsxs("div",{className:"rd-body",children:[n.jsx(Pe,{layer:$,selectedFileKey:D,onSelect:F,onIncludeFile:x.includeFileInComment}),n.jsx(je,{snapshot:a,selectedFile:v,targets:x.targets,targetId:x.targetId,onTargetId:x.setTargetId,draft:x.draft,onDraft:x.setDraft,contextItems:x.contextItems,onRemoveContextItem:x.removeContextItem,pending:x.pending,status:x.status,error:x.error,textareaRef:x.textareaRef,onSubmit:x.submit}),n.jsx(le,{layer:$,patchLayer:j.layer,patchPhase:j.phase,patchError:j.error,selectedFileKey:D,renderKey:a.render.renderKey,theme:N,layout:L,pierre:w,pierrePhase:m,pierreError:C,onRetryPierre:I,onIncludeLineContext:x.includeLineInComment,onIncludeSelectionContext:x.includeSelectionInComment})]})]})}export{bt as RepoDiffViewer,bt as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RepoDiffViewer-C2mb0Wj-.js","assets/index-C8uS5szO.js","assets/index-Ck1__1yL.css","assets/ui-LM8pS8qE.js","assets/usePierreRuntime-DJkRHMoe.js","assets/chunk-HRAB3GC3-C5X-kFhb.js","assets/chevron-down-B5eMsn5c.js","assets/createLucideIcon-DkjnzvcJ.js","assets/check-B8dMv3Is.js","assets/loader-circle-DurUYl7E.js","assets/send-horizontal-pOtGI7FM.js","assets/file-code-corner-D_Aptal2.js","assets/code-xml-BmyLM0I2.js","assets/x-DI1ktCYb.js","assets/cache-DEy9E34b.js","assets/api-CaROe5_H.js","assets/message-square-NmXWtWLR.js","assets/refresh-cw-Da9DDLk2.js","assets/plus-D_wLGJGT.js","assets/repo-diff-DyYmQMSA.css"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as i,_ as s}from"./index-C8uS5szO.js";/* empty css */const a=i.lazy(()=>s(()=>import("./RepoDiffViewer-C2mb0Wj-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(r=>({default:r.RepoDiffViewer})));function t(){return e.jsx("div",{className:"rd-viewer","data-scout-theme":!0,children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-spinner","aria-hidden":!0}),e.jsx("div",{className:"rd-center-title",children:"Opening diff viewer…"})]})})})}function c(r){return e.jsx(i.Suspense,{fallback:e.jsx(t,{}),children:e.jsx(a,{...r})})}export{c as R};