@openscout/scout 0.2.87 → 0.2.91

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 (486) hide show
  1. package/README.md +10 -5
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +4 -4
  4. package/dist/client/assets/ActivityScreen-BUeb4ERK.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-Dw2oyCcz.js → AddProjectForm-DtTfn4Zk.js} +1 -1
  6. package/dist/client/assets/AgentAvatar-CneOa70z.js +1 -0
  7. package/dist/client/assets/AgentConfigurationScreen-CkZ7EjZh.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-0Y3kqMtv.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-2DZQahiN.js → AgentDetailCard-Dtc02KUO.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-B5raPB_U.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-DFG4ElZD.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-CeSjWWwh.js → AgentLaneCard-BRAkw8YJ.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-Do7CXwin.js → AgentLaneChrome-T8QE5742.js} +1 -1
  14. package/dist/client/assets/AgentLaneDetailSheet-C8RYotnv.js +4 -0
  15. package/dist/client/assets/{AgentLaneSummaryResize--lHgnncr.js → AgentLaneSummaryResize-FyYweLo_.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-Br7cmZVO.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-BwkGk8JH.js → AgentLanesPreflight-Cil3dNwu.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-DPfO8MOo.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-BmXDRxER.js → AgentLiveActions-DwScaVRF.js} +1 -1
  20. package/dist/client/assets/AgentSessions-DKoWA0Lm.js +6 -0
  21. package/dist/client/assets/AgentsConsole-DoBIWGoq.js +1 -0
  22. package/dist/client/assets/AgentsScreen-JuUiSuwY.js +1 -0
  23. package/dist/client/assets/AgentsSubnav-BV0WAgzf.js +1 -0
  24. package/dist/client/assets/{AtopView-DOKJbiJL.js → AtopView-ycxMrRwp.js} +1 -1
  25. package/dist/client/assets/BackToPicker-D6WgIDb-.js +1 -0
  26. package/dist/client/assets/BriefingDetailScreen-Zw-taW1s.js +6 -0
  27. package/dist/client/assets/{BriefingsScreen-DLIJ8eYj.js → BriefingsScreen-BerYOoWS.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-C8WERmHF.js → BrokerMetadataPanel-Cu93j-Ga.js} +1 -1
  29. package/dist/client/assets/BrokerScreen-CeN90URH.js +5 -0
  30. package/dist/client/assets/ChatCollapsedStrip-DdKyMSEM.js +1 -0
  31. package/dist/client/assets/{CodeDiffPane-CtgqIuS0.js → CodeDiffPane-BjCOBLze.js} +1 -1
  32. package/dist/client/assets/{CodeProjectPicker-C4W_udc7.js → CodeProjectPicker-NSGdCaK0.js} +1 -1
  33. package/dist/client/assets/{CodeScreen-WhTvVUKY.js → CodeScreen-CA9Sq6Dx.js} +1 -1
  34. package/dist/client/assets/ContextMenu-DnFcmfMR.js +1 -0
  35. package/dist/client/assets/ConversationComposer-CjRXFkvY.js +1 -0
  36. package/dist/client/assets/ConversationFeedRows-CgRTIpAv.js +1 -0
  37. package/dist/client/assets/ConversationHeader-CRmdtuL7.js +1 -0
  38. package/dist/client/assets/ConversationPanels-DCkcLIHk.js +2 -0
  39. package/dist/client/assets/ConversationScreen-Br0QQ3xo.js +1 -0
  40. package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
  41. package/dist/client/assets/ConversationStatus-BJ1CMbAv.js +1 -0
  42. package/dist/client/assets/{DataTable-DFacT2uu.js → DataTable-Dzqiaha4.js} +1 -1
  43. package/dist/client/assets/{DispatchAftermath-D797PbCe.js → DispatchAftermath-B0WMg_z3.js} +1 -1
  44. package/dist/client/assets/DocumentFocusViewer-CZVVIAD5.js +1 -0
  45. package/dist/client/assets/{EmbeddableSurfacesLab-JczLmmF-.js → EmbeddableSurfacesLab-C3a7hJWO.js} +1 -1
  46. package/dist/client/assets/{EmptyState-uQbB-bvP.js → EmptyState-CYNJZMrZ.js} +1 -1
  47. package/dist/client/assets/{FileViewerPane-ebbCtnHE.js → FileViewerPane-Fwt8_KmD.js} +1 -1
  48. package/dist/client/assets/FleetSearch-Dsi_l2KW.js +1 -0
  49. package/dist/client/assets/FleetSearch-EXOe8ulE.css +1 -0
  50. package/dist/client/assets/FlightObserveScreen-g_tiGmvz.js +1 -0
  51. package/dist/client/assets/{FollowScreen-Bfu2_KtU.js → FollowScreen-Bb_rcrzi.js} +1 -1
  52. package/dist/client/assets/{HarnessMark-CEzmPFHC.js → HarnessMark-DrE57dUq.js} +1 -1
  53. package/dist/client/assets/HarnessesScreen-CAsCJ_tG.js +1 -0
  54. package/dist/client/assets/{HerdrSession-BDLa_rrK.js → HerdrSession-1eVu9Owj.js} +1 -1
  55. package/dist/client/assets/HomeHero-DEl-WBsT.css +1 -0
  56. package/dist/client/assets/HomeHero-W445QrG1.js +1 -0
  57. package/dist/client/assets/{KnowledgeSearchInspector-GjmxYBi_.js → KnowledgeSearchInspector-CbPVg3fr.js} +1 -1
  58. package/dist/client/assets/KnowledgeSearchScreen-C1lN1xJk.js +1 -0
  59. package/dist/client/assets/{LaneToolHoverCard-DCY-m0JK.js → LaneToolHoverCard-BkBcDYm-.js} +1 -1
  60. package/dist/client/assets/LaneTraceDetailSheet-CzTd44rf.js +1 -0
  61. package/dist/client/assets/{LaneTraceEventFocus-BfKZ7G5c.js → LaneTraceEventFocus-BmMmPTyJ.js} +1 -1
  62. package/dist/client/assets/{MeshCanvas-CZYHLTvw.js → MeshCanvas-DwkjsiJ5.js} +2 -2
  63. package/dist/client/assets/{MeshCanvasMinimap-D3mJ78CM.js → MeshCanvasMinimap-vmCpU1sD.js} +1 -1
  64. package/dist/client/assets/MeshScreen-CkMepUpT.js +1 -0
  65. package/dist/client/assets/{MeshTopologyView-A-wh0Ad1.js → MeshTopologyView-BD2xLE2C.js} +2 -2
  66. package/dist/client/assets/MessageComposerSuggestions-qbalTne_.js +1 -0
  67. package/dist/client/assets/MessagesScreen-C8UynyLC.js +1 -0
  68. package/dist/client/assets/{MissionContextRail-MTL2EAnr.js → MissionContextRail-D5MEP2f4.js} +1 -1
  69. package/dist/client/assets/MissionControlView-K_I7eftL.js +1 -0
  70. package/dist/client/assets/MissionFocusOverlay-CWKLdUKG.js +1 -0
  71. package/dist/client/assets/MissionLeftAgentRow-ByGrNAcs.js +1 -0
  72. package/dist/client/assets/MissionLogPane-ZwHJ137T.js +1 -0
  73. package/dist/client/assets/{NewAgentModal-Ctixol4_.js → NewAgentModal-Do9aVvan.js} +1 -1
  74. package/dist/client/assets/NewChatComposer-DKlNX1UA.js +19 -0
  75. package/dist/client/assets/{NewChatOrigin-CCiPg_WR.js → NewChatOrigin-DXPvX-hh.js} +1 -1
  76. package/dist/client/assets/ObserveEmbedScreen-Dghsq2on.js +2 -0
  77. package/dist/client/assets/ObserveTextFlow-DWNlmTVm.js +2 -0
  78. package/dist/client/assets/ObservedTopologyPanel-BlmGoxCE.js +2 -0
  79. package/dist/client/assets/OpenScoutAppShell-DDqQi-oe.js +87 -0
  80. package/dist/client/assets/OpsAgentsView-Bn_fGBdo.js +1 -0
  81. package/dist/client/assets/OpsScreen-DHnT-Q9R.js +1 -0
  82. package/dist/client/assets/OpsSubnav-CJRD7MjM.js +1 -0
  83. package/dist/client/assets/PlanView-B6gKo543.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfile-Be1VOkI4.js +1 -0
  85. package/dist/client/assets/{ProjectAgentProfileBar-B4RqrI0Q.js → ProjectAgentProfileBar-C5QWwZCn.js} +1 -1
  86. package/dist/client/assets/ProjectAgentProfileHero-DC7Dd8VL.js +1 -0
  87. package/dist/client/assets/ProjectsInbox-DCLrDmj1.js +2 -0
  88. package/dist/client/assets/ProjectsRail-C4hiXYSb.js +1 -0
  89. package/dist/client/assets/ProjectsScreen-jruZRjgD.js +1 -0
  90. package/dist/client/assets/ProjectsThreadAside-DYmL2dCY.js +1 -0
  91. package/dist/client/assets/Provider-p-xuaAoE.js +1 -0
  92. package/dist/client/assets/RailRow-Cf9LOiEj.css +1 -0
  93. package/dist/client/assets/RailRow-bRkkXIpR.js +1 -0
  94. package/dist/client/assets/RawSessionsTable-B7WKmXrk.js +1 -0
  95. package/dist/client/assets/RealtimeVoiceScreen-BzP3BQq9.js +1 -0
  96. package/dist/client/assets/{RepoDiffEmbedScreen-Cr1SL5ht.js → RepoDiffEmbedScreen-xjzjcJ_c.js} +1 -1
  97. package/dist/client/assets/{RepoDiffPageScreen-DeC8fsh_.js → RepoDiffPageScreen-DRzIY-dk.js} +1 -1
  98. package/dist/client/assets/RepoDiffViewer-CNDp01KM.js +7 -0
  99. package/dist/client/assets/RepoDiffViewerLazy-b6vjYxez.js +2 -0
  100. package/dist/client/assets/{ReposScreen-BQwIShXf.js → ReposScreen-CpaLC_NU.js} +6 -6
  101. package/dist/client/assets/ScoutDeckSurface-DkpZ-0DH.js +1 -0
  102. package/dist/client/assets/{ScoutSurface-DdVzN3DA.js → ScoutSurface-BENBUt5-.js} +1 -1
  103. package/dist/client/assets/ScoutbotBroadcastChip-CGZyxS5H.js +2 -0
  104. package/dist/client/assets/{agent-autocomplete-C7xwIcwd.css → ScoutbotBroadcastChip-CxtYZWPZ.css} +1 -1
  105. package/dist/client/assets/{ScoutbotFxLab-sLjfSKtS.js → ScoutbotFxLab-Bk2ZsfPp.js} +1 -1
  106. package/dist/client/assets/ScoutbotRealtimeVoiceCall-n63LdBZs.js +1 -0
  107. package/dist/client/assets/{SecondaryNav-CCQqTT3e.js → SecondaryNav-B4IsujYh.js} +1 -1
  108. package/dist/client/assets/{SessionEmbedScreen-BrLMZJ3N.js → SessionEmbedScreen-CPfH-jqN.js} +1 -1
  109. package/dist/client/assets/{SessionObserve-pbozyqVv.js → SessionObserve-B-SkP3tu.js} +1 -1
  110. package/dist/client/assets/{SessionObserveEvidence-C54Xvbps.js → SessionObserveEvidence-CF5jnH3-.js} +1 -1
  111. package/dist/client/assets/SessionRefScreen-C-4jjmVG.js +1 -0
  112. package/dist/client/assets/SessionsScreen-HAjFvmIq.js +1 -0
  113. package/dist/client/assets/SettingsDrawer-DATxwZrn.js +3 -0
  114. package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
  115. package/dist/client/assets/SettingsScreen-Bu53X7J_.js +1 -0
  116. package/dist/client/assets/{ShikiPane-CiVH-45m.js → ShikiPane-DH8yYDks.js} +1 -1
  117. package/dist/client/assets/{SlidePanel-BLrLF9dt.js → SlidePanel-RFXJpfUa.js} +1 -1
  118. package/dist/client/assets/{SpriteAvatar-vpHO-rXs.js → SpriteAvatar-CEYdCzem.js} +1 -1
  119. package/dist/client/assets/{StatusPill-a3XBw1GG.js → StatusPill-9uy70ttd.js} +1 -1
  120. package/dist/client/assets/{TailView-C3rjOV7i.js → TailView-6bIrgdxN.js} +2 -2
  121. package/dist/client/assets/Terminal-BI6km7H4.js +1 -0
  122. package/dist/client/assets/TerminalEmbedScreen-D4JOWwtm.js +1 -0
  123. package/dist/client/assets/{TextDocumentSurface-B29xZNlI.js → TextDocumentSurface-BcP9vvji.js} +1 -1
  124. package/dist/client/assets/{TmuxPeek-eVfqPB4m.js → TmuxPeek-IaWqCgyJ.js} +1 -1
  125. package/dist/client/assets/{VoicePermissionsPanel-DpInOlVq.js → VoicePermissionsPanel-C80iZxgy.js} +1 -1
  126. package/dist/client/assets/{WorkDetailScreen-DYwgGaJs.js → WorkDetailScreen-CweZ6fEd.js} +3 -3
  127. package/dist/client/assets/WorkFilesViewer-Dy_-06iI.js +1 -0
  128. package/dist/client/assets/{activity-DTqqWiyV.js → activity-DS0u0Itf.js} +1 -1
  129. package/dist/client/assets/{addon-fit-CcaylYTX.js → addon-fit-CN888B3D.js} +1 -1
  130. package/dist/client/assets/{addon-webgl-B37iuzOG.js → addon-webgl-CoAnanQS.js} +1 -1
  131. package/dist/client/assets/{agent-essentials-DbbJm3ne.js → agent-essentials-CuK4G_zS.js} +1 -1
  132. package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
  133. package/dist/client/assets/{agent-lane-card-model-CSugZCdy.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
  134. package/dist/client/assets/{agent-lane-detail-D5EIlX7_.js → agent-lane-detail-BNNm6FNu.js} +1 -1
  135. package/dist/client/assets/{agent-lane-preview-BhplDYGf.js → agent-lane-preview-C33Dwpn7.js} +1 -1
  136. package/dist/client/assets/{agent-lanes-DlqcEf0l.css → agent-lanes-BDNktFBZ.css} +1 -1
  137. package/dist/client/assets/{agent-lanes-model-BKOs_32K.js → agent-lanes-model-VYQ5a68i.js} +2 -2
  138. package/dist/client/assets/{api-BHHEUSS3.js → api-BkjHJfgJ.js} +1 -1
  139. package/dist/client/assets/api-h5zurxmi.js +1 -0
  140. package/dist/client/assets/{arc.es-BRPqOKIx.js → arc.es-BET9ev6q.js} +1 -1
  141. package/dist/client/assets/arrow-down-DxxPnPwh.js +1 -0
  142. package/dist/client/assets/{arrow-left-B0CdJdAC.js → arrow-left-CXDkJuCg.js} +1 -1
  143. package/dist/client/assets/{arrow-up-right-CilNLf4t.js → arrow-up-right-Bj8RjSqW.js} +1 -1
  144. package/dist/client/assets/{bot-Ba3gcRVa.js → bot-BSGSicKC.js} +1 -1
  145. package/dist/client/assets/broker-display-pp33bLsu.js +2 -0
  146. package/dist/client/assets/{cache-BO2Bd_LV.js → cache-Dr0why2k.js} +1 -1
  147. package/dist/client/assets/{check-BdovFDz8.js → check-BfA0T8UD.js} +1 -1
  148. package/dist/client/assets/{chevron-down-Jh540uf3.js → chevron-down-BVg09D6U.js} +1 -1
  149. package/dist/client/assets/{chevron-right-CV7sEVBS.js → chevron-right-CaEwYkxE.js} +1 -1
  150. package/dist/client/assets/{chunk-HRAB3GC3-BYQZ1LOn.js → chunk-HRAB3GC3-HhKwnZCi.js} +1 -1
  151. package/dist/client/assets/chunk-JTPDIGGW-DX2eTIQ_.js +46 -0
  152. package/dist/client/assets/chunk-T65CQEWV-D-bOfuCH.js +1 -0
  153. package/dist/client/assets/chunk-YOZR3KYS-oS9dlQCI.js +2 -0
  154. package/dist/client/assets/{clock-DpfYdWcr.js → clock-C3TUL7D7.js} +1 -1
  155. package/dist/client/assets/{code-xml-CPzpZkhu.js → code-xml-Dbvjk9Kw.js} +1 -1
  156. package/dist/client/assets/collapsed-strip-Dz-of2SM.css +1 -0
  157. package/dist/client/assets/content-BQuEedeL.js +1 -0
  158. package/dist/client/assets/content-BUae-L_N.js +1 -0
  159. package/dist/client/assets/content-BfG98J1k.js +1 -0
  160. package/dist/client/assets/content-BkVTfkAC.js +1 -0
  161. package/dist/client/assets/content-BsNMos_d.js +1 -0
  162. package/dist/client/assets/content-C2TZOKSE.js +1 -0
  163. package/dist/client/assets/content-CCn98eSk.js +1 -0
  164. package/dist/client/assets/content-CJuH5cDP.js +1 -0
  165. package/dist/client/assets/content-CYnPp9yo.js +1 -0
  166. package/dist/client/assets/content-CcrUhm4P.js +1 -0
  167. package/dist/client/assets/content-CiOMtgQc.js +1 -0
  168. package/dist/client/assets/content-CxuVONeQ.js +1 -0
  169. package/dist/client/assets/content-Dmq9n1_L.js +1 -0
  170. package/dist/client/assets/content-DskHP2NI.js +1 -0
  171. package/dist/client/assets/content-DvvzL2HK.js +1 -0
  172. package/dist/client/assets/content-snCAUbwv.js +1 -0
  173. package/dist/client/assets/{conversation-icons-bHIIZ9z3.js → conversation-icons-DmC_Ak3z.js} +1 -1
  174. package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
  175. package/dist/client/assets/conversation-motion-features-DPiGTO21.js +1 -0
  176. package/dist/client/assets/{copy-DQAM0eSY.js → copy-C79v_7D-.js} +1 -1
  177. package/dist/client/assets/{createLucideIcon-Da0lq809.js → createLucideIcon-DCq_3fQn.js} +1 -1
  178. package/dist/client/assets/ctx-panel-B4s49N9e.css +1 -0
  179. package/dist/client/assets/discover-IEnbrH8_.js +2 -0
  180. package/dist/client/assets/embed-entry-XUPb-AzL.js +2 -0
  181. package/dist/client/assets/{external-link-BheHazeW.js → external-link-Dd8xaveL.js} +1 -1
  182. package/dist/client/assets/{eye-B908WSFH.js → eye-DkU59kfl.js} +1 -1
  183. package/dist/client/assets/{file-text-BGVkHS4_.js → file-text-BITQqGtF.js} +1 -1
  184. package/dist/client/assets/gestures-B5rLNRpi.js +1 -0
  185. package/dist/client/assets/home-moving-signal-Bs635mVw.js +1 -0
  186. package/dist/client/assets/home-moving-signal-CAa0V91u.css +1 -0
  187. package/dist/client/assets/home-now-card-VxlLjg1A.js +1 -0
  188. package/dist/client/assets/{home-now-card-nano-iwd10r9G.js → home-now-card-nano-C06GMiwD.js} +1 -1
  189. package/dist/client/assets/hooks-BWiLxTw1.js +2 -0
  190. package/dist/client/assets/index-9as_JTUs.css +1 -0
  191. package/dist/client/assets/index-BTj2MguM.js +1 -0
  192. package/dist/client/assets/index-BZovGpDk.js +10 -0
  193. package/dist/client/assets/index-CvF09yvf.css +1 -0
  194. package/dist/client/assets/index-DiiEQwdc.js +1 -0
  195. package/dist/client/assets/index-vbaJ8sin.js +1 -0
  196. package/dist/client/assets/inspector-panel-C96HcyK5.js +2 -0
  197. package/dist/client/assets/{keyboard-nav-feLCB3Zm.js → keyboard-nav-CHo_xmjw.js} +1 -1
  198. package/dist/client/assets/{lane-observe-vfyACHi0.js → lane-observe-BA3g9aVd.js} +1 -1
  199. package/dist/client/assets/{lane-roster-store-BAmj273z.js → lane-roster-store-B6ybJlHJ.js} +1 -1
  200. package/dist/client/assets/left-Bk3XnxPD.css +1 -0
  201. package/dist/client/assets/left-BuJ0wJW1.js +2 -0
  202. package/dist/client/assets/left-C6Zj3cR4.js +1 -0
  203. package/dist/client/assets/left-CCoobxPS.css +1 -0
  204. package/dist/client/assets/left-COMAiMfB.js +2 -0
  205. package/dist/client/assets/left-Ce4WKYPK.js +1 -0
  206. package/dist/client/assets/left-DMJkmJOF.js +1 -0
  207. package/dist/client/assets/left-DrCbY6ja.js +1 -0
  208. package/dist/client/assets/left-agents-BuSyVNGE.js +1 -0
  209. package/dist/client/assets/left-default-DRHywOKX.js +1 -0
  210. package/dist/client/assets/left-l92tw5Kc.js +1 -0
  211. package/dist/client/assets/left-lanes-4-aUyyrV.js +1 -0
  212. package/dist/client/assets/left-mission-e849d_Td.js +1 -0
  213. package/dist/client/assets/left-plan-MchYwAB_.js +2 -0
  214. package/dist/client/assets/library-DygjpA6u.js +1 -0
  215. package/dist/client/assets/{loader-circle-Be0T8xv2.js → loader-circle-B-l2Wj3-.js} +1 -1
  216. package/dist/client/assets/{local-agents-Q6KQ12B9.js → local-agents-Wof5knTJ.js} +1 -1
  217. package/dist/client/assets/{mentions-KNASbAjG.js → mentions-BjXfeF7t.js} +1 -1
  218. package/dist/client/assets/{mesh-ops-C-i8OMiM.js → mesh-ops-C1gq8zKf.js} +1 -1
  219. package/dist/client/assets/{mesh-view-store-B0lqpw8M.js → mesh-view-store-B56D3f77.js} +1 -1
  220. package/dist/client/assets/{message-circle-2v9Udia0.js → message-circle-BwVx5X0q.js} +1 -1
  221. package/dist/client/assets/{message-markup-BP2nH9kQ.js → message-markup-DlVX-iuc.js} +1 -1
  222. package/dist/client/assets/{message-square-DURSOrUr.js → message-square-BnkG6tae.js} +1 -1
  223. package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
  224. package/dist/client/assets/{mission-control-store-HeCy97KT.js → mission-control-store-CMgIVjLJ.js} +1 -1
  225. package/dist/client/assets/model-Co0zkMIc.js +1 -0
  226. package/dist/client/assets/{observe-DkAhvkfn.js → observe-DVHAcIrv.js} +1 -1
  227. package/dist/client/assets/{operator-attention-BqoWAlhp.js → operator-attention-BwSPeheT.js} +1 -1
  228. package/dist/client/assets/{page-status-CEP5pGf3.js → page-status-Bg2hd27j.js} +1 -1
  229. package/dist/client/assets/paperclip-DblaLD_N.js +1 -0
  230. package/dist/client/assets/plan-view-D56fneVF.css +1 -0
  231. package/dist/client/assets/{plus-ZReaTFF-.js → plus-BAI0t5g9.js} +1 -1
  232. package/dist/client/assets/profile-3Q4sUtvJ.js +1 -0
  233. package/dist/client/assets/projects-inbox-Da2hYEn6.js +1 -0
  234. package/dist/client/assets/{radio-BC9TO5Pl.js → radio-BGtkyCG9.js} +1 -1
  235. package/dist/client/assets/{refresh-cw-C4E58VJK.js → refresh-cw-DtF8xPqX.js} +1 -1
  236. package/dist/client/assets/resolve-panes-D4tlKNCT.js +1 -0
  237. package/dist/client/assets/resolve-sidebar-context-B27lj3Ci.js +1 -0
  238. package/dist/client/assets/right-B8qg3JdB.js +1 -0
  239. package/dist/client/assets/{right-BarpRgcv.js → right-BU_W1kSH.js} +1 -1
  240. package/dist/client/assets/right-BlR7h0US.js +1 -0
  241. package/dist/client/assets/right-BwgwTGGd.js +1 -0
  242. package/dist/client/assets/right-ByptvkVX.js +1 -0
  243. package/dist/client/assets/right-CUP-NIDG.js +1 -0
  244. package/dist/client/assets/right-Ch_jrNe2.js +1 -0
  245. package/dist/client/assets/right-Dd2DscRz.js +1 -0
  246. package/dist/client/assets/right-DmVHd8Xj.js +1 -0
  247. package/dist/client/assets/{right-CIzaNH58.js → right-c4PAdFYZ.js} +1 -1
  248. package/dist/client/assets/{rocket-BahfIwFz.js → rocket-BWh18pt_.js} +1 -1
  249. package/dist/client/assets/router-63XV_E7f.js +1 -0
  250. package/dist/client/assets/{text-B2UZi3l9.js → runtime-picker-BXKJbLot.js} +1 -1
  251. package/dist/client/assets/runtime-picker-vhm0gtLs.css +1 -0
  252. package/dist/client/assets/{scope-views-CmG2X_S0.js → scope-views-Dm2_-NPi.js} +1 -1
  253. package/dist/client/assets/scout-voice-D8Q5sZOL.js +1 -0
  254. package/dist/client/assets/{scoutbot-D4vuKzOL.js → scoutbot-BTIErYHo.js} +2 -2
  255. package/dist/client/assets/{scroll-text-uulNqrf7.js → scroll-text-DZb3mmYo.js} +1 -1
  256. package/dist/client/assets/{search-HmdKXdtR.js → search-1QMVOxF3.js} +1 -1
  257. package/dist/client/assets/secondaryNavConfig-c0cz3MkJ.js +1 -0
  258. package/dist/client/assets/{selection-bridge-n4wNTm1B.js → selection-bridge-O9C4kGfF.js} +1 -1
  259. package/dist/client/assets/{send-horizontal-DOjHkZCD.js → send-horizontal-DbyEkGql.js} +1 -1
  260. package/dist/client/assets/{server-CX-xQjJA.js → server-Bncn9S7r.js} +1 -1
  261. package/dist/client/assets/{session-catalog-b7B1Sof1.js → session-catalog-DC6BlBBC.js} +1 -1
  262. package/dist/client/assets/{session-table-Djain1Qr.js → session-table-BUPq9Viy.js} +1 -1
  263. package/dist/client/assets/{sliders-horizontal-D2O6QiDN.js → sliders-horizontal-CMe8Bay1.js} +1 -1
  264. package/dist/client/assets/{sparkles-CgTby-ap.js → sparkles-_7cTZsIH.js} +1 -1
  265. package/dist/client/assets/{sse-QSbhyq9A.js → sse-Bb0EOcU9.js} +1 -1
  266. package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
  267. package/dist/client/assets/{tail-display-DcliDVkW.js → tail-display-BRcJltQa.js} +1 -1
  268. package/dist/client/assets/{tail-events-B7BrDaFi.js → tail-events-C12pfUax.js} +1 -1
  269. package/dist/client/assets/{terminal-relay-C2TUIuh1.js → terminal-relay-BgfVJXIL.js} +1 -1
  270. package/dist/client/assets/{terminal-sessions-D4dHTRkt.js → terminal-sessions-AmSgHklm.js} +1 -1
  271. package/dist/client/assets/{terminal-takeover-BArLfNtd.js → terminal-takeover--05EYhJm.js} +1 -1
  272. package/dist/client/assets/{terminal-DNZTCr6a.js → terminal-xGf_F3y7.js} +1 -1
  273. package/dist/client/assets/text-DsBWV_4k.js +1 -0
  274. package/dist/client/assets/{use-conversation-list-htp0Ui63.js → use-conversation-list-DWX02INv.js} +1 -1
  275. package/dist/client/assets/{use-fleet-active-asks-BhuTn5mV.js → use-fleet-active-asks-Cnwa4hTK.js} +1 -1
  276. package/dist/client/assets/{use-mesh-ops-items-CD-qsvNX.js → use-mesh-ops-items-BRFm37oY.js} +1 -1
  277. package/dist/client/assets/use-reduced-motion-C8cWvIZ3.js +1 -0
  278. package/dist/client/assets/use-scout-dev-flags-FkMreOOb.js +1 -0
  279. package/dist/client/assets/{useAgentHoverCard-BIrm8esH.js → useAgentHoverCard-DvPZSJK3.js} +1 -1
  280. package/dist/client/assets/useContentSecondaryNav-CNlrhvvx.js +1 -0
  281. package/dist/client/assets/{usePierreRuntime-CVTMzChM.js → usePierreRuntime-C8WJ0X3F.js} +1 -1
  282. package/dist/client/assets/{wrench-DwFKomxg.js → wrench-_tHBGTop.js} +1 -1
  283. package/dist/client/assets/{x-DuzAbpk5.js → x-CrGUKNRv.js} +1 -1
  284. package/dist/client/assets/{xterm-xQGYNyB-.js → xterm-Ks-VlLTq.js} +1 -1
  285. package/dist/client/index.html +2 -2
  286. package/dist/main.mjs +38 -169
  287. package/dist/node/main.mjs +240 -272
  288. package/dist/pairing-runtime-controller.mjs +476 -394
  289. package/dist/runtime/base-daemon.mjs +121 -49
  290. package/dist/runtime/broker-daemon.mjs +60 -171
  291. package/dist/runtime/broker-process-manager.mjs +0 -6
  292. package/dist/runtime/mesh-discover.mjs +0 -6
  293. package/dist/scout-control-plane-web.mjs +477 -672
  294. package/dist/scout-web-server.mjs +477 -672
  295. package/package.json +7 -6
  296. package/dist/client/assets/ActivityScreen-DRHTQIxu.js +0 -1
  297. package/dist/client/assets/AgentAvatar-CQqJcwOQ.js +0 -1
  298. package/dist/client/assets/AgentAvatar-CUZZARWG.css +0 -1
  299. package/dist/client/assets/AgentConfigurationScreen-C3OI6JmZ.js +0 -1
  300. package/dist/client/assets/AgentDefinitionsWorkspace-D0LDEqfl.js +0 -1
  301. package/dist/client/assets/AgentFloorView-CoGh2q5f.js +0 -1
  302. package/dist/client/assets/AgentInfoScreen-5ybfIL9p.js +0 -1
  303. package/dist/client/assets/AgentLaneDetailSheet-BD8B51ka.js +0 -4
  304. package/dist/client/assets/AgentLanesEmbedScreen-FRTVASPw.js +0 -1
  305. package/dist/client/assets/AgentLanesView-Bm85ittm.js +0 -2
  306. package/dist/client/assets/AgentSessions-C_tAfGN2.js +0 -6
  307. package/dist/client/assets/AgentsConsole-DsHWsaOJ.js +0 -1
  308. package/dist/client/assets/AgentsScreen-Bod6AHlA.js +0 -1
  309. package/dist/client/assets/AgentsSubnav-CsvYzzQ-.js +0 -1
  310. package/dist/client/assets/AstronautSuit-C05Ezxl9.js +0 -1
  311. package/dist/client/assets/BackToPicker-CXsbxbHM.js +0 -1
  312. package/dist/client/assets/BriefingDetailScreen-Uvnk3t0v.js +0 -1
  313. package/dist/client/assets/BrokerScreen-LZ3T7hGG.js +0 -5
  314. package/dist/client/assets/Canvas-BO9mx5_P.js +0 -1
  315. package/dist/client/assets/ChatCollapsedStrip-CtLPTLTY.js +0 -1
  316. package/dist/client/assets/ConversationComposer-DPWu3HvK.js +0 -1
  317. package/dist/client/assets/ConversationFeedRows-MhcPfxUr.js +0 -1
  318. package/dist/client/assets/ConversationHeader-Ce7TENb9.js +0 -1
  319. package/dist/client/assets/ConversationPanels-D-b5SLO-.js +0 -6
  320. package/dist/client/assets/ConversationScreen-C5HnXd5w.css +0 -1
  321. package/dist/client/assets/ConversationScreen-D77SoLos.js +0 -1
  322. package/dist/client/assets/ConversationStatus-lIvSKRic.js +0 -1
  323. package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +0 -1
  324. package/dist/client/assets/CrewWorkspaces-CdojnRMG.js +0 -1
  325. package/dist/client/assets/DocumentFocusViewer-CetjnYut.js +0 -1
  326. package/dist/client/assets/FlightObserveScreen-sqvt7HUO.js +0 -1
  327. package/dist/client/assets/HarnessesScreen-CGhRsqD5.js +0 -1
  328. package/dist/client/assets/HomeHero-7JwycwFY.css +0 -1
  329. package/dist/client/assets/HomeHero-DdxTQ-6a.js +0 -1
  330. package/dist/client/assets/HostAdvisorView-BAUi5ZxX.js +0 -1
  331. package/dist/client/assets/KnowledgeSearchScreen-CRei9pyl.js +0 -1
  332. package/dist/client/assets/LaneTraceDetailSheet-CFsCvKa3.js +0 -1
  333. package/dist/client/assets/MeshScreen-dxNxRtKm.js +0 -1
  334. package/dist/client/assets/MessagesScreen-CR5v-WIE.js +0 -1
  335. package/dist/client/assets/MissionControlView-BGj1qnI2.js +0 -1
  336. package/dist/client/assets/MissionFocusOverlay-hWi6y87j.js +0 -1
  337. package/dist/client/assets/MissionLeftAgentRow-BSRRiiig.js +0 -1
  338. package/dist/client/assets/MissionLogPane-bbG_pM9B.js +0 -1
  339. package/dist/client/assets/NewChatComposer-BPsg8shF.js +0 -19
  340. package/dist/client/assets/ObserveEmbedScreen-Be87Chod.js +0 -2
  341. package/dist/client/assets/ObserveTextFlow-CKYltTPJ.js +0 -2
  342. package/dist/client/assets/ObservedTopologyPanel-CfHYu-4Z.js +0 -2
  343. package/dist/client/assets/OpenScoutAppShell-DPeP1vtK.js +0 -88
  344. package/dist/client/assets/OpsAgentsView-dEtw9yt-.js +0 -1
  345. package/dist/client/assets/OpsScreen-QXRJY8Vf.js +0 -1
  346. package/dist/client/assets/OpsSubnav-BK9Fj3gU.js +0 -1
  347. package/dist/client/assets/ProjectAgentProfile-BjykZ2Xd.js +0 -1
  348. package/dist/client/assets/ProjectAgentProfileHero-Bc0g8rhW.js +0 -1
  349. package/dist/client/assets/ProjectsInbox--ZIqo-IE.js +0 -2
  350. package/dist/client/assets/ProjectsRail-CzS0qTCI.js +0 -1
  351. package/dist/client/assets/ProjectsScreen-0gx7f30h.js +0 -1
  352. package/dist/client/assets/ProjectsThreadAside-BsQRFbdy.js +0 -1
  353. package/dist/client/assets/Provider-Cd-QZltN.js +0 -1
  354. package/dist/client/assets/RailRow-B0sRaJc6.css +0 -1
  355. package/dist/client/assets/RailRow-BY6fxePa.js +0 -1
  356. package/dist/client/assets/RawSessionsTable-CbopOF34.js +0 -1
  357. package/dist/client/assets/RealtimeVoiceScreen-CU4uXz4C.js +0 -9
  358. package/dist/client/assets/RepoDiffViewer-CiTOWK_Z.js +0 -7
  359. package/dist/client/assets/RepoDiffViewerLazy-BU3V7Kwq.js +0 -2
  360. package/dist/client/assets/ScoutDeckSurface-BncYKicb.js +0 -1
  361. package/dist/client/assets/SessionRefScreen-UVNVrwAf.js +0 -1
  362. package/dist/client/assets/SessionsScreen-KeDb5gz4.js +0 -1
  363. package/dist/client/assets/SettingsDrawer-CWdj0VvN.js +0 -3
  364. package/dist/client/assets/SettingsDrawer-J-8x1eII.css +0 -1
  365. package/dist/client/assets/SettingsScreen-C7zJgZzj.js +0 -1
  366. package/dist/client/assets/Terminal-CMQFmHnn.js +0 -1
  367. package/dist/client/assets/TerminalEmbedScreen-GvpoGERN.js +0 -1
  368. package/dist/client/assets/TerminalRelay-CIHlLVf1.js +0 -46
  369. package/dist/client/assets/WorkFilesViewer-C7H5fXaZ.js +0 -1
  370. package/dist/client/assets/agent-autocomplete-cOPLtuhM.js +0 -2
  371. package/dist/client/assets/agent-identity-CIMT7oV6.js +0 -1
  372. package/dist/client/assets/agent-specialization-D3-sqwhU.js +0 -1
  373. package/dist/client/assets/api-DEHEgJ9m.js +0 -1
  374. package/dist/client/assets/archive-DPMdoW_D.js +0 -1
  375. package/dist/client/assets/arrow-right-YRBoTTyf.js +0 -1
  376. package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
  377. package/dist/client/assets/collapsed-strip-raJWthAH.css +0 -1
  378. package/dist/client/assets/compass-D5Io6BIV.js +0 -1
  379. package/dist/client/assets/content-3b_jmxEx.js +0 -1
  380. package/dist/client/assets/content-B-i0XY-t.js +0 -1
  381. package/dist/client/assets/content-BD-DNFmb.js +0 -1
  382. package/dist/client/assets/content-BGeo5tgd.js +0 -1
  383. package/dist/client/assets/content-BMvXPLiQ.js +0 -1
  384. package/dist/client/assets/content-BWTbfMDg.js +0 -1
  385. package/dist/client/assets/content-BwCmeUmF.js +0 -1
  386. package/dist/client/assets/content-C1K3NcZa.js +0 -1
  387. package/dist/client/assets/content-C34J5_Af.js +0 -1
  388. package/dist/client/assets/content-CGRtIS2m.js +0 -1
  389. package/dist/client/assets/content-CIJo_-JS.js +0 -1
  390. package/dist/client/assets/content-CvqIqVAV.js +0 -1
  391. package/dist/client/assets/content-DRnwm-Vu.js +0 -1
  392. package/dist/client/assets/content-Dh39SSvP.js +0 -1
  393. package/dist/client/assets/content-DoypqDj5.js +0 -1
  394. package/dist/client/assets/content-n3mvc6NQ.js +0 -1
  395. package/dist/client/assets/conversation-model-CIzM7aXT.js +0 -1
  396. package/dist/client/assets/conversation-motion-features-CrP5K-dk.js +0 -1
  397. package/dist/client/assets/cpu-CtQc0Z9D.js +0 -1
  398. package/dist/client/assets/credentials-qwds23lv.js +0 -1
  399. package/dist/client/assets/ctx-panel-D_HJ3nhb.css +0 -1
  400. package/dist/client/assets/discover-DdkMhTAV.js +0 -2
  401. package/dist/client/assets/embed-entry-DoSM1GZB.js +0 -2
  402. package/dist/client/assets/file-code-corner-C5Pc6znt.js +0 -1
  403. package/dist/client/assets/gauge-sc_gb5Zw.js +0 -1
  404. package/dist/client/assets/gestures-AzPBSf20.js +0 -1
  405. package/dist/client/assets/git-branch-CdJU49Af.js +0 -1
  406. package/dist/client/assets/home-moving-signal-CZo2bYBi.js +0 -1
  407. package/dist/client/assets/home-moving-signal-DMguaRWR.css +0 -1
  408. package/dist/client/assets/home-now-card-DgxfZHcR.js +0 -1
  409. package/dist/client/assets/hooks-CeCCO6Yg.js +0 -2
  410. package/dist/client/assets/host-advisor-B2Fqs5Dd.css +0 -1
  411. package/dist/client/assets/index-BIiI9gfa.js +0 -1
  412. package/dist/client/assets/index-CD2foMB8.js +0 -1
  413. package/dist/client/assets/index-DReHD_4U.js +0 -1
  414. package/dist/client/assets/index-DzlEgstl.css +0 -1
  415. package/dist/client/assets/index-NRbRrZw-.js +0 -10
  416. package/dist/client/assets/index-wLwc74Pu.css +0 -1
  417. package/dist/client/assets/inspector-panel-CBf8pW7s.js +0 -2
  418. package/dist/client/assets/layers-D9fblkql.js +0 -1
  419. package/dist/client/assets/layout-grid-Vd1chalc.js +0 -1
  420. package/dist/client/assets/left-41_3QKk1.js +0 -1
  421. package/dist/client/assets/left-B3ofA1Pr.js +0 -2
  422. package/dist/client/assets/left-BWBZQhxQ.js +0 -1
  423. package/dist/client/assets/left-BhA6essi.js +0 -1
  424. package/dist/client/assets/left-BmTKCv4f.js +0 -1
  425. package/dist/client/assets/left-CCGR6tIF.js +0 -2
  426. package/dist/client/assets/left-DH44V4I_.css +0 -1
  427. package/dist/client/assets/left-Dfwzkwh_.js +0 -1
  428. package/dist/client/assets/left-R2OOE7VG.css +0 -1
  429. package/dist/client/assets/left-advisor-yrzW1Kwz.js +0 -1
  430. package/dist/client/assets/left-agents-Bgahk0FF.js +0 -1
  431. package/dist/client/assets/left-default-CtkfAquc.js +0 -1
  432. package/dist/client/assets/left-lanes-CpujaVN3.js +0 -1
  433. package/dist/client/assets/left-mission-Bbd-fW6W.js +0 -1
  434. package/dist/client/assets/library-Dx14WNGd.js +0 -1
  435. package/dist/client/assets/mission-control-CnU7dNt1.css +0 -1
  436. package/dist/client/assets/persistent-state-Bm_0TmZL.js +0 -1
  437. package/dist/client/assets/profile-Y0X7HZHc.js +0 -1
  438. package/dist/client/assets/projects-inbox-Cbfj4Hx7.js +0 -1
  439. package/dist/client/assets/provider-Bq0ScH3v.js +0 -1
  440. package/dist/client/assets/proxy-DtC2iXnT.js +0 -1
  441. package/dist/client/assets/resolve-panes-BI3WdDS-.js +0 -1
  442. package/dist/client/assets/resolve-sidebar-context-_g0pIxOr.js +0 -1
  443. package/dist/client/assets/right-BA0F8fPI.js +0 -1
  444. package/dist/client/assets/right-C4GXB45w.js +0 -1
  445. package/dist/client/assets/right-CXetlD8X.js +0 -1
  446. package/dist/client/assets/right-CnRcQS_I.js +0 -1
  447. package/dist/client/assets/right-D2_rmbAH.js +0 -1
  448. package/dist/client/assets/right-Dqp--KwX.js +0 -1
  449. package/dist/client/assets/right-HJJzRuGD.js +0 -1
  450. package/dist/client/assets/right-WCMb8YXJ.js +0 -1
  451. package/dist/client/assets/router-Bx1tiwVe.js +0 -1
  452. package/dist/client/assets/scout-voice-BT3gYDhU.js +0 -1
  453. package/dist/client/assets/scoutbot-markdown-DIhLsYxz.js +0 -6
  454. package/dist/client/assets/secondaryNavConfig-BVQiyAXu.js +0 -1
  455. package/dist/client/assets/settings-BpKRzxOD.js +0 -1
  456. package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +0 -1
  457. package/dist/client/assets/text-rLpBg4_z.css +0 -1
  458. package/dist/client/assets/use-reduced-motion-0fAsybdo.js +0 -1
  459. package/dist/client/assets/use-scout-dev-flags-DV_I6URU.js +0 -1
  460. package/dist/client/assets/useContentSecondaryNav-4atpGgFw.js +0 -1
  461. package/dist/client/assets/usePersistentState-InmPXIN4.js +0 -1
  462. package/dist/client/assets/zap-CocRNtyr.js +0 -1
  463. package/dist/client/crew/brik-bust.webp +0 -0
  464. package/dist/client/crew/brik-chip-id.webp +0 -0
  465. package/dist/client/crew/lulu-bust.webp +0 -0
  466. package/dist/client/crew/milo-bust.webp +0 -0
  467. package/dist/client/crew/milo-chip-id.webp +0 -0
  468. package/dist/client/crew/nori-bust.webp +0 -0
  469. package/dist/client/crew/sheets/eye-plate-v1/blink-half.webp +0 -0
  470. package/dist/client/crew/sheets/eye-plate-v1/blink-shut.webp +0 -0
  471. package/dist/client/crew/sheets/eye-plate-v1/look-left.webp +0 -0
  472. package/dist/client/crew/sheets/eye-plate-v1/look-right.webp +0 -0
  473. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  474. package/dist/client/crew/sheets/eye-plate-v1/rest.webp +0 -0
  475. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  476. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  477. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  478. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  479. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  480. package/dist/client/crew/sprout-bust.webp +0 -0
  481. package/dist/client/crew/sprout-chip-id.webp +0 -0
  482. package/dist/client/crew/vex-bust.webp +0 -0
  483. package/dist/client/crew/vex-chip-id.webp +0 -0
  484. package/dist/client/crew/wrench-bust.webp +0 -0
  485. package/dist/client/crew/wrench-chip-id.webp +0 -0
  486. /package/dist/client/assets/{DocumentFocusViewer-BSC_JwVE.css → document-focus-viewer-BSC_JwVE.css} +0 -0
@@ -123,236 +123,28 @@ function ensureOpenScoutCleanSlateSync() {
123
123
  var OPENSCOUT_RPC_CUTOVER_MARKER = "rpc-runtime-cutover-v1";
124
124
  var init_support_paths = () => {};
125
125
 
126
- // ../runtime/src/node-identity.ts
127
- import {
128
- createHash,
129
- createPrivateKey,
130
- createPublicKey,
131
- generateKeyPairSync,
132
- randomBytes,
133
- sign,
134
- verify
135
- } from "crypto";
126
+ // ../runtime/src/local-config.ts
136
127
  import {
137
- chmodSync,
138
128
  existsSync as existsSync2,
139
129
  mkdirSync as mkdirSync2,
140
130
  readFileSync,
141
131
  renameSync,
142
- rmSync as rmSync2,
143
132
  writeFileSync as writeFileSync2
144
133
  } from "fs";
145
- import { dirname, join as join2 } from "path";
146
- function stripBonjourCollisionSuffix(value) {
147
- if (!value || typeof value !== "string")
148
- return "";
149
- let trimmed = value.trim();
150
- const isDotLocal = /\.local\.?$/i.test(trimmed);
151
- if (isDotLocal) {
152
- trimmed = trimmed.replace(/\.local\.?$/i, "");
153
- }
154
- const isHyphenLocalOpenscout = /-local-openscout$/i.test(trimmed);
155
- const isHyphenLocal = !isHyphenLocalOpenscout && /-local$/i.test(trimmed);
156
- if (isHyphenLocalOpenscout) {
157
- trimmed = trimmed.replace(/-local-openscout$/i, "");
158
- } else if (isHyphenLocal) {
159
- trimmed = trimmed.replace(/-local$/i, "");
160
- }
161
- if (!isDotLocal && !isHyphenLocalOpenscout && !isHyphenLocal) {
162
- return trimmed;
163
- }
164
- trimmed = trimmed.replace(/(?<=[a-zA-Z].*?)(?:-\d+)+$/, "");
165
- if (isDotLocal)
166
- return `${trimmed}.local`;
167
- if (isHyphenLocalOpenscout)
168
- return `${trimmed}-local-openscout`;
169
- if (isHyphenLocal)
170
- return `${trimmed}-local`;
171
- return trimmed;
172
- }
173
- function nodeIdentityPath(supportDirectory) {
174
- const dir = supportDirectory ?? resolveOpenScoutSupportPaths().supportDirectory;
175
- return join2(dir, NODE_IDENTITY_FILE);
176
- }
177
- function loadOrCreateNodeIdentity(supportDirectory) {
178
- const path = nodeIdentityPath(supportDirectory);
179
- if (existsSync2(path)) {
180
- return readAndValidateNodeIdentity(path);
181
- }
182
- return createNodeIdentity(supportDirectory);
183
- }
184
- function readStableNodeQualifier(supportDirectory) {
185
- const path = nodeIdentityPath(supportDirectory);
186
- const cached = stableNodeQualifierCache.get(path);
187
- if (cached) {
188
- return cached;
189
- }
190
- if (!existsSync2(path)) {
191
- return null;
192
- }
193
- const nodeQualifier = normalizeNodeQualifier(readAndValidateNodeIdentity(path).nodeQualifier);
194
- if (nodeQualifier) {
195
- stableNodeQualifierCache.set(path, nodeQualifier);
196
- }
197
- return nodeQualifier || null;
198
- }
199
- function readAndValidateNodeIdentity(path) {
200
- let parsed;
201
- try {
202
- parsed = JSON.parse(readFileSync(path, "utf8"));
203
- } catch {
204
- throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
205
- }
206
- if (parsed.version !== 1 || !parsed.publicKey || !parsed.privateKey) {
207
- throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
208
- }
209
- if (parsed.nodeQualifier !== undefined && normalizePersistedNodeQualifier(parsed.nodeQualifier) !== parsed.nodeQualifier) {
210
- throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
211
- }
212
- try {
213
- const derived = createPublicKey(importPrivateKey(parsed.privateKey)).export({ type: "spki", format: "der" }).toString("base64");
214
- if (derived !== parsed.publicKey) {
215
- throw new Error("mismatch");
216
- }
217
- } catch {
218
- throw new Error(`Node identity at ${path} has mismatched or invalid keys; remove it to generate a fresh one.`);
219
- }
220
- return parsed;
221
- }
222
- function normalizePersistedNodeQualifier(value) {
223
- return typeof value === "string" ? value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") : "";
224
- }
225
- function normalizeNodeQualifier(value) {
226
- return stripBonjourCollisionSuffix(normalizePersistedNodeQualifier(value));
227
- }
228
- function createNodeIdentity(supportDirectory) {
229
- if (!supportDirectory) {
230
- assertTestIsolatedUserData("write the node identity", "OPENSCOUT_SUPPORT_DIRECTORY");
231
- }
232
- const path = nodeIdentityPath(supportDirectory);
233
- const { publicKey, privateKey } = generateKeyPairSync("ed25519");
234
- const identity = {
235
- version: 1,
236
- publicKey: publicKey.export({ type: "spki", format: "der" }).toString("base64"),
237
- privateKey: privateKey.export({ type: "pkcs8", format: "der" }).toString("base64"),
238
- createdAt: Date.now()
239
- };
240
- mkdirSync2(dirname(path), { recursive: true });
241
- try {
242
- writeFileSync2(path, `${JSON.stringify(identity, null, 2)}
243
- `, { encoding: "utf8", mode: 384, flag: "wx" });
244
- } catch (error) {
245
- if (error.code === "EEXIST") {
246
- return readAndValidateNodeIdentity(path);
247
- }
248
- throw error;
249
- }
250
- try {
251
- chmodSync(path, 384);
252
- } catch {}
253
- return identity;
254
- }
255
- function nodeKeyId(publicKeyBase64) {
256
- return createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest("hex");
257
- }
258
- function nodeFingerprint(publicKeyBase64) {
259
- const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
260
- const encoded = base32Encode(digest.subarray(0, 10)).toLowerCase();
261
- return `${NODE_FINGERPRINT_PREFIX}:${encoded.slice(0, 4)}-${encoded.slice(4, 8)}`;
262
- }
263
- function signNodePayload(identity, payload) {
264
- const key = importPrivateKey(identity.privateKey);
265
- return sign(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key).toString("base64");
266
- }
267
- function verifyNodeSignature(publicKeyBase64, payload, signatureBase64) {
268
- try {
269
- const key = importPublicKey(publicKeyBase64);
270
- return verify(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key, Buffer.from(signatureBase64, "base64"));
271
- } catch {
272
- return false;
273
- }
274
- }
275
- function canonicalJson(value) {
276
- if (value === null || typeof value !== "object") {
277
- return JSON.stringify(value);
278
- }
279
- if (Array.isArray(value)) {
280
- return `[${value.map(canonicalJson).join(",")}]`;
281
- }
282
- const record = value;
283
- const keys = Object.keys(record).sort();
284
- return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record[key])}`).join(",")}}`;
285
- }
286
- function verifySignedNodeCard(card, now = Date.now()) {
287
- if (nodeKeyId(card.publicKey) !== card.keyId) {
288
- return false;
289
- }
290
- if (nodeFingerprint(card.publicKey) !== card.fingerprint) {
291
- return false;
292
- }
293
- if (!Number.isFinite(card.expiresAt) || card.expiresAt <= now) {
294
- return false;
295
- }
296
- if (card.tls !== undefined) {
297
- if (typeof card.tls !== "object" || card.tls === null || typeof card.tls.spkiFingerprint !== "string" || !/^[0-9a-f]{64}$/.test(card.tls.spkiFingerprint)) {
298
- return false;
299
- }
300
- }
301
- const { signature, ...unsigned } = card;
302
- return verifyNodeSignature(card.publicKey, canonicalJson(unsigned), signature);
303
- }
304
- function base32Encode(input) {
305
- let bits = 0;
306
- let value = 0;
307
- let output = "";
308
- for (const byte of input) {
309
- value = value << 8 | byte;
310
- bits += 8;
311
- while (bits >= 5) {
312
- output += BASE32_ALPHABET[value >>> bits - 5 & 31];
313
- bits -= 5;
314
- }
315
- }
316
- if (bits > 0) {
317
- output += BASE32_ALPHABET[value << 5 - bits & 31];
318
- }
319
- return output;
320
- }
321
- function importPrivateKey(privateKeyBase64) {
322
- return createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
323
- }
324
- function importPublicKey(publicKeyBase64) {
325
- return createPublicKey({ key: Buffer.from(publicKeyBase64, "base64"), format: "der", type: "spki" });
326
- }
327
- var NODE_IDENTITY_FILE = "node-identity.json", NODE_FINGERPRINT_PREFIX = "osc1", NODE_CARD_TTL_MS, stableNodeQualifierCache, BASE32_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
328
- var init_node_identity = __esm(() => {
329
- init_support_paths();
330
- NODE_CARD_TTL_MS = 24 * 60 * 60 * 1000;
331
- stableNodeQualifierCache = new Map;
332
- });
333
-
334
- // ../runtime/src/local-config.ts
335
- import {
336
- existsSync as existsSync3,
337
- mkdirSync as mkdirSync3,
338
- readFileSync as readFileSync2,
339
- renameSync as renameSync2,
340
- writeFileSync as writeFileSync3
341
- } from "fs";
342
134
  import { homedir as homedir2, hostname as osHostname } from "os";
