@openscout/scout 0.2.107 → 0.2.108

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 (473) hide show
  1. package/README.md +53 -16
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-C1H-vL0L.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-CusDRiVO.js → AddProjectForm-4sVXmjfN.js} +1 -1
  6. package/dist/client/assets/{AdventureEvidence-CyegKk1V.js → AdventureEvidence-D5wq1vu8.js} +1 -1
  7. package/dist/client/assets/{AdventureReader-X-hbTOi0.js → AdventureReader-BICypcDY.js} +1 -1
  8. package/dist/client/assets/{AdventureScenery-LPXSVP67.js → AdventureScenery-CGEcG0zV.js} +1 -1
  9. package/dist/client/assets/AgentAdventures-5yBt-Zl3.js +1 -0
  10. package/dist/client/assets/{AgentAvatar-CrP1eXxk.js → AgentAvatar-Dn8TUv5W.js} +1 -1
  11. package/dist/client/assets/AgentConfigurationScreen-C0D9WNyL.js +1 -0
  12. package/dist/client/assets/AgentDefinitionsWorkspace-BzcBdC_s.js +1 -0
  13. package/dist/client/assets/{AgentDetailCard-DtHT3sCo.js → AgentDetailCard-CI-ufaEP.js} +1 -1
  14. package/dist/client/assets/AgentFloorView-D8tlGlgy.js +1 -0
  15. package/dist/client/assets/{AgentFloorWorld-CjoIa6jA.js → AgentFloorWorld-DqmnQexg.js} +1 -1
  16. package/dist/client/assets/AgentInfoScreen-BnRhfcFy.js +1 -0
  17. package/dist/client/assets/{AgentLaneCard-BaZ2g-f8.js → AgentLaneCard-pppHFROz.js} +1 -1
  18. package/dist/client/assets/{AgentLaneChrome-TF1SlJSc.js → AgentLaneChrome-RptImDFc.js} +1 -1
  19. package/dist/client/assets/{AgentLaneDetailSheet-EzEPsn3g.js → AgentLaneDetailSheet-BqbwGskh.js} +1 -1
  20. package/dist/client/assets/{AgentLaneSummaryResize-dpp7YvrX.js → AgentLaneSummaryResize-DaIgwyVh.js} +1 -1
  21. package/dist/client/assets/AgentLanesEmbedScreen-De6C4ZOw.js +1 -0
  22. package/dist/client/assets/{AgentLanesPreflight-Ry-aqDTr.js → AgentLanesPreflight-BQfj2twF.js} +1 -1
  23. package/dist/client/assets/{AgentLanesView-BJi9xXz6.js → AgentLanesView-CiISx7pu.js} +1 -1
  24. package/dist/client/assets/{AgentLiveActions-CfTupTEl.js → AgentLiveActions-CkRGkv13.js} +1 -1
  25. package/dist/client/assets/AgentMasterScreen-CijN_4tN.js +1 -0
  26. package/dist/client/assets/{AgentSessions-B1gOhDBf.js → AgentSessions-ghjQcSrh.js} +2 -2
  27. package/dist/client/assets/AgentsConsole-D8upjDpn.js +1 -0
  28. package/dist/client/assets/AgentsScreen-C17BFqjf.js +1 -0
  29. package/dist/client/assets/AgentsSubnav-_1GVC4hj.js +1 -0
  30. package/dist/client/assets/{AstronautSuit-Cchnc4Ug.js → AstronautSuit-Dzu4GOMR.js} +1 -1
  31. package/dist/client/assets/{AtopView-gkEp4y__.js → AtopView-DJK5b3lZ.js} +1 -1
  32. package/dist/client/assets/{BackToPicker-CUkjnoVk.js → BackToPicker-BPU7kbXq.js} +1 -1
  33. package/dist/client/assets/BriefingDetailScreen-CTvFw523.js +1 -0
  34. package/dist/client/assets/{BriefingsScreen-B1HlBMGZ.js → BriefingsScreen-DpVC3OUk.js} +1 -1
  35. package/dist/client/assets/{BrokerMetadataPanel-Dk242Yh_.js → BrokerMetadataPanel-glRVdwkU.js} +1 -1
  36. package/dist/client/assets/BrokerScreen-CqKsBwEx.js +8 -0
  37. package/dist/client/assets/{CastPicker-BXUtPAGC.js → CastPicker-Y29K5kKk.js} +1 -1
  38. package/dist/client/assets/ChannelComposer-D4EY9jVW.js +1 -0
  39. package/dist/client/assets/{ChannelSidebar-e9DOPulb.js → ChannelSidebar-CVmykV4d.js} +1 -1
  40. package/dist/client/assets/{CharacterFamilyPreview-DMfw7UM_.js → CharacterFamilyPreview-Bj8oMD-5.js} +1 -1
  41. package/dist/client/assets/{ChatAvatar-C3a_o5Hj.js → ChatAvatar-BsAOShUr.js} +1 -1
  42. package/dist/client/assets/{ChatBits-CsvxbToF.js → ChatBits-Cq54CmyB.js} +1 -1
  43. package/dist/client/assets/{ChatCollapsedStrip-FEmQ_G9J.js → ChatCollapsedStrip-B0DdrOo2.js} +1 -1
  44. package/dist/client/assets/{ChatRichInput-DhtwFxQE.js → ChatRichInput-DYJRhGTP.js} +1 -1
  45. package/dist/client/assets/ChatRightPanel-D94Lw7ud.js +1 -0
  46. package/dist/client/assets/ChatSpaceSurface-Cp532VmZ.js +1 -0
  47. package/dist/client/assets/{ChatSpaceTheme-CUH8bTZc.js → ChatSpaceTheme-DPzYpw-v.js} +1 -1
  48. package/dist/client/assets/{CodeDiffPane-DuQRwpgK.js → CodeDiffPane-DCgMUi39.js} +1 -1
  49. package/dist/client/assets/{CodeProjectPicker-ZQ6gSBpg.js → CodeProjectPicker-Dq787L77.js} +1 -1
  50. package/dist/client/assets/{CodeScreen-BXyKeL5T.js → CodeScreen-BN4TkiR0.js} +1 -1
  51. package/dist/client/assets/{CommsCanvas-THp0r_U8.js → CommsCanvas-Dh056d91.js} +1 -1
  52. package/dist/client/assets/{CommsDeck-BVmSMV2V.js → CommsDeck-CRXKIerH.js} +1 -1
  53. package/dist/client/assets/{CommsFlowGraph-DxoOaLF_.js → CommsFlowGraph-Cc48o9u_.js} +1 -1
  54. package/dist/client/assets/{CommsFlowMap-Vi8ziCPg.js → CommsFlowMap-Ckasql5e.js} +1 -1
  55. package/dist/client/assets/{CommsSelection-BUoRbu9o.js → CommsSelection-CuphnUny.js} +1 -1
  56. package/dist/client/assets/{ComposerAttachments-DW0AIb8k.js → ComposerAttachments-9uYp_Lh5.js} +1 -1
  57. package/dist/client/assets/ConversationComposer-hYtLurqy.js +1 -0
  58. package/dist/client/assets/ConversationFeedRows-Bu0ZJcy8.js +1 -0
  59. package/dist/client/assets/ConversationHeader-L9738YVP.js +1 -0
  60. package/dist/client/assets/{ConversationPanels-D9oC0xG5.js → ConversationPanels-D6KuqvGu.js} +2 -2
  61. package/dist/client/assets/ConversationScreen-Pzxy9x4m.js +2 -0
  62. package/dist/client/assets/ConversationStatus-BEefIbXq.js +1 -0
  63. package/dist/client/assets/{CrewAvatar-kTznzqcO.js → CrewAvatar-a_C_F9r_.js} +1 -1
  64. package/dist/client/assets/{CrewSprite-Dhryjx2c.js → CrewSprite-CguHb2Ny.js} +1 -1
  65. package/dist/client/assets/{CrewStage-vdO0qm3D.js → CrewStage-IPpS3Oja.js} +1 -1
  66. package/dist/client/assets/{CrewWorkspaces-DCBzAAS4.js → CrewWorkspaces-BTPtcEcx.js} +1 -1
  67. package/dist/client/assets/{DataTable-aH-jCyDq.js → DataTable-DnL_8SAu.js} +1 -1
  68. package/dist/client/assets/{DispatchAftermath-66uQAorV.js → DispatchAftermath-CoAYaL3B.js} +1 -1
  69. package/dist/client/assets/{DocumentFocusViewer-DJr0v0D_.js → DocumentFocusViewer-mxzPxQQW.js} +1 -1
  70. package/dist/client/assets/{EmbeddableSurfacesLab-BBa70EhJ.js → EmbeddableSurfacesLab-BAZ_eRMc.js} +1 -1
  71. package/dist/client/assets/{EmptyState-CZlrHXy-.js → EmptyState-DLiLgtPK.js} +1 -1
  72. package/dist/client/assets/{FileViewerPane-BAO6mtjD.js → FileViewerPane-Dc7AoVod.js} +1 -1
  73. package/dist/client/assets/{FleetRollCallHud-C5q2567n.js → FleetRollCallHud-VhpxVcGO.js} +1 -1
  74. package/dist/client/assets/FlightObserveScreen-C1kASP3J.js +1 -0
  75. package/dist/client/assets/{FloorContextSheet-2_NVPQor.js → FloorContextSheet-BfrXNoBn.js} +1 -1
  76. package/dist/client/assets/{FloorExchangePanel-BU1pPu8K.js → FloorExchangePanel-DsG1cRzu.js} +1 -1
  77. package/dist/client/assets/{FloorMessagePasses-cLW2UGNP.js → FloorMessagePasses-Cm3LbkHd.js} +1 -1
  78. package/dist/client/assets/{FloorReplay-VFzA6Kxc.js → FloorReplay-Bg7kA-tR.js} +1 -1
  79. package/dist/client/assets/FloorResourcesSheet-Ba9HubO2.js +1 -0
  80. package/dist/client/assets/{FloorSavedWork-BeHDejWz.js → FloorSavedWork-BDOvV3mA.js} +1 -1
  81. package/dist/client/assets/{FloorTacticalHUD-CO-iiFpb.js → FloorTacticalHUD-4d-Hr-YL.js} +1 -1
  82. package/dist/client/assets/{FollowScreen-CFfkIbc6.js → FollowScreen-DFVSlsQV.js} +1 -1
  83. package/dist/client/assets/{HarnessMark-C4naWc16.js → HarnessMark-CP-PWk2W.js} +1 -1
  84. package/dist/client/assets/HarnessesScreen-j-91IoOo.js +1 -0
  85. package/dist/client/assets/{HerdrSession-_t7yM8vX.js → HerdrSession-H2mmxeTK.js} +1 -1
  86. package/dist/client/assets/{HomeHero-DouPyNmz.js → HomeHero-g4H3Ctxg.js} +1 -1
  87. package/dist/client/assets/{HostAdvisorView-CnM1i8hW.js → HostAdvisorView-Cyt3b5Fq.js} +1 -1
  88. package/dist/client/assets/{InviteLandingScreen-CEjG2E34.js → InviteLandingScreen-C3DtAGD4.js} +1 -1
  89. package/dist/client/assets/{InviteSheet-CwxZtWCl.js → InviteSheet-BiGMNpsE.js} +1 -1
  90. package/dist/client/assets/{JumpPalette-O1aJE9gR.js → JumpPalette-goXAVByA.js} +1 -1
  91. package/dist/client/assets/{KnowledgeSearchInspector-32n9baT-.js → KnowledgeSearchInspector-BbOQIqdF.js} +1 -1
  92. package/dist/client/assets/KnowledgeSearchScreen-DC8yX-kA.js +1 -0
  93. package/dist/client/assets/{LaneToolHoverCard-CJa110yk.js → LaneToolHoverCard-B8Am_1DC.js} +1 -1
  94. package/dist/client/assets/LaneTraceDetailSheet-CngYIxdI.js +1 -0
  95. package/dist/client/assets/{LaneTraceEventFocus-TbrNHRj_.js → LaneTraceEventFocus-BRR_jcl9.js} +1 -1
  96. package/dist/client/assets/{MeshCanvas-DWZHYh1A.js → MeshCanvas-DzkuY_XI.js} +1 -1
  97. package/dist/client/assets/{MeshCanvasMinimap-iswYFpIb.js → MeshCanvasMinimap-BrscEPAH.js} +1 -1
  98. package/dist/client/assets/MeshScreen-CAtRB8K6.js +1 -0
  99. package/dist/client/assets/{MeshTopologyView-BVvtqI8q.js → MeshTopologyView-B1I2dAhu.js} +2 -2
  100. package/dist/client/assets/{MessageEmbeds-ksPazAKH.js → MessageEmbeds-B-FbWI7a.js} +1 -1
  101. package/dist/client/assets/MessagesScreen-hq7D3Lfi.js +1 -0
  102. package/dist/client/assets/{MissionContextRail-D62-Wis8.js → MissionContextRail-ClR8amG1.js} +1 -1
  103. package/dist/client/assets/MissionControlView-D6gbMrgx.js +1 -0
  104. package/dist/client/assets/{MissionFocusOverlay-C1zys3Jv.js → MissionFocusOverlay-CzeNgI9Q.js} +1 -1
  105. package/dist/client/assets/MissionLeftAgentRow-CB3cgeYr.js +1 -0
  106. package/dist/client/assets/{MissionLogPane-B19lYSY9.js → MissionLogPane-2PMEoG44.js} +1 -1
  107. package/dist/client/assets/NativeAreaScreen-BnlrAWT8.js +1 -0
  108. package/dist/client/assets/NativeAreaScreen-DSR5Tf6F.js +1 -0
  109. package/dist/client/assets/NativeAreaScreen-fGsxyeC3.js +1 -0
  110. package/dist/client/assets/{NewAgentModal-Bh-L-emz.js → NewAgentModal-4b_3aoZE.js} +1 -1
  111. package/dist/client/assets/{NewChatComposer-C97-iTMK.js → NewChatComposer-D-VB5vdt.js} +1 -1
  112. package/dist/client/assets/{NewChatOrigin-DFbF_XvR.js → NewChatOrigin-BYsEu9dZ.js} +1 -1
  113. package/dist/client/assets/{NodeDetailPanel-CElOEpCh.js → NodeDetailPanel-9NaEnZAQ.js} +1 -1
  114. package/dist/client/assets/{NodeMenu-B-jjHf1c.js → NodeMenu-BgJMmffZ.js} +1 -1
  115. package/dist/client/assets/{ObserveEmbedScreen-B7Qt69Ms.js → ObserveEmbedScreen-W7Q5HbXP.js} +2 -2
  116. package/dist/client/assets/{ObserveTextFlow-PFnG_10h.js → ObserveTextFlow-C0oQEerY.js} +2 -2
  117. package/dist/client/assets/{ObservedTopologyPanel-CUTIoLZJ.js → ObservedTopologyPanel-Ci7emnnj.js} +1 -1
  118. package/dist/client/assets/OpenScoutAppShell-Di9qdmI0.js +22 -0
  119. package/dist/client/assets/OpsAgentsView-DVotOMg2.js +1 -0
  120. package/dist/client/assets/OpsScreen-C955zgr3.js +1 -0
  121. package/dist/client/assets/OpsSubnav-CjMVj7Sk.js +1 -0
  122. package/dist/client/assets/ProjectAgentProfile-B1VqGSmu.js +1 -0
  123. package/dist/client/assets/{ProjectAgentProfileBar-DHuMKJj-.js → ProjectAgentProfileBar-DhVU7zew.js} +1 -1
  124. package/dist/client/assets/ProjectAgentProfileHero-CJk-Dx4t.js +1 -0
  125. package/dist/client/assets/ProjectsInbox-B7kap8nR.js +2 -0
  126. package/dist/client/assets/ProjectsRail-BhSaqbv0.js +1 -0
  127. package/dist/client/assets/ProjectsScreen-CSb7nwjb.js +1 -0
  128. package/dist/client/assets/ProjectsThreadAside-pEJutIO8.js +1 -0
  129. package/dist/client/assets/{Provider-C35yu29I.js → Provider-BEXAZWd9.js} +2 -2
  130. package/dist/client/assets/{RailRow-BjmWK420.js → RailRow-Ddz90weI.js} +1 -1
  131. package/dist/client/assets/RawSessionsTable-TdKlJIPl.js +1 -0
  132. package/dist/client/assets/RealtimeVoiceScreen-BU5KmlNo.js +8 -0
  133. package/dist/client/assets/{RenderedWorkerSprite-Dhlyg89J.js → RenderedWorkerSprite-BNhFXMIo.js} +1 -1
  134. package/dist/client/assets/{ReplayClock-348f17bW.js → ReplayClock-wLpb4VqN.js} +1 -1
  135. package/dist/client/assets/{ReplayLog-CBnAM3ui.js → ReplayLog-IUyQdklN.js} +1 -1
  136. package/dist/client/assets/{ReplayOutpost-DyRPfNFx.js → ReplayOutpost-C4djhjZJ.js} +1 -1
  137. package/dist/client/assets/{RepoDiffEmbedScreen-BWxvRDrS.js → RepoDiffEmbedScreen-BmQX_8E-.js} +1 -1
  138. package/dist/client/assets/{RepoDiffPageScreen-DN94irmY.js → RepoDiffPageScreen-B9oAjrC6.js} +1 -1
  139. package/dist/client/assets/{RepoDiffViewer-_4JVXBIW.js → RepoDiffViewer-Ch_lIMt-.js} +1 -1
  140. package/dist/client/assets/RepoDiffViewerLazy-DL6A2o_z.js +2 -0
  141. package/dist/client/assets/{ReposScreen-uMCpt0e9.js → ReposScreen-D-E7fSAB.js} +2 -2
  142. package/dist/client/assets/{RiggedWorkerCharacter-q6QRc7_o.js → RiggedWorkerCharacter-CF6fhzGd.js} +1 -1
  143. package/dist/client/assets/{SageModelStudio-CNDhZhgD.js → SageModelStudio-CSet_ITs.js} +1 -1
  144. package/dist/client/assets/{ScoutDeckSurface-CUaU4R6T.js → ScoutDeckSurface-BJ-fl8AX.js} +1 -1
  145. package/dist/client/assets/{ScoutSurface-3_25USO_.js → ScoutSurface-BvFRdce6.js} +1 -1
  146. package/dist/client/assets/{ScoutbotFxLab-CRqhYe0a.js → ScoutbotFxLab-CfPzycZ7.js} +1 -1
  147. package/dist/client/assets/{SecondaryNav-D7dbV2qo.js → SecondaryNav-1FjBDWuY.js} +1 -1
  148. package/dist/client/assets/{SessionContextStrip-CXfs9hUD.js → SessionContextStrip-BoiIxXvS.js} +1 -1
  149. package/dist/client/assets/{SessionEmbedScreen-D0zFmou-.js → SessionEmbedScreen-BizGNGOz.js} +1 -1
  150. package/dist/client/assets/{SessionHopMenu-E6VJZrE0.js → SessionHopMenu-DX6PJPNk.js} +1 -1
  151. package/dist/client/assets/{SessionObserve-DXxBvejJ.js → SessionObserve-Dw3bVQYF.js} +1 -1
  152. package/dist/client/assets/{SessionObserveEvidence-Cuj_KHxR.js → SessionObserveEvidence-uD1OX-R5.js} +1 -1
  153. package/dist/client/assets/SessionRefScreen-Ch9H-qVk.js +1 -0
  154. package/dist/client/assets/SessionsScreen-DUeP23Xy.js +1 -0
  155. package/dist/client/assets/{SettingsDrawer-juCpnbH6.js → SettingsDrawer-BVrP6J52.js} +3 -3
  156. package/dist/client/assets/SettingsScreen-BcJ05LE5.js +1 -0
  157. package/dist/client/assets/{SharedFloorCharacter-DNEiaOUh.js → SharedFloorCharacter-dnamlt1p.js} +1 -1
  158. package/dist/client/assets/SharedWorkFloor-H-e2TVj9.js +2 -0
  159. package/dist/client/assets/{ShikiPane-CRtTYkMj.js → ShikiPane-CDiIT_qn.js} +1 -1
  160. package/dist/client/assets/{SlidePanel-_CHAQdOa.js → SlidePanel-D5oPQocF.js} +1 -1
  161. package/dist/client/assets/{SpaceSwitcher-BLgSCf_T.js → SpaceSwitcher-WccPJ0fS.js} +1 -1
  162. package/dist/client/assets/{SpriteAvatar-CpZWf54-.js → SpriteAvatar-D53GaaK3.js} +1 -1
  163. package/dist/client/assets/{SproutActionSprite-BSiTS4en.js → SproutActionSprite-BrFCmgWS.js} +1 -1
  164. package/dist/client/assets/{StatusPill-2gCP6H7A.js → StatusPill-jT--OXbn.js} +1 -1
  165. package/dist/client/assets/{TailView-CYSijNTy.js → TailView-B44cSuyl.js} +2 -2
  166. package/dist/client/assets/Terminal-D0PanmIk.js +4 -0
  167. package/dist/client/assets/TerminalEmbedScreen-Eddi4sts.js +1 -0
  168. package/dist/client/assets/{TerminalHeaderMount-Cq4OD_xN.js → TerminalHeaderMount-CYYcKxQ-.js} +1 -1
  169. package/dist/client/assets/{TextDocumentSurface-D52m7Vd8.js → TextDocumentSurface-DBslUq9k.js} +1 -1
  170. package/dist/client/assets/{TmuxPeek-CXFeweMg.js → TmuxPeek-Ctw5yYO5.js} +1 -1
  171. package/dist/client/assets/{VoiceControlWell-DF3bjcYA.js → VoiceControlWell-BkjuWjYu.js} +1 -1
  172. package/dist/client/assets/{VoicePathDiagram-CmpHWfO-.js → VoicePathDiagram-u0i6ntbx.js} +1 -1
  173. package/dist/client/assets/{VoicePermissionsPanel-Ok2nfxHw.js → VoicePermissionsPanel-9Nuw-xCr.js} +1 -1
  174. package/dist/client/assets/{VoiceTurnDetails-wAByRaNB.js → VoiceTurnDetails-kS7lfbmt.js} +1 -1
  175. package/dist/client/assets/{VoiceTurnStage-edoJalLV.js → VoiceTurnStage-DLY6aYDg.js} +1 -1
  176. package/dist/client/assets/{VoiceTurnView-D-8g5E4r.js → VoiceTurnView-CF4tIldB.js} +1 -1
  177. package/dist/client/assets/{WorkDetailScreen-zQkNVy2F.js → WorkDetailScreen-BrrkENYq.js} +2 -2
  178. package/dist/client/assets/{WorkFilesViewer-vNt01sDd.js → WorkFilesViewer-B63sKRYZ.js} +1 -1
  179. package/dist/client/assets/{WorkRunView-BDkR7Edq.js → WorkRunView-DLIzAsc3.js} +1 -1
  180. package/dist/client/assets/WorldActorTalk-CHhFTiQV.js +1 -0
  181. package/dist/client/assets/{WorldCharacter-CIIlutQq.js → WorldCharacter-CJGx2DVy.js} +1 -1
  182. package/dist/client/assets/{WorldMinimap-B6HNgcDe.js → WorldMinimap-DL12pBw3.js} +1 -1
  183. package/dist/client/assets/{WorldSky-Jm2Z6dfW.js → WorldSky-BlPNvGLo.js} +1 -1
  184. package/dist/client/assets/{activity-CIlFrfPJ.js → activity-CXkZ620t.js} +1 -1
  185. package/dist/client/assets/{addon-fit-dFpj9Kfq.js → addon-fit-G3qi01sy.js} +1 -1
  186. package/dist/client/assets/{addon-webgl-BFCGRtGh.js → addon-webgl-Bo7kSgOB.js} +1 -1
  187. package/dist/client/assets/{agent-essentials-BGGvT5G6.js → agent-essentials-DnfdGmIX.js} +1 -1
  188. package/dist/client/assets/{agent-specialization-DDc7mLCW.js → agent-specialization-DYX_DSlY.js} +1 -1
  189. package/dist/client/assets/{arc.es-C1SQHJ3k.js → arc.es-CLA3XI14.js} +1 -1
  190. package/dist/client/assets/arrow-down--OUDFWIq.js +1 -0
  191. package/dist/client/assets/{arrow-left-MVUKauwQ.js → arrow-left-DNjQHf4C.js} +1 -1
  192. package/dist/client/assets/{arrow-right-Bp-FpE5V.js → arrow-right-A_yyXwoH.js} +1 -1
  193. package/dist/client/assets/arrow-up-DFy-9ghF.js +1 -0
  194. package/dist/client/assets/{arrow-up-right-BPedAgxO.js → arrow-up-right-DUW1A1Hb.js} +1 -1
  195. package/dist/client/assets/{book-open-CV98WMSp.js → book-open-B_idZgTF.js} +1 -1
  196. package/dist/client/assets/{bot-B4zLQ4IN.js → bot-BNv_ZJzi.js} +1 -1
  197. package/dist/client/assets/{chat-api-DSJMBYoT.js → chat-api-BHGHALv2.js} +1 -1
  198. package/dist/client/assets/{chat-message-markup-91DIry6R.js → chat-message-markup-esR-YLtN.js} +1 -1
  199. package/dist/client/assets/{chat-transport-DNS5CB2I.js → chat-transport-CtxnPLMU.js} +1 -1
  200. package/dist/client/assets/{check-lrJ3a73a.js → check-BM6QtbB7.js} +1 -1
  201. package/dist/client/assets/{chevron-down-l1mrh5S9.js → chevron-down-DEDSNJNY.js} +1 -1
  202. package/dist/client/assets/{chevron-right-DrfqcerI.js → chevron-right-B02kAw12.js} +1 -1
  203. package/dist/client/assets/{chevron-up-CETZJzjV.js → chevron-up-CzveykKG.js} +1 -1
  204. package/dist/client/assets/{chunk-HRAB3GC3-DbVLgbWX.js → chunk-HRAB3GC3-DVhUsgOw.js} +1 -1
  205. package/dist/client/assets/chunk-JTPDIGGW-hdpdYwXb.js +46 -0
  206. package/dist/client/assets/chunk-T65CQEWV-G_Z0lqtn.js +1 -0
  207. package/dist/client/assets/chunk-YOZR3KYS-apgUnfXh.js +2 -0
  208. package/dist/client/assets/{clock-BV1aqPkK.js → clock-8tb9t2t9.js} +1 -1
  209. package/dist/client/assets/{code-xml-BhcNbLWU.js → code-xml-E9gBuiVs.js} +1 -1
  210. package/dist/client/assets/{coffee-D7EAOdCk.js → coffee-D0YEK6-l.js} +1 -1
  211. package/dist/client/assets/{compass-63TUaz5_.js → compass-EmGkpxIe.js} +1 -1
  212. package/dist/client/assets/content-B-rn1rka.js +1 -0
  213. package/dist/client/assets/content-BHV-ZU8_.js +1 -0
  214. package/dist/client/assets/content-BI9yWpWC.js +1 -0
  215. package/dist/client/assets/content-BLVuukzF.js +1 -0
  216. package/dist/client/assets/content-BP3cQkAj.js +1 -0
  217. package/dist/client/assets/content-BRY-UTkP.js +1 -0
  218. package/dist/client/assets/content-BXTmYOPB.js +1 -0
  219. package/dist/client/assets/content-C3DZ77HZ.js +1 -0
  220. package/dist/client/assets/content-CPchclaV.js +1 -0
  221. package/dist/client/assets/{content-nGlEZhUI.js → content-CVqPTQnr.js} +1 -1
  222. package/dist/client/assets/content-CjAERU44.js +1 -0
  223. package/dist/client/assets/content-CoYG0nWL.js +1 -0
  224. package/dist/client/assets/content-DK1KeRPw.js +1 -0
  225. package/dist/client/assets/content-iWBSSXa6.js +1 -0
  226. package/dist/client/assets/content-ryJeaQk8.js +1 -0
  227. package/dist/client/assets/content-srNyLgDt.js +1 -0
  228. package/dist/client/assets/{conversation-icons-Tqba2d56.js → conversation-icons-Dxn9N1Kx.js} +1 -1
  229. package/dist/client/assets/conversation-motion-features-BfmPlONx.js +1 -0
  230. package/dist/client/assets/{copy-xKeM5ZtU.js → copy-C1XrY27_.js} +1 -1
  231. package/dist/client/assets/{cpu-BOTa_WLr.js → cpu-DVZ_LhPn.js} +1 -1
  232. package/dist/client/assets/{createLucideIcon-zZ8Hx7er.js → createLucideIcon-CKbjXlwv.js} +1 -1
  233. package/dist/client/assets/direct-voice-DAOUU-kc.js +10 -0
  234. package/dist/client/assets/discover-BNa3BPr_.js +2 -0
  235. package/dist/client/assets/embed-entry-gK3z8Yxi.js +2 -0
  236. package/dist/client/assets/{external-link-CUObqmgX.js → external-link-Df1R34rX.js} +1 -1
  237. package/dist/client/assets/{eye-LrO-cXQt.js → eye-CD-_aphP.js} +1 -1
  238. package/dist/client/assets/{file-code-corner-CsU7jJpu.js → file-code-corner-DtMWHBN3.js} +1 -1
  239. package/dist/client/assets/{file-text-CnISiiw6.js → file-text-BOJQiS8p.js} +1 -1
  240. package/dist/client/assets/{flag-C4wl8z2-.js → flag-CeKO8NoD.js} +1 -1
  241. package/dist/client/assets/{folder-D5prSkzz.js → folder-C2emmTHq.js} +1 -1
  242. package/dist/client/assets/{gauge-D9_5iJEm.js → gauge-BR5CrhRM.js} +1 -1
  243. package/dist/client/assets/{gestures-QZub3Ot9.js → gestures-Dh8szhcU.js} +1 -1
  244. package/dist/client/assets/{git-branch-B0_fPLO7.js → git-branch-C45vy8qT.js} +1 -1
  245. package/dist/client/assets/{go-shortcuts-DicR7sUf.js → go-shortcuts--25Qg0lD.js} +1 -1
  246. package/dist/client/assets/{home-moving-signal-rpMhsOJB.js → home-moving-signal-BiiyEKEb.js} +1 -1
  247. package/dist/client/assets/home-now-card-DaCpqUZe.js +1 -0
  248. package/dist/client/assets/{home-now-card-nano-B5Dv3-pb.js → home-now-card-nano-wbxgyY4q.js} +1 -1
  249. package/dist/client/assets/hooks-JNwYSH18.js +2 -0
  250. package/dist/client/assets/{index-EsrkGBcv.js → index-BFbLvCJn.js} +2 -2
  251. package/dist/client/assets/index-BRNHY2fp.css +1 -0
  252. package/dist/client/assets/index-BrXaMEdK.js +1 -0
  253. package/dist/client/assets/index-CXzJ_hGx.js +1 -0
  254. package/dist/client/assets/{index-CHD0qcfL.js → index-V8FYEUpD.js} +1 -1
  255. package/dist/client/assets/index-mYtyYeAe.js +1 -0
  256. package/dist/client/assets/{inspector-panel-BkgUDn6G.js → inspector-panel-BgU5xUln.js} +2 -2
  257. package/dist/client/assets/{keyboard-nav-DDHegDbx.js → keyboard-nav-CEe-ApvZ.js} +1 -1
  258. package/dist/client/assets/{lane-roster-store-D-RSWjb-.js → lane-roster-store-MraynTHP.js} +1 -1
  259. package/dist/client/assets/{layers-C8PDiMul.js → layers-ClmyjwpB.js} +1 -1
  260. package/dist/client/assets/{layout-grid-Cor2frzj.js → layout-grid-DG2-JaPn.js} +1 -1
  261. package/dist/client/assets/left-B66YR0c5.js +1 -0
  262. package/dist/client/assets/left-BP5P8lzw.js +2 -0
  263. package/dist/client/assets/left-BbCKRDbW.js +1 -0
  264. package/dist/client/assets/left-CaY5FK2k.js +1 -0
  265. package/dist/client/assets/left-CemrfeSs.js +1 -0
  266. package/dist/client/assets/left-DcYA26sH.js +1 -0
  267. package/dist/client/assets/left-DdMMaqFT.js +2 -0
  268. package/dist/client/assets/left-advisor-DBml48M5.js +1 -0
  269. package/dist/client/assets/left-agents-DowYF2ag.js +1 -0
  270. package/dist/client/assets/left-default-Bifaeg_V.js +1 -0
  271. package/dist/client/assets/left-lanes-BGhjdqpD.js +1 -0
  272. package/dist/client/assets/left-mission-CvXPUovR.js +1 -0
  273. package/dist/client/assets/library-CnC8uzJt.js +1 -0
  274. package/dist/client/assets/{loader-circle-OvccU82H.js → loader-circle-CCG7hG7z.js} +1 -1
  275. package/dist/client/assets/{local-agents-BqnoxJrq.js → local-agents-BMcFlY_x.js} +1 -1
  276. package/dist/client/assets/{log-in-7SnYqW5w.js → log-in-VL9mdgeE.js} +1 -1
  277. package/dist/client/assets/{machine-children-DxcqCLmd.js → machine-children-DvCiQxwA.js} +1 -1
  278. package/dist/client/assets/{mentions-ByUvhS-v.js → mentions-s5oW4aQU.js} +1 -1
  279. package/dist/client/assets/{mesh-ops-CiZ8xSAx.js → mesh-ops-9SzD3sPw.js} +1 -1
  280. package/dist/client/assets/{mesh-view-store-DZvJC4KU.js → mesh-view-store-CVqzYz4K.js} +1 -1
  281. package/dist/client/assets/{message-circle-CxRVKNE-.js → message-circle-BB3rFCVD.js} +1 -1
  282. package/dist/client/assets/{message-markup-Zwo3t4cI.js → message-markup-D1C7GzHo.js} +1 -1
  283. package/dist/client/assets/{message-square-BxesYglW.js → message-square-BwqBIfv5.js} +1 -1
  284. package/dist/client/assets/{mission-control-store-elEEsIvb.js → mission-control-store-e8F85JhP.js} +1 -1
  285. package/dist/client/assets/{monitor-DTTYEb73.js → monitor-M0VSmHQ-.js} +1 -1
  286. package/dist/client/assets/{nav-destinations-uorRqFxf.js → nav-destinations-B3R5zxFX.js} +1 -1
  287. package/dist/client/assets/{observe-BJqERJVj.js → observe-M3rLosT5.js} +1 -1
  288. package/dist/client/assets/{page-status-BswZLqvA.js → page-status-BIuh3C5p.js} +1 -1
  289. package/dist/client/assets/{panel-right-Bv7sP_fc.js → panel-right-WKLdPm0F.js} +1 -1
  290. package/dist/client/assets/{paperclip-BjcuP_Hx.js → paperclip-DLf_ABSv.js} +1 -1
  291. package/dist/client/assets/{pause-C2XTlkjs.js → pause-7mmEEvVx.js} +1 -1
  292. package/dist/client/assets/{persistent-state-KRk_yb0q.js → persistent-state-3mbBFRDO.js} +1 -1
  293. package/dist/client/assets/{pin-C2mFOV1l.js → pin-q_0gAA6i.js} +1 -1
  294. package/dist/client/assets/{play-FT6K3It1.js → play-N5-hnPCV.js} +1 -1
  295. package/dist/client/assets/{plus-DFDDeGKu.js → plus-B0hdY0fF.js} +1 -1
  296. package/dist/client/assets/profile-B7ZGToTo.js +1 -0
  297. package/dist/client/assets/{projects-inbox-C0FUCv_p.js → projects-inbox-CMFBjQt0.js} +1 -1
  298. package/dist/client/assets/{proxy-AJsmwA6h.js → proxy-k0ILOVkK.js} +1 -1
  299. package/dist/client/assets/{radio-DRoOZsws.js → radio-Bjqmv997.js} +1 -1
  300. package/dist/client/assets/{refresh-cw-BmVr7sCD.js → refresh-cw-BcqctLqo.js} +1 -1
  301. package/dist/client/assets/resolve-panes-wzGu9d8o.js +1 -0
  302. package/dist/client/assets/resolve-sidebar-context-C8SOo5oZ.js +1 -0
  303. package/dist/client/assets/right-9rMRZN_r.js +1 -0
  304. package/dist/client/assets/right-BHZq648O.js +1 -0
  305. package/dist/client/assets/{right-DWPVB-nK.js → right-BNJzCaH9.js} +1 -1
  306. package/dist/client/assets/right-CAd7lTvY.js +1 -0
  307. package/dist/client/assets/right-Cc57bCTW.js +1 -0
  308. package/dist/client/assets/right-DY49Prjj.js +1 -0
  309. package/dist/client/assets/right-DfU47xKY.js +1 -0
  310. package/dist/client/assets/right-Dr7vxdZl.js +1 -0
  311. package/dist/client/assets/right-DsE4aR3A.js +1 -0
  312. package/dist/client/assets/right-zlkRjnkv.js +1 -0
  313. package/dist/client/assets/{rocket-CGl4RTV7.js → rocket-BahsdUe6.js} +1 -1
  314. package/dist/client/assets/router-CJIx83Ia.js +1 -0
  315. package/dist/client/assets/runtime-picker-IRcTkMZ5.js +1 -0
  316. package/dist/client/assets/{scope-views-RUWwCVAr.js → scope-views-KDtZoLUC.js} +1 -1
  317. package/dist/client/assets/{scout-voice-CZx60X6E.js → scout-voice-Cdh6pCsb.js} +1 -1
  318. package/dist/client/assets/{scoutbot-markdown-BKEBSbG0.js → scoutbot-markdown-7PRQHaAc.js} +1 -1
  319. package/dist/client/assets/{scroll-text-DNjxhyO2.js → scroll-text-CA0QxBHu.js} +1 -1
  320. package/dist/client/assets/{search-DT42oyRW.js → search-Bv2IONmc.js} +1 -1
  321. package/dist/client/assets/secondaryNavConfig-Bmb-oRvD.js +1 -0
  322. package/dist/client/assets/{selection-bridge-x3wFUjxj.js → selection-bridge-CthAuPRw.js} +1 -1
  323. package/dist/client/assets/{send-horizontal-CH0-fbZE.js → send-horizontal-_Tf_It04.js} +1 -1
  324. package/dist/client/assets/{send-to-agent-session-DoKCDBJ4.js → send-to-agent-session-CWDHHgFB.js} +1 -1
  325. package/dist/client/assets/{server-QfsgMLk1.js → server-U_l8A83n.js} +1 -1
  326. package/dist/client/assets/{session-catalog-CvSdPHPe.js → session-catalog-Dx4tl3sx.js} +1 -1
  327. package/dist/client/assets/{session-recap-queue-41l2XVkI.js → session-recap-queue-GeicPLsQ.js} +1 -1
  328. package/dist/client/assets/{session-table-L-pns6Zl.js → session-table-BI62J4NP.js} +1 -1
  329. package/dist/client/assets/{sessions-view-Dc-QAa7O.js → sessions-view-lGMwwZY7.js} +1 -1
  330. package/dist/client/assets/{settings-BVh7kldq.js → settings-bo9X410k.js} +1 -1
  331. package/dist/client/assets/{sliders-horizontal-782VC_yy.js → sliders-horizontal-CPSx6wd2.js} +1 -1
  332. package/dist/client/assets/{sparkles-BjHq_DNK.js → sparkles-Br-bA2aZ.js} +1 -1
  333. package/dist/client/assets/{sse-BCPRocpq.js → sse-BVxO0zNp.js} +1 -1
  334. package/dist/client/assets/{tail-events-d0yAYxR0.js → tail-events-C6NWFB1N.js} +1 -1
  335. package/dist/client/assets/{terminal-hQKQygcf.js → terminal-DMBAZjPP.js} +1 -1
  336. package/dist/client/assets/{terminal-relay-Bxs1hp-j.js → terminal-relay-CpGHpDa8.js} +1 -1
  337. package/dist/client/assets/{terminal-takeover-Ay5C2c-M.js → terminal-takeover-CXwdoZ5j.js} +1 -1
  338. package/dist/client/assets/{triangle-alert-CHoRGdVO.js → triangle-alert-BZikHKuT.js} +1 -1
  339. package/dist/client/assets/use-beside-DopIbJwf.js +1 -0
  340. package/dist/client/assets/{use-conversation-list-CY4JciOV.js → use-conversation-list-CGtcpdPd.js} +1 -1
  341. package/dist/client/assets/{use-fleet-active-asks-CymmXWH4.js → use-fleet-active-asks-DAHOPYPV.js} +1 -1
  342. package/dist/client/assets/{use-mesh-node-state-BvaqtODo.js → use-mesh-node-state-BlWIPTc4.js} +1 -1
  343. package/dist/client/assets/{use-mesh-ops-items-BSYaqH_0.js → use-mesh-ops-items-pKWBro7o.js} +1 -1
  344. package/dist/client/assets/{use-reduced-motion-3gMYZNIp.js → use-reduced-motion-DkdIQBwh.js} +1 -1
  345. package/dist/client/assets/use-scout-dev-flags-CduUFb7l.js +1 -0
  346. package/dist/client/assets/{useAgentHoverCard-BANmpjMh.js → useAgentHoverCard-DNlXPYQf.js} +1 -1
  347. package/dist/client/assets/useContentSecondaryNav-LJGNYG3U.js +1 -0
  348. package/dist/client/assets/{useEmbedHeadline-D6pJRxUg.js → useEmbedHeadline-BeeBDb7E.js} +1 -1
  349. package/dist/client/assets/{usePierreRuntime-BAQdiN0L.js → usePierreRuntime-DUXZ-DTK.js} +1 -1
  350. package/dist/client/assets/useSidebarCollapse-DoMvU_2R.js +1 -0
  351. package/dist/client/assets/{users-BUjx36gx.js → users-BQPEIUfd.js} +1 -1
  352. package/dist/client/assets/{wrench-DR0i5BU7.js → wrench-C-wjicn5.js} +1 -1
  353. package/dist/client/assets/{x-DAehov0E.js → x-BcfhXYiF.js} +1 -1
  354. package/dist/client/assets/{xterm-BXQiLVnI.js → xterm-qXD45dc0.js} +1 -1
  355. package/dist/client/assets/{zap-CEjZNZbI.js → zap-BqL8ttGz.js} +1 -1
  356. package/dist/client/index.html +2 -2
  357. package/dist/main.mjs +1 -1
  358. package/package.json +26 -4
  359. package/server.json +2 -2
  360. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +0 -1
  361. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +0 -1
  362. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +0 -1
  363. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +0 -1
  364. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +0 -1
  365. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +0 -1
  366. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +0 -1
  367. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +0 -1
  368. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +0 -1
  369. package/dist/client/assets/AgentsScreen-ChwMBs11.js +0 -1
  370. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +0 -1
  371. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +0 -1
  372. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +0 -8
  373. package/dist/client/assets/Canvas-X9pVSkw3.js +0 -1
  374. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +0 -1
  375. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +0 -1
  376. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +0 -1
  377. package/dist/client/assets/ConversationComposer-CUQyArlk.js +0 -1
  378. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +0 -1
  379. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +0 -1
  380. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +0 -2
  381. package/dist/client/assets/ConversationStatus--IPm2nGh.js +0 -1
  382. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +0 -1
  383. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +0 -1
  384. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +0 -1
  385. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +0 -1
  386. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +0 -1
  387. package/dist/client/assets/MeshScreen-8nAzQVbm.js +0 -1
  388. package/dist/client/assets/MessagesScreen-C3WB4T21.js +0 -1
  389. package/dist/client/assets/MissionControlView-B9cNPXvl.js +0 -1
  390. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +0 -1
  391. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +0 -1
  392. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +0 -1
  393. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +0 -1
  394. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +0 -31
  395. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +0 -1
  396. package/dist/client/assets/OpsScreen-jVcaBKGi.js +0 -1
  397. package/dist/client/assets/OpsSubnav-BOOYShHE.js +0 -1
  398. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +0 -1
  399. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +0 -1
  400. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +0 -2
  401. package/dist/client/assets/ProjectsRail-CDWocin_.js +0 -1
  402. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +0 -1
  403. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +0 -1
  404. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +0 -1
  405. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +0 -16
  406. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +0 -2
  407. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +0 -1
  408. package/dist/client/assets/SessionsScreen-BLIRkohT.js +0 -1
  409. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +0 -1
  410. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +0 -2
  411. package/dist/client/assets/Terminal-Bi97yb5s.js +0 -4
  412. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +0 -1
  413. package/dist/client/assets/TerminalRelay-DrikpUSJ.js +0 -46
  414. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +0 -1
  415. package/dist/client/assets/content-B1lgE8qr.js +0 -1
  416. package/dist/client/assets/content-B5l11YyQ.js +0 -1
  417. package/dist/client/assets/content-BNZOZEpX.js +0 -1
  418. package/dist/client/assets/content-BRIxP155.js +0 -1
  419. package/dist/client/assets/content-BWd8gt8L.js +0 -1
  420. package/dist/client/assets/content-BfwS2jAK.js +0 -1
  421. package/dist/client/assets/content-C4p43_eT.js +0 -1
  422. package/dist/client/assets/content-CdYfaoDV.js +0 -1
  423. package/dist/client/assets/content-CzldLxw0.js +0 -1
  424. package/dist/client/assets/content-D-olnc4U.js +0 -1
  425. package/dist/client/assets/content-DTioimq4.js +0 -1
  426. package/dist/client/assets/content-LOebm3_d.js +0 -1
  427. package/dist/client/assets/content-oyzDM-LK.js +0 -1
  428. package/dist/client/assets/content-x1PHxED7.js +0 -1
  429. package/dist/client/assets/content-zX3ZY3T9.js +0 -1
  430. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +0 -1
  431. package/dist/client/assets/direct-voice-BbLPuJ04.js +0 -2
  432. package/dist/client/assets/discover-DJFxyV1k.js +0 -2
  433. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +0 -2
  434. package/dist/client/assets/home-now-card-ByE6Umcx.js +0 -1
  435. package/dist/client/assets/hooks-_eCZZPsR.js +0 -2
  436. package/dist/client/assets/index-724SdE6r.js +0 -1
  437. package/dist/client/assets/index-CN4rBB_s.css +0 -1
  438. package/dist/client/assets/index-D1d98iYf.js +0 -1
  439. package/dist/client/assets/index-gGHPA-By.js +0 -1
  440. package/dist/client/assets/left-Bn5X7x2o.js +0 -2
  441. package/dist/client/assets/left-BqS0fYX1.js +0 -1
  442. package/dist/client/assets/left-CTCeeeD3.js +0 -1
  443. package/dist/client/assets/left-DhtVPVux.js +0 -1
  444. package/dist/client/assets/left-K39b-Wvx.js +0 -2
  445. package/dist/client/assets/left-KGmueNPt.js +0 -1
  446. package/dist/client/assets/left-P_GOYB-s.js +0 -1
  447. package/dist/client/assets/left-advisor-B0N47De2.js +0 -1
  448. package/dist/client/assets/left-agents-CsSNc51Y.js +0 -1
  449. package/dist/client/assets/left-default-BlO5LP2T.js +0 -1
  450. package/dist/client/assets/left-lanes-C4PhaJE6.js +0 -1
  451. package/dist/client/assets/left-mission-BjTE5vPa.js +0 -1
  452. package/dist/client/assets/library-CkWNPHRp.js +0 -1
  453. package/dist/client/assets/profile-DTmzN16I.js +0 -1
  454. package/dist/client/assets/provider-Dojd8quC.js +0 -1
  455. package/dist/client/assets/resolve-panes-pbY1fCWi.js +0 -1
  456. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +0 -1
  457. package/dist/client/assets/right-49kO-6nD.js +0 -1
  458. package/dist/client/assets/right-APtItA8A.js +0 -1
  459. package/dist/client/assets/right-BJwhPqtn.js +0 -1
  460. package/dist/client/assets/right-BPqrf4ek.js +0 -1
  461. package/dist/client/assets/right-D7djOy6K.js +0 -1
  462. package/dist/client/assets/right-DKOUCRob.js +0 -1
  463. package/dist/client/assets/right-DMNrVzg7.js +0 -1
  464. package/dist/client/assets/right-DppeMCy4.js +0 -1
  465. package/dist/client/assets/right-GAL5Mw1v.js +0 -1
  466. package/dist/client/assets/router-DCtl8wqb.js +0 -1
  467. package/dist/client/assets/runtime-picker-DXu2bOTh.js +0 -1
  468. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +0 -1
  469. package/dist/client/assets/use-beside-DoRC1nt0.js +0 -1
  470. package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +0 -1
  471. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +0 -1
  472. package/dist/client/assets/usePersistentState-B8lP7TRb.js +0 -1
  473. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +0 -1
