@openscout/scout 0.2.96 → 0.2.98

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 (395) hide show
  1. package/README.md +0 -1
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-sfonf5SR.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-IqOtJfRs.js → AddProjectForm-fXndbzXT.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-6-KBVKUu.js → AgentAvatar-Dz79iTxB.js} +1 -1
  7. package/dist/client/assets/AgentConfigurationScreen-DDc3udYM.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-DHDS9Pgd.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-C9rn3Fj5.js → AgentDetailCard-8viaEY8b.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-DuyvyMMj.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-qntgg2q2.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-DI2iW9zO.js → AgentLaneCard-Cc9uyfBr.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-D8bARHMx.js → AgentLaneChrome-Dv2lBFoH.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-52un7dKC.js → AgentLaneDetailSheet-CGqtqSHQ.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-CEBjmPTa.js → AgentLaneSummaryResize-Di4u6df2.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-q20mTjms.js → AgentLanesPreflight-CCGBArIb.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-96lHsoX7.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-DrEJDJef.js → AgentLiveActions-DlSKL60c.js} +1 -1
  20. package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +1 -0
  21. package/dist/client/assets/{AgentSessions-DCPCG4xb.js → AgentSessions-DV9v34aq.js} +2 -2
  22. package/dist/client/assets/AgentsConsole-DTpVhS67.js +1 -0
  23. package/dist/client/assets/AgentsScreen-hZ4o2I-e.js +1 -0
  24. package/dist/client/assets/AgentsSubnav-Ci7uWM7P.js +1 -0
  25. package/dist/client/assets/{AstronautSuit-DbjQtfD_.js → AstronautSuit-CwB4Dw07.js} +1 -1
  26. package/dist/client/assets/{AtopView-Daq_ob3z.js → AtopView-D7vyQDtE.js} +1 -1
  27. package/dist/client/assets/{BackToPicker-CXZjBRAe.js → BackToPicker-BHicJyfc.js} +1 -1
  28. package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +1 -0
  29. package/dist/client/assets/{BriefingsScreen-B5oMTGKv.js → BriefingsScreen-Cn4Mbam9.js} +1 -1
  30. package/dist/client/assets/{BrokerMetadataPanel-BsiU8lTD.js → BrokerMetadataPanel-BJSwU9XZ.js} +1 -1
  31. package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +5 -0
  32. package/dist/client/assets/{CastPicker-_5E5hNUe.js → CastPicker-CkgTalIt.js} +1 -1
  33. package/dist/client/assets/{ChatCollapsedStrip-D-eXhzPf.js → ChatCollapsedStrip-7Wrg8Ge0.js} +1 -1
  34. package/dist/client/assets/{CodeDiffPane-n7W4iGUG.js → CodeDiffPane-DfluIWmO.js} +1 -1
  35. package/dist/client/assets/{CodeProjectPicker-CMsbSTDq.js → CodeProjectPicker-By_Wz9ex.js} +1 -1
  36. package/dist/client/assets/CodeScreen-cLC0tJ4S.js +1 -0
  37. package/dist/client/assets/ConversationComposer-BUIjWMBi.js +1 -0
  38. package/dist/client/assets/ConversationFeedRows-Bx0gFyG_.js +1 -0
  39. package/dist/client/assets/ConversationHeader-Bt2RBj93.js +1 -0
  40. package/dist/client/assets/{ConversationPanels-Dujvnmup.js → ConversationPanels-o6W-cOoU.js} +2 -2
  41. package/dist/client/assets/ConversationScreen-DIU7m_aC.js +2 -0
  42. package/dist/client/assets/{ConversationStatus-DVzSb2Hv.js → ConversationStatus-CTYOywFh.js} +1 -1
  43. package/dist/client/assets/{CrewAvatar-BwXjyg8N.js → CrewAvatar-CZ_faQ_s.js} +1 -1
  44. package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +1 -0
  45. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
  46. package/dist/client/assets/{DataTable-Bp8tU9AK.js → DataTable-C6aMSilS.js} +1 -1
  47. package/dist/client/assets/{DispatchAftermath-B-6rmXzL.js → DispatchAftermath-ZCEB75hh.js} +1 -1
  48. package/dist/client/assets/{DocumentFocusViewer-Do3wQ_3Z.js → DocumentFocusViewer-D8iB6SMt.js} +1 -1
  49. package/dist/client/assets/{EmbeddableSurfacesLab-C1orRyP9.js → EmbeddableSurfacesLab-D3iZiS8o.js} +1 -1
  50. package/dist/client/assets/{EmptyState-CJzXj1l5.js → EmptyState-CKPWFSjq.js} +1 -1
  51. package/dist/client/assets/{FileViewerPane-Df6VzXjA.js → FileViewerPane-CxNbcTYf.js} +1 -1
  52. package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +1 -0
  53. package/dist/client/assets/{FollowScreen-DvnxYLVh.js → FollowScreen-CkR-okdL.js} +1 -1
  54. package/dist/client/assets/{HarnessMark-B979GCSB.js → HarnessMark-DttReffF.js} +1 -1
  55. package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +1 -0
  56. package/dist/client/assets/{HerdrSession-B3McuYgi.js → HerdrSession-DsuxCtfX.js} +1 -1
  57. package/dist/client/assets/{HomeHero-CdUVPjkG.js → HomeHero-DXJo2QSO.js} +1 -1
  58. package/dist/client/assets/{HostAdvisorView-Bok5Sk5c.js → HostAdvisorView-DeJ-8RZV.js} +1 -1
  59. package/dist/client/assets/{KnowledgeSearchInspector-B7XSoJsu.js → KnowledgeSearchInspector-W_zNIBRV.js} +1 -1
  60. package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +1 -0
  61. package/dist/client/assets/{LaneToolHoverCard-HByf2ndx.js → LaneToolHoverCard-t7-XJP-h.js} +1 -1
  62. package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +1 -0
  63. package/dist/client/assets/{LaneTraceEventFocus-DM-hoPxG.js → LaneTraceEventFocus-BB5DhFQm.js} +1 -1
  64. package/dist/client/assets/{MeshCanvas-DCLJRsBy.js → MeshCanvas-DZv2ipsy.js} +1 -1
  65. package/dist/client/assets/{MeshCanvasMinimap-cEFS9eW7.js → MeshCanvasMinimap-BXHRNb7l.js} +1 -1
  66. package/dist/client/assets/MeshScreen-DuNvpDC5.js +1 -0
  67. package/dist/client/assets/{MeshTopologyView-CCRPd8PU.js → MeshTopologyView-Dc0GSrKa.js} +2 -2
  68. package/dist/client/assets/MessagesScreen-dNNPFwAc.js +1 -0
  69. package/dist/client/assets/{MissionContextRail-DF0_kiU7.js → MissionContextRail-DnCWPzAM.js} +1 -1
  70. package/dist/client/assets/MissionControlView-DmaThhNR.js +1 -0
  71. package/dist/client/assets/MissionFocusOverlay-K21ssTxv.js +1 -0
  72. package/dist/client/assets/MissionLeftAgentRow-CbQm4BLv.js +1 -0
  73. package/dist/client/assets/{MissionLogPane-BbdDKjUl.js → MissionLogPane-BLvSSIdT.js} +1 -1
  74. package/dist/client/assets/{NewAgentModal-DfHxad34.js → NewAgentModal-B7qxjZlW.js} +1 -1
  75. package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +19 -0
  76. package/dist/client/assets/{NewChatOrigin-B1u7ki70.js → NewChatOrigin-DCn5cWPZ.js} +1 -1
  77. package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-DvKGsaLv.js} +2 -2
  78. package/dist/client/assets/{ObserveTextFlow-ZQWwrK3i.js → ObserveTextFlow-DCJ5EmD8.js} +2 -2
  79. package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-CJVqIqQ2.js} +1 -1
  80. package/dist/client/assets/{OpenScoutAppShell-CUd2yOLu.js → OpenScoutAppShell-C9TOLB7u.js} +2 -2
  81. package/dist/client/assets/OpsAgentsView-vIoY-AW1.js +1 -0
  82. package/dist/client/assets/OpsScreen-CJBwshEp.js +1 -0
  83. package/dist/client/assets/OpsSubnav-CjDTnp64.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfile-Br1eTD7G.js +1 -0
  85. package/dist/client/assets/ProjectAgentProfileBar-CUzZ4Rpx.js +1 -0
  86. package/dist/client/assets/ProjectAgentProfileHero-mjxNcRvw.js +1 -0
  87. package/dist/client/assets/ProjectsInbox-Bq29DE_o.js +2 -0
  88. package/dist/client/assets/ProjectsRail-kMDA0yn4.js +1 -0
  89. package/dist/client/assets/ProjectsScreen-BDaJYhc0.js +1 -0
  90. package/dist/client/assets/ProjectsThreadAside-B940p3vW.js +1 -0
  91. package/dist/client/assets/Provider-D0bB7q6y.js +1 -0
  92. package/dist/client/assets/{RailRow-CEH2MFBw.js → RailRow-B88JVr62.js} +1 -1
  93. package/dist/client/assets/RawSessionsTable-CzGhEdiZ.js +1 -0
  94. package/dist/client/assets/RealtimeVoiceScreen-CyP1CWsX.js +1 -0
  95. package/dist/client/assets/{RepoDiffEmbedScreen-kY2pHjIs.js → RepoDiffEmbedScreen-mexrJPhW.js} +1 -1
  96. package/dist/client/assets/{RepoDiffPageScreen-C6LhoKrn.js → RepoDiffPageScreen-DbqX4L3q.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewer-BhcIIQQg.js → RepoDiffViewer-Bw5yMC4A.js} +1 -1
  98. package/dist/client/assets/{RepoDiffViewerLazy-Csy_j9LD.js → RepoDiffViewerLazy-DzfoFhbl.js} +2 -2
  99. package/dist/client/assets/{ReposScreen-B_cB0zu7.js → ReposScreen-CzbO1Fuy.js} +2 -2
  100. package/dist/client/assets/{ScoutDeckSurface-CSy_fjcG.js → ScoutDeckSurface-DQoZofzH.js} +1 -1
  101. package/dist/client/assets/{ScoutSurface-CQVcSrin.js → ScoutSurface-NlhDsPzg.js} +1 -1
  102. package/dist/client/assets/{ScoutbotFxLab-DqGiLYNy.js → ScoutbotFxLab-l2WAahCg.js} +1 -1
  103. package/dist/client/assets/{SecondaryNav-BR4VRdgh.js → SecondaryNav-Cs0_FQdj.js} +1 -1
  104. package/dist/client/assets/{SessionEmbedScreen-BTlZ9gAg.js → SessionEmbedScreen-CpduQ0O9.js} +1 -1
  105. package/dist/client/assets/{SessionObserve-dQDN23pP.js → SessionObserve-BVeTkcIl.js} +1 -1
  106. package/dist/client/assets/{SessionObserveEvidence-BRBGKAgd.js → SessionObserveEvidence-BkOezTGV.js} +1 -1
  107. package/dist/client/assets/SessionRefScreen-DetLMkTT.js +1 -0
  108. package/dist/client/assets/SessionsScreen-B-McKw6d.js +1 -0
  109. package/dist/client/assets/{SettingsDrawer-RGVK_bmE.js → SettingsDrawer-CPB32w0n.js} +3 -3
  110. package/dist/client/assets/SettingsScreen-BEzYFdjz.js +1 -0
  111. package/dist/client/assets/{ShikiPane-DYI9Hkge.js → ShikiPane-C0TuCATU.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-B9ugxWgA.js → SlidePanel-CETQ5NTx.js} +1 -1
  113. package/dist/client/assets/{SpriteAvatar-z5hHesx9.js → SpriteAvatar-DFO4Kb4Z.js} +1 -1
  114. package/dist/client/assets/{StatusPill-BFvMjmZV.js → StatusPill-BllrY-eg.js} +1 -1
  115. package/dist/client/assets/{TailView-0uEIj2JH.js → TailView-_gKWfaQM.js} +2 -2
  116. package/dist/client/assets/Terminal-DWyZTZdY.js +1 -0
  117. package/dist/client/assets/TerminalEmbedScreen-_SSzwhWa.js +1 -0
  118. package/dist/client/assets/{TerminalHeaderMount-BL07cd0q.js → TerminalHeaderMount-CY7uIWBg.js} +1 -1
  119. package/dist/client/assets/{TextDocumentSurface-BflAwXeZ.js → TextDocumentSurface-2X1Gw4eA.js} +1 -1
  120. package/dist/client/assets/{TmuxPeek-BTnjOQi0.js → TmuxPeek-CqTJRhkI.js} +1 -1
  121. package/dist/client/assets/{VoicePermissionsPanel-CgQ6GGS-.js → VoicePermissionsPanel-C4vkU-sU.js} +1 -1
  122. package/dist/client/assets/{WorkDetailScreen-CaLG-zDs.js → WorkDetailScreen-DqGnuK0e.js} +3 -3
  123. package/dist/client/assets/{WorkFilesViewer-B9Sil_No.js → WorkFilesViewer-D8-4vF5l.js} +1 -1
  124. package/dist/client/assets/{activity-DcrMApUY.js → activity-CzTJ-YMX.js} +1 -1
  125. package/dist/client/assets/{addon-fit-DMVrz5Sv.js → addon-fit-Zx3A7pGS.js} +1 -1
  126. package/dist/client/assets/{addon-webgl-BYvpZUyu.js → addon-webgl-DitJj-N0.js} +1 -1
  127. package/dist/client/assets/{agent-autocomplete-B-5QTeas.js → agent-autocomplete-BlK8wY06.js} +1 -1
  128. package/dist/client/assets/{agent-essentials-D7KRGYvF.js → agent-essentials-K9B6kbTS.js} +1 -1
  129. package/dist/client/assets/{agent-lane-card-model-CNZMPkhc.js → agent-lane-card-model-CY3OE1Xu.js} +1 -1
  130. package/dist/client/assets/{agent-lanes-model-DXqjs0OK.js → agent-lanes-model-tc-1hE6q.js} +1 -1
  131. package/dist/client/assets/{agent-master-model-DqjrVI2h.js → agent-master-model-DMcHeNq3.js} +1 -1
  132. package/dist/client/assets/agent-specialization-CtF_jI34.js +1 -0
  133. package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
  134. package/dist/client/assets/{arc.es-NHqHWohb.js → arc.es-BNXJqSw7.js} +1 -1
  135. package/dist/client/assets/{arrow-down-CKtSUjmW.js → arrow-down-BAGkhHA6.js} +1 -1
  136. package/dist/client/assets/{arrow-left-Czpf-AE4.js → arrow-left-eToA6GxC.js} +1 -1
  137. package/dist/client/assets/{arrow-right-BuzMnLYP.js → arrow-right-DTX42clh.js} +1 -1
  138. package/dist/client/assets/{arrow-up-right-C6Wl-1uw.js → arrow-up-right-B09GPwFl.js} +1 -1
  139. package/dist/client/assets/{bot-rd0awxD3.js → bot-WxKXYtEX.js} +1 -1
  140. package/dist/client/assets/{check-ofKUE8yH.js → check-Dz2SRHft.js} +1 -1
  141. package/dist/client/assets/{chevron-down-wciXnOQz.js → chevron-down-D120PY4g.js} +1 -1
  142. package/dist/client/assets/{chevron-right-D-HdlPg8.js → chevron-right-CowuvuE6.js} +1 -1
  143. package/dist/client/assets/{chunk-HRAB3GC3-Tyv9rzx7.js → chunk-HRAB3GC3-KjjrTLCU.js} +1 -1
  144. package/dist/client/assets/{chunk-JTPDIGGW-BC2Mandc.js → chunk-JTPDIGGW-COJ00z94.js} +3 -3
  145. package/dist/client/assets/{chunk-T65CQEWV-C1AWTYZZ.js → chunk-T65CQEWV-H2QEKfr1.js} +1 -1
  146. package/dist/client/assets/{chunk-YOZR3KYS-DwHPHa6f.js → chunk-YOZR3KYS-CrCgXw9l.js} +1 -1
  147. package/dist/client/assets/{clock-B88r8OrZ.js → clock-_9FDplIT.js} +1 -1
  148. package/dist/client/assets/{code-xml-D7pOQM9l.js → code-xml-CkkNdRmu.js} +1 -1
  149. package/dist/client/assets/{compass-Dt1AMXz2.js → compass-BdpImt_W.js} +1 -1
  150. package/dist/client/assets/content-0RBfbCIJ.js +1 -0
  151. package/dist/client/assets/content-BTmnk2bl.js +1 -0
  152. package/dist/client/assets/content-Bk5DKhyP.js +1 -0
  153. package/dist/client/assets/{content-nkx0swDe.js → content-Bw_8GE_S.js} +1 -1
  154. package/dist/client/assets/content-CI4gLEWi.js +1 -0
  155. package/dist/client/assets/content-CLCtp9Rb.js +1 -0
  156. package/dist/client/assets/content-C_FAGTNk.js +1 -0
  157. package/dist/client/assets/content-CnnzWOE3.js +1 -0
  158. package/dist/client/assets/content-DKlY98pO.js +1 -0
  159. package/dist/client/assets/content-Df7ndXTG.js +1 -0
  160. package/dist/client/assets/content-DkZDzzx3.js +1 -0
  161. package/dist/client/assets/content-DnGmb2L0.js +1 -0
  162. package/dist/client/assets/content-Ds-zs-Ss.js +1 -0
  163. package/dist/client/assets/content-JIWSyC0f.js +1 -0
  164. package/dist/client/assets/content-Q3TIYC8q.js +1 -0
  165. package/dist/client/assets/content-evaBfvxD.js +1 -0
  166. package/dist/client/assets/{context-budget-DX_fwUs3.js → context-budget-DqxWzalx.js} +1 -1
  167. package/dist/client/assets/{conversation-icons-tp9BX6X2.js → conversation-icons-DHGc9wbT.js} +1 -1
  168. package/dist/client/assets/conversation-model-C2KuZUXc.js +1 -0
  169. package/dist/client/assets/conversation-motion-features-BJnHs3Ul.js +1 -0
  170. package/dist/client/assets/{copy-CWWAJ75H.js → copy-BzdzWsQd.js} +1 -1
  171. package/dist/client/assets/{cpu-DrqejfkB.js → cpu-CHFIGw87.js} +1 -1
  172. package/dist/client/assets/{createLucideIcon-DezKXSG2.js → createLucideIcon-Dv8H8m7J.js} +1 -1
  173. package/dist/client/assets/discover-DutlV0ZU.js +2 -0
  174. package/dist/client/assets/embed-entry-CJG7WEVw.js +2 -0
  175. package/dist/client/assets/{external-link-Dp_a2vRZ.js → external-link-BvX5PfLh.js} +1 -1
  176. package/dist/client/assets/{eye-BRyD0jno.js → eye-C9cGk5z6.js} +1 -1
  177. package/dist/client/assets/{file-code-corner-muIVH_xO.js → file-code-corner-jlGFdr8d.js} +1 -1
  178. package/dist/client/assets/{file-text-CqJgwxmv.js → file-text-BHro8MkG.js} +1 -1
  179. package/dist/client/assets/{gauge-hU--hKVP.js → gauge-DSflSery.js} +1 -1
  180. package/dist/client/assets/{gestures-DN4hEeqv.js → gestures-YA5IIwp-.js} +1 -1
  181. package/dist/client/assets/{git-branch-CK5v8F2v.js → git-branch-Bc_eDIpG.js} +1 -1
  182. package/dist/client/assets/{home-moving-signal-BjDtEJUP.js → home-moving-signal-PHSqSBu_.js} +1 -1
  183. package/dist/client/assets/home-now-card-C_qsI6C6.js +1 -0
  184. package/dist/client/assets/{home-now-card-nano-C-r_bBg5.js → home-now-card-nano-Jmy7eJ6H.js} +1 -1
  185. package/dist/client/assets/{hooks-D46bABUP.js → hooks-ME7rmhpE.js} +1 -1
  186. package/dist/client/assets/{index-DvLtl7rV.js → index-C1VaWNuD.js} +2 -2
  187. package/dist/client/assets/index-C8UCRm2W.js +1 -0
  188. package/dist/client/assets/index-Cn0I2Hgi.js +1 -0
  189. package/dist/client/assets/index-Cx6Gbr6n.js +1 -0
  190. package/dist/client/assets/{inspector-panel-Dkc7rLvY.js → inspector-panel-CwrHjRaQ.js} +2 -2
  191. package/dist/client/assets/{keyboard-nav-BLYDhL3Z.js → keyboard-nav-B8sQ_8IF.js} +1 -1
  192. package/dist/client/assets/{lane-roster-store-DOdI1O13.js → lane-roster-store-DN2jxXF-.js} +1 -1
  193. package/dist/client/assets/{layers-CSsg3JVP.js → layers-CW2-qHsG.js} +1 -1
  194. package/dist/client/assets/{layout-grid-DOChPJdZ.js → layout-grid-BoVnPOk-.js} +1 -1
  195. package/dist/client/assets/left-BRu9pnqx.js +2 -0
  196. package/dist/client/assets/left-BjS1dKNV.js +2 -0
  197. package/dist/client/assets/left-CL-TVLJ7.js +1 -0
  198. package/dist/client/assets/left-DLpsDi55.js +1 -0
  199. package/dist/client/assets/left-DPcM9o8Y.js +1 -0
  200. package/dist/client/assets/left-MmTJf1tK.js +1 -0
  201. package/dist/client/assets/left-P80i5V8L.js +1 -0
  202. package/dist/client/assets/left-advisor-CbXVzAqS.js +1 -0
  203. package/dist/client/assets/left-agents-7mJsiNyr.js +1 -0
  204. package/dist/client/assets/left-default-COK26l3H.js +1 -0
  205. package/dist/client/assets/left-lanes-Dbdm9Veu.js +1 -0
  206. package/dist/client/assets/left-mission-DqGR5jby.js +1 -0
  207. package/dist/client/assets/library-COnWzUWv.js +1 -0
  208. package/dist/client/assets/{loader-circle-pM56HNhR.js → loader-circle-DmUG_YC7.js} +1 -1
  209. package/dist/client/assets/{local-agents-C8xAhbO5.js → local-agents-VP1-ZlPw.js} +1 -1
  210. package/dist/client/assets/{mentions-DG6OQrsc.js → mentions-BZ5SBMtc.js} +1 -1
  211. package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +1 -0
  212. package/dist/client/assets/{mesh-ops-BZ1h5RQs.js → mesh-ops-CKSWgax2.js} +1 -1
  213. package/dist/client/assets/{mesh-view-store-ChUOASK8.js → mesh-view-store-CBM1za_N.js} +1 -1
  214. package/dist/client/assets/{message-circle-mZCv8tvB.js → message-circle-joGFxfj1.js} +1 -1
  215. package/dist/client/assets/{message-markup-C2LQDm_k.js → message-markup-DC0QFEZn.js} +1 -1
  216. package/dist/client/assets/{message-square-C7t_qtuj.js → message-square-BLiFqpe_.js} +1 -1
  217. package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-CM8mQGg8.js} +1 -1
  218. package/dist/client/assets/model-CBkMvT1w.js +1 -0
  219. package/dist/client/assets/{observe-BpEm1INu.js → observe-BLmy4quB.js} +1 -1
  220. package/dist/client/assets/{page-status-E5jnk48p.js → page-status-BE0-J1xY.js} +1 -1
  221. package/dist/client/assets/{paperclip-C64lkcbM.js → paperclip-Br7wUDFl.js} +1 -1
  222. package/dist/client/assets/{persistent-state-EHXw8WNy.js → persistent-state-BubPQ7tT.js} +1 -1
  223. package/dist/client/assets/{plus-Co-dqKul.js → plus-BWKhylds.js} +1 -1
  224. package/dist/client/assets/profile-BCvk8jOQ.js +1 -0
  225. package/dist/client/assets/projects-inbox-BIW7nv-H.css +1 -0
  226. package/dist/client/assets/projects-inbox-DFbgVlXL.js +1 -0
  227. package/dist/client/assets/{proxy-BiW5suC7.js → proxy-DVDRhSRR.js} +1 -1
  228. package/dist/client/assets/{radio-BOxBQX-T.js → radio-CxIXS1nU.js} +1 -1
  229. package/dist/client/assets/{refresh-cw-DMxGzDwn.js → refresh-cw-Bkh7Cvnd.js} +1 -1
  230. package/dist/client/assets/resolve-panes-DhD5qmQO.js +1 -0
  231. package/dist/client/assets/resolve-sidebar-context-GqhZNRPY.js +1 -0
  232. package/dist/client/assets/right-B_08ilv6.js +1 -0
  233. package/dist/client/assets/right-Brm67HOL.js +1 -0
  234. package/dist/client/assets/right-BveAPKBW.js +1 -0
  235. package/dist/client/assets/right-CpTB_-Ya.js +1 -0
  236. package/dist/client/assets/right-CqC4Qdot.js +1 -0
  237. package/dist/client/assets/right-D91j9d5Y.js +1 -0
  238. package/dist/client/assets/{right-CimaAvQN.js → right-DVUq5374.js} +1 -1
  239. package/dist/client/assets/right-DaLRhYl3.js +1 -0
  240. package/dist/client/assets/right-Dt1wOwA5.js +1 -0
  241. package/dist/client/assets/right-DtzqIZQF.js +1 -0
  242. package/dist/client/assets/{rocket-BQm5_CvR.js → rocket-CnxqjX_K.js} +1 -1
  243. package/dist/client/assets/{router-B9vQkNJL.js → router-kfcaYqZr.js} +1 -1
  244. package/dist/client/assets/runtime-picker-C20lTGhV.js +1 -0
  245. package/dist/client/assets/{scope-views-1IYJdl41.js → scope-views-KPY85UUx.js} +1 -1
  246. package/dist/client/assets/{scout-voice-BVUqGhth.js → scout-voice-Cg1qfepC.js} +1 -1
  247. package/dist/client/assets/scoutbot-D7kGGyK_.js +3 -0
  248. package/dist/client/assets/{scoutbot-markdown-BQ_Ee2Ic.js → scoutbot-markdown-yb87JlSE.js} +1 -1
  249. package/dist/client/assets/{scroll-text-Dze_dXtQ.js → scroll-text-DFcBYy5J.js} +1 -1
  250. package/dist/client/assets/{search-CDko0PKE.js → search-FB2vVxCp.js} +1 -1
  251. package/dist/client/assets/{secondaryNavConfig-BoQ_zYR9.js → secondaryNavConfig-C0Srrmy8.js} +1 -1
  252. package/dist/client/assets/{selection-bridge-Din6yV3h.js → selection-bridge-qBGFCJv8.js} +1 -1
  253. package/dist/client/assets/{send-horizontal-CSjIm6xg.js → send-horizontal-CS7mxVhX.js} +1 -1
  254. package/dist/client/assets/{server-Bzj7lPIx.js → server-WY6gsbZz.js} +1 -1
  255. package/dist/client/assets/{session-catalog-DsaZJXZt.js → session-catalog-CG4oL_yN.js} +1 -1
  256. package/dist/client/assets/{session-table-BQfR7u6r.js → session-table-uJh3v-ly.js} +1 -1
  257. package/dist/client/assets/{settings-Dyvpkb1D.js → settings-DQEtqkM9.js} +1 -1
  258. package/dist/client/assets/{sliders-horizontal-C8njVwfg.js → sliders-horizontal-57e99_qO.js} +1 -1
  259. package/dist/client/assets/{sparkles-CETYrxGA.js → sparkles-D0vWLTyC.js} +1 -1
  260. package/dist/client/assets/{sse-CD9MMUxl.js → sse-B29iGBnw.js} +1 -1
  261. package/dist/client/assets/{system-surfaces-redesign-QVXNeGYw.css → system-surfaces-redesign-kuf3wuE_.css} +1 -1
  262. package/dist/client/assets/{tail-events-Ps8KpKah.js → tail-events-LK29oCKm.js} +1 -1
  263. package/dist/client/assets/{terminal-9GRS_Qdc.js → terminal-UDy4lzV1.js} +1 -1
  264. package/dist/client/assets/{terminal-relay-GYMIvKs1.js → terminal-relay-CXHMdain.js} +1 -1
  265. package/dist/client/assets/{terminal-screen-BLk4PAYt.css → terminal-screen-vMICbBJh.css} +1 -1
  266. package/dist/client/assets/{terminal-sessions-BQ6t92tJ.js → terminal-sessions-Bdt2W3Y4.js} +1 -1
  267. package/dist/client/assets/{terminal-takeover-_Jyys4me.js → terminal-takeover-BMeBjBB2.js} +1 -1
  268. package/dist/client/assets/{use-conversation-list-C9ABzjXI.js → use-conversation-list-UG-tMN67.js} +1 -1
  269. package/dist/client/assets/{use-fleet-active-asks-DAspZQjE.js → use-fleet-active-asks-CCGrll5q.js} +1 -1
  270. package/dist/client/assets/{use-mesh-ops-items-Dh54ymEp.js → use-mesh-ops-items-BjyeFJTz.js} +1 -1
  271. package/dist/client/assets/{use-reduced-motion-x8pJMVrG.js → use-reduced-motion-CPoX8iV2.js} +1 -1
  272. package/dist/client/assets/{use-scout-dev-flags-DhCbiDK3.js → use-scout-dev-flags-DTseRrFi.js} +1 -1
  273. package/dist/client/assets/{useAgentHoverCard-DoBwV0LX.js → useAgentHoverCard-BgTLNcF-.js} +1 -1
  274. package/dist/client/assets/useContentSecondaryNav-CoIoz7JU.js +1 -0
  275. package/dist/client/assets/useEmbedHeadline-DuUnwTB7.js +1 -0
  276. package/dist/client/assets/{usePierreRuntime-ejq9dCWV.js → usePierreRuntime-35AHf9RQ.js} +1 -1
  277. package/dist/client/assets/{wrench-DjkoAOQt.js → wrench-BfVeded5.js} +1 -1
  278. package/dist/client/assets/{x-CAbNespN.js → x-DgmmnPKt.js} +1 -1
  279. package/dist/client/assets/{xterm-Cf-ngcGP.js → xterm-DnJJmrCA.js} +1 -1
  280. package/dist/client/assets/{zap-Cq8eWkcF.js → zap-Bcja1lHG.js} +1 -1
  281. package/dist/client/index.html +1 -1
  282. package/dist/main.mjs +5180 -9874
  283. package/dist/node/main.mjs +18 -2
  284. package/dist/pairing-runtime-controller.mjs +31 -2
  285. package/dist/runtime/broker-daemon.mjs +87 -13
  286. package/dist/scout-control-plane-web.mjs +35 -3
  287. package/package.json +2 -5
  288. package/dist/client/assets/ActivityScreen-BnoaUkVZ.js +0 -1
  289. package/dist/client/assets/AgentConfigurationScreen-CuZJy07q.js +0 -1
  290. package/dist/client/assets/AgentDefinitionsWorkspace-Iyl4BesU.js +0 -1
  291. package/dist/client/assets/AgentFloorView-YT-Jjccf.js +0 -1
  292. package/dist/client/assets/AgentInfoScreen-Dr99gQEZ.js +0 -1
  293. package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +0 -1
  294. package/dist/client/assets/AgentLanesView-CetZZDyF.js +0 -2
  295. package/dist/client/assets/AgentMasterScreen-DJPnstoD.js +0 -1
  296. package/dist/client/assets/AgentsConsole-CsYOoFJi.js +0 -1
  297. package/dist/client/assets/AgentsScreen-k8LvBuU_.js +0 -1
  298. package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +0 -1
  299. package/dist/client/assets/BriefingDetailScreen-CUCXO-KH.js +0 -1
  300. package/dist/client/assets/BrokerScreen-BPbOHhCS.js +0 -5
  301. package/dist/client/assets/CodeScreen-CeuO3EhR.js +0 -1
  302. package/dist/client/assets/ConversationComposer-CXPKx86g.js +0 -1
  303. package/dist/client/assets/ConversationFeedRows-WrH-YI3L.js +0 -1
  304. package/dist/client/assets/ConversationHeader-BQWzGzLK.js +0 -1
  305. package/dist/client/assets/ConversationScreen-CR9pWB65.js +0 -2
  306. package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +0 -1
  307. package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +0 -1
  308. package/dist/client/assets/FlightObserveScreen-6mGnmWQA.js +0 -1
  309. package/dist/client/assets/HarnessesScreen-CHTuv8p6.js +0 -1
  310. package/dist/client/assets/KnowledgeSearchScreen-D3o3IODW.js +0 -1
  311. package/dist/client/assets/LaneTraceDetailSheet-BUgHz-sd.js +0 -1
  312. package/dist/client/assets/MeshScreen-BcxPkhm6.js +0 -1
  313. package/dist/client/assets/MessagesScreen-Bb5l13MO.js +0 -1
  314. package/dist/client/assets/MissionControlView-E3V7bENU.js +0 -1
  315. package/dist/client/assets/MissionFocusOverlay-h15sQFvP.js +0 -1
  316. package/dist/client/assets/MissionLeftAgentRow-KPdk9rSa.js +0 -1
  317. package/dist/client/assets/NewChatComposer-_Stj0fZy.js +0 -19
  318. package/dist/client/assets/OpsAgentsView-DI5wu1si.js +0 -1
  319. package/dist/client/assets/OpsScreen-D8fQafCl.js +0 -1
  320. package/dist/client/assets/OpsSubnav-1K4Jaf__.js +0 -1
  321. package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +0 -1
  322. package/dist/client/assets/ProjectAgentProfileBar-k2QHHHsQ.js +0 -1
  323. package/dist/client/assets/ProjectAgentProfileHero-Bpxk1ui2.js +0 -1
  324. package/dist/client/assets/ProjectsInbox-C_bMHLCc.js +0 -2
  325. package/dist/client/assets/ProjectsRail-J-aH_pxT.js +0 -1
  326. package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +0 -1
  327. package/dist/client/assets/ProjectsThreadAside-_ourdM-Q.js +0 -1
  328. package/dist/client/assets/Provider-CtXJeLrP.js +0 -1
  329. package/dist/client/assets/RawSessionsTable-CDyrom-F.js +0 -1
  330. package/dist/client/assets/RealtimeVoiceScreen-DBl3DN1H.js +0 -1
  331. package/dist/client/assets/SessionRefScreen-COVQMbtE.js +0 -1
  332. package/dist/client/assets/SessionsScreen--5OJ3p3v.js +0 -1
  333. package/dist/client/assets/SettingsScreen-CCxzy5IU.js +0 -1
  334. package/dist/client/assets/Terminal-DouZeNxc.js +0 -1
  335. package/dist/client/assets/TerminalEmbedScreen-dMNUbzXr.js +0 -1
  336. package/dist/client/assets/agent-specialization-BujJVUTD.js +0 -1
  337. package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
  338. package/dist/client/assets/agents-project-model-UYiamtrU.js +0 -1
  339. package/dist/client/assets/content-9K38QchR.js +0 -1
  340. package/dist/client/assets/content-BRgnyXWh.js +0 -1
  341. package/dist/client/assets/content-BWPNyXJ0.js +0 -1
  342. package/dist/client/assets/content-BdkI07v3.js +0 -1
  343. package/dist/client/assets/content-C4oWa8SB.js +0 -1
  344. package/dist/client/assets/content-C9ijJxyl.js +0 -1
  345. package/dist/client/assets/content-CFZ4rghn.js +0 -1
  346. package/dist/client/assets/content-CIqu_Ci_.js +0 -1
  347. package/dist/client/assets/content-CnJF9DGO.js +0 -1
  348. package/dist/client/assets/content-CriW8Y8u.js +0 -1
  349. package/dist/client/assets/content-DDCyPPk_.js +0 -1
  350. package/dist/client/assets/content-DtcZeh5m.js +0 -1
  351. package/dist/client/assets/content-U9tsdtle.js +0 -1
  352. package/dist/client/assets/content-hFLK3CON.js +0 -1
  353. package/dist/client/assets/content-p00KQrtD.js +0 -1
  354. package/dist/client/assets/conversation-model-Dc02NsGp.js +0 -1
  355. package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +0 -1
  356. package/dist/client/assets/discover-C2CZO4Tk.js +0 -2
  357. package/dist/client/assets/embed-entry-BSMUykuG.js +0 -2
  358. package/dist/client/assets/home-now-card-nF8OotI-.js +0 -1
  359. package/dist/client/assets/index-CPrU5q04.js +0 -1
  360. package/dist/client/assets/index-kL1WLbeS.js +0 -1
  361. package/dist/client/assets/index-zvhpRHao.js +0 -1
  362. package/dist/client/assets/left-B-SdEJSJ.js +0 -1
  363. package/dist/client/assets/left-B3wSE6ql.js +0 -1
  364. package/dist/client/assets/left-BNRFiRsb.js +0 -2
  365. package/dist/client/assets/left-BggzhgXN.js +0 -1
  366. package/dist/client/assets/left-CARCvvxS.js +0 -2
  367. package/dist/client/assets/left-CpokZYHt.js +0 -1
  368. package/dist/client/assets/left-YT7mIGuH.js +0 -1
  369. package/dist/client/assets/left-advisor-CCY0vkcO.js +0 -1
  370. package/dist/client/assets/left-agents-trhO5sL8.js +0 -1
  371. package/dist/client/assets/left-default-CG33elBs.js +0 -1
  372. package/dist/client/assets/left-lanes-CitMgeTp.js +0 -1
  373. package/dist/client/assets/left-mission-Zl2m_5eU.js +0 -1
  374. package/dist/client/assets/library-DkALuCh5.js +0 -1
  375. package/dist/client/assets/mesh-buckets-6y3ZIibI.js +0 -1
  376. package/dist/client/assets/mesh-roster-Bc7T4b7z.js +0 -1
  377. package/dist/client/assets/model-IGCUEsMy.js +0 -1
  378. package/dist/client/assets/profile-APxDsN2P.js +0 -1
  379. package/dist/client/assets/projects-inbox-Cg4X2lUQ.js +0 -1
  380. package/dist/client/assets/projects-inbox-DRBl2N85.css +0 -1
  381. package/dist/client/assets/resolve-panes-DeVJbS9c.js +0 -1
  382. package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +0 -1
  383. package/dist/client/assets/right-Bmfd3pjP.js +0 -1
  384. package/dist/client/assets/right-BqI-nr9G.js +0 -1
  385. package/dist/client/assets/right-BuCgE0fZ.js +0 -1
  386. package/dist/client/assets/right-BwlW6E57.js +0 -1
  387. package/dist/client/assets/right-C0ybUw0j.js +0 -1
  388. package/dist/client/assets/right-CdkcrmeD.js +0 -1
  389. package/dist/client/assets/right-CkCCPbCX.js +0 -1
  390. package/dist/client/assets/right-D3eSiy41.js +0 -1
  391. package/dist/client/assets/right-Dz_xD0Vj.js +0 -1
  392. package/dist/client/assets/scoutbot-BJIamJOH.js +0 -3
  393. package/dist/client/assets/text-BP3oyl8-.js +0 -1
  394. package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +0 -1
  395. /package/dist/client/assets/{text-BYAFNLNq.css → runtime-picker-BYAFNLNq.css} +0 -0
