@openscout/scout 0.2.97 → 0.2.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +0 -1
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-sfonf5SR.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-r_1tVuWk.js → AddProjectForm-fXndbzXT.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-B7c0egdP.js → AgentAvatar-Dz79iTxB.js} +1 -1
  7. package/dist/client/assets/AgentConfigurationScreen-DDc3udYM.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-DHDS9Pgd.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-B_KLcgsP.js → AgentDetailCard-8viaEY8b.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-DuyvyMMj.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-qntgg2q2.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-ajZvcfdW.js → AgentLaneCard-Cc9uyfBr.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-CTp39syR.js → AgentLaneChrome-Dv2lBFoH.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-DRc-TpMB.js → AgentLaneDetailSheet-CGqtqSHQ.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-VMNDo7kD.js → AgentLaneSummaryResize-Di4u6df2.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-CFadSaia.js → AgentLanesPreflight-CCGBArIb.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-96lHsoX7.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-CsQA3pu_.js → AgentLiveActions-DlSKL60c.js} +1 -1
  20. package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +1 -0
  21. package/dist/client/assets/{AgentSessions-BePq5Lgc.js → AgentSessions-DV9v34aq.js} +2 -2
  22. package/dist/client/assets/AgentsConsole-DTpVhS67.js +1 -0
  23. package/dist/client/assets/AgentsScreen-hZ4o2I-e.js +1 -0
  24. package/dist/client/assets/AgentsSubnav-Ci7uWM7P.js +1 -0
  25. package/dist/client/assets/{AstronautSuit-Cjjcv6yQ.js → AstronautSuit-CwB4Dw07.js} +1 -1
  26. package/dist/client/assets/{AtopView-PxWQd-sX.js → AtopView-D7vyQDtE.js} +1 -1
  27. package/dist/client/assets/{BackToPicker-Cto0Ioz9.js → BackToPicker-BHicJyfc.js} +1 -1
  28. package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +1 -0
  29. package/dist/client/assets/{BriefingsScreen-DNyFBrPn.js → BriefingsScreen-Cn4Mbam9.js} +1 -1
  30. package/dist/client/assets/{BrokerMetadataPanel-DbaCQlhw.js → BrokerMetadataPanel-BJSwU9XZ.js} +1 -1
  31. package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +5 -0
  32. package/dist/client/assets/{CastPicker-CTBHjjGw.js → CastPicker-CkgTalIt.js} +1 -1
  33. package/dist/client/assets/{ChatCollapsedStrip-D4rc7wBQ.js → ChatCollapsedStrip-7Wrg8Ge0.js} +1 -1
  34. package/dist/client/assets/{CodeDiffPane-QvxCUzTi.js → CodeDiffPane-DfluIWmO.js} +1 -1
  35. package/dist/client/assets/{CodeProjectPicker-DplkpM7f.js → CodeProjectPicker-By_Wz9ex.js} +1 -1
  36. package/dist/client/assets/CodeScreen-cLC0tJ4S.js +1 -0
  37. package/dist/client/assets/ConversationComposer-BUIjWMBi.js +1 -0
  38. package/dist/client/assets/ConversationFeedRows-Bx0gFyG_.js +1 -0
  39. package/dist/client/assets/ConversationHeader-Bt2RBj93.js +1 -0
  40. package/dist/client/assets/{ConversationPanels-fMo6Uy1v.js → ConversationPanels-o6W-cOoU.js} +2 -2
  41. package/dist/client/assets/ConversationScreen-DIU7m_aC.js +2 -0
  42. package/dist/client/assets/{ConversationStatus-DI5GCiyW.js → ConversationStatus-CTYOywFh.js} +1 -1
  43. package/dist/client/assets/{CrewAvatar-CXJHLNVM.js → CrewAvatar-CZ_faQ_s.js} +1 -1
  44. package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +1 -0
  45. package/dist/client/assets/{DataTable-DXIlOlVu.js → DataTable-C6aMSilS.js} +1 -1
  46. package/dist/client/assets/{DispatchAftermath-CrELgl2e.js → DispatchAftermath-ZCEB75hh.js} +1 -1
  47. package/dist/client/assets/{DocumentFocusViewer-DFFE85Tq.js → DocumentFocusViewer-D8iB6SMt.js} +1 -1
  48. package/dist/client/assets/{EmbeddableSurfacesLab-DgpewB3y.js → EmbeddableSurfacesLab-D3iZiS8o.js} +1 -1
  49. package/dist/client/assets/{EmptyState-D9X16fKq.js → EmptyState-CKPWFSjq.js} +1 -1
  50. package/dist/client/assets/{FileViewerPane-CY0RN78e.js → FileViewerPane-CxNbcTYf.js} +1 -1
  51. package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +1 -0
  52. package/dist/client/assets/{FollowScreen-wZ-z67mX.js → FollowScreen-CkR-okdL.js} +1 -1
  53. package/dist/client/assets/{HarnessMark-DAaWPiT_.js → HarnessMark-DttReffF.js} +1 -1
  54. package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +1 -0
  55. package/dist/client/assets/{HerdrSession-CYKRfBad.js → HerdrSession-DsuxCtfX.js} +1 -1
  56. package/dist/client/assets/{HomeHero-DYyd3cpz.js → HomeHero-DXJo2QSO.js} +1 -1
  57. package/dist/client/assets/{HostAdvisorView-NtM0bsg8.js → HostAdvisorView-DeJ-8RZV.js} +1 -1
  58. package/dist/client/assets/{KnowledgeSearchInspector-CU6BCFcS.js → KnowledgeSearchInspector-W_zNIBRV.js} +1 -1
  59. package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +1 -0
  60. package/dist/client/assets/{LaneToolHoverCard-Bo2Zl-1a.js → LaneToolHoverCard-t7-XJP-h.js} +1 -1
  61. package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +1 -0
  62. package/dist/client/assets/{LaneTraceEventFocus-Cek_64zR.js → LaneTraceEventFocus-BB5DhFQm.js} +1 -1
  63. package/dist/client/assets/{MeshCanvas-TvsID4fe.js → MeshCanvas-DZv2ipsy.js} +1 -1
  64. package/dist/client/assets/{MeshCanvasMinimap-CxqeVVco.js → MeshCanvasMinimap-BXHRNb7l.js} +1 -1
  65. package/dist/client/assets/MeshScreen-DuNvpDC5.js +1 -0
  66. package/dist/client/assets/{MeshTopologyView-BjprutE8.js → MeshTopologyView-Dc0GSrKa.js} +2 -2
  67. package/dist/client/assets/MessagesScreen-dNNPFwAc.js +1 -0
  68. package/dist/client/assets/{MissionContextRail-Be0uXljQ.js → MissionContextRail-DnCWPzAM.js} +1 -1
  69. package/dist/client/assets/MissionControlView-DmaThhNR.js +1 -0
  70. package/dist/client/assets/MissionFocusOverlay-K21ssTxv.js +1 -0
  71. package/dist/client/assets/MissionLeftAgentRow-CbQm4BLv.js +1 -0
  72. package/dist/client/assets/{MissionLogPane-EsM_S3ro.js → MissionLogPane-BLvSSIdT.js} +1 -1
  73. package/dist/client/assets/{NewAgentModal-Cqiq1CE1.js → NewAgentModal-B7qxjZlW.js} +1 -1
  74. package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +19 -0
  75. package/dist/client/assets/{NewChatOrigin-D7hwp6dm.js → NewChatOrigin-DCn5cWPZ.js} +1 -1
  76. package/dist/client/assets/{ObserveEmbedScreen-CGHI_hb5.js → ObserveEmbedScreen-DvKGsaLv.js} +2 -2
  77. package/dist/client/assets/{ObserveTextFlow-BcrGQet8.js → ObserveTextFlow-DCJ5EmD8.js} +2 -2
  78. package/dist/client/assets/{ObservedTopologyPanel-BhVsvwkh.js → ObservedTopologyPanel-CJVqIqQ2.js} +1 -1
  79. package/dist/client/assets/{OpenScoutAppShell-BtfvMkAp.js → OpenScoutAppShell-C9TOLB7u.js} +2 -2
  80. package/dist/client/assets/OpsAgentsView-vIoY-AW1.js +1 -0
  81. package/dist/client/assets/OpsScreen-CJBwshEp.js +1 -0
  82. package/dist/client/assets/OpsSubnav-CjDTnp64.js +1 -0
  83. package/dist/client/assets/ProjectAgentProfile-Br1eTD7G.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfileBar-CUzZ4Rpx.js +1 -0
  85. package/dist/client/assets/ProjectAgentProfileHero-mjxNcRvw.js +1 -0
  86. package/dist/client/assets/ProjectsInbox-Bq29DE_o.js +2 -0
  87. package/dist/client/assets/ProjectsRail-kMDA0yn4.js +1 -0
  88. package/dist/client/assets/ProjectsScreen-BDaJYhc0.js +1 -0
  89. package/dist/client/assets/ProjectsThreadAside-B940p3vW.js +1 -0
  90. package/dist/client/assets/Provider-D0bB7q6y.js +1 -0
  91. package/dist/client/assets/{RailRow-ClMmtaIE.js → RailRow-B88JVr62.js} +1 -1
  92. package/dist/client/assets/RawSessionsTable-CzGhEdiZ.js +1 -0
  93. package/dist/client/assets/RealtimeVoiceScreen-CyP1CWsX.js +1 -0
  94. package/dist/client/assets/{RepoDiffEmbedScreen-CjZ5ew3y.js → RepoDiffEmbedScreen-mexrJPhW.js} +1 -1
  95. package/dist/client/assets/{RepoDiffPageScreen-CdTFfmbk.js → RepoDiffPageScreen-DbqX4L3q.js} +1 -1
  96. package/dist/client/assets/{RepoDiffViewer-BFperHQg.js → RepoDiffViewer-Bw5yMC4A.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewerLazy-BkBmbi1Z.js → RepoDiffViewerLazy-DzfoFhbl.js} +2 -2
  98. package/dist/client/assets/{ReposScreen-C8dT4bK0.js → ReposScreen-CzbO1Fuy.js} +2 -2
  99. package/dist/client/assets/{ScoutDeckSurface-BcJsm2Kq.js → ScoutDeckSurface-DQoZofzH.js} +1 -1
  100. package/dist/client/assets/{ScoutSurface-DmzEtrx8.js → ScoutSurface-NlhDsPzg.js} +1 -1
  101. package/dist/client/assets/{ScoutbotFxLab-DU15Plja.js → ScoutbotFxLab-l2WAahCg.js} +1 -1
  102. package/dist/client/assets/{SecondaryNav-BrXMtvKE.js → SecondaryNav-Cs0_FQdj.js} +1 -1
  103. package/dist/client/assets/{SessionEmbedScreen-Bt4flmAx.js → SessionEmbedScreen-CpduQ0O9.js} +1 -1
  104. package/dist/client/assets/{SessionObserve-BCehTlO8.js → SessionObserve-BVeTkcIl.js} +1 -1
  105. package/dist/client/assets/{SessionObserveEvidence-Bb6U-dem.js → SessionObserveEvidence-BkOezTGV.js} +1 -1
  106. package/dist/client/assets/SessionRefScreen-DetLMkTT.js +1 -0
  107. package/dist/client/assets/SessionsScreen-B-McKw6d.js +1 -0
  108. package/dist/client/assets/{SettingsDrawer-BieUmb8g.js → SettingsDrawer-CPB32w0n.js} +3 -3
  109. package/dist/client/assets/SettingsScreen-BEzYFdjz.js +1 -0
  110. package/dist/client/assets/{ShikiPane-DPWsVNtn.js → ShikiPane-C0TuCATU.js} +1 -1
  111. package/dist/client/assets/{SlidePanel-BMRIR6bH.js → SlidePanel-CETQ5NTx.js} +1 -1
  112. package/dist/client/assets/{SpriteAvatar-56DTXxSV.js → SpriteAvatar-DFO4Kb4Z.js} +1 -1
  113. package/dist/client/assets/{StatusPill-BcuYUgsD.js → StatusPill-BllrY-eg.js} +1 -1
  114. package/dist/client/assets/{TailView-BDy8c2VB.js → TailView-_gKWfaQM.js} +2 -2
  115. package/dist/client/assets/Terminal-DWyZTZdY.js +1 -0
  116. package/dist/client/assets/TerminalEmbedScreen-_SSzwhWa.js +1 -0
  117. package/dist/client/assets/{TerminalHeaderMount-Cy-uxkey.js → TerminalHeaderMount-CY7uIWBg.js} +1 -1
  118. package/dist/client/assets/{TextDocumentSurface-BeSwe3Yl.js → TextDocumentSurface-2X1Gw4eA.js} +1 -1
  119. package/dist/client/assets/{TmuxPeek-B4no_aGI.js → TmuxPeek-CqTJRhkI.js} +1 -1
  120. package/dist/client/assets/{VoicePermissionsPanel-Bd16scwz.js → VoicePermissionsPanel-C4vkU-sU.js} +1 -1
  121. package/dist/client/assets/{WorkDetailScreen-DIFQufak.js → WorkDetailScreen-DqGnuK0e.js} +3 -3
  122. package/dist/client/assets/{WorkFilesViewer-CT5XEFGf.js → WorkFilesViewer-D8-4vF5l.js} +1 -1
  123. package/dist/client/assets/{activity-CqZafWfx.js → activity-CzTJ-YMX.js} +1 -1
  124. package/dist/client/assets/{addon-fit-CM6F_JRD.js → addon-fit-Zx3A7pGS.js} +1 -1
  125. package/dist/client/assets/{addon-webgl-DRTiePFC.js → addon-webgl-DitJj-N0.js} +1 -1
  126. package/dist/client/assets/{agent-autocomplete-DXUBnlkN.js → agent-autocomplete-BlK8wY06.js} +1 -1
  127. package/dist/client/assets/{agent-essentials-vytdybaX.js → agent-essentials-K9B6kbTS.js} +1 -1
  128. package/dist/client/assets/{agent-lane-card-model-CNZMPkhc.js → agent-lane-card-model-CY3OE1Xu.js} +1 -1
  129. package/dist/client/assets/{agent-lanes-model-DXqjs0OK.js → agent-lanes-model-tc-1hE6q.js} +1 -1
  130. package/dist/client/assets/{agent-master-model-DAZL92oe.js → agent-master-model-DMcHeNq3.js} +1 -1
  131. package/dist/client/assets/agent-specialization-CtF_jI34.js +1 -0
  132. package/dist/client/assets/{arc.es-Bh84oHJ7.js → arc.es-BNXJqSw7.js} +1 -1
  133. package/dist/client/assets/{arrow-down-DvTsLokL.js → arrow-down-BAGkhHA6.js} +1 -1
  134. package/dist/client/assets/{arrow-left-DHfdXJVZ.js → arrow-left-eToA6GxC.js} +1 -1
  135. package/dist/client/assets/{arrow-right-BBsrogWf.js → arrow-right-DTX42clh.js} +1 -1
  136. package/dist/client/assets/{arrow-up-right-CY0Vw_67.js → arrow-up-right-B09GPwFl.js} +1 -1
  137. package/dist/client/assets/{bot-DzkOUFBb.js → bot-WxKXYtEX.js} +1 -1
  138. package/dist/client/assets/{check-DbIkldnK.js → check-Dz2SRHft.js} +1 -1
  139. package/dist/client/assets/{chevron-down-C475vltS.js → chevron-down-D120PY4g.js} +1 -1
  140. package/dist/client/assets/{chevron-right-CnZRSd-V.js → chevron-right-CowuvuE6.js} +1 -1
  141. package/dist/client/assets/{chunk-HRAB3GC3-DLNT8aOo.js → chunk-HRAB3GC3-KjjrTLCU.js} +1 -1
  142. package/dist/client/assets/{chunk-JTPDIGGW-Ci5j4vzV.js → chunk-JTPDIGGW-COJ00z94.js} +3 -3
  143. package/dist/client/assets/{chunk-T65CQEWV-BtNvicWs.js → chunk-T65CQEWV-H2QEKfr1.js} +1 -1
  144. package/dist/client/assets/{chunk-YOZR3KYS-DN5EJulq.js → chunk-YOZR3KYS-CrCgXw9l.js} +1 -1
  145. package/dist/client/assets/{clock-DVvENUU5.js → clock-_9FDplIT.js} +1 -1
  146. package/dist/client/assets/{code-xml-CvKBY3KA.js → code-xml-CkkNdRmu.js} +1 -1
  147. package/dist/client/assets/{compass-BcRI_YXo.js → compass-BdpImt_W.js} +1 -1
  148. package/dist/client/assets/content-0RBfbCIJ.js +1 -0
  149. package/dist/client/assets/content-BTmnk2bl.js +1 -0
  150. package/dist/client/assets/content-Bk5DKhyP.js +1 -0
  151. package/dist/client/assets/{content-BNyAjpUl.js → content-Bw_8GE_S.js} +1 -1
  152. package/dist/client/assets/content-CI4gLEWi.js +1 -0
  153. package/dist/client/assets/content-CLCtp9Rb.js +1 -0
  154. package/dist/client/assets/content-C_FAGTNk.js +1 -0
  155. package/dist/client/assets/content-CnnzWOE3.js +1 -0
  156. package/dist/client/assets/content-DKlY98pO.js +1 -0
  157. package/dist/client/assets/content-Df7ndXTG.js +1 -0
  158. package/dist/client/assets/content-DkZDzzx3.js +1 -0
  159. package/dist/client/assets/content-DnGmb2L0.js +1 -0
  160. package/dist/client/assets/content-Ds-zs-Ss.js +1 -0
  161. package/dist/client/assets/content-JIWSyC0f.js +1 -0
  162. package/dist/client/assets/content-Q3TIYC8q.js +1 -0
  163. package/dist/client/assets/content-evaBfvxD.js +1 -0
  164. package/dist/client/assets/{context-budget-DX_fwUs3.js → context-budget-DqxWzalx.js} +1 -1
  165. package/dist/client/assets/{conversation-icons-CBMKBGHd.js → conversation-icons-DHGc9wbT.js} +1 -1
  166. package/dist/client/assets/conversation-model-C2KuZUXc.js +1 -0
  167. package/dist/client/assets/conversation-motion-features-BJnHs3Ul.js +1 -0
  168. package/dist/client/assets/{copy-Cj-owMb-.js → copy-BzdzWsQd.js} +1 -1
  169. package/dist/client/assets/{cpu-DuD3RFX5.js → cpu-CHFIGw87.js} +1 -1
  170. package/dist/client/assets/{createLucideIcon-DthwWQIg.js → createLucideIcon-Dv8H8m7J.js} +1 -1
  171. package/dist/client/assets/discover-DutlV0ZU.js +2 -0
  172. package/dist/client/assets/embed-entry-CJG7WEVw.js +2 -0
  173. package/dist/client/assets/{external-link-C_nxk0MJ.js → external-link-BvX5PfLh.js} +1 -1
  174. package/dist/client/assets/{eye-FnaaPfja.js → eye-C9cGk5z6.js} +1 -1
  175. package/dist/client/assets/{file-code-corner-DDPq4Cur.js → file-code-corner-jlGFdr8d.js} +1 -1
  176. package/dist/client/assets/{file-text--hfhwZH1.js → file-text-BHro8MkG.js} +1 -1
  177. package/dist/client/assets/{gauge-BVEknshP.js → gauge-DSflSery.js} +1 -1
  178. package/dist/client/assets/{gestures-3gw5VgUS.js → gestures-YA5IIwp-.js} +1 -1
  179. package/dist/client/assets/{git-branch-DJyvr0k-.js → git-branch-Bc_eDIpG.js} +1 -1
  180. package/dist/client/assets/{home-moving-signal-BPqBoNSm.js → home-moving-signal-PHSqSBu_.js} +1 -1
  181. package/dist/client/assets/home-now-card-C_qsI6C6.js +1 -0
  182. package/dist/client/assets/{home-now-card-nano-G8kMB32m.js → home-now-card-nano-Jmy7eJ6H.js} +1 -1
  183. package/dist/client/assets/{hooks-BMsQzo9j.js → hooks-ME7rmhpE.js} +1 -1
  184. package/dist/client/assets/{index-BI9AljSD.js → index-C1VaWNuD.js} +2 -2
  185. package/dist/client/assets/index-C8UCRm2W.js +1 -0
  186. package/dist/client/assets/index-Cn0I2Hgi.js +1 -0
  187. package/dist/client/assets/index-Cx6Gbr6n.js +1 -0
  188. package/dist/client/assets/{inspector-panel-CFSArQ8Y.js → inspector-panel-CwrHjRaQ.js} +2 -2
  189. package/dist/client/assets/{keyboard-nav-e6yGeorb.js → keyboard-nav-B8sQ_8IF.js} +1 -1
  190. package/dist/client/assets/{lane-roster-store-Q7pcblY5.js → lane-roster-store-DN2jxXF-.js} +1 -1
  191. package/dist/client/assets/{layers-Dz2dKOnU.js → layers-CW2-qHsG.js} +1 -1
  192. package/dist/client/assets/{layout-grid-Bvs5fdB4.js → layout-grid-BoVnPOk-.js} +1 -1
  193. package/dist/client/assets/left-BRu9pnqx.js +2 -0
  194. package/dist/client/assets/left-BjS1dKNV.js +2 -0
  195. package/dist/client/assets/left-CL-TVLJ7.js +1 -0
  196. package/dist/client/assets/left-DLpsDi55.js +1 -0
  197. package/dist/client/assets/left-DPcM9o8Y.js +1 -0
  198. package/dist/client/assets/left-MmTJf1tK.js +1 -0
  199. package/dist/client/assets/left-P80i5V8L.js +1 -0
  200. package/dist/client/assets/left-advisor-CbXVzAqS.js +1 -0
  201. package/dist/client/assets/left-agents-7mJsiNyr.js +1 -0
  202. package/dist/client/assets/left-default-COK26l3H.js +1 -0
  203. package/dist/client/assets/left-lanes-Dbdm9Veu.js +1 -0
  204. package/dist/client/assets/left-mission-DqGR5jby.js +1 -0
  205. package/dist/client/assets/library-COnWzUWv.js +1 -0
  206. package/dist/client/assets/{loader-circle-B2W9DPG5.js → loader-circle-DmUG_YC7.js} +1 -1
  207. package/dist/client/assets/{local-agents-DKr-gIDC.js → local-agents-VP1-ZlPw.js} +1 -1
  208. package/dist/client/assets/{mentions-DuLQnEcn.js → mentions-BZ5SBMtc.js} +1 -1
  209. package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +1 -0
  210. package/dist/client/assets/{mesh-ops-CRR-KnCG.js → mesh-ops-CKSWgax2.js} +1 -1
  211. package/dist/client/assets/{mesh-view-store-CiET-yN8.js → mesh-view-store-CBM1za_N.js} +1 -1
  212. package/dist/client/assets/{message-circle-B2DoYKDO.js → message-circle-joGFxfj1.js} +1 -1
  213. package/dist/client/assets/{message-markup-Cc_O-WdA.js → message-markup-DC0QFEZn.js} +1 -1
  214. package/dist/client/assets/{message-square-O-Hu9Mk2.js → message-square-BLiFqpe_.js} +1 -1
  215. package/dist/client/assets/{mission-control-store-DDAgWKUl.js → mission-control-store-CM8mQGg8.js} +1 -1
  216. package/dist/client/assets/model-CBkMvT1w.js +1 -0
  217. package/dist/client/assets/{observe-Da2mRAsc.js → observe-BLmy4quB.js} +1 -1
  218. package/dist/client/assets/{page-status-Crtgjbq3.js → page-status-BE0-J1xY.js} +1 -1
  219. package/dist/client/assets/{paperclip-BudMKSyr.js → paperclip-Br7wUDFl.js} +1 -1
  220. package/dist/client/assets/{persistent-state-xJz-qAFc.js → persistent-state-BubPQ7tT.js} +1 -1
  221. package/dist/client/assets/{plus-BJ1If8vj.js → plus-BWKhylds.js} +1 -1
  222. package/dist/client/assets/profile-BCvk8jOQ.js +1 -0
  223. package/dist/client/assets/projects-inbox-BIW7nv-H.css +1 -0
  224. package/dist/client/assets/projects-inbox-DFbgVlXL.js +1 -0
  225. package/dist/client/assets/{proxy-1BABCaDb.js → proxy-DVDRhSRR.js} +1 -1
  226. package/dist/client/assets/{radio-B5OpHrrK.js → radio-CxIXS1nU.js} +1 -1
  227. package/dist/client/assets/{refresh-cw-DmNAhaH0.js → refresh-cw-Bkh7Cvnd.js} +1 -1
  228. package/dist/client/assets/resolve-panes-DhD5qmQO.js +1 -0
  229. package/dist/client/assets/resolve-sidebar-context-GqhZNRPY.js +1 -0
  230. package/dist/client/assets/right-B_08ilv6.js +1 -0
  231. package/dist/client/assets/right-Brm67HOL.js +1 -0
  232. package/dist/client/assets/right-BveAPKBW.js +1 -0
  233. package/dist/client/assets/right-CpTB_-Ya.js +1 -0
  234. package/dist/client/assets/right-CqC4Qdot.js +1 -0
  235. package/dist/client/assets/right-D91j9d5Y.js +1 -0
  236. package/dist/client/assets/{right-D8id_DWQ.js → right-DVUq5374.js} +1 -1
  237. package/dist/client/assets/right-DaLRhYl3.js +1 -0
  238. package/dist/client/assets/right-Dt1wOwA5.js +1 -0
  239. package/dist/client/assets/right-DtzqIZQF.js +1 -0
  240. package/dist/client/assets/{rocket-D3-TUJ2m.js → rocket-CnxqjX_K.js} +1 -1
  241. package/dist/client/assets/{router-DTtux5sP.js → router-kfcaYqZr.js} +1 -1
  242. package/dist/client/assets/runtime-picker-C20lTGhV.js +1 -0
  243. package/dist/client/assets/{scope-views-CPM0sBw_.js → scope-views-KPY85UUx.js} +1 -1
  244. package/dist/client/assets/{scout-voice-BZKsdquE.js → scout-voice-Cg1qfepC.js} +1 -1
  245. package/dist/client/assets/scoutbot-D7kGGyK_.js +3 -0
  246. package/dist/client/assets/{scoutbot-markdown-CQ7Y1McC.js → scoutbot-markdown-yb87JlSE.js} +1 -1
  247. package/dist/client/assets/{scroll-text-kPhYbh-M.js → scroll-text-DFcBYy5J.js} +1 -1
  248. package/dist/client/assets/{search-DmFM_9jm.js → search-FB2vVxCp.js} +1 -1
  249. package/dist/client/assets/{secondaryNavConfig-C9bQ9_IA.js → secondaryNavConfig-C0Srrmy8.js} +1 -1
  250. package/dist/client/assets/{selection-bridge-Dy2mtMyi.js → selection-bridge-qBGFCJv8.js} +1 -1
  251. package/dist/client/assets/{send-horizontal-qyjNgEaV.js → send-horizontal-CS7mxVhX.js} +1 -1
  252. package/dist/client/assets/{server-nWqndnxu.js → server-WY6gsbZz.js} +1 -1
  253. package/dist/client/assets/{session-catalog-BkmktBHI.js → session-catalog-CG4oL_yN.js} +1 -1
  254. package/dist/client/assets/{session-table-DKSF0mrS.js → session-table-uJh3v-ly.js} +1 -1
  255. package/dist/client/assets/{settings-C6h9y5XX.js → settings-DQEtqkM9.js} +1 -1
  256. package/dist/client/assets/{sliders-horizontal-BhHKxsCO.js → sliders-horizontal-57e99_qO.js} +1 -1
  257. package/dist/client/assets/{sparkles-Cf8gin88.js → sparkles-D0vWLTyC.js} +1 -1
  258. package/dist/client/assets/{sse-DDHEHUgz.js → sse-B29iGBnw.js} +1 -1
  259. package/dist/client/assets/{system-surfaces-redesign-QVXNeGYw.css → system-surfaces-redesign-kuf3wuE_.css} +1 -1
  260. package/dist/client/assets/{tail-events-BdUrO0kb.js → tail-events-LK29oCKm.js} +1 -1
  261. package/dist/client/assets/{terminal-C3YRPfyz.js → terminal-UDy4lzV1.js} +1 -1
  262. package/dist/client/assets/{terminal-relay-BFhdIstF.js → terminal-relay-CXHMdain.js} +1 -1
  263. package/dist/client/assets/{terminal-screen-BLk4PAYt.css → terminal-screen-vMICbBJh.css} +1 -1
  264. package/dist/client/assets/{terminal-sessions-BQ6t92tJ.js → terminal-sessions-Bdt2W3Y4.js} +1 -1
  265. package/dist/client/assets/{terminal-takeover-B6H4llRR.js → terminal-takeover-BMeBjBB2.js} +1 -1
  266. package/dist/client/assets/{use-conversation-list-DO5J8T1H.js → use-conversation-list-UG-tMN67.js} +1 -1
  267. package/dist/client/assets/{use-fleet-active-asks-BtgNnRgK.js → use-fleet-active-asks-CCGrll5q.js} +1 -1
  268. package/dist/client/assets/{use-mesh-ops-items-N1HHhChY.js → use-mesh-ops-items-BjyeFJTz.js} +1 -1
  269. package/dist/client/assets/{use-reduced-motion-8WuxLa5l.js → use-reduced-motion-CPoX8iV2.js} +1 -1
  270. package/dist/client/assets/{use-scout-dev-flags-B31qTy6m.js → use-scout-dev-flags-DTseRrFi.js} +1 -1
  271. package/dist/client/assets/{useAgentHoverCard-Bkv-Uz_V.js → useAgentHoverCard-BgTLNcF-.js} +1 -1
  272. package/dist/client/assets/useContentSecondaryNav-CoIoz7JU.js +1 -0
  273. package/dist/client/assets/useEmbedHeadline-DuUnwTB7.js +1 -0
  274. package/dist/client/assets/{usePierreRuntime-BfZHKAkI.js → usePierreRuntime-35AHf9RQ.js} +1 -1
  275. package/dist/client/assets/{wrench-DkxnZRlR.js → wrench-BfVeded5.js} +1 -1
  276. package/dist/client/assets/{x-DfRJbqrh.js → x-DgmmnPKt.js} +1 -1
  277. package/dist/client/assets/{xterm-CJw8Epxv.js → xterm-DnJJmrCA.js} +1 -1
  278. package/dist/client/assets/{zap-CIo8msJB.js → zap-Bcja1lHG.js} +1 -1
  279. package/dist/client/index.html +1 -1
  280. package/dist/main.mjs +5116 -9854
  281. package/dist/node/main.mjs +18 -2
  282. package/dist/pairing-runtime-controller.mjs +23 -2
  283. package/dist/runtime/broker-daemon.mjs +29 -3
  284. package/dist/scout-control-plane-web.mjs +27 -3
  285. package/package.json +2 -5
  286. package/dist/client/assets/ActivityScreen-y-5DLleY.js +0 -1
  287. package/dist/client/assets/AgentConfigurationScreen-BD7Unt2P.js +0 -1
  288. package/dist/client/assets/AgentDefinitionsWorkspace-BbcZc9Xk.js +0 -1
  289. package/dist/client/assets/AgentFloorView-DMFiHs21.js +0 -1
  290. package/dist/client/assets/AgentInfoScreen-DHGLRddI.js +0 -1
  291. package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +0 -1
  292. package/dist/client/assets/AgentLanesView-u5vpLwQf.js +0 -2
  293. package/dist/client/assets/AgentMasterScreen-C5WlWNmk.js +0 -1
  294. package/dist/client/assets/AgentsConsole-BuiZ_bDo.js +0 -1
  295. package/dist/client/assets/AgentsScreen-CRi-hG2k.js +0 -1
  296. package/dist/client/assets/AgentsSubnav-DUsya4WK.js +0 -1
  297. package/dist/client/assets/BriefingDetailScreen-C29smC5d.js +0 -1
  298. package/dist/client/assets/BrokerScreen-CS0s4Gm4.js +0 -5
  299. package/dist/client/assets/CodeScreen-CrR2JaVj.js +0 -1
  300. package/dist/client/assets/ConversationComposer-H8_hsYSc.js +0 -1
  301. package/dist/client/assets/ConversationFeedRows-hlEFlURs.js +0 -1
  302. package/dist/client/assets/ConversationHeader-B0ZBhE_E.js +0 -1
  303. package/dist/client/assets/ConversationScreen-CXAHQwQ3.js +0 -2
  304. package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +0 -1
  305. package/dist/client/assets/FlightObserveScreen-qyzHzxLa.js +0 -1
  306. package/dist/client/assets/HarnessesScreen-DbKkQM4o.js +0 -1
  307. package/dist/client/assets/KnowledgeSearchScreen-DvbRRPQB.js +0 -1
  308. package/dist/client/assets/LaneTraceDetailSheet-C3C8UjXv.js +0 -1
  309. package/dist/client/assets/MeshScreen-BJ-j9YXv.js +0 -1
  310. package/dist/client/assets/MessagesScreen-CyNIZ3-X.js +0 -1
  311. package/dist/client/assets/MissionControlView-Bj7cAbZd.js +0 -1
  312. package/dist/client/assets/MissionFocusOverlay-DvTw6ts5.js +0 -1
  313. package/dist/client/assets/MissionLeftAgentRow-B0QG7Gys.js +0 -1
  314. package/dist/client/assets/NewChatComposer-C_1op4dH.js +0 -19
  315. package/dist/client/assets/OpsAgentsView-DBYtmLnh.js +0 -1
  316. package/dist/client/assets/OpsScreen-CuYVgkC_.js +0 -1
  317. package/dist/client/assets/OpsSubnav-BEU4kKXm.js +0 -1
  318. package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +0 -1
  319. package/dist/client/assets/ProjectAgentProfileBar-uJw9Wdfk.js +0 -1
  320. package/dist/client/assets/ProjectAgentProfileHero-CIMS4Dy_.js +0 -1
  321. package/dist/client/assets/ProjectsInbox-JgU0lrY8.js +0 -2
  322. package/dist/client/assets/ProjectsRail-p99BRBOa.js +0 -1
  323. package/dist/client/assets/ProjectsScreen-BB45DU53.js +0 -1
  324. package/dist/client/assets/ProjectsThreadAside-BHDTJWOz.js +0 -1
  325. package/dist/client/assets/Provider-Bu-C8Hxc.js +0 -1
  326. package/dist/client/assets/RawSessionsTable-BtKdQPiv.js +0 -1
  327. package/dist/client/assets/RealtimeVoiceScreen-KPHJgO1l.js +0 -1
  328. package/dist/client/assets/SessionRefScreen-C8BiRVPx.js +0 -1
  329. package/dist/client/assets/SessionsScreen-BNvjUflN.js +0 -1
  330. package/dist/client/assets/SettingsScreen-3JvX1WFL.js +0 -1
  331. package/dist/client/assets/Terminal-BlUQY9_Z.js +0 -1
  332. package/dist/client/assets/TerminalEmbedScreen-DTjxktyr.js +0 -1
  333. package/dist/client/assets/agent-specialization-BtxLN4UR.js +0 -1
  334. package/dist/client/assets/agents-project-model-UYiamtrU.js +0 -1
  335. package/dist/client/assets/content--T3p6akp.js +0 -1
  336. package/dist/client/assets/content-4nFMLuzF.js +0 -1
  337. package/dist/client/assets/content-BJ4nHvcu.js +0 -1
  338. package/dist/client/assets/content-BmGp9wNl.js +0 -1
  339. package/dist/client/assets/content-CBWhwaRo.js +0 -1
  340. package/dist/client/assets/content-CQlykFbe.js +0 -1
  341. package/dist/client/assets/content-CevL0DgF.js +0 -1
  342. package/dist/client/assets/content-Ch8pf2bj.js +0 -1
  343. package/dist/client/assets/content-Cpvdcm_l.js +0 -1
  344. package/dist/client/assets/content-DfS3vgAu.js +0 -1
  345. package/dist/client/assets/content-DpQdNePJ.js +0 -1
  346. package/dist/client/assets/content-Dqpibejl.js +0 -1
  347. package/dist/client/assets/content-TV0nd6-r.js +0 -1
  348. package/dist/client/assets/content-odbb5H4U.js +0 -1
  349. package/dist/client/assets/content-uXHLPHe0.js +0 -1
  350. package/dist/client/assets/conversation-model-QsJVfSeG.js +0 -1
  351. package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +0 -1
  352. package/dist/client/assets/discover-B3uQlh5L.js +0 -2
  353. package/dist/client/assets/embed-entry-DkRcHKTh.js +0 -2
  354. package/dist/client/assets/home-now-card-UspVW2-2.js +0 -1
  355. package/dist/client/assets/index-C-v0Z6ZS.js +0 -1
  356. package/dist/client/assets/index-D9DzUORB.js +0 -1
  357. package/dist/client/assets/index-DfsTyYDx.js +0 -1
  358. package/dist/client/assets/left-B4Ak-Ibt.js +0 -2
  359. package/dist/client/assets/left-BMb493FZ.js +0 -1
  360. package/dist/client/assets/left-BjFLvVOC.js +0 -1
  361. package/dist/client/assets/left-CsXQ8Q3G.js +0 -1
  362. package/dist/client/assets/left-FNH7faCI.js +0 -1
  363. package/dist/client/assets/left-POkqE8gI.js +0 -2
  364. package/dist/client/assets/left-UulOTcWh.js +0 -1
  365. package/dist/client/assets/left-advisor-CJkQS2d6.js +0 -1
  366. package/dist/client/assets/left-agents-CFMxyEjT.js +0 -1
  367. package/dist/client/assets/left-default-rnX5HANc.js +0 -1
  368. package/dist/client/assets/left-lanes-BpLXT_qH.js +0 -1
  369. package/dist/client/assets/left-mission-B0bhseWw.js +0 -1
  370. package/dist/client/assets/library-D1iXfda2.js +0 -1
  371. package/dist/client/assets/mesh-buckets-6y3ZIibI.js +0 -1
  372. package/dist/client/assets/mesh-roster-Bc7T4b7z.js +0 -1
  373. package/dist/client/assets/model-IGCUEsMy.js +0 -1
  374. package/dist/client/assets/profile-B3qDSbrH.js +0 -1
  375. package/dist/client/assets/projects-inbox-CLek3QaG.js +0 -1
  376. package/dist/client/assets/projects-inbox-DRBl2N85.css +0 -1
  377. package/dist/client/assets/resolve-panes-DXw-cHaj.js +0 -1
  378. package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +0 -1
  379. package/dist/client/assets/right-BgJ4mQLf.js +0 -1
  380. package/dist/client/assets/right-Bk6h7o-Z.js +0 -1
  381. package/dist/client/assets/right-BrICCmEt.js +0 -1
  382. package/dist/client/assets/right-C1QIbqFZ.js +0 -1
  383. package/dist/client/assets/right-CfliKiHY.js +0 -1
  384. package/dist/client/assets/right-CtOLXB9s.js +0 -1
  385. package/dist/client/assets/right-DJ34yMAi.js +0 -1
  386. package/dist/client/assets/right-DiFmtw6d.js +0 -1
  387. package/dist/client/assets/right-Lx79pxpG.js +0 -1
  388. package/dist/client/assets/scoutbot-BJIamJOH.js +0 -3
  389. package/dist/client/assets/text-Faa3ZStB.js +0 -1
  390. package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +0 -1
  391. /package/dist/client/assets/{text-BYAFNLNq.css → runtime-picker-BYAFNLNq.css} +0 -0