@@ -1 +1 @@
1
- import{r as o,j as r}from"./index-EsrkGBcv.js";import{a as _}from"./api-DSqpVKC7.js";import{d as y,S as j}from"./SessionObserve-DXxBvejJ.js";import{u as x}from"./sse-BCPRocpq.js";import{u as g}from"./tail-events-d0yAYxR0.js";import{ConversationScreen as M}from"./ConversationScreen-CUfsQ4MR.js";import{SessionObserveEmbedStatus as N,NATIVE_SESSION_ORIGIN_LABEL as S}from"./SessionObserveEvidence-Cuj_KHxR.js";import{d as w,b as T,s as p}from"./session-ref-lookup-state-SATH_jAP.js";const O=6e4,L=1e3,A=1e4;function u({children:e}){return r.jsx("div",{className:"s-observe-embed-page",children:e})}function d({title:e,detail:s}){return r.jsx(u,{children:r.jsxs("div",{className:"s-observe-embed-empty",children:[r.jsx("div",{className:"s-observe-embed-empty-title",children:e}),s&&r.jsx("div",{className:"s-observe-embed-empty-detail",children:s})]})})}function I({lookup:e}){const s=y({source:e.observe.source,fidelity:e.observe.fidelity,live:e.observe.data.live,eventCount:e.observe.data.events.length});return r.jsxs(u,{children:[r.jsx(N,{source:e.observe.source,fidelity:e.observe.fidelity,sessionId:e.observe.sessionId??e.observe.refId,evidence:s,originLabel:S}),r.jsx(j,{data:e.observe.data,agentId:e.observe.agentId??e.session?.agentId??void 0,sessionId:e.observe.sessionId??e.observe.refId,showRail:!1,observeSource:e.observe.source,observeFidelity:e.observe.fidelity,originLabel:S,defaultPresentation:"conversation"})]})}function f(){const e=typeof window>"u"?"":new URLSearchParams(window.location.search).get("ref")?.trim()??"",[s,v]=o.useState(null),[h,l]=o.useState(!0),[b,m]=o.useState(null),i=o.useRef(null),c=o.useRef(null),a=o.useCallback(async(n=!1)=>{if(!e){l(!1);return}c.current=Date.now(),n||l(!0),m(null);try{const t=await _(`/api/session-ref/${encodeURIComponent(e)}`);v(t)}catch(t){n||v(null),m(t instanceof Error?t.message:String(t))}finally{l(!1)}},[e]);o.useEffect(()=>{c.current=null,a();const n=window.setInterval(()=>{a(!0)},O);return()=>{window.clearInterval(n),i.current&&(clearTimeout(i.current),i.current=null)}},[a]);const E=o.useCallback(()=>{if(i.current)return;const n=w({nowMs:Date.now(),lastRefreshAtMs:c.current,debounceMs:L,minimumIntervalMs:A});i.current=setTimeout(()=>{i.current=null,a(!0)},n)},[a]);return x(n=>{const t=[e,s?.refId,s?.kind==="conversation"?s.conversationId:null,s?.session?.agentId,s?.kind==="observe"?s.observe.agentId:null,s?.kind==="observe"?s.observe.sessionId:null];T(n,t)&&E()}),g(n=>{[e,s?.refId,s?.kind==="observe"?s.observe.sessionId:null,s?.kind==="observe"?s.observe.data.metadata?.session?.externalSessionId:null].some(R=>p(n.sessionId,R))&&E()}),e?b&&!s?r.jsx(d,{title:"Session unavailable",detail:b}):h&&!s?r.jsx(d,{title:"Resolving session",detail:e}):s?s.kind==="conversation"?r.jsx(u,{children:r.jsx(M,{conversationId:s.conversationId,navigate:()=>{},embedded:!0,showBackNav:!1})}):r.jsx(I,{lookup:s}):r.jsx(d,{title:"Session not found",detail:"This session may have ended or its archive is not on this machine."}):r.jsx(d,{title:"No session reference",detail:"This embed needs a ?ref=<sessionId> query parameter."})}const $=Object.freeze(Object.defineProperty({__proto__:null,SessionEmbedObserveContent:I,SessionEmbedScreen:f,default:f},Symbol.toStringTag,{value:"Module"})),z=Object.freeze(Object.defineProperty({__proto__:null,SessionEmbedScreen:f},Symbol.toStringTag,{value:"Module"}));export{$ as S,z as a};
1
+ import{r as o,j as r}from"./index-BFbLvCJn.js";import{a as _}from"./api-DSqpVKC7.js";import{d as y,S as j}from"./SessionObserve-Dw3bVQYF.js";import{u as x}from"./sse-BVxO0zNp.js";import{u as g}from"./tail-events-C6NWFB1N.js";import{ConversationScreen as M}from"./ConversationScreen-Pzxy9x4m.js";import{SessionObserveEmbedStatus as N,NATIVE_SESSION_ORIGIN_LABEL as S}from"./SessionObserveEvidence-uD1OX-R5.js";import{d as w,b as T,s as p}from"./session-ref-lookup-state-SATH_jAP.js";const O=6e4,L=1e3,A=1e4;function u({children:e}){return r.jsx("div",{className:"s-observe-embed-page",children:e})}function d({title:e,detail:s}){return r.jsx(u,{children:r.jsxs("div",{className:"s-observe-embed-empty",children:[r.jsx("div",{className:"s-observe-embed-empty-title",children:e}),s&&r.jsx("div",{className:"s-observe-embed-empty-detail",children:s})]})})}function I({lookup:e}){const s=y({source:e.observe.source,fidelity:e.observe.fidelity,live:e.observe.data.live,eventCount:e.observe.data.events.length});return r.jsxs(u,{children:[r.jsx(N,{source:e.observe.source,fidelity:e.observe.fidelity,sessionId:e.observe.sessionId??e.observe.refId,evidence:s,originLabel:S}),r.jsx(j,{data:e.observe.data,agentId:e.observe.agentId??e.session?.agentId??void 0,sessionId:e.observe.sessionId??e.observe.refId,showRail:!1,observeSource:e.observe.source,observeFidelity:e.observe.fidelity,originLabel:S,defaultPresentation:"conversation"})]})}function f(){const e=typeof window>"u"?"":new URLSearchParams(window.location.search).get("ref")?.trim()??"",[s,v]=o.useState(null),[h,l]=o.useState(!0),[b,m]=o.useState(null),i=o.useRef(null),c=o.useRef(null),a=o.useCallback(async(n=!1)=>{if(!e){l(!1);return}c.current=Date.now(),n||l(!0),m(null);try{const t=await _(`/api/session-ref/${encodeURIComponent(e)}`);v(t)}catch(t){n||v(null),m(t instanceof Error?t.message:String(t))}finally{l(!1)}},[e]);o.useEffect(()=>{c.current=null,a();const n=window.setInterval(()=>{a(!0)},O);return()=>{window.clearInterval(n),i.current&&(clearTimeout(i.current),i.current=null)}},[a]);const E=o.useCallback(()=>{if(i.current)return;const n=w({nowMs:Date.now(),lastRefreshAtMs:c.current,debounceMs:L,minimumIntervalMs:A});i.current=setTimeout(()=>{i.current=null,a(!0)},n)},[a]);return x(n=>{const t=[e,s?.refId,s?.kind==="conversation"?s.conversationId:null,s?.session?.agentId,s?.kind==="observe"?s.observe.agentId:null,s?.kind==="observe"?s.observe.sessionId:null];T(n,t)&&E()}),g(n=>{[e,s?.refId,s?.kind==="observe"?s.observe.sessionId:null,s?.kind==="observe"?s.observe.data.metadata?.session?.externalSessionId:null].some(R=>p(n.sessionId,R))&&E()}),e?b&&!s?r.jsx(d,{title:"Session unavailable",detail:b}):h&&!s?r.jsx(d,{title:"Resolving session",detail:e}):s?s.kind==="conversation"?r.jsx(u,{children:r.jsx(M,{conversationId:s.conversationId,navigate:()=>{},embedded:!0,showBackNav:!1})}):r.jsx(I,{lookup:s}):r.jsx(d,{title:"Session not found",detail:"This session may have ended or its archive is not on this machine."}):r.jsx(d,{title:"No session reference",detail:"This embed needs a ?ref=<sessionId> query parameter."})}const $=Object.freeze(Object.defineProperty({__proto__:null,SessionEmbedObserveContent:I,SessionEmbedScreen:f,default:f},Symbol.toStringTag,{value:"Module"})),z=Object.freeze(Object.defineProperty({__proto__:null,SessionEmbedScreen:f},Symbol.toStringTag,{value:"Module"}));export{$ as S,z as a};
@@ -1 +1 @@
1
- import{r as S,j as p}from"./index-EsrkGBcv.js";import{A as L,a as z}from"./Provider-C35yu29I.js";import{p as M,a as E}from"./api-DSqpVKC7.js";import{s as K,f as F,p as P,l as q}from"./terminal-sessions-3RfJpen8.js";import{o as N}from"./openContent-C6XO6kr5.js";import{c as D}from"./createLucideIcon-zZ8Hx7er.js";import{E as $}from"./external-link-CUObqmgX.js";const J=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],W=D("square-terminal",J),Z=["threadId","externalSessionId","conversationId","runtimeSessionId","sessionId"];function B(e){const n=e?.trim();if(!n)return[];const s=n.split(/[\\/]/u).filter(Boolean).at(-1)??n,c=s.endsWith(".jsonl")?s.slice(0,-6):s;if(!c)return[];const r=new Set([c]),a=/^([A-Za-z][A-Za-z0-9_-]{0,15}):(.+)$/u.exec(c);if(a?.[2]&&(r.add(a[2]),a[1]==="session")){const o=/^([A-Za-z][A-Za-z0-9_-]{0,15}):(.+)$/u.exec(a[2]);o?.[2]&&r.add(o[2])}return[...r]}function Y(e){const n=new Set,s=e.agentId?.trim().split(".",1)[0];s?.startsWith("session-")&&n.add(s);for(const c of e.sessionRefs??[])for(const r of B(c))n.add(r);return[...n]}function T(e){const n=e.surfaces.filter(s=>s.state!=="exited");return n.length===0?null:n.find(s=>!s.paneId&&s.state==="live")??n.find(s=>!s.paneId)??n.find(s=>s.state==="live")??n[0]??null}function G(e,n){const s=new Set(Y(n));if(s.size===0)return null;const c=t=>{const l=t.trim().toLowerCase().replace(/_/gu,"-"),m=l==="claude-code"||l==="claude-stream-json"?"claude":l==="codex-app-server"||l==="codex-exec"?"codex":l==="pi-rpc"?"pi":l;return L.includes(m)?m:null},r=new Set;for(const t of n.sessionRefs??[]){const l=/^(?:session:)?([^:/\\]+):/u.exec(t?.trim()??""),m=l?c(l[1]):null;m&&r.add(m)}if(r.size>1)return null;const a=[...r][0],o=e.filter(t=>!a||c(t.harness)===a),f=o.filter(t=>t.origin!=="discovered"),i=[];for(const t of f){if(!t.sourceSessionId||!s.has(t.sourceSessionId))continue;const l=T(t);l&&i.push({session:t,surface:l,via:"sourceSessionId"})}if(i.length>0)return i.length===1?i[0]:null;const u=[];for(const t of f){const l=t.metadata;if(!l||!Z.some(h=>{const x=l[h];return typeof x=="string"&&s.has(x)}))continue;const g=T(t);g&&u.push({session:t,surface:g,via:"metadata"})}if(u.length>0)return u.length===1?u[0]:null;const d=[];for(const t of o){const l=t.surfaces.filter(h=>h.state!=="exited"&&s.has(h.sessionName)),m=l.filter(h=>!h.paneId),g=m.length>0?m:l;for(const h of g)d.push({session:t,surface:h,via:"sessionName"})}return d.length===1?d[0]:null}const U="/api/terminal-sessions?includeDiscovered=1",w=15e3;let v=null;const I=new Set;function V(e){return I.add(e),()=>{I.delete(e)}}let y=null;function k(){return v&&Date.now()-v.at<w?v.sessions:M(U,w)?.sessions??null}function R(){const e=k();return e?Promise.resolve(e):(y??=F({includeDiscovered:!0}).then(n=>{v={at:Date.now(),sessions:n};for(const s of I)s();return n}).finally(()=>{y=null}),y)}function Q(){R().catch(()=>{})}function b(e,n){const s=G(e,n);return s?{session:s.session,surface:s.surface,surfaceKey:K(s.surface),via:s.via}:null}function j(e,n="takeover"){const s=P(e.surfaceKey);return s?`scout://terminal?${new URLSearchParams({session:e.session.id,surface:q(s),mode:n}).toString()}`:null}function O(e,n){return e?{view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:e.surfaceKey,mode:"takeover"}:n?{view:"terminal",agentId:n,mode:"takeover"}:null}async function H(e){return E("/api/terminal-sessions/open-local",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({surface:e.surfaceKey})})}async function C(e){await E(`/api/terminal-hosts/herdr/sessions/${encodeURIComponent(e.surface.sessionName)}/focus`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:e.surface.paneId??e.surface.sessionName})})}function A(e){return e.surface.backend==="herdr"&&!!e.surface.paneId}function _(e){const n=e.agentId??null,s=S.useMemo(()=>JSON.stringify((e.sessionRefs??[]).filter(Boolean)),[e.sessionRefs]),[c,r]=S.useState(()=>{const o=k();return{key:JSON.stringify([n,s]),resolved:o!==null,target:o?b(o,e):null}}),a=JSON.stringify([n,s]);return S.useEffect(()=>{let o=!0;const f=()=>{const t=k();o&&t&&r({key:a,resolved:!0,target:b(t,e)})},i=()=>{R().then(t=>{o&&r({key:a,resolved:!0,target:b(t,e)})}).catch(()=>{o&&r({key:a,resolved:!0,target:null})})},u=V(f);i();const d=window.setInterval(i,15e3);return()=>{o=!1,u(),window.clearInterval(d)}},[a]),c.key===a?{target:c.target,resolved:c.resolved}:{target:null,resolved:!1}}function X(e){const{target:n,agentId:s,navigate:c,returnTo:r,onError:a,includeWeb:o=!0,emptyFallback:f=!0}=e,i=[],u=o?O(n,s):null;u&&i.push({kind:"action",label:"Open in web terminal",onSelect:()=>N(c,u,{returnTo:r})});const d=n?j(n):null;return d&&i.push({kind:"action",label:"Open in Scout app",onSelect:()=>window.open(d,"_self")}),n&&A(n)?i.push({kind:"action",label:"Focus pane in Herdr",onSelect:()=>{C(n).catch(t=>a?.(t instanceof Error?t.message:"herdr focus failed"))}}):n&&n.surface.attachCommand.length>0&&i.push({kind:"action",label:"Open in terminal app",onSelect:()=>{H(n).catch(t=>a?.(t instanceof Error?t.message:"could not open a terminal"))}}),i.length===0&&f&&i.push({kind:"action",label:"No live terminal for this session",onSelect:()=>{}}),i}function ie({hints:e,navigate:n,returnTo:s,className:c,label:r="Terminal"}){const a=z(),{target:o}=_(e),f=S.useRef(o);f.current=o;const[i,u]=S.useState(null),d=t=>{t.stopPropagation(),a(t,X({target:f.current,agentId:e.agentId,navigate:n,returnTo:s,onError:u}))};return p.jsxs("button",{type:"button",className:c,title:i??"Hop into this session's terminal",onMouseEnter:()=>Q(),onClick:d,children:[p.jsx(W,{size:12,strokeWidth:1.8,"aria-hidden":!0}),i?"Terminal error":r]})}function ce({hints:e,navigate:n,returnTo:s,className:c}){const{target:r,resolved:a}=_(e),[o,f]=S.useState(null),i=e.agentId??null,u=O(r,i),d=r?j(r):null;return!a&&!u||!u?null:p.jsxs("div",{className:c,"aria-label":"terminal actions",children:[r?p.jsxs("span",{className:"s-hop-target",title:`${r.surface.backend} · ${r.surface.sessionName}`,children:[r.surface.backend," · ",r.surface.sessionName]}):null,p.jsx("button",{type:"button",onClick:()=>N(n,u,{returnTo:s}),children:"Open in web terminal"}),d?p.jsxs("a",{href:d,children:["Open in Scout app",p.jsx($,{size:11,strokeWidth:1.8,"aria-hidden":!0})]}):null,r&&A(r)?p.jsx("button",{type:"button",onClick:()=>{f(null),C(r).catch(t=>f(t instanceof Error?t.message:"herdr focus failed"))},children:"Focus in Herdr"}):r&&r.surface.attachCommand.length>0?p.jsx("button",{type:"button",onClick:()=>{f(null),H(r).catch(t=>f(t instanceof Error?t.message:"could not open a terminal"))},children:"Open in terminal app"}):null,o?p.jsx("span",{role:"status",children:o}):null]})}export{ie as S,ce as a,R as g,k as p,b as r,X as s,O as t,Q as w};
1
+ import{r as S,j as p}from"./index-BFbLvCJn.js";import{A as L,a as z}from"./Provider-BEXAZWd9.js";import{p as M,a as E}from"./api-DSqpVKC7.js";import{s as K,f as F,p as P,l as q}from"./terminal-sessions-3RfJpen8.js";import{o as N}from"./openContent-C6XO6kr5.js";import{c as D}from"./createLucideIcon-CKbjXlwv.js";import{E as $}from"./external-link-Df1R34rX.js";const J=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],W=D("square-terminal",J),Z=["threadId","externalSessionId","conversationId","runtimeSessionId","sessionId"];function B(e){const n=e?.trim();if(!n)return[];const s=n.split(/[\\/]/u).filter(Boolean).at(-1)??n,c=s.endsWith(".jsonl")?s.slice(0,-6):s;if(!c)return[];const r=new Set([c]),a=/^([A-Za-z][A-Za-z0-9_-]{0,15}):(.+)$/u.exec(c);if(a?.[2]&&(r.add(a[2]),a[1]==="session")){const o=/^([A-Za-z][A-Za-z0-9_-]{0,15}):(.+)$/u.exec(a[2]);o?.[2]&&r.add(o[2])}return[...r]}function Y(e){const n=new Set,s=e.agentId?.trim().split(".",1)[0];s?.startsWith("session-")&&n.add(s);for(const c of e.sessionRefs??[])for(const r of B(c))n.add(r);return[...n]}function T(e){const n=e.surfaces.filter(s=>s.state!=="exited");return n.length===0?null:n.find(s=>!s.paneId&&s.state==="live")??n.find(s=>!s.paneId)??n.find(s=>s.state==="live")??n[0]??null}function G(e,n){const s=new Set(Y(n));if(s.size===0)return null;const c=t=>{const l=t.trim().toLowerCase().replace(/_/gu,"-"),m=l==="claude-code"||l==="claude-stream-json"?"claude":l==="codex-app-server"||l==="codex-exec"?"codex":l==="pi-rpc"?"pi":l;return L.includes(m)?m:null},r=new Set;for(const t of n.sessionRefs??[]){const l=/^(?:session:)?([^:/\\]+):/u.exec(t?.trim()??""),m=l?c(l[1]):null;m&&r.add(m)}if(r.size>1)return null;const a=[...r][0],o=e.filter(t=>!a||c(t.harness)===a),f=o.filter(t=>t.origin!=="discovered"),i=[];for(const t of f){if(!t.sourceSessionId||!s.has(t.sourceSessionId))continue;const l=T(t);l&&i.push({session:t,surface:l,via:"sourceSessionId"})}if(i.length>0)return i.length===1?i[0]:null;const u=[];for(const t of f){const l=t.metadata;if(!l||!Z.some(h=>{const x=l[h];return typeof x=="string"&&s.has(x)}))continue;const g=T(t);g&&u.push({session:t,surface:g,via:"metadata"})}if(u.length>0)return u.length===1?u[0]:null;const d=[];for(const t of o){const l=t.surfaces.filter(h=>h.state!=="exited"&&s.has(h.sessionName)),m=l.filter(h=>!h.paneId),g=m.length>0?m:l;for(const h of g)d.push({session:t,surface:h,via:"sessionName"})}return d.length===1?d[0]:null}const U="/api/terminal-sessions?includeDiscovered=1",w=15e3;let v=null;const I=new Set;function V(e){return I.add(e),()=>{I.delete(e)}}let y=null;function k(){return v&&Date.now()-v.at<w?v.sessions:M(U,w)?.sessions??null}function R(){const e=k();return e?Promise.resolve(e):(y??=F({includeDiscovered:!0}).then(n=>{v={at:Date.now(),sessions:n};for(const s of I)s();return n}).finally(()=>{y=null}),y)}function Q(){R().catch(()=>{})}function b(e,n){const s=G(e,n);return s?{session:s.session,surface:s.surface,surfaceKey:K(s.surface),via:s.via}:null}function j(e,n="takeover"){const s=P(e.surfaceKey);return s?`scout://terminal?${new URLSearchParams({session:e.session.id,surface:q(s),mode:n}).toString()}`:null}function O(e,n){return e?{view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:e.surfaceKey,mode:"takeover"}:n?{view:"terminal",agentId:n,mode:"takeover"}:null}async function H(e){return E("/api/terminal-sessions/open-local",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({surface:e.surfaceKey})})}async function C(e){await E(`/api/terminal-hosts/herdr/sessions/${encodeURIComponent(e.surface.sessionName)}/focus`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:e.surface.paneId??e.surface.sessionName})})}function A(e){return e.surface.backend==="herdr"&&!!e.surface.paneId}function _(e){const n=e.agentId??null,s=S.useMemo(()=>JSON.stringify((e.sessionRefs??[]).filter(Boolean)),[e.sessionRefs]),[c,r]=S.useState(()=>{const o=k();return{key:JSON.stringify([n,s]),resolved:o!==null,target:o?b(o,e):null}}),a=JSON.stringify([n,s]);return S.useEffect(()=>{let o=!0;const f=()=>{const t=k();o&&t&&r({key:a,resolved:!0,target:b(t,e)})},i=()=>{R().then(t=>{o&&r({key:a,resolved:!0,target:b(t,e)})}).catch(()=>{o&&r({key:a,resolved:!0,target:null})})},u=V(f);i();const d=window.setInterval(i,15e3);return()=>{o=!1,u(),window.clearInterval(d)}},[a]),c.key===a?{target:c.target,resolved:c.resolved}:{target:null,resolved:!1}}function X(e){const{target:n,agentId:s,navigate:c,returnTo:r,onError:a,includeWeb:o=!0,emptyFallback:f=!0}=e,i=[],u=o?O(n,s):null;u&&i.push({kind:"action",label:"Open in web terminal",onSelect:()=>N(c,u,{returnTo:r})});const d=n?j(n):null;return d&&i.push({kind:"action",label:"Open in Scout app",onSelect:()=>window.open(d,"_self")}),n&&A(n)?i.push({kind:"action",label:"Focus pane in Herdr",onSelect:()=>{C(n).catch(t=>a?.(t instanceof Error?t.message:"herdr focus failed"))}}):n&&n.surface.attachCommand.length>0&&i.push({kind:"action",label:"Open in terminal app",onSelect:()=>{H(n).catch(t=>a?.(t instanceof Error?t.message:"could not open a terminal"))}}),i.length===0&&f&&i.push({kind:"action",label:"No live terminal for this session",onSelect:()=>{}}),i}function ie({hints:e,navigate:n,returnTo:s,className:c,label:r="Terminal"}){const a=z(),{target:o}=_(e),f=S.useRef(o);f.current=o;const[i,u]=S.useState(null),d=t=>{t.stopPropagation(),a(t,X({target:f.current,agentId:e.agentId,navigate:n,returnTo:s,onError:u}))};return p.jsxs("button",{type:"button",className:c,title:i??"Hop into this session's terminal",onMouseEnter:()=>Q(),onClick:d,children:[p.jsx(W,{size:12,strokeWidth:1.8,"aria-hidden":!0}),i?"Terminal error":r]})}function ce({hints:e,navigate:n,returnTo:s,className:c}){const{target:r,resolved:a}=_(e),[o,f]=S.useState(null),i=e.agentId??null,u=O(r,i),d=r?j(r):null;return!a&&!u||!u?null:p.jsxs("div",{className:c,"aria-label":"terminal actions",children:[r?p.jsxs("span",{className:"s-hop-target",title:`${r.surface.backend} · ${r.surface.sessionName}`,children:[r.surface.backend," · ",r.surface.sessionName]}):null,p.jsx("button",{type:"button",onClick:()=>N(n,u,{returnTo:s}),children:"Open in web terminal"}),d?p.jsxs("a",{href:d,children:["Open in Scout app",p.jsx($,{size:11,strokeWidth:1.8,"aria-hidden":!0})]}):null,r&&A(r)?p.jsx("button",{type:"button",onClick:()=>{f(null),C(r).catch(t=>f(t instanceof Error?t.message:"herdr focus failed"))},children:"Focus in Herdr"}):r&&r.surface.attachCommand.length>0?p.jsx("button",{type:"button",onClick:()=>{f(null),H(r).catch(t=>f(t instanceof Error?t.message:"could not open a terminal"))},children:"Open in terminal app"}):null,o?p.jsx("span",{role:"status",children:o}):null]})}export{ie as S,ce as a,R as g,k as p,b as r,X as s,O as t,Q as w};
@@ -1,4 +1,4 @@
1
- import{r as h,j as t}from"./index-EsrkGBcv.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-CJa110yk.js";import{e as As,L as Ie,g as Bs,h as Is,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-CteDwdD-.js";import{b as Ws,c as zs}from"./lane-ask-display-BTVSakyo.js";import{a as Ms}from"./colors-CFlbwC25.js";import{a as Ce}from"./api-DSqpVKC7.js";import{r as Qe}from"./mentions-ByUvhS-v.js";import{a as Hs,g as es,t as Gs,b as qs,d as Us,n as De}from"./time-Dhsh_2EG.js";import{M as ss}from"./message-markup-Zwo3t4cI.js";import{q as Vs}from"./terminal-takeover-Ay5C2c-M.js";import{S as Ks}from"./SessionHopMenu-E6VJZrE0.js";import{x as We,y as Js,z as Ys}from"./NewChatComposer-C97-iTMK.js";import{u as Se}from"./Provider-C35yu29I.js";import{o as Xs}from"./openContent-C6XO6kr5.js";import{O as Zs}from"./ObservedTopologyPanel-CUTIoLZJ.js";import{M as Qs}from"./runtime-picker-DXu2bOTh.js";import"./index-724SdE6r.js";import{ObserveReasoningDisclosure as et,ObserveStreamCursor as ze}from"./ObserveTextFlow-PFnG_10h.js";import{SessionObserveReceiptView as st}from"./SessionObserveEvidence-Cuj_KHxR.js";import{M as tt}from"./message-circle-CxRVKNE-.js";import{W as nt}from"./wrench-DR0i5BU7.js";import{E as at}from"./external-link-CUObqmgX.js";import{C as ts}from"./chevron-up-CETZJzjV.js";import{C as ns}from"./chevron-down-l1mrh5S9.js";import{c as rt}from"./createLucideIcon-zZ8Hx7er.js";const ot=[["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"}]],lt=rt("tag",ot),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 it(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 ct(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 ua(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 ut(e,s){const n=e.text.trim();return{...e,text:s>1?`${n}
1
+ import{r as h,j as t}from"./index-BFbLvCJn.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-B8Am_1DC.js";import{e as As,L as Ie,g as Bs,h as Is,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-CteDwdD-.js";import{b as Ws,c as zs}from"./lane-ask-display-BTVSakyo.js";import{a as Ms}from"./colors-CFlbwC25.js";import{a as Ce}from"./api-DSqpVKC7.js";import{r as Qe}from"./mentions-s5oW4aQU.js";import{a as Hs,g as es,t as Gs,b as qs,d as Us,n as De}from"./time-Dhsh_2EG.js";import{M as ss}from"./message-markup-D1C7GzHo.js";import{q as Vs}from"./terminal-takeover-CXwdoZ5j.js";import{S as Ks}from"./SessionHopMenu-DX6PJPNk.js";import{x as We,y as Js,z as Ys}from"./NewChatComposer-D-VB5vdt.js";import{u as Se}from"./Provider-BEXAZWd9.js";import{o as Xs}from"./openContent-C6XO6kr5.js";import{O as Zs}from"./ObservedTopologyPanel-Ci7emnnj.js";import{M as Qs}from"./runtime-picker-IRcTkMZ5.js";import"./index-CXzJ_hGx.js";import{ObserveReasoningDisclosure as et,ObserveStreamCursor as ze}from"./ObserveTextFlow-C0oQEerY.js";import{SessionObserveReceiptView as st}from"./SessionObserveEvidence-uD1OX-R5.js";import{M as tt}from"./message-circle-BB3rFCVD.js";import{W as nt}from"./wrench-C-wjicn5.js";import{E as at}from"./external-link-Df1R34rX.js";import{C as ts}from"./chevron-up-CzveykKG.js";import{C as ns}from"./chevron-down-DEDSNJNY.js";import{c as rt}from"./createLucideIcon-CKbjXlwv.js";const ot=[["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"}]],lt=rt("tag",ot),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 it(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 ct(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 ua(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 ut(e,s){const n=e.text.trim();return{...e,text:s>1?`${n}
2
2
 
3
3
  (${s} reasoning updates)`:n}}function dt(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
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 mt(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 ht(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 ft(e){return(e.stream?.length??0)>0?e.stream.join(`
@@ -1 +1 @@
1
- import{j as e}from"./index-EsrkGBcv.js";import{S as u}from"./SessionContextStrip-CXfs9hUD.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./HarnessMark-C4naWc16.js";function b(s){return s?s.length>18?`${s.slice(0,8)}...${s.slice(-6)}`:s:"no session"}const m="Native session",x="Scout-managed chat";function R(s){return s.kind==="broker"||s.source==="broker"?x:m}function A({session:s,observe:t,machineId:o,navigate:r}){const i=t.data?.metadata?.session,l=new Set([t.refId,t.sessionId].map(c=>c?.trim()).filter(c=>!!c)),n=!!(s&&(s.sessionId?.trim()&&l.has(s.sessionId.trim())||s.harnessSessionId?.trim()&&l.has(s.harnessSessionId.trim())))?s:null,a=i?.cwd?.trim()||n?.workspaceRoot?.trim()||null,p=a?a.split(/[\\/]/).filter(Boolean).at(-1)??a:null,h=i?.hostName?.trim()||n?.executionNodeName?.trim()||null,d=t.sessionId?.trim()||t.refId;return e.jsx(u,{title:n?.title?.trim()||p||d,harness:i?.adapterType?.trim()||n?.harness||null,model:i?.model?.trim()||n?.model?.trim()||null,hostName:h,workspaceRoot:a,sessionId:d,machineId:o,conversationId:s?.id?.trim()||null,showSessionAction:!1,navigate:r})}function E({source:s,fidelity:t,sessionId:o,evidence:r,originLabel:i=m}){return e.jsxs("div",{className:"s-observe-embed-status","data-tone":r.tone,children:[i?e.jsx("span",{className:"s-observe-embed-status-origin",children:i}):e.jsx("span",{className:"s-observe-embed-status-source",children:s}),e.jsx("span",{children:t}),e.jsx("span",{title:o??void 0,children:b(o)}),e.jsx("span",{children:r.eventCountLabel}),r.tone==="live"&&e.jsx("span",{className:"s-observe-embed-status-live",children:"Live"})]})}function _({events:s}){return e.jsxs("section",{className:"s-observe-receipt-view","aria-label":"Session setup receipts",children:[e.jsxs("div",{className:"s-observe-receipt-view-copy",children:[e.jsx("strong",{children:"No observed trace activity"}),e.jsx("span",{children:"These broker lifecycle records confirm setup only."})]}),s.length>0&&e.jsx("ul",{className:"s-observe-receipt-list",children:s.map(t=>e.jsxs("li",{className:"s-observe-receipt",children:[e.jsx("span",{children:t.text}),t.detail&&e.jsx("small",{children:t.detail})]},t.id))})]})}export{m as NATIVE_SESSION_ORIGIN_LABEL,x as SCOUT_MANAGED_CHAT_ORIGIN_LABEL,E as SessionObserveEmbedStatus,_ as SessionObserveReceiptView,A as SessionRefObserveHeader,R as sessionRefObserveOriginLabel};
1
+ import{j as e}from"./index-BFbLvCJn.js";import{S as u}from"./SessionContextStrip-BoiIxXvS.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./HarnessMark-CP-PWk2W.js";function b(s){return s?s.length>18?`${s.slice(0,8)}...${s.slice(-6)}`:s:"no session"}const m="Native session",x="Scout-managed chat";function R(s){return s.kind==="broker"||s.source==="broker"?x:m}function A({session:s,observe:t,machineId:o,navigate:r}){const i=t.data?.metadata?.session,l=new Set([t.refId,t.sessionId].map(c=>c?.trim()).filter(c=>!!c)),n=!!(s&&(s.sessionId?.trim()&&l.has(s.sessionId.trim())||s.harnessSessionId?.trim()&&l.has(s.harnessSessionId.trim())))?s:null,a=i?.cwd?.trim()||n?.workspaceRoot?.trim()||null,p=a?a.split(/[\\/]/).filter(Boolean).at(-1)??a:null,h=i?.hostName?.trim()||n?.executionNodeName?.trim()||null,d=t.sessionId?.trim()||t.refId;return e.jsx(u,{title:n?.title?.trim()||p||d,harness:i?.adapterType?.trim()||n?.harness||null,model:i?.model?.trim()||n?.model?.trim()||null,hostName:h,workspaceRoot:a,sessionId:d,machineId:o,conversationId:s?.id?.trim()||null,showSessionAction:!1,navigate:r})}function E({source:s,fidelity:t,sessionId:o,evidence:r,originLabel:i=m}){return e.jsxs("div",{className:"s-observe-embed-status","data-tone":r.tone,children:[i?e.jsx("span",{className:"s-observe-embed-status-origin",children:i}):e.jsx("span",{className:"s-observe-embed-status-source",children:s}),e.jsx("span",{children:t}),e.jsx("span",{title:o??void 0,children:b(o)}),e.jsx("span",{children:r.eventCountLabel}),r.tone==="live"&&e.jsx("span",{className:"s-observe-embed-status-live",children:"Live"})]})}function _({events:s}){return e.jsxs("section",{className:"s-observe-receipt-view","aria-label":"Session setup receipts",children:[e.jsxs("div",{className:"s-observe-receipt-view-copy",children:[e.jsx("strong",{children:"No observed trace activity"}),e.jsx("span",{children:"These broker lifecycle records confirm setup only."})]}),s.length>0&&e.jsx("ul",{className:"s-observe-receipt-list",children:s.map(t=>e.jsxs("li",{className:"s-observe-receipt",children:[e.jsx("span",{children:t.text}),t.detail&&e.jsx("small",{children:t.detail})]},t.id))})]})}export{m as NATIVE_SESSION_ORIGIN_LABEL,x as SCOUT_MANAGED_CHAT_ORIGIN_LABEL,E as SessionObserveEmbedStatus,_ as SessionObserveReceiptView,A as SessionRefObserveHeader,R as sessionRefObserveOriginLabel};
@@ -0,0 +1 @@
1
+ import{r as m,j as s}from"./index-BFbLvCJn.js";import{a as g}from"./api-DSqpVKC7.js";import{u as k}from"./sse-BVxO0zNp.js";import{u as I}from"./tail-events-C6NWFB1N.js";import{B as N}from"./BackToPicker-BPU7kbXq.js";import{ConversationScreen as S}from"./ConversationScreen-Pzxy9x4m.js";import{S as R,a as y}from"./SessionObserve-Dw3bVQYF.js";import{SessionRefObserveHeader as w,sessionRefObserveOriginLabel as E}from"./SessionObserveEvidence-uD1OX-R5.js";import{c as T,a as C,b as O,s as f}from"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./index-BWHgHrtv.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./ComposerAttachments-9uYp_Lh5.js";import"./machine-scope-DJt9RZ2w.js";import"./message-markup-D1C7GzHo.js";import"./message-markup-BQW5jdJw.js";import"./mentions-s5oW4aQU.js";import"./Provider-BEXAZWd9.js";import"./theme-vars-DNK0nn3k.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./AgentDetailCard-CI-ufaEP.js";import"./AgentLiveActions-CkRGkv13.js";import"./terminal-takeover-CXwdoZ5j.js";import"./openContent-C6XO6kr5.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-B-FbWI7a.js";import"./AgentAvatar-Dn8TUv5W.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-L9738YVP.js";import"./AstronautSuit-Dzu4GOMR.js";import"./panel-right-WKLdPm0F.js";import"./CommsFlowGraph-Cc48o9u_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-Dh056d91.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Ckasql5e.js";import"./CommsSelection-CuphnUny.js";/* empty css */import"./use-conversation-list-CGtcpdPd.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DopIbJwf.js";import"./ConversationComposer-hYtLurqy.js";import"./zap-BqL8ttGz.js";import"./ConversationFeedRows-Bu0ZJcy8.js";import"./ConversationPanels-D6KuqvGu.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./activity-CXkZ620t.js";import"./message-circle-BB3rFCVD.js";import"./ConversationStatus-BEefIbXq.js";import"./check-BM6QtbB7.js";import"./sparkles-Br-bA2aZ.js";import"./triangle-alert-BZikHKuT.js";import"./SessionContextStrip-BoiIxXvS.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-B8Am_1DC.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-DX6PJPNk.js";import"./external-link-Df1R34rX.js";import"./ObservedTopologyPanel-Ci7emnnj.js";import"./ObserveTextFlow-C0oQEerY.js";import"./wrench-C-wjicn5.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 F(r){return r.startsWith("native:process:")}function x(r){const[o,t]=m.useState(()=>({sessionRef:r,lookup:null,loading:!0,error:null})),i=m.useRef(null),p=m.useRef(null);p.current||(p.current=T(a=>g(`/api/session-ref/${encodeURIComponent(a)}`),({sessionRef:a,result:n})=>{if(n.ok){t({sessionRef:a,lookup:n.lookup,loading:!1,error:null});return}t({sessionRef:a,lookup:null,loading:!1,error:n.error instanceof Error?n.error.message:String(n.error)})}));const l=m.useCallback(async()=>{await p.current.request(r)},[r]);m.useEffect(()=>(t({sessionRef:r,lookup:null,loading:!0,error:null}),l(),()=>{p.current?.invalidate(),i.current&&(clearTimeout(i.current),i.current=null)}),[l,r]);const{lookup:e,loading:u,error:d}=C(o,r),c=m.useCallback(()=>{i.current||(i.current=setTimeout(()=>{i.current=null,l()},1e3))},[l]);return k(a=>{const n=[r,e?.refId,e?.kind==="conversation"?e.conversationId:null,e?.session?.agentId,e?.kind==="observe"?e.observe.agentId:null,e?.kind==="observe"?e.observe.sessionId:null];O(a,n)&&c()}),I(a=>{const n=v(a.sessionId),j=v(r),h=e?.kind==="observe"?v(e.observe.sessionId??e.observe.refId):"",b=e?.kind==="observe"?v(e.observe.data.metadata?.session?.externalSessionId):"";!f(n,j)&&(!h||!f(n,h))&&(!b||!f(n,b))||c()}),m.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),{lookup:e,loading:u,error:d}}function Bs({sessionRef:r}){const{lookup:o,loading:t,error:i}=x(r);return o?.kind==="observe"?s.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}):s.jsx("aside",{className:"s-observe-rail s-observe-rail--context",children:s.jsxs("div",{children:[s.jsx("div",{className:"s-observe-rail-label",children:o?.kind==="conversation"?"Conversation":"Session context"}),s.jsx("div",{className:"s-observe-empty",children:t?"Resolving session reference":i?"Session context unavailable":"No observe context captured for this session"})]})})}function Ms({sessionRef:r,navigate:o,machineId:t,renderBeforeContent:i,showObserveRail:p=!0,onLookup:l}){const{lookup:e,loading:u,error:d}=x(r);if(m.useEffect(()=>{e&&l?.(e)},[e,l]),e?.kind==="conversation")return s.jsxs(s.Fragment,{children:[i?.(e),s.jsx(S,{conversationId:e.conversationId,navigate:o})]});if(e?.kind==="observe")return s.jsxs(s.Fragment,{children:[i?.(e),s.jsx(w,{session:e.session,observe:e.observe,machineId:t,navigate:o}),s.jsx(R,{data:e.observe.data,agentId:e.observe.agentId??e.session?.agentId??void 0,sessionId:e.observe.sessionId??e.observe.refId,conversationId:e.session?.id??null,showRail:p,observeSource:e.observe.source,observeFidelity:e.observe.fidelity,originLabel:E(e.observe),defaultPresentation:"conversation"})]});if(u)return s.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:s.jsx("section",{className:"s-thread-overview",children:s.jsxs("div",{className:"s-thread-overview-copy",children:[s.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[s.jsx("h2",{className:"s-page-title",children:"Session"}),s.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),s.jsxs("p",{className:"s-thread-overview-summary s-session-ref-loading",children:[s.jsx("span",{className:"s-session-ref-loading-dot"}),s.jsx("span",{className:"s-session-ref-loading-dot"}),s.jsx("span",{className:"s-session-ref-loading-dot"}),"Resolving session reference"]})]})})});const c=F(r);return s.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:s.jsx("section",{className:"s-thread-overview",children:s.jsxs("div",{className:"s-thread-overview-copy",children:[s.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[s.jsx("h2",{className:"s-page-title",children:c?"Process trace unavailable":"Session not found"}),s.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),s.jsx("p",{className:"s-thread-overview-summary",children:c?"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."}),d&&s.jsx("p",{className:"s-session-ref-error-detail",children:d}),s.jsx("div",{className:"s-session-ref-nav-hint",children:s.jsx(N,{slot:"sessions",fallback:{view:"sessions"},navigate:o})})]})})})}export{Bs as SessionRefContextRail,Ms as SessionRefScreen};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-BFbLvCJn.js";import{RawSessionsTable as t}from"./RawSessionsTable-TdKlJIPl.js";/* empty css */import"./DataTable-DnL_8SAu.js";/* empty css */import"./Provider-BEXAZWd9.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./SessionHopMenu-DX6PJPNk.js";import"./openContent-C6XO6kr5.js";import"./external-link-Df1R34rX.js";import"./tail-events-C6NWFB1N.js";function to({navigate:o}){return r.jsx(t,{navigate:o})}export{to as SessionsScreen};
@@ -1,3 +1,3 @@
1
- import{j as e,r as o,ac as je,G as ye,k as ee}from"./index-EsrkGBcv.js";import{a as fe}from"./provider-Dojd8quC.js";import{a as M}from"./api-DSqpVKC7.js";import{g as Se,a as Ne,e as we,s as ke,b as Ce,d as Ae,c as Ee}from"./credentials-OeoF-VKJ.js";import{u as Q,F as Te,J as Oe,M as Pe,N as Ie}from"./Provider-C35yu29I.js";import{t as Re}from"./time-Dhsh_2EG.js";import{m as $e,v as Le,w as Me}from"./scout-voice-CZx60X6E.js";import{u as De}from"./keyboard-nav-DDHegDbx.js";import{a as Ve}from"./router-DCtl8wqb.js";import{C as J}from"./CrewAvatar-kTznzqcO.js";import{C as _e}from"./CastPicker-BXUtPAGC.js";import{p as se}from"./AgentAvatar-CrP1eXxk.js";import{C as He}from"./CrewStage-vdO0qm3D.js";import{S as te}from"./SpriteAvatar-CpZWf54-.js";import{VoiceHostStatusBanner as ze,VoicePermissionsPanel as Be}from"./VoicePermissionsPanel-Ok2nfxHw.js";import{u as Fe}from"./chunk-HRAB3GC3-DbVLgbWX.js";import{C as R}from"./check-lrJ3a73a.js";import{M as Ue}from"./monitor-DTTYEb73.js";import{c as he}from"./createLucideIcon-zZ8Hx7er.js";import{R as Ke}from"./refresh-cw-BmVr7sCD.js";import{C as We}from"./copy-xKeM5ZtU.js";import{a as Ge}from"./DocumentFocusViewer-DJr0v0D_.js";import{S as qe}from"./sparkles-BjHq_DNK.js";const Ye=[["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"}]],Xe=he("moon",Ye);const Ze=[["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"}]],Je=he("sun",Ze),me="/api/voice/playback/settings",Qe="scout:voice-playback-settings",es="OPENSCOUT_VOICE_PLAYBACK",ss="openscout.voice-playback-settings";function ts(s){return M(me,{signal:s,cache:"no-store"})}function as(s){return M(me,{method:"PUT",body:JSON.stringify({playback:s})})}function ns(s){if(window.dispatchEvent(new CustomEvent(Qe,{detail:s})),!("BroadcastChannel"in window))return;const a=new BroadcastChannel(ss);a.postMessage(s),a.close()}const is=[195,125,300,45,355,210];function ls(s){return`oklch(0.80 0.14 ${s})`}function p({label:s,right:a}){return e.jsxs("div",{className:"s-settings-section-rule",children:[e.jsx("span",{className:"s-settings-section-label",children:s}),e.jsx("span",{className:"s-settings-section-line"}),a&&e.jsx("span",{className:"s-settings-section-right",children:a})]})}function N({label:s,hint:a,children:n}){return e.jsxs("div",{className:"s-settings-field",children:[e.jsx("label",{className:"s-settings-field-label",children:s}),n,a&&e.jsx("span",{className:"s-settings-field-hint",children:a})]})}function _({value:s,onChange:a,mono:n}){return e.jsx("input",{className:`s-settings-input${n?" s-settings-input--mono":""}`,value:s,onChange:l=>a(l.target.value)})}function ae({value:s,onChange:a,rows:n=3}){return e.jsx("textarea",{className:"s-settings-textarea",value:s,onChange:l=>a(l.target.value),rows:n})}function rs({value:s,onChange:a,min:n,max:l,step:m=1,unit:g=""}){return e.jsxs("div",{className:"s-settings-slider-wrap",children:[e.jsx("input",{type:"range",min:n,max:l,step:m,value:s,onChange:x=>a(Number(x.target.value))}),e.jsxs("span",{className:"s-settings-slider-value",children:[s," ",g]})]})}function H({value:s,onChange:a,options:n,stacked:l,columns:m}){return e.jsx("div",{className:l?"s-settings-option-stacked":"s-settings-option-grid",style:l?void 0:{gridTemplateColumns:`repeat(${m??n.length}, 1fr)`},children:n.map(g=>e.jsxs("button",{className:`s-settings-option-btn${s===g.id?" s-settings-option-btn--active":""}`,onClick:()=>a(g.id),children:[e.jsx("span",{className:"s-settings-option-label",children:g.label}),e.jsx("span",{className:"s-settings-option-sub",children:g.sub})]},g.id))})}const os=[{id:"system",label:"System",sub:"Follow this device",icon:Ue},{id:"light",label:"Light",sub:"Bright workspace",icon:Je},{id:"dark",label:"Dark",sub:"Low-light workspace",icon:Xe}],cs=[{id:"scout",label:"Scout",sub:"Control-room navigation"},{id:"slack",label:"Slack",sub:"Workspace rail and channel-style lists"}],ne=[{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"}],ie=[{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"}],le=[{id:"soft",label:"Soft",sub:"Quiet separators"},{id:"balanced",label:"Defined",sub:"Clear structure"},{id:"strong",label:"Strong",sub:"High separation"}],re=[{id:"theme",label:"Theme"},{id:"lime",label:"Lime"},{id:"cyan",label:"Cyan"},{id:"violet",label:"Violet"},{id:"amber",label:"Amber"}],ds=[{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"}],oe=ds,ce=[{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"}],us=["milo","vex","sprout"];function X({className:s,theme:a,template:n,palette:l,contrast:m,accent:g,children:x}){return e.jsx("div",{className:s,"data-scout-theme":a,"data-scout-theme-mode":a,"data-scout-palette":l,"data-scout-contrast":m,"data-scout-accent":g,"data-hudson-theme":a,"data-hudson-template":n,children:x})}function hs({palette:s,theme:a,template:n}){return e.jsxs(X,{className:"s-settings-palette-sample",theme:a,template:n,palette:s,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 ms({theme:s,template:a,palette:n,contrast:l,accent:m}){return e.jsxs(X,{className:"s-settings-live-preview",theme:s,template:a,palette:n,contrast:l,accent:m,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 gs(){const s=Fe(),{appearanceDetails:a,updateAppearanceDetails:n}=Q();if(!s)return e.jsx("div",{className:"s-settings-inline-note",children:"Theme controls are unavailable in this embedded surface."});const l=s.resolvedTheme??"dark",m=je(s.template)??"hudson",g=ne.find(t=>t.id===a.palette)?.label??"Scout",x=ie.find(t=>t.id===m)?.label??"Rounded",b=le.find(t=>t.id===a.contrast)?.label??"Defined",j=re.find(t=>t.id===a.accent)?.label??"Theme",d=oe.find(t=>t.id===a.avatarStyle)?.label??"Generative",r=ce.find(t=>t.id===a.avatarSize)?.label??"Regular";return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:"App layout",right:`currently ${a.shell}`}),e.jsx("div",{className:"s-settings-shell-grid",role:"group","aria-label":"App layout",children:cs.map(t=>{const u=a.shell===t.id;return e.jsxs("button",{type:"button",className:"s-settings-shell-choice","data-shell":t.id,"data-active":u||void 0,"aria-pressed":u,onClick:()=>n({shell:t.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:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub})]})]},t.id)})}),e.jsx(p,{label:"Color mode",right:`currently ${l}`}),e.jsx("div",{className:"s-settings-theme-mode-grid",role:"group","aria-label":"Color mode",children:os.map(t=>{const u=t.icon,y=s.theme===t.id,w=t.id==="system"?`Follow this device · resolves to ${s.resolvedTheme??"…"}`:t.sub;return e.jsxs("button",{type:"button",className:"s-settings-theme-mode","data-active":y||void 0,"aria-pressed":y,onClick:()=>s.setTheme(t.id),children:[e.jsx(u,{size:18,strokeWidth:1.7,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:t.label}),e.jsx("small",{children:w})]}),y?e.jsx(R,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]},t.id)})}),e.jsxs("div",{className:"s-settings-appearance-workbench",children:[e.jsxs("div",{className:"s-settings-appearance-controls",children:[e.jsx(p,{label:"Color theme",right:`currently ${g.toLowerCase()}`}),e.jsx("div",{className:"s-settings-palette-grid",role:"group","aria-label":"Color theme",children:ne.map(t=>{const u=a.palette===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({palette:t.id}),children:[e.jsx(hs,{palette:t.id,theme:l,template:m}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{children:t.spec})]})]},t.id)})}),e.jsx(p,{label:"Interface shape",right:`currently ${x.toLowerCase()}`}),e.jsx("div",{className:"s-settings-interface-grid",role:"group","aria-label":"Interface shape",children:ie.map(t=>{const u=m===t.id;return e.jsxs("button",{type:"button",className:"s-settings-interface-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>s.setTemplate(t.id),children:[e.jsx(X,{className:"s-settings-shape-sample",theme:l,template:t.id,palette:a.palette,contrast:a.contrast,accent:a.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:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{children:t.spec})]})]},t.id)})}),e.jsx(p,{label:"Separation",right:`currently ${b.toLowerCase()}`}),e.jsx("div",{className:"s-settings-contrast-grid",role:"group","aria-label":"Interface contrast",children:le.map(t=>{const u=a.contrast===t.id;return e.jsxs("button",{type:"button",className:"s-settings-contrast-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({contrast:t.id}),children:[e.jsxs("span",{className:"s-settings-contrast-lines","data-level":t.id,"aria-hidden":!0,children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsx("strong",{children:t.label}),e.jsx("small",{children:t.sub})]},t.id)})}),e.jsx(p,{label:"Signal accent",right:`currently ${j.toLowerCase()}`}),e.jsx("div",{className:"s-settings-accent-row",role:"group","aria-label":"Signal accent",children:re.map(t=>{const u=a.accent===t.id;return e.jsxs("button",{type:"button",className:"s-settings-accent-choice","data-accent-option":t.id,"data-active":u||void 0,"aria-pressed":u,"aria-label":`${t.label} accent`,onClick:()=>n({accent:t.id}),children:[e.jsx(X,{className:"s-settings-accent-dot",theme:l,template:m,palette:a.palette,contrast:a.contrast,accent:t.id,children:e.jsx("i",{})}),e.jsx("span",{children:t.label}),u?e.jsx(R,{size:13,"aria-hidden":!0}):null]},t.id)})}),e.jsx(p,{label:"Avatar system",right:`currently ${d.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-grid",role:"group","aria-label":"Avatar system",children:oe.map(t=>{const u=a.avatarStyle===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice s-settings-avatar-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({avatarStyle:t.id}),children:[e.jsx("div",{className:"s-settings-avatar-preview",children:t.id==="crew"?e.jsx(J,{slug:"milo",size:38,ring:!1,badge:!1}):t.id==="chip"?e.jsx(J,{slug:"milo",size:38,chip:!0,ring:!1,badge:!1}):e.jsx(te,{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:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsxs("span",{children:[t.spec,(()=>{const y=ye(t.id);return y?` · ${y.covered} of ${y.total} cast`:" · every agent"})()]})]})]},t.id)})}),e.jsx(p,{label:"Avatar size",right:`currently ${r.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-size-row",role:"group","aria-label":"Avatar size",children:ce.map(t=>{const u=a.avatarSize===t.id,y=se("row",t.id)??24;return e.jsxs("button",{type:"button",className:"s-settings-avatar-size-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({avatarSize:t.id}),children:[e.jsx("span",{className:"s-settings-avatar-size-sample","aria-hidden":!0,children:us.map(w=>a.avatarStyle==="sprite"?e.jsx(te,{name:w,size:y},w):e.jsx(J,{slug:w,size:y,chip:a.avatarStyle==="chip",ring:!1,badge:!1},w))}),e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{className:"s-settings-avatar-size-spec",children:`${y}PX ROW · ${se("inspector",t.id)}PX TILE`})]},t.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(p,{label:"Live specimen",right:l}),e.jsx(ms,{theme:l,template:m,palette:a.palette,contrast:a.contrast,accent:a.accent}),e.jsxs("dl",{className:"s-settings-theme-readout",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Palette"}),e.jsx("dd",{children:g})]}),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:j})]})]}),e.jsx("p",{className:"s-settings-preview-note",children:"Each control changes one visual axis. Success, warning, and failure colors keep their meaning."})]})]})]})}function ps({profile:s,update:a}){const{appearanceDetails:n,updateAppearanceDetails:l}=Q(),[m,g]=o.useState(n.operatorCharacter||"milo"),x=m,[b,j]=o.useState(!0),d=ee.find(t=>t.slug.toLowerCase()===x.toLowerCase())??ee[0],r=t=>{g(t),l({operatorCharacter:t})};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{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:()=>j(t=>!t),title:b?"Collapse to coin framing":"Break out to full body figure",children:b?e.jsxs(e.Fragment,{children:[e.jsx(Ge,{size:13,"aria-hidden":!0}),e.jsx("span",{children:"Coin Framing"})]}):e.jsxs(e.Fragment,{children:[e.jsx(qe,{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(He,{slug:x,open:b,onToggle:()=>j(t=>!t),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:s.name||"Operator"}),e.jsxs("span",{children:[s.handle||"@you"," · ",s.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:is.map(t=>e.jsx("button",{type:"button",onClick:()=>a({hue:t}),className:`s-settings-hue-dot${s.hue===t?" s-settings-hue-dot--active":""}`,style:{background:ls(t)},title:`Hue ${t}°`},t))})]})]})]})]})]}),e.jsxs(e.Fragment,{children:[e.jsx(p,{label:"Your character mascot",right:`currently ${d.name.toLowerCase()}`}),e.jsx("div",{className:"s-settings-cast-grid-wrap",children:e.jsx(_e,{selectedSlug:x,onSelect:r})})]}),e.jsx(N,{label:"Display name",hint:"Shown when agents address you.",children:e.jsx(_,{value:s.name,onChange:t=>a({name:t})})}),e.jsx(N,{label:"Handle",hint:"Used in @mentions across threads.",children:e.jsx(_,{value:s.handle,onChange:t=>a({handle:t}),mono:!0})}),e.jsx(N,{label:"Pronouns",children:e.jsx(_,{value:s.pronouns,onChange:t=>a({pronouns:t})})}),e.jsx(p,{label:"How agents understand you",right:"shipped as system prompt context"}),e.jsx(N,{label:"Operator bio",hint:"How you want to be worked with. Agents read this before asking you things.",children:e.jsx(ae,{value:s.bio,onChange:t=>a({bio:t}),rows:4})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(N,{label:"Timezone",children:e.jsx(_,{value:s.timezone,onChange:t=>a({timezone:t}),mono:!0})}),e.jsx(N,{label:"Working hours",children:e.jsx(_,{value:s.workingHours,onChange:t=>a({workingHours:t}),mono:!0})})]}),e.jsx(p,{label:"Ephemeral agent names",right:"rotation pool for one-off agents"}),e.jsx(N,{label:"Name pool",hint:s.provisionalAgentNames.length>0?`${s.provisionalAgentNamesResolvedCount} names active (${s.provisionalAgentNamesSource}). Preview: ${s.provisionalAgentNamesPreview.join(", ")}${s.provisionalAgentNamesResolvedCount>s.provisionalAgentNamesPreview.length?", …":""}`:"Leave empty to use Scout's built-in rotation. One short name per line.",children:e.jsx(ae,{value:s.provisionalAgentNames.join(`
2
- `),onChange:t=>a({provisionalAgentNames:t.split(/\r?\n/u).map(u=>u.trim()).filter(Boolean)}),rows:6})}),e.jsx(N,{label:"Pool mode",hint:"Replace uses only your list. Add to defaults prepends yours, then Scout's built-in names.",children:e.jsx(H,{value:s.provisionalAgentNamesMode,onChange:t=>a({provisionalAgentNamesMode:t}),options:[{id:"replace",label:"Replace",sub:"your list only"},{id:"extend",label:"Add to defaults",sub:"yours first, then Scout"}],columns:2})})]})}function bs({profile:s,update:a}){return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:"Interrupt policy"}),e.jsx(N,{label:"When agents can ping you directly",hint:"Blocking-only means only asks that truly stall work. Others get batched.",children:e.jsx(H,{value:s.interruptThreshold,onChange:n=>a({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(N,{label:"Batch window (min)",children:e.jsx(rs,{value:s.batchWindow,min:5,max:60,step:5,onChange:n=>a({batchWindow:n}),unit:"min"})}),e.jsx(N,{label:"Quiet hours",children:e.jsx(_,{value:s.quietHours,onChange:n=>a({quietHours:n}),mono:!0})})]}),e.jsx(p,{label:"Where to reach you"}),e.jsx(N,{label:"Preferred channel",children:e.jsx(H,{value:s.channel,onChange:n=>a({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(p,{label:"Tone calibration",right:"how agents write to you"}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(N,{label:"Verbosity",children:e.jsx(H,{stacked:!0,value:s.verbosity,onChange:n=>a({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(N,{label:"Tone",children:e.jsx(H,{stacked:!0,value:s.tone,onChange:n=>a({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 vs({clientCredentials:s,serverCredentials:a,reloadCredentials:n}){const[l,m]=o.useState(""),[g,x]=o.useState(!1),[b,j]=o.useState(null),d=a?.openai??null,r=!!d?.configured,t=d?.source==="env"?"OPENAI_API_KEY":d?.source==="local-config"?"local Scout config":d?.source==="local-store"?"local OpenScout store":"missing",u=d?.source==="local-store"&&s?.configured?"local OpenScout store + HudVault mirror":t,y=d?.preview??s?.preview??null,w=async()=>{x(!0),j(null);try{const S=l.trim();await ke(S);let C=null;try{await Ce(S)}catch(A){C=A instanceof Error?A.message:"HudVault save failed."}m(""),await n(),j(C?`Saved to local OpenScout store. Browser mirror failed: ${C}`:"Saved to local OpenScout store and Hudson Vault.")}catch(S){j(S instanceof Error?S.message:"Could not save key.")}finally{x(!1)}},$=async()=>{x(!0),j(null);try{const[S,C]=await Promise.allSettled([Ae(),Ee()]);m(""),await n(),S.status==="rejected"||C.status==="rejected"?j("Cleared what I could; one credential store did not respond."):j(d?.source==="env"||d?.source==="local-config"?"Removed saved key. Server fallback is still configured.":"Removed saved key.")}catch(S){j(S instanceof Error?S.message:"Could not clear key.")}finally{x(!1)}};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:"Model providers",right:r?`configured · ${u}`:"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:r?"var(--green)":"var(--dim)"},children:["●"," ",r?"ready":"missing"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[y??"No key stored"," · ",u]}),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(N,{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:l,placeholder:r?"Saved key configured":"sk-...",autoComplete:"off",spellCheck:!1,onChange:S=>m(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:g||!l.trim(),onClick:()=>{w()},children:g?"Saving":"Save key"}),e.jsx("button",{type:"button",className:"s-btn",disabled:g||!(s?.configured||d?.source==="local-store"),onClick:()=>{$()},children:"Clear saved key"})]})]})}const xs=[{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 js(){const s=fe(Te,!0),[a,n]=o.useState(null),[l,m]=o.useState(null),[g,x]=o.useState(null),[b,j]=o.useState([]),[d,r]=o.useState([]),[t,u]=o.useState(!0),[y,w]=o.useState(!1),[$,S]=o.useState(!1),[C,A]=o.useState(!1),[I,f]=o.useState(null),D=o.useCallback(async()=>{u(!0);try{const[i,c,v,Y]=await Promise.all([$e(),Le(12).catch(()=>[]),Oe().catch(()=>null),ts().catch(()=>null)]);n(i.settings),j(i.devices),r(c),m(v),x(Y),f(null)}catch(i){f(i instanceof Error?i.message:String(i))}finally{u(!1)}},[]);o.useEffect(()=>{D()},[D]);const V=o.useCallback(async i=>{w(!0),f(null);try{const c=await Me(i);n(c.settings),j(c.devices)}catch(c){f(c instanceof Error?c.message:String(c))}finally{w(!1)}},[]),z=o.useCallback(async i=>{S(!0),f(null);try{const c=await Pe(i);m(c),Ie(c)}catch(c){f(c instanceof Error?c.message:String(c))}finally{S(!1)}},[]),B=o.useCallback(async i=>{A(!0),f(null);try{const c=await as(i?"host":"browser");x(c),ns(c)}catch(c){f(c instanceof Error?c.message:String(c))}finally{A(!1)}},[]);if(t&&!a)return e.jsx("div",{className:"s-settings-field-hint",children:"Loading voice settings…"});const F=a?.inputDeviceId??b.find(i=>i.isDefault)?.id??"",T=a?.permissions?.find(i=>i.kind==="microphone")??null,O=a?.permissions?.find(i=>i.kind==="speechRecognition")??null,L=(a?.permissions?.length??0)>0||b.length>0,E=s&&l?.enabled===!0,Z=$||!s||!l||l.locked,W=s?l?l.locked?`Controlled by OPENSCOUT_REALTIME_VOICE_ENABLED · ${l.enabled?"on":"off"}`:E?"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=g?.playback==="host",G=C||!g||g.locked,q=g?g.locked?`Controlled by ${es} · ${g.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.",h=[L?null:"Scout voice host is offline. Launch Scout Menu on this Mac — the browser does not capture audio.",T?.status==="denied"||T?.status==="restricted"?T?.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.":T?.canRequest?"Microphone has not been requested yet. Request access or tap the mic in chat to show the macOS prompt.":null,!O?.granted&&(O?.status==="denied"||O?.status==="restricted")?O?.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,a?.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(i=>!!i);return e.jsxs("div",{className:"s-settings-col-gap",children:[I&&e.jsx("div",{className:"s-settings-field-hint",style:{color:"var(--amber)"},children:I}),e.jsx(p,{label:"Realtime conversation",right:"operator control"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":E||void 0,"data-unavailable":!s||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:W})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":E,"aria-label":"Enable live voice on this Scout",disabled:Z,"data-checked":E||void 0,className:"s-settings-switch",onClick:()=>{z(!E)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:E?"On":"Off"})]})]}),e.jsx(p,{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:q})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":P,"aria-label":"Speak on this Mac",disabled:G,"data-checked":P||void 0,className:"s-settings-switch",onClick:()=>{B(!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(ze,{hostOnline:L,micPermission:T,speechPermission:O,modelReady:a?.modelReady}),e.jsx(p,{label:"Scout Menu permissions",right:"voice host"}),e.jsx(Be,{permissions:a?.permissions,hostOnline:L,disabled:y||t,onError:i=>f(i),onRefresh:D}),e.jsx(p,{label:"Transcription"}),e.jsx(N,{label:"Engine",hint:a?.modelReady?"Parakeet is warm and ready.":a?.modelInstalled?"Parakeet is installed; first dictation may warm the model.":"Parakeet downloads on first use. Apple Speech stays available meanwhile.",children:e.jsx(H,{value:a?.preference??"auto",onChange:i=>{n(c=>c&&{...c,preference:i}),V({preference:i})},options:xs,columns:3})}),e.jsx(N,{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:F,disabled:y,onChange:i=>{const c=i.target.value||null;n(v=>v&&{...v,inputDeviceId:c,inputDeviceName:b.find(Y=>Y.id===c)?.name??null}),V({inputDeviceId:c})},children:b.map(i=>e.jsxs("option",{value:i.id,children:[i.name,i.isDefault?" (system default)":""]},i.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(p,{label:"Diagnostics"}),e.jsx("ul",{className:"s-settings-field-hint",style:{margin:0,paddingLeft:"1.1rem",display:"grid",gap:"0.35rem"},children:h.map(i=>e.jsx("li",{children:i},i))}),e.jsx(p,{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(i=>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:[i.status," · ",i.lastEvent??"started"]}),e.jsxs("div",{className:"s-settings-device-meta",children:[i.surface," · ",Re(i.updatedAt),i.error?` · ${i.error}`:""]}),i.lastTranscript?e.jsx("div",{className:"s-settings-field-hint",style:{marginTop:"0.2rem"},children:i.lastTranscript.length>96?`${i.lastTranscript.slice(0,96)}…`:i.lastTranscript}):null]})},i.sessionId))}),e.jsx("div",{className:"s-settings-button-row",children:e.jsx("button",{type:"button",className:"s-btn",disabled:t||y,onClick:()=>{D()},children:t?"Refreshing…":"Refresh"})})]})}const ys={desktop:"◻",mobile:"▯",tablet:"▭"};function fs({device:s}){const a=s.status==="this-device"?"var(--accent)":s.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:ys[s.kind]??"□"}),e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-device-name",children:s.name}),e.jsxs("div",{className:"s-settings-device-meta",children:[s.kind," · via ",s.relay," · ",s.lastSeen]})]}),e.jsxs("span",{className:"s-settings-device-status",style:{color:a},children:["●"," ",s.status==="this-device"?"this device":s.status]}),e.jsx("button",{className:"s-btn",disabled:s.status==="this-device",children:s.status==="this-device"?"—":"Unpair"})]})}function Ss({pairing:s}){const a=[{id:"local",name:"This machine",kind:"desktop",status:"this-device",relay:"local",lastSeen:"now"}];if(s?.trustedPeers)for(const n of s.trustedPeers){const l=n.fingerprint===s.connectedPeerFingerprint;a.push({id:n.fingerprint,name:n.name??"Paired device",kind:"mobile",status:l?"online":"offline",relay:"tailscale",lastSeen:n.lastSeenLabel??"—"})}return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:`Paired devices · ${a.length}`}),e.jsx("div",{className:"s-settings-col-gap",style:{gap:10},children:a.map(n=>e.jsx(fs,{device:n},n.id))}),e.jsx(p,{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:s?.isRunning?"var(--green)":"var(--dim)"},children:["●"," ",s?.isRunning?"connected":"offline"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[s?.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 K(s,a,n=!1){if(!s&&!a)return"Not reported";const l=s||"detached";return a?`${l} @ ${a}${n?" (modified)":""}`:l}function ge(){return navigator.userAgentData?.platform||navigator.platform||"Unknown"}function k({label:s,value:a,detail:n}){return e.jsxs("div",{className:"s-settings-about-fact",children:[e.jsx("dt",{children:s}),e.jsxs("dd",{children:[e.jsx("code",{children:a}),n?e.jsx("span",{children:n}):null]})]})}function de(s){const{build:a,mesh:n}=s,l=n?.health.build??null,m=n?.localNode?n.nodes[n.localNode.id]?.host:void 0,g=ge();return["OpenScout troubleshooting report",`Collected: ${s.collectedAt.toISOString()}`,"","[Web]",`Observed: ${s.buildCollectedAt?.toISOString()??"unknown"}`,`Version: ${a?.version??"unknown"}`,`Mode: ${a?.mode??"unknown"}`,`Source: ${K(a?.branch,a?.commit,a?.dirty===!0)}`,`Server: ${a?.server?`${a.server.engine} ${a.server.engineVersion}`:"unknown"}`,`Server platform: ${a?.server?`${a.server.platform}/${a.server.arch}`:"unknown"}`,"","[Broker]",`Observed: ${s.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: ${l?.packageName??"unknown"}`,`Version: ${l?.version??"unknown"}`,`Mode: ${l?.mode??"unknown"}`,`Source: ${K(l?.branch,l?.commit)}`,`Build: ${l?.buildNumber??l?.buildId??"not reported"}`,`Node: ${n?.health.nodeId??"unknown"}`,`Broker URL: ${n?.brokerUrl??"unknown"}`,"","[Host]",`Name: ${n?.localNode?.name??"unknown"}`,`Scout version: ${m?.scoutVersion??"not reported"}`,`System: ${m?.os??"unknown"}`,`Architecture: ${m?.arch??a?.server?.arch??"unknown"}`,"","[Browser]",`Platform: ${g}`,`User agent: ${navigator.userAgent}`,`Origin: ${window.location.origin}`].join(`
3
- `)}async function Ns(s){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(s);return}const a=document.createElement("textarea");a.value=s,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();const n=document.execCommand("copy");if(a.remove(),!n)throw new Error("Clipboard access is unavailable")}function ws(){const[s,a]=o.useState(null),[n,l]=o.useState(!0),[m,g]=o.useState(null),[x,b]=o.useState("idle"),j=o.useCallback(async(S=!1)=>{l(!0),g(null),b("idle");const[C,A]=await Promise.allSettled([M(S?"/api/build?refresh=1":"/api/build"),M("/api/mesh")]),I=new Date;if(a(f=>({build:C.status==="fulfilled"?C.value:f?.build??null,mesh:A.status==="fulfilled"?A.value:f?.mesh??null,collectedAt:I,buildCollectedAt:C.status==="fulfilled"?I:f?.buildCollectedAt??null,meshCollectedAt:A.status==="fulfilled"?I:f?.meshCollectedAt??null})),C.status==="rejected"||A.status==="rejected"){const f=[C.status==="rejected"?"web build":null,A.status==="rejected"?"broker":null].filter(Boolean).join(" and ");g(`Could not refresh ${f} details. Last reported values are kept when available.`)}l(!1)},[]);o.useEffect(()=>{j()},[j]);const d=s?.build??null,r=s?.mesh??null,t=r?.health.build??null,u=r?.localNode?r.nodes[r.localNode.id]?.host:void 0,y=ge(),w=r===null?"not reported":r.health.reachable?r.health.ok?"healthy":"degraded":"unreachable",$=o.useCallback(()=>{s&&Ns(de(s)).then(()=>{b("copied"),setTimeout(()=>b("idle"),1800)}).catch(()=>{b("error")})},[s]);return n&&!s?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"," · ",K(d?.branch,d?.commit,d?.dirty===!0)]}),e.jsxs("span",{className:"s-settings-about-collected",children:["Snapshot collected ",s?.collectedAt.toLocaleString()??"—"]})]}),e.jsxs("div",{className:"s-settings-about-actions",children:[e.jsxs("button",{type:"button",className:"s-btn",onClick:()=>{j(!0)},disabled:n,children:[e.jsx(Ke,{size:13,"aria-hidden":!0}),n?"Refreshing…":"Refresh"]}),e.jsxs("button",{type:"button",className:"s-btn s-settings-about-copy",onClick:$,disabled:!s,children:[x==="copied"?e.jsx(R,{size:13,"aria-hidden":!0}):e.jsx(We,{size:13,"aria-hidden":!0}),x==="copied"?"Copied report":x==="error"?"Copy failed":"Copy report"]})]})]}),m?e.jsx("div",{className:"s-settings-about-warning",role:"status",children:m}):null,x==="error"&&s?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:de(s),"aria-label":"OpenScout troubleshooting report"})]}):null,e.jsx(p,{label:"Web application",right:"release and source identity"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(k,{label:"Package version",value:d?.version??"Unknown",detail:`Observed ${s?.buildCollectedAt?.toLocaleString()??"at an unknown time"}. Use this when comparing releases.`}),e.jsx(k,{label:"Run mode",value:d?.mode??"Unknown"}),e.jsx(k,{label:"Source checkout",value:K(d?.branch,d?.commit,d?.dirty===!0),detail:"A dev SHA identifies the running checkout; it is not the release version."}),e.jsx(k,{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(p,{label:"Broker",right:w}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(k,{label:"Status",value:w,detail:[`Observed ${s?.meshCollectedAt?.toLocaleString()??"at an unknown time"}.`,r?.health.error].filter(Boolean).join(" ")}),e.jsx(k,{label:"Package",value:t?.packageName??"Not reported"}),e.jsx(k,{label:"Version",value:t?.version??"Not reported"}),e.jsx(k,{label:"Source",value:K(t?.branch,t?.commit)}),e.jsx(k,{label:"Build",value:t?.buildNumber??t?.buildId??"Not reported"}),e.jsx(k,{label:"Node",value:r?.health.nodeId??"Not reported",detail:r?.brokerUrl})]}),e.jsx(p,{label:"Host and browser",right:"troubleshooting context"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(k,{label:"Host",value:r?.localNode?.name??"Not reported"}),e.jsx(k,{label:"Host Scout",value:u?.scoutVersion??"Not reported"}),e.jsx(k,{label:"Host system",value:[u?.os,u?.arch??d?.server?.arch].filter(Boolean).join(" · ")||"Not reported"}),e.jsx(k,{label:"Browser platform",value:y}),e.jsx(k,{label:"Browser",value:navigator.userAgent}),e.jsx(k,{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 U=[{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"}],ue={appearance:"Appearance",operator:"Operator identity",comms:"Communication",voice:"Voice",credentials:"Credentials",devices:"Paired devices",about:"About OpenScout"},ks={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."},Cs={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 pe({open:s,onClose:a,section:n,onSectionChange:l,presentation:m}){const{refreshOnboarding:g}=Q(),{ref:x,onKeyDown:b}=De(s&&m==="drawer"),[j,d]=o.useState("appearance"),r=n??j,t=o.useCallback(h=>{l?l(h):d(h)},[l]),[u,y]=o.useState(Cs),[w,$]=o.useState(null),[S,C]=o.useState(null),[A,I]=o.useState(null),[f,D]=o.useState(!1),[V,z]=o.useState("saved"),B=o.useRef(null),F=o.useRef(!0),T=o.useRef(null);o.useEffect(()=>()=>{F.current=!1},[]);const O=o.useCallback(async()=>{const[h,i]=await Promise.allSettled([Se(),Ne()]),c=h.status==="fulfilled"?h.value:null;let v=i.status==="fulfilled"?i.value:null;c?.configured&&!v?.openai.configured&&(v=await we().catch(()=>v)),C(c),I(v)},[]),L=o.useCallback(async()=>{try{const h=M("/api/user"),i=Promise.race([M("/api/pairing-state"),new Promise((Y,xe)=>setTimeout(()=>xe(new Error("timeout")),3e3))]),[c,v]=await Promise.allSettled([h,i]);c.status==="fulfilled"&&y(c.value),v.status==="fulfilled"&&$(v.value),await O()}finally{D(!0)}},[O]);o.useEffect(()=>{s&&r!=="appearance"&&r!=="about"&&!f&&L()},[f,s,L,r]),o.useEffect(()=>{if(!s||!window.matchMedia("(max-width: 760px)").matches)return;const h=window.requestAnimationFrame(()=>{T.current?.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>window.cancelAnimationFrame(h)},[s,r]);const E=o.useCallback(h=>{const c=(U.findIndex(v=>v.id===r)+h+U.length)%U.length;t(U[c].id)},[r]),Z=o.useCallback(h=>{if(b(h),m==="drawer"&&h.key==="Escape"){h.preventDefault(),a();return}h.target?.closest(".s-settings-rail")&&(h.key==="ArrowDown"?(h.preventDefault(),E(1)):h.key==="ArrowUp"&&(h.preventDefault(),E(-1)))},[E,a,b,m]),W=o.useCallback(h=>{B.current&&clearTimeout(B.current),z("saving"),B.current=setTimeout(()=>{M("/api/user",{method:"POST",body:JSON.stringify(h)}).then(()=>g()).then(()=>{F.current&&z("saved")}).catch(()=>{F.current&&z("error")})},400)},[g]),P=o.useCallback(h=>{y(i=>{const c={...i,...h};return W(c),c})},[W]),G=e.jsx("nav",{className:"s-settings-rail","aria-label":"Settings pages",children:U.map(h=>{const i=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-settings-rail-label",children:h.label}),e.jsx("span",{className:"s-settings-rail-sub",children:h.sub})]}),c=`s-settings-rail-btn${r===h.id?" s-settings-rail-btn--active":""}`;return m==="page"?e.jsx("a",{ref:r===h.id?v=>{T.current=v}:void 0,href:Ve({view:"settings",section:h.id}),"aria-current":r===h.id?"page":void 0,className:c,onClick:v=>{v.button!==0||v.metaKey||v.ctrlKey||v.shiftKey||v.altKey||(v.preventDefault(),t(h.id))},children:i},h.id):e.jsx("button",{ref:r===h.id?v=>{T.current=v}:void 0,onClick:()=>t(h.id),"aria-current":r===h.id?"page":void 0,className:c,children:i},h.id)})}),q=e.jsx("main",{className:"s-settings-content",id:`settings-${r}`,"data-settings-section":r,tabIndex:-1,children:r==="appearance"?e.jsx(gs,{}):r==="about"?e.jsx(ws,{}):f?e.jsxs(e.Fragment,{children:[r==="operator"&&e.jsx(ps,{profile:u,update:P}),r==="comms"&&e.jsx(bs,{profile:u,update:P}),r==="credentials"&&e.jsx(vs,{clientCredentials:S,serverCredentials:A,reloadCredentials:O}),r==="voice"&&e.jsx(js,{}),r==="devices"&&e.jsx(Ss,{pairing:w})]}):e.jsx("div",{className:"s-settings-loading",children:"Loading settings…"})});return m==="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:ue[r]}),e.jsx("p",{children:ks[r]})]}),r==="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":V,role:"status","aria-live":"polite",children:[e.jsx("span",{"aria-hidden":"true"}),V==="saving"?"Saving changes…":V==="error"?"Couldn’t save changes":"Saved automatically"]})]}),e.jsxs("div",{className:"s-settings-page-layout",children:[G,q]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`s-settings-scrim ${s?"s-settings-scrim--open":"s-settings-scrim--closed"}`,onClick:a}),e.jsxs("div",{ref:x,role:"dialog","aria-modal":"true","aria-label":"Settings",className:`s-settings-drawer ${s?"s-settings-drawer--open":"s-settings-drawer--closed"}`,onKeyDown:Z,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:ue[r]}),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:a,children:"×"})]}),G,q,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:a,children:"Done"})]})]})]})}function be(s){return e.jsx(pe,{...s,presentation:"drawer"})}function ve({section:s="appearance",onSectionChange:a}){return e.jsx(pe,{open:!0,onClose:()=>{},section:s,onSectionChange:a,presentation:"page"})}const Xs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"})),Zs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"}));export{ve as S,Xs as a,Zs as b};
1
+ import{j as e,r as o,ac as je,G as ye,k as ee}from"./index-BFbLvCJn.js";import{a as fe,k as Se}from"./router-CJIx83Ia.js";import{a as M}from"./api-DSqpVKC7.js";import{g as Ne,a as we,e as ke,s as Ce,b as Ae,d as Ee,c as Te}from"./credentials-OeoF-VKJ.js";import{u as J,D as Oe,I as Pe,M as Ie,N as Re}from"./Provider-BEXAZWd9.js";import{t as $e}from"./time-Dhsh_2EG.js";import{q as Le,v as Me,w as De}from"./scout-voice-Cdh6pCsb.js";import{u as Ve}from"./keyboard-nav-CEe-ApvZ.js";import{C as Q}from"./CrewAvatar-a_C_F9r_.js";import{C as _e}from"./CastPicker-Y29K5kKk.js";import{p as se}from"./AgentAvatar-Dn8TUv5W.js";import{C as He}from"./CrewStage-IPpS3Oja.js";import{S as te}from"./SpriteAvatar-D53GaaK3.js";import{VoiceHostStatusBanner as ze,VoicePermissionsPanel as Be}from"./VoicePermissionsPanel-9Nuw-xCr.js";import{u as Fe}from"./chunk-HRAB3GC3-DVhUsgOw.js";import{C as R}from"./check-BM6QtbB7.js";import{M as Ue}from"./monitor-M0VSmHQ-.js";import{c as he}from"./createLucideIcon-CKbjXlwv.js";import{R as Ke}from"./refresh-cw-BcqctLqo.js";import{C as We}from"./copy-C1XrY27_.js";import{a as Ge}from"./DocumentFocusViewer-mxzPxQQW.js";import{S as qe}from"./sparkles-Br-bA2aZ.js";const Ye=[["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"}]],Xe=he("moon",Ye);const Ze=[["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"}]],Qe=he("sun",Ze),me="/api/voice/playback/settings",Je="scout:voice-playback-settings",es="OPENSCOUT_VOICE_PLAYBACK",ss="openscout.voice-playback-settings";function ts(s){return M(me,{signal:s,cache:"no-store"})}function as(s){return M(me,{method:"PUT",body:JSON.stringify({playback:s})})}function ns(s){if(window.dispatchEvent(new CustomEvent(Je,{detail:s})),!("BroadcastChannel"in window))return;const a=new BroadcastChannel(ss);a.postMessage(s),a.close()}const is=[195,125,300,45,355,210];function ls(s){return`oklch(0.80 0.14 ${s})`}function p({label:s,right:a}){return e.jsxs("div",{className:"s-settings-section-rule",children:[e.jsx("span",{className:"s-settings-section-label",children:s}),e.jsx("span",{className:"s-settings-section-line"}),a&&e.jsx("span",{className:"s-settings-section-right",children:a})]})}function N({label:s,hint:a,children:n}){return e.jsxs("div",{className:"s-settings-field",children:[e.jsx("label",{className:"s-settings-field-label",children:s}),n,a&&e.jsx("span",{className:"s-settings-field-hint",children:a})]})}function _({value:s,onChange:a,mono:n}){return e.jsx("input",{className:`s-settings-input${n?" s-settings-input--mono":""}`,value:s,onChange:l=>a(l.target.value)})}function ae({value:s,onChange:a,rows:n=3}){return e.jsx("textarea",{className:"s-settings-textarea",value:s,onChange:l=>a(l.target.value),rows:n})}function rs({value:s,onChange:a,min:n,max:l,step:m=1,unit:g=""}){return e.jsxs("div",{className:"s-settings-slider-wrap",children:[e.jsx("input",{type:"range",min:n,max:l,step:m,value:s,onChange:x=>a(Number(x.target.value))}),e.jsxs("span",{className:"s-settings-slider-value",children:[s," ",g]})]})}function H({value:s,onChange:a,options:n,stacked:l,columns:m}){return e.jsx("div",{className:l?"s-settings-option-stacked":"s-settings-option-grid",style:l?void 0:{gridTemplateColumns:`repeat(${m??n.length}, 1fr)`},children:n.map(g=>e.jsxs("button",{className:`s-settings-option-btn${s===g.id?" s-settings-option-btn--active":""}`,onClick:()=>a(g.id),children:[e.jsx("span",{className:"s-settings-option-label",children:g.label}),e.jsx("span",{className:"s-settings-option-sub",children:g.sub})]},g.id))})}const os=[{id:"system",label:"System",sub:"Follow this device",icon:Ue},{id:"light",label:"Light",sub:"Bright workspace",icon:Qe},{id:"dark",label:"Dark",sub:"Low-light workspace",icon:Xe}],cs=[{id:"scout",label:"Scout",sub:"Control-room navigation"},{id:"slack",label:"Slack",sub:"Workspace rail and channel-style lists"}],ne=[{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"}],ie=[{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"}],le=[{id:"soft",label:"Soft",sub:"Quiet separators"},{id:"balanced",label:"Defined",sub:"Clear structure"},{id:"strong",label:"Strong",sub:"High separation"}],re=[{id:"theme",label:"Theme"},{id:"lime",label:"Lime"},{id:"cyan",label:"Cyan"},{id:"violet",label:"Violet"},{id:"amber",label:"Amber"}],ds=[{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"}],oe=ds,ce=[{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"}],us=["milo","vex","sprout"];function X({className:s,theme:a,template:n,palette:l,contrast:m,accent:g,children:x}){return e.jsx("div",{className:s,"data-scout-theme":a,"data-scout-theme-mode":a,"data-scout-palette":l,"data-scout-contrast":m,"data-scout-accent":g,"data-hudson-theme":a,"data-hudson-template":n,children:x})}function hs({palette:s,theme:a,template:n}){return e.jsxs(X,{className:"s-settings-palette-sample",theme:a,template:n,palette:s,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 ms({theme:s,template:a,palette:n,contrast:l,accent:m}){return e.jsxs(X,{className:"s-settings-live-preview",theme:s,template:a,palette:n,contrast:l,accent:m,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 gs(){const s=Fe(),{appearanceDetails:a,updateAppearanceDetails:n}=J();if(!s)return e.jsx("div",{className:"s-settings-inline-note",children:"Theme controls are unavailable in this embedded surface."});const l=s.resolvedTheme??"dark",m=je(s.template)??"hudson",g=ne.find(t=>t.id===a.palette)?.label??"Scout",x=ie.find(t=>t.id===m)?.label??"Rounded",b=le.find(t=>t.id===a.contrast)?.label??"Defined",j=re.find(t=>t.id===a.accent)?.label??"Theme",d=oe.find(t=>t.id===a.avatarStyle)?.label??"Generative",r=ce.find(t=>t.id===a.avatarSize)?.label??"Regular";return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:"App layout",right:`currently ${a.shell}`}),e.jsx("div",{className:"s-settings-shell-grid",role:"group","aria-label":"App layout",children:cs.map(t=>{const u=a.shell===t.id;return e.jsxs("button",{type:"button",className:"s-settings-shell-choice","data-shell":t.id,"data-active":u||void 0,"aria-pressed":u,onClick:()=>n({shell:t.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:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub})]})]},t.id)})}),e.jsx(p,{label:"Color mode",right:`currently ${l}`}),e.jsx("div",{className:"s-settings-theme-mode-grid",role:"group","aria-label":"Color mode",children:os.map(t=>{const u=t.icon,y=s.theme===t.id,w=t.id==="system"?`Follow this device · resolves to ${s.resolvedTheme??"…"}`:t.sub;return e.jsxs("button",{type:"button",className:"s-settings-theme-mode","data-active":y||void 0,"aria-pressed":y,onClick:()=>s.setTheme(t.id),children:[e.jsx(u,{size:18,strokeWidth:1.7,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:t.label}),e.jsx("small",{children:w})]}),y?e.jsx(R,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]},t.id)})}),e.jsxs("div",{className:"s-settings-appearance-workbench",children:[e.jsxs("div",{className:"s-settings-appearance-controls",children:[e.jsx(p,{label:"Color theme",right:`currently ${g.toLowerCase()}`}),e.jsx("div",{className:"s-settings-palette-grid",role:"group","aria-label":"Color theme",children:ne.map(t=>{const u=a.palette===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({palette:t.id}),children:[e.jsx(hs,{palette:t.id,theme:l,template:m}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{children:t.spec})]})]},t.id)})}),e.jsx(p,{label:"Interface shape",right:`currently ${x.toLowerCase()}`}),e.jsx("div",{className:"s-settings-interface-grid",role:"group","aria-label":"Interface shape",children:ie.map(t=>{const u=m===t.id;return e.jsxs("button",{type:"button",className:"s-settings-interface-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>s.setTemplate(t.id),children:[e.jsx(X,{className:"s-settings-shape-sample",theme:l,template:t.id,palette:a.palette,contrast:a.contrast,accent:a.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:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{children:t.spec})]})]},t.id)})}),e.jsx(p,{label:"Separation",right:`currently ${b.toLowerCase()}`}),e.jsx("div",{className:"s-settings-contrast-grid",role:"group","aria-label":"Interface contrast",children:le.map(t=>{const u=a.contrast===t.id;return e.jsxs("button",{type:"button",className:"s-settings-contrast-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({contrast:t.id}),children:[e.jsxs("span",{className:"s-settings-contrast-lines","data-level":t.id,"aria-hidden":!0,children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsx("strong",{children:t.label}),e.jsx("small",{children:t.sub})]},t.id)})}),e.jsx(p,{label:"Signal accent",right:`currently ${j.toLowerCase()}`}),e.jsx("div",{className:"s-settings-accent-row",role:"group","aria-label":"Signal accent",children:re.map(t=>{const u=a.accent===t.id;return e.jsxs("button",{type:"button",className:"s-settings-accent-choice","data-accent-option":t.id,"data-active":u||void 0,"aria-pressed":u,"aria-label":`${t.label} accent`,onClick:()=>n({accent:t.id}),children:[e.jsx(X,{className:"s-settings-accent-dot",theme:l,template:m,palette:a.palette,contrast:a.contrast,accent:t.id,children:e.jsx("i",{})}),e.jsx("span",{children:t.label}),u?e.jsx(R,{size:13,"aria-hidden":!0}):null]},t.id)})}),e.jsx(p,{label:"Avatar system",right:`currently ${d.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-grid",role:"group","aria-label":"Avatar system",children:oe.map(t=>{const u=a.avatarStyle===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice s-settings-avatar-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({avatarStyle:t.id}),children:[e.jsx("div",{className:"s-settings-avatar-preview",children:t.id==="crew"?e.jsx(Q,{slug:"milo",size:38,ring:!1,badge:!1}):t.id==="chip"?e.jsx(Q,{slug:"milo",size:38,chip:!0,ring:!1,badge:!1}):e.jsx(te,{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:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsxs("span",{children:[t.spec,(()=>{const y=ye(t.id);return y?` · ${y.covered} of ${y.total} cast`:" · every agent"})()]})]})]},t.id)})}),e.jsx(p,{label:"Avatar size",right:`currently ${r.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-size-row",role:"group","aria-label":"Avatar size",children:ce.map(t=>{const u=a.avatarSize===t.id,y=se("row",t.id)??24;return e.jsxs("button",{type:"button",className:"s-settings-avatar-size-choice","data-active":u||void 0,"aria-pressed":u,onClick:()=>n({avatarSize:t.id}),children:[e.jsx("span",{className:"s-settings-avatar-size-sample","aria-hidden":!0,children:us.map(w=>a.avatarStyle==="sprite"?e.jsx(te,{name:w,size:y},w):e.jsx(Q,{slug:w,size:y,chip:a.avatarStyle==="chip",ring:!1,badge:!1},w))}),e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),u?e.jsx(R,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsx("span",{className:"s-settings-avatar-size-spec",children:`${y}PX ROW · ${se("inspector",t.id)}PX TILE`})]},t.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(p,{label:"Live specimen",right:l}),e.jsx(ms,{theme:l,template:m,palette:a.palette,contrast:a.contrast,accent:a.accent}),e.jsxs("dl",{className:"s-settings-theme-readout",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Palette"}),e.jsx("dd",{children:g})]}),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:j})]})]}),e.jsx("p",{className:"s-settings-preview-note",children:"Each control changes one visual axis. Success, warning, and failure colors keep their meaning."})]})]})]})}function ps({profile:s,update:a}){const{appearanceDetails:n,updateAppearanceDetails:l}=J(),[m,g]=o.useState(n.operatorCharacter||"milo"),x=m,[b,j]=o.useState(!0),d=ee.find(t=>t.slug.toLowerCase()===x.toLowerCase())??ee[0],r=t=>{g(t),l({operatorCharacter:t})};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{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:()=>j(t=>!t),title:b?"Collapse to coin framing":"Break out to full body figure",children:b?e.jsxs(e.Fragment,{children:[e.jsx(Ge,{size:13,"aria-hidden":!0}),e.jsx("span",{children:"Coin Framing"})]}):e.jsxs(e.Fragment,{children:[e.jsx(qe,{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(He,{slug:x,open:b,onToggle:()=>j(t=>!t),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:s.name||"Operator"}),e.jsxs("span",{children:[s.handle||"@you"," · ",s.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:is.map(t=>e.jsx("button",{type:"button",onClick:()=>a({hue:t}),className:`s-settings-hue-dot${s.hue===t?" s-settings-hue-dot--active":""}`,style:{background:ls(t)},title:`Hue ${t}°`},t))})]})]})]})]})]}),e.jsxs(e.Fragment,{children:[e.jsx(p,{label:"Your character mascot",right:`currently ${d.name.toLowerCase()}`}),e.jsx("div",{className:"s-settings-cast-grid-wrap",children:e.jsx(_e,{selectedSlug:x,onSelect:r})})]}),e.jsx(N,{label:"Display name",hint:"Shown when agents address you.",children:e.jsx(_,{value:s.name,onChange:t=>a({name:t})})}),e.jsx(N,{label:"Handle",hint:"Used in @mentions across threads.",children:e.jsx(_,{value:s.handle,onChange:t=>a({handle:t}),mono:!0})}),e.jsx(N,{label:"Pronouns",children:e.jsx(_,{value:s.pronouns,onChange:t=>a({pronouns:t})})}),e.jsx(p,{label:"How agents understand you",right:"shipped as system prompt context"}),e.jsx(N,{label:"Operator bio",hint:"How you want to be worked with. Agents read this before asking you things.",children:e.jsx(ae,{value:s.bio,onChange:t=>a({bio:t}),rows:4})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(N,{label:"Timezone",children:e.jsx(_,{value:s.timezone,onChange:t=>a({timezone:t}),mono:!0})}),e.jsx(N,{label:"Working hours",children:e.jsx(_,{value:s.workingHours,onChange:t=>a({workingHours:t}),mono:!0})})]}),e.jsx(p,{label:"Ephemeral agent names",right:"rotation pool for one-off agents"}),e.jsx(N,{label:"Name pool",hint:s.provisionalAgentNames.length>0?`${s.provisionalAgentNamesResolvedCount} names active (${s.provisionalAgentNamesSource}). Preview: ${s.provisionalAgentNamesPreview.join(", ")}${s.provisionalAgentNamesResolvedCount>s.provisionalAgentNamesPreview.length?", …":""}`:"Leave empty to use Scout's built-in rotation. One short name per line.",children:e.jsx(ae,{value:s.provisionalAgentNames.join(`
2
+ `),onChange:t=>a({provisionalAgentNames:t.split(/\r?\n/u).map(u=>u.trim()).filter(Boolean)}),rows:6})}),e.jsx(N,{label:"Pool mode",hint:"Replace uses only your list. Add to defaults prepends yours, then Scout's built-in names.",children:e.jsx(H,{value:s.provisionalAgentNamesMode,onChange:t=>a({provisionalAgentNamesMode:t}),options:[{id:"replace",label:"Replace",sub:"your list only"},{id:"extend",label:"Add to defaults",sub:"yours first, then Scout"}],columns:2})})]})}function bs({profile:s,update:a}){return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:"Interrupt policy"}),e.jsx(N,{label:"When agents can ping you directly",hint:"Blocking-only means only asks that truly stall work. Others get batched.",children:e.jsx(H,{value:s.interruptThreshold,onChange:n=>a({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(N,{label:"Batch window (min)",children:e.jsx(rs,{value:s.batchWindow,min:5,max:60,step:5,onChange:n=>a({batchWindow:n}),unit:"min"})}),e.jsx(N,{label:"Quiet hours",children:e.jsx(_,{value:s.quietHours,onChange:n=>a({quietHours:n}),mono:!0})})]}),e.jsx(p,{label:"Where to reach you"}),e.jsx(N,{label:"Preferred channel",children:e.jsx(H,{value:s.channel,onChange:n=>a({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(p,{label:"Tone calibration",right:"how agents write to you"}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(N,{label:"Verbosity",children:e.jsx(H,{stacked:!0,value:s.verbosity,onChange:n=>a({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(N,{label:"Tone",children:e.jsx(H,{stacked:!0,value:s.tone,onChange:n=>a({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 vs({clientCredentials:s,serverCredentials:a,reloadCredentials:n}){const[l,m]=o.useState(""),[g,x]=o.useState(!1),[b,j]=o.useState(null),d=a?.openai??null,r=!!d?.configured,t=d?.source==="env"?"OPENAI_API_KEY":d?.source==="local-config"?"local Scout config":d?.source==="local-store"?"local OpenScout store":"missing",u=d?.source==="local-store"&&s?.configured?"local OpenScout store + HudVault mirror":t,y=d?.preview??s?.preview??null,w=async()=>{x(!0),j(null);try{const S=l.trim();await Ce(S);let C=null;try{await Ae(S)}catch(A){C=A instanceof Error?A.message:"HudVault save failed."}m(""),await n(),j(C?`Saved to local OpenScout store. Browser mirror failed: ${C}`:"Saved to local OpenScout store and Hudson Vault.")}catch(S){j(S instanceof Error?S.message:"Could not save key.")}finally{x(!1)}},$=async()=>{x(!0),j(null);try{const[S,C]=await Promise.allSettled([Ee(),Te()]);m(""),await n(),S.status==="rejected"||C.status==="rejected"?j("Cleared what I could; one credential store did not respond."):j(d?.source==="env"||d?.source==="local-config"?"Removed saved key. Server fallback is still configured.":"Removed saved key.")}catch(S){j(S instanceof Error?S.message:"Could not clear key.")}finally{x(!1)}};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:"Model providers",right:r?`configured · ${u}`:"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:r?"var(--green)":"var(--dim)"},children:["●"," ",r?"ready":"missing"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[y??"No key stored"," · ",u]}),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(N,{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:l,placeholder:r?"Saved key configured":"sk-...",autoComplete:"off",spellCheck:!1,onChange:S=>m(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:g||!l.trim(),onClick:()=>{w()},children:g?"Saving":"Save key"}),e.jsx("button",{type:"button",className:"s-btn",disabled:g||!(s?.configured||d?.source==="local-store"),onClick:()=>{$()},children:"Clear saved key"})]})]})}const xs=[{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 js(){const s=Se(Oe,!0),[a,n]=o.useState(null),[l,m]=o.useState(null),[g,x]=o.useState(null),[b,j]=o.useState([]),[d,r]=o.useState([]),[t,u]=o.useState(!0),[y,w]=o.useState(!1),[$,S]=o.useState(!1),[C,A]=o.useState(!1),[I,f]=o.useState(null),D=o.useCallback(async()=>{u(!0);try{const[i,c,v,Y]=await Promise.all([Le(),Me(12).catch(()=>[]),Pe().catch(()=>null),ts().catch(()=>null)]);n(i.settings),j(i.devices),r(c),m(v),x(Y),f(null)}catch(i){f(i instanceof Error?i.message:String(i))}finally{u(!1)}},[]);o.useEffect(()=>{D()},[D]);const V=o.useCallback(async i=>{w(!0),f(null);try{const c=await De(i);n(c.settings),j(c.devices)}catch(c){f(c instanceof Error?c.message:String(c))}finally{w(!1)}},[]),z=o.useCallback(async i=>{S(!0),f(null);try{const c=await Ie(i);m(c),Re(c)}catch(c){f(c instanceof Error?c.message:String(c))}finally{S(!1)}},[]),B=o.useCallback(async i=>{A(!0),f(null);try{const c=await as(i?"host":"browser");x(c),ns(c)}catch(c){f(c instanceof Error?c.message:String(c))}finally{A(!1)}},[]);if(t&&!a)return e.jsx("div",{className:"s-settings-field-hint",children:"Loading voice settings…"});const F=a?.inputDeviceId??b.find(i=>i.isDefault)?.id??"",T=a?.permissions?.find(i=>i.kind==="microphone")??null,O=a?.permissions?.find(i=>i.kind==="speechRecognition")??null,L=(a?.permissions?.length??0)>0||b.length>0,E=s&&l?.enabled===!0,Z=$||!s||!l||l.locked,W=s?l?l.locked?`Controlled by OPENSCOUT_REALTIME_VOICE_ENABLED · ${l.enabled?"on":"off"}`:E?"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=g?.playback==="host",G=C||!g||g.locked,q=g?g.locked?`Controlled by ${es} · ${g.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.",h=[L?null:"Scout voice host is offline. Launch Scout Menu on this Mac — the browser does not capture audio.",T?.status==="denied"||T?.status==="restricted"?T?.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.":T?.canRequest?"Microphone has not been requested yet. Request access or tap the mic in chat to show the macOS prompt.":null,!O?.granted&&(O?.status==="denied"||O?.status==="restricted")?O?.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,a?.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(i=>!!i);return e.jsxs("div",{className:"s-settings-col-gap",children:[I&&e.jsx("div",{className:"s-settings-field-hint",style:{color:"var(--amber)"},children:I}),e.jsx(p,{label:"Realtime conversation",right:"operator control"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":E||void 0,"data-unavailable":!s||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:W})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":E,"aria-label":"Enable live voice on this Scout",disabled:Z,"data-checked":E||void 0,className:"s-settings-switch",onClick:()=>{z(!E)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:E?"On":"Off"})]})]}),e.jsx(p,{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:q})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":P,"aria-label":"Speak on this Mac",disabled:G,"data-checked":P||void 0,className:"s-settings-switch",onClick:()=>{B(!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(ze,{hostOnline:L,micPermission:T,speechPermission:O,modelReady:a?.modelReady}),e.jsx(p,{label:"Scout Menu permissions",right:"voice host"}),e.jsx(Be,{permissions:a?.permissions,hostOnline:L,disabled:y||t,onError:i=>f(i),onRefresh:D}),e.jsx(p,{label:"Transcription"}),e.jsx(N,{label:"Engine",hint:a?.modelReady?"Parakeet is warm and ready.":a?.modelInstalled?"Parakeet is installed; first dictation may warm the model.":"Parakeet downloads on first use. Apple Speech stays available meanwhile.",children:e.jsx(H,{value:a?.preference??"auto",onChange:i=>{n(c=>c&&{...c,preference:i}),V({preference:i})},options:xs,columns:3})}),e.jsx(N,{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:F,disabled:y,onChange:i=>{const c=i.target.value||null;n(v=>v&&{...v,inputDeviceId:c,inputDeviceName:b.find(Y=>Y.id===c)?.name??null}),V({inputDeviceId:c})},children:b.map(i=>e.jsxs("option",{value:i.id,children:[i.name,i.isDefault?" (system default)":""]},i.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(p,{label:"Diagnostics"}),e.jsx("ul",{className:"s-settings-field-hint",style:{margin:0,paddingLeft:"1.1rem",display:"grid",gap:"0.35rem"},children:h.map(i=>e.jsx("li",{children:i},i))}),e.jsx(p,{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(i=>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:[i.status," · ",i.lastEvent??"started"]}),e.jsxs("div",{className:"s-settings-device-meta",children:[i.surface," · ",$e(i.updatedAt),i.error?` · ${i.error}`:""]}),i.lastTranscript?e.jsx("div",{className:"s-settings-field-hint",style:{marginTop:"0.2rem"},children:i.lastTranscript.length>96?`${i.lastTranscript.slice(0,96)}…`:i.lastTranscript}):null]})},i.sessionId))}),e.jsx("div",{className:"s-settings-button-row",children:e.jsx("button",{type:"button",className:"s-btn",disabled:t||y,onClick:()=>{D()},children:t?"Refreshing…":"Refresh"})})]})}const ys={desktop:"◻",mobile:"▯",tablet:"▭"};function fs({device:s}){const a=s.status==="this-device"?"var(--accent)":s.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:ys[s.kind]??"□"}),e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-device-name",children:s.name}),e.jsxs("div",{className:"s-settings-device-meta",children:[s.kind," · via ",s.relay," · ",s.lastSeen]})]}),e.jsxs("span",{className:"s-settings-device-status",style:{color:a},children:["●"," ",s.status==="this-device"?"this device":s.status]}),e.jsx("button",{className:"s-btn",disabled:s.status==="this-device",children:s.status==="this-device"?"—":"Unpair"})]})}function Ss({pairing:s}){const a=[{id:"local",name:"This machine",kind:"desktop",status:"this-device",relay:"local",lastSeen:"now"}];if(s?.trustedPeers)for(const n of s.trustedPeers){const l=n.fingerprint===s.connectedPeerFingerprint;a.push({id:n.fingerprint,name:n.name??"Paired device",kind:"mobile",status:l?"online":"offline",relay:"tailscale",lastSeen:n.lastSeenLabel??"—"})}return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(p,{label:`Paired devices · ${a.length}`}),e.jsx("div",{className:"s-settings-col-gap",style:{gap:10},children:a.map(n=>e.jsx(fs,{device:n},n.id))}),e.jsx(p,{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:s?.isRunning?"var(--green)":"var(--dim)"},children:["●"," ",s?.isRunning?"connected":"offline"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[s?.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 K(s,a,n=!1){if(!s&&!a)return"Not reported";const l=s||"detached";return a?`${l} @ ${a}${n?" (modified)":""}`:l}function ge(){return navigator.userAgentData?.platform||navigator.platform||"Unknown"}function k({label:s,value:a,detail:n}){return e.jsxs("div",{className:"s-settings-about-fact",children:[e.jsx("dt",{children:s}),e.jsxs("dd",{children:[e.jsx("code",{children:a}),n?e.jsx("span",{children:n}):null]})]})}function de(s){const{build:a,mesh:n}=s,l=n?.health.build??null,m=n?.localNode?n.nodes[n.localNode.id]?.host:void 0,g=ge();return["OpenScout troubleshooting report",`Collected: ${s.collectedAt.toISOString()}`,"","[Web]",`Observed: ${s.buildCollectedAt?.toISOString()??"unknown"}`,`Version: ${a?.version??"unknown"}`,`Mode: ${a?.mode??"unknown"}`,`Source: ${K(a?.branch,a?.commit,a?.dirty===!0)}`,`Server: ${a?.server?`${a.server.engine} ${a.server.engineVersion}`:"unknown"}`,`Server platform: ${a?.server?`${a.server.platform}/${a.server.arch}`:"unknown"}`,"","[Broker]",`Observed: ${s.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: ${l?.packageName??"unknown"}`,`Version: ${l?.version??"unknown"}`,`Mode: ${l?.mode??"unknown"}`,`Source: ${K(l?.branch,l?.commit)}`,`Build: ${l?.buildNumber??l?.buildId??"not reported"}`,`Node: ${n?.health.nodeId??"unknown"}`,`Broker URL: ${n?.brokerUrl??"unknown"}`,"","[Host]",`Name: ${n?.localNode?.name??"unknown"}`,`Scout version: ${m?.scoutVersion??"not reported"}`,`System: ${m?.os??"unknown"}`,`Architecture: ${m?.arch??a?.server?.arch??"unknown"}`,"","[Browser]",`Platform: ${g}`,`User agent: ${navigator.userAgent}`,`Origin: ${window.location.origin}`].join(`
3
+ `)}async function Ns(s){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(s);return}const a=document.createElement("textarea");a.value=s,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select();const n=document.execCommand("copy");if(a.remove(),!n)throw new Error("Clipboard access is unavailable")}function ws(){const[s,a]=o.useState(null),[n,l]=o.useState(!0),[m,g]=o.useState(null),[x,b]=o.useState("idle"),j=o.useCallback(async(S=!1)=>{l(!0),g(null),b("idle");const[C,A]=await Promise.allSettled([M(S?"/api/build?refresh=1":"/api/build"),M("/api/mesh")]),I=new Date;if(a(f=>({build:C.status==="fulfilled"?C.value:f?.build??null,mesh:A.status==="fulfilled"?A.value:f?.mesh??null,collectedAt:I,buildCollectedAt:C.status==="fulfilled"?I:f?.buildCollectedAt??null,meshCollectedAt:A.status==="fulfilled"?I:f?.meshCollectedAt??null})),C.status==="rejected"||A.status==="rejected"){const f=[C.status==="rejected"?"web build":null,A.status==="rejected"?"broker":null].filter(Boolean).join(" and ");g(`Could not refresh ${f} details. Last reported values are kept when available.`)}l(!1)},[]);o.useEffect(()=>{j()},[j]);const d=s?.build??null,r=s?.mesh??null,t=r?.health.build??null,u=r?.localNode?r.nodes[r.localNode.id]?.host:void 0,y=ge(),w=r===null?"not reported":r.health.reachable?r.health.ok?"healthy":"degraded":"unreachable",$=o.useCallback(()=>{s&&Ns(de(s)).then(()=>{b("copied"),setTimeout(()=>b("idle"),1800)}).catch(()=>{b("error")})},[s]);return n&&!s?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"," · ",K(d?.branch,d?.commit,d?.dirty===!0)]}),e.jsxs("span",{className:"s-settings-about-collected",children:["Snapshot collected ",s?.collectedAt.toLocaleString()??"—"]})]}),e.jsxs("div",{className:"s-settings-about-actions",children:[e.jsxs("button",{type:"button",className:"s-btn",onClick:()=>{j(!0)},disabled:n,children:[e.jsx(Ke,{size:13,"aria-hidden":!0}),n?"Refreshing…":"Refresh"]}),e.jsxs("button",{type:"button",className:"s-btn s-settings-about-copy",onClick:$,disabled:!s,children:[x==="copied"?e.jsx(R,{size:13,"aria-hidden":!0}):e.jsx(We,{size:13,"aria-hidden":!0}),x==="copied"?"Copied report":x==="error"?"Copy failed":"Copy report"]})]})]}),m?e.jsx("div",{className:"s-settings-about-warning",role:"status",children:m}):null,x==="error"&&s?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:de(s),"aria-label":"OpenScout troubleshooting report"})]}):null,e.jsx(p,{label:"Web application",right:"release and source identity"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(k,{label:"Package version",value:d?.version??"Unknown",detail:`Observed ${s?.buildCollectedAt?.toLocaleString()??"at an unknown time"}. Use this when comparing releases.`}),e.jsx(k,{label:"Run mode",value:d?.mode??"Unknown"}),e.jsx(k,{label:"Source checkout",value:K(d?.branch,d?.commit,d?.dirty===!0),detail:"A dev SHA identifies the running checkout; it is not the release version."}),e.jsx(k,{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(p,{label:"Broker",right:w}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(k,{label:"Status",value:w,detail:[`Observed ${s?.meshCollectedAt?.toLocaleString()??"at an unknown time"}.`,r?.health.error].filter(Boolean).join(" ")}),e.jsx(k,{label:"Package",value:t?.packageName??"Not reported"}),e.jsx(k,{label:"Version",value:t?.version??"Not reported"}),e.jsx(k,{label:"Source",value:K(t?.branch,t?.commit)}),e.jsx(k,{label:"Build",value:t?.buildNumber??t?.buildId??"Not reported"}),e.jsx(k,{label:"Node",value:r?.health.nodeId??"Not reported",detail:r?.brokerUrl})]}),e.jsx(p,{label:"Host and browser",right:"troubleshooting context"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(k,{label:"Host",value:r?.localNode?.name??"Not reported"}),e.jsx(k,{label:"Host Scout",value:u?.scoutVersion??"Not reported"}),e.jsx(k,{label:"Host system",value:[u?.os,u?.arch??d?.server?.arch].filter(Boolean).join(" · ")||"Not reported"}),e.jsx(k,{label:"Browser platform",value:y}),e.jsx(k,{label:"Browser",value:navigator.userAgent}),e.jsx(k,{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 U=[{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"}],ue={appearance:"Appearance",operator:"Operator identity",comms:"Communication",voice:"Voice",credentials:"Credentials",devices:"Paired devices",about:"About OpenScout"},ks={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."},Cs={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 pe({open:s,onClose:a,section:n,onSectionChange:l,presentation:m}){const{refreshOnboarding:g}=J(),{ref:x,onKeyDown:b}=Ve(s&&m==="drawer"),[j,d]=o.useState("appearance"),r=n??j,t=o.useCallback(h=>{l?l(h):d(h)},[l]),[u,y]=o.useState(Cs),[w,$]=o.useState(null),[S,C]=o.useState(null),[A,I]=o.useState(null),[f,D]=o.useState(!1),[V,z]=o.useState("saved"),B=o.useRef(null),F=o.useRef(!0),T=o.useRef(null);o.useEffect(()=>()=>{F.current=!1},[]);const O=o.useCallback(async()=>{const[h,i]=await Promise.allSettled([Ne(),we()]),c=h.status==="fulfilled"?h.value:null;let v=i.status==="fulfilled"?i.value:null;c?.configured&&!v?.openai.configured&&(v=await ke().catch(()=>v)),C(c),I(v)},[]),L=o.useCallback(async()=>{try{const h=M("/api/user"),i=Promise.race([M("/api/pairing-state"),new Promise((Y,xe)=>setTimeout(()=>xe(new Error("timeout")),3e3))]),[c,v]=await Promise.allSettled([h,i]);c.status==="fulfilled"&&y(c.value),v.status==="fulfilled"&&$(v.value),await O()}finally{D(!0)}},[O]);o.useEffect(()=>{s&&r!=="appearance"&&r!=="about"&&!f&&L()},[f,s,L,r]),o.useEffect(()=>{if(!s||!window.matchMedia("(max-width: 760px)").matches)return;const h=window.requestAnimationFrame(()=>{T.current?.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>window.cancelAnimationFrame(h)},[s,r]);const E=o.useCallback(h=>{const c=(U.findIndex(v=>v.id===r)+h+U.length)%U.length;t(U[c].id)},[r]),Z=o.useCallback(h=>{if(b(h),m==="drawer"&&h.key==="Escape"){h.preventDefault(),a();return}h.target?.closest(".s-settings-rail")&&(h.key==="ArrowDown"?(h.preventDefault(),E(1)):h.key==="ArrowUp"&&(h.preventDefault(),E(-1)))},[E,a,b,m]),W=o.useCallback(h=>{B.current&&clearTimeout(B.current),z("saving"),B.current=setTimeout(()=>{M("/api/user",{method:"POST",body:JSON.stringify(h)}).then(()=>g()).then(()=>{F.current&&z("saved")}).catch(()=>{F.current&&z("error")})},400)},[g]),P=o.useCallback(h=>{y(i=>{const c={...i,...h};return W(c),c})},[W]),G=e.jsx("nav",{className:"s-settings-rail","aria-label":"Settings pages",children:U.map(h=>{const i=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-settings-rail-label",children:h.label}),e.jsx("span",{className:"s-settings-rail-sub",children:h.sub})]}),c=`s-settings-rail-btn${r===h.id?" s-settings-rail-btn--active":""}`;return m==="page"?e.jsx("a",{ref:r===h.id?v=>{T.current=v}:void 0,href:fe({view:"settings",section:h.id}),"aria-current":r===h.id?"page":void 0,className:c,onClick:v=>{v.button!==0||v.metaKey||v.ctrlKey||v.shiftKey||v.altKey||(v.preventDefault(),t(h.id))},children:i},h.id):e.jsx("button",{ref:r===h.id?v=>{T.current=v}:void 0,onClick:()=>t(h.id),"aria-current":r===h.id?"page":void 0,className:c,children:i},h.id)})}),q=e.jsx("main",{className:"s-settings-content",id:`settings-${r}`,"data-settings-section":r,tabIndex:-1,children:r==="appearance"?e.jsx(gs,{}):r==="about"?e.jsx(ws,{}):f?e.jsxs(e.Fragment,{children:[r==="operator"&&e.jsx(ps,{profile:u,update:P}),r==="comms"&&e.jsx(bs,{profile:u,update:P}),r==="credentials"&&e.jsx(vs,{clientCredentials:S,serverCredentials:A,reloadCredentials:O}),r==="voice"&&e.jsx(js,{}),r==="devices"&&e.jsx(Ss,{pairing:w})]}):e.jsx("div",{className:"s-settings-loading",children:"Loading settings…"})});return m==="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:ue[r]}),e.jsx("p",{children:ks[r]})]}),r==="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":V,role:"status","aria-live":"polite",children:[e.jsx("span",{"aria-hidden":"true"}),V==="saving"?"Saving changes…":V==="error"?"Couldn’t save changes":"Saved automatically"]})]}),e.jsxs("div",{className:"s-settings-page-layout",children:[G,q]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`s-settings-scrim ${s?"s-settings-scrim--open":"s-settings-scrim--closed"}`,onClick:a}),e.jsxs("div",{ref:x,role:"dialog","aria-modal":"true","aria-label":"Settings",className:`s-settings-drawer ${s?"s-settings-drawer--open":"s-settings-drawer--closed"}`,onKeyDown:Z,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:ue[r]}),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:a,children:"×"})]}),G,q,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:a,children:"Done"})]})]})]})}function be(s){return e.jsx(pe,{...s,presentation:"drawer"})}function ve({section:s="appearance",onSectionChange:a}){return e.jsx(pe,{open:!0,onClose:()=>{},section:s,onSectionChange:a,presentation:"page"})}const Ys=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"})),Xs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"}));export{ve as S,Ys as a,Xs as b};
@@ -0,0 +1 @@
1
+ import{j as i,r as d}from"./index-BFbLvCJn.js";import{E as it}from"./EmptyState-DLiLgtPK.js";import{S as B}from"./StatusPill-jT--OXbn.js";import{a as M}from"./api-DSqpVKC7.js";import{p as Rt}from"./status-tone-BM_zuRy1.js";import{t as ot}from"./time-Dhsh_2EG.js";import{AgentConfigurationScreen as Mt}from"./AgentConfigurationScreen-C0D9WNyL.js";import{S as At}from"./SettingsDrawer-BVrP6J52.js";/* empty css */import"./CastPicker-Y29K5kKk.js";import"./CrewAvatar-a_C_F9r_.js";import"./HarnessMark-CP-PWk2W.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./check-BM6QtbB7.js";import"./NewChatComposer-D-VB5vdt.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./Provider-BEXAZWd9.js";import"./theme-vars-DNK0nn3k.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./openContent-C6XO6kr5.js";import"./AgentsSubnav-_1GVC4hj.js";import"./SecondaryNav-1FjBDWuY.js";import"./secondaryNavConfig-Bmb-oRvD.js";import"./nav-destinations-B3R5zxFX.js";import"./message-square-BwqBIfv5.js";import"./terminal-DMBAZjPP.js";import"./compass-EmGkpxIe.js";import"./settings-bo9X410k.js";import"./git-branch-C45vy8qT.js";import"./scroll-text-CA0QxBHu.js";import"./refresh-cw-BcqctLqo.js";import"./bot-BNv_ZJzi.js";import"./wrench-C-wjicn5.js";import"./server-U_l8A83n.js";import"./cpu-DVZ_LhPn.js";import"./credentials-OeoF-VKJ.js";import"./AgentAvatar-Dn8TUv5W.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewStage-IPpS3Oja.js";import"./VoicePermissionsPanel-9Nuw-xCr.js";import"./monitor-M0VSmHQ-.js";import"./copy-C1XrY27_.js";import"./sparkles-Br-bA2aZ.js";var k=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(k||{});const Ct=[0,1],dt=[1,0],ht=[2,3],ft=[3,2],It={L:Ct,M:dt,Q:ht,H:ft},zt=/^\d*$/,Ft=/^[A-Z0-9 $%*+./:-]*$/,L="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",T=1,q=40,at=3,Bt=3,I=40,Lt=10,mt=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],pt=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class _t{constructor(e,s,n,r){if(this.version=e,this.ecc=s,e<T||e>q)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;const o=Array.from({length:this.size}).fill(!1);for(let c=0;c<this.size;c++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),r===-1){let c=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);const h=this.getPenaltyScore();h<c&&(r=u,c=h),this.applyMask(u)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}size;mask;modules=[];types=[];getModule(e,s){return e>=0&&e<this.size&&s>=0&&s<this.size&&this.modules[s][e]}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2===0,k.Timing),this.setFunctionModule(n,6,n%2===0,k.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),s=e.length;for(let n=0;n<s;n++)for(let r=0;r<s;r++)n===0&&r===0||n===0&&r===s-1||n===s-1&&r===0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const s=this.ecc[1]<<3|e;let n=s;for(let o=0;o<10;o++)n=n<<1^(n>>>9)*1335;const r=(s<<10|n)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,x(r,o));this.setFunctionModule(8,7,x(r,6)),this.setFunctionModule(8,8,x(r,7)),this.setFunctionModule(7,8,x(r,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,x(r,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,x(r,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,x(r,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^(e>>>11)*7973;const s=this.version<<12|e;for(let n=0;n<18;n++){const r=x(s,n),o=this.size-11+n%3,a=Math.floor(n/3);this.setFunctionModule(o,a,r),this.setFunctionModule(a,o,r)}}drawFinderPattern(e,s){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),a=e+r,c=s+n;a>=0&&a<this.size&&c>=0&&c<this.size&&this.setFunctionModule(a,c,o!==2&&o!==4,k.Position)}}drawAlignmentPattern(e,s){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,s+n,Math.max(Math.abs(r),Math.abs(n))!==1,k.Alignment)}setFunctionModule(e,s,n,r=k.Function){this.modules[s][e]=n,this.types[s][e]=r}addEccAndInterleave(e){const s=this.version,n=this.ecc;if(e.length!==z(s,n))throw new RangeError("Invalid argument");const r=pt[n[0]][s],o=mt[n[0]][s],a=Math.floor(O(s)/8),c=r-a%r,u=Math.floor(a/r),h=[],p=Yt(o);for(let f=0,b=0;f<r;f++){const g=e.slice(b,b+u-o+(f<c?0:1));b+=g.length;const E=Gt(g,p);f<c&&g.push(0),h.push(g.concat(E))}const m=[];for(let f=0;f<h[0].length;f++)h.forEach((b,g)=>{(f!==u-o||g>=c)&&m.push(b[f])});return m}drawCodewords(e){if(e.length!==Math.floor(O(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let n=this.size-1;n>=1;n-=2){n===6&&(n=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const a=n-o,u=(n+1&2)===0?this.size-1-r:r;!this.types[u][a]&&s<e.length*8&&(this.modules[u][a]=x(e[s>>>3],7-(s&7)),s++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+s)%2===0;break;case 1:r=s%2===0;break;case 2:r=n%3===0;break;case 3:r=(n+s)%3===0;break;case 4:r=(Math.floor(n/3)+Math.floor(s/2))%2===0;break;case 5:r=n*s%2+n*s%3===0;break;case 6:r=(n*s%2+n*s%3)%2===0;break;case 7:r=((n+s)%2+n*s%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[s][n]&&r&&(this.modules[s][n]=!this.modules[s][n])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let a=!1,c=0;const u=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[o][h]===a?(c++,c===5?e+=at:c>5&&e++):(this.finderPenaltyAddHistory(c,u),a||(e+=this.finderPenaltyCountPatterns(u)*I),a=this.modules[o][h],c=1);e+=this.finderPenaltyTerminateAndCount(a,c,u)*I}for(let o=0;o<this.size;o++){let a=!1,c=0;const u=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[h][o]===a?(c++,c===5?e+=at:c>5&&e++):(this.finderPenaltyAddHistory(c,u),a||(e+=this.finderPenaltyCountPatterns(u)*I),a=this.modules[h][o],c=1);e+=this.finderPenaltyTerminateAndCount(a,c,u)*I}for(let o=0;o<this.size-1;o++)for(let a=0;a<this.size-1;a++){const c=this.modules[o][a];c===this.modules[o][a+1]&&c===this.modules[o+1][a]&&c===this.modules[o+1][a+1]&&(e+=Bt)}let s=0;for(const o of this.modules)s=o.reduce((a,c)=>a+(c?1:0),s);const n=this.size*this.size,r=Math.ceil(Math.abs(s*20-n*10)/n)-1;return e+=r*Lt,e}getAlignmentPatternPositions(){if(this.version===1)return[];{const e=Math.floor(this.version/7)+2,s=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=s)n.splice(1,0,r);return n}}finderPenaltyCountPatterns(e){const s=e[1],n=s>0&&e[2]===s&&e[3]===s*3&&e[4]===s&&e[5]===s;return(n&&e[0]>=s*4&&e[6]>=s?1:0)+(n&&e[6]>=s*4&&e[0]>=s?1:0)}finderPenaltyTerminateAndCount(e,s,n){return e&&(this.finderPenaltyAddHistory(s,n),s=0),s+=this.size,this.finderPenaltyAddHistory(s,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,s){s[0]===0&&(e+=this.size),s.pop(),s.unshift(e)}}function N(t,e,s){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let n=e-1;n>=0;n--)s.push(t>>>n&1)}function x(t,e){return(t>>>e&1)!==0}class V{constructor(e,s,n){if(this.mode=e,this.numChars=s,this.bitData=n,s<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}getData(){return this.bitData.slice()}}const $t=[1,10,12,14],Ot=[2,9,11,13],Ut=[4,8,16,16];function gt(t,e){return t[Math.floor((e+7)/17)+1]}function yt(t){const e=[];for(const s of t)N(s,8,e);return new V(Ut,t.length,e)}function Dt(t){if(!bt(t))throw new RangeError("String contains non-numeric characters");const e=[];for(let s=0;s<t.length;){const n=Math.min(t.length-s,3);N(Number.parseInt(t.substring(s,s+n),10),n*3+1,e),s+=n}return new V($t,t.length,e)}function Tt(t){if(!vt(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const e=[];let s;for(s=0;s+2<=t.length;s+=2){let n=L.indexOf(t.charAt(s))*45;n+=L.indexOf(t.charAt(s+1)),N(n,11,e)}return s<t.length&&N(L.indexOf(t.charAt(s)),6,e),new V(Ot,t.length,e)}function qt(t){return t===""?[]:bt(t)?[Dt(t)]:vt(t)?[Tt(t)]:[yt(Ht(t))]}function bt(t){return zt.test(t)}function vt(t){return Ft.test(t)}function Vt(t,e){let s=0;for(const n of t){const r=gt(n.mode,e);if(n.numChars>=1<<r)return Number.POSITIVE_INFINITY;s+=4+r+n.bitData.length}return s}function Ht(t){t=encodeURI(t);const e=[];for(let s=0;s<t.length;s++)t.charAt(s)!=="%"?e.push(t.charCodeAt(s)):(e.push(Number.parseInt(t.substring(s+1,s+3),16)),s+=2);return e}function O(t){if(t<T||t>q)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){const s=Math.floor(t/7)+2;e-=(25*s-10)*s-55,t>=7&&(e-=36)}return e}function z(t,e){return Math.floor(O(t)/8)-mt[e[0]][t]*pt[e[0]][t]}function Yt(t){if(t<1||t>255)throw new RangeError("Degree out of range");const e=[];for(let n=0;n<t-1;n++)e.push(0);e.push(1);let s=1;for(let n=0;n<t;n++){for(let r=0;r<e.length;r++)e[r]=U(e[r],s),r+1<e.length&&(e[r]^=e[r+1]);s=U(s,2)}return e}function Gt(t,e){const s=e.map(n=>0);for(const n of t){const r=n^s.shift();s.push(0),e.forEach((o,a)=>s[a]^=U(o,r))}return s}function U(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let s=0;for(let n=7;n>=0;n--)s=s<<1^(s>>>7)*285,s^=(e>>>n&1)*t;return s}function Wt(t,e,s=1,n=40,r=-1,o=!0){if(!(T<=s&&s<=n&&n<=q)||r<-1||r>7)throw new RangeError("Invalid value");let a,c;for(a=s;;a++){const m=z(a,e)*8,f=Vt(t,a);if(f<=m){c=f;break}if(a>=n)throw new RangeError("Data too long")}for(const m of[dt,ht,ft])o&&c<=z(a,m)*8&&(e=m);const u=[];for(const m of t){N(m.mode[0],4,u),N(m.numChars,gt(m.mode,a),u);for(const f of m.getData())u.push(f)}const h=z(a,e)*8;N(0,Math.min(4,h-u.length),u),N(0,(8-u.length%8)%8,u);for(let m=236;u.length<h;m^=253)N(m,8,u);const p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new _t(a,e,p,r)}function Xt(t,e){const{ecc:s="L",boostEcc:n=!1,minVersion:r=1,maxVersion:o=40,maskPattern:a=-1,border:c=1}=e||{},u=typeof t=="string"?qt(t):Array.isArray(t)?[yt(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);const h=Wt(u,It[s],r,o,a,n),p=Jt({version:h.version,maskPattern:h.mask,size:h.size,data:h.modules,types:h.types},c);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function Jt(t,e=1){if(!e)return t;const{size:s}=t,n=s+e*2;t.size=n,t.data.forEach(o=>{for(let a=0;a<e;a++)o.unshift(!1),o.push(!1)});for(let o=0;o<e;o++)t.data.unshift(Array.from({length:n},a=>!1)),t.data.push(Array.from({length:n},a=>!1));const r=k.Border;t.types.forEach(o=>{for(let a=0;a<e;a++)o.unshift(r),o.push(r)});for(let o=0;o<e;o++)t.types.unshift(Array.from({length:n},a=>r)),t.types.push(Array.from({length:n},a=>r));return t}function lt(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Kt(t,e={}){const s=Xt(t,e),{pixelSize:n=10,whiteColor:r="white",blackColor:o="black"}=e,a=s.size*n,c=s.size*n;let u=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${c} ${a}">`;const h=[];for(let p=0;p<s.size;p++)for(let m=0;m<s.size;m++){const f=m*n,b=p*n;s.data[p][m]&&h.push(`M${f},${b}h${n}v${n}h-${n}z`)}return u+=`<rect fill="${lt(r)}" width="${c}" height="${a}"/>`,u+=`<path fill="${lt(o)}" d="${h.join("")}"/>`,u+="</svg>",u}const Zt="scout",Qt="pair";function _(t){const e=typeof t=="string"?t.trim():"";return e?`${Zt}://${Qt}?payload=${encodeURIComponent(e)}`:null}function te(t){const e=ee(t),s=_(t);if(!e)return{default:s,lan:null,tailnet:null};const n=xt(e.relay,e.fallbackRelays??[]),r=n.find(se),o=n.find(ne);return{default:s,lan:r?_(JSON.stringify(ct(e,r))):null,tailnet:o?_(JSON.stringify(ct(e,o))):null}}function ee(t){const e=typeof t=="string"?t.trim():"";if(!e)return null;try{const s=JSON.parse(e);return!s||typeof s!="object"||typeof s.relay!="string"?null:s}catch{return null}}function ct(t,e){const s=xt(e,[t.relay,...Array.isArray(t.fallbackRelays)?t.fallbackRelays:[]]),n={...t,relay:s[0]};return s.length>1?n.fallbackRelays=s.slice(1):delete n.fallbackRelays,n}function xt(t,e){const s=[],n=new Set;for(const r of[t,...e]){if(typeof r!="string")continue;const o=r.trim();!o||n.has(o)||(n.add(o),s.push(o))}return s}function se(t){const e=Nt(t);if(!e)return!1;if(e.endsWith(".local"))return!0;const s=wt(e);if(!s)return!1;const[n,r]=s;return n===10||n===192&&r===168||n===172&&r>=16&&r<=31||n===169&&r===254}function ne(t){const e=Nt(t);if(!e)return!1;if(e.endsWith(".ts.net"))return!0;const s=wt(e);if(!s)return!1;const[n,r]=s;return n===100&&r>=64&&r<=127}function Nt(t){try{return new URL(t).hostname.toLowerCase()}catch{return""}}function wt(t){const e=t.split(".");if(e.length!==4)return null;const s=e.map(n=>{if(!/^\d+$/.test(n))return Number.NaN;const r=Number(n);return r>=0&&r<=255?r:Number.NaN});return s.every(Number.isFinite)?s:null}function re(t){return t?t.replace(/^wss?:\/\//,"").replace(/:\d+$/,""):null}function ut(t){return t?t.length<=18?t:`${t.slice(0,10)}...${t.slice(-6)}`:null}function ie(t,e){if(!t)return null;const s=Math.max(0,Math.floor((t-e)/1e3));if(s===0)return null;if(s<60)return`${s}s`;const n=Math.floor(s/60),r=s%60;return r>0?`${n}m ${r}s`:`${n}m`}function D({value:t}){const[e,s]=d.useState(!1),n=d.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{s(!0),setTimeout(()=>s(!1),1500)})},[t]);return i.jsx("button",{type:"button",className:"sys-copy-btn",onClick:n,title:"Copy",children:e?i.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("polyline",{points:"20 6 9 17 4 12"})}):i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),i.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})}function $({label:t,value:e}){return i.jsxs("span",{className:"sys-settings-route-link",children:[i.jsx("a",{className:"sys-settings-link",href:e,title:e,"aria-label":`Open Scout ${t} pairing link`,children:i.jsx("code",{children:t})}),i.jsx(D,{value:e})]})}function oe({agentId:t,navigate:e}){return d.useEffect(()=>{e({view:"agents-v2",agentId:t,tab:"config"})},[t,e]),null}function zs({navigate:t,section:e,agentId:s}){if(e==="agents"&&s)return i.jsx(oe,{agentId:s,navigate:t});if(e==="agents")return i.jsx(Mt,{navigate:t,selectedAgentId:s});if(e===void 0||e==="appearance"||e==="operator"||e==="comms"||e==="credentials"||e==="voice"||e==="devices"||e==="about"){const n=e??"appearance";return i.jsx(At,{section:n,onSectionChange:r=>t({view:"settings",section:r})})}return i.jsx(ae,{})}function ae(){const[t,e]=d.useState(null),[s,n]=d.useState(""),[r,o]=d.useState(""),[a,c]=d.useState(!0),[u,h]=d.useState(!1),[p,m]=d.useState(!1),[f,b]=d.useState(null),[g,E]=d.useState(null),[H,A]=d.useState(null),[C,Y]=d.useState(null),[jt,G]=d.useState(()=>Date.now()),[W,X]=d.useState(null),J=d.useRef(null),w=d.useRef(0),K=d.useRef(null);d.useEffect(()=>{J.current=t},[t]),d.useEffect(()=>{K.current=f},[f]),d.useEffect(()=>{!t||window.location.hash!=="#trusted-peers"||window.requestAnimationFrame(()=>{document.getElementById("trusted-peers")?.scrollIntoView({block:"start"})})},[t]);const j=d.useCallback(async(l="initial")=>{if(l==="background"&&K.current)return;const v=++w.current;!(J.current!==null)&&l!=="background"?(c(!0),E(null)):h(!0);try{const R=await M(l==="manual"?"/api/pairing-state/refresh":"/api/pairing-state");if(v!==w.current)return;e(R),E(null),Y(Date.now())}catch(R){if(v!==w.current)return;E(R instanceof Error?R.message:String(R))}finally{v===w.current&&(c(!1),h(!1))}},[]),Z=d.useCallback(async()=>{try{const l=await M("/api/user");o(l.name),n(l.name),A(null)}catch(l){A(l instanceof Error?l.message:String(l))}},[]),Q=d.useRef(!1);d.useEffect(()=>{j("initial"),Z()},[j,Z]),d.useEffect(()=>{const l=setInterval(()=>{j("background")},1e4);return()=>clearInterval(l)},[j]),d.useEffect(()=>{if(!t?.pairing?.expiresAt)return;G(Date.now());const l=setInterval(()=>{G(Date.now())},1e3);return()=>clearInterval(l)},[t?.pairing?.expiresAt]);const tt=d.useCallback(async()=>{m(!0),A(null);try{const l=await M("/api/user",{method:"POST",body:JSON.stringify({name:s})});o(l.name),n(l.name)}catch(l){A(l instanceof Error?l.message:String(l))}finally{m(!1)}},[s]),S=d.useCallback(async l=>{const v=++w.current;b(l),E(null);try{const P=await M("/api/pairing/control",{method:"POST",body:JSON.stringify({action:l})});if(v!==w.current)return;e(P),Y(Date.now())}catch(P){if(v!==w.current)return;E(P instanceof Error?P.message:String(P))}finally{v===w.current&&b(null)}},[]);d.useEffect(()=>{!t||t.isRunning||Q.current||(Q.current=!0,S("start"))},[t,S]);const Et=d.useCallback(async l=>{X(l);try{await M(`/api/pairing/peers/${encodeURIComponent(l)}`,{method:"DELETE"}),j("manual")}catch{}finally{X(null)}},[j]),et=d.useMemo(()=>{const l=t?.pairing?.qrValue?.trim();return l?Kt(l,{border:2,ecc:"M",pixelSize:8}):null},[t?.pairing?.qrValue]),y=d.useMemo(()=>te(t?.pairing?.qrValue),[t?.pairing?.qrValue]),kt=!!(y.lan||y.tailnet||y.default),F=re(t?.pairing?.relay??t?.relay??null),st=ie(t?.pairing?.expiresAt,jt),nt=(t?.trustedPeers.find(l=>l.fingerprint===t.connectedPeerFingerprint)??null)?.name??ut(t?.connectedPeerFingerprint??null),Pt=Rt(t),rt=s.trim()!==r,St=!a&&!t&&!!g;return i.jsxs("div",{className:"sys-surface-page sys-settings-page",children:[i.jsxs("div",{className:"sys-page-head",children:[i.jsxs("div",{className:"sys-page-title-group",children:[i.jsx("h2",{className:"sys-page-title",children:"Settings"}),i.jsx("p",{className:"sys-page-subtitle",children:"Identity, pairing, and trusted devices."})]}),i.jsxs("div",{className:"sys-page-actions",children:[t&&i.jsx(B,{tone:Pt,children:t.statusLabel}),i.jsx("div",{className:"sys-sync-note",children:a?"Loading...":g&&t?`Snapshot from ${C?ot(C):"earlier"}`:C?`Updated ${ot(C)}`:""}),i.jsx("button",{type:"button",className:"s-btn",disabled:a||u||!!f,onClick:()=>{j("manual")},children:u?"Refreshing...":"Refresh"})]})]}),g&&t&&i.jsxs("div",{className:"sys-banner sys-banner-warning",children:[i.jsx("strong",{children:"Refresh failed."}),i.jsx("span",{children:g})]}),H&&i.jsxs("div",{className:"sys-banner sys-banner-warning",children:[i.jsx("strong",{children:"Identity error."}),i.jsx("span",{children:H})]}),a&&!t&&i.jsx(it,{title:"Loading settings",body:"Checking relay status and trusted peers."}),St&&i.jsx(it,{className:"sys-state-card-error",title:"Pairing unavailable",body:g,action:i.jsx("button",{type:"button",className:"s-btn",onClick:()=>{j("manual")},children:"Try again"})}),i.jsxs("div",{className:"sys-settings-hero",children:[i.jsx("div",{className:"sys-settings-qr-col",children:et?i.jsxs("div",{className:"sys-settings-qr-frame",children:[i.jsx("div",{className:"s-qr",dangerouslySetInnerHTML:{__html:et}}),st&&i.jsxs("span",{className:"sys-settings-qr-expires",children:["Expires in ",st]})]}):i.jsx("div",{className:"sys-settings-qr-empty",children:i.jsx("span",{className:"sys-settings-qr-empty-label",children:"Generating QR..."})})}),i.jsxs("div",{className:"sys-settings-info-col",children:[i.jsxs("div",{className:"sys-input-row",children:[i.jsx("input",{className:"sys-input",type:"text",placeholder:"Your name",value:s,onChange:l=>n(l.target.value),onKeyDown:l=>{l.key==="Enter"&&rt&&!p&&tt()}}),i.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!rt||p,onClick:()=>{tt()},children:p?"Saving...":"Save"})]}),i.jsxs("div",{className:"sys-settings-kv-list",children:[t?.identityFingerprint&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Fingerprint"}),i.jsxs("span",{className:"sys-settings-kv-value",children:[i.jsx("code",{children:t.identityFingerprint}),i.jsx(D,{value:t.identityFingerprint})]})]}),F&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Relay"}),i.jsxs("span",{className:"sys-settings-kv-value",children:[i.jsx("code",{children:F}),i.jsx(D,{value:F})]})]}),kt&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Links"}),i.jsxs("span",{className:"sys-settings-kv-value sys-settings-link-list",children:[y.lan&&i.jsx($,{label:"LAN",value:y.lan}),y.tailnet&&i.jsx($,{label:"TSN",value:y.tailnet}),!y.lan&&!y.tailnet&&y.default&&i.jsx($,{label:"PAIR",value:y.default})]})]}),t?.statusDetail&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Status"}),i.jsx("span",{className:"sys-settings-kv-value sys-settings-kv-nowrap",children:t.statusDetail})]}),nt&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Connected"}),i.jsx("span",{className:"sys-settings-kv-value",children:nt})]}),t?.secure&&i.jsxs("div",{className:"sys-settings-kv",children:[i.jsx("span",{className:"sys-settings-kv-label",children:"Security"}),i.jsx("span",{className:"sys-settings-kv-value",children:i.jsx(B,{tone:"success",children:"Noise XX"})})]})]}),t&&i.jsx("div",{className:"sys-inline-actions sys-settings-controls",children:t.isRunning?i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"s-btn",disabled:!!f,onClick:()=>{S("restart")},children:f==="restart"?"Restarting...":"Restart"}),i.jsx("button",{type:"button",className:"s-btn",disabled:!!f,onClick:()=>{S("stop")},children:f==="stop"?"Stopping...":"Stop"})]}):i.jsx("button",{type:"button",className:"s-btn s-btn-primary",disabled:!!f,onClick:()=>{S("start")},children:f==="start"?"Starting...":"Start pairing"})})]})]}),t&&i.jsxs("section",{className:"sys-settings-peers",id:"trusted-peers",children:[i.jsx("div",{className:"sys-section-head",children:i.jsxs("div",{children:[i.jsx("h3",{className:"sys-section-title",children:"Trusted peers"}),i.jsxs("p",{className:"sys-section-subtitle",children:[t.trustedPeers.length," device",t.trustedPeers.length!==1?"s":""," paired with this broker."]})]})}),t.trustedPeers.length===0?i.jsxs("div",{className:"sys-list-empty",children:[i.jsx("h3",{children:"No trusted peers"}),i.jsx("p",{children:"Devices appear here after completing pairing."})]}):i.jsxs("table",{className:"sys-peers-table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Device"}),i.jsx("th",{children:"Fingerprint"}),i.jsx("th",{children:"Paired"}),i.jsx("th",{children:"Last seen"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:t.trustedPeers.map(l=>{const v=l.fingerprint===t.connectedPeerFingerprint;return i.jsxs("tr",{className:v?"sys-peers-row-connected":"",children:[i.jsx("td",{children:i.jsxs("span",{className:"sys-peers-name",children:[l.name??ut(l.fingerprint)??"Peer",v&&i.jsx(B,{tone:"success",className:"sys-peers-badge",children:"Connected"})]})}),i.jsx("td",{children:i.jsx("code",{className:"sys-peers-fp",children:l.fingerprint})}),i.jsx("td",{children:l.pairedAtLabel??"—"}),i.jsx("td",{children:l.lastSeenLabel??"—"}),i.jsx("td",{children:i.jsx("button",{type:"button",className:"sys-peers-remove",disabled:W===l.fingerprint,onClick:()=>{Et(l.fingerprint)},title:"Remove peer",children:W===l.fingerprint?"...":"Remove"})})]},l.fingerprint)})})]})]})]})}export{zs as SettingsScreen};
@@ -1 +1 @@
1
- import{C as B,r as h,j as s,h as D}from"./index-EsrkGBcv.js";import{h as J,H as I}from"./HarnessMark-C4naWc16.js";import{C as Q}from"./CrewSprite-Dhryjx2c.js";import{WorldCharacter as X}from"./WorldCharacter-CIIlutQq.js";import{a as Y,S as w}from"./SpriteAvatar-CpZWf54-.js";import{o as Z}from"./lane-observe-CteDwdD-.js";import{f as A}from"./agent-floor-actor-DW8zLht0.js";import{f as tt}from"./floor-character-name-CqJPOlXb.js";import{f as et}from"./floor-preview-text-HrORUJ7D.js";import{f as P}from"./floor-context-model-rWKqaKmV.js";import{R as st}from"./RenderedWorkerSprite-Dhlyg89J.js";import"./RiggedWorkerCharacter-q6QRc7_o.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";function b(t,r){const e=et(t,r);return!e||/<realtime_|^\s*(?:\{|\[|```|text\(|const |await )/.test(e)?"":e.length>r?`${e.slice(0,r-1).trimEnd()}…`:e}function rt(t,r){const e=A(t,r),c=P([t],r,["tool","message","ask"],1)[0],a=b(t.facts?.currentTask,220);let o="";if(c){const d=c.event;if(d.kind==="tool"){const i=d.tool||"tool";o=/read|open|view/i.test(i)?"Reading context":/edit|write|patch/i.test(i)?"Updating files":/search|grep|find/i.test(i)?"Searching the workspace":/bash|exec|terminal/i.test(i)?"Running a command":`Using ${i}`;const m=b(d.arg,120);m&&/read|open|view|edit|write|search|grep|find/i.test(i)&&(o+=` · ${m}`)}else o=b(d.text,180)||(d.kind==="ask"?"Asking for input":"Sharing an update")}const n=e.posture==="quiet",v=e.posture==="attention"||e.posture==="blocked"?`${e.label}${a?` · ${a}`:""}`:n?a?`Last task · ${a}`:o?`Last activity · ${o}`:"No recent updates":o||a||e.label;return{summary:b(v,76),task:a,activity:o,at:c?.at,state:e.label}}function ot(t,r){if(A(t,r).posture!=="working")return null;const e=new Map;for(const o of t.observe?.events??[]){if(o.kind!=="tool"&&o.kind!=="message")continue;const n=Z(o,t.observe?.metadata?.session?.sessionStart);n===null||n>r||r-n>12e4||(o.kind==="tool"||!e.has(n))&&e.set(n,o.kind)}const c=[...e.keys()].sort((o,n)=>o-n),a=c.at(-1);return a===void 0||r-a>15e3?null:c.length>=3&&a-c[0]>=3e4?"run":e.get(a)==="tool"?"hop":null}function $t({lane:t,now:r,paused:e,playful:c=!1,character:a,rigged:o=!1,pinned:n=!1,onActor:v,displayName:d,crewSlug:i,pixelCrew:m=!1}){const u=A(t,r),l=rt(t,r),$=t.agent.harness||t.facts?.attribution,H=t.facts?.model||t.agent.model,E=i&&!m?B[i.toLowerCase()]?.runtimeAnchor??[.82,.94]:[.82,.94],j=`${J($)} · ${H||"Model not reported"}`,R=h.useId(),M=P([t],r,["think","tool","message","ask"],1)[0],z=M?.event.kind==="think"&&r-M.at<9e4&&t.facts?.turn?.phase!=="complete",p=u.posture==="attention"||u.posture==="blocked"?"waiting":z?"thinking":u.posture==="working"?"working":"idle",L=c?ot(t,r):null,k=Y(t.agent),f=tt(t),y=f.named?f.name:d||f.name,O=f.named?y:`${y} · ${t.id.slice(-4)}`,S=h.useRef(null),[_,T]=h.useState(!0),[N,V]=h.useState(()=>typeof document>"u"||!document.hidden),C=u.posture==="working",[U,q]=h.useState(C);h.useEffect(()=>{e||q(C)},[C,e]),h.useEffect(()=>{const x=S.current;if(!x)return;const g=new IntersectionObserver(([K])=>T(K.isIntersecting));g.observe(x);const W=()=>V(!document.hidden);return document.addEventListener("visibilitychange",W),()=>{g.disconnect(),document.removeEventListener("visibilitychange",W)}},[]);const F=[...t.id].reduce((x,g)=>(x+g.charCodeAt(0))%37,0),G=u.posture==="attention"||u.posture==="blocked";return s.jsxs("button",{ref:S,type:"button",className:`shared-floor-character is-${u.posture}${L?` has-${L}`:""}${U?" is-at-work":""}${n?" is-pinned":""}${e||!_||!N?" is-still":""}`,style:{"--character-delay":`${-F/10}s`},onClick:()=>v(t),"aria-describedby":R,"aria-pressed":n,"aria-label":`${y} ${t.id.slice(-5)}, ${l.summary}. ${j}. ${n?"Release this actor's card":"Inspect actor and keep its card open"}`,children:[s.jsx("span",{className:"shared-floor-character__shadow","aria-hidden":"true"}),s.jsxs("span",{className:`shared-floor-character__sprite${i||a||o?" is-rendered":""}`,"aria-hidden":"true",children:[i&&(!m||D(i))?s.jsx(Q,{slug:i,pixel:m,size:86,paused:e||!_||!N,expression:z?"look-up":"rest"}):i&&m?s.jsx(w,{name:t.agent.name,size:76,hue:k.hue,tone:k.tone}):o?s.jsx(X,{identity:f.named?f.name:t.id,state:{mood:p==="waiting"?"concerned":p==="thinking"?"curious":p==="working"?"focused":"neutral",action:p==="waiting"?"idle":p,interaction:{}},motion:e||!_||!N?"paused":"normal",size:76}):a?s.jsx(st,{character:a,posture:p,paused:e,size:76}):s.jsx(w,{name:t.agent.name,size:76,hue:k.hue,tone:k.tone}),s.jsx("span",{className:"shared-floor-character__runtime-mark",style:{left:`${E[0]*100}%`,top:`${E[1]*100}%`},title:j,children:s.jsx(I,{harness:$,size:16,title:null})})]}),G?s.jsx("span",{className:"shared-floor-character__attention","aria-hidden":"true",children:"!"}):null,s.jsxs("span",{className:"shared-floor-character__label","aria-hidden":"true",children:[s.jsx("strong",{className:"shared-floor-character__identity",children:s.jsx("span",{children:O})}),s.jsx("small",{children:l.summary})]}),s.jsxs("span",{id:R,className:"shared-floor-character__context",role:"tooltip",children:[s.jsx("strong",{children:l.state}),s.jsxs("span",{className:"shared-floor-character__runtime",children:[s.jsx(I,{harness:$,size:14,title:null}),j]}),s.jsx("span",{children:l.task||"No task summary reported."}),l.activity?s.jsx("span",{className:"shared-floor-character__context-activity",children:l.activity}):null,s.jsxs("small",{children:[l.at?`Observed ${Math.max(0,Math.floor((r-l.at)/6e4))<1?"just now":`${Math.floor((r-l.at)/6e4)}m ago`}`:"No recent observation"," · ",n?"Kept open · click to release":"Click to keep open"]})]})]})}export{$t as SharedFloorCharacter,ot as sharedCharacterGesture};
1
+ import{C as B,r as h,j as s,h as D}from"./index-BFbLvCJn.js";import{h as J,H as I}from"./HarnessMark-CP-PWk2W.js";import{C as Q}from"./CrewSprite-CguHb2Ny.js";import{WorldCharacter as X}from"./WorldCharacter-CJGx2DVy.js";import{a as Y,S as w}from"./SpriteAvatar-D53GaaK3.js";import{o as Z}from"./lane-observe-CteDwdD-.js";import{f as A}from"./agent-floor-actor-DW8zLht0.js";import{f as tt}from"./floor-character-name-CqJPOlXb.js";import{f as et}from"./floor-preview-text-HrORUJ7D.js";import{f as P}from"./floor-context-model-rWKqaKmV.js";import{R as st}from"./RenderedWorkerSprite-BNhFXMIo.js";import"./RiggedWorkerCharacter-CF6fhzGd.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";function b(t,r){const e=et(t,r);return!e||/<realtime_|^\s*(?:\{|\[|```|text\(|const |await )/.test(e)?"":e.length>r?`${e.slice(0,r-1).trimEnd()}…`:e}function rt(t,r){const e=A(t,r),c=P([t],r,["tool","message","ask"],1)[0],a=b(t.facts?.currentTask,220);let o="";if(c){const d=c.event;if(d.kind==="tool"){const i=d.tool||"tool";o=/read|open|view/i.test(i)?"Reading context":/edit|write|patch/i.test(i)?"Updating files":/search|grep|find/i.test(i)?"Searching the workspace":/bash|exec|terminal/i.test(i)?"Running a command":`Using ${i}`;const m=b(d.arg,120);m&&/read|open|view|edit|write|search|grep|find/i.test(i)&&(o+=` · ${m}`)}else o=b(d.text,180)||(d.kind==="ask"?"Asking for input":"Sharing an update")}const n=e.posture==="quiet",v=e.posture==="attention"||e.posture==="blocked"?`${e.label}${a?` · ${a}`:""}`:n?a?`Last task · ${a}`:o?`Last activity · ${o}`:"No recent updates":o||a||e.label;return{summary:b(v,76),task:a,activity:o,at:c?.at,state:e.label}}function ot(t,r){if(A(t,r).posture!=="working")return null;const e=new Map;for(const o of t.observe?.events??[]){if(o.kind!=="tool"&&o.kind!=="message")continue;const n=Z(o,t.observe?.metadata?.session?.sessionStart);n===null||n>r||r-n>12e4||(o.kind==="tool"||!e.has(n))&&e.set(n,o.kind)}const c=[...e.keys()].sort((o,n)=>o-n),a=c.at(-1);return a===void 0||r-a>15e3?null:c.length>=3&&a-c[0]>=3e4?"run":e.get(a)==="tool"?"hop":null}function $t({lane:t,now:r,paused:e,playful:c=!1,character:a,rigged:o=!1,pinned:n=!1,onActor:v,displayName:d,crewSlug:i,pixelCrew:m=!1}){const u=A(t,r),l=rt(t,r),$=t.agent.harness||t.facts?.attribution,H=t.facts?.model||t.agent.model,E=i&&!m?B[i.toLowerCase()]?.runtimeAnchor??[.82,.94]:[.82,.94],j=`${J($)} · ${H||"Model not reported"}`,R=h.useId(),M=P([t],r,["think","tool","message","ask"],1)[0],z=M?.event.kind==="think"&&r-M.at<9e4&&t.facts?.turn?.phase!=="complete",p=u.posture==="attention"||u.posture==="blocked"?"waiting":z?"thinking":u.posture==="working"?"working":"idle",L=c?ot(t,r):null,k=Y(t.agent),f=tt(t),y=f.named?f.name:d||f.name,O=f.named?y:`${y} · ${t.id.slice(-4)}`,S=h.useRef(null),[_,T]=h.useState(!0),[N,V]=h.useState(()=>typeof document>"u"||!document.hidden),C=u.posture==="working",[U,q]=h.useState(C);h.useEffect(()=>{e||q(C)},[C,e]),h.useEffect(()=>{const x=S.current;if(!x)return;const g=new IntersectionObserver(([K])=>T(K.isIntersecting));g.observe(x);const W=()=>V(!document.hidden);return document.addEventListener("visibilitychange",W),()=>{g.disconnect(),document.removeEventListener("visibilitychange",W)}},[]);const F=[...t.id].reduce((x,g)=>(x+g.charCodeAt(0))%37,0),G=u.posture==="attention"||u.posture==="blocked";return s.jsxs("button",{ref:S,type:"button",className:`shared-floor-character is-${u.posture}${L?` has-${L}`:""}${U?" is-at-work":""}${n?" is-pinned":""}${e||!_||!N?" is-still":""}`,style:{"--character-delay":`${-F/10}s`},onClick:()=>v(t),"aria-describedby":R,"aria-pressed":n,"aria-label":`${y} ${t.id.slice(-5)}, ${l.summary}. ${j}. ${n?"Release this actor's card":"Inspect actor and keep its card open"}`,children:[s.jsx("span",{className:"shared-floor-character__shadow","aria-hidden":"true"}),s.jsxs("span",{className:`shared-floor-character__sprite${i||a||o?" is-rendered":""}`,"aria-hidden":"true",children:[i&&(!m||D(i))?s.jsx(Q,{slug:i,pixel:m,size:86,paused:e||!_||!N,expression:z?"look-up":"rest"}):i&&m?s.jsx(w,{name:t.agent.name,size:76,hue:k.hue,tone:k.tone}):o?s.jsx(X,{identity:f.named?f.name:t.id,state:{mood:p==="waiting"?"concerned":p==="thinking"?"curious":p==="working"?"focused":"neutral",action:p==="waiting"?"idle":p,interaction:{}},motion:e||!_||!N?"paused":"normal",size:76}):a?s.jsx(st,{character:a,posture:p,paused:e,size:76}):s.jsx(w,{name:t.agent.name,size:76,hue:k.hue,tone:k.tone}),s.jsx("span",{className:"shared-floor-character__runtime-mark",style:{left:`${E[0]*100}%`,top:`${E[1]*100}%`},title:j,children:s.jsx(I,{harness:$,size:16,title:null})})]}),G?s.jsx("span",{className:"shared-floor-character__attention","aria-hidden":"true",children:"!"}):null,s.jsxs("span",{className:"shared-floor-character__label","aria-hidden":"true",children:[s.jsx("strong",{className:"shared-floor-character__identity",children:s.jsx("span",{children:O})}),s.jsx("small",{children:l.summary})]}),s.jsxs("span",{id:R,className:"shared-floor-character__context",role:"tooltip",children:[s.jsx("strong",{children:l.state}),s.jsxs("span",{className:"shared-floor-character__runtime",children:[s.jsx(I,{harness:$,size:14,title:null}),j]}),s.jsx("span",{children:l.task||"No task summary reported."}),l.activity?s.jsx("span",{className:"shared-floor-character__context-activity",children:l.activity}):null,s.jsxs("small",{children:[l.at?`Observed ${Math.max(0,Math.floor((r-l.at)/6e4))<1?"just now":`${Math.floor((r-l.at)/6e4)}m ago`}`:"No recent observation"," · ",n?"Kept open · click to release":"Click to keep open"]})]})]})}export{$t as SharedFloorCharacter,ot as sharedCharacterGesture};