@openscout/scout 0.2.102 → 0.2.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/README.md +37 -0
  2. package/bin/scout.mjs +6 -0
  3. package/bin/scoutd +0 -0
  4. package/dist/build-manifest.json +4 -4
  5. package/dist/chat.mjs +307 -0
  6. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
  7. package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CusDRiVO.js} +1 -1
  8. package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-CyegKk1V.js} +1 -1
  9. package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-X-hbTOi0.js} +1 -1
  10. package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-LPXSVP67.js} +1 -1
  11. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
  12. package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
  13. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
  14. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
  15. package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-DtHT3sCo.js} +1 -1
  16. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
  17. package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
  18. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
  19. package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
  20. package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
  21. package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
  22. package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
  23. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
  24. package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
  25. package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
  26. package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-CfTupTEl.js} +1 -1
  27. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
  28. package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
  29. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
  30. package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
  31. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
  32. package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-Cchnc4Ug.js} +1 -1
  33. package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-gkEp4y__.js} +1 -1
  34. package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CUkjnoVk.js} +1 -1
  35. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
  36. package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
  37. package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
  38. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
  39. package/dist/client/assets/Canvas-X9pVSkw3.js +1 -0
  40. package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-BXUtPAGC.js} +1 -1
  41. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
  42. package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
  43. package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
  44. package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +1 -0
  45. package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
  46. package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
  47. package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
  48. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
  49. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
  50. package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
  51. package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
  52. package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-DuQRwpgK.js} +1 -1
  53. package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
  54. package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-BXyKeL5T.js} +1 -1
  55. package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-THp0r_U8.js} +1 -1
  56. package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-BVmSMV2V.js} +1 -1
  57. package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
  58. package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
  59. package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BUoRbu9o.js} +1 -1
  60. package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
  61. package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
  62. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
  63. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
  64. package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js} +2 -2
  65. package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
  66. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
  67. package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
  68. package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
  69. package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
  70. package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dhryjx2c.js} +1 -1
  71. package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
  72. package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
  73. package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
  74. package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-aH-jCyDq.js} +1 -1
  75. package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-66uQAorV.js} +1 -1
  76. package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
  77. package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
  78. package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CZlrHXy-.js} +1 -1
  79. package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-BAO6mtjD.js} +1 -1
  80. package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
  81. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
  82. package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-2_NVPQor.js} +1 -1
  83. package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
  84. package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
  85. package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-VFzA6Kxc.js} +1 -1
  86. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
  87. package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-BeHDejWz.js} +1 -1
  88. package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
  89. package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CFfkIbc6.js} +1 -1
  90. package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
  91. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
  92. package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-_t7yM8vX.js} +2 -2
  93. package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-DouPyNmz.js} +1 -1
  94. package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-CnM1i8hW.js} +1 -1
  95. package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
  96. package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
  97. package/dist/client/assets/JumpPalette-O1aJE9gR.js +1 -0
  98. package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
  99. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
  100. package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-CJa110yk.js} +1 -1
  101. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
  102. package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
  103. package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-DWZHYh1A.js} +2 -2
  104. package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
  105. package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
  106. package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BVvtqI8q.js} +2 -2
  107. package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
  108. package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
  109. package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-D62-Wis8.js} +1 -1
  110. package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
  111. package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
  112. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
  113. package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-B19lYSY9.js} +1 -1
  114. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
  115. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
  116. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
  117. package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-Bh-L-emz.js} +1 -1
  118. package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
  119. package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-DFbF_XvR.js} +1 -1
  120. package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-CElOEpCh.js} +1 -1
  121. package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-B-jjHf1c.js} +1 -1
  122. package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
  123. package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-PFnG_10h.js} +2 -2
  124. package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
  125. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
  126. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
  127. package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
  128. package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
  129. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
  130. package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
  131. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
  132. package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
  133. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
  134. package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
  135. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
  136. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
  137. package/dist/client/assets/Provider-C35yu29I.js +5 -0
  138. package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-BjmWK420.js} +1 -1
  139. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
  140. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
  141. package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
  142. package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-348f17bW.js} +1 -1
  143. package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-CBnAM3ui.js} +1 -1
  144. package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DyRPfNFx.js} +1 -1
  145. package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
  146. package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
  147. package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
  148. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
  149. package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-uMCpt0e9.js} +2 -2
  150. package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
  151. package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-CNDhZhgD.js} +1 -1
  152. package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
  153. package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-3_25USO_.js} +1 -1
  154. package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
  155. package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-D7dbV2qo.js} +1 -1
  156. package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
  157. package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
  158. package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
  159. package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
  160. package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
  161. package/dist/client/assets/SessionObserve-DXxBvejJ.js +12 -0
  162. package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
  163. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
  164. package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
  165. package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
  166. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
  167. package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
  168. package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
  169. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
  170. package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-CRtTYkMj.js} +1 -1
  171. package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-_CHAQdOa.js} +1 -1
  172. package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
  173. package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-CpZWf54-.js} +1 -1
  174. package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-BSiTS4en.js} +1 -1
  175. package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-2gCP6H7A.js} +1 -1
  176. package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-CYSijNTy.js} +2 -2
  177. package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
  178. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
  179. package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
  180. package/dist/client/assets/TerminalRelay-DrikpUSJ.js +46 -0
  181. package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
  182. package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-CXFeweMg.js} +1 -1
  183. package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
  184. package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
  185. package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
  186. package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
  187. package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
  188. package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
  189. package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
  190. package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-vNt01sDd.js} +1 -1
  191. package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-BDkR7Edq.js} +1 -1
  192. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
  193. package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-CIIlutQq.js} +1 -1
  194. package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
  195. package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-Jm2Z6dfW.js} +1 -1
  196. package/dist/client/assets/{activity-CSUhvjD0.js → activity-CIlFrfPJ.js} +1 -1
  197. package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-dFpj9Kfq.js} +1 -1
  198. package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-BFCGRtGh.js} +1 -1
  199. package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-BGGvT5G6.js} +1 -1
  200. package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
  201. package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
  202. package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
  203. package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
  204. package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
  205. package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
  206. package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-DDc7mLCW.js} +1 -1
  207. package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
  208. package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
  209. package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
  210. package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-C1SQHJ3k.js} +1 -1
  211. package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-MVUKauwQ.js} +1 -1
  212. package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-Bp-FpE5V.js} +1 -1
  213. package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-BPedAgxO.js} +1 -1
  214. package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-CV98WMSp.js} +1 -1
  215. package/dist/client/assets/{bot-CfN9PSBF.js → bot-B4zLQ4IN.js} +1 -1
  216. package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
  217. package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
  218. package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
  219. package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
  220. package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
  221. package/dist/client/assets/{check-B8dMv3Is.js → check-lrJ3a73a.js} +1 -1
  222. package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-l1mrh5S9.js} +1 -1
  223. package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DrfqcerI.js} +1 -1
  224. package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-CETZJzjV.js} +1 -1
  225. package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
  226. package/dist/client/assets/{clock-DFcRbtrl.js → clock-BV1aqPkK.js} +1 -1
  227. package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-BhcNbLWU.js} +1 -1
  228. package/dist/client/assets/{coffee-C_D9zooM.js → coffee-D7EAOdCk.js} +1 -1
  229. package/dist/client/assets/{compass-DTZdCpv9.js → compass-63TUaz5_.js} +1 -1
  230. package/dist/client/assets/content-B1lgE8qr.js +1 -0
  231. package/dist/client/assets/content-B5l11YyQ.js +1 -0
  232. package/dist/client/assets/content-BNZOZEpX.js +1 -0
  233. package/dist/client/assets/content-BRIxP155.js +1 -0
  234. package/dist/client/assets/content-BWd8gt8L.js +1 -0
  235. package/dist/client/assets/content-BfwS2jAK.js +1 -0
  236. package/dist/client/assets/content-C4p43_eT.js +1 -0
  237. package/dist/client/assets/content-CdYfaoDV.js +1 -0
  238. package/dist/client/assets/content-CzldLxw0.js +1 -0
  239. package/dist/client/assets/content-D-olnc4U.js +1 -0
  240. package/dist/client/assets/content-DTioimq4.js +1 -0
  241. package/dist/client/assets/content-LOebm3_d.js +1 -0
  242. package/dist/client/assets/content-nGlEZhUI.js +1 -0
  243. package/dist/client/assets/content-oyzDM-LK.js +1 -0
  244. package/dist/client/assets/content-x1PHxED7.js +1 -0
  245. package/dist/client/assets/content-zX3ZY3T9.js +1 -0
  246. package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
  247. package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-Tqba2d56.js} +1 -1
  248. package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
  249. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
  250. package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
  251. package/dist/client/assets/{copy-D9WUpQRf.js → copy-xKeM5ZtU.js} +1 -1
  252. package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-BOTa_WLr.js} +1 -1
  253. package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-zZ8Hx7er.js} +1 -1
  254. package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
  255. package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
  256. package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
  257. package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
  258. package/dist/client/assets/discover-DJFxyV1k.js +2 -0
  259. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
  260. package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-CUObqmgX.js} +1 -1
  261. package/dist/client/assets/{eye-CtqSV8BS.js → eye-LrO-cXQt.js} +1 -1
  262. package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-CsU7jJpu.js} +1 -1
  263. package/dist/client/assets/{file-text-ChtICwub.js → file-text-CnISiiw6.js} +1 -1
  264. package/dist/client/assets/{flag-CqdOxVkI.js → flag-C4wl8z2-.js} +1 -1
  265. package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
  266. package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
  267. package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
  268. package/dist/client/assets/{folder-0fWevPvQ.js → folder-D5prSkzz.js} +1 -1
  269. package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-D9_5iJEm.js} +1 -1
  270. package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-QZub3Ot9.js} +1 -1
  271. package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-B0_fPLO7.js} +1 -1
  272. package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-DicR7sUf.js} +1 -1
  273. package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
  274. package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
  275. package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
  276. package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
  277. package/dist/client/assets/index-724SdE6r.js +1 -0
  278. package/dist/client/assets/{index-CvsM3jm8.js → index-CHD0qcfL.js} +1 -1
  279. package/dist/client/assets/index-CN4rBB_s.css +1 -0
  280. package/dist/client/assets/index-D1d98iYf.js +1 -0
  281. package/dist/client/assets/index-EsrkGBcv.js +10 -0
  282. package/dist/client/assets/index-gGHPA-By.js +1 -0
  283. package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-BkgUDn6G.js} +2 -2
  284. package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-DDHegDbx.js} +1 -1
  285. package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
  286. package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
  287. package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-D-RSWjb-.js} +1 -1
  288. package/dist/client/assets/{layers-Bolb8ejU.js → layers-C8PDiMul.js} +1 -1
  289. package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-Cor2frzj.js} +1 -1
  290. package/dist/client/assets/left-Bn5X7x2o.js +2 -0
  291. package/dist/client/assets/left-BqS0fYX1.js +1 -0
  292. package/dist/client/assets/left-CTCeeeD3.js +1 -0
  293. package/dist/client/assets/left-DhtVPVux.js +1 -0
  294. package/dist/client/assets/left-K39b-Wvx.js +2 -0
  295. package/dist/client/assets/left-KGmueNPt.js +1 -0
  296. package/dist/client/assets/left-P_GOYB-s.js +1 -0
  297. package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
  298. package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
  299. package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
  300. package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
  301. package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
  302. package/dist/client/assets/library-CkWNPHRp.js +1 -0
  303. package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-OvccU82H.js} +1 -1
  304. package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-BqnoxJrq.js} +1 -1
  305. package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
  306. package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-DxcqCLmd.js} +1 -1
  307. package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
  308. package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-ByUvhS-v.js} +1 -1
  309. package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-CiZ8xSAx.js} +1 -1
  310. package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-DZvJC4KU.js} +1 -1
  311. package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-CxRVKNE-.js} +1 -1
  312. package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
  313. package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
  314. package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-BxesYglW.js} +1 -1
  315. package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
  316. package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-elEEsIvb.js} +1 -1
  317. package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
  318. package/dist/client/assets/monitor-DTTYEb73.js +1 -0
  319. package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-uorRqFxf.js} +1 -1
  320. package/dist/client/assets/{observe-CkfOxYx_.js → observe-BJqERJVj.js} +1 -1
  321. package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
  322. package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-BswZLqvA.js} +1 -1
  323. package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-Bv7sP_fc.js} +1 -1
  324. package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
  325. package/dist/client/assets/{pause-DWS7YGQ3.js → pause-C2XTlkjs.js} +1 -1
  326. package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-KRk_yb0q.js} +1 -1
  327. package/dist/client/assets/{pin-DWlD1BOF.js → pin-C2mFOV1l.js} +1 -1
  328. package/dist/client/assets/{play-D_Pggug4.js → play-FT6K3It1.js} +1 -1
  329. package/dist/client/assets/{plus-D_wLGJGT.js → plus-DFDDeGKu.js} +1 -1
  330. package/dist/client/assets/profile-DTmzN16I.js +1 -0
  331. package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-C0FUCv_p.js} +1 -1
  332. package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
  333. package/dist/client/assets/provider-Dojd8quC.js +1 -0
  334. package/dist/client/assets/{proxy-DOG46ja4.js → proxy-AJsmwA6h.js} +1 -1
  335. package/dist/client/assets/{radio-C_jtwbFP.js → radio-DRoOZsws.js} +1 -1
  336. package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-BmVr7sCD.js} +1 -1
  337. package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
  338. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
  339. package/dist/client/assets/right-49kO-6nD.js +1 -0
  340. package/dist/client/assets/right-APtItA8A.js +1 -0
  341. package/dist/client/assets/right-BJwhPqtn.js +1 -0
  342. package/dist/client/assets/right-BPqrf4ek.js +1 -0
  343. package/dist/client/assets/right-D7djOy6K.js +1 -0
  344. package/dist/client/assets/right-DKOUCRob.js +1 -0
  345. package/dist/client/assets/right-DMNrVzg7.js +1 -0
  346. package/dist/client/assets/{right-BLJsc2-p.js → right-DWPVB-nK.js} +1 -1
  347. package/dist/client/assets/right-DppeMCy4.js +1 -0
  348. package/dist/client/assets/right-GAL5Mw1v.js +1 -0
  349. package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-CGl4RTV7.js} +1 -1
  350. package/dist/client/assets/router-DCtl8wqb.js +1 -0
  351. package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
  352. package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-RUWwCVAr.js} +1 -1
  353. package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
  354. package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
  355. package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-DNjxhyO2.js} +1 -1
  356. package/dist/client/assets/{search-C4VlW_0l.js → search-DT42oyRW.js} +1 -1
  357. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
  358. package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
  359. package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-x3wFUjxj.js} +1 -1
  360. package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-CH0-fbZE.js} +1 -1
  361. package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
  362. package/dist/client/assets/{server-ms1yxUYJ.js → server-QfsgMLk1.js} +1 -1
  363. package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CvSdPHPe.js} +1 -1
  364. package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
  365. package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
  366. package/dist/client/assets/{session-table-CDx_16xf.js → session-table-L-pns6Zl.js} +1 -1
  367. package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Dc-QAa7O.js} +1 -1
  368. package/dist/client/assets/{settings-TJIkkZ0P.js → settings-BVh7kldq.js} +1 -1
  369. package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
  370. package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-782VC_yy.js} +1 -1
  371. package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-BjHq_DNK.js} +1 -1
  372. package/dist/client/assets/{sse-v5QLsOHV.js → sse-BCPRocpq.js} +1 -1
  373. package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
  374. package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-d0yAYxR0.js} +1 -1
  375. package/dist/client/assets/{terminal-96JWDYDL.js → terminal-hQKQygcf.js} +1 -1
  376. package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-Bxs1hp-j.js} +1 -1
  377. package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
  378. package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-Ay5C2c-M.js} +1 -1
  379. package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
  380. package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
  381. package/dist/client/assets/use-beside-DoRC1nt0.js +1 -0
  382. package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-CY4JciOV.js} +1 -1
  383. package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
  384. package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-BvaqtODo.js} +1 -1
  385. package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
  386. package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-3gMYZNIp.js} +1 -1
  387. package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +1 -0
  388. package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-BANmpjMh.js} +1 -1
  389. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
  390. package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
  391. package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
  392. package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
  393. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
  394. package/dist/client/assets/users-BUjx36gx.js +1 -0
  395. package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
  396. package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
  397. package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
  398. package/dist/client/assets/{wrench-BsMTSeji.js → wrench-DR0i5BU7.js} +1 -1
  399. package/dist/client/assets/{x-DI1ktCYb.js → x-DAehov0E.js} +1 -1
  400. package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-BXQiLVnI.js} +1 -1
  401. package/dist/client/assets/{zap-sKPkh4sQ.js → zap-CEjZNZbI.js} +1 -1
  402. package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
  403. package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
  404. package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
  405. package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
  406. package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
  407. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  408. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  409. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  410. package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
  411. package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
  412. package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
  413. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  414. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  415. package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
  416. package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
  417. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  418. package/dist/client/index.html +15 -3
  419. package/dist/drizzle/0019_session_actor_targets.sql +227 -0
  420. package/dist/drizzle/0020_message_reactions.sql +11 -0
  421. package/dist/drizzle/README.md +19 -0
  422. package/dist/drizzle/meta/_journal.json +14 -0
  423. package/dist/highlights-eq9cgrbb.scm +604 -0
  424. package/dist/highlights-ghv9g403.scm +205 -0
  425. package/dist/highlights-hk7bwhj4.scm +284 -0
  426. package/dist/highlights-r812a2qc.scm +150 -0
  427. package/dist/highlights-x6tmsnaa.scm +115 -0
  428. package/dist/injections-73j83es3.scm +27 -0
  429. package/dist/main.mjs +1721 -837
  430. package/dist/node/main.mjs +264 -39
  431. package/dist/pairing-runtime-controller.mjs +1090 -570
  432. package/dist/runtime/base-daemon.mjs +14272 -61
  433. package/dist/runtime/broker-daemon.mjs +16999 -1243
  434. package/dist/runtime/broker-process-manager.mjs +101 -6
  435. package/dist/runtime/mesh-discover.mjs +101 -6
  436. package/dist/scout-control-plane-web.mjs +27057 -6178
  437. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  438. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  439. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  440. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  441. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  442. package/dist/update-helper.mjs +294 -56
  443. package/package.json +2 -2
  444. package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
  445. package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
  446. package/dist/client/assets/AgentAvatar-BIwg54Tj.js +0 -1
  447. package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
  448. package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
  449. package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
  450. package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
  451. package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
  452. package/dist/client/assets/AgentLanesView-aAyC7lHf.js +0 -2
  453. package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
  454. package/dist/client/assets/AgentSessions-Cox2zS-e.js +0 -6
  455. package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
  456. package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
  457. package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
  458. package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
  459. package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
  460. package/dist/client/assets/ConversationComposer-B7RU6LKd.js +0 -1
  461. package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
  462. package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
  463. package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
  464. package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
  465. package/dist/client/assets/ConversationStatus-CK-YfLpi.js +0 -1
  466. package/dist/client/assets/CrewAvatar-CJhuqTsJ.js +0 -1
  467. package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
  468. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
  469. package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
  470. package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
  471. package/dist/client/assets/FloorTacticalHUD-Bngao6sn.js +0 -1
  472. package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
  473. package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
  474. package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
  475. package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
  476. package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
  477. package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
  478. package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
  479. package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
  480. package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
  481. package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
  482. package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
  483. package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
  484. package/dist/client/assets/ObserveEmbedScreen-BPiSXXvm.js +0 -2
  485. package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
  486. package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
  487. package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
  488. package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
  489. package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
  490. package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
  491. package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
  492. package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
  493. package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
  494. package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
  495. package/dist/client/assets/Provider-5Hotn7NQ.js +0 -5
  496. package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
  497. package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
  498. package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
  499. package/dist/client/assets/SessionObserve-DaqDhqDI.js +0 -12
  500. package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +0 -1
  501. package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
  502. package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
  503. package/dist/client/assets/SettingsDrawer-BDapR4E9.js +0 -3
  504. package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
  505. package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
  506. package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
  507. package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
  508. package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
  509. package/dist/client/assets/WorkDetailScreen-CwtRCm_-.js +0 -5
  510. package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
  511. package/dist/client/assets/WorldMinimap-Blqg0d5r.js +0 -1
  512. package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
  513. package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
  514. package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
  515. package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
  516. package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
  517. package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
  518. package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
  519. package/dist/client/assets/content-B5Q4pb9R.js +0 -1
  520. package/dist/client/assets/content-BK1IfOZs.js +0 -1
  521. package/dist/client/assets/content-BeEsWLEm.js +0 -1
  522. package/dist/client/assets/content-BkOwEknW.js +0 -1
  523. package/dist/client/assets/content-C32W5kAG.js +0 -1
  524. package/dist/client/assets/content-CoqyLs9v.js +0 -1
  525. package/dist/client/assets/content-CwpdIS5b.js +0 -1
  526. package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
  527. package/dist/client/assets/content-DXKaPDfn.js +0 -1
  528. package/dist/client/assets/content-DZt5-dkI.js +0 -1
  529. package/dist/client/assets/content-DbQJH8L1.js +0 -1
  530. package/dist/client/assets/content-DetoiaHq.js +0 -1
  531. package/dist/client/assets/content-Dhu3wL7J.js +0 -1
  532. package/dist/client/assets/content-Dpv34iZu.js +0 -1
  533. package/dist/client/assets/content-TtQJb61D.js +0 -1
  534. package/dist/client/assets/content-ymNb2R7g.js +0 -1
  535. package/dist/client/assets/conversation-model-BGFHoxQ0.js +0 -1
  536. package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
  537. package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
  538. package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
  539. package/dist/client/assets/discover-C8IOY7_K.js +0 -2
  540. package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
  541. package/dist/client/assets/home-moving-signal-B7m-ngb2.js +0 -1
  542. package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
  543. package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
  544. package/dist/client/assets/index-C5cX8dkl.js +0 -1
  545. package/dist/client/assets/index-C8uS5szO.js +0 -10
  546. package/dist/client/assets/index-Ck1__1yL.css +0 -1
  547. package/dist/client/assets/index-ClOOrVG1.js +0 -1
  548. package/dist/client/assets/index-Crtgfc9I.js +0 -1
  549. package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
  550. package/dist/client/assets/left-B-_z_nqj.js +0 -2
  551. package/dist/client/assets/left-B1LY7rJc.js +0 -1
  552. package/dist/client/assets/left-C6bdjWcG.js +0 -2
  553. package/dist/client/assets/left-CF4iuqlz.js +0 -1
  554. package/dist/client/assets/left-DLtNyZl1.js +0 -1
  555. package/dist/client/assets/left-Fpxoq-VY.js +0 -1
  556. package/dist/client/assets/left-N2wXfTlp.js +0 -1
  557. package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
  558. package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
  559. package/dist/client/assets/left-default-08gmdCtb.js +0 -1
  560. package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
  561. package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
  562. package/dist/client/assets/library-DLKBVUJ6.js +0 -1
  563. package/dist/client/assets/message-markup-DgFSyb3f.js +0 -15
  564. package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
  565. package/dist/client/assets/profile-C3KgiZvc.js +0 -1
  566. package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
  567. package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
  568. package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
  569. package/dist/client/assets/right-B9OUA6Ho.js +0 -1
  570. package/dist/client/assets/right-BDQnjetX.js +0 -1
  571. package/dist/client/assets/right-BUbKHmRH.js +0 -1
  572. package/dist/client/assets/right-Ci2IcD4s.js +0 -1
  573. package/dist/client/assets/right-CmCce3e5.js +0 -1
  574. package/dist/client/assets/right-D7w0zM5a.js +0 -1
  575. package/dist/client/assets/right-DIoON_bv.js +0 -1
  576. package/dist/client/assets/right-E0Jr3VN5.js +0 -1
  577. package/dist/client/assets/right-lCdAk9dW.js +0 -1
  578. package/dist/client/assets/router-BKiMcYa7.js +0 -1
  579. package/dist/client/assets/runtime-picker-DdsttHHc.js +0 -1
  580. package/dist/client/assets/scout-voice-DOQ_B77g.js +0 -1
  581. package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
  582. package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
  583. package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
  584. package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
  585. package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
  586. package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
  587. package/dist/drizzle/meta/0000_snapshot.json +0 -4575
  588. package/dist/drizzle/meta/0001_snapshot.json +0 -4624
  589. package/dist/drizzle/meta/0002_snapshot.json +0 -4631
  590. package/dist/drizzle/meta/0003_snapshot.json +0 -4952
  591. package/dist/drizzle/meta/0004_snapshot.json +0 -5235
  592. package/dist/drizzle/meta/0005_snapshot.json +0 -5599
  593. package/dist/drizzle/meta/0006_snapshot.json +0 -5606
  594. package/dist/drizzle/meta/0007_snapshot.json +0 -5767
  595. package/dist/drizzle/meta/0008_snapshot.json +0 -5774
  596. package/dist/drizzle/meta/0009_snapshot.json +0 -6262
  597. package/dist/drizzle/meta/0010_snapshot.json +0 -6286
  598. package/dist/drizzle/meta/0011_snapshot.json +0 -6337
  599. package/dist/drizzle/meta/0012_snapshot.json +0 -6458
  600. package/dist/drizzle/meta/0013_snapshot.json +0 -6465
  601. package/dist/drizzle/meta/0014_snapshot.json +0 -6503
  602. package/dist/drizzle/meta/0015_snapshot.json +0 -6596
  603. package/dist/drizzle/meta/0016_snapshot.json +0 -6611
  604. package/dist/drizzle/meta/0017_snapshot.json +0 -6785
  605. package/dist/drizzle/meta/0018_snapshot.json +0 -6804
