@openscout/scout 0.2.102 → 0.2.106

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 (605) hide show
  1. package/README.md +37 -0
  2. package/bin/scout.mjs +6 -0
  3. package/bin/scoutd +0 -0
  4. package/dist/build-manifest.json +4 -4
  5. package/dist/chat.mjs +307 -0
  6. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
  7. package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CusDRiVO.js} +1 -1
  8. package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-CyegKk1V.js} +1 -1
  9. package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-X-hbTOi0.js} +1 -1
  10. package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-LPXSVP67.js} +1 -1
  11. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
  12. package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
  13. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
  14. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
  15. package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-DtHT3sCo.js} +1 -1
  16. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
  17. package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
  18. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
  19. package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
  20. package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
  21. package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
  22. package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
  23. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
  24. package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
  25. package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
  26. package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-CfTupTEl.js} +1 -1
  27. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
  28. package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
  29. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
  30. package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
  31. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
  32. package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-Cchnc4Ug.js} +1 -1
  33. package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-gkEp4y__.js} +1 -1
  34. package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CUkjnoVk.js} +1 -1
  35. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
  36. package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
  37. package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
  38. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
  39. package/dist/client/assets/Canvas-X9pVSkw3.js +1 -0
  40. package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-BXUtPAGC.js} +1 -1
  41. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
  42. package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
  43. package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
  44. package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +1 -0
  45. package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
  46. package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
  47. package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
  48. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
  49. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
  50. package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
  51. package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
  52. package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-DuQRwpgK.js} +1 -1
  53. package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
  54. package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-BXyKeL5T.js} +1 -1
  55. package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-THp0r_U8.js} +1 -1
  56. package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-BVmSMV2V.js} +1 -1
  57. package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
  58. package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
  59. package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BUoRbu9o.js} +1 -1
  60. package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
  61. package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
  62. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
  63. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
  64. package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js} +2 -2
  65. package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
  66. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
  67. package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
  68. package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
  69. package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
  70. package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dhryjx2c.js} +1 -1
  71. package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
  72. package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
  73. package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
  74. package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-aH-jCyDq.js} +1 -1
  75. package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-66uQAorV.js} +1 -1
  76. package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
  77. package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
  78. package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CZlrHXy-.js} +1 -1
  79. package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-BAO6mtjD.js} +1 -1
  80. package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
  81. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
  82. package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-2_NVPQor.js} +1 -1
  83. package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
  84. package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
  85. package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-VFzA6Kxc.js} +1 -1
  86. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
  87. package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-BeHDejWz.js} +1 -1
  88. package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
  89. package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CFfkIbc6.js} +1 -1
  90. package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
  91. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
  92. package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-_t7yM8vX.js} +2 -2
  93. package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-DouPyNmz.js} +1 -1
  94. package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-CnM1i8hW.js} +1 -1
  95. package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
  96. package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
  97. package/dist/client/assets/JumpPalette-O1aJE9gR.js +1 -0
  98. package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
  99. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
  100. package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-CJa110yk.js} +1 -1
  101. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
  102. package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
  103. package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-DWZHYh1A.js} +2 -2
  104. package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
  105. package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
  106. package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BVvtqI8q.js} +2 -2
  107. package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
  108. package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
  109. package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-D62-Wis8.js} +1 -1
  110. package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
  111. package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
  112. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
  113. package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-B19lYSY9.js} +1 -1
  114. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
  115. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
  116. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
  117. package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-Bh-L-emz.js} +1 -1
  118. package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
  119. package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-DFbF_XvR.js} +1 -1
  120. package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-CElOEpCh.js} +1 -1
  121. package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-B-jjHf1c.js} +1 -1
  122. package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
  123. package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-PFnG_10h.js} +2 -2
  124. package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
  125. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
  126. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
  127. package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
  128. package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
  129. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
  130. package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
  131. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
  132. package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
  133. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
  134. package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
  135. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
  136. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
  137. package/dist/client/assets/Provider-C35yu29I.js +5 -0
  138. package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-BjmWK420.js} +1 -1
  139. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
  140. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
  141. package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
  142. package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-348f17bW.js} +1 -1
  143. package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-CBnAM3ui.js} +1 -1
  144. package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DyRPfNFx.js} +1 -1
  145. package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
  146. package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
  147. package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
  148. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
  149. package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-uMCpt0e9.js} +2 -2
  150. package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
  151. package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-CNDhZhgD.js} +1 -1
  152. package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
  153. package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-3_25USO_.js} +1 -1
  154. package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
  155. package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-D7dbV2qo.js} +1 -1
  156. package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
  157. package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
  158. package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
  159. package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
  160. package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
  161. package/dist/client/assets/SessionObserve-DXxBvejJ.js +12 -0
  162. package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
  163. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
  164. package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
  165. package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
  166. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
  167. package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
  168. package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
  169. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
  170. package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-CRtTYkMj.js} +1 -1
  171. package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-_CHAQdOa.js} +1 -1
  172. package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
  173. package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-CpZWf54-.js} +1 -1
  174. package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-BSiTS4en.js} +1 -1
  175. package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-2gCP6H7A.js} +1 -1
  176. package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-CYSijNTy.js} +2 -2
  177. package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
  178. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
  179. package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
  180. package/dist/client/assets/TerminalRelay-DrikpUSJ.js +46 -0
  181. package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
  182. package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-CXFeweMg.js} +1 -1
  183. package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
  184. package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
  185. package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
  186. package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
  187. package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
  188. package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
  189. package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
  190. package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-vNt01sDd.js} +1 -1
  191. package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-BDkR7Edq.js} +1 -1
  192. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
  193. package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-CIIlutQq.js} +1 -1
  194. package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
  195. package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-Jm2Z6dfW.js} +1 -1
  196. package/dist/client/assets/{activity-CSUhvjD0.js → activity-CIlFrfPJ.js} +1 -1
  197. package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-dFpj9Kfq.js} +1 -1
  198. package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-BFCGRtGh.js} +1 -1
  199. package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-BGGvT5G6.js} +1 -1
  200. package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
  201. package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
  202. package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
  203. package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
  204. package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
  205. package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
  206. package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-DDc7mLCW.js} +1 -1
  207. package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
  208. package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
  209. package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
  210. package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-C1SQHJ3k.js} +1 -1
  211. package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-MVUKauwQ.js} +1 -1
  212. package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-Bp-FpE5V.js} +1 -1
  213. package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-BPedAgxO.js} +1 -1
  214. package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-CV98WMSp.js} +1 -1
  215. package/dist/client/assets/{bot-CfN9PSBF.js → bot-B4zLQ4IN.js} +1 -1
  216. package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
  217. package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
  218. package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
  219. package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
  220. package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
  221. package/dist/client/assets/{check-B8dMv3Is.js → check-lrJ3a73a.js} +1 -1
  222. package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-l1mrh5S9.js} +1 -1
  223. package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DrfqcerI.js} +1 -1
  224. package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-CETZJzjV.js} +1 -1
  225. package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
  226. package/dist/client/assets/{clock-DFcRbtrl.js → clock-BV1aqPkK.js} +1 -1
  227. package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-BhcNbLWU.js} +1 -1
  228. package/dist/client/assets/{coffee-C_D9zooM.js → coffee-D7EAOdCk.js} +1 -1
  229. package/dist/client/assets/{compass-DTZdCpv9.js → compass-63TUaz5_.js} +1 -1
  230. package/dist/client/assets/content-B1lgE8qr.js +1 -0
  231. package/dist/client/assets/content-B5l11YyQ.js +1 -0
  232. package/dist/client/assets/content-BNZOZEpX.js +1 -0
  233. package/dist/client/assets/content-BRIxP155.js +1 -0
  234. package/dist/client/assets/content-BWd8gt8L.js +1 -0
  235. package/dist/client/assets/content-BfwS2jAK.js +1 -0
  236. package/dist/client/assets/content-C4p43_eT.js +1 -0
  237. package/dist/client/assets/content-CdYfaoDV.js +1 -0
  238. package/dist/client/assets/content-CzldLxw0.js +1 -0
  239. package/dist/client/assets/content-D-olnc4U.js +1 -0
  240. package/dist/client/assets/content-DTioimq4.js +1 -0
  241. package/dist/client/assets/content-LOebm3_d.js +1 -0
  242. package/dist/client/assets/content-nGlEZhUI.js +1 -0
  243. package/dist/client/assets/content-oyzDM-LK.js +1 -0
  244. package/dist/client/assets/content-x1PHxED7.js +1 -0
  245. package/dist/client/assets/content-zX3ZY3T9.js +1 -0
  246. package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
  247. package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-Tqba2d56.js} +1 -1
  248. package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
  249. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
  250. package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
  251. package/dist/client/assets/{copy-D9WUpQRf.js → copy-xKeM5ZtU.js} +1 -1
  252. package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-BOTa_WLr.js} +1 -1
  253. package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-zZ8Hx7er.js} +1 -1
  254. package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
  255. package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
  256. package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
  257. package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
  258. package/dist/client/assets/discover-DJFxyV1k.js +2 -0
  259. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
  260. package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-CUObqmgX.js} +1 -1
  261. package/dist/client/assets/{eye-CtqSV8BS.js → eye-LrO-cXQt.js} +1 -1
  262. package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-CsU7jJpu.js} +1 -1
  263. package/dist/client/assets/{file-text-ChtICwub.js → file-text-CnISiiw6.js} +1 -1
  264. package/dist/client/assets/{flag-CqdOxVkI.js → flag-C4wl8z2-.js} +1 -1
  265. package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
  266. package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
  267. package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
  268. package/dist/client/assets/{folder-0fWevPvQ.js → folder-D5prSkzz.js} +1 -1
  269. package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-D9_5iJEm.js} +1 -1
  270. package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-QZub3Ot9.js} +1 -1
  271. package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-B0_fPLO7.js} +1 -1
  272. package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-DicR7sUf.js} +1 -1
  273. package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
  274. package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
  275. package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
  276. package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
  277. package/dist/client/assets/index-724SdE6r.js +1 -0
  278. package/dist/client/assets/{index-CvsM3jm8.js → index-CHD0qcfL.js} +1 -1
  279. package/dist/client/assets/index-CN4rBB_s.css +1 -0
  280. package/dist/client/assets/index-D1d98iYf.js +1 -0
  281. package/dist/client/assets/index-EsrkGBcv.js +10 -0
  282. package/dist/client/assets/index-gGHPA-By.js +1 -0
  283. package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-BkgUDn6G.js} +2 -2
  284. package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-DDHegDbx.js} +1 -1
  285. package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
  286. package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
  287. package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-D-RSWjb-.js} +1 -1
  288. package/dist/client/assets/{layers-Bolb8ejU.js → layers-C8PDiMul.js} +1 -1
  289. package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-Cor2frzj.js} +1 -1
  290. package/dist/client/assets/left-Bn5X7x2o.js +2 -0
  291. package/dist/client/assets/left-BqS0fYX1.js +1 -0
  292. package/dist/client/assets/left-CTCeeeD3.js +1 -0
  293. package/dist/client/assets/left-DhtVPVux.js +1 -0
  294. package/dist/client/assets/left-K39b-Wvx.js +2 -0
  295. package/dist/client/assets/left-KGmueNPt.js +1 -0
  296. package/dist/client/assets/left-P_GOYB-s.js +1 -0
  297. package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
  298. package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
  299. package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
  300. package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
  301. package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
  302. package/dist/client/assets/library-CkWNPHRp.js +1 -0
  303. package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-OvccU82H.js} +1 -1
  304. package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-BqnoxJrq.js} +1 -1
  305. package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
  306. package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-DxcqCLmd.js} +1 -1
  307. package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
  308. package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-ByUvhS-v.js} +1 -1
  309. package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-CiZ8xSAx.js} +1 -1
  310. package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-DZvJC4KU.js} +1 -1
  311. package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-CxRVKNE-.js} +1 -1
  312. package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
  313. package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
  314. package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-BxesYglW.js} +1 -1
  315. package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
  316. package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-elEEsIvb.js} +1 -1
  317. package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
  318. package/dist/client/assets/monitor-DTTYEb73.js +1 -0
  319. package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-uorRqFxf.js} +1 -1
  320. package/dist/client/assets/{observe-CkfOxYx_.js → observe-BJqERJVj.js} +1 -1
  321. package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
  322. package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-BswZLqvA.js} +1 -1
  323. package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-Bv7sP_fc.js} +1 -1
  324. package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
  325. package/dist/client/assets/{pause-DWS7YGQ3.js → pause-C2XTlkjs.js} +1 -1
  326. package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-KRk_yb0q.js} +1 -1
  327. package/dist/client/assets/{pin-DWlD1BOF.js → pin-C2mFOV1l.js} +1 -1
  328. package/dist/client/assets/{play-D_Pggug4.js → play-FT6K3It1.js} +1 -1
  329. package/dist/client/assets/{plus-D_wLGJGT.js → plus-DFDDeGKu.js} +1 -1
  330. package/dist/client/assets/profile-DTmzN16I.js +1 -0
  331. package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-C0FUCv_p.js} +1 -1
  332. package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
  333. package/dist/client/assets/provider-Dojd8quC.js +1 -0
  334. package/dist/client/assets/{proxy-DOG46ja4.js → proxy-AJsmwA6h.js} +1 -1
  335. package/dist/client/assets/{radio-C_jtwbFP.js → radio-DRoOZsws.js} +1 -1
  336. package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-BmVr7sCD.js} +1 -1
  337. package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
  338. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
  339. package/dist/client/assets/right-49kO-6nD.js +1 -0
  340. package/dist/client/assets/right-APtItA8A.js +1 -0
  341. package/dist/client/assets/right-BJwhPqtn.js +1 -0
  342. package/dist/client/assets/right-BPqrf4ek.js +1 -0
  343. package/dist/client/assets/right-D7djOy6K.js +1 -0
  344. package/dist/client/assets/right-DKOUCRob.js +1 -0
  345. package/dist/client/assets/right-DMNrVzg7.js +1 -0
  346. package/dist/client/assets/{right-BLJsc2-p.js → right-DWPVB-nK.js} +1 -1
  347. package/dist/client/assets/right-DppeMCy4.js +1 -0
  348. package/dist/client/assets/right-GAL5Mw1v.js +1 -0
  349. package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-CGl4RTV7.js} +1 -1
  350. package/dist/client/assets/router-DCtl8wqb.js +1 -0
  351. package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
  352. package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-RUWwCVAr.js} +1 -1
  353. package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
  354. package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
  355. package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-DNjxhyO2.js} +1 -1
  356. package/dist/client/assets/{search-C4VlW_0l.js → search-DT42oyRW.js} +1 -1
  357. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
  358. package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
  359. package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-x3wFUjxj.js} +1 -1
  360. package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-CH0-fbZE.js} +1 -1
  361. package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
  362. package/dist/client/assets/{server-ms1yxUYJ.js → server-QfsgMLk1.js} +1 -1
  363. package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CvSdPHPe.js} +1 -1
  364. package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
  365. package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
  366. package/dist/client/assets/{session-table-CDx_16xf.js → session-table-L-pns6Zl.js} +1 -1
  367. package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Dc-QAa7O.js} +1 -1
  368. package/dist/client/assets/{settings-TJIkkZ0P.js → settings-BVh7kldq.js} +1 -1
  369. package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
  370. package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-782VC_yy.js} +1 -1
  371. package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-BjHq_DNK.js} +1 -1
  372. package/dist/client/assets/{sse-v5QLsOHV.js → sse-BCPRocpq.js} +1 -1
  373. package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
  374. package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-d0yAYxR0.js} +1 -1
  375. package/dist/client/assets/{terminal-96JWDYDL.js → terminal-hQKQygcf.js} +1 -1
  376. package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-Bxs1hp-j.js} +1 -1
  377. package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
  378. package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-Ay5C2c-M.js} +1 -1
  379. package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
  380. package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
  381. package/dist/client/assets/use-beside-DoRC1nt0.js +1 -0
  382. package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-CY4JciOV.js} +1 -1
  383. package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
  384. package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-BvaqtODo.js} +1 -1
  385. package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
  386. package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-3gMYZNIp.js} +1 -1
  387. package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +1 -0
  388. package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-BANmpjMh.js} +1 -1
  389. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
  390. package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
  391. package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
  392. package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
  393. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
  394. package/dist/client/assets/users-BUjx36gx.js +1 -0
  395. package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
  396. package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
  397. package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
  398. package/dist/client/assets/{wrench-BsMTSeji.js → wrench-DR0i5BU7.js} +1 -1
  399. package/dist/client/assets/{x-DI1ktCYb.js → x-DAehov0E.js} +1 -1
  400. package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-BXQiLVnI.js} +1 -1
  401. package/dist/client/assets/{zap-sKPkh4sQ.js → zap-CEjZNZbI.js} +1 -1
  402. package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
  403. package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
  404. package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
  405. package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
  406. package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
  407. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  408. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  409. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  410. package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
  411. package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
  412. package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
  413. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  414. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  415. package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
  416. package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
  417. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  418. package/dist/client/index.html +15 -3
  419. package/dist/drizzle/0019_session_actor_targets.sql +227 -0
  420. package/dist/drizzle/0020_message_reactions.sql +11 -0
  421. package/dist/drizzle/README.md +19 -0
  422. package/dist/drizzle/meta/_journal.json +14 -0
  423. package/dist/highlights-eq9cgrbb.scm +604 -0
  424. package/dist/highlights-ghv9g403.scm +205 -0
  425. package/dist/highlights-hk7bwhj4.scm +284 -0
  426. package/dist/highlights-r812a2qc.scm +150 -0
  427. package/dist/highlights-x6tmsnaa.scm +115 -0
  428. package/dist/injections-73j83es3.scm +27 -0
  429. package/dist/main.mjs +1721 -837
  430. package/dist/node/main.mjs +264 -39
  431. package/dist/pairing-runtime-controller.mjs +1090 -570
  432. package/dist/runtime/base-daemon.mjs +14272 -61
  433. package/dist/runtime/broker-daemon.mjs +16999 -1243
  434. package/dist/runtime/broker-process-manager.mjs +101 -6
  435. package/dist/runtime/mesh-discover.mjs +101 -6
  436. package/dist/scout-control-plane-web.mjs +27057 -6178
  437. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  438. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  439. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  440. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  441. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  442. package/dist/update-helper.mjs +294 -56
  443. package/package.json +2 -2
  444. package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
  445. package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
  446. package/dist/client/assets/AgentAvatar-BIwg54Tj.js +0 -1
  447. package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
  448. package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
  449. package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
  450. package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
  451. package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
  452. package/dist/client/assets/AgentLanesView-aAyC7lHf.js +0 -2
  453. package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
  454. package/dist/client/assets/AgentSessions-Cox2zS-e.js +0 -6
  455. package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
  456. package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
  457. package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
  458. package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
  459. package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
  460. package/dist/client/assets/ConversationComposer-B7RU6LKd.js +0 -1
  461. package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
  462. package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
  463. package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
  464. package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
  465. package/dist/client/assets/ConversationStatus-CK-YfLpi.js +0 -1
  466. package/dist/client/assets/CrewAvatar-CJhuqTsJ.js +0 -1
  467. package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
  468. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
  469. package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
  470. package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
  471. package/dist/client/assets/FloorTacticalHUD-Bngao6sn.js +0 -1
  472. package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
  473. package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
  474. package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
  475. package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
  476. package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
  477. package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
  478. package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
  479. package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
  480. package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
  481. package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
  482. package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
  483. package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
  484. package/dist/client/assets/ObserveEmbedScreen-BPiSXXvm.js +0 -2
  485. package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
  486. package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
  487. package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
  488. package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
  489. package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
  490. package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
  491. package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
  492. package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
  493. package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
  494. package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
  495. package/dist/client/assets/Provider-5Hotn7NQ.js +0 -5
  496. package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
  497. package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
  498. package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
  499. package/dist/client/assets/SessionObserve-DaqDhqDI.js +0 -12
  500. package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +0 -1
  501. package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
  502. package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
  503. package/dist/client/assets/SettingsDrawer-BDapR4E9.js +0 -3
  504. package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
  505. package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
  506. package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
  507. package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
  508. package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
  509. package/dist/client/assets/WorkDetailScreen-CwtRCm_-.js +0 -5
  510. package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
  511. package/dist/client/assets/WorldMinimap-Blqg0d5r.js +0 -1
  512. package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
  513. package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
  514. package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
  515. package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
  516. package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
  517. package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
  518. package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
  519. package/dist/client/assets/content-B5Q4pb9R.js +0 -1
  520. package/dist/client/assets/content-BK1IfOZs.js +0 -1
  521. package/dist/client/assets/content-BeEsWLEm.js +0 -1
  522. package/dist/client/assets/content-BkOwEknW.js +0 -1
  523. package/dist/client/assets/content-C32W5kAG.js +0 -1
  524. package/dist/client/assets/content-CoqyLs9v.js +0 -1
  525. package/dist/client/assets/content-CwpdIS5b.js +0 -1
  526. package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
  527. package/dist/client/assets/content-DXKaPDfn.js +0 -1
  528. package/dist/client/assets/content-DZt5-dkI.js +0 -1
  529. package/dist/client/assets/content-DbQJH8L1.js +0 -1
  530. package/dist/client/assets/content-DetoiaHq.js +0 -1
  531. package/dist/client/assets/content-Dhu3wL7J.js +0 -1
  532. package/dist/client/assets/content-Dpv34iZu.js +0 -1
  533. package/dist/client/assets/content-TtQJb61D.js +0 -1
  534. package/dist/client/assets/content-ymNb2R7g.js +0 -1
  535. package/dist/client/assets/conversation-model-BGFHoxQ0.js +0 -1
  536. package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
  537. package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
  538. package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
  539. package/dist/client/assets/discover-C8IOY7_K.js +0 -2
  540. package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
  541. package/dist/client/assets/home-moving-signal-B7m-ngb2.js +0 -1
  542. package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
  543. package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
  544. package/dist/client/assets/index-C5cX8dkl.js +0 -1
  545. package/dist/client/assets/index-C8uS5szO.js +0 -10
  546. package/dist/client/assets/index-Ck1__1yL.css +0 -1
  547. package/dist/client/assets/index-ClOOrVG1.js +0 -1
  548. package/dist/client/assets/index-Crtgfc9I.js +0 -1
  549. package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
  550. package/dist/client/assets/left-B-_z_nqj.js +0 -2
  551. package/dist/client/assets/left-B1LY7rJc.js +0 -1
  552. package/dist/client/assets/left-C6bdjWcG.js +0 -2
  553. package/dist/client/assets/left-CF4iuqlz.js +0 -1
  554. package/dist/client/assets/left-DLtNyZl1.js +0 -1
  555. package/dist/client/assets/left-Fpxoq-VY.js +0 -1
  556. package/dist/client/assets/left-N2wXfTlp.js +0 -1
  557. package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
  558. package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
  559. package/dist/client/assets/left-default-08gmdCtb.js +0 -1
  560. package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
  561. package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
  562. package/dist/client/assets/library-DLKBVUJ6.js +0 -1
  563. package/dist/client/assets/message-markup-DgFSyb3f.js +0 -15
  564. package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
  565. package/dist/client/assets/profile-C3KgiZvc.js +0 -1
  566. package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
  567. package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
  568. package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
  569. package/dist/client/assets/right-B9OUA6Ho.js +0 -1
  570. package/dist/client/assets/right-BDQnjetX.js +0 -1
  571. package/dist/client/assets/right-BUbKHmRH.js +0 -1
  572. package/dist/client/assets/right-Ci2IcD4s.js +0 -1
  573. package/dist/client/assets/right-CmCce3e5.js +0 -1
  574. package/dist/client/assets/right-D7w0zM5a.js +0 -1
  575. package/dist/client/assets/right-DIoON_bv.js +0 -1
  576. package/dist/client/assets/right-E0Jr3VN5.js +0 -1
  577. package/dist/client/assets/right-lCdAk9dW.js +0 -1
  578. package/dist/client/assets/router-BKiMcYa7.js +0 -1
  579. package/dist/client/assets/runtime-picker-DdsttHHc.js +0 -1
  580. package/dist/client/assets/scout-voice-DOQ_B77g.js +0 -1
  581. package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
  582. package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
  583. package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
  584. package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
  585. package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
  586. package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
  587. package/dist/drizzle/meta/0000_snapshot.json +0 -4575
  588. package/dist/drizzle/meta/0001_snapshot.json +0 -4624
  589. package/dist/drizzle/meta/0002_snapshot.json +0 -4631
  590. package/dist/drizzle/meta/0003_snapshot.json +0 -4952
  591. package/dist/drizzle/meta/0004_snapshot.json +0 -5235
  592. package/dist/drizzle/meta/0005_snapshot.json +0 -5599
  593. package/dist/drizzle/meta/0006_snapshot.json +0 -5606
  594. package/dist/drizzle/meta/0007_snapshot.json +0 -5767
  595. package/dist/drizzle/meta/0008_snapshot.json +0 -5774
  596. package/dist/drizzle/meta/0009_snapshot.json +0 -6262
  597. package/dist/drizzle/meta/0010_snapshot.json +0 -6286
  598. package/dist/drizzle/meta/0011_snapshot.json +0 -6337
  599. package/dist/drizzle/meta/0012_snapshot.json +0 -6458
  600. package/dist/drizzle/meta/0013_snapshot.json +0 -6465
  601. package/dist/drizzle/meta/0014_snapshot.json +0 -6503
  602. package/dist/drizzle/meta/0015_snapshot.json +0 -6596
  603. package/dist/drizzle/meta/0016_snapshot.json +0 -6611
  604. package/dist/drizzle/meta/0017_snapshot.json +0 -6785
  605. package/dist/drizzle/meta/0018_snapshot.json +0 -6804