@@ -1,4 +1,4 @@
1
- import{r as h,j as t}from"./index-DvLtl7rV.js";import{f as je}from"./bash-format-BRV5C6Gv.js";import{j as ks,p as Ue,k as ys}from"./tail-display-DcliDVkW.js";import{l as Ns}from"./lane-edit-display-C_Aujldz.js";import{f as ws}from"./lane-tool-detail-0WhMf4Vj.js";import{useLaneToolHoverCard as Cs}from"./LaneToolHoverCard-HByf2ndx.js";import{e as Ss,L as Oe,g as Ts,h as $s,j as Ae,o as Ls,b as Ie,f as Es,k as Rs,m as ke,l as Ve,a as Ke}from"./lane-observe-vfyACHi0.js";import{b as Ps}from"./lane-ask-display-B6iCAVcd.js";import{d as Os}from"./colors-BtO5_zlx.js";import{a as ye}from"./api-Co9aQ2Jw.js";import{r as Je}from"./mentions-DG6OQrsc.js";import{a as As,g as Ye,t as Is,b as Bs,d as _s,n as Be}from"./time-Dhsh_2EG.js";import{M as Xe}from"./message-markup-C2LQDm_k.js";import{q as Fs}from"./terminal-takeover-_Jyys4me.js";import{C as Ds,D as Ms,E as Ws}from"./NewChatComposer-_Stj0fZy.js";import{u as Ne,k as Ze}from"./Provider-CtXJeLrP.js";import{o as zs}from"./openContent-C6XO6kr5.js";import{O as Hs}from"./ObservedTopologyPanel-BJUhDSuQ.js";import{M as Gs}from"./text-BP3oyl8-.js";import"./index-zvhpRHao.js";import{ObserveReasoningDisclosure as qs,ObserveStreamCursor as _e}from"./ObserveTextFlow-ZQWwrK3i.js";import{SessionObserveReceiptView as Us}from"./SessionObserveEvidence-BRBGKAgd.js";import{M as Vs}from"./message-circle-mZCv8tvB.js";import{W as Ks}from"./wrench-DjkoAOQt.js";import{E as Js}from"./external-link-Dp_a2vRZ.js";import{C as Qe}from"./chevron-down-wciXnOQz.js";import{c as Ys}from"./createLucideIcon-DezKXSG2.js";const Xs=[["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"}]],Zs=Ys("tag",Xs),we=new Set(["bash","shell","terminal","exec","run","command","exec_command","shell_command","local_shell","container_exec","container.exec"]);function I(e){return(e??"").trim()}function q(e){return[e.kind,I(e.tool),I(e.arg),I(e.text),I(e.detail)].join("|")}function Qs(e){if(e.kind!=="tool"||!e.tool||e.result)return!1;const s=I(e.arg).toLowerCase();return s==="started"||s.length>0&&s!=="completed"}function et(e){return e.kind!=="tool"||!e.tool?!1:I(e.arg).toLowerCase()==="completed"||!!e.result?.outcome}const es=/^permission requested · ([A-Za-z][\w-]*)$/i,ss=/^permission ([a-z_]+) · ([A-Za-z][\w-]*)$/i;function Ce(e){return e.kind==="system"&&es.test(e.text.trim())}function Se(e){return e.kind==="system"&&ss.test(e.text.trim())}function de(e){const s=e.text.trim(),n=s.match(es);if(n?.[1])return n[1];const a=s.match(ss);return a?.[2]?a[2]:null}function Zn(e){const s=new Set;for(const n of e)if(Ce(n)){const a=de(n);a&&s.add(a)}else if(Se(n)){const a=de(n);a&&s.delete(a)}return s.size>0}function st(e,s){const n=e.text.trim();return{...e,text:s>1?`${n}
1
+ import{r as h,j as t}from"./index-C1VaWNuD.js";import{f as je}from"./bash-format-BRV5C6Gv.js";import{j as ks,p as Ue,k as ys}from"./tail-display-DcliDVkW.js";import{l as Ns}from"./lane-edit-display-C_Aujldz.js";import{f as ws}from"./lane-tool-detail-0WhMf4Vj.js";import{useLaneToolHoverCard as Cs}from"./LaneToolHoverCard-t7-XJP-h.js";import{e as Ss,L as Oe,g as Ts,h as $s,j as Ae,o as Ls,b as Ie,f as Es,k as Rs,m as ke,l as Ve,a as Ke}from"./lane-observe-vfyACHi0.js";import{b as Ps}from"./lane-ask-display-B6iCAVcd.js";import{d as Os}from"./colors-BtO5_zlx.js";import{a as ye}from"./api-Co9aQ2Jw.js";import{r as Je}from"./mentions-BZ5SBMtc.js";import{a as As,g as Ye,t as Is,b as Bs,d as _s,n as Be}from"./time-Dhsh_2EG.js";import{M as Xe}from"./message-markup-DC0QFEZn.js";import{q as Fs}from"./terminal-takeover-BMeBjBB2.js";import{C as Ds,D as Ms,E as Ws}from"./NewChatComposer-D2Ah4T-W.js";import{u as Ne,I as Ze}from"./Provider-D0bB7q6y.js";import{o as zs}from"./openContent-C6XO6kr5.js";import{O as Hs}from"./ObservedTopologyPanel-CJVqIqQ2.js";import{M as Gs}from"./runtime-picker-C20lTGhV.js";import"./index-Cx6Gbr6n.js";import{ObserveReasoningDisclosure as qs,ObserveStreamCursor as _e}from"./ObserveTextFlow-DCJ5EmD8.js";import{SessionObserveReceiptView as Us}from"./SessionObserveEvidence-BkOezTGV.js";import{M as Vs}from"./message-circle-joGFxfj1.js";import{W as Ks}from"./wrench-BfVeded5.js";import{E as Js}from"./external-link-BvX5PfLh.js";import{C as Qe}from"./chevron-down-D120PY4g.js";import{c as Ys}from"./createLucideIcon-Dv8H8m7J.js";const Xs=[["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"}]],Zs=Ys("tag",Xs),we=new Set(["bash","shell","terminal","exec","run","command","exec_command","shell_command","local_shell","container_exec","container.exec"]);function I(e){return(e??"").trim()}function q(e){return[e.kind,I(e.tool),I(e.arg),I(e.text),I(e.detail)].join("|")}function Qs(e){if(e.kind!=="tool"||!e.tool||e.result)return!1;const s=I(e.arg).toLowerCase();return s==="started"||s.length>0&&s!=="completed"}function et(e){return e.kind!=="tool"||!e.tool?!1:I(e.arg).toLowerCase()==="completed"||!!e.result?.outcome}const es=/^permission requested · ([A-Za-z][\w-]*)$/i,ss=/^permission ([a-z_]+) · ([A-Za-z][\w-]*)$/i;function Ce(e){return e.kind==="system"&&es.test(e.text.trim())}function Se(e){return e.kind==="system"&&ss.test(e.text.trim())}function de(e){const s=e.text.trim(),n=s.match(es);if(n?.[1])return n[1];const a=s.match(ss);return a?.[2]?a[2]:null}function Zn(e){const s=new Set;for(const n of e)if(Ce(n)){const a=de(n);a&&s.add(a)}else if(Se(n)){const a=de(n);a&&s.delete(a)}return s.size>0}function st(e,s){const n=e.text.trim();return{...e,text:s>1?`${n}
2
2
 
3
3
  (${s} reasoning updates)`:n}}function tt(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 nt(e){if(e.kind!=="tool"||!e.tool)return!1;const s=I(e.tool).toLowerCase();if(!we.has(s))return!1;const n=I(e.arg);return n.length>0&&n!=="started"&&n!=="completed"}function at(e){if(e.kind!=="tool")return!1;const s=I(e.tool).toLowerCase();return s==="res"?!!(I(e.arg)||(e.stream?.length??0)>0):we.has(s)?(e.stream?.length??0)>0:!1}function rt(e){return(e.stream?.length??0)>0?e.stream.join(`
@@ -1 +1 @@
1
- import{j as s}from"./index-DvLtl7rV.js";function n(e){return e?e.length>18?`${e.slice(0,8)}...${e.slice(-6)}`:e:"no session"}function l({source:e,fidelity:r,sessionId:t,evidence:i}){return s.jsxs("div",{className:"s-observe-embed-status","data-tone":i.tone,children:[s.jsx("span",{className:"s-observe-embed-status-source",children:e}),s.jsx("span",{children:r}),s.jsx("span",{title:t??void 0,children:n(t)}),s.jsx("span",{children:i.eventCountLabel}),i.tone==="live"&&s.jsx("span",{className:"s-observe-embed-status-live",children:"Live"})]})}function o({events:e}){return s.jsxs("section",{className:"s-observe-receipt-view","aria-label":"Session setup receipts",children:[s.jsxs("div",{className:"s-observe-receipt-view-copy",children:[s.jsx("strong",{children:"No observed trace activity"}),s.jsx("span",{children:"These broker lifecycle records confirm setup only."})]}),e.length>0&&s.jsx("ul",{className:"s-observe-receipt-list",children:e.map(r=>s.jsxs("li",{className:"s-observe-receipt",children:[s.jsx("span",{children:r.text}),r.detail&&s.jsx("small",{children:r.detail})]},r.id))})]})}export{l as SessionObserveEmbedStatus,o as SessionObserveReceiptView};
1
+ import{j as s}from"./index-C1VaWNuD.js";function n(e){return e?e.length>18?`${e.slice(0,8)}...${e.slice(-6)}`:e:"no session"}function l({source:e,fidelity:r,sessionId:t,evidence:i}){return s.jsxs("div",{className:"s-observe-embed-status","data-tone":i.tone,children:[s.jsx("span",{className:"s-observe-embed-status-source",children:e}),s.jsx("span",{children:r}),s.jsx("span",{title:t??void 0,children:n(t)}),s.jsx("span",{children:i.eventCountLabel}),i.tone==="live"&&s.jsx("span",{className:"s-observe-embed-status-live",children:"Live"})]})}function o({events:e}){return s.jsxs("section",{className:"s-observe-receipt-view","aria-label":"Session setup receipts",children:[s.jsxs("div",{className:"s-observe-receipt-view-copy",children:[s.jsx("strong",{children:"No observed trace activity"}),s.jsx("span",{children:"These broker lifecycle records confirm setup only."})]}),e.length>0&&s.jsx("ul",{className:"s-observe-receipt-list",children:e.map(r=>s.jsxs("li",{className:"s-observe-receipt",children:[s.jsx("span",{children:r.text}),r.detail&&s.jsx("small",{children:r.detail})]},r.id))})]})}export{l as SessionObserveEmbedStatus,o as SessionObserveReceiptView};
@@ -0,0 +1 @@
1
+ import{r as c,j as e}from"./index-C1VaWNuD.js";import{a as g}from"./api-Co9aQ2Jw.js";import{u as k}from"./sse-B29iGBnw.js";import{u as I}from"./tail-events-LK29oCKm.js";import{B as N}from"./BackToPicker-BHicJyfc.js";import{ConversationScreen as S}from"./ConversationScreen-DIU7m_aC.js";import{S as R,a as y}from"./SessionObserve-BVeTkcIl.js";import{c as w,a as E,b as T,s as u}from"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./ConversationComposer-BUIjWMBi.js";import"./AgentAvatar-Dz79iTxB.js";import"./Provider-D0bB7q6y.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./CrewAvatar-CZ_faQ_s.js";import"./zap-Bcja1lHG.js";import"./message-markup-DC0QFEZn.js";import"./mentions-BZ5SBMtc.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./openContent-C6XO6kr5.js";import"./eye-C9cGk5z6.js";import"./terminal-UDy4lzV1.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Bt2RBj93.js";import"./AstronautSuit-CwB4Dw07.js";import"./ConversationFeedRows-Bx0gFyG_.js";import"./ConversationPanels-o6W-cOoU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CPoX8iV2.js";import"./proxy-DVDRhSRR.js";import"./activity-CzTJ-YMX.js";import"./message-circle-joGFxfj1.js";import"./ConversationStatus-CTYOywFh.js";import"./check-Dz2SRHft.js";import"./sparkles-D0vWLTyC.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-t7-XJP-h.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-CJVqIqQ2.js";import"./ObserveTextFlow-DCJ5EmD8.js";import"./SessionObserveEvidence-BkOezTGV.js";import"./wrench-BfVeded5.js";import"./external-link-BvX5PfLh.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 C(r){return r.startsWith("native:process:")}function x(r){const[o,t]=c.useState(()=>({sessionRef:r,lookup:null,loading:!0,error:null})),n=c.useRef(null),m=c.useRef(null);m.current||(m.current=w(l=>g(`/api/session-ref/${encodeURIComponent(l)}`),({sessionRef:l,result:a})=>{if(a.ok){t({sessionRef:l,lookup:a.lookup,loading:!1,error:null});return}t({sessionRef:l,lookup:null,loading:!1,error:a.error instanceof Error?a.error.message:String(a.error)})}));const s=c.useCallback(async()=>{await m.current.request(r)},[r]);c.useEffect(()=>(t({sessionRef:r,lookup:null,loading:!0,error:null}),s(),()=>{m.current?.invalidate(),n.current&&(clearTimeout(n.current),n.current=null)}),[s,r]);const{lookup:i,loading:d,error:p}=E(o,r),f=c.useCallback(()=>{n.current||(n.current=setTimeout(()=>{n.current=null,s()},1e3))},[s]);return k(l=>{const a=[r,i?.refId,i?.kind==="conversation"?i.conversationId:null,i?.session?.agentId,i?.kind==="observe"?i.observe.agentId:null,i?.kind==="observe"?i.observe.sessionId:null];T(l,a)&&f()}),I(l=>{const a=v(l.sessionId),j=v(r),h=i?.kind==="observe"?v(i.observe.sessionId??i.observe.refId):"",b=i?.kind==="observe"?v(i.observe.data.metadata?.session?.externalSessionId):"";!u(a,j)&&(!h||!u(a,h))&&(!b||!u(a,b))||f()}),c.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),{lookup:i,loading:d,error:p}}function ls({sessionRef:r}){const{lookup:o,loading:t,error:n}=x(r);return o?.kind==="observe"?e.jsx(y,{data:o.observe.data,agentId:o.observe.agentId??o.session?.agentId??void 0,sessionId:o.observe.sessionId??o.observe.refId,surface:"context",observeSource:o.observe.source,observeFidelity:o.observe.fidelity}):e.jsx("aside",{className:"s-observe-rail s-observe-rail--context",children:e.jsxs("div",{children:[e.jsx("div",{className:"s-observe-rail-label",children:o?.kind==="conversation"?"Conversation":"Session context"}),e.jsx("div",{className:"s-observe-empty",children:t?"Resolving session reference":n?"Session context unavailable":"No observe context captured for this session"})]})})}function cs({sessionRef:r,navigate:o,renderBeforeContent:t,showObserveRail:n=!0,onLookup:m}){const{lookup:s,loading:i,error:d}=x(r);if(c.useEffect(()=>{s&&m?.(s)},[s,m]),s?.kind==="conversation")return e.jsxs(e.Fragment,{children:[t?.(s),e.jsx(S,{conversationId:s.conversationId,navigate:o})]});if(s?.kind==="observe")return e.jsxs(e.Fragment,{children:[t?.(s),e.jsx(R,{data:s.observe.data,agentId:s.observe.agentId??s.session?.agentId??void 0,sessionId:s.observe.sessionId??s.observe.refId,conversationId:s.session?.id??null,showRail:n,observeSource:s.observe.source,observeFidelity:s.observe.fidelity})]});if(i)return e.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:e.jsx("section",{className:"s-thread-overview",children:e.jsxs("div",{className:"s-thread-overview-copy",children:[e.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[e.jsx("h2",{className:"s-page-title",children:"Session"}),e.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),e.jsxs("p",{className:"s-thread-overview-summary s-session-ref-loading",children:[e.jsx("span",{className:"s-session-ref-loading-dot"}),e.jsx("span",{className:"s-session-ref-loading-dot"}),e.jsx("span",{className:"s-session-ref-loading-dot"}),"Resolving session reference"]})]})})});const p=C(r);return e.jsx("div",{className:"s-sessions-screen s-inbox-thread-redesign",children:e.jsx("section",{className:"s-thread-overview",children:e.jsxs("div",{className:"s-thread-overview-copy",children:[e.jsxs("div",{className:"s-sessions-header s-thread-overview-heading",children:[e.jsx("h2",{className:"s-page-title",children:p?"Process trace unavailable":"Session not found"}),e.jsx("span",{className:"s-meta s-tabular",children:r.slice(0,8)})]}),e.jsx("p",{className:"s-thread-overview-summary",children:p?"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&&e.jsx("p",{className:"s-session-ref-error-detail",children:d}),e.jsx("div",{className:"s-session-ref-nav-hint",children:e.jsx(N,{slot:"sessions",fallback:{view:"sessions"},navigate:o})})]})})})}export{ls as SessionRefContextRail,cs as SessionRefScreen};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-C1VaWNuD.js";import{RawSessionsTable as t}from"./RawSessionsTable-CzGhEdiZ.js";/* empty css */import"./DataTable-C6aMSilS.js";/* empty css */import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./time-Dhsh_2EG.js";import"./tail-events-LK29oCKm.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";function U({navigate:o}){return r.jsx(t,{navigate:o})}export{U as SessionsScreen};
@@ -1,3 +1,3 @@
1
- import{w as X,l as je,n as ye,C as se,r as c,q as fe,j as e,u as te,a5 as Se,v as Ne}from"./index-DvLtl7rV.js";import{a as we,h as ke}from"./router-B9vQkNJL.js";import{a as W}from"./api-Co9aQ2Jw.js";import{g as Ce,a as Ae,e as Ee,s as Te,b as Re,d as Oe,c as $e}from"./credentials-BTce3VP1.js";import{u as J,n as Ie,v as Pe,w as Le,x as Me}from"./Provider-CtXJeLrP.js";import{t as De}from"./time-Dhsh_2EG.js";import{j as _e,k as Ve,l as ze}from"./scout-voice-BVUqGhth.js";import{u as He}from"./keyboard-nav-BLYDhL3Z.js";import{C as Q}from"./CrewAvatar-BwXjyg8N.js";import{C as Fe}from"./CastPicker-_5E5hNUe.js";import{p as ae}from"./AgentAvatar-6-KBVKUu.js";import{S as ne}from"./SpriteAvatar-z5hHesx9.js";import{VoiceHostStatusBanner as Be,VoicePermissionsPanel as Ue}from"./VoicePermissionsPanel-CgQ6GGS-.js";import{u as Ke}from"./chunk-HRAB3GC3-Tyv9rzx7.js";import{C as V}from"./check-ofKUE8yH.js";import{c as ee}from"./createLucideIcon-DezKXSG2.js";import{R as We}from"./refresh-cw-DMxGzDwn.js";import{C as qe}from"./copy-CWWAJ75H.js";import{b as Ge}from"./DocumentFocusViewer-Do3wQ_3Z.js";import{S as Ye}from"./sparkles-CETYrxGA.js";const Xe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ze=ee("monitor",Xe);const Qe=[["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"}]],Je=ee("moon",Qe);const es=[["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"}]],ss=ee("sun",es);function ts(a){const[s,n]=c.useState(0),i=c.useRef([]);return c.useEffect(()=>{if(a<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const u=()=>{i.current.push(window.setTimeout(()=>{n(1),i.current.push(window.setTimeout(()=>n(2),40)),i.current.push(window.setTimeout(()=>n(1),90)),i.current.push(window.setTimeout(()=>{n(0),u()},130))},2600+Math.random()*4200))};u();const h=i.current;return()=>{h.forEach(v=>window.clearTimeout(v)),h.length=0}},[a]),a<3?0:s}function as({slug:a,open:s=!1,onToggle:n,coin:i=56,figure:u=240,hue:h,state:v="idle",interactive:p=!0,className:y,style:d,children:o}){const t=a.toLowerCase(),l=se[t]??se.milo,g=je[t],w=X.find(_=>_.slug===t)??X[0],O=ts(g?g.roles.length+1:1),x=g&&O>0?ye[O]?.role:void 0,[S,A,P]=l.coin,f=i/P,I=u*l.w/l.h,E=u/l.h,L=s?I:i,R=s?u:i,z=s?I:l.w*f,H=s?u:l.h*f,D=s?0:-S*f,r=s?0:-A*f,b=c.useMemo(()=>fe(h??null,l.ink),[h,l.ink]),M=g?g.patch[2]*(s?E:f):0,F=g?g.patch[3]*(s?E:f):0,G=g?(s?0:D)+g.patch[0]*(s?E:f):0,Y=g?(s?0:r)+g.patch[1]*(s?E:f):0;return e.jsxs("div",{className:`xc-stage-wrapper ${y||""}`,style:d,"data-open":s?"true":"false",children:[e.jsxs("div",{className:"xc-stage",role:p?"button":void 0,tabIndex:p?0:void 0,"aria-label":`${w.name} (${s?"Full body breakout":"Coin disc"})`,onClick:p?n:void 0,onKeyDown:p&&n?_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),n())}:void 0,style:{width:L,height:R,borderRadius:s?"16px":"50%"},children:[e.jsx("span",{className:"xc-stage-ground",style:{background:b,opacity:s?.92:1,borderRadius:s?"16px":"50%"}}),e.jsx("img",{src:te(`${t}-bust.webp`),alt:w.name,className:"xc-stage-img",style:{width:z,height:H,left:D,top:r}}),g&&x&&e.jsx("img",{src:te(`${g.dir}/${x}.webp`),alt:"",className:"xc-stage-patch",style:{width:M,height:F,left:G,top:Y}})]}),o]})}const ns=[195,125,300,45,355,210];function is(a){return`oklch(0.80 0.14 ${a})`}function j({label:a,right:s}){return e.jsxs("div",{className:"s-settings-section-rule",children:[e.jsx("span",{className:"s-settings-section-label",children:a}),e.jsx("span",{className:"s-settings-section-line"}),s&&e.jsx("span",{className:"s-settings-section-right",children:s})]})}function k({label:a,hint:s,children:n}){return e.jsxs("div",{className:"s-settings-field",children:[e.jsx("label",{className:"s-settings-field-label",children:a}),n,s&&e.jsx("span",{className:"s-settings-field-hint",children:s})]})}function B({value:a,onChange:s,mono:n}){return e.jsx("input",{className:`s-settings-input${n?" s-settings-input--mono":""}`,value:a,onChange:i=>s(i.target.value)})}function ie({value:a,onChange:s,rows:n=3}){return e.jsx("textarea",{className:"s-settings-textarea",value:a,onChange:i=>s(i.target.value),rows:n})}function ls({value:a,onChange:s,min:n,max:i,step:u=1,unit:h=""}){return e.jsxs("div",{className:"s-settings-slider-wrap",children:[e.jsx("input",{type:"range",min:n,max:i,step:u,value:a,onChange:v=>s(Number(v.target.value))}),e.jsxs("span",{className:"s-settings-slider-value",children:[a," ",h]})]})}function U({value:a,onChange:s,options:n,stacked:i,columns:u}){return e.jsx("div",{className:i?"s-settings-option-stacked":"s-settings-option-grid",style:i?void 0:{gridTemplateColumns:`repeat(${u??n.length}, 1fr)`},children:n.map(h=>e.jsxs("button",{className:`s-settings-option-btn${a===h.id?" s-settings-option-btn--active":""}`,onClick:()=>s(h.id),children:[e.jsx("span",{className:"s-settings-option-label",children:h.label}),e.jsx("span",{className:"s-settings-option-sub",children:h.sub})]},h.id))})}const rs=[{id:"system",label:"System",sub:"Follow this device",icon:Ze},{id:"light",label:"Light",sub:"Bright workspace",icon:ss},{id:"dark",label:"Dark",sub:"Low-light workspace",icon:Je}],os=[{id:"scout",label:"Scout",sub:"Control-room navigation"},{id:"slack",label:"Slack",sub:"Workspace rail and channel-style lists"}],le=[{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"}],re=[{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"}],oe=[{id:"soft",label:"Soft",sub:"Quiet separators"},{id:"balanced",label:"Defined",sub:"Clear structure"},{id:"strong",label:"Strong",sub:"High separation"}],ce=[{id:"theme",label:"Theme"},{id:"lime",label:"Lime"},{id:"cyan",label:"Cyan"},{id:"violet",label:"Violet"},{id:"amber",label:"Amber"}],cs=[{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"}],de=cs,ue=[{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"}],ds=["milo","vex","sprout"];function Z({className:a,theme:s,template:n,palette:i,contrast:u,accent:h,children:v}){return e.jsx("div",{className:a,"data-scout-theme":s,"data-scout-theme-mode":s,"data-scout-palette":i,"data-scout-contrast":u,"data-scout-accent":h,"data-hudson-theme":s,"data-hudson-template":n,children:v})}function us({palette:a,theme:s,template:n}){return e.jsxs(Z,{className:"s-settings-palette-sample",theme:s,template:n,palette:a,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 hs({theme:a,template:s,palette:n,contrast:i,accent:u}){return e.jsxs(Z,{className:"s-settings-live-preview",theme:a,template:s,palette:n,contrast:i,accent:u,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 ms(){const a=Ke(),{appearanceDetails:s,updateAppearanceDetails:n}=J();if(!a)return e.jsx("div",{className:"s-settings-inline-note",children:"Theme controls are unavailable in this embedded surface."});const i=a.resolvedTheme??"dark",u=Se(a.template)??"hudson",h=le.find(t=>t.id===s.palette)?.label??"Scout",v=re.find(t=>t.id===u)?.label??"Rounded",p=oe.find(t=>t.id===s.contrast)?.label??"Defined",y=ce.find(t=>t.id===s.accent)?.label??"Theme",d=de.find(t=>t.id===s.avatarStyle)?.label??"Generative",o=ue.find(t=>t.id===s.avatarSize)?.label??"Regular";return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"App layout",right:`currently ${s.shell}`}),e.jsx("div",{className:"s-settings-shell-grid",role:"group","aria-label":"App layout",children:os.map(t=>{const l=s.shell===t.id;return e.jsxs("button",{type:"button",className:"s-settings-shell-choice","data-shell":t.id,"data-active":l||void 0,"aria-pressed":l,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}),l?e.jsx(V,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub})]})]},t.id)})}),e.jsx(j,{label:"Color mode",right:`currently ${i}`}),e.jsx("div",{className:"s-settings-theme-mode-grid",role:"group","aria-label":"Color mode",children:rs.map(t=>{const l=t.icon,g=a.theme===t.id,w=t.id==="system"?`Follow this device · resolves to ${a.resolvedTheme??"…"}`:t.sub;return e.jsxs("button",{type:"button",className:"s-settings-theme-mode","data-active":g||void 0,"aria-pressed":g,onClick:()=>a.setTheme(t.id),children:[e.jsx(l,{size:18,strokeWidth:1.7,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:t.label}),e.jsx("small",{children:w})]}),g?e.jsx(V,{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(j,{label:"Color theme",right:`currently ${h.toLowerCase()}`}),e.jsx("div",{className:"s-settings-palette-grid",role:"group","aria-label":"Color theme",children:le.map(t=>{const l=s.palette===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({palette:t.id}),children:[e.jsx(us,{palette:t.id,theme:i,template:u}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{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(j,{label:"Interface shape",right:`currently ${v.toLowerCase()}`}),e.jsx("div",{className:"s-settings-interface-grid",role:"group","aria-label":"Interface shape",children:re.map(t=>{const l=u===t.id;return e.jsxs("button",{type:"button",className:"s-settings-interface-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>a.setTemplate(t.id),children:[e.jsx(Z,{className:"s-settings-shape-sample",theme:i,template:t.id,palette:s.palette,contrast:s.contrast,accent:s.accent,children:e.jsx("i",{children:e.jsx("i",{})})}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{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(j,{label:"Separation",right:`currently ${p.toLowerCase()}`}),e.jsx("div",{className:"s-settings-contrast-grid",role:"group","aria-label":"Interface contrast",children:oe.map(t=>{const l=s.contrast===t.id;return e.jsxs("button",{type:"button",className:"s-settings-contrast-choice","data-active":l||void 0,"aria-pressed":l,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(j,{label:"Signal accent",right:`currently ${y.toLowerCase()}`}),e.jsx("div",{className:"s-settings-accent-row",role:"group","aria-label":"Signal accent",children:ce.map(t=>{const l=s.accent===t.id;return e.jsxs("button",{type:"button",className:"s-settings-accent-choice","data-accent-option":t.id,"data-active":l||void 0,"aria-pressed":l,"aria-label":`${t.label} accent`,onClick:()=>n({accent:t.id}),children:[e.jsx(Z,{className:"s-settings-accent-dot",theme:i,template:u,palette:s.palette,contrast:s.contrast,accent:t.id,children:e.jsx("i",{})}),e.jsx("span",{children:t.label}),l?e.jsx(V,{size:13,"aria-hidden":!0}):null]},t.id)})}),e.jsx(j,{label:"Avatar system",right:`currently ${d.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-grid",role:"group","aria-label":"Avatar system",children:de.map(t=>{const l=s.avatarStyle===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice s-settings-avatar-choice","data-active":l||void 0,"aria-pressed":l,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(ne,{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}),l?e.jsx(V,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsxs("span",{children:[t.spec,(()=>{const g=Ne(t.id);return g?` · ${g.covered} of ${g.total} cast`:" · every agent"})()]})]})]},t.id)})}),e.jsx(j,{label:"Avatar size",right:`currently ${o.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-size-row",role:"group","aria-label":"Avatar size",children:ue.map(t=>{const l=s.avatarSize===t.id,g=ae("row",t.id)??24;return e.jsxs("button",{type:"button",className:"s-settings-avatar-size-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({avatarSize:t.id}),children:[e.jsx("span",{className:"s-settings-avatar-size-sample","aria-hidden":!0,children:ds.map(w=>s.avatarStyle==="sprite"?e.jsx(ne,{name:w,size:g},w):e.jsx(Q,{slug:w,size:g,chip:s.avatarStyle==="chip",ring:!1,badge:!1},w))}),e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(V,{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:`${g}PX ROW · ${ae("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(j,{label:"Live specimen",right:i}),e.jsx(hs,{theme:i,template:u,palette:s.palette,contrast:s.contrast,accent:s.accent}),e.jsxs("dl",{className:"s-settings-theme-readout",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Palette"}),e.jsx("dd",{children:h})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Shape"}),e.jsx("dd",{children:v})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Separation"}),e.jsx("dd",{children:p})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Accent"}),e.jsx("dd",{children:y})]})]}),e.jsx("p",{className:"s-settings-preview-note",children:"Each control changes one visual axis. Success, warning, and failure colors keep their meaning."})]})]})]})}function gs({profile:a,update:s}){const{appearanceDetails:n,updateAppearanceDetails:i}=J(),[u,h]=c.useState(n.operatorCharacter||"milo"),v=u,[p,y]=c.useState(!0),d=X.find(t=>t.slug.toLowerCase()===v.toLowerCase())??X[0],o=t=>{h(t),i({operatorCharacter:t})};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Operator Character Stage",right:"cast mascot & identity"}),e.jsxs("div",{className:"s-settings-stage-hero-card","data-open":p?"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:p?"FULL FIGURE BREAKOUT":"COIN DISC FRAMING"})]}),e.jsx("button",{type:"button",className:"s-settings-stage-toggle-btn",onClick:()=>y(t=>!t),title:p?"Collapse to coin framing":"Break out to full body figure",children:p?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(Ye,{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(as,{slug:v,open:p,onToggle:()=>y(t=>!t),coin:64,figure:256,state:"working"}),e.jsx("span",{className:"s-settings-stage-click-hint",children:p?"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:a.name||"Operator"}),e.jsxs("span",{children:[a.handle||"@you"," · ",a.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:ns.map(t=>e.jsx("button",{type:"button",onClick:()=>s({hue:t}),className:`s-settings-hue-dot${a.hue===t?" s-settings-hue-dot--active":""}`,style:{background:is(t)},title:`Hue ${t}°`},t))})]})]})]})]})]}),e.jsxs(e.Fragment,{children:[e.jsx(j,{label:"Your character mascot",right:`currently ${d.name.toLowerCase()}`}),e.jsx("div",{className:"s-settings-cast-grid-wrap",children:e.jsx(Fe,{selectedSlug:v,onSelect:o})})]}),e.jsx(k,{label:"Display name",hint:"Shown when agents address you.",children:e.jsx(B,{value:a.name,onChange:t=>s({name:t})})}),e.jsx(k,{label:"Handle",hint:"Used in @mentions across threads.",children:e.jsx(B,{value:a.handle,onChange:t=>s({handle:t}),mono:!0})}),e.jsx(k,{label:"Pronouns",children:e.jsx(B,{value:a.pronouns,onChange:t=>s({pronouns:t})})}),e.jsx(j,{label:"How agents understand you",right:"shipped as system prompt context"}),e.jsx(k,{label:"Operator bio",hint:"How you want to be worked with. Agents read this before asking you things.",children:e.jsx(ie,{value:a.bio,onChange:t=>s({bio:t}),rows:4})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Timezone",children:e.jsx(B,{value:a.timezone,onChange:t=>s({timezone:t}),mono:!0})}),e.jsx(k,{label:"Working hours",children:e.jsx(B,{value:a.workingHours,onChange:t=>s({workingHours:t}),mono:!0})})]}),e.jsx(j,{label:"Ephemeral agent names",right:"rotation pool for one-off agents"}),e.jsx(k,{label:"Name pool",hint:a.provisionalAgentNames.length>0?`${a.provisionalAgentNamesResolvedCount} names active (${a.provisionalAgentNamesSource}). Preview: ${a.provisionalAgentNamesPreview.join(", ")}${a.provisionalAgentNamesResolvedCount>a.provisionalAgentNamesPreview.length?", …":""}`:"Leave empty to use Scout's built-in rotation. One short name per line.",children:e.jsx(ie,{value:a.provisionalAgentNames.join(`
2
- `),onChange:t=>s({provisionalAgentNames:t.split(/\r?\n/u).map(l=>l.trim()).filter(Boolean)}),rows:6})}),e.jsx(k,{label:"Pool mode",hint:"Replace uses only your list. Add to defaults prepends yours, then Scout's built-in names.",children:e.jsx(U,{value:a.provisionalAgentNamesMode,onChange:t=>s({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 ps({profile:a,update:s}){return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Interrupt policy"}),e.jsx(k,{label:"When agents can ping you directly",hint:"Blocking-only means only asks that truly stall work. Others get batched.",children:e.jsx(U,{value:a.interruptThreshold,onChange:n=>s({interruptThreshold:n}),options:[{id:"always",label:"Always",sub:"any ask, any time"},{id:"blocking-only",label:"Blocking only",sub:"stuck agents · default"},{id:"batched",label:"Batched",sub:"grouped every 15m"},{id:"never",label:"Never",sub:"queue only, I'll check in"}]})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Batch window (min)",children:e.jsx(ls,{value:a.batchWindow,min:5,max:60,step:5,onChange:n=>s({batchWindow:n}),unit:"min"})}),e.jsx(k,{label:"Quiet hours",children:e.jsx(B,{value:a.quietHours,onChange:n=>s({quietHours:n}),mono:!0})})]}),e.jsx(j,{label:"Where to reach you"}),e.jsx(k,{label:"Preferred channel",children:e.jsx(U,{value:a.channel,onChange:n=>s({channel:n}),options:[{id:"here",label:"Here only",sub:"desktop app"},{id:"mobile",label:"Mobile only",sub:"paired phone"},{id:"here+mobile",label:"Both",sub:"whichever is active"}]})}),e.jsx(j,{label:"Tone calibration",right:"how agents write to you"}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Verbosity",children:e.jsx(U,{stacked:!0,value:a.verbosity,onChange:n=>s({verbosity:n}),options:[{id:"terse",label:"Terse",sub:"one-liners, answers only"},{id:"normal",label:"Normal",sub:"context + answer"},{id:"detailed",label:"Detailed",sub:"show reasoning"}]})}),e.jsx(k,{label:"Tone",children:e.jsx(U,{stacked:!0,value:a.tone,onChange:n=>s({tone:n}),options:[{id:"direct",label:"Direct",sub:"no hedging"},{id:"warm",label:"Warm",sub:"friendly, conversational"},{id:"formal",label:"Formal",sub:"business-like"}]})})]})]})}function bs({clientCredentials:a,serverCredentials:s,reloadCredentials:n}){const[i,u]=c.useState(""),[h,v]=c.useState(!1),[p,y]=c.useState(null),d=s?.openai??null,o=!!d?.configured,t=d?.source==="env"?"OPENAI_API_KEY":d?.source==="local-config"?"local Scout config":d?.source==="local-store"?"local OpenScout store":"missing",l=d?.source==="local-store"&&a?.configured?"local OpenScout store + HudVault mirror":t,g=d?.preview??a?.preview??null,w=async()=>{v(!0),y(null);try{const x=i.trim();await Te(x);let S=null;try{await Re(x)}catch(A){S=A instanceof Error?A.message:"HudVault save failed."}u(""),await n(),y(S?`Saved to local OpenScout store. Browser mirror failed: ${S}`:"Saved to local OpenScout store and Hudson Vault.")}catch(x){y(x instanceof Error?x.message:"Could not save key.")}finally{v(!1)}},O=async()=>{v(!0),y(null);try{const[x,S]=await Promise.allSettled([Oe(),$e()]);u(""),await n(),x.status==="rejected"||S.status==="rejected"?y("Cleared what I could; one credential store did not respond."):y(d?.source==="env"||d?.source==="local-config"?"Removed saved key. Server fallback is still configured.":"Removed saved key.")}catch(x){y(x instanceof Error?x.message:"Could not clear key.")}finally{v(!1)}};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Model providers",right:o?`configured · ${l}`:"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:o?"var(--green)":"var(--dim)"},children:["●"," ",o?"ready":"missing"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[g??"No key stored"," · ",l]}),e.jsx("div",{className:"s-settings-relay-desc",children:"Scout stores user-entered keys in the local OpenScout credential store and keeps a HudVault mirror for this browser profile."})]})}),e.jsx(k,{label:"OpenAI API key",hint:"Saved locally. Existing keys are never shown again.",children:e.jsx("input",{className:"s-settings-input s-settings-input--mono",type:"password",value:i,placeholder:o?"Saved key configured":"sk-...",autoComplete:"off",spellCheck:!1,onChange:x=>u(x.target.value)})}),p&&e.jsx("div",{className:"s-settings-field-hint",children:p}),e.jsxs("div",{className:"s-settings-button-row",children:[e.jsx("button",{type:"button",className:"s-btn",disabled:h||!i.trim(),onClick:()=>{w()},children:h?"Saving":"Save key"}),e.jsx("button",{type:"button",className:"s-btn",disabled:h||!(a?.configured||d?.source==="local-store"),onClick:()=>{O()},children:"Clear saved key"})]})]})}const vs=[{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 xs(){const a=ke(Ie,!0),[s,n]=c.useState(null),[i,u]=c.useState(null),[h,v]=c.useState([]),[p,y]=c.useState([]),[d,o]=c.useState(!0),[t,l]=c.useState(!1),[g,w]=c.useState(!1),[O,x]=c.useState(null),S=c.useCallback(async()=>{o(!0);try{const[r,b,M]=await Promise.all([_e(),Ve(12).catch(()=>[]),Pe().catch(()=>null)]);n(r.settings),v(r.devices),y(b),u(M),x(null)}catch(r){x(r instanceof Error?r.message:String(r))}finally{o(!1)}},[]);c.useEffect(()=>{S()},[S]);const A=c.useCallback(async r=>{l(!0),x(null);try{const b=await ze(r);n(b.settings),v(b.devices)}catch(b){x(b instanceof Error?b.message:String(b))}finally{l(!1)}},[]),P=c.useCallback(async r=>{w(!0),x(null);try{const b=await Le(r);u(b),Me(b)}catch(b){x(b instanceof Error?b.message:String(b))}finally{w(!1)}},[]);if(d&&!s)return e.jsx("div",{className:"s-settings-field-hint",children:"Loading voice settings…"});const f=s?.inputDeviceId??h.find(r=>r.isDefault)?.id??"",I=s?.permissions?.find(r=>r.kind==="microphone")??null,E=s?.permissions?.find(r=>r.kind==="speechRecognition")??null,L=(s?.permissions?.length??0)>0||h.length>0,R=a&&i?.enabled===!0,z=g||!a||!i||i.locked,H=a?i?i.locked?`Controlled by OPENSCOUT_REALTIME_VOICE_ENABLED · ${i.enabled?"on":"off"}`:R?"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.",D=[L?null:"Scout voice host is offline. Launch Scout Menu on this Mac — the browser does not capture audio.",I?.status==="denied"||I?.status==="restricted"?I?.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.":I?.canRequest?"Microphone has not been requested yet. Request access or tap the mic in chat to show the macOS prompt.":null,!E?.granted&&(E?.status==="denied"||E?.status==="restricted")?E?.status==="restricted"?"Speech recognition is restricted on this Mac.":"Speech recognition is off for Scout Menu. Open Privacy & Security → Speech Recognition to change it.":null,s?.modelReady?null:"Parakeet may download on first use. Apple Speech stays available while the model warms.","Dictation requires Scout Menu running. The browser does not capture audio.","If transcription hangs on Processing, wait up to 60 seconds or tap the mic again to cancel."].filter(r=>!!r);return e.jsxs("div",{className:"s-settings-col-gap",children:[O&&e.jsx("div",{className:"s-settings-field-hint",style:{color:"var(--amber)"},children:O}),e.jsx(j,{label:"Realtime conversation",right:"operator control"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":R||void 0,"data-unavailable":!a||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:H})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":R,"aria-label":"Enable live voice on this Scout",disabled:z,"data-checked":R||void 0,className:"s-settings-switch",onClick:()=>{P(!R)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:R?"On":"Off"})]})]}),e.jsx(Be,{hostOnline:L,micPermission:I,speechPermission:E,modelReady:s?.modelReady}),e.jsx(j,{label:"Scout Menu permissions",right:"voice host"}),e.jsx(Ue,{permissions:s?.permissions,hostOnline:L,disabled:t||d,onError:r=>x(r),onRefresh:S}),e.jsx(j,{label:"Transcription"}),e.jsx(k,{label:"Engine",hint:s?.modelReady?"Parakeet is warm and ready.":s?.modelInstalled?"Parakeet is installed; first dictation may warm the model.":"Parakeet downloads on first use. Apple Speech stays available meanwhile.",children:e.jsx(U,{value:s?.preference??"auto",onChange:r=>{n(b=>b&&{...b,preference:r}),A({preference:r})},options:vs,columns:3})}),e.jsx(k,{label:"Microphone input",hint:"Scout Menu uses the macOS system default input unless you pick a device here. The browser never captures audio.",children:h.length>0?e.jsx("select",{className:"s-settings-input",value:f,disabled:t,onChange:r=>{const b=r.target.value||null;n(M=>M&&{...M,inputDeviceId:b,inputDeviceName:h.find(F=>F.id===b)?.name??null}),A({inputDeviceId:b})},children:h.map(r=>e.jsxs("option",{value:r.id,children:[r.name,r.isDefault?" (system default)":""]},r.id))}):e.jsx("div",{className:"s-settings-field-hint",children:"Scout Menu is not reporting microphones. Launch Scout Menu, grant mic access, then refresh."})}),e.jsx(j,{label:"Diagnostics"}),e.jsx("ul",{className:"s-settings-field-hint",style:{margin:0,paddingLeft:"1.1rem",display:"grid",gap:"0.35rem"},children:D.map(r=>e.jsx("li",{children:r},r))}),e.jsx(j,{label:"Recent sessions",right:p.length?`${p.length} shown`:"none"}),p.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:p.map(r=>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:[r.status," · ",r.lastEvent??"started"]}),e.jsxs("div",{className:"s-settings-device-meta",children:[r.surface," · ",De(r.updatedAt),r.error?` · ${r.error}`:""]}),r.lastTranscript?e.jsx("div",{className:"s-settings-field-hint",style:{marginTop:"0.2rem"},children:r.lastTranscript.length>96?`${r.lastTranscript.slice(0,96)}…`:r.lastTranscript}):null]})},r.sessionId))}),e.jsx("div",{className:"s-settings-button-row",children:e.jsx("button",{type:"button",className:"s-btn",disabled:d||t,onClick:()=>{S()},children:d?"Refreshing…":"Refresh"})})]})}const js={desktop:"◻",mobile:"▯",tablet:"▭"};function ys({device:a}){const s=a.status==="this-device"?"var(--accent)":a.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:js[a.kind]??"□"}),e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-device-name",children:a.name}),e.jsxs("div",{className:"s-settings-device-meta",children:[a.kind," · via ",a.relay," · ",a.lastSeen]})]}),e.jsxs("span",{className:"s-settings-device-status",style:{color:s},children:["●"," ",a.status==="this-device"?"this device":a.status]}),e.jsx("button",{className:"s-btn",disabled:a.status==="this-device",children:a.status==="this-device"?"—":"Unpair"})]})}function fs({pairing:a}){const s=[{id:"local",name:"This machine",kind:"desktop",status:"this-device",relay:"local",lastSeen:"now"}];if(a?.trustedPeers)for(const n of a.trustedPeers){const i=n.fingerprint===a.connectedPeerFingerprint;s.push({id:n.fingerprint,name:n.name??"Paired device",kind:"mobile",status:i?"online":"offline",relay:"tailscale",lastSeen:n.lastSeenLabel??"—"})}return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:`Paired devices · ${s.length}`}),e.jsx("div",{className:"s-settings-col-gap",style:{gap:10},children:s.map(n=>e.jsx(ys,{device:n},n.id))}),e.jsx(j,{label:"Relay"}),e.jsxs("div",{className:"s-settings-relay-card",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"s-settings-relay-title",children:["Relay · ",e.jsxs("span",{className:"s-settings-device-status",style:{color:a?.isRunning?"var(--green)":"var(--dim)"},children:["●"," ",a?.isRunning?"connected":"offline"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[a?.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 q(a,s,n=!1){if(!a&&!s)return"Not reported";const i=a||"detached";return s?`${i} @ ${s}${n?" (modified)":""}`:i}function ge(){return navigator.userAgentData?.platform||navigator.platform||"Unknown"}function C({label:a,value:s,detail:n}){return e.jsxs("div",{className:"s-settings-about-fact",children:[e.jsx("dt",{children:a}),e.jsxs("dd",{children:[e.jsx("code",{children:s}),n?e.jsx("span",{children:n}):null]})]})}function he(a){const{build:s,mesh:n}=a,i=n?.health.build??null,u=n?.localNode?n.nodes[n.localNode.id]?.host:void 0,h=ge();return["OpenScout troubleshooting report",`Collected: ${a.collectedAt.toISOString()}`,"","[Web]",`Observed: ${a.buildCollectedAt?.toISOString()??"unknown"}`,`Version: ${s?.version??"unknown"}`,`Mode: ${s?.mode??"unknown"}`,`Source: ${q(s?.branch,s?.commit,s?.dirty===!0)}`,`Server: ${s?.server?`${s.server.engine} ${s.server.engineVersion}`:"unknown"}`,`Server platform: ${s?.server?`${s.server.platform}/${s.server.arch}`:"unknown"}`,"","[Broker]",`Observed: ${a.meshCollectedAt?.toISOString()??"unknown"}`,`Reachable: ${n?.health.reachable===void 0?"unknown":n.health.reachable?"yes":"no"}`,`Healthy: ${n?.health.ok===void 0?"unknown":n.health.ok?"yes":"no"}`,`Error: ${n?.health.error??"none reported"}`,`Package: ${i?.packageName??"unknown"}`,`Version: ${i?.version??"unknown"}`,`Mode: ${i?.mode??"unknown"}`,`Source: ${q(i?.branch,i?.commit)}`,`Build: ${i?.buildNumber??i?.buildId??"not reported"}`,`Node: ${n?.health.nodeId??"unknown"}`,`Broker URL: ${n?.brokerUrl??"unknown"}`,"","[Host]",`Name: ${n?.localNode?.name??"unknown"}`,`Scout version: ${u?.scoutVersion??"not reported"}`,`System: ${u?.os??"unknown"}`,`Architecture: ${u?.arch??s?.server?.arch??"unknown"}`,"","[Browser]",`Platform: ${h}`,`User agent: ${navigator.userAgent}`,`Origin: ${window.location.origin}`].join(`
3
- `)}async function Ss(a){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(a);return}const s=document.createElement("textarea");s.value=a,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select();const n=document.execCommand("copy");if(s.remove(),!n)throw new Error("Clipboard access is unavailable")}function Ns(){const[a,s]=c.useState(null),[n,i]=c.useState(!0),[u,h]=c.useState(null),[v,p]=c.useState("idle"),y=c.useCallback(async(x=!1)=>{i(!0),h(null),p("idle");const[S,A]=await Promise.allSettled([W(x?"/api/build?refresh=1":"/api/build"),W("/api/mesh")]),P=new Date;if(s(f=>({build:S.status==="fulfilled"?S.value:f?.build??null,mesh:A.status==="fulfilled"?A.value:f?.mesh??null,collectedAt:P,buildCollectedAt:S.status==="fulfilled"?P:f?.buildCollectedAt??null,meshCollectedAt:A.status==="fulfilled"?P:f?.meshCollectedAt??null})),S.status==="rejected"||A.status==="rejected"){const f=[S.status==="rejected"?"web build":null,A.status==="rejected"?"broker":null].filter(Boolean).join(" and ");h(`Could not refresh ${f} details. Last reported values are kept when available.`)}i(!1)},[]);c.useEffect(()=>{y()},[y]);const d=a?.build??null,o=a?.mesh??null,t=o?.health.build??null,l=o?.localNode?o.nodes[o.localNode.id]?.host:void 0,g=ge(),w=o===null?"not reported":o.health.reachable?o.health.ok?"healthy":"degraded":"unreachable",O=c.useCallback(()=>{a&&Ss(he(a)).then(()=>{p("copied"),setTimeout(()=>p("idle"),1800)}).catch(()=>{p("error")})},[a]);return n&&!a?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"," · ",q(d?.branch,d?.commit,d?.dirty===!0)]}),e.jsxs("span",{className:"s-settings-about-collected",children:["Snapshot collected ",a?.collectedAt.toLocaleString()??"—"]})]}),e.jsxs("div",{className:"s-settings-about-actions",children:[e.jsxs("button",{type:"button",className:"s-btn",onClick:()=>{y(!0)},disabled:n,children:[e.jsx(We,{size:13,"aria-hidden":!0}),n?"Refreshing…":"Refresh"]}),e.jsxs("button",{type:"button",className:"s-btn s-settings-about-copy",onClick:O,disabled:!a,children:[v==="copied"?e.jsx(V,{size:13,"aria-hidden":!0}):e.jsx(qe,{size:13,"aria-hidden":!0}),v==="copied"?"Copied report":v==="error"?"Copy failed":"Copy report"]})]})]}),u?e.jsx("div",{className:"s-settings-about-warning",role:"status",children:u}):null,v==="error"&&a?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:he(a),"aria-label":"OpenScout troubleshooting report"})]}):null,e.jsx(j,{label:"Web application",right:"release and source identity"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Package version",value:d?.version??"Unknown",detail:`Observed ${a?.buildCollectedAt?.toLocaleString()??"at an unknown time"}. Use this when comparing releases.`}),e.jsx(C,{label:"Run mode",value:d?.mode??"Unknown"}),e.jsx(C,{label:"Source checkout",value:q(d?.branch,d?.commit,d?.dirty===!0),detail:"A dev SHA identifies the running checkout; it is not the release version."}),e.jsx(C,{label:"Server engine",value:d?.server?`${d.server.engine} ${d.server.engineVersion}`:"Not reported",detail:d?.server?`Node compatibility ${d.server.nodeVersion} · ${d.server.platform}/${d.server.arch}`:void 0})]}),e.jsx(j,{label:"Broker",right:w}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Status",value:w,detail:[`Observed ${a?.meshCollectedAt?.toLocaleString()??"at an unknown time"}.`,o?.health.error].filter(Boolean).join(" ")}),e.jsx(C,{label:"Package",value:t?.packageName??"Not reported"}),e.jsx(C,{label:"Version",value:t?.version??"Not reported"}),e.jsx(C,{label:"Source",value:q(t?.branch,t?.commit)}),e.jsx(C,{label:"Build",value:t?.buildNumber??t?.buildId??"Not reported"}),e.jsx(C,{label:"Node",value:o?.health.nodeId??"Not reported",detail:o?.brokerUrl})]}),e.jsx(j,{label:"Host and browser",right:"troubleshooting context"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Host",value:o?.localNode?.name??"Not reported"}),e.jsx(C,{label:"Host Scout",value:l?.scoutVersion??"Not reported"}),e.jsx(C,{label:"Host system",value:[l?.os,l?.arch??d?.server?.arch].filter(Boolean).join(" · ")||"Not reported"}),e.jsx(C,{label:"Browser platform",value:g}),e.jsx(C,{label:"Browser",value:navigator.userAgent}),e.jsx(C,{label:"Page origin",value:window.location.origin})]}),e.jsx("p",{className:"s-settings-about-note",children:"Native app and CLI versions are shown only when those components report them. Scout does not infer a version from a nearby checkout."})]})}const K=[{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 · 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"}],me={appearance:"Appearance",operator:"Operator identity",comms:"Communication",voice:"Voice",credentials:"Credentials",devices:"Paired devices",about:"About OpenScout"},ws={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."},ks={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:a,onClose:s,section:n,onSectionChange:i,presentation:u}){const{refreshOnboarding:h}=J(),{ref:v,onKeyDown:p}=He(a&&u==="drawer"),[y,d]=c.useState("appearance"),o=n??y,t=c.useCallback(m=>{i?i(m):d(m)},[i]),[l,g]=c.useState(ks),[w,O]=c.useState(null),[x,S]=c.useState(null),[A,P]=c.useState(null),[f,I]=c.useState(!1),[E,L]=c.useState("saved"),R=c.useRef(null),z=c.useRef(!0),H=c.useRef(null);c.useEffect(()=>()=>{z.current=!1},[]);const D=c.useCallback(async()=>{const[m,$]=await Promise.allSettled([Ce(),Ae()]),T=m.status==="fulfilled"?m.value:null;let N=$.status==="fulfilled"?$.value:null;T?.configured&&!N?.openai.configured&&(N=await Ee().catch(()=>N)),S(T),P(N)},[]),r=c.useCallback(async()=>{try{const m=W("/api/user"),$=Promise.race([W("/api/pairing-state"),new Promise((Cs,xe)=>setTimeout(()=>xe(new Error("timeout")),3e3))]),[T,N]=await Promise.allSettled([m,$]);T.status==="fulfilled"&&g(T.value),N.status==="fulfilled"&&O(N.value),await D()}finally{I(!0)}},[D]);c.useEffect(()=>{a&&o!=="appearance"&&o!=="about"&&!f&&r()},[f,a,r,o]),c.useEffect(()=>{if(!a||!window.matchMedia("(max-width: 760px)").matches)return;const m=window.requestAnimationFrame(()=>{H.current?.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>window.cancelAnimationFrame(m)},[a,o]);const b=c.useCallback(m=>{const T=(K.findIndex(N=>N.id===o)+m+K.length)%K.length;t(K[T].id)},[o]),M=c.useCallback(m=>{if(p(m),u==="drawer"&&m.key==="Escape"){m.preventDefault(),s();return}m.target?.closest(".s-settings-rail")&&(m.key==="ArrowDown"?(m.preventDefault(),b(1)):m.key==="ArrowUp"&&(m.preventDefault(),b(-1)))},[b,s,p,u]),F=c.useCallback(m=>{R.current&&clearTimeout(R.current),L("saving"),R.current=setTimeout(()=>{W("/api/user",{method:"POST",body:JSON.stringify(m)}).then(()=>h()).then(()=>{z.current&&L("saved")}).catch(()=>{z.current&&L("error")})},400)},[h]),G=c.useCallback(m=>{g($=>{const T={...$,...m};return F(T),T})},[F]),Y=e.jsx("nav",{className:"s-settings-rail","aria-label":"Settings pages",children:K.map(m=>{const $=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-settings-rail-label",children:m.label}),e.jsx("span",{className:"s-settings-rail-sub",children:m.sub})]}),T=`s-settings-rail-btn${o===m.id?" s-settings-rail-btn--active":""}`;return u==="page"?e.jsx("a",{ref:o===m.id?N=>{H.current=N}:void 0,href:we({view:"settings",section:m.id}),"aria-current":o===m.id?"page":void 0,className:T,onClick:N=>{N.button!==0||N.metaKey||N.ctrlKey||N.shiftKey||N.altKey||(N.preventDefault(),t(m.id))},children:$},m.id):e.jsx("button",{ref:o===m.id?N=>{H.current=N}:void 0,onClick:()=>t(m.id),"aria-current":o===m.id?"page":void 0,className:T,children:$},m.id)})}),_=e.jsx("main",{className:"s-settings-content",id:`settings-${o}`,"data-settings-section":o,tabIndex:-1,children:o==="appearance"?e.jsx(ms,{}):o==="about"?e.jsx(Ns,{}):f?e.jsxs(e.Fragment,{children:[o==="operator"&&e.jsx(gs,{profile:l,update:G}),o==="comms"&&e.jsx(ps,{profile:l,update:G}),o==="credentials"&&e.jsx(bs,{clientCredentials:x,serverCredentials:A,reloadCredentials:D}),o==="voice"&&e.jsx(xs,{}),o==="devices"&&e.jsx(fs,{pairing:w})]}):e.jsx("div",{className:"s-settings-loading",children:"Loading settings…"})});return u==="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:me[o]}),e.jsx("p",{children:ws[o]})]}),o==="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":E,role:"status","aria-live":"polite",children:[e.jsx("span",{"aria-hidden":"true"}),E==="saving"?"Saving changes…":E==="error"?"Couldn’t save changes":"Saved automatically"]})]}),e.jsxs("div",{className:"s-settings-page-layout",children:[Y,_]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`s-settings-scrim ${a?"s-settings-scrim--open":"s-settings-scrim--closed"}`,onClick:s}),e.jsxs("div",{ref:v,role:"dialog","aria-modal":"true","aria-label":"Settings",className:`s-settings-drawer ${a?"s-settings-drawer--open":"s-settings-drawer--closed"}`,onKeyDown:M,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:me[o]}),e.jsx("span",{style:{flex:1}}),e.jsx("span",{className:"s-settings-header-hint",children:"ESC to close"}),e.jsx("button",{className:"s-settings-close",onClick:s,children:"×"})]}),Y,_,e.jsxs("div",{className:"s-settings-footer",children:[e.jsxs("span",{className:"s-settings-footer-sync",children:["●"," synced"]}),e.jsx("span",{children:"·"}),e.jsx("span",{children:"changes apply instantly to every agent in your fleet"}),e.jsx("span",{style:{flex:1}}),e.jsx("button",{className:"s-btn",onClick:s,children:"Done"})]})]})]})}function be(a){return e.jsx(pe,{...a,presentation:"drawer"})}function ve({section:a="appearance",onSectionChange:s}){return e.jsx(pe,{open:!0,onClose:()=>{},section:a,onSectionChange:s,presentation:"page"})}const qs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"})),Gs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"}));export{ve as S,qs as a,Gs as b};
1
+ import{w as X,l as je,n as ye,C as se,r as c,q as fe,j as e,u as te,a5 as Se,v as Ne}from"./index-C1VaWNuD.js";import{a as we,h as ke}from"./router-kfcaYqZr.js";import{a as W}from"./api-Co9aQ2Jw.js";import{g as Ce,a as Ae,e as Ee,s as Te,b as Re,d as Oe,c as $e}from"./credentials-BTce3VP1.js";import{u as J,N as Ie,V as Pe,W as Le,X as Me}from"./Provider-D0bB7q6y.js";import{t as De}from"./time-Dhsh_2EG.js";import{j as Ve,k as _e,l as ze}from"./scout-voice-Cg1qfepC.js";import{u as He}from"./keyboard-nav-B8sQ_8IF.js";import{C as Q}from"./CrewAvatar-CZ_faQ_s.js";import{C as Fe}from"./CastPicker-CkgTalIt.js";import{p as ae}from"./AgentAvatar-Dz79iTxB.js";import{S as ne}from"./SpriteAvatar-DFO4Kb4Z.js";import{VoiceHostStatusBanner as Be,VoicePermissionsPanel as Ue}from"./VoicePermissionsPanel-C4vkU-sU.js";import{u as Ke}from"./chunk-HRAB3GC3-KjjrTLCU.js";import{C as _}from"./check-Dz2SRHft.js";import{c as ee}from"./createLucideIcon-Dv8H8m7J.js";import{R as We}from"./refresh-cw-Bkh7Cvnd.js";import{C as qe}from"./copy-BzdzWsQd.js";import{b as Ge}from"./DocumentFocusViewer-D8iB6SMt.js";import{S as Ye}from"./sparkles-D0vWLTyC.js";const Xe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ze=ee("monitor",Xe);const Qe=[["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"}]],Je=ee("moon",Qe);const es=[["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"}]],ss=ee("sun",es);function ts(a){const[s,n]=c.useState(0),i=c.useRef([]);return c.useEffect(()=>{if(a<3||typeof window>"u"||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const u=()=>{i.current.push(window.setTimeout(()=>{n(1),i.current.push(window.setTimeout(()=>n(2),40)),i.current.push(window.setTimeout(()=>n(1),90)),i.current.push(window.setTimeout(()=>{n(0),u()},130))},2600+Math.random()*4200))};u();const h=i.current;return()=>{h.forEach(v=>window.clearTimeout(v)),h.length=0}},[a]),a<3?0:s}function as({slug:a,open:s=!1,onToggle:n,coin:i=56,figure:u=240,hue:h,state:v="idle",interactive:p=!0,className:y,style:d,children:o}){const t=a.toLowerCase(),l=se[t]??se.milo,g=je[t],w=X.find(V=>V.slug===t)??X[0],O=ts(g?g.roles.length+1:1),x=g&&O>0?ye[O]?.role:void 0,[S,A,P]=l.coin,f=i/P,I=u*l.w/l.h,E=u/l.h,L=s?I:i,R=s?u:i,z=s?I:l.w*f,H=s?u:l.h*f,D=s?0:-S*f,r=s?0:-A*f,b=c.useMemo(()=>fe(h??null,l.ink),[h,l.ink]),M=g?g.patch[2]*(s?E:f):0,F=g?g.patch[3]*(s?E:f):0,G=g?(s?0:D)+g.patch[0]*(s?E:f):0,Y=g?(s?0:r)+g.patch[1]*(s?E:f):0;return e.jsxs("div",{className:`xc-stage-wrapper ${y||""}`,style:d,"data-open":s?"true":"false",children:[e.jsxs("div",{className:"xc-stage",role:p?"button":void 0,tabIndex:p?0:void 0,"aria-label":`${w.name} (${s?"Full body breakout":"Coin disc"})`,onClick:p?n:void 0,onKeyDown:p&&n?V=>{(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),n())}:void 0,style:{width:L,height:R,borderRadius:s?"16px":"50%"},children:[e.jsx("span",{className:"xc-stage-ground",style:{background:b,opacity:s?.92:1,borderRadius:s?"16px":"50%"}}),e.jsx("img",{src:te(`${t}-bust.webp`),alt:w.name,className:"xc-stage-img",style:{width:z,height:H,left:D,top:r}}),g&&x&&e.jsx("img",{src:te(`${g.dir}/${x}.webp`),alt:"",className:"xc-stage-patch",style:{width:M,height:F,left:G,top:Y}})]}),o]})}const ns=[195,125,300,45,355,210];function is(a){return`oklch(0.80 0.14 ${a})`}function j({label:a,right:s}){return e.jsxs("div",{className:"s-settings-section-rule",children:[e.jsx("span",{className:"s-settings-section-label",children:a}),e.jsx("span",{className:"s-settings-section-line"}),s&&e.jsx("span",{className:"s-settings-section-right",children:s})]})}function k({label:a,hint:s,children:n}){return e.jsxs("div",{className:"s-settings-field",children:[e.jsx("label",{className:"s-settings-field-label",children:a}),n,s&&e.jsx("span",{className:"s-settings-field-hint",children:s})]})}function B({value:a,onChange:s,mono:n}){return e.jsx("input",{className:`s-settings-input${n?" s-settings-input--mono":""}`,value:a,onChange:i=>s(i.target.value)})}function ie({value:a,onChange:s,rows:n=3}){return e.jsx("textarea",{className:"s-settings-textarea",value:a,onChange:i=>s(i.target.value),rows:n})}function ls({value:a,onChange:s,min:n,max:i,step:u=1,unit:h=""}){return e.jsxs("div",{className:"s-settings-slider-wrap",children:[e.jsx("input",{type:"range",min:n,max:i,step:u,value:a,onChange:v=>s(Number(v.target.value))}),e.jsxs("span",{className:"s-settings-slider-value",children:[a," ",h]})]})}function U({value:a,onChange:s,options:n,stacked:i,columns:u}){return e.jsx("div",{className:i?"s-settings-option-stacked":"s-settings-option-grid",style:i?void 0:{gridTemplateColumns:`repeat(${u??n.length}, 1fr)`},children:n.map(h=>e.jsxs("button",{className:`s-settings-option-btn${a===h.id?" s-settings-option-btn--active":""}`,onClick:()=>s(h.id),children:[e.jsx("span",{className:"s-settings-option-label",children:h.label}),e.jsx("span",{className:"s-settings-option-sub",children:h.sub})]},h.id))})}const rs=[{id:"system",label:"System",sub:"Follow this device",icon:Ze},{id:"light",label:"Light",sub:"Bright workspace",icon:ss},{id:"dark",label:"Dark",sub:"Low-light workspace",icon:Je}],os=[{id:"scout",label:"Scout",sub:"Control-room navigation"},{id:"slack",label:"Slack",sub:"Workspace rail and channel-style lists"}],le=[{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"}],re=[{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"}],oe=[{id:"soft",label:"Soft",sub:"Quiet separators"},{id:"balanced",label:"Defined",sub:"Clear structure"},{id:"strong",label:"Strong",sub:"High separation"}],ce=[{id:"theme",label:"Theme"},{id:"lime",label:"Lime"},{id:"cyan",label:"Cyan"},{id:"violet",label:"Violet"},{id:"amber",label:"Amber"}],cs=[{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"}],de=cs,ue=[{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"}],ds=["milo","vex","sprout"];function Z({className:a,theme:s,template:n,palette:i,contrast:u,accent:h,children:v}){return e.jsx("div",{className:a,"data-scout-theme":s,"data-scout-theme-mode":s,"data-scout-palette":i,"data-scout-contrast":u,"data-scout-accent":h,"data-hudson-theme":s,"data-hudson-template":n,children:v})}function us({palette:a,theme:s,template:n}){return e.jsxs(Z,{className:"s-settings-palette-sample",theme:s,template:n,palette:a,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 hs({theme:a,template:s,palette:n,contrast:i,accent:u}){return e.jsxs(Z,{className:"s-settings-live-preview",theme:a,template:s,palette:n,contrast:i,accent:u,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 ms(){const a=Ke(),{appearanceDetails:s,updateAppearanceDetails:n}=J();if(!a)return e.jsx("div",{className:"s-settings-inline-note",children:"Theme controls are unavailable in this embedded surface."});const i=a.resolvedTheme??"dark",u=Se(a.template)??"hudson",h=le.find(t=>t.id===s.palette)?.label??"Scout",v=re.find(t=>t.id===u)?.label??"Rounded",p=oe.find(t=>t.id===s.contrast)?.label??"Defined",y=ce.find(t=>t.id===s.accent)?.label??"Theme",d=de.find(t=>t.id===s.avatarStyle)?.label??"Generative",o=ue.find(t=>t.id===s.avatarSize)?.label??"Regular";return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"App layout",right:`currently ${s.shell}`}),e.jsx("div",{className:"s-settings-shell-grid",role:"group","aria-label":"App layout",children:os.map(t=>{const l=s.shell===t.id;return e.jsxs("button",{type:"button",className:"s-settings-shell-choice","data-shell":t.id,"data-active":l||void 0,"aria-pressed":l,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}),l?e.jsx(_,{className:"s-settings-theme-check",size:15,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub})]})]},t.id)})}),e.jsx(j,{label:"Color mode",right:`currently ${i}`}),e.jsx("div",{className:"s-settings-theme-mode-grid",role:"group","aria-label":"Color mode",children:rs.map(t=>{const l=t.icon,g=a.theme===t.id,w=t.id==="system"?`Follow this device · resolves to ${a.resolvedTheme??"…"}`:t.sub;return e.jsxs("button",{type:"button",className:"s-settings-theme-mode","data-active":g||void 0,"aria-pressed":g,onClick:()=>a.setTheme(t.id),children:[e.jsx(l,{size:18,strokeWidth:1.7,"aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("strong",{children:t.label}),e.jsx("small",{children:w})]}),g?e.jsx(_,{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(j,{label:"Color theme",right:`currently ${h.toLowerCase()}`}),e.jsx("div",{className:"s-settings-palette-grid",role:"group","aria-label":"Color theme",children:le.map(t=>{const l=s.palette===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({palette:t.id}),children:[e.jsx(us,{palette:t.id,theme:i,template:u}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(_,{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(j,{label:"Interface shape",right:`currently ${v.toLowerCase()}`}),e.jsx("div",{className:"s-settings-interface-grid",role:"group","aria-label":"Interface shape",children:re.map(t=>{const l=u===t.id;return e.jsxs("button",{type:"button",className:"s-settings-interface-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>a.setTemplate(t.id),children:[e.jsx(Z,{className:"s-settings-shape-sample",theme:i,template:t.id,palette:s.palette,contrast:s.contrast,accent:s.accent,children:e.jsx("i",{children:e.jsx("i",{})})}),e.jsxs("span",{className:"s-settings-choice-copy",children:[e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(_,{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(j,{label:"Separation",right:`currently ${p.toLowerCase()}`}),e.jsx("div",{className:"s-settings-contrast-grid",role:"group","aria-label":"Interface contrast",children:oe.map(t=>{const l=s.contrast===t.id;return e.jsxs("button",{type:"button",className:"s-settings-contrast-choice","data-active":l||void 0,"aria-pressed":l,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(j,{label:"Signal accent",right:`currently ${y.toLowerCase()}`}),e.jsx("div",{className:"s-settings-accent-row",role:"group","aria-label":"Signal accent",children:ce.map(t=>{const l=s.accent===t.id;return e.jsxs("button",{type:"button",className:"s-settings-accent-choice","data-accent-option":t.id,"data-active":l||void 0,"aria-pressed":l,"aria-label":`${t.label} accent`,onClick:()=>n({accent:t.id}),children:[e.jsx(Z,{className:"s-settings-accent-dot",theme:i,template:u,palette:s.palette,contrast:s.contrast,accent:t.id,children:e.jsx("i",{})}),e.jsx("span",{children:t.label}),l?e.jsx(_,{size:13,"aria-hidden":!0}):null]},t.id)})}),e.jsx(j,{label:"Avatar system",right:`currently ${d.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-grid",role:"group","aria-label":"Avatar system",children:de.map(t=>{const l=s.avatarStyle===t.id;return e.jsxs("button",{type:"button",className:"s-settings-palette-choice s-settings-avatar-choice","data-active":l||void 0,"aria-pressed":l,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(ne,{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}),l?e.jsx(_,{className:"s-settings-theme-check",size:14,"aria-hidden":!0}):null]}),e.jsx("small",{children:t.sub}),e.jsxs("span",{children:[t.spec,(()=>{const g=Ne(t.id);return g?` · ${g.covered} of ${g.total} cast`:" · every agent"})()]})]})]},t.id)})}),e.jsx(j,{label:"Avatar size",right:`currently ${o.toLowerCase()}`}),e.jsx("div",{className:"s-settings-avatar-size-row",role:"group","aria-label":"Avatar size",children:ue.map(t=>{const l=s.avatarSize===t.id,g=ae("row",t.id)??24;return e.jsxs("button",{type:"button",className:"s-settings-avatar-size-choice","data-active":l||void 0,"aria-pressed":l,onClick:()=>n({avatarSize:t.id}),children:[e.jsx("span",{className:"s-settings-avatar-size-sample","aria-hidden":!0,children:ds.map(w=>s.avatarStyle==="sprite"?e.jsx(ne,{name:w,size:g},w):e.jsx(Q,{slug:w,size:g,chip:s.avatarStyle==="chip",ring:!1,badge:!1},w))}),e.jsxs("span",{className:"s-settings-choice-title",children:[e.jsx("strong",{children:t.label}),l?e.jsx(_,{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:`${g}PX ROW · ${ae("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(j,{label:"Live specimen",right:i}),e.jsx(hs,{theme:i,template:u,palette:s.palette,contrast:s.contrast,accent:s.accent}),e.jsxs("dl",{className:"s-settings-theme-readout",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Palette"}),e.jsx("dd",{children:h})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Shape"}),e.jsx("dd",{children:v})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Separation"}),e.jsx("dd",{children:p})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Accent"}),e.jsx("dd",{children:y})]})]}),e.jsx("p",{className:"s-settings-preview-note",children:"Each control changes one visual axis. Success, warning, and failure colors keep their meaning."})]})]})]})}function gs({profile:a,update:s}){const{appearanceDetails:n,updateAppearanceDetails:i}=J(),[u,h]=c.useState(n.operatorCharacter||"milo"),v=u,[p,y]=c.useState(!0),d=X.find(t=>t.slug.toLowerCase()===v.toLowerCase())??X[0],o=t=>{h(t),i({operatorCharacter:t})};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Operator Character Stage",right:"cast mascot & identity"}),e.jsxs("div",{className:"s-settings-stage-hero-card","data-open":p?"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:p?"FULL FIGURE BREAKOUT":"COIN DISC FRAMING"})]}),e.jsx("button",{type:"button",className:"s-settings-stage-toggle-btn",onClick:()=>y(t=>!t),title:p?"Collapse to coin framing":"Break out to full body figure",children:p?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(Ye,{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(as,{slug:v,open:p,onToggle:()=>y(t=>!t),coin:64,figure:256,state:"working"}),e.jsx("span",{className:"s-settings-stage-click-hint",children:p?"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:a.name||"Operator"}),e.jsxs("span",{children:[a.handle||"@you"," · ",a.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:ns.map(t=>e.jsx("button",{type:"button",onClick:()=>s({hue:t}),className:`s-settings-hue-dot${a.hue===t?" s-settings-hue-dot--active":""}`,style:{background:is(t)},title:`Hue ${t}°`},t))})]})]})]})]})]}),e.jsxs(e.Fragment,{children:[e.jsx(j,{label:"Your character mascot",right:`currently ${d.name.toLowerCase()}`}),e.jsx("div",{className:"s-settings-cast-grid-wrap",children:e.jsx(Fe,{selectedSlug:v,onSelect:o})})]}),e.jsx(k,{label:"Display name",hint:"Shown when agents address you.",children:e.jsx(B,{value:a.name,onChange:t=>s({name:t})})}),e.jsx(k,{label:"Handle",hint:"Used in @mentions across threads.",children:e.jsx(B,{value:a.handle,onChange:t=>s({handle:t}),mono:!0})}),e.jsx(k,{label:"Pronouns",children:e.jsx(B,{value:a.pronouns,onChange:t=>s({pronouns:t})})}),e.jsx(j,{label:"How agents understand you",right:"shipped as system prompt context"}),e.jsx(k,{label:"Operator bio",hint:"How you want to be worked with. Agents read this before asking you things.",children:e.jsx(ie,{value:a.bio,onChange:t=>s({bio:t}),rows:4})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Timezone",children:e.jsx(B,{value:a.timezone,onChange:t=>s({timezone:t}),mono:!0})}),e.jsx(k,{label:"Working hours",children:e.jsx(B,{value:a.workingHours,onChange:t=>s({workingHours:t}),mono:!0})})]}),e.jsx(j,{label:"Ephemeral agent names",right:"rotation pool for one-off agents"}),e.jsx(k,{label:"Name pool",hint:a.provisionalAgentNames.length>0?`${a.provisionalAgentNamesResolvedCount} names active (${a.provisionalAgentNamesSource}). Preview: ${a.provisionalAgentNamesPreview.join(", ")}${a.provisionalAgentNamesResolvedCount>a.provisionalAgentNamesPreview.length?", …":""}`:"Leave empty to use Scout's built-in rotation. One short name per line.",children:e.jsx(ie,{value:a.provisionalAgentNames.join(`
2
+ `),onChange:t=>s({provisionalAgentNames:t.split(/\r?\n/u).map(l=>l.trim()).filter(Boolean)}),rows:6})}),e.jsx(k,{label:"Pool mode",hint:"Replace uses only your list. Add to defaults prepends yours, then Scout's built-in names.",children:e.jsx(U,{value:a.provisionalAgentNamesMode,onChange:t=>s({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 ps({profile:a,update:s}){return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Interrupt policy"}),e.jsx(k,{label:"When agents can ping you directly",hint:"Blocking-only means only asks that truly stall work. Others get batched.",children:e.jsx(U,{value:a.interruptThreshold,onChange:n=>s({interruptThreshold:n}),options:[{id:"always",label:"Always",sub:"any ask, any time"},{id:"blocking-only",label:"Blocking only",sub:"stuck agents · default"},{id:"batched",label:"Batched",sub:"grouped every 15m"},{id:"never",label:"Never",sub:"queue only, I'll check in"}]})}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Batch window (min)",children:e.jsx(ls,{value:a.batchWindow,min:5,max:60,step:5,onChange:n=>s({batchWindow:n}),unit:"min"})}),e.jsx(k,{label:"Quiet hours",children:e.jsx(B,{value:a.quietHours,onChange:n=>s({quietHours:n}),mono:!0})})]}),e.jsx(j,{label:"Where to reach you"}),e.jsx(k,{label:"Preferred channel",children:e.jsx(U,{value:a.channel,onChange:n=>s({channel:n}),options:[{id:"here",label:"Here only",sub:"desktop app"},{id:"mobile",label:"Mobile only",sub:"paired phone"},{id:"here+mobile",label:"Both",sub:"whichever is active"}]})}),e.jsx(j,{label:"Tone calibration",right:"how agents write to you"}),e.jsxs("div",{className:"s-settings-two-col",children:[e.jsx(k,{label:"Verbosity",children:e.jsx(U,{stacked:!0,value:a.verbosity,onChange:n=>s({verbosity:n}),options:[{id:"terse",label:"Terse",sub:"one-liners, answers only"},{id:"normal",label:"Normal",sub:"context + answer"},{id:"detailed",label:"Detailed",sub:"show reasoning"}]})}),e.jsx(k,{label:"Tone",children:e.jsx(U,{stacked:!0,value:a.tone,onChange:n=>s({tone:n}),options:[{id:"direct",label:"Direct",sub:"no hedging"},{id:"warm",label:"Warm",sub:"friendly, conversational"},{id:"formal",label:"Formal",sub:"business-like"}]})})]})]})}function bs({clientCredentials:a,serverCredentials:s,reloadCredentials:n}){const[i,u]=c.useState(""),[h,v]=c.useState(!1),[p,y]=c.useState(null),d=s?.openai??null,o=!!d?.configured,t=d?.source==="env"?"OPENAI_API_KEY":d?.source==="local-config"?"local Scout config":d?.source==="local-store"?"local OpenScout store":"missing",l=d?.source==="local-store"&&a?.configured?"local OpenScout store + HudVault mirror":t,g=d?.preview??a?.preview??null,w=async()=>{v(!0),y(null);try{const x=i.trim();await Te(x);let S=null;try{await Re(x)}catch(A){S=A instanceof Error?A.message:"HudVault save failed."}u(""),await n(),y(S?`Saved to local OpenScout store. Browser mirror failed: ${S}`:"Saved to local OpenScout store and Hudson Vault.")}catch(x){y(x instanceof Error?x.message:"Could not save key.")}finally{v(!1)}},O=async()=>{v(!0),y(null);try{const[x,S]=await Promise.allSettled([Oe(),$e()]);u(""),await n(),x.status==="rejected"||S.status==="rejected"?y("Cleared what I could; one credential store did not respond."):y(d?.source==="env"||d?.source==="local-config"?"Removed saved key. Server fallback is still configured.":"Removed saved key.")}catch(x){y(x instanceof Error?x.message:"Could not clear key.")}finally{v(!1)}};return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:"Model providers",right:o?`configured · ${l}`:"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:o?"var(--green)":"var(--dim)"},children:["●"," ",o?"ready":"missing"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[g??"No key stored"," · ",l]}),e.jsx("div",{className:"s-settings-relay-desc",children:"Scout stores user-entered keys in the local OpenScout credential store and keeps a HudVault mirror for this browser profile."})]})}),e.jsx(k,{label:"OpenAI API key",hint:"Saved locally. Existing keys are never shown again.",children:e.jsx("input",{className:"s-settings-input s-settings-input--mono",type:"password",value:i,placeholder:o?"Saved key configured":"sk-...",autoComplete:"off",spellCheck:!1,onChange:x=>u(x.target.value)})}),p&&e.jsx("div",{className:"s-settings-field-hint",children:p}),e.jsxs("div",{className:"s-settings-button-row",children:[e.jsx("button",{type:"button",className:"s-btn",disabled:h||!i.trim(),onClick:()=>{w()},children:h?"Saving":"Save key"}),e.jsx("button",{type:"button",className:"s-btn",disabled:h||!(a?.configured||d?.source==="local-store"),onClick:()=>{O()},children:"Clear saved key"})]})]})}const vs=[{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 xs(){const a=ke(Ie,!0),[s,n]=c.useState(null),[i,u]=c.useState(null),[h,v]=c.useState([]),[p,y]=c.useState([]),[d,o]=c.useState(!0),[t,l]=c.useState(!1),[g,w]=c.useState(!1),[O,x]=c.useState(null),S=c.useCallback(async()=>{o(!0);try{const[r,b,M]=await Promise.all([Ve(),_e(12).catch(()=>[]),Pe().catch(()=>null)]);n(r.settings),v(r.devices),y(b),u(M),x(null)}catch(r){x(r instanceof Error?r.message:String(r))}finally{o(!1)}},[]);c.useEffect(()=>{S()},[S]);const A=c.useCallback(async r=>{l(!0),x(null);try{const b=await ze(r);n(b.settings),v(b.devices)}catch(b){x(b instanceof Error?b.message:String(b))}finally{l(!1)}},[]),P=c.useCallback(async r=>{w(!0),x(null);try{const b=await Le(r);u(b),Me(b)}catch(b){x(b instanceof Error?b.message:String(b))}finally{w(!1)}},[]);if(d&&!s)return e.jsx("div",{className:"s-settings-field-hint",children:"Loading voice settings…"});const f=s?.inputDeviceId??h.find(r=>r.isDefault)?.id??"",I=s?.permissions?.find(r=>r.kind==="microphone")??null,E=s?.permissions?.find(r=>r.kind==="speechRecognition")??null,L=(s?.permissions?.length??0)>0||h.length>0,R=a&&i?.enabled===!0,z=g||!a||!i||i.locked,H=a?i?i.locked?`Controlled by OPENSCOUT_REALTIME_VOICE_ENABLED · ${i.enabled?"on":"off"}`:R?"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.",D=[L?null:"Scout voice host is offline. Launch Scout Menu on this Mac — the browser does not capture audio.",I?.status==="denied"||I?.status==="restricted"?I?.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.":I?.canRequest?"Microphone has not been requested yet. Request access or tap the mic in chat to show the macOS prompt.":null,!E?.granted&&(E?.status==="denied"||E?.status==="restricted")?E?.status==="restricted"?"Speech recognition is restricted on this Mac.":"Speech recognition is off for Scout Menu. Open Privacy & Security → Speech Recognition to change it.":null,s?.modelReady?null:"Parakeet may download on first use. Apple Speech stays available while the model warms.","Dictation requires Scout Menu running. The browser does not capture audio.","If transcription hangs on Processing, wait up to 60 seconds or tap the mic again to cancel."].filter(r=>!!r);return e.jsxs("div",{className:"s-settings-col-gap",children:[O&&e.jsx("div",{className:"s-settings-field-hint",style:{color:"var(--amber)"},children:O}),e.jsx(j,{label:"Realtime conversation",right:"operator control"}),e.jsxs("div",{className:"s-settings-realtime-voice","data-enabled":R||void 0,"data-unavailable":!a||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:H})]}),e.jsxs("button",{type:"button",role:"switch","aria-checked":R,"aria-label":"Enable live voice on this Scout",disabled:z,"data-checked":R||void 0,className:"s-settings-switch",onClick:()=>{P(!R)},children:[e.jsx("span",{className:"s-settings-switch-thumb","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:R?"On":"Off"})]})]}),e.jsx(Be,{hostOnline:L,micPermission:I,speechPermission:E,modelReady:s?.modelReady}),e.jsx(j,{label:"Scout Menu permissions",right:"voice host"}),e.jsx(Ue,{permissions:s?.permissions,hostOnline:L,disabled:t||d,onError:r=>x(r),onRefresh:S}),e.jsx(j,{label:"Transcription"}),e.jsx(k,{label:"Engine",hint:s?.modelReady?"Parakeet is warm and ready.":s?.modelInstalled?"Parakeet is installed; first dictation may warm the model.":"Parakeet downloads on first use. Apple Speech stays available meanwhile.",children:e.jsx(U,{value:s?.preference??"auto",onChange:r=>{n(b=>b&&{...b,preference:r}),A({preference:r})},options:vs,columns:3})}),e.jsx(k,{label:"Microphone input",hint:"Scout Menu uses the macOS system default input unless you pick a device here. The browser never captures audio.",children:h.length>0?e.jsx("select",{className:"s-settings-input",value:f,disabled:t,onChange:r=>{const b=r.target.value||null;n(M=>M&&{...M,inputDeviceId:b,inputDeviceName:h.find(F=>F.id===b)?.name??null}),A({inputDeviceId:b})},children:h.map(r=>e.jsxs("option",{value:r.id,children:[r.name,r.isDefault?" (system default)":""]},r.id))}):e.jsx("div",{className:"s-settings-field-hint",children:"Scout Menu is not reporting microphones. Launch Scout Menu, grant mic access, then refresh."})}),e.jsx(j,{label:"Diagnostics"}),e.jsx("ul",{className:"s-settings-field-hint",style:{margin:0,paddingLeft:"1.1rem",display:"grid",gap:"0.35rem"},children:D.map(r=>e.jsx("li",{children:r},r))}),e.jsx(j,{label:"Recent sessions",right:p.length?`${p.length} shown`:"none"}),p.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:p.map(r=>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:[r.status," · ",r.lastEvent??"started"]}),e.jsxs("div",{className:"s-settings-device-meta",children:[r.surface," · ",De(r.updatedAt),r.error?` · ${r.error}`:""]}),r.lastTranscript?e.jsx("div",{className:"s-settings-field-hint",style:{marginTop:"0.2rem"},children:r.lastTranscript.length>96?`${r.lastTranscript.slice(0,96)}…`:r.lastTranscript}):null]})},r.sessionId))}),e.jsx("div",{className:"s-settings-button-row",children:e.jsx("button",{type:"button",className:"s-btn",disabled:d||t,onClick:()=>{S()},children:d?"Refreshing…":"Refresh"})})]})}const js={desktop:"◻",mobile:"▯",tablet:"▭"};function ys({device:a}){const s=a.status==="this-device"?"var(--accent)":a.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:js[a.kind]??"□"}),e.jsxs("div",{children:[e.jsx("div",{className:"s-settings-device-name",children:a.name}),e.jsxs("div",{className:"s-settings-device-meta",children:[a.kind," · via ",a.relay," · ",a.lastSeen]})]}),e.jsxs("span",{className:"s-settings-device-status",style:{color:s},children:["●"," ",a.status==="this-device"?"this device":a.status]}),e.jsx("button",{className:"s-btn",disabled:a.status==="this-device",children:a.status==="this-device"?"—":"Unpair"})]})}function fs({pairing:a}){const s=[{id:"local",name:"This machine",kind:"desktop",status:"this-device",relay:"local",lastSeen:"now"}];if(a?.trustedPeers)for(const n of a.trustedPeers){const i=n.fingerprint===a.connectedPeerFingerprint;s.push({id:n.fingerprint,name:n.name??"Paired device",kind:"mobile",status:i?"online":"offline",relay:"tailscale",lastSeen:n.lastSeenLabel??"—"})}return e.jsxs("div",{className:"s-settings-col-gap",children:[e.jsx(j,{label:`Paired devices · ${s.length}`}),e.jsx("div",{className:"s-settings-col-gap",style:{gap:10},children:s.map(n=>e.jsx(ys,{device:n},n.id))}),e.jsx(j,{label:"Relay"}),e.jsxs("div",{className:"s-settings-relay-card",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"s-settings-relay-title",children:["Relay · ",e.jsxs("span",{className:"s-settings-device-status",style:{color:a?.isRunning?"var(--green)":"var(--dim)"},children:["●"," ",a?.isRunning?"connected":"offline"]})]}),e.jsxs("div",{className:"s-settings-relay-meta",children:[a?.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 q(a,s,n=!1){if(!a&&!s)return"Not reported";const i=a||"detached";return s?`${i} @ ${s}${n?" (modified)":""}`:i}function ge(){return navigator.userAgentData?.platform||navigator.platform||"Unknown"}function C({label:a,value:s,detail:n}){return e.jsxs("div",{className:"s-settings-about-fact",children:[e.jsx("dt",{children:a}),e.jsxs("dd",{children:[e.jsx("code",{children:s}),n?e.jsx("span",{children:n}):null]})]})}function he(a){const{build:s,mesh:n}=a,i=n?.health.build??null,u=n?.localNode?n.nodes[n.localNode.id]?.host:void 0,h=ge();return["OpenScout troubleshooting report",`Collected: ${a.collectedAt.toISOString()}`,"","[Web]",`Observed: ${a.buildCollectedAt?.toISOString()??"unknown"}`,`Version: ${s?.version??"unknown"}`,`Mode: ${s?.mode??"unknown"}`,`Source: ${q(s?.branch,s?.commit,s?.dirty===!0)}`,`Server: ${s?.server?`${s.server.engine} ${s.server.engineVersion}`:"unknown"}`,`Server platform: ${s?.server?`${s.server.platform}/${s.server.arch}`:"unknown"}`,"","[Broker]",`Observed: ${a.meshCollectedAt?.toISOString()??"unknown"}`,`Reachable: ${n?.health.reachable===void 0?"unknown":n.health.reachable?"yes":"no"}`,`Healthy: ${n?.health.ok===void 0?"unknown":n.health.ok?"yes":"no"}`,`Error: ${n?.health.error??"none reported"}`,`Package: ${i?.packageName??"unknown"}`,`Version: ${i?.version??"unknown"}`,`Mode: ${i?.mode??"unknown"}`,`Source: ${q(i?.branch,i?.commit)}`,`Build: ${i?.buildNumber??i?.buildId??"not reported"}`,`Node: ${n?.health.nodeId??"unknown"}`,`Broker URL: ${n?.brokerUrl??"unknown"}`,"","[Host]",`Name: ${n?.localNode?.name??"unknown"}`,`Scout version: ${u?.scoutVersion??"not reported"}`,`System: ${u?.os??"unknown"}`,`Architecture: ${u?.arch??s?.server?.arch??"unknown"}`,"","[Browser]",`Platform: ${h}`,`User agent: ${navigator.userAgent}`,`Origin: ${window.location.origin}`].join(`
3
+ `)}async function Ss(a){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(a);return}const s=document.createElement("textarea");s.value=a,s.setAttribute("readonly",""),s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select();const n=document.execCommand("copy");if(s.remove(),!n)throw new Error("Clipboard access is unavailable")}function Ns(){const[a,s]=c.useState(null),[n,i]=c.useState(!0),[u,h]=c.useState(null),[v,p]=c.useState("idle"),y=c.useCallback(async(x=!1)=>{i(!0),h(null),p("idle");const[S,A]=await Promise.allSettled([W(x?"/api/build?refresh=1":"/api/build"),W("/api/mesh")]),P=new Date;if(s(f=>({build:S.status==="fulfilled"?S.value:f?.build??null,mesh:A.status==="fulfilled"?A.value:f?.mesh??null,collectedAt:P,buildCollectedAt:S.status==="fulfilled"?P:f?.buildCollectedAt??null,meshCollectedAt:A.status==="fulfilled"?P:f?.meshCollectedAt??null})),S.status==="rejected"||A.status==="rejected"){const f=[S.status==="rejected"?"web build":null,A.status==="rejected"?"broker":null].filter(Boolean).join(" and ");h(`Could not refresh ${f} details. Last reported values are kept when available.`)}i(!1)},[]);c.useEffect(()=>{y()},[y]);const d=a?.build??null,o=a?.mesh??null,t=o?.health.build??null,l=o?.localNode?o.nodes[o.localNode.id]?.host:void 0,g=ge(),w=o===null?"not reported":o.health.reachable?o.health.ok?"healthy":"degraded":"unreachable",O=c.useCallback(()=>{a&&Ss(he(a)).then(()=>{p("copied"),setTimeout(()=>p("idle"),1800)}).catch(()=>{p("error")})},[a]);return n&&!a?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"," · ",q(d?.branch,d?.commit,d?.dirty===!0)]}),e.jsxs("span",{className:"s-settings-about-collected",children:["Snapshot collected ",a?.collectedAt.toLocaleString()??"—"]})]}),e.jsxs("div",{className:"s-settings-about-actions",children:[e.jsxs("button",{type:"button",className:"s-btn",onClick:()=>{y(!0)},disabled:n,children:[e.jsx(We,{size:13,"aria-hidden":!0}),n?"Refreshing…":"Refresh"]}),e.jsxs("button",{type:"button",className:"s-btn s-settings-about-copy",onClick:O,disabled:!a,children:[v==="copied"?e.jsx(_,{size:13,"aria-hidden":!0}):e.jsx(qe,{size:13,"aria-hidden":!0}),v==="copied"?"Copied report":v==="error"?"Copy failed":"Copy report"]})]})]}),u?e.jsx("div",{className:"s-settings-about-warning",role:"status",children:u}):null,v==="error"&&a?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:he(a),"aria-label":"OpenScout troubleshooting report"})]}):null,e.jsx(j,{label:"Web application",right:"release and source identity"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Package version",value:d?.version??"Unknown",detail:`Observed ${a?.buildCollectedAt?.toLocaleString()??"at an unknown time"}. Use this when comparing releases.`}),e.jsx(C,{label:"Run mode",value:d?.mode??"Unknown"}),e.jsx(C,{label:"Source checkout",value:q(d?.branch,d?.commit,d?.dirty===!0),detail:"A dev SHA identifies the running checkout; it is not the release version."}),e.jsx(C,{label:"Server engine",value:d?.server?`${d.server.engine} ${d.server.engineVersion}`:"Not reported",detail:d?.server?`Node compatibility ${d.server.nodeVersion} · ${d.server.platform}/${d.server.arch}`:void 0})]}),e.jsx(j,{label:"Broker",right:w}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Status",value:w,detail:[`Observed ${a?.meshCollectedAt?.toLocaleString()??"at an unknown time"}.`,o?.health.error].filter(Boolean).join(" ")}),e.jsx(C,{label:"Package",value:t?.packageName??"Not reported"}),e.jsx(C,{label:"Version",value:t?.version??"Not reported"}),e.jsx(C,{label:"Source",value:q(t?.branch,t?.commit)}),e.jsx(C,{label:"Build",value:t?.buildNumber??t?.buildId??"Not reported"}),e.jsx(C,{label:"Node",value:o?.health.nodeId??"Not reported",detail:o?.brokerUrl})]}),e.jsx(j,{label:"Host and browser",right:"troubleshooting context"}),e.jsxs("dl",{className:"s-settings-about-ledger",children:[e.jsx(C,{label:"Host",value:o?.localNode?.name??"Not reported"}),e.jsx(C,{label:"Host Scout",value:l?.scoutVersion??"Not reported"}),e.jsx(C,{label:"Host system",value:[l?.os,l?.arch??d?.server?.arch].filter(Boolean).join(" · ")||"Not reported"}),e.jsx(C,{label:"Browser platform",value:g}),e.jsx(C,{label:"Browser",value:navigator.userAgent}),e.jsx(C,{label:"Page origin",value:window.location.origin})]}),e.jsx("p",{className:"s-settings-about-note",children:"Native app and CLI versions are shown only when those components report them. Scout does not infer a version from a nearby checkout."})]})}const K=[{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 · 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"}],me={appearance:"Appearance",operator:"Operator identity",comms:"Communication",voice:"Voice",credentials:"Credentials",devices:"Paired devices",about:"About OpenScout"},ws={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."},ks={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:a,onClose:s,section:n,onSectionChange:i,presentation:u}){const{refreshOnboarding:h}=J(),{ref:v,onKeyDown:p}=He(a&&u==="drawer"),[y,d]=c.useState("appearance"),o=n??y,t=c.useCallback(m=>{i?i(m):d(m)},[i]),[l,g]=c.useState(ks),[w,O]=c.useState(null),[x,S]=c.useState(null),[A,P]=c.useState(null),[f,I]=c.useState(!1),[E,L]=c.useState("saved"),R=c.useRef(null),z=c.useRef(!0),H=c.useRef(null);c.useEffect(()=>()=>{z.current=!1},[]);const D=c.useCallback(async()=>{const[m,$]=await Promise.allSettled([Ce(),Ae()]),T=m.status==="fulfilled"?m.value:null;let N=$.status==="fulfilled"?$.value:null;T?.configured&&!N?.openai.configured&&(N=await Ee().catch(()=>N)),S(T),P(N)},[]),r=c.useCallback(async()=>{try{const m=W("/api/user"),$=Promise.race([W("/api/pairing-state"),new Promise((Cs,xe)=>setTimeout(()=>xe(new Error("timeout")),3e3))]),[T,N]=await Promise.allSettled([m,$]);T.status==="fulfilled"&&g(T.value),N.status==="fulfilled"&&O(N.value),await D()}finally{I(!0)}},[D]);c.useEffect(()=>{a&&o!=="appearance"&&o!=="about"&&!f&&r()},[f,a,r,o]),c.useEffect(()=>{if(!a||!window.matchMedia("(max-width: 760px)").matches)return;const m=window.requestAnimationFrame(()=>{H.current?.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>window.cancelAnimationFrame(m)},[a,o]);const b=c.useCallback(m=>{const T=(K.findIndex(N=>N.id===o)+m+K.length)%K.length;t(K[T].id)},[o]),M=c.useCallback(m=>{if(p(m),u==="drawer"&&m.key==="Escape"){m.preventDefault(),s();return}m.target?.closest(".s-settings-rail")&&(m.key==="ArrowDown"?(m.preventDefault(),b(1)):m.key==="ArrowUp"&&(m.preventDefault(),b(-1)))},[b,s,p,u]),F=c.useCallback(m=>{R.current&&clearTimeout(R.current),L("saving"),R.current=setTimeout(()=>{W("/api/user",{method:"POST",body:JSON.stringify(m)}).then(()=>h()).then(()=>{z.current&&L("saved")}).catch(()=>{z.current&&L("error")})},400)},[h]),G=c.useCallback(m=>{g($=>{const T={...$,...m};return F(T),T})},[F]),Y=e.jsx("nav",{className:"s-settings-rail","aria-label":"Settings pages",children:K.map(m=>{const $=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-settings-rail-label",children:m.label}),e.jsx("span",{className:"s-settings-rail-sub",children:m.sub})]}),T=`s-settings-rail-btn${o===m.id?" s-settings-rail-btn--active":""}`;return u==="page"?e.jsx("a",{ref:o===m.id?N=>{H.current=N}:void 0,href:we({view:"settings",section:m.id}),"aria-current":o===m.id?"page":void 0,className:T,onClick:N=>{N.button!==0||N.metaKey||N.ctrlKey||N.shiftKey||N.altKey||(N.preventDefault(),t(m.id))},children:$},m.id):e.jsx("button",{ref:o===m.id?N=>{H.current=N}:void 0,onClick:()=>t(m.id),"aria-current":o===m.id?"page":void 0,className:T,children:$},m.id)})}),V=e.jsx("main",{className:"s-settings-content",id:`settings-${o}`,"data-settings-section":o,tabIndex:-1,children:o==="appearance"?e.jsx(ms,{}):o==="about"?e.jsx(Ns,{}):f?e.jsxs(e.Fragment,{children:[o==="operator"&&e.jsx(gs,{profile:l,update:G}),o==="comms"&&e.jsx(ps,{profile:l,update:G}),o==="credentials"&&e.jsx(bs,{clientCredentials:x,serverCredentials:A,reloadCredentials:D}),o==="voice"&&e.jsx(xs,{}),o==="devices"&&e.jsx(fs,{pairing:w})]}):e.jsx("div",{className:"s-settings-loading",children:"Loading settings…"})});return u==="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:me[o]}),e.jsx("p",{children:ws[o]})]}),o==="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":E,role:"status","aria-live":"polite",children:[e.jsx("span",{"aria-hidden":"true"}),E==="saving"?"Saving changes…":E==="error"?"Couldn’t save changes":"Saved automatically"]})]}),e.jsxs("div",{className:"s-settings-page-layout",children:[Y,V]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`s-settings-scrim ${a?"s-settings-scrim--open":"s-settings-scrim--closed"}`,onClick:s}),e.jsxs("div",{ref:v,role:"dialog","aria-modal":"true","aria-label":"Settings",className:`s-settings-drawer ${a?"s-settings-drawer--open":"s-settings-drawer--closed"}`,onKeyDown:M,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:me[o]}),e.jsx("span",{style:{flex:1}}),e.jsx("span",{className:"s-settings-header-hint",children:"ESC to close"}),e.jsx("button",{className:"s-settings-close",onClick:s,children:"×"})]}),Y,V,e.jsxs("div",{className:"s-settings-footer",children:[e.jsxs("span",{className:"s-settings-footer-sync",children:["●"," synced"]}),e.jsx("span",{children:"·"}),e.jsx("span",{children:"changes apply instantly to every agent in your fleet"}),e.jsx("span",{style:{flex:1}}),e.jsx("button",{className:"s-btn",onClick:s,children:"Done"})]})]})]})}function be(a){return e.jsx(pe,{...a,presentation:"drawer"})}function ve({section:a="appearance",onSectionChange:s}){return e.jsx(pe,{open:!0,onClose:()=>{},section:a,onSectionChange:s,presentation:"page"})}const qs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"})),Gs=Object.freeze(Object.defineProperty({__proto__:null,SettingsDrawer:be,SettingsPage:ve},Symbol.toStringTag,{value:"Module"}));export{ve as S,qs as a,Gs as b};
@@ -0,0 +1 @@
1
+ import{j as i,r as d}from"./index-C1VaWNuD.js";import{E as it}from"./EmptyState-CKPWFSjq.js";import{S as B}from"./StatusPill-BllrY-eg.js";import{a as M}from"./api-Co9aQ2Jw.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-DDc3udYM.js";import{S as At}from"./SettingsDrawer-CPB32w0n.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./CastPicker-CkgTalIt.js";import"./CrewAvatar-CZ_faQ_s.js";import"./HarnessMark-DttReffF.js";import"./check-Dz2SRHft.js";import"./createLucideIcon-Dv8H8m7J.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./conversation-model-C2KuZUXc.js";import"./colors-BtO5_zlx.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./openContent-C6XO6kr5.js";import"./AgentsSubnav-Ci7uWM7P.js";import"./SecondaryNav-Cs0_FQdj.js";import"./secondaryNavConfig-C0Srrmy8.js";import"./message-square-BLiFqpe_.js";import"./compass-BdpImt_W.js";import"./settings-DQEtqkM9.js";import"./terminal-UDy4lzV1.js";import"./git-branch-Bc_eDIpG.js";import"./scroll-text-DFcBYy5J.js";import"./refresh-cw-Bkh7Cvnd.js";import"./bot-WxKXYtEX.js";import"./wrench-BfVeded5.js";import"./server-WY6gsbZz.js";import"./cpu-CHFIGw87.js";import"./credentials-BTce3VP1.js";import"./AgentAvatar-Dz79iTxB.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./VoicePermissionsPanel-C4vkU-sU.js";import"./copy-BzdzWsQd.js";import"./sparkles-D0vWLTyC.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 ws({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{ws as SettingsScreen};