@openscout/scout 0.2.87 → 0.2.90

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
@@ -10433,214 +10433,6 @@ var init_broker = __esm(() => {
10433
10433
  init_registry();
10434
10434
  });
10435
10435
 
10436
- // packages/runtime/src/node-identity.ts
10437
- import {
10438
- createHash,
10439
- createPrivateKey,
10440
- createPublicKey,
10441
- generateKeyPairSync,
10442
- randomBytes,
10443
- sign,
10444
- verify
10445
- } from "crypto";
10446
- import {
10447
- chmodSync,
10448
- existsSync as existsSync3,
10449
- mkdirSync as mkdirSync2,
10450
- readFileSync,
10451
- renameSync,
10452
- rmSync as rmSync2,
10453
- writeFileSync as writeFileSync2
10454
- } from "fs";
10455
- import { dirname as dirname2, join as join4 } from "path";
10456
- function stripBonjourCollisionSuffix(value) {
10457
- if (!value || typeof value !== "string")
10458
- return "";
10459
- let trimmed = value.trim();
10460
- const isDotLocal = /\.local\.?$/i.test(trimmed);
10461
- if (isDotLocal) {
10462
- trimmed = trimmed.replace(/\.local\.?$/i, "");
10463
- }
10464
- const isHyphenLocalOpenscout = /-local-openscout$/i.test(trimmed);
10465
- const isHyphenLocal = !isHyphenLocalOpenscout && /-local$/i.test(trimmed);
10466
- if (isHyphenLocalOpenscout) {
10467
- trimmed = trimmed.replace(/-local-openscout$/i, "");
10468
- } else if (isHyphenLocal) {
10469
- trimmed = trimmed.replace(/-local$/i, "");
10470
- }
10471
- if (!isDotLocal && !isHyphenLocalOpenscout && !isHyphenLocal) {
10472
- return trimmed;
10473
- }
10474
- trimmed = trimmed.replace(/(?<=[a-zA-Z].*?)(?:-\d+)+$/, "");
10475
- if (isDotLocal)
10476
- return `${trimmed}.local`;
10477
- if (isHyphenLocalOpenscout)
10478
- return `${trimmed}-local-openscout`;
10479
- if (isHyphenLocal)
10480
- return `${trimmed}-local`;
10481
- return trimmed;
10482
- }
10483
- function nodeIdentityPath(supportDirectory) {
10484
- const dir = supportDirectory ?? resolveOpenScoutSupportPaths().supportDirectory;
10485
- return join4(dir, NODE_IDENTITY_FILE);
10486
- }
10487
- function loadOrCreateNodeIdentity(supportDirectory) {
10488
- const path = nodeIdentityPath(supportDirectory);
10489
- if (existsSync3(path)) {
10490
- return readAndValidateNodeIdentity(path);
10491
- }
10492
- return createNodeIdentity(supportDirectory);
10493
- }
10494
- function readStableNodeQualifier(supportDirectory) {
10495
- const path = nodeIdentityPath(supportDirectory);
10496
- const cached = stableNodeQualifierCache.get(path);
10497
- if (cached) {
10498
- return cached;
10499
- }
10500
- if (!existsSync3(path)) {
10501
- return null;
10502
- }
10503
- const nodeQualifier = normalizeNodeQualifier(readAndValidateNodeIdentity(path).nodeQualifier);
10504
- if (nodeQualifier) {
10505
- stableNodeQualifierCache.set(path, nodeQualifier);
10506
- }
10507
- return nodeQualifier || null;
10508
- }
10509
- function readAndValidateNodeIdentity(path) {
10510
- let parsed;
10511
- try {
10512
- parsed = JSON.parse(readFileSync(path, "utf8"));
10513
- } catch {
10514
- throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
10515
- }
10516
- if (parsed.version !== 1 || !parsed.publicKey || !parsed.privateKey) {
10517
- throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
10518
- }
10519
- if (parsed.nodeQualifier !== undefined && normalizePersistedNodeQualifier(parsed.nodeQualifier) !== parsed.nodeQualifier) {
10520
- throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
10521
- }
10522
- try {
10523
- const derived = createPublicKey(importPrivateKey(parsed.privateKey)).export({ type: "spki", format: "der" }).toString("base64");
10524
- if (derived !== parsed.publicKey) {
10525
- throw new Error("mismatch");
10526
- }
10527
- } catch {
10528
- throw new Error(`Node identity at ${path} has mismatched or invalid keys; remove it to generate a fresh one.`);
10529
- }
10530
- return parsed;
10531
- }
10532
- function normalizePersistedNodeQualifier(value) {
10533
- return typeof value === "string" ? value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") : "";
10534
- }
10535
- function normalizeNodeQualifier(value) {
10536
- return stripBonjourCollisionSuffix(normalizePersistedNodeQualifier(value));
10537
- }
10538
- function createNodeIdentity(supportDirectory) {
10539
- if (!supportDirectory) {
10540
- assertTestIsolatedUserData("write the node identity", "OPENSCOUT_SUPPORT_DIRECTORY");
10541
- }
10542
- const path = nodeIdentityPath(supportDirectory);
10543
- const { publicKey, privateKey } = generateKeyPairSync("ed25519");
10544
- const identity = {
10545
- version: 1,
10546
- publicKey: publicKey.export({ type: "spki", format: "der" }).toString("base64"),
10547
- privateKey: privateKey.export({ type: "pkcs8", format: "der" }).toString("base64"),
10548
- createdAt: Date.now()
10549
- };
10550
- mkdirSync2(dirname2(path), { recursive: true });
10551
- try {
10552
- writeFileSync2(path, `${JSON.stringify(identity, null, 2)}
10553
- `, { encoding: "utf8", mode: 384, flag: "wx" });
10554
- } catch (error) {
10555
- if (error.code === "EEXIST") {
10556
- return readAndValidateNodeIdentity(path);
10557
- }
10558
- throw error;
10559
- }
10560
- try {
10561
- chmodSync(path, 384);
10562
- } catch {}
10563
- return identity;
10564
- }
10565
- function nodeKeyId(publicKeyBase64) {
10566
- return createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest("hex");
10567
- }
10568
- function nodeFingerprint(publicKeyBase64) {
10569
- const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
10570
- const encoded = base32Encode(digest.subarray(0, 10)).toLowerCase();
10571
- return `${NODE_FINGERPRINT_PREFIX}:${encoded.slice(0, 4)}-${encoded.slice(4, 8)}`;
10572
- }
10573
- function signNodePayload(identity, payload) {
10574
- const key = importPrivateKey(identity.privateKey);
10575
- return sign(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key).toString("base64");
10576
- }
10577
- function verifyNodeSignature(publicKeyBase64, payload, signatureBase64) {
10578
- try {
10579
- const key = importPublicKey(publicKeyBase64);
10580
- return verify(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key, Buffer.from(signatureBase64, "base64"));
10581
- } catch {
10582
- return false;
10583
- }
10584
- }
10585
- function canonicalJson(value) {
10586
- if (value === null || typeof value !== "object") {
10587
- return JSON.stringify(value);
10588
- }
10589
- if (Array.isArray(value)) {
10590
- return `[${value.map(canonicalJson).join(",")}]`;
10591
- }
10592
- const record2 = value;
10593
- const keys = Object.keys(record2).sort();
10594
- return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record2[key])}`).join(",")}}`;
10595
- }
10596
- function verifySignedNodeCard(card, now = Date.now()) {
10597
- if (nodeKeyId(card.publicKey) !== card.keyId) {
10598
- return false;
10599
- }
10600
- if (nodeFingerprint(card.publicKey) !== card.fingerprint) {
10601
- return false;
10602
- }
10603
- if (!Number.isFinite(card.expiresAt) || card.expiresAt <= now) {
10604
- return false;
10605
- }
10606
- if (card.tls !== undefined) {
10607
- if (typeof card.tls !== "object" || card.tls === null || typeof card.tls.spkiFingerprint !== "string" || !/^[0-9a-f]{64}$/.test(card.tls.spkiFingerprint)) {
10608
- return false;
10609
- }
10610
- }
10611
- const { signature, ...unsigned } = card;
10612
- return verifyNodeSignature(card.publicKey, canonicalJson(unsigned), signature);
10613
- }
10614
- function base32Encode(input) {
10615
- let bits = 0;
10616
- let value = 0;
10617
- let output = "";
10618
- for (const byte of input) {
10619
- value = value << 8 | byte;
10620
- bits += 8;
10621
- while (bits >= 5) {
10622
- output += BASE32_ALPHABET[value >>> bits - 5 & 31];
10623
- bits -= 5;
10624
- }
10625
- }
10626
- if (bits > 0) {
10627
- output += BASE32_ALPHABET[value << 5 - bits & 31];
10628
- }
10629
- return output;
10630
- }
10631
- function importPrivateKey(privateKeyBase64) {
10632
- return createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
10633
- }
10634
- function importPublicKey(publicKeyBase64) {
10635
- return createPublicKey({ key: Buffer.from(publicKeyBase64, "base64"), format: "der", type: "spki" });
10636
- }
10637
- var NODE_IDENTITY_FILE = "node-identity.json", NODE_FINGERPRINT_PREFIX = "osc1", NODE_CARD_TTL_MS, stableNodeQualifierCache, BASE32_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
10638
- var init_node_identity = __esm(() => {
10639
- init_support_paths();
10640
- NODE_CARD_TTL_MS = 24 * 60 * 60 * 1000;
10641
- stableNodeQualifierCache = new Map;
10642
- });
10643
-
10644
10436
  // node_modules/.bun/drizzle-orm@0.45.2+e80f9ee8788b3855/node_modules/drizzle-orm/bun-sqlite/session.js
10645
10437
  var SQLiteBunSession, SQLiteBunTransaction, PreparedQuery;