@@ -368,7 +368,7 @@ function validateLocalConfig(input) {
368
368
  if (typeof raw.webLocalName === "string" && raw.webLocalName.trim().length > 0) {
369
369
  out.webLocalName = raw.webLocalName.trim();
370
370
  }
371
- if (raw.webLanScope === "full" || raw.webLanScope === "pairing") {
371
+ if (raw.webLanScope === "full" || raw.webLanScope === "pairing" || raw.webLanScope === "chat") {
372
372
  out.webLanScope = raw.webLanScope;
373
373
  }
374
374
  if (raw.ports && typeof raw.ports === "object") {
@@ -449,7 +449,9 @@ var init_local_config = __esm(() => {
449
449
  pairingBridge: 43130,
450
450
  pairingRelay: 43131,
451
451
  pairingFileServer: 43132,
452
- studio: 43140
452
+ studio: 43140,
453
+ jetstream: 43150,
454
+ jetstreamMonitor: 43151
453
455
  };
454
456
  DEFAULT_LOCAL_CONFIG = {
455
457
  version: LOCAL_CONFIG_VERSION,
@@ -783,6 +785,13 @@ var init_domains = __esm(() => {
783
785
  ]
784
786
  },
785
787
  groq: { id: "groq", label: "Groq", env: [envCredential("GROQ_API_KEY")] },
788
+ devin: {
789
+ id: "devin",
790
+ label: "Cognition / Devin",
791
+ env: [
792
+ envCredential("WINDSURF_API_KEY", { billing: "subscription" })
793
+ ]
794
+ },
786
795
  cerebras: { id: "cerebras", label: "Cerebras", env: [envCredential("CEREBRAS_API_KEY")] },
787
796
  mistral: { id: "mistral", label: "Mistral", env: [envCredential("MISTRAL_API_KEY")] },
788
797
  zai: { id: "zai", label: "Z.ai", env: [envCredential("ZAI_API_KEY")] },
@@ -863,6 +872,22 @@ var init_domains = __esm(() => {
863
872
  ],
864
873
  login: { command: "grok login", interactive: true },
865
874
  notReadyMessage: "Grok is installed but not authenticated yet."
875
+ },
876
+ devin: {
877
+ harness: "devin",
878
+ mode: "hybrid",
879
+ domains: ["devin"],
880
+ credentials: [
881
+ {
882
+ kind: "file",
883
+ path: "~/.local/share/devin/credentials.toml",
884
+ portable: false,
885
+ fileType: "file"
886
+ },
887
+ ...domainEnv("devin")
888
+ ],
889
+ login: { command: "devin auth login", interactive: true },
890
+ notReadyMessage: "Devin is installed but still needs devin auth login or WINDSURF_API_KEY."
866
891
  }
867
892
  };
868
893
  HARNESS_AUTH_MODELS["grok-acp"] = {
@@ -1471,6 +1496,39 @@ var init_harness_catalog = __esm(() => {
1471
1496
  transport: "acp_stdio"
1472
1497
  }
1473
1498
  },
1499
+ {
1500
+ name: "devin",
1501
+ harness: "devin",
1502
+ label: "Devin",
1503
+ description: "Cognition's Devin CLI coding agent over ACP",
1504
+ homepage: "https://docs.devin.ai/cli",
1505
+ tags: ["coding", "cli", "devin", "cognition", "acp"],
1506
+ featured: true,
1507
+ order: 4,
1508
+ support: {
1509
+ ...DEFAULT_SUPPORT,
1510
+ workspace: true,
1511
+ collaboration: true,
1512
+ files: true
1513
+ },
1514
+ install: {
1515
+ binary: "devin",
1516
+ requires: ["curl"],
1517
+ macos: "brew install --cask devin-cli",
1518
+ linux: "curl -fsSL https://cli.devin.ai/install.sh | bash",
1519
+ windows: "irm https://cli.devin.ai/install.ps1 | iex",
1520
+ verify: "devin --version >/dev/null 2>&1"
1521
+ },
1522
+ readiness: readinessFromAuthModel("devin"),
1523
+ sessionDefaults: {
1524
+ defaultTransport: "devin_acp"
1525
+ },
1526
+ capabilities: ["chat", "invoke", "deliver", "review", "execute"],
1527
+ metadata: {
1528
+ adapterType: "devin-acp",
1529
+ transport: "acp_stdio"
1530
+ }
1531
+ },
1474
1532
  {
1475
1533
  name: "flue",
1476
1534
  harness: "flue",
@@ -1549,7 +1607,7 @@ var init_harness_catalog = __esm(() => {
1549
1607
  });
1550
1608
 
1551
1609
  // ../runtime/src/schema-version.ts
1552
- var CONTROL_PLANE_SCHEMA_VERSION = 17;
1610
+ var CONTROL_PLANE_SCHEMA_VERSION = 18;
1553
1611
 
1554
1612
  // ../protocol/src/time.ts
1555
1613
  function isFinitePositive(value) {
@@ -1576,6 +1634,7 @@ var init_actors = __esm(() => {
1576
1634
  "flue",
1577
1635
  "cursor",
1578
1636
  "opencode",
1637
+ "devin",
1579
1638
  "native",
1580
1639
  "worker",
1581
1640
  "bridge",
@@ -2444,6 +2503,28 @@ var init_channel_identity = __esm(() => {
2444
2503
  CHAT_ID_PREFIX = CHANNEL_ID_PREFIX;
2445
2504
  });
2446
2505
 
2506
+ // ../protocol/src/channel-reception.ts
2507
+ var PERSISTENT_RECEIVE_TRANSPORTS, CHANNEL_RECEPTION_STALE_AFTER_MS;
2508
+ var init_channel_reception = __esm(() => {
2509
+ PERSISTENT_RECEIVE_TRANSPORTS = new Set([
2510
+ "local_socket",
2511
+ "websocket",
2512
+ "pairing_bridge",
2513
+ "peer_broker",
2514
+ "claude_channel",
2515
+ "claude_stream_json",
2516
+ "codex_app_server",
2517
+ "pi_rpc",
2518
+ "grok_acp",
2519
+ "kimi_acp",
2520
+ "cursor_acp",
2521
+ "opencode_acp",
2522
+ "devin_acp",
2523
+ "cursor_sdk_local"
2524
+ ]);
2525
+ CHANNEL_RECEPTION_STALE_AFTER_MS = 10 * 60 * 1000;
2526
+ });
2527
+
2447
2528
  // ../protocol/src/collaboration.ts
2448
2529
  function isWorkItemTerminalState(state) {
2449
2530
  return state === "done" || state === "cancelled";
@@ -2653,6 +2734,31 @@ var init_orchestration_provider_map = __esm(() => {
2653
2734
  };
2654
2735
  });
2655
2736
 
2737
+ // ../protocol/src/message-reactions.ts
2738
+ var REACTION_EMOJI_QUICK, REACTION_EMOJI_MORE, REACTION_EMOJI_ALLOWLIST, REACTION_EMOJI_ALLOWLIST_SET;
2739
+ var init_message_reactions = __esm(() => {
2740
+ REACTION_EMOJI_QUICK = ["\uD83D\uDC4D", "\u2764\uFE0F", "\uD83D\uDE02", "\uD83D\uDC40", "\uD83C\uDF89"];
2741
+ REACTION_EMOJI_MORE = [
2742
+ "\uD83D\uDD25",
2743
+ "\uD83D\uDE4F",
2744
+ "\uD83D\uDC4F",
2745
+ "\uD83D\uDE22",
2746
+ "\uD83D\uDE2E",
2747
+ "\uD83D\uDE80",
2748
+ "\u2705",
2749
+ "\uD83D\uDCAF",
2750
+ "\uD83E\uDD14",
2751
+ "\uD83D\uDCA1",
2752
+ "\uD83D\uDE4C",
2753
+ "\u2728"
2754
+ ];
2755
+ REACTION_EMOJI_ALLOWLIST = [
2756
+ ...REACTION_EMOJI_QUICK,
2757
+ ...REACTION_EMOJI_MORE
2758
+ ];
2759
+ REACTION_EMOJI_ALLOWLIST_SET = new Set(REACTION_EMOJI_ALLOWLIST);
2760
+ });
2761
+
2656
2762
  // ../protocol/src/permission-policy.ts
2657
2763
  function normalizeScoutPermissionProfile(value) {
2658
2764
  const normalized = value?.trim().replaceAll("-", "_");
@@ -2730,7 +2836,7 @@ var SCOUT_RUNTIME_CATALOG_DATA;
2730
2836
  var init_runtime_catalog_generated = __esm(() => {
2731
2837
  SCOUT_RUNTIME_CATALOG_DATA = {
2732
2838
  schemaVersion: "openscout.runtime-catalog.v1",
2733
- revision: "2026-09-10.1",
2839
+ revision: "2026-09-14.1",
2734
2840
  harnesses: [
2735
2841
  {
2736
2842
  id: "claude",
@@ -3040,6 +3146,39 @@ var init_runtime_catalog_generated = __esm(() => {
3040
3146
  enabled: true,
3041
3147
  reasoningEfforts: null,
3042
3148
  models: []
3149
+ },
3150
+ {
3151
+ id: "devin",
3152
+ label: "Devin",
3153
+ enabled: true,
3154
+ reasoningEfforts: null,
3155
+ models: [
3156
+ {
3157
+ id: "swe-2-high",
3158
+ label: "SWE-2 High",
3159
+ enabled: true,
3160
+ default: true,
3161
+ family: "SWE",
3162
+ version: "2 High",
3163
+ contextWindowTokens: 262000
3164
+ },
3165
+ {
3166
+ id: "swe-2-medium",
3167
+ label: "SWE-2 Medium",
3168
+ enabled: true,
3169
+ family: "SWE",
3170
+ version: "2 Medium",
3171
+ contextWindowTokens: 262000
3172
+ },
3173
+ {
3174
+ id: "swe-2-max",
3175
+ label: "SWE-2 Max",
3176
+ enabled: true,
3177
+ family: "SWE",
3178
+ version: "2 Max",
3179
+ contextWindowTokens: 262000
3180
+ }
3181
+ ]
3043
3182
  }
3044
3183
  ]
3045
3184
  };
@@ -3057,7 +3196,8 @@ var init_runtime_catalog_contract = __esm(() => {
3057
3196
  "flue",
3058
3197
  "cursor",
3059
3198
  "opencode",
3060
- "pi"
3199
+ "pi",
3200
+ "devin"
3061
3201
  ];
3062
3202
  SCOUT_REASONING_EFFORTS = [
3063
3203
  "none",
@@ -3438,6 +3578,9 @@ var init_terminal_surface_id = () => {};
3438
3578
  // ../protocol/src/terminal-sessions.ts
3439
3579
  var init_terminal_sessions = () => {};
3440
3580
 
3581
+ // ../protocol/src/terminal-session-resolve.ts
3582
+ var init_terminal_session_resolve = () => {};
3583
+
3441
3584
  // ../protocol/src/terminal-workspaces.ts
3442
3585
  var init_terminal_workspaces = () => {};
3443
3586
 
@@ -3465,8 +3608,11 @@ var init_broker_routes = __esm(() => {
3465
3608
  machines: "/v1/machines",
3466
3609
  machinesScan: "/v1/machines/scan",
3467
3610
  messages: "/v1/messages",
3611
+ messageReactions: "/v1/message-reactions",
3612
+ messageReactionsRemove: "/v1/message-reactions/remove",
3468
3613
  brokerMessages: "/v1/broker/messages",
3469
3614
  eventsStream: "/v1/events/stream",
3615
+ commands: "/v1/commands",
3470
3616
  actors: "/v1/actors",
3471
3617
  agents: "/v1/agents",
3472
3618
  endpoints: "/v1/endpoints",
@@ -3520,9 +3666,11 @@ var init_src = __esm(() => {
3520
3666
  init_a2a();
3521
3667
  init_machines();
3522
3668
  init_channel_identity();
3669
+ init_channel_reception();
3523
3670
  init_assigned_roles();
3524
3671
  init_orchestrator_prompt();
3525
3672
  init_orchestration_provider_map();
3673
+ init_message_reactions();
3526
3674
  init_agent_runs();
3527
3675
  init_budget();
3528
3676
  init_host_integrations();
@@ -3541,12 +3689,108 @@ var init_src = __esm(() => {
3541
3689
  init_cursor_transport();
3542
3690
  init_terminal_surface_id();
3543
3691
  init_terminal_sessions();
3692
+ init_terminal_session_resolve();
3544
3693
  init_terminal_workspaces();
3545
3694
  init_herdr_workspace_digest();
3546
3695
  init_broker_routes();
3547
3696
  init_rendezvous();
3548
3697
  });
3549
3698
 
3699
+ // ../runtime/src/sqlite-observation.ts
3700
+ import { createHash as createHash3 } from "crypto";
3701
+ function observeSqliteDatabase(database, options) {
3702
+ const configured = options.thresholdMs ?? Number(process.env.OPENSCOUT_SLOW_DB_MS ?? 100);
3703
+ const threshold = Number.isFinite(configured) && configured >= 0 ? configured : 100;
3704
+ if (threshold === 0)
3705
+ return database;
3706
+ const now = options.now ?? (() => performance.now());
3707
+ const emit = options.emit ?? ((event) => console.warn("[scout-db]", JSON.stringify(event)));
3708
+ const statements = new WeakMap;
3709
+ let windowStart = -Infinity;
3710
+ let emitted = 0;
3711
+ let suppressed = 0;
3712
+ function timed(operation, sql2, call) {
3713
+ const start = now();
3714
+ let outcome = "error";
3715
+ try {
3716
+ const result = call();
3717
+ outcome = "ok";
3718
+ return result;
3719
+ } finally {
3720
+ try {
3721
+ const end = now();
3722
+ const duration = end - start;
3723
+ if (duration >= threshold) {
3724
+ if (end - windowStart >= 60000) {
3725
+ windowStart = end;
3726
+ emitted = 0;
3727
+ }
3728
+ if (emitted >= 10) {
3729
+ suppressed += 1;
3730
+ } else {
3731
+ emitted += 1;
3732
+ const caller = (new Error().stack ?? "").split(`
3733
+ `).filter((line) => !/sqlite-observation\.(?:ts|js):/.test(line)).map((line) => line.match(/(?:packages|apps)\/[\w./-]+:\d+:\d+/)?.[0]).filter((line) => Boolean(line)).slice(0, 4);
3734
+ emit({
3735
+ event: "slow_sqlite",
3736
+ database: options.database,
3737
+ pid: process.pid,
3738
+ operation,
3739
+ queryId: createHash3("sha256").update(sql2).digest("hex").slice(0, 16),
3740
+ durationMs: Math.round(duration * 100) / 100,
3741
+ outcome,
3742
+ suppressed,
3743
+ caller
3744
+ });
3745
+ suppressed = 0;
3746
+ }
3747
+ }
3748
+ } catch {}
3749
+ }
3750
+ }
3751
+ function statementProxy(statement, sql2) {
3752
+ const existing = statements.get(statement);
3753
+ if (existing)
3754
+ return existing;
3755
+ const proxy = bindProxy(statement, (key, method, args) => {
3756
+ if (["all", "get", "run", "values"].includes(key)) {
3757
+ return timed(key, sql2, () => Reflect.apply(method, statement, args));
3758
+ }
3759
+ return Reflect.apply(method, statement, args);
3760
+ });
3761
+ statements.set(statement, proxy);
3762
+ return proxy;
3763
+ }
3764
+ return bindProxy(database, (key, method, args) => {
3765
+ if (["query", "prepare"].includes(key) && typeof args[0] === "string") {
3766
+ const sql2 = args[0];
3767
+ const statement = timed(`${key}.prepare`, sql2, () => Reflect.apply(method, database, args));
3768
+ return statementProxy(statement, sql2);
3769
+ }
3770
+ if (["exec", "run"].includes(key) && typeof args[0] === "string") {
3771
+ return timed(key, args[0], () => Reflect.apply(method, database, args));
3772
+ }
3773
+ return Reflect.apply(method, database, args);
3774
+ });
3775
+ }
3776
+ function bindProxy(target, invoke) {
3777
+ const methods = new Map;
3778
+ return new Proxy(target, {
3779
+ get(object, key) {
3780
+ const value = Reflect.get(object, key, object);
3781
+ if (typeof value !== "function" || key === "constructor")
3782
+ return value;
3783
+ const cached = methods.get(key);
3784
+ if (cached?.original === value)
3785
+ return cached.wrapped;
3786
+ const wrapped = (...args) => invoke(String(key), value, args);
3787
+ methods.set(key, { original: value, wrapped });
3788
+ return wrapped;
3789
+ }
3790
+ });
3791
+ }
3792
+ var init_sqlite_observation = () => {};
3793
+
3550
3794
  // ../runtime/src/runtime-adapters.ts
3551
3795
  function detectRuntimeHost(globalScope = globalThis) {
3552
3796
  return typeof globalScope.Bun === "undefined" ? "node" : "bun";
@@ -3612,13 +3856,13 @@ function openRuntimeSqliteDatabase(path2, options) {
3612
3856
  const adapter = controlPlaneSqliteAdapterKind();
3613
3857
  if (adapter === "bun-sqlite") {
3614
3858
  const { Database } = require2("bun:sqlite");
3615
- return new Database(path2, options);
3859
+ return observeSqliteDatabase(new Database(path2, options), { database: "runtime" });
3616
3860
  }
3617
3861
  const { DatabaseSync } = require2("node:sqlite");
3618
- return new NodeSqliteDatabaseAdapter(new DatabaseSync(path2, {
3862
+ return observeSqliteDatabase(new NodeSqliteDatabaseAdapter(new DatabaseSync(path2, {
3619
3863
  open: true,
3620
3864
  readOnly: options?.readonly === true
3621
- }));
3865
+ })), { database: "runtime" });
3622
3866
  }
3623
3867
  function prepareNodeSqliteSql(sql2) {
3624
3868
  const numberedParamIndexes = [];
@@ -3711,6 +3955,8 @@ class NodeSqliteDatabaseAdapter {
3711
3955
  }
3712
3956
  var require2;
3713
3957
  var init_sqlite_adapter = __esm(() => {
3958
+ init_sqlite_observation();
3959
+ init_sqlite_observation();
3714
3960
  require2 = createRequire(import.meta.url);
3715
3961
  });
3716
3962
 
@@ -12573,6 +12819,76 @@ var init_opencode_acp = __esm(() => {
12573
12819
  init_adapter4();
12574
12820
  });
12575
12821
 
12822
+ // ../agent-sessions/src/adapters/devin-acp/adapter.ts
12823
+ import { existsSync as existsSync18 } from "fs";
12824
+ import { homedir as homedir15 } from "os";
12825
+ import { join as join16 } from "path";
12826
+ function isRecord9(value) {
12827
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
12828
+ }
12829
+ function stringValue5(value) {
12830
+ return typeof value === "string" && value.trim() ? value.trim() : null;
12831
+ }
12832
+ function stringArray5(value) {
12833
+ if (!Array.isArray(value))
12834
+ return null;
12835
+ const entries = value.filter((entry) => typeof entry === "string");
12836
+ return entries.length === value.length ? entries : null;
12837
+ }
12838
+ function firstNonEmptyString4(...values) {
12839
+ for (const value of values) {
12840
+ const trimmed = value?.trim();
12841
+ if (trimmed)
12842
+ return trimmed;
12843
+ }
12844
+ return null;
12845
+ }
12846
+ function defaultDevinCommand(env) {
12847
+ const override = firstNonEmptyString4(env?.DEVIN_CLI_BIN, env?.OPENSCOUT_DEVIN_BIN, process.env.DEVIN_CLI_BIN, process.env.OPENSCOUT_DEVIN_BIN);
12848
+ if (override)
12849
+ return override;
12850
+ const installed = join16(homedir15(), ".local", "bin", "devin");
12851
+ return existsSync18(installed) ? installed : "devin";
12852
+ }
12853
+ function devinArgs(rawOptions) {
12854
+ const explicit = stringArray5(rawOptions.args);
12855
+ if (explicit)
12856
+ return explicit;
12857
+ const args = ["acp"];
12858
+ const model = stringValue5(rawOptions.model);
12859
+ if (model)
12860
+ args.push("--model", model);
12861
+ return args;
12862
+ }
12863
+ var DEVIN_ACP_ADAPTER_TYPE = "devin-acp", DEFAULT_DEVIN_STARTUP_TIMEOUT_MS = 60000, createAdapter5 = (config) => {
12864
+ const rawOptions = isRecord9(config.options) ? config.options : {};
12865
+ const command = stringValue5(rawOptions.command) ?? defaultDevinCommand(config.env);
12866
+ const args = devinArgs(rawOptions);
12867
+ const authMethodPreference = stringArray5(rawOptions.authMethodPreference) ?? [];
12868
+ return new AcpAdapter({
12869
+ ...config,
12870
+ options: {
12871
+ clientName: "openscout",
12872
+ clientTitle: "OpenScout",
12873
+ ...rawOptions,
12874
+ adapterType: DEVIN_ACP_ADAPTER_TYPE,
12875
+ command,
12876
+ args,
12877
+ startupTimeoutMs: typeof rawOptions.startupTimeoutMs === "number" ? rawOptions.startupTimeoutMs : DEFAULT_DEVIN_STARTUP_TIMEOUT_MS,
12878
+ requireAuth: typeof rawOptions.requireAuth === "boolean" ? rawOptions.requireAuth : false,
12879
+ authMethodPreference
12880
+ }
12881
+ });
12882
+ };
12883
+ var init_adapter5 = __esm(() => {
12884
+ init_adapter();
12885
+ });
12886
+
12887
+ // ../agent-sessions/src/adapters/devin-acp/index.ts
12888
+ var init_devin_acp = __esm(() => {
12889
+ init_adapter5();
12890
+ });
12891
+
12576
12892
  // ../agent-sessions/src/runtime/process.ts
12577
12893
  async function spawnHarnessProcess(command, args, options) {
12578
12894
  if (typeof Bun !== "undefined") {
@@ -12891,8 +13207,8 @@ function buildPiProcessEnv(config, sourceEnv = process.env) {
12891
13207
  }
12892
13208
  return env;
12893
13209
  }
12894
- var BASE_PROCESS_ENV_KEYS, PROVIDER_CREDENTIAL_ENV, MAX_PI_STDERR_CHARS = 4096, PiAdapter, createAdapter5 = (config) => new PiAdapter(config);
12895
- var init_adapter5 = __esm(() => {
13210
+ var BASE_PROCESS_ENV_KEYS, PROVIDER_CREDENTIAL_ENV, MAX_PI_STDERR_CHARS = 4096, PiAdapter, createAdapter6 = (config) => new PiAdapter(config);
13211
+ var init_adapter6 = __esm(() => {
12896
13212
  init_secret_redaction();
12897
13213
  BASE_PROCESS_ENV_KEYS = [
12898
13214
  "PATH",
@@ -13741,7 +14057,7 @@ var init_adapter5 = __esm(() => {
13741
14057
 
13742
14058
  // ../agent-sessions/src/adapters/pi/index.ts
13743
14059
  var init_pi = __esm(() => {
13744
- init_adapter5();
14060
+ init_adapter6();
13745
14061
  });
13746
14062
 
13747
14063
  // ../agent-sessions/src/buffer.ts
@@ -14397,9 +14713,9 @@ var init_registry2 = __esm(() => {
14397
14713
  });
14398
14714
 
14399
14715
  // ../agent-sessions/src/codex-launch-config.ts
14400
- import { accessSync as accessSync3, constants as constants3, existsSync as existsSync18 } from "fs";
14401
- import { homedir as homedir15 } from "os";
14402
- import { basename as basename7, delimiter as delimiter2, dirname as dirname11, join as join16, resolve as resolve9 } from "path";
14716
+ import { accessSync as accessSync3, constants as constants3, existsSync as existsSync19 } from "fs";
14717
+ import { homedir as homedir16 } from "os";
14718
+ import { basename as basename7, delimiter as delimiter2, dirname as dirname11, join as join17, resolve as resolve9 } from "path";
14403
14719
  import { fileURLToPath as fileURLToPath2 } from "url";
14404
14720
  function isExecutable2(filePath) {
14405
14721
  if (!filePath) {
@@ -14430,14 +14746,14 @@ function ancestorChain(start) {
14430
14746
  function resolveExecutableFromSearchPath(names2, env) {
14431
14747
  const pathEntries = (env.PATH ?? "").split(delimiter2).filter(Boolean);
14432
14748
  const commonDirectories = [
14433
- join16(homedir15(), ".local", "bin"),
14434
- join16(homedir15(), ".bun", "bin"),
14749
+ join17(homedir16(), ".local", "bin"),
14750
+ join17(homedir16(), ".bun", "bin"),
14435
14751
  "/opt/homebrew/bin",
14436
14752
  "/usr/local/bin"
14437
14753
  ];
14438
14754
  for (const directory of [...pathEntries, ...commonDirectories]) {
14439
14755
  for (const name2 of names2) {
14440
- const candidate = join16(directory, name2);
14756
+ const candidate = join17(directory, name2);
14441
14757
  if (isExecutable2(candidate)) {
14442
14758
  return candidate;
14443
14759
  }
@@ -14480,8 +14796,8 @@ function resolveRepoScoutScript(currentDirectory) {
14480
14796
  const starts = uniquePaths([currentDirectory, moduleDirectory]);
14481
14797
  for (const start of starts) {
14482
14798
  for (const candidate of ancestorChain(start)) {
14483
- const scriptPath = join16(candidate, "apps", "desktop", "bin", "scout.ts");
14484
- if (existsSync18(scriptPath)) {
14799
+ const scriptPath = join17(candidate, "apps", "desktop", "bin", "scout.ts");
14800
+ if (existsSync19(scriptPath)) {
14485
14801
  return scriptPath;
14486
14802
  }
14487
14803
  }
@@ -14533,7 +14849,7 @@ var init_codex_launch_config = () => {};
14533
14849
  // ../agent-sessions/src/local/transports/codex-app-server.ts
14534
14850
  import { spawn as spawn5 } from "child_process";
14535
14851
  import { appendFile, mkdir as mkdir3, readFile as readFile4, rm, stat as stat2, writeFile as writeFile3 } from "fs/promises";
14536
- import { join as join17 } from "path";
14852
+ import { join as join18 } from "path";
14537
14853
  function codexAppServerExitMessage(input) {
14538
14854
  if (input.exitKind === "proactive_shutdown") {
14539
14855
  return `Codex app-server session for ${input.agentName} was stopped by OpenScout` + (input.reason ? `: ${input.reason}` : "") + ".";
@@ -14851,7 +15167,7 @@ function parseCodexMaybeJson(value) {
14851
15167
  }
14852
15168
  }
14853
15169
  async function readCodexSessionCatalog(runtimeDirectory) {
14854
- const raw = await readOptionalFile(join17(runtimeDirectory, SESSION_CATALOG_FILENAME));
15170
+ const raw = await readOptionalFile(join18(runtimeDirectory, SESSION_CATALOG_FILENAME));
14855
15171
  if (!raw) {
14856
15172
  return { activeSessionId: null, sessions: [] };
14857
15173
  }
@@ -14866,7 +15182,7 @@ async function readCodexSessionCatalog(runtimeDirectory) {
14866
15182
  }
14867
15183
  async function writeCodexSessionCatalog(runtimeDirectory, catalog) {
14868
15184
  await mkdir3(runtimeDirectory, { recursive: true });
14869
- await writeFile3(join17(runtimeDirectory, SESSION_CATALOG_FILENAME), JSON.stringify(catalog, null, 2) + `
15185
+ await writeFile3(join18(runtimeDirectory, SESSION_CATALOG_FILENAME), JSON.stringify(catalog, null, 2) + `
14870
15186
  `);
14871
15187
  }
14872
15188
  async function recordCodexSessionCatalog(runtimeDirectory, threadId, input) {
@@ -14939,10 +15255,10 @@ class CodexAppServerTransport {
14939
15255
  errorListeners = new Set;
14940
15256
  constructor(options) {
14941
15257
  this.options = options;
14942
- this.threadIdPath = join17(options.runtimeDirectory, "codex-thread-id.txt");
14943
- this.statePath = join17(options.runtimeDirectory, "state.json");
14944
- this.stdoutLogPath = join17(options.logsDirectory, "stdout.log");
14945
- this.stderrLogPath = join17(options.logsDirectory, "stderr.log");
15258
+ this.threadIdPath = join18(options.runtimeDirectory, "codex-thread-id.txt");
15259
+ this.statePath = join18(options.runtimeDirectory, "state.json");
15260
+ this.stdoutLogPath = join18(options.logsDirectory, "stdout.log");
15261
+ this.stderrLogPath = join18(options.logsDirectory, "stderr.log");
14946
15262
  this.lastConfigSignature = this.configSignature(options);
14947
15263
  }
14948
15264
  get currentThreadId() {
@@ -15087,6 +15403,7 @@ class CodexAppServerTransport {
15087
15403
  });
15088
15404
  }
15089
15405
  async ensureStarted() {
15406
+ this.options.signal?.throwIfAborted();
15090
15407
  if (this.isAlive() && this.threadId) {
15091
15408
  return;
15092
15409
  }
@@ -15103,7 +15420,7 @@ class CodexAppServerTransport {
15103
15420
  async startSession() {
15104
15421
  await mkdir3(this.options.runtimeDirectory, { recursive: true });
15105
15422
  await mkdir3(this.options.logsDirectory, { recursive: true });
15106
- await writeFile3(join17(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
15423
+ await writeFile3(join18(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
15107
15424
  this.proactiveShutdown = null;
15108
15425
  try {
15109
15426
  await assertCodexWorkingDirectory(this.options.cwd, this.options.agentName);
@@ -15118,6 +15435,7 @@ class CodexAppServerTransport {
15118
15435
  });
15119
15436
  throw failure;
15120
15437
  }
15438
+ this.options.signal?.throwIfAborted();
15121
15439
  const codexExecutable = resolveCodexExecutable();
15122
15440
  const launchArgs = normalizeCodexAppServerLaunchArgs(this.options.launchArgs);
15123
15441
  const env = this.options.processEnv ?? mergeEnvironmentOverrides(process.env, this.options.env);
@@ -15501,13 +15819,17 @@ class CodexAppServerClient {
15501
15819
  return this.transport.ensureOnline();
15502
15820
  }
15503
15821
  async invoke(prompt, timeoutMs) {
15822
+ const onDelta = this.options.onDelta;
15823
+ const signal = this.options.signal;
15504
15824
  return this.enqueue(async () => {
15825
+ signal?.throwIfAborted();
15505
15826
  await this.transport.ensureOnline();
15827
+ signal?.throwIfAborted();
15506
15828
  if (!this.transport.currentThreadId) {
15507
15829
  throw new Error(`Codex app-server session for ${this.options.agentName} has no active thread.`);
15508
15830
  }
15509
15831
  const outputPromise = new Promise(async (resolve10, reject) => {
15510
- const turn = this.createActiveTurn(resolve10, reject);
15832
+ const turn = this.createActiveTurn(resolve10, reject, onDelta);
15511
15833
  try {
15512
15834
  const response = await this.transport.startTurn(prompt);
15513
15835
  turn.turnId = response.turn.id;
@@ -15524,8 +15846,12 @@ class CodexAppServerClient {
15524
15846
  });
15525
15847
  }
15526
15848
  async start(prompt) {
15849
+ const onDelta = this.options.onDelta;
15850
+ const signal = this.options.signal;
15527
15851
  return this.enqueue(async () => {
15852
+ signal?.throwIfAborted();
15528
15853
  await this.transport.ensureOnline();
15854
+ signal?.throwIfAborted();
15529
15855
  if (!this.transport.currentThreadId) {
15530
15856
  throw new Error(`Codex app-server session for ${this.options.agentName} has no active thread.`);
15531
15857
  }
@@ -15534,7 +15860,7 @@ class CodexAppServerClient {
15534
15860
  }
15535
15861
  let turn;
15536
15862
  const completion = new Promise((resolve10, reject) => {
15537
- turn = this.createActiveTurn(resolve10, reject);
15863
+ turn = this.createActiveTurn(resolve10, reject, onDelta);
15538
15864
  });
15539
15865
  completion.catch(() => {
15540
15866
  return;
@@ -15631,11 +15957,12 @@ class CodexAppServerClient {
15631
15957
  });
15632
15958
  return next;
15633
15959
  }
15634
- createActiveTurn(resolve10, reject) {
15960
+ createActiveTurn(resolve10, reject, onDelta) {
15635
15961
  if (this.activeTurn) {
15636
15962
  throw new Error(`Codex app-server session for ${this.options.agentName} already has an active turn.`);
15637
15963
  }
15638
15964
  const turn = {
15965
+ onDelta,
15639
15966
  turnId: "",
15640
15967
  startedAt: Date.now(),
15641
15968
  messageOrder: [],
@@ -15712,6 +16039,8 @@ class CodexAppServerClient {
15712
16039
  this.activeTurn.messageByItemId.set(itemId, "");
15713
16040
  }
15714
16041
  this.activeTurn.messageByItemId.set(itemId, (this.activeTurn.messageByItemId.get(itemId) ?? "") + delta);
16042
+ if (delta)
16043
+ this.activeTurn.onDelta?.(delta);
15715
16044
  return;
15716
16045
  }
15717
16046
  if (method === "item/completed") {
@@ -15855,9 +16184,9 @@ async function shutdownCodexAppServerLocalAgent(options, shutdownOptions = {}) {
15855
16184
  const session = codexAppServerClients.get(key);
15856
16185
  if (!session) {
15857
16186
  if (shutdownOptions.resetThread) {
15858
- const threadId = await readOptionalFile(join17(options.runtimeDirectory, "codex-thread-id.txt"));
16187
+ const threadId = await readOptionalFile(join18(options.runtimeDirectory, "codex-thread-id.txt"));
15859
16188
  await closeCodexSessionCatalog(options.runtimeDirectory, threadId);
15860
- await rm(join17(options.runtimeDirectory, "codex-thread-id.txt"), { force: true });
16189
+ await rm(join18(options.runtimeDirectory, "codex-thread-id.txt"), { force: true });
15861
16190
  }
15862
16191
  return;
15863
16192
  }
@@ -15982,6 +16311,11 @@ var init_opencode_acp_invocation = __esm(() => {
15982
16311
  init_acp_agent_invocation();
15983
16312
  });
15984
16313
 
16314
+ // ../runtime/src/devin-acp-invocation.ts
16315
+ var init_devin_acp_invocation = __esm(() => {
16316
+ init_acp_agent_invocation();
16317
+ });
16318
+
15985
16319
  // ../runtime/src/managed-agent-environment.ts
15986
16320
  function managedAgentEnvironmentEntries(options) {
15987
16321
  const agentName = options.agentName.trim();
@@ -16010,8 +16344,8 @@ function buildManagedAgentShellExports(options) {
16010
16344
  import { randomUUID as randomUUID2 } from "crypto";
16011
16345
  import { spawn as spawn6 } from "child_process";
16012
16346
  import { appendFile as appendFile2, mkdir as mkdir4, readFile as readFile5, writeFile as writeFile4 } from "fs/promises";
16013
- import { existsSync as existsSync19, readFileSync as readFileSync8 } from "fs";
16014
- import { join as join18 } from "path";
16347
+ import { existsSync as existsSync20, readFileSync as readFileSync8 } from "fs";
16348
+ import { join as join19 } from "path";
16015
16349
  function resolveRequesterTimeoutMs2(timeoutMs) {
16016
16350
  if (typeof timeoutMs === "number" && Number.isFinite(timeoutMs) && timeoutMs > 0) {
16017
16351
  return timeoutMs;
@@ -16062,11 +16396,11 @@ function errorMessage4(error) {
16062
16396
  return error instanceof Error ? error.message : String(error);
16063
16397
  }
16064
16398
  function readSessionCatalogSync(runtimeDirectory) {
16065
- const catalogPath = join18(runtimeDirectory, SESSION_CATALOG_FILENAME2);
16399
+ const catalogPath = join19(runtimeDirectory, SESSION_CATALOG_FILENAME2);
16066
16400
  try {
16067
- if (!existsSync19(catalogPath)) {
16068
- const legacyPath = join18(runtimeDirectory, "claude-session-id.txt");
16069
- if (existsSync19(legacyPath)) {
16401
+ if (!existsSync20(catalogPath)) {
16402
+ const legacyPath = join19(runtimeDirectory, "claude-session-id.txt");
16403
+ if (existsSync20(legacyPath)) {
16070
16404
  const legacyId = readFileSync8(legacyPath, "utf8").trim();
16071
16405
  if (legacyId) {
16072
16406
  return {
@@ -16093,7 +16427,7 @@ async function readSessionCatalog(runtimeDirectory) {
16093
16427
  return readSessionCatalogSync(runtimeDirectory);
16094
16428
  }
16095
16429
  async function writeSessionCatalog(runtimeDirectory, catalog) {
16096
- const catalogPath = join18(runtimeDirectory, SESSION_CATALOG_FILENAME2);
16430
+ const catalogPath = join19(runtimeDirectory, SESSION_CATALOG_FILENAME2);
16097
16431
  await mkdir4(runtimeDirectory, { recursive: true });
16098
16432
  await writeFile4(catalogPath, JSON.stringify(catalog, null, 2) + `
16099
16433
  `);
@@ -16126,8 +16460,8 @@ class ClaudeStreamJsonSession {
16126
16460
  constructor(options) {
16127
16461
  this.options = options;
16128
16462
  this.catalogDirectory = options.runtimeDirectory;
16129
- this.stdoutLogPath = join18(options.logsDirectory, "stdout.log");
16130
- this.stderrLogPath = join18(options.logsDirectory, "stderr.log");
16463
+ this.stdoutLogPath = join19(options.logsDirectory, "stdout.log");
16464
+ this.stderrLogPath = join19(options.logsDirectory, "stderr.log");
16131
16465
  this.lastConfigSignature = this.configSignature(options);
16132
16466
  }
16133
16467
  matches(options) {
@@ -16283,7 +16617,7 @@ class ClaudeStreamJsonSession {
16283
16617
  async startSession() {
16284
16618
  await mkdir4(this.options.runtimeDirectory, { recursive: true });
16285
16619
  await mkdir4(this.options.logsDirectory, { recursive: true });
16286
- await writeFile4(join18(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
16620
+ await writeFile4(join19(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
16287
16621
  const catalog = await readSessionCatalog(this.catalogDirectory);
16288
16622
  this.claudeSessionId = catalog.activeSessionId;
16289
16623
  this.resumedSessionId = this.claudeSessionId;
@@ -16468,13 +16802,13 @@ var init_claude_stream_json = __esm(() => {
16468
16802
  });
16469
16803
 
16470
16804
  // ../agent-sessions/src/adapters/codex/topology.ts
16471
- import { existsSync as existsSync20, readdirSync as readdirSync2, readFileSync as readFileSync9, statSync as statSync4 } from "fs";
16472
- import { homedir as homedir16 } from "os";
16473
- import { basename as basename8, join as join19 } from "path";
16805
+ import { existsSync as existsSync21, readdirSync as readdirSync2, readFileSync as readFileSync9, statSync as statSync4 } from "fs";
16806
+ import { homedir as homedir17 } from "os";
16807
+ import { basename as basename8, join as join20 } from "path";
16474
16808
  function isObject(value) {
16475
16809
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
16476
16810
  }
16477
- function stringValue5(value) {
16811
+ function stringValue6(value) {
16478
16812
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
16479
16813
  }
16480
16814
  function numberValue2(value) {
@@ -16594,15 +16928,15 @@ function readTomlKeyValues(path2) {
16594
16928
  }
16595
16929
  function firstString(record, keys) {
16596
16930
  for (const key of keys) {
16597
- const value = stringValue5(record[key]);
16931
+ const value = stringValue6(record[key]);
16598
16932
  if (value)
16599
16933
  return value;
16600
16934
  }
16601
16935
  return;
16602
16936
  }
16603
16937
  function readAgentDefinitions(root, scope) {
16604
- const agentsDir = join19(root, ".codex", "agents");
16605
- if (!existsSync20(agentsDir) || !statIsDirectory(agentsDir)) {
16938
+ const agentsDir = join20(root, ".codex", "agents");
16939
+ if (!existsSync21(agentsDir) || !statIsDirectory(agentsDir)) {
16606
16940
  return { agents: [], sourceRefs: [] };
16607
16941
  }
16608
16942
  const agents = [];
@@ -16610,7 +16944,7 @@ function readAgentDefinitions(root, scope) {
16610
16944
  for (const entry of readdirSync2(agentsDir).sort()) {
16611
16945
  if (!entry.endsWith(".toml"))
16612
16946
  continue;
16613
- const path2 = join19(agentsDir, entry);
16947
+ const path2 = join20(agentsDir, entry);
16614
16948
  if (!statIsFile(path2))
16615
16949
  continue;
16616
16950
  const parsed = readTomlKeyValues(path2);
@@ -16649,8 +16983,8 @@ function readAgentDefinitions(root, scope) {
16649
16983
  function readProjectAgentsConfig(cwd) {
16650
16984
  if (!cwd)
16651
16985
  return {};
16652
- const configPath = join19(cwd, ".codex", "config.toml");
16653
- if (!existsSync20(configPath) || !statIsFile(configPath)) {
16986
+ const configPath = join20(cwd, ".codex", "config.toml");
16987
+ if (!existsSync21(configPath) || !statIsFile(configPath)) {
16654
16988
  return {};
16655
16989
  }
16656
16990
  const parsed = readTomlKeyValues(configPath);
@@ -16683,7 +17017,7 @@ function taskStateFromStatus(value, fallback = "running") {
16683
17017
  if (typeof value === "string" && value.trim())
16684
17018
  return value.trim();
16685
17019
  if (isObject(value)) {
16686
- const nested = stringValue5(value.type) ?? stringValue5(value.status);
17020
+ const nested = stringValue6(value.type) ?? stringValue6(value.status);
16687
17021
  if (nested)
16688
17022
  return nested;
16689
17023
  }
@@ -16709,14 +17043,14 @@ class CodexObservedTopologyTracker {
16709
17043
  this.threadPath = options.threadPath?.trim() || null;
16710
17044
  this.cwd = options.cwd;
16711
17045
  this.sessionName = options.sessionName;
16712
- this.homeDir = options.homeDir ?? homedir16();
17046
+ this.homeDir = options.homeDir ?? homedir17();
16713
17047
  this.now = options.now ?? (() => new Date);
16714
17048
  }
16715
17049
  updateThread(thread) {
16716
- const threadId = stringValue5(thread.id);
16717
- const threadPath = stringValue5(thread.path);
16718
- const cwd = stringValue5(thread.cwd);
16719
- const name2 = stringValue5(thread.name);
17050
+ const threadId = stringValue6(thread.id);
17051
+ const threadPath = stringValue6(thread.path);
17052
+ const cwd = stringValue6(thread.cwd);
17053
+ const name2 = stringValue6(thread.name);
16720
17054
  if (threadId)
16721
17055
  this.threadId = threadId;
16722
17056
  if (threadPath)
@@ -16727,7 +17061,7 @@ class CodexObservedTopologyTracker {
16727
17061
  this.sessionName = name2;
16728
17062
  }
16729
17063
  observeItem(item, phase) {
16730
- const type = stringValue5(item.type);
17064
+ const type = stringValue6(item.type);
16731
17065
  if (!type)
16732
17066
  return false;
16733
17067
  if (type === "subagent") {
@@ -16916,7 +17250,7 @@ var OBSERVED_HARNESS_TOPOLOGY_META_KEY = "observedTopology";
16916
17250
 
16917
17251
  // ../runtime/src/codex-app-server.ts
16918
17252
  import { lstat, mkdir as mkdir5, readFile as readFile6, symlink } from "fs/promises";
16919
- import { join as join20 } from "path";
17253
+ import { join as join21 } from "path";
16920
17254
  function isCodexThreadGlobalMessage(message) {
16921
17255
  const result = message.result;
16922
17256
  const thread = result?.thread;
@@ -17761,7 +18095,7 @@ async function prepareManagedCodexAuthentication(options) {
17761
18095
  const authSource = options.env?.OPENSCOUT_CODEX_AUTH_SOURCE?.trim();
17762
18096
  if (!codexHome || !authSource || options.env?.OPENAI_API_KEY?.trim() || process.env.OPENAI_API_KEY?.trim())
17763
18097
  return;
17764
- const authTarget = join20(codexHome, "auth.json");
18098
+ const authTarget = join21(codexHome, "auth.json");
17765
18099
  try {
17766
18100
  await lstat(authTarget);
17767
18101
  return;
@@ -17805,9 +18139,9 @@ function isCodexAppServerAgentAlive(options) {
17805
18139
  return isCodexAppServerLocalAgentAlive(options);
17806
18140
  }
17807
18141
  async function getCodexAppServerAgentSnapshot(options) {
17808
- const stdoutLogPath = join20(options.logsDirectory, "stdout.log");
17809
- const threadIdPath = join20(options.runtimeDirectory, "codex-thread-id.txt");
17810
- const statePath = join20(options.runtimeDirectory, "state.json");
18142
+ const stdoutLogPath = join21(options.logsDirectory, "stdout.log");
18143
+ const threadIdPath = join21(options.runtimeDirectory, "codex-thread-id.txt");
18144
+ const statePath = join21(options.runtimeDirectory, "state.json");
17811
18145
  const [rawLog, persistedThreadId, persistedState] = await Promise.all([
17812
18146
  readOptionalFile2(stdoutLogPath),
17813
18147
  readOptionalFile2(threadIdPath),
@@ -17874,11 +18208,11 @@ function buildCollaborationContractPrompt(agentId) {
17874
18208
  }
17875
18209
 
17876
18210
  // ../runtime/src/pi-rpc.ts
17877
- import { existsSync as existsSync21, readFileSync as readFileSync10, statSync as statSync5 } from "fs";
18211
+ import { existsSync as existsSync22, readFileSync as readFileSync10, statSync as statSync5 } from "fs";
17878
18212
  import { mkdir as mkdir6, writeFile as writeFile5 } from "fs/promises";
17879
18213
  import { execFileSync as execFileSync4 } from "child_process";
17880
- import { homedir as homedir17 } from "os";
17881
- import { join as join21 } from "path";
18214
+ import { homedir as homedir18 } from "os";
18215
+ import { join as join22 } from "path";
17882
18216
  function normalizeOptionalString(value) {
17883
18217
  const trimmed = value?.trim();
17884
18218
  return trimmed ? trimmed : undefined;
@@ -17899,7 +18233,7 @@ function resolveDefaultPiScoutExtension() {
17899
18233
  return null;
17900
18234
  }
17901
18235
  for (const candidate of PI_SCOUT_EXTENSION_CANDIDATES) {
17902
- if (existsSync21(candidate)) {
18236
+ if (existsSync22(candidate)) {
17903
18237
  return candidate;
17904
18238
  }
17905
18239
  }
@@ -17938,7 +18272,7 @@ function readPiRpcCredentialFile(name2, options = {}) {
17938
18272
  }
17939
18273
  const env = options.env ?? process.env;
17940
18274
  const platform = options.platform ?? process.platform;
17941
- const directory = normalizeOptionalString(env.CREDENTIALS_DIRECTORY) ?? normalizeOptionalString(env.OPENSCOUT_CREDENTIALS_DIRECTORY) ?? (platform === "linux" ? join21(normalizeOptionalString(env.XDG_CONFIG_HOME) ?? join21(options.homedir ?? homedir17(), ".config"), "openscout", "credentials") : undefined);
18275
+ const directory = normalizeOptionalString(env.CREDENTIALS_DIRECTORY) ?? normalizeOptionalString(env.OPENSCOUT_CREDENTIALS_DIRECTORY) ?? (platform === "linux" ? join22(normalizeOptionalString(env.XDG_CONFIG_HOME) ?? join22(options.homedir ?? homedir18(), ".config"), "openscout", "credentials") : undefined);
17942
18276
  if (!directory) {
17943
18277
  return;
17944
18278
  }
@@ -17947,7 +18281,7 @@ function readPiRpcCredentialFile(name2, options = {}) {
17947
18281
  if (!directoryStat.isDirectory() || (directoryStat.mode & 63) !== 0) {
17948
18282
  return;
17949
18283
  }
17950
- const path2 = join21(directory, name2);
18284
+ const path2 = join22(directory, name2);
17951
18285
  const stat3 = statSync5(path2);
17952
18286
  if (!stat3.isFile() || (stat3.mode & 63) !== 0 || stat3.size > 16 * 1024) {
17953
18287
  return;
@@ -18010,7 +18344,7 @@ function parsePiRpcLaunchArgs(launchArgs, options) {
18010
18344
  const parsed = {
18011
18345
  extensions: [],
18012
18346
  extraArgs: [],
18013
- sessionDir: join21(options.runtimeDirectory, "pi-sessions")
18347
+ sessionDir: join22(options.runtimeDirectory, "pi-sessions")
18014
18348
  };
18015
18349
  for (let index2 = 0;index2 < launchArgs.length; index2 += 1) {
18016
18350
  const current = launchArgs[index2] ?? "";
@@ -18129,11 +18463,11 @@ class PiRpcAgentSession {
18129
18463
  }
18130
18464
  await mkdir6(this.options.runtimeDirectory, { recursive: true });
18131
18465
  await mkdir6(this.options.logsDirectory, { recursive: true });
18132
- await writeFile5(join21(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
18466
+ await writeFile5(join22(this.options.runtimeDirectory, "prompt.txt"), this.options.systemPrompt);
18133
18467
  const launch = parsePiRpcLaunchArgs(this.options.launchArgs, {
18134
18468
  runtimeDirectory: this.options.runtimeDirectory
18135
18469
  });
18136
- const adapter = createAdapter5({
18470
+ const adapter = createAdapter6({
18137
18471
  sessionId: this.options.sessionId,
18138
18472
  name: `${this.options.agentName} Pi RPC`,
18139
18473
  cwd: this.options.cwd,
@@ -18290,8 +18624,8 @@ var init_pi_rpc = __esm(() => {
18290
18624
  init_pi();
18291
18625
  PI_SCOUT_EXTENSION_CANDIDATES = [
18292
18626
  process.env.OPENSCOUT_PI_SCOUT_EXTENSION_PATH,
18293
- join21(homedir17(), ".pi", "agent", "extensions", "pi-scout"),
18294
- join21(homedir17(), "dev", "pi-scout")
18627
+ join22(homedir18(), ".pi", "agent", "extensions", "pi-scout"),
18628
+ join22(homedir18(), "dev", "pi-scout")
18295
18629
  ].filter((candidate) => Boolean(candidate));
18296
18630
  PI_RPC_FLAGS_WITH_VALUES = new Set([
18297
18631
  "--model",
@@ -19321,8 +19655,8 @@ var init_managed_installs = __esm(() => {
19321
19655
 
19322
19656
  // ../runtime/src/user-project-hints.ts
19323
19657
  import { readdir as readdir2, readFile as readFile7, stat as stat3 } from "fs/promises";
19324
- import { homedir as homedir18 } from "os";
19325
- import { dirname as dirname12, join as join22, resolve as resolve10 } from "path";
19658
+ import { homedir as homedir19 } from "os";
19659
+ import { dirname as dirname12, join as join23, resolve as resolve10 } from "path";
19326
19660
  import { fileURLToPath as fileURLToPath3 } from "url";
19327
19661
  function decodeClaudeProjectsSlug(name2) {
19328
19662
  if (!name2 || name2 === "." || name2 === "..") {
@@ -19369,7 +19703,7 @@ async function findLikelyProjectRoot(absolutePath) {
19369
19703
  let lastCandidate = null;
19370
19704
  while (true) {
19371
19705
  for (const marker of PROJECT_HINT_MARKERS) {
19372
- if (await pathExists(join22(current, marker))) {
19706
+ if (await pathExists(join23(current, marker))) {
19373
19707
  lastCandidate = current;
19374
19708
  if (marker === ".git" || marker === ".openscout/project.json") {
19375
19709
  return current;
@@ -19392,16 +19726,16 @@ async function appendPathHint(pathLike, roots) {
19392
19726
  }
19393
19727
  function cursorWorkspaceStoragePath(home) {
19394
19728
  if (process.platform === "darwin") {
19395
- return join22(home, "Library", "Application Support", "Cursor", "User", "workspaceStorage");
19729
+ return join23(home, "Library", "Application Support", "Cursor", "User", "workspaceStorage");
19396
19730
  }
19397
19731
  if (process.platform === "win32") {
19398
19732
  const appData = process.env.APPDATA;
19399
19733
  if (appData) {
19400
- return join22(appData, "Cursor", "User", "workspaceStorage");
19734
+ return join23(appData, "Cursor", "User", "workspaceStorage");
19401
19735
  }
19402
- return join22(home, "AppData", "Roaming", "Cursor", "User", "workspaceStorage");
19736
+ return join23(home, "AppData", "Roaming", "Cursor", "User", "workspaceStorage");
19403
19737
  }
19404
- return join22(home, ".config", "Cursor", "User", "workspaceStorage");
19738
+ return join23(home, ".config", "Cursor", "User", "workspaceStorage");
19405
19739
  }
19406
19740
  function collectPathLikeStrings(value, out, depth) {
19407
19741
  if (depth > 4 || value === null || value === undefined) {
@@ -19430,7 +19764,7 @@ function collectPathLikeStrings(value, out, depth) {
19430
19764
  }
19431
19765
  }
19432
19766
  async function appendCodexHistoryPaths(home, roots) {
19433
- const candidates = [join22(home, ".codex", "history.jsonl"), join22(home, ".openai-codex", "history.jsonl")];
19767
+ const candidates = [join23(home, ".codex", "history.jsonl"), join23(home, ".openai-codex", "history.jsonl")];
19434
19768
  const maxLines = 2500;
19435
19769
  const maxBytes = 4 * 1024 * 1024;
19436
19770
  for (const filePath of candidates) {
@@ -19481,7 +19815,7 @@ async function appendCursorWorkspacePaths(home, roots) {
19481
19815
  return;
19482
19816
  }
19483
19817
  for (const id of ids) {
19484
- const workspaceJsonPath = join22(base, id, "workspace.json");
19818
+ const workspaceJsonPath = join23(base, id, "workspace.json");
19485
19819
  let raw;
19486
19820
  try {
19487
19821
  raw = await readFile7(workspaceJsonPath, "utf8");
@@ -19530,7 +19864,7 @@ async function appendCursorWorkspacePaths(home, roots) {
19530
19864
  }
19531
19865
  }
19532
19866
  async function appendClaudeProjectSlugs(home, roots) {
19533
- const projectsDir = join22(home, ".claude", "projects");
19867
+ const projectsDir = join23(home, ".claude", "projects");
19534
19868
  let names2 = [];
19535
19869
  try {
19536
19870
  names2 = await readdir2(projectsDir, { withFileTypes: false });
@@ -19546,7 +19880,7 @@ async function appendClaudeProjectSlugs(home, roots) {
19546
19880
  }
19547
19881
  }
19548
19882
  async function appendClaudeSessionPaths(home, roots) {
19549
- const projectsDir = join22(home, ".claude", "projects");
19883
+ const projectsDir = join23(home, ".claude", "projects");
19550
19884
  const maxProjectDirectories = 200;
19551
19885
  const maxSessionFiles = 400;
19552
19886
  const maxLinesPerFile = 400;
@@ -19561,7 +19895,7 @@ async function appendClaudeSessionPaths(home, roots) {
19561
19895
  for (const projectName of projectNames) {
19562
19896
  let entries = [];
19563
19897
  try {
19564
- entries = await readdir2(join22(projectsDir, projectName), { withFileTypes: false });
19898
+ entries = await readdir2(join23(projectsDir, projectName), { withFileTypes: false });
19565
19899
  } catch {
19566
19900
  continue;
19567
19901
  }
@@ -19572,7 +19906,7 @@ async function appendClaudeSessionPaths(home, roots) {
19572
19906
  if (!entry.endsWith(".jsonl")) {
19573
19907
  continue;
19574
19908
  }
19575
- const sessionPath = join22(projectsDir, projectName, entry);
19909
+ const sessionPath = join23(projectsDir, projectName, entry);
19576
19910
  let info;
19577
19911
  try {
19578
19912
  info = await stat3(sessionPath);
@@ -19614,7 +19948,7 @@ async function appendClaudeSessionPaths(home, roots) {
19614
19948
  }
19615
19949
  }
19616
19950
  async function collectUserLevelProjectRootHints(options = {}) {
19617
- const home = options.home ?? homedir18();
19951
+ const home = options.home ?? homedir19();
19618
19952
  const roots = new Set;
19619
19953
  try {
19620
19954
  await appendClaudeProjectSlugs(home, roots);
@@ -19646,10 +19980,10 @@ var init_user_project_hints = __esm(() => {
19646
19980
 
19647
19981
  // ../runtime/src/setup.ts
19648
19982
  import { execFileSync as execFileSync5 } from "child_process";
19649
- import { existsSync as existsSync22, readFileSync as readFileSync11 } from "fs";
19983
+ import { existsSync as existsSync23, readFileSync as readFileSync11 } from "fs";
19650
19984
  import { access, chmod, mkdir as mkdir7, readdir as readdir3, readFile as readFile8, realpath, rm as rm3, stat as stat4, writeFile as writeFile6 } from "fs/promises";
19651
- import { homedir as homedir19, hostname, userInfo } from "os";
19652
- import { basename as basename9, dirname as dirname13, isAbsolute as isAbsolute2, join as join23, relative as relative2, resolve as resolve11 } from "path";
19985
+ import { homedir as homedir20, hostname, userInfo } from "os";
19986
+ import { basename as basename9, dirname as dirname13, isAbsolute as isAbsolute2, join as join24, relative as relative2, resolve as resolve11 } from "path";
19653
19987
  import { fileURLToPath as fileURLToPath4 } from "url";
19654
19988
  function titleCaseWords(value) {
19655
19989
  return value.split(/[\s._-]+/).map((part) => part.trim()).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
@@ -19705,7 +20039,7 @@ async function matchNestedMarkers(projectRoot, nestedMarkers) {
19705
20039
  if (nestedMarkers.length === 0) {
19706
20040
  return [];
19707
20041
  }
19708
- const hits = await Promise.all(nestedMarkers.map(async (marker) => await pathExists2(join23(projectRoot, marker)) ? marker : null));
20042
+ const hits = await Promise.all(nestedMarkers.map(async (marker) => await pathExists2(join24(projectRoot, marker)) ? marker : null));
19709
20043
  return hits.filter((marker) => Boolean(marker));
19710
20044
  }
19711
20045
  function nowSeconds() {
@@ -19713,10 +20047,10 @@ function nowSeconds() {
19713
20047
  }
19714
20048
  function expandHomePath3(value) {
19715
20049
  if (value === "~") {
19716
- return homedir19();
20050
+ return homedir20();
19717
20051
  }
19718
20052
  if (value.startsWith("~/")) {
19719
- return join23(homedir19(), value.slice(2));
20053
+ return join24(homedir20(), value.slice(2));
19720
20054
  }
19721
20055
  return value;
19722
20056
  }
@@ -19754,6 +20088,9 @@ function normalizeManagedHarness(value, fallback) {
19754
20088
  if (value === "cursor") {
19755
20089
  return "cursor";
19756
20090
  }
20091
+ if (value === "devin") {
20092
+ return "devin";
20093
+ }
19757
20094
  if (value === "grok") {
19758
20095
  return "grok";
19759
20096
  }
@@ -19823,16 +20160,16 @@ function resolveTelegramConfigSeedValue(key, currentDirectory) {
19823
20160
  return envValue;
19824
20161
  }
19825
20162
  if (currentDirectory) {
19826
- const currentDirValue = readEnvFileValue(join23(currentDirectory, ".env.local"), key).trim();
20163
+ const currentDirValue = readEnvFileValue(join24(currentDirectory, ".env.local"), key).trim();
19827
20164
  if (currentDirValue) {
19828
20165
  return currentDirValue;
19829
20166
  }
19830
20167
  }
19831
- const home = homedir19();
20168
+ const home = homedir20();
19832
20169
  if (!home) {
19833
20170
  return "";
19834
20171
  }
19835
- return readEnvFileValue(join23(home, ".env.local"), key).trim();
20172
+ return readEnvFileValue(join24(home, ".env.local"), key).trim();
19836
20173
  }
19837
20174
  function normalizeTelegramBridgeMode(value) {
19838
20175
  const normalized = typeof value === "string" ? value.trim().toLowerCase() : "";
@@ -19875,7 +20212,7 @@ function readNodeAliasSync() {
19875
20212
  }
19876
20213
  }
19877
20214
  function readGitHeadBranch(projectRoot) {
19878
- const dotGitPath = join23(projectRoot, ".git");
20215
+ const dotGitPath = join24(projectRoot, ".git");
19879
20216
  let gitDirectory = dotGitPath;
19880
20217
  try {
19881
20218
  const marker = readFileSync11(dotGitPath, "utf8");
@@ -19885,7 +20222,7 @@ function readGitHeadBranch(projectRoot) {
19885
20222
  gitDirectory = isAbsolute2(match[1]) ? match[1] : resolve11(projectRoot, match[1]);
19886
20223
  } catch {}
19887
20224
  try {
19888
- const head = readFileSync11(join23(gitDirectory, "HEAD"), "utf8").trim();
20225
+ const head = readFileSync11(join24(gitDirectory, "HEAD"), "utf8").trim();
19889
20226
  const match = /^ref:\s*refs\/heads\/(.+)$/u.exec(head);
19890
20227
  return { found: true, branch: match?.[1]?.trim() || null };
19891
20228
  } catch {
@@ -19972,6 +20309,9 @@ function normalizeTransport(value, harness, fallback) {
19972
20309
  if (harness === "cursor") {
19973
20310
  return "cursor_acp";
19974
20311
  }
20312
+ if (harness === "devin") {
20313
+ return "devin_acp";
20314
+ }
19975
20315
  if (harness === "opencode") {
19976
20316
  return "opencode_acp";
19977
20317
  }
@@ -19987,7 +20327,7 @@ function normalizeTransport(value, harness, fallback) {
19987
20327
  if (value === "pi_rpc") {
19988
20328
  return "pi_rpc";
19989
20329
  }
19990
- if (value === "grok_acp" || value === "kimi_acp" || value === "cursor_acp" || value === "opencode_acp") {
20330
+ if (value === "grok_acp" || value === "kimi_acp" || value === "cursor_acp" || value === "opencode_acp" || value === "devin_acp") {
19991
20331
  return value;
19992
20332
  }
19993
20333
  if (value === "cursor_exec") {
@@ -20168,13 +20508,13 @@ function defaultSettings() {
20168
20508
  };
20169
20509
  }
20170
20510
  function projectConfigPath(projectRoot) {
20171
- return join23(projectRoot, ".openscout", "project.json");
20511
+ return join24(projectRoot, ".openscout", "project.json");
20172
20512
  }
20173
20513
  function projectGitignorePath(projectRoot) {
20174
- return join23(projectRoot, ".gitignore");
20514
+ return join24(projectRoot, ".gitignore");
20175
20515
  }
20176
20516
  function legacyLocalRelayLinkPath(projectRoot) {
20177
- return join23(projectRoot, ".openscout", "relay.json");
20517
+ return join24(projectRoot, ".openscout", "relay.json");
20178
20518
  }
20179
20519
  async function pathExists2(filePath) {
20180
20520
  try {
@@ -20205,10 +20545,10 @@ async function writeJsonFile(filePath, value) {
20205
20545
  `, "utf8");
20206
20546
  }
20207
20547
  function codexEnvironmentPath(projectRoot) {
20208
- return join23(projectRoot, ".codex", "environments", "environment.toml");
20548
+ return join24(projectRoot, ".codex", "environments", "environment.toml");
20209
20549
  }
20210
20550
  function currentHomeDirectory() {
20211
- return process.env.HOME?.trim() || homedir19();
20551
+ return process.env.HOME?.trim() || homedir20();
20212
20552
  }
20213
20553
  function normalizeProjectScriptSet(value) {
20214
20554
  if (typeof value !== "object" || !value) {
@@ -20364,11 +20704,11 @@ async function readCodexEnvironmentImport(projectRoot) {
20364
20704
  }
20365
20705
  async function readClaudeProjectImport(projectRoot) {
20366
20706
  const slug = encodeClaudeProjectsSlug(projectRoot);
20367
- const sourcePath = join23(currentHomeDirectory(), ".claude", "projects", slug);
20707
+ const sourcePath = join24(currentHomeDirectory(), ".claude", "projects", slug);
20368
20708
  if (!await isDirectory(sourcePath)) {
20369
20709
  return null;
20370
20710
  }
20371
- const memoryPath = await pathExists2(join23(sourcePath, "memory", "MEMORY.md")) ? join23(sourcePath, "memory", "MEMORY.md") : undefined;
20711
+ const memoryPath = await pathExists2(join24(sourcePath, "memory", "MEMORY.md")) ? join24(sourcePath, "memory", "MEMORY.md") : undefined;
20372
20712
  let entries = [];
20373
20713
  try {
20374
20714
  entries = await readdir3(sourcePath, { withFileTypes: false });
@@ -20383,7 +20723,7 @@ async function readClaudeProjectImport(projectRoot) {
20383
20723
  continue;
20384
20724
  }
20385
20725
  sessionCount += 1;
20386
- const sessionPath = join23(sourcePath, entry);
20726
+ const sessionPath = join24(sourcePath, entry);
20387
20727
  let body;
20388
20728
  try {
20389
20729
  body = await readFile8(sessionPath, "utf8");
@@ -20498,17 +20838,18 @@ async function ensureProjectConfigIgnored(projectRoot) {
20498
20838
  }
20499
20839
  async function readLegacyRelayConfig() {
20500
20840
  const relayHub = resolveOpenScoutSupportPaths().relayHubDirectory;
20501
- return readJsonFile(join23(relayHub, "config.json"));
20841
+ return readJsonFile(join24(relayHub, "config.json"));
20502
20842
  }
20503
20843
  async function readLegacyAgentRegistry() {
20504
20844
  const relayHub = resolveOpenScoutSupportPaths().relayHubDirectory;
20505
- return await readJsonFile(join23(relayHub, "agents.json")) ?? {};
20845
+ return await readJsonFile(join24(relayHub, "agents.json")) ?? {};
20506
20846
  }
20507
20847
  async function detectHarnessMarkers(projectRoot) {
20508
20848
  const detected = {
20509
20849
  claude: [],
20510
20850
  codex: [],
20511
20851
  cursor: [],
20852
+ devin: [],
20512
20853
  grok: [],
20513
20854
  "grok-acp": [],
20514
20855
  kimi: [],
@@ -20517,7 +20858,7 @@ async function detectHarnessMarkers(projectRoot) {
20517
20858
  };
20518
20859
  for (const harness of MANAGED_AGENT_HARNESSES) {
20519
20860
  for (const marker of PROJECT_HARNESS_MARKERS[harness]) {
20520
- if (await pathExists2(join23(projectRoot, marker))) {
20861
+ if (await pathExists2(join24(projectRoot, marker))) {
20521
20862
  detected[harness].push(marker);
20522
20863
  }
20523
20864
  }
@@ -20681,7 +21022,7 @@ async function seedWorkspaceRoots(options) {
20681
21022
  }
20682
21023
  }
20683
21024
  if (roots.size === 0) {
20684
- roots.add(join23(homedir19(), "dev"));
21025
+ roots.add(join24(homedir20(), "dev"));
20685
21026
  }
20686
21027
  return Array.from(roots);
20687
21028
  }
@@ -20783,10 +21124,10 @@ async function findNearestProjectRoot(startDirectory) {
20783
21124
  let current = normalizePath(startDirectory);
20784
21125
  let lastCandidate = null;
20785
21126
  while (true) {
20786
- if (await pathExists2(join23(current, ".git"))) {
21127
+ if (await pathExists2(join24(current, ".git"))) {
20787
21128
  return current;
20788
21129
  }
20789
- if (await pathExists2(projectConfigPath(current)) || await pathExists2(join23(current, "package.json")) || await pathExists2(join23(current, "AGENTS.md")) || await pathExists2(join23(current, "CLAUDE.md"))) {
21130
+ if (await pathExists2(projectConfigPath(current)) || await pathExists2(join24(current, "package.json")) || await pathExists2(join24(current, "AGENTS.md")) || await pathExists2(join24(current, "CLAUDE.md"))) {
20790
21131
  lastCandidate = current;
20791
21132
  }
20792
21133
  const parent = dirname13(current);
@@ -20970,7 +21311,7 @@ async function scanSourceRoot(sourceRoot) {
20970
21311
  if (PROJECT_SCAN_SKIP_DIRECTORIES.has(entry.name)) {
20971
21312
  continue;
20972
21313
  }
20973
- const nextPath = join23(currentDirectory, entry.name);
21314
+ const nextPath = join24(currentDirectory, entry.name);
20974
21315
  if (entry.isSymbolicLink()) {
20975
21316
  if (!await isDirectory(nextPath)) {
20976
21317
  continue;
@@ -21011,7 +21352,7 @@ function relativeProjectPath(projectRoot, sourceRoot) {
21011
21352
  return relative2(sourceRoot, projectRoot) || ".";
21012
21353
  }
21013
21354
  function resolveProjectRootFromConfig(projectRoot, config) {
21014
- return normalizePath(join23(projectRoot, config.project.root ?? "."));
21355
+ return normalizePath(join24(projectRoot, config.project.root ?? "."));
21015
21356
  }
21016
21357
  function mergeResolvedAgentConfig(base, override, settings) {
21017
21358
  if (!override) {
@@ -21204,7 +21545,7 @@ async function resolveInferredAgent(projectRoot, settings, override) {
21204
21545
  return mergeResolvedAgentConfig(base, override, settings);
21205
21546
  }
21206
21547
  async function buildProjectInventoryEntry(agent, sourceRoot) {
21207
- const manifestRoot = agent.projectConfigPath ? normalizePath(join23(dirname13(agent.projectConfigPath), "..")) : null;
21548
+ const manifestRoot = agent.projectConfigPath ? normalizePath(join24(dirname13(agent.projectConfigPath), "..")) : null;
21208
21549
  const manifest = manifestRoot ? await readProjectConfig(manifestRoot) : null;
21209
21550
  const markers = await detectHarnessMarkers(agent.projectRoot);
21210
21551
  const harnesses = new Map;
@@ -21313,7 +21654,7 @@ async function loadResolvedRelayAgents(options = {}) {
21313
21654
  const sourceRootByProject = new Map(workspaceCandidates.map((candidate) => [candidate.projectRoot, candidate.sourceRoot]));
21314
21655
  if (process.env.OPENSCOUT_SKIP_USER_PROJECT_HINTS !== "1") {
21315
21656
  try {
21316
- const hintHome = options.userLevelHintsHome ?? homedir19();
21657
+ const hintHome = options.userLevelHintsHome ?? homedir20();
21317
21658
  const userHints = await collectUserLevelProjectRootHints({ home: hintHome });
21318
21659
  for (const hint of userHints) {
21319
21660
  const normalized = normalizePath(hint);
@@ -21502,7 +21843,7 @@ var init_setup = __esm(() => {
21502
21843
  init_open_scout_network();
21503
21844
  init_support_paths();
21504
21845
  init_user_project_hints();
21505
- MANAGED_AGENT_HARNESSES = ["claude", "codex", "cursor", "grok", "grok-acp", "kimi", "pi", "opencode"];
21846
+ MANAGED_AGENT_HARNESSES = ["claude", "codex", "cursor", "devin", "grok", "grok-acp", "kimi", "pi", "opencode"];
21506
21847
  DEFAULT_OPERATOR_NAME = guessedOperatorName();
21507
21848
  DEFAULT_CAPABILITIES = ["chat", "invoke", "deliver"];
21508
21849
  PROJECT_SCAN_SKIP_DIRECTORIES = new Set([
@@ -21591,6 +21932,9 @@ var init_setup = __esm(() => {
21591
21932
  ".cursor",
21592
21933
  ".cursorrules"
21593
21934
  ],
21935
+ devin: [
21936
+ ".devin"
21937
+ ],
21594
21938
  grok: [
21595
21939
  "AGENTS.md",
21596
21940
  "Grok.md",
@@ -21682,17 +22026,17 @@ var init_local_agent_template = __esm(() => {
21682
22026
  });
21683
22027
 
21684
22028
  // ../runtime/src/relay-agent-process-leases.ts
21685
- import { existsSync as existsSync23, mkdirSync as mkdirSync7, readdirSync as readdirSync3, readFileSync as readFileSync12, rmSync as rmSync4, writeFileSync as writeFileSync7 } from "fs";
21686
- import { join as join24 } from "path";
22029
+ import { existsSync as existsSync24, mkdirSync as mkdirSync7, readdirSync as readdirSync3, readFileSync as readFileSync12, rmSync as rmSync4, writeFileSync as writeFileSync7 } from "fs";
22030
+ import { join as join25 } from "path";
21687
22031
  function processLeasesDirectory() {
21688
- return join24(resolveOpenScoutSupportPaths().runtimeDirectory, "process-leases");
22032
+ return join25(resolveOpenScoutSupportPaths().runtimeDirectory, "process-leases");
21689
22033
  }
21690
22034
  function leaseFileName(sessionName) {
21691
22035
  const safe = sessionName.trim().replace(/[^\w.-]+/g, "-");
21692
22036
  return `${RELAY_AGENT_PROCESS_LEASE_PREFIX}${safe}.json`;
21693
22037
  }
21694
22038
  function relayAgentProcessLeasePath(sessionName) {
21695
- return join24(processLeasesDirectory(), leaseFileName(sessionName));
22039
+ return join25(processLeasesDirectory(), leaseFileName(sessionName));
21696
22040
  }
21697
22041
  function writeRelayAgentProcessLease(lease) {
21698
22042
  assertTestIsolatedUserData("write a relay-agent process lease", "OPENSCOUT_SUPPORT_DIRECTORY");
@@ -21717,9 +22061,9 @@ var init_relay_agent_process_leases = __esm(() => {
21717
22061
  });
21718
22062
 
21719
22063
  // ../runtime/src/relay-agent-watchdog.ts
21720
- import { dirname as dirname14, join as join25 } from "path";
22064
+ import { dirname as dirname14, join as join26 } from "path";
21721
22065
  function brokerRuntimeHeartbeatPath() {
21722
- return join25(resolveOpenScoutSupportPaths().runtimeDirectory, BROKER_RUNTIME_HEARTBEAT_FILENAME);
22066
+ return join26(resolveOpenScoutSupportPaths().runtimeDirectory, BROKER_RUNTIME_HEARTBEAT_FILENAME);
21723
22067
  }
21724
22068
  function resolveRelayAgentOrphanGraceMs(env = process.env) {
21725
22069
  const raw = env.OPENSCOUT_RELAY_AGENT_ORPHAN_GRACE_MS?.trim();
@@ -21834,11 +22178,11 @@ var init_permission_policy2 = __esm(() => {
21834
22178
  });
21835
22179
 
21836
22180
  // ../runtime/src/user-config.ts
21837
- import { existsSync as existsSync24, readFileSync as readFileSync13, statSync as statSync6, writeFileSync as writeFileSync8, mkdirSync as mkdirSync8 } from "fs";
21838
- import { homedir as homedir20 } from "os";
21839
- import { dirname as dirname15, join as join26 } from "path";
22181
+ import { existsSync as existsSync25, readFileSync as readFileSync13, statSync as statSync6, writeFileSync as writeFileSync8, mkdirSync as mkdirSync8 } from "fs";
22182
+ import { homedir as homedir21 } from "os";
22183
+ import { dirname as dirname15, join as join27 } from "path";
21840
22184
  function userConfigPath() {
21841
- return join26(process.env.OPENSCOUT_HOME ?? join26(homedir20(), ".openscout"), "user.json");
22185
+ return join27(process.env.OPENSCOUT_HOME ?? join27(homedir21(), ".openscout"), "user.json");
21842
22186
  }
21843
22187
  function userConfigFileKey(configPath) {
21844
22188
  try {
@@ -21851,7 +22195,7 @@ function userConfigFileKey(configPath) {
21851
22195
  function readUserConfigFromDisk(configPath, now) {
21852
22196
  const fileKey = userConfigFileKey(configPath);
21853
22197
  let value = {};
21854
- if (existsSync24(configPath)) {
22198
+ if (existsSync25(configPath)) {
21855
22199
  try {
21856
22200
  value = JSON.parse(readFileSync13(configPath, "utf8"));
21857
22201
  } catch {
@@ -21876,7 +22220,7 @@ function loadUserConfig(now = Date.now()) {
21876
22220
  }
21877
22221
  function readSettingsOperatorName() {
21878
22222
  const settingsPath = resolveOpenScoutSupportPaths().settingsPath;
21879
- if (!existsSync24(settingsPath))
22223
+ if (!existsSync25(settingsPath))
21880
22224
  return "";
21881
22225
  try {
21882
22226
  const settings = JSON.parse(readFileSync13(settingsPath, "utf8"));
@@ -21903,9 +22247,9 @@ var init_user_config = __esm(() => {
21903
22247
  });
21904
22248
 
21905
22249
  // ../runtime/src/local-agents.ts
21906
- import { existsSync as existsSync25, readFileSync as readFileSync14 } from "fs";
22250
+ import { existsSync as existsSync26, readFileSync as readFileSync14 } from "fs";
21907
22251
  import { mkdir as mkdir8, readFile as readFile9, rm as rm4, stat as stat5, writeFile as writeFile7 } from "fs/promises";
21908
- import { dirname as dirname16, join as join27, resolve as resolve12 } from "path";
22252
+ import { dirname as dirname16, join as join28, resolve as resolve12 } from "path";
21909
22253
  import { fileURLToPath as fileURLToPath5 } from "url";
21910
22254
  function resolveRelayHub() {
21911
22255
  return resolveOpenScoutSupportPaths().relayHubDirectory;
@@ -21916,7 +22260,7 @@ function resolveProjectsRoot(projectPath) {
21916
22260
  }
21917
22261
  try {
21918
22262
  const supportPaths = resolveOpenScoutSupportPaths();
21919
- if (!existsSync25(supportPaths.settingsPath)) {
22263
+ if (!existsSync26(supportPaths.settingsPath)) {
21920
22264
  return dirname16(projectPath);
21921
22265
  }
21922
22266
  const raw = JSON.parse(readFileSync14(supportPaths.settingsPath, "utf8"));
@@ -21940,27 +22284,30 @@ function parseNonNegativeInteger(value, fallback) {
21940
22284
  const parsed = Number.parseInt(value ?? "", 10);
21941
22285
  return Number.isFinite(parsed) && parsed >= 0 ? parsed : fallback;
21942
22286
  }
21943
- function scoutCliPath() {
21944
- return join27(OPENSCOUT_REPO_ROOT, "packages", "cli", "bin", "scout.mjs");
22287
+ function resolveLocalAgentScoutCliPath(moduleDirectory = MODULE_DIRECTORY) {
22288
+ const packagedCli = resolve12(moduleDirectory, "..", "..", "bin", "scout.mjs");
22289
+ if (existsSync26(packagedCli))
22290
+ return packagedCli;
22291
+ return resolve12(moduleDirectory, "..", "..", "..", "packages", "cli", "bin", "scout.mjs");
21945
22292
  }
21946
22293
  function legacyNodeBrokerRelayCommand() {
21947
- return `node ${JSON.stringify(scoutCliPath())}`;
22294
+ return `node ${JSON.stringify(resolveLocalAgentScoutCliPath())}`;
21948
22295
  }
21949
22296
  function brokerRelayCommand() {
21950
- return `bun ${JSON.stringify(scoutCliPath())}`;
22297
+ return `bun ${JSON.stringify(resolveLocalAgentScoutCliPath())}`;
21951
22298
  }
21952
22299
  function titleCaseLocalAgentName(value) {
21953
22300
  return value.split(/[-_.\s]+/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
21954
22301
  }
21955
22302
  function resolveScoutSkillPath() {
21956
22303
  const candidatePaths = [
21957
- join27(OPENSCOUT_REPO_ROOT, ".agents", "skills", "scout", "SKILL.md"),
21958
- join27(process.env.HOME ?? "", ".agents", "skills", "scout", "SKILL.md"),
21959
- join27(OPENSCOUT_REPO_ROOT, ".agents", "skills", "relay-agent-comms", "SKILL.md"),
21960
- join27(process.env.HOME ?? "", ".agents", "skills", "relay-agent-comms", "SKILL.md")
22304
+ join28(OPENSCOUT_REPO_ROOT, ".agents", "skills", "scout", "SKILL.md"),
22305
+ join28(process.env.HOME ?? "", ".agents", "skills", "scout", "SKILL.md"),
22306
+ join28(OPENSCOUT_REPO_ROOT, ".agents", "skills", "relay-agent-comms", "SKILL.md"),
22307
+ join28(process.env.HOME ?? "", ".agents", "skills", "relay-agent-comms", "SKILL.md")
21961
22308
  ];
21962
22309
  for (const path2 of candidatePaths) {
21963
- if (existsSync25(path2)) {
22310
+ if (existsSync26(path2)) {
21964
22311
  return path2;
21965
22312
  }
21966
22313
  }
@@ -22157,7 +22504,7 @@ function renderLocalAgentSystemPromptTemplate(template, context, options = {}) {
22157
22504
  const basePrompt = buildLocalAgentBasePrompt(context);
22158
22505
  const projectContext = buildLocalAgentProjectContextPrompt(context);
22159
22506
  const collaborationPrompt = buildLocalAgentCollaborationPrompt(context);
22160
- const protocolPrompt = options.transport === "codex_app_server" || options.transport === "claude_stream_json" || options.transport === "pi_rpc" || options.transport === "grok_acp" || options.transport === "kimi_acp" ? buildLocalAgentDirectProtocolPrompt(context) : buildLocalAgentTmuxProtocolPrompt(context);
22507
+ const protocolPrompt = options.transport === "codex_app_server" || options.transport === "claude_stream_json" || options.transport === "pi_rpc" || options.transport === "grok_acp" || options.transport === "kimi_acp" || options.transport === "devin_acp" ? buildLocalAgentDirectProtocolPrompt(context) : buildLocalAgentTmuxProtocolPrompt(context);
22161
22508
  const variables = {
22162
22509
  agent_id: context.agentId,
22163
22510
  display_name: context.displayName,
@@ -22269,7 +22616,8 @@ function generatedLocalAgentSystemPromptCandidates(agentId, projectName, project
22269
22616
  "claude_stream_json",
22270
22617
  "pi_rpc",
22271
22618
  "grok_acp",
22272
- "kimi_acp"
22619
+ "kimi_acp",
22620
+ "devin_acp"
22273
22621
  ];
22274
22622
  const candidates = new Set;
22275
22623
  for (const relayCommand of relayCommands) {
@@ -22322,7 +22670,7 @@ function expandHomePath4(value) {
22322
22670
  return process.env.HOME ?? process.cwd();
22323
22671
  }
22324
22672
  if (value.startsWith("~/")) {
22325
- return join27(process.env.HOME ?? process.cwd(), value.slice(2));
22673
+ return join28(process.env.HOME ?? process.cwd(), value.slice(2));
22326
22674
  }
22327
22675
  return value;
22328
22676
  }
@@ -22346,7 +22694,7 @@ function normalizeTmuxSessionName2(value, agentId) {
22346
22694
  return normalized || fallback.replace(/[^\w-]+/g, "-").replace(/^-+|-+$/g, "") || "relay-agent";
22347
22695
  }
22348
22696
  function normalizeLocalAgentHarness(value) {
22349
- if (value === "codex" || value === "claude" || value === "grok" || value === "grok-acp" || value === "kimi" || value === "pi" || value === "cursor") {
22697
+ if (value === "codex" || value === "claude" || value === "grok" || value === "grok-acp" || value === "kimi" || value === "pi" || value === "cursor" || value === "devin") {
22350
22698
  return value;
22351
22699
  }
22352
22700
  return DEFAULT_LOCAL_AGENT_HARNESS;
@@ -22361,6 +22709,9 @@ function normalizeLocalAgentTransport(value, harness) {
22361
22709
  if (harness === "cursor") {
22362
22710
  return "cursor_acp";
22363
22711
  }
22712
+ if (harness === "devin") {
22713
+ return "devin_acp";
22714
+ }
22364
22715
  if (harness === "grok-acp") {
22365
22716
  return "grok_acp";
22366
22717
  }
@@ -22376,7 +22727,7 @@ function normalizeLocalAgentTransport(value, harness) {
22376
22727
  if (value === "pi_rpc") {
22377
22728
  return "pi_rpc";
22378
22729
  }
22379
- if (value === "grok_acp" || value === "kimi_acp" || value === "cursor_acp" || value === "opencode_acp") {
22730
+ if (value === "grok_acp" || value === "kimi_acp" || value === "cursor_acp" || value === "opencode_acp" || value === "devin_acp") {
22380
22731
  return value;
22381
22732
  }
22382
22733
  if (value === "cursor_exec") {
@@ -22739,7 +23090,7 @@ function overrideHarnessProfile(override, harness) {
22739
23090
  };
22740
23091
  }
22741
23092
  function normalizeManagedHarness2(value, fallback) {
22742
- return value === "codex" ? "codex" : value === "claude" ? "claude" : value === "cursor" ? "cursor" : value === "grok" ? "grok" : value === "grok-acp" ? "grok-acp" : value === "kimi" ? "kimi" : value === "pi" ? "pi" : fallback;
23093
+ return value === "codex" ? "codex" : value === "claude" ? "claude" : value === "cursor" ? "cursor" : value === "devin" ? "devin" : value === "grok" ? "grok" : value === "grok-acp" ? "grok-acp" : value === "kimi" ? "kimi" : value === "pi" ? "pi" : fallback;
22743
23094
  }
22744
23095
  function normalizeLocalHarnessProfiles(agentId, record) {
22745
23096
  const defaultHarness = normalizeManagedHarness2(typeof record.defaultHarness === "string" ? record.defaultHarness : record.harness, "claude");
@@ -23341,7 +23692,7 @@ function isLocalAgentRecordOnline(agentName, record) {
23341
23692
  if (normalizedRecord.transport === "pi_rpc") {
23342
23693
  return isPiRpcAgentAlive(buildPiAgentSessionOptions(agentName, normalizedRecord));
23343
23694
  }
23344
- if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp" || normalizedRecord.transport === "cursor_acp" || normalizedRecord.transport === "opencode_acp") {
23695
+ if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp" || normalizedRecord.transport === "cursor_acp" || normalizedRecord.transport === "opencode_acp" || normalizedRecord.transport === "devin_acp") {
23345
23696
  return areHarnessBinariesAvailable(normalizedRecord);
23346
23697
  }
23347
23698
  return isLocalAgentSessionAlive(normalizedRecord.tmuxSession);
@@ -23362,7 +23713,7 @@ function buildLocalAgentInitialMessage(projectName, agentName) {
23362
23713
  return `You are now online as the ${agentName} relay agent for ${projectName}. Announce yourself on the relay with: ${brokerRelayCommand()} send --as ${agentName} "relay agent online \u2014 ready to assist with ${projectName}"`;
23363
23714
  }
23364
23715
  function scoutReplyContextPath(runtimeDirectory) {
23365
- return join27(runtimeDirectory, "scout-reply-context.json");
23716
+ return join28(runtimeDirectory, "scout-reply-context.json");
23366
23717
  }
23367
23718
  function withScoutReplyContextEnvironment(options) {
23368
23719
  return {
@@ -23469,10 +23820,10 @@ function buildLocalAgentLaunchCommand(agentName, record, projectPath, promptFile
23469
23820
  const harness = normalizeLocalAgentHarness(record.harness);
23470
23821
  const extraArgs = shellQuoteArguments(harness === "claude" ? normalizeClaudeRuntimeLaunchArgs(record.launchArgs) : harness === "grok" ? normalizeGrokRuntimeLaunchArgs(record.launchArgs) : normalizeLaunchArgsForHarness(harness, record.launchArgs));
23471
23822
  if (harness === "codex") {
23472
- return `exec bash ${JSON.stringify(workerScript ?? join27(relayAgentRuntimeDirectory(agentName), "codex-worker.sh"))}`;
23823
+ return `exec bash ${JSON.stringify(workerScript ?? join28(relayAgentRuntimeDirectory(agentName), "codex-worker.sh"))}`;
23473
23824
  }
23474
23825
  if (harness === "pi") {
23475
- const sessionDir = join27(relayAgentRuntimeDirectory(agentName), "pi-sessions");
23826
+ const sessionDir = join28(relayAgentRuntimeDirectory(agentName), "pi-sessions");
23476
23827
  return [
23477
23828
  "exec pi",
23478
23829
  `--append-system-prompt "$(cat ${JSON.stringify(promptFile)})"`,
@@ -23512,12 +23863,12 @@ function isShellCommandAvailable(binary) {
23512
23863
  if (!binary.trim())
23513
23864
  return false;
23514
23865
  if (binary.includes("/"))
23515
- return existsSync25(binary);
23866
+ return existsSync26(binary);
23516
23867
  const pathValue = process.env.PATH ?? "";
23517
23868
  for (const directory of pathValue.split(":")) {
23518
23869
  if (!directory)
23519
23870
  continue;
23520
- if (existsSync25(join27(directory, binary)))
23871
+ if (existsSync26(join28(directory, binary)))
23521
23872
  return true;
23522
23873
  }
23523
23874
  return false;
@@ -23557,6 +23908,8 @@ function areHarnessBinariesAvailable(record) {
23557
23908
  binaries.add("cursor-agent");
23558
23909
  if (record.transport === "opencode_acp")
23559
23910
  binaries.add("opencode");
23911
+ if (record.transport === "devin_acp")
23912
+ binaries.add("devin");
23560
23913
  if (record.transport === "tmux") {
23561
23914
  binaries.add("tmux");
23562
23915
  }
@@ -23587,7 +23940,7 @@ async function ensureLocalAgentOnline(agentName, record) {
23587
23940
  async function ensureLocalAgentOnlineOnce(agentName, record) {
23588
23941
  const normalizedRecord = normalizeLocalAgentRecord(agentName, record);
23589
23942
  if (isLocalAgentRecordOnline(agentName, normalizedRecord)) {
23590
- if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp") {
23943
+ if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp" || normalizedRecord.transport === "devin_acp") {
23591
23944
  const registry3 = await readLocalAgentRegistry();
23592
23945
  registry3[agentName] = {
23593
23946
  ...normalizedRecord,
@@ -23612,7 +23965,7 @@ async function ensureLocalAgentOnlineOnce(agentName, record) {
23612
23965
  await mkdir8(agentRuntimeDir, { recursive: true });
23613
23966
  await mkdir8(logsDir, { recursive: true });
23614
23967
  if (normalizedRecord.transport === "codex_app_server") {
23615
- await writeFile7(join27(agentRuntimeDir, "prompt.txt"), systemPrompt);
23968
+ await writeFile7(join28(agentRuntimeDir, "prompt.txt"), systemPrompt);
23616
23969
  await ensureCodexAppServerAgentOnline(buildCodexAgentSessionOptions(agentName, normalizedRecord, systemPrompt));
23617
23970
  const registry3 = await readLocalAgentRegistry();
23618
23971
  registry3[agentName] = {
@@ -23624,7 +23977,7 @@ async function ensureLocalAgentOnlineOnce(agentName, record) {
23624
23977
  return registry3[agentName];
23625
23978
  }
23626
23979
  if (normalizedRecord.transport === "claude_stream_json") {
23627
- await writeFile7(join27(agentRuntimeDir, "prompt.txt"), systemPrompt);
23980
+ await writeFile7(join28(agentRuntimeDir, "prompt.txt"), systemPrompt);
23628
23981
  await ensureClaudeStreamJsonAgentOnline(buildClaudeAgentSessionOptions(agentName, normalizedRecord, systemPrompt));
23629
23982
  const registry3 = await readLocalAgentRegistry();
23630
23983
  registry3[agentName] = {
@@ -23636,7 +23989,7 @@ async function ensureLocalAgentOnlineOnce(agentName, record) {
23636
23989
  return registry3[agentName];
23637
23990
  }
23638
23991
  if (normalizedRecord.transport === "pi_rpc") {
23639
- await writeFile7(join27(agentRuntimeDir, "prompt.txt"), systemPrompt);
23992
+ await writeFile7(join28(agentRuntimeDir, "prompt.txt"), systemPrompt);
23640
23993
  await ensurePiRpcAgentOnline(buildPiAgentSessionOptions(agentName, normalizedRecord, systemPrompt));
23641
23994
  const registry3 = await readLocalAgentRegistry();
23642
23995
  registry3[agentName] = {
@@ -23653,17 +24006,17 @@ async function ensureLocalAgentOnlineOnce(agentName, record) {
23653
24006
  }
23654
24007
  const initialMessage = buildLocalAgentInitialMessage(projectName, agentName);
23655
24008
  const bootstrapPrompt = buildLocalAgentBootstrapPrompt(normalizeLocalAgentHarness(normalizedRecord.harness), systemPrompt, initialMessage);
23656
- const queueDirectory = join27(agentRuntimeDir, "queue");
23657
- const processingDirectory = join27(queueDirectory, "processing");
23658
- const processedDirectory = join27(queueDirectory, "processed");
23659
- const promptFile = join27(agentRuntimeDir, "prompt.txt");
23660
- const initialFile = join27(agentRuntimeDir, "initial.txt");
23661
- const launchScript = join27(agentRuntimeDir, "launch.sh");
23662
- const workerScript = join27(agentRuntimeDir, "codex-worker.sh");
23663
- const codexSessionIdFile = join27(agentRuntimeDir, "codex-session-id.txt");
23664
- const stateFile = join27(agentRuntimeDir, "state.json");
23665
- const stdoutLogFile = join27(logsDir, "stdout.log");
23666
- const stderrLogFile = join27(logsDir, "stderr.log");
24009
+ const queueDirectory = join28(agentRuntimeDir, "queue");
24010
+ const processingDirectory = join28(queueDirectory, "processing");
24011
+ const processedDirectory = join28(queueDirectory, "processed");
24012
+ const promptFile = join28(agentRuntimeDir, "prompt.txt");
24013
+ const initialFile = join28(agentRuntimeDir, "initial.txt");
24014
+ const launchScript = join28(agentRuntimeDir, "launch.sh");
24015
+ const workerScript = join28(agentRuntimeDir, "codex-worker.sh");
24016
+ const codexSessionIdFile = join28(agentRuntimeDir, "codex-session-id.txt");
24017
+ const stateFile = join28(agentRuntimeDir, "state.json");
24018
+ const stdoutLogFile = join28(logsDir, "stdout.log");
24019
+ const stderrLogFile = join28(logsDir, "stderr.log");
23667
24020
  await writeFile7(promptFile, systemPrompt);
23668
24021
  await writeFile7(initialFile, bootstrapPrompt);
23669
24022
  await writeFile7(stderrLogFile, "");
@@ -23768,7 +24121,7 @@ async function ensureLocalAgentOnlineOnce(agentName, record) {
23768
24121
  }
23769
24122
  }
23770
24123
  if (!sessionOnline) {
23771
- const stderrTail = existsSync25(stderrLogFile) ? readFileSync14(stderrLogFile, "utf8").trim().split(/\r?\n/).slice(-10).join(`
24124
+ const stderrTail = existsSync26(stderrLogFile) ? readFileSync14(stderrLogFile, "utf8").trim().split(/\r?\n/).slice(-10).join(`
23772
24125
  `).trim() : "";
23773
24126
  throw new Error(stderrTail ? `Relay agent ${agentName} failed to stay online:
23774
24127
  ${redactSecrets(stderrTail)}` : `Relay agent ${agentName} failed to stay online.`);
@@ -23831,10 +24184,10 @@ async function restartLocalAgent(agentId, options = {}) {
23831
24184
  sessionId: sessionName
23832
24185
  });
23833
24186
  }
23834
- } else if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp") {
24187
+ } else if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp" || normalizedRecord.transport === "devin_acp") {
23835
24188
  for (const sessionName of sessionsToStop) {
23836
24189
  await shutdownAcpAgentSession({
23837
- adapterType: normalizedRecord.transport === "grok_acp" ? "grok-acp" : "kimi-acp",
24190
+ adapterType: normalizedRecord.transport === "grok_acp" ? "grok-acp" : normalizedRecord.transport === "devin_acp" ? "devin-acp" : "kimi-acp",
23838
24191
  sessionId: sessionName,
23839
24192
  poolKey: localAgentAcpPoolKey(agentId, normalizedRecord)
23840
24193
  });
@@ -24107,10 +24460,10 @@ async function stopLocalAgent(agentId) {
24107
24460
  sessionId: sessionName
24108
24461
  });
24109
24462
  }
24110
- } else if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp") {
24463
+ } else if (normalizedRecord.transport === "grok_acp" || normalizedRecord.transport === "kimi_acp" || normalizedRecord.transport === "devin_acp") {
24111
24464
  for (const sessionName of sessionsToStop) {
24112
24465
  await shutdownAcpAgentSession({
24113
- adapterType: normalizedRecord.transport === "grok_acp" ? "grok-acp" : "kimi-acp",
24466
+ adapterType: normalizedRecord.transport === "grok_acp" ? "grok-acp" : normalizedRecord.transport === "devin_acp" ? "devin-acp" : "kimi-acp",
24114
24467
  sessionId: sessionName,
24115
24468
  poolKey: localAgentAcpPoolKey(agentId, normalizedRecord)
24116
24469
  });
@@ -24159,8 +24512,8 @@ async function restartAllLocalAgents(options = {}) {
24159
24512
  }
24160
24513
  function readPersistedSessionCatalogId(runtimeDir) {
24161
24514
  try {
24162
- const catalogPath = join27(runtimeDir, "session-catalog.json");
24163
- if (existsSync25(catalogPath)) {
24515
+ const catalogPath = join28(runtimeDir, "session-catalog.json");
24516
+ if (existsSync26(catalogPath)) {
24164
24517
  const raw = readFileSync14(catalogPath, "utf8").trim();
24165
24518
  if (raw) {
24166
24519
  const catalog = JSON.parse(raw);
@@ -24176,8 +24529,8 @@ function readPersistedSessionCatalogId(runtimeDir) {
24176
24529
  }
24177
24530
  function readPersistedLegacySessionId(runtimeDir, filename) {
24178
24531
  try {
24179
- const legacyPath = join27(runtimeDir, filename);
24180
- if (existsSync25(legacyPath)) {
24532
+ const legacyPath = join28(runtimeDir, filename);
24533
+ if (existsSync26(legacyPath)) {
24181
24534
  const value = readFileSync14(legacyPath, "utf8").trim();
24182
24535
  return value || null;
24183
24536
  }
@@ -24453,6 +24806,7 @@ var init_local_agents = __esm(() => {
24453
24806
  init_kimi_acp_invocation();
24454
24807
  init_cursor_acp_invocation();
24455
24808
  init_opencode_acp_invocation();
24809
+ init_devin_acp_invocation();
24456
24810
  init_acp_agent_invocation();
24457
24811
  init_claude_stream_json();
24458
24812
  init_codex_app_server2();
@@ -26781,7 +27135,7 @@ var agentsTable = sqliteTable("agents", {
26781
27135
  ]);
26782
27136
  var agentEndpointsTable = sqliteTable("agent_endpoints", {
26783
27137
  id: text("id").primaryKey(),
26784
- agentId: text("agent_id").notNull().references(() => agentsTable.id, { onDelete: "cascade" }),
27138
+ agentId: text("agent_id").notNull().references(() => actorsTable.id, { onDelete: "cascade" }),
26785
27139
  nodeId: text("node_id").notNull().references(() => nodesTable.id, { onDelete: "restrict" }),
26786
27140
  harness: text("harness").notNull(),
26787
27141
  transport: text("transport").notNull(),
@@ -26805,7 +27159,7 @@ var agentEndpointsTable = sqliteTable("agent_endpoints", {
26805
27159
  ]);
26806
27160
  var runtimeSessionsTable = sqliteTable("runtime_sessions", {
26807
27161
  id: text("id").primaryKey(),
26808
- agentId: text("agent_id").notNull().references(() => agentsTable.id, { onDelete: "cascade" }),
27162
+ agentId: text("agent_id").notNull().references(() => actorsTable.id, { onDelete: "cascade" }),
26809
27163
  endpointId: text("endpoint_id").notNull().references(() => agentEndpointsTable.id, { onDelete: "cascade" }),
26810
27164
  nodeId: text("node_id").notNull().references(() => nodesTable.id, { onDelete: "restrict" }),
26811
27165
  harness: text("harness").notNull(),
@@ -26833,7 +27187,7 @@ var runtimeSessionAliasesTable = sqliteTable("runtime_session_aliases", {
26833
27187
  alias: text("alias").notNull(),
26834
27188
  sessionId: text("session_id").notNull().references(() => runtimeSessionsTable.id, { onDelete: "cascade" }),
26835
27189
  aliasKind: text("alias_kind").notNull(),
26836
- agentId: text("agent_id").notNull().references(() => agentsTable.id, { onDelete: "cascade" }),
27190
+ agentId: text("agent_id").notNull().references(() => actorsTable.id, { onDelete: "cascade" }),
26837
27191
  endpointId: text("endpoint_id").notNull().references(() => agentEndpointsTable.id, { onDelete: "cascade" }),
26838
27192
  nodeId: text("node_id").notNull().references(() => nodesTable.id, { onDelete: "restrict" }),
26839
27193
  harness: text("harness").notNull(),
@@ -26958,6 +27312,15 @@ var messageMentionsTable = sqliteTable("message_mentions", {
26958
27312
  }, (table) => [
26959
27313
  primaryKey({ columns: [table.messageId, table.actorId] })
26960
27314
  ]);
27315
+ var messageReactionsTable = sqliteTable("message_reactions", {
27316
+ messageId: text("message_id").notNull().references(() => messagesTable.id, { onDelete: "cascade" }),
27317
+ actorId: text("actor_id").notNull().references(() => actorsTable.id, { onDelete: "restrict" }),
27318
+ emoji: text("emoji").notNull(),
27319
+ createdAt: integer("created_at").notNull()
27320
+ }, (table) => [
27321
+ primaryKey({ columns: [table.messageId, table.actorId, table.emoji] }),
27322
+ index("idx_message_reactions_message").on(table.messageId)
27323
+ ]);
26961
27324
  var messageAttachmentsTable = sqliteTable("message_attachments", {
26962
27325
  id: text("id").primaryKey(),
26963
27326
  messageId: text("message_id").notNull().references(() => messagesTable.id, { onDelete: "cascade" }),
@@ -27079,7 +27442,7 @@ var invocationsTable = sqliteTable("invocations", {
27079
27442
  id: text("id").primaryKey(),
27080
27443
  requesterId: text("requester_id").notNull().references(() => actorsTable.id, { onDelete: "restrict" }),
27081
27444
  requesterNodeId: text("requester_node_id").notNull().references(() => nodesTable.id, { onDelete: "restrict" }),
27082
- targetAgentId: text("target_agent_id").notNull().references(() => agentsTable.id, { onDelete: "restrict" }),
27445
+ targetAgentId: text("target_agent_id").notNull().references(() => actorsTable.id, { onDelete: "restrict" }),
27083
27446
  targetNodeId: text("target_node_id").references(() => nodesTable.id, { onDelete: "set null" }),
27084
27447
  action: text("action").notNull(),
27085
27448
  task: text("task").notNull(),
@@ -27114,7 +27477,7 @@ var flightsTable = sqliteTable("flights", {
27114
27477
  id: text("id").primaryKey(),
27115
27478
  invocationId: text("invocation_id").notNull().references(() => invocationsTable.id, { onDelete: "cascade" }),
27116
27479
  requesterId: text("requester_id").notNull().references(() => actorsTable.id, { onDelete: "restrict" }),
27117
- targetAgentId: text("target_agent_id").notNull().references(() => agentsTable.id, { onDelete: "restrict" }),
27480
+ targetAgentId: text("target_agent_id").notNull().references(() => actorsTable.id, { onDelete: "restrict" }),
27118
27481
  state: text("state").notNull(),
27119
27482
  summary: text("summary"),
27120
27483
  output: text("output"),
@@ -27363,7 +27726,7 @@ var activityItemsTable = sqliteTable("activity_items", {
27363
27726
  recordId: text("record_id").references(() => collaborationRecordsTable.id, { onDelete: "cascade" }),
27364
27727
  actorId: text("actor_id").references(() => actorsTable.id, { onDelete: "set null" }),
27365
27728
  counterpartId: text("counterpart_id").references(() => actorsTable.id, { onDelete: "set null" }),
27366
- agentId: text("agent_id").references(() => agentsTable.id, { onDelete: "set null" }),
27729
+ agentId: text("agent_id").references(() => actorsTable.id, { onDelete: "set null" }),
27367
27730
  workspaceRoot: text("workspace_root"),
27368
27731
  sessionId: text("session_id"),
27369
27732
  title: text("title"),
@@ -27525,7 +27888,7 @@ var missionLogEntriesTable = sqliteTable("mission_log_entries", {
27525
27888
  var CONTROL_PLANE_RUNTIME_SESSION_SQLITE_SCHEMA = `
27526
27889
  CREATE TABLE IF NOT EXISTS runtime_sessions (
27527
27890
  id TEXT PRIMARY KEY,
27528
- agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
27891
+ agent_id TEXT NOT NULL REFERENCES actors(id) ON DELETE CASCADE,
27529
27892
  endpoint_id TEXT NOT NULL REFERENCES agent_endpoints(id) ON DELETE CASCADE,
27530
27893
  node_id TEXT NOT NULL REFERENCES nodes(id) ON DELETE RESTRICT,
27531
27894
  harness TEXT NOT NULL,
@@ -27548,7 +27911,7 @@ CREATE TABLE IF NOT EXISTS runtime_session_aliases (
27548
27911
  alias TEXT NOT NULL,
27549
27912
  session_id TEXT NOT NULL REFERENCES runtime_sessions(id) ON DELETE CASCADE,
27550
27913
  alias_kind TEXT NOT NULL,
27551
- agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
27914
+ agent_id TEXT NOT NULL REFERENCES actors(id) ON DELETE CASCADE,
27552
27915
  endpoint_id TEXT NOT NULL REFERENCES agent_endpoints(id) ON DELETE CASCADE,
27553
27916
  node_id TEXT NOT NULL REFERENCES nodes(id) ON DELETE RESTRICT,
27554
27917
  harness TEXT NOT NULL,
@@ -27744,7 +28107,7 @@ CREATE TABLE IF NOT EXISTS agents (
27744
28107
 
27745
28108
  CREATE TABLE IF NOT EXISTS agent_endpoints (
27746
28109
  id TEXT PRIMARY KEY,
27747
- agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
28110
+ agent_id TEXT NOT NULL REFERENCES actors(id) ON DELETE CASCADE,
27748
28111
  node_id TEXT NOT NULL REFERENCES nodes(id) ON DELETE RESTRICT,
27749
28112
  harness TEXT NOT NULL,
27750
28113
  transport TEXT NOT NULL,
@@ -27805,6 +28168,16 @@ CREATE TABLE IF NOT EXISTS message_mentions (
27805
28168
  PRIMARY KEY (message_id, actor_id)
27806
28169
  );
27807
28170
 
28171
+ CREATE TABLE IF NOT EXISTS message_reactions (
28172
+ message_id TEXT NOT NULL REFERENCES messages(id) ON DELETE CASCADE,
28173
+ actor_id TEXT NOT NULL REFERENCES actors(id) ON DELETE RESTRICT,
28174
+ emoji TEXT NOT NULL,
28175
+ created_at INTEGER NOT NULL,
28176
+ PRIMARY KEY (message_id, actor_id, emoji)
28177
+ );
28178
+ CREATE INDEX IF NOT EXISTS idx_message_reactions_message
28179
+ ON message_reactions (message_id);
28180
+
27808
28181
  CREATE TABLE IF NOT EXISTS message_attachments (
27809
28182
  id TEXT PRIMARY KEY,
27810
28183
  message_id TEXT NOT NULL REFERENCES messages(id) ON DELETE CASCADE,
@@ -27918,7 +28291,7 @@ CREATE TABLE IF NOT EXISTS invocations (
27918
28291
  id TEXT PRIMARY KEY,
27919
28292
  requester_id TEXT NOT NULL REFERENCES actors(id) ON DELETE RESTRICT,
27920
28293
  requester_node_id TEXT NOT NULL REFERENCES nodes(id) ON DELETE RESTRICT,
27921
- target_agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE RESTRICT,
28294
+ target_agent_id TEXT NOT NULL REFERENCES actors(id) ON DELETE RESTRICT,
27922
28295
  target_node_id TEXT REFERENCES nodes(id) ON DELETE SET NULL,
27923
28296
  action TEXT NOT NULL,
27924
28297
  task TEXT NOT NULL,
@@ -27948,7 +28321,7 @@ CREATE TABLE IF NOT EXISTS flights (
27948
28321
  id TEXT PRIMARY KEY,
27949
28322
  invocation_id TEXT NOT NULL REFERENCES invocations(id) ON DELETE CASCADE,
27950
28323
  requester_id TEXT NOT NULL REFERENCES actors(id) ON DELETE RESTRICT,
27951
- target_agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE RESTRICT,
28324
+ target_agent_id TEXT NOT NULL REFERENCES actors(id) ON DELETE RESTRICT,
27952
28325
  state TEXT NOT NULL,
27953
28326
  summary TEXT,
27954
28327
  output TEXT,
@@ -28170,7 +28543,7 @@ CREATE TABLE IF NOT EXISTS activity_items (
28170
28543
  record_id TEXT REFERENCES collaboration_records(id) ON DELETE CASCADE,
28171
28544
  actor_id TEXT REFERENCES actors(id) ON DELETE SET NULL,
28172
28545
  counterpart_id TEXT REFERENCES actors(id) ON DELETE SET NULL,
28173
- agent_id TEXT REFERENCES agents(id) ON DELETE SET NULL,
28546
+ agent_id TEXT REFERENCES actors(id) ON DELETE SET NULL,
28174
28547
  workspace_root TEXT,
28175
28548
  session_id TEXT,
28176
28549
  title TEXT,
@@ -28757,6 +29130,10 @@ class InMemoryControlRuntime {
28757
29130
  return;
28758
29131
  case "stream.subscribe":
28759
29132
  return;
29133
+ case "channel.invite.create":
29134
+ case "channel.invite.revoke":
29135
+ case "channel.invite.redeem":
29136
+ throw new Error(`${command.kind} must be executed by the durable broker command service, not the in-memory registry.`);
28760
29137
  default: {
28761
29138
  const exhaustive = command;
28762
29139
  return exhaustive;
@@ -29517,7 +29894,7 @@ init_node_identity();
29517
29894
 
29518
29895
  // ../runtime/src/mesh-peer-auth.ts
29519
29896
  init_node_identity();
29520
- import { createHash as createHash3, randomBytes as randomBytes3 } from "crypto";
29897
+ import { createHash as createHash4, randomBytes as randomBytes3 } from "crypto";
29521
29898
  var PEER_AUTH_HEADERS = {
29522
29899
  peer: "x-openscout-peer",
29523
29900
  ts: "x-openscout-ts",
@@ -29552,7 +29929,7 @@ function peerRequestSigningPayload(input) {
29552
29929
  `);
29553
29930
  }
29554
29931
  function sha256Hex(body) {
29555
- return createHash3("sha256").update(body).digest("hex");
29932
+ return createHash4("sha256").update(body).digest("hex");
29556
29933
  }
29557
29934
  function signPeerRequest(identity, input) {
29558
29935
  const ts = input.ts ?? Date.now();
@@ -29617,7 +29994,7 @@ import { connect as tlsConnect } from "tls";
29617
29994
 
29618
29995
  // ../runtime/src/node-tls-identity.ts
29619
29996
  import {
29620
- createHash as createHash4,
29997
+ createHash as createHash5,
29621
29998
  createPrivateKey as createPrivateKey2,
29622
29999
  createPublicKey as createPublicKey2,
29623
30000
  generateKeyPairSync as generateKeyPairSync2,
@@ -41691,7 +42068,7 @@ init_support_paths();
41691
42068
  var TLS_CERT_VALIDITY_MS = 365 * 24 * 60 * 60 * 1000;
41692
42069
  var TLS_CERT_RENEWAL_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
41693
42070
  function tlsSpkiFingerprintFromDer(spkiDer) {
41694
- return createHash4("sha256").update(spkiDer).digest("hex");
42071
+ return createHash5("sha256").update(spkiDer).digest("hex");
41695
42072
  }
41696
42073
  function tlsSpkiFingerprintFromCertificateDer(certificateDer) {
41697
42074
  const certificate2 = new X509Certificate(asBufferSource(certificateDer));
@@ -42410,7 +42787,7 @@ var require3 = createRequire2(import.meta.url);
42410
42787
  // ../runtime/src/mesh-bind-controller.ts
42411
42788
  init_broker_process_manager();
42412
42789
  // ../runtime/src/mesh-sas.ts
42413
- import { createHash as createHash5, createHmac } from "crypto";
42790
+ import { createHash as createHash6, createHmac } from "crypto";
42414
42791
 
42415
42792
  // ../runtime/src/eff-short-wordlist.ts
42416
42793
  var EFF_SHORT_WORDLIST = [
@@ -43715,7 +44092,7 @@ var EFF_SHORT_WORDLIST = [
43715
44092
  // ../runtime/src/mesh-sas.ts
43716
44093
  var SAS_WORD_COUNT = 6;
43717
44094
  function createEnrollmentCommitment(nonce, cardSignature) {
43718
- return createHash5("sha256").update(Buffer.concat([nonce, Buffer.from(cardSignature, "utf8")])).digest("base64");
44095
+ return createHash6("sha256").update(Buffer.concat([nonce, Buffer.from(cardSignature, "utf8")])).digest("base64");
43719
44096
  }
43720
44097
  function verifyEnrollmentCommitment(commitment, nonce, cardSignature) {
43721
44098
  const expected = createEnrollmentCommitment(nonce, cardSignature);
@@ -44137,7 +44514,10 @@ var MODEL_CONTEXT_WINDOWS = {
44137
44514
  var RUNTIME_MODEL_CONTEXT_WINDOWS = {
44138
44515
  "gpt-6-astra": 1050000,
44139
44516
  "grok-4-6": 500000,
44140
- "grok-4-5": 500000
44517
+ "grok-4-5": 500000,
44518
+ "swe-2-high": 262000,
44519
+ "swe-2-medium": 262000,
44520
+ "swe-2-max": 262000
44141
44521
  };
44142
44522
 
44143
44523
  // ../agent-sessions/src/model-catalog.ts
@@ -44573,14 +44953,14 @@ init_src();
44573
44953
  // ../runtime/src/provisional-agent-names-config.ts
44574
44954
  init_src();
44575
44955
  init_user_config();
44576
- import { existsSync as existsSync26, readFileSync as readFileSync15, writeFileSync as writeFileSync9, mkdirSync as mkdirSync9 } from "fs";
44577
- import { homedir as homedir21 } from "os";
44578
- import { isAbsolute as isAbsolute3, join as join28, resolve as resolve13 } from "path";
44956
+ import { existsSync as existsSync27, readFileSync as readFileSync15, writeFileSync as writeFileSync9, mkdirSync as mkdirSync9 } from "fs";
44957
+ import { homedir as homedir22 } from "os";
44958
+ import { isAbsolute as isAbsolute3, join as join29, resolve as resolve13 } from "path";
44579
44959
  function openScoutHome() {
44580
- return process.env.OPENSCOUT_HOME ?? join28(homedir21(), ".openscout");
44960
+ return process.env.OPENSCOUT_HOME ?? join29(homedir22(), ".openscout");
44581
44961
  }
44582
44962
  function defaultProvisionalAgentNamesPath() {
44583
- return join28(openScoutHome(), "provisional-agent-names.json");
44963
+ return join29(openScoutHome(), "provisional-agent-names.json");
44584
44964
  }
44585
44965
  function resolveProvisionalAgentNamesMode(config) {
44586
44966
  return config.provisionalAgentNamesMode === "extend" ? "extend" : "replace";
@@ -44625,7 +45005,7 @@ function loadInlineProvisionalAgentNames(config) {
44625
45005
  }
44626
45006
  function loadFileProvisionalAgentNames(config = loadUserConfig()) {
44627
45007
  const envFile = process.env.OPENSCOUT_PROVISIONAL_AGENT_NAMES_FILE?.trim();
44628
- if (envFile && existsSync26(envFile)) {
45008
+ if (envFile && existsSync27(envFile)) {
44629
45009
  const names2 = readProvisionalAgentNamesJsonFile(envFile);
44630
45010
  if (names2.length > 0) {
44631
45011
  return { names: names2, source: "env-file", sourcePath: envFile };
@@ -44633,7 +45013,7 @@ function loadFileProvisionalAgentNames(config = loadUserConfig()) {
44633
45013
  }
44634
45014
  if (config.provisionalAgentNamesFile?.trim()) {
44635
45015
  const filePath = resolvePoolFilePath(config.provisionalAgentNamesFile);
44636
- if (existsSync26(filePath)) {
45016
+ if (existsSync27(filePath)) {
44637
45017
  const names2 = readProvisionalAgentNamesJsonFile(filePath);
44638
45018
  if (names2.length > 0) {
44639
45019
  return { names: names2, source: "user-config-file", sourcePath: filePath };
@@ -44641,7 +45021,7 @@ function loadFileProvisionalAgentNames(config = loadUserConfig()) {
44641
45021
  }
44642
45022
  }
44643
45023
  const homeJson = defaultProvisionalAgentNamesPath();
44644
- if (existsSync26(homeJson)) {
45024
+ if (existsSync27(homeJson)) {
44645
45025
  const names2 = readProvisionalAgentNamesJsonFile(homeJson);
44646
45026
  if (names2.length > 0) {
44647
45027
  return { names: names2, source: "home-json", sourcePath: homeJson };
@@ -45059,7 +45439,8 @@ var directLocalAgentTransports = new Set([
45059
45439
  "grok_acp",
45060
45440
  "kimi_acp",
45061
45441
  "cursor_acp",
45062
- "opencode_acp"
45442
+ "opencode_acp",
45443
+ "devin_acp"
45063
45444
  ]);
45064
45445
 
45065
45446
  // ../runtime/src/broker-endpoint-selection.ts
@@ -45625,7 +46006,7 @@ import { Database } from "bun:sqlite";
45625
46006
  import { mkdirSync as mkdirSync10, readFileSync as readFileSync16 } from "fs";
45626
46007
  import { connect as connectHttp2 } from "http2";
45627
46008
  import { createPrivateKey as createPrivateKey3, sign as signWithKey } from "crypto";
45628
- import { dirname as dirname17, join as join29 } from "path";
46009
+ import { dirname as dirname17, join as join30 } from "path";
45629
46010
  var MOBILE_PUSH_SCHEMA = `
45630
46011
  CREATE TABLE IF NOT EXISTS mobile_push_registrations (
45631
46012
  id TEXT PRIMARY KEY,
@@ -45653,7 +46034,7 @@ var dbHandle = null;
45653
46034
  var dbPath = null;
45654
46035
  var cachedApnsJwt = null;
45655
46036
  function resolveControlPlaneDbPath() {
45656
- return join29(resolveOpenScoutSupportPaths().controlHome, "control-plane.sqlite");
46037
+ return join30(resolveOpenScoutSupportPaths().controlHome, "control-plane.sqlite");
45657
46038
  }
45658
46039
  function ensureMobilePushSchema(database) {
45659
46040
  database.exec("PRAGMA busy_timeout = 5000;");
@@ -45699,6 +46080,7 @@ function resolvePushRelayConfig() {
45699
46080
  meshId: process.env.OPENSCOUT_PUSH_RELAY_MESH_ID?.trim() || null
45700
46081
  };
45701
46082
  }
46083
+ var PUSH_RELAY_TRANSPORT_DEVICE_ID = "push-relay";
45702
46084
  function relayAuthHeader(sessionToken) {
45703
46085
  return sessionToken.startsWith("osn_session_") ? `Bearer ${sessionToken}` : `Bearer osn_session_${sessionToken}`;
45704
46086
  }
@@ -45780,7 +46162,7 @@ async function broadcastPushRelayAlert(alert) {
45780
46162
  retryAfterSeconds: retryAfter ? Number.parseInt(retryAfter, 10) || null : null,
45781
46163
  rateLimitWindow: window2,
45782
46164
  failures: [{
45783
- deviceId: "push-relay",
46165
+ deviceId: PUSH_RELAY_TRANSPORT_DEVICE_ID,
45784
46166
  tokenSuffix: "relay",
45785
46167
  status: 429,
45786
46168
  reason: detail || `HTTP 429 (window=${window2 ?? "unknown"})`
@@ -45796,7 +46178,7 @@ async function broadcastPushRelayAlert(alert) {
45796
46178
  failedCount: 1,
45797
46179
  configMissing: false,
45798
46180
  failures: [{
45799
- deviceId: "push-relay",
46181
+ deviceId: PUSH_RELAY_TRANSPORT_DEVICE_ID,
45800
46182
  tokenSuffix: "relay",
45801
46183
  status: response.status,
45802
46184
  reason: detail || `HTTP ${response.status}`
@@ -46110,15 +46492,30 @@ async function sendApnsAlertToRegistration(registration, alert) {
46110
46492
  request.end(payload);
46111
46493
  });
46112
46494
  }
46495
+ function relayRejectedOurCredential(result) {
46496
+ return result.failures.some((failure) => failure.deviceId === PUSH_RELAY_TRANSPORT_DEVICE_ID && (failure.status === 401 || failure.status === 403));
46497
+ }
46498
+ function hasDirectApnsCredentials() {
46499
+ try {
46500
+ return loadApnsCredentials() !== null;
46501
+ } catch {
46502
+ return false;
46503
+ }
46504
+ }
46113
46505
  async function broadcastApnsAlertToActiveMobileDevices(alert) {
46506
+ let relayFailures = [];
46114
46507
  if (resolvePushRelayConfig()) {
46115
- return broadcastPushRelayAlert(alert);
46508
+ const relayResult = await broadcastPushRelayAlert(alert);
46509
+ if (!relayRejectedOurCredential(relayResult) || !hasDirectApnsCredentials()) {
46510
+ return relayResult;
46511
+ }
46512
+ relayFailures = relayResult.failures;
46116
46513
  }
46117
46514
  const registrations = listActiveMobilePushRegistrations();
46118
46515
  let deliveredCount = 0;
46119
46516
  let skippedCount = 0;
46120
46517
  let configMissing = false;
46121
- const failures = [];
46518
+ const failures = [...relayFailures];
46122
46519
  for (const registration of registrations) {
46123
46520
  try {
46124
46521
  const outcome = await sendApnsAlertToRegistration(registration, alert);
@@ -46821,9 +47218,9 @@ function normalizeNodeId(value) {
46821
47218
 
46822
47219
  // ../web/server/core/pairing/runtime/relay-runtime.ts
46823
47220
  init_system_probes();
46824
- import { existsSync as existsSync27, mkdirSync as mkdirSync12 } from "fs";
46825
- import { homedir as homedir22, networkInterfaces as networkInterfaces2 } from "os";
46826
- import { join as join30 } from "path";
47221
+ import { existsSync as existsSync28, mkdirSync as mkdirSync12 } from "fs";
47222
+ import { homedir as homedir23, networkInterfaces as networkInterfaces2 } from "os";
47223
+ import { join as join31 } from "path";
46827
47224
 
46828
47225
  // ../web/server/core/pairing/runtime/log.ts
46829
47226
  import { appendFileSync, mkdirSync as mkdirSync11 } from "fs";
@@ -47115,14 +47512,14 @@ function parseRelayEnvelope(data) {
47115
47512
  }
47116
47513
 
47117
47514
  // ../web/server/core/pairing/runtime/relay-runtime.ts
47118
- var PAIRING_DIR = join30(homedir22(), ".scout/pairing");
47515
+ var PAIRING_DIR = join31(homedir23(), ".scout/pairing");
47119
47516
  async function findStoredTailscaleCert(hostname3) {
47120
- if (!existsSync27(PAIRING_DIR)) {
47517
+ if (!existsSync28(PAIRING_DIR)) {
47121
47518
  return null;
47122
47519
  }
47123
- const certPath = join30(PAIRING_DIR, `${hostname3}.crt`);
47124
- const keyPath = join30(PAIRING_DIR, `${hostname3}.key`);
47125
- if (!existsSync27(certPath) || !existsSync27(keyPath)) {
47520
+ const certPath = join31(PAIRING_DIR, `${hostname3}.crt`);
47521
+ const keyPath = join31(PAIRING_DIR, `${hostname3}.key`);
47522
+ if (!existsSync28(certPath) || !existsSync28(keyPath)) {
47126
47523
  return null;
47127
47524
  }
47128
47525
  if (!await storedCertificateLooksPubliclyTrusted(certPath)) {
@@ -47206,8 +47603,8 @@ function resolveRelayEndpointForTailscaleStatus(port, tailscale2, options = {})
47206
47603
  }
47207
47604
  async function generateTailscaleCerts(hostname3) {
47208
47605
  mkdirSync12(PAIRING_DIR, { recursive: true });
47209
- const certPath = join30(PAIRING_DIR, `${hostname3}.crt`);
47210
- const keyPath = join30(PAIRING_DIR, `${hostname3}.key`);
47606
+ const certPath = join31(PAIRING_DIR, `${hostname3}.crt`);
47607
+ const keyPath = join31(PAIRING_DIR, `${hostname3}.key`);
47211
47608
  try {
47212
47609
  pairingLog.info("relay", "generating tailscale TLS cert", { hostname: hostname3 });
47213
47610
  await execSystemFile("tailscale", ["cert", "--cert-file", certPath, "--key-file", keyPath, hostname3], {
@@ -47332,7 +47729,7 @@ function parseIPv42(address) {
47332
47729
  }
47333
47730
 
47334
47731
  // ../web/server/core/pairing/runtime/runtime-state.ts
47335
- import { existsSync as existsSync29, mkdirSync as mkdirSync14, readFileSync as readFileSync18, renameSync as renameSync5, unlinkSync, writeFileSync as writeFileSync11 } from "fs";
47732
+ import { existsSync as existsSync30, mkdirSync as mkdirSync14, readFileSync as readFileSync18, renameSync as renameSync5, unlinkSync, writeFileSync as writeFileSync11 } from "fs";
47336
47733
 
47337
47734
  // ../../node_modules/.bun/@noble+hashes@2.0.1/node_modules/@noble/hashes/utils.js
47338
47735
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
@@ -49368,14 +49765,14 @@ function concat3(...arrays) {
49368
49765
  return result;
49369
49766
  }
49370
49767
  // ../web/server/core/pairing/runtime/security/identity.ts
49371
- import { existsSync as existsSync28, mkdirSync as mkdirSync13, readFileSync as readFileSync17, writeFileSync as writeFileSync10 } from "fs";
49372
- import { join as join31 } from "path";
49373
- import { homedir as homedir23 } from "os";
49374
- var PAIRING_DIR2 = join31(homedir23(), ".scout/pairing");
49375
- var IDENTITY_FILE = join31(PAIRING_DIR2, "identity.json");
49376
- var TRUSTED_PEERS_FILE = join31(PAIRING_DIR2, "trusted-peers.json");
49768
+ import { existsSync as existsSync29, mkdirSync as mkdirSync13, readFileSync as readFileSync17, writeFileSync as writeFileSync10 } from "fs";
49769
+ import { join as join32 } from "path";
49770
+ import { homedir as homedir24 } from "os";
49771
+ var PAIRING_DIR2 = join32(homedir24(), ".scout/pairing");
49772
+ var IDENTITY_FILE = join32(PAIRING_DIR2, "identity.json");
49773
+ var TRUSTED_PEERS_FILE = join32(PAIRING_DIR2, "trusted-peers.json");
49377
49774
  function loadOrCreateIdentity() {
49378
- if (existsSync28(IDENTITY_FILE)) {
49775
+ if (existsSync29(IDENTITY_FILE)) {
49379
49776
  return loadIdentity();
49380
49777
  }
49381
49778
  return createAndSaveIdentity();
@@ -49399,7 +49796,7 @@ function createAndSaveIdentity() {
49399
49796
  return keyPair;
49400
49797
  }
49401
49798
  function loadTrustedPeers() {
49402
- if (!existsSync28(TRUSTED_PEERS_FILE))
49799
+ if (!existsSync29(TRUSTED_PEERS_FILE))
49403
49800
  return new Map;
49404
49801
  const data = JSON.parse(readFileSync17(TRUSTED_PEERS_FILE, "utf8"));
49405
49802
  return new Map(data.map((p) => [p.publicKey, p]));
@@ -49593,7 +49990,7 @@ function trustedPeerCount() {
49593
49990
  // ../web/server/core/pairing/runtime/runtime-state.ts
49594
49991
  function readPairingRuntimeSnapshot() {
49595
49992
  const { runtimeStatePath } = pairingPaths();
49596
- if (!existsSync29(runtimeStatePath)) {
49993
+ if (!existsSync30(runtimeStatePath)) {
49597
49994
  return null;
49598
49995
  }
49599
49996
  try {
@@ -49622,7 +50019,7 @@ function clearPairingRuntimeSnapshot() {
49622
50019
  }
49623
50020
  function readPairingRuntimePid() {
49624
50021
  const { runtimePidPath } = pairingPaths();
49625
- if (!existsSync29(runtimePidPath)) {
50022
+ if (!existsSync30(runtimePidPath)) {
49626
50023
  return null;
49627
50024
  }
49628
50025
  try {
@@ -49702,7 +50099,7 @@ function writeJsonAtomically(filePath, value) {
49702
50099
  }
49703
50100
 
49704
50101
  // ../web/server/core/pairing/runtime/runtime.ts
49705
- import { homedir as homedir41 } from "os";
50102
+ import { homedir as homedir42 } from "os";
49706
50103
 
49707
50104
  // ../agent-sessions/src/index.ts
49708
50105
  init_registry2();
@@ -49932,7 +50329,7 @@ function stringifyUnknown(value) {
49932
50329
  return String(value);
49933
50330
  }
49934
50331
  }
49935
- function isRecord9(value) {
50332
+ function isRecord10(value) {
49936
50333
  return !!value && typeof value === "object" && !Array.isArray(value);
49937
50334
  }
49938
50335
  function maybeString(value) {
@@ -49975,7 +50372,7 @@ function renderContentPartsText(content) {
49975
50372
  if (typeof entry === "string") {
49976
50373
  return entry;
49977
50374
  }
49978
- if (!isRecord9(entry)) {
50375
+ if (!isRecord10(entry)) {
49979
50376
  return "";
49980
50377
  }
49981
50378
  if (typeof entry.text === "string") {
@@ -50188,7 +50585,7 @@ class ClaudeCodeHistoryParser {
50188
50585
  if (recordCwd && !this.session.cwd) {
50189
50586
  this.session.cwd = recordCwd;
50190
50587
  }
50191
- const message = isRecord9(record.message) ? record.message : null;
50588
+ const message = isRecord10(record.message) ? record.message : null;
50192
50589
  const model = maybeString(message?.model);
50193
50590
  if (model && this.session.model !== model) {
50194
50591
  this.session.model = model;
@@ -50207,13 +50604,13 @@ class ClaudeCodeHistoryParser {
50207
50604
  }
50208
50605
  readClaudeUsageEntry(record) {
50209
50606
  const type = maybeString(record.type);
50210
- const message = isRecord9(record.message) ? record.message : null;
50607
+ const message = isRecord10(record.message) ? record.message : null;
50211
50608
  const role = maybeString(message?.role);
50212
50609
  if (type !== "assistant" && role !== "assistant") {
50213
50610
  return null;
50214
50611
  }
50215
- const usage = isRecord9(message?.usage) ? message.usage : null;
50216
- const serverToolUse = isRecord9(usage?.server_tool_use) ? usage.server_tool_use : null;
50612
+ const usage = isRecord10(message?.usage) ? message.usage : null;
50613
+ const serverToolUse = isRecord10(usage?.server_tool_use) ? usage.server_tool_use : null;
50217
50614
  const inputTokens = maybeNumber(usage?.input_tokens) ?? 0;
50218
50615
  const cacheReadInputTokens = maybeNumber(usage?.cache_read_input_tokens) ?? 0;
50219
50616
  const cacheCreationInputTokens = maybeNumber(usage?.cache_creation_input_tokens) ?? 0;
@@ -50312,10 +50709,10 @@ class ClaudeCodeHistoryParser {
50312
50709
  return changed;
50313
50710
  }
50314
50711
  ensureObserveMetaRecord(key) {
50315
- const providerMeta = isRecord9(this.session.providerMeta) ? this.session.providerMeta : {};
50712
+ const providerMeta = isRecord10(this.session.providerMeta) ? this.session.providerMeta : {};
50316
50713
  this.session.providerMeta = providerMeta;
50317
50714
  const existing = providerMeta[key];
50318
- if (isRecord9(existing)) {
50715
+ if (isRecord10(existing)) {
50319
50716
  return existing;
50320
50717
  }
50321
50718
  const next = {};
@@ -50788,7 +51185,7 @@ class PiHistoryParser {
50788
51185
  let record;
50789
51186
  try {
50790
51187
  const parsed = JSON.parse(trimmed);
50791
- if (!isRecord9(parsed)) {
51188
+ if (!isRecord10(parsed)) {
50792
51189
  this.skippedLineCount += 1;
50793
51190
  return;
50794
51191
  }
@@ -50831,7 +51228,7 @@ class PiHistoryParser {
50831
51228
  }
50832
51229
  return true;
50833
51230
  }
50834
- if (type !== "message" || !isRecord9(record.message)) {
51231
+ if (type !== "message" || !isRecord10(record.message)) {
50835
51232
  return false;
50836
51233
  }
50837
51234
  const message = record.message;
@@ -50887,7 +51284,7 @@ class PiHistoryParser {
50887
51284
  const content = Array.isArray(message.content) ? message.content : [];
50888
51285
  let hasOpenToolCall = false;
50889
51286
  for (const part of content) {
50890
- if (!isRecord9(part))
51287
+ if (!isRecord10(part))
50891
51288
  continue;
50892
51289
  const type = maybeString(part.type);
50893
51290
  if (type === "thinking") {
@@ -50959,7 +51356,7 @@ class PiHistoryParser {
50959
51356
  providerMeta.provider = provider;
50960
51357
  changed = true;
50961
51358
  }
50962
- if (isRecord9(message.usage)) {
51359
+ if (isRecord10(message.usage)) {
50963
51360
  const usage = this.ensureObserveMetaRecord("observeUsage");
50964
51361
  const inputTokens = maybeNumber(message.usage.input);
50965
51362
  const outputTokens = maybeNumber(message.usage.output);
@@ -51055,7 +51452,7 @@ class PiHistoryParser {
51055
51452
  });
51056
51453
  }
51057
51454
  buildAction(toolName2, toolCallId, input) {
51058
- if (toolName2 === "bash" && isRecord9(input)) {
51455
+ if (toolName2 === "bash" && isRecord10(input)) {
51059
51456
  return {
51060
51457
  kind: "command",
51061
51458
  command: maybeString(input.command) ?? "",
@@ -51063,7 +51460,7 @@ class PiHistoryParser {
51063
51460
  output: ""
51064
51461
  };
51065
51462
  }
51066
- if ((toolName2 === "edit" || toolName2 === "write") && isRecord9(input)) {
51463
+ if ((toolName2 === "edit" || toolName2 === "write") && isRecord10(input)) {
51067
51464
  return {
51068
51465
  kind: "file_change",
51069
51466
  path: maybeString(input.file_path) ?? maybeString(input.path) ?? "",
@@ -51082,14 +51479,14 @@ class PiHistoryParser {
51082
51479
  };
51083
51480
  }
51084
51481
  ensureProviderMeta() {
51085
- const providerMeta = isRecord9(this.session.providerMeta) ? this.session.providerMeta : {};
51482
+ const providerMeta = isRecord10(this.session.providerMeta) ? this.session.providerMeta : {};
51086
51483
  this.session.providerMeta = providerMeta;
51087
51484
  return providerMeta;
51088
51485
  }
51089
51486
  ensureObserveMetaRecord(key) {
51090
51487
  const providerMeta = this.ensureProviderMeta();
51091
51488
  const existing = providerMeta[key];
51092
- if (isRecord9(existing)) {
51489
+ if (isRecord10(existing)) {
51093
51490
  return existing;
51094
51491
  }
51095
51492
  const next = {};
@@ -51161,7 +51558,7 @@ class CodexHistoryParser {
51161
51558
  let record;
51162
51559
  try {
51163
51560
  const parsed = JSON.parse(trimmed);
51164
- if (!isRecord9(parsed)) {
51561
+ if (!isRecord10(parsed)) {
51165
51562
  skippedLineCount += 1;
51166
51563
  continue;
51167
51564
  }
@@ -51213,7 +51610,7 @@ class CodexHistoryParser {
51213
51610
  }
51214
51611
  }
51215
51612
  handleSessionMeta(record, capturedAt) {
51216
- const payload = isRecord9(record.payload) ? record.payload : {};
51613
+ const payload = isRecord10(record.payload) ? record.payload : {};
51217
51614
  let changed = false;
51218
51615
  const providerMeta = this.ensureProviderMeta();
51219
51616
  const externalSessionId = maybeString(payload.id);
@@ -51229,7 +51626,7 @@ class CodexHistoryParser {
51229
51626
  }
51230
51627
  changed = true;
51231
51628
  }
51232
- const git2 = isRecord9(payload.git) ? payload.git : null;
51629
+ const git2 = isRecord10(payload.git) ? payload.git : null;
51233
51630
  const runtime = this.ensureObserveMetaRecord("observeRuntime");
51234
51631
  changed = this.assignObserveString(runtime, "originator", payload.originator) || changed;
51235
51632
  changed = this.assignObserveString(runtime, "cliVersion", payload.cli_version) || changed;
@@ -51244,7 +51641,7 @@ class CodexHistoryParser {
51244
51641
  }
51245
51642
  }
51246
51643
  handleTurnContext(record, capturedAt) {
51247
- const payload = isRecord9(record.payload) ? record.payload : {};
51644
+ const payload = isRecord10(record.payload) ? record.payload : {};
51248
51645
  let changed = false;
51249
51646
  const cwd = maybeString(payload.cwd);
51250
51647
  if (cwd && this.session.cwd !== cwd) {
@@ -51262,7 +51659,7 @@ class CodexHistoryParser {
51262
51659
  changed = this.assignObserveString(runtime, "timezone", payload.timezone) || changed;
51263
51660
  changed = this.assignObserveString(runtime, "effort", payload.effort) || changed;
51264
51661
  changed = this.assignObserveString(runtime, "personality", payload.personality) || changed;
51265
- if (isRecord9(payload.sandbox_policy) && runtime.sandboxPolicy !== payload.sandbox_policy) {
51662
+ if (isRecord10(payload.sandbox_policy) && runtime.sandboxPolicy !== payload.sandbox_policy) {
51266
51663
  runtime.sandboxPolicy = payload.sandbox_policy;
51267
51664
  changed = true;
51268
51665
  }
@@ -51271,7 +51668,7 @@ class CodexHistoryParser {
51271
51668
  }
51272
51669
  }
51273
51670
  handleEventMessage(record, capturedAt) {
51274
- const payload = isRecord9(record.payload) ? record.payload : {};
51671
+ const payload = isRecord10(record.payload) ? record.payload : {};
51275
51672
  const eventType = maybeString(payload.type);
51276
51673
  if (!eventType) {
51277
51674
  return;
@@ -51310,7 +51707,7 @@ class CodexHistoryParser {
51310
51707
  }
51311
51708
  }
51312
51709
  handleResponseItem(record, capturedAt) {
51313
- const payload = isRecord9(record.payload) ? record.payload : {};
51710
+ const payload = isRecord10(record.payload) ? record.payload : {};
51314
51711
  const itemType = maybeString(payload.type);
51315
51712
  if (!itemType) {
51316
51713
  return;
@@ -51410,7 +51807,7 @@ class CodexHistoryParser {
51410
51807
  }
51411
51808
  }
51412
51809
  buildAction(toolName2, toolCallId, input) {
51413
- const inputRecord = isRecord9(input) ? input : {};
51810
+ const inputRecord = isRecord10(input) ? input : {};
51414
51811
  if (toolName2 === "exec_command") {
51415
51812
  return {
51416
51813
  kind: "command",
@@ -51635,8 +52032,8 @@ class CodexHistoryParser {
51635
52032
  return false;
51636
52033
  }
51637
52034
  const metadata = this.ensureObserveMetaRecord("observeHostMetadata");
51638
- const directives = Array.isArray(metadata.directives) ? metadata.directives.filter(isRecord9) : [];
51639
- const memoryCitations = Array.isArray(metadata.memoryCitations) ? metadata.memoryCitations.filter(isRecord9) : [];
52035
+ const directives = Array.isArray(metadata.directives) ? metadata.directives.filter(isRecord10) : [];
52036
+ const memoryCitations = Array.isArray(metadata.memoryCitations) ? metadata.memoryCitations.filter(isRecord10) : [];
51640
52037
  for (const entry of fresh) {
51641
52038
  if (entry.kind === "directive") {
51642
52039
  directives.push({
@@ -51688,14 +52085,14 @@ class CodexHistoryParser {
51688
52085
  });
51689
52086
  }
51690
52087
  ensureProviderMeta() {
51691
- const providerMeta = isRecord9(this.session.providerMeta) ? this.session.providerMeta : {};
52088
+ const providerMeta = isRecord10(this.session.providerMeta) ? this.session.providerMeta : {};
51692
52089
  this.session.providerMeta = providerMeta;
51693
52090
  return providerMeta;
51694
52091
  }
51695
52092
  ensureObserveMetaRecord(key) {
51696
52093
  const providerMeta = this.ensureProviderMeta();
51697
52094
  const existing = providerMeta[key];
51698
- if (isRecord9(existing)) {
52095
+ if (isRecord10(existing)) {
51699
52096
  return existing;
51700
52097
  }
51701
52098
  const next = {};
@@ -51758,9 +52155,9 @@ function createHistorySessionSnapshot(input) {
51758
52155
  };
51759
52156
  }
51760
52157
  // ../agent-sessions/src/adapters/claude-code/adapter.ts
51761
- import { existsSync as existsSync31, readdirSync as readdirSync5, statSync as statSync8 } from "fs";
51762
- import { homedir as homedir25 } from "os";
51763
- import { delimiter as delimiter3, join as join33 } from "path";
52158
+ import { existsSync as existsSync32, readdirSync as readdirSync5, statSync as statSync8 } from "fs";
52159
+ import { homedir as homedir26 } from "os";
52160
+ import { delimiter as delimiter3, join as join34 } from "path";
51764
52161
 
51765
52162
  // ../agent-sessions/src/protocol/live-normalizer-context.ts
51766
52163
  function createLiveNormalizerContext(sessionId) {
@@ -51772,9 +52169,9 @@ function createLiveNormalizerContext(sessionId) {
51772
52169
  }
51773
52170
 
51774
52171
  // ../agent-sessions/src/adapters/claude-code/team-topology.ts
51775
- import { existsSync as existsSync30, readdirSync as readdirSync4, readFileSync as readFileSync19, statSync as statSync7 } from "fs";
51776
- import { homedir as homedir24 } from "os";
51777
- import { basename as basename12, dirname as dirname19, join as join32, relative as relative3 } from "path";
52172
+ import { existsSync as existsSync31, readdirSync as readdirSync4, readFileSync as readFileSync19, statSync as statSync7 } from "fs";
52173
+ import { homedir as homedir25 } from "os";
52174
+ import { basename as basename12, dirname as dirname19, join as join33, relative as relative3 } from "path";
51778
52175
  var TOPOLOGY_SCHEMA_VERSION2 = "openscout.observed-harness-topology.v1";
51779
52176
  var CLAUDE_TOPOLOGY_SOURCE = "claude-code-agent-teams";
51780
52177
  var SESSION_ID_KEYS = new Set([
@@ -51798,13 +52195,13 @@ var CWD_KEYS = new Set([
51798
52195
  function isObject2(value) {
51799
52196
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
51800
52197
  }
51801
- function stringValue6(value) {
52198
+ function stringValue7(value) {
51802
52199
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
51803
52200
  }
51804
- function stringArray5(value) {
52201
+ function stringArray6(value) {
51805
52202
  if (!Array.isArray(value))
51806
52203
  return [];
51807
- return value.map((entry) => stringValue6(entry)).filter((entry) => Boolean(entry));
52204
+ return value.map((entry) => stringValue7(entry)).filter((entry) => Boolean(entry));
51808
52205
  }
51809
52206
  function keyToken(key) {
51810
52207
  return key.replace(/[^a-zA-Z0-9_]/g, "").toLowerCase();
@@ -51838,23 +52235,23 @@ function statIsFile2(path2) {
51838
52235
  }
51839
52236
  }
51840
52237
  function readTeamConfigs(homeDir) {
51841
- const teamsRoot = join32(homeDir, ".claude", "teams");
51842
- if (!existsSync30(teamsRoot) || !statIsDirectory2(teamsRoot)) {
52238
+ const teamsRoot = join33(homeDir, ".claude", "teams");
52239
+ if (!existsSync31(teamsRoot) || !statIsDirectory2(teamsRoot)) {
51843
52240
  return [];
51844
52241
  }
51845
52242
  const teams = [];
51846
52243
  for (const entry of readdirSync4(teamsRoot)) {
51847
- const teamDir = join32(teamsRoot, entry);
52244
+ const teamDir = join33(teamsRoot, entry);
51848
52245
  if (!statIsDirectory2(teamDir)) {
51849
52246
  continue;
51850
52247
  }
51851
- const configPath = join32(teamDir, "config.json");
52248
+ const configPath = join33(teamDir, "config.json");
51852
52249
  const config = readJsonObject(configPath);
51853
52250
  if (!config) {
51854
52251
  continue;
51855
52252
  }
51856
52253
  teams.push({
51857
- teamName: stringValue6(config.name) ?? stringValue6(config.teamName) ?? entry,
52254
+ teamName: stringValue7(config.name) ?? stringValue7(config.teamName) ?? entry,
51858
52255
  configPath,
51859
52256
  config
51860
52257
  });
@@ -51878,7 +52275,7 @@ function objectContainsKeyedValue(value, expected, keys, seen = new Set) {
51878
52275
  seen.add(value);
51879
52276
  for (const [key, nested] of Object.entries(value)) {
51880
52277
  const normalizedKey = keyToken(key);
51881
- if (keys.has(normalizedKey) && stringValue6(nested) === expected) {
52278
+ if (keys.has(normalizedKey) && stringValue7(nested) === expected) {
51882
52279
  return true;
51883
52280
  }
51884
52281
  if (objectContainsKeyedValue(nested, expected, keys, seen)) {
@@ -51912,7 +52309,7 @@ function asMemberEntries(value) {
51912
52309
  }
51913
52310
  function firstString2(record, keys) {
51914
52311
  for (const key of keys) {
51915
- const value = stringValue6(record[key]);
52312
+ const value = stringValue7(record[key]);
51916
52313
  if (value)
51917
52314
  return value;
51918
52315
  }
@@ -51937,7 +52334,7 @@ function firstStringDeepForKeys(value, keys, seen = new Set) {
51937
52334
  seen.add(value);
51938
52335
  for (const [key, nested] of Object.entries(value)) {
51939
52336
  if (keys.has(keyToken(key))) {
51940
- const direct = stringValue6(nested);
52337
+ const direct = stringValue7(nested);
51941
52338
  if (direct)
51942
52339
  return direct;
51943
52340
  }
@@ -51986,8 +52383,8 @@ function membersFromConfig(team, groupId, configRefId) {
51986
52383
  return { agents, relationships, agentByExternal };
51987
52384
  }
51988
52385
  function readTaskFiles(tasksRoot, teamName) {
51989
- const teamTasksRoot = join32(tasksRoot, teamName);
51990
- if (!existsSync30(teamTasksRoot) || !statIsDirectory2(teamTasksRoot)) {
52386
+ const teamTasksRoot = join33(tasksRoot, teamName);
52387
+ if (!existsSync31(teamTasksRoot) || !statIsDirectory2(teamTasksRoot)) {
51991
52388
  return [];
51992
52389
  }
51993
52390
  const result = [];
@@ -51997,7 +52394,7 @@ function readTaskFiles(tasksRoot, teamName) {
51997
52394
  if (!current)
51998
52395
  continue;
51999
52396
  for (const entry of readdirSync4(current)) {
52000
- const path2 = join32(current, entry);
52397
+ const path2 = join33(current, entry);
52001
52398
  if (statIsDirectory2(path2)) {
52002
52399
  stack.push(path2);
52003
52400
  } else if (statIsFile2(path2)) {
@@ -52032,7 +52429,7 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
52032
52429
  } catch {
52033
52430
  return null;
52034
52431
  }
52035
- const relativePath = relative3(join32(tasksRoot, teamName), taskPath);
52432
+ const relativePath = relative3(join33(tasksRoot, teamName), taskPath);
52036
52433
  const fallbackId = relativePath.replace(/\.[^.]+$/u, "");
52037
52434
  const fallbackTitle = firstMarkdownTitle(raw) ?? basename12(fallbackId);
52038
52435
  const inferredState = inferTaskStateFromPath(dirname19(relativePath));
@@ -52048,9 +52445,9 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
52048
52445
  const state = parsed ? firstString2(parsed, ["state", "status"]) ?? inferredState : inferredState;
52049
52446
  const rawAssignee = parsed ? firstString2(parsed, ["assigneeId", "assignee", "owner", "ownerId", "agentId", "assignedTo"]) : undefined;
52050
52447
  const rawDependencies = parsed ? [
52051
- ...stringArray5(parsed.dependencies),
52052
- ...stringArray5(parsed.dependsOn),
52053
- ...stringArray5(parsed.blockedBy)
52448
+ ...stringArray6(parsed.dependencies),
52449
+ ...stringArray6(parsed.dependsOn),
52450
+ ...stringArray6(parsed.blockedBy)
52054
52451
  ] : [];
52055
52452
  return {
52056
52453
  id: `claude-task:${stableSegment2(teamName)}:${stableSegment2(externalId)}`,
@@ -52066,7 +52463,7 @@ function parseTaskFile(taskPath, teamName, tasksRoot, sourceRef) {
52066
52463
  };
52067
52464
  }
52068
52465
  function tasksFromFiles(homeDir, teamName, agentByExternal) {
52069
- const tasksRoot = join32(homeDir, ".claude", "tasks");
52466
+ const tasksRoot = join33(homeDir, ".claude", "tasks");
52070
52467
  const taskFiles = readTaskFiles(tasksRoot, teamName);
52071
52468
  const sourceRefs = [];
52072
52469
  const parsedTasks = [];
@@ -52154,7 +52551,7 @@ function leaderAgentForTeam(team, groupId, configRefId, options) {
52154
52551
  };
52155
52552
  }
52156
52553
  function readClaudeAgentTeamTopology(options = {}) {
52157
- const homeDir = options.homeDir ?? homedir24();
52554
+ const homeDir = options.homeDir ?? homedir25();
52158
52555
  const teams = readTeamConfigs(homeDir).filter((team) => teamMatches(team, options));
52159
52556
  if (teams.length === 0) {
52160
52557
  return null;
@@ -52232,7 +52629,7 @@ function record(value) {
52232
52629
  function arrayValue(value) {
52233
52630
  return Array.isArray(value) ? value : [];
52234
52631
  }
52235
- function stringValue7(value) {
52632
+ function stringValue8(value) {
52236
52633
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
52237
52634
  }
52238
52635
  function numberValue3(value) {
@@ -52259,7 +52656,7 @@ function readString4(source, keys) {
52259
52656
  if (!source)
52260
52657
  return;
52261
52658
  for (const key of keys) {
52262
- const value = stringValue7(source[key]);
52659
+ const value = stringValue8(source[key]);
52263
52660
  if (value !== undefined)
52264
52661
  return value;
52265
52662
  }
@@ -52270,7 +52667,7 @@ function timestampValue(value) {
52270
52667
  if (parsedEpoch !== undefined) {
52271
52668
  return parsedEpoch;
52272
52669
  }
52273
- const text2 = stringValue7(value);
52670
+ const text2 = stringValue8(value);
52274
52671
  if (!text2)
52275
52672
  return;
52276
52673
  const parsed = Date.parse(text2);
@@ -53361,7 +53758,7 @@ Referenced files: ${prompt.files.join(", ")}` });
53361
53758
  this.setStatus("error");
53362
53759
  }
53363
53760
  }
53364
- var createAdapter6 = (config) => new ClaudeCodeAdapter(config);
53761
+ var createAdapter7 = (config) => new ClaudeCodeAdapter(config);
53365
53762
  async function waitForSubprocessExit(child, timeoutMs) {
53366
53763
  return await child.waitForExit(timeoutMs);
53367
53764
  }
@@ -53371,8 +53768,8 @@ function resolveClaudeResumeContext(config) {
53371
53768
  if (!resumeId) {
53372
53769
  return null;
53373
53770
  }
53374
- const projectsRoot = join33(homedir25(), ".claude", "projects");
53375
- if (!existsSync31(projectsRoot)) {
53771
+ const projectsRoot = join34(homedir26(), ".claude", "projects");
53772
+ if (!existsSync32(projectsRoot)) {
53376
53773
  return null;
53377
53774
  }
53378
53775
  let projectSlugs;
@@ -53382,8 +53779,8 @@ function resolveClaudeResumeContext(config) {
53382
53779
  return null;
53383
53780
  }
53384
53781
  for (const slug of projectSlugs) {
53385
- const sessionPath = join33(projectsRoot, slug, `${resumeId}.jsonl`);
53386
- if (!existsSync31(sessionPath)) {
53782
+ const sessionPath = join34(projectsRoot, slug, `${resumeId}.jsonl`);
53783
+ if (!existsSync32(sessionPath)) {
53387
53784
  continue;
53388
53785
  }
53389
53786
  const cwd = decodeClaudeProjectsSlug3(slug);
@@ -53423,7 +53820,7 @@ function resolveExecutableFromPath(command, env) {
53423
53820
  for (const directory of pathValue.split(delimiter3)) {
53424
53821
  if (!directory)
53425
53822
  continue;
53426
- const candidate = join33(directory, command);
53823
+ const candidate = join34(directory, command);
53427
53824
  try {
53428
53825
  if (statSync8(candidate).isFile()) {
53429
53826
  return candidate;
@@ -53434,8 +53831,8 @@ function resolveExecutableFromPath(command, env) {
53434
53831
  }
53435
53832
  // ../agent-sessions/src/adapters/codex/adapter.ts
53436
53833
  init_codex_app_server();
53437
- import { homedir as homedir26 } from "os";
53438
- import { join as join34 } from "path";
53834
+ import { homedir as homedir27 } from "os";
53835
+ import { join as join35 } from "path";
53439
53836
 
53440
53837
  // ../agent-sessions/src/adapters/codex/normalizer.ts
53441
53838
  init_normalizer();
@@ -54283,7 +54680,7 @@ class CodexAdapter extends BaseAdapter {
54283
54680
  sequence = 0;
54284
54681
  constructor(config) {
54285
54682
  super(config);
54286
- const runtimeRoot = join34(homedir26(), ".scout/pairing", "codex", this.session.id);
54683
+ const runtimeRoot = join35(homedir27(), ".scout/pairing", "codex", this.session.id);
54287
54684
  this.observedTopology = new CodexObservedTopologyTracker({
54288
54685
  cwd: config.cwd ?? process.cwd(),
54289
54686
  homeDir: config.env?.HOME,
@@ -54295,8 +54692,8 @@ class CodexAdapter extends BaseAdapter {
54295
54692
  model: this.session.model,
54296
54693
  providerMeta: {
54297
54694
  ...this.session.providerMeta ?? {},
54298
- stdoutLogFile: join34(runtimeRoot, "logs/stdout.log"),
54299
- stderrLogFile: join34(runtimeRoot, "logs/stderr.log")
54695
+ stdoutLogFile: join35(runtimeRoot, "logs/stdout.log"),
54696
+ stderrLogFile: join35(runtimeRoot, "logs/stderr.log")
54300
54697
  }
54301
54698
  });
54302
54699
  }
@@ -54355,7 +54752,7 @@ class CodexAdapter extends BaseAdapter {
54355
54752
  this.setStatus("closed");
54356
54753
  }
54357
54754
  get codexOptions() {
54358
- const runtimeRoot = join34(homedir26(), ".scout/pairing", "codex", this.session.id);
54755
+ const runtimeRoot = join35(homedir27(), ".scout/pairing", "codex", this.session.id);
54359
54756
  const configuredThreadId = this.config.options?.["threadId"];
54360
54757
  const requireExistingThread = this.config.options?.["requireExistingThread"];
54361
54758
  const rawLaunchArgs = this.config.options?.["launchArgs"];
@@ -54367,8 +54764,8 @@ class CodexAdapter extends BaseAdapter {
54367
54764
  sessionId: this.session.id,
54368
54765
  cwd: this.config.cwd ?? process.cwd(),
54369
54766
  systemPrompt: this.systemPrompt,
54370
- runtimeDirectory: join34(runtimeRoot, "runtime"),
54371
- logsDirectory: join34(runtimeRoot, "logs"),
54767
+ runtimeDirectory: join35(runtimeRoot, "runtime"),
54768
+ logsDirectory: join35(runtimeRoot, "logs"),
54372
54769
  env: this.config.env,
54373
54770
  launchArgs,
54374
54771
  threadId: typeof configuredThreadId === "string" && configuredThreadId.trim().length > 0 ? configuredThreadId.trim() : undefined,
@@ -54387,10 +54784,10 @@ class CodexAdapter extends BaseAdapter {
54387
54784
  return typeof raw === "string" && raw.trim().length > 0 ? raw : "You are a helpful agent working through Pairing.";
54388
54785
  }
54389
54786
  get stdoutLogPath() {
54390
- return this.transport?.stdoutLogFile ?? join34(this.codexOptions.logsDirectory, "stdout.log");
54787
+ return this.transport?.stdoutLogFile ?? join35(this.codexOptions.logsDirectory, "stdout.log");
54391
54788
  }
54392
54789
  get stderrLogPath() {
54393
- return this.transport?.stderrLogFile ?? join34(this.codexOptions.logsDirectory, "stderr.log");
54790
+ return this.transport?.stderrLogFile ?? join35(this.codexOptions.logsDirectory, "stderr.log");
54394
54791
  }
54395
54792
  enqueue(task) {
54396
54793
  const next = this.serialized.then(task, task);
@@ -54549,8 +54946,9 @@ class CodexAdapter extends BaseAdapter {
54549
54946
  this.setStatus("error");
54550
54947
  }
54551
54948
  }
54552
- var createAdapter7 = (config) => new CodexAdapter(config);
54949
+ var createAdapter8 = (config) => new CodexAdapter(config);
54553
54950
  // ../agent-sessions/src/index.ts
54951
+ init_devin_acp();
54554
54952
  init_usage();
54555
54953
 
54556
54954
  // ../agent-sessions/src/adapters/acp/index.ts
@@ -54934,7 +55332,7 @@ Referenced files: ${prompt.files.join(", ")}`
54934
55332
  });
54935
55333
  }
54936
55334
  }
54937
- var createAdapter8 = (config) => new OpenAICompatAdapter(config);
55335
+ var createAdapter9 = (config) => new OpenAICompatAdapter(config);
54938
55336
  // ../agent-sessions/src/adapters/opencode/adapter.ts
54939
55337
  class OpenCodeAdapter extends BaseAdapter {
54940
55338
  type = "opencode";
@@ -55385,7 +55783,7 @@ class OpenCodeAdapter extends BaseAdapter {
55385
55783
  });
55386
55784
  }
55387
55785
  }
55388
- var createAdapter9 = (config) => new OpenCodeAdapter(config);
55786
+ var createAdapter10 = (config) => new OpenCodeAdapter(config);
55389
55787
  function throwIfAborted(signal) {
55390
55788
  if (signal?.aborted) {
55391
55789
  throw abortReason(signal);
@@ -55412,9 +55810,9 @@ function delay2(ms, signal) {
55412
55810
  });
55413
55811
  }
55414
55812
  // ../agent-sessions/src/adapters/opencode-v2/adapter.ts
55415
- import { existsSync as existsSync32 } from "fs";
55416
- import { homedir as homedir28 } from "os";
55417
- import { basename as basename13, isAbsolute as isAbsolute4, join as join36, resolve as resolve14 } from "path";
55813
+ import { existsSync as existsSync33 } from "fs";
55814
+ import { homedir as homedir29 } from "os";
55815
+ import { basename as basename13, isAbsolute as isAbsolute4, join as join37, resolve as resolve14 } from "path";
55418
55816
  import { pathToFileURL as pathToFileURL2 } from "url";
55419
55817
 
55420
55818
  // ../../node_modules/.bun/@opencode-ai+client@0.0.0-next-17226+b8d34c012796aeeb/node_modules/@opencode-ai/client/dist/promise/generated/client-error.js
@@ -56667,8 +57065,8 @@ function isContentType(response, expected) {
56667
57065
  // ../../node_modules/.bun/@opencode-ai+client@0.0.0-next-17226+b8d34c012796aeeb/node_modules/@opencode-ai/client/dist/promise/service.js
56668
57066
  import { readFile as readFile10 } from "fs/promises";
56669
57067
  import { spawn as spawn7 } from "child_process";
56670
- import { homedir as homedir27 } from "os";
56671
- import { join as join35 } from "path";
57068
+ import { homedir as homedir28 } from "os";
57069
+ import { join as join36 } from "path";
56672
57070
  async function discover(options = {}) {
56673
57071
  return (await discoverLocal(options))?.endpoint;
56674
57072
  }
@@ -56780,7 +57178,7 @@ async function stop(options = {}) {
56780
57178
  await kill(existing, options);
56781
57179
  }
56782
57180
  function fallback() {
56783
- return join35(process.env["XDG_STATE_HOME"] ?? join35(homedir27(), ".local", "state"), "opencode", "service.json");
57181
+ return join36(process.env["XDG_STATE_HOME"] ?? join36(homedir28(), ".local", "state"), "opencode", "service.json");
56784
57182
  }
56785
57183
  function headers(endpoint) {
56786
57184
  if (endpoint.auth === undefined)
@@ -56947,10 +57345,10 @@ var MAX_FILE_DATA_UTF8_BYTES = 48 * 1024;
56947
57345
  var MAX_QUESTION_OPTIONS = 16;
56948
57346
  var MAX_QUESTION_OPTION_TEXT_UTF8_BYTES = 1024;
56949
57347
  var MAX_SEEN_EVENT_IDS = 4096;
56950
- function isRecord10(value) {
57348
+ function isRecord11(value) {
56951
57349
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
56952
57350
  }
56953
- function stringValue8(value) {
57351
+ function stringValue9(value) {
56954
57352
  return typeof value === "string" && value.trim() ? value : undefined;
56955
57353
  }
56956
57354
  function stringify2(value) {
@@ -56965,13 +57363,13 @@ function stringify2(value) {
56965
57363
  }
56966
57364
  }
56967
57365
  function eventShape(value) {
56968
- if (!isRecord10(value) || typeof value.type !== "string" || !isRecord10(value.data)) {
57366
+ if (!isRecord11(value) || typeof value.type !== "string" || !isRecord11(value.data)) {
56969
57367
  return null;
56970
57368
  }
56971
57369
  return value;
56972
57370
  }
56973
57371
  function eventSessionId(event) {
56974
- return stringValue8(event.data.sessionID);
57372
+ return stringValue9(event.data.sessionID);
56975
57373
  }
56976
57374
  function streamKey(kind, data) {
56977
57375
  return `${kind}:${data.assistantMessageID}:${data.ordinal}`;
@@ -56986,10 +57384,10 @@ function toolNameLooksLikeSubagent(name2) {
56986
57384
  return ["agent", "subagent", "task"].includes(name2.toLowerCase());
56987
57385
  }
56988
57386
  function actionForTool(name2, id, inputValue) {
56989
- const input = isRecord10(inputValue) ? inputValue : {};
57387
+ const input = isRecord11(inputValue) ? inputValue : {};
56990
57388
  const boundedInput = boundOpaqueValue(inputValue, MAX_TOOL_INPUT_UTF8_BYTES, `opencode-v2:tool:${id}:input`);
56991
57389
  if (toolNameLooksLikeCommand(name2)) {
56992
- const command = stringValue8(input.command) ?? (Array.isArray(input.command) ? input.command.filter((entry) => typeof entry === "string").join(" ") : stringify2(inputValue));
57390
+ const command = stringValue9(input.command) ?? (Array.isArray(input.command) ? input.command.filter((entry) => typeof entry === "string").join(" ") : stringify2(inputValue));
56993
57391
  return {
56994
57392
  kind: "command",
56995
57393
  command,
@@ -56998,8 +57396,8 @@ function actionForTool(name2, id, inputValue) {
56998
57396
  };
56999
57397
  }
57000
57398
  if (toolNameLooksLikeFileChange(name2)) {
57001
- const path2 = stringValue8(input.filePath) ?? stringValue8(input.file_path) ?? stringValue8(input.path) ?? stringValue8(input.file) ?? "";
57002
- const diff = stringValue8(input.diff) ?? stringValue8(input.patch);
57399
+ const path2 = stringValue9(input.filePath) ?? stringValue9(input.file_path) ?? stringValue9(input.path) ?? stringValue9(input.file) ?? "";
57400
+ const diff = stringValue9(input.diff) ?? stringValue9(input.patch);
57003
57401
  if (path2) {
57004
57402
  return {
57005
57403
  kind: "file_change",
@@ -57013,9 +57411,9 @@ function actionForTool(name2, id, inputValue) {
57013
57411
  if (toolNameLooksLikeSubagent(name2)) {
57014
57412
  return {
57015
57413
  kind: "subagent",
57016
- agentId: stringValue8(input.agentId) ?? stringValue8(input.agent) ?? id,
57017
- agentName: stringValue8(input.agentName) ?? stringValue8(input.name),
57018
- prompt: stringValue8(input.prompt),
57414
+ agentId: stringValue9(input.agentId) ?? stringValue9(input.agent) ?? id,
57415
+ agentName: stringValue9(input.agentName) ?? stringValue9(input.name),
57416
+ prompt: stringValue9(input.prompt),
57019
57417
  status: "running",
57020
57418
  output: ""
57021
57419
  };
@@ -57030,10 +57428,10 @@ function actionForTool(name2, id, inputValue) {
57030
57428
  };
57031
57429
  }
57032
57430
  function structuredErrorMessage(value) {
57033
- if (!isRecord10(value))
57431
+ if (!isRecord11(value))
57034
57432
  return stringify2(value) || "OpenCode execution failed.";
57035
- const message = stringValue8(value.message) ?? "OpenCode execution failed.";
57036
- const type = stringValue8(value.type);
57433
+ const message = stringValue9(value.message) ?? "OpenCode execution failed.";
57434
+ const type = stringValue9(value.type);
57037
57435
  return type && !message.includes(type) ? `${message} (${type})` : message;
57038
57436
  }
57039
57437
  function boundedText(value, maxBytes) {
@@ -57216,8 +57614,8 @@ class OpenCodeV2EventNormalizer {
57216
57614
  }
57217
57615
  ingestControl(record2) {
57218
57616
  if (record2.event === "prompt_accepted") {
57219
- const payload = isRecord10(record2.payload) ? record2.payload : {};
57220
- const remoteSessionId = stringValue8(payload.remoteSessionId);
57617
+ const payload = isRecord11(record2.payload) ? record2.payload : {};
57618
+ const remoteSessionId = stringValue9(payload.remoteSessionId);
57221
57619
  if (remoteSessionId)
57222
57620
  this.remoteSessionId = remoteSessionId;
57223
57621
  const events2 = this.current ? [...this.finishTurn("failed", "A new prompt replaced an unfinished OpenCode turn.")] : [];
@@ -57253,11 +57651,11 @@ class OpenCodeV2EventNormalizer {
57253
57651
  return this.finishTurn("stopped");
57254
57652
  }
57255
57653
  if (record2.event === "transport_error") {
57256
- const message = isRecord10(record2.payload) ? stringValue8(record2.payload.message) : stringValue8(record2.payload);
57654
+ const message = isRecord11(record2.payload) ? stringValue9(record2.payload.message) : stringValue9(record2.payload);
57257
57655
  return this.finishTurn("failed", message ?? "OpenCode event transport failed.");
57258
57656
  }
57259
- if (record2.event === "question_answered" && isRecord10(record2.payload)) {
57260
- const blockId = stringValue8(record2.payload.blockId);
57657
+ if (record2.event === "question_answered" && isRecord11(record2.payload)) {
57658
+ const blockId = stringValue9(record2.payload.blockId);
57261
57659
  const answer = Array.isArray(record2.payload.answer) ? record2.payload.answer.filter((entry) => typeof entry === "string") : [];
57262
57660
  const request = blockId ? this.questionRequestForBlock(blockId) : undefined;
57263
57661
  return request ? this.resolveQuestions(request.requestId, [answer]) : [];
@@ -57409,7 +57807,7 @@ class OpenCodeV2EventNormalizer {
57409
57807
  data: boundedFileData(item.uri, `opencode-v2:tool:${id}:file:${index2}`)
57410
57808
  }));
57411
57809
  }
57412
- const meta = isRecord10(metadata) ? boundOpaqueValue(metadata, MAX_TOOL_METADATA_UTF8_BYTES, `opencode-v2:tool:${id}:metadata`) : undefined;
57810
+ const meta = isRecord11(metadata) ? boundOpaqueValue(metadata, MAX_TOOL_METADATA_UTF8_BYTES, `opencode-v2:tool:${id}:metadata`) : undefined;
57413
57811
  events2.push({
57414
57812
  event: "block:action:status",
57415
57813
  sessionId: this.context.sessionId,
@@ -57630,69 +58028,69 @@ function deferred() {
57630
58028
  });
57631
58029
  return { promise, resolve: resolvePromise, reject: rejectPromise };
57632
58030
  }
57633
- function isRecord11(value) {
58031
+ function isRecord12(value) {
57634
58032
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
57635
58033
  }
57636
- function stringValue9(value) {
58034
+ function stringValue10(value) {
57637
58035
  return typeof value === "string" && value.trim() ? value.trim() : undefined;
57638
58036
  }
57639
58037
  function numberValue4(value, fallback2) {
57640
58038
  return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback2;
57641
58039
  }
57642
- function stringArray6(value) {
58040
+ function stringArray7(value) {
57643
58041
  if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string" || !entry.trim())) {
57644
58042
  return;
57645
58043
  }
57646
58044
  return value.map((entry) => entry.trim());
57647
58045
  }
57648
58046
  function defaultOpenCodeV2Binary(env) {
57649
- const override = stringValue9(env?.OPENCODE_V2_BIN) ?? stringValue9(process.env.OPENCODE_V2_BIN);
58047
+ const override = stringValue10(env?.OPENCODE_V2_BIN) ?? stringValue10(process.env.OPENCODE_V2_BIN);
57650
58048
  if (override)
57651
58049
  return override;
57652
- const home = stringValue9(env?.HOME) ?? homedir28();
58050
+ const home = stringValue10(env?.HOME) ?? homedir29();
57653
58051
  const candidates = [
57654
58052
  "/opt/homebrew/bin/opencode2",
57655
58053
  "/usr/local/bin/opencode2",
57656
- join36(home, ".opencode", "bin", "opencode2"),
57657
- join36(home, ".local", "bin", "opencode2")
58054
+ join37(home, ".opencode", "bin", "opencode2"),
58055
+ join37(home, ".local", "bin", "opencode2")
57658
58056
  ];
57659
- return candidates.find((candidate) => existsSync32(candidate)) ?? "opencode2";
58057
+ return candidates.find((candidate) => existsSync33(candidate)) ?? "opencode2";
57660
58058
  }
57661
58059
  function modelRef(value, variantValue) {
57662
- const raw = stringValue9(value);
58060
+ const raw = stringValue10(value);
57663
58061
  if (!raw)
57664
58062
  return;
57665
58063
  const hash = raw.lastIndexOf("#");
57666
58064
  const withoutVariant = hash > 0 ? raw.slice(0, hash) : raw;
57667
- const inlineVariant = hash > 0 ? stringValue9(raw.slice(hash + 1)) : undefined;
58065
+ const inlineVariant = hash > 0 ? stringValue10(raw.slice(hash + 1)) : undefined;
57668
58066
  const slash = withoutVariant.indexOf("/");
57669
58067
  const providerID = slash > 0 ? withoutVariant.slice(0, slash) : "opencode";
57670
58068
  const id = slash > 0 ? withoutVariant.slice(slash + 1) : withoutVariant;
57671
58069
  if (!id)
57672
58070
  return;
57673
- const variant = stringValue9(variantValue) ?? inlineVariant;
58071
+ const variant = stringValue10(variantValue) ?? inlineVariant;
57674
58072
  return { id, providerID, ...variant ? { variant } : {} };
57675
58073
  }
57676
58074
  function parseOptions3(config) {
57677
- const raw = isRecord11(config.options) ? config.options : {};
57678
- const explicitCommand = stringArray6(raw.command);
57679
- const binary = stringValue9(raw.command) ?? defaultOpenCodeV2Binary(config.env);
57680
- const args = stringArray6(raw.args) ?? ["serve", "--service"];
57681
- const requiredVersion = raw.requiredVersion === false ? null : stringValue9(raw.requiredVersion) ?? OPENCODE_V2_CLIENT_VERSION;
58075
+ const raw = isRecord12(config.options) ? config.options : {};
58076
+ const explicitCommand = stringArray7(raw.command);
58077
+ const binary = stringValue10(raw.command) ?? defaultOpenCodeV2Binary(config.env);
58078
+ const args = stringArray7(raw.args) ?? ["serve", "--service"];
58079
+ const requiredVersion = raw.requiredVersion === false ? null : stringValue10(raw.requiredVersion) ?? OPENCODE_V2_CLIENT_VERSION;
57682
58080
  return {
57683
- serverUrl: stringValue9(raw.serverUrl) ?? stringValue9(raw.url),
57684
- serverUsername: stringValue9(raw.serverUsername) ?? "opencode",
57685
- serverPassword: stringValue9(raw.serverPassword) ?? stringValue9(config.env?.OPENCODE_PASSWORD) ?? stringValue9(process.env.OPENCODE_PASSWORD),
57686
- serviceFile: stringValue9(raw.serviceFile),
58081
+ serverUrl: stringValue10(raw.serverUrl) ?? stringValue10(raw.url),
58082
+ serverUsername: stringValue10(raw.serverUsername) ?? "opencode",
58083
+ serverPassword: stringValue10(raw.serverPassword) ?? stringValue10(config.env?.OPENCODE_PASSWORD) ?? stringValue10(process.env.OPENCODE_PASSWORD),
58084
+ serviceFile: stringValue10(raw.serviceFile),
57687
58085
  autoStart: raw.autoStart !== false,
57688
58086
  command: explicitCommand ?? [binary, ...args],
57689
58087
  requiredVersion,
57690
58088
  startupTimeoutMs: numberValue4(raw.startupTimeoutMs, DEFAULT_STARTUP_TIMEOUT_MS2),
57691
58089
  reconnectDelayMs: numberValue4(raw.reconnectDelayMs, DEFAULT_RECONNECT_DELAY_MS),
57692
- remoteSessionId: stringValue9(raw.sessionId) ?? stringValue9(raw.session),
58090
+ remoteSessionId: stringValue10(raw.sessionId) ?? stringValue10(raw.session),
57693
58091
  allowCrossDirectoryResume: raw.allowCrossDirectoryResume === true,
57694
- title: stringValue9(raw.title) ?? stringValue9(config.name),
57695
- agent: stringValue9(raw.agent),
58092
+ title: stringValue10(raw.title) ?? stringValue10(config.name),
58093
+ agent: stringValue10(raw.agent),
57696
58094
  model: modelRef(raw.model, raw.variant)
57697
58095
  };
57698
58096
  }
@@ -57776,20 +58174,20 @@ function observeWithinSignal(promise, signal2) {
57776
58174
  function normalizedError(error, fallback2) {
57777
58175
  if (error instanceof Error)
57778
58176
  return new Error(redactSecrets(error.message || fallback2), { cause: error });
57779
- if (isRecord11(error)) {
57780
- const tag = stringValue9(error._tag);
57781
- const message = stringValue9(error.message) ?? fallback2;
58177
+ if (isRecord12(error)) {
58178
+ const tag = stringValue10(error._tag);
58179
+ const message = stringValue10(error.message) ?? fallback2;
57782
58180
  return new Error(redactSecrets(tag ? `${message} (${tag})` : message));
57783
58181
  }
57784
58182
  return new Error(redactSecrets(typeof error === "string" ? error : fallback2));
57785
58183
  }
57786
58184
  function isAuthoritativePromptRejection(error) {
57787
- if (!isRecord11(error))
58185
+ if (!isRecord12(error))
57788
58186
  return false;
57789
58187
  return error._tag === "InvalidRequestError" || error._tag === "UnauthorizedError" || error._tag === "SessionNotFoundError";
57790
58188
  }
57791
58189
  function httpServerResponseObserved(error) {
57792
- if (!isRecord11(error))
58190
+ if (!isRecord12(error))
57793
58191
  return false;
57794
58192
  if (typeof error._tag === "string")
57795
58193
  return true;
@@ -58657,7 +59055,7 @@ class OpenCodeV2Adapter extends BaseAdapter {
58657
59055
  return this.nativeSessionId;
58658
59056
  }
58659
59057
  }
58660
- var createAdapter10 = (config) => new OpenCodeV2Adapter(config);
59058
+ var createAdapter11 = (config) => new OpenCodeV2Adapter(config);
58661
59059
  var OPENCODE_V2_CAPABILITIES = Object.freeze({
58662
59060
  protocolVersion: "v2",
58663
59061
  transport: "http-sse",
@@ -58679,10 +59077,10 @@ init_pi();
58679
59077
 
58680
59078
  // ../web/server/core/pairing/runtime/bridge/log.ts
58681
59079
  import { appendFileSync as appendFileSync2, mkdirSync as mkdirSync15 } from "fs";
58682
- import { join as join37 } from "path";
58683
- import { homedir as homedir29 } from "os";
58684
- var LOG_DIR = join37(homedir29(), ".scout/pairing");
58685
- var LOG_FILE = join37(LOG_DIR, "bridge.log");
59080
+ import { join as join38 } from "path";
59081
+ import { homedir as homedir30 } from "os";
59082
+ var LOG_DIR = join38(homedir30(), ".scout/pairing");
59083
+ var LOG_FILE = join38(LOG_DIR, "bridge.log");
58686
59084
  mkdirSync15(LOG_DIR, { recursive: true });
58687
59085
  function write2(level, category, message, data) {
58688
59086
  const ts = new Date().toISOString().slice(11, 23);
@@ -58767,17 +59165,17 @@ class Bridge {
58767
59165
 
58768
59166
  // ../web/server/core/pairing/runtime/bridge/config.ts
58769
59167
  init_local_config();
58770
- import { existsSync as existsSync33, readFileSync as readFileSync20 } from "fs";
58771
- import { join as join38 } from "path";
58772
- import { homedir as homedir30 } from "os";
59168
+ import { existsSync as existsSync34, readFileSync as readFileSync20 } from "fs";
59169
+ import { join as join39 } from "path";
59170
+ import { homedir as homedir31 } from "os";
58773
59171
  var DEFAULTS = {
58774
59172
  port: 43130,
58775
59173
  secure: true
58776
59174
  };
58777
- var CONFIG_DIR = join38(homedir30(), ".scout/pairing");
58778
- var CONFIG_FILE = join38(CONFIG_DIR, "config.json");
59175
+ var CONFIG_DIR = join39(homedir31(), ".scout/pairing");
59176
+ var CONFIG_FILE = join39(CONFIG_DIR, "config.json");
58779
59177
  function loadConfigFile() {
58780
- if (!existsSync33(CONFIG_FILE)) {
59178
+ if (!existsSync34(CONFIG_FILE)) {
58781
59179
  return {};
58782
59180
  }
58783
59181
  try {
@@ -58847,10 +59245,10 @@ function resolveConfig() {
58847
59245
 
58848
59246
  // ../web/server/core/pairing/runtime/bridge/fileserver.ts
58849
59247
  import { randomUUID as randomUUID3 } from "crypto";
58850
- import { existsSync as existsSync34, mkdirSync as mkdirSync16, readFileSync as readFileSync21, realpathSync as realpathSync4, statSync as statSync10, unlinkSync as unlinkSync2, writeFileSync as writeFileSync12 } from "fs";
59248
+ import { existsSync as existsSync35, mkdirSync as mkdirSync16, readFileSync as readFileSync21, realpathSync as realpathSync4, statSync as statSync10, unlinkSync as unlinkSync2, writeFileSync as writeFileSync12 } from "fs";
58851
59249
  import { BlockList, isIP } from "net";
58852
- import { isAbsolute as isAbsolute6, join as join39, relative as relative5, sep as sep2 } from "path";
58853
- import { homedir as homedir31 } from "os";
59250
+ import { isAbsolute as isAbsolute6, join as join40, relative as relative5, sep as sep2 } from "path";
59251
+ import { homedir as homedir32 } from "os";
58854
59252
 
58855
59253
  // ../web/server/core/pairing/runtime/bridge/web-handoff.ts
58856
59254
  import { randomBytes as randomBytes7 } from "crypto";
@@ -59099,12 +59497,12 @@ function presentationResponse(body, status, headers2 = {}) {
59099
59497
  }
59100
59498
 
59101
59499
  // ../web/server/core/pairing/runtime/bridge/fileserver.ts
59102
- var ALLOWED_ROOTS = [homedir31(), "/tmp"];
59500
+ var ALLOWED_ROOTS = [homedir32(), "/tmp"];
59103
59501
  var LOOPBACK_PEERS = new BlockList;
59104
59502
  LOOPBACK_PEERS.addSubnet("127.0.0.0", 8, "ipv4");
59105
59503
  LOOPBACK_PEERS.addAddress("::1", "ipv6");
59106
59504
  LOOPBACK_PEERS.addSubnet("::ffff:127.0.0.0", 104, "ipv6");
59107
- var PAIRING_ATTACHMENT_ROOT = join39(homedir31(), ".scout", "pairing", "attachments");
59505
+ var PAIRING_ATTACHMENT_ROOT = join40(homedir32(), ".scout", "pairing", "attachments");
59108
59506
  var PAIRING_ATTACHMENT_TTL_MS = 6 * 60 * 60 * 1000;
59109
59507
  var PAIRING_ATTACHMENT_MAX_BYTES = 25 * 1024 * 1024;
59110
59508
  var PAIRING_ATTACHMENT_PATH_PREFIX = "/attachments/";
@@ -59127,7 +59525,7 @@ function storePairingAttachmentBlob(input, options) {
59127
59525
  mkdirSync16(PAIRING_ATTACHMENT_ROOT, { recursive: true, mode: 448 });
59128
59526
  purgeExpiredPairingAttachments(options.now);
59129
59527
  const id = `att-${randomUUID3()}`;
59130
- const path2 = join39(PAIRING_ATTACHMENT_ROOT, id);
59528
+ const path2 = join40(PAIRING_ATTACHMENT_ROOT, id);
59131
59529
  writeFileSync12(path2, data, { mode: 384 });
59132
59530
  const now = options.now ?? Date.now();
59133
59531
  const entry = {
@@ -59176,21 +59574,21 @@ function resolvePairingAttachment(id, now) {
59176
59574
  }
59177
59575
  const known = attachmentBlobs.get(id);
59178
59576
  if (known) {
59179
- if (known.expiresAt <= now || !existsSync34(known.path)) {
59577
+ if (known.expiresAt <= now || !existsSync35(known.path)) {
59180
59578
  forgetPairingAttachment(id);
59181
59579
  return null;
59182
59580
  }
59183
59581
  return known;
59184
59582
  }
59185
59583
  const rehydrated = readAttachmentSidecar(id);
59186
- if (!rehydrated || rehydrated.expiresAt <= now || !existsSync34(rehydrated.path)) {
59584
+ if (!rehydrated || rehydrated.expiresAt <= now || !existsSync35(rehydrated.path)) {
59187
59585
  return null;
59188
59586
  }
59189
59587
  attachmentBlobs.set(id, rehydrated);
59190
59588
  return rehydrated;
59191
59589
  }
59192
59590
  function attachmentSidecarPath(id) {
59193
- return join39(PAIRING_ATTACHMENT_ROOT, `${id}.json`);
59591
+ return join40(PAIRING_ATTACHMENT_ROOT, `${id}.json`);
59194
59592
  }
59195
59593
  function writeAttachmentSidecar(entry) {
59196
59594
  try {
@@ -59212,7 +59610,7 @@ function readAttachmentSidecar(id) {
59212
59610
  }
59213
59611
  return {
59214
59612
  id,
59215
- path: join39(PAIRING_ATTACHMENT_ROOT, id),
59613
+ path: join40(PAIRING_ATTACHMENT_ROOT, id),
59216
59614
  mediaType,
59217
59615
  fileName: sanitizeAttachmentFileName(raw.fileName),
59218
59616
  size: typeof raw.size === "number" ? raw.size : 0,
@@ -59224,7 +59622,7 @@ function readAttachmentSidecar(id) {
59224
59622
  }
59225
59623
  function forgetPairingAttachment(id) {
59226
59624
  attachmentBlobs.delete(id);
59227
- for (const path2 of [join39(PAIRING_ATTACHMENT_ROOT, id), attachmentSidecarPath(id)]) {
59625
+ for (const path2 of [join40(PAIRING_ATTACHMENT_ROOT, id), attachmentSidecarPath(id)]) {
59228
59626
  try {
59229
59627
  unlinkSync2(path2);
59230
59628
  } catch {}
@@ -59276,7 +59674,7 @@ function isInsideRoot(root, candidate) {
59276
59674
  function isAllowedHomeRelativePath(rel) {
59277
59675
  if (!rel.startsWith("."))
59278
59676
  return true;
59279
- return rel === ".claude" || rel.startsWith(`.claude${sep2}`) || rel === join39(".scout", "pairing") || rel.startsWith(`${join39(".scout", "pairing")}${sep2}`);
59677
+ return rel === ".claude" || rel.startsWith(`.claude${sep2}`) || rel === join40(".scout", "pairing") || rel.startsWith(`${join40(".scout", "pairing")}${sep2}`);
59280
59678
  }
59281
59679
  function resolveAllowedFile(filePath) {
59282
59680
  if (!isAbsolute6(filePath))
@@ -59287,7 +59685,7 @@ function resolveAllowedFile(filePath) {
59287
59685
  } catch {
59288
59686
  return { status: "missing" };
59289
59687
  }
59290
- const canonicalHome = realpathSync4(homedir31());
59688
+ const canonicalHome = realpathSync4(homedir32());
59291
59689
  for (const configuredRoot of ALLOWED_ROOTS) {
59292
59690
  const root = realpathSync4(configuredRoot);
59293
59691
  if (!isInsideRoot(root, candidate))
@@ -59928,7 +60326,7 @@ function formatTimestamp(value) {
59928
60326
  }
59929
60327
 
59930
60328
  // ../web/server/core/broker/service.ts
59931
- import { createHash as createHash6, randomUUID as randomUUID4 } from "crypto";
60329
+ import { createHash as createHash7, randomUUID as randomUUID4 } from "crypto";
59932
60330
  init_src();
59933
60331
  init_setup();
59934
60332
  init_broker_api();
@@ -60423,7 +60821,7 @@ function deliveryRequestId(clientMessageId, createdAt) {
60423
60821
  if (!normalized) {
60424
60822
  return `deliver-${createdAt.toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
60425
60823
  }
60426
- const digest = createHash6("sha256").update(normalized).digest("hex").slice(0, 32);
60824
+ const digest = createHash7("sha256").update(normalized).digest("hex").slice(0, 32);
60427
60825
  return `deliver-client-${digest}`;
60428
60826
  }
60429
60827
  function stableBrokerRecordId(prefix, clientMessageId, createdAt, discriminator = "") {
@@ -60431,7 +60829,7 @@ function stableBrokerRecordId(prefix, clientMessageId, createdAt, discriminator
60431
60829
  if (!normalized) {
60432
60830
  return `${prefix}-${createdAt.toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
60433
60831
  }
60434
- const digest = createHash6("sha256").update(`${normalized}\x00${discriminator}`).digest("hex").slice(0, 32);
60832
+ const digest = createHash7("sha256").update(`${normalized}\x00${discriminator}`).digest("hex").slice(0, 32);
60435
60833
  return `${prefix}-client-${digest}`;
60436
60834
  }
60437
60835
  function metadataBoolean(metadata, key) {
@@ -61345,7 +61743,8 @@ async function sendScoutConversationMessage(input) {
61345
61743
  const currentDirectory = input.currentDirectory ?? process.cwd();
61346
61744
  const createdAtMs = input.createdAtMs ?? Date.now();
61347
61745
  const senderId = await resolveConversationActorId(broker2.baseUrl, broker2.snapshot, broker2.node.id, input.senderId, currentDirectory);
61348
- const mentionResolution = await resolveMentionTargets(broker2.snapshot, input.body, currentDirectory);
61746
+ const routeBodyMentions = input.resolveMentionsFromBody !== false;
61747
+ const mentionResolution = routeBodyMentions ? await resolveMentionTargets(broker2.snapshot, input.body, currentDirectory) : { resolved: [], unresolved: [], ambiguous: [] };
61349
61748
  const mentionedTargetIds = new Set(mentionResolution.resolved.map((target2) => target2.agentId));
61350
61749
  const participantTargetIds = input.notifyParticipantAgents && (conversation.kind === "channel" || conversation.kind === "group_direct" || conversation.kind === "thread") ? conversation.participantIds.filter((participantId) => isSteerableParticipant(broker2.snapshot, participantId, senderId)) : [];
61351
61750
  const candidateTargetIds = [...new Set([
@@ -61732,8 +62131,8 @@ var watchSharedScoutMessages = createBrokerMessageFanout();
61732
62131
  // ../web/server/core/pairing/runtime/bridge/server.ts
61733
62132
  init_system_probes();
61734
62133
  import { readdirSync as readdirSync7, readFileSync as readFileSync25, realpathSync as realpathSync5, statSync as statSync14 } from "fs";
61735
- import { basename as basename16, isAbsolute as isAbsolute7, join as join47, relative as relative6, resolve as resolve19 } from "path";
61736
- import { homedir as homedir38 } from "os";
62134
+ import { basename as basename16, isAbsolute as isAbsolute7, join as join48, relative as relative6, resolve as resolve19 } from "path";
62135
+ import { homedir as homedir39 } from "os";
61737
62136
 
61738
62137
  // ../web/server/core/mobile/service.ts
61739
62138
  init_src();
@@ -61744,9 +62143,9 @@ init_setup();
61744
62143
 
61745
62144
  // ../runtime/src/agent-workspace.ts
61746
62145
  init_exec();
61747
- import { existsSync as existsSync35 } from "fs";
62146
+ import { existsSync as existsSync36 } from "fs";
61748
62147
  import { mkdir as mkdir9 } from "fs/promises";
61749
- import { join as join40 } from "path";
62148
+ import { join as join41 } from "path";
61750
62149
  var SCOUT_WORKSPACES_DIRNAME = ".scout-worktrees";
61751
62150
  async function isGitRepo(projectRoot) {
61752
62151
  try {
@@ -61767,9 +62166,9 @@ async function createAgentWorkspace(projectRoot, agentName, requestedBranch) {
61767
62166
  }
61768
62167
  const branch = requestedBranch?.trim() || `scout/${agentName}`;
61769
62168
  validateWorktreeBranch(branch);
61770
- const workspaceDir = join40(projectRoot, SCOUT_WORKSPACES_DIRNAME);
61771
- const workspacePath = join40(workspaceDir, agentName);
61772
- if (existsSync35(workspacePath)) {
62169
+ const workspaceDir = join41(projectRoot, SCOUT_WORKSPACES_DIRNAME);
62170
+ const workspacePath = join41(workspaceDir, agentName);
62171
+ if (existsSync36(workspacePath)) {
61773
62172
  return { path: workspacePath, branch };
61774
62173
  }
61775
62174
  await mkdir9(workspaceDir, { recursive: true });
@@ -61806,12 +62205,13 @@ var {
61806
62205
  } = scoutAgentService;
61807
62206
 
61808
62207
  // ../web/server/db/internal/db.ts
62208
+ init_sqlite_adapter();
61809
62209
  import { Database as Database2 } from "bun:sqlite";
61810
- import { homedir as homedir32 } from "os";
61811
- import { join as join41 } from "path";
62210
+ import { homedir as homedir33 } from "os";
62211
+ import { join as join42 } from "path";
61812
62212
  function resolveDbPath() {
61813
- const controlHome = process.env.OPENSCOUT_CONTROL_HOME ?? join41(homedir32(), ".openscout", "control-plane");
61814
- return join41(controlHome, "control-plane.sqlite");
62213
+ const controlHome = process.env.OPENSCOUT_CONTROL_HOME ?? join42(homedir33(), ".openscout", "control-plane");
62214
+ return join42(controlHome, "control-plane.sqlite");
61815
62215
  }
61816
62216
  var _db = null;
61817
62217
  var DB_BUSY_TIMEOUT_MS = 250;
@@ -61821,21 +62221,26 @@ function configureReadonlyDb(db) {
61821
62221
  }
61822
62222
  function db() {
61823
62223
  if (!_db) {
61824
- _db = new Database2(resolveDbPath(), { readonly: true });
62224
+ _db = observeSqliteDatabase(new Database2(resolveDbPath(), { readonly: true }), {
62225
+ database: "web-control-plane"
62226
+ });
61825
62227
  configureReadonlyDb(_db);
61826
62228
  }
61827
62229
  return _db;
61828
62230
  }
61829
62231
  // ../web/server/db/internal/parse.ts
61830
62232
  init_src();
62233
+ function jsonBoolean(value) {
62234
+ return value === 1 || value === "1" || value === "true";
62235
+ }
61831
62236
  function normalizeTimestampMs(value) {
61832
62237
  return epochMs(value);
61833
62238
  }
61834
62239
 
61835
62240
  // ../web/server/db/internal/paths.ts
61836
- import { homedir as homedir33 } from "os";
62241
+ import { homedir as homedir34 } from "os";
61837
62242
  init_support_paths();
61838
- var HOME = homedir33();
62243
+ var HOME = homedir34();
61839
62244
  function compact(p) {
61840
62245
  if (!p)
61841
62246
  return null;
@@ -61891,7 +62296,9 @@ function agentFlightPhaseFromFlightState(state) {
61891
62296
  function queryAgentFlightPhases(database = db()) {
61892
62297
  const phases = new Map;
61893
62298
  const rows = database.prepare(`SELECT target_agent_id, state FROM invocations
61894
- WHERE state IN (${sqlPlaceholders(ACTIVE_FLIGHT_STATES4.length)})`).all(...ACTIVE_FLIGHT_STATES4);
62299
+ WHERE state IN (${sqlPlaceholders(ACTIVE_FLIGHT_STATES4.length)})
62300
+ AND COALESCE(json_extract(flight_metadata_json, '$.requesterTimedOut'), 0) != 1
62301
+ AND COALESCE(json_extract(flight_metadata_json, '$.timeoutScope'), '') != 'requester_wait'`).all(...ACTIVE_FLIGHT_STATES4);
61895
62302
  for (const row of rows) {
61896
62303
  const phase = agentFlightPhaseFromFlightState(row.state);
61897
62304
  if (!phase) {
@@ -62140,6 +62547,7 @@ function queryFleetActivity(opts) {
62140
62547
  }
62141
62548
  var TERMINAL_FLIGHT_STATES = new Set(["completed", "failed", "cancelled"]);
62142
62549
  var FLEET_RECENT_COMPLETED_MAX_AGE_MS = 3 * 24 * 60 * 60 * 1000;
62550
+ var ATTENTION_STALE_AFTER_MS = 7 * 24 * 60 * 60 * 1000;
62143
62551
  function fleetRequesterIds() {
62144
62552
  const operatorName = resolveOperatorName().trim() || "operator";
62145
62553
  return Array.from(new Set([operatorName, "operator"]));
@@ -62180,6 +62588,8 @@ function queryFleetAskRows(requesterIds, limit) {
62180
62588
  json_extract(inv.flight_metadata_json, '$.failureSeverity') AS failure_severity,
62181
62589
  json_extract(inv.flight_metadata_json, '$.dispatchOutcome.status') AS dispatch_outcome_status,
62182
62590
  json_extract(inv.flight_metadata_json, '$.dispatchOutcome.reason') AS dispatch_outcome_reason,
62591
+ json_extract(inv.flight_metadata_json, '$.requesterTimedOut') AS requester_timed_out,
62592
+ json_extract(inv.flight_metadata_json, '$.timeoutScope') AS timeout_scope,
62183
62593
  (
62184
62594
  SELECT MAX(COALESCE(recovery_inv.completed_at, recovery_inv.started_at, 0))
62185
62595
  FROM invocations recovery_inv
@@ -62266,7 +62676,8 @@ function projectFleetAsk(row, requesterIdSet) {
62266
62676
  const queuedFlight = row.flight_state === "queued";
62267
62677
  const queuedUntilOnline = queuedFlight && row.dispatch_outcome_status === "queued_until_online";
62268
62678
  const staleActiveFlight = hasFlight && row.flight_state !== null && !TERMINAL_FLIGHT_STATES.has(row.flight_state) && isStaleActiveFlight(row.started_at, row.created_at);
62269
- const isActiveFlight = hasFlight && row.flight_state !== null && !TERMINAL_FLIGHT_STATES.has(row.flight_state) && !failed && !staleActiveFlight;
62679
+ const requesterStoppedWaiting = hasFlight && row.flight_state !== null && !TERMINAL_FLIGHT_STATES.has(row.flight_state) && (jsonBoolean(row.requester_timed_out) || row.timeout_scope === "requester_wait");
62680
+ const isActiveFlight = hasFlight && row.flight_state !== null && !TERMINAL_FLIGHT_STATES.has(row.flight_state) && !failed && !staleActiveFlight && !requesterStoppedWaiting;
62270
62681
  const attentionEligibleState = row.record_kind === "work_item" && row.work_state !== null && ["open", "working", "waiting", "review"].includes(row.work_state) || row.record_kind === "question" && row.work_state !== null && ["open", "answered"].includes(row.work_state);
62271
62682
  const recordDismissedAt = normalizeTimestampMs(row.record_dismissed_at);
62272
62683
  const recordUpdatedAt = normalizeTimestampMs(row.work_updated_at);
@@ -62300,7 +62711,7 @@ function projectFleetAsk(row, requesterIdSet) {
62300
62711
  collaborationRecordId: row.collaboration_record_id,
62301
62712
  task: row.task,
62302
62713
  status,
62303
- statusLabel: status === "working" && replied ? "Acknowledged" : status === "failed" && queuedUntilOnline ? "Not delivered" : status === "failed" && noteworthyFailure ? stoppedFailure ? "Stopped" : "Interrupted" : fleetStatusLabel(status),
62714
+ statusLabel: requesterStoppedWaiting && status === "completed" ? "Stopped waiting" : status === "working" && replied ? "Acknowledged" : status === "failed" && queuedUntilOnline ? "Not delivered" : status === "failed" && noteworthyFailure ? stoppedFailure ? "Stopped" : "Interrupted" : fleetStatusLabel(status),
62304
62715
  acknowledgedAt: status === "working" && replied ? normalizeTimestampMs(row.status_ts) : null,
62305
62716
  attention: status === "needs_attention" ? "badge" : status === "failed" && queuedUntilOnline ? "badge" : status === "failed" && !failedDismissed && !recoveredDeliveryFailure ? noteworthyFailure ? "badge" : "interrupt" : "silent",
62306
62717
  agentState: summarizeAgentState(row.endpoint_state, agentFlightPhaseFromFlightState(row.flight_state)),
@@ -62314,34 +62725,54 @@ function projectFleetAsk(row, requesterIdSet) {
62314
62725
  }
62315
62726
  function queryFleetAttentionRows(requesterIds, limit) {
62316
62727
  const requesterClause = sqlPlaceholders(requesterIds.length);
62317
- return db().prepare(`SELECT
62318
- cr.kind AS record_kind,
62319
- cr.id AS record_id,
62728
+ const staleBefore = Date.now() - ATTENTION_STALE_AFTER_MS;
62729
+ return db().prepare(`WITH live_attention AS (
62730
+ SELECT
62731
+ cr.kind AS record_kind,
62732
+ cr.id AS record_id,
62733
+ cr.title,
62734
+ cr.summary,
62735
+ cr.conversation_id,
62736
+ cr.state,
62737
+ cr.acceptance_state,
62738
+ cr.updated_at,
62739
+ cr.owner_id AS agent_id,
62740
+ ROW_NUMBER() OVER (
62741
+ PARTITION BY cr.title, cr.owner_id
62742
+ ORDER BY cr.updated_at DESC, cr.id DESC
62743
+ ) AS duplicate_rank
62744
+ FROM collaboration_records cr
62745
+ WHERE (
62746
+ (cr.kind = 'work_item' AND cr.state IN ('open', 'working', 'waiting', 'review'))
62747
+ OR (cr.kind = 'question' AND cr.state IN ('open', 'answered'))
62748
+ )
62749
+ AND cr.next_move_owner_id IN (${requesterClause})
62750
+ AND cr.updated_at >= ?
62751
+ AND NOT EXISTS (
62752
+ SELECT 1
62753
+ FROM collaboration_events dismissed
62754
+ WHERE dismissed.record_id = cr.id
62755
+ AND dismissed.kind = 'dismissed'
62756
+ AND dismissed.actor_id IN (${requesterClause})
62757
+ AND dismissed.created_at >= cr.updated_at
62758
+ )
62759
+ )
62760
+ SELECT
62761
+ cr.record_kind,
62762
+ cr.record_id,
62320
62763
  cr.title,
62321
62764
  cr.summary,
62322
62765
  cr.conversation_id,
62323
62766
  cr.state,
62324
62767
  cr.acceptance_state,
62325
62768
  cr.updated_at,
62326
- cr.owner_id AS agent_id,
62769
+ cr.agent_id,
62327
62770
  owner.display_name AS agent_name
62328
- FROM collaboration_records cr
62329
- LEFT JOIN actors owner ON owner.id = cr.owner_id
62330
- WHERE (
62331
- (cr.kind = 'work_item' AND cr.state IN ('open', 'working', 'waiting', 'review'))
62332
- OR (cr.kind = 'question' AND cr.state IN ('open', 'answered'))
62333
- )
62334
- AND cr.next_move_owner_id IN (${requesterClause})
62335
- AND NOT EXISTS (
62336
- SELECT 1
62337
- FROM collaboration_events dismissed
62338
- WHERE dismissed.record_id = cr.id
62339
- AND dismissed.kind = 'dismissed'
62340
- AND dismissed.actor_id IN (${requesterClause})
62341
- AND dismissed.created_at >= cr.updated_at
62342
- )
62771
+ FROM live_attention cr
62772
+ LEFT JOIN actors owner ON owner.id = cr.agent_id
62773
+ WHERE cr.duplicate_rank = 1
62343
62774
  ORDER BY cr.updated_at DESC
62344
- LIMIT ?`).all(...requesterIds, ...requesterIds, limit);
62775
+ LIMIT ?`).all(...requesterIds, staleBefore, ...requesterIds, limit);
62345
62776
  }
62346
62777
  function queryOperatorAttentionRows(limit = 48) {
62347
62778
  return queryFleetAttentionRows(fleetRequesterIds(), limit).map((row) => ({
@@ -62555,11 +62986,11 @@ function isMissingTerminalSessionRegistryError(error) {
62555
62986
  return /no such table: terminal_session_registry/i.test(message);
62556
62987
  }
62557
62988
  // ../web/server/service-budgets.ts
62558
- import { createHash as createHash7 } from "crypto";
62559
- import { existsSync as existsSync36, mkdirSync as mkdirSync17, readdirSync as readdirSync6, readFileSync as readFileSync22, renameSync as renameSync6, statSync as statSync11, writeFileSync as writeFileSync13 } from "fs";
62989
+ import { createHash as createHash8 } from "crypto";
62990
+ import { existsSync as existsSync37, mkdirSync as mkdirSync17, readdirSync as readdirSync6, readFileSync as readFileSync22, renameSync as renameSync6, statSync as statSync11, writeFileSync as writeFileSync13 } from "fs";
62560
62991
  import { open, readdir as readdir4, stat as stat6 } from "fs/promises";
62561
- import { homedir as homedir34 } from "os";
62562
- import { dirname as dirname22, join as join42 } from "path";
62992
+ import { homedir as homedir35 } from "os";
62993
+ import { dirname as dirname22, join as join43 } from "path";
62563
62994
  import { createInterface as createInterface2 } from "readline";
62564
62995
  init_src();
62565
62996
  init_claude_statusline();
@@ -62567,7 +62998,9 @@ init_pi_rpc();
62567
62998
  init_system_probes();
62568
62999
  import { Database as Database3 } from "bun:sqlite";
62569
63000
  var CACHE_TTL_MS = 60 * 1000;
63001
+ var FIVE_HOUR_MS = 5 * 3600 * 1000;
62570
63002
  var WEEK_MS = 7 * 24 * 3600 * 1000;
63003
+ var MONTH_MS = 30 * 24 * 3600 * 1000;
62571
63004
  var CODEX_LOOKBACK_DAYS = 3;
62572
63005
  var CODEX_JSONL_TAIL_MAX_BYTES = 2 * 1024 * 1024;
62573
63006
  var CODEX_INITIAL_FILE_LIMIT = 32;
@@ -62668,8 +63101,8 @@ async function loadCodexGauge(forceRefresh = false) {
62668
63101
  harness: "codex",
62669
63102
  maxAgeMs: WEEK_MS
62670
63103
  });
62671
- const root = join42(homeDir(), ".codex", "sessions");
62672
- if (!existsSync36(root))
63104
+ const root = join43(homeDir(), ".codex", "sessions");
63105
+ if (!existsSync37(root))
62673
63106
  return fallback2;
62674
63107
  const candidates = await findRecentCodexJsonl(root, CODEX_LOOKBACK_DAYS);
62675
63108
  if (candidates.length === 0)
@@ -62726,7 +63159,7 @@ function codexQuotaSnapshotsFromObservation(usage, capturedAt) {
62726
63159
  return usage.quotaWindows.map((window2) => codexQuotaSnapshot(window2, capturedAt, usage.planType, usage.limitId)).filter((entry) => entry !== null);
62727
63160
  }
62728
63161
  function bindingCodexPoolSnapshots(snapshots) {
62729
- const poolIdOf = (row) => stringValue10(row.metadata?.limitId) ?? "";
63162
+ const poolIdOf = (row) => stringValue11(row.metadata?.limitId) ?? "";
62730
63163
  const pools = new Set(snapshots.map(poolIdOf));
62731
63164
  if (pools.size <= 1)
62732
63165
  return snapshots;
@@ -62771,7 +63204,7 @@ async function findRecentCodexJsonl(root, lookbackDays) {
62771
63204
  continue;
62772
63205
  }
62773
63206
  for (const entry of entries) {
62774
- const full = join42(dir, entry.name);
63207
+ const full = join43(dir, entry.name);
62775
63208
  if (entry.isDirectory()) {
62776
63209
  pending.push(full);
62777
63210
  } else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
@@ -62896,7 +63329,7 @@ function claudeStatuslineDir() {
62896
63329
  return resolveClaudeStatuslineDirectory();
62897
63330
  }
62898
63331
  function readClaudeStatuslineLatest() {
62899
- return readJsonRecord(join42(claudeStatuslineDir(), "claude-latest.json"));
63332
+ return readJsonRecord(join43(claudeStatuslineDir(), "claude-latest.json"));
62900
63333
  }
62901
63334
  function loadClaudeStatuslineQuotaSnapshots() {
62902
63335
  const now = Date.now();
@@ -62908,7 +63341,7 @@ function loadClaudeStatuslineQuotaSnapshots() {
62908
63341
  ].flatMap((record2) => claudeQuotaSnapshotsFromStatusline(record2)).sort((a, b) => b.capturedAt - a.capturedAt).slice(0, PERSISTED_QUOTA_ROW_LIMIT);
62909
63342
  }
62910
63343
  function readClaudeStatuslineHistory(minCapturedAt) {
62911
- const path2 = join42(claudeStatuslineDir(), "claude-history.jsonl");
63344
+ const path2 = join43(claudeStatuslineDir(), "claude-history.jsonl");
62912
63345
  const stat7 = safeStat(path2);
62913
63346
  if (!stat7)
62914
63347
  return [];
@@ -62940,25 +63373,46 @@ function readClaudeStatuslineHistory(minCapturedAt) {
62940
63373
  }
62941
63374
  return out;
62942
63375
  }
63376
+ function claudeStatuslineWindowSpec(key) {
63377
+ const raw2 = key.trim();
63378
+ if (!raw2)
63379
+ return null;
63380
+ const normalized = raw2.toLowerCase().replace(/[-_\s]/gu, "");
63381
+ if (["fivehour", "fivehours", "primary", "5h"].includes(normalized)) {
63382
+ return { label: "5h", windowKind: "primary", windowMs: FIVE_HOUR_MS };
63383
+ }
63384
+ if (["sevenday", "weekly", "secondary", "7d"].includes(normalized)) {
63385
+ return { label: "7d", windowKind: "secondary", windowMs: WEEK_MS };
63386
+ }
63387
+ if (["monthly", "month", "thirtyday", "30d"].includes(normalized)) {
63388
+ return { label: "30d", windowKind: "monthly", windowMs: MONTH_MS };
63389
+ }
63390
+ if (normalized.includes("month")) {
63391
+ return { label: "30d", windowKind: "monthly", windowMs: MONTH_MS };
63392
+ }
63393
+ if (normalized.includes("fivehour") || normalized.endsWith("5h")) {
63394
+ return { label: raw2.replace(/_/gu, " "), windowKind: raw2, windowMs: FIVE_HOUR_MS };
63395
+ }
63396
+ if (normalized.startsWith("sevenday") || normalized.includes("weekly")) {
63397
+ return { label: raw2.replace(/_/gu, " "), windowKind: raw2, windowMs: WEEK_MS };
63398
+ }
63399
+ return { label: raw2.replace(/_/gu, " "), windowKind: raw2, windowMs: WEEK_MS };
63400
+ }
62943
63401
  function claudeQuotaSnapshotsFromStatusline(record2) {
62944
63402
  const rateLimits = recordValue(record2.rate_limits);
62945
63403
  if (!rateLimits)
62946
63404
  return [];
62947
63405
  const capturedAt = claudeStatuslineCapturedAt(record2);
62948
- return [
62949
- claudeQuotaSnapshotFromStatuslineWindow(record2, rateLimits.five_hour, {
62950
- label: "5h",
62951
- windowKind: "primary",
62952
- windowMs: 5 * 3600 * 1000,
62953
- capturedAt
62954
- }),
62955
- claudeQuotaSnapshotFromStatuslineWindow(record2, rateLimits.seven_day, {
62956
- label: "7d",
62957
- windowKind: "secondary",
62958
- windowMs: WEEK_MS,
63406
+ return Object.entries(rateLimits).flatMap(([key, value]) => {
63407
+ const spec = claudeStatuslineWindowSpec(key);
63408
+ if (!spec)
63409
+ return [];
63410
+ const snapshot = claudeQuotaSnapshotFromStatuslineWindow(record2, value, {
63411
+ ...spec,
62959
63412
  capturedAt
62960
- })
62961
- ].filter((entry) => entry !== null);
63413
+ });
63414
+ return snapshot ? [snapshot] : [];
63415
+ });
62962
63416
  }
62963
63417
  function claudeQuotaSnapshotFromStatuslineWindow(record2, value, options) {
62964
63418
  const window2 = recordValue(value);
@@ -62982,8 +63436,8 @@ function claudeQuotaSnapshotFromStatuslineWindow(record2, value, options) {
62982
63436
  capturedAt: options.capturedAt,
62983
63437
  metadata: {
62984
63438
  source: "service-budgets.claude-statusline",
62985
- sessionId: stringValue10(record2.session_id),
62986
- cwd: stringValue10(record2.cwd),
63439
+ sessionId: stringValue11(record2.session_id),
63440
+ cwd: stringValue11(record2.cwd),
62987
63441
  model: claudeStatuslineModel(record2)
62988
63442
  }
62989
63443
  };
@@ -62993,7 +63447,7 @@ function claudeStatuslineCapturedAt(record2) {
62993
63447
  }
62994
63448
  function claudeStatuslineModel(record2) {
62995
63449
  const model = recordValue(record2.model);
62996
- return stringValue10(model?.id) ?? stringValue10(model?.display_name);
63450
+ return stringValue11(model?.id) ?? stringValue11(model?.display_name);
62997
63451
  }
62998
63452
  function loadPersistedProviderQuotaGauge(input) {
62999
63453
  return quotaGaugeFromSnapshots({
@@ -63037,15 +63491,12 @@ function loadPersistedProviderQuotaSnapshots(input) {
63037
63491
  metadata: parseMetadataJson(row.metadataJson)
63038
63492
  }));
63039
63493
  }
63040
- function quotaGaugeFromSnapshots(input, snapshots) {
63494
+ function selectLatestQuotaSnapshots(snapshots, input) {
63041
63495
  const latestByWindow = new Map;
63042
- const historyByWindow = quotaHistoryByWindow(snapshots);
63043
- const now = Date.now();
63044
- const minCurrentCapturedAt = input.maxCurrentAgeMs === undefined ? Number.NEGATIVE_INFINITY : now - input.maxCurrentAgeMs;
63045
63496
  for (const row of snapshots) {
63046
- if (row.capturedAt < minCurrentCapturedAt)
63497
+ if (row.capturedAt < input.minCurrentCapturedAt)
63047
63498
  continue;
63048
- if (!input.allowExpiredWindows && quotaSnapshotIsExpired(row, now))
63499
+ if (!input.allowExpiredWindows && quotaSnapshotIsExpired(row, input.now))
63049
63500
  continue;
63050
63501
  const key = quotaSnapshotWindowKey(row);
63051
63502
  const existing = latestByWindow.get(key);
@@ -63071,12 +63522,41 @@ function quotaGaugeFromSnapshots(input, snapshots) {
63071
63522
  latestByWindow.set(key, row);
63072
63523
  }
63073
63524
  }
63074
- const windows = [...latestByWindow.values()].map((snapshot) => storedQuotaWindowGauge(snapshot, historyByWindow.get(quotaSnapshotWindowKey(snapshot)) ?? [])).filter((window2) => Boolean(window2)).sort((a, b) => quotaWindowSortRank(a.label) - quotaWindowSortRank(b.label) || a.label.localeCompare(b.label));
63525
+ return latestByWindow;
63526
+ }
63527
+ function quotaGaugeFromSnapshots(input, snapshots) {
63528
+ const historyByWindow = quotaHistoryByWindow(snapshots);
63529
+ const now = Date.now();
63530
+ const minCurrentCapturedAt = input.maxCurrentAgeMs === undefined ? Number.NEGATIVE_INFINITY : now - input.maxCurrentAgeMs;
63531
+ const latestByWindow = selectLatestQuotaSnapshots(snapshots, {
63532
+ minCurrentCapturedAt,
63533
+ now,
63534
+ allowExpiredWindows: input.allowExpiredWindows
63535
+ });
63536
+ const awaitingKeys = new Set;
63537
+ if (latestByWindow.size > 0 && !input.allowExpiredWindows) {
63538
+ const expiredSiblings = selectLatestQuotaSnapshots(snapshots, {
63539
+ minCurrentCapturedAt,
63540
+ now,
63541
+ allowExpiredWindows: true
63542
+ });
63543
+ for (const [key, row] of expiredSiblings) {
63544
+ if (latestByWindow.has(key))
63545
+ continue;
63546
+ if (!quotaSnapshotIsExpired(row, now))
63547
+ continue;
63548
+ if (!shouldRetainExpiredWindow(row, now))
63549
+ continue;
63550
+ latestByWindow.set(key, row);
63551
+ awaitingKeys.add(key);
63552
+ }
63553
+ }
63554
+ const windows = [...latestByWindow.values()].map((snapshot) => storedQuotaWindowGauge(snapshot, historyByWindow.get(quotaSnapshotWindowKey(snapshot)) ?? [], { awaitingReset: awaitingKeys.has(quotaSnapshotWindowKey(snapshot)), now })).filter((window2) => Boolean(window2)).sort((a, b) => quotaWindowSortRank(a.label) - quotaWindowSortRank(b.label) || a.label.localeCompare(b.label));
63075
63555
  if (windows.length === 0)
63076
63556
  return null;
63077
63557
  const displayWindow = windows.find((window2) => window2.label === "7d") ?? windows[windows.length - 1];
63078
63558
  const fill = Math.max(...windows.map((window2) => window2.fill));
63079
- const plan = snapshots.filter((snapshot) => snapshot.capturedAt >= minCurrentCapturedAt).sort((a, b) => b.capturedAt - a.capturedAt).map((snapshot) => stringValue10(snapshot.planType)).find((value) => Boolean(value));
63559
+ const plan = snapshots.filter((snapshot) => snapshot.capturedAt >= minCurrentCapturedAt).sort((a, b) => b.capturedAt - a.capturedAt).map((snapshot) => stringValue11(snapshot.planType)).find((value) => Boolean(value));
63080
63560
  return {
63081
63561
  id: input.id,
63082
63562
  label: input.label,
@@ -63127,13 +63607,41 @@ function quotaHistoryByWindow(snapshots) {
63127
63607
  return out;
63128
63608
  }
63129
63609
  function quotaSnapshotWindowKey(row) {
63130
- const resource = stringValue10(row.metadata?.resource) ?? stringValue10(row.metadata?.modelName) ?? "";
63610
+ const resource = stringValue11(row.metadata?.resource) ?? stringValue11(row.metadata?.modelName) ?? "";
63131
63611
  return [resource, formatStoredQuotaWindowLabel(row)].join(":");
63132
63612
  }
63133
63613
  function quotaSnapshotIsExpired(row, now) {
63134
63614
  const resetAt = finiteNumber(row.resetAt);
63135
63615
  return resetAt !== undefined && resetAt <= now;
63136
63616
  }
63617
+ function inferredQuotaWindowMs(row) {
63618
+ const explicit = finiteNumber(row.windowMs);
63619
+ if (explicit !== undefined)
63620
+ return explicit;
63621
+ const label = row.label.trim().toLowerCase();
63622
+ if (label === "5h" || row.windowKind === "primary")
63623
+ return FIVE_HOUR_MS;
63624
+ if (label === "7d" || label === "weekly" || row.windowKind === "secondary")
63625
+ return WEEK_MS;
63626
+ if (label === "30d" || label === "monthly" || row.windowKind === "monthly")
63627
+ return MONTH_MS;
63628
+ return;
63629
+ }
63630
+ function shouldRetainExpiredWindow(row, now) {
63631
+ const windowMs = inferredQuotaWindowMs(row) ?? FIVE_HOUR_MS;
63632
+ const silenceMs = Math.min(WEEK_MS, Math.max(24 * 3600 * 1000, windowMs * 2));
63633
+ return row.capturedAt >= now - silenceMs;
63634
+ }
63635
+ function forwardedResetAt(resetAt, windowMs, now) {
63636
+ if (resetAt === undefined)
63637
+ return;
63638
+ if (resetAt > now)
63639
+ return resetAt;
63640
+ if (windowMs === undefined || windowMs <= 0)
63641
+ return resetAt;
63642
+ const cycles = Math.floor((now - resetAt) / windowMs) + 1;
63643
+ return resetAt + cycles * windowMs;
63644
+ }
63137
63645
  function quotaSnapshotUsage(row) {
63138
63646
  const remainingPercent = finiteNumber(row.percentRemaining);
63139
63647
  const usedPercent = finiteNumber(row.usedPercent) ?? (remainingPercent === undefined ? undefined : 100 - remainingPercent) ?? deriveUsedPercent(row.used, row.limitValue);
@@ -63150,20 +63658,27 @@ function quotaSnapshotUsage(row) {
63150
63658
  unitLabel: used === undefined || limit === undefined ? "quota" : "req"
63151
63659
  };
63152
63660
  }
63153
- function storedQuotaWindowGauge(row, history = []) {
63661
+ function storedQuotaWindowGauge(row, history = [], options = {}) {
63154
63662
  const usage = quotaSnapshotUsage(row);
63155
63663
  if (!usage)
63156
63664
  return null;
63157
- const windowMs = finiteNumber(row.windowMs);
63158
- const resetAt = finiteNumber(row.resetAt) ?? (windowMs === undefined ? undefined : row.capturedAt + windowMs) ?? Date.now();
63665
+ const windowMs = finiteNumber(row.windowMs) ?? inferredQuotaWindowMs(row);
63666
+ const now = options.now ?? Date.now();
63667
+ const rawResetAt = finiteNumber(row.resetAt) ?? (windowMs === undefined ? undefined : row.capturedAt + windowMs) ?? now;
63668
+ const awaitingReset = options.awaitingReset === true;
63669
+ const resetAt = awaitingReset ? forwardedResetAt(rawResetAt, windowMs, now) ?? rawResetAt : rawResetAt;
63159
63670
  return {
63160
63671
  label: formatStoredQuotaWindowLabel(row),
63161
- ...usage,
63672
+ fill: awaitingReset ? 0 : usage.fill,
63673
+ usedLabel: awaitingReset ? "\u2014" : usage.usedLabel,
63674
+ capLabel: usage.capLabel,
63675
+ unitLabel: usage.unitLabel,
63162
63676
  resetAt,
63163
63677
  ...windowMs === undefined ? {} : { windowMs },
63164
63678
  capturedAt: row.capturedAt,
63165
63679
  source: quotaSnapshotSourceLabel(row),
63166
- ...history.length === 0 ? {} : { history }
63680
+ ...history.length === 0 ? {} : { history },
63681
+ ...awaitingReset ? { awaitingReset: true } : {}
63167
63682
  };
63168
63683
  }
63169
63684
  function quotaSnapshotSourceLabel(row) {
@@ -63206,6 +63721,8 @@ function formatStoredQuotaWindowLabel(row) {
63206
63721
  if (fromDuration)
63207
63722
  return fromDuration;
63208
63723
  const label = explicitDuration.toLowerCase();
63724
+ if (label === "monthly" || label === "month" || row.windowKind === "monthly")
63725
+ return "30d";
63209
63726
  if (label === "weekly" || label === "week" || row.windowKind === "secondary")
63210
63727
  return "7d";
63211
63728
  if (label === "primary" || row.windowKind === "primary")
@@ -63223,7 +63740,9 @@ function quotaWindowSortRank(label) {
63223
63740
  return 0;
63224
63741
  if (label === "7d")
63225
63742
  return 1;
63226
- return 2;
63743
+ if (label === "30d" || label === "monthly")
63744
+ return 2;
63745
+ return 3;
63227
63746
  }
63228
63747
  async function loadKimiGauge(forceRefresh = false) {
63229
63748
  const fresh = loadPersistedProviderQuotaGauge({
@@ -63271,7 +63790,7 @@ async function readKimiUsageResponse() {
63271
63790
  return parsed;
63272
63791
  }
63273
63792
  const credentials = readKimiCredentials();
63274
- const accessToken = stringValue10(credentials?.access_token);
63793
+ const accessToken = stringValue11(credentials?.access_token);
63275
63794
  if (!accessToken)
63276
63795
  return null;
63277
63796
  let response;
@@ -63302,12 +63821,12 @@ async function readKimiUsageResponse() {
63302
63821
  }
63303
63822
  }
63304
63823
  function kimiCodeHome() {
63305
- return process.env.KIMI_CODE_HOME?.trim() || join42(homeDir(), ".kimi-code");
63824
+ return process.env.KIMI_CODE_HOME?.trim() || join43(homeDir(), ".kimi-code");
63306
63825
  }
63307
63826
  function readKimiCredentials() {
63308
- const candidates = [join42(kimiCodeHome(), "credentials", "kimi-code.json")];
63827
+ const candidates = [join43(kimiCodeHome(), "credentials", "kimi-code.json")];
63309
63828
  if (!process.env.KIMI_CODE_HOME?.trim()) {
63310
- candidates.push(join42(homeDir(), ".kimi", "credentials", "kimi-code.json"));
63829
+ candidates.push(join43(homeDir(), ".kimi", "credentials", "kimi-code.json"));
63311
63830
  }
63312
63831
  for (const path2 of candidates) {
63313
63832
  const credentials = readJsonRecord(path2);
@@ -63374,7 +63893,7 @@ function kimiWindowMs(window2) {
63374
63893
  const duration = numericValue(window2?.duration);
63375
63894
  if (duration === undefined || duration <= 0)
63376
63895
  return null;
63377
- const unit = stringValue10(window2?.timeUnit)?.toUpperCase() ?? "";
63896
+ const unit = stringValue11(window2?.timeUnit)?.toUpperCase() ?? "";
63378
63897
  if (unit.includes("MINUTE"))
63379
63898
  return duration * 60000;
63380
63899
  if (unit.includes("HOUR"))
@@ -63386,13 +63905,13 @@ function kimiWindowMs(window2) {
63386
63905
  return null;
63387
63906
  }
63388
63907
  function kimiMembershipPlan(payload) {
63389
- const raw2 = stringValue10(payload.user?.membership?.level);
63908
+ const raw2 = stringValue11(payload.user?.membership?.level);
63390
63909
  if (!raw2)
63391
63910
  return;
63392
63911
  return raw2.replace(/^LEVEL_/u, "").toLowerCase().replace(/(^|_)([a-z])/gu, (_match, prefix, letter) => `${prefix ? " " : ""}${letter.toUpperCase()}`);
63393
63912
  }
63394
63913
  function dashboardImportPath() {
63395
- return join42(dirname22(resolveDbPath()), "provider-usage-snapshots.json");
63914
+ return join43(dirname22(resolveDbPath()), "provider-usage-snapshots.json");
63396
63915
  }
63397
63916
  function readDashboardUsageStore() {
63398
63917
  const record2 = readJsonRecord(dashboardImportPath());
@@ -63406,8 +63925,8 @@ function readDashboardUsageStore() {
63406
63925
  store2.providers[provider] = {
63407
63926
  provider,
63408
63927
  capturedAt,
63409
- plan: stringValue10(value?.plan),
63410
- periodLabel: stringValue10(value?.periodLabel),
63928
+ plan: stringValue11(value?.plan),
63929
+ periodLabel: stringValue11(value?.periodLabel),
63411
63930
  usedPercent: numericValue(value?.usedPercent),
63412
63931
  resetAt: numericValue(value?.resetAt),
63413
63932
  totalTokens: numericValue(value?.totalTokens),
@@ -63496,7 +64015,7 @@ async function loadGrokGauge() {
63496
64015
  };
63497
64016
  }
63498
64017
  async function loadGrokBillingQuotaSnapshots() {
63499
- const path2 = join42(homeDir(), ".grok", "logs", "unified.jsonl");
64018
+ const path2 = join43(homeDir(), ".grok", "logs", "unified.jsonl");
63500
64019
  const stat7 = safeStat(path2);
63501
64020
  if (!stat7 || stat7.size <= 0)
63502
64021
  return [];
@@ -63534,7 +64053,7 @@ async function loadGrokBillingQuotaSnapshots() {
63534
64053
  }).sort((left, right) => left.capturedAt - right.capturedAt).slice(-PERSISTED_QUOTA_ROW_LIMIT);
63535
64054
  }
63536
64055
  function grokBillingQuotaSnapshot(record2) {
63537
- if (!record2 || stringValue10(record2.msg) !== "billing: fetched credits config")
64056
+ if (!record2 || stringValue11(record2.msg) !== "billing: fetched credits config")
63538
64057
  return null;
63539
64058
  const context = recordValue(record2.ctx);
63540
64059
  const config = recordValue(context?.config);
@@ -63545,7 +64064,7 @@ function grokBillingQuotaSnapshot(record2) {
63545
64064
  const period = recordValue(config?.currentPeriod);
63546
64065
  const startAt = timestampMs(period?.start) ?? timestampMs(config?.billingPeriodStart);
63547
64066
  const resetAt = timestampMs(period?.end) ?? timestampMs(config?.billingPeriodEnd);
63548
- const periodType = stringValue10(period?.type)?.toUpperCase() ?? "";
64067
+ const periodType = stringValue11(period?.type)?.toUpperCase() ?? "";
63549
64068
  const inferredWindowMs = periodType.includes("MONTH") ? 30 * 24 * 3600000 : WEEK_MS;
63550
64069
  const windowMs = startAt !== undefined && resetAt !== undefined && resetAt > startAt ? resetAt - startAt : inferredWindowMs;
63551
64070
  const label = periodType.includes("MONTH") ? "30d" : periodType.includes("WEEK") ? "7d" : formatWindowMs(windowMs) ?? "quota";
@@ -63554,7 +64073,7 @@ function grokBillingQuotaSnapshot(record2) {
63554
64073
  provider: "xai",
63555
64074
  harness: "grok",
63556
64075
  transport: "grok_local_log",
63557
- planType: stringValue10(context?.subscriptionTier) ?? stringValue10(config?.subscriptionTier),
64076
+ planType: stringValue11(context?.subscriptionTier) ?? stringValue11(config?.subscriptionTier),
63558
64077
  label,
63559
64078
  windowKind: "subscription",
63560
64079
  usedPercent,
@@ -63574,8 +64093,8 @@ function loadGrokLocalUsage() {
63574
64093
  const usage = grokUsageFromRecord(parsed, Date.now());
63575
64094
  return usage ? [usage] : [];
63576
64095
  }
63577
- const root = join42(homeDir(), ".grok", "sessions");
63578
- if (!existsSync36(root))
64096
+ const root = join43(homeDir(), ".grok", "sessions");
64097
+ if (!existsSync37(root))
63579
64098
  return [];
63580
64099
  const cutoff = Date.now() - WEEK_MS;
63581
64100
  const paths2 = [];
@@ -63587,7 +64106,7 @@ function loadGrokLocalUsage() {
63587
64106
  return;
63588
64107
  }
63589
64108
  for (const entry of entries) {
63590
- const path2 = join42(directory, entry.name);
64109
+ const path2 = join43(directory, entry.name);
63591
64110
  if (entry.isDirectory())
63592
64111
  walk(path2);
63593
64112
  else if (entry.isFile() && entry.name === "updates.jsonl" && (safeStat(path2)?.mtimeMs ?? 0) >= cutoff)
@@ -63639,8 +64158,8 @@ function formatTokenCount(value) {
63639
64158
  }
63640
64159
  async function loadCursorGauge() {
63641
64160
  const state = readCursorSubscriptionState();
63642
- const membership = stringValue10(state?.membershipType);
63643
- const subscriptionStatus = stringValue10(state?.subscriptionStatus);
64161
+ const membership = stringValue11(state?.membershipType);
64162
+ const subscriptionStatus = stringValue11(state?.subscriptionStatus);
63644
64163
  const imported = readDashboardUsageStore().providers.cursor;
63645
64164
  const dashboard = imported ? dashboardGauge(imported) : null;
63646
64165
  if (!membership && !subscriptionStatus)
@@ -63665,11 +64184,11 @@ function readCursorSubscriptionState() {
63665
64184
  return parseJsonRecord2(fixtureJson);
63666
64185
  }
63667
64186
  const candidates = [
63668
- join42(homeDir(), "Library", "Application Support", "Cursor", "User", "globalStorage", "state.vscdb"),
63669
- join42(homeDir(), ".config", "Cursor", "User", "globalStorage", "state.vscdb")
64187
+ join43(homeDir(), "Library", "Application Support", "Cursor", "User", "globalStorage", "state.vscdb"),
64188
+ join43(homeDir(), ".config", "Cursor", "User", "globalStorage", "state.vscdb")
63670
64189
  ];
63671
64190
  for (const path2 of candidates) {
63672
- if (!existsSync36(path2))
64191
+ if (!existsSync37(path2))
63673
64192
  continue;
63674
64193
  let cursorDb = null;
63675
64194
  try {
@@ -63768,7 +64287,7 @@ async function readMinimaxRemainsResponse() {
63768
64287
  }
63769
64288
  function minimaxQuotaSnapshots(payload, capturedAt) {
63770
64289
  return (Array.isArray(payload.model_remains) ? payload.model_remains : []).flatMap((model, index2) => {
63771
- const modelName2 = stringValue10(model.model_name) ?? `model-${index2 + 1}`;
64290
+ const modelName2 = stringValue11(model.model_name) ?? `model-${index2 + 1}`;
63772
64291
  const prefix = modelName2.toLowerCase() === "general" ? "" : `${modelName2} `;
63773
64292
  const intervalStartAt = timestampMs(model.start_time);
63774
64293
  const intervalEndAt = timestampMs(model.end_time);
@@ -63822,7 +64341,7 @@ function minimaxQuotaSnapshot(model, input) {
63822
64341
  capturedAt: input.capturedAt,
63823
64342
  metadata: {
63824
64343
  source: "service-budgets.minimax-token-plan",
63825
- modelName: stringValue10(model.model_name)
64344
+ modelName: stringValue11(model.model_name)
63826
64345
  }
63827
64346
  };
63828
64347
  }
@@ -63916,20 +64435,20 @@ function githubQuotaSnapshot(core, capturedAt) {
63916
64435
  }
63917
64436
  function detectCloudAccounts() {
63918
64437
  const accounts = [];
63919
- const declaredAccounts = readJsonRecord(join42(homeDir(), ".scout", "provider-accounts.json"));
64438
+ const declaredAccounts = readJsonRecord(join43(homeDir(), ".scout", "provider-accounts.json"));
63920
64439
  const exeAccount = recordValue(declaredAccounts?.exe);
63921
- if (exeAccount && stringValue10(exeAccount.status)?.toLowerCase() !== "inactive") {
64440
+ if (exeAccount && stringValue11(exeAccount.status)?.toLowerCase() !== "inactive") {
63922
64441
  accounts.push({
63923
64442
  id: "exe",
63924
64443
  label: "exe.dev",
63925
64444
  statusLabel: "Connected",
63926
- detailLabel: stringValue10(exeAccount.detail) ?? "Persistent VMs for remote agents"
64445
+ detailLabel: stringValue11(exeAccount.detail) ?? "Persistent VMs for remote agents"
63927
64446
  });
63928
64447
  }
63929
64448
  const cloudflareConfig = [
63930
- join42(homeDir(), "Library", "Preferences", ".wrangler", "config", "default.toml"),
63931
- join42(homeDir(), ".wrangler", "config", "default.toml"),
63932
- join42(homeDir(), ".config", ".wrangler", "config", "default.toml")
64449
+ join43(homeDir(), "Library", "Preferences", ".wrangler", "config", "default.toml"),
64450
+ join43(homeDir(), ".wrangler", "config", "default.toml"),
64451
+ join43(homeDir(), ".config", ".wrangler", "config", "default.toml")
63933
64452
  ].find((path2) => fileContainsAny(path2, ["oauth_token", "api_token"]));
63934
64453
  if (cloudflareConfig) {
63935
64454
  accounts.push({
@@ -63940,10 +64459,10 @@ function detectCloudAccounts() {
63940
64459
  });
63941
64460
  }
63942
64461
  const vercelConfig = [
63943
- join42(homeDir(), "Library", "Application Support", "com.vercel.cli", "config.json"),
63944
- join42(homeDir(), ".config", "com.vercel.cli", "config.json")
63945
- ].map((path2) => readJsonRecord(path2)).find((record2) => Boolean(stringValue10(record2?.currentTeam)));
63946
- const vercelAuth = existsSync36(join42(homeDir(), ".local", "share", "com.vercel.cli", "auth.json"));
64462
+ join43(homeDir(), "Library", "Application Support", "com.vercel.cli", "config.json"),
64463
+ join43(homeDir(), ".config", "com.vercel.cli", "config.json")
64464
+ ].map((path2) => readJsonRecord(path2)).find((record2) => Boolean(stringValue11(record2?.currentTeam)));
64465
+ const vercelAuth = existsSync37(join43(homeDir(), ".local", "share", "com.vercel.cli", "auth.json"));
63947
64466
  if (vercelConfig || vercelAuth) {
63948
64467
  accounts.push({
63949
64468
  id: "vercel",
@@ -64077,7 +64596,7 @@ function quotaHistoryMetadata(snapshot) {
64077
64596
  };
64078
64597
  }
64079
64598
  function stableHash(value) {
64080
- return createHash7("sha256").update(JSON.stringify(value)).digest("hex").slice(0, 24);
64599
+ return createHash8("sha256").update(JSON.stringify(value)).digest("hex").slice(0, 24);
64081
64600
  }
64082
64601
  function timestampMs(value) {
64083
64602
  const normalized = epochMs(value);
@@ -64099,7 +64618,7 @@ function numericValue(value) {
64099
64618
  }
64100
64619
  return;
64101
64620
  }
64102
- function stringValue10(value) {
64621
+ function stringValue11(value) {
64103
64622
  return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
64104
64623
  }
64105
64624
  function recordValue(value) {
@@ -64130,7 +64649,7 @@ function parseMetadataJson(value) {
64130
64649
  }
64131
64650
  }
64132
64651
  function homeDir() {
64133
- return process.env.HOME?.trim() || homedir34();
64652
+ return process.env.HOME?.trim() || homedir35();
64134
64653
  }
64135
64654
  function safeStat(path2) {
64136
64655
  try {
@@ -64438,7 +64957,7 @@ init_src();
64438
64957
  init_support_paths();
64439
64958
  import { mkdir as mkdir10, readFile as readFile11, rename, writeFile as writeFile8 } from "fs/promises";
64440
64959
  import { randomUUID as randomUUID5 } from "crypto";
64441
- import { dirname as dirname23, join as join43 } from "path";
64960
+ import { dirname as dirname23, join as join44 } from "path";
64442
64961
  class ScoutbotThreadMapStore {
64443
64962
  filePath;
64444
64963
  constructor(filePath = defaultScoutbotThreadMapPath()) {
@@ -64593,7 +65112,7 @@ class ScoutbotThreadMapStore {
64593
65112
  }
64594
65113
  }
64595
65114
  function defaultScoutbotThreadMapPath() {
64596
- return join43(resolveOpenScoutSupportPaths().supportDirectory, "scoutbot-threads.json");
65115
+ return join44(resolveOpenScoutSupportPaths().supportDirectory, "scoutbot-threads.json");
64597
65116
  }
64598
65117
  function chooseDefaultConversationId(snapshot) {
64599
65118
  const existing = Object.values(snapshot?.conversations ?? {}).find((conversation) => conversation.metadata?.scoutbotThreadId === SCOUTBOT_DEFAULT_THREAD_ID && isOpaqueChannelId(conversation.id));
@@ -65081,7 +65600,7 @@ async function admitScoutbotTurn(key, thread, snapshot, post) {
65081
65600
  // ../web/server/pairing.ts
65082
65601
  import {
65083
65602
  closeSync,
65084
- existsSync as existsSync37,
65603
+ existsSync as existsSync38,
65085
65604
  mkdirSync as mkdirSync18,
65086
65605
  openSync,
65087
65606
  readFileSync as readFileSync23,
@@ -65090,8 +65609,8 @@ import {
65090
65609
  unlinkSync as unlinkSync3,
65091
65610
  writeFileSync as writeFileSync14
65092
65611
  } from "fs";
65093
- import { homedir as homedir35 } from "os";
65094
- import { dirname as dirname24, join as join44, resolve as resolve16 } from "path";
65612
+ import { homedir as homedir36 } from "os";
65613
+ import { dirname as dirname24, join as join45, resolve as resolve16 } from "path";
65095
65614
  init_setup();
65096
65615
  init_local_config();
65097
65616
  init_tool_resolution();
@@ -65108,18 +65627,18 @@ var SCOUT_PAIRING_BRIDGE_CONNECT_TIMEOUT_MS = 1500;
65108
65627
  var SCOUT_PAIRING_BRIDGE_REQUEST_TIMEOUT_MS = 2500;
65109
65628
  function resolveScoutPairingHomeDirectory() {
65110
65629
  const configured = process.env.OPENSCOUT_PAIRING_HOME?.trim() || process.env.SCOUT_PAIRING_HOME?.trim();
65111
- return configured || join44(homedir35(), SCOUT_PAIRING_HOME_DIRECTORY);
65630
+ return configured || join45(homedir36(), SCOUT_PAIRING_HOME_DIRECTORY);
65112
65631
  }
65113
65632
  function resolveScoutPairingPaths() {
65114
65633
  const rootDir = resolveScoutPairingHomeDirectory();
65115
65634
  return {
65116
65635
  rootDir,
65117
- configPath: join44(rootDir, SCOUT_PAIRING_CONFIG_FILE),
65118
- identityPath: join44(rootDir, SCOUT_PAIRING_IDENTITY_FILE),
65119
- trustedPeersPath: join44(rootDir, SCOUT_PAIRING_TRUSTED_PEERS_FILE),
65120
- logPath: join44(rootDir, SCOUT_PAIRING_LOG_FILE),
65121
- runtimeStatePath: join44(rootDir, SCOUT_PAIRING_RUNTIME_STATE_FILE),
65122
- runtimePidPath: join44(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE)
65636
+ configPath: join45(rootDir, SCOUT_PAIRING_CONFIG_FILE),
65637
+ identityPath: join45(rootDir, SCOUT_PAIRING_IDENTITY_FILE),
65638
+ trustedPeersPath: join45(rootDir, SCOUT_PAIRING_TRUSTED_PEERS_FILE),
65639
+ logPath: join45(rootDir, SCOUT_PAIRING_LOG_FILE),
65640
+ runtimeStatePath: join45(rootDir, SCOUT_PAIRING_RUNTIME_STATE_FILE),
65641
+ runtimePidPath: join45(rootDir, SCOUT_PAIRING_RUNTIME_PID_FILE)
65123
65642
  };
65124
65643
  }
65125
65644
  function createScoutPairingBridgeUrl(port) {
@@ -65280,7 +65799,7 @@ async function readScoutPairingSessionSnapshots(port) {
65280
65799
  }
65281
65800
  function loadScoutPairingConfig() {
65282
65801
  const { configPath } = resolveScoutPairingPaths();
65283
- if (!existsSync37(configPath)) {
65802
+ if (!existsSync38(configPath)) {
65284
65803
  return {};
65285
65804
  }
65286
65805
  try {
@@ -65305,7 +65824,7 @@ function resolveScoutPairingConfig() {
65305
65824
  }
65306
65825
  function readScoutPairingRuntimeSnapshot() {
65307
65826
  const { runtimeStatePath } = resolveScoutPairingPaths();
65308
- if (!existsSync37(runtimeStatePath)) {
65827
+ if (!existsSync38(runtimeStatePath)) {
65309
65828
  return null;
65310
65829
  }
65311
65830
  try {
@@ -65317,7 +65836,7 @@ function readScoutPairingRuntimeSnapshot() {
65317
65836
  }
65318
65837
  function readScoutPairingRuntimePid() {
65319
65838
  const { runtimePidPath } = resolveScoutPairingPaths();
65320
- if (!existsSync37(runtimePidPath)) {
65839
+ if (!existsSync38(runtimePidPath)) {
65321
65840
  return null;
65322
65841
  }
65323
65842
  try {
@@ -65360,8 +65879,8 @@ async function getScoutWebPairingSessionSnapshots() {
65360
65879
 
65361
65880
  // ../web/server/core/agent-endpoints.ts
65362
65881
  init_src();
65363
- import { homedir as homedir36 } from "os";
65364
- import { join as join45, resolve as resolve17 } from "path";
65882
+ import { homedir as homedir37 } from "os";
65883
+ import { join as join46, resolve as resolve17 } from "path";
65365
65884
  function endpointMetadataRecord(endpoint) {
65366
65885
  return endpoint?.metadata && typeof endpoint.metadata === "object" && !Array.isArray(endpoint.metadata) ? endpoint.metadata : {};
65367
65886
  }
@@ -65395,10 +65914,10 @@ function endpointSessionAliases(endpoint) {
65395
65914
  }
65396
65915
  function expandHomePath5(value) {
65397
65916
  if (value === "~") {
65398
- return homedir36();
65917
+ return homedir37();
65399
65918
  }
65400
65919
  if (value.startsWith("~/")) {
65401
- return join45(homedir36(), value.slice(2));
65920
+ return join46(homedir37(), value.slice(2));
65402
65921
  }
65403
65922
  return value;
65404
65923
  }
@@ -66733,11 +67252,11 @@ async function markScoutMobileConversationRead(input) {
66733
67252
 
66734
67253
  // ../web/server/core/pairing/runtime/bridge/mobile-terminal-provision.ts
66735
67254
  init_system_probes();
66736
- import { createHash as createHash10 } from "crypto";
67255
+ import { createHash as createHash11 } from "crypto";
66737
67256
  import {
66738
67257
  chmodSync as chmodSync2,
66739
67258
  closeSync as closeSync2,
66740
- existsSync as existsSync38,
67259
+ existsSync as existsSync39,
66741
67260
  mkdirSync as mkdirSync19,
66742
67261
  openSync as openSync2,
66743
67262
  readFileSync as readFileSync24,
@@ -66745,11 +67264,11 @@ import {
66745
67264
  unlinkSync as unlinkSync4,
66746
67265
  writeFileSync as writeFileSync15
66747
67266
  } from "fs";
66748
- import { homedir as homedir37, hostname as hostname3, userInfo as userInfo2 } from "os";
66749
- import { join as join46 } from "path";
67267
+ import { homedir as homedir38, hostname as hostname3, userInfo as userInfo2 } from "os";
67268
+ import { join as join47 } from "path";
66750
67269
 
66751
67270
  // ../web/server/core/pairing/runtime/bridge/ssh-terminal-access.ts
66752
- import { createHash as createHash8 } from "crypto";
67271
+ import { createHash as createHash9 } from "crypto";
66753
67272
  var SCOUT_AUTHORIZED_KEY_MARKER = "scout:terminal-access:v0";
66754
67273
  var SCOUT_AUTHORIZED_KEY_OPTIONS = "restrict,pty";
66755
67274
  var SUPPORTED_IOS_PUBLIC_KEY_ALGORITHMS = new Set([
@@ -66921,10 +67440,10 @@ function readSshWireString(buffer, offset) {
66921
67440
  };
66922
67441
  }
66923
67442
  function fingerprintKeyData(keyData) {
66924
- return `SHA256:${createHash8("sha256").update(Buffer.from(keyData, "base64")).digest("base64").replace(/=+$/, "")}`;
67443
+ return `SHA256:${createHash9("sha256").update(Buffer.from(keyData, "base64")).digest("base64").replace(/=+$/, "")}`;
66925
67444
  }
66926
67445
  function fingerprintUtf8(value) {
66927
- return `SHA256:${createHash8("sha256").update(value, "utf8").digest("base64").replace(/=+$/, "")}`;
67446
+ return `SHA256:${createHash9("sha256").update(value, "utf8").digest("base64").replace(/=+$/, "")}`;
66928
67447
  }
66929
67448
  function encodeMarkerValue(value) {
66930
67449
  return Buffer.from(value, "utf8").toString("base64url");
@@ -66935,7 +67454,7 @@ function decodeMarkerValue(value) {
66935
67454
  }
66936
67455
 
66937
67456
  // ../web/server/core/pairing/runtime/bridge/mobile-terminal-session.ts
66938
- import { createHash as createHash9 } from "crypto";
67457
+ import { createHash as createHash10 } from "crypto";
66939
67458
 
66940
67459
  class InvalidMobileTerminalSessionError extends Error {
66941
67460
  constructor(message = "Invalid mobile terminal session name") {
@@ -66945,7 +67464,7 @@ class InvalidMobileTerminalSessionError extends Error {
66945
67464
  }
66946
67465
  function mobileTerminalSessionName(sshPublicKey, deviceClass) {
66947
67466
  const normalizedClass = normalizeMobileTerminalDeviceClass(deviceClass);
66948
- const signature = createHash9("sha256").update(sshPublicKey.trim()).digest("hex").slice(0, 8);
67467
+ const signature = createHash10("sha256").update(sshPublicKey.trim()).digest("hex").slice(0, 8);
66949
67468
  return `scout-${normalizedClass}-${signature}`;
66950
67469
  }
66951
67470
  function provisionedMobileTerminalSessionName(sshPublicKey, deviceClass) {
@@ -66973,8 +67492,8 @@ function authorizedMobileTerminalSessionName(requestedSessionName, provisionedSe
66973
67492
 
66974
67493
  // ../web/server/core/pairing/runtime/bridge/mobile-terminal-provision.ts
66975
67494
  async function readMobileTerminalStatus(requestedSessionName, deviceId) {
66976
- const authorizedKeysPath = join46(homedir37(), ".ssh", "authorized_keys");
66977
- const authorizedKeys = existsSync38(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
67495
+ const authorizedKeysPath = join47(homedir38(), ".ssh", "authorized_keys");
67496
+ const authorizedKeys = existsSync39(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
66978
67497
  const provisionedSessionName = findSshTerminalSessionForDevice(authorizedKeys, deviceId);
66979
67498
  const sessionName = authorizedMobileTerminalSessionName(requestedSessionName, provisionedSessionName);
66980
67499
  const base = {
@@ -67046,17 +67565,17 @@ async function readMobileTerminalStatus(requestedSessionName, deviceId) {
67046
67565
  async function provisionMobileTerminalAccess(sshPublicKey, deviceId, deviceClass = undefined) {
67047
67566
  const id = deviceId?.trim() || "scout-ios-device";
67048
67567
  const sessionName = provisionedMobileTerminalSessionName(sshPublicKey, deviceClass);
67049
- const sshDir = join46(homedir37(), ".ssh");
67050
- const authorizedKeysPath = join46(sshDir, "authorized_keys");
67568
+ const sshDir = join47(homedir38(), ".ssh");
67569
+ const authorizedKeysPath = join47(sshDir, "authorized_keys");
67051
67570
  const hostKeyFingerprint = readRequiredHostKeyFingerprint();
67052
67571
  const result = withAuthorizedKeysLock(sshDir, () => {
67053
- if (!existsSync38(sshDir)) {
67572
+ if (!existsSync39(sshDir)) {
67054
67573
  mkdirSync19(sshDir, { recursive: true, mode: 448 });
67055
67574
  }
67056
67575
  try {
67057
67576
  chmodSync2(sshDir, 448);
67058
67577
  } catch {}
67059
- const existing = existsSync38(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
67578
+ const existing = existsSync39(authorizedKeysPath) ? readFileSync24(authorizedKeysPath, "utf8") : "";
67060
67579
  const result2 = provisionSshTerminalAccess({
67061
67580
  authorizedKeys: existing,
67062
67581
  deviceId: id,
@@ -67108,7 +67627,7 @@ function readRequiredHostKeyFingerprint() {
67108
67627
  const keyData = pub.trim().split(/\s+/)[1];
67109
67628
  if (!keyData)
67110
67629
  throw new Error("missing key data");
67111
- const digest = createHash10("sha256").update(Buffer.from(keyData, "base64")).digest("base64").replace(/=+$/, "");
67630
+ const digest = createHash11("sha256").update(Buffer.from(keyData, "base64")).digest("base64").replace(/=+$/, "");
67112
67631
  return `SHA256:${digest}`;
67113
67632
  } catch (error) {
67114
67633
  const detail = error instanceof Error ? error.message : String(error);
@@ -67128,10 +67647,10 @@ function writeAuthorizedKeysAtomically(path2, contents) {
67128
67647
  }
67129
67648
  }
67130
67649
  function withAuthorizedKeysLock(sshDir, action) {
67131
- if (!existsSync38(sshDir)) {
67650
+ if (!existsSync39(sshDir)) {
67132
67651
  mkdirSync19(sshDir, { recursive: true, mode: 448 });
67133
67652
  }
67134
- const lockPath = join46(sshDir, ".scout-authorized-keys.lock");
67653
+ const lockPath = join47(sshDir, ".scout-authorized-keys.lock");
67135
67654
  const deadline = Date.now() + 5000;
67136
67655
  let fd = null;
67137
67656
  while (fd === null) {
@@ -67724,7 +68243,7 @@ async function handleRPCInner(bridge, req, rpcContext = {}) {
67724
68243
  const config = resolveConfig();
67725
68244
  const workspaceRoot = config.workspace?.root ? resolveWorkspaceRoot(config.workspace.root) : null;
67726
68245
  const matches = await readSessionSearch({
67727
- home: homedir38(),
68246
+ home: homedir39(),
67728
68247
  workspaceRoot,
67729
68248
  maxAgeDays: maxAge,
67730
68249
  limit,
@@ -67860,13 +68379,13 @@ function resolveMobileCurrentDirectory() {
67860
68379
  }
67861
68380
  }
67862
68381
  function resolveWorkspaceRoot(root) {
67863
- const expandedRoot = root.replace(/^~/, homedir38());
68382
+ const expandedRoot = root.replace(/^~/, homedir39());
67864
68383
  return realpathSync5(expandedRoot);
67865
68384
  }
67866
68385
  function resolveWorkspacePath(root, requestedPath) {
67867
68386
  const normalizedRoot = resolveWorkspaceRoot(root);
67868
- const expandedPath = requestedPath?.replace(/^~/, homedir38());
67869
- const candidate = expandedPath ? isAbsolute7(expandedPath) ? expandedPath : join47(normalizedRoot, expandedPath) : normalizedRoot;
68387
+ const expandedPath = requestedPath?.replace(/^~/, homedir39());
68388
+ const candidate = expandedPath ? isAbsolute7(expandedPath) ? expandedPath : join48(normalizedRoot, expandedPath) : normalizedRoot;
67870
68389
  const resolvedCandidate = realpathSync5(candidate);
67871
68390
  const rel = relative6(normalizedRoot, resolvedCandidate);
67872
68391
  if (rel === "" || !rel.startsWith("..") && !isAbsolute7(rel)) {
@@ -67896,7 +68415,7 @@ function listDirectories(dirPath) {
67896
68415
  continue;
67897
68416
  if (name2 === "node_modules" || name2 === ".build" || name2 === "target")
67898
68417
  continue;
67899
- const fullPath = join47(dirPath, name2);
68418
+ const fullPath = join48(dirPath, name2);
67900
68419
  try {
67901
68420
  const stat7 = statSync14(fullPath);
67902
68421
  if (!stat7.isDirectory())
@@ -67922,7 +68441,7 @@ async function discoverSessionFiles(maxAgeDays, limit) {
67922
68441
  const config = resolveConfig();
67923
68442
  const workspaceRoot = config.workspace?.root ? resolveWorkspaceRoot(config.workspace.root) : null;
67924
68443
  const sessions4 = await readSessionFileScan({
67925
- home: homedir38(),
68444
+ home: homedir39(),
67926
68445
  workspaceRoot,
67927
68446
  maxAgeDays,
67928
68447
  limit
@@ -79730,7 +80249,7 @@ function finalize(ctx, schema2) {
79730
80249
  result.$schema = "http://json-schema.org/draft-07/schema#";
79731
80250
  } else if (ctx.target === "draft-04") {
79732
80251
  result.$schema = "http://json-schema.org/draft-04/schema#";
79733
- } else if (ctx.target === "openapi-3.0") {} else {}
80252
+ } else if (ctx.target === "openapi-3.0") {}
79734
80253
  if (ctx.external?.uri) {
79735
80254
  const id = ctx.external.registry.get(schema2)?.id;
79736
80255
  if (!id)
@@ -79978,7 +80497,7 @@ var literalProcessor = (schema2, ctx, json2, _params) => {
79978
80497
  if (val === undefined) {
79979
80498
  if (ctx.unrepresentable === "throw") {
79980
80499
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
79981
- } else {}
80500
+ }
79982
80501
  } else if (typeof val === "bigint") {
79983
80502
  if (ctx.unrepresentable === "throw") {
79984
80503
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -82328,8 +82847,8 @@ init_system_probes();
82328
82847
  init_local_config();
82329
82848
  init_local_agents();
82330
82849
  import { readFileSync as readFileSync26, readdirSync as readdirSync8, realpathSync as realpathSync6, statSync as statSync15 } from "fs";
82331
- import { basename as basename17, isAbsolute as isAbsolute8, join as join48, relative as relative7, resolve as resolve20 } from "path";
82332
- import { homedir as homedir39 } from "os";
82850
+ import { basename as basename17, isAbsolute as isAbsolute8, join as join49, relative as relative7, resolve as resolve20 } from "path";
82851
+ import { homedir as homedir40 } from "os";
82333
82852
  var t = initTRPC.context().create();
82334
82853
  var logged = t.middleware(async ({ path: path2, type, next }) => {
82335
82854
  const start = Date.now();
@@ -82495,13 +83014,13 @@ function resolveMobileCurrentDirectory2() {
82495
83014
  }
82496
83015
  }
82497
83016
  function resolveWorkspaceRoot2(root) {
82498
- const expandedRoot = root.replace(/^~/, homedir39());
83017
+ const expandedRoot = root.replace(/^~/, homedir40());
82499
83018
  return realpathSync6(expandedRoot);
82500
83019
  }
82501
83020
  function resolveWorkspacePath2(root, requestedPath) {
82502
83021
  const normalizedRoot = resolveWorkspaceRoot2(root);
82503
- const expandedPath = requestedPath?.replace(/^~/, homedir39());
82504
- const candidate = expandedPath ? isAbsolute8(expandedPath) ? expandedPath : join48(normalizedRoot, expandedPath) : normalizedRoot;
83022
+ const expandedPath = requestedPath?.replace(/^~/, homedir40());
83023
+ const candidate = expandedPath ? isAbsolute8(expandedPath) ? expandedPath : join49(normalizedRoot, expandedPath) : normalizedRoot;
82505
83024
  const resolvedCandidate = realpathSync6(candidate);
82506
83025
  const rel = relative7(normalizedRoot, resolvedCandidate);
82507
83026
  if (rel === "" || !rel.startsWith("..") && !isAbsolute8(rel)) {
@@ -82531,7 +83050,7 @@ function listDirectories2(dirPath) {
82531
83050
  continue;
82532
83051
  if (name2 === "node_modules" || name2 === ".build" || name2 === "target")
82533
83052
  continue;
82534
- const fullPath = join48(dirPath, name2);
83053
+ const fullPath = join49(dirPath, name2);
82535
83054
  try {
82536
83055
  const stat7 = statSync15(fullPath);
82537
83056
  if (!stat7.isDirectory())
@@ -82564,7 +83083,7 @@ async function discoverSessionFiles2(maxAgeDays, limit) {
82564
83083
  const config2 = resolveConfig();
82565
83084
  const workspaceRoot = config2.workspace?.root ? resolveWorkspaceRoot2(config2.workspace.root) : null;
82566
83085
  const sessions4 = await readSessionFileScan({
82567
- home: homedir39(),
83086
+ home: homedir40(),
82568
83087
  workspaceRoot,
82569
83088
  maxAgeDays,
82570
83089
  limit
@@ -83253,7 +83772,7 @@ var historyRouter = t.router({
83253
83772
  const config2 = resolveConfig();
83254
83773
  const workspaceRoot = config2.workspace?.root ? resolveWorkspaceRoot2(config2.workspace.root) : null;
83255
83774
  const matches = await readSessionSearch({
83256
- home: homedir39(),
83775
+ home: homedir40(),
83257
83776
  workspaceRoot,
83258
83777
  maxAgeDays: maxAge,
83259
83778
  limit,
@@ -85418,14 +85937,14 @@ function observableToAsyncIterable(observable$1, signal2) {
85418
85937
  }
85419
85938
  // ../web/server/core/pairing/runtime/bridge/server-trpc.ts
85420
85939
  import { realpathSync as realpathSync7 } from "fs";
85421
- import { homedir as homedir40 } from "os";
85940
+ import { homedir as homedir41 } from "os";
85422
85941
  function resolveCurrentDirectory() {
85423
85942
  try {
85424
85943
  const config2 = resolveConfig();
85425
85944
  const configuredRoot = config2.workspace?.root;
85426
85945
  if (!configuredRoot)
85427
85946
  return process.cwd();
85428
- const expanded = configuredRoot.replace(/^~/, homedir40());
85947
+ const expanded = configuredRoot.replace(/^~/, homedir41());
85429
85948
  return realpathSync7(expanded);
85430
85949
  } catch {
85431
85950
  return process.cwd();
@@ -85960,16 +86479,17 @@ function isAsyncIterable(value) {
85960
86479
  // ../web/server/core/pairing/runtime/runtime.ts
85961
86480
  function createPairingAdapterRegistry(configAdapters) {
85962
86481
  const adapters = {
85963
- "claude-code": createAdapter6,
86482
+ "claude-code": createAdapter7,
85964
86483
  acp: createAdapter,
85965
- codex: createAdapter7,
86484
+ codex: createAdapter8,
86485
+ "devin-acp": createAdapter5,
85966
86486
  "grok-acp": createAdapter2,
85967
86487
  "kimi-acp": createAdapter3,
85968
- pi: createAdapter5,
85969
- opencode: createAdapter9,
86488
+ pi: createAdapter6,
86489
+ opencode: createAdapter10,
85970
86490
  "opencode-acp": createAdapter4,
85971
- "opencode-v2": createAdapter10,
85972
- openai: createAdapter8
86491
+ "opencode-v2": createAdapter11,
86492
+ openai: createAdapter9
85973
86493
  };
85974
86494
  if (configAdapters) {
85975
86495
  for (const [name2, entry] of Object.entries(configAdapters)) {
@@ -86112,7 +86632,7 @@ async function autoStartConfiguredSessions(bridge, sessions4) {
86112
86632
  try {
86113
86633
  const session = await bridge.createSession(entry.adapter, {
86114
86634
  name: entry.name,
86115
- cwd: entry.cwd?.replace(/^~/, homedir41()),
86635
+ cwd: entry.cwd?.replace(/^~/, homedir42()),
86116
86636
  options: entry.options
86117
86637
  });
86118
86638
  console.log(`[bridge] session started: ${session.name} (${entry.adapter})`);