343
- import { dirname as dirname2, join as join3 } from "path";
135
+ import { dirname, join as join2 } from "path";
344
136
  function localConfigHome() {
345
- return process.env.OPENSCOUT_HOME ?? join3(homedir2(), ".openscout");
137
+ return process.env.OPENSCOUT_HOME ?? join2(homedir2(), ".openscout");
346
138
  }
347
139
  function localConfigPath() {
348
- return join3(localConfigHome(), "config.json");
140
+ return join2(localConfigHome(), "config.json");
349
141
  }
350
142
  function loadLocalConfig() {
351
143
  const configPath = localConfigPath();
352
- if (!existsSync3(configPath))
144
+ if (!existsSync2(configPath))
353
145
  return { version: LOCAL_CONFIG_VERSION };
354
146
  try {
355
- return validateLocalConfig(JSON.parse(readFileSync2(configPath, "utf8")));
147
+ return validateLocalConfig(JSON.parse(readFileSync(configPath, "utf8")));
356
148
  } catch {
357
149
  return { version: LOCAL_CONFIG_VERSION };
358
150
  }
@@ -436,7 +228,6 @@ function resolveHost() {
436
228
  var LOCAL_CONFIG_VERSION = 1, DEFAULT_SCOUT_WEB_PORTAL_HOST = "scout.local", DEFAULT_SCOUT_WEB_DEV_HOST, OPENSCOUT_PORTS, DEFAULT_LOCAL_CONFIG;
437
229
  var init_local_config = __esm(() => {
438
230
  init_support_paths();
439
- init_node_identity();
440
231
  DEFAULT_SCOUT_WEB_DEV_HOST = `dev.${DEFAULT_SCOUT_WEB_PORTAL_HOST}`;
441
232
  OPENSCOUT_PORTS = {
442
233
  broker: 43110,
@@ -461,7 +252,7 @@ var init_local_config = __esm(() => {
461
252
  });
462
253
 
463
254
  // ../runtime/src/open-scout-network.ts
464
- import { readFileSync as readFileSync3 } from "fs";
255
+ import { readFileSync as readFileSync2 } from "fs";
465
256
  function defaultOpenScoutNetworkSettings() {
466
257
  return {
467
258
  discoveryEnabled: false,
@@ -482,7 +273,7 @@ function normalizeOpenScoutNetworkSettings(input) {
482
273
  }
483
274
  function readOpenScoutNetworkSettingsSync() {
484
275
  try {
485
- const raw = readFileSync3(resolveOpenScoutSupportPaths().settingsPath, "utf8");
276
+ const raw = readFileSync2(resolveOpenScoutSupportPaths().settingsPath, "utf8");
486
277
  const parsed = JSON.parse(raw);
487
278
  const network = isRecord(parsed) && isRecord(parsed.network) ? parsed.network : {};
488
279
  return normalizeOpenScoutNetworkSettings(isRecord(network.openScoutNetwork) ? network.openScoutNetwork : {});
@@ -525,7 +316,7 @@ var init_open_scout_network = __esm(() => {
525
316
  // ../agent-sessions/src/codex-executable.ts
526
317
  import { execFileSync } from "child_process";
527
318
  import { accessSync, constants } from "fs";
528
- import { delimiter, join as join4 } from "path";
319
+ import { delimiter, join as join3 } from "path";
529
320
  function isExecutable(filePath) {
530
321
  if (!filePath)
531
322
  return false;
@@ -569,11 +360,11 @@ function codexAppBundleCandidates(env) {
569
360
  const appNames = ["Codex.app", "ChatGPT.app"];
570
361
  const candidates = appNames.flatMap((appName) => [
571
362
  {
572
- path: join4("/Applications", appName, "Contents", "Resources", "codex"),
363
+ path: join3("/Applications", appName, "Contents", "Resources", "codex"),
573
364
  source: "codex_app_bundle"
574
365
  },
575
366
  {
576
- path: join4(env.HOME ?? "", "Applications", appName, "Contents", "Resources", "codex"),
367
+ path: join3(env.HOME ?? "", "Applications", appName, "Contents", "Resources", "codex"),
577
368
  source: "codex_app_bundle"
578
369
  }
579
370
  ]);
@@ -581,7 +372,7 @@ function codexAppBundleCandidates(env) {
581
372
  }
582
373
  function pathCandidates(env) {
583
374
  return (env.PATH ?? "").split(delimiter).filter(Boolean).map((directory) => ({
584
- path: join4(directory, "codex"),
375
+ path: join3(directory, "codex"),
585
376
  source: "path"
586
377
  }));
587
378
  }
@@ -592,7 +383,7 @@ function commonCandidates(env) {
592
383
  "/opt/homebrew/bin",
593
384
  "/usr/local/bin"
594
385
  ].filter(Boolean).map((directory) => ({
595
- path: join4(directory, "codex"),
386
+ path: join3(directory, "codex"),
596
387
  source: "common"
597
388
  }));
598
389
  }
@@ -876,10 +667,10 @@ var init_auth = __esm(() => {
876
667
 
877
668
  // ../runtime/src/harness-catalog.ts
878
669
  import { execFileSync as execFileSync2 } from "child_process";
879
- import { existsSync as existsSync5, statSync } from "fs";
670
+ import { existsSync as existsSync4, statSync } from "fs";
880
671
  import { mkdir, readFile, writeFile } from "fs/promises";
881
672
  import { homedir as homedir4 } from "os";
882
- import { dirname as dirname3, join as join5 } from "path";
673
+ import { dirname as dirname2, join as join4 } from "path";
883
674
  function readinessFromAuthModel(harness) {
884
675
  const model = harnessAuthModel(harness);
885
676
  if (!model)
@@ -912,7 +703,7 @@ function expandHomePath(value) {
912
703
  if (value === "~")
913
704
  return home;
914
705
  if (value.startsWith("~/"))
915
- return join5(home, value.slice(2));
706
+ return join4(home, value.slice(2));
916
707
  return value;
917
708
  }
918
709
  function defaultWhichBinary(binary, platform) {
@@ -946,7 +737,7 @@ function defaultRunCommand(command, platform) {
946
737
  }
947
738
  function defaultRequirementExists(requirement) {
948
739
  const expanded = expandHomePath(requirement.path);
949
- if (!existsSync5(expanded))
740
+ if (!existsSync4(expanded))
950
741
  return false;
951
742
  if (requirement.fileType === "any" || !requirement.fileType)
952
743
  return true;
@@ -1175,7 +966,7 @@ async function readHarnessCatalogOverrides(overridePath = resolveOpenScoutSuppor
1175
966
  }
1176
967
  }
1177
968
  async function writeHarnessCatalogOverrides(overrides, overridePath = resolveOpenScoutSupportPaths().harnessCatalogPath) {
1178
- await mkdir(dirname3(overridePath), { recursive: true });
969
+ await mkdir(dirname2(overridePath), { recursive: true });
1179
970
  const payload = {
1180
971
  version: HARNESS_CATALOG_VERSION,
1181
972
  entries: overrides,
@@ -1185,7 +976,7 @@ async function writeHarnessCatalogOverrides(overrides, overridePath = resolveOpe
1185
976
  `, "utf8");
1186
977
  }
1187
978
  async function ensureHarnessCatalogOverrideFile(overridePath = resolveOpenScoutSupportPaths().harnessCatalogPath) {
1188
- if (existsSync5(overridePath))
979
+ if (existsSync4(overridePath))
1189
980
  return;
1190
981
  await writeHarnessCatalogOverrides({}, overridePath);
1191
982
  }
@@ -4940,7 +4731,7 @@ var init_model_window_registry = __esm(() => {
4940
4731
  });
4941
4732
 
4942
4733
  // ../agent-sessions/src/history.ts
4943
- import { basename, dirname as dirname4 } from "path";
4734
+ import { basename, dirname as dirname3 } from "path";
4944
4735
  function decodeClaudeProjectsSlug(name) {
4945
4736
  if (!name || !name.startsWith("-")) {
4946
4737
  return null;
@@ -4952,7 +4743,7 @@ function decodeClaudeProjectsSlug(name) {
4952
4743
  return `/${tail.replace(/-/g, "/")}`;
4953
4744
  }
4954
4745
  function inferClaudeHistoryCwd(path2) {
4955
- const parent = basename(dirname4(path2));
4746
+ const parent = basename(dirname3(path2));
4956
4747
  return decodeClaudeProjectsSlug(parent);
4957
4748
  }
4958
4749
  function deriveHistoryName(path2) {
@@ -4960,7 +4751,7 @@ function deriveHistoryName(path2) {
4960
4751
  if (claudeCwd) {
4961
4752
  return basename(claudeCwd) || claudeCwd;
4962
4753
  }
4963
- const parent = basename(dirname4(path2));
4754
+ const parent = basename(dirname3(path2));
4964
4755
  return parent || basename(path2) || "History Session";
4965
4756
  }
4966
4757
  function normalizeTimestamp(value) {
@@ -6862,9 +6653,9 @@ function createLiveNormalizerContext(sessionId) {
6862
6653
  }
6863
6654
 
6864
6655
  // ../agent-sessions/src/adapters/claude-code/team-topology.ts
6865
- import { existsSync as existsSync6, readdirSync, readFileSync as readFileSync5, statSync as statSync2 } from "fs";
6656
+ import { existsSync as existsSync5, readdirSync, readFileSync as readFileSync4, statSync as statSync2 } from "fs";
6866
6657
  import { homedir as homedir5 } from "os";
6867
- import { basename as basename2, dirname as dirname5, join as join6, relative } from "path";
6658
+ import { basename as basename2, dirname as dirname4, join as join5, relative } from "path";
6868
6659
  function isObject(value) {
6869
6660
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
6870
6661
  }
@@ -6887,7 +6678,7 @@ function sourceRefId(kind, value) {
6887
6678
  }
6888
6679
  function readJsonObject(path2) {
6889
6680
  try {
6890
- const parsed = JSON.parse(readFileSync5(path2, "utf8"));
6681
+ const parsed = JSON.parse(readFileSync4(path2, "utf8"));
6891
6682
  return isObject(parsed) ? parsed : null;
6892
6683
  } catch {
6893
6684
  return null;
@@ -6908,17 +6699,17 @@ function statIsFile(path2) {
6908
6699
  }
6909
6700
  }
6910
6701
  function readTeamConfigs(homeDir) {
6911
- const teamsRoot = join6(homeDir, ".claude", "teams");
6912
- if (!existsSync6(teamsRoot) || !statIsDirectory(teamsRoot)) {
6702
+ const teamsRoot = join5(homeDir, ".claude", "teams");
6703
+ if (!existsSync5(teamsRoot) || !statIsDirectory(teamsRoot)) {
6913
6704
  return [];
6914
6705
  }
6915
6706
  const teams = [];
6916
6707
  for (const entry of readdirSync(teamsRoot)) {
6917
- const teamDir = join6(teamsRoot, entry);
6708
+ const teamDir = join5(teamsRoot, entry);
6918
6709
  if (!statIsDirectory(teamDir)) {
6919
6710
  continue;
6920
6711
  }
6921
- const configPath = join6(teamDir, "config.json");
6712
+ const configPath = join5(teamDir, "config.json");
6922
6713
  const config = readJsonObject(configPath);
6923
6714
  if (!config) {
6924
6715
  continue;
@@ -7056,8 +6847,8 @@ function membersFromConfig(team, groupId, configRefId) {
7056
6847
  return { agents, relationships, agentByExternal };
7057
6848
  }
7058
6849
  function readTaskFiles(tasksRoot, teamName) {
7059
- const teamTasksRoot = join6(tasksRoot, teamName);
7060
- if (!existsSync6(teamTasksRoot) || !statIsDirectory(teamTasksRoot)) {
6850
+ const teamTasksRoot = join5(tasksRoot, teamName);
6851
+ if (!existsSync5(teamTasksRoot) || !statIsDirectory(teamTasksRoot)) {
7061
6852
  return [];
7062
6853
  }
7063
6854
  const result = [];
@@ -7067,7 +6858,7 @@ function readTaskFiles(tasksRoot, teamName) {
7067
6858
  if (!current)
7068
6859
  continue;
7069
6860
  for (const entry of readdirSync(current)) {
7070
- const path2 = join6(current, entry);
6861
+ const path2 = join5(current, entry);
7071
6862
  if (statIsDirectory(path2)) {
7072
6863
  stack.push(path2);
7073
6864
  } else if (statIsFile(path2)) {
@@ -7098,14 +6889,14 @@ function firstMarkdownTitle(raw) {
7098
6889
  function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
7099
6890
  let raw;
7100
6891
  try {
7101
- raw = readFileSync5(taskPath, "utf8");
6892
+ raw = readFileSync4(taskPath, "utf8");
7102
6893
  } catch {
7103
6894
  return null;
7104
6895
  }
7105
- const relativePath = relative(join6(tasksRoot, teamName), taskPath);
6896
+ const relativePath = relative(join5(tasksRoot, teamName), taskPath);
7106
6897
  const fallbackId = relativePath.replace(/\.[^.]+$/u, "");
7107
6898
  const fallbackTitle = firstMarkdownTitle(raw) ?? basename2(fallbackId);
7108
- const inferredState = inferTaskStateFromPath(dirname5(relativePath));
6899
+ const inferredState = inferTaskStateFromPath(dirname4(relativePath));
7109
6900
  let parsed = null;
7110
6901
  try {
7111
6902
  const json = JSON.parse(raw);
@@ -7136,7 +6927,7 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
7136
6927
  };
7137
6928
  }
7138
6929
  function tasksFromFiles(homeDir, teamName, agentByExternal) {
7139
- const tasksRoot = join6(homeDir, ".claude", "tasks");
6930
+ const tasksRoot = join5(homeDir, ".claude", "tasks");
7140
6931
  const taskFiles = readTaskFiles(tasksRoot, teamName);
7141
6932
  const sourceRefs = [];
7142
6933
  const parsedTasks = [];
@@ -8350,9 +8141,9 @@ function flushLine(line, onLine) {
8350
8141
  }
8351
8142
 
8352
8143
  // ../agent-sessions/src/adapters/claude-code/adapter.ts
8353
- import { existsSync as existsSync7, readdirSync as readdirSync2, statSync as statSync3 } from "fs";
8144
+ import { existsSync as existsSync6, readdirSync as readdirSync2, statSync as statSync3 } from "fs";
8354
8145
  import { homedir as homedir6 } from "os";
8355
- import { delimiter as delimiter2, join as join7 } from "path";
8146
+ import { delimiter as delimiter2, join as join6 } from "path";
8356
8147
  function asRecord2(value) {
8357
8148
  return value && typeof value === "object" && !Array.isArray(value) ? value : null;
8358
8149
  }
@@ -8365,8 +8156,8 @@ function resolveClaudeResumeContext(config) {
8365
8156
  if (!resumeId) {
8366
8157
  return null;
8367
8158
  }
8368
- const projectsRoot = join7(homedir6(), ".claude", "projects");
8369
- if (!existsSync7(projectsRoot)) {
8159
+ const projectsRoot = join6(homedir6(), ".claude", "projects");
8160
+ if (!existsSync6(projectsRoot)) {
8370
8161
  return null;
8371
8162
  }
8372
8163
  let projectSlugs;
@@ -8376,8 +8167,8 @@ function resolveClaudeResumeContext(config) {
8376
8167
  return null;
8377
8168
  }
8378
8169
  for (const slug of projectSlugs) {
8379
- const sessionPath = join7(projectsRoot, slug, `${resumeId}.jsonl`);
8380
- if (!existsSync7(sessionPath)) {
8170
+ const sessionPath = join6(projectsRoot, slug, `${resumeId}.jsonl`);
8171
+ if (!existsSync6(sessionPath)) {
8381
8172
  continue;
8382
8173
  }
8383
8174
  const cwd = decodeClaudeProjectsSlug2(slug);
@@ -8417,7 +8208,7 @@ function resolveExecutableFromPath(command, env) {
8417
8208
  for (const directory of pathValue.split(delimiter2)) {
8418
8209
  if (!directory)
8419
8210
  continue;
8420
- const candidate = join7(directory, command);
8211
+ const candidate = join6(directory, command);
8421
8212
  try {
8422
8213
  if (statSync3(candidate).isFile()) {
8423
8214
  return candidate;
@@ -8724,9 +8515,9 @@ var init_claude_code = __esm(() => {
8724
8515
  });
8725
8516
 
8726
8517
  // ../agent-sessions/src/codex-launch-config.ts
8727
- import { accessSync as accessSync2, constants as constants2, existsSync as existsSync8 } from "fs";
8518
+ import { accessSync as accessSync2, constants as constants2, existsSync as existsSync7 } from "fs";
8728
8519
  import { homedir as homedir7 } from "os";
8729
- import { basename as basename3, delimiter as delimiter3, dirname as dirname6, join as join8, resolve } from "path";
8520
+ import { basename as basename3, delimiter as delimiter3, dirname as dirname5, join as join7, resolve } from "path";
8730
8521
  import { fileURLToPath } from "url";
8731
8522
  function isExecutable2(filePath) {
8732
8523
  if (!filePath) {
@@ -8747,7 +8538,7 @@ function ancestorChain(start) {
8747
8538
  let current = resolve(start);
8748
8539
  while (true) {
8749
8540
  chain.push(current);
8750
- const parent = dirname6(current);
8541
+ const parent = dirname5(current);
8751
8542
  if (parent === current) {
8752
8543
  return chain;
8753
8544
  }
@@ -8757,14 +8548,14 @@ function ancestorChain(start) {
8757
8548
  function resolveExecutableFromSearchPath(names, env) {
8758
8549
  const pathEntries = (env.PATH ?? "").split(delimiter3).filter(Boolean);
8759
8550
  const commonDirectories = [
8760
- join8(homedir7(), ".local", "bin"),
8761
- join8(homedir7(), ".bun", "bin"),
8551
+ join7(homedir7(), ".local", "bin"),
8552
+ join7(homedir7(), ".bun", "bin"),
8762
8553
  "/opt/homebrew/bin",
8763
8554
  "/usr/local/bin"
8764
8555
  ];
8765
8556
  for (const directory of [...pathEntries, ...commonDirectories]) {
8766
8557
  for (const name of names) {
8767
- const candidate = join8(directory, name);
8558
+ const candidate = join7(directory, name);
8768
8559
  if (isExecutable2(candidate)) {
8769
8560
  return candidate;
8770
8561
  }
@@ -8803,12 +8594,12 @@ function resolveScoutExecutable(env) {
8803
8594
  return resolveExecutableFromSearchPath(["scout"], env);
8804
8595
  }
8805
8596
  function resolveRepoScoutScript(currentDirectory) {
8806
- const moduleDirectory = dirname6(fileURLToPath(import.meta.url));
8597
+ const moduleDirectory = dirname5(fileURLToPath(import.meta.url));
8807
8598
  const starts = uniquePaths([currentDirectory, moduleDirectory]);
8808
8599
  for (const start of starts) {
8809
8600
  for (const candidate of ancestorChain(start)) {
8810
- const scriptPath = join8(candidate, "apps", "desktop", "bin", "scout.ts");
8811
- if (existsSync8(scriptPath)) {
8601
+ const scriptPath = join7(candidate, "apps", "desktop", "bin", "scout.ts");
8602
+ if (existsSync7(scriptPath)) {
8812
8603
  return scriptPath;
8813
8604
  }
8814
8605
  }
@@ -8898,7 +8689,7 @@ var init_secret_redaction = __esm(() => {
8898
8689
  // ../agent-sessions/src/local/transports/codex-app-server.ts
8899
8690
  import { spawn } from "child_process";
8900
8691
  import { appendFile, mkdir as mkdir2, readFile as readFile2, rm, stat, writeFile as writeFile2 } from "fs/promises";
8901
- import { join as join9 } from "path";
8692
+ import { join as join8 } from "path";
8902
8693
  function codexAppServerExitMessage(input) {
8903
8694
  if (input.exitKind === "proactive_shutdown") {
8904
8695
  return `Codex app-server session for ${input.agentName} was stopped by OpenScout` + (input.reason ? `: ${input.reason}` : "") + ".";
@@ -9213,7 +9004,7 @@ function parseCodexMaybeJson(value) {
9213
9004
  }
9214
9005
  }
9215
9006
  async function readCodexSessionCatalog(runtimeDirectory) {
9216
- const raw = await readOptionalFile(join9(runtimeDirectory, SESSION_CATALOG_FILENAME));
9007
+ const raw = await readOptionalFile(join8(runtimeDirectory, SESSION_CATALOG_FILENAME));
9217
9008
  if (!raw) {
9218
9009
  return { activeSessionId: null, sessions: [] };
9219
9010
  }
@@ -9228,7 +9019,7 @@ async function readCodexSessionCatalog(runtimeDirectory) {
9228
9019
  }
9229
9020
  async function writeCodexSessionCatalog(runtimeDirectory, catalog) {
9230
9021
  await mkdir2(runtimeDirectory, { recursive: true });
9231
- await writeFile2(join9(runtimeDirectory, SESSION_CATALOG_FILENAME), JSON.stringify(catalog, null, 2) + `
9022
+ await writeFile2(join8(runtimeDirectory, SESSION_CATALOG_FILENAME), JSON.stringify(catalog, null, 2) + `
9232
9023
  `);
9233
9024
  }
9234
9025
  async function recordCodexSessionCatalog(runtimeDirectory, threadId, input) {
@@ -9297,10 +9088,10 @@ class CodexAppServerTransport {
9297
9088
  errorListeners = new Set;
9298
9089
  constructor(options) {
9299
9090
  this.options = options;
9300
- this.threadIdPath = join9(options.runtimeDirectory, "codex-thread-id.txt");
9301
- this.statePath = join9(options.runtimeDirectory, "state.json");
9302
- this.stdoutLogPath = join9(options.logsDirectory, "stdout.log");
9303
- this.stderrLogPath = join9(options.logsDirectory, "stderr.log");
9091
+ this.threadIdPath = join8(options.runtimeDirectory, "codex-thread-id.txt");
9092
+ this.statePath = join8(options.runtimeDirectory, "state.json");
9093
+ this.stdoutLogPath = join8(options.logsDirectory, "stdout.log");
9094
+ this.stderrLogPath = join8(options.logsDirectory, "stderr.log");
9304
9095
  this.lastConfigSignature = this.configSignature(options);
9305
9096
  }
9306
9097
  get currentThreadId() {
@@ -9457,7 +9248,7 @@ class CodexAppServerTransport {
9457
9248
  async startSession() {
9458
9249
  await mkdir2(this.options.runtimeDirectory, { recursive: true });
9459
9250
  await mkdir2(this.options.logsDirectory, { recursive: true });
9460
- await writeFile2(join9(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
9251
+ await writeFile2(join8(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
9461
9252
  this.proactiveShutdown = null;
9462
9253
  try {
9463
9254
  await assertCodexWorkingDirectory(this.options.cwd, this.options.agentName);
@@ -10202,9 +9993,9 @@ async function shutdownCodexAppServerLocalAgent(options, shutdownOptions = {}) {
10202
9993
  const session = codexAppServerClients.get(key);
10203
9994
  if (!session) {
10204
9995
  if (shutdownOptions.resetThread) {
10205
- const threadId = await readOptionalFile(join9(options.runtimeDirectory, "codex-thread-id.txt"));
9996
+ const threadId = await readOptionalFile(join8(options.runtimeDirectory, "codex-thread-id.txt"));
10206
9997
  await closeCodexSessionCatalog(options.runtimeDirectory, threadId);
10207
- await rm(join9(options.runtimeDirectory, "codex-thread-id.txt"), { force: true });
9998
+ await rm(join8(options.runtimeDirectory, "codex-thread-id.txt"), { force: true });
10208
9999
  }
10209
10000
  return;
10210
10001
  }
@@ -11079,9 +10870,9 @@ var init_normalizer3 = __esm(() => {
11079
10870
  });
11080
10871
 
11081
10872
  // ../agent-sessions/src/adapters/codex/topology.ts
11082
- import { existsSync as existsSync9, readdirSync as readdirSync3, readFileSync as readFileSync6, statSync as statSync4 } from "fs";
10873
+ import { existsSync as existsSync8, readdirSync as readdirSync3, readFileSync as readFileSync5, statSync as statSync4 } from "fs";
11083
10874
  import { homedir as homedir8 } from "os";
11084
- import { basename as basename4, join as join10 } from "path";
10875
+ import { basename as basename4, join as join9 } from "path";
11085
10876
  function isObject2(value) {
11086
10877
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
11087
10878
  }
@@ -11198,7 +10989,7 @@ function parseTomlKeyValues(raw) {
11198
10989
  }
11199
10990
  function readTomlKeyValues(path2) {
11200
10991
  try {
11201
- return parseTomlKeyValues(readFileSync6(path2, "utf8"));
10992
+ return parseTomlKeyValues(readFileSync5(path2, "utf8"));
11202
10993
  } catch {
11203
10994
  return null;
11204
10995
  }
@@ -11212,8 +11003,8 @@ function firstString2(record2, keys) {
11212
11003
  return;
11213
11004
  }
11214
11005
  function readAgentDefinitions(root, scope) {
11215
- const agentsDir = join10(root, ".codex", "agents");
11216
- if (!existsSync9(agentsDir) || !statIsDirectory2(agentsDir)) {
11006
+ const agentsDir = join9(root, ".codex", "agents");
11007
+ if (!existsSync8(agentsDir) || !statIsDirectory2(agentsDir)) {
11217
11008
  return { agents: [], sourceRefs: [] };
11218
11009
  }
11219
11010
  const agents = [];
@@ -11221,7 +11012,7 @@ function readAgentDefinitions(root, scope) {
11221
11012
  for (const entry of readdirSync3(agentsDir).sort()) {
11222
11013
  if (!entry.endsWith(".toml"))
11223
11014
  continue;
11224
- const path2 = join10(agentsDir, entry);
11015
+ const path2 = join9(agentsDir, entry);
11225
11016
  if (!statIsFile2(path2))
11226
11017
  continue;
11227
11018
  const parsed = readTomlKeyValues(path2);
@@ -11260,8 +11051,8 @@ function readAgentDefinitions(root, scope) {
11260
11051
  function readProjectAgentsConfig(cwd) {
11261
11052
  if (!cwd)
11262
11053
  return {};
11263
- const configPath = join10(cwd, ".codex", "config.toml");
11264
- if (!existsSync9(configPath) || !statIsFile2(configPath)) {
11054
+ const configPath = join9(cwd, ".codex", "config.toml");
11055
+ if (!existsSync8(configPath) || !statIsFile2(configPath)) {
11265
11056
  return {};
11266
11057
  }
11267
11058
  const parsed = readTomlKeyValues(configPath);
@@ -11524,7 +11315,7 @@ var init_topology = () => {};
11524
11315
 
11525
11316
  // ../agent-sessions/src/adapters/codex/adapter.ts
11526
11317
  import { homedir as homedir9 } from "os";
11527
- import { join as join11 } from "path";
11318
+ import { join as join10 } from "path";
11528
11319
  function errorMessage2(error) {
11529
11320
  if (error instanceof Error) {
11530
11321
  return error.message;
@@ -11551,7 +11342,7 @@ var init_adapter2 = __esm(() => {
11551
11342
  sequence = 0;
11552
11343
  constructor(config) {
11553
11344
  super(config);
11554
- const runtimeRoot = join11(homedir9(), ".scout/pairing", "codex", this.session.id);
11345
+ const runtimeRoot = join10(homedir9(), ".scout/pairing", "codex", this.session.id);
11555
11346
  this.observedTopology = new CodexObservedTopologyTracker({
11556
11347
  cwd: config.cwd ?? process.cwd(),
11557
11348
  homeDir: config.env?.HOME,
@@ -11563,8 +11354,8 @@ var init_adapter2 = __esm(() => {
11563
11354
  model: this.session.model,
11564
11355
  providerMeta: {
11565
11356
  ...this.session.providerMeta ?? {},
11566
- stdoutLogFile: join11(runtimeRoot, "logs/stdout.log"),
11567
- stderrLogFile: join11(runtimeRoot, "logs/stderr.log")
11357
+ stdoutLogFile: join10(runtimeRoot, "logs/stdout.log"),
11358
+ stderrLogFile: join10(runtimeRoot, "logs/stderr.log")
11568
11359
  }
11569
11360
  });
11570
11361
  }
@@ -11623,7 +11414,7 @@ var init_adapter2 = __esm(() => {
11623
11414
  this.setStatus("closed");
11624
11415
  }
11625
11416
  get codexOptions() {
11626
- const runtimeRoot = join11(homedir9(), ".scout/pairing", "codex", this.session.id);
11417
+ const runtimeRoot = join10(homedir9(), ".scout/pairing", "codex", this.session.id);
11627
11418
  const configuredThreadId = this.config.options?.["threadId"];
11628
11419
  const requireExistingThread = this.config.options?.["requireExistingThread"];
11629
11420
  const rawLaunchArgs = this.config.options?.["launchArgs"];
@@ -11635,8 +11426,8 @@ var init_adapter2 = __esm(() => {
11635
11426
  sessionId: this.session.id,
11636
11427
  cwd: this.config.cwd ?? process.cwd(),
11637
11428
  systemPrompt: this.systemPrompt,
11638
- runtimeDirectory: join11(runtimeRoot, "runtime"),
11639
- logsDirectory: join11(runtimeRoot, "logs"),
11429
+ runtimeDirectory: join10(runtimeRoot, "runtime"),
11430
+ logsDirectory: join10(runtimeRoot, "logs"),
11640
11431
  env: this.config.env,
11641
11432
  launchArgs,
11642
11433
  threadId: typeof configuredThreadId === "string" && configuredThreadId.trim().length > 0 ? configuredThreadId.trim() : undefined,
@@ -11655,10 +11446,10 @@ var init_adapter2 = __esm(() => {
11655
11446
  return typeof raw === "string" && raw.trim().length > 0 ? raw : "You are a helpful agent working through Pairing.";
11656
11447
  }
11657
11448
  get stdoutLogPath() {
11658
- return this.transport?.stdoutLogFile ?? join11(this.codexOptions.logsDirectory, "stdout.log");
11449
+ return this.transport?.stdoutLogFile ?? join10(this.codexOptions.logsDirectory, "stdout.log");
11659
11450
  }
11660
11451
  get stderrLogPath() {
11661
- return this.transport?.stderrLogFile ?? join11(this.codexOptions.logsDirectory, "stderr.log");
11452
+ return this.transport?.stderrLogFile ?? join10(this.codexOptions.logsDirectory, "stderr.log");
11662
11453
  }
11663
11454
  enqueue(task) {
11664
11455
  const next = this.serialized.then(task, task);
@@ -11826,9 +11617,9 @@ var init_codex = __esm(() => {
11826
11617
 
11827
11618
  // ../agent-sessions/src/adapters/acp/adapter.ts
11828
11619
  import { spawn as spawn2 } from "child_process";
11829
- import { existsSync as existsSync10 } from "fs";
11620
+ import { existsSync as existsSync9 } from "fs";
11830
11621
  import { mkdir as mkdir3, readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
11831
- import { dirname as dirname7, isAbsolute, relative as relative2, resolve as resolve2 } from "path";
11622
+ import { dirname as dirname6, isAbsolute, relative as relative2, resolve as resolve2 } from "path";
11832
11623
  import { pathToFileURL } from "url";
11833
11624
  function isRecord3(value) {
11834
11625
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
@@ -12207,7 +11998,7 @@ var init_adapter3 = __esm(() => {
12207
11998
  return;
12208
11999
  }
12209
12000
  const options = this.acpOptions;
12210
- if (!existsSync10(options.cwd)) {
12001
+ if (!existsSync9(options.cwd)) {
12211
12002
  const failure = new Error(`ACP agent working directory does not exist: ${options.cwd}` + ` (harness command: ${options.command})`);
12212
12003
  this.failSession(failure);
12213
12004
  throw failure;
@@ -12867,7 +12658,7 @@ ${plan}`,
12867
12658
  return;
12868
12659
  }
12869
12660
  const filePath = this.resolveAllowedPath(requestedPath);
12870
- await mkdir3(dirname7(filePath), { recursive: true });
12661
+ await mkdir3(dirname6(filePath), { recursive: true });
12871
12662
  await writeFile3(filePath, params.content, "utf8");
12872
12663
  this.writeResult(message.id, {});
12873
12664
  }
@@ -13067,16 +12858,16 @@ var init_acp = __esm(() => {
13067
12858
  });
13068
12859
 
13069
12860
  // ../agent-sessions/src/adapters/grok-acp/adapter.ts
13070
- import { existsSync as existsSync11 } from "fs";
12861
+ import { existsSync as existsSync10 } from "fs";
13071
12862
  import { homedir as homedir10 } from "os";
13072
- import { join as join12 } from "path";
12863
+ import { join as join11 } from "path";
13073
12864
  function defaultGrokCommand(env) {
13074
12865
  const override = firstNonEmptyString(env?.GROK_CLI_BIN, process.env.GROK_CLI_BIN);
13075
12866
  if (override) {
13076
12867
  return override;
13077
12868
  }
13078
- const installed = join12(homedir10(), ".grok", "bin", "grok");
13079
- return existsSync11(installed) ? installed : "grok";
12869
+ const installed = join11(homedir10(), ".grok", "bin", "grok");
12870
+ return existsSync10(installed) ? installed : "grok";
13080
12871
  }
13081
12872
  function isRecord4(value) {
13082
12873
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
@@ -13151,9 +12942,9 @@ var init_grok_acp = __esm(() => {
13151
12942
  });
13152
12943
 
13153
12944
  // ../agent-sessions/src/adapters/kimi-acp/adapter.ts
13154
- import { existsSync as existsSync12 } from "fs";
12945
+ import { existsSync as existsSync11 } from "fs";
13155
12946
  import { homedir as homedir11 } from "os";
13156
- import { join as join13 } from "path";
12947
+ import { join as join12 } from "path";
13157
12948
  function isRecord5(value) {
13158
12949
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
13159
12950
  }
@@ -13182,10 +12973,10 @@ function defaultKimiCommand(env) {
13182
12973
  return override;
13183
12974
  }
13184
12975
  const installedCandidates = [
13185
- join13(homedir11(), ".kimi-code", "bin", "kimi"),
13186
- join13(homedir11(), ".local", "bin", "kimi")
12976
+ join12(homedir11(), ".kimi-code", "bin", "kimi"),
12977
+ join12(homedir11(), ".local", "bin", "kimi")
13187
12978
  ];
13188
- return installedCandidates.find((candidate) => existsSync12(candidate)) ?? "kimi";
12979
+ return installedCandidates.find((candidate) => existsSync11(candidate)) ?? "kimi";
13189
12980
  }
13190
12981
  var DEFAULT_KIMI_ARGS, DEFAULT_KIMI_STARTUP_TIMEOUT_MS = 60000, KIMI_ACP_ADAPTER_TYPE = "kimi-acp", createAdapter5 = (config) => {
13191
12982
  const rawOptions = isRecord5(config.options) ? config.options : {};
@@ -15356,7 +15147,7 @@ var init_service = () => {};
15356
15147
  import { readFile as readFile4 } from "fs/promises";
15357
15148
  import { spawn as spawn3 } from "child_process";
15358
15149
  import { homedir as homedir12 } from "os";
15359
- import { join as join14 } from "path";
15150
+ import { join as join13 } from "path";
15360
15151
  async function discover(options = {}) {
15361
15152
  return (await discoverLocal(options))?.endpoint;
15362
15153
  }
@@ -15468,7 +15259,7 @@ async function stop(options = {}) {
15468
15259
  await kill(existing, options);
15469
15260
  }
15470
15261
  function fallback() {
15471
- return join14(process.env["XDG_STATE_HOME"] ?? join14(homedir12(), ".local", "state"), "opencode", "service.json");
15262
+ return join13(process.env["XDG_STATE_HOME"] ?? join13(homedir12(), ".local", "state"), "opencode", "service.json");
15472
15263
  }
15473
15264
  function headers(endpoint) {
15474
15265
  if (endpoint.auth === undefined)
@@ -16317,9 +16108,9 @@ var init_normalizer4 = __esm(() => {
16317
16108
  });
16318
16109
 
16319
16110
  // ../agent-sessions/src/adapters/opencode-v2/adapter.ts
16320
- import { existsSync as existsSync13 } from "fs";
16111
+ import { existsSync as existsSync12 } from "fs";
16321
16112
  import { homedir as homedir13 } from "os";
16322
- import { basename as basename5, isAbsolute as isAbsolute2, join as join15, resolve as resolve3 } from "path";
16113
+ import { basename as basename5, isAbsolute as isAbsolute2, join as join14, resolve as resolve3 } from "path";
16323
16114
  import { pathToFileURL as pathToFileURL2 } from "url";
16324
16115
  function deferred() {
16325
16116
  let resolvePromise;
@@ -16353,10 +16144,10 @@ function defaultOpenCodeV2Binary(env) {
16353
16144
  const candidates = [
16354
16145
  "/opt/homebrew/bin/opencode2",
16355
16146
  "/usr/local/bin/opencode2",
16356
- join15(home, ".opencode", "bin", "opencode2"),
16357
- join15(home, ".local", "bin", "opencode2")
16147
+ join14(home, ".opencode", "bin", "opencode2"),
16148
+ join14(home, ".local", "bin", "opencode2")
16358
16149
  ];
16359
- return candidates.find((candidate) => existsSync13(candidate)) ?? "opencode2";
16150
+ return candidates.find((candidate) => existsSync12(candidate)) ?? "opencode2";
16360
16151
  }
16361
16152
  function modelRef(value, variantValue) {
16362
16153
  const raw = stringValue8(value);
@@ -17386,9 +17177,9 @@ var init_opencode_v2 = __esm(() => {
17386
17177
 
17387
17178
  // ../agent-sessions/src/adapters/opencode-acp/adapter.ts
17388
17179
  import { spawnSync as spawnSync2 } from "child_process";
17389
- import { existsSync as existsSync14 } from "fs";
17180
+ import { existsSync as existsSync13 } from "fs";
17390
17181
  import { homedir as homedir14 } from "os";
17391
- import { join as join16 } from "path";
17182
+ import { join as join15 } from "path";
17392
17183
  function isRecord8(value) {
17393
17184
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
17394
17185
  }
@@ -17419,10 +17210,10 @@ function defaultOpenCodeCommand(env) {
17419
17210
  const installedCandidates = [
17420
17211
  "/opt/homebrew/bin/opencode",
17421
17212
  "/usr/local/bin/opencode",
17422
- join16(homedir14(), ".opencode", "bin", "opencode"),
17423
- join16(homedir14(), ".local", "bin", "opencode")
17213
+ join15(homedir14(), ".opencode", "bin", "opencode"),
17214
+ join15(homedir14(), ".local", "bin", "opencode")
17424
17215
  ];
17425
- return installedCandidates.find((candidate) => existsSync14(candidate)) ?? "opencode";
17216
+ return installedCandidates.find((candidate) => existsSync13(candidate)) ?? "opencode";
17426
17217
  }
17427
17218
  function configContentEnv(rawOptions, env) {
17428
17219
  const model = stringValue9(rawOptions.model);
@@ -17439,7 +17230,7 @@ function configContentEnv(rawOptions, env) {
17439
17230
  return { [OPENCODE_CONFIG_CONTENT_ENV]: JSON.stringify(overlay) };
17440
17231
  }
17441
17232
  function keychainSecret(name, commandOverride) {
17442
- const candidates = commandOverride ? [commandOverride] : ["secret", join16(homedir14(), ".local", "bin", "secret")];
17233
+ const candidates = commandOverride ? [commandOverride] : ["secret", join15(homedir14(), ".local", "bin", "secret")];
17443
17234
  for (const command of candidates) {
17444
17235
  try {
17445
17236
  const result = spawnSync2(command, ["get", name], { encoding: "utf8", timeout: 5000 });
@@ -18505,6 +18296,184 @@ var init_src2 = __esm(() => {
18505
18296
  init_cost();
18506
18297
  });
18507
18298
 
18299
+ // ../runtime/src/node-identity.ts
18300
+ import {
18301
+ createHash,
18302
+ createPrivateKey,
18303
+ createPublicKey,
18304
+ generateKeyPairSync,
18305
+ randomBytes,
18306
+ sign,
18307
+ verify
18308
+ } from "crypto";
18309
+ import {
18310
+ chmodSync,
18311
+ existsSync as existsSync14,
18312
+ mkdirSync as mkdirSync4,
18313
+ readFileSync as readFileSync6,
18314
+ renameSync as renameSync2,
18315
+ rmSync as rmSync2,
18316
+ writeFileSync as writeFileSync4
18317
+ } from "fs";
18318
+ import { dirname as dirname7, join as join16 } from "path";
18319
+ function nodeIdentityPath(supportDirectory) {
18320
+ const dir = supportDirectory ?? resolveOpenScoutSupportPaths().supportDirectory;
18321
+ return join16(dir, NODE_IDENTITY_FILE);
18322
+ }
18323
+ function loadOrCreateNodeIdentity(supportDirectory) {
18324
+ const path2 = nodeIdentityPath(supportDirectory);
18325
+ if (existsSync14(path2)) {
18326
+ return readAndValidateNodeIdentity(path2);
18327
+ }
18328
+ return createNodeIdentity(supportDirectory);
18329
+ }
18330
+ function readStableNodeQualifier(supportDirectory) {
18331
+ const path2 = nodeIdentityPath(supportDirectory);
18332
+ const cached = stableNodeQualifierCache.get(path2);
18333
+ if (cached) {
18334
+ return cached;
18335
+ }
18336
+ if (!existsSync14(path2)) {
18337
+ return null;
18338
+ }
18339
+ const nodeQualifier = normalizeNodeQualifier(readAndValidateNodeIdentity(path2).nodeQualifier);
18340
+ if (nodeQualifier) {
18341
+ stableNodeQualifierCache.set(path2, nodeQualifier);
18342
+ }
18343
+ return nodeQualifier || null;
18344
+ }
18345
+ function readAndValidateNodeIdentity(path2) {
18346
+ let parsed;
18347
+ try {
18348
+ parsed = JSON.parse(readFileSync6(path2, "utf8"));
18349
+ } catch {
18350
+ throw new Error(`Corrupt node identity at ${path2}; remove it to generate a fresh one.`);
18351
+ }
18352
+ if (parsed.version !== 1 || !parsed.publicKey || !parsed.privateKey) {
18353
+ throw new Error(`Corrupt node identity at ${path2}; remove it to generate a fresh one.`);
18354
+ }
18355
+ if (parsed.nodeQualifier !== undefined && normalizeNodeQualifier(parsed.nodeQualifier) !== parsed.nodeQualifier) {
18356
+ throw new Error(`Corrupt node identity at ${path2}; remove it to generate a fresh one.`);
18357
+ }
18358
+ try {
18359
+ const derived = createPublicKey(importPrivateKey(parsed.privateKey)).export({ type: "spki", format: "der" }).toString("base64");
18360
+ if (derived !== parsed.publicKey) {
18361
+ throw new Error("mismatch");
18362
+ }
18363
+ } catch {
18364
+ throw new Error(`Node identity at ${path2} has mismatched or invalid keys; remove it to generate a fresh one.`);
18365
+ }
18366
+ return parsed;
18367
+ }
18368
+ function normalizeNodeQualifier(value) {
18369
+ return typeof value === "string" ? value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") : "";
18370
+ }
18371
+ function createNodeIdentity(supportDirectory) {
18372
+ if (!supportDirectory) {
18373
+ assertTestIsolatedUserData("write the node identity", "OPENSCOUT_SUPPORT_DIRECTORY");
18374
+ }
18375
+ const path2 = nodeIdentityPath(supportDirectory);
18376
+ const { publicKey, privateKey } = generateKeyPairSync("ed25519");
18377
+ const identity = {
18378
+ version: 1,
18379
+ publicKey: publicKey.export({ type: "spki", format: "der" }).toString("base64"),
18380
+ privateKey: privateKey.export({ type: "pkcs8", format: "der" }).toString("base64"),
18381
+ createdAt: Date.now()
18382
+ };
18383
+ mkdirSync4(dirname7(path2), { recursive: true });
18384
+ try {
18385
+ writeFileSync4(path2, `${JSON.stringify(identity, null, 2)}
18386
+ `, { encoding: "utf8", mode: 384, flag: "wx" });
18387
+ } catch (error) {
18388
+ if (error.code === "EEXIST") {
18389
+ return readAndValidateNodeIdentity(path2);
18390
+ }
18391
+ throw error;
18392
+ }
18393
+ try {
18394
+ chmodSync(path2, 384);
18395
+ } catch {}
18396
+ return identity;
18397
+ }
18398
+ function nodeKeyId(publicKeyBase64) {
18399
+ return createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest("hex");
18400
+ }
18401
+ function nodeFingerprint(publicKeyBase64) {
18402
+ const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
18403
+ const encoded = base32Encode(digest.subarray(0, 10)).toLowerCase();
18404
+ return `${NODE_FINGERPRINT_PREFIX}:${encoded.slice(0, 4)}-${encoded.slice(4, 8)}`;
18405
+ }
18406
+ function signNodePayload(identity, payload) {
18407
+ const key = importPrivateKey(identity.privateKey);
18408
+ return sign(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key).toString("base64");
18409
+ }
18410
+ function verifyNodeSignature(publicKeyBase64, payload, signatureBase64) {
18411
+ try {
18412
+ const key = importPublicKey(publicKeyBase64);
18413
+ return verify(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key, Buffer.from(signatureBase64, "base64"));
18414
+ } catch {
18415
+ return false;
18416
+ }
18417
+ }
18418
+ function canonicalJson(value) {
18419
+ if (value === null || typeof value !== "object") {
18420
+ return JSON.stringify(value);
18421
+ }
18422
+ if (Array.isArray(value)) {
18423
+ return `[${value.map(canonicalJson).join(",")}]`;
18424
+ }
18425
+ const record2 = value;
18426
+ const keys = Object.keys(record2).sort();
18427
+ return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record2[key])}`).join(",")}}`;
18428
+ }
18429
+ function verifySignedNodeCard(card, now = Date.now()) {
18430
+ if (nodeKeyId(card.publicKey) !== card.keyId) {
18431
+ return false;
18432
+ }
18433
+ if (nodeFingerprint(card.publicKey) !== card.fingerprint) {
18434
+ return false;
18435
+ }
18436
+ if (!Number.isFinite(card.expiresAt) || card.expiresAt <= now) {
18437
+ return false;
18438
+ }
18439
+ if (card.tls !== undefined) {
18440
+ if (typeof card.tls !== "object" || card.tls === null || typeof card.tls.spkiFingerprint !== "string" || !/^[0-9a-f]{64}$/.test(card.tls.spkiFingerprint)) {
18441
+ return false;
18442
+ }
18443
+ }
18444
+ const { signature, ...unsigned } = card;
18445
+ return verifyNodeSignature(card.publicKey, canonicalJson(unsigned), signature);
18446
+ }
18447
+ function base32Encode(input) {
18448
+ let bits = 0;
18449
+ let value = 0;
18450
+ let output = "";
18451
+ for (const byte of input) {
18452
+ value = value << 8 | byte;
18453
+ bits += 8;
18454
+ while (bits >= 5) {
18455
+ output += BASE32_ALPHABET[value >>> bits - 5 & 31];
18456
+ bits -= 5;
18457
+ }
18458
+ }
18459
+ if (bits > 0) {
18460
+ output += BASE32_ALPHABET[value << 5 - bits & 31];
18461
+ }
18462
+ return output;
18463
+ }
18464
+ function importPrivateKey(privateKeyBase64) {
18465
+ return createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
18466
+ }
18467
+ function importPublicKey(publicKeyBase64) {
18468
+ return createPublicKey({ key: Buffer.from(publicKeyBase64, "base64"), format: "der", type: "spki" });
18469
+ }
18470
+ var NODE_IDENTITY_FILE = "node-identity.json", NODE_FINGERPRINT_PREFIX = "osc1", NODE_CARD_TTL_MS, stableNodeQualifierCache, BASE32_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
18471
+ var init_node_identity = __esm(() => {
18472
+ init_support_paths();
18473
+ NODE_CARD_TTL_MS = 24 * 60 * 60 * 1000;
18474
+ stableNodeQualifierCache = new Map;
18475
+ });
18476
+
18508
18477
  // ../../node_modules/.bun/reflect-metadata@0.2.2/node_modules/reflect-metadata/Reflect.js
18509
18478
  var require_Reflect = __commonJS(() => {
18510
18479
  /*! *****************************************************************************
@@ -33121,7 +33090,7 @@ var init_local_agents = __esm(() => {
33121
33090
  // ../web/server/core/pairing/runtime/config.ts
33122
33091
  init_local_config();
33123
33092
  init_open_scout_network();
33124
- import { existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "fs";
33093
+ import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
33125
33094
  import { homedir as homedir3 } from "os";
33126
33095
  import path from "path";
33127
33096
  var PAIRING_QR_TTL_MS = 5 * 60 * 1000;
@@ -33139,11 +33108,11 @@ function pairingPaths() {
33139
33108
  }
33140
33109
  function loadPairingConfig() {
33141
33110
  const { configPath } = pairingPaths();
33142
- if (!existsSync4(configPath)) {
33111
+ if (!existsSync3(configPath)) {
33143
33112
  return {};
33144
33113
  }
33145
33114
  try {
33146
- const payload = JSON.parse(readFileSync4(configPath, "utf8"));
33115
+ const payload = JSON.parse(readFileSync3(configPath, "utf8"));
33147
33116
  return typeof payload === "object" && payload ? payload : {};
33148
33117
  } catch {
33149
33118
  return {};
@@ -34507,7 +34476,7 @@ function sql(strings, ...params) {
34507
34476
  return new SQL([new StringChunk(str)]);
34508
34477
  }
34509
34478
  sql2.raw = raw;
34510
- function join6(chunks, separator) {
34479
+ function join5(chunks, separator) {
34511
34480
  const result = [];
34512
34481
  for (const [i, chunk] of chunks.entries()) {
34513
34482
  if (i > 0 && separator !== undefined) {
@@ -34517,7 +34486,7 @@ function sql(strings, ...params) {
34517
34486
  }
34518
34487
  return new SQL(result);
34519
34488
  }
34520
- sql2.join = join6;
34489
+ sql2.join = join5;
34521
34490
  function identifier(value) {
34522
34491
  return new Name(value);
34523
34492
  }
@@ -37459,12 +37428,10 @@ class InMemoryControlRuntime {
37459
37428
  }
37460
37429
  }
37461
37430
  // ../runtime/src/sqlite-store.ts
37462
- init_node_identity();
37463
37431
  init_sqlite_adapter();
37464
37432
 
37465
37433
  // ../runtime/src/control-plane-migrations.ts
37466
37434
  init_support_paths();
37467
- init_node_identity();
37468
37435
 
37469
37436
  // ../runtime/src/budget-observations.ts
37470
37437
  var QUOTA_HISTORY_BUCKET_MS = 60 * 60 * 1000;
@@ -57346,7 +57313,7 @@ function writeJsonAtomically(filePath, value) {
57346
57313
 
57347
57314
  // ../web/server/core/pairing/runtime/runtime.ts
57348
57315
  init_src2();
57349
- import { homedir as homedir40 } from "os";
57316
+ import { homedir as homedir41 } from "os";
57350
57317
 
57351
57318
  // ../web/server/core/pairing/runtime/bridge/bridge.ts
57352
57319
  init_src2();
@@ -58604,9 +58571,9 @@ function formatTimestamp(value) {
58604
58571
  // ../web/server/core/pairing/runtime/bridge/server.ts
58605
58572
  init_system_probes();
58606
58573
  init_src2();
58607
- import { readdirSync as readdirSync6, readFileSync as readFileSync24, realpathSync as realpathSync5, statSync as statSync12 } from "fs";
58608
- import { basename as basename13, isAbsolute as isAbsolute7, join as join46, relative as relative6, resolve as resolve18 } from "path";
58609
- import { homedir as homedir37 } from "os";
58574
+ import { readdirSync as readdirSync6, readFileSync as readFileSync25, realpathSync as realpathSync5, statSync as statSync12 } from "fs";
58575
+ import { basename as basename13, isAbsolute as isAbsolute7, join as join47, relative as relative6, resolve as resolve18 } from "path";
58576
+ import { homedir as homedir38 } from "os";
58610
58577
 
58611
58578
  // ../web/server/core/mobile/service.ts
58612
58579
  init_src();
@@ -62984,17 +62951,122 @@ function describeError(cause) {
62984
62951
  }
62985
62952
 
62986
62953
  // ../web/server/pairing.ts
62954
+ import {
62955
+ existsSync as existsSync37,
62956
+ mkdirSync as mkdirSync18,
62957
+ readFileSync as readFileSync23,
62958
+ statSync as statSync10,
62959
+ unlinkSync as unlinkSync3,
62960
+ writeFileSync as writeFileSync14
62961
+ } from "fs";
62962
+ import { homedir as homedir35 } from "os";
62963
+ import { dirname as dirname23, join as join44, resolve as resolve15 } from "path";
62964
+ init_setup();
62965
+
62966
+ // ../runtime/src/pairing-supervisor.ts
62967
+ import { execFileSync as execFileSync6 } from "child_process";
62968
+ import { randomUUID as randomUUID6 } from "crypto";
62987
62969
  import {
62988
62970
  existsSync as existsSync36,
62989
62971
  mkdirSync as mkdirSync17,
62990
62972
  readFileSync as readFileSync22,
62991
- statSync as statSync10,
62992
- unlinkSync as unlinkSync3,
62973
+ renameSync as renameSync6,
62974
+ rmSync as rmSync4,
62993
62975
  writeFileSync as writeFileSync13
62994
62976
  } from "fs";
62995
62977
  import { homedir as homedir34 } from "os";
62996
- import { dirname as dirname22, join as join43, resolve as resolve15 } from "path";
62997
- init_setup();
62978
+ import { dirname as dirname22, join as join43 } from "path";
62979
+ var SCOUT_PAIRING_SUPERVISOR_INTENT_FILE = "supervisor.json";
62980
+ var SCOUT_PAIRING_RUNTIME_PID_FILE = "runtime.pid";
62981
+ var SCOUT_PAIRING_RUNTIME_OWNER_FILE = "runtime-owner.json";
62982
+ var SCOUT_PAIRING_SUPERVISOR_PID_FILE = "supervisor.pid";
62983
+ var SCOUT_PAIRING_RUNTIME_PROCESS_MARKER = "pairing-runtime-controller";
62984
+ function resolveScoutPairingSupervisorPaths(env = process.env) {
62985
+ const configuredRoot = env.OPENSCOUT_PAIRING_HOME?.trim() || env.SCOUT_PAIRING_HOME?.trim();
62986
+ const rootDir = configuredRoot || join43(homedir34(), ".scout", "pairing");
62987
+ return {
62988
+ rootDir,
62989
+ intentPath: join43(rootDir, SCOUT_PAIRING_SUPERVISOR_INTENT_FILE),
62990
+ runtimePidPath: join43(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE),
62991
+ runtimeOwnerPath: join43(rootDir, SCOUT_PAIRING_RUNTIME_OWNER_FILE),
62992
+ supervisorPidPath: join43(rootDir, SCOUT_PAIRING_SUPERVISOR_PID_FILE)
62993
+ };
62994
+ }
62995
+ function inspectScoutPairingProcess(pid) {
62996
+ if (!Number.isInteger(pid) || pid <= 0)
62997
+ return null;
62998
+ try {
62999
+ const output = execFileSync6("ps", ["-p", String(pid), "-o", "lstart=", "-o", "command="], {
63000
+ encoding: "utf8",
63001
+ stdio: ["ignore", "pipe", "ignore"]
63002
+ }).trim();
63003
+ const startedAt = output.slice(0, 24).trim().replace(/\s+/g, " ");
63004
+ const command = output.slice(24).trim();
63005
+ return startedAt && command ? { pid, startedAt, command } : null;
63006
+ } catch {
63007
+ return null;
63008
+ }
63009
+ }
63010
+ function readScoutPairingRuntimeOwner(ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath) {
63011
+ if (!existsSync36(ownerPath))
63012
+ return null;
63013
+ try {
63014
+ const value = JSON.parse(readFileSync22(ownerPath, "utf8"));
63015
+ return value.version === 1 && Number.isInteger(value.pid) && (value.pid ?? 0) > 0 && typeof value.token === "string" && value.token.length >= 16 && typeof value.startedAt === "string" && value.startedAt.length > 0 && typeof value.command === "string" && value.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER) && typeof value.claimedAt === "number" && Number.isFinite(value.claimedAt) ? value : null;
63016
+ } catch {
63017
+ return null;
63018
+ }
63019
+ }
63020
+ function isScoutPairingRuntimeOwnerLive(owner, options = {}) {
63021
+ if (!owner || options.expectedToken && owner.token !== options.expectedToken)
63022
+ return false;
63023
+ const current = (options.inspect ?? inspectScoutPairingProcess)(owner.pid);
63024
+ return current !== null && current.startedAt === owner.startedAt && current.command === owner.command && current.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER);
63025
+ }
63026
+ function readLiveScoutPairingRuntimeOwner(ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath, options = {}) {
63027
+ const owner = readScoutPairingRuntimeOwner(ownerPath);
63028
+ return isScoutPairingRuntimeOwnerLive(owner, options) ? owner : null;
63029
+ }
63030
+ function claimScoutPairingRuntimeOwnership(options = {}) {
63031
+ const pid = options.pid ?? process.pid;
63032
+ const ownerPath = options.ownerPath ?? resolveScoutPairingSupervisorPaths().runtimeOwnerPath;
63033
+ const inspect = options.inspect ?? inspectScoutPairingProcess;
63034
+ const existing = readLiveScoutPairingRuntimeOwner(ownerPath, { inspect });
63035
+ if (existing && existing.pid !== pid) {
63036
+ throw new Error(`Scout pairing runtime is already owned by pid ${existing.pid}.`);
63037
+ }
63038
+ const identity = inspect(pid);
63039
+ if (!identity || !identity.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER)) {
63040
+ throw new Error(`Cannot prove Scout pairing runtime ownership for pid ${pid}.`);
63041
+ }
63042
+ const owner = {
63043
+ version: 1,
63044
+ ...identity,
63045
+ token: options.token?.trim() || randomUUID6(),
63046
+ claimedAt: options.now ?? Date.now()
63047
+ };
63048
+ mkdirSync17(dirname22(ownerPath), { recursive: true });
63049
+ writeFileAtomically(ownerPath, `${JSON.stringify(owner, null, 2)}
63050
+ `);
63051
+ return owner;
63052
+ }
63053
+ function releaseScoutPairingRuntimeOwnership(owner, ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath) {
63054
+ const current = readScoutPairingRuntimeOwner(ownerPath);
63055
+ if (!current || current.pid !== owner.pid || current.token !== owner.token)
63056
+ return;
63057
+ rmSync4(ownerPath, { force: true });
63058
+ }
63059
+ function writeFileAtomically(path2, contents) {
63060
+ const temporaryPath = `${path2}.${process.pid}.${Date.now()}.tmp`;
63061
+ try {
63062
+ writeFileSync13(temporaryPath, contents);
63063
+ renameSync6(temporaryPath, path2);
63064
+ } finally {
63065
+ rmSync4(temporaryPath, { force: true });
63066
+ }
63067
+ }
63068
+
63069
+ // ../web/server/pairing.ts
62998
63070
  init_local_config();
62999
63071
  init_tool_resolution();
63000
63072
  var SCOUT_PAIRING_HOME_DIRECTORY = ".scout/pairing";
@@ -63003,25 +63075,25 @@ var SCOUT_PAIRING_IDENTITY_FILE = "identity.json";
63003
63075
  var SCOUT_PAIRING_TRUSTED_PEERS_FILE = "trusted-peers.json";
63004
63076
  var SCOUT_PAIRING_LOG_FILE = "bridge.log";
63005
63077
  var SCOUT_PAIRING_RUNTIME_STATE_FILE = "runtime.json";
63006
- var SCOUT_PAIRING_RUNTIME_PID_FILE = "runtime.pid";
63078
+ var SCOUT_PAIRING_RUNTIME_PID_FILE2 = "runtime.pid";
63007
63079
  var SCOUT_PAIRING_DEFAULT_PORT = 7888;
63008
63080
  var SCOUT_PAIRING_RUNTIME_VERSION = 1;
63009
63081
  var SCOUT_PAIRING_BRIDGE_CONNECT_TIMEOUT_MS = 1500;
63010
63082
  var SCOUT_PAIRING_BRIDGE_REQUEST_TIMEOUT_MS = 2500;
63011
63083
  function resolveScoutPairingHomeDirectory() {
63012
63084
  const configured = process.env.OPENSCOUT_PAIRING_HOME?.trim() || process.env.SCOUT_PAIRING_HOME?.trim();
63013
- return configured || join43(homedir34(), SCOUT_PAIRING_HOME_DIRECTORY);
63085
+ return configured || join44(homedir35(), SCOUT_PAIRING_HOME_DIRECTORY);
63014
63086
  }
63015
63087
  function resolveScoutPairingPaths() {
63016
63088
  const rootDir = resolveScoutPairingHomeDirectory();
63017
63089
  return {
63018
63090
  rootDir,
63019
- configPath: join43(rootDir, SCOUT_PAIRING_CONFIG_FILE),
63020
- identityPath: join43(rootDir, SCOUT_PAIRING_IDENTITY_FILE),
63021
- trustedPeersPath: join43(rootDir, SCOUT_PAIRING_TRUSTED_PEERS_FILE),
63022
- logPath: join43(rootDir, SCOUT_PAIRING_LOG_FILE),
63023
- runtimeStatePath: join43(rootDir, SCOUT_PAIRING_RUNTIME_STATE_FILE),
63024
- runtimePidPath: join43(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE)
63091
+ configPath: join44(rootDir, SCOUT_PAIRING_CONFIG_FILE),
63092
+ identityPath: join44(rootDir, SCOUT_PAIRING_IDENTITY_FILE),
63093
+ trustedPeersPath: join44(rootDir, SCOUT_PAIRING_TRUSTED_PEERS_FILE),
63094
+ logPath: join44(rootDir, SCOUT_PAIRING_LOG_FILE),
63095
+ runtimeStatePath: join44(rootDir, SCOUT_PAIRING_RUNTIME_STATE_FILE),
63096
+ runtimePidPath: join44(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE2)
63025
63097
  };
63026
63098
  }
63027
63099
  function createScoutPairingBridgeUrl(port) {
@@ -63162,11 +63234,11 @@ async function loadScoutPairingSessionSnapshots(port) {
63162
63234
  }
63163
63235
  function loadScoutPairingConfig() {
63164
63236
  const { configPath } = resolveScoutPairingPaths();
63165
- if (!existsSync36(configPath)) {
63237
+ if (!existsSync37(configPath)) {
63166
63238
  return {};
63167
63239
  }
63168
63240
  try {
63169
- const payload = JSON.parse(readFileSync22(configPath, "utf8"));
63241
+ const payload = JSON.parse(readFileSync23(configPath, "utf8"));
63170
63242
  return typeof payload === "object" && payload ? payload : {};
63171
63243
  } catch {
63172
63244
  return {};
@@ -63187,11 +63259,11 @@ function resolveScoutPairingConfig() {
63187
63259
  }
63188
63260
  function readScoutPairingRuntimeSnapshot() {
63189
63261
  const { runtimeStatePath } = resolveScoutPairingPaths();
63190
- if (!existsSync36(runtimeStatePath)) {
63262
+ if (!existsSync37(runtimeStatePath)) {
63191
63263
  return null;
63192
63264
  }
63193
63265
  try {
63194
- const parsed = JSON.parse(readFileSync22(runtimeStatePath, "utf8"));
63266
+ const parsed = JSON.parse(readFileSync23(runtimeStatePath, "utf8"));
63195
63267
  return parsed?.version === SCOUT_PAIRING_RUNTIME_VERSION ? parsed : null;
63196
63268
  } catch {
63197
63269
  return null;
@@ -63199,18 +63271,18 @@ function readScoutPairingRuntimeSnapshot() {
63199
63271
  }
63200
63272
  function readScoutPairingRuntimePid() {
63201
63273
  const { runtimePidPath } = resolveScoutPairingPaths();
63202
- if (!existsSync36(runtimePidPath)) {
63274
+ if (!existsSync37(runtimePidPath)) {
63203
63275
  return null;
63204
63276
  }
63205
63277
  try {
63206
- const raw = readFileSync22(runtimePidPath, "utf8").trim();
63278
+ const raw = readFileSync23(runtimePidPath, "utf8").trim();
63207
63279
  const pid = Number(raw);
63208
63280
  return Number.isInteger(pid) && pid > 0 ? pid : null;
63209
63281
  } catch {
63210
63282
  return null;
63211
63283
  }
63212
63284
  }
63213
- function isScoutPairingProcessRunning2(pid) {
63285
+ function isScoutPairingProcessRunning(pid) {
63214
63286
  if (!pid || !Number.isInteger(pid) || pid <= 0) {
63215
63287
  return false;
63216
63288
  }
@@ -63223,11 +63295,11 @@ function isScoutPairingProcessRunning2(pid) {
63223
63295
  }
63224
63296
  function isScoutPairingRuntimeRunning() {
63225
63297
  const pid = readScoutPairingRuntimePid();
63226
- if (isScoutPairingProcessRunning2(pid)) {
63298
+ if (isScoutPairingProcessRunning(pid)) {
63227
63299
  return true;
63228
63300
  }
63229
63301
  const snapshot = readScoutPairingRuntimeSnapshot();
63230
- return Boolean(snapshot && isScoutPairingProcessRunning2(snapshot.childPid ?? snapshot.pid));
63302
+ return Boolean(snapshot && isScoutPairingProcessRunning(snapshot.childPid ?? snapshot.pid));
63231
63303
  }
63232
63304
  var pairingMutationChain = Promise.resolve();
63233
63305
  async function getScoutWebPairingSessionSnapshots() {
@@ -63240,8 +63312,8 @@ async function getScoutWebPairingSessionSnapshots() {
63240
63312
 
63241
63313
  // ../web/server/core/agent-endpoints.ts
63242
63314
  init_src();
63243
- import { homedir as homedir35 } from "os";
63244
- import { join as join44, resolve as resolve16 } from "path";
63315
+ import { homedir as homedir36 } from "os";
63316
+ import { join as join45, resolve as resolve16 } from "path";
63245
63317
  function endpointMetadataRecord(endpoint) {
63246
63318
  return endpoint?.metadata && typeof endpoint.metadata === "object" && !Array.isArray(endpoint.metadata) ? endpoint.metadata : {};
63247
63319
  }
@@ -63275,10 +63347,10 @@ function endpointSessionAliases(endpoint) {
63275
63347
  }
63276
63348
  function expandHomePath5(value) {
63277
63349
  if (value === "~") {
63278
- return homedir35();
63350
+ return homedir36();
63279
63351
  }
63280
63352
  if (value.startsWith("~/")) {
63281
- return join44(homedir35(), value.slice(2));
63353
+ return join45(homedir36(), value.slice(2));
63282
63354
  }
63283
63355
  return value;
63284
63356
  }
@@ -64585,16 +64657,16 @@ import { createHash as createHash9 } from "crypto";
64585
64657
  import {
64586
64658
  chmodSync as chmodSync2,
64587
64659
  closeSync,
64588
- existsSync as existsSync37,
64589
- mkdirSync as mkdirSync18,
64660
+ existsSync as existsSync38,
64661
+ mkdirSync as mkdirSync19,
64590
64662
  openSync,
64591
- readFileSync as readFileSync23,
64592
- renameSync as renameSync6,
64663
+ readFileSync as readFileSync24,
64664
+ renameSync as renameSync7,
64593
64665
  unlinkSync as unlinkSync4,
64594
- writeFileSync as writeFileSync14
64666
+ writeFileSync as writeFileSync15
64595
64667
  } from "fs";
64596
- import { homedir as homedir36, hostname as hostname3, userInfo as userInfo2 } from "os";
64597
- import { join as join45 } from "path";
64668
+ import { homedir as homedir37, hostname as hostname3, userInfo as userInfo2 } from "os";
64669
+ import { join as join46 } from "path";
64598
64670
 
64599
64671
  // ../web/server/core/pairing/runtime/bridge/ssh-terminal-access.ts
64600
64672
  import { createHash as createHash7 } from "crypto";
@@ -64821,8 +64893,8 @@ function authorizedMobileTerminalSessionName(requestedSessionName, provisionedSe
64821
64893
 
64822
64894
  // ../web/server/core/pairing/runtime/bridge/mobile-terminal-provision.ts
64823
64895
  async function readMobileTerminalStatus(requestedSessionName, deviceId) {
64824
- const authorizedKeysPath = join45(homedir36(), ".ssh", "authorized_keys");
64825
- const authorizedKeys = existsSync37(authorizedKeysPath) ? readFileSync23(authorizedKeysPath, "utf8") : "";
64896
+ const authorizedKeysPath = join46(homedir37(), ".ssh", "authorized_keys");
64897
+ const authorizedKeys = existsSync38(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
64826
64898
  const provisionedSessionName = findSshTerminalSessionForDevice(authorizedKeys, deviceId);
64827
64899
  const sessionName = authorizedMobileTerminalSessionName(requestedSessionName, provisionedSessionName);
64828
64900
  const base = {
@@ -64894,17 +64966,17 @@ async function readMobileTerminalStatus(requestedSessionName, deviceId) {
64894
64966
  async function provisionMobileTerminalAccess(sshPublicKey, deviceId, deviceClass = undefined) {
64895
64967
  const id = deviceId?.trim() || "scout-ios-device";
64896
64968
  const sessionName = provisionedMobileTerminalSessionName(sshPublicKey, deviceClass);
64897
- const sshDir = join45(homedir36(), ".ssh");
64898
- const authorizedKeysPath = join45(sshDir, "authorized_keys");
64969
+ const sshDir = join46(homedir37(), ".ssh");
64970
+ const authorizedKeysPath = join46(sshDir, "authorized_keys");
64899
64971
  const hostKeyFingerprint = readRequiredHostKeyFingerprint();
64900
64972
  const result = withAuthorizedKeysLock(sshDir, () => {
64901
- if (!existsSync37(sshDir)) {
64902
- mkdirSync18(sshDir, { recursive: true, mode: 448 });
64973
+ if (!existsSync38(sshDir)) {
64974
+ mkdirSync19(sshDir, { recursive: true, mode: 448 });
64903
64975
  }
64904
64976
  try {
64905
64977
  chmodSync2(sshDir, 448);
64906
64978
  } catch {}
64907
- const existing = existsSync37(authorizedKeysPath) ? readFileSync23(authorizedKeysPath, "utf8") : "";
64979
+ const existing = existsSync38(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
64908
64980
  const result2 = provisionSshTerminalAccess({
64909
64981
  authorizedKeys: existing,
64910
64982
  deviceId: id,
@@ -64952,7 +65024,7 @@ function resolveReachableHost() {
64952
65024
  }
64953
65025
  function readRequiredHostKeyFingerprint() {
64954
65026
  try {
64955
- const pub = readFileSync23("/etc/ssh/ssh_host_ed25519_key.pub", "utf8");
65027
+ const pub = readFileSync24("/etc/ssh/ssh_host_ed25519_key.pub", "utf8");
64956
65028
  const keyData = pub.trim().split(/\s+/)[1];
64957
65029
  if (!keyData)
64958
65030
  throw new Error("missing key data");
@@ -64966,8 +65038,8 @@ function readRequiredHostKeyFingerprint() {
64966
65038
  function writeAuthorizedKeysAtomically(path2, contents) {
64967
65039
  const tmpPath = `${path2}.scout-${process.pid}-${Date.now()}.tmp`;
64968
65040
  try {
64969
- writeFileSync14(tmpPath, contents, { mode: 384, flag: "wx" });
64970
- renameSync6(tmpPath, path2);
65041
+ writeFileSync15(tmpPath, contents, { mode: 384, flag: "wx" });
65042
+ renameSync7(tmpPath, path2);
64971
65043
  } catch (error) {
64972
65044
  try {
64973
65045
  unlinkSync4(tmpPath);
@@ -64976,10 +65048,10 @@ function writeAuthorizedKeysAtomically(path2, contents) {
64976
65048
  }
64977
65049
  }
64978
65050
  function withAuthorizedKeysLock(sshDir, action) {
64979
- if (!existsSync37(sshDir)) {
64980
- mkdirSync18(sshDir, { recursive: true, mode: 448 });
65051
+ if (!existsSync38(sshDir)) {
65052
+ mkdirSync19(sshDir, { recursive: true, mode: 448 });
64981
65053
  }
64982
- const lockPath = join45(sshDir, ".scout-authorized-keys.lock");
65054
+ const lockPath = join46(sshDir, ".scout-authorized-keys.lock");
64983
65055
  const deadline = Date.now() + 5000;
64984
65056
  let fd = null;
64985
65057
  while (fd === null) {
@@ -65572,7 +65644,7 @@ async function handleRPCInner(bridge, req, rpcContext = {}) {
65572
65644
  const config = resolveConfig();
65573
65645
  const workspaceRoot = config.workspace?.root ? resolveWorkspaceRoot(config.workspace.root) : null;
65574
65646
  const matches = await readSessionSearch({
65575
- home: homedir37(),
65647
+ home: homedir38(),
65576
65648
  workspaceRoot,
65577
65649
  maxAgeDays: maxAge,
65578
65650
  limit,
@@ -65587,7 +65659,7 @@ async function handleRPCInner(bridge, req, rpcContext = {}) {
65587
65659
  return { id: req.id, error: { code: -32000, message: "Only .jsonl files can be read" } };
65588
65660
  }
65589
65661
  try {
65590
- const content = readFileSync24(p.path, "utf-8");
65662
+ const content = readFileSync25(p.path, "utf-8");
65591
65663
  const lines = content.split(`
65592
65664
  `).filter((l) => l.trim().length > 0);
65593
65665
  const trimmed = lines.length > 500 ? lines.slice(-500) : lines;
@@ -65708,13 +65780,13 @@ function resolveMobileCurrentDirectory() {
65708
65780
  }
65709
65781
  }
65710
65782
  function resolveWorkspaceRoot(root) {
65711
- const expandedRoot = root.replace(/^~/, homedir37());
65783
+ const expandedRoot = root.replace(/^~/, homedir38());
65712
65784
  return realpathSync5(expandedRoot);
65713
65785
  }
65714
65786
  function resolveWorkspacePath(root, requestedPath) {
65715
65787
  const normalizedRoot = resolveWorkspaceRoot(root);
65716
- const expandedPath = requestedPath?.replace(/^~/, homedir37());
65717
- const candidate = expandedPath ? isAbsolute7(expandedPath) ? expandedPath : join46(normalizedRoot, expandedPath) : normalizedRoot;
65788
+ const expandedPath = requestedPath?.replace(/^~/, homedir38());
65789
+ const candidate = expandedPath ? isAbsolute7(expandedPath) ? expandedPath : join47(normalizedRoot, expandedPath) : normalizedRoot;
65718
65790
  const resolvedCandidate = realpathSync5(candidate);
65719
65791
  const rel = relative6(normalizedRoot, resolvedCandidate);
65720
65792
  if (rel === "" || !rel.startsWith("..") && !isAbsolute7(rel)) {
@@ -65744,7 +65816,7 @@ function listDirectories(dirPath) {
65744
65816
  continue;
65745
65817
  if (name2 === "node_modules" || name2 === ".build" || name2 === "target")
65746
65818
  continue;
65747
- const fullPath = join46(dirPath, name2);
65819
+ const fullPath = join47(dirPath, name2);
65748
65820
  try {
65749
65821
  const stat6 = statSync12(fullPath);
65750
65822
  if (!stat6.isDirectory())
@@ -65770,7 +65842,7 @@ async function discoverSessionFiles(maxAgeDays, limit) {
65770
65842
  const config = resolveConfig();
65771
65843
  const workspaceRoot = config.workspace?.root ? resolveWorkspaceRoot(config.workspace.root) : null;
65772
65844
  const sessions4 = await readSessionFileScan({
65773
- home: homedir37(),
65845
+ home: homedir38(),
65774
65846
  workspaceRoot,
65775
65847
  maxAgeDays,
65776
65848
  limit
@@ -77578,7 +77650,7 @@ function finalize(ctx, schema2) {
77578
77650
  result.$schema = "http://json-schema.org/draft-07/schema#";
77579
77651
  } else if (ctx.target === "draft-04") {
77580
77652
  result.$schema = "http://json-schema.org/draft-04/schema#";
77581
- } else if (ctx.target === "openapi-3.0") {}
77653
+ } else if (ctx.target === "openapi-3.0") {} else {}
77582
77654
  if (ctx.external?.uri) {
77583
77655
  const id = ctx.external.registry.get(schema2)?.id;
77584
77656
  if (!id)
@@ -77826,7 +77898,7 @@ var literalProcessor = (schema2, ctx, json2, _params) => {
77826
77898
  if (val === undefined) {
77827
77899
  if (ctx.unrepresentable === "throw") {
77828
77900
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
77829
- }
77901
+ } else {}
77830
77902
  } else if (typeof val === "bigint") {
77831
77903
  if (ctx.unrepresentable === "throw") {
77832
77904
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -80176,9 +80248,9 @@ init_src2();
80176
80248
  init_system_probes();
80177
80249
  init_local_config();
80178
80250
  init_local_agents();
80179
- import { readFileSync as readFileSync25, readdirSync as readdirSync7, realpathSync as realpathSync6, statSync as statSync13 } from "fs";
80180
- import { basename as basename14, isAbsolute as isAbsolute8, join as join47, relative as relative7, resolve as resolve19 } from "path";
80181
- import { homedir as homedir38 } from "os";
80251
+ import { readFileSync as readFileSync26, readdirSync as readdirSync7, realpathSync as realpathSync6, statSync as statSync13 } from "fs";
80252
+ import { basename as basename14, isAbsolute as isAbsolute8, join as join48, relative as relative7, resolve as resolve19 } from "path";
80253
+ import { homedir as homedir39 } from "os";
80182
80254
  var t = initTRPC.context().create();
80183
80255
  var logged = t.middleware(async ({ path: path2, type, next }) => {
80184
80256
  const start = Date.now();
@@ -80344,13 +80416,13 @@ function resolveMobileCurrentDirectory2() {
80344
80416
  }
80345
80417
  }
80346
80418
  function resolveWorkspaceRoot2(root) {
80347
- const expandedRoot = root.replace(/^~/, homedir38());
80419
+ const expandedRoot = root.replace(/^~/, homedir39());
80348
80420
  return realpathSync6(expandedRoot);
80349
80421
  }
80350
80422
  function resolveWorkspacePath2(root, requestedPath) {
80351
80423
  const normalizedRoot = resolveWorkspaceRoot2(root);
80352
- const expandedPath = requestedPath?.replace(/^~/, homedir38());
80353
- const candidate = expandedPath ? isAbsolute8(expandedPath) ? expandedPath : join47(normalizedRoot, expandedPath) : normalizedRoot;
80424
+ const expandedPath = requestedPath?.replace(/^~/, homedir39());
80425
+ const candidate = expandedPath ? isAbsolute8(expandedPath) ? expandedPath : join48(normalizedRoot, expandedPath) : normalizedRoot;
80354
80426
  const resolvedCandidate = realpathSync6(candidate);
80355
80427
  const rel = relative7(normalizedRoot, resolvedCandidate);
80356
80428
  if (rel === "" || !rel.startsWith("..") && !isAbsolute8(rel)) {
@@ -80380,7 +80452,7 @@ function listDirectories2(dirPath) {
80380
80452
  continue;
80381
80453
  if (name2 === "node_modules" || name2 === ".build" || name2 === "target")
80382
80454
  continue;
80383
- const fullPath = join47(dirPath, name2);
80455
+ const fullPath = join48(dirPath, name2);
80384
80456
  try {
80385
80457
  const stat6 = statSync13(fullPath);
80386
80458
  if (!stat6.isDirectory())
@@ -80413,7 +80485,7 @@ async function discoverSessionFiles2(maxAgeDays, limit) {
80413
80485
  const config2 = resolveConfig();
80414
80486
  const workspaceRoot = config2.workspace?.root ? resolveWorkspaceRoot2(config2.workspace.root) : null;
80415
80487
  const sessions4 = await readSessionFileScan({
80416
- home: homedir38(),
80488
+ home: homedir39(),
80417
80489
  workspaceRoot,
80418
80490
  maxAgeDays,
80419
80491
  limit
@@ -81102,7 +81174,7 @@ var historyRouter = t.router({
81102
81174
  const config2 = resolveConfig();
81103
81175
  const workspaceRoot = config2.workspace?.root ? resolveWorkspaceRoot2(config2.workspace.root) : null;
81104
81176
  const matches = await readSessionSearch({
81105
- home: homedir38(),
81177
+ home: homedir39(),
81106
81178
  workspaceRoot,
81107
81179
  maxAgeDays: maxAge,
81108
81180
  limit,
@@ -81119,7 +81191,7 @@ var historyRouter = t.router({
81119
81191
  });
81120
81192
  }
81121
81193
  try {
81122
- const content = readFileSync25(input.path, "utf-8");
81194
+ const content = readFileSync26(input.path, "utf-8");
81123
81195
  const lines = content.split(`
81124
81196
  `).filter((l) => l.trim().length > 0);
81125
81197
  const trimmed = lines.length > 500 ? lines.slice(-500) : lines;
@@ -81152,7 +81224,7 @@ var historyRouter = t.router({
81152
81224
  }
81153
81225
  try {
81154
81226
  const fileStat = statSync13(input.path);
81155
- const content = readFileSync25(input.path, "utf-8");
81227
+ const content = readFileSync26(input.path, "utf-8");
81156
81228
  const replay = createHistorySessionSnapshot({
81157
81229
  path: input.path,
81158
81230
  content,
@@ -83516,14 +83588,14 @@ function observableToAsyncIterable(observable$1, signal2) {
83516
83588
  }
83517
83589
  // ../web/server/core/pairing/runtime/bridge/server-trpc.ts
83518
83590
  import { realpathSync as realpathSync7 } from "fs";
83519
- import { homedir as homedir39 } from "os";
83591
+ import { homedir as homedir40 } from "os";
83520
83592
  function resolveCurrentDirectory() {
83521
83593
  try {
83522
83594
  const config2 = resolveConfig();
83523
83595
  const configuredRoot = config2.workspace?.root;
83524
83596
  if (!configuredRoot)
83525
83597
  return process.cwd();
83526
- const expanded = configuredRoot.replace(/^~/, homedir39());
83598
+ const expanded = configuredRoot.replace(/^~/, homedir40());
83527
83599
  return realpathSync7(expanded);
83528
83600
  } catch {
83529
83601
  return process.cwd();
@@ -84178,7 +84250,7 @@ async function autoStartConfiguredSessions(bridge, sessions4) {
84178
84250
  try {
84179
84251
  const session = await bridge.createSession(entry.adapter, {
84180
84252
  name: entry.name,
84181
- cwd: entry.cwd?.replace(/^~/, homedir40()),
84253
+ cwd: entry.cwd?.replace(/^~/, homedir41()),
84182
84254
  options: entry.options
84183
84255
  });
84184
84256
  console.log(`[bridge] session started: ${session.name} (${entry.adapter})`);
@@ -84197,10 +84269,19 @@ var BONJOUR_SERVICE_TYPE = "_oscout-pair._tcp";
84197
84269
  async function runPairingRuntimeController() {
84198
84270
  clearStalePairingRuntimeFiles();
84199
84271
  const existingPid = readPairingRuntimePid();
84200
- if (existingPid && existingPid !== process.pid && isProcessRunning(existingPid)) {
84272
+ let existingOwner = readLiveScoutPairingRuntimeOwner();
84273
+ if (!existingOwner && existingPid && existingPid !== process.pid) {
84274
+ try {
84275
+ existingOwner = claimScoutPairingRuntimeOwnership({ pid: existingPid });
84276
+ } catch {
84277
+ existingOwner = null;
84278
+ }
84279
+ }
84280
+ if (existingPid && existingPid !== process.pid && existingOwner?.pid === existingPid) {
84201
84281
  console.error(`Scout pairing runtime controller is already running (pid ${existingPid}).`);
84202
84282
  process.exit(1);
84203
84283
  }
84284
+ const runtimeOwner = claimScoutPairingRuntimeOwnership();
84204
84285
  writePairingRuntimePid(process.pid);
84205
84286
  const state = {
84206
84287
  current: writePairingRuntimeSnapshot(createPairingRuntimeSnapshot({ pid: process.pid }, {
@@ -84240,6 +84321,7 @@ async function runPairingRuntimeController() {
84240
84321
  childPid: null
84241
84322
  });
84242
84323
  clearPairingRuntimePid();
84324
+ releaseScoutPairingRuntimeOwnership(runtimeOwner);
84243
84325
  process.exit(0);
84244
84326
  };
84245
84327
  process.on("SIGINT", () => void shutdown());