10646
10438
  var init_session2 = __esm(() => {
@@ -10997,7 +10789,6 @@ var init_sqlite_adapter = __esm(() => {
10997
10789
  var init_control_plane_migrations = __esm(() => {
10998
10790
  init_schema();
10999
10791
  init_support_paths();
11000
- init_node_identity();
11001
10792
  });
11002
10793
 
11003
10794
  // packages/runtime/src/conversations/api.ts
@@ -12029,7 +11820,7 @@ var init_model_window_registry = __esm(() => {
12029
11820
  });
12030
11821
 
12031
11822
  // packages/agent-sessions/src/history.ts
12032
- import { basename, dirname as dirname3 } from "path";
11823
+ import { basename, dirname as dirname2 } from "path";
12033
11824
  function decodeClaudeProjectsSlug(name) {
12034
11825
  if (!name || !name.startsWith("-")) {
12035
11826
  return null;
@@ -12041,7 +11832,7 @@ function decodeClaudeProjectsSlug(name) {
12041
11832
  return `/${tail.replace(/-/g, "/")}`;
12042
11833
  }
12043
11834
  function inferClaudeHistoryCwd(path) {
12044
- const parent = basename(dirname3(path));
11835
+ const parent = basename(dirname2(path));
12045
11836
  return decodeClaudeProjectsSlug(parent);
12046
11837
  }
12047
11838
  function deriveHistoryName(path) {
@@ -12049,7 +11840,7 @@ function deriveHistoryName(path) {
12049
11840
  if (claudeCwd) {
12050
11841
  return basename(claudeCwd) || claudeCwd;
12051
11842
  }
12052
- const parent = basename(dirname3(path));
11843
+ const parent = basename(dirname2(path));
12053
11844
  return parent || basename(path) || "History Session";
12054
11845
  }
12055
11846
  function normalizeTimestamp(value) {
@@ -15185,7 +14976,6 @@ var init_budget_observations = __esm(() => {
15185
14976
  // packages/runtime/src/sqlite-store.ts
15186
14977
  var RUNTIME_SESSION_RETENTION_MS;
15187
14978
  var init_sqlite_store = __esm(() => {
15188
- init_node_identity();
15189
14979
  init_registry();
15190
14980
  init_drizzle_client();
15191
14981
  init_sqlite_adapter();
@@ -15196,6 +14986,184 @@ var init_sqlite_store = __esm(() => {
15196
14986
  RUNTIME_SESSION_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
15197
14987
  });
15198
14988
 
14989
+ // packages/runtime/src/node-identity.ts
14990
+ import {
14991
+ createHash,
14992
+ createPrivateKey,
14993
+ createPublicKey,
14994
+ generateKeyPairSync,
14995
+ randomBytes,
14996
+ sign,
14997
+ verify
14998
+ } from "crypto";
14999
+ import {
15000
+ chmodSync,
15001
+ existsSync as existsSync3,
15002
+ mkdirSync as mkdirSync2,
15003
+ readFileSync,
15004
+ renameSync,
15005
+ rmSync as rmSync2,
15006
+ writeFileSync as writeFileSync2
15007
+ } from "fs";
15008
+ import { dirname as dirname3, join as join4 } from "path";
15009
+ function nodeIdentityPath(supportDirectory) {
15010
+ const dir = supportDirectory ?? resolveOpenScoutSupportPaths().supportDirectory;
15011
+ return join4(dir, NODE_IDENTITY_FILE);
15012
+ }
15013
+ function loadOrCreateNodeIdentity(supportDirectory) {
15014
+ const path = nodeIdentityPath(supportDirectory);
15015
+ if (existsSync3(path)) {
15016
+ return readAndValidateNodeIdentity(path);
15017
+ }
15018
+ return createNodeIdentity(supportDirectory);
15019
+ }
15020
+ function readStableNodeQualifier(supportDirectory) {
15021
+ const path = nodeIdentityPath(supportDirectory);
15022
+ const cached = stableNodeQualifierCache.get(path);
15023
+ if (cached) {
15024
+ return cached;
15025
+ }
15026
+ if (!existsSync3(path)) {
15027
+ return null;
15028
+ }
15029
+ const nodeQualifier = normalizeNodeQualifier(readAndValidateNodeIdentity(path).nodeQualifier);
15030
+ if (nodeQualifier) {
15031
+ stableNodeQualifierCache.set(path, nodeQualifier);
15032
+ }
15033
+ return nodeQualifier || null;
15034
+ }
15035
+ function readAndValidateNodeIdentity(path) {
15036
+ let parsed;
15037
+ try {
15038
+ parsed = JSON.parse(readFileSync(path, "utf8"));
15039
+ } catch {
15040
+ throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
15041
+ }
15042
+ if (parsed.version !== 1 || !parsed.publicKey || !parsed.privateKey) {
15043
+ throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
15044
+ }
15045
+ if (parsed.nodeQualifier !== undefined && normalizeNodeQualifier(parsed.nodeQualifier) !== parsed.nodeQualifier) {
15046
+ throw new Error(`Corrupt node identity at ${path}; remove it to generate a fresh one.`);
15047
+ }
15048
+ try {
15049
+ const derived = createPublicKey(importPrivateKey(parsed.privateKey)).export({ type: "spki", format: "der" }).toString("base64");
15050
+ if (derived !== parsed.publicKey) {
15051
+ throw new Error("mismatch");
15052
+ }
15053
+ } catch {
15054
+ throw new Error(`Node identity at ${path} has mismatched or invalid keys; remove it to generate a fresh one.`);
15055
+ }
15056
+ return parsed;
15057
+ }
15058
+ function normalizeNodeQualifier(value) {
15059
+ return typeof value === "string" ? value.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "") : "";
15060
+ }
15061
+ function createNodeIdentity(supportDirectory) {
15062
+ if (!supportDirectory) {
15063
+ assertTestIsolatedUserData("write the node identity", "OPENSCOUT_SUPPORT_DIRECTORY");
15064
+ }
15065
+ const path = nodeIdentityPath(supportDirectory);
15066
+ const { publicKey, privateKey } = generateKeyPairSync("ed25519");
15067
+ const identity = {
15068
+ version: 1,
15069
+ publicKey: publicKey.export({ type: "spki", format: "der" }).toString("base64"),
15070
+ privateKey: privateKey.export({ type: "pkcs8", format: "der" }).toString("base64"),
15071
+ createdAt: Date.now()
15072
+ };
15073
+ mkdirSync2(dirname3(path), { recursive: true });
15074
+ try {
15075
+ writeFileSync2(path, `${JSON.stringify(identity, null, 2)}
15076
+ `, { encoding: "utf8", mode: 384, flag: "wx" });
15077
+ } catch (error) {
15078
+ if (error.code === "EEXIST") {
15079
+ return readAndValidateNodeIdentity(path);
15080
+ }
15081
+ throw error;
15082
+ }
15083
+ try {
15084
+ chmodSync(path, 384);
15085
+ } catch {}
15086
+ return identity;
15087
+ }
15088
+ function nodeKeyId(publicKeyBase64) {
15089
+ return createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest("hex");
15090
+ }
15091
+ function nodeFingerprint(publicKeyBase64) {
15092
+ const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
15093
+ const encoded = base32Encode(digest.subarray(0, 10)).toLowerCase();
15094
+ return `${NODE_FINGERPRINT_PREFIX}:${encoded.slice(0, 4)}-${encoded.slice(4, 8)}`;
15095
+ }
15096
+ function signNodePayload(identity, payload) {
15097
+ const key = importPrivateKey(identity.privateKey);
15098
+ return sign(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key).toString("base64");
15099
+ }
15100
+ function verifyNodeSignature(publicKeyBase64, payload, signatureBase64) {
15101
+ try {
15102
+ const key = importPublicKey(publicKeyBase64);
15103
+ return verify(null, typeof payload === "string" ? Buffer.from(payload, "utf8") : payload, key, Buffer.from(signatureBase64, "base64"));
15104
+ } catch {
15105
+ return false;
15106
+ }
15107
+ }
15108
+ function canonicalJson(value) {
15109
+ if (value === null || typeof value !== "object") {
15110
+ return JSON.stringify(value);
15111
+ }
15112
+ if (Array.isArray(value)) {
15113
+ return `[${value.map(canonicalJson).join(",")}]`;
15114
+ }
15115
+ const record2 = value;
15116
+ const keys = Object.keys(record2).sort();
15117
+ return `{${keys.map((key) => `${JSON.stringify(key)}:${canonicalJson(record2[key])}`).join(",")}}`;
15118
+ }
15119
+ function verifySignedNodeCard(card, now = Date.now()) {
15120
+ if (nodeKeyId(card.publicKey) !== card.keyId) {
15121
+ return false;
15122
+ }
15123
+ if (nodeFingerprint(card.publicKey) !== card.fingerprint) {
15124
+ return false;
15125
+ }
15126
+ if (!Number.isFinite(card.expiresAt) || card.expiresAt <= now) {
15127
+ return false;
15128
+ }
15129
+ if (card.tls !== undefined) {
15130
+ if (typeof card.tls !== "object" || card.tls === null || typeof card.tls.spkiFingerprint !== "string" || !/^[0-9a-f]{64}$/.test(card.tls.spkiFingerprint)) {
15131
+ return false;
15132
+ }
15133
+ }
15134
+ const { signature, ...unsigned } = card;
15135
+ return verifyNodeSignature(card.publicKey, canonicalJson(unsigned), signature);
15136
+ }
15137
+ function base32Encode(input) {
15138
+ let bits = 0;
15139
+ let value = 0;
15140
+ let output = "";
15141
+ for (const byte of input) {
15142
+ value = value << 8 | byte;
15143
+ bits += 8;
15144
+ while (bits >= 5) {
15145
+ output += BASE32_ALPHABET[value >>> bits - 5 & 31];
15146
+ bits -= 5;
15147
+ }
15148
+ }
15149
+ if (bits > 0) {
15150
+ output += BASE32_ALPHABET[value << 5 - bits & 31];
15151
+ }
15152
+ return output;
15153
+ }
15154
+ function importPrivateKey(privateKeyBase64) {
15155
+ return createPrivateKey({ key: Buffer.from(privateKeyBase64, "base64"), format: "der", type: "pkcs8" });
15156
+ }
15157
+ function importPublicKey(publicKeyBase64) {
15158
+ return createPublicKey({ key: Buffer.from(publicKeyBase64, "base64"), format: "der", type: "spki" });
15159
+ }
15160
+ var NODE_IDENTITY_FILE = "node-identity.json", NODE_FINGERPRINT_PREFIX = "osc1", NODE_CARD_TTL_MS, stableNodeQualifierCache, BASE32_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
15161
+ var init_node_identity = __esm(() => {
15162
+ init_support_paths();
15163
+ NODE_CARD_TTL_MS = 24 * 60 * 60 * 1000;
15164
+ stableNodeQualifierCache = new Map;
15165
+ });
15166
+
15199
15167
  // packages/runtime/src/mesh-peer-auth.ts
15200
15168
  import { createHash as createHash2, randomBytes as randomBytes2 } from "crypto";
15201
15169
  function assertNoNewlines(component, name) {
@@ -32764,18 +32732,15 @@ import {
32764
32732
  renameSync as renameSync2,
32765
32733
  writeFileSync as writeFileSync3
32766
32734
  } from "fs";
32767
- import { randomBytes as randomBytes4 } from "crypto";
32768
32735
  import { homedir as homedir4, hostname as osHostname } from "os";
32769
32736
  import { dirname as dirname4, join as join6 } from "path";
32770
32737
  function normalizeLocalHostnameLabel(value) {
32771
- const stripped = value ? stripBonjourCollisionSuffix(value) : value;
32772
- const firstLabel = stripped?.trim().replace(/\.local\.?$/i, "").split(".").find((part) => part.trim().length > 0)?.trim();
32738
+ const firstLabel = value?.trim().replace(/\.local\.?$/i, "").split(".").find((part) => part.trim().length > 0)?.trim();
32773
32739
  const normalized = firstLabel?.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, "-");
32774
32740
  return normalized || "localhost";
32775
32741
  }
32776
32742
  function normalizeLocalHostname(value) {
32777
- const stripped = value ? stripBonjourCollisionSuffix(value) : value;
32778
- const trimmed = stripped?.trim().replace(/\.$/, "").toLowerCase();
32743
+ const trimmed = value?.trim().replace(/\.$/, "").toLowerCase();
32779
32744
  const labels = trimmed?.split(".").map((label) => label.trim().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, "-")).filter(Boolean);
32780
32745
  return labels && labels.length > 0 ? labels.join(".") : "localhost";
32781
32746
  }
@@ -32901,32 +32866,9 @@ function writeLocalConfig(config) {
32901
32866
  function localConfigExists() {
32902
32867
  return existsSync6(localConfigPath());
32903
32868
  }
32904
- function resolveWebAuthToken(env = process.env) {
32905
- const envToken = env.OPENSCOUT_WEB_AUTH_TOKEN?.trim();
32906
- if (envToken)
32907
- return envToken;
32908
- const supportDir = env.OPENSCOUT_SUPPORT_DIRECTORY ?? join6(homedir4(), "Library", "Application Support", "OpenScout");
32909
- const tokenPath = join6(supportDir, "runtime", "web-auth-token");
32910
- try {
32911
- if (existsSync6(tokenPath)) {
32912
- const stored = readFileSync4(tokenPath, "utf8").trim();
32913
- if (stored)
32914
- return stored;
32915
- }
32916
- } catch {}
32917
- const generated = randomBytes4(32).toString("base64url");
32918
- try {
32919
- if (false) {}
32920
- mkdirSync3(dirname4(tokenPath), { recursive: true });
32921
- writeFileSync3(tokenPath, `${generated}
32922
- `, { encoding: "utf8", mode: 384 });
32923
- } catch {}
32924
- return generated;
32925
- }
32926
32869
  var LOCAL_CONFIG_VERSION = 1, DEFAULT_SCOUT_WEB_PORTAL_HOST = "scout.local", DEFAULT_SCOUT_WEB_DEV_HOST, OPENSCOUT_PORTS, DEFAULT_LOCAL_CONFIG;
32927
32870
  var init_local_config = __esm(() => {
32928
32871
  init_support_paths();
32929
- init_node_identity();
32930
32872
  DEFAULT_SCOUT_WEB_DEV_HOST = `dev.${DEFAULT_SCOUT_WEB_PORTAL_HOST}`;
32931
32873
  OPENSCOUT_PORTS = {
32932
32874
  broker: 43110,
@@ -35361,7 +35303,7 @@ var init_mesh_sas = __esm(() => {
35361
35303
  });
35362
35304
 
35363
35305
  // packages/runtime/src/mesh-trust-enrollment.ts
35364
- import { randomBytes as randomBytes5 } from "crypto";
35306
+ import { randomBytes as randomBytes4 } from "crypto";
35365
35307
 
35366
35308
  class TrustEnrollmentService {
35367
35309
  local;
@@ -35381,11 +35323,11 @@ class TrustEnrollmentService {
35381
35323
  throw new TrustEnrollmentError("self-enrollment", "cannot enroll with self");
35382
35324
  }
35383
35325
  const session3 = {
35384
- id: randomBytes5(9).toString("base64url"),
35326
+ id: randomBytes4(9).toString("base64url"),
35385
35327
  state: "pending",
35386
35328
  remoteCard: input.card,
35387
35329
  commitment: input.commitment,
35388
- responderNonce: randomBytes5(32),
35330
+ responderNonce: randomBytes4(32),
35389
35331
  createdAt: now,
35390
35332
  expiresAt: now + this.ttlMs
35391
35333
  };
@@ -58289,6 +58231,7 @@ var init_service = __esm(() => {
58289
58231
  });
58290
58232
 
58291
58233
  // packages/runtime/src/pairing-supervisor.ts
58234
+ import { execFileSync as execFileSync6 } from "child_process";
58292
58235
  import {
58293
58236
  existsSync as existsSync29,
58294
58237
  mkdirSync as mkdirSync9,
@@ -58306,84 +58249,61 @@ function resolveScoutPairingSupervisorPaths(env = process.env) {
58306
58249
  rootDir,
58307
58250
  intentPath: join34(rootDir, SCOUT_PAIRING_SUPERVISOR_INTENT_FILE),
58308
58251
  runtimePidPath: join34(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE),
58252
+ runtimeOwnerPath: join34(rootDir, SCOUT_PAIRING_RUNTIME_OWNER_FILE),
58309
58253
  supervisorPidPath: join34(rootDir, SCOUT_PAIRING_SUPERVISOR_PID_FILE)
58310
58254
  };
58311
58255
  }
58312
- function readScoutPairingSupervisorIntent(intentPath = resolveScoutPairingSupervisorPaths().intentPath) {
58313
- const intent = readPairingIntent(intentPath);
58314
- return {
58315
- desiredState: intent.desiredState === "running" || intent.desiredState === "stopped" ? intent.desiredState : null,
58316
- restartGeneration: validRestartGeneration(intent.restartGeneration)
58317
- };
58318
- }
58319
- function updateScoutPairingSupervisorIntent(action, intentPath = resolveScoutPairingSupervisorPaths().intentPath) {
58320
- const intent = readPairingIntent(intentPath);
58321
- intent.desiredState = action === "stop" ? "stopped" : "running";
58322
- if (action === "restart") {
58323
- intent.restartGeneration = Math.max(Date.now(), validRestartGeneration(intent.restartGeneration) + 1);
58256
+ function inspectScoutPairingProcess(pid) {
58257
+ if (!Number.isInteger(pid) || pid <= 0)
58258
+ return null;
58259
+ try {
58260
+ const output = execFileSync6("ps", ["-p", String(pid), "-o", "lstart=", "-o", "command="], {
58261
+ encoding: "utf8",
58262
+ stdio: ["ignore", "pipe", "ignore"]
58263
+ }).trim();
58264
+ const startedAt = output.slice(0, 24).trim().replace(/\s+/g, " ");
58265
+ const command = output.slice(24).trim();
58266
+ return startedAt && command ? { pid, startedAt, command } : null;
58267
+ } catch {
58268
+ return null;
58324
58269
  }
58325
- writePairingIntent(intentPath, intent);
58326
- return readScoutPairingSupervisorIntent(intentPath);
58327
58270
  }
58328
- function readScoutPairingProcessPid(path) {
58329
- if (!existsSync29(path))
58271
+ function readScoutPairingRuntimeOwner(ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath) {
58272
+ if (!existsSync29(ownerPath))
58330
58273
  return null;
58331
58274
  try {
58332
- const pid = Number.parseInt(readFileSync14(path, "utf8").trim(), 10);
58333
- return Number.isInteger(pid) && pid > 0 ? pid : null;
58275
+ const value = JSON.parse(readFileSync14(ownerPath, "utf8"));
58276
+ 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;
58334
58277
  } catch {
58335
58278
  return null;
58336
58279
  }
58337
58280
  }
58338
- function isScoutPairingProcessRunning(pid) {
58339
- if (!pid || pid <= 0)
58281
+ function isScoutPairingRuntimeOwnerLive(owner, options = {}) {
58282
+ if (!owner || options.expectedToken && owner.token !== options.expectedToken)
58283
+ return false;
58284
+ const current = (options.inspect ?? inspectScoutPairingProcess)(owner.pid);
58285
+ return current !== null && current.startedAt === owner.startedAt && current.command === owner.command && current.command.includes(SCOUT_PAIRING_RUNTIME_PROCESS_MARKER);
58286
+ }
58287
+ function readLiveScoutPairingRuntimeOwner(ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath, options = {}) {
58288
+ const owner = readScoutPairingRuntimeOwner(ownerPath);
58289
+ return isScoutPairingRuntimeOwnerLive(owner, options) ? owner : null;
58290
+ }
58291
+ function signalScoutPairingRuntimeOwner(owner, signal, options = {}) {
58292
+ const ownerPath = options.ownerPath ?? resolveScoutPairingSupervisorPaths().runtimeOwnerPath;
58293
+ const current = readLiveScoutPairingRuntimeOwner(ownerPath, {
58294
+ expectedToken: owner.token,
58295
+ inspect: options.inspect
58296
+ });
58297
+ if (!current || current.pid !== owner.pid)
58340
58298
  return false;
58341
58299
  try {
58342
- process.kill(pid, 0);
58300
+ (options.kill ?? ((pid, nextSignal) => process.kill(pid, nextSignal)))(owner.pid, signal);
58343
58301
  return true;
58344
- } catch (error) {
58345
- return error.code === "EPERM";
58346
- }
58347
- }
58348
- function readLiveScoutPairingSupervisorPid(supervisorPidPath = resolveScoutPairingSupervisorPaths().supervisorPidPath) {
58349
- const pid = readScoutPairingProcessPid(supervisorPidPath);
58350
- return isScoutPairingProcessRunning(pid) ? pid : null;
58351
- }
58352
- function readPairingIntent(intentPath) {
58353
- if (!existsSync29(intentPath))
58354
- return {};
58355
- try {
58356
- const parsed = JSON.parse(readFileSync14(intentPath, "utf8"));
58357
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
58358
- return { desiredState: "stopped" };
58359
- }
58360
- const intent = parsed;
58361
- if (intent.desiredState !== "running" && intent.desiredState !== "stopped") {
58362
- intent.desiredState = "stopped";
58363
- }
58364
- return intent;
58365
58302
  } catch {
58366
- return { desiredState: "stopped" };
58367
- }
58368
- }
58369
- function writePairingIntent(intentPath, intent) {
58370
- mkdirSync9(dirname22(intentPath), { recursive: true });
58371
- writeFileAtomically(intentPath, `${JSON.stringify(intent, null, 2)}
58372
- `);
58373
- }
58374
- function writeFileAtomically(path, contents) {
58375
- const temporaryPath = `${path}.${process.pid}.${Date.now()}.tmp`;
58376
- try {
58377
- writeFileSync8(temporaryPath, contents);
58378
- renameSync4(temporaryPath, path);
58379
- } finally {
58380
- rmSync4(temporaryPath, { force: true });
58303
+ return false;
58381
58304
  }
58382
58305
  }
58383
- function validRestartGeneration(value) {
58384
- return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : 0;
58385
- }
58386
- var SCOUT_PAIRING_SUPERVISOR_INTENT_FILE = "supervisor.json", SCOUT_PAIRING_RUNTIME_PID_FILE = "runtime.pid", SCOUT_PAIRING_SUPERVISOR_PID_FILE = "supervisor.pid";
58306
+ var SCOUT_PAIRING_SUPERVISOR_INTENT_FILE = "supervisor.json", SCOUT_PAIRING_RUNTIME_PID_FILE = "runtime.pid", SCOUT_PAIRING_RUNTIME_OWNER_FILE = "runtime-owner.json", SCOUT_PAIRING_SUPERVISOR_PID_FILE = "supervisor.pid", SCOUT_PAIRING_RUNTIME_PROCESS_MARKER = "pairing-runtime-controller";
58387
58307
  var init_pairing_supervisor = () => {};
58388
58308
 
58389
58309
  // packages/web/server/pairing.ts
@@ -58629,7 +58549,7 @@ function clearScoutPairingRuntimePid() {
58629
58549
  unlinkSync(runtimePidPath);
58630
58550
  } catch {}
58631
58551
  }
58632
- function isScoutPairingProcessRunning2(pid) {
58552
+ function isScoutPairingProcessRunning(pid) {
58633
58553
  if (!pid || !Number.isInteger(pid) || pid <= 0) {
58634
58554
  return false;
58635
58555
  }
@@ -58645,15 +58565,15 @@ function staleScoutPairingRuntimeOwnerPid() {
58645
58565
  if (!pid) {
58646
58566
  return null;
58647
58567
  }
58648
- return isScoutPairingProcessRunning2(pid) ? null : pid;
58568
+ return isScoutPairingProcessRunning(pid) ? null : pid;
58649
58569
  }
58650
58570
  function isScoutPairingRuntimeRunning() {
58651
58571
  const pid = readScoutPairingRuntimePid();
58652
- if (isScoutPairingProcessRunning2(pid)) {
58572
+ if (isScoutPairingProcessRunning(pid)) {
58653
58573
  return true;
58654
58574
  }
58655
58575
  const snapshot = readScoutPairingRuntimeSnapshot();
58656
- return Boolean(snapshot && isScoutPairingProcessRunning2(snapshot.childPid ?? snapshot.pid));
58576
+ return Boolean(snapshot && isScoutPairingProcessRunning(snapshot.childPid ?? snapshot.pid));
58657
58577
  }
58658
58578
  function clearStaleScoutPairingRuntimeFiles() {
58659
58579
  const staleOwnerPid = staleScoutPairingRuntimeOwnerPid();
@@ -58661,7 +58581,7 @@ function clearStaleScoutPairingRuntimeFiles() {
58661
58581
  return;
58662
58582
  }
58663
58583
  const snapshot = readScoutPairingRuntimeSnapshot();
58664
- if (snapshot && isScoutPairingProcessRunning2(snapshot.childPid ?? snapshot.pid)) {
58584
+ if (snapshot && isScoutPairingProcessRunning(snapshot.childPid ?? snapshot.pid)) {
58665
58585
  return;
58666
58586
  }
58667
58587
  clearScoutPairingRuntimePid();
@@ -58912,10 +58832,11 @@ async function ensureDefaultScoutPairingWorkspaceConfig(currentDirectory) {
58912
58832
  }
58913
58833
  });
58914
58834
  }
58915
- async function waitForScoutPairingProcessExit(pid) {
58835
+ async function waitForScoutPairingProcessExit(owner) {
58836
+ const ownerPath = resolveScoutPairingSupervisorPaths().runtimeOwnerPath;
58916
58837
  const startedAt = Date.now();
58917
58838
  while (Date.now() - startedAt < SCOUT_PAIRING_PROCESS_EXIT_TIMEOUT_MS) {
58918
- if (!isScoutPairingProcessRunning2(pid)) {
58839
+ if (!readLiveScoutPairingRuntimeOwner(ownerPath, { expectedToken: owner.token })) {
58919
58840
  return;
58920
58841
  }
58921
58842
  await sleep2(SCOUT_PAIRING_PROCESS_EXIT_POLL_MS);
@@ -58941,10 +58862,13 @@ async function startScoutPairingRuntime() {
58941
58862
  await sleep2(SCOUT_PAIRING_RUNTIME_BOOTSTRAP_DELAY_MS);
58942
58863
  }
58943
58864
  async function stopScoutPairingRuntime() {
58865
+ const supervisorPaths = resolveScoutPairingSupervisorPaths();
58944
58866
  const pid = readScoutPairingRuntimePid();
58945
- if (pid && isScoutPairingProcessRunning2(pid)) {
58946
- process.kill(pid, "SIGTERM");
58947
- await waitForScoutPairingProcessExit(pid);
58867
+ const owner = readLiveScoutPairingRuntimeOwner(supervisorPaths.runtimeOwnerPath);
58868
+ if (pid && owner?.pid === pid && signalScoutPairingRuntimeOwner(owner, "SIGTERM", {
58869
+ ownerPath: supervisorPaths.runtimeOwnerPath
58870
+ })) {
58871
+ await waitForScoutPairingProcessExit(owner);
58948
58872
  }
58949
58873
  }
58950
58874
  async function restartScoutPairingRuntime() {
@@ -58957,24 +58881,6 @@ async function ensureScoutPairingRuntimeStarted() {
58957
58881
  }
58958
58882
  await startScoutPairingRuntime();
58959
58883
  }
58960
- async function requestPairingActionFromSupervisor(action) {
58961
- const paths2 = resolveScoutPairingSupervisorPaths();
58962
- const previousPid = readScoutPairingProcessPid(paths2.runtimePidPath);
58963
- updateScoutPairingSupervisorIntent(action, paths2.intentPath);
58964
- const supervisorPid = readLiveScoutPairingSupervisorPid(paths2.supervisorPidPath);
58965
- if (!supervisorPid)
58966
- return false;
58967
- const deadline = Date.now() + SCOUT_PAIRING_SUPERVISOR_ACTION_TIMEOUT_MS;
58968
- while (Date.now() < deadline) {
58969
- const currentPid = readScoutPairingProcessPid(paths2.runtimePidPath);
58970
- const running = isScoutPairingProcessRunning(currentPid);
58971
- if (action === "stop" ? !running : running && (action !== "restart" || currentPid !== previousPid)) {
58972
- return true;
58973
- }
58974
- await sleep2(SCOUT_PAIRING_PROCESS_EXIT_POLL_MS);
58975
- }
58976
- throw new Error(`Scout pairing supervisor ${supervisorPid} did not complete ${action} within ${SCOUT_PAIRING_SUPERVISOR_ACTION_TIMEOUT_MS}ms.`);
58977
- }
58978
58884
  function serializePairingMutation(fn) {
58979
58885
  const next = pairingMutationChain.then(fn);
58980
58886
  pairingMutationChain = next.catch(() => {
@@ -59011,20 +58917,14 @@ async function controlScoutWebPairingService(action, currentDirectory) {
59011
58917
  switch (action) {
59012
58918
  case "start":
59013
58919
  await ensureDefaultScoutPairingWorkspaceConfig(currentDirectory);
59014
- if (!await requestPairingActionFromSupervisor(action)) {
59015
- await ensureScoutPairingRuntimeStarted();
59016
- }
58920
+ await ensureScoutPairingRuntimeStarted();
59017
58921
  break;
59018
58922
  case "stop":
59019
- if (!await requestPairingActionFromSupervisor(action)) {
59020
- await stopScoutPairingRuntime();
59021
- }
58923
+ await stopScoutPairingRuntime();
59022
58924
  break;
59023
58925
  case "restart":
59024
58926
  await ensureDefaultScoutPairingWorkspaceConfig(currentDirectory);
59025
- if (!await requestPairingActionFromSupervisor(action)) {
59026
- await restartScoutPairingRuntime();
59027
- }
58927
+ await restartScoutPairingRuntime();
59028
58928
  break;
59029
58929
  }
59030
58930
  return readScoutPairingState(currentDirectory);
@@ -59044,7 +58944,7 @@ async function decideScoutWebPairingApproval(input, currentDirectory) {
59044
58944
  });
59045
58945
  return readScoutPairingState(currentDirectory);
59046
58946
  }
59047
- var SCOUT_PAIRING_HOME_DIRECTORY = ".scout/pairing", SCOUT_PAIRING_CONFIG_FILE = "config.json", SCOUT_PAIRING_IDENTITY_FILE = "identity.json", SCOUT_PAIRING_TRUSTED_PEERS_FILE = "trusted-peers.json", SCOUT_PAIRING_LOG_FILE = "bridge.log", SCOUT_PAIRING_RUNTIME_STATE_FILE = "runtime.json", SCOUT_PAIRING_RUNTIME_PID_FILE2 = "runtime.pid", SCOUT_PAIRING_DEFAULT_PORT = 7888, SCOUT_PAIRING_LOG_TAIL_LINE_LIMIT = 160, SCOUT_PAIRING_RUNTIME_BOOTSTRAP_DELAY_MS = 350, SCOUT_PAIRING_PROCESS_EXIT_TIMEOUT_MS = 5000, SCOUT_PAIRING_SUPERVISOR_ACTION_TIMEOUT_MS = 8000, SCOUT_PAIRING_PROCESS_EXIT_POLL_MS = 100, SCOUT_PAIRING_COMMAND_LABEL = "openscout-web pair", SCOUT_PAIRING_RUNTIME_VERSION = 1, SCOUT_PAIRING_RUNTIME_SCRIPT = "pairing-runtime-controller.ts", SCOUT_PAIRING_BRIDGE_CONNECT_TIMEOUT_MS = 1500, SCOUT_PAIRING_BRIDGE_REQUEST_TIMEOUT_MS = 2500, pairingMutationChain;
58947
+ var SCOUT_PAIRING_HOME_DIRECTORY = ".scout/pairing", SCOUT_PAIRING_CONFIG_FILE = "config.json", SCOUT_PAIRING_IDENTITY_FILE = "identity.json", SCOUT_PAIRING_TRUSTED_PEERS_FILE = "trusted-peers.json", SCOUT_PAIRING_LOG_FILE = "bridge.log", SCOUT_PAIRING_RUNTIME_STATE_FILE = "runtime.json", SCOUT_PAIRING_RUNTIME_PID_FILE2 = "runtime.pid", SCOUT_PAIRING_DEFAULT_PORT = 7888, SCOUT_PAIRING_LOG_TAIL_LINE_LIMIT = 160, SCOUT_PAIRING_RUNTIME_BOOTSTRAP_DELAY_MS = 350, SCOUT_PAIRING_PROCESS_EXIT_TIMEOUT_MS = 5000, SCOUT_PAIRING_PROCESS_EXIT_POLL_MS = 100, SCOUT_PAIRING_COMMAND_LABEL = "openscout-web pair", SCOUT_PAIRING_RUNTIME_VERSION = 1, SCOUT_PAIRING_RUNTIME_SCRIPT = "pairing-runtime-controller.ts", SCOUT_PAIRING_BRIDGE_CONNECT_TIMEOUT_MS = 1500, SCOUT_PAIRING_BRIDGE_REQUEST_TIMEOUT_MS = 2500, pairingMutationChain;
59048
58948
  var init_pairing = __esm(() => {
59049
58949
  init_src2();
59050
58950
  init_setup();
@@ -59223,10 +59123,10 @@ function metadataRecord6(value) {
59223
59123
  // packages/web/server/db/internal/db.ts
59224
59124
  import { Database as Database3 } from "bun:sqlite";
59225
59125
  import { homedir as homedir32 } from "os";
59226
- import { join as join44 } from "path";
59126
+ import { join as join43 } from "path";
59227
59127
  function resolveDbPath() {
59228
- const controlHome = process.env.OPENSCOUT_CONTROL_HOME ?? join44(homedir32(), ".openscout", "control-plane");
59229
- return join44(controlHome, "control-plane.sqlite");
59128
+ const controlHome = process.env.OPENSCOUT_CONTROL_HOME ?? join43(homedir32(), ".openscout", "control-plane");
59129
+ return join43(controlHome, "control-plane.sqlite");
59230
59130
  }
59231
59131
  function configureReadonlyDb(db2) {
59232
59132
  db2.exec(`PRAGMA busy_timeout = ${DB_BUSY_TIMEOUT_MS}`);
@@ -59276,7 +59176,7 @@ var init_parse2 = __esm(() => {
59276
59176
 
59277
59177
  // packages/web/server/db/internal/paths.ts
59278
59178
  import { homedir as homedir33 } from "os";
59279
- import { join as join46 } from "path";
59179
+ import { join as join45 } from "path";
59280
59180
  function compact(p) {
59281
59181
  if (!p)
59282
59182
  return null;
@@ -59288,10 +59188,10 @@ function pairingHarnessLogPath(adapterType, sessionId) {
59288
59188
  if (!normalizedAdapter || !normalizedSessionId) {
59289
59189
  return null;
59290
59190
  }
59291
- return join46(HOME, ".scout", "pairing", normalizedAdapter, normalizedSessionId, "logs", "stdout.log");
59191
+ return join45(HOME, ".scout", "pairing", normalizedAdapter, normalizedSessionId, "logs", "stdout.log");
59292
59192
  }
59293
59193
  function localAgentHarnessLogPath(agentId) {
59294
- return join46(localAgentLogsDirectory(agentId), "stdout.log");
59194
+ return join45(localAgentLogsDirectory(agentId), "stdout.log");
59295
59195
  }
59296
59196
  function adapterLogNamespaceForTransport(transport) {
59297
59197
  const normalized = transport?.trim();
@@ -63743,9 +63643,9 @@ var init_prefilter = __esm(() => {
63743
63643
  });
63744
63644
 
63745
63645
  // packages/web/server/scoutbot/thread-map.ts
63746
- import { mkdir as mkdir13, readFile as readFile16, writeFile as writeFile12 } from "fs/promises";
63646
+ import { mkdir as mkdir13, readFile as readFile15, writeFile as writeFile12 } from "fs/promises";
63747
63647
  import { randomUUID as randomUUID10 } from "crypto";
63748
- import { dirname as dirname32, join as join59 } from "path";
63648
+ import { dirname as dirname32, join as join58 } from "path";
63749
63649
 
63750
63650
  class ScoutbotThreadMapStore {
63751
63651
  filePath;
@@ -63862,7 +63762,7 @@ class ScoutbotThreadMapStore {
63862
63762
  }
63863
63763
  async read() {
63864
63764
  try {
63865
- const raw2 = await readFile16(this.filePath, "utf8");
63765
+ const raw2 = await readFile15(this.filePath, "utf8");
63866
63766
  const parsed = JSON.parse(raw2);
63867
63767
  const threads = Array.isArray(parsed.threads) ? parsed.threads.filter(isThreadRecord).map((thread) => ({
63868
63768
  ...thread,
@@ -63887,7 +63787,7 @@ class ScoutbotThreadMapStore {
63887
63787
  }
63888
63788
  }
63889
63789
  function defaultScoutbotThreadMapPath() {
63890
- return join59(resolveOpenScoutSupportPaths().supportDirectory, "scoutbot-threads.json");
63790
+ return join58(resolveOpenScoutSupportPaths().supportDirectory, "scoutbot-threads.json");
63891
63791
  }
63892
63792
  function chooseDefaultConversationId(snapshot) {
63893
63793
  const existing = Object.values(snapshot?.conversations ?? {}).find((conversation) => conversation.metadata?.scoutbotThreadId === SCOUTBOT_DEFAULT_THREAD_ID && isOpaqueChannelId(conversation.id));
@@ -64713,7 +64613,7 @@ var init_runner = __esm(() => {
64713
64613
  // packages/runtime/src/agent-workspace.ts
64714
64614
  import { existsSync as existsSync44 } from "fs";
64715
64615
  import { mkdir as mkdir14 } from "fs/promises";
64716
- import { join as join62 } from "path";
64616
+ import { join as join61 } from "path";
64717
64617
  async function isGitRepo(projectRoot) {
64718
64618
  try {
64719
64619
  await execSystemFile("git", ["rev-parse", "--git-dir"], { cwd: projectRoot, timeoutMs: 2000 });
@@ -64733,8 +64633,8 @@ async function createAgentWorkspace(projectRoot, agentName, requestedBranch) {
64733
64633
  }
64734
64634
  const branch = requestedBranch?.trim() || `scout/${agentName}`;
64735
64635
  validateWorktreeBranch(branch);
64736
- const workspaceDir = join62(projectRoot, SCOUT_WORKSPACES_DIRNAME);
64737
- const workspacePath = join62(workspaceDir, agentName);
64636
+ const workspaceDir = join61(projectRoot, SCOUT_WORKSPACES_DIRNAME);
64637
+ const workspacePath = join61(workspaceDir, agentName);
64738
64638
  if (existsSync44(workspacePath)) {
64739
64639
  return { path: workspacePath, branch };
64740
64640
  }
@@ -64785,7 +64685,7 @@ import { createHash as createHash8 } from "crypto";
64785
64685
  import { existsSync as existsSync45, mkdirSync as mkdirSync19, readdirSync as readdirSync12, readFileSync as readFileSync27, renameSync as renameSync7, statSync as statSync17, writeFileSync as writeFileSync17 } from "fs";
64786
64686
  import { open as open2 } from "fs/promises";
64787
64687
  import { homedir as homedir45 } from "os";
64788
- import { dirname as dirname35, join as join63 } from "path";
64688
+ import { dirname as dirname35, join as join62 } from "path";
64789
64689
  import { createInterface as createInterface2 } from "readline";
64790
64690
  import { Database as Database7 } from "bun:sqlite";
64791
64691
  async function loadServiceBudgets(forceRefresh = false) {
@@ -64860,7 +64760,7 @@ async function loadCodexGauge(forceRefresh = false) {
64860
64760
  harness: "codex",
64861
64761
  maxAgeMs: WEEK_MS
64862
64762
  });
64863
- const root = join63(homeDir(), ".codex", "sessions");
64763
+ const root = join62(homeDir(), ".codex", "sessions");
64864
64764
  if (!existsSync45(root))
64865
64765
  return fallback;
64866
64766
  const recent = findRecentCodexJsonl(root, CODEX_LOOKBACK_DAYS);
@@ -64955,14 +64855,14 @@ function findRecentCodexJsonl(root, lookbackDays) {
64955
64855
  return;
64956
64856
  }
64957
64857
  for (const entry of entries2) {
64958
- const full = join63(dir, entry.name);
64858
+ const full = join62(dir, entry.name);
64959
64859
  if (entry.isDirectory()) {
64960
64860
  walk(full);
64961
64861
  } else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
64962
- const stat10 = safeStat(full);
64963
- if (!stat10 || stat10.mtimeMs < cutoffMs)
64862
+ const stat9 = safeStat(full);
64863
+ if (!stat9 || stat9.mtimeMs < cutoffMs)
64964
64864
  continue;
64965
- paths2.push({ path: full, mtimeMs: stat10.mtimeMs });
64865
+ paths2.push({ path: full, mtimeMs: stat9.mtimeMs });
64966
64866
  }
64967
64867
  }
64968
64868
  };
@@ -65038,7 +64938,7 @@ function claudeStatuslineDir() {
65038
64938
  return resolveClaudeStatuslineDirectory();
65039
64939
  }
65040
64940
  function readClaudeStatuslineLatest() {
65041
- return readJsonRecord3(join63(claudeStatuslineDir(), "claude-latest.json"));
64941
+ return readJsonRecord3(join62(claudeStatuslineDir(), "claude-latest.json"));
65042
64942
  }
65043
64943
  function loadClaudeStatuslineQuotaSnapshots() {
65044
64944
  const now = Date.now();
@@ -65050,9 +64950,9 @@ function loadClaudeStatuslineQuotaSnapshots() {
65050
64950
  ].flatMap((record2) => claudeQuotaSnapshotsFromStatusline(record2)).sort((a, b) => b.capturedAt - a.capturedAt).slice(0, PERSISTED_QUOTA_ROW_LIMIT);
65051
64951
  }
65052
64952
  function readClaudeStatuslineHistory(minCapturedAt) {
65053
- const path2 = join63(claudeStatuslineDir(), "claude-history.jsonl");
65054
- const stat10 = safeStat(path2);
65055
- if (!stat10)
64953
+ const path2 = join62(claudeStatuslineDir(), "claude-history.jsonl");
64954
+ const stat9 = safeStat(path2);
64955
+ if (!stat9)
65056
64956
  return [];
65057
64957
  let content;
65058
64958
  try {
@@ -65060,7 +64960,7 @@ function readClaudeStatuslineHistory(minCapturedAt) {
65060
64960
  } catch {
65061
64961
  return [];
65062
64962
  }
65063
- if (stat10.size > CLAUDE_STATUSLINE_HISTORY_MAX_BYTES) {
64963
+ if (stat9.size > CLAUDE_STATUSLINE_HISTORY_MAX_BYTES) {
65064
64964
  content = content.slice(-CLAUDE_STATUSLINE_HISTORY_MAX_BYTES);
65065
64965
  const firstNewline = content.indexOf(`
65066
64966
  `);
@@ -65443,12 +65343,12 @@ async function readKimiUsageResponse() {
65443
65343
  }
65444
65344
  }
65445
65345
  function kimiCodeHome() {
65446
- return process.env.KIMI_CODE_HOME?.trim() || join63(homeDir(), ".kimi-code");
65346
+ return process.env.KIMI_CODE_HOME?.trim() || join62(homeDir(), ".kimi-code");
65447
65347
  }
65448
65348
  function readKimiCredentials() {
65449
- const candidates = [join63(kimiCodeHome(), "credentials", "kimi-code.json")];
65349
+ const candidates = [join62(kimiCodeHome(), "credentials", "kimi-code.json")];
65450
65350
  if (!process.env.KIMI_CODE_HOME?.trim()) {
65451
- candidates.push(join63(homeDir(), ".kimi", "credentials", "kimi-code.json"));
65351
+ candidates.push(join62(homeDir(), ".kimi", "credentials", "kimi-code.json"));
65452
65352
  }
65453
65353
  for (const path2 of candidates) {
65454
65354
  const credentials = readJsonRecord3(path2);
@@ -65552,7 +65452,7 @@ function importProviderDashboardUsage(input) {
65552
65452
  return gauge;
65553
65453
  }
65554
65454
  function dashboardImportPath() {
65555
- return join63(dirname35(resolveDbPath()), "provider-usage-snapshots.json");
65455
+ return join62(dirname35(resolveDbPath()), "provider-usage-snapshots.json");
65556
65456
  }
65557
65457
  function readDashboardUsageStore() {
65558
65458
  const record2 = readJsonRecord3(dashboardImportPath());
@@ -65758,12 +65658,12 @@ async function loadGrokGauge() {
65758
65658
  };
65759
65659
  }
65760
65660
  async function loadGrokBillingQuotaSnapshots() {
65761
- const path2 = join63(homeDir(), ".grok", "logs", "unified.jsonl");
65762
- const stat10 = safeStat(path2);
65763
- if (!stat10 || stat10.size <= 0)
65661
+ const path2 = join62(homeDir(), ".grok", "logs", "unified.jsonl");
65662
+ const stat9 = safeStat(path2);
65663
+ if (!stat9 || stat9.size <= 0)
65764
65664
  return [];
65765
- const length = Math.min(stat10.size, GROK_BILLING_LOG_MAX_BYTES);
65766
- const start = Math.max(0, stat10.size - length);
65665
+ const length = Math.min(stat9.size, GROK_BILLING_LOG_MAX_BYTES);
65666
+ const start = Math.max(0, stat9.size - length);
65767
65667
  let content = "";
65768
65668
  let handle;
65769
65669
  try {
@@ -65836,7 +65736,7 @@ function loadGrokLocalUsage() {
65836
65736
  const usage = grokUsageFromRecord(parsed, Date.now());
65837
65737
  return usage ? [usage] : [];
65838
65738
  }
65839
- const root = join63(homeDir(), ".grok", "sessions");
65739
+ const root = join62(homeDir(), ".grok", "sessions");
65840
65740
  if (!existsSync45(root))
65841
65741
  return [];
65842
65742
  const cutoff = Date.now() - WEEK_MS;
@@ -65849,7 +65749,7 @@ function loadGrokLocalUsage() {
65849
65749
  return;
65850
65750
  }
65851
65751
  for (const entry of entries2) {
65852
- const path2 = join63(directory, entry.name);
65752
+ const path2 = join62(directory, entry.name);
65853
65753
  if (entry.isDirectory())
65854
65754
  walk(path2);
65855
65755
  else if (entry.isFile() && entry.name === "updates.jsonl" && (safeStat(path2)?.mtimeMs ?? 0) >= cutoff)
@@ -65927,8 +65827,8 @@ function readCursorSubscriptionState() {
65927
65827
  return parseJsonRecord9(fixtureJson);
65928
65828
  }
65929
65829
  const candidates = [
65930
- join63(homeDir(), "Library", "Application Support", "Cursor", "User", "globalStorage", "state.vscdb"),
65931
- join63(homeDir(), ".config", "Cursor", "User", "globalStorage", "state.vscdb")
65830
+ join62(homeDir(), "Library", "Application Support", "Cursor", "User", "globalStorage", "state.vscdb"),
65831
+ join62(homeDir(), ".config", "Cursor", "User", "globalStorage", "state.vscdb")
65932
65832
  ];
65933
65833
  for (const path2 of candidates) {
65934
65834
  if (!existsSync45(path2))
@@ -66178,7 +66078,7 @@ function githubQuotaSnapshot(core, capturedAt) {
66178
66078
  }
66179
66079
  function detectCloudAccounts() {
66180
66080
  const accounts = [];
66181
- const declaredAccounts = readJsonRecord3(join63(homeDir(), ".scout", "provider-accounts.json"));
66081
+ const declaredAccounts = readJsonRecord3(join62(homeDir(), ".scout", "provider-accounts.json"));
66182
66082
  const exeAccount = recordValue4(declaredAccounts?.exe);
66183
66083
  if (exeAccount && stringValue12(exeAccount.status)?.toLowerCase() !== "inactive") {
66184
66084
  accounts.push({
@@ -66189,9 +66089,9 @@ function detectCloudAccounts() {
66189
66089
  });
66190
66090
  }
66191
66091
  const cloudflareConfig = [
66192
- join63(homeDir(), "Library", "Preferences", ".wrangler", "config", "default.toml"),
66193
- join63(homeDir(), ".wrangler", "config", "default.toml"),
66194
- join63(homeDir(), ".config", ".wrangler", "config", "default.toml")
66092
+ join62(homeDir(), "Library", "Preferences", ".wrangler", "config", "default.toml"),
66093
+ join62(homeDir(), ".wrangler", "config", "default.toml"),
66094
+ join62(homeDir(), ".config", ".wrangler", "config", "default.toml")
66195
66095
  ].find((path2) => fileContainsAny(path2, ["oauth_token", "api_token"]));
66196
66096
  if (cloudflareConfig) {
66197
66097
  accounts.push({
@@ -66202,10 +66102,10 @@ function detectCloudAccounts() {
66202
66102
  });
66203
66103
  }
66204
66104
  const vercelConfig = [
66205
- join63(homeDir(), "Library", "Application Support", "com.vercel.cli", "config.json"),
66206
- join63(homeDir(), ".config", "com.vercel.cli", "config.json")
66105
+ join62(homeDir(), "Library", "Application Support", "com.vercel.cli", "config.json"),
66106
+ join62(homeDir(), ".config", "com.vercel.cli", "config.json")
66207
66107
  ].map((path2) => readJsonRecord3(path2)).find((record2) => Boolean(stringValue12(record2?.currentTeam)));
66208
- const vercelAuth = existsSync45(join63(homeDir(), ".local", "share", "com.vercel.cli", "auth.json"));
66108
+ const vercelAuth = existsSync45(join62(homeDir(), ".local", "share", "com.vercel.cli", "auth.json"));
66209
66109
  if (vercelConfig || vercelAuth) {
66210
66110
  accounts.push({
66211
66111
  id: "vercel",
@@ -67840,9 +67740,9 @@ function readFilePreview(input) {
67840
67740
  }
67841
67741
  const { realPath, root } = resolved;
67842
67742
  try {
67843
- const stat11 = statSync21(realPath);
67743
+ const stat10 = statSync21(realPath);
67844
67744
  const title = realPath === "/" ? "/" : realPath.split("/").pop() || realPath;
67845
- if (stat11.isDirectory()) {
67745
+ if (stat10.isDirectory()) {
67846
67746
  return {
67847
67747
  ok: true,
67848
67748
  content: {
@@ -67858,7 +67758,7 @@ function readFilePreview(input) {
67858
67758
  }
67859
67759
  };
67860
67760
  }
67861
- if (!stat11.isFile()) {
67761
+ if (!stat10.isFile()) {
67862
67762
  return { ok: false, status: 415, error: "path is not a file or directory" };
67863
67763
  }
67864
67764
  const mediaType = mediaTypeFor(realPath);
@@ -67875,14 +67775,14 @@ function readFilePreview(input) {
67875
67775
  title,
67876
67776
  mediaType,
67877
67777
  rawUrl,
67878
- sizeBytes: stat11.size,
67778
+ sizeBytes: stat10.size,
67879
67779
  previewReason: previewReasonFor(mediaType),
67880
67780
  generatedAt: Date.now()
67881
67781
  }
67882
67782
  };
67883
67783
  }
67884
- const truncated = stat11.size > MAX_PREVIEW_BYTES;
67885
- const readable = readPreviewBuffer(realPath, Math.min(stat11.size, MAX_PREVIEW_BYTES));
67784
+ const truncated = stat10.size > MAX_PREVIEW_BYTES;
67785
+ const readable = readPreviewBuffer(realPath, Math.min(stat10.size, MAX_PREVIEW_BYTES));
67886
67786
  if (!looksTextual2(realPath, readable)) {
67887
67787
  return {
67888
67788
  ok: true,
@@ -67895,7 +67795,7 @@ function readFilePreview(input) {
67895
67795
  title,
67896
67796
  mediaType,
67897
67797
  rawUrl,
67898
- sizeBytes: stat11.size,
67798
+ sizeBytes: stat10.size,
67899
67799
  previewReason: previewReasonFor(mediaType),
67900
67800
  generatedAt: Date.now()
67901
67801
  }
@@ -67913,7 +67813,7 @@ function readFilePreview(input) {
67913
67813
  mediaType,
67914
67814
  rawUrl,
67915
67815
  content: readable.toString("utf8"),
67916
- sizeBytes: stat11.size,
67816
+ sizeBytes: stat10.size,
67917
67817
  truncated,
67918
67818
  generatedAt: Date.now()
67919
67819
  }
@@ -67978,7 +67878,7 @@ var init_file_preview = __esm(() => {
67978
67878
  // packages/agent-sessions/src/adapters/claude-code/team-topology.ts
67979
67879
  import { existsSync as existsSync50, readdirSync as readdirSync14, readFileSync as readFileSync32, statSync as statSync22 } from "fs";
67980
67880
  import { homedir as homedir51 } from "os";
67981
- import { basename as basename26, dirname as dirname39, join as join67, relative as relative10 } from "path";
67881
+ import { basename as basename26, dirname as dirname39, join as join66, relative as relative10 } from "path";
67982
67882
  function isObject2(value) {
67983
67883
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
67984
67884
  }
@@ -68022,17 +67922,17 @@ function statIsFile2(path2) {
68022
67922
  }
68023
67923
  }
68024
67924
  function readTeamConfigs(homeDir2) {
68025
- const teamsRoot = join67(homeDir2, ".claude", "teams");
67925
+ const teamsRoot = join66(homeDir2, ".claude", "teams");
68026
67926
  if (!existsSync50(teamsRoot) || !statIsDirectory2(teamsRoot)) {
68027
67927
  return [];
68028
67928
  }
68029
67929
  const teams = [];
68030
67930
  for (const entry of readdirSync14(teamsRoot)) {
68031
- const teamDir = join67(teamsRoot, entry);
67931
+ const teamDir = join66(teamsRoot, entry);
68032
67932
  if (!statIsDirectory2(teamDir)) {
68033
67933
  continue;
68034
67934
  }
68035
- const configPath = join67(teamDir, "config.json");
67935
+ const configPath = join66(teamDir, "config.json");
68036
67936
  const config = readJsonObject(configPath);
68037
67937
  if (!config) {
68038
67938
  continue;
@@ -68170,7 +68070,7 @@ function membersFromConfig(team, groupId, configRefId) {
68170
68070
  return { agents, relationships, agentByExternal };
68171
68071
  }
68172
68072
  function readTaskFiles(tasksRoot, teamName) {
68173
- const teamTasksRoot = join67(tasksRoot, teamName);
68073
+ const teamTasksRoot = join66(tasksRoot, teamName);
68174
68074
  if (!existsSync50(teamTasksRoot) || !statIsDirectory2(teamTasksRoot)) {
68175
68075
  return [];
68176
68076
  }
@@ -68181,7 +68081,7 @@ function readTaskFiles(tasksRoot, teamName) {
68181
68081
  if (!current)
68182
68082
  continue;
68183
68083
  for (const entry of readdirSync14(current)) {
68184
- const path2 = join67(current, entry);
68084
+ const path2 = join66(current, entry);
68185
68085
  if (statIsDirectory2(path2)) {
68186
68086
  stack.push(path2);
68187
68087
  } else if (statIsFile2(path2)) {
@@ -68216,7 +68116,7 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
68216
68116
  } catch {
68217
68117
  return null;
68218
68118
  }
68219
- const relativePath = relative10(join67(tasksRoot, teamName), taskPath);
68119
+ const relativePath = relative10(join66(tasksRoot, teamName), taskPath);
68220
68120
  const fallbackId = relativePath.replace(/\.[^.]+$/u, "");
68221
68121
  const fallbackTitle = firstMarkdownTitle(raw2) ?? basename26(fallbackId);
68222
68122
  const inferredState = inferTaskStateFromPath(dirname39(relativePath));
@@ -68250,7 +68150,7 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
68250
68150
  };
68251
68151
  }
68252
68152
  function tasksFromFiles(homeDir2, teamName, agentByExternal) {
68253
- const tasksRoot = join67(homeDir2, ".claude", "tasks");
68153
+ const tasksRoot = join66(homeDir2, ".claude", "tasks");
68254
68154
  const taskFiles = readTaskFiles(tasksRoot, teamName);
68255
68155
  const sourceRefs = [];
68256
68156
  const parsedTasks = [];
@@ -68432,7 +68332,7 @@ var init_team_topology = __esm(() => {
68432
68332
  // packages/agent-sessions/src/adapters/claude-code/subagent-topology.ts
68433
68333
  import { existsSync as existsSync51, readdirSync as readdirSync15, readFileSync as readFileSync33, statSync as statSync23 } from "fs";
68434
68334
  import { homedir as homedir52 } from "os";
68435
- import { join as join68, normalize as normalize2, sep as sep3 } from "path";
68335
+ import { join as join67, normalize as normalize2, sep as sep3 } from "path";
68436
68336
  function isObject3(value) {
68437
68337
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
68438
68338
  }
@@ -68504,7 +68404,7 @@ function parseJsonLines(path2) {
68504
68404
  return events2;
68505
68405
  }
68506
68406
  function projectsRoot3(homeDir2) {
68507
- return join68(homeDir2, ".claude", "projects");
68407
+ return join67(homeDir2, ".claude", "projects");
68508
68408
  }
68509
68409
  function discoverParentSessionDirs(homeDir2, maxParentSessions, sessionFilter) {
68510
68410
  const root = projectsRoot3(homeDir2);
@@ -68512,22 +68412,22 @@ function discoverParentSessionDirs(homeDir2, maxParentSessions, sessionFilter) {
68512
68412
  return [];
68513
68413
  const discovered = [];
68514
68414
  for (const projectEntry of readdirSync15(root).sort()) {
68515
- const projectDir = join68(root, projectEntry);
68415
+ const projectDir = join67(root, projectEntry);
68516
68416
  if (!statIsDirectory3(projectDir))
68517
68417
  continue;
68518
68418
  for (const sessionEntry of readdirSync15(projectDir).sort()) {
68519
68419
  if (sessionFilter && sessionEntry !== sessionFilter)
68520
68420
  continue;
68521
- const sessionDir = join68(projectDir, sessionEntry);
68421
+ const sessionDir = join67(projectDir, sessionEntry);
68522
68422
  if (!statIsDirectory3(sessionDir))
68523
68423
  continue;
68524
- const subagentsDir = join68(sessionDir, "subagents");
68424
+ const subagentsDir = join67(sessionDir, "subagents");
68525
68425
  if (!statIsDirectory3(subagentsDir))
68526
68426
  continue;
68527
68427
  const directSubagents = readdirSync15(subagentsDir).some((entry) => /^agent-[a-zA-Z0-9]+\.jsonl$/u.test(entry));
68528
68428
  if (!directSubagents)
68529
68429
  continue;
68530
- const parentSessionPath = join68(projectDir, `${sessionEntry}.jsonl`);
68430
+ const parentSessionPath = join67(projectDir, `${sessionEntry}.jsonl`);
68531
68431
  discovered.push({
68532
68432
  sessionId: sessionEntry,
68533
68433
  projectDir,
@@ -68721,8 +68621,8 @@ function readSubagentRecord(parent, parentSummary, file) {
68721
68621
  if (!match2?.[1])
68722
68622
  return null;
68723
68623
  const agentId = match2[1];
68724
- const transcriptPath = join68(parent.subagentsDir, file);
68725
- const metaPath = join68(parent.subagentsDir, `agent-${agentId}.meta.json`);
68624
+ const transcriptPath = join67(parent.subagentsDir, file);
68625
+ const metaPath = join67(parent.subagentsDir, `agent-${agentId}.meta.json`);
68726
68626
  const meta = statIsFile3(metaPath) ? parseSubagentMeta(metaPath) : undefined;
68727
68627
  const toolUseId = meta?.toolUseId;
68728
68628
  const parentToolUse = toolUseId ? parentSummary.toolUses.get(toolUseId) : undefined;
@@ -68950,7 +68850,7 @@ var init_subagent_topology = () => {};
68950
68850
  // packages/agent-sessions/src/adapters/claude-code/workflow-topology.ts
68951
68851
  import { existsSync as existsSync52, readdirSync as readdirSync16, readFileSync as readFileSync34, statSync as statSync24 } from "fs";
68952
68852
  import { homedir as homedir53 } from "os";
68953
- import { basename as basename28, join as join69, normalize as normalize3, relative as relative11, sep as sep4 } from "path";
68853
+ import { basename as basename28, join as join68, normalize as normalize3, relative as relative11, sep as sep4 } from "path";
68954
68854
  function isObject4(value) {
68955
68855
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
68956
68856
  }
@@ -69022,33 +68922,33 @@ function parseJsonLines2(path2) {
69022
68922
  return events2;
69023
68923
  }
69024
68924
  function discoverWorkflowDirs(homeDir2, maxRuns) {
69025
- const projectsRoot4 = join69(homeDir2, ".claude", "projects");
68925
+ const projectsRoot4 = join68(homeDir2, ".claude", "projects");
69026
68926
  if (!existsSync52(projectsRoot4) || !statIsDirectory4(projectsRoot4)) {
69027
68927
  return [];
69028
68928
  }
69029
68929
  const discovered = [];
69030
68930
  for (const projectEntry of readdirSync16(projectsRoot4).sort()) {
69031
- const projectDir = join69(projectsRoot4, projectEntry);
68931
+ const projectDir = join68(projectsRoot4, projectEntry);
69032
68932
  if (!statIsDirectory4(projectDir))
69033
68933
  continue;
69034
68934
  for (const sessionEntry of readdirSync16(projectDir).sort()) {
69035
- const sessionDir = join69(projectDir, sessionEntry);
68935
+ const sessionDir = join68(projectDir, sessionEntry);
69036
68936
  if (!statIsDirectory4(sessionDir))
69037
68937
  continue;
69038
- const workflowsRoot = join69(sessionDir, "subagents", "workflows");
68938
+ const workflowsRoot = join68(sessionDir, "subagents", "workflows");
69039
68939
  if (!statIsDirectory4(workflowsRoot))
69040
68940
  continue;
69041
68941
  for (const runEntry of readdirSync16(workflowsRoot).sort()) {
69042
68942
  if (!runEntry.startsWith("wf_"))
69043
68943
  continue;
69044
- const workflowDir = join69(workflowsRoot, runEntry);
68944
+ const workflowDir = join68(workflowsRoot, runEntry);
69045
68945
  if (!statIsDirectory4(workflowDir))
69046
68946
  continue;
69047
68947
  discovered.push({
69048
68948
  runId: runEntry,
69049
68949
  workflowDir,
69050
68950
  parentSessionId: sessionEntry,
69051
- parentSessionPath: join69(projectDir, `${sessionEntry}.jsonl`),
68951
+ parentSessionPath: join68(projectDir, `${sessionEntry}.jsonl`),
69052
68952
  projectDir,
69053
68953
  mtimeMs: statMtimeMs2(workflowDir)
69054
68954
  });
@@ -69169,7 +69069,7 @@ function readWorkflowLaunch(parentSessionPath, runId) {
69169
69069
  return;
69170
69070
  }
69171
69071
  function findGeneratedScriptForRun(homeDir2, runId) {
69172
- const projectsRoot4 = join69(homeDir2, ".claude", "projects");
69072
+ const projectsRoot4 = join68(homeDir2, ".claude", "projects");
69173
69073
  if (!statIsDirectory4(projectsRoot4))
69174
69074
  return;
69175
69075
  const stack = [{ path: projectsRoot4, depth: 0 }];
@@ -69178,7 +69078,7 @@ function findGeneratedScriptForRun(homeDir2, runId) {
69178
69078
  if (!current || current.depth > 8)
69179
69079
  continue;
69180
69080
  for (const entry of readdirSync16(current.path).sort()) {
69181
- const fullPath = join69(current.path, entry);
69081
+ const fullPath = join68(current.path, entry);
69182
69082
  if (statIsDirectory4(fullPath)) {
69183
69083
  stack.push({ path: fullPath, depth: current.depth + 1 });
69184
69084
  } else if (statIsFile4(fullPath) && entry.endsWith(`${runId}.js`)) {
@@ -69249,7 +69149,7 @@ function readWorkflowScript(homeDir2, launch, runId) {
69249
69149
  return parsed;
69250
69150
  }
69251
69151
  function readJournal(workflowDir) {
69252
- const journalPath = join69(workflowDir, "journal.jsonl");
69152
+ const journalPath = join68(workflowDir, "journal.jsonl");
69253
69153
  const events2 = parseJsonLines2(journalPath);
69254
69154
  const startedByAgent = new Map;
69255
69155
  const resultByAgent = new Map;
@@ -69358,8 +69258,8 @@ function readWorkflowAgents(run, journal, script) {
69358
69258
  const files = statIsDirectory4(run.workflowDir) ? readdirSync16(run.workflowDir).sort() : [];
69359
69259
  return files.map((file) => /^agent-([a-zA-Z0-9]+)\.jsonl$/u.exec(file)).filter((match2) => Boolean(match2)).map((match2) => {
69360
69260
  const agentId = match2[1] ?? "unknown";
69361
- const transcriptPath = join69(run.workflowDir, `agent-${agentId}.jsonl`);
69362
- const metaPath = join69(run.workflowDir, `agent-${agentId}.meta.json`);
69261
+ const transcriptPath = join68(run.workflowDir, `agent-${agentId}.jsonl`);
69262
+ const metaPath = join68(run.workflowDir, `agent-${agentId}.meta.json`);
69363
69263
  const events2 = parseJsonLines2(transcriptPath);
69364
69264
  const meta = readJsonObject3(metaPath);
69365
69265
  const result = resultObjectForAgent(journal, agentId);
@@ -69456,7 +69356,7 @@ function buildTopologyForRuns(runs, observedAt) {
69456
69356
  const workflowGroupId = `claude-workflow:${runSegment}`;
69457
69357
  const workflowRefId = sourceRefId4("claude-workflow-dir", run.workflowDir);
69458
69358
  const parentSessionRefId = sourceRefId4("claude-workflow-parent-session", run.parentSessionPath);
69459
- const journalPath = join69(run.workflowDir, "journal.jsonl");
69359
+ const journalPath = join68(run.workflowDir, "journal.jsonl");
69460
69360
  const journalRefId = sourceRefId4("claude-workflow-journal", journalPath);
69461
69361
  const scriptRefId = run.script?.scriptPath ? sourceRefId4("claude-workflow-script", run.script.scriptPath) : undefined;
69462
69362
  appendSourceRef2(sourceRefs, sourceRefIds, {
@@ -69937,8 +69837,8 @@ var exports_project_overview = {};
69937
69837
  __export(exports_project_overview, {
69938
69838
  buildProjectOverview: () => buildProjectOverview
69939
69839
  });
69940
- import { access as access2, readFile as readFile18 } from "fs/promises";
69941
- import { basename as basename29, join as join70 } from "path";
69840
+ import { access as access2, readFile as readFile17 } from "fs/promises";
69841
+ import { basename as basename29, join as join69 } from "path";
69942
69842
  function excerptFromText(raw2) {
69943
69843
  const trimmed = raw2.trim();
69944
69844
  if (!trimmed)
@@ -69956,7 +69856,7 @@ function excerptFromText(raw2) {
69956
69856
  }
69957
69857
  async function readArtifactExcerpt(absolutePath, relativePath) {
69958
69858
  try {
69959
- const raw2 = await readFile18(absolutePath, "utf8");
69859
+ const raw2 = await readFile17(absolutePath, "utf8");
69960
69860
  if (relativePath.endsWith(".json")) {
69961
69861
  try {
69962
69862
  const parsed = JSON.parse(raw2);
@@ -70012,7 +69912,7 @@ async function pathExists3(filePath) {
70012
69912
  }
70013
69913
  async function readPackageFacet(packagePath) {
70014
69914
  try {
70015
- const raw2 = await readFile18(packagePath, "utf8");
69915
+ const raw2 = await readFile17(packagePath, "utf8");
70016
69916
  const parsed = JSON.parse(raw2);
70017
69917
  return {
70018
69918
  name: typeof parsed.name === "string" ? parsed.name : null,
@@ -70033,7 +69933,7 @@ async function buildProjectOverview(input) {
70033
69933
  const relativeArtifacts = buildArtifactList(root);
70034
69934
  const artifacts = [];
70035
69935
  for (const relativePath of relativeArtifacts) {
70036
- const absolutePath = join70(root, relativePath);
69936
+ const absolutePath = join69(root, relativePath);
70037
69937
  const exists2 = await pathExists3(absolutePath);
70038
69938
  artifacts.push({
70039
69939
  relativePath,
@@ -70043,9 +69943,9 @@ async function buildProjectOverview(input) {
70043
69943
  excerpt: exists2 ? await readArtifactExcerpt(absolutePath, relativePath) : null
70044
69944
  });
70045
69945
  }
70046
- const projectConfigPath3 = join70(root, ".openscout", "project.json");
69946
+ const projectConfigPath3 = join69(root, ".openscout", "project.json");
70047
69947
  const projectConfigExists = await pathExists3(projectConfigPath3);
70048
- const packagePath = join70(root, "package.json");
69948
+ const packagePath = join69(root, "package.json");
70049
69949
  const packageFacet = await pathExists3(packagePath) ? await readPackageFacet(packagePath) : null;
70050
69950
  return {
70051
69951
  ok: true,
@@ -70095,8 +69995,8 @@ __export(exports_agent_definitions, {
70095
69995
  resolveAgentProjectRoot: () => resolveAgentProjectRoot,
70096
69996
  buildAgentDefinitions: () => buildAgentDefinitions
70097
69997
  });
70098
- import { access as access3, readdir as readdir5, readFile as readFile19 } from "fs/promises";
70099
- import { join as join71 } from "path";
69998
+ import { access as access3, readdir as readdir5, readFile as readFile18 } from "fs/promises";
69999
+ import { join as join70 } from "path";
70100
70000
  function excerptFromText2(raw2) {
70101
70001
  const trimmed = raw2.trim();
70102
70002
  if (!trimmed)
@@ -70114,7 +70014,7 @@ function excerptFromText2(raw2) {
70114
70014
  }
70115
70015
  async function readFileExcerpt(absolutePath, relativePath) {
70116
70016
  try {
70117
- const raw2 = await readFile19(absolutePath, "utf8");
70017
+ const raw2 = await readFile18(absolutePath, "utf8");
70118
70018
  if (relativePath.endsWith(".json") || relativePath.endsWith(".yaml") || relativePath.endsWith(".yml")) {
70119
70019
  return excerptFromText2(raw2);
70120
70020
  }
@@ -70144,7 +70044,7 @@ async function listFolderFiles(folderPath, slug) {
70144
70044
  for (const entry of entries2) {
70145
70045
  if (!entry.isFile())
70146
70046
  continue;
70147
- const absolutePath = join71(folderPath, entry.name);
70047
+ const absolutePath = join70(folderPath, entry.name);
70148
70048
  const relativePath = `${slug}/${entry.name}`;
70149
70049
  files.push({
70150
70050
  name: entry.name,
@@ -70174,7 +70074,7 @@ async function buildAgentDefinitions(input) {
70174
70074
  return { ok: false, status: resolved.status, error: resolved.error };
70175
70075
  }
70176
70076
  const projectRoot = resolved.realPath;
70177
- const agentsRoot = join71(projectRoot, ".agents");
70077
+ const agentsRoot = join70(projectRoot, ".agents");
70178
70078
  const agentsRootExists = await pathExists4(agentsRoot);
70179
70079
  const selectedSlug = agentSlugFromHandle(input.agentHandle, input.agentName ?? "");
70180
70080
  const folders = [];
@@ -70184,7 +70084,7 @@ async function buildAgentDefinitions(input) {
70184
70084
  if (!entry.isDirectory() || SKIPPED_NAMES.has(entry.name) || entry.name.startsWith(".")) {
70185
70085
  continue;
70186
70086
  }
70187
- const folderPath = join71(agentsRoot, entry.name);
70087
+ const folderPath = join70(agentsRoot, entry.name);
70188
70088
  const files = await listFolderFiles(folderPath, entry.name);
70189
70089
  if (files.length === 0)
70190
70090
  continue;
@@ -70234,7 +70134,8 @@ init_src3();
70234
70134
  init_local_config();
70235
70135
  init_setup();
70236
70136
  import { existsSync as existsSync55 } from "fs";
70237
- import { dirname as dirname43, join as join74, resolve as resolve31 } from "path";
70137
+ import { randomBytes as randomBytes7 } from "crypto";
70138
+ import { dirname as dirname43, join as join73, resolve as resolve31 } from "path";
70238
70139
  import { fileURLToPath as fileURLToPath10 } from "url";
70239
70140
 
70240
70141
  // packages/web/shared/scope-integration.js
@@ -70340,7 +70241,7 @@ function serializeOpenScoutWebBootstrap(env = process.env) {
70340
70241
 
70341
70242
  // packages/web/server/create-openscout-web-server.ts
70342
70243
  import { createReadStream as createReadStream2, existsSync as existsSync53, readFileSync as readFileSync35, readdirSync as readdirSync17, realpathSync as realpathSync7, rmSync as rmSync7, statSync as statSync25 } from "fs";
70343
- import { basename as basename31, dirname as dirname41, isAbsolute as isAbsolute12, join as join72, relative as relative12, resolve as resolve29 } from "path";
70244
+ import { basename as basename31, dirname as dirname41, isAbsolute as isAbsolute12, join as join71, relative as relative12, resolve as resolve29 } from "path";
70344
70245
  import { createInterface as createInterface3 } from "readline";
70345
70246
  import { fileURLToPath as fileURLToPath8 } from "url";
70346
70247
  import { homedir as homedir55 } from "os";
@@ -73612,50 +73513,6 @@ function errorReason(error) {
73612
73513
  return null;
73613
73514
  }
73614
73515
 
73615
- // packages/web/server/terminal-hosts/herdr-session-state.ts
73616
- init_system_probes();
73617
- import { readFile as readFile15, stat as stat8 } from "fs/promises";
73618
- import { join as join42 } from "path";
73619
- var LAST_KNOWN_LIST_CAP = 8;
73620
- function parseHerdrSessionState(value, savedAt) {
73621
- const workspaces = parseHerdrPersistedTopology(value);
73622
- if (workspaces === null)
73623
- return null;
73624
- let tabs = 0;
73625
- let panes = 0;
73626
- const cwds = [];
73627
- const agents = [];
73628
- for (const workspace of workspaces) {
73629
- tabs += workspace.tabs.length;
73630
- for (const tab of workspace.tabs) {
73631
- panes += tab.panes.length;
73632
- for (const pane of tab.panes) {
73633
- if (pane.cwd && !cwds.includes(pane.cwd))
73634
- cwds.push(pane.cwd);
73635
- if (pane.agent && !agents.includes(pane.agent))
73636
- agents.push(pane.agent);
73637
- }
73638
- }
73639
- }
73640
- return {
73641
- savedAt,
73642
- workspaces: workspaces.length,
73643
- tabs,
73644
- panes,
73645
- cwds: cwds.slice(0, LAST_KNOWN_LIST_CAP),
73646
- agents: agents.slice(0, LAST_KNOWN_LIST_CAP)
73647
- };
73648
- }
73649
- async function readHerdrLastKnownState(sessionDir) {
73650
- try {
73651
- const path2 = join42(sessionDir, "session.json");
73652
- const [raw2, stats] = await Promise.all([readFile15(path2, "utf8"), stat8(path2)]);
73653
- return parseHerdrSessionState(JSON.parse(raw2), stats.mtimeMs);
73654
- } catch {
73655
- return null;
73656
- }
73657
- }
73658
-
73659
73516
  // packages/web/server/terminal-hosts/herdr.ts
73660
73517
  var HERDR_TIMEOUT_MS2 = 2000;
73661
73518
  var herdrTerminalHost = {
@@ -73679,18 +73536,10 @@ var herdrTerminalHost = {
73679
73536
  },
73680
73537
  async list(context = {}) {
73681
73538
  const snapshot = await herdrSessionsProbe.for({ env: context.env ?? process.env }).fresh();
73682
- return Promise.all((snapshot.value ?? []).map(async (session3) => {
73683
- const lastKnown = !session3.running && session3.sessionDir ? await readHerdrLastKnownState(session3.sessionDir) : null;
73684
- return {
73685
- name: session3.name,
73686
- state: session3.running ? "live" : "detached",
73687
- ...lastKnown?.cwds[0] ? { cwd: lastKnown.cwds[0] } : {},
73688
- metadata: {
73689
- isDefault: session3.isDefault,
73690
- running: session3.running,
73691
- ...lastKnown ? { lastKnownLayout: lastKnown } : {}
73692
- }
73693
- };
73539
+ return (snapshot.value ?? []).map((session3) => ({
73540
+ name: session3.name,
73541
+ state: session3.running ? "live" : "detached",
73542
+ metadata: { isDefault: session3.isDefault, running: session3.running }
73694
73543
  }));
73695
73544
  },
73696
73545
  surface(session3) {
@@ -73810,12 +73659,12 @@ async function waitForHerdrSession(sessionName, env) {
73810
73659
  init_system_probes();
73811
73660
  init_src();
73812
73661
  import { homedir as homedir31 } from "os";
73813
- import { join as join43 } from "path";
73662
+ import { join as join42 } from "path";
73814
73663
  var ZELLIJ_TIMEOUT_MS2 = 2000;
73815
73664
  var CTRL_C = "3";
73816
73665
  var CTRL_D = "4";
73817
73666
  function resolveZellijSocketDir(env = process.env) {
73818
- return env.ZELLIJ_SOCKET_DIR?.trim() || env.OPENSCOUT_ZELLIJ_SOCKET_DIR?.trim() || join43(env.HOME?.trim() || homedir31(), ".openscout", "zellij-sockets");
73667
+ return env.ZELLIJ_SOCKET_DIR?.trim() || env.OPENSCOUT_ZELLIJ_SOCKET_DIR?.trim() || join42(env.HOME?.trim() || homedir31(), ".openscout", "zellij-sockets");
73819
73668
  }
73820
73669
  function zellijEnv(context) {
73821
73670
  const base = context.env ?? process.env;
@@ -74217,7 +74066,7 @@ function isMissingTerminalWorkspaceTable(error) {
74217
74066
  import { mkdir as mkdir12, rm as rm5, writeFile as writeFile11 } from "fs/promises";
74218
74067
  import { randomUUID as randomUUID7 } from "crypto";
74219
74068
  import { tmpdir } from "os";
74220
- import { join as join45 } from "path";
74069
+ import { join as join44 } from "path";
74221
74070
 
74222
74071
  // packages/web/client/lib/capture-attachments.ts
74223
74072
  var MARKDOWN_EXTENSIONS = new Set([
@@ -74404,7 +74253,7 @@ function resolveTextCaptureMediaType(mediaType, fileName) {
74404
74253
  }
74405
74254
 
74406
74255
  // packages/web/server/image-blob-store.ts
74407
- var BLOB_DIR = join45(tmpdir(), "openscout-image-blobs");
74256
+ var BLOB_DIR = join44(tmpdir(), "openscout-image-blobs");
74408
74257
  var BLOB_TTL_MS = 6 * 60 * 60 * 1000;
74409
74258
  var SWEEP_INTERVAL_MS2 = 30 * 60 * 1000;
74410
74259
  var MAX_BLOB_BYTES = 25 * 1024 * 1024;
@@ -74473,7 +74322,7 @@ async function putImageBlob(input) {
74473
74322
  await ensureDir();
74474
74323
  ensureSweeper();
74475
74324
  const id = randomUUID7();
74476
- const path2 = join45(BLOB_DIR, id);
74325
+ const path2 = join44(BLOB_DIR, id);
74477
74326
  await writeFile11(path2, bytes);
74478
74327
  const entry = {
74479
74328
  id,
@@ -75542,18 +75391,18 @@ init_src2();
75542
75391
  init_local_agents();
75543
75392
  import { existsSync as existsSync40, readdirSync as readdirSync11, readFileSync as readFileSync23, statSync as statSync15 } from "fs";
75544
75393
  import { homedir as homedir41 } from "os";
75545
- import { basename as basename20, join as join54, resolve as resolve20 } from "path";
75394
+ import { basename as basename20, join as join53, resolve as resolve20 } from "path";
75546
75395
 
75547
75396
  // packages/runtime/src/tail/service.ts
75548
75397
  init_secret_redaction();
75549
75398
  import { basename as basename19 } from "path";
75550
- import { open, stat as stat9 } from "fs/promises";
75399
+ import { open, stat as stat8 } from "fs/promises";
75551
75400
 
75552
75401
  // packages/runtime/src/tail/claude-source.ts
75553
75402
  init_user_config();
75554
75403
  import { closeSync, existsSync as existsSync33, openSync, readdirSync as readdirSync4, readSync, statSync as statSync8 } from "fs";
75555
75404
  import { homedir as homedir34 } from "os";
75556
- import { basename as basename12, join as join47, relative as relative4 } from "path";
75405
+ import { basename as basename12, join as join46, relative as relative4 } from "path";
75557
75406
 
75558
75407
  // packages/runtime/src/tail/discover.ts
75559
75408
  init_ps();
@@ -75829,7 +75678,7 @@ function rememberMetadata(file, metadata) {
75829
75678
  return metadata;
75830
75679
  }
75831
75680
  function projectsRoot() {
75832
- return process.env.OPENSCOUT_TAIL_CLAUDE_PROJECTS_ROOT ?? join47(homedir34(), ".claude", "projects");
75681
+ return process.env.OPENSCOUT_TAIL_CLAUDE_PROJECTS_ROOT ?? join46(homedir34(), ".claude", "projects");
75833
75682
  }
75834
75683
  function listJsonlFiles(dir) {
75835
75684
  let entries2 = [];
@@ -75974,7 +75823,7 @@ function listRecentClaudeProjectTranscripts(root, scope) {
75974
75823
  return [];
75975
75824
  }
75976
75825
  for (const entry of projectDirs) {
75977
- const projectDir = join47(root, entry);
75826
+ const projectDir = join46(root, entry);
75978
75827
  try {
75979
75828
  if (!statSync8(projectDir).isDirectory())
75980
75829
  continue;
@@ -75982,13 +75831,13 @@ function listRecentClaudeProjectTranscripts(root, scope) {
75982
75831
  continue;
75983
75832
  }
75984
75833
  for (const file of listJsonlFiles(projectDir)) {
75985
- const path2 = join47(projectDir, file);
75834
+ const path2 = join46(projectDir, file);
75986
75835
  try {
75987
75836
  const stats = statSync8(path2);
75988
- const subagentsDir = join47(projectDir, basename12(path2, ".jsonl"), "subagents");
75837
+ const subagentsDir = join46(projectDir, basename12(path2, ".jsonl"), "subagents");
75989
75838
  const activeSubagents = [];
75990
75839
  for (const subagentFile of listClaudeSubagentFiles(subagentsDir)) {
75991
- const subagentPath = join47(subagentsDir, subagentFile);
75840
+ const subagentPath = join46(subagentsDir, subagentFile);
75992
75841
  try {
75993
75842
  const subagentStats = statSync8(subagentPath);
75994
75843
  if (subagentStats.mtimeMs < cutoff)
@@ -76229,7 +76078,7 @@ var ClaudeSource = {
76229
76078
  // packages/runtime/src/tail/codex-source.ts
76230
76079
  import { closeSync as closeSync2, existsSync as existsSync34, openSync as openSync2, readdirSync as readdirSync5, readSync as readSync2, statSync as statSync9 } from "fs";
76231
76080
  import { homedir as homedir35 } from "os";
76232
- import { basename as basename13, join as join48 } from "path";
76081
+ import { basename as basename13, join as join47 } from "path";
76233
76082
  var SOURCE_NAME2 = "codex";
76234
76083
  var MAX_SUMMARY_LEN2 = 200;
76235
76084
  var TOOL_CALL_STATE_KEY = "codexToolCallsById";
@@ -76277,8 +76126,8 @@ function codexSessionRoots() {
76277
76126
  if (explicit?.trim())
76278
76127
  return [explicit.trim()];
76279
76128
  return [
76280
- join48(homedir35(), ".codex", "sessions"),
76281
- join48(homedir35(), ".openai-codex", "sessions")
76129
+ join47(homedir35(), ".codex", "sessions"),
76130
+ join47(homedir35(), ".openai-codex", "sessions")
76282
76131
  ].filter((root) => existsSync34(root));
76283
76132
  }
76284
76133
  function isCodexAppServerProcess(command) {
@@ -76377,7 +76226,7 @@ function walkRecentJsonlFiles(root, scope) {
76377
76226
  continue;
76378
76227
  }
76379
76228
  for (const entry of entries2) {
76380
- const path2 = join48(dir, entry);
76229
+ const path2 = join47(dir, entry);
76381
76230
  let stats;
76382
76231
  try {
76383
76232
  stats = statSync9(path2);
@@ -76650,7 +76499,7 @@ var CodexSource = {
76650
76499
  // packages/runtime/src/tail/cursor-source.ts
76651
76500
  import { closeSync as closeSync3, existsSync as existsSync35, openSync as openSync3, readdirSync as readdirSync6, readSync as readSync3, statSync as statSync10 } from "fs";
76652
76501
  import { homedir as homedir36 } from "os";
76653
- import { basename as basename14, join as join49 } from "path";
76502
+ import { basename as basename14, join as join48 } from "path";
76654
76503
  var SOURCE_NAME3 = "cursor";
76655
76504
  var MAX_SUMMARY_LEN3 = 200;
76656
76505
  var DEFAULT_HOT_DISCOVERY_WINDOW_MS3 = 10 * 60 * 1000;
@@ -76682,7 +76531,7 @@ function cursorProcessMonitorRoots() {
76682
76531
  const explicit = process.env.OPENSCOUT_TAIL_CURSOR_PROCESS_MONITOR_ROOT;
76683
76532
  if (explicit?.trim())
76684
76533
  return [explicit.trim()];
76685
- return [join49(homedir36(), "Library", "Application Support", "Cursor", "process-monitor")].filter((root) => existsSync35(root));
76534
+ return [join48(homedir36(), "Library", "Application Support", "Cursor", "process-monitor")].filter((root) => existsSync35(root));
76686
76535
  }
76687
76536
  function isCursorProcess(command) {
76688
76537
  const base = commandBasename2(command);
@@ -76773,7 +76622,7 @@ function walkRecentMonitorLogs(root, scope) {
76773
76622
  for (const entry of entries2) {
76774
76623
  if (!entry.endsWith(".log"))
76775
76624
  continue;
76776
- const path2 = join49(root, entry);
76625
+ const path2 = join48(root, entry);
76777
76626
  try {
76778
76627
  const stats = statSync10(path2);
76779
76628
  if (!stats.isFile() || stats.mtimeMs < cutoff)
@@ -76850,7 +76699,7 @@ var CursorSource = {
76850
76699
  // packages/runtime/src/tail/grok-source.ts
76851
76700
  import { closeSync as closeSync4, existsSync as existsSync36, openSync as openSync4, readdirSync as readdirSync7, readFileSync as readFileSync20, readSync as readSync4, statSync as statSync11 } from "fs";
76852
76701
  import { homedir as homedir37 } from "os";
76853
- import { basename as basename15, dirname as dirname28, join as join50 } from "path";
76702
+ import { basename as basename15, dirname as dirname28, join as join49 } from "path";
76854
76703
  var SOURCE_NAME4 = "grok";
76855
76704
  var MAX_SUMMARY_LEN4 = 200;
76856
76705
  var DEFAULT_HOT_DISCOVERY_WINDOW_MS4 = 10 * 60 * 1000;
@@ -76898,7 +76747,7 @@ function grokSessionRoots() {
76898
76747
  const explicit = process.env.OPENSCOUT_TAIL_GROK_SESSIONS_ROOT;
76899
76748
  if (explicit?.trim())
76900
76749
  return [explicit.trim()];
76901
- return [join50(homedir37(), ".grok", "sessions")].filter((root) => existsSync36(root));
76750
+ return [join49(homedir37(), ".grok", "sessions")].filter((root) => existsSync36(root));
76902
76751
  }
76903
76752
  function isGrokProcess(command) {
76904
76753
  const base = commandBasename2(command);
@@ -76982,7 +76831,7 @@ function readGrokMetadata(file) {
76982
76831
  };
76983
76832
  }
76984
76833
  const sessionDir = dirname28(file.path);
76985
- const summary = readJsonFile2(join50(sessionDir, "summary.json"));
76834
+ const summary = readJsonFile2(join49(sessionDir, "summary.json"));
76986
76835
  const info = metadataRecord9(summary?.info);
76987
76836
  let cwd = typeof info?.cwd === "string" && info.cwd.trim() ? info.cwd : null;
76988
76837
  let sessionId = typeof info?.id === "string" && info.id.trim() ? info.id : basename15(sessionDir);
@@ -77015,7 +76864,7 @@ function walkRecentGrokEventFiles(root, scope) {
77015
76864
  continue;
77016
76865
  }
77017
76866
  for (const entry of entries2) {
77018
- const path2 = join50(dir, entry);
76867
+ const path2 = join49(dir, entry);
77019
76868
  let stats;
77020
76869
  try {
77021
76870
  stats = statSync11(path2);
@@ -77101,7 +76950,7 @@ function grokToolArgSummary(toolName2, rawInput) {
77101
76950
  return "";
77102
76951
  }
77103
76952
  function loadGrokToolCallIndex(sessionDir) {
77104
- const updatesPath = join50(sessionDir, "updates.jsonl");
76953
+ const updatesPath = join49(sessionDir, "updates.jsonl");
77105
76954
  if (!existsSync36(updatesPath))
77106
76955
  return [];
77107
76956
  const records = [];
@@ -77135,7 +76984,7 @@ function loadGrokToolCallIndex(sessionDir) {
77135
76984
  }
77136
76985
  function grokMatcherForTranscript(transcriptPath) {
77137
76986
  const sessionDir = dirname28(transcriptPath);
77138
- const updatesPath = join50(sessionDir, "updates.jsonl");
76987
+ const updatesPath = join49(sessionDir, "updates.jsonl");
77139
76988
  if (!existsSync36(updatesPath))
77140
76989
  return null;
77141
76990
  let updatesMtimeMs = 0;
@@ -77332,7 +77181,7 @@ var GrokSource = {
77332
77181
  // packages/runtime/src/tail/kimi-source.ts
77333
77182
  import { existsSync as existsSync37, readdirSync as readdirSync8, readFileSync as readFileSync21, statSync as statSync12 } from "fs";
77334
77183
  import { homedir as homedir38 } from "os";
77335
- import { basename as basename16, dirname as dirname29, join as join51 } from "path";
77184
+ import { basename as basename16, dirname as dirname29, join as join50 } from "path";
77336
77185
  var SOURCE_NAME5 = "kimi";
77337
77186
  var MAX_SUMMARY_LEN5 = 200;
77338
77187
  var DEFAULT_HOT_DISCOVERY_WINDOW_MS5 = 10 * 60 * 1000;
@@ -77384,8 +77233,8 @@ function kimiSessionsRoot() {
77384
77233
  const explicit = process.env.OPENSCOUT_TAIL_KIMI_SESSIONS_ROOT?.trim();
77385
77234
  if (explicit)
77386
77235
  return explicit;
77387
- const kimiHome = process.env.KIMI_CODE_HOME?.trim() || join51(homedir38(), ".kimi-code");
77388
- return join51(kimiHome, "sessions");
77236
+ const kimiHome = process.env.KIMI_CODE_HOME?.trim() || join50(homedir38(), ".kimi-code");
77237
+ return join50(kimiHome, "sessions");
77389
77238
  }
77390
77239
  function isKimiProcess(command) {
77391
77240
  const base = commandBasename2(command);
@@ -77429,7 +77278,7 @@ function walkRecentKimiWireFiles(root, scope) {
77429
77278
  continue;
77430
77279
  }
77431
77280
  for (const entry of entries2) {
77432
- const path2 = join51(directory, entry);
77281
+ const path2 = join50(directory, entry);
77433
77282
  let stats;
77434
77283
  try {
77435
77284
  stats = statSync12(path2);
@@ -77448,7 +77297,7 @@ function walkRecentKimiWireFiles(root, scope) {
77448
77297
  function readKimiTranscriptMetadata(file) {
77449
77298
  const agentId = basename16(dirname29(file.path));
77450
77299
  const sessionDirectory = dirname29(dirname29(dirname29(file.path)));
77451
- const statePath = join51(sessionDirectory, "state.json");
77300
+ const statePath = join50(sessionDirectory, "state.json");
77452
77301
  let stateMtimeMs = null;
77453
77302
  let stateSize = null;
77454
77303
  try {
@@ -77673,7 +77522,7 @@ var KimiSource = {
77673
77522
  // packages/runtime/src/tail/opencode-source.ts
77674
77523
  import { closeSync as closeSync5, existsSync as existsSync38, openSync as openSync5, readdirSync as readdirSync9, readFileSync as readFileSync22, readSync as readSync5, statSync as statSync13 } from "fs";
77675
77524
  import { homedir as homedir39 } from "os";
77676
- import { basename as basename17, join as join52, sep as sep2 } from "path";
77525
+ import { basename as basename17, join as join51, sep as sep2 } from "path";
77677
77526
  var SOURCE_NAME6 = "opencode";
77678
77527
  var MAX_SUMMARY_LEN6 = 200;
77679
77528
  var DEFAULT_HOT_DISCOVERY_WINDOW_MS6 = 10 * 60 * 1000;
@@ -77709,7 +77558,7 @@ function opencodeStorageRoots() {
77709
77558
  const explicit = process.env.OPENSCOUT_TAIL_OPENCODE_STORAGE_ROOT;
77710
77559
  if (explicit?.trim())
77711
77560
  return [explicit.trim()];
77712
- return [join52(homedir39(), ".local", "share", "opencode", "storage")].filter((root) => existsSync38(root));
77561
+ return [join51(homedir39(), ".local", "share", "opencode", "storage")].filter((root) => existsSync38(root));
77713
77562
  }
77714
77563
  function isOpenCodeProcess(command) {
77715
77564
  const base = commandBasename2(command).toLowerCase();
@@ -77795,7 +77644,7 @@ function partTimestamp(part) {
77795
77644
  function walkRecentSessionFiles(root, scope) {
77796
77645
  const cutoff = Date.now() - discoveryWindowMs6(scope);
77797
77646
  const found = [];
77798
- const stack = [join52(root, "session")];
77647
+ const stack = [join51(root, "session")];
77799
77648
  while (stack.length > 0) {
77800
77649
  const dir = stack.pop();
77801
77650
  let entries2 = [];
@@ -77805,7 +77654,7 @@ function walkRecentSessionFiles(root, scope) {
77805
77654
  continue;
77806
77655
  }
77807
77656
  for (const entry of entries2) {
77808
- const path2 = join52(dir, entry);
77657
+ const path2 = join51(dir, entry);
77809
77658
  let stats;
77810
77659
  try {
77811
77660
  stats = statSync13(path2);
@@ -77825,7 +77674,7 @@ function walkRecentSessionFiles(root, scope) {
77825
77674
  }
77826
77675
  function walkRecentMessageSessionFiles(root, scope) {
77827
77676
  const cutoff = Date.now() - discoveryWindowMs6(scope);
77828
- const messageRoot = join52(root, "message");
77677
+ const messageRoot = join51(root, "message");
77829
77678
  let sessionDirs = [];
77830
77679
  try {
77831
77680
  sessionDirs = readdirSync9(messageRoot);
@@ -77834,7 +77683,7 @@ function walkRecentMessageSessionFiles(root, scope) {
77834
77683
  }
77835
77684
  const found = new Map;
77836
77685
  for (const sessionId of sessionDirs) {
77837
- const dir = join52(messageRoot, sessionId);
77686
+ const dir = join51(messageRoot, sessionId);
77838
77687
  let entries2 = [];
77839
77688
  try {
77840
77689
  const stats = statSync13(dir);
@@ -77849,7 +77698,7 @@ function walkRecentMessageSessionFiles(root, scope) {
77849
77698
  if (!entry.endsWith(".json"))
77850
77699
  continue;
77851
77700
  try {
77852
- const stats = statSync13(join52(dir, entry));
77701
+ const stats = statSync13(join51(dir, entry));
77853
77702
  if (stats.isFile() && stats.mtimeMs >= cutoff && stats.mtimeMs > latestMessageMtime) {
77854
77703
  latestMessageMtime = stats.mtimeMs;
77855
77704
  }
@@ -77859,7 +77708,7 @@ function walkRecentMessageSessionFiles(root, scope) {
77859
77708
  }
77860
77709
  if (latestMessageMtime <= 0)
77861
77710
  continue;
77862
- const sessionPath = join52(root, "session", "global", `${sessionId}.json`);
77711
+ const sessionPath = join51(root, "session", "global", `${sessionId}.json`);
77863
77712
  try {
77864
77713
  const sessionStats = statSync13(sessionPath);
77865
77714
  if (!sessionStats.isFile())
@@ -77915,7 +77764,7 @@ function discoverOpenCodeTranscripts(scope) {
77915
77764
  });
77916
77765
  }
77917
77766
  function readOpenCodeMessages(root, sessionId) {
77918
- const dir = join52(root, "message", sessionId);
77767
+ const dir = join51(root, "message", sessionId);
77919
77768
  let entries2 = [];
77920
77769
  try {
77921
77770
  entries2 = readdirSync9(dir);
@@ -77926,7 +77775,7 @@ function readOpenCodeMessages(root, sessionId) {
77926
77775
  for (const entry of entries2) {
77927
77776
  if (!entry.endsWith(".json"))
77928
77777
  continue;
77929
- const path2 = join52(dir, entry);
77778
+ const path2 = join51(dir, entry);
77930
77779
  let stats;
77931
77780
  try {
77932
77781
  stats = statSync13(path2);
@@ -77943,7 +77792,7 @@ function readOpenCodeMessages(root, sessionId) {
77943
77792
  return messages2.sort((a, b) => (messageTimestamp(a) ?? a.__mtimeMs) - (messageTimestamp(b) ?? b.__mtimeMs)).slice(-messagesPerSession());
77944
77793
  }
77945
77794
  function readOpenCodeParts(root, messageId) {
77946
- const dir = join52(root, "part", messageId);
77795
+ const dir = join51(root, "part", messageId);
77947
77796
  let entries2 = [];
77948
77797
  try {
77949
77798
  entries2 = readdirSync9(dir);
@@ -77954,7 +77803,7 @@ function readOpenCodeParts(root, messageId) {
77954
77803
  for (const entry of entries2) {
77955
77804
  if (!entry.endsWith(".json"))
77956
77805
  continue;
77957
- const path2 = join52(dir, entry);
77806
+ const path2 = join51(dir, entry);
77958
77807
  let stats;
77959
77808
  try {
77960
77809
  stats = statSync13(path2);
@@ -78086,7 +77935,7 @@ var OpenCodeSource = {
78086
77935
  // packages/runtime/src/tail/pi-source.ts
78087
77936
  import { closeSync as closeSync6, existsSync as existsSync39, openSync as openSync6, readdirSync as readdirSync10, readSync as readSync6, statSync as statSync14 } from "fs";
78088
77937
  import { homedir as homedir40 } from "os";
78089
- import { basename as basename18, join as join53, relative as relative5 } from "path";
77938
+ import { basename as basename18, join as join52, relative as relative5 } from "path";
78090
77939
  var SOURCE_NAME7 = "pi";
78091
77940
  var MAX_SUMMARY_LEN7 = 200;
78092
77941
  var DEFAULT_HOT_DISCOVERY_WINDOW_MS7 = 10 * 60 * 1000;
@@ -78128,7 +77977,7 @@ function discoveryLimit7(scope) {
78128
77977
  return readPositiveIntEnv7([scopedName, "OPENSCOUT_TAIL_DISCOVERY_LIMIT"], fallback);
78129
77978
  }
78130
77979
  function projectsRoot2() {
78131
- return process.env.OPENSCOUT_TAIL_PI_SESSIONS_ROOT ?? join53(homedir40(), ".pi", "agent", "sessions");
77980
+ return process.env.OPENSCOUT_TAIL_PI_SESSIONS_ROOT ?? join52(homedir40(), ".pi", "agent", "sessions");
78132
77981
  }
78133
77982
  function listJsonlFiles2(dir) {
78134
77983
  let entries2 = [];
@@ -78237,7 +78086,7 @@ function listRecentPiProjectTranscripts(root, scope) {
78237
78086
  return [];
78238
78087
  }
78239
78088
  for (const entry of projectDirs) {
78240
- const projectDir = join53(root, entry);
78089
+ const projectDir = join52(root, entry);
78241
78090
  try {
78242
78091
  if (!statSync14(projectDir).isDirectory())
78243
78092
  continue;
@@ -78245,7 +78094,7 @@ function listRecentPiProjectTranscripts(root, scope) {
78245
78094
  continue;
78246
78095
  }
78247
78096
  for (const file of listJsonlFiles2(projectDir)) {
78248
- const path2 = join53(projectDir, file);
78097
+ const path2 = join52(projectDir, file);
78249
78098
  try {
78250
78099
  const stats = statSync14(path2);
78251
78100
  if (stats.mtimeMs < cutoff)
@@ -78677,7 +78526,7 @@ async function readNew(handle, fromOffset, fileSize) {
78677
78526
  async function readTranscriptText(path2, maxBytes = RECENT_TRANSCRIPT_READ_BYTES) {
78678
78527
  let handle = null;
78679
78528
  try {
78680
- const stats = await stat9(path2);
78529
+ const stats = await stat8(path2);
78681
78530
  if (stats.size <= 0)
78682
78531
  return "";
78683
78532
  const start = Math.max(0, stats.size - maxBytes);
@@ -78695,7 +78544,7 @@ async function readTranscriptText(path2, maxBytes = RECENT_TRANSCRIPT_READ_BYTES
78695
78544
  async function pumpWatcher(watcher) {
78696
78545
  let handle = null;
78697
78546
  try {
78698
- const stats = await stat9(watcher.transcriptPath);
78547
+ const stats = await stat8(watcher.transcriptPath);
78699
78548
  if (stats.size < watcher.offset) {
78700
78549
  watcher.offset = 0;
78701
78550
  watcher.carry = "";
@@ -78760,7 +78609,7 @@ async function pumpAllWatchers() {
78760
78609
  }
78761
78610
  async function seedTail(watcher) {
78762
78611
  try {
78763
- const stats = await stat9(watcher.transcriptPath);
78612
+ const stats = await stat8(watcher.transcriptPath);
78764
78613
  watcher.offset = watcher.source.parseFile ? 0 : stats.size;
78765
78614
  if (!watcher.source.parseFile && watcher.source.name === "codex") {
78766
78615
  const lines = await readRecentTranscriptLines(watcher.transcriptPath, RECENT_TRANSCRIPT_LINES_PER_FILE);
@@ -78986,7 +78835,7 @@ function snapshotRecentEvents(limit = 500) {
78986
78835
  async function readRecentTranscriptLines(path2, maxLines = RECENT_TRANSCRIPT_LINES_PER_FILE, maxBytes = RECENT_TRANSCRIPT_READ_BYTES) {
78987
78836
  let handle = null;
78988
78837
  try {
78989
- const stats = await stat9(path2);
78838
+ const stats = await stat8(path2);
78990
78839
  if (stats.size <= 0)
78991
78840
  return [];
78992
78841
  const start = Math.max(0, stats.size - maxBytes);
@@ -79382,7 +79231,7 @@ function expandHome2(value) {
79382
79231
  return homedir41();
79383
79232
  }
79384
79233
  if (value.startsWith("~/")) {
79385
- return join54(homedir41(), value.slice(2));
79234
+ return join53(homedir41(), value.slice(2));
79386
79235
  }
79387
79236
  return value;
79388
79237
  }
@@ -79391,17 +79240,17 @@ function encodeClaudeProjectsSlug2(absolutePath) {
79391
79240
  return `-${normalized.replace(/^\//u, "").replace(/\//gu, "-")}`;
79392
79241
  }
79393
79242
  function claudeProjectsRoot() {
79394
- return process.env.OPENSCOUT_CLAUDE_PROJECTS_ROOT?.trim() || join54(homedir41(), ".claude", "projects");
79243
+ return process.env.OPENSCOUT_CLAUDE_PROJECTS_ROOT?.trim() || join53(homedir41(), ".claude", "projects");
79395
79244
  }
79396
79245
  function resolveClaudeHistoryPath(cwd, sessionId, options = {}) {
79397
79246
  const normalizedCwd = expandHome2(cwd)?.trim();
79398
79247
  if (!normalizedCwd) {
79399
79248
  return null;
79400
79249
  }
79401
- const projectDir = join54(claudeProjectsRoot(), encodeClaudeProjectsSlug2(normalizedCwd));
79250
+ const projectDir = join53(claudeProjectsRoot(), encodeClaudeProjectsSlug2(normalizedCwd));
79402
79251
  const normalizedSessionId = sessionId?.trim().replace(/\.jsonl$/u, "") || "";
79403
79252
  if (normalizedSessionId) {
79404
- const exactPath = join54(projectDir, `${normalizedSessionId}.jsonl`);
79253
+ const exactPath = join53(projectDir, `${normalizedSessionId}.jsonl`);
79405
79254
  if (existsSync40(exactPath)) {
79406
79255
  return exactPath;
79407
79256
  }
@@ -79419,7 +79268,7 @@ function findMostRecentJsonl(dir) {
79419
79268
  for (const entry of readdirSync11(dir)) {
79420
79269
  if (!entry.endsWith(".jsonl"))
79421
79270
  continue;
79422
- const full = join54(dir, entry);
79271
+ const full = join53(dir, entry);
79423
79272
  const st = statSync15(full);
79424
79273
  if (!best || st.mtimeMs > best.mtime) {
79425
79274
  best = { path: full, mtime: st.mtimeMs };
@@ -79455,7 +79304,7 @@ function buildClaudeSessionRefLookup() {
79455
79304
  if (!projectEntry.isDirectory()) {
79456
79305
  continue;
79457
79306
  }
79458
- const projectDir = join54(projectsRoot3, projectEntry.name);
79307
+ const projectDir = join53(projectsRoot3, projectEntry.name);
79459
79308
  for (const historyEntry of readdirSync11(projectDir, { withFileTypes: true })) {
79460
79309
  if (!historyEntry.isFile() || !historyEntry.name.endsWith(".jsonl")) {
79461
79310
  continue;
@@ -79464,14 +79313,14 @@ function buildClaudeSessionRefLookup() {
79464
79313
  if (!refId) {
79465
79314
  continue;
79466
79315
  }
79467
- const historyPath = join54(projectDir, historyEntry.name);
79468
- const stat10 = statSync15(historyPath);
79316
+ const historyPath = join53(projectDir, historyEntry.name);
79317
+ const stat9 = statSync15(historyPath);
79469
79318
  addSessionRefLookupEntry(entries2, {
79470
79319
  refId,
79471
79320
  historyPath,
79472
79321
  adapterType: "claude-code",
79473
- mtimeMs: stat10.mtimeMs,
79474
- size: stat10.size
79322
+ mtimeMs: stat9.mtimeMs,
79323
+ size: stat9.size
79475
79324
  });
79476
79325
  }
79477
79326
  }
@@ -79846,9 +79695,9 @@ function readHistorySnapshot(candidate) {
79846
79695
  if (!existsSync40(candidate.path)) {
79847
79696
  return null;
79848
79697
  }
79849
- const stat10 = statSync15(candidate.path);
79698
+ const stat9 = statSync15(candidate.path);
79850
79699
  const cached = historySnapshotCache.get(candidate.path);
79851
- if (cached && cached.adapterType === candidate.adapterType && cached.mtimeMs === stat10.mtimeMs && cached.size === stat10.size) {
79700
+ if (cached && cached.adapterType === candidate.adapterType && cached.mtimeMs === stat9.mtimeMs && cached.size === stat9.size) {
79852
79701
  return {
79853
79702
  historyPath: cached.historyPath,
79854
79703
  snapshot: cached.snapshot,
@@ -79859,7 +79708,7 @@ function readHistorySnapshot(candidate) {
79859
79708
  path: candidate.path,
79860
79709
  content: readFileSync23(candidate.path, "utf8"),
79861
79710
  adapterType: candidate.adapterType,
79862
- baseTimestampMs: stat10.mtimeMs
79711
+ baseTimestampMs: stat9.mtimeMs
79863
79712
  });
79864
79713
  if (replay.events.length === 0) {
79865
79714
  return null;
@@ -79869,8 +79718,8 @@ function readHistorySnapshot(candidate) {
79869
79718
  snapshot: replay.snapshot,
79870
79719
  timedEvents: normalizeTimedEvents(replay.events),
79871
79720
  adapterType: candidate.adapterType,
79872
- mtimeMs: stat10.mtimeMs,
79873
- size: stat10.size
79721
+ mtimeMs: stat9.mtimeMs,
79722
+ size: stat9.size
79874
79723
  };
79875
79724
  historySnapshotCache.set(candidate.path, nextEntry);
79876
79725
  if (historySnapshotCache.size > HISTORY_SNAPSHOT_CACHE_LIMIT) {
@@ -80795,37 +80644,7 @@ async function loadBrokerSessionRefObservePayload(refId) {
80795
80644
  if (!endpoint) {
80796
80645
  return null;
80797
80646
  }
80798
- const storedAgent = queryAgentById(endpoint.agentId);
80799
- const actor = broker2.snapshot.actors?.[endpoint.agentId];
80800
- const endpointRoot = endpoint.projectRoot ?? endpoint.cwd ?? null;
80801
- if (storedAgent) {
80802
- const agent = {
80803
- ...storedAgent,
80804
- harness: endpoint.harness,
80805
- state: endpoint.state,
80806
- projectRoot: endpointRoot,
80807
- cwd: endpoint.cwd ?? endpointRoot,
80808
- transport: endpoint.transport,
80809
- harnessSessionId: endpoint.sessionId?.trim() || normalizedRef,
80810
- project: endpointRoot ? basename20(endpointRoot) : storedAgent.project
80811
- };
80812
- const observed2 = await buildAgentObservePayload(agent, broker2, {
80813
- sessionId: endpoint.sessionId?.trim() || normalizedRef
80814
- }).catch(() => null);
80815
- if (observed2 && observed2.source !== "unavailable") {
80816
- return {
80817
- kind: "agent",
80818
- refId: normalizedRef,
80819
- agentId: endpoint.agentId,
80820
- source: observed2.source,
80821
- fidelity: observed2.fidelity,
80822
- historyPath: observed2.historyPath,
80823
- sessionId: observed2.sessionId,
80824
- updatedAt: observed2.updatedAt,
80825
- data: observed2.data
80826
- };
80827
- }
80828
- }
80647
+ const actor = broker2.snapshot.actors[endpoint.agentId];
80829
80648
  const metadata = endpointMetadataRecord(endpoint);
80830
80649
  const liveSnapshot = await readEndpointSessionSnapshot(endpoint).catch(() => null);
80831
80650
  const providerRefs = endpointProviderSessionRefs(normalizedRef, endpoint, liveSnapshot);
@@ -80982,13 +80801,13 @@ init_harness_catalog();
80982
80801
  init_agents();
80983
80802
  import { realpathSync as realpathSync3 } from "fs";
80984
80803
  import { homedir as homedir42 } from "os";
80985
- import { isAbsolute as isAbsolute6, join as join55, resolve as resolve21 } from "path";
80804
+ import { isAbsolute as isAbsolute6, join as join54, resolve as resolve21 } from "path";
80986
80805
  function expandHomePath7(value) {
80987
80806
  if (value === "~") {
80988
80807
  return homedir42();
80989
80808
  }
80990
80809
  if (value.startsWith("~/")) {
80991
- return join55(homedir42(), value.slice(2));
80810
+ return join54(homedir42(), value.slice(2));
80992
80811
  }
80993
80812
  return value;
80994
80813
  }
@@ -81381,7 +81200,7 @@ function parseRepoDiffRawZ(output, numstat) {
81381
81200
  oldPath = null;
81382
81201
  if (status === "deleted")
81383
81202
  newPath = null;
81384
- const stat10 = numstat.get(newPath ?? "") ?? numstat.get(oldPath ?? "");
81203
+ const stat9 = numstat.get(newPath ?? "") ?? numstat.get(oldPath ?? "");
81385
81204
  files.push({
81386
81205
  oldPath,
81387
81206
  newPath,
@@ -81391,9 +81210,9 @@ function parseRepoDiffRawZ(output, numstat) {
81391
81210
  oldMode: fields[0] ?? null,
81392
81211
  newMode: fields[1] ?? null,
81393
81212
  similarity: twoPathRecord ? Number.parseInt(statusCode.slice(1), 10) || null : null,
81394
- binary: stat10?.binary ?? false,
81395
- additions: stat10?.additions ?? null,
81396
- deletions: stat10?.deletions ?? null,
81213
+ binary: stat9?.binary ?? false,
81214
+ additions: stat9?.additions ?? null,
81215
+ deletions: stat9?.deletions ?? null,
81397
81216
  hunks: [],
81398
81217
  truncated: false
81399
81218
  });
@@ -82552,7 +82371,7 @@ init_db_queries();
82552
82371
  init_src();
82553
82372
  import { Database as Database5 } from "bun:sqlite";
82554
82373
  import { homedir as homedir43 } from "os";
82555
- import { join as join56 } from "path";
82374
+ import { join as join55 } from "path";
82556
82375
 
82557
82376
  // packages/runtime/src/drizzle.ts
82558
82377
  init_drizzle_orm();
@@ -82575,8 +82394,8 @@ function resolveDbPath2() {
82575
82394
  const explicit = process.env.OPENSCOUT_CONTROL_PLANE_DB?.trim();
82576
82395
  if (explicit)
82577
82396
  return explicit;
82578
- const controlHome = process.env.OPENSCOUT_CONTROL_HOME ?? join56(homedir43(), ".openscout", "control-plane");
82579
- return join56(controlHome, "control-plane.sqlite");
82397
+ const controlHome = process.env.OPENSCOUT_CONTROL_HOME ?? join55(homedir43(), ".openscout", "control-plane");
82398
+ return join55(controlHome, "control-plane.sqlite");
82580
82399
  }
82581
82400
  function getDb() {
82582
82401
  if (!_db2) {
@@ -83917,7 +83736,7 @@ function trimTrailingSlash(value) {
83917
83736
  init_support_paths();
83918
83737
  import { randomUUID as randomUUID9 } from "crypto";
83919
83738
  import { existsSync as existsSync41, mkdirSync as mkdirSync15, readFileSync as readFileSync24, renameSync as renameSync5, writeFileSync as writeFileSync14 } from "fs";
83920
- import { dirname as dirname30, join as join57 } from "path";
83739
+ import { dirname as dirname30, join as join56 } from "path";
83921
83740
 
83922
83741
  class ScoutbotReminderError extends Error {
83923
83742
  status;
@@ -83928,7 +83747,7 @@ class ScoutbotReminderError extends Error {
83928
83747
  }
83929
83748
  }
83930
83749
  function createScoutbotReminderStore(input = {}) {
83931
- const filePath = input.filePath ?? join57(resolveOpenScoutSupportPaths().controlHome, "scoutbot-reminders.json");
83750
+ const filePath = input.filePath ?? join56(resolveOpenScoutSupportPaths().controlHome, "scoutbot-reminders.json");
83932
83751
  const now = input.now ?? Date.now;
83933
83752
  const readReminders = () => {
83934
83753
  if (!existsSync41(filePath)) {
@@ -84090,7 +83909,7 @@ function titleFromBody(body) {
84090
83909
 
84091
83910
  // packages/web/server/scoutbot-credentials.ts
84092
83911
  init_support_paths();
84093
- import { createCipheriv, createDecipheriv, randomBytes as randomBytes6 } from "crypto";
83912
+ import { createCipheriv, createDecipheriv, randomBytes as randomBytes5 } from "crypto";
84094
83913
  import {
84095
83914
  existsSync as existsSync42,
84096
83915
  mkdirSync as mkdirSync16,
@@ -84098,12 +83917,12 @@ import {
84098
83917
  renameSync as renameSync6,
84099
83918
  writeFileSync as writeFileSync15
84100
83919
  } from "fs";
84101
- import { dirname as dirname31, join as join58 } from "path";
83920
+ import { dirname as dirname31, join as join57 } from "path";
84102
83921
  var OPENAI_KEY_AAD = "openscout:scoutbot:openai:v1";
84103
83922
  function createScoutbotCredentialStore(input = {}) {
84104
83923
  const paths2 = resolveOpenScoutSupportPaths();
84105
- const filePath = input.filePath ?? join58(paths2.controlHome, "scoutbot-credentials.json");
84106
- const keyPath = input.keyPath ?? join58(paths2.controlHome, "scoutbot-credentials.key");
83924
+ const filePath = input.filePath ?? join57(paths2.controlHome, "scoutbot-credentials.json");
83925
+ const keyPath = input.keyPath ?? join57(paths2.controlHome, "scoutbot-credentials.key");
84107
83926
  const getOpenAIKey = () => {
84108
83927
  const stored = readStore(filePath).openai;
84109
83928
  if (!stored)
@@ -84185,7 +84004,7 @@ function readOrCreateKey(keyPath) {
84185
84004
  } catch {}
84186
84005
  }
84187
84006
  mkdirSync16(dirname31(keyPath), { recursive: true });
84188
- const key = randomBytes6(32);
84007
+ const key = randomBytes5(32);
84189
84008
  const tmp = `${keyPath}.tmp`;
84190
84009
  writeFileSync15(tmp, `${key.toString("base64url")}
84191
84010
  `, { encoding: "utf8", mode: 384 });
@@ -84193,7 +84012,7 @@ function readOrCreateKey(keyPath) {
84193
84012
  return key;
84194
84013
  }
84195
84014
  function encryptSecret(value, key, aad) {
84196
- const iv = randomBytes6(12);
84015
+ const iv = randomBytes5(12);
84197
84016
  const cipher = createCipheriv("aes-256-gcm", key, iv);
84198
84017
  cipher.setAAD(Buffer.from(aad, "utf8"));
84199
84018
  const ciphertext = Buffer.concat([cipher.update(value, "utf8"), cipher.final()]);
@@ -85770,11 +85589,9 @@ function getScoutVoiceHealthSnapshot(now = Date.now()) {
85770
85589
  adapter: "hudson-dictation",
85771
85590
  capture: "native",
85772
85591
  detail: "Scout voice host is not running. Launch Scout Menu and try again.",
85773
- inputDevice: null,
85774
85592
  host: null
85775
85593
  };
85776
85594
  }
85777
- const inputDevice = resolveSessionInputDevice(host);
85778
85595
  const micPermission = host.settings.permissions?.find((entry) => entry.kind === "microphone");
85779
85596
  const microphoneGranted = micPermission?.granted ?? false;
85780
85597
  const microphoneCanRequest = micPermission?.canRequest ?? false;
@@ -85787,7 +85604,6 @@ function getScoutVoiceHealthSnapshot(now = Date.now()) {
85787
85604
  capture: "native",
85788
85605
  detail,
85789
85606
  microphoneGranted: false,
85790
- inputDevice,
85791
85607
  microphoneCanRequest,
85792
85608
  host: {
85793
85609
  hostId: host.hostId,
@@ -85804,7 +85620,6 @@ function getScoutVoiceHealthSnapshot(now = Date.now()) {
85804
85620
  detail: null,
85805
85621
  microphoneGranted: true,
85806
85622
  microphoneCanRequest: false,
85807
- inputDevice,
85808
85623
  host: {
85809
85624
  hostId: host.hostId,
85810
85625
  platform: host.platform,
@@ -85963,7 +85778,7 @@ function mergeVoiceSettings(current, patch) {
85963
85778
  // packages/web/server/vox.ts
85964
85779
  import { existsSync as existsSync43, mkdirSync as mkdirSync17, readFileSync as readFileSync26, writeFileSync as writeFileSync16 } from "fs";
85965
85780
  import { homedir as homedir44 } from "os";
85966
- import { dirname as dirname33, join as join60 } from "path";
85781
+ import { dirname as dirname33, join as join59 } from "path";
85967
85782
  import { randomUUID as randomUUID11 } from "crypto";
85968
85783
  var VOX_CLIENT_ID = "openscout-web";
85969
85784
  var DEFAULT_VOX_RPC_PORT = 42137;
@@ -86069,10 +85884,10 @@ function resolveVoxSpeechDefaults(env = process.env) {
86069
85884
  const modelOverride = firstNonEmptyString7(env.OPENSCOUT_VOX_TTS_MODEL_ID, env.VOX_TTS_MODEL_ID);
86070
85885
  const voiceOverride = firstNonEmptyString7(env.OPENSCOUT_VOX_TTS_VOICE_ID, env.VOX_TTS_VOICE_ID);
86071
85886
  const voxHome = resolveVoxHome(env);
86072
- const preferences = readJsonRecord2(join60(voxHome, "preferences.json"));
85887
+ const preferences = readJsonRecord2(join59(voxHome, "preferences.json"));
86073
85888
  const preferredModel = modelOverride ?? nestedString(preferences, "speech", "preferredSynthesisModelId");
86074
85889
  const preferredVoice = voiceOverride ?? nestedString(preferences, "speech", "preferredSynthesisVoiceId");
86075
- const providers2 = readVoxTtsProviders(join60(voxHome, "providers.json"));
85890
+ const providers2 = readVoxTtsProviders(join59(voxHome, "providers.json"));
86076
85891
  const modelId2 = preferredModel ?? modelForPreferredVoice(providers2, preferredVoice) ?? firstConfiguredNonAppleTtsModel(providers2) ?? DEFAULT_VOX_SYNTHESIS_MODEL_ID;
86077
85892
  const voiceId = preferredVoice ?? defaultVoiceForModel(providers2, modelId2);
86078
85893
  return {
@@ -86096,13 +85911,13 @@ function ensureOpenScoutVoxOrigins() {
86096
85911
  }
86097
85912
  }
86098
85913
  function resolveOpenScoutVoxOriginsPath() {
86099
- return join60(resolveVoxHome(), "origins.d", "openscout.json");
85914
+ return join59(resolveVoxHome(), "origins.d", "openscout.json");
86100
85915
  }
86101
85916
  function resolveVoxHome(env = process.env) {
86102
- return env.VOX_HOME ?? join60(homedir44(), ".vox");
85917
+ return env.VOX_HOME ?? join59(homedir44(), ".vox");
86103
85918
  }
86104
85919
  function resolveVoxRpcPort() {
86105
- const runtimePath = process.env.VOX_RUNTIME_PATH ?? join60(resolveVoxHome(), "runtime.json");
85920
+ const runtimePath = process.env.VOX_RUNTIME_PATH ?? join59(resolveVoxHome(), "runtime.json");
86106
85921
  if (!existsSync43(runtimePath)) {
86107
85922
  const port = Number(process.env.VOX_PORT);
86108
85923
  return Number.isFinite(port) && port > 0 ? port : DEFAULT_VOX_RPC_PORT;
@@ -86395,7 +86210,7 @@ function firstNonEmptyString8(...values) {
86395
86210
  // packages/web/server/realtime-voice.ts
86396
86211
  import { Database as Database6 } from "bun:sqlite";
86397
86212
  import { mkdirSync as mkdirSync18 } from "fs";
86398
- import { dirname as dirname34, join as join61 } from "path";
86213
+ import { dirname as dirname34, join as join60 } from "path";
86399
86214
 
86400
86215
  // packages/web/shared/realtime-voice.ts
86401
86216
  var SCOUT_REALTIME_VOICE_CALL_PATH = "/api/voice/realtime/call";
@@ -86674,7 +86489,7 @@ async function createScoutRealtimeVoiceCall(input) {
86674
86489
  return body;
86675
86490
  }
86676
86491
  function defaultRealtimeVoiceAdmissionPath() {
86677
- return join61(dirname34(resolveDbPath()), "realtime-voice-admission.sqlite");
86492
+ return join60(dirname34(resolveDbPath()), "realtime-voice-admission.sqlite");
86678
86493
  }
86679
86494
  function positiveInteger3(value, fallback) {
86680
86495
  const parsed = Number.parseInt(value?.trim() ?? "", 10);
@@ -87903,7 +87718,7 @@ import { dirname as dirname37, isAbsolute as isAbsolute9, relative as relative7,
87903
87718
  // packages/web/server/material-heuristics.ts
87904
87719
  import { existsSync as existsSync46, mkdirSync as mkdirSync20, readFileSync as readFileSync28, statSync as statSync19, watch, writeFileSync as writeFileSync18 } from "fs";
87905
87720
  import { homedir as homedir47 } from "os";
87906
- import { basename as basename24, dirname as dirname36, isAbsolute as isAbsolute8, join as join64, resolve as resolve25 } from "path";
87721
+ import { basename as basename24, dirname as dirname36, isAbsolute as isAbsolute8, join as join63, resolve as resolve25 } from "path";
87907
87722
  import { createRequire as createRequire3 } from "module";
87908
87723
  var require4 = createRequire3(import.meta.url);
87909
87724
  var picomatch = require4("picomatch");
@@ -87947,7 +87762,7 @@ var globalCachePath = null;
87947
87762
  var globalCache = null;
87948
87763
  var globalWatcher = null;
87949
87764
  function globalHeuristicsPath() {
87950
- return join64(process.env.HOME ?? homedir47(), ".openscout", "heuristics.json");
87765
+ return join63(process.env.HOME ?? homedir47(), ".openscout", "heuristics.json");
87951
87766
  }
87952
87767
  function normalizePathForGlob(path2) {
87953
87768
  return path2.replaceAll("\\", "/").replace(/^\.\//u, "");
@@ -88130,9 +87945,9 @@ function writeGlobalHeuristicsFile(raw2) {
88130
87945
  return writeHeuristicsFile(globalHeuristicsPath(), raw2);
88131
87946
  }
88132
87947
  function projectHeuristicsPath(workspaceRoot) {
88133
- const expanded = workspaceRoot.startsWith("~/") ? join64(process.env.HOME ?? homedir47(), workspaceRoot.slice(2)) : workspaceRoot;
87948
+ const expanded = workspaceRoot.startsWith("~/") ? join63(process.env.HOME ?? homedir47(), workspaceRoot.slice(2)) : workspaceRoot;
88134
87949
  const root = isAbsolute8(expanded) ? resolve25(expanded) : resolve25(expanded);
88135
- return join64(root, ".openscout", "heuristics.json");
87950
+ return join63(root, ".openscout", "heuristics.json");
88136
87951
  }
88137
87952
  function projectHeuristicsFile(workspaceRoot) {
88138
87953
  return readHeuristicsFile(projectHeuristicsPath(workspaceRoot));
@@ -88263,8 +88078,8 @@ function normalizeExistingPath(value) {
88263
88078
  return null;
88264
88079
  }
88265
88080
  try {
88266
- const stat10 = statSync20(absolute);
88267
- return stat10.isDirectory() ? absolute : dirname37(absolute);
88081
+ const stat9 = statSync20(absolute);
88082
+ return stat9.isDirectory() ? absolute : dirname37(absolute);
88268
88083
  } catch {
88269
88084
  return null;
88270
88085
  }
@@ -89013,8 +88828,8 @@ async function resolveTrustedMaterialPath(work, materialId) {
89013
88828
  if (!pathInsideRoot(realPath, realRoot)) {
89014
88829
  return { ok: false, status: 403, error: "material path is outside its trusted root" };
89015
88830
  }
89016
- const stat10 = statSync20(realPath);
89017
- if (!stat10.isFile()) {
88831
+ const stat9 = statSync20(realPath);
88832
+ if (!stat9.isFile()) {
89018
88833
  return { ok: false, status: 415, error: "material is not a file" };
89019
88834
  }
89020
88835
  return { ok: true, material, realPath };
@@ -89028,12 +88843,12 @@ async function readWorkMaterialRaw(work, materialId) {
89028
88843
  return resolved;
89029
88844
  }
89030
88845
  try {
89031
- const stat10 = statSync20(resolved.realPath);
88846
+ const stat9 = statSync20(resolved.realPath);
89032
88847
  return {
89033
88848
  ok: true,
89034
88849
  realPath: resolved.realPath,
89035
88850
  mediaType: materialMediaType(resolved.realPath),
89036
- sizeBytes: stat10.size
88851
+ sizeBytes: stat9.size
89037
88852
  };
89038
88853
  } catch {
89039
88854
  return { ok: false, status: 404, error: "material could not be read" };
@@ -89063,8 +88878,8 @@ async function readWorkMaterialContent(work, materialId) {
89063
88878
  if (!pathInsideRoot(realPath, realRoot)) {
89064
88879
  return { ok: false, status: 403, error: "material path is outside its trusted root" };
89065
88880
  }
89066
- const stat10 = statSync20(realPath);
89067
- if (!stat10.isFile()) {
88881
+ const stat9 = statSync20(realPath);
88882
+ if (!stat9.isFile()) {
89068
88883
  return { ok: false, status: 415, error: "material is not a file" };
89069
88884
  }
89070
88885
  const buffer = readFileSync29(realPath);
@@ -89096,9 +88911,9 @@ async function readWorkMaterialContent(work, materialId) {
89096
88911
 
89097
88912
  // packages/web/server/plan-documents.ts
89098
88913
  import { createHash as createHash9 } from "crypto";
89099
- import { readdir as readdir4, readFile as readFile17, stat as stat10 } from "fs/promises";
88914
+ import { readdir as readdir4, readFile as readFile16, stat as stat9 } from "fs/promises";
89100
88915
  import { homedir as homedir49 } from "os";
89101
- import { basename as basename25, isAbsolute as isAbsolute10, join as join65, relative as relative8, resolve as resolve27 } from "path";
88916
+ import { basename as basename25, isAbsolute as isAbsolute10, join as join64, relative as relative8, resolve as resolve27 } from "path";
89102
88917
  var HOME3 = homedir49();
89103
88918
  var PLAN_SUBDIRECTORIES = [
89104
88919
  "plans",
@@ -89190,7 +89005,7 @@ async function walkMarkdownFiles(directory, remaining = { count: MAX_FILES_PER_R
89190
89005
  for (const entry of entries2) {
89191
89006
  if (remaining.count <= 0)
89192
89007
  break;
89193
- const fullPath = join65(directory, entry.name);
89008
+ const fullPath = join64(directory, entry.name);
89194
89009
  if (entry.isDirectory()) {
89195
89010
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist") {
89196
89011
  continue;
@@ -89209,11 +89024,11 @@ async function discoverPlanFiles(root) {
89209
89024
  if (root.kind === "home") {
89210
89025
  return walkMarkdownFiles(root.root);
89211
89026
  }
89212
- const fromPlanDirs = (await Promise.all(PLAN_SUBDIRECTORIES.map((subdir) => walkMarkdownFiles(join65(root.root, subdir))))).flat();
89027
+ const fromPlanDirs = (await Promise.all(PLAN_SUBDIRECTORIES.map((subdir) => walkMarkdownFiles(join64(root.root, subdir))))).flat();
89213
89028
  let directPlanFiles = [];
89214
89029
  try {
89215
89030
  const entries2 = await readdir4(root.root, { withFileTypes: true });
89216
- directPlanFiles = entries2.filter((entry) => entry.isFile() && /\.plan\.md$/i.test(entry.name)).map((entry) => join65(root.root, entry.name));
89031
+ directPlanFiles = entries2.filter((entry) => entry.isFile() && /\.plan\.md$/i.test(entry.name)).map((entry) => join64(root.root, entry.name));
89217
89032
  } catch {
89218
89033
  directPlanFiles = [];
89219
89034
  }
@@ -89395,11 +89210,11 @@ function idForPlan(root, filePath) {
89395
89210
  return `plan-doc:${hash}`;
89396
89211
  }
89397
89212
  async function readPlanDocument(root, filePath) {
89398
- const fileStats = await stat10(filePath).catch(() => null);
89213
+ const fileStats = await stat9(filePath).catch(() => null);
89399
89214
  if (!fileStats || !fileStats.isFile() || fileStats.size > MAX_DOCUMENT_BYTES) {
89400
89215
  return null;
89401
89216
  }
89402
- const rawText = await readFile17(filePath, "utf8").catch(() => null);
89217
+ const rawText = await readFile16(filePath, "utf8").catch(() => null);
89403
89218
  if (rawText === null)
89404
89219
  return null;
89405
89220
  const id = idForPlan(root, filePath);
@@ -89480,7 +89295,7 @@ init_file_preview();
89480
89295
  init_support_paths();
89481
89296
  import {
89482
89297
  createHmac as createHmac2,
89483
- randomBytes as randomBytes7,
89298
+ randomBytes as randomBytes6,
89484
89299
  timingSafeEqual as timingSafeEqual2
89485
89300
  } from "crypto";
89486
89301
  import {
@@ -89490,7 +89305,7 @@ import {
89490
89305
  readFileSync as readFileSync31,
89491
89306
  writeFileSync as writeFileSync19
89492
89307
  } from "fs";
89493
- import { join as join66 } from "path";
89308
+ import { join as join65 } from "path";
89494
89309
  var SERVICE_LINK_SECRET_FILE = "service-link-signing.key";
89495
89310
  var SERVICE_LINK_VERSION = "v1";
89496
89311
  var SERVICE_LINK_TTL_MS = 60000;
@@ -89509,7 +89324,7 @@ function parseScoutServicesRestartTarget(value) {
89509
89324
  function createSignedScoutServicesRestartUrl(target2, options = {}) {
89510
89325
  const nowMs3 = options.nowMs ?? Date.now();
89511
89326
  const expiresAt = nowMs3 + SERVICE_LINK_TTL_MS;
89512
- const nonce = options.nonce ?? randomBytes7(16).toString("base64url");
89327
+ const nonce = options.nonce ?? randomBytes6(16).toString("base64url");
89513
89328
  const payload = serviceLinkPayload("restart", target2, String(expiresAt), nonce);
89514
89329
  const sig = signPayload(payload);
89515
89330
  const params = new URLSearchParams({
@@ -89537,7 +89352,7 @@ function signPayload(payload) {
89537
89352
  return createHmac2("sha256", readOrCreateServiceLinkSecret()).update(payload).digest("base64url");
89538
89353
  }
89539
89354
  function serviceLinkSecretPath() {
89540
- return join66(resolveOpenScoutSupportPaths().supportDirectory, SERVICE_LINK_SECRET_FILE);
89355
+ return join65(resolveOpenScoutSupportPaths().supportDirectory, SERVICE_LINK_SECRET_FILE);
89541
89356
  }
89542
89357
  function readOrCreateServiceLinkSecret() {
89543
89358
  const path2 = serviceLinkSecretPath();
@@ -89546,7 +89361,7 @@ function readOrCreateServiceLinkSecret() {
89546
89361
  }
89547
89362
  const supportDirectory = resolveOpenScoutSupportPaths().supportDirectory;
89548
89363
  mkdirSync21(supportDirectory, { recursive: true, mode: 448 });
89549
- const secret = randomBytes7(32);
89364
+ const secret = randomBytes6(32);
89550
89365
  try {
89551
89366
  writeFileSync19(path2, `${secret.toString("base64url")}
89552
89367
  `, {
@@ -90557,7 +90372,7 @@ async function readProcessCwd2(pid) {
90557
90372
  return await readProcessCwd(pid);
90558
90373
  }
90559
90374
  function claudeProjectDirForCwd(cwd) {
90560
- return join72(homedir55(), ".claude", "projects", cwd.replace(/\//gu, "-"));
90375
+ return join71(homedir55(), ".claude", "projects", cwd.replace(/\//gu, "-"));
90561
90376
  }
90562
90377
  function mostRecentClaudeSessionForCwd(cwd) {
90563
90378
  const dir = claudeProjectDirForCwd(cwd);
@@ -90571,7 +90386,7 @@ function mostRecentClaudeSessionForCwd(cwd) {
90571
90386
  for (const entry of entries2) {
90572
90387
  if (!entry.endsWith(".jsonl"))
90573
90388
  continue;
90574
- const transcriptPath = join72(dir, entry);
90389
+ const transcriptPath = join71(dir, entry);
90575
90390
  try {
90576
90391
  const mtimeMs = statSync25(transcriptPath).mtimeMs;
90577
90392
  if (!best || mtimeMs > best.mtimeMs) {
@@ -90594,7 +90409,7 @@ function readRelayRuntimeStateForTmuxSession(sessionName) {
90594
90409
  return null;
90595
90410
  }
90596
90411
  for (const entry of entries2) {
90597
- const statePath = join72(agentsDir, entry, "state.json");
90412
+ const statePath = join71(agentsDir, entry, "state.json");
90598
90413
  try {
90599
90414
  const parsed = JSON.parse(readFileSync35(statePath, "utf8"));
90600
90415
  if (parsed.sessionId === sessionName)
@@ -91814,7 +91629,7 @@ function expandHomePath8(value) {
91814
91629
  return homedir55();
91815
91630
  }
91816
91631
  if (value.startsWith("~/")) {
91817
- return join72(homedir55(), value.slice(2));
91632
+ return join71(homedir55(), value.slice(2));
91818
91633
  }
91819
91634
  return value;
91820
91635
  }
@@ -91943,7 +91758,7 @@ function brokerDispatchReviewPrompt(input) {
91943
91758
  "Review this from first principles, then inspect the relevant implementation.",
91944
91759
  "",
91945
91760
  "Topic: OpenScout failed dispatch / failed delivery",
91946
- "Workspace: /Users/art/dev/openscout",
91761
+ "Workspace: /Users/example/dev/openscout",
91947
91762
  "",
91948
91763
  "User goal:",
91949
91764
  "- Diagnose this failed dispatch from the Dispatch screen.",
@@ -92121,14 +91936,6 @@ async function refreshOpenScoutBuildInfo(currentDirectory) {
92121
91936
  const snapshot = await probe.fresh({ maxAgeMs: 0 });
92122
91937
  return openScoutBuildInfoFromGit(snapshot.value);
92123
91938
  }
92124
- async function resolveOpenScoutBuildInfo(currentDirectory, refresh) {
92125
- if (refresh)
92126
- return refreshOpenScoutBuildInfo(currentDirectory);
92127
- const cached2 = gitBuildInfoProbe.for(currentDirectory).read();
92128
- if (cached2.value)
92129
- return openScoutBuildInfoFromGit(cached2.value);
92130
- return warmOpenScoutBuildInfo(currentDirectory);
92131
- }
92132
91939
  function permissionSetupHint(detail) {
92133
91940
  const normalized = detail.toLowerCase();
92134
91941
  const mentionsPermission = /permission|approval|allow|blocked/.test(normalized);
@@ -92908,7 +92715,7 @@ function isLikelyHudProjectRoot(root) {
92908
92715
  } catch {
92909
92716
  return false;
92910
92717
  }
92911
- return HUD_PROJECT_MARKERS.some((marker) => existsSync53(join72(normalized, marker)));
92718
+ return HUD_PROJECT_MARKERS.some((marker) => existsSync53(join71(normalized, marker)));
92912
92719
  }
92913
92720
  function currentDirectoryProjectOption(currentDirectory, defaultHarness) {
92914
92721
  const trimmed = currentDirectory.trim();
@@ -93267,7 +93074,8 @@ async function createOpenScoutWebServer(options) {
93267
93074
  publicOrigin: options.publicOrigin
93268
93075
  }));
93269
93076
  app.get("/api/build", async (c) => {
93270
- return c.json(await resolveOpenScoutBuildInfo(currentDirectory, c.req.query("refresh") === "1"));
93077
+ const buildInfo = c.req.query("refresh") === "1" ? await refreshOpenScoutBuildInfo(currentDirectory) : loadOpenScoutBuildInfo(currentDirectory);
93078
+ return c.json(buildInfo);
93271
93079
  });
93272
93080
  app.get("/api/knowledge/status", (c) => {
93273
93081
  const store2 = new SQLiteKnowledgeStore(undefined, undefined, { readonly: true });
@@ -95069,7 +94877,6 @@ async function createOpenScoutWebServer(options) {
95069
94877
  pronouns: config.pronouns ?? "",
95070
94878
  hue: config.hue ?? 195,
95071
94879
  monogram: config.monogram ?? "",
95072
- avatar: config.avatar ?? "",
95073
94880
  bio: config.bio ?? "",
95074
94881
  timezone: config.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
95075
94882
  workingHours: config.workingHours ?? "08:00 \u2013 18:00",
@@ -95184,7 +94991,6 @@ async function createOpenScoutWebServer(options) {
95184
94991
  "handle",
95185
94992
  "pronouns",
95186
94993
  "monogram",
95187
- "avatar",
95188
94994
  "bio",
95189
94995
  "timezone",
95190
94996
  "workingHours",
@@ -95224,7 +95030,6 @@ async function createOpenScoutWebServer(options) {
95224
95030
  pronouns: config.pronouns ?? "",
95225
95031
  hue: config.hue ?? 195,
95226
95032
  monogram: config.monogram ?? "",
95227
- avatar: config.avatar ?? "",
95228
95033
  bio: config.bio ?? "",
95229
95034
  timezone: config.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
95230
95035
  workingHours: config.workingHours ?? "08:00 \u2013 18:00",
@@ -95761,12 +95566,12 @@ async function createOpenScoutWebServer(options) {
95761
95566
  });
95762
95567
  mountScoutVoiceRoutes(app, { resolveOpenAIApiKey: scoutbot.resolveOpenAIApiKey });
95763
95568
  if (true) {
95764
- const fixturesRoot = join72(process.cwd(), "dev", "scoutbot-fx-fixtures");
95569
+ const fixturesRoot = join71(process.cwd(), "dev", "scoutbot-fx-fixtures");
95765
95570
  app.get("/api/dev/scoutbot-fx/fixtures", (c) => {
95766
95571
  if (!existsSync53(fixturesRoot)) {
95767
95572
  return c.json({ fixtures: [], generatedAt: null, available: false });
95768
95573
  }
95769
- const manifestPath = join72(fixturesRoot, "manifest.json");
95574
+ const manifestPath = join71(fixturesRoot, "manifest.json");
95770
95575
  if (!existsSync53(manifestPath)) {
95771
95576
  return c.json({ fixtures: [], generatedAt: null, available: true, note: "manifest missing \u2014 re-run the generator script" });
95772
95577
  }
@@ -95790,7 +95595,7 @@ async function createOpenScoutWebServer(options) {
95790
95595
  if (!/^[a-zA-Z0-9._-]+\.wav$/.test(raw2)) {
95791
95596
  return c.json({ error: "invalid fixture name" }, 400);
95792
95597
  }
95793
- const filePath = join72(fixturesRoot, raw2);
95598
+ const filePath = join71(fixturesRoot, raw2);
95794
95599
  if (!existsSync53(filePath)) {
95795
95600
  return c.json({ error: "fixture not found" }, 404);
95796
95601
  }
@@ -96040,7 +95845,7 @@ function resolveOpenScoutWebApplicationServerIdentity(env = process.env, _machin
96040
95845
 
96041
95846
  // packages/web/server/relay.ts
96042
95847
  import { mkdir as mkdir15, writeFile as writeFile13 } from "fs/promises";
96043
- import { basename as basename32, join as join73 } from "path";
95848
+ import { basename as basename32, join as join72 } from "path";
96044
95849
  import { randomUUID as randomUUID12 } from "crypto";
96045
95850
  var UPLOAD_DIR = "/tmp/scout-uploads";
96046
95851
  function sanitizeUploadName(name2) {
@@ -96060,7 +95865,7 @@ async function handleRelayUpload(req) {
96060
95865
  return Response.json({ error: "Invalid name" }, { status: 400 });
96061
95866
  }
96062
95867
  await mkdir15(UPLOAD_DIR, { recursive: true, mode: 448 });
96063
- const filepath = join73(UPLOAD_DIR, `${randomUUID12()}-${safeName}`);
95868
+ const filepath = join72(UPLOAD_DIR, `${randomUUID12()}-${safeName}`);
96064
95869
  await writeFile13(filepath, Buffer.from(data, "base64"), { mode: 384 });
96065
95870
  return Response.json({ path: filepath });
96066
95871
  }
@@ -96592,7 +96397,7 @@ function startProcessParentWatchdog(expectedParentPidRaw, options = {}) {
96592
96397
  process.title = "scout-web";
96593
96398
  var port = Number.parseInt(process.env.OPENSCOUT_WEB_PORT ?? process.env.SCOUT_WEB_PORT ?? String(resolveWebPort()), 10);
96594
96399
  var hostname2 = resolveScoutWebBindHost(process.env);
96595
- var webAuthToken = resolveWebAuthToken(process.env);
96400
+ var webAuthToken = process.env.OPENSCOUT_WEB_AUTH_TOKEN?.trim() || randomBytes7(32).toString("base64url");
96596
96401
  var currentDirectory = resolveOpenScoutSetupContextRoot({
96597
96402
  env: process.env,
96598
96403
  fallbackDirectory: process.cwd()
@@ -96606,12 +96411,12 @@ function resolveStaticRoot2() {
96606
96411
  return process.env.OPENSCOUT_WEB_STATIC_ROOT.trim();
96607
96412
  }
96608
96413
  const selfDir = dirname43(fileURLToPath10(import.meta.url));
96609
- const siblingClientRoot = join74(selfDir, "client");
96610
- if (existsSync55(join74(siblingClientRoot, "index.html"))) {
96414
+ const siblingClientRoot = join73(selfDir, "client");
96415
+ if (existsSync55(join73(siblingClientRoot, "index.html"))) {
96611
96416
  return siblingClientRoot;
96612
96417
  }
96613
96418
  const sourceDistClientRoot = resolve31(selfDir, "../dist/client");
96614
- if (existsSync55(join74(sourceDistClientRoot, "index.html"))) {
96419
+ if (existsSync55(join73(sourceDistClientRoot, "index.html"))) {
96615
96420
  return sourceDistClientRoot;
96616
96421
  }
96617
96422
  return;