@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
@@ -1,4 +1,4 @@
1
- import{r as l,j as n}from"./index-C8uS5szO.js";import{a as X,p as Z}from"./ui-LM8pS8qE.js";/* empty css */import{a as T,s as q,l as ee,L as te,f as K,S as ne,r as se,b as re,c as _,d as ie,u as ae,V as A,C as H,D as le,e as oe}from"./usePierreRuntime-DJkRHMoe.js";import{C as ce}from"./chevron-down-B5eMsn5c.js";import{C as de}from"./check-B8dMv3Is.js";import{L as ue}from"./loader-circle-DurUYl7E.js";import{S as fe}from"./send-horizontal-pOtGI7FM.js";import{F as he}from"./file-code-corner-D_Aptal2.js";import{C as me}from"./code-xml-BmyLM0I2.js";import{X as pe}from"./x-DI1ktCYb.js";import{r as O,a as Y,f as V}from"./cache-DEy9E34b.js";import{M as xe}from"./message-square-NmXWtWLR.js";import{R as ge}from"./refresh-cw-Da9DDLk2.js";import{P as be}from"./plus-D_wLGJGT.js";import{a as B}from"./api-CaROe5_H.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./createLucideIcon-DkjnzvcJ.js";function je({snapshot:e,selectedFile:t,targets:r,targetId:s,onTargetId:i,draft:c,onDraft:f,contextItems:o,onRemoveContextItem:p,pending:a,status:d,error:g,textareaRef:k,onSubmit:S}){const[u,y]=l.useState(!1),b=l.useRef(null),w=r.find(h=>h.id===s)??null,m=w?.label??"Scout",C=r[0]?.id??null,N=t?T(t):null,I=(c.trim().length>0||o.length>0)&&!a,R=l.useMemo(()=>[...r.map(h=>({id:h.id,label:h.label,suffix:h.id===C?"best context":null})),{id:"scout",label:"Scout",suffix:null}],[C,r]);return l.useEffect(()=>{if(!u)return;const h=$=>{const D=b.current;D&&$.target instanceof Node&&D.contains($.target)||y(!1)};return document.addEventListener("pointerdown",h),()=>document.removeEventListener("pointerdown",h)},[u]),n.jsxs("div",{className:"rd-comment",children:[o.length>0?n.jsx("div",{className:"rd-comment-context","aria-label":"Included diff context",children:o.map(h=>n.jsx(ye,{item:h,disabled:a,onRemove:p},h.id))}):null,n.jsxs("div",{className:"rd-comment-main",children:[n.jsxs("div",{className:"rd-target-picker",ref:b,children:[n.jsxs("button",{type:"button",className:"rd-target-button",onClick:()=>y(h=>!h),onKeyDown:h=>{h.stopPropagation(),h.key==="Escape"&&y(!1)},disabled:a,"aria-label":"Diff comment target","aria-haspopup":"listbox","aria-expanded":u,title:"Diff comment target",children:[n.jsx("span",{children:m}),n.jsx(ce,{size:13,strokeWidth:2,"aria-hidden":!0})]}),u?n.jsx("div",{className:"rd-target-menu",role:"listbox","aria-label":"Diff comment target",children:R.map(h=>{const $=h.id===(w?.id??"scout");return n.jsxs("button",{type:"button",className:"rd-target-option",role:"option","aria-selected":$,onClick:()=>{i(h.id),y(!1)},children:[n.jsx("span",{className:"rd-target-option-label",children:h.label}),h.suffix?n.jsx("span",{className:"rd-target-option-suffix",children:h.suffix}):null,n.jsx("span",{className:"rd-target-option-check","aria-hidden":!0,children:$?n.jsx(de,{size:12,strokeWidth:2.2}):null})]},h.id)})}):null]}),n.jsx("textarea",{ref:k,value:c,onChange:h=>f(h.currentTarget.value),onKeyDown:h=>{h.stopPropagation(),(h.metaKey||h.ctrlKey)&&h.key==="Enter"&&(h.preventDefault(),S())},rows:1,disabled:a,placeholder:o.length>0?`Send to ${m} with included context`:"Leave a note on this diff…","aria-label":"Diff comment"}),n.jsxs("button",{type:"button",className:"rd-comment-send",disabled:!I,onClick:S,title:"Send diff comment","aria-label":"Send diff comment",children:[a?n.jsx(ue,{size:13,className:"rd-comment-spin","aria-hidden":!0}):n.jsx(fe,{size:13,"aria-hidden":!0}),n.jsx("span",{children:a?"Sending":"Send"})]})]}),n.jsx("div",{className:"rd-comment-meta",children:g?n.jsx("span",{className:"err",children:g}):d?n.jsx("span",{className:"ok",children:d}):n.jsxs("span",{children:[e.scope?.kind==="session"?"Session diff":"Worktree diff",N?` · ${N}`:""]})})]})}function ye({item:e,disabled:t,onRemove:r}){const s=e.kind==="file"?he:me;return n.jsxs("div",{className:`rd-context-item ${e.kind}`,children:[n.jsxs("div",{className:"rd-context-head",children:[n.jsx("span",{className:"rd-context-icon","aria-hidden":!0,children:n.jsx(s,{size:12,strokeWidth:2})}),n.jsx("span",{className:"rd-context-label",title:e.label,children:e.label}),n.jsx("span",{className:"rd-context-detail",children:e.detail}),n.jsx("button",{type:"button",className:"rd-context-remove",onClick:()=>r(e.id),disabled:t,title:"Remove included context","aria-label":"Remove included context",children:n.jsx(pe,{size:11,strokeWidth:2.2,"aria-hidden":!0})})]}),e.preview?n.jsx("pre",{className:"rd-context-preview",children:e.preview}):null]})}function Ce({heading:e,worktreePath:t,snapshot:r,freshness:s,activeLayer:i,onLayer:c,layout:f,onLayout:o,refreshing:p,onRefresh:a,onFocusComment:d,onClose:g,onOpenAsPage:k}){const{dir:S}=q(t);return n.jsxs("div",{className:"rd-header",children:[n.jsxs("div",{className:"rd-header-id",children:[n.jsxs("div",{className:"rd-header-title",children:[n.jsx("span",{className:"rd-header-name",title:t,children:e}),r.scope?n.jsx(ke,{snapshot:r}):null,S?n.jsx("span",{className:"rd-header-dir",children:S}):null]}),n.jsx("div",{className:"rd-header-sub",children:n.jsx(Ne,{layers:r.layers,activeLayer:i,onLayer:c})}),n.jsx(Se,{freshness:s,generatedAt:r.generatedAt})]}),n.jsxs("div",{className:"rd-header-actions",children:[n.jsx("button",{type:"button",className:"rd-close","aria-label":"Comment on diff",title:"Comment on diff",onClick:d,children:n.jsx(xe,{size:14,strokeWidth:2,"aria-hidden":!0})}),n.jsxs("div",{className:"rd-segmented",role:"group","aria-label":"Diff layout",children:[n.jsx("button",{type:"button",className:f==="unified"?"on":"","aria-pressed":f==="unified",onClick:()=>o("unified"),children:"Unified"}),n.jsx("button",{type:"button",className:f==="split"?"on":"","aria-pressed":f==="split",onClick:()=>o("split"),children:"Split"})]}),n.jsx("button",{type:"button",className:`rd-close${p?" spinning":""}`,"aria-label":"Refresh diff",title:"Fetch fresh diff",onClick:a,disabled:p,children:n.jsx(ge,{size:14,strokeWidth:2,"aria-hidden":!0})}),k?n.jsx("button",{type:"button",className:"rd-close","aria-label":"Open diff as page",title:"Open as full page",onClick:k,children:"↗"}):null,g?n.jsx("button",{type:"button",className:"rd-close","aria-label":"Close",onClick:g,children:"✕"}):null]})]})}function $e({snapshot:e}){const t=[];e.coverage.truncatedLayers>0&&t.push({level:"warning",text:`${e.coverage.truncatedLayers} layer${e.coverage.truncatedLayers===1?"":"s"} truncated — the native diff hit a size budget; some files or hunks are omitted.`}),e.coverage.scanBudgetReached&&t.push({level:"warning",text:"Scan budget reached — this diff is partial."});for(const r of e.diagnostics)t.push({level:r.level,text:r.path?`${r.message} (${r.path})`:r.message});return t.length===0?null:n.jsx(n.Fragment,{children:t.map((r,s)=>n.jsxs("div",{className:`rd-banner ${r.level}`,children:[n.jsx("span",{className:"rd-banner-dot","aria-hidden":!0}),n.jsx("span",{children:r.text})]},s))})}function ke({snapshot:e}){const t=e.scope;if(!t)return null;const r=t.kind==="session"?`Session · ${t.filteredPaths.length} files`:t.filteredPaths.length>0?`Filtered · ${t.filteredPaths.length} files`:"Worktree",s=t.kind==="session"?`${t.label}: path-filtered diff from ${t.changedFiles} changed / ${t.touchedFiles} touched session files`:t.label;return n.jsx("span",{className:`rd-scope-pill ${t.kind}`,title:s,children:r})}function Se({freshness:e,generatedAt:t}){const r=e?.fetchedAt??t,s=Math.max(0,Date.now()-r),i=e?.cacheHit?`Prefetched ${O(s)}`:`Updated ${O(s)}`;return n.jsxs("div",{className:"rd-freshness",title:new Date(r).toLocaleString(),children:[n.jsx("span",{children:i}),e?.refreshing?n.jsx("span",{children:"Refreshing…"}):null,e?.refreshError?n.jsx("span",{children:"Refresh failed"}):null]})}function Ne({layers:e,activeLayer:t,onLayer:r}){return n.jsx("div",{className:"rd-layers",role:"tablist","aria-label":"Diff layers",children:e.map(s=>{const i=ee(s);return n.jsxs("button",{type:"button",role:"tab","aria-selected":s.kind===t,className:"rd-layer-tab"+(s.kind===t?" on":""),onClick:()=>r(s.kind),title:s.shortstat??void 0,children:[n.jsx("span",{children:te[s.kind]??s.kind}),n.jsx("span",{className:"rd-layer-stat",children:s.files.length===0?"clean":n.jsxs(n.Fragment,{children:[s.files.length,"f"," ",n.jsxs("span",{style:{color:"var(--rd-add)"},children:["+",i.add]})," ",n.jsxs("span",{style:{color:"var(--rd-del)"},children:["−",i.del]}),s.truncated?" ⚠":""]})})]},s.kind)})})}const G="openscout.repo-diff.files-rail-width",U=268,we=196,ve=520;function Ie(e,t){if(e.length<=t)return e;const r=e.lastIndexOf(".");if(r<=0){const p=Math.max(1,Math.floor((t-1)/2)),a=t-p-1;return e.slice(0,p)+"…"+e.slice(-Math.max(1,a))}const s=e.slice(0,r),i=e.slice(r),c=t-i.length-1;if(c<2){const p=Math.max(1,t-i.length-1);return s.slice(0,p)+"…"+i}const f=Math.max(1,Math.floor(c/2)),o=Math.max(1,c-f);return s.slice(0,f)+"…"+s.slice(-o)+i}function De(e,t){return Math.max(8,Math.floor((e-178-t*14)/6.7))}function W(e){return Math.max(we,Math.min(ve,Math.round(e)))}function Re(){if(typeof window>"u")return U;const e=Number(window.localStorage.getItem(G));return Number.isFinite(e)?W(e):U}function Le(e){const t={name:"",path:"",firstIndex:Number.MAX_SAFE_INTEGER,children:new Map,files:[]};for(const r of e){t.firstIndex=Math.min(t.firstIndex,r.index);const s=r.dir?r.dir.split("/").filter(Boolean):[];let i=t;for(const c of s){const f=i.path?`${i.path}/${c}`:c;let o=i.children.get(c);o||(o={name:c,path:f,firstIndex:r.index,children:new Map,files:[]},i.children.set(c,o)),o.firstIndex=Math.min(o.firstIndex,r.index),i=o}i.files.push(r)}return t}function J(e){let t=e.files.length;for(const r of e.children.values())t+=J(r);return t}function Pe({layer:e,selectedFileKey:t,onSelect:r,onIncludeFile:s}){const[i,c]=l.useState(Re),[f,o]=l.useState(()=>new Set),p=l.useMemo(()=>(e?.files??[]).map((u,y)=>{const b=K(u,y),w=T(u),{name:m,dir:C}=q(w),N=(u.status==="renamed"||u.status==="copied")&&u.oldPath&&u.newPath&&u.oldPath!==u.newPath;return{file:u,index:y,key:b,display:w,name:m,dir:C,renamed:!!N}}),[e]),a=l.useMemo(()=>Le(p),[p]),d=l.useCallback(u=>{o(y=>{const b=new Set(y);return b.has(u)?b.delete(u):b.add(u),b})},[]),g=l.useCallback(u=>{u.preventDefault();const y=u.clientX,b=i,w=C=>{c(W(b+C.clientX-y))},m=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",m),c(C=>{const N=W(C);return window.localStorage.setItem(G,String(N)),N})};window.addEventListener("pointermove",w),window.addEventListener("pointerup",m,{once:!0})},[i]),k=(u,y)=>n.jsx(Fe,{entry:u,depth:y,railWidth:i,selected:u.key===t,onSelect:r,onIncludeFile:s},u.key),S=(u,y)=>{const b=[],w=[...u.children.values()].sort((m,C)=>m.firstIndex!==C.firstIndex?m.firstIndex-C.firstIndex:m.name.localeCompare(C.name));for(const m of w){const C=f.has(m.path);b.push(n.jsxs("button",{type:"button",className:"rd-dir-row",style:{paddingLeft:12+y*14},onClick:()=>d(m.path),title:m.path,children:[n.jsx("span",{className:"rd-dir-caret",children:C?"›":"⌄"}),n.jsx("span",{className:"rd-dir-name",children:m.name}),n.jsx("span",{className:"rd-dir-count",children:J(m)})]},`dir:${m.path}`)),C||b.push(...S(m,y+1))}for(const m of u.files)b.push(k(m,y));return b};return n.jsxs("div",{className:"rd-rail",style:{width:i},children:[n.jsx("div",{className:"rd-rail-head",children:e?`Changed files · ${e.files.length}`:"Changed files"}),n.jsx("div",{className:"rd-rail-list",children:S(a,0)}),n.jsx("div",{className:"rd-rail-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize file navigation",onPointerDown:g})]})}function Fe({entry:e,depth:t,railWidth:r,selected:s,onSelect:i,onIncludeFile:c}){const{file:f,key:o,display:p,name:a,dir:d,renamed:g}=e,k=De(r,t),S=Ie(a,k);return n.jsxs("div",{className:"rd-file-row"+(s?" on":""),title:g?`${f.oldPath} → ${f.newPath}`:p,children:[n.jsxs("button",{type:"button",className:"rd-file-pick",style:{paddingLeft:18+t*14},onClick:()=>i(o),children:[n.jsx("span",{className:`rd-file-glyph ${f.status}`,children:ne[f.status]}),n.jsxs("span",{className:"rd-file-id",children:[n.jsx("span",{className:"rd-file-name",children:S}),n.jsx("span",{className:"rd-file-dir",children:g?`${f.oldPath} → ${d||a}`:d}),n.jsx(Ee,{file:f})]})]}),n.jsx("span",{className:"rd-file-churn",children:f.binary?n.jsx("span",{className:"add",style:{color:"var(--muted)"},children:"bin"}):n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"add",children:["+",f.additions??0]}),n.jsxs("span",{className:"del",children:["−",f.deletions??0]})]})}),n.jsx("button",{type:"button",className:"rd-file-include",onClick:u=>{u.stopPropagation(),c(f,o)},"aria-label":`Include ${p} in comment`,title:"Include in comment",children:n.jsx(be,{size:12,strokeWidth:2,"aria-hidden":!0})})]})}function Ee({file:e}){const t=[];return e.binary&&t.push("BINARY"),e.truncated&&t.push("TRUNCATED"),e.status==="conflict"&&t.push("CONFLICT"),t.length===0?null:n.jsx("span",{className:"rd-file-tags",children:t.map(r=>n.jsx("span",{className:"rd-file-tag",children:r},r))})}function Me(e){switch(e?.trim().toLowerCase()){case"active":case"working":case"running":case"in_turn":return 80;case"queued":case"waiting":case"waking":case"in_flight":return 50;case"idle":case"available":return 25;case"offline":case"retired":case"stale":return-40;default:return 0}}function Te(e){return e.newPath??e.oldPath??"(unknown)"}function Q(e){const t=e.scope?.kind==="session"?e.scope.agentId:null,r=new Map;for(const s of e.scout.hints)s.agentId&&r.set(s.agentId,(r.get(s.agentId)??0)+1);return e.scout.agents.map(s=>({id:s.id,label:X(s),score:Me(s.state)+(s.id===t?1e3:0)+(r.get(s.id)??0)*10})).sort((s,i)=>{const c=i.score-s.score;return c!==0?c:s.label.localeCompare(i.label)})}function Ae(e){return Q(e)[0]??null}function Ke(e){const t=e.files.reduce((r,s)=>({add:r.add+(s.additions??0),del:r.del+(s.deletions??0)}),{add:0,del:0});return`${e.kind}: ${e.files.length} file${e.files.length===1?"":"s"}, +${t.add} -${t.del}${e.truncated?", truncated":""}`}function z(e){const t=e.binary?"binary":`+${e.additions??0} -${e.deletions??0}`;return`${e.status}: ${Te(e)} (${t}${e.truncated?", truncated":""})`}function We(e){const t=e.scope;return t?t.kind==="session"?`session ${t.sessionId??t.refId??"(unknown)"} (${t.changedFiles} changed / ${t.touchedFiles} touched files, ${t.include})`:t.filteredPaths.length>0?`filtered worktree (${t.filteredPaths.length} paths)`:"worktree":"worktree"}function ze(e){const{comment:t,includedContext:r=[],snapshot:s,activeLayer:i,selectedFile:c}=e,o=((i?s.layers.find(d=>d.kind===i)??null:null)?.files??s.layers.flatMap(d=>d.files)).slice(0,12).map(z),p=s.scout.agents.map(d=>X(d)).slice(0,8),a=["Operator comment on repo diff:",t,"","Repo Diff context:",`- Worktree: ${s.worktreePath}`,`- Scope: ${We(s)}`,`- Active layer: ${i??"none"}`];return r.length>0&&a.splice(3,0,"Included diff context:",...r.map(d=>d.trim()).filter(Boolean),""),c&&a.push(`- Selected file: ${z(c)}`),a.push(`- Layers: ${s.layers.map(Ke).join("; ")}`),p.length>0&&a.push(`- Attached agents: ${p.join(", ")}`),s.scout.sessions.length>0&&a.push(`- Sessions: ${s.scout.sessions.map(d=>d.id).slice(0,8).join(", ")}`),o.length>0&&a.push(`- Changed files: ${o.join(", ")}`),s.diagnostics.length>0&&a.push(`- Diagnostics: ${s.diagnostics.map(d=>d.message).join("; ")}`),a.join(`
1
+ import{r as l,j as n}from"./index-EsrkGBcv.js";import{a as X,p as Z}from"./ui-LM8pS8qE.js";/* empty css */import{a as T,s as q,l as ee,L as te,f as K,S as ne,r as se,b as re,c as _,d as ie,u as ae,V as A,C as H,D as le,e as oe}from"./usePierreRuntime-BAQdiN0L.js";import{C as ce}from"./chevron-down-l1mrh5S9.js";import{C as de}from"./check-lrJ3a73a.js";import{L as ue}from"./loader-circle-OvccU82H.js";import{S as fe}from"./send-horizontal-CH0-fbZE.js";import{F as he}from"./file-code-corner-CsU7jJpu.js";import{C as me}from"./code-xml-BhcNbLWU.js";import{X as pe}from"./x-DAehov0E.js";import{r as O,a as Y,f as V}from"./cache-DGBo3vIf.js";import{M as xe}from"./message-square-BxesYglW.js";import{R as ge}from"./refresh-cw-BmVr7sCD.js";import{P as be}from"./plus-DFDDeGKu.js";import{a as B}from"./api-DSqpVKC7.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./createLucideIcon-zZ8Hx7er.js";function je({snapshot:e,selectedFile:t,targets:r,targetId:s,onTargetId:i,draft:c,onDraft:f,contextItems:o,onRemoveContextItem:p,pending:a,status:d,error:g,textareaRef:k,onSubmit:S}){const[u,y]=l.useState(!1),b=l.useRef(null),w=r.find(h=>h.id===s)??null,m=w?.label??"Scout",C=r[0]?.id??null,N=t?T(t):null,I=(c.trim().length>0||o.length>0)&&!a,R=l.useMemo(()=>[...r.map(h=>({id:h.id,label:h.label,suffix:h.id===C?"best context":null})),{id:"scout",label:"Scout",suffix:null}],[C,r]);return l.useEffect(()=>{if(!u)return;const h=$=>{const D=b.current;D&&$.target instanceof Node&&D.contains($.target)||y(!1)};return document.addEventListener("pointerdown",h),()=>document.removeEventListener("pointerdown",h)},[u]),n.jsxs("div",{className:"rd-comment",children:[o.length>0?n.jsx("div",{className:"rd-comment-context","aria-label":"Included diff context",children:o.map(h=>n.jsx(ye,{item:h,disabled:a,onRemove:p},h.id))}):null,n.jsxs("div",{className:"rd-comment-main",children:[n.jsxs("div",{className:"rd-target-picker",ref:b,children:[n.jsxs("button",{type:"button",className:"rd-target-button",onClick:()=>y(h=>!h),onKeyDown:h=>{h.stopPropagation(),h.key==="Escape"&&y(!1)},disabled:a,"aria-label":"Diff comment target","aria-haspopup":"listbox","aria-expanded":u,title:"Diff comment target",children:[n.jsx("span",{children:m}),n.jsx(ce,{size:13,strokeWidth:2,"aria-hidden":!0})]}),u?n.jsx("div",{className:"rd-target-menu",role:"listbox","aria-label":"Diff comment target",children:R.map(h=>{const $=h.id===(w?.id??"scout");return n.jsxs("button",{type:"button",className:"rd-target-option",role:"option","aria-selected":$,onClick:()=>{i(h.id),y(!1)},children:[n.jsx("span",{className:"rd-target-option-label",children:h.label}),h.suffix?n.jsx("span",{className:"rd-target-option-suffix",children:h.suffix}):null,n.jsx("span",{className:"rd-target-option-check","aria-hidden":!0,children:$?n.jsx(de,{size:12,strokeWidth:2.2}):null})]},h.id)})}):null]}),n.jsx("textarea",{ref:k,value:c,onChange:h=>f(h.currentTarget.value),onKeyDown:h=>{h.stopPropagation(),(h.metaKey||h.ctrlKey)&&h.key==="Enter"&&(h.preventDefault(),S())},rows:1,disabled:a,placeholder:o.length>0?`Send to ${m} with included context`:"Leave a note on this diff…","aria-label":"Diff comment"}),n.jsxs("button",{type:"button",className:"rd-comment-send",disabled:!I,onClick:S,title:"Send diff comment","aria-label":"Send diff comment",children:[a?n.jsx(ue,{size:13,className:"rd-comment-spin","aria-hidden":!0}):n.jsx(fe,{size:13,"aria-hidden":!0}),n.jsx("span",{children:a?"Sending":"Send"})]})]}),n.jsx("div",{className:"rd-comment-meta",children:g?n.jsx("span",{className:"err",children:g}):d?n.jsx("span",{className:"ok",children:d}):n.jsxs("span",{children:[e.scope?.kind==="session"?"Session diff":"Worktree diff",N?` · ${N}`:""]})})]})}function ye({item:e,disabled:t,onRemove:r}){const s=e.kind==="file"?he:me;return n.jsxs("div",{className:`rd-context-item ${e.kind}`,children:[n.jsxs("div",{className:"rd-context-head",children:[n.jsx("span",{className:"rd-context-icon","aria-hidden":!0,children:n.jsx(s,{size:12,strokeWidth:2})}),n.jsx("span",{className:"rd-context-label",title:e.label,children:e.label}),n.jsx("span",{className:"rd-context-detail",children:e.detail}),n.jsx("button",{type:"button",className:"rd-context-remove",onClick:()=>r(e.id),disabled:t,title:"Remove included context","aria-label":"Remove included context",children:n.jsx(pe,{size:11,strokeWidth:2.2,"aria-hidden":!0})})]}),e.preview?n.jsx("pre",{className:"rd-context-preview",children:e.preview}):null]})}function Ce({heading:e,worktreePath:t,snapshot:r,freshness:s,activeLayer:i,onLayer:c,layout:f,onLayout:o,refreshing:p,onRefresh:a,onFocusComment:d,onClose:g,onOpenAsPage:k}){const{dir:S}=q(t);return n.jsxs("div",{className:"rd-header",children:[n.jsxs("div",{className:"rd-header-id",children:[n.jsxs("div",{className:"rd-header-title",children:[n.jsx("span",{className:"rd-header-name",title:t,children:e}),r.scope?n.jsx(ke,{snapshot:r}):null,S?n.jsx("span",{className:"rd-header-dir",children:S}):null]}),n.jsx("div",{className:"rd-header-sub",children:n.jsx(Ne,{layers:r.layers,activeLayer:i,onLayer:c})}),n.jsx(Se,{freshness:s,generatedAt:r.generatedAt})]}),n.jsxs("div",{className:"rd-header-actions",children:[n.jsx("button",{type:"button",className:"rd-close","aria-label":"Comment on diff",title:"Comment on diff",onClick:d,children:n.jsx(xe,{size:14,strokeWidth:2,"aria-hidden":!0})}),n.jsxs("div",{className:"rd-segmented",role:"group","aria-label":"Diff layout",children:[n.jsx("button",{type:"button",className:f==="unified"?"on":"","aria-pressed":f==="unified",onClick:()=>o("unified"),children:"Unified"}),n.jsx("button",{type:"button",className:f==="split"?"on":"","aria-pressed":f==="split",onClick:()=>o("split"),children:"Split"})]}),n.jsx("button",{type:"button",className:`rd-close${p?" spinning":""}`,"aria-label":"Refresh diff",title:"Fetch fresh diff",onClick:a,disabled:p,children:n.jsx(ge,{size:14,strokeWidth:2,"aria-hidden":!0})}),k?n.jsx("button",{type:"button",className:"rd-close","aria-label":"Open diff as page",title:"Open as full page",onClick:k,children:"↗"}):null,g?n.jsx("button",{type:"button",className:"rd-close","aria-label":"Close",onClick:g,children:"✕"}):null]})]})}function $e({snapshot:e}){const t=[];e.coverage.truncatedLayers>0&&t.push({level:"warning",text:`${e.coverage.truncatedLayers} layer${e.coverage.truncatedLayers===1?"":"s"} truncated — the native diff hit a size budget; some files or hunks are omitted.`}),e.coverage.scanBudgetReached&&t.push({level:"warning",text:"Scan budget reached — this diff is partial."});for(const r of e.diagnostics)t.push({level:r.level,text:r.path?`${r.message} (${r.path})`:r.message});return t.length===0?null:n.jsx(n.Fragment,{children:t.map((r,s)=>n.jsxs("div",{className:`rd-banner ${r.level}`,children:[n.jsx("span",{className:"rd-banner-dot","aria-hidden":!0}),n.jsx("span",{children:r.text})]},s))})}function ke({snapshot:e}){const t=e.scope;if(!t)return null;const r=t.kind==="session"?`Session · ${t.filteredPaths.length} files`:t.filteredPaths.length>0?`Filtered · ${t.filteredPaths.length} files`:"Worktree",s=t.kind==="session"?`${t.label}: path-filtered diff from ${t.changedFiles} changed / ${t.touchedFiles} touched session files`:t.label;return n.jsx("span",{className:`rd-scope-pill ${t.kind}`,title:s,children:r})}function Se({freshness:e,generatedAt:t}){const r=e?.fetchedAt??t,s=Math.max(0,Date.now()-r),i=e?.cacheHit?`Prefetched ${O(s)}`:`Updated ${O(s)}`;return n.jsxs("div",{className:"rd-freshness",title:new Date(r).toLocaleString(),children:[n.jsx("span",{children:i}),e?.refreshing?n.jsx("span",{children:"Refreshing…"}):null,e?.refreshError?n.jsx("span",{children:"Refresh failed"}):null]})}function Ne({layers:e,activeLayer:t,onLayer:r}){return n.jsx("div",{className:"rd-layers",role:"tablist","aria-label":"Diff layers",children:e.map(s=>{const i=ee(s);return n.jsxs("button",{type:"button",role:"tab","aria-selected":s.kind===t,className:"rd-layer-tab"+(s.kind===t?" on":""),onClick:()=>r(s.kind),title:s.shortstat??void 0,children:[n.jsx("span",{children:te[s.kind]??s.kind}),n.jsx("span",{className:"rd-layer-stat",children:s.files.length===0?"clean":n.jsxs(n.Fragment,{children:[s.files.length,"f"," ",n.jsxs("span",{style:{color:"var(--rd-add)"},children:["+",i.add]})," ",n.jsxs("span",{style:{color:"var(--rd-del)"},children:["−",i.del]}),s.truncated?" ⚠":""]})})]},s.kind)})})}const G="openscout.repo-diff.files-rail-width",U=268,we=196,ve=520;function Ie(e,t){if(e.length<=t)return e;const r=e.lastIndexOf(".");if(r<=0){const p=Math.max(1,Math.floor((t-1)/2)),a=t-p-1;return e.slice(0,p)+"…"+e.slice(-Math.max(1,a))}const s=e.slice(0,r),i=e.slice(r),c=t-i.length-1;if(c<2){const p=Math.max(1,t-i.length-1);return s.slice(0,p)+"…"+i}const f=Math.max(1,Math.floor(c/2)),o=Math.max(1,c-f);return s.slice(0,f)+"…"+s.slice(-o)+i}function De(e,t){return Math.max(8,Math.floor((e-178-t*14)/6.7))}function W(e){return Math.max(we,Math.min(ve,Math.round(e)))}function Re(){if(typeof window>"u")return U;const e=Number(window.localStorage.getItem(G));return Number.isFinite(e)?W(e):U}function Le(e){const t={name:"",path:"",firstIndex:Number.MAX_SAFE_INTEGER,children:new Map,files:[]};for(const r of e){t.firstIndex=Math.min(t.firstIndex,r.index);const s=r.dir?r.dir.split("/").filter(Boolean):[];let i=t;for(const c of s){const f=i.path?`${i.path}/${c}`:c;let o=i.children.get(c);o||(o={name:c,path:f,firstIndex:r.index,children:new Map,files:[]},i.children.set(c,o)),o.firstIndex=Math.min(o.firstIndex,r.index),i=o}i.files.push(r)}return t}function J(e){let t=e.files.length;for(const r of e.children.values())t+=J(r);return t}function Pe({layer:e,selectedFileKey:t,onSelect:r,onIncludeFile:s}){const[i,c]=l.useState(Re),[f,o]=l.useState(()=>new Set),p=l.useMemo(()=>(e?.files??[]).map((u,y)=>{const b=K(u,y),w=T(u),{name:m,dir:C}=q(w),N=(u.status==="renamed"||u.status==="copied")&&u.oldPath&&u.newPath&&u.oldPath!==u.newPath;return{file:u,index:y,key:b,display:w,name:m,dir:C,renamed:!!N}}),[e]),a=l.useMemo(()=>Le(p),[p]),d=l.useCallback(u=>{o(y=>{const b=new Set(y);return b.has(u)?b.delete(u):b.add(u),b})},[]),g=l.useCallback(u=>{u.preventDefault();const y=u.clientX,b=i,w=C=>{c(W(b+C.clientX-y))},m=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",m),c(C=>{const N=W(C);return window.localStorage.setItem(G,String(N)),N})};window.addEventListener("pointermove",w),window.addEventListener("pointerup",m,{once:!0})},[i]),k=(u,y)=>n.jsx(Fe,{entry:u,depth:y,railWidth:i,selected:u.key===t,onSelect:r,onIncludeFile:s},u.key),S=(u,y)=>{const b=[],w=[...u.children.values()].sort((m,C)=>m.firstIndex!==C.firstIndex?m.firstIndex-C.firstIndex:m.name.localeCompare(C.name));for(const m of w){const C=f.has(m.path);b.push(n.jsxs("button",{type:"button",className:"rd-dir-row",style:{paddingLeft:12+y*14},onClick:()=>d(m.path),title:m.path,children:[n.jsx("span",{className:"rd-dir-caret",children:C?"›":"⌄"}),n.jsx("span",{className:"rd-dir-name",children:m.name}),n.jsx("span",{className:"rd-dir-count",children:J(m)})]},`dir:${m.path}`)),C||b.push(...S(m,y+1))}for(const m of u.files)b.push(k(m,y));return b};return n.jsxs("div",{className:"rd-rail",style:{width:i},children:[n.jsx("div",{className:"rd-rail-head",children:e?`Changed files · ${e.files.length}`:"Changed files"}),n.jsx("div",{className:"rd-rail-list",children:S(a,0)}),n.jsx("div",{className:"rd-rail-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize file navigation",onPointerDown:g})]})}function Fe({entry:e,depth:t,railWidth:r,selected:s,onSelect:i,onIncludeFile:c}){const{file:f,key:o,display:p,name:a,dir:d,renamed:g}=e,k=De(r,t),S=Ie(a,k);return n.jsxs("div",{className:"rd-file-row"+(s?" on":""),title:g?`${f.oldPath} → ${f.newPath}`:p,children:[n.jsxs("button",{type:"button",className:"rd-file-pick",style:{paddingLeft:18+t*14},onClick:()=>i(o),children:[n.jsx("span",{className:`rd-file-glyph ${f.status}`,children:ne[f.status]}),n.jsxs("span",{className:"rd-file-id",children:[n.jsx("span",{className:"rd-file-name",children:S}),n.jsx("span",{className:"rd-file-dir",children:g?`${f.oldPath} → ${d||a}`:d}),n.jsx(Ee,{file:f})]})]}),n.jsx("span",{className:"rd-file-churn",children:f.binary?n.jsx("span",{className:"add",style:{color:"var(--muted)"},children:"bin"}):n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"add",children:["+",f.additions??0]}),n.jsxs("span",{className:"del",children:["−",f.deletions??0]})]})}),n.jsx("button",{type:"button",className:"rd-file-include",onClick:u=>{u.stopPropagation(),c(f,o)},"aria-label":`Include ${p} in comment`,title:"Include in comment",children:n.jsx(be,{size:12,strokeWidth:2,"aria-hidden":!0})})]})}function Ee({file:e}){const t=[];return e.binary&&t.push("BINARY"),e.truncated&&t.push("TRUNCATED"),e.status==="conflict"&&t.push("CONFLICT"),t.length===0?null:n.jsx("span",{className:"rd-file-tags",children:t.map(r=>n.jsx("span",{className:"rd-file-tag",children:r},r))})}function Me(e){switch(e?.trim().toLowerCase()){case"active":case"working":case"running":case"in_turn":return 80;case"queued":case"waiting":case"waking":case"in_flight":return 50;case"idle":case"available":return 25;case"offline":case"retired":case"stale":return-40;default:return 0}}function Te(e){return e.newPath??e.oldPath??"(unknown)"}function Q(e){const t=e.scope?.kind==="session"?e.scope.agentId:null,r=new Map;for(const s of e.scout.hints)s.agentId&&r.set(s.agentId,(r.get(s.agentId)??0)+1);return e.scout.agents.map(s=>({id:s.id,label:X(s),score:Me(s.state)+(s.id===t?1e3:0)+(r.get(s.id)??0)*10})).sort((s,i)=>{const c=i.score-s.score;return c!==0?c:s.label.localeCompare(i.label)})}function Ae(e){return Q(e)[0]??null}function Ke(e){const t=e.files.reduce((r,s)=>({add:r.add+(s.additions??0),del:r.del+(s.deletions??0)}),{add:0,del:0});return`${e.kind}: ${e.files.length} file${e.files.length===1?"":"s"}, +${t.add} -${t.del}${e.truncated?", truncated":""}`}function z(e){const t=e.binary?"binary":`+${e.additions??0} -${e.deletions??0}`;return`${e.status}: ${Te(e)} (${t}${e.truncated?", truncated":""})`}function We(e){const t=e.scope;return t?t.kind==="session"?`session ${t.sessionId??t.refId??"(unknown)"} (${t.changedFiles} changed / ${t.touchedFiles} touched files, ${t.include})`:t.filteredPaths.length>0?`filtered worktree (${t.filteredPaths.length} paths)`:"worktree":"worktree"}function ze(e){const{comment:t,includedContext:r=[],snapshot:s,activeLayer:i,selectedFile:c}=e,o=((i?s.layers.find(d=>d.kind===i)??null:null)?.files??s.layers.flatMap(d=>d.files)).slice(0,12).map(z),p=s.scout.agents.map(d=>X(d)).slice(0,8),a=["Operator comment on repo diff:",t,"","Repo Diff context:",`- Worktree: ${s.worktreePath}`,`- Scope: ${We(s)}`,`- Active layer: ${i??"none"}`];return r.length>0&&a.splice(3,0,"Included diff context:",...r.map(d=>d.trim()).filter(Boolean),""),c&&a.push(`- Selected file: ${z(c)}`),a.push(`- Layers: ${s.layers.map(Ke).join("; ")}`),p.length>0&&a.push(`- Attached agents: ${p.join(", ")}`),s.scout.sessions.length>0&&a.push(`- Sessions: ${s.scout.sessions.map(d=>d.id).slice(0,8).join(", ")}`),o.length>0&&a.push(`- Changed files: ${o.join(", ")}`),s.diagnostics.length>0&&a.push(`- Diagnostics: ${s.diagnostics.map(d=>d.message).join("; ")}`),a.join(`
2
2
  `)}function _e(e){const{snapshot:t,activeLayer:r,file:s}=e,i=[r??"diff",z(s)];return t.scope?.kind==="session"&&i.push(`session ${t.scope.sessionId??t.scope.refId??"scope"}`),`[Diff context: ${i.join(" · ")}]`}function He(e,t,r){return!e||!t?null:e.files.find((s,i)=>r(s,i)===t)??null}function Oe(e,t=120){const r=e.replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t-3)}...`:r}function Be(e,t=7){const r=e.trimEnd().split(`
3
3
  `),s=r.slice(0,t),i=r.length-s.length;return i>0?`${s.join(`
4
4
  `)}
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RepoDiffViewer-_4JVXBIW.js","assets/index-EsrkGBcv.js","assets/index-CN4rBB_s.css","assets/ui-LM8pS8qE.js","assets/usePierreRuntime-BAQdiN0L.js","assets/chunk-HRAB3GC3-DbVLgbWX.js","assets/chevron-down-l1mrh5S9.js","assets/createLucideIcon-zZ8Hx7er.js","assets/check-lrJ3a73a.js","assets/loader-circle-OvccU82H.js","assets/send-horizontal-CH0-fbZE.js","assets/file-code-corner-CsU7jJpu.js","assets/code-xml-BhcNbLWU.js","assets/x-DAehov0E.js","assets/cache-DGBo3vIf.js","assets/api-DSqpVKC7.js","assets/message-square-BxesYglW.js","assets/refresh-cw-BmVr7sCD.js","assets/plus-DFDDeGKu.js","assets/repo-diff-DyYmQMSA.css"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as i,_ as s}from"./index-EsrkGBcv.js";/* empty css */const a=i.lazy(()=>s(()=>import("./RepoDiffViewer-_4JVXBIW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])).then(r=>({default:r.RepoDiffViewer})));function t(){return e.jsx("div",{className:"rd-viewer","data-scout-theme":!0,children:e.jsx("div",{className:"rd-center",children:e.jsxs("div",{className:"rd-center-card",children:[e.jsx("div",{className:"rd-spinner","aria-hidden":!0}),e.jsx("div",{className:"rd-center-title",children:"Opening diff viewer…"})]})})})}function c(r){return e.jsx(i.Suspense,{fallback:e.jsx(t,{}),children:e.jsx(a,{...r})})}export{c as R};
@@ -1,6 +1,6 @@
1
- import{r as d,j as e}from"./index-C8uS5szO.js";import{E as te}from"./EmptyState-uyYN5piI.js";import{u as qe,a as _e}from"./Provider-5Hotn7NQ.js";import{g as Be,f as pe,b as He}from"./api-B9_IqFKY.js";import{a as Ue}from"./api-CaROe5_H.js";import{c as ne}from"./clipboard-e3fSpeo7.js";import{u as Ke}from"./keyboard-nav-CXfav14z.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-B5jqyMR9.js";import{S as Qe}from"./SlidePanel-Datu7XG4.js";import{R as Ze}from"./RepoDiffViewerLazy-BQ6ZCrsq.js";import{p as es}from"./cache-DEy9E34b.js";import{R as ss}from"./refresh-cw-Da9DDLk2.js";import{S as ts}from"./sliders-horizontal-CHf3ntw0.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./time-Dhsh_2EG.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.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-EsrkGBcv.js";import{E as te}from"./EmptyState-CZlrHXy-.js";import{u as qe,a as _e}from"./Provider-C35yu29I.js";import{g as Be,f as pe,b as He}from"./api-BQYTwoz6.js";import{a as Ue}from"./api-DSqpVKC7.js";import{c as ne}from"./clipboard-e3fSpeo7.js";import{u as Ke}from"./keyboard-nav-DDHegDbx.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-x3wFUjxj.js";import{S as Qe}from"./SlidePanel-_CHAQdOa.js";import{R as Ze}from"./RepoDiffViewerLazy-XGVC3WXv.js";import{p as es}from"./cache-DGBo3vIf.js";import{R as ss}from"./refresh-cw-BmVr7sCD.js";import{S as ts}from"./sliders-horizontal-782VC_yy.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.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 dn({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{dn as ReposScreen,dn 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 mn({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{mn as ReposScreen,mn as default};
@@ -1 +1 @@
1
- import{r as d,j as e,v as w}from"./index-C8uS5szO.js";function M(a){const o=w(`worker-rig:${a}`);return{head:o.int(0,2),headWidth:o.int(46,60),headHeight:o.int(37,45),bodyWidth:o.int(25,35),bodyHeight:o.int(25,32),hue:[155,38,266,195,14,330][o.int(0,5)],eyeGap:o.int(10,13),antenna:o.bool(.45),blinkDelay:o.float(-7,0)}}function v({identity:a,posture:o,paused:g=!1,size:f=76,traits:p}){const t=d.useMemo(()=>({...M(a),...p}),[a,p]),r=d.useId().replace(/:/g,""),x=d.useRef(null),[$,u]=d.useState(!0),[k,b]=d.useState(()=>typeof document>"u"||!document.hidden);d.useEffect(()=>{if(!x.current)return;const s=new IntersectionObserver(([C])=>u(C.isIntersecting));s.observe(x.current);const l=()=>b(!document.hidden);return document.addEventListener("visibilitychange",l),()=>{s.disconnect(),document.removeEventListener("visibilitychange",l)}},[]);const c=`url(#${r}-shell)`,h=`url(#${r}-accent)`,j=`url(#${r}-face)`,n=`url(#${r}-joint)`,W=`url(#${r}-rim)`,m=`url(#${r}-iris)`,y=`hsl(${t.hue} 70% 65%)`,i=62,H=i+t.bodyHeight+17;return e.jsxs("svg",{ref:x,className:`worker-rig is-${o}${g||!$||!k?" is-paused":""}`,width:f,height:f,viewBox:"0 0 100 120",preserveAspectRatio:"xMidYMid meet","aria-hidden":"true",focusable:"false",style:{"--rig-blink-delay":`${t.blinkDelay}s`},children:[e.jsxs("defs",{children:[e.jsxs("radialGradient",{id:`${r}-shell`,cx:".28",cy:".18",r:".88",children:[e.jsx("stop",{stopColor:"#fffdf3"}),e.jsx("stop",{offset:".34",stopColor:"#f2e8d3"}),e.jsx("stop",{offset:".7",stopColor:"#d4c3a7"}),e.jsx("stop",{offset:".9",stopColor:"#a7977c"}),e.jsx("stop",{offset:"1",stopColor:"#766b5c"})]}),e.jsxs("radialGradient",{id:`${r}-accent`,cx:".27",cy:".2",r:".9",children:[e.jsx("stop",{stopColor:`hsl(${t.hue} 30% 87%)`}),e.jsx("stop",{offset:".27",stopColor:`hsl(${t.hue} 34% 68%)`}),e.jsx("stop",{offset:".67",stopColor:`hsl(${t.hue} 28% 45%)`}),e.jsx("stop",{offset:"1",stopColor:`hsl(${t.hue} 26% 23%)`})]}),e.jsxs("radialGradient",{id:`${r}-face`,cx:".3",cy:".15",r:".95",children:[e.jsx("stop",{stopColor:"#465055"}),e.jsx("stop",{offset:".35",stopColor:"#202c32"}),e.jsx("stop",{offset:".85",stopColor:"#101a20"}),e.jsx("stop",{offset:"1",stopColor:"#080f14"})]}),e.jsxs("linearGradient",{id:`${r}-rim`,x1:"0",y1:"0",x2:".6",y2:"1",children:[e.jsx("stop",{stopColor:"#625a4d"}),e.jsx("stop",{offset:".4",stopColor:"#a99a80"}),e.jsx("stop",{offset:"1",stopColor:"#fff0d2"})]}),e.jsxs("radialGradient",{id:`${r}-joint`,cx:".3",cy:".2",r:".85",children:[e.jsx("stop",{stopColor:"#677074"}),e.jsx("stop",{offset:".45",stopColor:"#364047"}),e.jsx("stop",{offset:"1",stopColor:"#121b20"})]}),e.jsxs("radialGradient",{id:`${r}-iris`,cx:".35",cy:".25",r:".85",children:[e.jsx("stop",{stopColor:`hsl(${t.hue} 80% 87%)`}),e.jsx("stop",{offset:".6",stopColor:`hsl(${t.hue} 65% 63%)`}),e.jsx("stop",{offset:"1",stopColor:`hsl(${t.hue} 65% 35%)`})]})]}),e.jsx("ellipse",{cx:"50",cy:H+4,rx:"23",ry:"4",fill:"#000",opacity:".16"}),e.jsxs("g",{className:"worker-rig__figure",children:[["left","right"].map((s,l)=>e.jsx("g",{transform:`translate(${l?59:41} ${i+t.bodyHeight-2})`,children:e.jsxs("g",{className:`worker-rig__leg is-${s}`,children:[e.jsx("rect",{x:"-5",y:"0",width:"10",height:"15",rx:"4",fill:n}),e.jsx("rect",{x:"-6",y:"4",width:"12",height:"12",rx:"5",fill:c}),e.jsx("path",{d:"M-7 13 Q0 10 7 14 L9 19 Q0 23 -9 19Z",fill:h,stroke:"#303839",strokeWidth:".8"})]})},s)),e.jsx("rect",{x:"44",y:"54",width:"12",height:"12",rx:"4",fill:n}),e.jsx("path",{d:"M45 59 H55 M45 62 H55",stroke:"#151c21",strokeWidth:"1",opacity:".55"}),e.jsx("rect",{x:50-t.bodyWidth/2,y:i,width:t.bodyWidth,height:t.bodyHeight,rx:t.bodyWidth*.36,fill:c,stroke:"#948a79",strokeWidth:".7"}),e.jsx("ellipse",{cx:"50",cy:i+3,rx:t.bodyWidth/2-4,ry:"3",fill:"#4d4233",opacity:".22"}),e.jsx("ellipse",{cx:50-t.bodyWidth/2+6,cy:i+11,rx:"2.5",ry:"6",fill:"#fffdf3",opacity:".38"}),e.jsx("path",{d:`M${50-t.bodyWidth/2+4} ${i+t.bodyHeight-10} Q50 ${i+t.bodyHeight-3} ${50+t.bodyWidth/2-4} ${i+t.bodyHeight-10} L${50+t.bodyWidth/2-5} ${i+t.bodyHeight-3} Q50 ${i+t.bodyHeight+2} ${50-t.bodyWidth/2+5} ${i+t.bodyHeight-3}Z`,fill:h}),e.jsx("circle",{cx:"50",cy:i+10,r:"4.6",fill:j}),e.jsx("circle",{cx:"50",cy:i+10,r:"2.8",fill:y}),e.jsx("circle",{cx:"49",cy:i+9,r:".9",fill:"#fff",opacity:".8"}),["left","right"].map((s,l)=>e.jsx("g",{transform:`translate(${50+(l?1:-1)*(t.bodyWidth/2+2)} ${i+4})`,children:e.jsxs("g",{className:`worker-rig__arm is-${s}`,children:[e.jsx("circle",{r:"6.4",fill:n}),e.jsx("circle",{cx:"-.4",cy:"-.6",r:"5.7",fill:h}),e.jsx("ellipse",{cx:"-2",cy:"-2.4",rx:"2",ry:"1",fill:"#fff",opacity:".35"}),e.jsx("rect",{x:"-4",y:"4",width:"8",height:"16",rx:"4",fill:c,stroke:"#a89d8c",strokeWidth:".6"}),e.jsx("path",{d:"M-2 7 V14",stroke:"#fff9e9",strokeWidth:"1.1",opacity:".55",strokeLinecap:"round"}),e.jsx("circle",{cy:"22",r:"5",fill:n}),e.jsx("path",{d:"M-3 21 Q0 19 3 21",fill:"none",stroke:"#647279"})]})},s)),e.jsx("g",{transform:"translate(50 33)",children:e.jsxs("g",{className:"worker-rig__head",children:[t.antenna?e.jsxs("g",{children:[e.jsx("path",{d:`M0 ${-t.headHeight/2+1} V${-t.headHeight/2-7}`,stroke:"#576362",strokeWidth:"3"}),e.jsx("circle",{cy:-t.headHeight/2-8,r:"3",fill:h})]}):null,[-1,1].map(s=>t.head===2?e.jsx("path",{d:`M${s*(t.headWidth/2-5)} -8 L${s*(t.headWidth/2+4)} -25 L${s*(t.headWidth/2+6)} 3Z`,fill:h,stroke:"#7b897d",strokeWidth:".8"},s):e.jsx("ellipse",{cx:s*t.headWidth/2,cy:"1",rx:"5",ry:t.head===0?8:6,fill:h,stroke:"#7b897d",strokeWidth:".8"},s)),e.jsx("rect",{x:-t.headWidth/2,y:-t.headHeight/2,width:t.headWidth,height:t.headHeight,rx:t.head===0?t.headHeight/2:t.head===1?10:15,fill:c,stroke:"#948a79",strokeWidth:".8"}),e.jsx("path",{d:`M${-t.headWidth/2+4} -5 Q${-t.headWidth/2+2} ${-t.headHeight/2+4} -8 ${-t.headHeight/2+2}`,fill:"none",stroke:"#fffdf5",strokeWidth:"1.8",strokeLinecap:"round",opacity:".7"}),e.jsx("path",{d:`M-12 ${-t.headHeight/2+3} Q0 ${-t.headHeight/2-1} 12 ${-t.headHeight/2+3} L10 ${-t.headHeight/2+7} Q0 ${-t.headHeight/2+9} -10 ${-t.headHeight/2+7}Z`,fill:h}),e.jsx("rect",{x:-t.headWidth/2+3.5,y:-t.headHeight/2+8.5,width:t.headWidth-7,height:t.headHeight-12,rx:"11.5",fill:W}),e.jsx("rect",{x:-t.headWidth/2+5,y:-t.headHeight/2+10,width:t.headWidth-10,height:t.headHeight-15,rx:"10",fill:j,stroke:"#171c1f",strokeWidth:".6"}),e.jsx("path",{d:`M${-t.headWidth/2+8} -5 Q${-t.headWidth/2+8} -11 -12 -10`,fill:"none",stroke:"#fff",opacity:".15",strokeWidth:"2"}),[-1,1].map(s=>e.jsxs("g",{transform:`translate(${s*t.eyeGap} 3)`,children:[e.jsxs("g",{className:"worker-rig__eye",children:[e.jsx("ellipse",{rx:"6",ry:"7.5",fill:m}),e.jsxs("g",{className:"worker-rig__pupil",children:[e.jsx("ellipse",{rx:"3.3",ry:"5",fill:"#13242e"}),e.jsx("ellipse",{cx:"-1",cy:"-2.4",rx:"1.4",ry:"1.6",fill:"#fff"})]})]}),e.jsx("path",{className:"worker-rig__brow",d:"M-4 -9 Q0 -11 4 -9",fill:"none",stroke:y,strokeWidth:"1.6",strokeLinecap:"round"})]},s))]})})]})]})}export{v as RiggedWorkerCharacter,M as traitsFor};
1
+ import{r as d,j as e,E as w}from"./index-EsrkGBcv.js";function M(a){const o=w(`worker-rig:${a}`);return{head:o.int(0,2),headWidth:o.int(46,60),headHeight:o.int(37,45),bodyWidth:o.int(25,35),bodyHeight:o.int(25,32),hue:[155,38,266,195,14,330][o.int(0,5)],eyeGap:o.int(10,13),antenna:o.bool(.45),blinkDelay:o.float(-7,0)}}function v({identity:a,posture:o,paused:g=!1,size:f=76,traits:p}){const t=d.useMemo(()=>({...M(a),...p}),[a,p]),r=d.useId().replace(/:/g,""),x=d.useRef(null),[$,u]=d.useState(!0),[k,b]=d.useState(()=>typeof document>"u"||!document.hidden);d.useEffect(()=>{if(!x.current)return;const s=new IntersectionObserver(([C])=>u(C.isIntersecting));s.observe(x.current);const l=()=>b(!document.hidden);return document.addEventListener("visibilitychange",l),()=>{s.disconnect(),document.removeEventListener("visibilitychange",l)}},[]);const c=`url(#${r}-shell)`,h=`url(#${r}-accent)`,j=`url(#${r}-face)`,n=`url(#${r}-joint)`,W=`url(#${r}-rim)`,m=`url(#${r}-iris)`,y=`hsl(${t.hue} 70% 65%)`,i=62,H=i+t.bodyHeight+17;return e.jsxs("svg",{ref:x,className:`worker-rig is-${o}${g||!$||!k?" is-paused":""}`,width:f,height:f,viewBox:"0 0 100 120",preserveAspectRatio:"xMidYMid meet","aria-hidden":"true",focusable:"false",style:{"--rig-blink-delay":`${t.blinkDelay}s`},children:[e.jsxs("defs",{children:[e.jsxs("radialGradient",{id:`${r}-shell`,cx:".28",cy:".18",r:".88",children:[e.jsx("stop",{stopColor:"#fffdf3"}),e.jsx("stop",{offset:".34",stopColor:"#f2e8d3"}),e.jsx("stop",{offset:".7",stopColor:"#d4c3a7"}),e.jsx("stop",{offset:".9",stopColor:"#a7977c"}),e.jsx("stop",{offset:"1",stopColor:"#766b5c"})]}),e.jsxs("radialGradient",{id:`${r}-accent`,cx:".27",cy:".2",r:".9",children:[e.jsx("stop",{stopColor:`hsl(${t.hue} 30% 87%)`}),e.jsx("stop",{offset:".27",stopColor:`hsl(${t.hue} 34% 68%)`}),e.jsx("stop",{offset:".67",stopColor:`hsl(${t.hue} 28% 45%)`}),e.jsx("stop",{offset:"1",stopColor:`hsl(${t.hue} 26% 23%)`})]}),e.jsxs("radialGradient",{id:`${r}-face`,cx:".3",cy:".15",r:".95",children:[e.jsx("stop",{stopColor:"#465055"}),e.jsx("stop",{offset:".35",stopColor:"#202c32"}),e.jsx("stop",{offset:".85",stopColor:"#101a20"}),e.jsx("stop",{offset:"1",stopColor:"#080f14"})]}),e.jsxs("linearGradient",{id:`${r}-rim`,x1:"0",y1:"0",x2:".6",y2:"1",children:[e.jsx("stop",{stopColor:"#625a4d"}),e.jsx("stop",{offset:".4",stopColor:"#a99a80"}),e.jsx("stop",{offset:"1",stopColor:"#fff0d2"})]}),e.jsxs("radialGradient",{id:`${r}-joint`,cx:".3",cy:".2",r:".85",children:[e.jsx("stop",{stopColor:"#677074"}),e.jsx("stop",{offset:".45",stopColor:"#364047"}),e.jsx("stop",{offset:"1",stopColor:"#121b20"})]}),e.jsxs("radialGradient",{id:`${r}-iris`,cx:".35",cy:".25",r:".85",children:[e.jsx("stop",{stopColor:`hsl(${t.hue} 80% 87%)`}),e.jsx("stop",{offset:".6",stopColor:`hsl(${t.hue} 65% 63%)`}),e.jsx("stop",{offset:"1",stopColor:`hsl(${t.hue} 65% 35%)`})]})]}),e.jsx("ellipse",{cx:"50",cy:H+4,rx:"23",ry:"4",fill:"#000",opacity:".16"}),e.jsxs("g",{className:"worker-rig__figure",children:[["left","right"].map((s,l)=>e.jsx("g",{transform:`translate(${l?59:41} ${i+t.bodyHeight-2})`,children:e.jsxs("g",{className:`worker-rig__leg is-${s}`,children:[e.jsx("rect",{x:"-5",y:"0",width:"10",height:"15",rx:"4",fill:n}),e.jsx("rect",{x:"-6",y:"4",width:"12",height:"12",rx:"5",fill:c}),e.jsx("path",{d:"M-7 13 Q0 10 7 14 L9 19 Q0 23 -9 19Z",fill:h,stroke:"#303839",strokeWidth:".8"})]})},s)),e.jsx("rect",{x:"44",y:"54",width:"12",height:"12",rx:"4",fill:n}),e.jsx("path",{d:"M45 59 H55 M45 62 H55",stroke:"#151c21",strokeWidth:"1",opacity:".55"}),e.jsx("rect",{x:50-t.bodyWidth/2,y:i,width:t.bodyWidth,height:t.bodyHeight,rx:t.bodyWidth*.36,fill:c,stroke:"#948a79",strokeWidth:".7"}),e.jsx("ellipse",{cx:"50",cy:i+3,rx:t.bodyWidth/2-4,ry:"3",fill:"#4d4233",opacity:".22"}),e.jsx("ellipse",{cx:50-t.bodyWidth/2+6,cy:i+11,rx:"2.5",ry:"6",fill:"#fffdf3",opacity:".38"}),e.jsx("path",{d:`M${50-t.bodyWidth/2+4} ${i+t.bodyHeight-10} Q50 ${i+t.bodyHeight-3} ${50+t.bodyWidth/2-4} ${i+t.bodyHeight-10} L${50+t.bodyWidth/2-5} ${i+t.bodyHeight-3} Q50 ${i+t.bodyHeight+2} ${50-t.bodyWidth/2+5} ${i+t.bodyHeight-3}Z`,fill:h}),e.jsx("circle",{cx:"50",cy:i+10,r:"4.6",fill:j}),e.jsx("circle",{cx:"50",cy:i+10,r:"2.8",fill:y}),e.jsx("circle",{cx:"49",cy:i+9,r:".9",fill:"#fff",opacity:".8"}),["left","right"].map((s,l)=>e.jsx("g",{transform:`translate(${50+(l?1:-1)*(t.bodyWidth/2+2)} ${i+4})`,children:e.jsxs("g",{className:`worker-rig__arm is-${s}`,children:[e.jsx("circle",{r:"6.4",fill:n}),e.jsx("circle",{cx:"-.4",cy:"-.6",r:"5.7",fill:h}),e.jsx("ellipse",{cx:"-2",cy:"-2.4",rx:"2",ry:"1",fill:"#fff",opacity:".35"}),e.jsx("rect",{x:"-4",y:"4",width:"8",height:"16",rx:"4",fill:c,stroke:"#a89d8c",strokeWidth:".6"}),e.jsx("path",{d:"M-2 7 V14",stroke:"#fff9e9",strokeWidth:"1.1",opacity:".55",strokeLinecap:"round"}),e.jsx("circle",{cy:"22",r:"5",fill:n}),e.jsx("path",{d:"M-3 21 Q0 19 3 21",fill:"none",stroke:"#647279"})]})},s)),e.jsx("g",{transform:"translate(50 33)",children:e.jsxs("g",{className:"worker-rig__head",children:[t.antenna?e.jsxs("g",{children:[e.jsx("path",{d:`M0 ${-t.headHeight/2+1} V${-t.headHeight/2-7}`,stroke:"#576362",strokeWidth:"3"}),e.jsx("circle",{cy:-t.headHeight/2-8,r:"3",fill:h})]}):null,[-1,1].map(s=>t.head===2?e.jsx("path",{d:`M${s*(t.headWidth/2-5)} -8 L${s*(t.headWidth/2+4)} -25 L${s*(t.headWidth/2+6)} 3Z`,fill:h,stroke:"#7b897d",strokeWidth:".8"},s):e.jsx("ellipse",{cx:s*t.headWidth/2,cy:"1",rx:"5",ry:t.head===0?8:6,fill:h,stroke:"#7b897d",strokeWidth:".8"},s)),e.jsx("rect",{x:-t.headWidth/2,y:-t.headHeight/2,width:t.headWidth,height:t.headHeight,rx:t.head===0?t.headHeight/2:t.head===1?10:15,fill:c,stroke:"#948a79",strokeWidth:".8"}),e.jsx("path",{d:`M${-t.headWidth/2+4} -5 Q${-t.headWidth/2+2} ${-t.headHeight/2+4} -8 ${-t.headHeight/2+2}`,fill:"none",stroke:"#fffdf5",strokeWidth:"1.8",strokeLinecap:"round",opacity:".7"}),e.jsx("path",{d:`M-12 ${-t.headHeight/2+3} Q0 ${-t.headHeight/2-1} 12 ${-t.headHeight/2+3} L10 ${-t.headHeight/2+7} Q0 ${-t.headHeight/2+9} -10 ${-t.headHeight/2+7}Z`,fill:h}),e.jsx("rect",{x:-t.headWidth/2+3.5,y:-t.headHeight/2+8.5,width:t.headWidth-7,height:t.headHeight-12,rx:"11.5",fill:W}),e.jsx("rect",{x:-t.headWidth/2+5,y:-t.headHeight/2+10,width:t.headWidth-10,height:t.headHeight-15,rx:"10",fill:j,stroke:"#171c1f",strokeWidth:".6"}),e.jsx("path",{d:`M${-t.headWidth/2+8} -5 Q${-t.headWidth/2+8} -11 -12 -10`,fill:"none",stroke:"#fff",opacity:".15",strokeWidth:"2"}),[-1,1].map(s=>e.jsxs("g",{transform:`translate(${s*t.eyeGap} 3)`,children:[e.jsxs("g",{className:"worker-rig__eye",children:[e.jsx("ellipse",{rx:"6",ry:"7.5",fill:m}),e.jsxs("g",{className:"worker-rig__pupil",children:[e.jsx("ellipse",{rx:"3.3",ry:"5",fill:"#13242e"}),e.jsx("ellipse",{cx:"-1",cy:"-2.4",rx:"1.4",ry:"1.6",fill:"#fff"})]})]}),e.jsx("path",{className:"worker-rig__brow",d:"M-4 -9 Q0 -11 4 -9",fill:"none",stroke:y,strokeWidth:"1.6",strokeLinecap:"round"})]},s))]})})]})]})}export{v as RiggedWorkerCharacter,M as traitsFor};