@@ -1,6 +1,6 @@
1
- import{r as d,j as e}from"./index-BI9AljSD.js";import{E as te}from"./EmptyState-D9X16fKq.js";import{u as qe,a as _e}from"./Provider-Bu-C8Hxc.js";import{g as Be,f as pe,b as He}from"./api-HFH8wFyb.js";import{a as Ue}from"./api-Co9aQ2Jw.js";import{c as ne}from"./clipboard-e3fSpeo7.js";import{u as Ke}from"./keyboard-nav-e6yGeorb.js";/* empty css */import{f as v,c as Ve,b as Ee,r as Pe,u as Ae,i as le,w as Ie,k as Me,l as ze,m as G,a as X,s as Ge,h as Xe}from"./ui-LM8pS8qE.js";import{B as Te,p as Ye,c as Je}from"./selection-bridge-Dy2mtMyi.js";import{S as Qe}from"./SlidePanel-BMRIR6bH.js";import{R as Ze}from"./RepoDiffViewerLazy-BkBmbi1Z.js";import{p as es}from"./cache-CeWH_KzJ.js";import{R as ss}from"./refresh-cw-DmNAhaH0.js";import{S as ts}from"./sliders-horizontal-BhHKxsCO.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";/* empty css */const me=[{value:"claude",label:"Claude"},{value:"codex",label:"Codex"},{value:"pi",label:"Grok"}],ns=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"XHigh"}],rs=[{value:"new",label:"New session",hint:"Start a fresh harness session for this agent"},{value:"existing",label:"Continue session",hint:"Resume this agent’s current harness session"}];function fe(s){return`gh pr checkout ${s.number}`}function as(s){return[`Please review pull request #${s.number}: ${s.title}`,"",`URL: ${s.url}`,`Repo: ${s.repo}`,`Branch: ${s.headRefName||"head"} → ${s.baseRefName||"base"}`,s.path?`Local path: ${s.path}`:null,s.author?`Author: @${s.author}`:null,s.isDraft?"Status: draft":"Status: open","","Read the diff, summarize the change, call out risks or test gaps, and recommend ship / revise / hold."].filter(t=>t!=null).join(`
1
+ import{r as d,j as e}from"./index-C1VaWNuD.js";import{E as te}from"./EmptyState-CKPWFSjq.js";import{u as qe,b as _e}from"./Provider-D0bB7q6y.js";import{g as Be,f as pe,b as He}from"./api-HFH8wFyb.js";import{a as Ue}from"./api-Co9aQ2Jw.js";import{c as ne}from"./clipboard-e3fSpeo7.js";import{u as Ke}from"./keyboard-nav-B8sQ_8IF.js";/* empty css */import{f as v,c as Ve,b as Ee,r as Pe,u as Ae,i as le,w as Ie,k as Me,l as ze,m as G,a as X,s as Ge,h as Xe}from"./ui-LM8pS8qE.js";import{B as Te,p as Ye,c as Je}from"./selection-bridge-qBGFCJv8.js";import{S as Qe}from"./SlidePanel-CETQ5NTx.js";import{R as Ze}from"./RepoDiffViewerLazy-DzfoFhbl.js";import{p as es}from"./cache-CeWH_KzJ.js";import{R as ss}from"./refresh-cw-Bkh7Cvnd.js";import{S as ts}from"./sliders-horizontal-57e99_qO.js";import"./router-kfcaYqZr.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./time-Dhsh_2EG.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";/* empty css */const me=[{value:"claude",label:"Claude"},{value:"codex",label:"Codex"},{value:"pi",label:"Grok"}],ns=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"},{value:"xhigh",label:"XHigh"}],rs=[{value:"new",label:"New session",hint:"Start a fresh harness session for this agent"},{value:"existing",label:"Continue session",hint:"Resume this agent’s current harness session"}];function fe(s){return`gh pr checkout ${s.number}`}function as(s){return[`Please review pull request #${s.number}: ${s.title}`,"",`URL: ${s.url}`,`Repo: ${s.repo}`,`Branch: ${s.headRefName||"head"} → ${s.baseRefName||"base"}`,s.path?`Local path: ${s.path}`:null,s.author?`Author: @${s.author}`:null,s.isDraft?"Status: draft":"Status: open","","Read the diff, summarize the change, call out risks or test gaps, and recommend ship / revise / hold."].filter(t=>t!=null).join(`
2
2
  `)}function Q(s){return s.handle?.trim()||s.name?.trim()||s.id}function ge(s,t){const r=s?.trim(),n=t?.trim();return!r||!n?!1:r===n||r.startsWith(`${n}/`)||n.startsWith(`${r}/`)}function is(s){switch(s?.trim().toLowerCase()){case"available":case"idle":case"callable":return 40;case"active":case"working":case"running":case"in_turn":case"in_flight":return 20;case"queued":case"waiting":case"waking":return 10;case"offline":case"retired":case"stale":case"blocked":return-50;default:return 0}}function ls(s,t,r){const n=r?.trim()||s.path?.trim()||null,a=s.repo.split("/").pop()?.toLowerCase()??"",l=s.headRefName?.trim()??"";return t.filter(o=>!o.retiredFromFleet).map(o=>{let c=is(o.state);return(ge(o.projectRoot,n)||ge(o.cwd,n))&&(c+=1e3),a&&o.project?.trim().toLowerCase()===a&&(c+=400),l&&o.branch?.trim()===l&&(c+=200),{agent:o,score:c}}).sort((o,c)=>c.score!==o.score?c.score-o.score:Q(o.agent).localeCompare(Q(c.agent))).map(o=>o.agent)}function je(s,t){const r=new Map,n=s.path?.trim();if(n){const a=n.split("/").filter(Boolean).at(-1)??n;r.set(n,s.repo||a)}for(const a of t){const l=a.root?.trim();l&&(r.has(l)||r.set(l,a.name?.trim()||l.split("/").filter(Boolean).at(-1)||l))}return[...r.entries()].map(([a,l])=>({path:a,label:l}))}function re(s,t){return s?.harness?.trim()||t?.trim()||"claude"}function os(s){return s?.model?.trim()||""}function cs(s,t){const r=new Set,n=t?.model?.trim();n&&r.add(n);for(const a of s){const l=a.model?.trim();l&&r.add(l)}return[...r]}function ds(s){const t=s.harness?.trim()||void 0,r=s.model?.trim()||void 0,n=s.reasoningEffort?.trim()||void 0;return{...t?{harness:t}:{},...r?{model:r}:{},...n?{reasoningEffort:n}:{}}}async function us(s,t){const r=as(s),n=t.projectPath.trim();if(!n)throw new Error("Pick a project path for the review.");const a=ds(t),l=t.agent??null,o=l&&t.sessionMode==="existing"?"existing":"new";if(l&&o==="existing"&&!l.harnessSessionId?.trim())throw new Error(`@${Q(l)} has no live harness session to continue. Pick “New session” instead.`);const c=await Ue("/api/sessions",{method:"POST",body:JSON.stringify({target:l?{agentId:l.id,projectPath:n}:{projectPath:n},execution:{session:o,...o==="existing"&&l?.harnessSessionId?.trim()?{targetSessionId:l.harnessSessionId.trim()}:{},...a},agent:{persistence:l?"sticky":"one_time",...l?.handle?.trim()?{handle:l.handle.trim()}:{}},seed:{instructions:r}})}),h=c.flightId??c.flight?.id??null,p=c.targetAgentId??c.flight?.targetAgentId??c.agentId??l?.id??null,u=c.targetLabel?.trim()||(l?Q(l):null)||p||"one-time reviewer",m=l?o==="existing"?"continue":"new session":"one-time";return{message:[`Assigned #${s.number} for review → ${u.startsWith("@")?u:`@${u}`}`,`· ${m}`,a.harness?`· ${a.harness}`:null,a.model?`· ${a.model}`:null,a.reasoningEffort?`· ${a.reasoningEffort}`:null,h?`· ${h}`:null].filter(Boolean).join(" "),flightId:h,conversationId:c.conversationId??null,targetAgentId:p,targetLabel:u}}function hs(s){window.open(s.url,"_blank","noopener,noreferrer")}function ps(s,t={}){const{matchingWorktree:r,onBeginAssign:n,onSelectWorktreeId:a,onOpenDiff:l,onStatus:o}=t,c=[];return n&&c.push({kind:"action",label:"Assign for review…",onSelect:()=>n(s)}),c.push({kind:"action",label:"Open on GitHub",onSelect:()=>hs(s)}),r&&a&&c.push({kind:"action",label:`Select worktree · ${r.branch}`,onSelect:()=>a(r.id)}),r&&l&&c.push({kind:"action",label:"Open local diff",onSelect:()=>l(r.path)}),c.push({kind:"separator"},{kind:"action",label:"Copy link",onSelect:()=>{ne(s.url).then(h=>{o?.(h?`Copied link for #${s.number}`:`Could not copy link for #${s.number}`)})}},{kind:"action",label:"Copy checkout command",onSelect:()=>{ne(fe(s)).then(h=>{o?.(h?`Copied: ${fe(s)}`:`Could not copy checkout command for #${s.number}`)})}},{kind:"action",label:"Copy title",onSelect:()=>{ne(`#${s.number} ${s.title}`).then(h=>{o?.(h?`Copied title for #${s.number}`:`Could not copy title for #${s.number}`)})}}),c}function ms(s){return s.startsWith("/Users/")?`~/${s.split("/").slice(3).join("/")}`:s}function fs(s){const t=s.handle?.trim()||s.name?.trim()||s.id,r=[s.harness?.trim(),s.model?.trim(),s.state?.trim(),s.harnessSessionId?.trim()?"session":null].filter(Boolean);return r.length>0?`@${t} · ${r.join(" · ")}`:`@${t}`}function Y(s){const t=s?.trim();return t?t.length>18?`${t.slice(0,10)}…${t.slice(-4)}`:t:null}function gs({pr:s,agents:t,projects:r,pending:n,error:a,onClose:l,onPendingChange:o,onError:c,onAssigned:h}){const p=Ke(),u=d.useMemo(()=>je(s,r),[s,r]),[m,N]=d.useState(()=>u[0]?.path??s.path?.trim()??""),[b,T]=d.useState(""),C=d.useMemo(()=>ls(s,t,m),[t,s,m]),g=C.find(i=>i.id===b)??null,j=!!g?.harnessSessionId?.trim(),[$,P]=d.useState(()=>re(null)),[M,A]=d.useState(""),[x,k]=d.useState("medium"),[R,y]=d.useState("new");d.useEffect(()=>{const w=je(s,r)[0]?.path??s.path?.trim()??"";N(w),T(""),P(re(null)),A(""),k("medium"),y("new"),c(null)},[s.id]),d.useEffect(()=>{m&&u.some(i=>i.path===m)||N(u[0]?.path??s.path?.trim()??"")},[s.path,u,m]),d.useEffect(()=>{if(!g){y("new");return}P(re(g)),A(os(g)),y(g.harnessSessionId?.trim()?"existing":"new")},[g?.id]),d.useEffect(()=>{b&&(C.some(i=>i.id===b)||T(""))},[b,C]),d.useEffect(()=>{R==="existing"&&g&&!j&&y("new")},[j,g,R]);const L=d.useMemo(()=>cs(C,g),[C,g]),I=!!m.trim()&&!n&&!(g&&R==="existing"&&!j),W=async()=>{if(I){o(!0),c(null);try{const i=await us(s,{projectPath:m.trim(),harness:$,model:M,reasoningEffort:x,agent:g,sessionMode:g?R:"new"});h(i)}catch(i){c(i instanceof Error?i.message:String(i))}finally{o(!1)}}},F=n?"Assigning…":g?R==="existing"?"Continue session · review":"New session · review":"Start review",D=g?R==="existing"?`Continues @${g.handle?.trim()||g.name}'s current session${Y(g.harnessSessionId)?` (${Y(g.harnessSessionId)})`:""}.`:`Starts a fresh harness session for @${g.handle?.trim()||g.name}.`:"Starts a disposable one-time reviewer on the project with the runtime above.";return e.jsx("div",{className:"rw-pr-assign-backdrop",role:"presentation",onMouseDown:i=>{i.target===i.currentTarget&&!n&&l()},children:e.jsxs("div",{ref:p.ref,className:"rw-pr-assign-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"rw-pr-assign-title",tabIndex:-1,onKeyDown:i=>{p.onKeyDown(i),i.key==="Escape"&&!n&&(i.stopPropagation(),l())},children:[e.jsxs("div",{className:"rw-pr-assign-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"rw-pr-assign-eyebrow",children:"Assign for review"}),e.jsxs("h2",{id:"rw-pr-assign-title",className:"rw-pr-assign-title",children:["#",s.number," · launch review"]}),e.jsx("p",{className:"rw-pr-assign-copy",title:s.title,children:s.title}),e.jsxs("p",{className:"rw-pr-assign-meta",children:[s.repo," · ",s.headRefName||"head"," → ",s.baseRefName||"base"]})]}),e.jsx("button",{type:"button",className:"rw-pr-assign-close",onClick:l,disabled:n,children:"Cancel"})]}),e.jsxs("div",{className:"rw-pr-assign-body",children:[e.jsxs("div",{className:"rw-pr-assign-fields",children:[e.jsxs("label",{className:"rw-pr-assign-field",children:[e.jsx("span",{children:"Project"}),e.jsx("select",{value:m,disabled:n||u.length===0,onChange:i=>N(i.target.value),"aria-label":"Project path",children:u.length===0?e.jsx("option",{value:"",children:"No local project"}):u.map(i=>e.jsxs("option",{value:i.path,children:[i.label," · ",ms(i.path)]},i.path))})]}),e.jsxs("label",{className:"rw-pr-assign-field",children:[e.jsx("span",{children:"Harness"}),e.jsxs("select",{value:$,disabled:n,onChange:i=>P(i.target.value),"aria-label":"Harness",children:[me.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value)),$&&!me.some(i=>i.value===$)?e.jsx("option",{value:$,children:$}):null]})]}),e.jsxs("label",{className:"rw-pr-assign-field",children:[e.jsx("span",{children:"Model"}),e.jsx("input",{list:"rw-pr-assign-models",value:M,disabled:n,placeholder:"Default for harness",onChange:i=>A(i.target.value),"aria-label":"Model"}),e.jsx("datalist",{id:"rw-pr-assign-models",children:L.map(i=>e.jsx("option",{value:i},i))})]}),e.jsxs("label",{className:"rw-pr-assign-field",children:[e.jsx("span",{children:"Effort"}),e.jsx("select",{value:x,disabled:n,onChange:i=>k(i.target.value),"aria-label":"Reasoning effort",children:ns.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]}),e.jsxs("label",{className:"rw-pr-assign-field rw-pr-assign-field--wide",children:[e.jsxs("span",{children:["Agent ",e.jsx("em",{children:"(optional)"})]}),e.jsxs("select",{value:b,disabled:n,onChange:i=>T(i.target.value),"aria-label":"Existing agent (optional)",children:[e.jsx("option",{value:"",children:"New one-time reviewer on project"}),C.map(i=>e.jsx("option",{value:i.id,children:fs(i)},i.id))]})]}),g?e.jsxs("fieldset",{className:"rw-pr-assign-session",disabled:n,children:[e.jsx("legend",{children:"Session"}),e.jsx("div",{className:"rw-pr-assign-session-choices",role:"radiogroup","aria-label":"Session mode",children:rs.map(i=>{const w=i.value==="existing"&&!j,O=R===i.value;return e.jsxs("button",{type:"button",role:"radio","aria-checked":O,className:"rw-pr-assign-session-choice","data-active":O||void 0,disabled:w,title:w?"This agent has no live harness session to continue":i.hint,onClick:()=>y(i.value),children:[e.jsx("span",{className:"rw-pr-assign-session-title",children:i.label}),e.jsx("span",{className:"rw-pr-assign-session-sub",children:w?"No live session on this agent":i.value==="existing"&&Y(g.harnessSessionId)?Y(g.harnessSessionId):i.hint})]},i.value)})})]}):null]}),e.jsx("p",{className:"rw-pr-assign-hint",children:D}),a?e.jsx("div",{className:"rw-pr-assign-error",role:"alert",children:a}):null,e.jsx("div",{className:"rw-pr-assign-actions",children:e.jsx("button",{type:"button",className:"rw-pr-assign-submit",disabled:!I,onClick:()=>{W()},children:F})})]})]})})}const js=/^Skipped missing repo-watch path:\s*(.+)$/i,xs=4;function bs(s){const t=s.trim().replace(/\/+$/,"")||s.trim();if(!t)return"unknown paths";if(t==="~"||t.startsWith("~/"))return"~/*";if(!t.startsWith("/")){const[n]=t.split(/[\\/]/).filter(Boolean);return n?`${n}/*`:t}const r=t.split("/").filter(Boolean);return r[0]==="Users"&&r[1]?`/Users/${r[1]}/*`:r[0]==="Volumes"&&r[1]?`/Volumes/${r[1]}/*`:r.length>=2?`/${r[0]}/${r[1]}/*`:`/${r[0]??""}`}function ws(s,t){const r=[...new Set(s)];if(r.length===1)return{message:`Skipped missing repo-watch path: ${r[0]}`,examples:[],rawCount:1};const n=r.slice(0,xs),a=r.length-n.length;return a>0&&n.push(`+${a} more`),{message:`Skipped ${r.length} missing repo-watch paths under ${t}. These look like stale broker hints.`,examples:n,rawCount:r.length}}function xe(s,t){if(s.length===0)return;const r=new Map;for(const n of s){const a=bs(n),l=r.get(a);l?l.push(n):r.set(a,[n])}for(const[n,a]of r)t.push(ws(a,n));s.length=0}function vs(s){const t=[],r=[];for(const n of s){const a=js.exec(n);if(a){r.push(a[1].trim());continue}xe(r,t),t.push({message:n,examples:[],rawCount:1})}return xe(r,t),t}const be={attention:"desc",name:"asc",churn:"desc",files:"desc",drift:"desc",attached:"desc"},we="attention";function Ns(s){return!s.status.clean||s.branch.ahead>0||s.branch.behind>0||s.agents.some(le)||s.sessions.length>0||s.error!=null}function Ss(s,t){const r=Ve(s),n=Ee(s),{add:a,del:l,total:o}=Pe(s),c=Ae(s);return{wt:s,project:t,state:Ie(s),add:a,del:l,churn:o,files:n.files+Math.max(r.files,s.status.changedFiles),live:c.filter(le).length,agentsUnique:c}}function De(s){return s.status.conflicts>0||s.error!=null}function ks(s){const t=s.flatMap(l=>l.worktrees.filter(De).map(o=>{const c=o.branch.name??o.name;return o.status.conflicts>0?`${l.name}/${c}: ${v(o.status.conflicts)} conflict${o.status.conflicts===1?"":"s"}`:`${l.name}/${c}: scan error`})),r="Worktrees blocked by conflicts or scan errors.";if(t.length===0)return r;const n=t.slice(0,8),a=t.length-n.length;return[r,...n,a>0?`+${a} more`:null].filter(l=>!!l).join(`
3
3
  `)}function ys({snapshot:s,selectedId:t,onSelect:r,onViewDiff:n,scanDepth:a,scanMorePending:l,onScanMore:o,openPullRequestCount:c,openPullRequestTitle:h}){const[p,u]=d.useState(we),[m,N]=d.useState(be[we]),[b,T]=d.useState(!1),{liveRows:C,cleanRows:g,stats:j,blockedTitle:$}=d.useMemo(()=>{const x=[],k=[];let R=0,y=0,L=0;for(const F of s.projects)for(const D of F.worktrees){const i=Ss(D,F);L+=i.files,i.live>0&&R++,De(D)&&y++,(Ns(D)?x:k).push(i)}const I=s.totals,W={repos:I.projects,worktrees:I.worktrees,dirtyWorktrees:I.dirtyWorktrees,changedFiles:L,live:R,blocked:y};return{liveRows:x,cleanRows:k,stats:W,blockedTitle:ks(s.projects)}},[s.projects,s.totals]),P=d.useMemo(()=>{const x=Ds(C,p,m),k=new Map;for(const R of x){const y=k.get(R.project.id);y?y.push(R):k.set(R.project.id,[R])}return[...k.values()]},[C,p,m]);function M(x){x===p?N(k=>k==="asc"?"desc":"asc"):(u(x),N(be[x]))}const A=C.length===0&&g.length===0;return e.jsxs("section",{className:"rw-table",children:[e.jsxs("div",{className:"rw-head",children:[e.jsxs("div",{className:"rw-head-top",children:[e.jsx("span",{className:"rw-eyebrow",children:"STATE OF REPOS"}),g.length>0?e.jsxs("button",{type:"button",className:"rw-clean",style:{marginLeft:"auto"},onClick:()=>T(x=>!x),"aria-pressed":b,children:[b?"hide":"show"," clean & idle (",g.length,")"]}):null]}),e.jsxs("div",{className:"stats",children:[e.jsx(U,{v:j.repos,k:"REPOS"}),j.worktrees>j.repos?e.jsx(U,{v:j.worktrees,k:"WORKTREES",title:`${v(j.worktrees)} worktrees across ${v(j.repos)} repos.`}):null,e.jsx(U,{v:j.changedFiles,k:"CHANGED",title:`${v(j.changedFiles)} changed files across ${v(j.dirtyWorktrees)} dirty worktree${j.dirtyWorktrees===1?"":"s"}.`}),j.live>0?e.jsx(U,{v:j.live,k:"WORKING",tone:"mint"}):null,(c??0)>0?e.jsx(U,{v:c??0,k:"OPEN PRS",tone:"amber",title:h??void 0}):null,j.blocked>0?e.jsx(U,{v:j.blocked,k:"BLOCKED",tone:"coral",title:$}):null]})]}),e.jsxs("div",{className:"tbl-wrap",children:[e.jsxs("div",{className:"tbl-head",children:[e.jsx(V,{label:"REPO / BRANCH · WORKTREE",k:"name",sortKey:p,dir:m,onSort:M}),e.jsx(V,{label:"CHURN",k:"churn",sortKey:p,dir:m,onSort:M,align:"r"}),e.jsx(V,{label:"FILES",k:"files",sortKey:p,dir:m,onSort:M,align:"c"}),e.jsx(V,{label:"DRIFT",k:"drift",sortKey:p,dir:m,onSort:M,align:"c"}),e.jsx(V,{label:"ATTACHED",k:"attached",sortKey:p,dir:m,onSort:M})]}),A?e.jsx("div",{className:"rw-empty",children:"No repositories discovered yet."}):P.map(x=>x.length>1?e.jsx(Cs,{group:x,selectedId:t,onSelect:r,onViewDiff:n},x[0].project.id):e.jsx(ie,{row:x[0],top:!0,selected:t===x[0].wt.id,onSelect:()=>r(x[0].wt.id),onViewDiff:n},x[0].wt.id)),b&&g.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"tbl-head",style:{position:"static"},children:e.jsxs("span",{children:["CLEAN & IDLE · ",g.length]})}),g.map(x=>e.jsx(ie,{row:x,top:!0,clean:!0,selected:t===x.wt.id,onSelect:()=>r(x.wt.id),onViewDiff:n},x.wt.id))]}):null,e.jsx(Rs,{snapshot:s,scanDepth:a,scanMorePending:l,onScanMore:o})]})]})}function Rs({snapshot:s,scanDepth:t,scanMorePending:r,onScanMore:n}){const a=$s(s),l=vs(s.warnings),o=l.reduce((c,h)=>c+h.rawCount,0);return e.jsxs("div",{className:"scan-coverage",children:[e.jsxs("div",{className:"scan-coverage-row",children:[e.jsx("b",{children:"SCAN"}),e.jsx("span",{className:"scan-main",children:a.summary}),a.canScanMore&&t==="standard"?e.jsx("button",{type:"button",onClick:n,disabled:r,children:r?"Scanning":"Scan more"}):e.jsx("span",{className:"scan-chip",children:t==="expanded"?"expanded":"standard"})]}),l.length>0?e.jsxs("details",{className:"scan-details",children:[e.jsxs("summary",{children:[v(l.length)," diagnostic group",l.length===1?"":"s",o!==l.length?` (${v(o)} raw)`:""]}),e.jsx("ul",{children:l.map((c,h)=>e.jsxs("li",{children:[e.jsx("span",{children:c.message}),c.examples.length>0?e.jsx("span",{className:"scan-detail-examples",children:c.examples.join(" · ")}):null]},`${h}:${c.message}`))})]}):null]})}function $s(s){let t=null,r=0,n=0,a=0,l=0,o=0,c=0;for(const p of s.warnings){const u=/limited discovery to (\d+) repositories/i.exec(p);if(u){t=`discovery capped at ${u[1]}`;continue}if(/limited .* to \d+ worktrees/i.test(p)){r++;continue}if(/skipped unreadable worktree/i.test(p)){n++;continue}if(/skipped missing repo-watch path/i.test(p)){a++;continue}if(/scan budget|stopped discovery|stopped scanning/i.test(p)){l++;continue}if(/could not resolve git common directory/i.test(p)){o++;continue}c++}const h=[`${v(s.totals.projects)} repo${s.totals.projects===1?"":"s"}`,`${v(s.totals.worktrees)} worktree${s.totals.worktrees===1?"":"s"}`];return t&&h.push(t),r&&h.push(`${v(r)} repo${r===1?"":"s"} at worktree cap`),n&&h.push(`${v(n)} unreadable worktree${n===1?"":"s"} skipped`),a&&h.push(`${v(a)} missing path${a===1?"":"s"}`),o&&h.push(`${v(o)} unresolved git dir${o===1?"":"s"}`),l&&h.push("scan budget reached"),c&&h.push(`${v(c)} other diagnostic${c===1?"":"s"}`),{summary:h.join(" · "),canScanMore:t!==null||r>0||l>0}}function Cs({group:s,selectedId:t,onSelect:r,onViewDiff:n}){const a=s[0].project,l=s.some(p=>p.state==="error"),o=s.reduce((p,u)=>p+u.add,0),c=s.reduce((p,u)=>p+u.del,0),h=s.reduce((p,u)=>p+(u.live?1:0),0);return e.jsxs("div",{children:[e.jsxs("div",{className:"repo-grp"+(l?" attn":""),children:[e.jsxs("div",{className:"rg-name",children:[e.jsx("span",{className:"rg-tw","aria-hidden":!0,children:e.jsx("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",style:{transform:"rotate(90deg)"},children:e.jsx("path",{d:"M3 2l4 3.5L3 9",stroke:"currentColor",strokeWidth:"1.3",fill:"none"})})}),e.jsx("span",{className:"dot "+Ts(s)}),e.jsx("span",{className:"rg-nm",children:a.name}),e.jsx("span",{className:"rg-path",children:Me(a.root,3)}),e.jsxs("span",{className:"rg-badge",children:[a.worktrees.length," worktrees"]})]}),e.jsx("div",{className:"rg-agg",children:o||c?e.jsxs("span",{children:[e.jsxs("span",{style:{color:"var(--mint-dim)"},children:["+",v(o)]})," ",e.jsxs("span",{style:{color:"var(--coral-dim)"},children:["−",v(c)]})]}):"—"}),e.jsx("div",{}),e.jsx("div",{}),e.jsx("div",{className:"rg-agg",style:{textAlign:"left"},children:h?`${h} working`:""})]}),s.map((p,u)=>e.jsx(ie,{row:p,guide:!0,last:u===s.length-1,selected:t===p.wt.id,onSelect:()=>r(p.wt.id),onViewDiff:n},p.wt.id))]})}function ie({row:s,top:t,guide:r,last:n,clean:a,selected:l,onSelect:o,onViewDiff:c}){const{wt:h,project:p}=s,u=h.branch,m=Ee(h),N=!!c&&(s.files>0||m.has||h.branch.ahead>0);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:["wt",l?"sel":"",s.state==="error"?"attn":""].join(" "),style:t&&!a?{borderTop:"1px solid var(--line)"}:void 0,onClick:o,role:"button",tabIndex:0,onKeyDown:o?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),o())}:void 0,children:[e.jsxs("div",{className:"wt-name",children:[r?e.jsx("span",{className:"tw-guide"+(n?" last":"")}):null,e.jsxs("div",{className:"inner",children:[e.jsx("span",{className:"dot "+s.state}),e.jsxs("span",{className:"br",children:[t&&!r?e.jsxs("span",{className:"lead",children:[p.name,"  "]}):null,e.jsx(Te,{branch:h.branch,fallback:h.name})]}),e.jsx(Ms,{wt:h})]})]}),e.jsx(Es,{add:s.add,del:s.del}),e.jsx("div",{className:"files",children:s.files>0?e.jsxs("span",{children:[s.files,h.status.conflicts>0?e.jsxs("span",{className:"conf",children:[" ⚠",h.status.conflicts]}):null]}):e.jsx("span",{className:"dash",children:"—"})}),e.jsx(Ps,{ahead:u.ahead,behind:u.behind}),e.jsxs("div",{className:"agents-cell",children:[e.jsx(Is,{row:s}),N?e.jsx("button",{type:"button",className:"wt-diff",title:`View diff · ${s.files} changed file${s.files===1?"":"s"}`,"aria-label":"View diff",onClick:b=>{b.stopPropagation(),c?.(h.path)},children:"diff"}):null]})]})})}function U({v:s,k:t,tone:r,title:n}){return e.jsxs("div",{className:"stat",title:n,"aria-label":n?`${v(s)} ${t}. ${n}`:void 0,children:[e.jsx("span",{className:"v"+(r?" "+r:""),children:v(s)}),e.jsx("span",{className:"k",children:t})]})}function V({label:s,k:t,sortKey:r,dir:n,onSort:a,align:l}){const o=r===t;return e.jsx("div",{className:l==="r"?"r":l==="c"?"c":"",children:e.jsxs("button",{type:"button",className:o?"on":"",onClick:()=>a(t),children:[e.jsx("span",{children:s}),e.jsx("span",{className:"caret","aria-hidden":!0,children:n==="asc"?"▲":"▼"})]})})}function Es({add:s,del:t}){if(!s&&!t)return e.jsx("div",{className:"churn",children:e.jsx("span",{className:"dash",children:"—"})});const r=s+t||1;return e.jsxs("div",{className:"churn",children:[e.jsxs("span",{className:"nums",children:[e.jsxs("span",{className:"add",children:["+",v(s)]}),e.jsx("span",{className:"sl",children:"/"}),e.jsxs("span",{className:"del",children:["−",v(t)]})]}),e.jsxs("span",{className:"cbar",title:`+${v(s)} −${v(t)}`,children:[e.jsx("span",{className:"g",style:{width:s/r*100+"%"}}),e.jsx("span",{className:"r",style:{width:t/r*100+"%"}})]})]})}function Ps({ahead:s,behind:t}){return!s&&!t?e.jsx("div",{className:"drift",children:e.jsx("span",{className:"dash",children:"—"})}):e.jsxs("div",{className:"drift",children:[s?e.jsxs("span",{className:"dp ahead",children:["↑",s]}):null,t?e.jsxs("span",{className:"dp behind",children:["↓",t]}):null]})}const As=2;function Is({row:s}){const t=s.agentsUnique,r=s.wt.sessions,n=[...t.map(o=>`${X(o)} (${o.state??"—"})`),...r.map(o=>`session ${Ge(o)}`)].join(`
4
4
  `);if(t.length===0)return e.jsx("div",{className:"agents",title:n,children:r.length>0?e.jsxs("span",{className:"ahandle",children:[r.length," session",r.length===1?"":"s"]}):e.jsx("span",{className:"dash",children:"—"})});const a=t.slice(0,As),l=t.length-a.length;return e.jsxs("div",{className:"agents",title:n,children:[s.live>0?e.jsxs("span",{className:"alive",children:[e.jsx("span",{className:"d"}),s.live]}):null,e.jsx("span",{className:"ahandle",children:a.map(o=>X(o)).join(" ")}),l>0?e.jsxs("span",{className:"amore",children:["+",l]}):null]})}function Ms({wt:s}){const t=[];return s.branch.detached?t.push({label:"DETACHED",cls:""}):s.branch.upstream||t.push({label:"LOCAL",cls:""}),s.error!=null&&t.push({label:"SCAN ERR",cls:"err"}),s.isBare&&t.push({label:"BARE",cls:""}),e.jsx(e.Fragment,{children:t.map(r=>e.jsx("span",{className:"tag "+r.cls,children:r.label},r.label))})}const ve={error:3,live:2,dirty:1,clean:0};function Ts(s){return s.reduce((t,r)=>ve[r.state]>ve[t]?r.state:t,"clean")}function Ds(s,t,r){const n=r==="asc"?1:-1,a=u=>{switch(t){case"attention":return-G(u.wt.attention);case"churn":return u.churn;case"files":return u.files;case"drift":return u.wt.branch.ahead+u.wt.branch.behind;case"attached":return u.live*1e6+u.agentsUnique.length*1e3+u.wt.sessions.length;default:return 0}},l=new Map;for(const u of s){const m=l.get(u.project.id);m?m.push(u):l.set(u.project.id,[u])}const o=(u,m)=>{if(t==="name")return ze(u,m,n);const N=(a(u)-a(m))*n;if(N!==0)return N;const b=G(u.wt.attention)-G(m.wt.attention);return b!==0?b:u.wt.path.localeCompare(m.wt.path)},c=u=>u.reduce((m,N)=>Math.max(m,a(N)),-1/0),h=[...l.values()].sort((u,m)=>{if(t==="name")return u[0].project.name.localeCompare(m[0].project.name)*n;const N=(c(u)-c(m))*n;return N!==0?N:u[0].project.name.localeCompare(m[0].project.name)}),p=[];for(const u of h)p.push(...[...u].sort(o));return p}const J=8;function Ne(s){if(s.error!=null)return 0;const{ahead:t,behind:r}=s.branch;return t>0&&r>0?1:r>0||t>0?2:3}function Ls(s){const t=(s.name??"").trim();if(t){const a=t.split(/[\s_\-/]+/).filter(Boolean);if(a.length>=2)return(a[0][0]+a[1][0]).toUpperCase();if(a.length===1)return a[0].slice(0,2).toUpperCase()}return(X(s).replace(/^@/,"").replace(/[^a-z0-9]/gi,"").slice(0,2)||"··").toUpperCase()}function Os({snapshot:s,selectedId:t,onSelect:r}){return e.jsxs("section",{className:"bd",children:[e.jsx("div",{className:"bd-head",children:"BRANCH DRIFT — distance from each worktree's base · behind ← origin → ahead · flags call out what needs a rebase"}),e.jsxs("div",{className:"bd-axis",children:[e.jsx("div",{}),e.jsxs("div",{className:"bd-axis-track",children:[e.jsx("span",{className:"bd-axis-lbl",style:{left:"0%"},children:"−8"}),e.jsx("span",{className:"bd-axis-lbl",style:{left:"25%"},children:"−4"}),e.jsx("span",{className:"bd-axis-lbl bd-origin-lbl",style:{left:"50%"},children:"origin"}),e.jsx("span",{className:"bd-axis-lbl",style:{left:"75%"},children:"+4"}),e.jsx("span",{className:"bd-axis-lbl",style:{left:"100%"},children:"+8"}),e.jsx("span",{className:"bd-axis-cap",children:"COMMITS ←"})]}),e.jsx("div",{}),e.jsx("div",{}),e.jsx("div",{})]}),s.projects.map(n=>e.jsx(Ws,{project:n,selectedId:t,onSelect:r},n.id))]})}function Ws({project:s,selectedId:t,onSelect:r}){const n=[...s.worktrees].sort((a,l)=>Ne(a)-Ne(l));return e.jsxs("div",{className:"bd-grp",children:[e.jsxs("div",{className:"bd-grp-h",children:[e.jsx("span",{className:"bd-grp-nm",children:s.name}),e.jsx("span",{className:"bd-grp-path",children:Me(s.root,3)})]}),n.map(a=>e.jsx(Fs,{wt:a,selected:t===a.id,onSelect:()=>r(a.id)},a.id))]})}function Fs({wt:s,selected:t,onSelect:r}){const n=Ie(s),{ahead:a,behind:l}=s.branch,o=s.error!=null,c=Ae(s);return e.jsxs("div",{className:["bd-row",t?"sel":""].join(" "),role:"button",tabIndex:0,onClick:r,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),r())},children:[e.jsxs("div",{className:"bd-id",children:[e.jsx("span",{className:"dot "+n}),e.jsx("span",{className:"bd-br",children:e.jsx(Te,{branch:s.branch,fallback:s.name})})]}),e.jsx(qs,{ahead:a,behind:l,hasError:o}),e.jsx(_s,{wt:s,hasError:o}),e.jsx(Hs,{agents:c}),e.jsx(Us,{ahead:a,behind:l,hasError:o})]})}function qs({ahead:s,behind:t,hasError:r}){const n=s===0&&t===0;return e.jsxs("div",{className:"bd-track",children:[e.jsx("span",{className:"bd-tick",style:{left:"0%"}}),e.jsx("span",{className:"bd-tick",style:{left:"25%"}}),e.jsx("span",{className:"bd-tick bd-tick-origin",style:{left:"50%"}}),e.jsx("span",{className:"bd-tick",style:{left:"75%"}}),e.jsx("span",{className:"bd-tick",style:{left:"100%"}}),r||n?e.jsx("span",{className:"bd-origin-ring"}):e.jsxs(e.Fragment,{children:[t>0?e.jsxs("span",{className:"bd-bar bd-behind",style:{right:"50%",width:Math.min(t,J)/J*50+"%"},children:[e.jsx("span",{className:"bd-cap bd-cap-l"}),e.jsxs("span",{className:"bd-lbl bd-lbl-l",children:["↓",t]})]}):null,s>0?e.jsxs("span",{className:"bd-bar bd-ahead",style:{left:"50%",width:Math.min(s,J)/J*50+"%"},children:[e.jsx("span",{className:"bd-cap bd-cap-r"}),e.jsxs("span",{className:"bd-lbl bd-lbl-r",children:["↑",s]})]}):null]})]})}function _s({wt:s,hasError:t}){const{add:r,del:n,has:a}=Pe(s);if(t||!a)return e.jsx("div",{className:"bd-churn",children:e.jsx("span",{className:"dash",children:"—"})});const l=r+n||1;return e.jsxs("div",{className:"bd-churn",children:[e.jsxs("span",{className:"bd-churn-nums",children:[e.jsxs("span",{className:"add",children:["+",v(r)]}),e.jsx("span",{className:"sl",children:"/"}),e.jsxs("span",{className:"del",children:["−",v(n)]})]}),e.jsxs("span",{className:"bd-cbar",title:`+${v(r)} −${v(n)}`,children:[e.jsx("span",{className:"g",style:{width:r/l*100+"%"}}),e.jsx("span",{className:"r",style:{width:n/l*100+"%"}})]})]})}const Bs=2;function Hs({agents:s}){if(s.length===0)return e.jsx("div",{className:"bd-agents",children:e.jsx("span",{className:"dash",children:"—"})});const t=s.slice(0,Bs),r=s.length-t.length;return e.jsxs("div",{className:"bd-agents",title:s.map(n=>`${X(n)} (${n.state??"—"})`).join(`
5
5
  `),children:[t.map(n=>e.jsx("span",{className:"bd-av"+(le(n)?" live":""),children:Ls(n)},X(n))),r>0?e.jsxs("span",{className:"bd-av-more",children:["+",r]}):null]})}function Us({ahead:s,behind:t,hasError:r}){return r?e.jsx("div",{className:"bd-flag err",children:"SCAN ERR"}):s>0&&t>0?e.jsx("div",{className:"bd-flag rebase",children:"DIVERGED ▸"}):t>0?e.jsx("div",{className:"bd-flag rebase",children:"REBASE ▸"}):s>0?e.jsxs("div",{className:"bd-flag ahead",children:["AHEAD ",s]}):e.jsx("div",{className:"bd-flag sync",children:"IN SYNC"})}const Ks=1e4,Vs=15e3,zs=45e3,Gs=45e3,Xs="openscout.repos.tone",Se=["warm","cool","mono"],Ys="openscout.repos.view",ke=["table","drift"],Js=12;function Qs(s){return s.warnings.some(t=>/scan budget|stopped discovery|stopped scanning/i.test(t))}function Zs(s,t){return s.totals.worktrees<t.totals.worktrees||s.totals.projects<t.totals.projects}function et(s){return s&&typeof s=="object"&&"name"in s&&s.name==="AbortError"?"Repo Watch scan timed out; keeping the last available snapshot.":s instanceof Error?s.message:String(s)}function ye(s,t,r){const[n,a]=d.useState(()=>{if(typeof window>"u")return r;try{const o=window.localStorage.getItem(s);return o&&t.includes(o)?o:r}catch{return r}}),l=d.useCallback(o=>{a(o);try{window.localStorage.setItem(s,o)}catch{}},[s]);return[n,l]}function Re(s){let t=null,r=-1/0;for(const n of s)for(const a of n.worktrees){const l=a.agents.filter(c=>(c.state??"").toLowerCase()==="active").length,o=(4-G(a.attention))*1e6+l*1e4+a.status.changedFiles;o>r&&(r=o,t=a)}return t}function st(s,t){if(!s||!t)return{worktree:null,project:null};for(const r of s.projects)for(const n of r.worktrees)if(n.id===t)return{worktree:n,project:r};return{worktree:null,project:null}}function ae(s){if(!s)return 0;const t=/(\d+)\s+files?\s+changed/.exec(s);return t?Number(t[1]):0}function tt(s){const t=new Set,r=[];for(const n of s.projects){const a=n.worktrees[0]?.path??n.root;!a||t.has(a)||(t.add(a),r.push(a))}return r}function nt(s,t){if(!s)return"updated";const r=Date.parse(s);return Number.isFinite(r)?Xe(r,t):"updated"}function rt(s){const t=s?.pullRequests??[];if(t.length===0)return null;const r=t.slice(0,8).map(a=>`${a.repo}#${a.number}: ${a.title}`),n=t.length-r.length;return["Open pull requests from gh.",...r,n>0?`+${n} more`:null].filter(a=>!!a).join(`
6
- `)}function $e(s,t){return t?s.path===t.root||t.worktrees.some(n=>n.path===s.path)?!0:s.repo.split("/").pop()?.toLowerCase()===t.name.toLowerCase():!1}function Ce(s,t){const r=t?.branch.name?.trim();return!!(r&&s.headRefName===r)}function at(s,t){if(!t)return null;const r=s.headRefName?.trim();if(!r)return null;const n=[];for(const a of t.projects)for(const l of a.worktrees)l.branch.name?.trim()===r&&n.push({id:l.id,path:l.path,branch:r});if(n.length===0)return null;if(s.path){const a=n.find(l=>l.path===s.path);if(a)return a}return n[0]??null}function it(s,t){const r=[];for(const n of s.projects)for(const a of n.worktrees){const l=a.status.staged+a.status.unstaged+a.status.untracked+a.status.conflicts,o=a.agents.filter(m=>(m.state??"").toLowerCase()==="active").length,c=ae(a.diff.branchShortstat),h=Math.max(a.status.changedFiles,ae(a.diff.stagedShortstat)+ae(a.diff.unstagedShortstat)),p=a.branch.ahead+a.branch.behind,u=o+a.sessions.length;l===0&&u===0&&c===0&&p===0||r.push({path:a.path,score:(a.id===t?1e7:0)+(4-G(a.attention))*1e5+o*1e4+a.sessions.length*5e3+p*1e3+c*250+l*100+h})}return r.sort((n,a)=>a.score-n.score).map(n=>n.path)}function z({children:s}){return e.jsx("div",{className:"s-ops",children:e.jsx("div",{className:"s-ops-body",style:{overflowY:"auto"},children:s})})}function lt({error:s}){return e.jsxs("div",{className:"rw-empty-next",children:[e.jsx("p",{className:"rw-empty-copy",children:"Repos is waiting on the local Scout Services layer. Restart the broker from the menu bar app, then rescan."}),e.jsxs("ol",{className:"rw-empty-steps",children:[e.jsxs("li",{children:["Click ",e.jsx("span",{className:"rw-empty-action-name",children:"Restart broker"})," to hand off to the menu bar app."]}),e.jsx("li",{children:"Wait for Scout Services to report the broker online."}),e.jsxs("li",{children:["If nothing opens, run ",e.jsx("code",{children:"scout doctor"})," and follow the repair command it prints."]})]}),s?e.jsx("p",{className:"rw-empty-error",children:s}):null]})}function ot({snapshot:s,loading:t,error:r,selectedProject:n,selectedWorktree:a,repoSnapshot:l,onSelectWorktree:o,onOpenDiff:c,navigate:h}){const{agents:p}=qe(),u=_e(),[m,N]=d.useState(null),[b,T]=d.useState(null),[C,g]=d.useState(!1),[j,$]=d.useState(null),P=d.useRef(null),M=d.useCallback(i=>{N(i),P.current!=null&&window.clearTimeout(P.current),i&&(P.current=window.setTimeout(()=>N(null),6e3))},[]);d.useEffect(()=>()=>{P.current!=null&&window.clearTimeout(P.current)},[]);const A=d.useCallback(()=>{C||(T(null),$(null))},[C]),x=d.useMemo(()=>(l?.projects??[]).map(i=>({root:i.root,name:i.name})),[l]),k=s?.pullRequests??[],R=a?.branch.name??null,y=k.filter(i=>$e(i,n)),L=y.filter(i=>Ce(i,a)),I=y.filter(i=>!Ce(i,a)),W=k.filter(i=>!$e(i,n)),F=[L.length>0?{key:"branch",label:R?`Selected branch · ${R}`:"Selected branch",items:L}:null,I.length>0?{key:"project",label:n?`${n.name} PRs`:"Selected project",items:I}:null,W.length>0?{key:"other",label:y.length>0?"Other open PRs":"Open PRs",items:W}:null].filter(i=>!!i);if(!t&&!r&&k.length===0)return null;const D=(i,w)=>{i.preventDefault(),u(i,ps(w,{matchingWorktree:at(w,l),onBeginAssign:O=>{$(null),T(O)},onSelectWorktreeId:o,onOpenDiff:c,onStatus:M}))};return e.jsxs("section",{className:"rw-open-prs","aria-label":"Open pull requests",children:[e.jsxs("div",{className:"rw-open-prs-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"rw-open-prs-eyebrow",children:"Open PRs"}),e.jsx("div",{className:"rw-open-prs-title",children:t&&k.length===0?"Checking GitHub":`${k.length} open`}),m?e.jsx("div",{className:"rw-open-prs-status",role:"status",children:m}):null]}),s?e.jsx("span",{className:"rw-open-prs-meta",children:"gh"}):null]}),k.length>0?e.jsx("div",{className:"rw-open-prs-list",children:F.map(i=>e.jsxs("div",{className:"rw-open-pr-group",children:[F.length>1?e.jsx("div",{className:"rw-open-pr-group-label",children:i.label}):null,i.items.map(w=>e.jsxs("button",{type:"button",className:"rw-open-pr",title:`${w.title} — click for actions`,onClick:O=>D(O,w),onContextMenu:O=>D(O,w),children:[e.jsxs("span",{className:"rw-open-pr-main",children:[e.jsxs("span",{className:"rw-open-pr-number",children:["#",w.number]}),e.jsx("span",{className:"rw-open-pr-title",title:w.title,children:w.title})]}),e.jsxs("span",{className:"rw-open-pr-detail",children:[e.jsx("span",{children:w.repo}),e.jsxs("span",{children:[w.headRefName||"head"," → ",w.baseRefName||"base"]}),w.isDraft?e.jsx("span",{children:"draft"}):e.jsx("span",{children:"open"}),w.author?e.jsxs("span",{children:["@",w.author]}):null,e.jsx("span",{children:nt(w.updatedAt,s?.generatedAt??Date.now())})]})]},w.id))]},i.key))}):e.jsx("div",{className:"rw-open-prs-empty",children:r??"No open pull requests returned."}),b?e.jsx(gs,{pr:b,agents:p,projects:x,pending:C,error:j,onClose:A,onPendingChange:g,onError:$,onAssigned:i=>{T(null),$(null),M(i.message),(i.flightId||i.conversationId||i.targetAgentId)&&h({view:"follow",...i.flightId?{flightId:i.flightId}:{},...i.conversationId?{conversationId:i.conversationId}:{},...i.targetAgentId?{targetAgentId:i.targetAgentId}:{}})}}):null]})}function nn({navigate:s,focusRoot:t=null}){const[r]=d.useState(()=>Be()),[n,a]=d.useState(r),[l,o]=d.useState(r?"ready":"loading"),[c,h]=d.useState(null),p=d.useRef(r!==null),u=d.useRef(0),m=d.useRef(r),N=d.useRef(!1),[b,T]=ye(Xs,Se,"warm"),[C,g]=ye(Ys,ke,"table"),[j,$]=d.useState(null),[P,M]=d.useState("standard"),[A,x]=d.useState(!1),[k,R]=d.useState(null),[y,L]=d.useState(!1),[I,W]=d.useState(!1),[F,D]=d.useState(null),[i,w]=d.useState(null),[O,Z]=d.useState(!1),[Le,ee]=d.useState(null),[B,K]=d.useState(null),q=d.useCallback(async(f={})=>{if(N.current&&!f.force)return;N.current=!0;const S=f.depth??P;f.scanMore&&L(!0),f.force&&!f.scanMore&&x(!0);try{let E=await pe(S,f.force??!1,S==="expanded"?zs:Vs),_=S;if(!p.current&&S==="standard"&&!f.force&&E.projects.length===0)try{const he=await pe("expanded",!0,Gs);he.projects.length>0&&(E=he,_="expanded")}catch{}const ue=m.current;if(ue&&Qs(E)&&(E.projects.length===0||Zs(E,ue))){h("Scan budget was reached; keeping the last fuller Repo Watch snapshot."),o("ready");return}if(!f.force&&E.projects.length===0&&p.current&&u.current<3){u.current+=1,o("ready");return}u.current=0,p.current=!0,m.current=E,a(E),h(null),o("ready"),(f.scanMore||_!==S)&&M(_),f.force&&!f.scanMore&&R(`Fresh ${new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`)}catch(E){const _=et(E);h(_),p.current||o("error")}finally{f.scanMore&&L(!1),f.force&&!f.scanMore&&x(!1),N.current=!1}},[P]);d.useEffect(()=>{m.current=n},[n]),d.useEffect(()=>{q();const f=setInterval(()=>{q()},Ks);return()=>clearInterval(f)},[q]);const oe=d.useRef(null);d.useEffect(()=>{if(!n)return;if(t&&oe.current!==t){const S=n.projects.find(E=>E.root===t||E.worktrees.some(_=>_.path===t));if(!S)return;if(oe.current=t,!S.worktrees.some(E=>E.id===j)){$(Re([S])?.id??null);return}}n.projects.some(S=>S.worktrees.some(E=>E.id===j))||$(Re(n.projects)?.id??null)},[n,j,t]),d.useEffect(()=>{!n||n.projects.length===0||es(it(n,j),void 0,{limit:Js})},[n,j]);const se=d.useMemo(()=>n?tt(n):[],[n]),Oe=se.join("\0");d.useEffect(()=>{if(se.length===0){w(null),ee(null),Z(!1);return}let f=!1;return Z(!0),ee(null),He(se).then(S=>{f||w(S)}).catch(S=>{f||ee(S instanceof Error?S.message:String(S))}).finally(()=>{f||Z(!1)}),()=>{f=!0}},[Oe]);const H=d.useMemo(()=>st(n,j),[n,j]),We=d.useMemo(()=>rt(i),[i]);d.useEffect(()=>{Ye({worktree:H.worktree,project:H.project,generatedAt:n?.generatedAt??0,tone:b})},[H.worktree,H.project,n?.generatedAt,b]),d.useEffect(()=>Je,[]);const ce=d.useCallback(()=>{q({depth:"expanded",force:!0,scanMore:!0})},[q]),de=d.useCallback(()=>{q({force:!0})},[q]),Fe=d.useCallback(async()=>{if(!I){W(!0),D(null);try{const f=await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"broker"})});if(!f.ok)throw new Error(`Scout Services link failed (${f.status})`);const S=await f.json();if(!S.url?.startsWith("scout://services/restart/"))throw new Error("Scout Services link was not returned.");window.location.assign(S.url)}catch(f){const S=f instanceof Error?f.message:String(f);D(`${S} Run scout doctor if the menu app did not open.`)}finally{W(!1)}}},[I]);return l==="loading"?e.jsx(z,{navigate:s,children:e.jsx("div",{className:"repo-watch-scope",style:{padding:"24px"},children:e.jsx(te,{title:"Scanning repositories…",body:"Reading worktree state from the broker."})})}):l==="error"&&!n?e.jsx(z,{navigate:s,children:e.jsx("div",{className:"repo-watch-scope",style:{padding:"24px"},children:e.jsx(te,{className:"sys-state-card-error",title:"Couldn’t load Repo Watch",body:c??"The broker did not return a snapshot.",action:e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{o("loading"),q()},children:"Retry"})})})}):n&&n.projects.length===0?e.jsx(z,{navigate:s,children:e.jsx("div",{className:"repo-watch-scope",style:{padding:"24px"},children:e.jsx(te,{title:"Scout Services need attention",body:e.jsx(lt,{error:F}),action:e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>{Fe()},disabled:I,children:I?"Opening…":"Restart broker"}),e.jsx("button",{type:"button",className:"s-btn",onClick:de,disabled:A||y,children:A?"Scanning…":"Scan again"}),e.jsx("button",{type:"button",className:"s-btn",onClick:ce,disabled:A||y,children:y?"Scanning…":"Scan more"})]})})})}):n?e.jsx(z,{navigate:s,children:e.jsxs("div",{className:"repo-watch-scope",children:[e.jsx("div",{className:"rw-scope tone-"+b,children:e.jsxs("div",{className:"rw-page-shell",children:[e.jsxs("div",{className:"rw-toolbar",children:[e.jsxs("button",{type:"button",className:"rw-refresh-main",onClick:de,disabled:A||y,children:[e.jsx(ss,{size:14,"aria-hidden":"true",className:A?"rw-refresh-spin":void 0}),e.jsx("span",{children:A?"Scanning":"Refresh"})]}),k?e.jsx("span",{className:"rw-refresh-receipt",children:k}):null,e.jsxs("details",{className:"rw-display-menu",children:[e.jsxs("summary",{"aria-label":"Display options",children:[e.jsx(ts,{size:14,"aria-hidden":"true"}),e.jsx("span",{children:"Display"})]}),e.jsxs("div",{className:"rw-display-panel",children:[e.jsxs("div",{className:"rw-display-row",children:[e.jsx("span",{className:"rw-display-label",children:"View"}),e.jsx("div",{className:"rw-tone",role:"group","aria-label":"View",children:ke.map(f=>e.jsx("button",{type:"button",className:f===C?"on":"","aria-pressed":f===C,onClick:()=>g(f),children:f},f))})]}),e.jsxs("div",{className:"rw-display-row",children:[e.jsx("span",{className:"rw-display-label",children:"Tone"}),e.jsx("div",{className:"rw-tone",role:"group","aria-label":"Console tone",children:Se.map(f=>e.jsx("button",{type:"button",className:f===b?"on":"","aria-pressed":f===b,onClick:()=>T(f),children:f},f))})]})]})]})]}),e.jsx("div",{className:"min-w-0",children:C==="drift"?e.jsx(Os,{snapshot:n,selectedId:j,onSelect:$}):e.jsxs(e.Fragment,{children:[e.jsx(ys,{snapshot:n,selectedId:j,onSelect:$,onViewDiff:K,scanDepth:P,scanMorePending:y,onScanMore:ce,openPullRequestCount:i?.pullRequests.length??null,openPullRequestTitle:We}),e.jsx(ot,{snapshot:i,loading:O,error:Le,selectedProject:H.project,selectedWorktree:H.worktree,repoSnapshot:n,onSelectWorktree:$,onOpenDiff:K,navigate:s})]})})]})}),e.jsx(Qe,{open:B!=null,onClose:()=>K(null),side:"right",owner:"openscout.repos-diff-viewer",resizable:!0,defaultSize:840,maxSize:1280,minSize:420,ariaLabel:"Worktree diff",children:B!=null?e.jsx(Ze,{path:B,onClose:()=>K(null),onOpenAsPage:()=>{B&&(s({view:"repo-diff",path:B}),K(null))}},B):null})]})}):e.jsx(z,{navigate:s})}export{nn as ReposScreen,nn as default};
6
+ `)}function $e(s,t){return t?s.path===t.root||t.worktrees.some(n=>n.path===s.path)?!0:s.repo.split("/").pop()?.toLowerCase()===t.name.toLowerCase():!1}function Ce(s,t){const r=t?.branch.name?.trim();return!!(r&&s.headRefName===r)}function at(s,t){if(!t)return null;const r=s.headRefName?.trim();if(!r)return null;const n=[];for(const a of t.projects)for(const l of a.worktrees)l.branch.name?.trim()===r&&n.push({id:l.id,path:l.path,branch:r});if(n.length===0)return null;if(s.path){const a=n.find(l=>l.path===s.path);if(a)return a}return n[0]??null}function it(s,t){const r=[];for(const n of s.projects)for(const a of n.worktrees){const l=a.status.staged+a.status.unstaged+a.status.untracked+a.status.conflicts,o=a.agents.filter(m=>(m.state??"").toLowerCase()==="active").length,c=ae(a.diff.branchShortstat),h=Math.max(a.status.changedFiles,ae(a.diff.stagedShortstat)+ae(a.diff.unstagedShortstat)),p=a.branch.ahead+a.branch.behind,u=o+a.sessions.length;l===0&&u===0&&c===0&&p===0||r.push({path:a.path,score:(a.id===t?1e7:0)+(4-G(a.attention))*1e5+o*1e4+a.sessions.length*5e3+p*1e3+c*250+l*100+h})}return r.sort((n,a)=>a.score-n.score).map(n=>n.path)}function z({children:s}){return e.jsx("div",{className:"s-ops",children:e.jsx("div",{className:"s-ops-body",style:{overflowY:"auto"},children:s})})}function lt({error:s}){return e.jsxs("div",{className:"rw-empty-next",children:[e.jsx("p",{className:"rw-empty-copy",children:"Repos is waiting on the local Scout Services layer. Restart the broker from the menu bar app, then rescan."}),e.jsxs("ol",{className:"rw-empty-steps",children:[e.jsxs("li",{children:["Click ",e.jsx("span",{className:"rw-empty-action-name",children:"Restart broker"})," to hand off to the menu bar app."]}),e.jsx("li",{children:"Wait for Scout Services to report the broker online."}),e.jsxs("li",{children:["If nothing opens, run ",e.jsx("code",{children:"scout doctor"})," and follow the repair command it prints."]})]}),s?e.jsx("p",{className:"rw-empty-error",children:s}):null]})}function ot({snapshot:s,loading:t,error:r,selectedProject:n,selectedWorktree:a,repoSnapshot:l,onSelectWorktree:o,onOpenDiff:c,navigate:h}){const{agents:p}=qe(),u=_e(),[m,N]=d.useState(null),[b,T]=d.useState(null),[C,g]=d.useState(!1),[j,$]=d.useState(null),P=d.useRef(null),M=d.useCallback(i=>{N(i),P.current!=null&&window.clearTimeout(P.current),i&&(P.current=window.setTimeout(()=>N(null),6e3))},[]);d.useEffect(()=>()=>{P.current!=null&&window.clearTimeout(P.current)},[]);const A=d.useCallback(()=>{C||(T(null),$(null))},[C]),x=d.useMemo(()=>(l?.projects??[]).map(i=>({root:i.root,name:i.name})),[l]),k=s?.pullRequests??[],R=a?.branch.name??null,y=k.filter(i=>$e(i,n)),L=y.filter(i=>Ce(i,a)),I=y.filter(i=>!Ce(i,a)),W=k.filter(i=>!$e(i,n)),F=[L.length>0?{key:"branch",label:R?`Selected branch · ${R}`:"Selected branch",items:L}:null,I.length>0?{key:"project",label:n?`${n.name} PRs`:"Selected project",items:I}:null,W.length>0?{key:"other",label:y.length>0?"Other open PRs":"Open PRs",items:W}:null].filter(i=>!!i);if(!t&&!r&&k.length===0)return null;const D=(i,w)=>{i.preventDefault(),u(i,ps(w,{matchingWorktree:at(w,l),onBeginAssign:O=>{$(null),T(O)},onSelectWorktreeId:o,onOpenDiff:c,onStatus:M}))};return e.jsxs("section",{className:"rw-open-prs","aria-label":"Open pull requests",children:[e.jsxs("div",{className:"rw-open-prs-head",children:[e.jsxs("div",{children:[e.jsx("div",{className:"rw-open-prs-eyebrow",children:"Open PRs"}),e.jsx("div",{className:"rw-open-prs-title",children:t&&k.length===0?"Checking GitHub":`${k.length} open`}),m?e.jsx("div",{className:"rw-open-prs-status",role:"status",children:m}):null]}),s?e.jsx("span",{className:"rw-open-prs-meta",children:"gh"}):null]}),k.length>0?e.jsx("div",{className:"rw-open-prs-list",children:F.map(i=>e.jsxs("div",{className:"rw-open-pr-group",children:[F.length>1?e.jsx("div",{className:"rw-open-pr-group-label",children:i.label}):null,i.items.map(w=>e.jsxs("button",{type:"button",className:"rw-open-pr",title:`${w.title} — click for actions`,onClick:O=>D(O,w),onContextMenu:O=>D(O,w),children:[e.jsxs("span",{className:"rw-open-pr-main",children:[e.jsxs("span",{className:"rw-open-pr-number",children:["#",w.number]}),e.jsx("span",{className:"rw-open-pr-title",title:w.title,children:w.title})]}),e.jsxs("span",{className:"rw-open-pr-detail",children:[e.jsx("span",{children:w.repo}),e.jsxs("span",{children:[w.headRefName||"head"," → ",w.baseRefName||"base"]}),w.isDraft?e.jsx("span",{children:"draft"}):e.jsx("span",{children:"open"}),w.author?e.jsxs("span",{children:["@",w.author]}):null,e.jsx("span",{children:nt(w.updatedAt,s?.generatedAt??Date.now())})]})]},w.id))]},i.key))}):e.jsx("div",{className:"rw-open-prs-empty",children:r??"No open pull requests returned."}),b?e.jsx(gs,{pr:b,agents:p,projects:x,pending:C,error:j,onClose:A,onPendingChange:g,onError:$,onAssigned:i=>{T(null),$(null),M(i.message),(i.flightId||i.conversationId||i.targetAgentId)&&h({view:"follow",...i.flightId?{flightId:i.flightId}:{},...i.conversationId?{conversationId:i.conversationId}:{},...i.targetAgentId?{targetAgentId:i.targetAgentId}:{}})}}):null]})}function rn({navigate:s,focusRoot:t=null}){const[r]=d.useState(()=>Be()),[n,a]=d.useState(r),[l,o]=d.useState(r?"ready":"loading"),[c,h]=d.useState(null),p=d.useRef(r!==null),u=d.useRef(0),m=d.useRef(r),N=d.useRef(!1),[b,T]=ye(Xs,Se,"warm"),[C,g]=ye(Ys,ke,"table"),[j,$]=d.useState(null),[P,M]=d.useState("standard"),[A,x]=d.useState(!1),[k,R]=d.useState(null),[y,L]=d.useState(!1),[I,W]=d.useState(!1),[F,D]=d.useState(null),[i,w]=d.useState(null),[O,Z]=d.useState(!1),[Le,ee]=d.useState(null),[B,K]=d.useState(null),q=d.useCallback(async(f={})=>{if(N.current&&!f.force)return;N.current=!0;const S=f.depth??P;f.scanMore&&L(!0),f.force&&!f.scanMore&&x(!0);try{let E=await pe(S,f.force??!1,S==="expanded"?zs:Vs),_=S;if(!p.current&&S==="standard"&&!f.force&&E.projects.length===0)try{const he=await pe("expanded",!0,Gs);he.projects.length>0&&(E=he,_="expanded")}catch{}const ue=m.current;if(ue&&Qs(E)&&(E.projects.length===0||Zs(E,ue))){h("Scan budget was reached; keeping the last fuller Repo Watch snapshot."),o("ready");return}if(!f.force&&E.projects.length===0&&p.current&&u.current<3){u.current+=1,o("ready");return}u.current=0,p.current=!0,m.current=E,a(E),h(null),o("ready"),(f.scanMore||_!==S)&&M(_),f.force&&!f.scanMore&&R(`Fresh ${new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`)}catch(E){const _=et(E);h(_),p.current||o("error")}finally{f.scanMore&&L(!1),f.force&&!f.scanMore&&x(!1),N.current=!1}},[P]);d.useEffect(()=>{m.current=n},[n]),d.useEffect(()=>{q();const f=setInterval(()=>{q()},Ks);return()=>clearInterval(f)},[q]);const oe=d.useRef(null);d.useEffect(()=>{if(!n)return;if(t&&oe.current!==t){const S=n.projects.find(E=>E.root===t||E.worktrees.some(_=>_.path===t));if(!S)return;if(oe.current=t,!S.worktrees.some(E=>E.id===j)){$(Re([S])?.id??null);return}}n.projects.some(S=>S.worktrees.some(E=>E.id===j))||$(Re(n.projects)?.id??null)},[n,j,t]),d.useEffect(()=>{!n||n.projects.length===0||es(it(n,j),void 0,{limit:Js})},[n,j]);const se=d.useMemo(()=>n?tt(n):[],[n]),Oe=se.join("\0");d.useEffect(()=>{if(se.length===0){w(null),ee(null),Z(!1);return}let f=!1;return Z(!0),ee(null),He(se).then(S=>{f||w(S)}).catch(S=>{f||ee(S instanceof Error?S.message:String(S))}).finally(()=>{f||Z(!1)}),()=>{f=!0}},[Oe]);const H=d.useMemo(()=>st(n,j),[n,j]),We=d.useMemo(()=>rt(i),[i]);d.useEffect(()=>{Ye({worktree:H.worktree,project:H.project,generatedAt:n?.generatedAt??0,tone:b})},[H.worktree,H.project,n?.generatedAt,b]),d.useEffect(()=>Je,[]);const ce=d.useCallback(()=>{q({depth:"expanded",force:!0,scanMore:!0})},[q]),de=d.useCallback(()=>{q({force:!0})},[q]),Fe=d.useCallback(async()=>{if(!I){W(!0),D(null);try{const f=await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"broker"})});if(!f.ok)throw new Error(`Scout Services link failed (${f.status})`);const S=await f.json();if(!S.url?.startsWith("scout://services/restart/"))throw new Error("Scout Services link was not returned.");window.location.assign(S.url)}catch(f){const S=f instanceof Error?f.message:String(f);D(`${S} Run scout doctor if the menu app did not open.`)}finally{W(!1)}}},[I]);return l==="loading"?e.jsx(z,{navigate:s,children:e.jsx("div",{className:"repo-watch-scope",style:{padding:"24px"},children:e.jsx(te,{title:"Scanning repositories…",body:"Reading worktree state from the broker."})})}):l==="error"&&!n?e.jsx(z,{navigate:s,children:e.jsx("div",{className:"repo-watch-scope",style:{padding:"24px"},children:e.jsx(te,{className:"sys-state-card-error",title:"Couldn’t load Repo Watch",body:c??"The broker did not return a snapshot.",action:e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{o("loading"),q()},children:"Retry"})})})}):n&&n.projects.length===0?e.jsx(z,{navigate:s,children:e.jsx("div",{className:"repo-watch-scope",style:{padding:"24px"},children:e.jsx(te,{title:"Scout Services need attention",body:e.jsx(lt,{error:F}),action:e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>{Fe()},disabled:I,children:I?"Opening…":"Restart broker"}),e.jsx("button",{type:"button",className:"s-btn",onClick:de,disabled:A||y,children:A?"Scanning…":"Scan again"}),e.jsx("button",{type:"button",className:"s-btn",onClick:ce,disabled:A||y,children:y?"Scanning…":"Scan more"})]})})})}):n?e.jsx(z,{navigate:s,children:e.jsxs("div",{className:"repo-watch-scope",children:[e.jsx("div",{className:"rw-scope tone-"+b,children:e.jsxs("div",{className:"rw-page-shell",children:[e.jsxs("div",{className:"rw-toolbar",children:[e.jsxs("button",{type:"button",className:"rw-refresh-main",onClick:de,disabled:A||y,children:[e.jsx(ss,{size:14,"aria-hidden":"true",className:A?"rw-refresh-spin":void 0}),e.jsx("span",{children:A?"Scanning":"Refresh"})]}),k?e.jsx("span",{className:"rw-refresh-receipt",children:k}):null,e.jsxs("details",{className:"rw-display-menu",children:[e.jsxs("summary",{"aria-label":"Display options",children:[e.jsx(ts,{size:14,"aria-hidden":"true"}),e.jsx("span",{children:"Display"})]}),e.jsxs("div",{className:"rw-display-panel",children:[e.jsxs("div",{className:"rw-display-row",children:[e.jsx("span",{className:"rw-display-label",children:"View"}),e.jsx("div",{className:"rw-tone",role:"group","aria-label":"View",children:ke.map(f=>e.jsx("button",{type:"button",className:f===C?"on":"","aria-pressed":f===C,onClick:()=>g(f),children:f},f))})]}),e.jsxs("div",{className:"rw-display-row",children:[e.jsx("span",{className:"rw-display-label",children:"Tone"}),e.jsx("div",{className:"rw-tone",role:"group","aria-label":"Console tone",children:Se.map(f=>e.jsx("button",{type:"button",className:f===b?"on":"","aria-pressed":f===b,onClick:()=>T(f),children:f},f))})]})]})]})]}),e.jsx("div",{className:"min-w-0",children:C==="drift"?e.jsx(Os,{snapshot:n,selectedId:j,onSelect:$}):e.jsxs(e.Fragment,{children:[e.jsx(ys,{snapshot:n,selectedId:j,onSelect:$,onViewDiff:K,scanDepth:P,scanMorePending:y,onScanMore:ce,openPullRequestCount:i?.pullRequests.length??null,openPullRequestTitle:We}),e.jsx(ot,{snapshot:i,loading:O,error:Le,selectedProject:H.project,selectedWorktree:H.worktree,repoSnapshot:n,onSelectWorktree:$,onOpenDiff:K,navigate:s})]})})]})}),e.jsx(Qe,{open:B!=null,onClose:()=>K(null),side:"right",owner:"openscout.repos-diff-viewer",resizable:!0,defaultSize:840,maxSize:1280,minSize:420,ariaLabel:"Worktree diff",children:B!=null?e.jsx(Ze,{path:B,onClose:()=>K(null),onOpenAsPage:()=>{B&&(s({view:"repo-diff",path:B}),K(null))}},B):null})]})}):e.jsx(z,{navigate:s})}export{rn as ReposScreen,rn as default};