@openscout/scout 0.2.95 → 0.2.96

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 (360) hide show
  1. package/bin/scout +26 -10
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/{ActivityScreen--eANwuxa.js → ActivityScreen-BnoaUkVZ.js} +1 -1
  5. package/dist/client/assets/{AddProjectForm-CcD6qvV8.js → AddProjectForm-IqOtJfRs.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-CYhf6twS.js → AgentAvatar-6-KBVKUu.js} +1 -1
  7. package/dist/client/assets/{AgentConfigurationScreen-BTI24HQX.js → AgentConfigurationScreen-CuZJy07q.js} +1 -1
  8. package/dist/client/assets/{AgentDefinitionsWorkspace-srmN6-vj.js → AgentDefinitionsWorkspace-Iyl4BesU.js} +1 -1
  9. package/dist/client/assets/{AgentDetailCard-UqPNpcvB.js → AgentDetailCard-C9rn3Fj5.js} +1 -1
  10. package/dist/client/assets/{AgentFloorView-XXNgI5Cj.js → AgentFloorView-YT-Jjccf.js} +1 -1
  11. package/dist/client/assets/{AgentInfoScreen-CimdOnZ9.js → AgentInfoScreen-Dr99gQEZ.js} +1 -1
  12. package/dist/client/assets/{AgentLaneCard-Z-aOBR3W.js → AgentLaneCard-DI2iW9zO.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-CyhA1reW.js → AgentLaneChrome-D8bARHMx.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-BNzjMjIH.js → AgentLaneDetailSheet-52un7dKC.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-Box8-_rS.js → AgentLaneSummaryResize-CEBjmPTa.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +1 -0
  17. package/dist/client/assets/AgentLanesPreflight-q20mTjms.js +1 -0
  18. package/dist/client/assets/AgentLanesView-CetZZDyF.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-BwuzOE8h.js → AgentLiveActions-DrEJDJef.js} +1 -1
  20. package/dist/client/assets/AgentMasterScreen-DJPnstoD.js +1 -0
  21. package/dist/client/assets/{AgentSessions-CsZwoukw.js → AgentSessions-DCPCG4xb.js} +1 -1
  22. package/dist/client/assets/{AgentsConsole-KCao4XmX.js → AgentsConsole-CsYOoFJi.js} +1 -1
  23. package/dist/client/assets/{AgentsScreen-CtPAmwRX.js → AgentsScreen-k8LvBuU_.js} +1 -1
  24. package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +1 -0
  25. package/dist/client/assets/{AstronautSuit-Ckx7lu7G.js → AstronautSuit-DbjQtfD_.js} +1 -1
  26. package/dist/client/assets/{AtopView-DYlpgEHf.js → AtopView-Daq_ob3z.js} +1 -1
  27. package/dist/client/assets/{BackToPicker-4JaeRvDm.js → BackToPicker-CXZjBRAe.js} +1 -1
  28. package/dist/client/assets/{BriefingDetailScreen-D6-xqrpo.js → BriefingDetailScreen-CUCXO-KH.js} +1 -1
  29. package/dist/client/assets/{BriefingsScreen-DKxSDEmk.js → BriefingsScreen-B5oMTGKv.js} +1 -1
  30. package/dist/client/assets/{BrokerMetadataPanel-BbREmsbK.js → BrokerMetadataPanel-BsiU8lTD.js} +1 -1
  31. package/dist/client/assets/{BrokerScreen-fbPIouMw.js → BrokerScreen-BPbOHhCS.js} +1 -1
  32. package/dist/client/assets/{CastPicker-BcA2vDDV.js → CastPicker-_5E5hNUe.js} +1 -1
  33. package/dist/client/assets/ChatCollapsedStrip-D-eXhzPf.js +1 -0
  34. package/dist/client/assets/{CodeDiffPane-Cn8Y9hAt.js → CodeDiffPane-n7W4iGUG.js} +1 -1
  35. package/dist/client/assets/{CodeProjectPicker-nPFktrco.js → CodeProjectPicker-CMsbSTDq.js} +1 -1
  36. package/dist/client/assets/{CodeScreen-BlAxtxE5.js → CodeScreen-CeuO3EhR.js} +1 -1
  37. package/dist/client/assets/{ConversationComposer-2HjbGPL9.js → ConversationComposer-CXPKx86g.js} +1 -1
  38. package/dist/client/assets/{ConversationFeedRows-C6wUqJrx.js → ConversationFeedRows-WrH-YI3L.js} +1 -1
  39. package/dist/client/assets/{ConversationHeader-C8vfXaTF.js → ConversationHeader-BQWzGzLK.js} +1 -1
  40. package/dist/client/assets/{ConversationPanels-CNCIbpqU.js → ConversationPanels-Dujvnmup.js} +2 -2
  41. package/dist/client/assets/ConversationScreen-CR9pWB65.js +2 -0
  42. package/dist/client/assets/{ConversationStatus-DZuyKsWN.js → ConversationStatus-DVzSb2Hv.js} +1 -1
  43. package/dist/client/assets/{CrewAvatar-CTIuxp4G.js → CrewAvatar-BwXjyg8N.js} +1 -1
  44. package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +1 -0
  45. package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +1 -0
  46. package/dist/client/assets/{DataTable-6IDhanr5.js → DataTable-Bp8tU9AK.js} +1 -1
  47. package/dist/client/assets/{DispatchAftermath-DC1u9itO.js → DispatchAftermath-B-6rmXzL.js} +1 -1
  48. package/dist/client/assets/{DocumentFocusViewer-DZVhS7as.js → DocumentFocusViewer-Do3wQ_3Z.js} +1 -1
  49. package/dist/client/assets/{EmbeddableSurfacesLab-BKUFJMCV.js → EmbeddableSurfacesLab-C1orRyP9.js} +1 -1
  50. package/dist/client/assets/{EmptyState-CeBl0iGd.js → EmptyState-CJzXj1l5.js} +1 -1
  51. package/dist/client/assets/{FileViewerPane-DQlpNt2S.js → FileViewerPane-Df6VzXjA.js} +1 -1
  52. package/dist/client/assets/FlightObserveScreen-6mGnmWQA.js +1 -0
  53. package/dist/client/assets/{FollowScreen-BXHOp3gb.js → FollowScreen-DvnxYLVh.js} +1 -1
  54. package/dist/client/assets/{HarnessMark-D5CA5uSp.js → HarnessMark-B979GCSB.js} +1 -1
  55. package/dist/client/assets/{HarnessesScreen-DhFXq1qz.js → HarnessesScreen-CHTuv8p6.js} +1 -1
  56. package/dist/client/assets/{HerdrSession-BRhs5LIR.js → HerdrSession-B3McuYgi.js} +1 -1
  57. package/dist/client/assets/{HomeHero-DMABJuze.js → HomeHero-CdUVPjkG.js} +1 -1
  58. package/dist/client/assets/{HostAdvisorView-RAociATV.js → HostAdvisorView-Bok5Sk5c.js} +1 -1
  59. package/dist/client/assets/{KnowledgeSearchInspector-CZPyVNSw.js → KnowledgeSearchInspector-B7XSoJsu.js} +1 -1
  60. package/dist/client/assets/{KnowledgeSearchScreen-mGTKIg00.js → KnowledgeSearchScreen-D3o3IODW.js} +1 -1
  61. package/dist/client/assets/{LaneToolHoverCard-D_DMlBeT.js → LaneToolHoverCard-HByf2ndx.js} +1 -1
  62. package/dist/client/assets/{LaneTraceDetailSheet-BEHg3LmH.js → LaneTraceDetailSheet-BUgHz-sd.js} +1 -1
  63. package/dist/client/assets/{LaneTraceEventFocus-DVimcizS.js → LaneTraceEventFocus-DM-hoPxG.js} +1 -1
  64. package/dist/client/assets/{MeshCanvas-BOuZx4AM.js → MeshCanvas-DCLJRsBy.js} +1 -1
  65. package/dist/client/assets/{MeshCanvasMinimap-wL-1N94e.js → MeshCanvasMinimap-cEFS9eW7.js} +1 -1
  66. package/dist/client/assets/{MeshScreen-DMY9Bmh5.js → MeshScreen-BcxPkhm6.js} +1 -1
  67. package/dist/client/assets/{MeshTopologyView-DiDcX5f4.js → MeshTopologyView-CCRPd8PU.js} +2 -2
  68. package/dist/client/assets/MessagesScreen-Bb5l13MO.js +1 -0
  69. package/dist/client/assets/{MissionContextRail-DrNKXG5u.js → MissionContextRail-DF0_kiU7.js} +1 -1
  70. package/dist/client/assets/{MissionControlView-ByBlHVN8.js → MissionControlView-E3V7bENU.js} +1 -1
  71. package/dist/client/assets/{MissionFocusOverlay-D1i6R6Zt.js → MissionFocusOverlay-h15sQFvP.js} +1 -1
  72. package/dist/client/assets/{MissionLeftAgentRow-DN9NcCML.js → MissionLeftAgentRow-KPdk9rSa.js} +1 -1
  73. package/dist/client/assets/{MissionLogPane-DSeIv3Xo.js → MissionLogPane-BbdDKjUl.js} +1 -1
  74. package/dist/client/assets/{NewAgentModal-V7yK6J6j.js → NewAgentModal-DfHxad34.js} +1 -1
  75. package/dist/client/assets/NewChatComposer-_Stj0fZy.js +19 -0
  76. package/dist/client/assets/{NewChatOrigin-DdpzE4kz.js → NewChatOrigin-B1u7ki70.js} +1 -1
  77. package/dist/client/assets/{ObserveEmbedScreen-l_Q3ts2q.js → ObserveEmbedScreen-Co0xTii6.js} +1 -1
  78. package/dist/client/assets/{ObserveTextFlow-BSEtYTxU.js → ObserveTextFlow-ZQWwrK3i.js} +2 -2
  79. package/dist/client/assets/{ObservedTopologyPanel-CdGUXxGR.js → ObservedTopologyPanel-BJUhDSuQ.js} +1 -1
  80. package/dist/client/assets/{OpenScoutAppShell-DN8dOSK4.js → OpenScoutAppShell-CUd2yOLu.js} +25 -25
  81. package/dist/client/assets/{OpsAgentsView-ntGr4pz4.js → OpsAgentsView-DI5wu1si.js} +1 -1
  82. package/dist/client/assets/OpsScreen-D8fQafCl.js +1 -0
  83. package/dist/client/assets/OpsSubnav-1K4Jaf__.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +1 -0
  85. package/dist/client/assets/{ProjectAgentProfileBar-BQET-qrY.js → ProjectAgentProfileBar-k2QHHHsQ.js} +1 -1
  86. package/dist/client/assets/{ProjectAgentProfileHero-Ck8mThtx.js → ProjectAgentProfileHero-Bpxk1ui2.js} +1 -1
  87. package/dist/client/assets/ProjectsInbox-C_bMHLCc.js +2 -0
  88. package/dist/client/assets/ProjectsRail-J-aH_pxT.js +1 -0
  89. package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +1 -0
  90. package/dist/client/assets/ProjectsThreadAside-_ourdM-Q.js +1 -0
  91. package/dist/client/assets/{Provider-B2xuo3rf.js → Provider-CtXJeLrP.js} +1 -1
  92. package/dist/client/assets/{RailRow-B-GycCBx.js → RailRow-CEH2MFBw.js} +1 -1
  93. package/dist/client/assets/{RawSessionsTable-AQThi6sm.js → RawSessionsTable-CDyrom-F.js} +1 -1
  94. package/dist/client/assets/RealtimeVoiceScreen-DBl3DN1H.js +1 -0
  95. package/dist/client/assets/{RepoDiffEmbedScreen-DXWoRF_c.js → RepoDiffEmbedScreen-kY2pHjIs.js} +1 -1
  96. package/dist/client/assets/{RepoDiffPageScreen-D_274ExO.js → RepoDiffPageScreen-C6LhoKrn.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewer-DbedmHDX.js → RepoDiffViewer-BhcIIQQg.js} +1 -1
  98. package/dist/client/assets/{RepoDiffViewerLazy-C0--fPtk.js → RepoDiffViewerLazy-Csy_j9LD.js} +2 -2
  99. package/dist/client/assets/{ReposScreen-D39_YG4H.js → ReposScreen-B_cB0zu7.js} +1 -1
  100. package/dist/client/assets/ScoutDeckSurface-CSy_fjcG.js +1 -0
  101. package/dist/client/assets/{ScoutSurface-UsRy0t-I.js → ScoutSurface-CQVcSrin.js} +1 -1
  102. package/dist/client/assets/{ScoutbotFxLab-Fmdfboxs.js → ScoutbotFxLab-DqGiLYNy.js} +1 -1
  103. package/dist/client/assets/{SecondaryNav-o2RL9H8H.js → SecondaryNav-BR4VRdgh.js} +1 -1
  104. package/dist/client/assets/SessionEmbedScreen-BTlZ9gAg.js +1 -0
  105. package/dist/client/assets/{SessionObserve-Dsd0j05N.js → SessionObserve-dQDN23pP.js} +1 -1
  106. package/dist/client/assets/{SessionObserveEvidence-DopQYDkD.js → SessionObserveEvidence-BRBGKAgd.js} +1 -1
  107. package/dist/client/assets/SessionRefScreen-COVQMbtE.js +1 -0
  108. package/dist/client/assets/SessionsScreen--5OJ3p3v.js +1 -0
  109. package/dist/client/assets/{SettingsDrawer-_AwuopMS.js → SettingsDrawer-RGVK_bmE.js} +1 -1
  110. package/dist/client/assets/{SettingsScreen-Cw4DDfJP.js → SettingsScreen-CCxzy5IU.js} +1 -1
  111. package/dist/client/assets/{ShikiPane-BfHc_3pM.js → ShikiPane-DYI9Hkge.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-C-q7XwTa.js → SlidePanel-B9ugxWgA.js} +1 -1
  113. package/dist/client/assets/{SpriteAvatar-Bs68ZENy.js → SpriteAvatar-z5hHesx9.js} +1 -1
  114. package/dist/client/assets/{StatusPill-ZZQwxB1a.js → StatusPill-BFvMjmZV.js} +1 -1
  115. package/dist/client/assets/{TailView-Q4FVMsUH.js → TailView-0uEIj2JH.js} +1 -1
  116. package/dist/client/assets/{Terminal-D7zqHwHV.js → Terminal-DouZeNxc.js} +1 -1
  117. package/dist/client/assets/{TerminalEmbedScreen-CXIJ7qv6.js → TerminalEmbedScreen-dMNUbzXr.js} +1 -1
  118. package/dist/client/assets/{TerminalHeaderMount-BnBLOPbb.js → TerminalHeaderMount-BL07cd0q.js} +1 -1
  119. package/dist/client/assets/{TextDocumentSurface-CKQP-cBT.js → TextDocumentSurface-BflAwXeZ.js} +1 -1
  120. package/dist/client/assets/{TmuxPeek-V9dGESfO.js → TmuxPeek-BTnjOQi0.js} +1 -1
  121. package/dist/client/assets/{VoicePermissionsPanel-k7sbLXx2.js → VoicePermissionsPanel-CgQ6GGS-.js} +1 -1
  122. package/dist/client/assets/{WorkDetailScreen-60p9litn.js → WorkDetailScreen-CaLG-zDs.js} +1 -1
  123. package/dist/client/assets/{WorkFilesViewer-BjJS7GyM.js → WorkFilesViewer-B9Sil_No.js} +1 -1
  124. package/dist/client/assets/{activity-Bj3Hnbj3.js → activity-DcrMApUY.js} +1 -1
  125. package/dist/client/assets/{addon-fit-BL-NTWRU.js → addon-fit-DMVrz5Sv.js} +1 -1
  126. package/dist/client/assets/{addon-webgl-CIMgmNjg.js → addon-webgl-BYvpZUyu.js} +1 -1
  127. package/dist/client/assets/{agent-autocomplete-DXlvdc4b.js → agent-autocomplete-B-5QTeas.js} +1 -1
  128. package/dist/client/assets/{agent-essentials-BOMHR0_U.js → agent-essentials-D7KRGYvF.js} +1 -1
  129. package/dist/client/assets/{agent-lane-card-model-CTLxf3R4.js → agent-lane-card-model-CNZMPkhc.js} +1 -1
  130. package/dist/client/assets/{agent-lanes-model-AfrjRNK5.js → agent-lanes-model-DXqjs0OK.js} +2 -2
  131. package/dist/client/assets/agent-master-I1W-5d-x.css +1 -0
  132. package/dist/client/assets/agent-master-model-DqjrVI2h.js +1 -0
  133. package/dist/client/assets/{agent-specialization-BIPIBW8u.js → agent-specialization-BujJVUTD.js} +1 -1
  134. package/dist/client/assets/{arc.es-IR5r6sj_.js → arc.es-NHqHWohb.js} +1 -1
  135. package/dist/client/assets/{arrow-down-BydciYFZ.js → arrow-down-CKtSUjmW.js} +1 -1
  136. package/dist/client/assets/{arrow-left-CghA0kTw.js → arrow-left-Czpf-AE4.js} +1 -1
  137. package/dist/client/assets/{arrow-right-iJFv3jNh.js → arrow-right-BuzMnLYP.js} +1 -1
  138. package/dist/client/assets/{arrow-up-right-CCfZXPqD.js → arrow-up-right-C6Wl-1uw.js} +1 -1
  139. package/dist/client/assets/{bot-B5sub1-i.js → bot-rd0awxD3.js} +1 -1
  140. package/dist/client/assets/{check-C18YQC90.js → check-ofKUE8yH.js} +1 -1
  141. package/dist/client/assets/{chevron-down-Mp9mu_yd.js → chevron-down-wciXnOQz.js} +1 -1
  142. package/dist/client/assets/{chevron-right-CzH-TaSF.js → chevron-right-D-HdlPg8.js} +1 -1
  143. package/dist/client/assets/{chunk-HRAB3GC3-swV8PA2k.js → chunk-HRAB3GC3-Tyv9rzx7.js} +1 -1
  144. package/dist/client/assets/{chunk-JTPDIGGW-BKXqcLKw.js → chunk-JTPDIGGW-BC2Mandc.js} +3 -3
  145. package/dist/client/assets/{chunk-T65CQEWV-vYbNJ8E6.js → chunk-T65CQEWV-C1AWTYZZ.js} +1 -1
  146. package/dist/client/assets/{chunk-YOZR3KYS-U65yUmqt.js → chunk-YOZR3KYS-DwHPHa6f.js} +1 -1
  147. package/dist/client/assets/{clock-B4PTFi5m.js → clock-B88r8OrZ.js} +1 -1
  148. package/dist/client/assets/{code-xml-Jtxsp5d1.js → code-xml-D7pOQM9l.js} +1 -1
  149. package/dist/client/assets/{compass-0_54-vz3.js → compass-Dt1AMXz2.js} +1 -1
  150. package/dist/client/assets/content-9K38QchR.js +1 -0
  151. package/dist/client/assets/content-BRgnyXWh.js +1 -0
  152. package/dist/client/assets/{content-CHghn-rT.js → content-BWPNyXJ0.js} +1 -1
  153. package/dist/client/assets/content-BdkI07v3.js +1 -0
  154. package/dist/client/assets/content-C4oWa8SB.js +1 -0
  155. package/dist/client/assets/content-C9ijJxyl.js +1 -0
  156. package/dist/client/assets/content-CFZ4rghn.js +1 -0
  157. package/dist/client/assets/content-CIqu_Ci_.js +1 -0
  158. package/dist/client/assets/content-CnJF9DGO.js +1 -0
  159. package/dist/client/assets/content-CriW8Y8u.js +1 -0
  160. package/dist/client/assets/content-DDCyPPk_.js +1 -0
  161. package/dist/client/assets/content-DtcZeh5m.js +1 -0
  162. package/dist/client/assets/content-U9tsdtle.js +1 -0
  163. package/dist/client/assets/content-hFLK3CON.js +1 -0
  164. package/dist/client/assets/{content-DMbawvqU.js → content-nkx0swDe.js} +1 -1
  165. package/dist/client/assets/content-p00KQrtD.js +1 -0
  166. package/dist/client/assets/{conversation-icons-BV10B2Me.js → conversation-icons-tp9BX6X2.js} +1 -1
  167. package/dist/client/assets/{conversation-model-CwF6Y9gx.js → conversation-model-Dc02NsGp.js} +1 -1
  168. package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +1 -0
  169. package/dist/client/assets/{copy-Dtpx4FOE.js → copy-CWWAJ75H.js} +1 -1
  170. package/dist/client/assets/{cpu-BjVis9mc.js → cpu-DrqejfkB.js} +1 -1
  171. package/dist/client/assets/{createLucideIcon-DXpqZP7I.js → createLucideIcon-DezKXSG2.js} +1 -1
  172. package/dist/client/assets/{ctx-panel-D_HJ3nhb.css → ctx-panel-F05jXK4Q.css} +1 -1
  173. package/dist/client/assets/discover-C2CZO4Tk.js +2 -0
  174. package/dist/client/assets/embed-entry-BSMUykuG.js +2 -0
  175. package/dist/client/assets/{external-link-Ckiyzjwo.js → external-link-Dp_a2vRZ.js} +1 -1
  176. package/dist/client/assets/{eye-CpfyvdLq.js → eye-BRyD0jno.js} +1 -1
  177. package/dist/client/assets/{file-code-corner-7mo7EviR.js → file-code-corner-muIVH_xO.js} +1 -1
  178. package/dist/client/assets/{file-text-KijGBnME.js → file-text-CqJgwxmv.js} +1 -1
  179. package/dist/client/assets/{gauge-y-Xg8Mrv.js → gauge-hU--hKVP.js} +1 -1
  180. package/dist/client/assets/{gestures-Bq9XnSqY.js → gestures-DN4hEeqv.js} +1 -1
  181. package/dist/client/assets/{git-branch-BQ_x8KZL.js → git-branch-CK5v8F2v.js} +1 -1
  182. package/dist/client/assets/{home-moving-signal-DtRpiNa0.js → home-moving-signal-BjDtEJUP.js} +1 -1
  183. package/dist/client/assets/{home-now-card-DFb4GOgM.js → home-now-card-nF8OotI-.js} +1 -1
  184. package/dist/client/assets/{home-now-card-nano-D--m9jpq.js → home-now-card-nano-C-r_bBg5.js} +1 -1
  185. package/dist/client/assets/{hooks-9d1SoaQA.js → hooks-D46bABUP.js} +1 -1
  186. package/dist/client/assets/index-CPrU5q04.js +1 -0
  187. package/dist/client/assets/{index-CZ-05hKz.js → index-DvLtl7rV.js} +5 -5
  188. package/dist/client/assets/index-kL1WLbeS.js +1 -0
  189. package/dist/client/assets/index-zvhpRHao.js +1 -0
  190. package/dist/client/assets/{inspector-panel-C-EhEDYy.js → inspector-panel-Dkc7rLvY.js} +1 -1
  191. package/dist/client/assets/{keyboard-nav-DFhAJkW3.js → keyboard-nav-BLYDhL3Z.js} +1 -1
  192. package/dist/client/assets/{lane-roster-store-gUBsydNf.js → lane-roster-store-DOdI1O13.js} +1 -1
  193. package/dist/client/assets/{layers-CGou-LwV.js → layers-CSsg3JVP.js} +1 -1
  194. package/dist/client/assets/{layout-grid-BrZt31QH.js → layout-grid-DOChPJdZ.js} +1 -1
  195. package/dist/client/assets/left-B-SdEJSJ.js +1 -0
  196. package/dist/client/assets/{left-B_o51JV6.js → left-B3wSE6ql.js} +1 -1
  197. package/dist/client/assets/{left-CwHZCGO3.js → left-BNRFiRsb.js} +1 -1
  198. package/dist/client/assets/{left-DA0amyfu.js → left-BggzhgXN.js} +1 -1
  199. package/dist/client/assets/left-CARCvvxS.js +2 -0
  200. package/dist/client/assets/left-CpokZYHt.js +1 -0
  201. package/dist/client/assets/{left-CwLs0okF.js → left-YT7mIGuH.js} +1 -1
  202. package/dist/client/assets/{left-advisor-DU3s01gk.js → left-advisor-CCY0vkcO.js} +1 -1
  203. package/dist/client/assets/left-agents-trhO5sL8.js +1 -0
  204. package/dist/client/assets/{left-default-uvuvDmt0.js → left-default-CG33elBs.js} +1 -1
  205. package/dist/client/assets/{left-lanes-DnNLgec8.js → left-lanes-CitMgeTp.js} +1 -1
  206. package/dist/client/assets/{left-mission-DN3-NLPC.js → left-mission-Zl2m_5eU.js} +1 -1
  207. package/dist/client/assets/{library-DIo5NiGP.js → library-DkALuCh5.js} +1 -1
  208. package/dist/client/assets/{loader-circle-BiohlpM3.js → loader-circle-pM56HNhR.js} +1 -1
  209. package/dist/client/assets/{local-agents-wUIaBcEr.js → local-agents-C8xAhbO5.js} +1 -1
  210. package/dist/client/assets/{mentions-CcPFMbmZ.js → mentions-DG6OQrsc.js} +1 -1
  211. package/dist/client/assets/{mesh-buckets-ByyFXdKT.js → mesh-buckets-6y3ZIibI.js} +1 -1
  212. package/dist/client/assets/{mesh-ops-CvGyjK84.js → mesh-ops-BZ1h5RQs.js} +1 -1
  213. package/dist/client/assets/{mesh-roster-n2nDpEmA.js → mesh-roster-Bc7T4b7z.js} +1 -1
  214. package/dist/client/assets/{mesh-view-store-BpxGm71b.js → mesh-view-store-ChUOASK8.js} +1 -1
  215. package/dist/client/assets/{message-circle-B2ddzBrX.js → message-circle-mZCv8tvB.js} +1 -1
  216. package/dist/client/assets/{message-markup-RkfmDfME.js → message-markup-C2LQDm_k.js} +1 -1
  217. package/dist/client/assets/{message-square-D9YYWE0x.js → message-square-C7t_qtuj.js} +1 -1
  218. package/dist/client/assets/{message-visibility-DwxgcgYK.js → message-visibility-CGOmSSKs.js} +1 -1
  219. package/dist/client/assets/{mission-control-store-Bf4b54MV.js → mission-control-store-nDLdUZPA.js} +1 -1
  220. package/dist/client/assets/{observe-CJRIvOCn.js → observe-BpEm1INu.js} +1 -1
  221. package/dist/client/assets/{page-status-BptpTdQ-.js → page-status-E5jnk48p.js} +1 -1
  222. package/dist/client/assets/{paperclip-B1UNGl5d.js → paperclip-C64lkcbM.js} +1 -1
  223. package/dist/client/assets/{persistent-state-YI-WHSCF.js → persistent-state-EHXw8WNy.js} +1 -1
  224. package/dist/client/assets/{plus-CuU_X0-8.js → plus-Co-dqKul.js} +1 -1
  225. package/dist/client/assets/{profile-rY8jO38P.js → profile-APxDsN2P.js} +1 -1
  226. package/dist/client/assets/projects-inbox-Cg4X2lUQ.js +1 -0
  227. package/dist/client/assets/projects-inbox-DRBl2N85.css +1 -0
  228. package/dist/client/assets/{proxy-DnLpZIi9.js → proxy-BiW5suC7.js} +1 -1
  229. package/dist/client/assets/{radio-Dm1ItnA4.js → radio-BOxBQX-T.js} +1 -1
  230. package/dist/client/assets/{refresh-cw-BRn9Oxxl.js → refresh-cw-DMxGzDwn.js} +1 -1
  231. package/dist/client/assets/resolve-panes-DeVJbS9c.js +1 -0
  232. package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +1 -0
  233. package/dist/client/assets/{right-BJltPRnd.js → right-Bmfd3pjP.js} +1 -1
  234. package/dist/client/assets/{right-Beh3nCUB.js → right-BqI-nr9G.js} +1 -1
  235. package/dist/client/assets/{right-D3aTKf1F.js → right-BuCgE0fZ.js} +1 -1
  236. package/dist/client/assets/{right-Shpw_xDy.js → right-BwlW6E57.js} +1 -1
  237. package/dist/client/assets/{right-CPP7GyOm.js → right-C0ybUw0j.js} +1 -1
  238. package/dist/client/assets/{right-BbyYdzHn.js → right-CdkcrmeD.js} +1 -1
  239. package/dist/client/assets/{right-CJnB_Bg7.js → right-CimaAvQN.js} +1 -1
  240. package/dist/client/assets/{right-C1yumXNx.js → right-CkCCPbCX.js} +1 -1
  241. package/dist/client/assets/{right-DI1B79nR.js → right-D3eSiy41.js} +1 -1
  242. package/dist/client/assets/{right-DtsRNX5b.js → right-Dz_xD0Vj.js} +1 -1
  243. package/dist/client/assets/{rocket-DOwXHKWA.js → rocket-BQm5_CvR.js} +1 -1
  244. package/dist/client/assets/router-B9vQkNJL.js +1 -0
  245. package/dist/client/assets/{scope-views-A4_vP97W.js → scope-views-1IYJdl41.js} +1 -1
  246. package/dist/client/assets/{scout-voice-BhPzrc6P.js → scout-voice-BVUqGhth.js} +1 -1
  247. package/dist/client/assets/{scoutbot-markdown-jh7tzFB1.js → scoutbot-markdown-BQ_Ee2Ic.js} +1 -1
  248. package/dist/client/assets/{scroll-text-DO0GQzvN.js → scroll-text-Dze_dXtQ.js} +1 -1
  249. package/dist/client/assets/{search-D1tJSAWe.js → search-CDko0PKE.js} +1 -1
  250. package/dist/client/assets/{secondaryNavConfig-B9IF8wXl.js → secondaryNavConfig-BoQ_zYR9.js} +1 -1
  251. package/dist/client/assets/{selection-bridge-i2S9zpf8.js → selection-bridge-Din6yV3h.js} +1 -1
  252. package/dist/client/assets/{send-horizontal-CgLppsIC.js → send-horizontal-CSjIm6xg.js} +1 -1
  253. package/dist/client/assets/{server-Dymv5Emh.js → server-Bzj7lPIx.js} +1 -1
  254. package/dist/client/assets/{session-catalog-DNaOEzoQ.js → session-catalog-DsaZJXZt.js} +1 -1
  255. package/dist/client/assets/session-ref-lookup-state-SATH_jAP.js +1 -0
  256. package/dist/client/assets/{session-table-PTQVoTyc.js → session-table-BQfR7u6r.js} +1 -1
  257. package/dist/client/assets/{settings-2fC_G9nX.js → settings-Dyvpkb1D.js} +1 -1
  258. package/dist/client/assets/{sliders-horizontal-BPSMHhbm.js → sliders-horizontal-C8njVwfg.js} +1 -1
  259. package/dist/client/assets/{sparkles-Dy8p5xN8.js → sparkles-CETYrxGA.js} +1 -1
  260. package/dist/client/assets/{sse-CiOSzE5n.js → sse-CD9MMUxl.js} +1 -1
  261. package/dist/client/assets/{tail-events-BMQmSx1n.js → tail-events-Ps8KpKah.js} +1 -1
  262. package/dist/client/assets/{terminal-yN9xN-h9.js → terminal-9GRS_Qdc.js} +1 -1
  263. package/dist/client/assets/{terminal-relay-9lhzEp2V.js → terminal-relay-GYMIvKs1.js} +1 -1
  264. package/dist/client/assets/{terminal-takeover-DANQfTcy.js → terminal-takeover-_Jyys4me.js} +1 -1
  265. package/dist/client/assets/{text-CnZ0e1-V.js → text-BP3oyl8-.js} +1 -1
  266. package/dist/client/assets/{text-rLpBg4_z.css → text-BYAFNLNq.css} +1 -1
  267. package/dist/client/assets/{use-conversation-list-D9BNLfnW.js → use-conversation-list-C9ABzjXI.js} +1 -1
  268. package/dist/client/assets/use-fleet-active-asks-DAspZQjE.js +1 -0
  269. package/dist/client/assets/{use-mesh-ops-items-BIvIHlqe.js → use-mesh-ops-items-Dh54ymEp.js} +1 -1
  270. package/dist/client/assets/{use-reduced-motion-CKkhq9c5.js → use-reduced-motion-x8pJMVrG.js} +1 -1
  271. package/dist/client/assets/{use-scout-dev-flags-B2KCzPxn.js → use-scout-dev-flags-DhCbiDK3.js} +1 -1
  272. package/dist/client/assets/{useAgentHoverCard-CHBsxcbp.js → useAgentHoverCard-DoBwV0LX.js} +1 -1
  273. package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +1 -0
  274. package/dist/client/assets/{usePierreRuntime-DUuXH5yp.js → usePierreRuntime-ejq9dCWV.js} +1 -1
  275. package/dist/client/assets/{wrench-YcXMlsh2.js → wrench-DjkoAOQt.js} +1 -1
  276. package/dist/client/assets/{x-e3h2hDsp.js → x-CAbNespN.js} +1 -1
  277. package/dist/client/assets/{xterm-Byp1Hep_.js → xterm-Cf-ngcGP.js} +1 -1
  278. package/dist/client/assets/{zap-nMcjPoWB.js → zap-Cq8eWkcF.js} +1 -1
  279. package/dist/client/index.html +1 -1
  280. package/dist/drizzle/0009_old_korg.sql +72 -0
  281. package/dist/drizzle/0010_sparkling_colonel_america.sql +2 -0
  282. package/dist/drizzle/0011_funny_onslaught.sql +4 -0
  283. package/dist/drizzle/0012_high_blazing_skull.sql +16 -0
  284. package/dist/drizzle/0013_perfect_juggernaut.sql +1 -0
  285. package/dist/drizzle/0014_legal_meggan.sql +6 -0
  286. package/dist/drizzle/0015_lame_marvel_boy.sql +12 -0
  287. package/dist/drizzle/0016_early_goliath.sql +6 -0
  288. package/dist/drizzle/meta/0009_snapshot.json +6262 -0
  289. package/dist/drizzle/meta/0010_snapshot.json +6286 -0
  290. package/dist/drizzle/meta/0011_snapshot.json +6337 -0
  291. package/dist/drizzle/meta/0012_snapshot.json +6458 -0
  292. package/dist/drizzle/meta/0013_snapshot.json +6465 -0
  293. package/dist/drizzle/meta/0014_snapshot.json +6503 -0
  294. package/dist/drizzle/meta/0015_snapshot.json +6596 -0
  295. package/dist/drizzle/meta/0016_snapshot.json +6611 -0
  296. package/dist/drizzle/meta/_journal.json +56 -0
  297. package/dist/main.mjs +1306 -360
  298. package/dist/node/main.mjs +314 -12
  299. package/dist/pairing-runtime-controller.mjs +608 -108
  300. package/dist/runtime/base-daemon.mjs +30 -3
  301. package/dist/runtime/broker-daemon.mjs +4771 -529
  302. package/dist/runtime/broker-process-manager.mjs +23 -2
  303. package/dist/runtime/mesh-discover.mjs +23 -2
  304. package/dist/scout-control-plane-web.mjs +1914 -478
  305. package/package.json +2 -2
  306. package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +0 -1
  307. package/dist/client/assets/AgentLanesPreflight-5B6sXvRB.js +0 -1
  308. package/dist/client/assets/AgentLanesView-DHyzVBk6.js +0 -2
  309. package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +0 -1
  310. package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +0 -1
  311. package/dist/client/assets/ConversationScreen-BNULZAp2.js +0 -2
  312. package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +0 -1
  313. package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +0 -1
  314. package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +0 -1
  315. package/dist/client/assets/MessagesScreen-Eulveud3.js +0 -1
  316. package/dist/client/assets/NewChatComposer-hlWT-nbR.js +0 -19
  317. package/dist/client/assets/OpsScreen-Ppen_Lmj.js +0 -1
  318. package/dist/client/assets/OpsSubnav-GAKsoSor.js +0 -1
  319. package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +0 -1
  320. package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +0 -2
  321. package/dist/client/assets/ProjectsRail-DCfNMmnW.js +0 -1
  322. package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +0 -1
  323. package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +0 -1
  324. package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +0 -1
  325. package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +0 -1
  326. package/dist/client/assets/SessionEmbedScreen-RD5XOx7R.js +0 -1
  327. package/dist/client/assets/SessionRefScreen-B_cTv47v.js +0 -1
  328. package/dist/client/assets/SessionsScreen-Bq0Z77On.js +0 -1
  329. package/dist/client/assets/archive-BjcGiAy8.js +0 -1
  330. package/dist/client/assets/content-6RvWTrtk.js +0 -1
  331. package/dist/client/assets/content-BCgwMUqz.js +0 -1
  332. package/dist/client/assets/content-Bf2VLhx0.js +0 -1
  333. package/dist/client/assets/content-BrU_38-m.js +0 -1
  334. package/dist/client/assets/content-BvvJN8rN.js +0 -1
  335. package/dist/client/assets/content-CAeEqYPw.js +0 -1
  336. package/dist/client/assets/content-CI_Z9DXk.js +0 -1
  337. package/dist/client/assets/content-CbyKONhW.js +0 -1
  338. package/dist/client/assets/content-Czogvp43.js +0 -1
  339. package/dist/client/assets/content-DFk0zNzX.js +0 -1
  340. package/dist/client/assets/content-DHe4DgkA.js +0 -1
  341. package/dist/client/assets/content-DTz7cKjo.js +0 -1
  342. package/dist/client/assets/content-E3kudY-W.js +0 -1
  343. package/dist/client/assets/content-LpO0aO_U.js +0 -1
  344. package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +0 -1
  345. package/dist/client/assets/discover-CHbrEItO.js +0 -2
  346. package/dist/client/assets/embed-entry-vil28MyU.js +0 -2
  347. package/dist/client/assets/index-BVlMw8x_.js +0 -1
  348. package/dist/client/assets/index-Cn0GR-q1.js +0 -1
  349. package/dist/client/assets/index-DosI4AG9.js +0 -1
  350. package/dist/client/assets/left-BpgWnaah.js +0 -1
  351. package/dist/client/assets/left-Cx0kv6pe.js +0 -1
  352. package/dist/client/assets/left-agents-qL5PpUY-.js +0 -1
  353. package/dist/client/assets/left-z-6CkuBe.js +0 -2
  354. package/dist/client/assets/projects-inbox-BBs1hG13.css +0 -1
  355. package/dist/client/assets/projects-inbox-D-zAb9Gp.js +0 -1
  356. package/dist/client/assets/resolve-panes-DO6LkwhQ.js +0 -1
  357. package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +0 -1
  358. package/dist/client/assets/router-DJj2WbDg.js +0 -1
  359. package/dist/client/assets/use-fleet-active-asks-BeAdcl09.js +0 -1
  360. package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as c,j as e}from"./index-DvLtl7rV.js";import{a as g}from"./api-Co9aQ2Jw.js";import{u as k}from"./sse-CD9MMUxl.js";import{u as I}from"./tail-events-Ps8KpKah.js";import{B as N}from"./BackToPicker-CXZjBRAe.js";import{ConversationScreen as S}from"./ConversationScreen-CR9pWB65.js";import{S as R,a as y}from"./SessionObserve-dQDN23pP.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-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./createLucideIcon-DezKXSG2.js";import"./conversation-model-Dc02NsGp.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./keyboard-nav-BLYDhL3Z.js";import"./x-CAbNespN.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./file-text-CqJgwxmv.js";import"./ConversationComposer-CXPKx86g.js";import"./AgentAvatar-6-KBVKUu.js";import"./Provider-CtXJeLrP.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./zap-Cq8eWkcF.js";import"./message-markup-C2LQDm_k.js";import"./mentions-DG6OQrsc.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./openContent-C6XO6kr5.js";import"./eye-BRyD0jno.js";import"./terminal-9GRS_Qdc.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-BQWzGzLK.js";import"./AstronautSuit-DbjQtfD_.js";import"./ConversationFeedRows-WrH-YI3L.js";import"./ConversationPanels-Dujvnmup.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-x8pJMVrG.js";import"./proxy-BiW5suC7.js";import"./activity-DcrMApUY.js";import"./message-circle-mZCv8tvB.js";import"./ConversationStatus-DVzSb2Hv.js";import"./check-ofKUE8yH.js";import"./sparkles-CETYrxGA.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BJUhDSuQ.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./wrench-DjkoAOQt.js";import"./external-link-Dp_a2vRZ.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 as({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 ls({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{as as SessionRefContextRail,ls as SessionRefScreen};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-DvLtl7rV.js";import{RawSessionsTable as t}from"./RawSessionsTable-CDyrom-F.js";/* empty css */import"./DataTable-Bp8tU9AK.js";/* empty css */import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./time-Dhsh_2EG.js";import"./tail-events-Ps8KpKah.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./Provider-CtXJeLrP.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CD9MMUxl.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";function Q({navigate:o}){return r.jsx(t,{navigate:o})}export{Q 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,a6 as Se,v as Ne}from"./index-CZ-05hKz.js";import{a as we,h as ke}from"./router-DJj2WbDg.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-B2xuo3rf.js";import{t as De}from"./time-Dhsh_2EG.js";import{j as _e,k as Ve,l as ze}from"./scout-voice-BhPzrc6P.js";import{u as He}from"./keyboard-nav-DFhAJkW3.js";import{C as Q}from"./CrewAvatar-CTIuxp4G.js";import{C as Fe}from"./CastPicker-BcA2vDDV.js";import{p as ae}from"./AgentAvatar-CYhf6twS.js";import{S as ne}from"./SpriteAvatar-Bs68ZENy.js";import{VoiceHostStatusBanner as Be,VoicePermissionsPanel as Ue}from"./VoicePermissionsPanel-k7sbLXx2.js";import{u as Ke}from"./chunk-HRAB3GC3-swV8PA2k.js";import{C as V}from"./check-C18YQC90.js";import{c as ee}from"./createLucideIcon-DXpqZP7I.js";import{R as We}from"./refresh-cw-BRn9Oxxl.js";import{C as qe}from"./copy-Dtpx4FOE.js";import{b as Ge}from"./DocumentFocusViewer-DZVhS7as.js";import{S as Ye}from"./sparkles-Dy8p5xN8.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(`
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
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
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 +1 @@
1
- import{j as i,r as d}from"./index-CZ-05hKz.js";import{E as it}from"./EmptyState-CeBl0iGd.js";import{S as B}from"./StatusPill-ZZQwxB1a.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-BTI24HQX.js";import{S as At}from"./SettingsDrawer-_AwuopMS.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./CastPicker-BcA2vDDV.js";import"./CrewAvatar-CTIuxp4G.js";import"./HarnessMark-D5CA5uSp.js";import"./check-C18YQC90.js";import"./createLucideIcon-DXpqZP7I.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./colors-BtO5_zlx.js";import"./index-BVlMw8x_.js";import"./NewChatOrigin-DdpzE4kz.js";import"./keyboard-nav-DFhAJkW3.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./file-text-KijGBnME.js";import"./Provider-B2xuo3rf.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./openContent-C6XO6kr5.js";import"./AgentsSubnav-CDMjKeYC.js";import"./SecondaryNav-o2RL9H8H.js";import"./secondaryNavConfig-B9IF8wXl.js";import"./message-square-D9YYWE0x.js";import"./compass-0_54-vz3.js";import"./settings-2fC_G9nX.js";import"./terminal-yN9xN-h9.js";import"./git-branch-BQ_x8KZL.js";import"./scroll-text-DO0GQzvN.js";import"./refresh-cw-BRn9Oxxl.js";import"./bot-B5sub1-i.js";import"./wrench-YcXMlsh2.js";import"./server-Dymv5Emh.js";import"./cpu-BjVis9mc.js";import"./credentials-BTce3VP1.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./VoicePermissionsPanel-k7sbLXx2.js";import"./copy-Dtpx4FOE.js";import"./sparkles-Dy8p5xN8.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 Ns({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{Ns as SettingsScreen};
1
+ import{j as i,r as d}from"./index-DvLtl7rV.js";import{E as it}from"./EmptyState-CJzXj1l5.js";import{S as B}from"./StatusPill-BFvMjmZV.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-CuZJy07q.js";import{S as At}from"./SettingsDrawer-RGVK_bmE.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./CastPicker-_5E5hNUe.js";import"./CrewAvatar-BwXjyg8N.js";import"./HarnessMark-B979GCSB.js";import"./check-ofKUE8yH.js";import"./createLucideIcon-DezKXSG2.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./colors-BtO5_zlx.js";import"./index-zvhpRHao.js";import"./NewChatOrigin-B1u7ki70.js";import"./keyboard-nav-BLYDhL3Z.js";import"./x-CAbNespN.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./file-text-CqJgwxmv.js";import"./Provider-CtXJeLrP.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./openContent-C6XO6kr5.js";import"./AgentsSubnav-C4xpQhsv.js";import"./SecondaryNav-BR4VRdgh.js";import"./secondaryNavConfig-BoQ_zYR9.js";import"./message-square-C7t_qtuj.js";import"./compass-Dt1AMXz2.js";import"./settings-Dyvpkb1D.js";import"./terminal-9GRS_Qdc.js";import"./git-branch-CK5v8F2v.js";import"./scroll-text-Dze_dXtQ.js";import"./refresh-cw-DMxGzDwn.js";import"./bot-rd0awxD3.js";import"./wrench-DjkoAOQt.js";import"./server-Bzj7lPIx.js";import"./cpu-DrqejfkB.js";import"./credentials-BTce3VP1.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./VoicePermissionsPanel-CgQ6GGS-.js";import"./copy-CWWAJ75H.js";import"./sparkles-CETYrxGA.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 Ns({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{Ns as SettingsScreen};