@@ -1 +0,0 @@
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};
@@ -1,2 +0,0 @@
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};
@@ -1,12 +0,0 @@
1
- import{r as h,j as t}from"./index-C8uS5szO.js";import{f as Ne}from"./bash-format-BRV5C6Gv.js";import{j as Ls,p as Ye,k as Es}from"./tail-display-DHSNmvor.js";import{l as Rs}from"./lane-edit-display-BjdT9oZl.js";import{f as Ps}from"./lane-tool-detail-Czggx8oM.js";import{useLaneToolHoverCard as Os}from"./LaneToolHoverCard-C6YehJqD.js";import{e as As,L as Be,g as Is,h as Bs,j as _e,o as _s,a as Fe,f as Fs,k as Ds,m as we,b as Xe,l as Ze}from"./lane-observe-BD21P8BB.js";import{b as Ws}from"./lane-ask-display-B6iCAVcd.js";import{a as zs}from"./colors-CFlbwC25.js";import{a as Ce}from"./api-CaROe5_H.js";import{r as Qe}from"./mentions-Ctw1ECUC.js";import{a as Ms,g as es,t as Hs,b as Gs,d as qs,n as De}from"./time-Dhsh_2EG.js";import{M as ss}from"./message-markup-DgFSyb3f.js";import{q as Us}from"./terminal-takeover-BlpxpvSp.js";import{C as We,D as Vs,E as Ks}from"./NewChatComposer-JjLbm3W2.js";import{u as Se}from"./Provider-5Hotn7NQ.js";import{o as Js}from"./openContent-C6XO6kr5.js";import{O as Ys}from"./ObservedTopologyPanel-DkEkQzo-.js";import{M as Xs}from"./runtime-picker-DdsttHHc.js";import"./index-C5cX8dkl.js";import{ObserveReasoningDisclosure as Zs,ObserveStreamCursor as ze}from"./ObserveTextFlow-ET0dD1wO.js";import{SessionObserveReceiptView as Qs}from"./SessionObserveEvidence-Drv-D8Oh.js";import{M as et}from"./message-circle-CSiJj6yo.js";import{W as st}from"./wrench-BsMTSeji.js";import{E as tt}from"./external-link-RT4Ph-6-.js";import{C as ts}from"./chevron-up-BHOEgHcn.js";import{C as ns}from"./chevron-down-B5eMsn5c.js";import{c as nt}from"./createLucideIcon-DkjnzvcJ.js";const at=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],rt=nt("tag",at),Te=new Set(["bash","shell","terminal","exec","run","command","exec_command","shell_command","local_shell","container_exec","container.exec"]);function _(e){return(e??"").trim()}function V(e){return[e.kind,_(e.tool),_(e.arg),_(e.text),_(e.detail)].join("|")}function ot(e){if(e.kind!=="tool"||!e.tool||e.result)return!1;const s=_(e.arg).toLowerCase();return s==="started"||s.length>0&&s!=="completed"}function lt(e){return e.kind!=="tool"||!e.tool?!1:_(e.arg).toLowerCase()==="completed"||!!e.result?.outcome}const as=/^permission requested · ([A-Za-z][\w-]*)$/i,rs=/^permission ([a-z_]+) · ([A-Za-z][\w-]*)$/i;function $e(e){return e.kind==="system"&&as.test(e.text.trim())}function Le(e){return e.kind==="system"&&rs.test(e.text.trim())}function fe(e){const s=e.text.trim(),n=s.match(as);if(n?.[1])return n[1];const a=s.match(rs);return a?.[2]?a[2]:null}function la(e){const s=new Set;for(const n of e)if($e(n)){const a=fe(n);a&&s.add(a)}else if(Le(n)){const a=fe(n);a&&s.delete(a)}return s.size>0}function it(e,s){const n=e.text.trim();return{...e,text:s>1?`${n}
2
-
3
- (${s} reasoning updates)`:n}}function ct(e,s){const n=s.tool??e.tool,a=s.result?.outcome,r=e.arg&&e.arg!=="started"&&e.arg!=="completed"?e.arg:s.arg&&s.arg!=="completed"?s.arg:void 0,o=s.stream?.join(`
4
- `)??"",l=r?o.trim()?`${n} · ${r} · ${o}`:a?`${n} · ${r} · ${a}`:`${n} · ${r}`:s.text.trim()||(a?`${n} completed · ${a}`:`${n} completed`);return{...s,tool:n,arg:r??"completed",text:l,stream:s.stream??e.stream,diff:s.diff??e.diff,detail:s.detail??e.detail,live:s.live??e.live}}function ut(e){if(e.kind!=="tool"||!e.tool)return!1;const s=_(e.tool).toLowerCase();if(!Te.has(s))return!1;const n=_(e.arg);return n.length>0&&n!=="started"&&n!=="completed"}function dt(e){if(e.kind!=="tool")return!1;const s=_(e.tool).toLowerCase();return s==="res"?!!(_(e.arg)||(e.stream?.length??0)>0):Te.has(s)?(e.stream?.length??0)>0:!1}function mt(e){return(e.stream?.length??0)>0?e.stream.join(`
5
- `):_(e.tool).toLowerCase()==="res"?e.arg??"":""}function ht(e,s){const n=mt(s),a=_(e.arg),r=e.tool??s.tool,o=n.trim()?`${r} · ${a} · ${n}`:e.text;return{...e,id:s.id,t:s.t,at:s.at,result:s.result??e.result,stream:n.trim()?[n]:s.stream??e.stream,diff:s.diff??e.diff,detail:s.detail??e.detail,text:o,live:s.live??e.live}}function Me(e){if(e.kind!=="tool"||e.diff||(e.stream?.length??0)>0)return!1;const s=(e.tool??"").trim(),n=(e.arg??"").trim();if(!s||n==="started"||n==="completed")return!1;const a=e.result?.outcome;if(a!=null&&a!=="success"&&a!==0||e.result&&Object.keys(e.result).length>1)return!1;const r=s.toLowerCase();if(Te.has(r)){if(!n||n.startsWith("{")||n.startsWith("["))return!1;const{dir:o,spans:l}=Ne(n);if(o)return!1;const c=l.filter(u=>u.tier==="prog");return c.length===1&&l.length===1&&c[0].text.length<=64}return n&&n!==s||/\s/u.test(s)?!1:s.length<=64}function ft(e){return Math.max(1,e.repeatCount)}function bt(e){const s=e.result?.outcome;if(s==null)return!1;if(typeof s=="number")return s!==0;const n=s.trim().toLowerCase();return n.length>0&&n!=="0"&&n!=="ok"&&n!=="success"&&n!=="succeeded"&&n!=="completed"}function pt(e){if(e.live||e.kind==="boot")return!0;if(e.kind==="tool")return!!e.diff||bt(e);if(e.kind==="note"){const s=e.text.trim().toLowerCase();return s==="turn started"||s==="turn complete"||s==="turn ended"||s==="[turn_started]"||s==="[turn_ended]"||/^turn \d+\b/u.test(s)}if(e.kind==="system"){const s=e.text.trim();return $e(e)||Le(e)||/\b(?:approval|permission|denied|failed|failure|error|exception|aborted|blocked)\b/i.test(s)}return!1}function vt(e){return e.kind==="ask"||e.kind==="message"?!1:!pt(e)}function le(e,s,n=`${s}s`){return`${e} ${e===1?s:n}`}function xt(e){const s={totalCount:0,toolCount:0,thinkCount:0,noteCount:0,systemCount:0};for(const a of e){const r=ft(a);switch(s.totalCount+=r,a.event.kind){case"tool":s.toolCount+=r;break;case"think":s.thinkCount+=r;break;case"note":s.noteCount+=r;break;case"system":case"boot":s.systemCount+=r;break}}const n=[s.toolCount>0?le(s.toolCount,"tool"):null,s.thinkCount>0?le(s.thinkCount,"reasoning update"):null,s.noteCount>0?le(s.noteCount,"turn marker"):null,s.systemCount>0?le(s.systemCount,"system event"):null].filter(a=>!!a);return{...s,labels:n}}function gt(e){return e.labels.length>0?e.labels.join(" · "):le(e.totalCount,"technical event")}function jt(e){const s=e[0].event,n=e[e.length-1].event,a=xt(e),r=gt(a);return{event:{...n,id:`technical-rollup:${s.id}:${n.id}:${a.totalCount}`,kind:"note",text:r,detail:r,tool:void 0,arg:void 0,diff:void 0,result:void 0,stream:void 0,answer:void 0,answerT:void 0,to:void 0,live:e.some(o=>o.event.live)},repeatCount:1,technicalSummary:a,technicalSourceRows:e}}function kt(e){const s=[];let n=[];const a=()=>{n.length!==0&&(s.push(jt(n)),n=[])};for(const r of e){if(vt(r.event)){n.push(r);continue}a(),s.push(r)}return a(),s}function yt(e){const s=[];for(let n=0;n<e.length;n+=1){const a=e[n];if(!a)continue;const r=e[n+1];if(r&&$e(a)&&Le(r)&&_(fe(a)).toLowerCase()===_(fe(r)).toLowerCase()){const o={...r,live:r.live??a.live},l=V(o),c=s[s.length-1];c&&V(c.event)===l?(c.repeatCount+=1,c.event=o):s.push({event:o,repeatCount:1}),n+=1;continue}if(r&&ot(a)&&lt(r)&&_(a.tool).toLowerCase()===_(r.tool).toLowerCase()){const o=ct(a,r),l=V(o),c=s[s.length-1];c&&V(c.event)===l?(c.repeatCount+=1,c.event=o):s.push({event:o,repeatCount:1}),n+=1;continue}if(r&&ut(a)&&dt(r)&&(a.stream?.length??0)===0){const o=ht(a,r),l=V(o),c=s[s.length-1];c&&V(c.event)===l?(c.repeatCount+=1,c.event=o):s.push({event:o,repeatCount:1}),n+=1;continue}if(a.kind==="think"){let o=a,l=1;for(;e[n+l]?.kind==="think";){const u=e[n+l];if(!u)break;o=u,l+=1}const c=it(o,l);s.push({event:c,repeatCount:l}),n+=l-1;continue}if(a.kind!=="message"&&a.kind!=="ask"){const o=V(a),l=s[s.length-1];if(l&&V(l.event)===o){l.repeatCount+=1,l.event=a;continue}}s.push({event:a,repeatCount:1})}return s}function Nt(e){return e.source==="broker"||e.source==="unavailable"||!Number.isFinite(e.eventCount)?0:Math.max(0,Math.floor(e.eventCount))}function wt(e){return e===0?"No trace events":`${e} event${e===1?"":"s"}`}function os(e){const s=Nt(e),n=wt(s);return e.source==="unavailable"?{label:"Trace unavailable",detail:"The session is known to the broker, but no readable event trace was captured.",tone:"unavailable",replayable:!1,traceEventCount:0,eventCountLabel:n,receiptOnly:!1}:e.source==="broker"?{label:"Session setup receipts",detail:"The broker recorded session setup, but no observed trace activity is available.",tone:"reconstructed",replayable:!1,traceEventCount:0,eventCountLabel:n,receiptOnly:!0}:e.fidelity==="timestamped"&&e.source==="live"&&e.live&&s>0?{label:"Live observed events",detail:"New timestamped events will appear here while the session runs.",tone:"live",replayable:s>1,traceEventCount:s,eventCountLabel:n,receiptOnly:!1}:e.fidelity==="timestamped"&&s===0?{label:"Attached · no trace events",detail:"This worker is attached but is not emitting trace events.",tone:"reconstructed",replayable:!1,traceEventCount:0,eventCountLabel:n,receiptOnly:!1}:e.fidelity==="timestamped"?{label:"Recorded event history",detail:"This timeline is replayed from timestamped session history.",tone:"recorded",replayable:s>1,traceEventCount:s,eventCountLabel:n,receiptOnly:!1}:{label:"Reconstructed session evidence",detail:"Lifecycle and session attachment are available; fine-grained activity may be missing.",tone:"reconstructed",replayable:!1,traceEventCount:s,eventCountLabel:n,receiptOnly:!1}}async function Ct(e){await Ce("/api/local-path/reveal",{method:"POST",body:JSON.stringify({path:e.path,...e.basePath?{basePath:e.basePath}:{},...e.agentId?{agentId:e.agentId}:{},...e.sessionId?{sessionId:e.sessionId}:{}})})}const ls={think:"var(--dim)",tool:"var(--accent)",ask:"var(--amber)",message:"var(--muted)",note:"var(--green)",system:"var(--dim)",boot:"var(--dim)"},St={read:"◎",edit:"✎",bash:"$",grep:"⌕",write:"✎",think:"∿"},Tt=20,is=new Intl.NumberFormat("en-US"),$t=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function be(e){if(!Number.isFinite(e)||e<=0)return"0s";const s=Math.floor(e);if(s<60)return`${s}s`;if(s<3600)return`${Math.floor(s/60)}m`;const n=Math.floor(s/3600),a=Math.floor(s%3600/60);return a>0?`${n}h${a}m`:`${n}h`}function Lt(e){return es(e*1e3)||"0:00"}function Et(e){return!Number.isFinite(e)||e<=0?"0s":be(e)}function pe(e,s){return _s(e,s)}function Rt(e,s,n,a=!1){const r=pe(e,s);return r!==null?a?{label:Fs(r,n),title:Fe(r)}:{label:Hs(r,n),title:Fe(r)}:a?{label:""}:{label:be(e.t)}}function Pt(e,s){const n=pe(e,s),a=Lt(e.t);return n!==null?{label:qs(n)||be(e.t),title:`${Gs(n)} · elapsed ${a}`}:{label:be(e.t),title:`Elapsed ${a} from session start`}}function He(e,s){return e>=Math.max(0,s-Tt)}function re(e){return typeof e!="number"||!Number.isFinite(e)?null:is.format(e)}function K(e){return typeof e!="number"||!Number.isFinite(e)?"—":Math.abs(e)<1e3?is.format(e):$t.format(e).toLowerCase()}function Ot(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const s=Math.round(e),n=Math.floor(s/3600),a=Math.floor(s%3600/60),r=s%60;return n>0?`${n}h ${a}m`:a>=10||r===0?`${a}m`:`${a}m ${r}s`}function Ge(e){return!!e&&Object.keys(e).length>0}function ge(e){return e.filter(s=>!!s)}function ye(e){const n=e.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return n[n.length-1]??e}function At(e){Ct(e).catch(s=>{console.warn("Failed to reveal local path",s)})}function J({text:e,label:s="Copy",className:n}){const[a,r]=h.useState(!1),o=h.useRef(null);h.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const l=h.useCallback(c=>{c.preventDefault(),c.stopPropagation();const u=e,b=()=>{r(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r(!1),1100)};navigator.clipboard?.writeText?navigator.clipboard.writeText(u).then(b).catch(()=>{qe(u),b()}):(qe(u),b())},[e]);return t.jsx("button",{type:"button",className:`s-observe-copy-btn${a?" s-observe-copy-btn--copied":""}${n?` ${n}`:""}`,onClick:l,"aria-label":s,title:a?"Copied":s,children:a?t.jsx("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("path",{d:"M2 5.5l2.4 2.4L9 3.4"})}):t.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round","aria-hidden":"true",children:[t.jsx("rect",{x:"3.4",y:"3.4",width:"6.1",height:"6.1",rx:"1.2"}),t.jsx("path",{d:"M7.6 3.4V2.2a.8.8 0 0 0-.8-.8H2.2a.8.8 0 0 0-.8.8v4.6a.8.8 0 0 0 .8.8h1.2"})]})})}function qe(e){try{const s=document.createElement("textarea");s.value=e,s.style.position="fixed",s.style.opacity="0",s.style.pointerEvents="none",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}catch(s){console.warn("Clipboard copy failed",s)}}function It(e){const s=[],n=[e.tool,e.arg].filter(Boolean).join(" ");return n&&s.push(n),e.result&&s.push(Object.entries(e.result).map(([a,r])=>`${a}: ${r}`).join(" · ")),e.diff&&(s.push(`+${e.diff.add}${e.diff.del>0?` -${e.diff.del}`:""}`),e.diff.preview&&s.push(e.diff.preview)),e.stream&&e.stream.length>0&&s.push(e.stream.join(`
6
- `)),s.join(`
7
- `)}function cs({expanded:e,onToggle:s,label:n}){const a=e?"less":n??"more";return t.jsxs("button",{type:"button",className:"s-observe-lane-expand",onClick:s,"aria-expanded":e,"aria-label":e?"Show less":"Show more",children:[e?t.jsx(ts,{size:11,strokeWidth:2,"aria-hidden":"true"}):t.jsx(ns,{size:11,strokeWidth:2,"aria-hidden":"true"}),t.jsx("span",{children:a})]})}function us({text:e,className:s,laneMode:n=!1,live:a=!1,renderExpanded:r,renderCollapsed:o}){const[l,c]=h.useState(!1),u=e.trim();if(!n)return t.jsxs("div",{className:s,children:[r?r(u):u,a&&t.jsx(ze,{text:u})]});const b=we(u),m=Xe(u),j=l?r?r(u):u:o?o(m):m;return t.jsx("div",{className:`s-observe-lane-expandable${l?" s-observe-lane-expandable--open":""}`,children:t.jsxs("div",{className:`${s} s-observe-lane-expandable-body`,children:[t.jsxs("span",{className:"s-observe-lane-expandable-text",children:[j,a&&t.jsx(ze,{text:u})]}),b&&t.jsx(cs,{expanded:l,onToggle:()=>c(f=>!f)})]})})}function Bt({event:e,laneMode:s=!1}){const n=e.text??"";return t.jsx(Zs,{text:n,live:!!e.live,compact:s,copyControl:s?void 0:t.jsx(J,{text:n,label:"Copy reasoning",className:"s-observe-copy-btn--inline"})})}function _t({preview:e}){const s=e.split(`
8
- `);return t.jsx("pre",{className:"s-observe-tool-diff-preview",children:s.map((n,a)=>{const r=n[0],o=r==="+"?"add":r==="-"||r==="−"?"del":n.startsWith("@@")?"hunk":"ctx";return t.jsxs("span",{className:`s-observe-diff-line s-observe-diff-line--${o}`,children:[n,a<s.length-1?`
9
- `:null]},a)})})}function Ft(e){const s=(e??"").toLowerCase();return s==="shell"?"bash":s}function Dt(e){const s=e.arg?.trim();if(!(!s||s==="started"||s==="completed"))return s}const Wt={bash:["bash","shell","terminal","exec","run","command","exec_command","shell_command","local_shell","container_exec","container.exec"],read:["read","view","cat","readfile","open","open_file"],file:["write","writefile","create","edit","multiedit","str_replace","strreplace","str_replace_editor","apply_patch","applypatch","patch","patch_apply","update","delete"],search:["grep","glob","search","rg","ripgrep","find","codebase_search","file_search"],fetch:["webfetch","web_fetch","fetch","websearch","web_search","browse","url"],agent:["agent","task","dispatch","subagent"],generic:[]},zt={bash:"$",read:"◎",file:"✎",search:"⌕",fetch:"⤓",agent:"◇",generic:"▸"};function Mt(e){const s=(e??"").trim().toLowerCase();if(!s)return"generic";for(const n of["bash","read","file","search","fetch","agent"])if(Wt[n].includes(s))return n;return"generic"}function ds(e){return!e||e==="started"||e==="completed"}function Ht(e){const s=e.trim().replace(/\/+$/u,""),n=s.lastIndexOf("/");return n<0?{dir:"",base:s}:{dir:s.slice(0,n+1),base:s.slice(n+1)}}function Gt(e,s=2){const n=e.split("/").filter(Boolean);return n.length===0?"":n.length<=s?`${n.join("/")}/`:`…/${n.slice(-s).join("/")}/`}function qt(e){if(!e)return null;for(const s of["matches","count","results","hits"]){const n=e[s];if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"&&/^\d+$/u.test(n.trim()))return Number(n.trim())}return null}function Ut(e){try{const s=new URL(e);return{host:s.host,path:s.pathname+s.search}}catch{return{host:e,path:""}}}function Vt(e){return e.length>=3&&/^(?:ba|z)?sh$/u.test(e[0])&&/^-[a-z]*c$/u.test(e[1])?e.slice(2).join(" "):e.join(" ")}function oe(e,s){const n=e.trim();if(!n.startsWith("{")&&!n.startsWith("["))return null;try{const a=JSON.parse(n);if(a&&typeof a=="object"&&!Array.isArray(a)){const r=a;for(const o of s){const l=r[o];if(typeof l=="string"&&l.trim())return l;if(Array.isArray(l)&&l.every(c=>typeof c=="string"))return Vt(l)}}}catch{}for(const a of s){const r=n.match(new RegExp(`"${a}"\\s*:\\s*"((?:[^"\\\\]|\\\\.)*)`,"u"));if(r?.[1])try{return JSON.parse(`"${r[1]}"`)}catch{return r[1]}}return null}function ms(e){const s=e.match(/\*\*\*\s+(?:Update|Add|Delete|Move|Rename)\s+File:\s*(.+)/u);return s&&s[1].trim().split(/\s*(?:->|=>)\s*/u)[0]?.trim()||null}function hs(e,s){const n=s?.trim();if(!n)return"";switch(e){case"bash":return oe(n,["cmd","command","script","input","code"])??n;case"file":return n.includes("*** ")?ms(n)??n:oe(n,["file_path","path","filename","file"])??n;case"read":return oe(n,["file_path","path","filename","file"])??n;case"search":return oe(n,["pattern","query","glob","regex","q","search"])??n;case"fetch":return oe(n,["url","href","uri"])??n;default:return n}}function Ue({path:e,tone:s}){const n=Rs(e),{dir:a,base:r}=Ht(n);return t.jsxs("span",{className:"s-observe-tool-path",title:e,children:[a&&t.jsx("span",{className:"s-observe-tool-path-dir",children:Gt(a)}),t.jsx("span",{className:`s-observe-tool-path-base s-observe-tool-path-base--${s}`,children:r})]})}function Kt({path:e}){const s=e.lastIndexOf("/"),n=s>=0?e.slice(0,s+1):"",a=s>=0?e.slice(s+1):e;return t.jsxs("span",{className:"s-observe-bash-dir",children:[n&&t.jsx("span",{className:"s-observe-bash-dir-prefix",children:n}),a]})}function Jt({command:e,title:s,outcome:n,outputPreview:a,cwd:r,powerline:o}){const{dir:l,spans:c}=Ne(e,{cwd:r,powerline:o});return t.jsxs("span",{className:"s-observe-bash",title:s??e,children:[l&&t.jsxs("span",{className:"s-observe-bash-pl",children:[t.jsx("span",{className:"s-observe-bash-seg",children:l}),t.jsx("span",{className:"s-observe-bash-sep","aria-hidden":!0})]}),t.jsx("span",{className:"s-observe-bash-prompt","aria-hidden":!0,children:"❯"}),c.length>0?t.jsx("span",{className:"s-observe-bash-cmd",children:c.map((u,b)=>{const m=b>0?" ":"";return u.tier==="dir"?t.jsxs("span",{children:[m,t.jsx(Kt,{path:u.text})]},b):t.jsxs("span",{className:`s-observe-bash-${u.tier}${u.known?" s-observe-bash-prog--known":""}${u.flag?" s-observe-bash-flag":""}`,children:[m,u.text]},b)})}):!l&&t.jsx("span",{className:"s-observe-bash-arg",children:"shell"}),a&&t.jsxs("span",{className:"s-observe-bash-out",title:a,children:[" → ",Ze(a,88)]}),n&&t.jsx("span",{className:"s-observe-bash-ok",children:n})]})}function Yt({family:e,event:s}){const n=hs(e,s.arg),a=n.startsWith("{")||n.startsWith("["),r=!!n&&!ds(n)&&!a;switch(e){case"read":return r?t.jsx(Ue,{path:n,tone:"read"}):t.jsx("span",{className:"s-observe-tool-cmd-name",children:"read"});case"file":{const o=r&&n!=="patch"?n:ms(s.detail??"")??"";return o?t.jsx(Ue,{path:o,tone:"file"}):t.jsx("span",{className:"s-observe-tool-cmd-name",children:s.tool??"edit"})}case"search":{if(!r)return t.jsx("span",{className:"s-observe-tool-cmd-name",children:"search"});const o=qt(s.result);return t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"s-observe-tool-needle",children:[t.jsx("span",{className:"s-observe-tool-needle-q",children:'"'}),n,t.jsx("span",{className:"s-observe-tool-needle-q",children:'"'})]}),o!=null&&t.jsxs("span",{className:"s-observe-tool-count",children:["· ",o," ",o===1?"match":"matches"]})]})}case"fetch":{if(!r)return t.jsx("span",{className:"s-observe-tool-cmd-name",children:"fetch"});const{host:o,path:l}=Ut(n);return t.jsxs("span",{className:"s-observe-tool-url",title:n,children:[t.jsx("span",{className:"s-observe-tool-host",children:o}),l&&l!=="/"&&t.jsx("span",{className:"s-observe-tool-host-path",children:Ze(l,40)})]})}case"agent":return t.jsx("span",{className:"s-observe-tool-agent-name",children:r?n:s.tool??"agent"});default:return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"s-observe-tool-cmd-name",children:s.tool}),r?t.jsxs(t.Fragment,{children:[" ",t.jsx("span",{className:"s-observe-tool-cmd-arg",children:n})]}):null]})}}function Xt({event:e,laneMode:s=!1,simple:n=!1,wallLabel:a,wallTitle:r}){const[o,l]=h.useState(!1),c=Mt(e.tool),u=s?zt[c]:St[Ft(e.tool)]??"▸",b=s&&c==="bash",m=b?hs("bash",e.arg):"",j=!!m&&!ds(m)&&!m.startsWith("{")&&!m.startsWith("["),f=b&&!n,i=j?Ne(m).spans.find(S=>S.tier==="prog")?.text??m:"",g=Dt(e)??e.arg?.trim()??"",O=typeof e.result?.outcome=="string"?e.result.outcome.trim():typeof e.result?.outcome=="number"?String(e.result.outcome):void 0,A=s?void 0:e.stream?.[0]?.trim()||void 0,I=!!(O&&O!=="success"),B=!!(I||e.diff||e.stream),$=!s&&(B||we(g,120,2)),D=!$||o,W=!s&&$&&!o&&e.stream?Xe(e.stream.join(`
10
- `),180,2):null;return t.jsxs("div",{className:`s-observe-tool s-observe-block${s?` s-observe-tool--lane s-observe-tool--fam-${c}`:""}${s&&n?" s-observe-tool--simple":""}`,children:[t.jsxs("div",{className:`s-observe-tool-header${B&&!s?" s-observe-tool-header--has-body":""}`,children:[(!b||n)&&t.jsx("span",{className:"s-observe-tool-glyph",children:u}),t.jsxs("span",{className:"s-observe-tool-cmd",title:s&&!f?b&&j?m:`${e.tool??""} ${g}`.trim()||void 0:void 0,children:[f?t.jsx(Jt,{command:j?m:"",title:j?m:void 0,outputPreview:A}):b&&n?t.jsx("span",{className:"s-observe-tool-cmd-name",children:i||"shell"}):s?t.jsx(Yt,{family:c,event:e}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"s-observe-tool-cmd-name",children:e.tool}),g?t.jsxs(t.Fragment,{children:[" ",t.jsx("span",{className:"s-observe-tool-cmd-arg",children:g})]}):null]}),O==="success"&&t.jsx("span",{className:"s-observe-tool-outcome s-observe-tool-outcome--success",children:"ok"}),!s&&e.diff&&t.jsxs("span",{className:"s-observe-tool-diff-inline","aria-label":`${e.diff.add} additions, ${e.diff.del} deletions`,children:[t.jsxs("span",{className:"s-observe-tool-diff-add",children:["+",e.diff.add]}),t.jsxs("span",{className:"s-observe-tool-diff-del",children:["−",e.diff.del]})]})]}),$&&t.jsx(cs,{expanded:o,onToggle:()=>l(S=>!S),label:e.stream?"output":"details"})]}),W&&t.jsx("pre",{className:"s-observe-tool-stream-preview",children:W}),I&&(s||D)&&e.result&&t.jsx("div",{className:"s-observe-tool-result",children:Object.entries(e.result).map(([S,p])=>`${S}: ${p}`).join(" · ")}),!s&&e.diff&&D&&t.jsxs("div",{className:"s-observe-tool-diff",children:[t.jsxs("div",{className:"s-observe-tool-diff-stats",children:[t.jsxs("span",{className:"s-observe-tool-diff-add",children:["+",e.diff.add]}),e.diff.del>0&&t.jsxs(t.Fragment,{children:[" ",t.jsxs("span",{className:"s-observe-tool-diff-del",children:["−",e.diff.del]})]})]}),t.jsx(_t,{preview:e.diff.preview})]}),!s&&e.stream&&D&&t.jsx("pre",{className:"s-observe-tool-stream",children:e.stream.join(`
11
- `)}),!s&&t.jsx(J,{text:It(e),label:"Copy tool call"})]})}function Zt({event:e,laneMode:s=!1,conversationMode:n=!1,operatorName:a="you",wallLabel:r,wallTitle:o}){const l=Ws(e),c=l.preview===l.title?"":l.preview,u=s||n,b=(a.trim()[0]??"y").toUpperCase();return t.jsxs("div",{className:["s-observe-ask","s-observe-block",s&&"s-observe-ask--lane",n&&"s-observe-ask--conversation"].filter(Boolean).join(" "),children:[u?t.jsxs("div",{className:"s-observe-ask-head",children:[t.jsx("span",{className:"s-observe-ask-avatar",style:{background:zs(a)},"aria-hidden":"true",children:b}),t.jsx("span",{className:"s-observe-ask-author",children:a}),r?t.jsx("span",{className:"s-observe-ask-time",title:o,children:r}):null]}):t.jsx("div",{className:"s-observe-ask-label",children:l.label}),l.contextTags.length>0&&t.jsx("div",{className:"s-observe-ask-tags","aria-label":"Attached context",children:l.contextTags.map(m=>t.jsxs("span",{className:"s-observe-ask-tag",title:m.raw,children:[t.jsx(rt,{size:10,strokeWidth:2,"aria-hidden":"true"}),t.jsx("span",{className:"s-observe-ask-tag-name",children:m.name}),m.detail?t.jsx("span",{className:"s-observe-ask-tag-detail",children:m.detail}):null]},m.name))}),t.jsx("div",{className:"s-observe-ask-title",children:l.title}),c?t.jsx(us,{text:c,className:"s-observe-ask-text",laneMode:s,live:e.live,renderCollapsed:m=>Qe(m),renderExpanded:m=>t.jsx(ss,{text:m})}):e.live?t.jsx("span",{className:"s-observe-cursor"}):null,l.answer&&(!s&&!n||we(l.answer.text))&&t.jsxs("div",{className:"s-observe-ask-answer",children:[t.jsxs("span",{className:"s-observe-ask-answer-meta",children:["↳ ",l.answer.label]}),t.jsx("div",{className:"s-observe-ask-answer-text",children:l.answer.text})]}),!s&&!n&&t.jsx(J,{text:l.copyText,label:"Copy request"})]})}function Qt(e){const s=e.to?.trim();return s?s==="human"?"→ you":`→ ${s}`:null}function fs(e){return e.kind==="message"&&(e.text??"").trim().toLowerCase()==="[thinking]"}function en({event:e,laneMode:s=!1,conversationMode:n=!1,assistantName:a}){const r=e.text??"",o=(s||n)&&fs(e),l=o?"Thinking...":r,c=o?"Agent thinking":n?a?.trim()||"Agent":Qt(e);return t.jsxs("div",{className:["s-observe-block",s&&"s-observe-message--lane",n&&"s-observe-message--conversation",o&&"s-observe-message--thinking",e.live&&"s-observe-message--streaming"].filter(Boolean).join(" "),"aria-busy":e.live||void 0,children:[c?t.jsx("div",{className:"s-observe-message-label",children:c}):null,t.jsx(us,{text:l,className:"s-observe-message-text",laneMode:s||n,live:e.live,renderCollapsed:u=>Qe(u),renderExpanded:u=>t.jsx(ss,{text:u})}),!s&&!n&&t.jsx(J,{text:r,label:"Copy message"})]})}function sn({summary:e,expanded:s=!1,onToggle:n}){const a=e.totalCount===1?"technical event":"technical events",r=t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"s-observe-tech-summary-count",children:[e.totalCount," ",a]}),e.labels.length>0?t.jsx("span",{className:"s-observe-tech-summary-detail",children:e.labels.join(" · ")}):null,n?s?t.jsx(ts,{size:12,strokeWidth:1.8,className:"s-observe-tech-summary-chevron","aria-hidden":!0}):t.jsx(ns,{size:12,strokeWidth:1.8,className:"s-observe-tech-summary-chevron","aria-hidden":!0}):null]});return n?t.jsx("button",{type:"button",className:`s-observe-tech-summary s-observe-tech-summary--toggle s-observe-block s-observe-block--inline${s?" is-expanded":""}`,onClick:o=>{o.stopPropagation(),n()},"aria-expanded":s,"aria-label":s?`Collapse ${e.totalCount} ${a}`:`Expand ${e.totalCount} ${a}`,children:r}):t.jsx("div",{className:"s-observe-tech-summary s-observe-block s-observe-block--inline",children:r})}function tn({presentation:e,onChange:s}){return t.jsxs("div",{className:"s-observe-presentation-toggle",role:"group","aria-label":"Session presentation",children:[t.jsx("button",{type:"button",className:"s-observe-presentation-toggle-btn","aria-pressed":e==="conversation",onClick:()=>s("conversation"),children:"Conversation"}),t.jsx("button",{type:"button",className:"s-observe-presentation-toggle-btn","aria-pressed":e==="timeline",onClick:()=>s("timeline"),children:"Trace"})]})}function nn({collapseTechnicalEvents:e,onChange:s}){if(!s)return null;const n=e?"Concise":"Details",a=e?"Show detailed trace events":"Show concise trace summaries",r=e?et:st;return t.jsxs("label",{className:`s-observe-lane-trace-mode${e?" s-observe-lane-trace-mode--concise":" s-observe-lane-trace-mode--details"}`,title:a,children:[t.jsx("input",{type:"checkbox",checked:e,onChange:o=>s(o.currentTarget.checked),"aria-label":a}),t.jsx(r,{size:12,strokeWidth:1.8,"aria-hidden":"true"}),t.jsx("span",{children:n})]})}function an(e,s){return e?.trim()?s?!/^[a-z0-9._-]+ · [a-z0-9._-]+$/i.test(e.trim()):!0:!1}const rn={turn_ended:"Turn complete",turn_started:"Turn started"};function on(e){const s=e.trim(),a=s.match(/^\[(.+)\]$/)?.[1]??s;return rn[a]??a.replace(/_/g," ")}function ln({turn:e,model:s}){return t.jsxs("div",{className:"s-observe-grok-turn s-observe-block s-observe-block--inline",children:[t.jsxs("span",{className:"s-observe-grok-turn-num",children:["turn ",e]}),s?t.jsx("span",{className:"s-observe-grok-turn-model",children:s}):null]})}function cn({tool:e,decision:s}){return t.jsxs("div",{className:"s-observe-grok-permission s-observe-block s-observe-block--inline",children:[t.jsx("span",{className:`s-observe-grok-permission-decision is-${s}`,children:s}),t.jsx("span",{className:"s-observe-grok-permission-tool",children:e})]})}function un({phase:e}){return t.jsx("div",{className:"s-observe-grok-phase s-observe-block s-observe-block--inline",children:t.jsx("span",{className:"s-observe-grok-phase-label",children:Es(e)})})}function dn({event:e,laneMode:s=!1}){if(s){const n=Ye(e.text??"");return n?.kind==="turn"&&typeof n.turn=="number"?t.jsx(ln,{turn:n.turn,model:n.model}):t.jsx("div",{className:"s-observe-note s-observe-block s-observe-block--inline s-observe-note--lane",children:t.jsx("span",{className:"s-observe-note-text",children:on(e.text)})})}return t.jsxs("div",{className:"s-observe-note s-observe-block s-observe-block--inline",children:[t.jsx("span",{className:"s-observe-note-icon","aria-hidden":"true",children:"✓"}),t.jsx("span",{className:"s-observe-note-text",children:e.text}),t.jsx(J,{text:e.text??"",label:"Copy note"})]})}function mn({event:e,laneMode:s=!1}){const n=s?Ye(e.text??""):null;if(n?.kind==="permission"&&n.tool&&n.decision)return t.jsx(cn,{tool:n.tool,decision:n.decision});if(n?.kind==="phase"&&n.phase)return t.jsx(un,{phase:n.phase});const a=an(e.detail,s),r=a&&e.detail?`${e.text}
12
- ${e.detail}`:e.text??"";return t.jsxs("div",{className:`s-observe-system s-observe-block${s?" s-observe-system--lane":""}`,children:[t.jsxs("div",{className:"s-observe-system-line",children:[!s&&t.jsx("span",{className:"s-observe-system-arrow","aria-hidden":"true",children:"▸ "}),t.jsx("span",{className:"s-observe-system-text",children:e.text})]}),a&&e.detail&&t.jsx("div",{className:"s-observe-system-detail",children:e.detail}),t.jsx(J,{text:r,label:"Copy system event"})]})}const hn={think:"think",tool:"tool",ask:"ask",message:"message",note:"note",system:"system",boot:"boot"};function fn(e){const s=Ls(e);return s||(e.kind==="tool"?e.tool==="res"?"result":e.tool?.trim()||"tool":hn[e.kind]??e.kind)}function Ve(e){return!!e?.closest("button, a, input, textarea, select, [role='slider'], [contenteditable='true']")}function bn({event:e,prevT:s,prevWallMs:n,laneMode:a=!1,conversationMode:r=!1,entering:o=!1,repeatCount:l=1,sessionStartMs:c,nowMs:u=Date.now(),preferWallAge:b=!1,highlighted:m=!1,focusAnchor:j=!1,simpleTool:f=!1,stackedTool:i=!1,laneGutter:d="time",laneOperatorName:g,conversationAssistantName:O,onLaneEventSelect:A,laneToolHover:I,hoverPreviewActive:B=!1,technicalSummary:$,technicalExpanded:D=!1,onTechnicalToggle:W}){const L=e.t-s,S=$?"var(--dim)":ls[e.kind]??"var(--dim)",p=a||r?Rt(e,c,u,b):Pt(e,c),E=pe(e,c),M=b&&typeof n=="number"&&E!==null?Ds(E-n):null,x=!b&&L>15?`${Et(L)} gap`:null,C=M??x,N=a&&!!A&&!$,T=["s-observe-row",`s-observe-row--kind-${e.kind}`,o?"s-observe-row--enter":"",N?"s-observe-row--selectable":"",m?"s-observe-row--highlighted":"",j?"s-observe-row--focus-anchor":"",f?"s-observe-row--tool-simple":"",i?"s-observe-row--tool-stacked":"",B?"s-observe-row--hover-preview":"",$?"s-observe-row--tech-summary":""].filter(Boolean).join(" "),k=t.jsxs(t.Fragment,{children:[C?t.jsx("div",{className:"s-observe-row-gap",children:C}):null,t.jsxs("div",{className:"s-observe-row-time",title:p.title,children:[d==="label-time"&&!i?t.jsx("span",{className:"s-observe-row-kind",children:fn(e)}):null,t.jsx("span",{className:"s-observe-row-clock",children:p.label}),l>1&&t.jsxs("span",{className:"s-observe-row-repeat",title:`${l} similar events merged`,children:["×",l]})]}),t.jsx("span",{className:"s-observe-row-bead",style:{background:S}}),$?t.jsx(sn,{summary:$,expanded:D,onToggle:W}):t.jsxs(t.Fragment,{children:[e.kind==="think"&&t.jsx(Bt,{event:e,laneMode:a}),e.kind==="tool"&&t.jsx(Xt,{event:e,laneMode:a,simple:f,wallLabel:f?p.label:void 0,wallTitle:f?p.title:void 0}),e.kind==="ask"&&t.jsx(Zt,{event:e,laneMode:a,conversationMode:r,operatorName:g??(r?"You":void 0),wallLabel:a||r?p.label:void 0,wallTitle:a||r?p.title:void 0}),e.kind==="message"&&t.jsx(en,{event:e,laneMode:a,conversationMode:r,assistantName:O}),e.kind==="note"&&t.jsx(dn,{event:e,laneMode:a}),(e.kind==="system"||e.kind==="boot")&&t.jsx(mn,{event:e,laneMode:a})]})]}),R=a&&e.kind==="tool"&&I?I(e,{wallLabel:p.label,wallTitle:p.title,sessionOffset:Ps(e.t)}):null,y=R?t.jsx("div",{ref:R.ref,className:"s-observe-row-hover-target",onMouseEnter:R.onMouseEnter,onMouseLeave:R.onMouseLeave,onFocus:R.onFocus,onBlur:R.onBlur,children:k}):k;return t.jsx("div",{className:T,"data-event-id":e.id,onClick:N?v=>{Ve(v.target)||A?.(e)}:void 0,onKeyDown:N?v=>{v.key!=="Enter"&&v.key!==" "||Ve(v.target)||(v.preventDefault(),A?.(e))}:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,"aria-label":N?e.kind==="tool"?"Open command detail at this step":"Open session detail at this step":void 0,children:y})}function pn(e,s){if(!e)return;const n=e.closest(".s-observe-main");if(n){const a=n.scrollHeight-n.clientHeight;n.scrollTo({top:a,left:n.scrollLeft,behavior:s});return}e.scrollIntoView({behavior:s,block:"end",inline:"nearest"})}function vn({events:e,followEnd:s,laneMode:n=!1,conversationMode:a=!1,sessionStartMs:r,nowMs:o=Date.now(),preferWallAge:l=!1,focusEventId:c,inlineFocusEventId:u,inlineFocusContent:b,onLaneEventSelect:m,laneGutter:j="time",richSimpleTools:f=!1,collapseTechnicalEvents:i=!1,laneOperatorName:d,conversationAssistantName:g}){const O=h.useRef(null),A=h.useRef(s),I=h.useRef(new Set),B=h.useRef(!1),[$,D]=h.useState(()=>new Set),[W,L]=h.useState(()=>new Set),S=h.useCallback(x=>{L(C=>{const N=new Set(C);return N.has(x)?N.delete(x):N.add(x),N})},[]);h.useEffect(()=>{i||L(new Set)},[i]);const p=h.useMemo(()=>{const x=n||a,C=x?yt(e):e.map(T=>({event:T,repeatCount:1}));if(!x)return C;const N=C.filter(T=>T.event.live||!fs(T.event));return i?kt(N):N},[e,n,a,i]);h.useEffect(()=>{if(!n){B.current=!0;return}const x=I.current;if(!B.current){for(const k of p)x.add(k.event.id);B.current=!0;return}const C=[];for(const k of p)x.has(k.event.id)||(x.add(k.event.id),C.push(k.event.id));if(C.length===0)return;const N=new Set(C);D(N);const T=window.setTimeout(()=>{D(new Set)},380);return()=>window.clearTimeout(T)},[p,s,n]),h.useLayoutEffect(()=>{if(!s){A.current=!1;return}const x=!A.current;A.current=!0,pn(O.current,n||x?"instant":"smooth")},[p.length,s,n]);const E=Os(n),M=(x,C,N,T={})=>{const k=N?.event??null,R=k?pe(k,r):null,y=n&&!x.technicalSummary&&!f&&Me(x.event),v=y&&k!=null&&!N?.technicalSummary&&Me(k),q=!T.suppressInlineFocus&&u===x.event.id&&!!b,z=t.jsx(bn,{event:x.event,prevT:k?.t??0,prevWallMs:R,laneMode:n,conversationMode:a,simpleTool:y,stackedTool:v,laneGutter:j,entering:n&&$.has(x.event.id),repeatCount:x.repeatCount,sessionStartMs:r,nowMs:o,preferWallAge:l,highlighted:!n&&!a&&c===x.event.id,focusAnchor:q,laneOperatorName:d,conversationAssistantName:g,onLaneEventSelect:m,laneToolHover:n?E.bind:void 0,hoverPreviewActive:n&&E.hoveredEventId===x.event.id,technicalSummary:x.technicalSummary,technicalExpanded:T.technicalExpanded,onTechnicalToggle:T.onTechnicalToggle});return t.jsxs("div",{className:`s-observe-focus-group${q?" s-observe-focus-group--active":""}`,"data-focus-group":q?"true":void 0,children:[z,q?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"s-observe-focus-connector","aria-hidden":!0}),t.jsx("div",{className:"s-observe-focus-detail",children:b})]}):null]},`${x.event.id}:${x.repeatCount}:${C}${T.keySuffix??""}`)};return t.jsxs("div",{className:"s-observe-stream",children:[!a&&t.jsx("div",{className:"s-observe-spine"}),p.map((x,C)=>{const N=C>0?p[C-1]:null,T=x.technicalSourceRows,k=!!(x.technicalSummary&&T&&T.length>0),R=k&&W.has(x.event.id);return k&&R?t.jsxs("div",{className:"s-observe-tech-rollup s-observe-tech-rollup--expanded",children:[M(x,C,N,{technicalExpanded:!0,onTechnicalToggle:()=>S(x.event.id),suppressInlineFocus:!0}),t.jsx("div",{className:"s-observe-tech-rollup-details",children:T.map((y,v)=>{const q=v>0?T[v-1]:null;return M(y,v,q,{keySuffix:`:rollup:${x.event.id}:detail`,suppressInlineFocus:!0})})})]},`${x.event.id}:${x.repeatCount}:${C}:rollup`):M(x,C,N,{onTechnicalToggle:k?()=>S(x.event.id):void 0})}),t.jsx("div",{ref:O}),E.card]})}function xn({data:e,cursor:s}){const r=e.length;if(r<2)return null;const o=276/(r-1),l=e.map((u,b)=>`${b===0?"M":"L"} ${(b*o).toFixed(1)} ${((1-u)*44).toFixed(1)}`).join(" "),c=s*276;return t.jsxs("svg",{viewBox:"0 0 276 44",style:{width:"100%",height:44,display:"block"},children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"observeCtxFill",x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--accent)",stopOpacity:.25}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:0})]})}),t.jsx("path",{d:`${l} L 276 44 L 0 44 Z`,fill:"url(#observeCtxFill)"}),t.jsx("path",{d:l,fill:"none",stroke:"var(--accent)",strokeWidth:1.2}),t.jsx("line",{x1:c,y1:0,x2:c,y2:44,stroke:"var(--accent)",strokeWidth:1,opacity:.6,strokeDasharray:"2 3"})]})}function gn({state:e}){const s=e==="created"?"var(--green)":e==="modified"?"var(--accent)":"var(--dim)",n=e==="created"?"+":e==="modified"?"~":"◎";return t.jsx("span",{className:"s-observe-file-glyph",style:{background:"color-mix(in srgb, var(--bg) 70%, black)",border:`1px solid color-mix(in srgb, ${s} 40%, var(--border))`,color:s},children:n})}function U({label:e,value:s,detail:n}){const a=s==="0"||s==="—"||s==="";return t.jsxs("div",{className:`s-observe-stat${a?" s-observe-stat--quiet":""}`,children:[t.jsx("div",{className:"s-observe-stat-value",children:s}),t.jsx("div",{className:"s-observe-stat-label",children:e}),n&&t.jsx("div",{className:"s-observe-stat-detail",children:n})]})}function je({children:e="Not captured for this session"}){return t.jsx("div",{className:"s-observe-empty",children:e})}function Ee({path:e,basePath:s,agentId:n,sessionId:a,className:r,children:o}){const{openFilePreview:l}=Se(),c=e.startsWith("/")||e.startsWith("~/")?e:s?`${s.replace(/\/$/,"")}/${e}`:e;return t.jsxs("span",{className:"s-observe-path-link-group",children:[t.jsx("button",{type:"button",className:r,title:`Preview ${e} in Scout`,onClick:()=>l(c),children:o}),t.jsx("button",{type:"button",className:"s-observe-path-link-external",title:`Reveal ${e} in OS`,"aria-label":"Reveal in OS",onClick:()=>At({path:e,basePath:s,agentId:n,sessionId:a}),children:t.jsx(tt,{size:11,strokeWidth:1.6})})]})}function jn({path:e,basePath:s,agentId:n,sessionId:a}){return t.jsxs("div",{className:"s-observe-source",children:[t.jsx("span",{className:"s-observe-source-label",children:"Source"}),t.jsx(Ee,{path:e,basePath:s,agentId:n,sessionId:a,className:"s-observe-source-link",children:ye(e)})]})}function ke({rows:e,agentId:s,sessionId:n}){return e.length===0?null:t.jsx("div",{className:"s-observe-detail-list",children:e.map(a=>{const r=`s-observe-detail-value s-observe-detail-value--${a.tone??"default"}${a.wrap?" s-observe-detail-value--wrap":""}`,o=a.display??a.value;return t.jsxs("div",{className:"s-observe-detail-row",children:[t.jsx("div",{className:"s-observe-detail-label",children:a.label}),t.jsxs("div",{className:"s-observe-detail-value-wrap",children:[a.actionPath?t.jsx(Ee,{path:a.actionPath,basePath:a.actionBasePath,agentId:s,sessionId:n,className:`${r} s-observe-detail-link`,children:o}):t.jsx("div",{className:r,title:a.title??(o!==a.value?a.value:void 0),children:o}),t.jsx(J,{text:a.actionPath??a.value,label:`Copy ${a.label.toLowerCase()}`,className:"s-observe-copy-btn--inline"})]})]},a.label)})})}function kn({events:e,duration:s,cursor:n,onCursor:a,snapTimes:r=[]}){const o=h.useRef(null),l=h.useMemo(()=>wn(e,s,48),[e,s]),c=l.some(f=>f.count>0),u=l.reduce((f,i)=>f+i.count,0),b=c?`${u} message turn anchors. Click the timeline or use arrow keys to snap between turns.`:"Session timeline",m=h.useCallback(f=>{const i=o.current.getBoundingClientRect(),d=f.clientX-i.left,g=Math.max(0,Math.min(s,d/i.width*s));a(Ke(g,s,r))},[s,a,r]),j=h.useCallback(f=>{if(s<=0)return;const i=s*.01,d=s*.05;let g=n;switch(f.key){case"ArrowLeft":g=r.length?Nn(n,r):n-(f.shiftKey?d:i);break;case"ArrowRight":g=r.length?ps(n,r,s):n+(f.shiftKey?d:i);break;case"PageDown":g=n-d;break;case"PageUp":g=n+d;break;case"Home":g=0;break;case"End":g=s;break;default:return}f.preventDefault(),a(r.length&&(f.key==="PageDown"||f.key==="PageUp")?Ke(g,s,r):Math.max(0,Math.min(s,g)))},[n,s,a,r]);return t.jsxs("div",{className:"s-observe-track-wrap",title:b,children:[c?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"s-observe-track-barsHead","aria-hidden":!0,children:[t.jsx("span",{children:"Turns"}),t.jsx("span",{children:u})]}),t.jsx("div",{className:"s-observe-track-bars","aria-hidden":!0,children:l.map(f=>t.jsx("span",{className:"s-observe-track-bar","data-active":f.start<=n||void 0,style:{height:`${Cn(f.count,l)}%`}},f.index))})]}):null,t.jsxs("div",{ref:o,className:"s-observe-track",onClick:m,onKeyDown:j,role:"slider",tabIndex:s>0?0:-1,"aria-label":"Session timeline","aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":Math.max(0,Math.min(s,n)),children:[e.map(f=>{const i=f.kind==="tool"?6:f.kind==="think"?4:5;return t.jsx("span",{className:"s-observe-track-tick",style:{left:`${s>0?f.t/s*100:0}%`,top:i===6?-2:-1,height:i,background:ls[f.kind]??"var(--dim)"}},f.id)}),t.jsx("div",{className:"s-observe-track-played",style:{width:`${s>0?n/s*100:0}%`}}),t.jsx("span",{className:"s-observe-track-cursor",style:{left:`${s>0?n/s*100:0}%`}})]})]})}function bs(e){return e.kind==="message"||e.kind==="ask"}function yn(e,s){const n=e.filter(bs).map(a=>Math.max(0,Math.min(s,a.t))).sort((a,r)=>a-r);return Array.from(new Set(n))}function Ke(e,s,n){const a=Math.max(0,Math.min(s,e));if(n.length===0)return a;let r=n[0],o=Math.abs(r-a);for(const l of n){const c=Math.abs(l-a);c<o&&(r=l,o=c)}return r}function ps(e,s,n){return s.find(r=>r>e+.01)??n}function Nn(e,s){for(let n=s.length-1;n>=0;n-=1){const a=s[n];if(a<e-.01)return a}return 0}function wn(e,s,n){const a=Math.max(1,s),r=Array.from({length:n},(o,l)=>({index:l,count:0,start:l/n*a}));for(const o of e){if(!bs(o))continue;const l=Math.min(n-1,Math.max(0,Math.floor(o.t/a*n)));r[l].count+=1}return r}function Cn(e,s){if(e<=0)return 0;const n=Math.max(1,...s.map(a=>a.count));return Math.max(18,e/n*100)}function Sn({events:e,duration:s,cursor:n,mode:a,speed:r,snapTimes:o,onCursor:l,onPlayToggle:c,onSpeedChange:u}){const b=a==="tail"?"Following latest":a==="playing"?"Pause replay":"Play turns";return t.jsxs("div",{className:"s-observe-transport","data-snap":o.length>0||void 0,"data-mode":a,children:[t.jsx("button",{type:"button",className:"s-observe-play-btn","data-state":a,onClick:c,"aria-pressed":a==="tail"||a==="playing","aria-label":b,title:b,children:a==="playing"?"❚❚":"▶"}),t.jsx("button",{type:"button",className:"s-observe-rewind-btn",onClick:()=>{l(0)},"aria-label":"Jump to start",title:"Jump to start",children:"⏮"}),t.jsx(kn,{events:e,duration:s,cursor:n,onCursor:l,snapTimes:o}),t.jsx("div",{className:"s-observe-speed-group",children:[.5,1,2,4].map(m=>t.jsxs("button",{type:"button",className:`s-observe-speed-btn${r===m?" s-observe-speed-btn--active":""}`,onClick:()=>u(m),children:[m,"×"]},m))})]})}function Je(e){return Ms(e)||"unknown"}function Tn(e,s){const n=De(e),a=De(s);return n===null||a===null?"0:00":es(a-n)||"0:00"}function $n({catalog:e,sessionId:s,agentId:n}){const{navigate:a,route:r}=Se(),[o,l]=h.useState(!1),c=e.sessions.find(d=>d.id===e.activeSessionId),u=e.sessions.filter(d=>d.id!==e.activeSessionId&&d.endedAt).sort((d,g)=>(g.endedAt??0)-(d.endedAt??0)).slice(0,5),b=e.activeSessionId??s,m=b?b.slice(0,8):null,j=!!(c?.canTakeover&&e.resumeCommand),f=h.useCallback(()=>{!j||!e.resumeCommand||(Us({command:e.resumeCommand,cwd:e.resumeCwd,agentId:n}).then(()=>{Js(a,{view:"terminal",agentId:n},{returnTo:r})}),l(!0))},[j,e.resumeCommand,e.resumeCwd,a,r,n]),i=h.useCallback(()=>{a({view:"agents-v2",agentId:n,tab:"message"})},[a,n]);return t.jsxs("div",{className:"s-observe-session-header",children:[t.jsx("div",{className:"s-observe-session-active",children:t.jsxs("div",{className:"s-observe-session-row",children:[m&&t.jsx("span",{className:"s-observe-session-id",title:b??void 0,children:m}),c&&t.jsxs("span",{className:"s-observe-session-time",children:["started ",Je(c.startedAt)]}),t.jsx("button",{className:"s-observe-pair-btn",onClick:i,title:"Send messages into the live session without taking the terminal",children:"Pair"}),j&&t.jsx("button",{className:"s-observe-takeover-btn",onClick:f,title:e.resumeCommand??void 0,children:o?"Sent":"Takeover"})]})}),u.length>0&&t.jsxs("div",{className:"s-observe-session-history",children:[t.jsxs("div",{className:"s-observe-session-history-label",children:[e.sessions.length," session",e.sessions.length!==1?"s":""," total"]}),u.map(d=>t.jsxs("div",{className:"s-observe-session-past",children:[t.jsx("span",{className:"s-observe-session-id",children:d.id.slice(0,8)}),t.jsxs("span",{className:"s-observe-session-time",children:[Je(d.startedAt),d.endedAt?` · ${Tn(d.startedAt,d.endedAt)}`:""]})]},d.id))]})]})}const vs={events:[{id:"observe:empty",t:0,kind:"system",text:"No session trace is available for this agent yet.",detail:"Waiting for a live session or readable history file."}],files:[],contextUsage:[],live:!1};function xs({data:e=vs,agentId:s,sessionId:n,cursor:a,duration:r,surface:o="embedded",observeSource:l,observeFidelity:c}){const{events:u,files:b}=e,[m,j]=h.useState(null);h.useEffect(()=>{if(!s)return;let v=!1;return Ce(`/api/agents/${encodeURIComponent(s)}/session-catalog`).then(q=>{v||j(q)}).catch(()=>{}),()=>{v=!0}},[s]);const f=e.metadata,i=f?.session,d=f?.usage,g=typeof r=="number"&&Number.isFinite(r)&&r>0?r:u.length>0?u[u.length-1].t+30:60,O=typeof a=="number"&&Number.isFinite(a)?a:g,A=u.filter(v=>v.kind==="tool").length,I=u.filter(v=>v.kind==="think").length,B=u.filter(v=>v.kind==="ask").length,$=u.filter(v=>v.kind==="tool"&&v.tool==="read").length,D=u.filter(v=>v.kind==="tool"&&(v.tool==="edit"||v.tool==="write")).length,W=u.length>0?u[u.length-1].t:0,L=typeof d?.contextInputTokens=="number"&&typeof d.contextWindowTokens=="number"&&d.contextWindowTokens>0?Math.max(0,Math.min(100,Math.round(d.contextInputTokens/d.contextWindowTokens*100))):null,S=[{label:"Context input",value:d?.contextInputTokens},{label:"Input",value:d?.inputTokens},{label:"Output",value:d?.outputTokens},{label:"Cache hit",value:d?.cacheReadInputTokens},{label:"Cache write",value:d?.cacheCreationInputTokens},{label:"Total",value:d?.totalTokens},{label:"Reasoning",value:d?.reasoningOutputTokens}].filter(v=>typeof v.value=="number"),p=ge([typeof d?.assistantMessages=="number"?{label:"Assistant msgs",value:re(d.assistantMessages)??"0",tone:"accent"}:null,typeof d?.webSearchRequests=="number"?{label:"Web search",value:re(d.webSearchRequests)??"0"}:null,typeof d?.webFetchRequests=="number"?{label:"Web fetch",value:re(d.webFetchRequests)??"0"}:null,d?.serviceTier?{label:"Service tier",value:d.serviceTier,tone:"good"}:null,d?.speed?{label:"Speed",value:d.speed}:null,d?.planType?{label:"Plan",value:d.planType}:null]),E=ge([typeof d?.contextWindowTokens=="number"?{label:"Model window",value:`${re(d.contextWindowTokens)} tokens`,title:re(d.contextWindowTokens)??void 0,tone:"accent"}:null,L!==null?{label:"Window load",value:`${L}%`,tone:L>=80?"warn":"default"}:null]),M=ge([i?.model?{label:"Model",value:i.model,tone:"accent"}:null,i?.adapterType?{label:"Adapter",value:i.adapterType}:null,i?.gitBranch?{label:"Branch",value:i.gitBranch}:null,i?.cwd?{label:"Workspace",value:i.cwd,display:ye(i.cwd),title:i.cwd,actionPath:i.cwd}:null,i?.entrypoint?{label:"Entrypoint",value:i.entrypoint}:null,i?.cliVersion?{label:"CLI",value:i.cliVersion}:null,i?.permissionMode?{label:"Permissions",value:i.permissionMode}:null,i?.approvalPolicy?{label:"Approval",value:i.approvalPolicy}:null,i?.sandbox?{label:"Sandbox",value:i.sandbox}:null,i?.userType?{label:"User type",value:i.userType}:null,i?.originator?{label:"Originator",value:i.originator}:null,i?.modelProvider?{label:"Provider",value:i.modelProvider}:null,i?.effort?{label:"Effort",value:i.effort}:null,i?.timezone?{label:"Timezone",value:i.timezone}:null,i?.externalSessionId?{label:"External session",value:i.externalSessionId,title:i.externalSessionId}:null,i?.threadId?{label:"Thread",value:i.threadId,title:i.threadId}:null,i?.threadPath?{label:"Thread path",value:i.threadPath,display:ye(i.threadPath),title:i.threadPath,actionPath:i.threadPath,actionBasePath:i.cwd??null}:null,i?.source?{label:"Runtime source",value:i.source}:null]),x=Ge(d),C=Ge(i),N=l??(e.live?"live":"history"),T=c??"timestamped",k=os({source:N,fidelity:T,live:e.live,eventCount:u.length}),R=T==="timestamped",y=k.traceEventCount>0;return t.jsxs("aside",{className:`s-observe-rail${o==="context"?" s-observe-rail--context":""}`,children:[t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Evidence"}),t.jsxs("div",{className:"s-observe-evidence-card","data-tone":k.tone,children:[t.jsx("span",{className:"s-observe-evidence-dot","aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx("strong",{children:k.label}),t.jsx("small",{children:k.detail})]})]})]}),m&&m.sessions.length>0&&t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Session"}),t.jsx($n,{catalog:m,sessionId:n??null,agentId:s})]}),t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Trace stats"}),t.jsxs("div",{className:"s-observe-stats",children:[t.jsx(U,{label:"Turns",value:K(y?i?.turnCount:void 0)}),t.jsx(U,{label:"Tools",value:K(y?A:void 0)}),t.jsx(U,{label:"Thinks",value:K(y?I:void 0)}),t.jsx(U,{label:"Requests",value:K(y?B:void 0)}),t.jsx(U,{label:"Reads",value:K(y?$:void 0)}),t.jsx(U,{label:"Edits",value:K(y?D:void 0)}),t.jsx(U,{label:"Files",value:K(y?b.length:void 0)}),t.jsx(U,{label:"Window",value:R&&y?Ot(W):"—"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Interacted agents"}),t.jsx(Ys,{topology:f?.topology??null,sessionId:n??f?.session?.externalSessionId??null,size:"rail",maxAgents:4})]}),t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Context window"}),t.jsx(ke,{rows:E,agentId:s??null,sessionId:n??null}),L!==null?t.jsxs(t.Fragment,{children:[t.jsx(xn,{data:[L/100,L/100],cursor:O/g}),t.jsx("div",{className:"s-observe-ctx-detail",children:"Meter uses latest context input divided by the model window."})]}):E.length===0?t.jsx(je,{}):t.jsx("div",{className:"s-observe-ctx-detail",children:"No derived load trace captured."})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"s-observe-rail-label",children:["Files touched · ",b.length]}),t.jsx("div",{className:"s-observe-files",children:b.map(v=>t.jsxs("div",{className:`s-observe-file${v.lastT<=O?" s-observe-file--visible":" s-observe-file--hidden"}`,children:[t.jsx(gn,{state:v.state}),t.jsx(Ee,{path:v.path,basePath:i?.cwd??null,agentId:s??null,sessionId:n??null,className:"s-observe-file-path",children:v.path}),t.jsxs("span",{className:"s-observe-file-touches",children:["×",v.touches]})]},v.path))})]}),t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Usage"}),S.length>0&&t.jsx("div",{className:"s-observe-stats s-observe-stats--usage",children:S.map(v=>t.jsx(U,{label:v.label,value:K(v.value)},v.label))}),p.length>0?t.jsx(ke,{rows:p,agentId:s??null,sessionId:n??null}):!x&&S.length===0?t.jsx(je,{}):null]}),t.jsxs("div",{children:[t.jsx("div",{className:"s-observe-rail-label",children:"Metadata"}),M.length>0?t.jsx(ke,{rows:M,agentId:s??null,sessionId:n??null}):C?null:t.jsx(je,{})]})]})}function Ln({conversationId:e,agentId:s,sessionId:n,invoke:a}){const{navigate:r}=Se(),[o,l]=h.useState(""),[c,u]=h.useState(!1),[b,m]=h.useState(null),[j,f]=h.useState(null),[i,d]=h.useState(()=>e?.trim()||null),g=h.useRef(null);h.useEffect(()=>{d(e?.trim()||null)},[e]);const O=s?.trim()||null,A=n?.trim()||null,I=!!(O&&A),B=!!(a?.projectPath&&a?.sessionId),$=!!(i||I||B),D=$&&o.trim().length>0&&!c,W=async()=>{const L=o.trim();if(!(!L||c)){if(!i&&!I&&!B){f("No writable session target is attached yet.");return}u(!0),m(null),f(null);try{if(i)await Ce("/api/send",{method:"POST",body:JSON.stringify({body:L,conversationId:i,intent:"steer"})}),l(""),m("Sent into this session."),g.current?.focus();else if(I){const p=(await Vs({agentId:O,sessionId:A,instructions:L})).conversationId?.trim();p&&d(p),l(""),m("Sent into this session."),g.current?.focus()}else{const p=(await Ks({projectPath:a.projectPath,sessionId:a.sessionId,...a.harness?{harness:a.harness}:{},...a.model?{model:a.model}:{},...a.reasoningEffort?{reasoningEffort:a.reasoningEffort}:{},instructions:L})).conversationId?.trim();l(""),p?(d(p),m("Session invoked — opening conversation."),r({view:"conversation",conversationId:p})):(m("Session invoked."),g.current?.focus())}}catch(S){f(S instanceof Error?S.message:String(S))}finally{u(!1)}}};return t.jsx("div",{className:"s-observe-compose",children:t.jsx(Xs,{renderWhenEmbedded:!0,density:"panel",value:o,onChange:l,onSend:()=>{W()},sending:c,disabled:!$||c,canSend:D,placeholder:$?!i&&!I&&B?"Message this session to invoke it…":"Write into this session…":"This trace is read-only",textareaRef:g,rows:3,showAttach:$,onAttach:()=>g.current?.focus(),attachTitle:"Add context",attachAriaLabel:"Add context",sendTitle:"Send into this session (Cmd+Enter)",sendAriaLabel:"Send into this session",tools:$?j?t.jsx("span",{className:"s-observe-compose-status s-observe-compose-status--error",children:j}):b?t.jsx("span",{className:"s-observe-compose-status",children:b}):null:t.jsx("span",{className:"s-observe-compose-status s-observe-compose-status--muted",children:"No broker conversation or resumable agent session is attached to this trace."})})})}function En({data:e,agentId:s,sessionId:n,conversationId:a,observeSource:r,observeFidelity:o,originLabel:l,defaultPresentation:c="timeline",showRail:u=!0,variant:b="default",traceLimit:m,traceWindowMs:j,traceWindowLabel:f,nowMs:i,initialCursorT:d,focusEventId:g,inlineFocusEventId:O,inlineFocusContent:A,onLaneEventSelect:I,surface:B="scout",laneGutter:$,richSimpleTools:D,laneCollapseTechnicalEvents:W,onLaneCollapseTechnicalEventsChange:L,laneOperatorName:S}){const p=b==="lane",E=B==="scope",M=$??(E?"label-time":"time"),x=D??E,C=u&&!E,[N,T]=h.useState(()=>p||E?"timeline":c),k=!p&&!E&&N==="conversation",R=e??vs,{events:y}=R,v=r??(R.live?"live":"history"),z=os({source:v,fidelity:o??"timestamped",live:R.live,eventCount:y.length}),Q=R.metadata?.session?.sessionStart,[gs,js]=h.useState(Date.now),ee=typeof i=="number"?i:gs;h.useEffect(()=>{if(!p||typeof i=="number")return;const w=setInterval(()=>js(Date.now()),1e4);return()=>clearInterval(w)},[p,i]);const P=y.length>0?y[y.length-1].t+30:60,se=typeof d=="number"?Math.max(0,Math.min(P,d)):null,[ie,ce]=h.useState(()=>se??P),[ve,Y]=h.useState(!1),[ue,ks]=h.useState(1),[xe,X]=h.useState(se==null),Re=h.useRef(P),Pe=h.useRef(null),te=h.useMemo(()=>yn(y,P),[y,P]);h.useEffect(()=>{se!=null&&(ce(se),X(!1),Y(!1))},[se,g]),h.useEffect(()=>{ce(w=>{const F=Re.current;Re.current=P;const H=He(w,F);return w>P||H&&xe?P:w})},[P,xe]),h.useEffect(()=>{if(!ve)return;const w=te.length>0?Math.max(220,700/ue):100,F=setInterval(()=>{ce(H=>{if(te.length>0){const he=ps(H,te,P);return he>=P?(X(!0),Y(!1),P):he}const me=H+ue;return me>=P?(X(!0),Y(!1),P):me})},w);return()=>clearInterval(F)},[ve,P,te,ue]);const ne=p&&!!(j&&j>0),ae=(()=>{let w=y.filter(F=>F.t<=ie);if(ne&&j){const F=As(w,Q,ee,j);w=F.length>=Be?F:w.slice(-Be)}else p&&m&&m>0&&(w=w.slice(-m));return w})(),Z=h.useMemo(()=>{if(!ne||!j)return null;const w=ae[0]?.id,F=w===void 0?Is(y,Q,ee,j):Math.max(0,y.findIndex(H=>H.id===w));return Bs(ae,Q,ee,j,F)},[y,ee,Q,j,ne,ae]);h.useLayoutEffect(()=>{if(p||!g)return;const w=Pe.current;if(!w)return;const F=w.querySelector('[data-focus-group="true"]')??w.querySelector(`[data-event-id="${g}"]`),H=F?.closest(".s-observe-main");if(F&&H){const me=H.getBoundingClientRect(),he=F.getBoundingClientRect(),$s=H.scrollTop+(he.top-me.top)-16;H.scrollTo({top:Math.max(0,$s),behavior:"instant"});return}F?.scrollIntoView({block:"start",behavior:"instant"})},[g,O,p,ae.length]);const de=He(ie,P)&&xe,ys=de?"tail":ve?"playing":"paused",Ns=h.useCallback(w=>{X(!1),Y(!1),ce(w)},[]),ws=h.useCallback(()=>{de?(X(!1),Y(!1)):(X(!1),Y(w=>!w))},[de]),G=R.metadata?.session,Oe=G?.threadPath??null,Cs=G?.model?.trim()||We(G?.adapterType)||"Agent",Ss=S??"You",Ae=n?.trim()||G?.externalSessionId?.trim()||null,Ie=We(G?.adapterType),Ts=!s&&G?.cwd&&Ae&&Ie?{projectPath:G.cwd,sessionId:Ae,harness:Ie,model:G.model,reasoningEffort:G.effort}:null;return t.jsxs("div",{ref:Pe,className:["s-observe",(!C||p)&&"s-observe--content-only",p&&"s-observe--lane",p&&M==="label-time"&&"s-observe--lane-gutter-label",k&&"s-observe--conversation",E&&"s-observe--scope"].filter(Boolean).join(" "),children:[t.jsxs("main",{className:"s-observe-main",children:[!p&&!E&&t.jsxs("div",{className:"s-observe-evidence-banner","data-tone":z.tone,children:[t.jsx("span",{className:"s-observe-evidence-dot","aria-hidden":"true"}),t.jsxs("span",{children:[t.jsx("strong",{children:l??z.label}),t.jsx("small",{children:l?`${z.label}. ${z.detail}`:z.detail})]}),!z.receiptOnly&&t.jsx(tn,{presentation:N,onChange:T})]}),Oe&&!p&&t.jsx(jn,{path:Oe,basePath:G?.cwd??null,agentId:s??null,sessionId:n??null}),!z.receiptOnly&&!E&&ne&&Z?t.jsxs("div",{className:"s-observe-lane-trace-meta",children:[t.jsxs("span",{className:"s-observe-lane-trace-meta-leading",children:[t.jsx("span",{className:"s-observe-lane-trace-meta-label",children:"Trace"}),t.jsx(nn,{collapseTechnicalEvents:!!W,onChange:L})]}),t.jsxs("span",{className:"s-observe-lane-trace-meta-stats",children:[t.jsxs("span",{className:"s-observe-lane-trace-meta-window",children:["last ",f??_e(j??0)]}),t.jsx("span",{className:"s-observe-lane-trace-meta-sep","aria-hidden":"true",children:"·"}),t.jsxs("span",{children:[Z.eventCount," event",Z.eventCount===1?"":"s"]}),Z.spanMs>0?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"s-observe-lane-trace-meta-sep","aria-hidden":"true",children:"·"}),t.jsxs("span",{children:[_e(Z.spanMs)," span"]})]}):null,Z.truncatedBefore?t.jsx("span",{className:"s-observe-lane-trace-meta-tag",title:"Earlier activity in this window may not be loaded",children:"partial"}):null]})]}):null,z.receiptOnly?t.jsx(Qs,{events:y}):t.jsx(vn,{events:ae,followEnd:de,laneMode:p,conversationMode:k,sessionStartMs:Q,nowMs:ee,preferWallAge:ne,focusEventId:g,inlineFocusEventId:O,inlineFocusContent:A,onLaneEventSelect:I,laneGutter:M,richSimpleTools:x,collapseTechnicalEvents:k||p&&!!W,laneOperatorName:k?Ss:S,conversationAssistantName:Cs})]}),C&&!p&&t.jsx(xs,{data:R,agentId:s,sessionId:n,cursor:ie,duration:P,observeSource:r,observeFidelity:o}),!E&&!p&&t.jsxs("footer",{className:"s-observe-scrubber",children:[k?null:z.replayable?t.jsx(Sn,{events:y,duration:P,cursor:ie,mode:ys,speed:ue,snapTimes:te,onCursor:Ns,onPlayToggle:ws,onSpeedChange:ks}):t.jsxs("div",{className:"s-observe-static-evidence",children:[t.jsx("span",{className:"s-observe-evidence-dot","aria-hidden":"true"}),t.jsx("span",{children:z.label}),t.jsx("small",{children:"No timestamped replay is available."})]}),t.jsx(Ln,{conversationId:a,agentId:s,sessionId:n,invoke:Ts})]})]})}const ia=Object.freeze(Object.defineProperty({__proto__:null,SessionObserve:En,SessionObserveContextRail:xs},Symbol.toStringTag,{value:"Module"}));export{En as S,xs as a,ia as b,os as d,la as h};
@@ -1 +0,0 @@
1
- import{j as s}from"./index-C8uS5szO.js";function c(e){return e?e.length>18?`${e.slice(0,8)}...${e.slice(-6)}`:e:"no session"}const a="Native session",l="Scout-managed chat";function d({source:e,fidelity:i,sessionId:t,evidence:r,originLabel:n=a}){return s.jsxs("div",{className:"s-observe-embed-status","data-tone":r.tone,children:[n?s.jsx("span",{className:"s-observe-embed-status-origin",children:n}):s.jsx("span",{className:"s-observe-embed-status-source",children:e}),s.jsx("span",{children:i}),s.jsx("span",{title:t??void 0,children:c(t)}),s.jsx("span",{children:r.eventCountLabel}),r.tone==="live"&&s.jsx("span",{className:"s-observe-embed-status-live",children:"Live"})]})}function p({events:e}){return s.jsxs("section",{className:"s-observe-receipt-view","aria-label":"Session setup receipts",children:[s.jsxs("div",{className:"s-observe-receipt-view-copy",children:[s.jsx("strong",{children:"No observed trace activity"}),s.jsx("span",{children:"These broker lifecycle records confirm setup only."})]}),e.length>0&&s.jsx("ul",{className:"s-observe-receipt-list",children:e.map(i=>s.jsxs("li",{className:"s-observe-receipt",children:[s.jsx("span",{children:i.text}),i.detail&&s.jsx("small",{children:i.detail})]},i.id))})]})}export{a as NATIVE_SESSION_ORIGIN_LABEL,l as SCOUT_MANAGED_CHAT_ORIGIN_LABEL,d as SessionObserveEmbedStatus,p as SessionObserveReceiptView};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./index-C8uS5szO.js";import{a as g}from"./api-CaROe5_H.js";import{u as I}from"./sse-v5QLsOHV.js";import{u as N}from"./tail-events-DQ46QBW1.js";import{B as k}from"./BackToPicker-Bys9ColC.js";import{ConversationScreen as S}from"./ConversationScreen-tTP6B_F-.js";import{S as R,a as y}from"./SessionObserve-DaqDhqDI.js";import{NATIVE_SESSION_ORIGIN_LABEL as E}from"./SessionObserveEvidence-Drv-D8Oh.js";import{c as w,a as T,b as C,s as u}from"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./index-BWHgHrtv.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.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"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";import"./time-Dhsh_2EG.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"./ConversationComposer-B7RU6LKd.js";import"./AgentAvatar-BIwg54Tj.js";import"./Provider-5Hotn7NQ.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.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";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.js";import"./zap-sKPkh4sQ.js";import"./message-markup-DgFSyb3f.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DGR4kOog.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-CCSU8uo_.js";import"./AstronautSuit-C-4I5YKi.js";import"./panel-right-BNTJhy8M.js";import"./CommsFlowGraph-Czg-KTS0.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DOKw3Q8i.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-CzBWvSa5.js";import"./CommsSelection-g1twA-Lb.js";/* empty css */import"./use-conversation-list-A_YUf8lo.js";import"./agent-master-model-C-KdOFDK.js";import"./use-beside-Df-F2Uvg.js";import"./ConversationFeedRows-DVqnZQH0.js";import"./ConversationPanels-C9yCAoJy.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./activity-CSUhvjD0.js";import"./message-circle-CSiJj6yo.js";import"./ConversationStatus-CK-YfLpi.js";import"./check-B8dMv3Is.js";import"./sparkles-BbOFw3d0.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-C6YehJqD.js";import"./lane-observe-BD21P8BB.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-DkEkQzo-.js";import"./ObserveTextFlow-ET0dD1wO.js";import"./wrench-BsMTSeji.js";import"./external-link-RT4Ph-6-.js";function v(r){const o=r?.trim()??"",t=o.split(/[\\/]/).filter(Boolean).at(-1)??o;return t.endsWith(".jsonl")?t.slice(0,-6):t}function L(r){return r.startsWith("native:process:")}function x(r){const[o,t]=l.useState(()=>({sessionRef:r,lookup:null,loading:!0,error:null})),n=l.useRef(null),c=l.useRef(null);c.current||(c.current=w(m=>g(`/api/session-ref/${encodeURIComponent(m)}`),({sessionRef:m,result:a})=>{if(a.ok){t({sessionRef:m,lookup:a.lookup,loading:!1,error:null});return}t({sessionRef:m,lookup:null,loading:!1,error:a.error instanceof Error?a.error.message:String(a.error)})}));const s=l.useCallback(async()=>{await c.current.request(r)},[r]);l.useEffect(()=>(t({sessionRef:r,lookup:null,loading:!0,error:null}),s(),()=>{c.current?.invalidate(),n.current&&(clearTimeout(n.current),n.current=null)}),[s,r]);const{lookup:i,loading:p,error:d}=T(o,r),f=l.useCallback(()=>{n.current||(n.current=setTimeout(()=>{n.current=null,s()},1e3))},[s]);return I(m=>{const a=[r,i?.refId,i?.kind==="conversation"?i.conversationId:null,i?.session?.agentId,i?.kind==="observe"?i.observe.agentId:null,i?.kind==="observe"?i.observe.sessionId:null];C(m,a)&&f()}),N(m=>{const a=v(m.sessionId),j=v(r),h=i?.kind==="observe"?v(i.observe.sessionId??i.observe.refId):"",b=i?.kind==="observe"?v(i.observe.data.metadata?.session?.externalSessionId):"";!u(a,j)&&(!h||!u(a,h))&&(!b||!u(a,b))||f()}),l.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),{lookup:i,loading:p,error:d}}function Rs({sessionRef:r}){const{lookup:o,loading:t,error:n}=x(r);return o?.kind==="observe"?e.jsx(y,{data:o.observe.data,agentId:o.observe.agentId??o.session?.agentId??void 0,sessionId:o.observe.sessionId??o.observe.refId,surface:"context",observeSource:o.observe.source,observeFidelity:o.observe.fidelity}):e.jsx("aside",{className:"s-observe-rail s-observe-rail--context",children:e.jsxs("div",{children:[e.jsx("div",{className:"s-observe-rail-label",children:o?.kind==="conversation"?"Conversation":"Session context"}),e.jsx("div",{className:"s-observe-empty",children:t?"Resolving session reference":n?"Session context unavailable":"No observe context captured for this session"})]})})}function ys({sessionRef:r,navigate:o,renderBeforeContent:t,showObserveRail:n=!0,onLookup:c}){const{lookup:s,loading:i,error:p}=x(r);if(l.useEffect(()=>{s&&c?.(s)},[s,c]),s?.kind==="conversation")return e.jsxs(e.Fragment,{children:[t?.(s),e.jsx(S,{conversationId:s.conversationId,navigate:o})]});if(s?.kind==="observe")return e.jsxs(e.Fragment,{children:[t?.(s),e.jsx(R,{data:s.observe.data,agentId:s.observe.agentId??s.session?.agentId??void 0,sessionId:s.observe.sessionId??s.observe.refId,conversationId:s.session?.id??null,showRail:n,observeSource:s.observe.source,observeFidelity:s.observe.fidelity,originLabel:E,defaultPresentation:"conversation"})]});if(i)return e.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:e.jsx("section",{className:"s-thread-overview",children:e.jsxs("div",{className:"s-thread-overview-copy",children:[e.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[e.jsx("h2",{className:"s-page-title",children:"Session"}),e.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),e.jsxs("p",{className:"s-thread-overview-summary s-session-ref-loading",children:[e.jsx("span",{className:"s-session-ref-loading-dot"}),e.jsx("span",{className:"s-session-ref-loading-dot"}),e.jsx("span",{className:"s-session-ref-loading-dot"}),"Resolving session reference"]})]})})});const d=L(r);return e.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:e.jsx("section",{className:"s-thread-overview",children:e.jsxs("div",{className:"s-thread-overview-copy",children:[e.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[e.jsx("h2",{className:"s-page-title",children:d?"Process trace unavailable":"Session not found"}),e.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),e.jsx("p",{className:"s-thread-overview-summary",children:d?"This is a live process handle, not a transcript session. No replayable session archive is attached yet.":"This session may have ended or the archive is not available on this machine."}),p&&e.jsx("p",{className:"s-session-ref-error-detail",children:p}),e.jsx("div",{className:"s-session-ref-nav-hint",children:e.jsx(k,{slot:"sessions",fallback:{view:"sessions"},navigate:o})})]})})})}export{Rs as SessionRefContextRail,ys as SessionRefScreen};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-C8uS5szO.js";import{RawSessionsTable as t}from"./RawSessionsTable-DIhmlvk-.js";/* empty css */import"./DataTable-BMOZ1-z8.js";/* empty css */import"./api-CaROe5_H.js";import"./time-Dhsh_2EG.js";import"./tail-events-DQ46QBW1.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./Provider-5Hotn7NQ.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";function Z({navigate:o}){return r.jsx(t,{navigate:o})}export{Z as SessionsScreen};
@@ -1,3 +0,0 @@
1
- import{x as Z,l as fe,n as Se,C as te,r as o,q as Ne,j as e,u as ae,a6 as we,w as ke}from"./index-C8uS5szO.js";import{a as Ce,k as Ae}from"./router-BKiMcYa7.js";import{a as B}from"./api-CaROe5_H.js";import{g as Ee,a as Te,e as Oe,s as Re,b as Pe,d as Ie,c as $e}from"./credentials-C4VXz2hr.js";import{u as ee,B as Le,K as Me,M as _e,N as De}from"./Provider-5Hotn7NQ.js";import{t as Ve}from"./time-Dhsh_2EG.js";import{l as He,m as ze,n as Be}from"./scout-voice-DOQ_B77g.js";import{u as Fe}from"./keyboard-nav-CXfav14z.js";import{C as J}from"./CrewAvatar-CJhuqTsJ.js";import{C as Ue}from"./CastPicker-BuwE_JQp.js";import{p as ne}from"./AgentAvatar-BIwg54Tj.js";import{S as ie}from"./SpriteAvatar-BW1JzkDt.js";import{VoiceHostStatusBanner as Ke,VoicePermissionsPanel as We}from"./VoicePermissionsPanel-CecFWzva.js";import{u as Ge}from"./chunk-HRAB3GC3-C5X-kFhb.js";import{C as D}from"./check-B8dMv3Is.js";import{c as se}from"./createLucideIcon-DkjnzvcJ.js";import{R as qe}from"./refresh-cw-Da9DDLk2.js";import{C as Ye}from"./copy-D9WUpQRf.js";import{a as Xe}from"./DocumentFocusViewer-f12RRQpV.js";import{S as Ze}from"./sparkles-BbOFw3d0.js";const Qe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Je=se("monitor",Qe);const es=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],ss=se("moon",es);const ts=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],as=se("sun",ts);function ns(t){const[s,n]=o.useState(0),i=o.useRef([]);return o.useEffect(()=>{if(t<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const h=()=>{i.current.push(window.setTimeout(()=>{n(1),i.current.push(window.setTimeout(()=>n(2),40)),i.current.push(window.setTimeout(()=>n(1),90)),i.current.push(window.setTimeout(()=>{n(0),h()},130))},2600+Math.random()*4200))};h();const m=i.current;return()=>{m.forEach(x=>window.clearTimeout(x)),m.length=0}},[t]),t<3?0:s}function is({slug:t,open:s=!1,onToggle:n,coin:i=56,figure:h=240,hue:m,state:x="idle",interactive:b=!0,className:f,style:d,children:c}){const a=t.toLowerCase(),r=te[a]??te.milo,p=fe[a],N=Z.find(M=>M.slug===a)??Z[0],I=ns(p?p.roles.length+1:1),S=p&&I>0?Se[I]?.role:void 0,[w,A,$]=r.coin,v=i/$,_=h*r.w/r.h,O=h/r.h,V=s?_:i,H=s?h:i,z=s?_:r.w*v,R=s?h:r.h*v,E=s?0:-w*v,L=s?0:-A*v,T=o.useMemo(()=>Ne(m??null,r.ink),[m,r.ink]),G=p?p.patch[2]*(s?O:v):0,F=p?p.patch[3]*(s?O:v):0,P=p?(s?0:E)+p.patch[0]*(s?O:v):0,U=p?(s?0:L)+p.patch[1]*(s?O:v):0;return e.jsxs("div",{className:`xc-stage-wrapper ${f||""}`,style:d,"data-open":s?"true":"false",children:[e.jsxs("div",{className:"xc-stage",role:b?"button":void 0,tabIndex:b?0:void 0,"aria-label":`${N.name} (${s?"Full body breakout":"Coin disc"})`,onClick:b?n:void 0,onKeyDown:b&&n?M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),n())}:void 0,style:{width:V,height:H,borderRadius:s?"16px":"50%"},children:[e.jsx("span",{className:"xc-stage-ground",style:{background:T,opacity:s?.92:1,borderRadius:s?"16px":"50%"}}),e.jsx("img",{src:ae(`${a}-bust.webp`),alt:N.name,className:"xc-stage-img",style:{width:z,height:R,left:E,top:L}}),p&&S&&e.jsx("img",{src:ae(`${p.dir}/${S}.webp`),alt:"",className:"xc-stage-patch",style:{width:G,height:F,left:P,top:U}})]}),c]})}const pe="/api/voice/playback/settings",ls="scout:voice-playback-settings",rs="OPENSCOUT_VOICE_PLAYBACK",os="openscout.voice-playback-settings";function cs(t){return B(pe,{signal:t,cache:"no-store"})}function ds(t){return B(pe,{method:"PUT",body:JSON.stringify({playback:t})})}function us(t){if(window.dispatchEvent(new CustomEvent(ls,{detail:t})),!("BroadcastChannel"in window))return;const s=new BroadcastChannel(os);s.postMessage(t),s.close()}const hs=[195,125,300,45,355,210];function ms(t){return`oklch(0.80 0.14 ${t})`}function j({label:t,right:s}){return e.jsxs("div",{className:"s-settings-section-rule",children:[e.jsx("span",{className:"s-settings-section-label",children:t}),e.jsx("span",{className:"s-settings-section-line"}),s&&e.jsx("span",{className:"s-settings-section-right",children:s})]})}function k({label:t,hint:s,children:n}){return e.jsxs("div",{className:"s-settings-field",children:[e.jsx("label",{className:"s-settings-field-label",children:t}),n,s&&e.jsx("span",{className:"s-settings-field-hint",children:s})]})}function K({value:t,onChange:s,mono:n}){return e.jsx("input",{className:`s-settings-input${n?" s-settings-input--mono":""}`,value:t,onChange:i=>s(i.target.value)})}function le({value:t,onChange:s,rows:n=3}){return e.jsx("textarea",{className:"s-settings-textarea",value:t,onChange:i=>s(i.target.value),rows:n})}function gs({value:t,onChange:s,min:n,max:i,step:h=1,unit:m=""}){return e.jsxs("div",{className:"s-settings-slider-wrap",children:[e.jsx("input",{type:"range",min:n,max:i,step:h,value:t,onChange:x=>s(Number(x.target.value))}),e.jsxs("span",{className:"s-settings-slider-value",children:[t," ",m]})]})}function W({value:t,onChange:s,options:n,stacked:i,columns:h}){return e.jsx("div",{className:i?"s-settings-option-stacked":"s-settings-option-grid",style:i?void 0:{gridTemplateColumns:`repeat(${h??n.length}, 1fr)`},children:n.map(m=>e.jsxs("button",{className:`s-settings-option-btn${t===m.id?" s-settings-option-btn--active":""}`,onClick:()=>s(m.id),children:[e.jsx("span",{className:"s-settings-option-label",children:m.label}),e.jsx("span",{className:"s-settings-option-sub",children:m.sub})]},m.id))})}const ps=[{id:"system",label:"System",sub:"Follow this device",icon:Je},{id:"light",label:"Light",sub:"Bright workspace",icon:as},{id:"dark",label:"Dark",sub:"Low-light workspace",icon:ss}],bs=[{id:"scout",label:"Scout",sub:"Control-room navigation"},{id:"slack",label:"Slack",sub:"Workspace rail and channel-style lists"}],re=[{id:"scout",label:"Scout",sub:"Near-neutral control room",spec:"SLATE · LIME"},{id:"graphite",label:"Graphite",sub:"Monochrome technical chassis",spec:"BLACK · SLATE"},{id:"polar",label:"Polar",sub:"Nord-inspired arctic slate",spec:"POLAR · FROST"},{id:"solar",label:"Solar",sub:"Solarized-inspired measured contrast",spec:"TEAL · PAPER"}],oe=[{id:"hudson",label:"Rounded",sub:"Soft corners and luminous chrome",spec:"8PX"},{id:"editorial",label:"Compact",sub:"Tighter corners and flatter hierarchy",spec:"4PX"},{id:"drafting",label:"Square",sub:"Zero-radius technical grid",spec:"0PX"}],ce=[{id:"soft",label:"Soft",sub:"Quiet separators"},{id:"balanced",label:"Defined",sub:"Clear structure"},{id:"strong",label:"Strong",sub:"High separation"}],de=[{id:"theme",label:"Theme"},{id:"lime",label:"Lime"},{id:"cyan",label:"Cyan"},{id:"violet",label:"Violet"},{id:"amber",label:"Amber"}],vs=[{id:"crew",label:"Crew Cast",sub:"Rendered character art with 4-slot status ring & eye animation",spec:"4-SLOT CAST"},{id:"sprite",label:"Generative",sub:"Deterministic 7×7 creatures from name hashes",spec:"PRNG VECTOR"},{id:"chip",label:"Pixel Chip",sub:"Pixel portraits of the chip cast; everyone else stays generative",spec:"PIXEL ART"}],ue=vs,he=[{id:"compact",label:"Compact",sub:"More rows per screen; the name carries"},{id:"regular",label:"Regular",sub:"Scout's default balance"},{id:"large",label:"Large",sub:"Faces legible at a glance"}],xs=["milo","vex","sprout"];function Q({className:t,theme:s,template:n,palette:i,contrast:h,accent:m,children:x}){return e.jsx("div",{className:t,"data-scout-theme":s,"data-scout-theme-mode":s,"data-scout-palette":i,"data-scout-contrast":h,"data-scout-accent":m,"data-hudson-theme":s,"data-hudson-template":n,children:x})}function js({palette:t,theme:s,template:n}){return e.jsxs(Q,{className:"s-settings-palette-sample",theme:s,template:n,palette:t,contrast:"balanced",accent:"theme",children:[e.jsxs("span",{className:"s-settings-palette-rail",children:[e.jsx("i",{}),e.jsx("i",{"data-active":!0}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsxs("span",{className:"s-settings-palette-list",children:[e.jsx("i",{}),e.jsx("i",{"data-selected":!0}),e.jsx("i",{})]}),e.jsxs("span",{className:"s-settings-palette-detail",children:[e.jsx("i",{"data-title":!0}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{"data-action":!0})]})]})}function ys({theme:t,template:s,palette:n,contrast:i,accent:h}){return e.jsxs(Q,{className:"s-settings-live-preview",theme:t,template:s,palette:n,contrast:i,accent:h,children:[e.jsxs("div",{className:"s-settings-live-preview-bar",children:[e.jsxs("span",{children:[e.jsx("i",{})," SCOUT"]}),e.jsxs("span",{className:"s-settings-live-preview-state",children:[e.jsx("i",{})," WORKING"]})]}),e.jsxs("div",{className:"s-settings-live-preview-shell",children:[e.jsxs("div",{className:"s-settings-live-preview-rail","aria-hidden":"true",children:[e.jsx("i",{"data-active":!0}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsxs("div",{className:"s-settings-live-preview-list",children:[e.jsx("span",{className:"s-settings-live-preview-kicker",children:"CONVERSATIONS"}),e.jsxs("span",{className:"s-settings-live-preview-row","data-selected":!0,children:[e.jsx("i",{}),e.jsx("b",{children:"Openscout"}),e.jsx("small",{children:"now"})]}),e.jsxs("span",{className:"s-settings-live-preview-row",children:[e.jsx("i",{}),e.jsx("b",{children:"Hudson"}),e.jsx("small",{children:"8m"})]}),e.jsxs("span",{className:"s-settings-live-preview-row",children:[e.jsx("i",{}),e.jsx("b",{children:"Scout"}),e.jsx("small",{children:"1h"})]})]}),e.jsxs("div",{className:"s-settings-live-preview-detail",children:[e.jsx("span",{className:"s-settings-live-preview-kicker",children:"ACTIVE FLIGHT"}),e.jsx("strong",{children:"Theme system review"}),e.jsx("p",{children:"Separating palette, interface shape, and contrast keeps every choice honest."}),e.jsxs("div",{className:"s-settings-live-preview-event",children:[e.jsx("i",{})," Agent is working · updated now"]}),e.jsx("button",{type:"button",tabIndex:-1,children:"Open trace"})]})]})]})}function fs(){const t=Ge(),{appearanceDetails:s,updateAppearanceDetails:n}=ee();if(!t)return e.jsx("div",{className:"s-settings-inline-note",children:"Theme controls are unavailable in this embedded surface."});const i=t.resolvedTheme??"dark",h=we(t.template)??"hudson",m=re.find(a=>a.id===s.palette)?.label??"Scout",x=oe.find(a=>a.id===h)?.label??"Rounded",b=ce.find(a=>a.id===s.contrast)?.label??"Defined",f=de.find(a=>a.id===s.accent)?.label??"Theme",d=ue.find(a=>a.id===s.avatarStyle)?.label??"Generative",c=he.find(a=>a.id===s.avatarSize)?.label??"Regular";return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"App layout",right:`currently ${s.shell}`}),e.jsx("div",{className:"s-settings-shell-grid",role:"group","aria-label":"App layout",children:bs.map(a=>{const r=s.shell===a.id;return e.jsxs("button",{type:"button",className:"s-settings-shell-choice","data-shell":a.id,"data-active":r||void 0,"aria-pressed":r,onClick:()=>n({shell:a.id}),children:[e.jsxs("span",{className:"s-settings-shell-sample","aria-hidden":"true",children:[e.jsx("i",{"data-part":"top"}),e.jsx("i",{"data-part":"rail"}),e.jsxs("i",{"data-part":"list",children:[e.jsx("b",{}),e.jsx("b",{}),e.jsx("b",{})]}),e.jsxs("i",{"data-part":"content",children:[e.jsx("b",{}),e.jsx("b",{}),e.jsx("b",{})]})]}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:a.label}),r?e.jsx(D,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:a.sub})]})]},a.id)})}),e.jsx(j,{label:"Color mode",right:`currently ${i}`}),e.jsx("div",{className:"s-settings-theme-mode-grid",role:"group","aria-label":"Color mode",children:ps.map(a=>{const r=a.icon,p=t.theme===a.id,N=a.id==="system"?`Follow this device · resolves to ${t.resolvedTheme??"…"}`:a.sub;return e.jsxs("button",{type:"button",className:"s-settings-theme-mode","data-active":p||void 0,"aria-pressed":p,onClick:()=>t.setTheme(a.id),children:[e.jsx(r,{size:18,strokeWidth:1.7,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:a.label}),e.jsx("small",{children:N})]}),p?e.jsx(D,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]},a.id)})}),e.jsxs("div",{className:"s-settings-appearance-workbench",children:[e.jsxs("div",{className:"s-settings-appearance-controls",children:[e.jsx(j,{label:"Color theme",right:`currently ${m.toLowerCase()}`}),e.jsx("div",{className:"s-settings-palette-grid",role:"group","aria-label":"Color theme",children:re.map(a=>{const r=s.palette===a.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice","data-active":r||void 0,"aria-pressed":r,onClick:()=>n({palette:a.id}),children:[e.jsx(js,{palette:a.id,theme:i,template:h}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:a.label}),r?e.jsx(D,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:a.sub}),e.jsx("span",{children:a.spec})]})]},a.id)})}),e.jsx(j,{label:"Interface shape",right:`currently ${x.toLowerCase()}`}),e.jsx("div",{className:"s-settings-interface-grid",role:"group","aria-label":"Interface shape",children:oe.map(a=>{const r=h===a.id;return e.jsxs("button",{type:"button",className:"s-settings-interface-choice","data-active":r||void 0,"aria-pressed":r,onClick:()=>t.setTemplate(a.id),children:[e.jsx(Q,{className:"s-settings-shape-sample",theme:i,template:a.id,palette:s.palette,contrast:s.contrast,accent:s.accent,children:e.jsx("i",{children:e.jsx("i",{})})}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:a.label}),r?e.jsx(D,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:a.sub}),e.jsx("span",{children:a.spec})]})]},a.id)})}),e.jsx(j,{label:"Separation",right:`currently ${b.toLowerCase()}`}),e.jsx("div",{className:"s-settings-contrast-grid",role:"group","aria-label":"Interface contrast",children:ce.map(a=>{const r=s.contrast===a.id;return e.jsxs("button",{type:"button",className:"s-settings-contrast-choice","data-active":r||void 0,"aria-pressed":r,onClick:()=>n({contrast:a.id}),children:[e.jsxs("span",{className:"s-settings-contrast-lines","data-level":a.id,"aria-hidden":!0,children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsx("strong",{children:a.label}),e.jsx("small",{children:a.sub})]},a.id)})}),e.jsx(j,{label:"Signal accent",right:`currently ${f.toLowerCase()}`}),e.jsx("div",{className:"s-settings-accent-row",role:"group","aria-label":"Signal accent",children:de.map(a=>{const r=s.accent===a.id;return e.jsxs("button",{type:"button",className:"s-settings-accent-choice","data-accent-option":a.id,"data-active":r||void 0,"aria-pressed":r,"aria-label":`${a.label} accent`,onClick:()=>n({accent:a.id}),children:[e.jsx(Q,{className:"s-settings-accent-dot",theme:i,template:h,palette:s.palette,contrast:s.contrast,accent:a.id,children:e.jsx("i",{})}),e.jsx("span",{children:a.label}),r?e.jsx(D,{size:13,"aria-hidden":!0}):null]},a.id)})}),e.jsx(j,{label:"Avatar system",right:`currently ${d.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-grid",role:"group","aria-label":"Avatar system",children:ue.map(a=>{const r=s.avatarStyle===a.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice s-settings-avatar-choice","data-active":r||void 0,"aria-pressed":r,onClick:()=>n({avatarStyle:a.id}),children:[e.jsx("div",{className:"s-settings-avatar-preview",children:a.id==="crew"?e.jsx(J,{slug:"milo",size:38,ring:!1,badge:!1}):a.id==="chip"?e.jsx(J,{slug:"milo",size:38,chip:!0,ring:!1,badge:!1}):e.jsx(ie,{name:"Milo",size:38})}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:a.label}),r?e.jsx(D,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:a.sub}),e.jsxs("span",{children:[a.spec,(()=>{const p=ke(a.id);return p?` · ${p.covered} of ${p.total} cast`:" · every agent"})()]})]})]},a.id)})}),e.jsx(j,{label:"Avatar size",right:`currently ${c.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-size-row",role:"group","aria-label":"Avatar size",children:he.map(a=>{const r=s.avatarSize===a.id,p=ne("row",a.id)??24;return e.jsxs("button",{type:"button",className:"s-settings-avatar-size-choice","data-active":r||void 0,"aria-pressed":r,onClick:()=>n({avatarSize:a.id}),children:[e.jsx("span",{className:"s-settings-avatar-size-sample","aria-hidden":!0,children:xs.map(N=>s.avatarStyle==="sprite"?e.jsx(ie,{name:N,size:p},N):e.jsx(J,{slug:N,size:p,chip:s.avatarStyle==="chip",ring:!1,badge:!1},N))}),e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:a.label}),r?e.jsx(D,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:a.sub}),e.jsx("span",{className:"s-settings-avatar-size-spec",children:`${p}PX ROW · ${ne("inspector",a.id)}PX TILE`})]},a.id)})}),e.jsxs("div",{className:"s-settings-appearance-note",children:[e.jsx("strong",{children:"Saved on this device"}),e.jsx("span",{children:"Layout, mode, palette, shape, separation, and accent stay in sync across tabs. URL overrides remain available for embeds and visual QA."})]})]}),e.jsxs("aside",{className:"s-settings-preview-column","aria-label":"Live appearance preview",children:[e.jsx(j,{label:"Live specimen",right:i}),e.jsx(ys,{theme:i,template:h,palette:s.palette,contrast:s.contrast,accent:s.accent}),e.jsxs("dl",{className:"s-settings-theme-readout",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Palette"}),e.jsx("dd",{children:m})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Shape"}),e.jsx("dd",{children:x})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Separation"}),e.jsx("dd",{children:b})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Accent"}),e.jsx("dd",{children:f})]})]}),e.jsx("p",{className:"s-settings-preview-note",children:"Each control changes one visual axis. Success, warning, and failure colors keep their meaning."})]})]})]})}function Ss({profile:t,update:s}){const{appearanceDetails:n,updateAppearanceDetails:i}=ee(),[h,m]=o.useState(n.operatorCharacter||"milo"),x=h,[b,f]=o.useState(!0),d=Z.find(a=>a.slug.toLowerCase()===x.toLowerCase())??Z[0],c=a=>{m(a),i({operatorCharacter:a})};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Operator Character Stage",right:"cast mascot & identity"}),e.jsxs("div",{className:"s-settings-stage-hero-card","data-open":b?"true":"false",children:[e.jsxs("div",{className:"s-settings-stage-hero-header",children:[e.jsxs("div",{className:"s-settings-stage-hero-badge",children:[e.jsx("span",{className:"s-settings-stage-live-dot"}),e.jsx("span",{className:"s-settings-stage-badge-text",children:b?"FULL FIGURE BREAKOUT":"COIN DISC FRAMING"})]}),e.jsx("button",{type:"button",className:"s-settings-stage-toggle-btn",onClick:()=>f(a=>!a),title:b?"Collapse to coin framing":"Break out to full body figure",children:b?e.jsxs(e.Fragment,{children:[e.jsx(Xe,{size:13,"aria-hidden":!0}),e.jsx("span",{children:"Coin Framing"})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ze,{size:13,"aria-hidden":!0}),e.jsx("span",{children:"Breakout Figure"})]})})]}),e.jsxs("div",{className:"s-settings-stage-hero-body",children:[e.jsxs("div",{className:"s-settings-stage-art-col",children:[e.jsx(is,{slug:x,open:b,onToggle:()=>f(a=>!a),coin:64,figure:256,state:"working"}),e.jsx("span",{className:"s-settings-stage-click-hint",children:b?"Click avatar to collapse":"Click avatar to break out"})]}),e.jsxs("div",{className:"s-settings-stage-meta-col",children:[e.jsxs("div",{className:"s-settings-stage-title-row",children:[e.jsx("span",{className:"s-settings-stage-char-name",children:d.name}),e.jsx("span",{className:"s-settings-stage-char-title",children:d.title})]}),e.jsx("div",{className:"s-settings-stage-kernel-pill",children:e.jsx("code",{children:d.kernel})}),e.jsx("p",{className:"s-settings-stage-blurb",children:d.blurb}),e.jsxs("div",{className:"s-settings-stage-identity-group",children:[e.jsxs("div",{className:"s-settings-stage-operator-id",children:[e.jsx("strong",{children:t.name||"Operator"}),e.jsxs("span",{children:[t.handle||"@you"," · ",t.pronouns||"—"]})]}),e.jsxs("div",{className:"s-settings-hue-wrap",children:[e.jsx("span",{className:"s-settings-field-label",children:"Stage & Identity Hue"}),e.jsx("div",{className:"s-settings-hue-row",children:hs.map(a=>e.jsx("button",{type:"button",onClick:()=>s({hue:a}),className:`s-settings-hue-dot${t.hue===a?" s-settings-hue-dot--active":""}`,style:{background:ms(a)},title:`Hue ${a}°`},a))})]})]})]})]})]}),e.jsxs(e.Fragment,{children:[e.jsx(j,{label:"Your character mascot",right:`currently ${d.name.toLowerCase()}`}),e.jsx("div",{className:"s-settings-cast-grid-wrap",children:e.jsx(Ue,{selectedSlug:x,onSelect:c})})]}),e.jsx(k,{label:"Display name",hint:"Shown when agents address you.",children:e.jsx(K,{value:t.name,onChange:a=>s({name:a})})}),e.jsx(k,{label:"Handle",hint:"Used in @mentions across threads.",children:e.jsx(K,{value:t.handle,onChange:a=>s({handle:a}),mono:!0})}),e.jsx(k,{label:"Pronouns",children:e.jsx(K,{value:t.pronouns,onChange:a=>s({pronouns:a})})}),e.jsx(j,{label:"How agents understand you",right:"shipped as system prompt context"}),e.jsx(k,{label:"Operator bio",hint:"How you want to be worked with. Agents read this before asking you things.",children:e.jsx(le,{value:t.bio,onChange:a=>s({bio:a}),rows:4})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Timezone",children:e.jsx(K,{value:t.timezone,onChange:a=>s({timezone:a}),mono:!0})}),e.jsx(k,{label:"Working hours",children:e.jsx(K,{value:t.workingHours,onChange:a=>s({workingHours:a}),mono:!0})})]}),e.jsx(j,{label:"Ephemeral agent names",right:"rotation pool for one-off agents"}),e.jsx(k,{label:"Name pool",hint:t.provisionalAgentNames.length>0?`${t.provisionalAgentNamesResolvedCount} names active (${t.provisionalAgentNamesSource}). Preview: ${t.provisionalAgentNamesPreview.join(", ")}${t.provisionalAgentNamesResolvedCount>t.provisionalAgentNamesPreview.length?", …":""}`:"Leave empty to use Scout's built-in rotation. One short name per line.",children:e.jsx(le,{value:t.provisionalAgentNames.join(`
2
- `),onChange:a=>s({provisionalAgentNames:a.split(/\r?\n/u).map(r=>r.trim()).filter(Boolean)}),rows:6})}),e.jsx(k,{label:"Pool mode",hint:"Replace uses only your list. Add to defaults prepends yours, then Scout's built-in names.",children:e.jsx(W,{value:t.provisionalAgentNamesMode,onChange:a=>s({provisionalAgentNamesMode:a}),options:[{id:"replace",label:"Replace",sub:"your list only"},{id:"extend",label:"Add to defaults",sub:"yours first, then Scout"}],columns:2})})]})}function Ns({profile:t,update:s}){return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Interrupt policy"}),e.jsx(k,{label:"When agents can ping you directly",hint:"Blocking-only means only asks that truly stall work. Others get batched.",children:e.jsx(W,{value:t.interruptThreshold,onChange:n=>s({interruptThreshold:n}),options:[{id:"always",label:"Always",sub:"any ask, any time"},{id:"blocking-only",label:"Blocking only",sub:"stuck agents · default"},{id:"batched",label:"Batched",sub:"grouped every 15m"},{id:"never",label:"Never",sub:"queue only, I'll check in"}]})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Batch window (min)",children:e.jsx(gs,{value:t.batchWindow,min:5,max:60,step:5,onChange:n=>s({batchWindow:n}),unit:"min"})}),e.jsx(k,{label:"Quiet hours",children:e.jsx(K,{value:t.quietHours,onChange:n=>s({quietHours:n}),mono:!0})})]}),e.jsx(j,{label:"Where to reach you"}),e.jsx(k,{label:"Preferred channel",children:e.jsx(W,{value:t.channel,onChange:n=>s({channel:n}),options:[{id:"here",label:"Here only",sub:"desktop app"},{id:"mobile",label:"Mobile only",sub:"paired phone"},{id:"here+mobile",label:"Both",sub:"whichever is active"}]})}),e.jsx(j,{label:"Tone calibration",right:"how agents write to you"}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Verbosity",children:e.jsx(W,{stacked:!0,value:t.verbosity,onChange:n=>s({verbosity:n}),options:[{id:"terse",label:"Terse",sub:"one-liners, answers only"},{id:"normal",label:"Normal",sub:"context + answer"},{id:"detailed",label:"Detailed",sub:"show reasoning"}]})}),e.jsx(k,{label:"Tone",children:e.jsx(W,{stacked:!0,value:t.tone,onChange:n=>s({tone:n}),options:[{id:"direct",label:"Direct",sub:"no hedging"},{id:"warm",label:"Warm",sub:"friendly, conversational"},{id:"formal",label:"Formal",sub:"business-like"}]})})]})]})}function ws({clientCredentials:t,serverCredentials:s,reloadCredentials:n}){const[i,h]=o.useState(""),[m,x]=o.useState(!1),[b,f]=o.useState(null),d=s?.openai??null,c=!!d?.configured,a=d?.source==="env"?"OPENAI_API_KEY":d?.source==="local-config"?"local Scout config":d?.source==="local-store"?"local OpenScout store":"missing",r=d?.source==="local-store"&&t?.configured?"local OpenScout store + HudVault mirror":a,p=d?.preview??t?.preview??null,N=async()=>{x(!0),f(null);try{const S=i.trim();await Re(S);let w=null;try{await Pe(S)}catch(A){w=A instanceof Error?A.message:"HudVault save failed."}h(""),await n(),f(w?`Saved to local OpenScout store. Browser mirror failed: ${w}`:"Saved to local OpenScout store and Hudson Vault.")}catch(S){f(S instanceof Error?S.message:"Could not save key.")}finally{x(!1)}},I=async()=>{x(!0),f(null);try{const[S,w]=await Promise.allSettled([Ie(),$e()]);h(""),await n(),S.status==="rejected"||w.status==="rejected"?f("Cleared what I could; one credential store did not respond."):f(d?.source==="env"||d?.source==="local-config"?"Removed saved key. Server fallback is still configured.":"Removed saved key.")}catch(S){f(S instanceof Error?S.message:"Could not clear key.")}finally{x(!1)}};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Model providers",right:c?`configured · ${r}`:"missing"}),e.jsx("div",{className:"s-settings-relay-card",children:e.jsxs("div",{children:[e.jsxs("div",{className:"s-settings-relay-title",children:["OpenAI · ",e.jsxs("span",{className:"s-settings-device-status",style:{color:c?"var(--green)":"var(--dim)"},children:["●"," ",c?"ready":"missing"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[p??"No key stored"," · ",r]}),e.jsx("div",{className:"s-settings-relay-desc",children:"Scout stores user-entered keys in the local OpenScout credential store and keeps a HudVault mirror for this browser profile."})]})}),e.jsx(k,{label:"OpenAI API key",hint:"Saved locally. Existing keys are never shown again.",children:e.jsx("input",{className:"s-settings-input s-settings-input--mono",type:"password",value:i,placeholder:c?"Saved key configured":"sk-...",autoComplete:"off",spellCheck:!1,onChange:S=>h(S.target.value)})}),b&&e.jsx("div",{className:"s-settings-field-hint",children:b}),e.jsxs("div",{className:"s-settings-button-row",children:[e.jsx("button",{type:"button",className:"s-btn",disabled:m||!i.trim(),onClick:()=>{N()},children:m?"Saving":"Save key"}),e.jsx("button",{type:"button",className:"s-btn",disabled:m||!(t?.configured||d?.source==="local-store"),onClick:()=>{I()},children:"Clear saved key"})]})]})}const ks=[{id:"auto",label:"Auto",sub:"Parakeet when warm, Apple fallback"},{id:"parakeet",label:"Parakeet",sub:"on-device, best quality"},{id:"apple",label:"Apple Speech",sub:"instant, no model warmup"}];function Cs(){const t=Ae(Le,!0),[s,n]=o.useState(null),[i,h]=o.useState(null),[m,x]=o.useState(null),[b,f]=o.useState([]),[d,c]=o.useState([]),[a,r]=o.useState(!0),[p,N]=o.useState(!1),[I,S]=o.useState(!1),[w,A]=o.useState(!1),[$,v]=o.useState(null),_=o.useCallback(async()=>{r(!0);try{const[l,u,y,X]=await Promise.all([He(),ze(12).catch(()=>[]),Me().catch(()=>null),cs().catch(()=>null)]);n(l.settings),f(l.devices),c(u),h(y),x(X),v(null)}catch(l){v(l instanceof Error?l.message:String(l))}finally{r(!1)}},[]);o.useEffect(()=>{_()},[_]);const O=o.useCallback(async l=>{N(!0),v(null);try{const u=await Be(l);n(u.settings),f(u.devices)}catch(u){v(u instanceof Error?u.message:String(u))}finally{N(!1)}},[]),V=o.useCallback(async l=>{S(!0),v(null);try{const u=await _e(l);h(u),De(u)}catch(u){v(u instanceof Error?u.message:String(u))}finally{S(!1)}},[]),H=o.useCallback(async l=>{A(!0),v(null);try{const u=await ds(l?"host":"browser");x(u),us(u)}catch(u){v(u instanceof Error?u.message:String(u))}finally{A(!1)}},[]);if(a&&!s)return e.jsx("div",{className:"s-settings-field-hint",children:"Loading voice settings…"});const z=s?.inputDeviceId??b.find(l=>l.isDefault)?.id??"",R=s?.permissions?.find(l=>l.kind==="microphone")??null,E=s?.permissions?.find(l=>l.kind==="speechRecognition")??null,L=(s?.permissions?.length??0)>0||b.length>0,T=t&&i?.enabled===!0,G=I||!t||!i||i.locked,F=t?i?i.locked?`Controlled by OPENSCOUT_REALTIME_VOICE_ENABLED · ${i.enabled?"on":"off"}`:T?"Ready. Use Voice in the footer to start a call.":"Off. No microphone or OpenAI connection runs in the background.":"Live voice settings are temporarily unavailable.":"Unavailable in this build.",P=m?.playback==="host",U=w||!m||m.locked,M=m?m.locked?`Controlled by ${rs} · ${m.playback}`:P?L?"On. Scout Menu speaks replies on this Mac in its own voice.":"On, but Scout Menu is offline. Launch it on this Mac to hear replies.":"Off. Replies play in this browser.":"Playback settings are temporarily unavailable.",g=[L?null:"Scout voice host is offline. Launch Scout Menu on this Mac — the browser does not capture audio.",R?.status==="denied"||R?.status==="restricted"?R?.status==="restricted"?"Microphone access is restricted on this Mac.":"Microphone access is off for Scout Menu. Choose Retry access to reopen the macOS permission pane.":R?.canRequest?"Microphone has not been requested yet. Request access or tap the mic in chat to show the macOS prompt.":null,!E?.granted&&(E?.status==="denied"||E?.status==="restricted")?E?.status==="restricted"?"Speech recognition is restricted on this Mac.":"Speech recognition is off for Scout Menu. Open Privacy & Security → Speech Recognition to change it.":null,s?.modelReady?null:"Parakeet may download on first use. Apple Speech stays available while the model warms.","Dictation requires Scout Menu running. The browser does not capture audio.","If transcription hangs on Processing, wait up to 60 seconds or tap the mic again to cancel."].filter(l=>!!l);return e.jsxs("div",{className:"s-settings-col-gap",children:[$&&e.jsx("div",{className:"s-settings-field-hint",style:{color:"var(--amber)"},children:$}),e.jsx(j,{label:"Realtime conversation",right:"operator control"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":T||void 0,"data-unavailable":!t||void 0,children:[e.jsxs("span",{className:"s-settings-realtime-voice-copy",children:[e.jsx("strong",{children:"Enable live voice on this Scout"}),e.jsx("span",{children:"Allows live conversations with Scoutbot. Microphone audio and OpenAI usage begin only when you explicitly start a call."}),e.jsx("em",{children:F})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":T,"aria-label":"Enable live voice on this Scout",disabled:G,"data-checked":T||void 0,className:"s-settings-switch",onClick:()=>{V(!T)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:T?"On":"Off"})]})]}),e.jsx(j,{label:"Spoken replies",right:"where they play"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":P||void 0,children:[e.jsxs("span",{className:"s-settings-realtime-voice-copy",children:[e.jsx("strong",{children:"Speak on this Mac"}),e.jsx("span",{children:"Spoken replies and briefs play through Scout Menu on the Mac instead of this browser tab, in the voice chosen in Scout Menu › Voice. Installed voices such as Kokoro work only this way. A surface or agent can still name the browser for one utterance."}),e.jsx("em",{children:M})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":P,"aria-label":"Speak on this Mac",disabled:U,"data-checked":P||void 0,className:"s-settings-switch",onClick:()=>{H(!P)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:P?"On":"Off"})]})]}),e.jsx(Ke,{hostOnline:L,micPermission:R,speechPermission:E,modelReady:s?.modelReady}),e.jsx(j,{label:"Scout Menu permissions",right:"voice host"}),e.jsx(We,{permissions:s?.permissions,hostOnline:L,disabled:p||a,onError:l=>v(l),onRefresh:_}),e.jsx(j,{label:"Transcription"}),e.jsx(k,{label:"Engine",hint:s?.modelReady?"Parakeet is warm and ready.":s?.modelInstalled?"Parakeet is installed; first dictation may warm the model.":"Parakeet downloads on first use. Apple Speech stays available meanwhile.",children:e.jsx(W,{value:s?.preference??"auto",onChange:l=>{n(u=>u&&{...u,preference:l}),O({preference:l})},options:ks,columns:3})}),e.jsx(k,{label:"Microphone input",hint:"Scout Menu uses the macOS system default input unless you pick a device here. The browser never captures audio.",children:b.length>0?e.jsx("select",{className:"s-settings-input",value:z,disabled:p,onChange:l=>{const u=l.target.value||null;n(y=>y&&{...y,inputDeviceId:u,inputDeviceName:b.find(X=>X.id===u)?.name??null}),O({inputDeviceId:u})},children:b.map(l=>e.jsxs("option",{value:l.id,children:[l.name,l.isDefault?" (system default)":""]},l.id))}):e.jsx("div",{className:"s-settings-field-hint",children:"Scout Menu is not reporting microphones. Launch Scout Menu, grant mic access, then refresh."})}),e.jsx(j,{label:"Diagnostics"}),e.jsx("ul",{className:"s-settings-field-hint",style:{margin:0,paddingLeft:"1.1rem",display:"grid",gap:"0.35rem"},children:g.map(l=>e.jsx("li",{children:l},l))}),e.jsx(j,{label:"Recent sessions",right:d.length?`${d.length} shown`:"none"}),d.length===0?e.jsx("div",{className:"s-settings-field-hint",children:"No recent dictation sessions on this web server. History fills as you use the mic in chat."}):e.jsx("div",{className:"s-settings-col-gap",style:{gap:"0.35rem"},children:d.map(l=>e.jsx("div",{className:"s-settings-device-row",style:{alignItems:"flex-start"},children:e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{className:"s-settings-device-name",style:{fontFamily:"var(--mono)"},children:[l.status," · ",l.lastEvent??"started"]}),e.jsxs("div",{className:"s-settings-device-meta",children:[l.surface," · ",Ve(l.updatedAt),l.error?` · ${l.error}`:""]}),l.lastTranscript?e.jsx("div",{className:"s-settings-field-hint",style:{marginTop:"0.2rem"},children:l.lastTranscript.length>96?`${l.lastTranscript.slice(0,96)}…`:l.lastTranscript}):null]})},l.sessionId))}),e.jsx("div",{className:"s-settings-button-row",children:e.jsx("button",{type:"button",className:"s-btn",disabled:a||p,onClick:()=>{_()},children:a?"Refreshing…":"Refresh"})})]})}const As={desktop:"◻",mobile:"▯",tablet:"▭"};function Es({device:t}){const s=t.status==="this-device"?"var(--accent)":t.status==="online"?"var(--green)":"var(--dim)";return e.jsxs("div",{className:"s-settings-device-row",children:[e.jsx("span",{className:"s-settings-device-icon",children:As[t.kind]??"□"}),e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-device-name",children:t.name}),e.jsxs("div",{className:"s-settings-device-meta",children:[t.kind," · via ",t.relay," · ",t.lastSeen]})]}),e.jsxs("span",{className:"s-settings-device-status",style:{color:s},children:["●"," ",t.status==="this-device"?"this device":t.status]}),e.jsx("button",{className:"s-btn",disabled:t.status==="this-device",children:t.status==="this-device"?"—":"Unpair"})]})}function Ts({pairing:t}){const s=[{id:"local",name:"This machine",kind:"desktop",status:"this-device",relay:"local",lastSeen:"now"}];if(t?.trustedPeers)for(const n of t.trustedPeers){const i=n.fingerprint===t.connectedPeerFingerprint;s.push({id:n.fingerprint,name:n.name??"Paired device",kind:"mobile",status:i?"online":"offline",relay:"tailscale",lastSeen:n.lastSeenLabel??"—"})}return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:`Paired devices · ${s.length}`}),e.jsx("div",{className:"s-settings-col-gap",style:{gap:10},children:s.map(n=>e.jsx(Es,{device:n},n.id))}),e.jsx(j,{label:"Relay"}),e.jsxs("div",{className:"s-settings-relay-card",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"s-settings-relay-title",children:["Relay · ",e.jsxs("span",{className:"s-settings-device-status",style:{color:t?.isRunning?"var(--green)":"var(--dim)"},children:["●"," ",t?.isRunning?"connected":"offline"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[t?.relay??"not configured"," · tailscale"]}),e.jsx("div",{className:"s-settings-relay-desc",children:"Agents route through your relay to reach mobile when the app is backgrounded. End-to-end encrypted; keys never leave your devices."})]}),e.jsx("button",{className:"s-btn",children:"Configure"})]})]})}function Y(t,s,n=!1){if(!t&&!s)return"Not reported";const i=t||"detached";return s?`${i} @ ${s}${n?" (modified)":""}`:i}function be(){return navigator.userAgentData?.platform||navigator.platform||"Unknown"}function C({label:t,value:s,detail:n}){return e.jsxs("div",{className:"s-settings-about-fact",children:[e.jsx("dt",{children:t}),e.jsxs("dd",{children:[e.jsx("code",{children:s}),n?e.jsx("span",{children:n}):null]})]})}function me(t){const{build:s,mesh:n}=t,i=n?.health.build??null,h=n?.localNode?n.nodes[n.localNode.id]?.host:void 0,m=be();return["OpenScout troubleshooting report",`Collected: ${t.collectedAt.toISOString()}`,"","[Web]",`Observed: ${t.buildCollectedAt?.toISOString()??"unknown"}`,`Version: ${s?.version??"unknown"}`,`Mode: ${s?.mode??"unknown"}`,`Source: ${Y(s?.branch,s?.commit,s?.dirty===!0)}`,`Server: ${s?.server?`${s.server.engine} ${s.server.engineVersion}`:"unknown"}`,`Server platform: ${s?.server?`${s.server.platform}/${s.server.arch}`:"unknown"}`,"","[Broker]",`Observed: ${t.meshCollectedAt?.toISOString()??"unknown"}`,`Reachable: ${n?.health.reachable===void 0?"unknown":n.health.reachable?"yes":"no"}`,`Healthy: ${n?.health.ok===void 0?"unknown":n.health.ok?"yes":"no"}`,`Error: ${n?.health.error??"none reported"}`,`Package: ${i?.packageName??"unknown"}`,`Version: ${i?.version??"unknown"}`,`Mode: ${i?.mode??"unknown"}`,`Source: ${Y(i?.branch,i?.commit)}`,`Build: ${i?.buildNumber??i?.buildId??"not reported"}`,`Node: ${n?.health.nodeId??"unknown"}`,`Broker URL: ${n?.brokerUrl??"unknown"}`,"","[Host]",`Name: ${n?.localNode?.name??"unknown"}`,`Scout version: ${h?.scoutVersion??"not reported"}`,`System: ${h?.os??"unknown"}`,`Architecture: ${h?.arch??s?.server?.arch??"unknown"}`,"","[Browser]",`Platform: ${m}`,`User agent: ${navigator.userAgent}`,`Origin: ${window.location.origin}`].join(`
3
- `)}async function Os(t){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(t);return}const s=document.createElement("textarea");s.value=t,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select();const n=document.execCommand("copy");if(s.remove(),!n)throw new Error("Clipboard access is unavailable")}function Rs(){const[t,s]=o.useState(null),[n,i]=o.useState(!0),[h,m]=o.useState(null),[x,b]=o.useState("idle"),f=o.useCallback(async(S=!1)=>{i(!0),m(null),b("idle");const[w,A]=await Promise.allSettled([B(S?"/api/build?refresh=1":"/api/build"),B("/api/mesh")]),$=new Date;if(s(v=>({build:w.status==="fulfilled"?w.value:v?.build??null,mesh:A.status==="fulfilled"?A.value:v?.mesh??null,collectedAt:$,buildCollectedAt:w.status==="fulfilled"?$:v?.buildCollectedAt??null,meshCollectedAt:A.status==="fulfilled"?$:v?.meshCollectedAt??null})),w.status==="rejected"||A.status==="rejected"){const v=[w.status==="rejected"?"web build":null,A.status==="rejected"?"broker":null].filter(Boolean).join(" and ");m(`Could not refresh ${v} details. Last reported values are kept when available.`)}i(!1)},[]);o.useEffect(()=>{f()},[f]);const d=t?.build??null,c=t?.mesh??null,a=c?.health.build??null,r=c?.localNode?c.nodes[c.localNode.id]?.host:void 0,p=be(),N=c===null?"not reported":c.health.reachable?c.health.ok?"healthy":"degraded":"unreachable",I=o.useCallback(()=>{t&&Os(me(t)).then(()=>{b("copied"),setTimeout(()=>b("idle"),1800)}).catch(()=>{b("error")})},[t]);return n&&!t?e.jsx("div",{className:"s-settings-loading",children:"Collecting version details…"}):e.jsxs("div",{className:"s-settings-about",children:[e.jsxs("div",{className:"s-settings-about-summary",children:[e.jsxs("div",{children:[e.jsx("span",{className:"s-settings-about-product",children:"OpenScout Web"}),e.jsx("strong",{children:d?.version?`v${d.version}`:"Version unavailable"}),e.jsxs("span",{className:"s-settings-about-source",children:[d?.mode??"unknown mode"," · ",Y(d?.branch,d?.commit,d?.dirty===!0)]}),e.jsxs("span",{className:"s-settings-about-collected",children:["Snapshot collected ",t?.collectedAt.toLocaleString()??"—"]})]}),e.jsxs("div",{className:"s-settings-about-actions",children:[e.jsxs("button",{type:"button",className:"s-btn",onClick:()=>{f(!0)},disabled:n,children:[e.jsx(qe,{size:13,"aria-hidden":!0}),n?"Refreshing…":"Refresh"]}),e.jsxs("button",{type:"button",className:"s-btn s-settings-about-copy",onClick:I,disabled:!t,children:[x==="copied"?e.jsx(D,{size:13,"aria-hidden":!0}):e.jsx(Ye,{size:13,"aria-hidden":!0}),x==="copied"?"Copied report":x==="error"?"Copy failed":"Copy report"]})]})]}),h?e.jsx("div",{className:"s-settings-about-warning",role:"status",children:h}):null,x==="error"&&t?e.jsxs("div",{className:"s-settings-about-copy-fallback",role:"alert",children:[e.jsx("strong",{children:"Clipboard access was denied."}),e.jsx("span",{children:"Select and copy the report below."}),e.jsx("textarea",{readOnly:!0,value:me(t),"aria-label":"OpenScout troubleshooting report"})]}):null,e.jsx(j,{label:"Web application",right:"release and source identity"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Package version",value:d?.version??"Unknown",detail:`Observed ${t?.buildCollectedAt?.toLocaleString()??"at an unknown time"}. Use this when comparing releases.`}),e.jsx(C,{label:"Run mode",value:d?.mode??"Unknown"}),e.jsx(C,{label:"Source checkout",value:Y(d?.branch,d?.commit,d?.dirty===!0),detail:"A dev SHA identifies the running checkout; it is not the release version."}),e.jsx(C,{label:"Server engine",value:d?.server?`${d.server.engine} ${d.server.engineVersion}`:"Not reported",detail:d?.server?`Node compatibility ${d.server.nodeVersion} · ${d.server.platform}/${d.server.arch}`:void 0})]}),e.jsx(j,{label:"Broker",right:N}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Status",value:N,detail:[`Observed ${t?.meshCollectedAt?.toLocaleString()??"at an unknown time"}.`,c?.health.error].filter(Boolean).join(" ")}),e.jsx(C,{label:"Package",value:a?.packageName??"Not reported"}),e.jsx(C,{label:"Version",value:a?.version??"Not reported"}),e.jsx(C,{label:"Source",value:Y(a?.branch,a?.commit)}),e.jsx(C,{label:"Build",value:a?.buildNumber??a?.buildId??"Not reported"}),e.jsx(C,{label:"Node",value:c?.health.nodeId??"Not reported",detail:c?.brokerUrl})]}),e.jsx(j,{label:"Host and browser",right:"troubleshooting context"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Host",value:c?.localNode?.name??"Not reported"}),e.jsx(C,{label:"Host Scout",value:r?.scoutVersion??"Not reported"}),e.jsx(C,{label:"Host system",value:[r?.os,r?.arch??d?.server?.arch].filter(Boolean).join(" · ")||"Not reported"}),e.jsx(C,{label:"Browser platform",value:p}),e.jsx(C,{label:"Browser",value:navigator.userAgent}),e.jsx(C,{label:"Page origin",value:window.location.origin})]}),e.jsx("p",{className:"s-settings-about-note",children:"Native app and CLI versions are shown only when those components report them. Scout does not infer a version from a nearby checkout."})]})}const q=[{id:"appearance",label:"Appearance",sub:"mode · workspace style"},{id:"operator",label:"Operator",sub:"identity · bio · hours"},{id:"comms",label:"Communication",sub:"how agents reach you"},{id:"voice",label:"Voice",sub:"realtime · playback · permissions · dictation"},{id:"credentials",label:"Credentials",sub:"model provider keys"},{id:"devices",label:"Paired devices",sub:"relay · connected"},{id:"about",label:"About",sub:"versions · build · runtime"}],ge={appearance:"Appearance",operator:"Operator identity",comms:"Communication",voice:"Voice",credentials:"Credentials",devices:"Paired devices",about:"About OpenScout"},Ps={appearance:"Choose how Scout looks on this device. Changes apply immediately across the workspace.",operator:"Your identity, availability, and the context agents receive when they work with you.",comms:"Set interruption rules, delivery channels, response style, and quiet hours.",voice:"Configure dictation, realtime voice, permissions, and input devices.",credentials:"Manage model-provider credentials stored by this Scout installation.",devices:"Review the relay and devices currently connected to this Scout workspace.",about:"Exact release, source, broker, host, and browser details for troubleshooting."},Is={name:"",handle:"",pronouns:"",hue:195,bio:"",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,workingHours:"08:00 – 18:00",interruptThreshold:"blocking-only",batchWindow:15,channel:"here+mobile",verbosity:"terse",tone:"direct",quietHours:"22:00 – 07:00",provisionalAgentNames:[],provisionalAgentNamesMode:"replace",provisionalAgentNamesResolvedCount:0,provisionalAgentNamesPreview:[],provisionalAgentNamesSource:"default"};function ve({open:t,onClose:s,section:n,onSectionChange:i,presentation:h}){const{refreshOnboarding:m}=ee(),{ref:x,onKeyDown:b}=Fe(t&&h==="drawer"),[f,d]=o.useState("appearance"),c=n??f,a=o.useCallback(g=>{i?i(g):d(g)},[i]),[r,p]=o.useState(Is),[N,I]=o.useState(null),[S,w]=o.useState(null),[A,$]=o.useState(null),[v,_]=o.useState(!1),[O,V]=o.useState("saved"),H=o.useRef(null),z=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>()=>{z.current=!1},[]);const E=o.useCallback(async()=>{const[g,l]=await Promise.allSettled([Ee(),Te()]),u=g.status==="fulfilled"?g.value:null;let y=l.status==="fulfilled"?l.value:null;u?.configured&&!y?.openai.configured&&(y=await Oe().catch(()=>y)),w(u),$(y)},[]),L=o.useCallback(async()=>{try{const g=B("/api/user"),l=Promise.race([B("/api/pairing-state"),new Promise((X,ye)=>setTimeout(()=>ye(new Error("timeout")),3e3))]),[u,y]=await Promise.allSettled([g,l]);u.status==="fulfilled"&&p(u.value),y.status==="fulfilled"&&I(y.value),await E()}finally{_(!0)}},[E]);o.useEffect(()=>{t&&c!=="appearance"&&c!=="about"&&!v&&L()},[v,t,L,c]),o.useEffect(()=>{if(!t||!window.matchMedia("(max-width: 760px)").matches)return;const g=window.requestAnimationFrame(()=>{R.current?.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>window.cancelAnimationFrame(g)},[t,c]);const T=o.useCallback(g=>{const u=(q.findIndex(y=>y.id===c)+g+q.length)%q.length;a(q[u].id)},[c]),G=o.useCallback(g=>{if(b(g),h==="drawer"&&g.key==="Escape"){g.preventDefault(),s();return}g.target?.closest(".s-settings-rail")&&(g.key==="ArrowDown"?(g.preventDefault(),T(1)):g.key==="ArrowUp"&&(g.preventDefault(),T(-1)))},[T,s,b,h]),F=o.useCallback(g=>{H.current&&clearTimeout(H.current),V("saving"),H.current=setTimeout(()=>{B("/api/user",{method:"POST",body:JSON.stringify(g)}).then(()=>m()).then(()=>{z.current&&V("saved")}).catch(()=>{z.current&&V("error")})},400)},[m]),P=o.useCallback(g=>{p(l=>{const u={...l,...g};return F(u),u})},[F]),U=e.jsx("nav",{className:"s-settings-rail","aria-label":"Settings pages",children:q.map(g=>{const l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-settings-rail-label",children:g.label}),e.jsx("span",{className:"s-settings-rail-sub",children:g.sub})]}),u=`s-settings-rail-btn${c===g.id?" s-settings-rail-btn--active":""}`;return h==="page"?e.jsx("a",{ref:c===g.id?y=>{R.current=y}:void 0,href:Ce({view:"settings",section:g.id}),"aria-current":c===g.id?"page":void 0,className:u,onClick:y=>{y.button!==0||y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||(y.preventDefault(),a(g.id))},children:l},g.id):e.jsx("button",{ref:c===g.id?y=>{R.current=y}:void 0,onClick:()=>a(g.id),"aria-current":c===g.id?"page":void 0,className:u,children:l},g.id)})}),M=e.jsx("main",{className:"s-settings-content",id:`settings-${c}`,"data-settings-section":c,tabIndex:-1,children:c==="appearance"?e.jsx(fs,{}):c==="about"?e.jsx(Rs,{}):v?e.jsxs(e.Fragment,{children:[c==="operator"&&e.jsx(Ss,{profile:r,update:P}),c==="comms"&&e.jsx(Ns,{profile:r,update:P}),c==="credentials"&&e.jsx(ws,{clientCredentials:S,serverCredentials:A,reloadCredentials:E}),c==="voice"&&e.jsx(Cs,{}),c==="devices"&&e.jsx(Ts,{pairing:N})]}):e.jsx("div",{className:"s-settings-loading",children:"Loading settings…"})});return h==="page"?e.jsxs("section",{className:"s-settings-page","aria-labelledby":"settings-page-title",children:[e.jsxs("header",{className:"s-settings-page-header",children:[e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-page-kicker",children:"Settings"}),e.jsx("h1",{id:"settings-page-title",children:ge[c]}),e.jsx("p",{children:Ps[c]})]}),c==="about"?e.jsxs("div",{className:"s-settings-page-save-state","data-state":"neutral",children:[e.jsx("span",{"aria-hidden":"true"}),"Diagnostic snapshot"]}):e.jsxs("div",{className:"s-settings-page-save-state","data-state":O,role:"status","aria-live":"polite",children:[e.jsx("span",{"aria-hidden":"true"}),O==="saving"?"Saving changes…":O==="error"?"Couldn’t save changes":"Saved automatically"]})]}),e.jsxs("div",{className:"s-settings-page-layout",children:[U,M]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`s-settings-scrim ${t?"s-settings-scrim--open":"s-settings-scrim--closed"}`,onClick:s}),e.jsxs("div",{ref:x,role:"dialog","aria-modal":"true","aria-label":"Settings",className:`s-settings-drawer ${t?"s-settings-drawer--open":"s-settings-drawer--closed"}`,onKeyDown:G,children:[e.jsxs("div",{className:"s-settings-header",children:[e.jsxs("div",{className:"s-settings-header-title",children:["⚙"," SETTINGS"]}),e.jsx("span",{className:"s-settings-header-sep",children:"/"}),e.jsx("span",{className:"s-settings-header-section",children:ge[c]}),e.jsx("span",{style:{flex:1}}),e.jsx("span",{className:"s-settings-header-hint",children:"ESC to close"}),e.jsx("button",{className:"s-settings-close",onClick:s,children:"×"})]}),U,M,e.jsxs("div",{className:"s-settings-footer",children:[e.jsxs("span",{className:"s-settings-footer-sync",children:["●"," synced"]}),e.jsx("span",{children:"·"}),e.jsx("span",{children:"changes apply instantly to every agent in your fleet"}),e.jsx("span",{style:{flex:1}}),e.jsx("button",{className:"s-btn",onClick:s,children:"Done"})]})]})]})}function xe(t){return e.jsx(ve,{...t,presentation:"drawer"})}function je({section:t="appearance",onSectionChange:s}){return e.jsx(ve,{open:!0,onClose:()=>{},section:t,onSectionChange:s,presentation:"page"})}const et=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:xe,SettingsPage:je},Symbol.toStringTag,{value:"Module"})),st=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:xe,SettingsPage:je},Symbol.toStringTag,{value:"Module"}));export{je as S,et as a,st as b};