@ashlr/hub 3.10.0 → 3.10.1

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 (448) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/dist/authority-surface.json +43 -23
  3. package/dist/build-identity.json +2 -2
  4. package/dist/core/daemon/capacity-publisher.d.ts +19 -0
  5. package/dist/core/daemon/capacity-publisher.js +49 -2
  6. package/dist/core/daemon/capacity-publisher.js.map +1 -1
  7. package/dist/core/daemon/overnight-status.d.ts +13 -0
  8. package/dist/core/daemon/overnight-status.js +93 -8
  9. package/dist/core/daemon/overnight-status.js.map +1 -1
  10. package/dist/core/fleet/dispatch-router.js +26 -9
  11. package/dist/core/fleet/dispatch-router.js.map +1 -1
  12. package/dist/core/fleet/fleet-runtime-journal.js +12 -5
  13. package/dist/core/fleet/fleet-runtime-journal.js.map +1 -1
  14. package/dist/core/fleet/fleet-types.d.ts +13 -0
  15. package/dist/core/routing/budget-store.js +11 -5
  16. package/dist/core/routing/budget-store.js.map +1 -1
  17. package/dist/core/routing/capacity-history-api.d.ts +30 -0
  18. package/dist/core/routing/capacity-history-api.js +147 -0
  19. package/dist/core/routing/capacity-history-api.js.map +1 -0
  20. package/dist/core/routing/capacity-history-types.d.ts +63 -0
  21. package/dist/core/routing/capacity-history-types.js +18 -0
  22. package/dist/core/routing/capacity-history-types.js.map +1 -0
  23. package/dist/core/routing/capacity-history.d.ts +130 -0
  24. package/dist/core/routing/capacity-history.js +654 -0
  25. package/dist/core/routing/capacity-history.js.map +1 -0
  26. package/dist/core/routing/headroom.d.ts +5 -1
  27. package/dist/core/routing/headroom.js +82 -41
  28. package/dist/core/routing/headroom.js.map +1 -1
  29. package/dist/core/routing/router.d.ts +8 -1
  30. package/dist/core/routing/router.js +49 -16
  31. package/dist/core/routing/router.js.map +1 -1
  32. package/dist/core/routing/seat-reasons.d.ts +35 -0
  33. package/dist/core/routing/seat-reasons.js +48 -0
  34. package/dist/core/routing/seat-reasons.js.map +1 -0
  35. package/dist/core/routing/types.d.ts +37 -0
  36. package/dist/core/routing/types.js.map +1 -1
  37. package/dist/core/verse/fleet-history-types.d.ts +12 -4
  38. package/dist/core/verse/fleet-history-types.js +4 -2
  39. package/dist/core/verse/fleet-history-types.js.map +1 -1
  40. package/dist/core/verse/fleet-live-api.d.ts +14 -1
  41. package/dist/core/verse/fleet-live-api.js +31 -11
  42. package/dist/core/verse/fleet-live-api.js.map +1 -1
  43. package/dist/core/verse/preferences.d.ts +3 -1
  44. package/dist/core/verse/preferences.js +5 -2
  45. package/dist/core/verse/preferences.js.map +1 -1
  46. package/dist/core/verse/types.d.ts +5 -1
  47. package/dist/core/verse/types.js.map +1 -1
  48. package/dist/core/verse/verse-api.js +2 -1
  49. package/dist/core/verse/verse-api.js.map +1 -1
  50. package/dist/core/web/public/next/assets/{ActionMenu-DhbNne-M.js → ActionMenu-BBB7VYjz.js} +2 -2
  51. package/dist/core/web/public/next/assets/{ActionMenu-DhbNne-M.js.map → ActionMenu-BBB7VYjz.js.map} +1 -1
  52. package/dist/core/web/public/next/assets/Advanced-Bywv_iYR.css +1 -0
  53. package/dist/core/web/public/next/assets/Advanced-xVYFAeA8.js +2 -0
  54. package/dist/core/web/public/next/assets/Advanced-xVYFAeA8.js.map +1 -0
  55. package/dist/core/web/public/next/assets/{App-DyBg1v_q.js → App-CbDCLAxn.js} +5 -5
  56. package/dist/core/web/public/next/assets/{App-DyBg1v_q.js.map → App-CbDCLAxn.js.map} +1 -1
  57. package/dist/core/web/public/next/assets/AppsSection-B5HWJi9I.js +2 -0
  58. package/dist/core/web/public/next/assets/AppsSection-B5HWJi9I.js.map +1 -0
  59. package/dist/core/web/public/next/assets/AreaTrend-BgnK0wAy.js +2 -0
  60. package/dist/core/web/public/next/assets/AreaTrend-BgnK0wAy.js.map +1 -0
  61. package/dist/core/web/public/next/assets/AutonomySection-BF5UCsMv.js +2 -0
  62. package/dist/core/web/public/next/assets/{AutonomySection-CoMngwNB.js.map → AutonomySection-BF5UCsMv.js.map} +1 -1
  63. package/dist/core/web/public/next/assets/BranchBar-BZNQ50YE.css +1 -0
  64. package/dist/core/web/public/next/assets/BranchBar-nfSb59Kv.js +2 -0
  65. package/dist/core/web/public/next/assets/BranchBar-nfSb59Kv.js.map +1 -0
  66. package/dist/core/web/public/next/assets/BudgetControl-BESM12dO.js +2 -0
  67. package/dist/core/web/public/next/assets/BudgetControl-BESM12dO.js.map +1 -0
  68. package/dist/core/web/public/next/assets/BurnDown-D1AfskPT.js +2 -0
  69. package/dist/core/web/public/next/assets/BurnDown-D1AfskPT.js.map +1 -0
  70. package/dist/core/web/public/next/assets/{Button-0-nNbv1h.js → Button-Cr_qkQEc.js} +2 -2
  71. package/dist/core/web/public/next/assets/{Button-0-nNbv1h.js.map → Button-Cr_qkQEc.js.map} +1 -1
  72. package/dist/core/web/public/next/assets/CapacityStrip-Cc28CyWk.css +1 -0
  73. package/dist/core/web/public/next/assets/CapacityStrip-DqqYnLek.js +2 -0
  74. package/dist/core/web/public/next/assets/CapacityStrip-DqqYnLek.js.map +1 -0
  75. package/dist/core/web/public/next/assets/ChatSection-DoqjyVoj.js +3 -0
  76. package/dist/core/web/public/next/assets/{ChatSection-B9cdRKUh.js.map → ChatSection-DoqjyVoj.js.map} +1 -1
  77. package/dist/core/web/public/next/assets/{CommandPalette-GpeCSrPy.js → CommandPalette-lLV-OR63.js} +2 -2
  78. package/dist/core/web/public/next/assets/{CommandPalette-GpeCSrPy.js.map → CommandPalette-lLV-OR63.js.map} +1 -1
  79. package/dist/core/web/public/next/assets/CommandSection-fiZ4DJpM.js +2 -0
  80. package/dist/core/web/public/next/assets/CommandSection-fiZ4DJpM.js.map +1 -0
  81. package/dist/core/web/public/next/assets/Composer-ByzxOJK6.css +1 -0
  82. package/dist/core/web/public/next/assets/Composer.module-C8U73KdQ.js +2 -0
  83. package/dist/core/web/public/next/assets/{Composer.module-DJMdrqNt.js.map → Composer.module-C8U73KdQ.js.map} +1 -1
  84. package/dist/core/web/public/next/assets/DiffPane-BAvvbBsf.css +1 -0
  85. package/dist/core/web/public/next/assets/DiffPane-BVxhK-cy.js +2 -0
  86. package/dist/core/web/public/next/assets/DiffPane-BVxhK-cy.js.map +1 -0
  87. package/dist/core/web/public/next/assets/{DiffViewer-tOGWk0CA.js → DiffViewer-yCdw9J-Y.js} +2 -2
  88. package/dist/core/web/public/next/assets/{DiffViewer-tOGWk0CA.js.map → DiffViewer-yCdw9J-Y.js.map} +1 -1
  89. package/dist/core/web/public/next/assets/DockHost-B4RaYOET.css +1 -0
  90. package/dist/core/web/public/next/assets/DockHost-BZReKwos.js +2 -0
  91. package/dist/core/web/public/next/assets/DockHost-BZReKwos.js.map +1 -0
  92. package/dist/core/web/public/next/assets/{EmptyState-DdJ4CxtO.js → EmptyState-D1GDxVZy.js} +2 -2
  93. package/dist/core/web/public/next/assets/{EmptyState-DdJ4CxtO.js.map → EmptyState-D1GDxVZy.js.map} +1 -1
  94. package/dist/core/web/public/next/assets/{Epistemic-BLjM5y_y.js → Epistemic-DRp4dBfB.js} +2 -2
  95. package/dist/core/web/public/next/assets/{Epistemic-BLjM5y_y.js.map → Epistemic-DRp4dBfB.js.map} +1 -1
  96. package/dist/core/web/public/next/assets/FleetSection-CFiWeOEs.css +1 -0
  97. package/dist/core/web/public/next/assets/FleetSection-rPLy_NPo.js +3 -0
  98. package/dist/core/web/public/next/assets/FleetSection-rPLy_NPo.js.map +1 -0
  99. package/dist/core/web/public/next/assets/Funnel-zvDj3He4.js +2 -0
  100. package/dist/core/web/public/next/assets/Funnel-zvDj3He4.js.map +1 -0
  101. package/dist/core/web/public/next/assets/GearTray-CkviqjYr.js +2 -0
  102. package/dist/core/web/public/next/assets/GearTray-CkviqjYr.js.map +1 -0
  103. package/dist/core/web/public/next/assets/GrowthSection-Bg5sW0jI.js +2 -0
  104. package/dist/core/web/public/next/assets/GrowthSection-Bg5sW0jI.js.map +1 -0
  105. package/dist/core/web/public/next/assets/HandoffDialog-DcPj1ri9.js +2 -0
  106. package/dist/core/web/public/next/assets/HandoffDialog-DcPj1ri9.js.map +1 -0
  107. package/dist/core/web/public/next/assets/{Input-CTu0CycC.js → Input-Ci7TD96x.js} +2 -2
  108. package/dist/core/web/public/next/assets/{Input-CTu0CycC.js.map → Input-Ci7TD96x.js.map} +1 -1
  109. package/dist/core/web/public/next/assets/{LeaderCard-BuSDeATv.js → LeaderCard-BSFTlMRF.js} +2 -2
  110. package/dist/core/web/public/next/assets/{LeaderCard-BuSDeATv.js.map → LeaderCard-BSFTlMRF.js.map} +1 -1
  111. package/dist/core/web/public/next/assets/{MatrixHeatmap-9dKgJ_pT.css → MatrixHeatmap-Bmnvo1l1.css} +1 -1
  112. package/dist/core/web/public/next/assets/MatrixHeatmap-DojKZe9L.js +2 -0
  113. package/dist/core/web/public/next/assets/MatrixHeatmap-DojKZe9L.js.map +1 -0
  114. package/dist/core/web/public/next/assets/McpSection-CvcYu1X_.js +2 -0
  115. package/dist/core/web/public/next/assets/{McpSection-1UncWBpW.js.map → McpSection-CvcYu1X_.js.map} +1 -1
  116. package/dist/core/web/public/next/assets/MessageMarkdown-BrLCrb73.js +3 -0
  117. package/dist/core/web/public/next/assets/{MessageMarkdown-C4pl9LI5.js.map → MessageMarkdown-BrLCrb73.js.map} +1 -1
  118. package/dist/core/web/public/next/assets/MessageMarkdown-Cgh5f1-Q.css +1 -0
  119. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-CZsF77ZM.js → MessageMarkdownRenderer-CjmdBw2p.js} +2 -2
  120. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-CZsF77ZM.js.map → MessageMarkdownRenderer-CjmdBw2p.js.map} +1 -1
  121. package/dist/core/web/public/next/assets/{Meter-C18ciKz4.js → Meter-DTHbmhQg.js} +2 -2
  122. package/dist/core/web/public/next/assets/{Meter-C18ciKz4.js.map → Meter-DTHbmhQg.js.map} +1 -1
  123. package/dist/core/web/public/next/assets/MindSection-DcO9fmYe.js +2 -0
  124. package/dist/core/web/public/next/assets/MindSection-DcO9fmYe.js.map +1 -0
  125. package/dist/core/web/public/next/assets/MutationTokenDialog-Cqn2uPV6.js +2 -0
  126. package/dist/core/web/public/next/assets/MutationTokenDialog-Cqn2uPV6.js.map +1 -0
  127. package/dist/core/web/public/next/assets/NeedsYouDrawer-BpvidnM2.css +1 -0
  128. package/dist/core/web/public/next/assets/NeedsYouDrawer-hiTINupk.js +2 -0
  129. package/dist/core/web/public/next/assets/NeedsYouDrawer-hiTINupk.js.map +1 -0
  130. package/dist/core/web/public/next/assets/NeedsYouList-B4Z37Phx.js +2 -0
  131. package/dist/core/web/public/next/assets/NeedsYouList-B4Z37Phx.js.map +1 -0
  132. package/dist/core/web/public/next/assets/NeedsYouList-CruOt4JT.css +1 -0
  133. package/dist/core/web/public/next/assets/NewChatDialog-utSckh7C.js +3 -0
  134. package/dist/core/web/public/next/assets/{NewChatDialog-B_BsS9pr.js.map → NewChatDialog-utSckh7C.js.map} +1 -1
  135. package/dist/core/web/public/next/assets/OnboardingFlow-7N3YSUHN.js +2 -0
  136. package/dist/core/web/public/next/assets/{OnboardingFlow-CtCPpgoX.js.map → OnboardingFlow-7N3YSUHN.js.map} +1 -1
  137. package/dist/core/web/public/next/assets/PreviewPane-CqzkaAjG.js +2 -0
  138. package/dist/core/web/public/next/assets/PreviewPane-CqzkaAjG.js.map +1 -0
  139. package/dist/core/web/public/next/assets/PreviewPane-DoMsJSG3.css +1 -0
  140. package/dist/core/web/public/next/assets/RailStatus-sZhApA8k.js +2 -0
  141. package/dist/core/web/public/next/assets/RailStatus-sZhApA8k.js.map +1 -0
  142. package/dist/core/web/public/next/assets/{RefreshIndicator-CnhEovMZ.js → RefreshIndicator-C1uQIegT.js} +2 -2
  143. package/dist/core/web/public/next/assets/{RefreshIndicator-CnhEovMZ.js.map → RefreshIndicator-C1uQIegT.js.map} +1 -1
  144. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-28gLwmwV.js → ResourcePoolConsoleApp-DXjjV6Sh.js} +4 -4
  145. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-28gLwmwV.js.map → ResourcePoolConsoleApp-DXjjV6Sh.js.map} +1 -1
  146. package/dist/core/web/public/next/assets/{RouteErrorBoundary-AyUPCIb3.js → RouteErrorBoundary-D1LZxQjN.js} +2 -2
  147. package/dist/core/web/public/next/assets/{RouteErrorBoundary-AyUPCIb3.js.map → RouteErrorBoundary-D1LZxQjN.js.map} +1 -1
  148. package/dist/core/web/public/next/assets/SeatSelector-CT92PqM_.js +3 -0
  149. package/dist/core/web/public/next/assets/{SeatSelector-DaUO-zoK.js.map → SeatSelector-CT92PqM_.js.map} +1 -1
  150. package/dist/core/web/public/next/assets/{Segmented-B_8c_83S.js → Segmented-BMvq-FfD.js} +2 -2
  151. package/dist/core/web/public/next/assets/{Segmented-B_8c_83S.js.map → Segmented-BMvq-FfD.js.map} +1 -1
  152. package/dist/core/web/public/next/assets/{Select-Bl5g5Dt_.js → Select-DkdeoSQn.js} +2 -2
  153. package/dist/core/web/public/next/assets/{Select-Bl5g5Dt_.js.map → Select-DkdeoSQn.js.map} +1 -1
  154. package/dist/core/web/public/next/assets/{SessionInsightChip-w0I21q0c.js → SessionInsightChip-CwlakUYU.js} +2 -2
  155. package/dist/core/web/public/next/assets/{SessionInsightChip-w0I21q0c.js.map → SessionInsightChip-CwlakUYU.js.map} +1 -1
  156. package/dist/core/web/public/next/assets/SessionSearch-DFByh2NZ.js +2 -0
  157. package/dist/core/web/public/next/assets/{SessionSearch-B5aQ0BCM.js.map → SessionSearch-DFByh2NZ.js.map} +1 -1
  158. package/dist/core/web/public/next/assets/SettingsSection-DgSaHFK4.js +2 -0
  159. package/dist/core/web/public/next/assets/SettingsSection-DgSaHFK4.js.map +1 -0
  160. package/dist/core/web/public/next/assets/{Sheet-CVjk-cLI.js → Sheet-C7APkGPt.js} +2 -2
  161. package/dist/core/web/public/next/assets/{Sheet-CVjk-cLI.js.map → Sheet-C7APkGPt.js.map} +1 -1
  162. package/dist/core/web/public/next/assets/{ShortcutsOverlay-BiBjnBcc.js → ShortcutsOverlay-ZPyXUS_I.js} +2 -2
  163. package/dist/core/web/public/next/assets/{ShortcutsOverlay-BiBjnBcc.js.map → ShortcutsOverlay-ZPyXUS_I.js.map} +1 -1
  164. package/dist/core/web/public/next/assets/Sidebar-BRc1vGDF.css +1 -0
  165. package/dist/core/web/public/next/assets/Sidebar-Chsgazmk.js +3 -0
  166. package/dist/core/web/public/next/assets/Sidebar-Chsgazmk.js.map +1 -0
  167. package/dist/core/web/public/next/assets/{Slider-BS9MU5ZV.js → Slider-B0kjW7cd.js} +2 -2
  168. package/dist/core/web/public/next/assets/{Slider-BS9MU5ZV.js.map → Slider-B0kjW7cd.js.map} +1 -1
  169. package/dist/core/web/public/next/assets/{StatusBadge-DAf-ArKE.js → StatusBadge-wv4e6f8b.js} +2 -2
  170. package/dist/core/web/public/next/assets/{StatusBadge-DAf-ArKE.js.map → StatusBadge-wv4e6f8b.js.map} +1 -1
  171. package/dist/core/web/public/next/assets/StepBand-Db8WPw8J.js +2 -0
  172. package/dist/core/web/public/next/assets/StepBand-Db8WPw8J.js.map +1 -0
  173. package/dist/core/web/public/next/assets/{Surface-CiYOdNKQ.js → Surface-BkDrQ4t3.js} +2 -2
  174. package/dist/core/web/public/next/assets/{Surface-CiYOdNKQ.js.map → Surface-BkDrQ4t3.js.map} +1 -1
  175. package/dist/core/web/public/next/assets/Swimlane-Dcve56cP.js +2 -0
  176. package/dist/core/web/public/next/assets/Swimlane-Dcve56cP.js.map +1 -0
  177. package/dist/core/web/public/next/assets/{Switch-BzRXtNPt.js → Switch-DamlpSMY.js} +2 -2
  178. package/dist/core/web/public/next/assets/{Switch-BzRXtNPt.js.map → Switch-DamlpSMY.js.map} +1 -1
  179. package/dist/core/web/public/next/assets/{Tag-DEEbDz7T.js → Tag-Cs4tudBN.js} +2 -2
  180. package/dist/core/web/public/next/assets/{Tag-DEEbDz7T.js.map → Tag-Cs4tudBN.js.map} +1 -1
  181. package/dist/core/web/public/next/assets/TerminalPane-BDkKFych.js +7 -0
  182. package/dist/core/web/public/next/assets/TerminalPane-BDkKFych.js.map +1 -0
  183. package/dist/core/web/public/next/assets/TerminalPane-BwfMbnJz.css +1 -0
  184. package/dist/core/web/public/next/assets/UniverseConsoleApp-BE72VyBL.js +2 -0
  185. package/dist/core/web/public/next/assets/{UniverseConsoleApp-DKqAf-eD.js.map → UniverseConsoleApp-BE72VyBL.js.map} +1 -1
  186. package/dist/core/web/public/next/assets/{UniverseView-D6081LQL.js → UniverseView-BbmYY2P4.js} +2 -2
  187. package/dist/core/web/public/next/assets/{UniverseView-D6081LQL.js.map → UniverseView-BbmYY2P4.js.map} +1 -1
  188. package/dist/core/web/public/next/assets/UsageSection-DsB-Jqyl.css +1 -0
  189. package/dist/core/web/public/next/assets/UsageSection-DsC5WmLk.js +2 -0
  190. package/dist/core/web/public/next/assets/UsageSection-DsC5WmLk.js.map +1 -0
  191. package/dist/core/web/public/next/assets/VerseConsoleApp-CXJWDiEM.css +1 -0
  192. package/dist/core/web/public/next/assets/VerseConsoleApp-Dq_hREXs.js +3 -0
  193. package/dist/core/web/public/next/assets/VerseConsoleApp-Dq_hREXs.js.map +1 -0
  194. package/dist/core/web/public/next/assets/Workspace-BYW9dm90.css +1 -0
  195. package/dist/core/web/public/next/assets/Workspace-CKvVEPFq.js +10 -0
  196. package/dist/core/web/public/next/assets/Workspace-CKvVEPFq.js.map +1 -0
  197. package/dist/core/web/public/next/assets/actions-BnjZy8a-.js +2 -0
  198. package/dist/core/web/public/next/assets/actions-BnjZy8a-.js.map +1 -0
  199. package/dist/core/web/public/next/assets/actions-Ddfg2iLl.css +1 -0
  200. package/dist/core/web/public/next/assets/{budget-queries-Dacv1VYP.js → budget-queries-Cp6vO7FH.js} +2 -2
  201. package/dist/core/web/public/next/assets/{budget-queries-Dacv1VYP.js.map → budget-queries-Cp6vO7FH.js.map} +1 -1
  202. package/dist/core/web/public/next/assets/calendar-day-BxBYHfX1.js +2 -0
  203. package/dist/core/web/public/next/assets/calendar-day-BxBYHfX1.js.map +1 -0
  204. package/dist/core/web/public/next/assets/capacity-strip-model-9-Yb211u.js +2 -0
  205. package/dist/core/web/public/next/assets/capacity-strip-model-9-Yb211u.js.map +1 -0
  206. package/dist/core/web/public/next/assets/charts-BmbKhjqw.js +2 -0
  207. package/dist/core/web/public/next/assets/charts-BmbKhjqw.js.map +1 -0
  208. package/dist/core/web/public/next/assets/colors-BZ3a9wFf.js +2 -0
  209. package/dist/core/web/public/next/assets/colors-BZ3a9wFf.js.map +1 -0
  210. package/dist/core/web/public/next/assets/{command-bus-CpYuam1F.js → command-bus-DHJJLWh8.js} +2 -2
  211. package/dist/core/web/public/next/assets/{command-bus-CpYuam1F.js.map → command-bus-DHJJLWh8.js.map} +1 -1
  212. package/dist/core/web/public/next/assets/context-model-BGznyHNQ.js +2 -0
  213. package/dist/core/web/public/next/assets/context-model-BGznyHNQ.js.map +1 -0
  214. package/dist/core/web/public/next/assets/context-model-DeJ28uSZ.js +2 -0
  215. package/dist/core/web/public/next/assets/context-model-DeJ28uSZ.js.map +1 -0
  216. package/dist/core/web/public/next/assets/context-queries-_mEgy4eg.js +2 -0
  217. package/dist/core/web/public/next/assets/context-queries-_mEgy4eg.js.map +1 -0
  218. package/dist/core/web/public/next/assets/context.module-BijAfoJw.js +2 -0
  219. package/dist/core/web/public/next/assets/context.module-BijAfoJw.js.map +1 -0
  220. package/dist/core/web/public/next/assets/{control-queries-BGjarMm9.js → control-queries-C4TG8blN.js} +2 -2
  221. package/dist/core/web/public/next/assets/{control-queries-BGjarMm9.js.map → control-queries-C4TG8blN.js.map} +1 -1
  222. package/dist/core/web/public/next/assets/dark-since-DOMvtB_G.js +2 -0
  223. package/dist/core/web/public/next/assets/dark-since-DOMvtB_G.js.map +1 -0
  224. package/dist/core/web/public/next/assets/dock-icons-BB7Fi6hT.js +2 -0
  225. package/dist/core/web/public/next/assets/dock-icons-BB7Fi6hT.js.map +1 -0
  226. package/dist/core/web/public/next/assets/dock-panes-mnIwSpRp.js +2 -0
  227. package/dist/core/web/public/next/assets/{dock-panes-BNTLvX7G.js.map → dock-panes-mnIwSpRp.js.map} +1 -1
  228. package/dist/core/web/public/next/assets/{dock-store-_E5h6TEq.js → dock-store-CdHQRP8s.js} +2 -2
  229. package/dist/core/web/public/next/assets/{dock-store-_E5h6TEq.js.map → dock-store-CdHQRP8s.js.map} +1 -1
  230. package/dist/core/web/public/next/assets/fleet-model-B4FKC7fH.js +2 -0
  231. package/dist/core/web/public/next/assets/fleet-model-B4FKC7fH.js.map +1 -0
  232. package/dist/core/web/public/next/assets/format-DKrNjdwD.js +2 -0
  233. package/dist/core/web/public/next/assets/format-DKrNjdwD.js.map +1 -0
  234. package/dist/core/web/public/next/assets/format-lW58rL2y.js +2 -0
  235. package/dist/core/web/public/next/assets/format-lW58rL2y.js.map +1 -0
  236. package/dist/core/web/public/next/assets/{git-model-5v5xGobf.js → git-model-DaGw1SzS.js} +2 -2
  237. package/dist/core/web/public/next/assets/{git-model-5v5xGobf.js.map → git-model-DaGw1SzS.js.map} +1 -1
  238. package/dist/core/web/public/next/assets/global-DG1fmn4y.js +2 -0
  239. package/dist/core/web/public/next/assets/global-DG1fmn4y.js.map +1 -0
  240. package/dist/core/web/public/next/assets/{guarded-action-vOPc8v75.js → guarded-action--lguLXfz.js} +2 -2
  241. package/dist/core/web/public/next/assets/{guarded-action-vOPc8v75.js.map → guarded-action--lguLXfz.js.map} +1 -1
  242. package/dist/core/web/public/next/assets/{icons-DWb24OA6.js → icons-YPgbel-I.js} +2 -2
  243. package/dist/core/web/public/next/assets/{icons-DWb24OA6.js.map → icons-YPgbel-I.js.map} +1 -1
  244. package/dist/core/web/public/next/assets/{index-afDA8cwW.js → index-Dk8R-3a7.js} +3 -3
  245. package/dist/core/web/public/next/assets/{index-afDA8cwW.js.map → index-Dk8R-3a7.js.map} +1 -1
  246. package/dist/core/web/public/next/assets/live-model-44wEU6I8.js +2 -0
  247. package/dist/core/web/public/next/assets/live-model-44wEU6I8.js.map +1 -0
  248. package/dist/core/web/public/next/assets/mind-B9PzLcl0.css +1 -0
  249. package/dist/core/web/public/next/assets/mind.module-BOABBdi_.js +2 -0
  250. package/dist/core/web/public/next/assets/mind.module-BOABBdi_.js.map +1 -0
  251. package/dist/core/web/public/next/assets/mutations-DjXM3IDg.js +2 -0
  252. package/dist/core/web/public/next/assets/{mutations-C6E10SPX.js.map → mutations-DjXM3IDg.js.map} +1 -1
  253. package/dist/core/web/public/next/assets/{overnight-queries-CCGfiS-g.js → overnight-queries-Be_eossf.js} +2 -2
  254. package/dist/core/web/public/next/assets/{overnight-queries-CCGfiS-g.js.map → overnight-queries-Be_eossf.js.map} +1 -1
  255. package/dist/core/web/public/next/assets/pane-chrome-8JmEhHVD.css +1 -0
  256. package/dist/core/web/public/next/assets/pane-chrome.module-D7o-fVd0.js +2 -0
  257. package/dist/core/web/public/next/assets/pane-chrome.module-D7o-fVd0.js.map +1 -0
  258. package/dist/core/web/public/next/assets/primitives-Dl3SEQvh.js +1 -0
  259. package/dist/core/web/public/next/assets/{queries-BuYIEHst.js → queries-CYEVCq5r.js} +2 -2
  260. package/dist/core/web/public/next/assets/{queries-BuYIEHst.js.map → queries-CYEVCq5r.js.map} +1 -1
  261. package/dist/core/web/public/next/assets/{reasoning-pref-BVzGczV7.js → reasoning-pref-a_ZP6GzU.js} +2 -2
  262. package/dist/core/web/public/next/assets/{reasoning-pref-BVzGczV7.js.map → reasoning-pref-a_ZP6GzU.js.map} +1 -1
  263. package/dist/core/web/public/next/assets/seat-subscription-CRigL-GE.js +2 -0
  264. package/dist/core/web/public/next/assets/seat-subscription-CRigL-GE.js.map +1 -0
  265. package/dist/core/web/public/next/assets/{section-visibility-CSrsTcwK.js → section-visibility-u7q-Q9AA.js} +2 -2
  266. package/dist/core/web/public/next/assets/{section-visibility-CSrsTcwK.js.map → section-visibility-u7q-Q9AA.js.map} +1 -1
  267. package/dist/core/web/public/next/assets/{sidebar-model-C8fyqSQY.js → sidebar-model-i4WRuQ6j.js} +2 -2
  268. package/dist/core/web/public/next/assets/{sidebar-model-C8fyqSQY.js.map → sidebar-model-i4WRuQ6j.js.map} +1 -1
  269. package/dist/core/web/public/next/assets/slots-CV9ZuLQU.js +3 -0
  270. package/dist/core/web/public/next/assets/{slots-W8gkmdfE.js.map → slots-CV9ZuLQU.js.map} +1 -1
  271. package/dist/core/web/public/next/assets/surface-data-DLvmUX9z.js +2 -0
  272. package/dist/core/web/public/next/assets/surface-data-DLvmUX9z.js.map +1 -0
  273. package/dist/core/web/public/next/assets/surface-prefetch-Ct2JwXvL.js +2 -0
  274. package/dist/core/web/public/next/assets/surface-prefetch-Ct2JwXvL.js.map +1 -0
  275. package/dist/core/web/public/next/assets/tasks-model-DWs5u9RO.js +2 -0
  276. package/dist/core/web/public/next/assets/{tasks-model-CnYQzgxk.js.map → tasks-model-DWs5u9RO.js.map} +1 -1
  277. package/dist/core/web/public/next/assets/{terminal-icons-CxUYaWX9.js → terminal-icons-Ct9cZsEK.js} +2 -2
  278. package/dist/core/web/public/next/assets/{terminal-icons-CxUYaWX9.js.map → terminal-icons-Ct9cZsEK.js.map} +1 -1
  279. package/dist/core/web/public/next/assets/{tool-semantics-CTRuLF5j.js → tool-semantics-GX8ScuSH.js} +2 -2
  280. package/dist/core/web/public/next/assets/{tool-semantics-CTRuLF5j.js.map → tool-semantics-GX8ScuSH.js.map} +1 -1
  281. package/dist/core/web/public/next/assets/{turn-files-BvB5LLNw.js → turn-files-BPHQzYuH.js} +2 -2
  282. package/dist/core/web/public/next/assets/{turn-files-BvB5LLNw.js.map → turn-files-BPHQzYuH.js.map} +1 -1
  283. package/dist/core/web/public/next/assets/{usage-queries-CQOpeE1H.js → usage-queries-CI_y9oWZ.js} +2 -2
  284. package/dist/core/web/public/next/assets/{usage-queries-CQOpeE1H.js.map → usage-queries-CI_y9oWZ.js.map} +1 -1
  285. package/dist/core/web/public/next/assets/use-guarded-action-DVCtLzSo.js +2 -0
  286. package/dist/core/web/public/next/assets/use-guarded-action-DVCtLzSo.js.map +1 -0
  287. package/dist/core/web/public/next/assets/{use-ticker-hryPXnyp.js → use-ticker-C3LQ2IYs.js} +2 -2
  288. package/dist/core/web/public/next/assets/{use-ticker-hryPXnyp.js.map → use-ticker-C3LQ2IYs.js.map} +1 -1
  289. package/dist/core/web/public/next/assets/use-token-gate-B5gOFkeH.js +2 -0
  290. package/dist/core/web/public/next/assets/use-token-gate-B5gOFkeH.js.map +1 -0
  291. package/dist/core/web/public/next/assets/{useActivity-Cg_9-7nt.js → useActivity-C3R1Sudh.js} +2 -2
  292. package/dist/core/web/public/next/assets/{useActivity-Cg_9-7nt.js.map → useActivity-C3R1Sudh.js.map} +1 -1
  293. package/dist/core/web/public/next/assets/useChartWidth-0APW0BR3.js +2 -0
  294. package/dist/core/web/public/next/assets/useChartWidth-0APW0BR3.js.map +1 -0
  295. package/dist/core/web/public/next/assets/useChartWidth-BAtVgn2n.css +1 -0
  296. package/dist/core/web/public/next/assets/{useSeatsRefresh-4Ov9eT1F.js → useSeatsRefresh-BN8bso-n.js} +2 -2
  297. package/dist/core/web/public/next/assets/{useSeatsRefresh-4Ov9eT1F.js.map → useSeatsRefresh-BN8bso-n.js.map} +1 -1
  298. package/dist/core/web/public/next/assets/verse-model-yHPwjf-7.js +2 -0
  299. package/dist/core/web/public/next/assets/verse-model-yHPwjf-7.js.map +1 -0
  300. package/dist/core/web/public/next/assets/{verse-queries-BjQoOTwv.js → verse-queries-2PxoBISm.js} +2 -2
  301. package/dist/core/web/public/next/assets/{verse-queries-BjQoOTwv.js.map → verse-queries-2PxoBISm.js.map} +1 -1
  302. package/dist/core/web/public/next/assets/verse-store-DHTuZpYa.js +3 -0
  303. package/dist/core/web/public/next/assets/verse-store-DHTuZpYa.js.map +1 -0
  304. package/dist/core/web/public/next/assets/verse-ui-store-Dy4HuDBV.js +3 -0
  305. package/dist/core/web/public/next/assets/{verse-ui-store-KTTKfv-T.js.map → verse-ui-store-Dy4HuDBV.js.map} +1 -1
  306. package/dist/core/web/public/next/assets/{viewport-ZB86jdES.js → viewport-DDoJ_xVq.js} +2 -2
  307. package/dist/core/web/public/next/assets/{viewport-ZB86jdES.js.map → viewport-DDoJ_xVq.js.map} +1 -1
  308. package/dist/core/web/public/next/assets/warmup-BsL2LdR-.js +3 -0
  309. package/dist/core/web/public/next/assets/warmup-BsL2LdR-.js.map +1 -0
  310. package/dist/core/web/public/next/assets/{workspace-model-4hq_Mv3N.js → workspace-model-Dd3LmIym.js} +2 -2
  311. package/dist/core/web/public/next/assets/{workspace-model-4hq_Mv3N.js.map → workspace-model-Dd3LmIym.js.map} +1 -1
  312. package/dist/core/web/public/next/index.html +1 -1
  313. package/dist/release-dependency-inventory.json +1 -1
  314. package/package.json +1 -1
  315. package/dist/core/web/public/next/assets/Advanced-CHjxJt2z.css +0 -1
  316. package/dist/core/web/public/next/assets/Advanced-DM0DYibH.js +0 -2
  317. package/dist/core/web/public/next/assets/Advanced-DM0DYibH.js.map +0 -1
  318. package/dist/core/web/public/next/assets/AppsSection-CXxbfPJQ.js +0 -2
  319. package/dist/core/web/public/next/assets/AppsSection-CXxbfPJQ.js.map +0 -1
  320. package/dist/core/web/public/next/assets/AreaTrend-gUVXkfhf.js +0 -2
  321. package/dist/core/web/public/next/assets/AreaTrend-gUVXkfhf.js.map +0 -1
  322. package/dist/core/web/public/next/assets/AutonomySection-CoMngwNB.js +0 -2
  323. package/dist/core/web/public/next/assets/BranchBar-C-NovaXr.js +0 -2
  324. package/dist/core/web/public/next/assets/BranchBar-C-NovaXr.js.map +0 -1
  325. package/dist/core/web/public/next/assets/BranchBar-C9BpPVLr.css +0 -1
  326. package/dist/core/web/public/next/assets/BudgetControl-P5lMxHvQ.js +0 -2
  327. package/dist/core/web/public/next/assets/BudgetControl-P5lMxHvQ.js.map +0 -1
  328. package/dist/core/web/public/next/assets/BurnDown-4P1LDoCL.js +0 -2
  329. package/dist/core/web/public/next/assets/BurnDown-4P1LDoCL.js.map +0 -1
  330. package/dist/core/web/public/next/assets/CapacityStrip-D6Yyg4a1.js +0 -2
  331. package/dist/core/web/public/next/assets/CapacityStrip-D6Yyg4a1.js.map +0 -1
  332. package/dist/core/web/public/next/assets/CapacityStrip-wgFP9MUA.css +0 -1
  333. package/dist/core/web/public/next/assets/ChatSection-B9cdRKUh.js +0 -3
  334. package/dist/core/web/public/next/assets/CommandSection-BC0uXim_.js +0 -2
  335. package/dist/core/web/public/next/assets/CommandSection-BC0uXim_.js.map +0 -1
  336. package/dist/core/web/public/next/assets/Composer-CkcwbQhG.css +0 -1
  337. package/dist/core/web/public/next/assets/Composer.module-DJMdrqNt.js +0 -2
  338. package/dist/core/web/public/next/assets/DiffPane-5uLKa0au.js +0 -2
  339. package/dist/core/web/public/next/assets/DiffPane-5uLKa0au.js.map +0 -1
  340. package/dist/core/web/public/next/assets/DiffPane-Csboxnn0.css +0 -1
  341. package/dist/core/web/public/next/assets/DockHost-BGnTgdIb.css +0 -1
  342. package/dist/core/web/public/next/assets/DockHost-CBV_6Ehi.js +0 -2
  343. package/dist/core/web/public/next/assets/DockHost-CBV_6Ehi.js.map +0 -1
  344. package/dist/core/web/public/next/assets/FleetSection-DuJcQCGg.js +0 -3
  345. package/dist/core/web/public/next/assets/FleetSection-DuJcQCGg.js.map +0 -1
  346. package/dist/core/web/public/next/assets/FleetSection-w9AjqfTR.css +0 -1
  347. package/dist/core/web/public/next/assets/Funnel-qX3Hlbce.js +0 -2
  348. package/dist/core/web/public/next/assets/Funnel-qX3Hlbce.js.map +0 -1
  349. package/dist/core/web/public/next/assets/GearTray-kVGP1coG.js +0 -2
  350. package/dist/core/web/public/next/assets/GearTray-kVGP1coG.js.map +0 -1
  351. package/dist/core/web/public/next/assets/GrowthSection-CYxJ9MH5.js +0 -2
  352. package/dist/core/web/public/next/assets/GrowthSection-CYxJ9MH5.js.map +0 -1
  353. package/dist/core/web/public/next/assets/HandoffDialog-DHZo3Ev0.js +0 -2
  354. package/dist/core/web/public/next/assets/HandoffDialog-DHZo3Ev0.js.map +0 -1
  355. package/dist/core/web/public/next/assets/MatrixHeatmap-B_JWCjZx.js +0 -2
  356. package/dist/core/web/public/next/assets/MatrixHeatmap-B_JWCjZx.js.map +0 -1
  357. package/dist/core/web/public/next/assets/McpSection-1UncWBpW.js +0 -2
  358. package/dist/core/web/public/next/assets/MessageMarkdown-C4pl9LI5.js +0 -3
  359. package/dist/core/web/public/next/assets/MessageMarkdown-Czcl3L_Q.css +0 -1
  360. package/dist/core/web/public/next/assets/MindSection-C3fCw_fD.js +0 -2
  361. package/dist/core/web/public/next/assets/MindSection-C3fCw_fD.js.map +0 -1
  362. package/dist/core/web/public/next/assets/MutationTokenDialog-Dn0tzCrh.js +0 -2
  363. package/dist/core/web/public/next/assets/MutationTokenDialog-Dn0tzCrh.js.map +0 -1
  364. package/dist/core/web/public/next/assets/NeedsYouDrawer-CuNYJCJ0.js +0 -2
  365. package/dist/core/web/public/next/assets/NeedsYouDrawer-CuNYJCJ0.js.map +0 -1
  366. package/dist/core/web/public/next/assets/NeedsYouDrawer-SkhvvdLb.css +0 -1
  367. package/dist/core/web/public/next/assets/NewChatDialog-B_BsS9pr.js +0 -3
  368. package/dist/core/web/public/next/assets/OnboardingFlow-CtCPpgoX.js +0 -2
  369. package/dist/core/web/public/next/assets/PreviewPane-Cx6RRwzM.js +0 -2
  370. package/dist/core/web/public/next/assets/PreviewPane-Cx6RRwzM.js.map +0 -1
  371. package/dist/core/web/public/next/assets/PreviewPane-WQJFjSXe.css +0 -1
  372. package/dist/core/web/public/next/assets/RailStatus-BWs6xevj.js +0 -2
  373. package/dist/core/web/public/next/assets/RailStatus-BWs6xevj.js.map +0 -1
  374. package/dist/core/web/public/next/assets/SeatSelector-DaUO-zoK.js +0 -3
  375. package/dist/core/web/public/next/assets/SessionSearch-B5aQ0BCM.js +0 -2
  376. package/dist/core/web/public/next/assets/SettingsSection-CuESA30a.js +0 -2
  377. package/dist/core/web/public/next/assets/SettingsSection-CuESA30a.js.map +0 -1
  378. package/dist/core/web/public/next/assets/Sidebar-DfD8MNZt.css +0 -1
  379. package/dist/core/web/public/next/assets/Sidebar-q11dtYZf.js +0 -3
  380. package/dist/core/web/public/next/assets/Sidebar-q11dtYZf.js.map +0 -1
  381. package/dist/core/web/public/next/assets/StepBand-B1W7rU70.js +0 -2
  382. package/dist/core/web/public/next/assets/StepBand-B1W7rU70.js.map +0 -1
  383. package/dist/core/web/public/next/assets/Swimlane-BR40WVcj.js +0 -2
  384. package/dist/core/web/public/next/assets/Swimlane-BR40WVcj.js.map +0 -1
  385. package/dist/core/web/public/next/assets/TerminalPane-CPKUTD9K.js +0 -7
  386. package/dist/core/web/public/next/assets/TerminalPane-CPKUTD9K.js.map +0 -1
  387. package/dist/core/web/public/next/assets/TerminalPane-CmE2QL-Q.css +0 -1
  388. package/dist/core/web/public/next/assets/UniverseConsoleApp-DKqAf-eD.js +0 -2
  389. package/dist/core/web/public/next/assets/UsageSection-B6fR3cru.js +0 -2
  390. package/dist/core/web/public/next/assets/UsageSection-B6fR3cru.js.map +0 -1
  391. package/dist/core/web/public/next/assets/UsageSection-DwgNOYvi.css +0 -1
  392. package/dist/core/web/public/next/assets/VerseConsoleApp-C0V221WL.css +0 -1
  393. package/dist/core/web/public/next/assets/VerseConsoleApp-bjARLPwN.js +0 -3
  394. package/dist/core/web/public/next/assets/VerseConsoleApp-bjARLPwN.js.map +0 -1
  395. package/dist/core/web/public/next/assets/Workspace-DQXMVDf7.css +0 -1
  396. package/dist/core/web/public/next/assets/Workspace-DtJb5tiM.js +0 -10
  397. package/dist/core/web/public/next/assets/Workspace-DtJb5tiM.js.map +0 -1
  398. package/dist/core/web/public/next/assets/actions-Bszsdpms.js +0 -2
  399. package/dist/core/web/public/next/assets/actions-Bszsdpms.js.map +0 -1
  400. package/dist/core/web/public/next/assets/actions-Dug8YIf0.css +0 -1
  401. package/dist/core/web/public/next/assets/capacity-strip-model-BR539Ci8.js +0 -2
  402. package/dist/core/web/public/next/assets/capacity-strip-model-BR539Ci8.js.map +0 -1
  403. package/dist/core/web/public/next/assets/charts-D4NaLaXA.js +0 -2
  404. package/dist/core/web/public/next/assets/charts-D4NaLaXA.js.map +0 -1
  405. package/dist/core/web/public/next/assets/colors-B-vHsX1S.js +0 -2
  406. package/dist/core/web/public/next/assets/colors-B-vHsX1S.js.map +0 -1
  407. package/dist/core/web/public/next/assets/context-model-Bto3LZn2.js +0 -2
  408. package/dist/core/web/public/next/assets/context-model-Bto3LZn2.js.map +0 -1
  409. package/dist/core/web/public/next/assets/context-queries-DVdSLrYy.js +0 -2
  410. package/dist/core/web/public/next/assets/context-queries-DVdSLrYy.js.map +0 -1
  411. package/dist/core/web/public/next/assets/context.module-B_k02HNU.js +0 -2
  412. package/dist/core/web/public/next/assets/context.module-B_k02HNU.js.map +0 -1
  413. package/dist/core/web/public/next/assets/dock-icons-oG8d7mNZ.js +0 -2
  414. package/dist/core/web/public/next/assets/dock-icons-oG8d7mNZ.js.map +0 -1
  415. package/dist/core/web/public/next/assets/dock-panes-BNTLvX7G.js +0 -2
  416. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js +0 -2
  417. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js.map +0 -1
  418. package/dist/core/web/public/next/assets/format-BNYWGJat.js +0 -2
  419. package/dist/core/web/public/next/assets/format-BNYWGJat.js.map +0 -1
  420. package/dist/core/web/public/next/assets/global-DVgMguLr.js +0 -2
  421. package/dist/core/web/public/next/assets/global-DVgMguLr.js.map +0 -1
  422. package/dist/core/web/public/next/assets/live-model-Dm6ITHvX.js +0 -2
  423. package/dist/core/web/public/next/assets/live-model-Dm6ITHvX.js.map +0 -1
  424. package/dist/core/web/public/next/assets/mind-B-lYfSUJ.css +0 -1
  425. package/dist/core/web/public/next/assets/mind.module-BzhAlg3e.js +0 -2
  426. package/dist/core/web/public/next/assets/mind.module-BzhAlg3e.js.map +0 -1
  427. package/dist/core/web/public/next/assets/mutations-C6E10SPX.js +0 -2
  428. package/dist/core/web/public/next/assets/primitives-DQvYikjm.js +0 -1
  429. package/dist/core/web/public/next/assets/seat-subscription-CrWOV4Qc.js +0 -2
  430. package/dist/core/web/public/next/assets/seat-subscription-CrWOV4Qc.js.map +0 -1
  431. package/dist/core/web/public/next/assets/slots-W8gkmdfE.js +0 -3
  432. package/dist/core/web/public/next/assets/surface-data-ZtCegYMQ.js +0 -2
  433. package/dist/core/web/public/next/assets/surface-data-ZtCegYMQ.js.map +0 -1
  434. package/dist/core/web/public/next/assets/tasks-model-CnYQzgxk.js +0 -2
  435. package/dist/core/web/public/next/assets/types-Dypu22dp.js +0 -3
  436. package/dist/core/web/public/next/assets/types-Dypu22dp.js.map +0 -1
  437. package/dist/core/web/public/next/assets/use-guarded-action-CO_aAsed.js +0 -2
  438. package/dist/core/web/public/next/assets/use-guarded-action-CO_aAsed.js.map +0 -1
  439. package/dist/core/web/public/next/assets/use-token-gate-DYA2-ALC.js +0 -2
  440. package/dist/core/web/public/next/assets/use-token-gate-DYA2-ALC.js.map +0 -1
  441. package/dist/core/web/public/next/assets/useChartWidth-B8E5mJgM.css +0 -1
  442. package/dist/core/web/public/next/assets/useChartWidth-MEXvDxDL.js +0 -2
  443. package/dist/core/web/public/next/assets/useChartWidth-MEXvDxDL.js.map +0 -1
  444. package/dist/core/web/public/next/assets/verse-model-E98kXngO.js +0 -2
  445. package/dist/core/web/public/next/assets/verse-model-E98kXngO.js.map +0 -1
  446. package/dist/core/web/public/next/assets/verse-store-BgKx_YGs.js +0 -2
  447. package/dist/core/web/public/next/assets/verse-store-BgKx_YGs.js.map +0 -1
  448. package/dist/core/web/public/next/assets/verse-ui-store-KTTKfv-T.js +0 -3
@@ -0,0 +1,2 @@
1
+ import{a as e,n as t,s as n}from"./index-Dk8R-3a7.js";import{D as r,P as i,a,at as o,ct as s,h as c,l,m as u,s as d,u as f}from"./global-DG1fmn4y.js";import{n as p,t as m}from"./MutationTokenDialog-Cqn2uPV6.js";import{s as h,t as g,v as _}from"./workbench-types-DzN-5trg.js";import{s as v}from"./dock-store-CdHQRP8s.js";import{C as y}from"./verse-ui-store-Dy4HuDBV.js";import{r as b,x}from"./verse-queries-2PxoBISm.js";import{r as S}from"./section-visibility-u7q-Q9AA.js";import{_ as C,a as w,o as ee,r as T,s as te,v as E,y as ne}from"./icons-YPgbel-I.js";import{m as re}from"./VerseConsoleApp-Dq_hREXs.js";import{a as D,i as O,r as ie,t as k}from"./CapacityStrip-DqqYnLek.js";import{a as ae,i as oe,r as se}from"./useSeatsRefresh-BN8bso-n.js";import{f as ce,t as le}from"./capacity-strip-model-9-Yb211u.js";import{t as A}from"./Button-Cr_qkQEc.js";import{n as ue,t as j}from"./use-token-gate-B5gOFkeH.js";import{o as M}from"./slots-CV9ZuLQU.js";import{t as de}from"./Switch-DamlpSMY.js";import{t as fe}from"./BudgetControl-BESM12dO.js";import{t as N}from"./Select-DkdeoSQn.js";import{t as P}from"./Input-Ci7TD96x.js";import{t as F}from"./Sheet-C7APkGPt.js";var I=n(e(),1),L={name:`name`,command:`command`,args:`args`,env:`env`,sourceRef:`sourceRef`},R={seatId:`seatId`,label:`label`,engine:`engine`,accountId:`accountId`,servers:`servers`,reason:`reason`,configFile:`configFile`,configFormat:`configFormat`,notes:`notes`},z={servers:`servers`,configured:`configured`,note:`note`},B={sampledAt:`sampledAt`,seats:`seats`,machine:`machine`,scope:`scope`,notes:`notes`},V={accountId:`accountId`,label:`label`,provider:`provider`,authentication:`authentication`,state:`state`,planType:`planType`,reason:`reason`,version:`version`,pinnedVersion:`pinnedVersion`,versionState:`versionState`,usageBlockedByPin:`usageBlockedByPin`,notes:`notes`},H={sampledAt:`sampledAt`,accounts:`accounts`,driftDetected:`driftDetected`,notes:`notes`},U={available:`available`,pinned:`pinned`,aliasRef:`aliasRef`,tenantRef:`tenantRef`,principalRef:`principalRef`,reason:`reason`};function W(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function G(e){return typeof e==`string`?e:null}function K(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function q(e){return e===!0}function J(e){let t=W(e);if(t===null)return null;let n=G(t[L.name]),r=G(t[L.command]);if(n===null||r===null)return null;let i=null,a=W(t[L.env]);if(a!==null){let e=Object.keys(a);if(e.length>0){i={};for(let t of e)i[t]=`<set>`}}return{name:n,command:r,args:K(t[L.args]),env:i,sourceRef:G(t[L.sourceRef])??`(unknown source)`}}function pe(e){let t=W(e);if(t===null)return null;let n=G(t[R.seatId]);if(n===null)return null;let r=Array.isArray(t[R.servers])?t[R.servers].map(J).filter(e=>e!==null):[];return{seatId:n,label:G(t[R.label])??n,engine:G(t[R.engine])??`unknown`,accountId:G(t[R.accountId])??n,servers:r,reason:G(t[R.reason])??`unknown`,configFile:G(t[R.configFile]),configFormat:G(t[R.configFormat]),notes:K(t[R.notes])}}function me(e){let t=W(e);return t===null?null:{available:q(t[U.available]),pinned:q(t[U.pinned]),aliasRef:G(t[U.aliasRef]),tenantRef:G(t[U.tenantRef]),principalRef:G(t[U.principalRef]),reason:G(t[U.reason])??`unknown`}}function he(e){let t=W(e);if(t===null||!Array.isArray(t[B.seats]))return null;let n=W(t[B.machine]),r=n!==null&&Array.isArray(n[z.servers])?n[z.servers].map(J).filter(e=>e!==null):[];return{sampledAt:G(t[B.sampledAt]),seats:t[B.seats].map(pe).filter(e=>e!==null),machine:{servers:r,configured:n===null?r.length>0:q(n[z.configured]),note:(n===null?null:G(n[z.note]))??``},scope:me(t[B.scope]),notes:K(t[B.notes])}}function ge(e){let t=W(e);if(t===null)return null;let n=G(t[V.accountId]);return n===null?null:{accountId:n,label:G(t[V.label])??n,provider:G(t[V.provider])??`unknown`,authentication:G(t[V.authentication])??`unknown`,state:G(t[V.state])??`unknown`,planType:G(t[V.planType]),reason:G(t[V.reason])??`unknown`,version:G(t[V.version]),pinnedVersion:G(t[V.pinnedVersion]),versionState:G(t[V.versionState])??`unverified`,usageBlockedByPin:q(t[V.usageBlockedByPin]),notes:K(t[V.notes])}}function _e(e){let t=W(e);if(t===null||!Array.isArray(t[H.accounts]))return null;let n=t[H.accounts].map(ge).filter(e=>e!==null);return{sampledAt:G(t[H.sampledAt]),accounts:n,driftDetected:q(t[H.driftDetected])||n.some(e=>e.versionState===`drift`),notes:K(t[H.notes])}}var ve={"mcp-seat-isolated-by-adapter":`Verse launches every turn on this seat with an empty MCP configuration, so it loads no MCP servers at all — whatever is configured elsewhere on this machine.`,"mcp-account-config-absent":`This account has no MCP configuration file of its own, so it starts with none.`,"mcp-account-config-not-json":`This account keeps its MCP servers in a TOML config that the provider CLI reads directly. Hub does not parse or rewrite it, so it cannot list what is in there.`,"mcp-account-config-read":`Read from this account's own private configuration.`,"mcp-account-config-unreadable":`This account's configuration could not be read, so nothing here is a reading.`,"mcp-account-profile-unresolved":`This account's private profile could not be located, so Hub cannot say what it would load.`},ye={"mcp-scope-locus-unavailable":`Locus is not reachable on this machine, so writes are not attributable to a tenant.`,"mcp-scope-unpinned":`Locus is running but nothing is pinned, so there is no tenant to scope a write to.`,"mcp-scope-seal-unverified":`Locus reports a pin whose seal did not verify. Fix the pin before writing anything.`,"mcp-scope-expired":`The Locus pin has expired.`,"mcp-scope-pinned":`Writes are attributed to the pinned Locus tenant shown here.`};function be(e,t,n){return e[t]??n}var xe={ok:`success`,warn:`warning`,error:`danger`,off:`off`,unknown:`neutral`};function Se(e){return xe[e]}var Ce=[`claude`,`codex`,`grok`,`local`];function we(e){return Ce.includes(e)?e:null}function Te(e){let t=e.replace(/\/+$/,``),n=t.lastIndexOf(`/`);return n===-1?t:t.slice(n+1)||t}function Ee(e){if(!e)return[];let t=[],n=new Set,r=(e,r)=>{typeof e!=`string`||e.length===0||n.has(e)||(n.add(e),t.push({path:e,name:r??Te(e)}))},i=[...e.sessions].sort((e,t)=>Date.parse(t.updatedAt)-Date.parse(e.updatedAt));for(let e of i)r(e.projectPath);for(let t of e.projects)r(t.path,t.name);return t}function De(e){let t=[];for(let n of e){if(n.engine!==`local`)continue;let e=n.models[0]?.id??(n.id.startsWith(`local:`)?n.id.slice(6):null);e&&!t.includes(e)&&t.push(e)}return t}function Oe(e,t){return t.via===`ollama`?e.ollamaLaunch?t.model?[...e.ollamaLaunch,`--model`,t.model]:[...e.ollamaLaunch]:null:e.actions.find(e=>e.kind===`launch`)?.command??null}var ke=new Set([`spent`,`not-checked`,`unavailable`]);function Ae(e,t){if(e.kind===`local`)return[];let n=[],r=e.connection,i=e.signedOut||r!==null&&(r.connection===`signed-out`||r.connection===`expiring`||r.fixKind===`reauth`);i&&n.push({kind:`reconnect`,label:`Reconnect`,command:null,primary:!0});let a=!i&&t!=null&&ke.has(t.kind);return a&&n.push({kind:`check-again`,label:`Check again`,command:null,primary:!0}),r!==null&&r.fixKind!==`reauth`&&r.fixKind!==`none`&&r.fixCommand!==null&&n.push({kind:`fix`,label:`Fix`,command:r.fixCommand,primary:!i&&!a}),n.push({kind:`edit-budget`,label:`Edit budget`,command:null,primary:!1}),n}function je(e){return e.seats.map(e=>{let t=we(e.engine),n=e.reason===`mcp-seat-isolated-by-adapter`,r=e.servers.length;return{seatId:e.seatId,label:e.label,engine:t,monogram:t?g[t]:e.label.slice(0,1).toUpperCase(),servers:e.servers,loads:r>0?`loads ${r} server${r===1?``:`s`}`:n?`loads none — isolated by Verse`:`loads none`,isolated:n,sentence:be(ve,e.reason,`Hub cannot say what this seat would load.`),reason:e.reason,notes:e.notes}})}function Me(e){let t=[{id:`hub`,label:`Hub gateway registry`,disabledReason:null}];for(let n of e?.seats??[]){if(n.seatId===`local`)continue;let e=n.configFormat===`toml`||n.reason===`mcp-account-config-not-json`;t.push({id:`account:${n.accountId}`,label:`${n.label} (${n.engine})`,disabledReason:e?`Keeps its MCP servers in TOML, which Hub does not rewrite.`:null})}return t}function Ne(e){let t=[],n=``,r=null,i=!1;for(let a of e){if(r){a===r?r=null:n+=a;continue}if(a===`"`||a===`'`){r=a,i=!0;continue}if(/\s/.test(a)){(i||n.length>0)&&t.push(n),n=``,i=!1;continue}n+=a}return(i||n.length>0)&&t.push(n),t}function Pe(e){let t={};for(let n of e.split(/\r?\n/)){let e=n.trim();if(e.length===0||e.startsWith(`#`))continue;let r=e.indexOf(`=`),i=r===-1?``:e.slice(0,r).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(i))return{ok:!1,error:`“${e.slice(0,40)}” is not KEY=value.`};t[i]=e.slice(r+1)}return{ok:!0,env:t}}var Y=t();function Fe({tone:e,label:t}){return(0,Y.jsxs)(`span`,{className:D.health,"data-tone":e,children:[(0,Y.jsx)(`span`,{className:D.healthDot,"aria-hidden":`true`}),t]})}function Ie({id:e,name:t,monogram:n,engine:r,description:i,version:a,health:o,detail:s,aside:c,children:l}){return(0,Y.jsxs)(`li`,{className:D.row,"data-app":e,children:[(0,Y.jsx)(O,{monogram:n,engine:r}),(0,Y.jsxs)(`div`,{className:D.rowMain,children:[(0,Y.jsxs)(`div`,{className:D.rowHead,children:[(0,Y.jsx)(`span`,{id:`${e}-name`,className:D.rowName,children:t}),a?(0,Y.jsx)(`span`,{className:D.rowVersion,children:a}):null,(0,Y.jsx)(Fe,{tone:o.tone,label:o.label})]}),(0,Y.jsx)(`p`,{className:D.rowDesc,children:i}),s?(0,Y.jsx)(`p`,{className:D.rowDetail,children:s}):null,l]}),c?(0,Y.jsx)(`div`,{className:D.rowAside,children:c}):null]})}function X({id:e,title:t,caveat:n,action:r,children:i,headingRef:a}){let o=`apps-group-${e}`;return(0,Y.jsxs)(`section`,{className:D.group,"aria-labelledby":o,"data-group":e,children:[(0,Y.jsxs)(`div`,{className:D.groupHead,children:[(0,Y.jsx)(`h3`,{id:o,ref:a,tabIndex:-1,className:D.groupTitle,children:t}),r]}),n?(0,Y.jsx)(`p`,{className:D.caveat,children:n}):null,(0,Y.jsx)(`div`,{className:D.card,children:i})]})}var Le=1200;async function Re(e){try{if(typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`)return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>`u`)return!1;let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=!1;try{n=typeof document.execCommand==`function`&&document.execCommand(`copy`)}catch{n=!1}return t.remove(),n}function Z({text:e,label:t,what:n}){let[r,i]=(0,I.useState)(`idle`),a=(0,I.useRef)(null);(0,I.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let o=async()=>{let t=await Re(e);i(t?`copied`:`failed`),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(`idle`),Le)};return(0,Y.jsxs)(`span`,{className:D.pillWrap,children:[(0,Y.jsxs)(`button`,{type:`button`,className:D.pill,"data-state":r,onClick:()=>void o(),"aria-label":`Copy ${n}: ${e}`,title:`Copy: ${e}`,children:[(0,Y.jsx)(`code`,{className:D.pillText,children:t??e}),(0,Y.jsx)(`span`,{className:D.pillIcon,"aria-hidden":`true`,children:r===`copied`?(0,Y.jsx)(T,{size:14}):(0,Y.jsx)(te,{size:14})})]}),(0,Y.jsx)(`span`,{className:D.visuallyHidden,role:`status`,"aria-live":`polite`,children:r===`copied`?`Copied`:r===`failed`?`Copy failed — select the command and copy it yourself`:``})]})}var Q=ce;function ze(e){return e.slotLanded??M(`terminal-pane`)?e.terminalAvailable===!0?e.activeSessionId===null?{available:!1,reason:`Open a chat first — its terminal hosts the agent.`}:{available:!0,reason:null}:{available:!1,reason:e.terminalReason??`The Verse terminal needs the desktop app.`}:{available:!1,reason:`This build has no Verse terminal yet.`}}function Be(e,t){t.via===`native`&&t.model===null?v({newTab:!0,appId:e}):v({newTab:!0,appId:e,via:`ollama`,...t.model===null?{}:{model:t.model}}),y(`chat`)}var Ve=`No accounts connected yet. Sign in to Claude Code, Codex or Grok in a terminal, or start Ollama for local models — they show up here within a minute.`;function He({seats:e,health:t,budget:n,loading:r,reconnecting:i,onReconnect:a,now:o}){let[s,c]=(0,I.useState)(null),[l,u]=(0,I.useState)(!1),[d,f]=(0,I.useState)(null),[h,g]=(0,I.useState)(null),_=ue(),v=(0,I.useId)(),y=(0,I.useId)(),b=(0,I.useRef)(null),x=t!==null,S=async e=>{f(e.seatId),g(null);try{await _.run(`Check ${e.label} again (status commands only — nothing is spent)`,()=>ae())&&g({tone:`neutral`,text:`Checked ${e.label} again.`})}catch(e){g({tone:`danger`,text:j(e)})}finally{f(null)}};return(0,Y.jsxs)(X,{id:`accounts`,title:`Accounts`,caveat:`Which accounts you can use now, which are spent and when they reset, and how much autonomy leaves for you.`,children:[r?(0,Y.jsx)(`p`,{className:D.loadingLine,"aria-busy":`true`,children:`Reading accounts…`}):(0,Y.jsx)(k,{seats:e,health:t,budget:n,labelledBy:`apps-group-accounts`,emptyText:Ve,accounts:{healthRead:x,checkingSeatId:d,...o===void 0?{}:{now:o}},renderActions:e=>Ae(e,le(e,{healthRead:x,...o===void 0?{}:{now:o}})).map(t=>(0,Y.jsx)(A,{size:`sm`,variant:t.primary&&t.kind!==`edit-budget`?`primary`:`ghost`,busy:t.kind===`reconnect`&&i===e.seatId||t.kind===`check-again`&&d===e.seatId,"aria-label":`${t.label}: ${e.label}`,onClick:()=>{t.kind===`reconnect`?a(e):t.kind===`check-again`?S(e):t.kind===`fix`?c(e):u(!0)},children:t.label},t.kind))}),(0,Y.jsx)(`p`,{className:h?D.accountsNote:D.visuallyHidden,"data-tone":h?.tone,role:`status`,"aria-live":`polite`,children:h?.text??``}),s!==null&&s.connection?.fixCommand?(0,Y.jsx)(p,{open:!0,onClose:()=>c(null),titleId:v,title:`Fix ${s.label}`,description:s.connection.word,initialFocusRef:b,children:(0,Y.jsxs)(`div`,{className:D.dialogBody,children:[s.connection.reasons.map(e=>(0,Y.jsx)(`p`,{children:e},e)),(0,Y.jsxs)(`div`,{className:D.commandBlock,children:[(0,Y.jsx)(`span`,{className:D.commandLabel,children:`Run this in a terminal`}),(0,Y.jsx)(Z,{text:Q(s.connection.fixCommand),what:`the fix for ${s.label}`})]}),(0,Y.jsx)(`p`,{children:`Verse shows the command and never runs it for you: it changes which CLI this seat is pinned to.`}),(0,Y.jsx)(`div`,{className:D.dialogActions,children:(0,Y.jsx)(A,{ref:b,variant:`subtle`,onClick:()=>c(null),children:`Done`})})]})}):null,(0,Y.jsx)(F,{open:l,onClose:()=>u(!1),titleId:y,title:`Budget`,description:`How much of each seat autonomy may use, and how much is kept for you.`,width:560,children:l?(0,Y.jsx)(fe,{}):null}),(0,Y.jsx)(m,{open:_.dialog.open,reason:_.dialog.reason,tokenLabel:`Mutation token`,tokenHelp:`the mutation token ashlr verse printed`,onClose:_.dialog.onClose,onUnlocked:_.dialog.onUnlocked})]})}var Ue=`verse-apps`,We=`verse-terminal-status`;async function Ge(e,t){try{return{available:!0,data:await l(e,t)}}catch(e){if(e instanceof d&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return e instanceof d&&e.status===404?{available:!1,reason:`This server is older than Apps & Accounts, so desktop, terminal and local rows are not available.`}:{available:!1,reason:e instanceof d?`The apps check answered HTTP ${e.status}.`:`The apps check could not be reached.`}}}var Ke={key:Ue,fetch:e=>Ge(h,e)},qe={key:We,fetch:e=>Ge(_,e)};async function Je(e,t){let n=r();if(!n)throw new b;let a=await f(e,t,n);return i(),a}async function Ye(){let e=await Je(`${h}/refresh`,{});return await s(Ue,se(()=>Promise.resolve({available:!0,data:e}),()=>Ke.fetch()),!0),e}async function Xe(e,t){let n=await Je(`${h}/${encodeURIComponent(e)}/toggle`,{enabled:t,confirm:!0});return s(Ue,()=>Ke.fetch(),!0),n}function Ze(e,t){return Je(`${h}/${encodeURIComponent(e)}/launch`,{root:t.root,...t.via?{via:t.via}:{},...t.model?{model:t.model}:{}})}function Qe({row:e,enable:t,busy:n,error:r,onCancel:i,onConfirm:a}){let o=(0,I.useId)(),s=(0,I.useRef)(null);if(e===null||e.toggle===null)return null;let c=t?e.toggle.command:e.toggle.restoreCommand,l=t?e.toggle.restoreCommand:e.toggle.command,u=t?`Turn on “${e.description}”?`:`Restore ${e.name}?`;return(0,Y.jsx)(p,{open:!0,onClose:i,titleId:o,title:u,initialFocusRef:s,description:t?`This changes ${e.name}’s own settings until you restore it.`:`This puts ${e.name} back on its own defaults.`,children:(0,Y.jsxs)(`div`,{className:D.dialogBody,children:[e.detail?(0,Y.jsx)(`p`,{children:e.detail}):null,t&&e.id===`claude-desktop`?(0,Y.jsx)(`p`,{children:`Recommended: leave this off. Claude Desktop would run local models instead of its own, and Verse’s local seats already use Ollama.`}):null,(0,Y.jsxs)(`div`,{className:D.commandBlock,children:[(0,Y.jsx)(`span`,{className:D.commandLabel,children:`Runs`}),(0,Y.jsx)(Z,{text:Q(c),what:`the command this runs`})]}),(0,Y.jsxs)(`div`,{className:D.commandBlock,children:[(0,Y.jsx)(`span`,{className:D.commandLabel,children:t?`Undo later with`:`Turn back on with`}),(0,Y.jsx)(Z,{text:Q(l),what:t?`the restore command`:`the command that turns it on`})]}),(0,Y.jsx)(`p`,{children:`It opens in a Terminal window so you can answer its prompts. Verse does not answer them for you, and nothing changes until you do.`}),r?(0,Y.jsx)(`p`,{className:D.error,role:`alert`,children:r}):null,(0,Y.jsxs)(`div`,{className:D.dialogActions,children:[(0,Y.jsx)(A,{ref:s,variant:`subtle`,onClick:i,children:`Cancel`}),(0,Y.jsx)(A,{variant:t?`danger`:`primary`,busy:n,onClick:a,children:t?`Open in Terminal`:`Restore in Terminal`})]})]})})}function $e({row:e,projects:t,models:n,inVerse:r,busy:i,error:a,onCancel:o,onLaunch:s}){let c=(0,I.useId)(),l=(0,I.useRef)(null),[u,d]=(0,I.useState)(`native`),[f,m]=(0,I.useState)(``),[h,g]=(0,I.useState)(t[0]?.path??``);(0,I.useEffect)(()=>{d(`native`),m(``),g(t[0]?.path??``)},[e?.id]);let _={via:u,model:u===`ollama`&&f!==``?f:null},v=(0,I.useMemo)(()=>e?Oe(e,_):null,[e,_.via,_.model]);if(e===null)return null;let y=Oe(e,{via:`native`,model:null}),b=e.ollamaLaunch,x=`${c}-via`,S=h!==``;return(0,Y.jsx)(p,{open:!0,onClose:o,titleId:c,title:`Launch ${e.name}`,description:`Nothing starts until you choose where.`,initialFocusRef:l,children:(0,Y.jsxs)(`div`,{className:D.dialogBody,children:[(0,Y.jsxs)(`fieldset`,{className:D.fieldset,children:[(0,Y.jsx)(`legend`,{className:D.legend,children:`Run`}),y?(0,Y.jsxs)(`label`,{className:D.radio,children:[(0,Y.jsx)(`input`,{ref:l,type:`radio`,name:x,checked:u===`native`,onChange:()=>d(`native`)}),(0,Y.jsx)(`code`,{className:D.inlineCode,children:Q(y)}),(0,Y.jsx)(`span`,{className:D.hint,children:`its own command`})]}):null,b?(0,Y.jsxs)(`label`,{className:D.radio,children:[(0,Y.jsx)(`input`,{type:`radio`,name:x,checked:u===`ollama`,onChange:()=>d(`ollama`)}),(0,Y.jsx)(`code`,{className:D.inlineCode,children:Q(b)}),(0,Y.jsx)(`span`,{className:D.hint,children:`through Ollama`})]}):null]}),u===`ollama`?n.length>0?(0,Y.jsxs)(N,{label:`Local model`,value:f,onChange:e=>m(e.target.value),children:[(0,Y.jsx)(`option`,{value:``,children:`Ollama’s default`}),n.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))]}):(0,Y.jsx)(`p`,{className:D.hint,children:`No local models are known to Verse, so Ollama will ask which to use.`}):null,(0,Y.jsxs)(N,{label:`Folder (Terminal.app)`,value:h,onChange:e=>g(e.target.value),hint:t.length===0?`No chat folders or enrolled projects yet.`:`A Verse tab opens in the chat you have open.`,disabled:t.length===0,children:[t.length===0?(0,Y.jsx)(`option`,{value:``,children:`—`}):null,t.map(e=>(0,Y.jsx)(`option`,{value:e.path,children:e.name},e.path))]}),v?(0,Y.jsxs)(`div`,{className:D.commandBlock,children:[(0,Y.jsx)(`span`,{className:D.commandLabel,children:`Command`}),(0,Y.jsx)(Z,{text:Q(v),what:`the ${e.name} launch command`})]}):null,u===`ollama`&&r.available?(0,Y.jsx)(`p`,{className:D.hint,children:`In a Verse tab this runs exactly the command above — Verse builds it from what is installed, never from this page.`}):null,!r.available&&r.reason?(0,Y.jsxs)(`p`,{className:D.hint,children:[`Verse terminal: `,r.reason]}):null,a?(0,Y.jsx)(`p`,{className:D.error,role:`alert`,children:a}):null,(0,Y.jsxs)(`div`,{className:D.dialogActions,children:[(0,Y.jsx)(A,{variant:`ghost`,onClick:o,children:`Cancel`}),(0,Y.jsx)(A,{variant:r.available?`subtle`:`primary`,busy:i,disabled:!S||v===null,onClick:()=>v&&s({choice:_,target:`terminal-app`,root:h,command:v}),children:`Open in Terminal.app`}),r.available?(0,Y.jsx)(A,{variant:`primary`,disabled:v===null,onClick:()=>v&&s({choice:_,target:`verse`,root:null,command:v}),children:`Open in Verse terminal`}):null]})]})})}var $={section:`_section_mum7s_11`,body:`_body_mum7s_19`,panel:`_panel_mum7s_29`,panelHead:`_panelHead_mum7s_35`,panelTitle:`_panelTitle_mum7s_43`,panelNote:`_panelNote_mum7s_51`,muted:`_muted_mum7s_52`,alert:`_alert_mum7s_61`,alertTitle:`_alertTitle_mum7s_72`,seatList:`_seatList_mum7s_78`,rowList:`_rowList_mum7s_79`,seatRow:`_seatRow_mum7s_85`,healthRow:`_healthRow_mum7s_86`,seatHead:`_seatHead_mum7s_94`,seatLabel:`_seatLabel_mum7s_101`,engineTag:`_engineTag_mum7s_106`,code:`_code_mum7s_107`,count:`_count_mum7s_118`,disclosure:`_disclosure_mum7s_124`,commandLine:`_commandLine_mum7s_134`,envList:`_envList_mum7s_143`,envItem:`_envItem_mum7s_152`,warnList:`_warnList_mum7s_161`,digest:`_digest_mum7s_171`,actions:`_actions_mum7s_178`};function et({server:e,heading:t}){let n=e.env===null?[]:Object.keys(e.env);return(0,Y.jsxs)(`div`,{className:$.disclosure,children:[t===void 0?null:(0,Y.jsx)(`p`,{className:$.alertTitle,children:t}),(0,Y.jsxs)(`p`,{className:$.commandLine,children:[e.command,e.args.length>0?` ${e.args.join(` `)}`:``]}),n.length===0?(0,Y.jsx)(`p`,{className:$.muted,children:`No environment variables are passed to this server.`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{className:$.muted,children:[n.length,` environment variable`,n.length===1?``:`s`,` passed to this server. Values are never displayed.`]}),(0,Y.jsx)(`ul`,{className:$.envList,children:n.map(e=>(0,Y.jsxs)(`li`,{className:$.envItem,children:[e,`=<set>`]},e))})]}),(0,Y.jsxs)(`p`,{className:$.code,children:[`configured in `,e.sourceRef]})]})}var tt=`verse-mcp-snapshot`,nt=`verse-mcp-cli-health`;function rt(e,t){return t instanceof d?t.status===404?`This server does not expose ${e}, so this panel has no source.`:`${e} answered HTTP ${t.status}.`:`${e} could not be reached.`}function it(e){return async t=>{try{return{raw:await l(e,t),available:!0,reason:null}}catch(t){if(t instanceof d&&t.status===401||t instanceof DOMException&&t.name===`AbortError`)throw t;return{raw:null,available:!1,reason:rt(e,t)}}}}var at={key:tt,fetch:it(`/api/verse/mcp`)},ot={key:nt,fetch:it(`/api/verse/mcp/cli-health`)},st=class extends Error{constructor(){super(`Unlock actions with the mutation token before changing MCP configuration.`),this.name=`McpLockedError`}};async function ct(e,t){let n=r();if(!n)throw new st;let a=await f(e,t,n);return i(),a}function lt(e,t){return ct(`/api/verse/mcp/proposal`,{target:e,server:t})}async function ut(e,t,n){let r=await ct(`/api/verse/mcp/apply`,{target:e,server:t,digest:n,confirm:!0});return o(tt),r}function dt({row:e}){let[t,n]=(0,I.useState)(!1),r=(0,I.useId)(),i=e.servers.length>0;return(0,Y.jsxs)(Ie,{id:`mcp-${e.seatId}`,name:e.label,monogram:e.monogram,engine:e.engine,description:e.sentence,health:{tone:i?`success`:`off`,label:e.loads},aside:i?(0,Y.jsx)(A,{variant:`ghost`,size:`sm`,"aria-expanded":t,"aria-controls":r,icon:t?(0,Y.jsx)(w,{size:14}):(0,Y.jsx)(ee,{size:14}),onClick:()=>n(e=>!e),children:t?`Hide servers`:`Show servers`}):null,children:[(0,Y.jsx)(`span`,{className:D.reasonCode,children:e.reason}),i&&t?(0,Y.jsx)(`div`,{id:r,className:D.servers,children:e.servers.map(e=>(0,Y.jsx)(et,{server:e,heading:e.name},e.name))}):null]})}function ft(e){if(typeof e!=`object`||!e)return null;let t=e,n=J(t.server),r=t.target;return!n||typeof t.digest!=`string`||!r?null:{server:n,targetRef:typeof r.ref==`string`?r.ref:``,targetLabel:typeof r.label==`string`?r.label:``,action:t.action===`replace`?`replace`:`add`,replaces:J(t.replaces),warnings:Array.isArray(t.warnings)?t.warnings.filter(e=>typeof e==`string`):[],note:typeof t.note==`string`?t.note:``,digest:t.digest}}function pt(e){return e instanceof d?e.detail??`The server refused (HTTP ${e.status}).`:e instanceof Error&&e.name===`VerseMutationLockedError`?`Unlock actions with the mutation token first.`:`The request could not be completed.`}function mt({open:e,snapshot:t,run:n,onClose:r,onAdded:i}){let a=(0,I.useId)(),o=Me(t),[s,c]=(0,I.useState)(`hub`),[l,u]=(0,I.useState)(``),[d,f]=(0,I.useState)(``),[p,m]=(0,I.useState)(``),[h,g]=(0,I.useState)(``),[_,v]=(0,I.useState)(null),[y,b]=(0,I.useState)(!1),[x,S]=(0,I.useState)(null),C=()=>{S(null),v(null),b(!1)},w=async e=>{e.preventDefault(),v(null);let t=Pe(h);if(!t.ok){v(t.error);return}let r={name:l.trim(),command:d.trim(),args:Ne(p),...Object.keys(t.env).length>0?{env:t.env}:{}};b(!0);try{let e=await n(`Review an MCP server before adding it`,()=>lt(s,r));if(e===null)return;let t=ft(e);t?S({input:r,target:s,value:t}):v(`The server answered with something that is not a proposal.`)}catch(e){v(pt(e))}finally{b(!1)}},ee=async()=>{if(x){b(!0),v(null);try{if(await n(`Add an MCP server`,()=>ut(x.target,x.input,x.value.digest))===null)return;i(`${x.value.action===`replace`?`Replaced`:`Added`} ${x.value.server.name} in ${x.value.targetRef}.`),u(``),f(``),m(``),g(``),C(),r()}catch(e){v(pt(e))}finally{b(!1)}}},T=o.find(e=>e.id===s);return(0,Y.jsx)(F,{open:e,onClose:()=>{C(),r()},titleId:a,title:x?`Review before adding`:`Add an MCP server`,description:`An MCP server is a program that runs with the agent’s permissions. Nothing is written until you confirm what you read.`,width:520,children:x===null?(0,Y.jsxs)(`form`,{className:D.dialogBody,onSubmit:e=>void w(e),children:[(0,Y.jsx)(N,{label:`Add to`,value:s,onChange:e=>c(e.target.value),hint:T?.disabledReason??(s===`hub`?`The hub’s own registry.`:`A Verse chat on a Claude seat still loads none; Claude Code in a terminal does.`),children:o.map(e=>(0,Y.jsx)(`option`,{value:e.id,disabled:e.disabledReason!==null,children:e.label},e.id))}),(0,Y.jsx)(P,{label:`Name`,value:l,onChange:e=>u(e.target.value),required:!0,placeholder:`filesystem`,autoComplete:`off`}),(0,Y.jsx)(P,{label:`Command`,value:d,onChange:e=>f(e.target.value),required:!0,placeholder:`/opt/homebrew/bin/npx`,autoComplete:`off`,hint:`An absolute path is safest; a bare name is looked up on PATH when the server starts.`}),(0,Y.jsx)(P,{label:`Arguments`,value:p,onChange:e=>m(e.target.value),placeholder:`-y @modelcontextprotocol/server-filesystem "~/code"`,autoComplete:`off`}),(0,Y.jsxs)(`label`,{className:D.fieldLabel,children:[`Environment `,(0,Y.jsx)(`span`,{className:D.hint,children:`One KEY=value per line. Values are sent once and never shown again.`}),(0,Y.jsx)(`textarea`,{className:D.textarea,value:h,onChange:e=>g(e.target.value),spellCheck:!1,autoComplete:`off`})]}),_?(0,Y.jsx)(`p`,{className:D.error,role:`alert`,children:_}):null,(0,Y.jsxs)(`div`,{className:D.dialogActions,children:[(0,Y.jsx)(A,{type:`button`,variant:`ghost`,onClick:r,children:`Cancel`}),(0,Y.jsx)(A,{type:`submit`,variant:`primary`,busy:y,disabled:l.trim()===``||d.trim()===``||T?.disabledReason!=null,children:`Review`})]})]}):(0,Y.jsxs)(`div`,{className:D.dialogBody,children:[(0,Y.jsxs)(`p`,{children:[x.value.action===`replace`?`Replaces`:`Adds`,` `,(0,Y.jsx)(`strong`,{children:x.value.server.name}),` in`,` `,(0,Y.jsx)(`code`,{className:D.inlineCode,children:x.value.targetRef}),x.value.targetLabel?` (${x.value.targetLabel})`:``,`.`]}),(0,Y.jsx)(et,{server:x.value.server,heading:`This will run`}),x.value.replaces?(0,Y.jsx)(et,{server:x.value.replaces,heading:`Replacing`}):null,x.value.warnings.length>0?(0,Y.jsx)(`ul`,{className:D.warnings,children:x.value.warnings.map(e=>(0,Y.jsx)(`li`,{children:e},e))}):null,x.value.note?(0,Y.jsx)(`p`,{className:D.hint,children:x.value.note}):null,_?(0,Y.jsx)(`p`,{className:D.error,role:`alert`,children:_}):null,(0,Y.jsxs)(`div`,{className:D.dialogActions,children:[(0,Y.jsx)(A,{variant:`ghost`,onClick:()=>S(null),children:`Back`}),(0,Y.jsx)(A,{variant:`primary`,busy:y,onClick:()=>void ee(),children:x.value.action===`replace`?`Replace server`:`Add server`})]})]})})}function ht({snapshot:e,cliHealth:t,unavailable:n,loading:r,run:i,onAdded:a,headingRef:o}){let[s,c]=(0,I.useState)(!1),l=e?je(e):[];return(0,Y.jsxs)(X,{id:`mcp-servers`,title:`MCP servers`,headingRef:o,action:(0,Y.jsx)(A,{variant:`subtle`,size:`sm`,icon:(0,Y.jsx)(E,{size:14}),onClick:()=>c(!0),"aria-haspopup":`dialog`,children:`Add server`}),caveat:(0,Y.jsxs)(Y.Fragment,{children:[`Claude and local seats load no MCP servers: Verse starts them with`,` `,(0,Y.jsx)(`code`,{children:`--strict-mcp-config`}),` and an empty `,(0,Y.jsx)(`code`,{children:`--mcp-config`}),`. Codex and Grok seats load their own account’s config — and an `,(0,Y.jsx)(`code`,{children:`ashlr__`}),` write through one is refused on a folder that is not enrolled.`]}),children:[e!==null&&e.notes.length>0?(0,Y.jsxs)(`div`,{className:D.loadingLine,role:`note`,children:[(0,Y.jsx)(`strong`,{children:`Configured, but unused.`}),` `,e.notes.join(` `),` `,e.machine.note]}):null,t!==null&&t.driftDetected?(0,Y.jsxs)(`div`,{className:D.loadingLine,role:`alert`,children:[(0,Y.jsx)(`strong`,{children:`CLI version drift.`}),` `,t.notes.join(` `),` `,t.accounts.filter(e=>e.versionState===`drift`).map(e=>`${e.label}: ${e.version??`unread`}, pinned ${e.pinnedVersion??`—`}.`).join(` `)]}):null,e===null?(0,Y.jsx)(`p`,{className:D.loadingLine,"aria-busy":r||void 0,children:r?`Reading each seat’s configuration…`:n??`No per-seat reading is available.`}):(0,Y.jsx)(`ul`,{className:D.rows,children:l.map(e=>(0,Y.jsx)(dt,{row:e},e.seatId))}),e?.scope?(0,Y.jsxs)(`p`,{className:D.scopeLine,children:[`Scope: `,be(ye,e.scope.reason,`Locus did not report a usable scope.`),e.scope.tenantRef?` (${e.scope.tenantRef})`:``]}):null,(0,Y.jsx)(mt,{open:s,snapshot:e,run:i,onClose:()=>c(!1),onAdded:a})]})}function gt(e){return{tone:Se(e.health.state),label:e.health.label}}function _t({group:e,onToggle:t,onRestore:n}){return(0,Y.jsx)(X,{id:e.id,title:e.title,caveat:e.caveat,children:(0,Y.jsx)(`ul`,{className:D.rows,children:e.apps.map(e=>{let r=e.actions.find(e=>e.kind===`restore`)??null;return(0,Y.jsx)(Ie,{id:`app-${e.id}`,name:e.name,monogram:e.monogram,engine:e.engine,description:e.description,health:gt(e),detail:e.toggle===null?e.detail:null,aside:e.toggle===null?null:(0,Y.jsxs)(Y.Fragment,{children:[r?(0,Y.jsx)(A,{variant:`ghost`,size:`sm`,onClick:()=>n(e),disabled:r.disabledReason!==null,title:Q(r.command??[]),children:r.label}):null,(0,Y.jsx)(de,{checked:e.toggle.enabled,onChange:n=>t(e,n),"aria-label":`${e.description}: ${e.toggle.enabled?`on`:`off`}`,"aria-describedby":`app-${e.id}-name`})]})},e.id)})})})}function vt({group:e,quickLaunchReason:t,onQuickLaunch:n,onLaunchOptions:r}){return(0,Y.jsx)(X,{id:e.id,title:e.title,caveat:e.caveat,children:(0,Y.jsx)(`ul`,{className:D.rows,children:e.apps.map(e=>{let i=e.actions.find(e=>e.kind===`launch`)??null,a=i?.disabledReason??t;return(0,Y.jsx)(Ie,{id:`app-${e.id}`,name:e.name,monogram:e.monogram,engine:e.engine,description:e.description,version:e.version,health:gt(e),detail:e.detail,aside:(0,Y.jsxs)(Y.Fragment,{children:[e.copy&&e.installed?(0,Y.jsx)(Z,{text:e.copy.text,label:e.copy.label,what:`the ${e.name} command`}):null,e.ollamaLaunch?(0,Y.jsx)(Z,{text:Q(e.ollamaLaunch),what:`the Ollama launch command for ${e.name}`}):null,i?i.disabledReason===null?(0,Y.jsxs)(`span`,{className:D.split,children:[(0,Y.jsx)(A,{variant:`subtle`,size:`sm`,icon:(0,Y.jsx)(C,{size:14}),disabled:a!==null,title:a??void 0,onClick:()=>n(e),"aria-label":`Launch ${e.name}`,children:`Launch`}),(0,Y.jsx)(A,{variant:`subtle`,size:`sm`,iconOnly:!0,icon:(0,Y.jsx)(w,{size:14}),"aria-label":`Launch options for ${e.name}`,title:`Launch options for ${e.name}`,"aria-haspopup":`dialog`,onClick:()=>r(e)})]}):(0,Y.jsx)(`span`,{className:D.disabledNote,children:i.disabledReason}):null]})},e.id)})})})}function yt({group:e}){return(0,Y.jsx)(X,{id:e.id,title:e.title,caveat:e.caveat,children:(0,Y.jsx)(`ul`,{className:D.rows,children:e.apps.map(e=>(0,Y.jsx)(Ie,{id:`app-${e.id}`,name:e.name,monogram:e.monogram,engine:e.engine,description:e.description,version:e.version,health:gt(e),detail:e.detail},e.id))})})}var bt=6e4;function xt(e,t){let n=Date.parse(e);if(!Number.isFinite(n))return`not checked`;let r=Math.max(0,Math.round((t-n)/6e4));return r<1?`checked just now`:r<120?`checked ${r} min ago`:`checked ${Math.round(r/60)} h ago`}function St({focusGroup:e}={}){let t=u(Ke),n=c(Ke);S(n,bt);let r=u(qe),i=u(at),o=u(ot),s=c(at),l=u(x),d=ie(),f=re(),p=ue(),[h,g]=(0,I.useState)(null),[_,v]=(0,I.useState)(!1),[y,b]=(0,I.useState)(null),[C,w]=(0,I.useState)(null),[ee,T]=(0,I.useState)(!1),[te,E]=(0,I.useState)(null),[O,k]=(0,I.useState)(null),[se,ce]=(0,I.useState)(!1),[le,M]=(0,I.useState)(null),[de,fe]=(0,I.useState)(()=>Date.now());S(()=>fe(Date.now()),3e4);let N=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(e!==`mcp-servers`)return;let t=N.current;t&&(typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`start`}),t.focus({preventScroll:!0}))},[e]);let P=l.data,F=Ee(P),L=De(d.seats),R=ze({terminalAvailable:r.data?.available?r.data.data.available:!r.data&&null,terminalReason:r.data?.available?r.data.data.reason:null,activeSessionId:f.activeSessionId}),z=t.data?.available?t.data.data:null,B=e=>z?.groups.find(t=>t.id===e)??null,V=i.data?.available?he(i.data.raw):null,H=o.data?.available?_e(o.data.raw):null,U=(0,I.useCallback)((e,t=`neutral`)=>g({text:e,tone:t}),[]),W=async()=>{v(!0);try{await p.run(`Check every app and seat again`,async()=>(await Promise.all([Ye(),ae().catch(()=>null)]),s(),!0))&&(fe(Date.now()),U(`Checked again.`))}catch(e){U(j(e),`danger`)}finally{v(!1)}},G=async e=>{b(e.seatId);try{await p.run(`Open the sign-in for ${e.label} in Terminal`,async()=>(await oe(e.seatId),!0))&&U(`Opened the sign-in for ${e.label} in Terminal. Finish it there; this page picks it up.`)}catch(e){U(j(e),`danger`)}finally{b(null)}},K=async()=>{if(C){T(!0),E(null);try{let e=await p.run(`${C.enable?`Switch on`:`Restore`} ${C.row.name}`,()=>Xe(C.row.id,C.enable));e&&(U(`Opened “${e.command.join(` `)}” in Terminal. Answer its prompts there.`),w(null))}catch(e){E(j(e))}finally{T(!1)}}},q=async(e,t)=>{if(t.target===`verse`){Be(e.id,t.choice),k(null);return}if(t.root!==null){ce(!0),M(null);try{await p.run(`Launch ${e.name} in Terminal`,()=>Ze(e.id,{root:t.root,via:t.choice.via,model:t.choice.model}))&&(U(`Opened ${e.name} in Terminal.`),k(null))}catch(e){let t=j(e);O?M(t):U(t,`danger`)}finally{ce(!1)}}},J=R.available||F.length>0?null:`Open a chat or enrol a project first.`,pe=e=>{let t={via:`native`,model:null},n=e.actions.find(e=>e.kind===`launch`)?.command??null;n&&q(e,{choice:t,target:R.available?`verse`:`terminal-app`,root:F[0]?.path??null,command:n})},me=t.data===void 0&&(t.status===`loading`||t.status===`idle`);return(0,Y.jsxs)(`section`,{className:D.section,"aria-label":`Apps & Accounts`,children:[(0,Y.jsx)(`div`,{className:D.scroll,children:(0,Y.jsxs)(`div`,{className:D.page,children:[(0,Y.jsxs)(`header`,{className:D.header,children:[(0,Y.jsxs)(`div`,{className:D.headerText,children:[(0,Y.jsx)(`h2`,{className:D.title,children:`Apps & Accounts`}),(0,Y.jsx)(`p`,{className:D.lede,children:`Everything Verse can run with on this Mac, and whether it is ready.`})]}),(0,Y.jsxs)(`div`,{className:D.headerMeta,children:[z?(0,Y.jsxs)(`span`,{children:[xt(z.checkedAt,de),z.pathSource===`fallback`?` · PATH from known folders (your login shell did not answer)`:``]}):null,(0,Y.jsx)(A,{variant:`ghost`,size:`sm`,icon:(0,Y.jsx)(ne,{size:14}),busy:_,onClick:()=>void W(),children:`Check again`})]})]}),(0,Y.jsx)(`p`,{className:h?D.banner:D.visuallyHidden,"data-tone":h?.tone,role:`status`,"aria-live":`polite`,children:h?.text??``}),(0,Y.jsx)(He,{seats:d.seats,health:d.health,budget:d.budget,loading:d.loading,reconnecting:y,onReconnect:e=>void G(e)}),t.data&&!t.data.available?(0,Y.jsx)(`p`,{className:D.banner,children:t.data.reason}):me?(0,Y.jsxs)(`div`,{"aria-busy":`true`,"aria-label":`Checking apps`,children:[(0,Y.jsx)(a,{width:`30%`}),(0,Y.jsx)(a,{width:`80%`}),(0,Y.jsx)(a,{width:`70%`})]}):(0,Y.jsxs)(Y.Fragment,{children:[B(`desktop`)?(0,Y.jsx)(_t,{group:B(`desktop`),onToggle:(e,t)=>{E(null),w({row:e,enable:t})},onRestore:e=>{E(null),w({row:e,enable:!1})}}):null,B(`terminal-agents`)?(0,Y.jsx)(vt,{group:B(`terminal-agents`),quickLaunchReason:J,onQuickLaunch:pe,onLaunchOptions:e=>{M(null),k(e)}}):null,B(`local-models`)?(0,Y.jsx)(yt,{group:B(`local-models`)}):null]}),(0,Y.jsx)(ht,{snapshot:V,cliHealth:H,unavailable:i.data&&!i.data.available?i.data.reason:null,loading:i.data===void 0,run:p.run,onAdded:e=>{U(e),s()},headingRef:N})]})}),(0,Y.jsx)(Qe,{row:C?.row??null,enable:C?.enable??!1,busy:ee,error:te,onCancel:()=>w(null),onConfirm:()=>void K()}),(0,Y.jsx)($e,{row:O,projects:F,models:L,inVerse:R,busy:se,error:le,onCancel:()=>k(null),onLaunch:e=>{O&&q(O,e)}}),(0,Y.jsx)(m,{open:p.dialog.open,reason:p.dialog.reason,tokenLabel:`Mutation token`,tokenHelp:`the mutation token ashlr verse printed`,onClose:p.dialog.onClose,onUnlocked:p.dialog.onUnlocked})]})}export{bt as APPS_POLL_MS,St as AppsSection};
2
+ //# sourceMappingURL=AppsSection-B5HWJi9I.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppsSection-B5HWJi9I.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/mcp/mcp-contract.ts","../../../../../../src/web-ui/routes/verse/apps/apps-model.ts","../../../../../../src/web-ui/routes/verse/apps/AppRow.tsx","../../../../../../src/web-ui/routes/verse/apps/CopyPill.tsx","../../../../../../src/web-ui/routes/verse/apps/launch.ts","../../../../../../src/web-ui/routes/verse/apps/AccountsGroup.tsx","../../../../../../src/web-ui/routes/verse/apps/apps-queries.ts","../../../../../../src/web-ui/routes/verse/apps/DesktopToggleDialog.tsx","../../../../../../src/web-ui/routes/verse/apps/LaunchDialog.tsx","../../../../../../src/web-ui/routes/verse/mcp/mcp.module.css","../../../../../../src/web-ui/routes/verse/mcp/McpServerDisclosure.tsx","../../../../../../src/web-ui/routes/verse/mcp/mcp-queries.ts","../../../../../../src/web-ui/routes/verse/apps/McpGroup.tsx","../../../../../../src/web-ui/routes/verse/apps/ServedGroups.tsx","../../../../../../src/web-ui/routes/verse/sections/AppsSection.tsx"],"sourcesContent":["/**\n * routes/verse/mcp/mcp-contract.ts — the wire seam for MCP management.\n *\n * Same posture as routes/verse/usage/usage-contract.ts, for the same two\n * reasons:\n *\n * 1. EVERY import from src/core here MUST be type-only. `core/verse/\n * mcp-seat-view.ts` pulls `node:fs` and `node:os`; a VALUE import of even\n * one constant drags that graph into the browser bundle and `vite build`\n * fails. Type-only imports are erased, so the seam guards below cost\n * nothing at runtime.\n * 2. Nothing is CAST. Every read goes through a structural narrower, so a\n * field rename in src/core degrades this panel to an honest \"unknown\"\n * instead of throwing at render time — and the `WIRE_*_KEYS` blocks make\n * that rename fail `npm run typecheck:web` here, at the seam, first.\n *\n * SECURITY: the server already redacts every env value to '<set>' via\n * `redactEnv` and publishes config files as home-relative refs. This module\n * is the client-side backstop on top of that: {@link narrowServer} FORCES\n * every env value to '<set>' whatever arrived, so a server that ever\n * regressed could not print a secret through this panel.\n *\n * Pure: no React, no I/O.\n */\nimport type {\n VerseMcpMachineRegistry,\n VerseMcpSeatView,\n VerseMcpServerView,\n VerseMcpSnapshot,\n} from '../../../../core/verse/mcp-seat-view.js';\nimport type { VerseMcpScope } from '../../../../core/verse/mcp-scope.js';\nimport type {\n VerseAccountCliHealth,\n VerseCliHealthSnapshot,\n} from '../../../../core/verse/mcp-cli-health.js';\n\n// ---------------------------------------------------------------------------\n// Seam contract — compile-time only, zero runtime cost.\n// ---------------------------------------------------------------------------\n\nconst WIRE_SERVER_KEYS = {\n name: 'name',\n command: 'command',\n args: 'args',\n env: 'env',\n sourceRef: 'sourceRef',\n} as const satisfies Record<string, keyof VerseMcpServerView>;\n\nconst WIRE_SEAT_KEYS = {\n seatId: 'seatId',\n label: 'label',\n engine: 'engine',\n accountId: 'accountId',\n servers: 'servers',\n reason: 'reason',\n configFile: 'configFile',\n configFormat: 'configFormat',\n notes: 'notes',\n} as const satisfies Record<string, keyof VerseMcpSeatView>;\n\nconst WIRE_MACHINE_KEYS = {\n servers: 'servers',\n configured: 'configured',\n note: 'note',\n} as const satisfies Record<string, keyof VerseMcpMachineRegistry>;\n\nconst WIRE_SNAPSHOT_KEYS = {\n sampledAt: 'sampledAt',\n seats: 'seats',\n machine: 'machine',\n scope: 'scope',\n notes: 'notes',\n} as const satisfies Record<string, keyof VerseMcpSnapshot>;\n\nconst WIRE_HEALTH_KEYS = {\n accountId: 'accountId',\n label: 'label',\n provider: 'provider',\n authentication: 'authentication',\n state: 'state',\n planType: 'planType',\n reason: 'reason',\n version: 'version',\n pinnedVersion: 'pinnedVersion',\n versionState: 'versionState',\n usageBlockedByPin: 'usageBlockedByPin',\n notes: 'notes',\n} as const satisfies Record<string, keyof VerseAccountCliHealth>;\n\nconst WIRE_HEALTH_SNAPSHOT_KEYS = {\n sampledAt: 'sampledAt',\n accounts: 'accounts',\n driftDetected: 'driftDetected',\n notes: 'notes',\n} as const satisfies Record<string, keyof VerseCliHealthSnapshot>;\n\nconst WIRE_SCOPE_KEYS = {\n available: 'available',\n pinned: 'pinned',\n aliasRef: 'aliasRef',\n tenantRef: 'tenantRef',\n principalRef: 'principalRef',\n reason: 'reason',\n} as const satisfies Record<string, keyof VerseMcpScope>;\n\n// ---------------------------------------------------------------------------\n// Display shapes\n// ---------------------------------------------------------------------------\n\nexport interface McpServer {\n name: string;\n command: string;\n args: string[];\n /** Keys only. Every value is '<set>' — forced here, not merely trusted. */\n env: Record<string, string> | null;\n sourceRef: string;\n}\n\nexport interface McpSeat {\n seatId: string;\n label: string;\n engine: string;\n accountId: string;\n servers: McpServer[];\n reason: string;\n configFile: string | null;\n configFormat: string | null;\n notes: string[];\n}\n\nexport interface McpScope {\n available: boolean;\n pinned: boolean;\n aliasRef: string | null;\n tenantRef: string | null;\n principalRef: string | null;\n reason: string;\n}\n\nexport interface McpSnapshot {\n sampledAt: string | null;\n seats: McpSeat[];\n machine: { servers: McpServer[]; configured: boolean; note: string };\n scope: McpScope | null;\n notes: string[];\n}\n\nexport interface CliHealthRow {\n accountId: string;\n label: string;\n provider: string;\n authentication: string;\n state: string;\n planType: string | null;\n reason: string;\n version: string | null;\n pinnedVersion: string | null;\n versionState: string;\n usageBlockedByPin: boolean;\n notes: string[];\n}\n\nexport interface CliHealthSnapshot {\n sampledAt: string | null;\n accounts: CliHealthRow[];\n driftDetected: boolean;\n notes: string[];\n}\n\n// ---------------------------------------------------------------------------\n// Narrowers\n// ---------------------------------------------------------------------------\n\nfunction record(value: unknown): Record<string, unknown> | null {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction text(value: unknown): string | null {\n return typeof value === 'string' ? value : null;\n}\n\nfunction strings(value: unknown): string[] {\n return Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : [];\n}\n\nfunction flag(value: unknown): boolean {\n return value === true;\n}\n\n/**\n * Narrow one server, forcing every env value to '<set>'.\n *\n * The redaction is re-applied rather than trusted. The server already did it;\n * doing it again here means no future server bug can turn this panel into a\n * secret printer, and it costs one map over at most a handful of keys.\n */\nexport function narrowServer(raw: unknown): McpServer | null {\n const row = record(raw);\n if (row === null) return null;\n const name = text(row[WIRE_SERVER_KEYS.name]);\n const command = text(row[WIRE_SERVER_KEYS.command]);\n if (name === null || command === null) return null;\n\n let env: Record<string, string> | null = null;\n const rawEnv = record(row[WIRE_SERVER_KEYS.env]);\n if (rawEnv !== null) {\n const keys = Object.keys(rawEnv);\n if (keys.length > 0) {\n env = {};\n for (const key of keys) env[key] = '<set>';\n }\n }\n\n return {\n name,\n command,\n args: strings(row[WIRE_SERVER_KEYS.args]),\n env,\n sourceRef: text(row[WIRE_SERVER_KEYS.sourceRef]) ?? '(unknown source)',\n };\n}\n\nfunction narrowSeat(raw: unknown): McpSeat | null {\n const row = record(raw);\n if (row === null) return null;\n const seatId = text(row[WIRE_SEAT_KEYS.seatId]);\n if (seatId === null) return null;\n const servers = Array.isArray(row[WIRE_SEAT_KEYS.servers])\n ? (row[WIRE_SEAT_KEYS.servers] as unknown[]).map(narrowServer).filter((s): s is McpServer => s !== null)\n : [];\n return {\n seatId,\n label: text(row[WIRE_SEAT_KEYS.label]) ?? seatId,\n engine: text(row[WIRE_SEAT_KEYS.engine]) ?? 'unknown',\n accountId: text(row[WIRE_SEAT_KEYS.accountId]) ?? seatId,\n servers,\n reason: text(row[WIRE_SEAT_KEYS.reason]) ?? 'unknown',\n configFile: text(row[WIRE_SEAT_KEYS.configFile]),\n configFormat: text(row[WIRE_SEAT_KEYS.configFormat]),\n notes: strings(row[WIRE_SEAT_KEYS.notes]),\n };\n}\n\nfunction narrowScope(raw: unknown): McpScope | null {\n const row = record(raw);\n if (row === null) return null;\n return {\n available: flag(row[WIRE_SCOPE_KEYS.available]),\n pinned: flag(row[WIRE_SCOPE_KEYS.pinned]),\n aliasRef: text(row[WIRE_SCOPE_KEYS.aliasRef]),\n tenantRef: text(row[WIRE_SCOPE_KEYS.tenantRef]),\n principalRef: text(row[WIRE_SCOPE_KEYS.principalRef]),\n reason: text(row[WIRE_SCOPE_KEYS.reason]) ?? 'unknown',\n };\n}\n\n/** Narrow GET /api/verse/mcp. Null when the body is not this shape at all. */\nexport function projectMcpSnapshot(raw: unknown): McpSnapshot | null {\n const row = record(raw);\n if (row === null) return null;\n if (!Array.isArray(row[WIRE_SNAPSHOT_KEYS.seats])) return null;\n\n const machine = record(row[WIRE_SNAPSHOT_KEYS.machine]);\n const machineServers = machine !== null && Array.isArray(machine[WIRE_MACHINE_KEYS.servers])\n ? (machine[WIRE_MACHINE_KEYS.servers] as unknown[]).map(narrowServer).filter((s): s is McpServer => s !== null)\n : [];\n\n return {\n sampledAt: text(row[WIRE_SNAPSHOT_KEYS.sampledAt]),\n seats: (row[WIRE_SNAPSHOT_KEYS.seats] as unknown[])\n .map(narrowSeat)\n .filter((s): s is McpSeat => s !== null),\n machine: {\n servers: machineServers,\n configured: machine !== null ? flag(machine[WIRE_MACHINE_KEYS.configured]) : machineServers.length > 0,\n note: (machine !== null ? text(machine[WIRE_MACHINE_KEYS.note]) : null) ?? '',\n },\n scope: narrowScope(row[WIRE_SNAPSHOT_KEYS.scope]),\n notes: strings(row[WIRE_SNAPSHOT_KEYS.notes]),\n };\n}\n\nfunction narrowHealthRow(raw: unknown): CliHealthRow | null {\n const row = record(raw);\n if (row === null) return null;\n const accountId = text(row[WIRE_HEALTH_KEYS.accountId]);\n if (accountId === null) return null;\n return {\n accountId,\n label: text(row[WIRE_HEALTH_KEYS.label]) ?? accountId,\n provider: text(row[WIRE_HEALTH_KEYS.provider]) ?? 'unknown',\n authentication: text(row[WIRE_HEALTH_KEYS.authentication]) ?? 'unknown',\n state: text(row[WIRE_HEALTH_KEYS.state]) ?? 'unknown',\n planType: text(row[WIRE_HEALTH_KEYS.planType]),\n reason: text(row[WIRE_HEALTH_KEYS.reason]) ?? 'unknown',\n // A missing version stays NULL. It is never coerced to a string, because\n // \"no reading\" and \"some version\" are different facts.\n version: text(row[WIRE_HEALTH_KEYS.version]),\n pinnedVersion: text(row[WIRE_HEALTH_KEYS.pinnedVersion]),\n versionState: text(row[WIRE_HEALTH_KEYS.versionState]) ?? 'unverified',\n usageBlockedByPin: flag(row[WIRE_HEALTH_KEYS.usageBlockedByPin]),\n notes: strings(row[WIRE_HEALTH_KEYS.notes]),\n };\n}\n\n/** Narrow GET /api/verse/mcp/cli-health. */\nexport function projectCliHealth(raw: unknown): CliHealthSnapshot | null {\n const row = record(raw);\n if (row === null) return null;\n if (!Array.isArray(row[WIRE_HEALTH_SNAPSHOT_KEYS.accounts])) return null;\n const accounts = (row[WIRE_HEALTH_SNAPSHOT_KEYS.accounts] as unknown[])\n .map(narrowHealthRow)\n .filter((a): a is CliHealthRow => a !== null);\n return {\n sampledAt: text(row[WIRE_HEALTH_SNAPSHOT_KEYS.sampledAt]),\n accounts,\n // Derived locally as well as read, so a server that forgot the flag still\n // renders the banner rather than silently hiding a drift.\n driftDetected:\n flag(row[WIRE_HEALTH_SNAPSHOT_KEYS.driftDetected]) ||\n accounts.some((account) => account.versionState === 'drift'),\n notes: strings(row[WIRE_HEALTH_SNAPSHOT_KEYS.notes]),\n };\n}\n\n// ---------------------------------------------------------------------------\n// Copy for the machine-readable reasons this surface renders\n// ---------------------------------------------------------------------------\n\n/**\n * Plain language for each seat reason. The CODE is still shown next to the\n * sentence — it is the thing to search for — but it is never the sentence.\n * Same split `usage/accounts-model.ts` uses for probe reasons.\n */\nexport const SEAT_REASON_COPY: Record<string, string> = {\n 'mcp-seat-isolated-by-adapter':\n 'Verse launches every turn on this seat with an empty MCP configuration, so it loads no MCP '\n + 'servers at all — whatever is configured elsewhere on this machine.',\n 'mcp-account-config-absent':\n 'This account has no MCP configuration file of its own, so it starts with none.',\n 'mcp-account-config-not-json':\n 'This account keeps its MCP servers in a TOML config that the provider CLI reads directly. '\n + 'Hub does not parse or rewrite it, so it cannot list what is in there.',\n 'mcp-account-config-read':\n 'Read from this account\\'s own private configuration.',\n 'mcp-account-config-unreadable':\n 'This account\\'s configuration could not be read, so nothing here is a reading.',\n 'mcp-account-profile-unresolved':\n 'This account\\'s private profile could not be located, so Hub cannot say what it would load.',\n};\n\nexport const SCOPE_REASON_COPY: Record<string, string> = {\n 'mcp-scope-locus-unavailable':\n 'Locus is not reachable on this machine, so writes are not attributable to a tenant.',\n 'mcp-scope-unpinned':\n 'Locus is running but nothing is pinned, so there is no tenant to scope a write to.',\n 'mcp-scope-seal-unverified':\n 'Locus reports a pin whose seal did not verify. Fix the pin before writing anything.',\n 'mcp-scope-expired': 'The Locus pin has expired.',\n 'mcp-scope-pinned': 'Writes are attributed to the pinned Locus tenant shown here.',\n};\n\n/** Prose for a code, or the caller's own sentence. NEVER the raw code alone. */\nexport function reasonSentence(\n copy: Record<string, string>,\n reason: string,\n fallback: string,\n): string {\n return copy[reason] ?? fallback;\n}\n","/**\n * routes/verse/apps/apps-model.ts — pure view-model for Apps & Accounts.\n *\n * The page has five groups (SPEC-310C §4), from three kinds of source:\n * ACCOUNTS the shared capacity rows (usage/capacity-strip-model.ts)\n * plus the actions each seat needs (Reconnect / Check again / Fix / Edit budget);\n * DESKTOP, TERMINAL AGENTS, LOCAL MODELS GET /api/verse/apps, as served;\n * MCP SERVERS GET /api/verse/mcp (what each seat would ACTUALLY load).\n * Everything that decides a word, a tone or whether a control is enabled\n * lives here, so it is unit-tested without a DOM.\n *\n * Pure: no React, no I/O.\n */\nimport type { VerseAppHealthState, VerseAppRow } from '../../../../core/verse/workbench-types.js';\nimport { ENGINE_MONOGRAM } from '../../../../core/verse/workbench-types.js';\nimport type { VerseBootstrap, VerseEngine, VerseSeat } from '../../../data/api-types.js';\nimport type { HealthTone } from '../health/health-model.js';\nimport type { McpSeat, McpServer, McpSnapshot } from '../mcp/mcp-contract.js';\nimport { reasonSentence, SEAT_REASON_COPY } from '../mcp/mcp-contract.js';\nimport type { AccountStatus, CapacityRow } from '../usage/capacity-strip-model.js';\n\n/** SPEC-310C §4 order. */\nexport const APPS_GROUP_ORDER = ['accounts', 'desktop', 'terminal-agents', 'local-models', 'mcp-servers'] as const;\nexport type AppsGroupId = (typeof APPS_GROUP_ORDER)[number];\n\nexport const APPS_GROUP_TITLE: Readonly<Record<AppsGroupId, string>> = {\n accounts: 'Accounts',\n desktop: 'Desktop',\n 'terminal-agents': 'Terminal agents',\n 'local-models': 'Local models',\n 'mcp-servers': 'MCP servers',\n};\n\nconst HEALTH_TONE: Readonly<Record<VerseAppHealthState, HealthTone | 'off'>> = {\n ok: 'success',\n warn: 'warning',\n error: 'danger',\n off: 'off',\n unknown: 'neutral',\n};\n\n/** A row's dot tone. `off` is its own quiet state (not installed, switched off) — never a fault. */\nexport function appHealthTone(state: VerseAppHealthState): HealthTone | 'off' {\n return HEALTH_TONE[state];\n}\n\nconst VERSE_ENGINES: readonly VerseEngine[] = ['claude', 'codex', 'grok', 'local'];\n\nexport function asEngine(value: string): VerseEngine | null {\n return (VERSE_ENGINES as readonly string[]).includes(value) ? (value as VerseEngine) : null;\n}\n\n// ---------------------------------------------------------------------------\n// Launch targets\n// ---------------------------------------------------------------------------\n\nexport interface LaunchProject {\n path: string;\n name: string;\n}\n\nfunction baseName(path: string): string {\n const trimmed = path.replace(/\\/+$/, '');\n const i = trimmed.lastIndexOf('/');\n return i === -1 ? trimmed : trimmed.slice(i + 1) || trimmed;\n}\n\n/**\n * Where a Launch may start, most relevant first: the folders of the most\n * recently used chats (the \"current project\"), then every discovered project.\n * The server re-checks each against the same two sources, so this list is a\n * convenience, never the gate.\n */\nexport function launchProjects(bootstrap: Pick<VerseBootstrap, 'sessions' | 'projects'> | undefined): LaunchProject[] {\n if (!bootstrap) return [];\n const out: LaunchProject[] = [];\n const seen = new Set<string>();\n const add = (path: string, name?: string) => {\n if (typeof path !== 'string' || path.length === 0 || seen.has(path)) return;\n seen.add(path);\n out.push({ path, name: name ?? baseName(path) });\n };\n const recent = [...bootstrap.sessions].sort((a, b) => Date.parse(b.updatedAt) - Date.parse(a.updatedAt));\n for (const s of recent) add(s.projectPath);\n for (const p of bootstrap.projects) add(p.path, p.name);\n return out;\n}\n\n/** Ollama tags the local seats run — the model choices for `ollama launch <id> --model`. */\nexport function localModelTags(seats: readonly VerseSeat[]): string[] {\n const out: string[] = [];\n for (const seat of seats) {\n if (seat.engine !== 'local') continue;\n const tag = seat.models[0]?.id ?? (seat.id.startsWith('local:') ? seat.id.slice('local:'.length) : null);\n if (tag && !out.includes(tag)) out.push(tag);\n }\n return out;\n}\n\nexport type LaunchVia = 'native' | 'ollama';\n\nexport interface LaunchChoice {\n via: LaunchVia;\n model: string | null;\n}\n\n/** The argv a launch choice runs, as the operator would type it. */\nexport function launchCommand(row: VerseAppRow, choice: LaunchChoice): string[] | null {\n if (choice.via === 'ollama') {\n if (!row.ollamaLaunch) return null;\n return choice.model ? [...row.ollamaLaunch, '--model', choice.model] : [...row.ollamaLaunch];\n }\n return row.actions.find((a) => a.kind === 'launch')?.command ?? null;\n}\n\n// ---------------------------------------------------------------------------\n// Accounts\n// ---------------------------------------------------------------------------\n\nexport type AccountActionKind = 'reconnect' | 'check-again' | 'fix' | 'edit-budget';\n\nexport interface AccountAction {\n kind: AccountActionKind;\n label: string;\n /** Fix only: the command the dialog shows. */\n command: string[] | null;\n /** Primary = the one thing this seat needs now. */\n primary: boolean;\n}\n\n/** Statuses a fresh health sweep can change on its own: offer \"Check again\" for them. */\nconst RECHECKABLE: ReadonlySet<AccountStatus['kind']> = new Set(['spent', 'not-checked', 'unavailable']);\n\n/**\n * What a seat row offers, the one it needs most first:\n * Reconnect signed out or sign-in expiring (the provider's own login, in Terminal);\n * Check again spent, not checked, or unavailable — a zero-cost health sweep\n * is what moves those (pass the row's SETTLED status, so the\n * button stays put while its own check runs);\n * Fix A2 has a command for what is wrong (a re-pin);\n * Edit budget every paid seat.\n * Local rows need none of these.\n */\nexport function accountActions(row: CapacityRow, status?: AccountStatus | null): AccountAction[] {\n if (row.kind === 'local') return [];\n const out: AccountAction[] = [];\n const c = row.connection;\n const needsLogin = row.signedOut\n || (c !== null && (c.connection === 'signed-out' || c.connection === 'expiring' || c.fixKind === 'reauth'));\n if (needsLogin) out.push({ kind: 'reconnect', label: 'Reconnect', command: null, primary: true });\n const recheck = !needsLogin && status != null && RECHECKABLE.has(status.kind);\n if (recheck) out.push({ kind: 'check-again', label: 'Check again', command: null, primary: true });\n if (c !== null && c.fixKind !== 'reauth' && c.fixKind !== 'none' && c.fixCommand !== null) {\n out.push({ kind: 'fix', label: 'Fix', command: c.fixCommand, primary: !needsLogin && !recheck });\n }\n out.push({ kind: 'edit-budget', label: 'Edit budget', command: null, primary: false });\n return out;\n}\n\n// ---------------------------------------------------------------------------\n// MCP\n// ---------------------------------------------------------------------------\n\nexport interface McpSeatRow {\n seatId: string;\n label: string;\n engine: VerseEngine | null;\n monogram: string;\n servers: McpServer[];\n /** \"loads 2 servers\", \"loads none — isolated by Verse\". */\n loads: string;\n isolated: boolean;\n /** Plain language for the seat's reason; the code rides beside it. */\n sentence: string;\n reason: string;\n notes: string[];\n}\n\nexport function mcpSeatRows(snapshot: McpSnapshot): McpSeatRow[] {\n return snapshot.seats.map((seat: McpSeat) => {\n const engine = asEngine(seat.engine);\n const isolated = seat.reason === 'mcp-seat-isolated-by-adapter';\n const n = seat.servers.length;\n return {\n seatId: seat.seatId,\n label: seat.label,\n engine,\n monogram: engine ? ENGINE_MONOGRAM[engine] : seat.label.slice(0, 1).toUpperCase(),\n servers: seat.servers,\n loads: n > 0 ? `loads ${n} server${n === 1 ? '' : 's'}` : isolated ? 'loads none — isolated by Verse' : 'loads none',\n isolated,\n sentence: reasonSentence(SEAT_REASON_COPY, seat.reason, 'Hub cannot say what this seat would load.'),\n reason: seat.reason,\n notes: seat.notes,\n };\n });\n}\n\n/** Where an Add can write: the hub registry, and each account whose config is JSON. */\nexport interface McpTargetOption {\n id: string;\n label: string;\n /** Why this target cannot take a write, or null. */\n disabledReason: string | null;\n}\n\nexport function mcpTargets(snapshot: McpSnapshot | null): McpTargetOption[] {\n const out: McpTargetOption[] = [{ id: 'hub', label: 'Hub gateway registry', disabledReason: null }];\n for (const seat of snapshot?.seats ?? []) {\n if (seat.seatId === 'local') continue;\n // An isolated (Claude) account CAN be written — Claude Code in a terminal\n // reads it — and the form says a Verse chat on it still loads nothing.\n const toml = seat.configFormat === 'toml' || seat.reason === 'mcp-account-config-not-json';\n out.push({\n id: `account:${seat.accountId}`,\n label: `${seat.label} (${seat.engine})`,\n disabledReason: toml ? 'Keeps its MCP servers in TOML, which Hub does not rewrite.' : null,\n });\n }\n return out;\n}\n\n/** Split `a \"b c\" d` into argv the way a shell would, for the Add form's arguments field. */\nexport function splitArgs(text: string): string[] {\n const out: string[] = [];\n let current = '';\n let quote: '\"' | \"'\" | null = null;\n let has = false;\n for (const ch of text) {\n if (quote) {\n if (ch === quote) quote = null;\n else current += ch;\n continue;\n }\n if (ch === '\"' || ch === \"'\") {\n quote = ch;\n has = true;\n continue;\n }\n if (/\\s/.test(ch)) {\n if (has || current.length > 0) out.push(current);\n current = '';\n has = false;\n continue;\n }\n current += ch;\n }\n if (has || current.length > 0) out.push(current);\n return out;\n}\n\n/** `KEY=value` lines → an env object; the first bad line is reported, never guessed. */\nexport function parseEnvLines(text: string): { ok: true; env: Record<string, string> } | { ok: false; error: string } {\n const env: Record<string, string> = {};\n for (const raw of text.split(/\\r?\\n/)) {\n const line = raw.trim();\n if (line.length === 0 || line.startsWith('#')) continue;\n const eq = line.indexOf('=');\n const key = eq === -1 ? '' : line.slice(0, eq).trim();\n if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) return { ok: false, error: `“${line.slice(0, 40)}” is not KEY=value.` };\n env[key] = line.slice(eq + 1);\n }\n return { ok: true, env };\n}\n","/**\n * routes/verse/apps/AppRow.tsx — one row, the Ollama-style shape every group\n * shares (SPEC-310C §4): a 32px monogram tile, the name (and version), a\n * one-line description, a health dot WITH a word, and on the right a copy\n * pill, a toggle or an action. At the compact width the right side wraps\n * under the description (container query in Apps.module.css).\n */\nimport type { ReactNode } from 'react';\nimport type { VerseEngine } from '../../../data/api-types.js';\nimport type { HealthTone } from '../health/health-model.js';\nimport { MonogramTile } from './MonogramTile.js';\nimport styles from './Apps.module.css';\n\nexport function HealthWord({ tone, label }: { tone: HealthTone | 'off'; label: string }) {\n return (\n <span className={styles.health} data-tone={tone}>\n <span className={styles.healthDot} aria-hidden=\"true\" />\n {label}\n </span>\n );\n}\n\nexport interface AppRowProps {\n /** DOM id prefix; the row's name gets `${id}-name` so controls can reference it. */\n id: string;\n name: string;\n monogram: string;\n engine: VerseEngine | null;\n description: string;\n version?: string | null;\n health: { tone: HealthTone | 'off'; label: string };\n detail?: ReactNode;\n aside?: ReactNode;\n children?: ReactNode;\n}\n\nexport function AppRow({ id, name, monogram, engine, description, version, health, detail, aside, children }: AppRowProps) {\n return (\n <li className={styles.row} data-app={id}>\n <MonogramTile monogram={monogram} engine={engine} />\n <div className={styles.rowMain}>\n <div className={styles.rowHead}>\n <span id={`${id}-name`} className={styles.rowName}>{name}</span>\n {version ? <span className={styles.rowVersion}>{version}</span> : null}\n <HealthWord tone={health.tone} label={health.label} />\n </div>\n <p className={styles.rowDesc}>{description}</p>\n {detail ? <p className={styles.rowDetail}>{detail}</p> : null}\n {children}\n </div>\n {aside ? <div className={styles.rowAside}>{aside}</div> : null}\n </li>\n );\n}\n\n/** A labelled group: micro-label title, an optional standing caveat, and a card of rows. */\nexport function AppGroup({\n id,\n title,\n caveat,\n action,\n children,\n headingRef,\n}: {\n id: string;\n title: string;\n caveat?: ReactNode;\n action?: ReactNode;\n children: ReactNode;\n headingRef?: React.Ref<HTMLHeadingElement>;\n}) {\n const headingId = `apps-group-${id}`;\n return (\n <section className={styles.group} aria-labelledby={headingId} data-group={id}>\n <div className={styles.groupHead}>\n <h3 id={headingId} ref={headingRef} tabIndex={-1} className={styles.groupTitle}>{title}</h3>\n {action}\n </div>\n {caveat ? <p className={styles.caveat}>{caveat}</p> : null}\n <div className={styles.card}>{children}</div>\n </section>\n );\n}\n","/**\n * routes/verse/apps/CopyPill.tsx — a command you can read and copy in one\n * click (SPEC-310C §4: \"a copy pill, ⧉ turns into ✓ for 1.2s\").\n *\n * The command is shown IN FULL in mono on the code background — the operator\n * reads what they are about to paste. The button's accessible name says what\n * it copies; the confirmation is announced through a polite live region, not\n * only drawn, so a screen-reader user hears \"Copied\" too.\n *\n * Clipboard: the async API where the page is allowed it (a secure context,\n * which the desktop webview and localhost are), else a hidden-textarea copy.\n * A copy that fails says so instead of showing a check.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { IconCheck, IconCopy } from '../../../components/primitives/icons.js';\nimport styles from './Apps.module.css';\n\n/** SPEC-310C §4. */\nexport const COPY_CONFIRM_MS = 1_200;\n\nexport async function copyText(text: string): Promise<boolean> {\n try {\n if (typeof navigator !== 'undefined' && navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {\n await navigator.clipboard.writeText(text);\n return true;\n }\n } catch {\n // fall through to the textarea path\n }\n if (typeof document === 'undefined') return false;\n const area = document.createElement('textarea');\n area.value = text;\n area.setAttribute('readonly', '');\n area.style.position = 'fixed';\n area.style.opacity = '0';\n document.body.appendChild(area);\n area.select();\n let ok = false;\n try {\n ok = typeof document.execCommand === 'function' && document.execCommand('copy');\n } catch {\n ok = false;\n }\n area.remove();\n return ok;\n}\n\nexport function CopyPill({ text, label, what }: { text: string; label?: string; /** \"the Codex launch command\" */ what: string }) {\n const [state, setState] = useState<'idle' | 'copied' | 'failed'>('idle');\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(() => () => { if (timer.current) clearTimeout(timer.current); }, []);\n\n const onCopy = async () => {\n const ok = await copyText(text);\n setState(ok ? 'copied' : 'failed');\n if (timer.current) clearTimeout(timer.current);\n timer.current = setTimeout(() => setState('idle'), COPY_CONFIRM_MS);\n };\n\n return (\n <span className={styles.pillWrap}>\n <button\n type=\"button\"\n className={styles.pill}\n data-state={state}\n onClick={() => void onCopy()}\n aria-label={`Copy ${what}: ${text}`}\n title={`Copy: ${text}`}\n >\n <code className={styles.pillText}>{label ?? text}</code>\n <span className={styles.pillIcon} aria-hidden=\"true\">\n {state === 'copied' ? <IconCheck size={14} /> : <IconCopy size={14} />}\n </span>\n </button>\n <span className={styles.visuallyHidden} role=\"status\" aria-live=\"polite\">\n {state === 'copied' ? 'Copied' : state === 'failed' ? 'Copy failed — select the command and copy it yourself' : ''}\n </span>\n </span>\n );\n}\n","/**\n * routes/verse/apps/launch.ts — where a [Launch ▸] goes.\n *\n * Two homes for the agent's terminal:\n * - INSIDE Verse: a tab in the chat dock's Terminal (C4's pane, C2's dock),\n * in the folder of the chat you have open. Needs the desktop app (the\n * sidecar's Bun PTY — GET /api/verse/terminal says `available`), the\n * Terminal pane to have landed in this build, and an open chat to host it.\n * - Terminal.app: POST /api/verse/apps/:id/launch, in the folder you chose.\n * Works from a plain browser too (macOS).\n *\n * In-Verse launch rides the dock's own one-shot request (dock-store.ts\n * `requestTerminal`): `{ appId }`, plus `{ via, model }` for an Ollama launch\n * (the contract fields on VerseTerminalCreateRequest). The server resolves\n * the command itself — the catalog's own argv, or `ollama launch <id>\n * [--model <tag>]` through the same `resolveAppLaunch` Apps' Terminal.app\n * launch uses, which refuses an agent that is not installed, an Ollama that\n * does not list it, or a tag it does not have — and RUNS it in the new tab.\n * Nothing typed comes from the page; the dialog shows that exact command\n * before the click. (Until 3.10.1 a model launch was only pasted, because\n * the request had no model field.)\n */\nimport { shellCommandText } from '../health/health-model.js';\nimport { requestTerminal } from '../dock/dock-store.js';\nimport { isSlotAvailable } from '../shell/slots.js';\nimport { setVerseSection } from '../verse-ui-store.js';\nimport type { LaunchChoice } from './apps-model.js';\n\n/** An argv as the operator would type it (the same quoting the health banner uses). */\nexport const commandText = shellCommandText;\n\nexport interface InVerseAvailability {\n available: boolean;\n /** Why not, in operator language; null when available. */\n reason: string | null;\n}\n\nexport function inVerseAvailability(input: {\n terminalAvailable: boolean | null;\n terminalReason: string | null;\n activeSessionId: string | null;\n slotLanded?: boolean;\n}): InVerseAvailability {\n const landed = input.slotLanded ?? isSlotAvailable('terminal-pane');\n if (!landed) return { available: false, reason: 'This build has no Verse terminal yet.' };\n if (input.terminalAvailable !== true) {\n return { available: false, reason: input.terminalReason ?? 'The Verse terminal needs the desktop app.' };\n }\n if (input.activeSessionId === null) return { available: false, reason: 'Open a chat first — its terminal hosts the agent.' };\n return { available: true, reason: null };\n}\n\n/** Open the agent in a new dock terminal tab and bring Chat forward. */\nexport function launchInVerse(appId: string, choice: LaunchChoice): void {\n if (choice.via === 'native' && choice.model === null) {\n requestTerminal({ newTab: true, appId });\n } else {\n // A model is an Ollama tag: it only ever launches through Ollama.\n requestTerminal({ newTab: true, appId, via: 'ollama', ...(choice.model !== null ? { model: choice.model } : {}) });\n }\n // The request waits in the dock store until Chat serves it (ChatSection\n // clears requests only on a chat SWITCH, not on its first mount).\n setVerseSection('chat');\n}\n","/**\n * routes/verse/apps/AccountsGroup.tsx — ACCOUNTS: every seat's plan,\n * connection (A2), 5-hour and weekly windows with their resets, and how much\n * is \"Reserved for you\" (A9) — the shared CapacityStrip in its accounts mode —\n * plus the one thing each seat needs from you.\n *\n * Every row leads with a status an operator can read at a glance —\n * \"Connected · usable now\", \"Spent · resets Fri 11:46 PM\" (and \"usable again\n * in 7h 12m\"), \"Signed out · reconnect to use it\", \"Checking…\" — says when it\n * was last checked, and usable accounts come first.\n *\n * Reconnect the provider's own sign-in, opened in Terminal by the health\n * route (Verse never sees a credential);\n * Check again a zero-cost health sweep (status commands only), for a seat\n * that is spent, unread or unavailable — run here, behind the\n * mutation-token gate, with the row reading \"Checking…\";\n * Fix the command A2 says fixes it (a CLI re-pin), shown to copy —\n * never run for you;\n * Edit budget A9's BudgetControl in a sheet.\n */\nimport { useId, useRef, useState } from 'react';\nimport type { BudgetView } from '../../../../core/routing/policy.js';\nimport type { SeatHealthReport } from '../../../../core/verse/health-types.js';\nimport type { VerseSeat } from '../../../data/api-types.js';\nimport { MutationTokenDialog } from '../../../components/auth/MutationTokenDialog.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { Dialog } from '../../../components/primitives/Dialog.js';\nimport { Sheet } from '../../../components/primitives/Sheet.js';\nimport { BudgetControl } from '../budget/BudgetControl.js';\nimport { describeContextError, useTokenGate } from '../context/use-token-gate.js';\nimport { refreshSeatHealth } from '../health/health-queries.js';\nimport { CapacityStrip } from '../usage/CapacityStrip.js';\nimport { accountStatus, type CapacityRow } from '../usage/capacity-strip-model.js';\nimport { accountActions } from './apps-model.js';\nimport { AppGroup } from './AppRow.js';\nimport { CopyPill } from './CopyPill.js';\nimport { commandText } from './launch.js';\nimport styles from './Apps.module.css';\n\nexport const ACCOUNTS_EMPTY_TEXT =\n 'No accounts connected yet. Sign in to Claude Code, Codex or Grok in a terminal, or start Ollama for local models — they show up here within a minute.';\n\nexport function AccountsGroup({\n seats,\n health,\n budget,\n loading,\n reconnecting,\n onReconnect,\n now,\n}: {\n seats: readonly VerseSeat[];\n health: readonly SeatHealthReport[] | null;\n budget: BudgetView | null;\n loading: boolean;\n /** Seat whose sign-in window is being opened. */\n reconnecting: string | null;\n onReconnect: (row: CapacityRow) => void;\n /** Injected clock for tests. */\n now?: number;\n}) {\n const [fixing, setFixing] = useState<CapacityRow | null>(null);\n const [budgetOpen, setBudgetOpen] = useState(false);\n const [checking, setChecking] = useState<string | null>(null);\n const [note, setNote] = useState<{ tone: 'neutral' | 'danger'; text: string } | null>(null);\n const gate = useTokenGate();\n const fixTitle = useId();\n const sheetTitle = useId();\n const closeRef = useRef<HTMLButtonElement>(null);\n const healthRead = health !== null;\n\n const checkAgain = async (row: CapacityRow) => {\n setChecking(row.seatId);\n setNote(null);\n try {\n const done = await gate.run(`Check ${row.label} again (status commands only — nothing is spent)`, () => refreshSeatHealth());\n if (done) setNote({ tone: 'neutral', text: `Checked ${row.label} again.` });\n } catch (err) {\n setNote({ tone: 'danger', text: describeContextError(err) });\n } finally {\n setChecking(null);\n }\n };\n\n return (\n <AppGroup\n id=\"accounts\"\n title=\"Accounts\"\n caveat=\"Which accounts you can use now, which are spent and when they reset, and how much autonomy leaves for you.\"\n >\n {loading ? (\n <p className={styles.loadingLine} aria-busy=\"true\">Reading accounts…</p>\n ) : (\n <CapacityStrip\n seats={seats}\n health={health}\n budget={budget}\n labelledBy=\"apps-group-accounts\"\n emptyText={ACCOUNTS_EMPTY_TEXT}\n accounts={{ healthRead, checkingSeatId: checking, ...(now !== undefined ? { now } : {}) }}\n renderActions={(row) =>\n // Actions come from the SETTLED status, so \"Check again\" stays in\n // place (busy) while its own check runs instead of vanishing.\n accountActions(row, accountStatus(row, { healthRead, ...(now !== undefined ? { now } : {}) })).map((action) => (\n <Button\n key={action.kind}\n size=\"sm\"\n variant={action.primary && action.kind !== 'edit-budget' ? 'primary' : 'ghost'}\n busy={(action.kind === 'reconnect' && reconnecting === row.seatId) || (action.kind === 'check-again' && checking === row.seatId)}\n aria-label={`${action.label}: ${row.label}`}\n onClick={() => {\n if (action.kind === 'reconnect') onReconnect(row);\n else if (action.kind === 'check-again') void checkAgain(row);\n else if (action.kind === 'fix') setFixing(row);\n else setBudgetOpen(true);\n }}\n >\n {action.label}\n </Button>\n ))\n }\n />\n )}\n\n <p className={note ? styles.accountsNote : styles.visuallyHidden} data-tone={note?.tone} role=\"status\" aria-live=\"polite\">\n {note?.text ?? ''}\n </p>\n\n {fixing !== null && fixing.connection?.fixCommand ? (\n <Dialog\n open\n onClose={() => setFixing(null)}\n titleId={fixTitle}\n title={`Fix ${fixing.label}`}\n description={fixing.connection.word}\n initialFocusRef={closeRef}\n >\n <div className={styles.dialogBody}>\n {fixing.connection.reasons.map((reason) => <p key={reason}>{reason}</p>)}\n <div className={styles.commandBlock}>\n <span className={styles.commandLabel}>Run this in a terminal</span>\n <CopyPill text={commandText(fixing.connection.fixCommand)} what={`the fix for ${fixing.label}`} />\n </div>\n <p>Verse shows the command and never runs it for you: it changes which CLI this seat is pinned to.</p>\n <div className={styles.dialogActions}>\n <Button ref={closeRef} variant=\"subtle\" onClick={() => setFixing(null)}>Done</Button>\n </div>\n </div>\n </Dialog>\n ) : null}\n\n <Sheet\n open={budgetOpen}\n onClose={() => setBudgetOpen(false)}\n titleId={sheetTitle}\n title=\"Budget\"\n description=\"How much of each seat autonomy may use, and how much is kept for you.\"\n width={560}\n >\n {budgetOpen ? <BudgetControl /> : null}\n </Sheet>\n\n <MutationTokenDialog\n open={gate.dialog.open}\n reason={gate.dialog.reason}\n tokenLabel=\"Mutation token\"\n tokenHelp=\"the mutation token ashlr verse printed\"\n onClose={gate.dialog.onClose}\n onUnlocked={gate.dialog.onUnlocked}\n />\n </AppGroup>\n );\n}\n","/**\n * routes/verse/apps/apps-queries.ts — the reads and writes behind Apps &\n * Accounts (server: core/verse/apps-api.ts; C4's terminal for availability).\n *\n * Reads are OPTIONAL (the Usage/MCP convention): a server without the route\n * answers 404, which means \"this group has no source here\", not \"Verse is\n * broken\" — the page still renders Accounts and MCP from their own routes.\n * A 401 still propagates: an expired read session is the whole surface's\n * problem, not one group's.\n *\n * Writes pull the held mutation token and touch the hold on success. Nothing\n * here spends: refresh re-runs status commands, and toggle/launch open a\n * visible Terminal window that the operator drives.\n */\nimport type { VerseAppsResponse, VerseTerminalListResponse } from '../../../../core/verse/workbench-types.js';\nimport { VERSE_APPS_PATH, VERSE_TERMINAL_PATH } from '../../../../core/verse/workbench-types.js';\nimport { getMutationToken, touchMutationHold } from '../../../data/auth-store.js';\nimport { refetchQuery } from '../../../data/cache.js';\nimport { ApiError, apiGet, apiPost } from '../../../data/client.js';\nimport type { QueryDef } from '../../../data/queries.js';\nimport { oneShotFetcher } from '../health/health-queries.js';\nimport { VerseMutationLockedError } from '../verse-queries.js';\n\nexport const APPS_KEY = 'verse-apps';\nexport const TERMINAL_STATUS_KEY = 'verse-terminal-status';\n\nexport type OptionalResult<T> =\n | { available: true; data: T }\n | { available: false; reason: string };\n\nasync function optional<T>(path: string, signal?: AbortSignal): Promise<OptionalResult<T>> {\n try {\n return { available: true, data: await apiGet<T>(path, signal) };\n } catch (err) {\n if (err instanceof ApiError && err.status === 401) throw err;\n if (err instanceof DOMException && err.name === 'AbortError') throw err;\n if (err instanceof ApiError && err.status === 404) {\n return { available: false, reason: 'This server is older than Apps & Accounts, so desktop, terminal and local rows are not available.' };\n }\n return { available: false, reason: err instanceof ApiError ? `The apps check answered HTTP ${err.status}.` : 'The apps check could not be reached.' };\n }\n}\n\n/** GET /api/verse/apps — cached on the server; cheap to read. */\nexport const appsQuery: QueryDef<OptionalResult<VerseAppsResponse>> = {\n key: APPS_KEY,\n fetch: (signal) => optional<VerseAppsResponse>(VERSE_APPS_PATH, signal),\n};\n\n/**\n * GET /api/verse/terminal (C4). Only `available` matters here: whether a\n * Launch can open INSIDE Verse (the desktop app's Bun PTY) or has to go to\n * Terminal.app. Absent route = not available.\n */\nexport const terminalStatusQuery: QueryDef<OptionalResult<VerseTerminalListResponse>> = {\n key: TERMINAL_STATUS_KEY,\n fetch: (signal) => optional<VerseTerminalListResponse>(VERSE_TERMINAL_PATH, signal),\n};\n\nasync function post<T>(path: string, body: unknown): Promise<T> {\n const token = getMutationToken();\n if (!token) throw new VerseMutationLockedError();\n const result = await apiPost<T>(path, body, token);\n touchMutationHold();\n return result;\n}\n\n/** Re-ask the login shell for PATH and re-probe every row; every reader sees the result. */\nexport async function refreshApps(): Promise<VerseAppsResponse> {\n const body = await post<VerseAppsResponse>(`${VERSE_APPS_PATH}/refresh`, {});\n await refetchQuery(\n APPS_KEY,\n oneShotFetcher(() => Promise.resolve({ available: true as const, data: body }), () => appsQuery.fetch()),\n true,\n );\n return body;\n}\n\nexport interface AppActionResponse {\n ok: true;\n opened: 'terminal-app';\n /** The command as the operator would type it. */\n command: string[];\n}\n\n/**\n * Flip a desktop switch. `confirm: true` is sent ONLY from the confirmation\n * dialog, after the operator saw both commands; the server refuses anything\n * else.\n */\nexport async function toggleDesktopApp(appId: string, enabled: boolean): Promise<AppActionResponse> {\n const result = await post<AppActionResponse>(`${VERSE_APPS_PATH}/${encodeURIComponent(appId)}/toggle`, { enabled, confirm: true });\n void refetchQuery(APPS_KEY, () => appsQuery.fetch(), true);\n return result;\n}\n\nexport interface LaunchInTerminalAppRequest {\n root: string;\n via?: 'native' | 'ollama';\n model?: string | null;\n}\n\n/** Open the agent in a Terminal.app window, in `root`. */\nexport function launchInTerminalApp(appId: string, request: LaunchInTerminalAppRequest): Promise<AppActionResponse> {\n return post<AppActionResponse>(`${VERSE_APPS_PATH}/${encodeURIComponent(appId)}/launch`, {\n root: request.root,\n ...(request.via ? { via: request.via } : {}),\n ...(request.model ? { model: request.model } : {}),\n });\n}\n","/**\n * routes/verse/apps/DesktopToggleDialog.tsx — the confirmation in front of a\n * desktop switch (SPEC-310C §4: \"Turning either on needs a confirmation that\n * shows the command and --restore\").\n *\n * These switches change ANOTHER app's settings (Claude Desktop, Hermes\n * Desktop), so the dialog shows exactly what will run and exactly how to undo\n * it, and says where it runs: a Terminal window, where the tool's own prompts\n * are answered by the operator — Verse never answers them. Turning Claude\n * Desktop ON carries the recommendation against it (SPEC-310C §0.5).\n */\nimport { useId, useRef } from 'react';\nimport type { VerseAppRow } from '../../../../core/verse/workbench-types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { Dialog } from '../../../components/primitives/Dialog.js';\nimport { commandText } from './launch.js';\nimport { CopyPill } from './CopyPill.js';\nimport styles from './Apps.module.css';\n\nexport function DesktopToggleDialog({\n row,\n enable,\n busy,\n error,\n onCancel,\n onConfirm,\n}: {\n row: VerseAppRow | null;\n /** The direction asked for: true = switch on, false = restore. */\n enable: boolean;\n busy: boolean;\n error: string | null;\n onCancel: () => void;\n onConfirm: () => void;\n}) {\n const titleId = useId();\n const cancelRef = useRef<HTMLButtonElement>(null);\n if (row === null || row.toggle === null) return null;\n const run = enable ? row.toggle.command : row.toggle.restoreCommand;\n const undo = enable ? row.toggle.restoreCommand : row.toggle.command;\n const title = enable ? `Turn on “${row.description}”?` : `Restore ${row.name}?`;\n return (\n <Dialog\n open\n onClose={onCancel}\n titleId={titleId}\n title={title}\n initialFocusRef={cancelRef}\n description={enable ? `This changes ${row.name}’s own settings until you restore it.` : `This puts ${row.name} back on its own defaults.`}\n >\n <div className={styles.dialogBody}>\n {row.detail ? <p>{row.detail}</p> : null}\n {enable && row.id === 'claude-desktop' ? (\n <p>\n Recommended: leave this off. Claude Desktop would run local models instead of its own, and Verse’s local\n seats already use Ollama.\n </p>\n ) : null}\n <div className={styles.commandBlock}>\n <span className={styles.commandLabel}>Runs</span>\n <CopyPill text={commandText(run)} what=\"the command this runs\" />\n </div>\n <div className={styles.commandBlock}>\n <span className={styles.commandLabel}>{enable ? 'Undo later with' : 'Turn back on with'}</span>\n <CopyPill text={commandText(undo)} what={enable ? 'the restore command' : 'the command that turns it on'} />\n </div>\n <p>\n It opens in a Terminal window so you can answer its prompts. Verse does not answer them for you, and nothing\n changes until you do.\n </p>\n {error ? <p className={styles.error} role=\"alert\">{error}</p> : null}\n <div className={styles.dialogActions}>\n <Button ref={cancelRef} variant=\"subtle\" onClick={onCancel}>Cancel</Button>\n <Button variant={enable ? 'danger' : 'primary'} busy={busy} onClick={onConfirm}>\n {enable ? 'Open in Terminal' : 'Restore in Terminal'}\n </Button>\n </div>\n </div>\n </Dialog>\n );\n}\n","/**\n * routes/verse/apps/LaunchDialog.tsx — the options behind [Launch ▾]: which\n * folder, the agent's own command or `ollama launch <id>`, which local model,\n * and where (a Verse terminal tab, or Terminal.app).\n *\n * The exact command is always on screen before anything opens. The plain\n * [Launch] button beside it skips this dialog with the defaults (the agent's\n * own command, your current chat or most recent project).\n */\nimport { useEffect, useId, useMemo, useRef, useState } from 'react';\nimport type { VerseAppRow } from '../../../../core/verse/workbench-types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { Dialog } from '../../../components/primitives/Dialog.js';\nimport { Select } from '../../../components/primitives/Select.js';\nimport { launchCommand, type LaunchChoice, type LaunchProject, type LaunchVia } from './apps-model.js';\nimport { CopyPill } from './CopyPill.js';\nimport { commandText, type InVerseAvailability } from './launch.js';\nimport styles from './Apps.module.css';\n\nexport type LaunchTarget = 'verse' | 'terminal-app';\n\nexport interface LaunchRequest {\n choice: LaunchChoice;\n target: LaunchTarget;\n /** Terminal.app only; a Verse tab opens in the open chat's folder. */\n root: string | null;\n command: string[];\n}\n\nexport function LaunchDialog({\n row,\n projects,\n models,\n inVerse,\n busy,\n error,\n onCancel,\n onLaunch,\n}: {\n row: VerseAppRow | null;\n projects: readonly LaunchProject[];\n /** Ollama tags the local seats run. */\n models: readonly string[];\n inVerse: InVerseAvailability;\n busy: boolean;\n error: string | null;\n onCancel: () => void;\n onLaunch: (request: LaunchRequest) => void;\n}) {\n const titleId = useId();\n const firstRef = useRef<HTMLInputElement>(null);\n const [via, setVia] = useState<LaunchVia>('native');\n const [model, setModel] = useState<string>('');\n const [root, setRoot] = useState<string>(projects[0]?.path ?? '');\n\n // A new row opens with fresh defaults.\n useEffect(() => {\n setVia('native');\n setModel('');\n setRoot(projects[0]?.path ?? '');\n // eslint-disable-next-line react-hooks/exhaustive-deps -- reset per opened row only\n }, [row?.id]);\n\n const choice: LaunchChoice = { via, model: via === 'ollama' && model !== '' ? model : null };\n const command = useMemo(() => (row ? launchCommand(row, choice) : null), [row, choice.via, choice.model]); // eslint-disable-line react-hooks/exhaustive-deps\n if (row === null) return null;\n const nativeCommand = launchCommand(row, { via: 'native', model: null });\n const ollamaCommand = row.ollamaLaunch;\n const radioName = `${titleId}-via`;\n const canTerminalApp = root !== '';\n\n return (\n <Dialog\n open\n onClose={onCancel}\n titleId={titleId}\n title={`Launch ${row.name}`}\n description=\"Nothing starts until you choose where.\"\n initialFocusRef={firstRef}\n >\n <div className={styles.dialogBody}>\n <fieldset className={styles.fieldset}>\n <legend className={styles.legend}>Run</legend>\n {nativeCommand ? (\n <label className={styles.radio}>\n <input ref={firstRef} type=\"radio\" name={radioName} checked={via === 'native'} onChange={() => setVia('native')} />\n <code className={styles.inlineCode}>{commandText(nativeCommand)}</code>\n <span className={styles.hint}>its own command</span>\n </label>\n ) : null}\n {ollamaCommand ? (\n <label className={styles.radio}>\n <input type=\"radio\" name={radioName} checked={via === 'ollama'} onChange={() => setVia('ollama')} />\n <code className={styles.inlineCode}>{commandText(ollamaCommand)}</code>\n <span className={styles.hint}>through Ollama</span>\n </label>\n ) : null}\n </fieldset>\n\n {via === 'ollama' ? (\n models.length > 0 ? (\n <Select label=\"Local model\" value={model} onChange={(e) => setModel(e.target.value)}>\n <option value=\"\">Ollama’s default</option>\n {models.map((m) => <option key={m} value={m}>{m}</option>)}\n </Select>\n ) : (\n <p className={styles.hint}>No local models are known to Verse, so Ollama will ask which to use.</p>\n )\n ) : null}\n\n <Select\n label=\"Folder (Terminal.app)\"\n value={root}\n onChange={(e) => setRoot(e.target.value)}\n hint={projects.length === 0 ? 'No chat folders or enrolled projects yet.' : 'A Verse tab opens in the chat you have open.'}\n disabled={projects.length === 0}\n >\n {projects.length === 0 ? <option value=\"\">—</option> : null}\n {projects.map((p) => <option key={p.path} value={p.path}>{p.name}</option>)}\n </Select>\n\n {command ? (\n <div className={styles.commandBlock}>\n <span className={styles.commandLabel}>Command</span>\n <CopyPill text={commandText(command)} what={`the ${row.name} launch command`} />\n </div>\n ) : null}\n\n {via === 'ollama' && inVerse.available ? (\n <p className={styles.hint}>In a Verse tab this runs exactly the command above — Verse builds it from what is installed, never from this page.</p>\n ) : null}\n {!inVerse.available && inVerse.reason ? <p className={styles.hint}>Verse terminal: {inVerse.reason}</p> : null}\n {error ? <p className={styles.error} role=\"alert\">{error}</p> : null}\n\n <div className={styles.dialogActions}>\n <Button variant=\"ghost\" onClick={onCancel}>Cancel</Button>\n <Button\n variant={inVerse.available ? 'subtle' : 'primary'}\n busy={busy}\n disabled={!canTerminalApp || command === null}\n onClick={() => command && onLaunch({ choice, target: 'terminal-app', root, command })}\n >\n Open in Terminal.app\n </Button>\n {inVerse.available ? (\n <Button\n variant=\"primary\"\n disabled={command === null}\n onClick={() => command && onLaunch({ choice, target: 'verse', root: null, command })}\n >\n Open in Verse terminal\n </Button>\n ) : null}\n </div>\n </div>\n </Dialog>\n );\n}\n","/**\n * routes/verse/mcp/mcp.module.css — MCP + CLI management styling.\n *\n * Follows docs/VERSE-DESIGN-V2.md, same as usage.module.css: monochrome\n * ground, 1px hairlines and whitespace for separation (no shadows, no nested\n * rounded boxes), display face for headings, mono for anything the operator\n * has to read character-by-character — which here is the whole point, because\n * the command line is the thing being disclosed.\n */\n\n.section {\n display: flex;\n flex-direction: column;\n min-height: 0;\n height: 100%;\n background: var(--bg-canvas);\n}\n\n.body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: var(--space-5);\n display: flex;\n flex-direction: column;\n gap: var(--space-6);\n}\n\n.panel {\n display: flex;\n flex-direction: column;\n gap: var(--space-3);\n}\n\n.panelHead {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n padding-bottom: var(--space-2);\n border-bottom: 1px solid var(--border-subtle);\n}\n\n.panelTitle {\n margin: 0;\n font-family: var(--font-display);\n font-size: var(--text-md-size);\n font-weight: var(--font-weight-semibold);\n color: var(--text-primary);\n}\n\n.panelNote,\n.muted {\n margin: 0;\n font-size: var(--text-sm-size);\n color: var(--text-secondary);\n line-height: 1.5;\n}\n\n/* A fact that changes what the operator should do. Never colour alone: it\n carries a word (\"Version drift\") as well as the rule. */\n.alert {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n padding: var(--space-3) var(--space-4);\n border: 1px solid var(--border-warning, var(--border-strong));\n border-left-width: 3px;\n border-radius: var(--radius-sm);\n background: var(--bg-subtle);\n}\n\n.alertTitle {\n font-weight: var(--font-weight-semibold);\n color: var(--text-primary);\n font-size: var(--text-sm-size);\n}\n\n.seatList,\n.rowList {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.seatRow,\n.healthRow {\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n padding: var(--space-3) 0;\n border-bottom: 1px solid var(--border-subtle);\n}\n\n.seatHead {\n display: flex;\n align-items: baseline;\n gap: var(--space-2);\n flex-wrap: wrap;\n}\n\n.seatLabel {\n font-weight: var(--font-weight-semibold);\n color: var(--text-primary);\n}\n\n.engineTag,\n.code {\n font-family: var(--font-mono);\n font-size: var(--text-xs-size);\n color: var(--text-tertiary, var(--text-secondary));\n}\n\n/* The machine-readable code is shown BESIDE the sentence, never as it. */\n.code {\n letter-spacing: 0;\n}\n\n.count {\n font-size: var(--text-sm-size);\n color: var(--text-secondary);\n}\n\n/* The disclosure: everything the operator must read before confirming. */\n.disclosure {\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n padding: var(--space-3) var(--space-4);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-sm);\n background: var(--bg-subtle);\n}\n\n.commandLine {\n font-family: var(--font-mono);\n font-size: var(--text-sm-size);\n color: var(--text-primary);\n word-break: break-all;\n white-space: pre-wrap;\n margin: 0;\n}\n\n.envList {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-2);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.envItem {\n font-family: var(--font-mono);\n font-size: var(--text-xs-size);\n padding: 2px var(--space-2);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-sm);\n color: var(--text-secondary);\n}\n\n.warnList {\n margin: 0;\n padding-left: var(--space-4);\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n font-size: var(--text-sm-size);\n color: var(--text-primary);\n}\n\n.digest {\n font-family: var(--font-mono);\n font-size: var(--text-xs-size);\n color: var(--text-tertiary, var(--text-secondary));\n word-break: break-all;\n}\n\n.actions {\n display: flex;\n gap: var(--space-2);\n align-items: center;\n flex-wrap: wrap;\n}\n","/**\n * routes/verse/mcp/McpServerDisclosure.tsx — what an MCP server IS, rendered\n * so it has to be read.\n *\n * Used in two places and identical in both: listing a server a seat already\n * loads, and previewing one that is about to be written. That sameness is the\n * point — the operator reads the same card either way, so \"what will run\" is\n * never presented differently from \"what runs\".\n *\n * Three rules this component enforces at the render layer:\n *\n * 1. The COMMAND and ARGS are shown in full, in mono, wrapped rather than\n * truncated. A command with an ellipsis in the middle is exactly the\n * one worth reading.\n * 2. Environment variables are listed BY KEY, with the value shown as the\n * literal `<set>` that `redactEnv` produced. The count is stated, so a\n * server handing over six credentials cannot look like one handing over\n * none.\n * 3. The source is a home-relative ref, never an absolute path.\n */\nimport type { ReactNode } from 'react';\nimport type { McpServer } from './mcp-contract.js';\nimport styles from './mcp.module.css';\n\nexport function McpServerDisclosure({\n server,\n heading,\n}: {\n server: McpServer;\n heading?: string;\n}): ReactNode {\n const envKeys = server.env === null ? [] : Object.keys(server.env);\n\n return (\n <div className={styles.disclosure}>\n {heading === undefined ? null : <p className={styles.alertTitle}>{heading}</p>}\n\n <p className={styles.commandLine}>\n {server.command}\n {server.args.length > 0 ? ` ${server.args.join(' ')}` : ''}\n </p>\n\n {envKeys.length === 0 ? (\n <p className={styles.muted}>No environment variables are passed to this server.</p>\n ) : (\n <>\n <p className={styles.muted}>\n {envKeys.length} environment variable{envKeys.length === 1 ? '' : 's'} passed to this\n server. Values are never displayed.\n </p>\n <ul className={styles.envList}>\n {envKeys.map((key) => (\n <li key={key} className={styles.envItem}>\n {key}=&lt;set&gt;\n </li>\n ))}\n </ul>\n </>\n )}\n\n <p className={styles.code}>configured in {server.sourceRef}</p>\n </div>\n );\n}\n","/**\n * routes/verse/mcp/mcp-queries.ts — the reads and writes behind the MCP panel.\n *\n * Reads use the non-throwing `optionalGet` shape the Usage section\n * established: a server without these routes answers 404, and a 404 means\n * \"this panel is degraded\", not \"Verse is broken\". 401 still propagates,\n * because an expired read session is an unauthorized state for the whole\n * surface, not a degraded one.\n *\n * Writes pull the held mutation token from auth-store and touch the hold on\n * success, exactly like `autonomy/control-queries.ts`. There is one addition\n * this surface needs that the others do not: `applyMcpServer` CANNOT be\n * called without a digest that `proposeMcpServer` returned, because the\n * server refuses without it. That is deliberate and it is why there is no\n * single `installMcpServer()` helper here — a one-call install is exactly the\n * shape docs/VERSE-WORKSPACES.md §3 rules out, and it should be impossible to\n * write by accident at this layer too.\n */\nimport { getMutationToken, touchMutationHold } from '../../../data/auth-store.js';\nimport { ApiError, apiGet, apiPost } from '../../../data/client.js';\nimport { invalidate } from '../../../data/cache.js';\nimport type { QueryDef } from '../../../data/queries.js';\n\nexport const MCP_SNAPSHOT_KEY = 'verse-mcp-snapshot';\nexport const MCP_CLI_HEALTH_KEY = 'verse-mcp-cli-health';\n\n/** A read that is allowed to be absent. `raw` is null when it was. */\nexport interface OptionalRead {\n raw: unknown;\n available: boolean;\n reason: string | null;\n}\n\nfunction describeFailure(path: string, err: unknown): string {\n if (err instanceof ApiError) {\n if (err.status === 404) {\n return `This server does not expose ${path}, so this panel has no source.`;\n }\n return `${path} answered HTTP ${err.status}.`;\n }\n return `${path} could not be reached.`;\n}\n\nfunction optionalGet(path: string): (signal?: AbortSignal) => Promise<OptionalRead> {\n return async (signal) => {\n try {\n const raw = await apiGet<unknown>(path, signal);\n return { raw, available: true, reason: null };\n } catch (err) {\n if (err instanceof ApiError && err.status === 401) throw err;\n if (err instanceof DOMException && err.name === 'AbortError') throw err;\n return { raw: null, available: false, reason: describeFailure(path, err) };\n }\n };\n}\n\n/** GET /api/verse/mcp — which servers each seat would load. */\nexport const mcpSnapshotQuery: QueryDef<OptionalRead> = {\n key: MCP_SNAPSHOT_KEY,\n fetch: optionalGet('/api/verse/mcp'),\n};\n\n/** GET /api/verse/mcp/cli-health — auth, plan and version drift per account. */\nexport const mcpCliHealthQuery: QueryDef<OptionalRead> = {\n key: MCP_CLI_HEALTH_KEY,\n fetch: optionalGet('/api/verse/mcp/cli-health'),\n};\n\n// ---------------------------------------------------------------------------\n// Writes\n// ---------------------------------------------------------------------------\n\nexport class McpLockedError extends Error {\n constructor() {\n super('Unlock actions with the mutation token before changing MCP configuration.');\n this.name = 'McpLockedError';\n }\n}\n\nasync function post<T>(path: string, body: unknown): Promise<T> {\n const token = getMutationToken();\n if (!token) throw new McpLockedError();\n const result = await apiPost<T>(path, body, token);\n touchMutationHold();\n return result;\n}\n\n/** The spec an operator typed. Env VALUES are real here and only here. */\nexport interface McpServerInput {\n name: string;\n command: string;\n args?: string[];\n env?: Record<string, string>;\n}\n\n/**\n * POST /api/verse/mcp/proposal — validate and disclose. Writes nothing.\n *\n * The response carries the digest `applyMcpServer` demands back. A refusal is\n * a 409 with a full body, which `apiPost` surfaces as an ApiError whose\n * detail carries the `note`.\n */\nexport function proposeMcpServer(target: string, server: McpServerInput): Promise<unknown> {\n return post<unknown>('/api/verse/mcp/proposal', { target, server });\n}\n\n/**\n * POST /api/verse/mcp/apply — perform the write the digest confirms.\n *\n * `digest` is not optional and has no default. It must come from a proposal\n * the operator actually saw.\n */\nexport async function applyMcpServer(\n target: string,\n server: McpServerInput,\n digest: string,\n): Promise<unknown> {\n const result = await post<unknown>('/api/verse/mcp/apply', {\n target,\n server,\n digest,\n confirm: true,\n });\n invalidate(MCP_SNAPSHOT_KEY);\n return result;\n}\n\n/**\n * POST /api/verse/mcp/cli-probe — read the installed CLI versions.\n *\n * A POST because it launches the provider CLIs. Nothing about it is a read.\n */\nexport async function probeCliVersions(): Promise<unknown> {\n const result = await post<unknown>('/api/verse/mcp/cli-probe', {});\n invalidate(MCP_CLI_HEALTH_KEY);\n return result;\n}\n","/**\n * routes/verse/apps/McpGroup.tsx — MCP SERVERS, folded in from the old MCP\n * section (SPEC-310C §4): what each seat would ACTUALLY load, the standing\n * caveat that Claude and local seats load none, and an Add that goes through\n * the two-step, digest-bound write the server already enforces\n * (propose → read the disclosure → apply).\n *\n * The rules the old section refused to soften are kept:\n * - \"configured, but unused\" is said first when it is true;\n * - a CLI version drift is an alert quoting the pinned version;\n * - the unenrolled-folder footgun for Codex/Grok seats is stated;\n * - an env VALUE is never displayed (the disclosure forces '<set>').\n */\nimport { useId, useState, type FormEvent } from 'react';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { IconChevronDown, IconChevronRight, IconPlus } from '../../../components/primitives/icons.js';\nimport { Input } from '../../../components/primitives/Input.js';\nimport { Select } from '../../../components/primitives/Select.js';\nimport { Sheet } from '../../../components/primitives/Sheet.js';\nimport { ApiError } from '../../../data/client.js';\nimport { SCOPE_REASON_COPY, narrowServer, reasonSentence, type CliHealthSnapshot, type McpServer, type McpSnapshot } from '../mcp/mcp-contract.js';\nimport { McpServerDisclosure } from '../mcp/McpServerDisclosure.js';\nimport { applyMcpServer, proposeMcpServer, type McpServerInput } from '../mcp/mcp-queries.js';\nimport { mcpSeatRows, mcpTargets, parseEnvLines, splitArgs, type McpSeatRow } from './apps-model.js';\nimport { AppGroup, AppRow } from './AppRow.js';\nimport styles from './Apps.module.css';\n\n/** The token gate the page owns: runs `action` once unlocked; null when dismissed. */\nexport type GatedRun = <T>(reason: string, action: () => Promise<T>) => Promise<T | null>;\n\nfunction SeatRow({ row }: { row: McpSeatRow }) {\n const [open, setOpen] = useState(false);\n const listId = useId();\n const has = row.servers.length > 0;\n return (\n <AppRow\n id={`mcp-${row.seatId}`}\n name={row.label}\n monogram={row.monogram}\n engine={row.engine}\n description={row.sentence}\n health={{ tone: has ? 'success' : 'off', label: row.loads }}\n aside={\n has ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n aria-expanded={open}\n aria-controls={listId}\n icon={open ? <IconChevronDown size={14} /> : <IconChevronRight size={14} />}\n onClick={() => setOpen((v) => !v)}\n >\n {open ? 'Hide servers' : 'Show servers'}\n </Button>\n ) : null\n }\n >\n <span className={styles.reasonCode}>{row.reason}</span>\n {has && open ? (\n <div id={listId} className={styles.servers}>\n {row.servers.map((server) => <McpServerDisclosure key={server.name} server={server} heading={server.name} />)}\n </div>\n ) : null}\n </AppRow>\n );\n}\n\ninterface Proposal {\n server: McpServer;\n targetRef: string;\n targetLabel: string;\n action: 'add' | 'replace';\n replaces: McpServer | null;\n warnings: string[];\n note: string;\n digest: string;\n}\n\nfunction narrowProposal(raw: unknown): Proposal | null {\n if (raw === null || typeof raw !== 'object') return null;\n const r = raw as Record<string, unknown>;\n const server = narrowServer(r['server']);\n const target = r['target'] as Record<string, unknown> | undefined;\n if (!server || typeof r['digest'] !== 'string' || !target) return null;\n return {\n server,\n targetRef: typeof target['ref'] === 'string' ? target['ref'] : '',\n targetLabel: typeof target['label'] === 'string' ? target['label'] : '',\n action: r['action'] === 'replace' ? 'replace' : 'add',\n replaces: narrowServer(r['replaces']),\n warnings: Array.isArray(r['warnings']) ? r['warnings'].filter((w): w is string => typeof w === 'string') : [],\n note: typeof r['note'] === 'string' ? r['note'] : '',\n digest: r['digest'],\n };\n}\n\nfunction describe(err: unknown): string {\n if (err instanceof ApiError) return err.detail ?? `The server refused (HTTP ${err.status}).`;\n if (err instanceof Error && err.name === 'VerseMutationLockedError') return 'Unlock actions with the mutation token first.';\n return 'The request could not be completed.';\n}\n\nfunction AddServerSheet({ open, snapshot, run, onClose, onAdded }: {\n open: boolean;\n snapshot: McpSnapshot | null;\n run: GatedRun;\n onClose: () => void;\n onAdded: (message: string) => void;\n}) {\n const titleId = useId();\n const targets = mcpTargets(snapshot);\n const [target, setTarget] = useState('hub');\n const [name, setName] = useState('');\n const [command, setCommand] = useState('');\n const [args, setArgs] = useState('');\n const [env, setEnv] = useState('');\n const [error, setError] = useState<string | null>(null);\n const [busy, setBusy] = useState(false);\n const [proposal, setProposal] = useState<{ input: McpServerInput; target: string; value: Proposal } | null>(null);\n\n const reset = () => {\n setProposal(null);\n setError(null);\n setBusy(false);\n };\n\n const review = async (event: FormEvent) => {\n event.preventDefault();\n setError(null);\n const parsedEnv = parseEnvLines(env);\n if (!parsedEnv.ok) {\n setError(parsedEnv.error);\n return;\n }\n const input: McpServerInput = {\n name: name.trim(),\n command: command.trim(),\n args: splitArgs(args),\n ...(Object.keys(parsedEnv.env).length > 0 ? { env: parsedEnv.env } : {}),\n };\n setBusy(true);\n try {\n const raw = await run('Review an MCP server before adding it', () => proposeMcpServer(target, input));\n if (raw === null) return;\n const value = narrowProposal(raw);\n if (!value) setError('The server answered with something that is not a proposal.');\n else setProposal({ input, target, value });\n } catch (err) {\n setError(describe(err));\n } finally {\n setBusy(false);\n }\n };\n\n const apply = async () => {\n if (!proposal) return;\n setBusy(true);\n setError(null);\n try {\n const done = await run('Add an MCP server', () => applyMcpServer(proposal.target, proposal.input, proposal.value.digest));\n if (done === null) return;\n onAdded(`${proposal.value.action === 'replace' ? 'Replaced' : 'Added'} ${proposal.value.server.name} in ${proposal.value.targetRef}.`);\n setName('');\n setCommand('');\n setArgs('');\n setEnv('');\n reset();\n onClose();\n } catch (err) {\n setError(describe(err));\n } finally {\n setBusy(false);\n }\n };\n\n const chosen = targets.find((t) => t.id === target);\n return (\n <Sheet\n open={open}\n onClose={() => { reset(); onClose(); }}\n titleId={titleId}\n title={proposal ? 'Review before adding' : 'Add an MCP server'}\n description=\"An MCP server is a program that runs with the agent’s permissions. Nothing is written until you confirm what you read.\"\n width={520}\n >\n {proposal === null ? (\n <form className={styles.dialogBody} onSubmit={(e) => void review(e)}>\n <Select label=\"Add to\" value={target} onChange={(e) => setTarget(e.target.value)}\n hint={chosen?.disabledReason ?? (target === 'hub' ? 'The hub’s own registry.' : 'A Verse chat on a Claude seat still loads none; Claude Code in a terminal does.')}>\n {targets.map((t) => <option key={t.id} value={t.id} disabled={t.disabledReason !== null}>{t.label}</option>)}\n </Select>\n <Input label=\"Name\" value={name} onChange={(e) => setName(e.target.value)} required placeholder=\"filesystem\" autoComplete=\"off\" />\n <Input label=\"Command\" value={command} onChange={(e) => setCommand(e.target.value)} required placeholder=\"/opt/homebrew/bin/npx\" autoComplete=\"off\"\n hint=\"An absolute path is safest; a bare name is looked up on PATH when the server starts.\" />\n <Input label=\"Arguments\" value={args} onChange={(e) => setArgs(e.target.value)} placeholder='-y @modelcontextprotocol/server-filesystem \"~/code\"' autoComplete=\"off\" />\n <label className={styles.fieldLabel}>\n Environment <span className={styles.hint}>One KEY=value per line. Values are sent once and never shown again.</span>\n <textarea className={styles.textarea} value={env} onChange={(e) => setEnv(e.target.value)} spellCheck={false} autoComplete=\"off\" />\n </label>\n {error ? <p className={styles.error} role=\"alert\">{error}</p> : null}\n <div className={styles.dialogActions}>\n <Button type=\"button\" variant=\"ghost\" onClick={onClose}>Cancel</Button>\n <Button type=\"submit\" variant=\"primary\" busy={busy} disabled={name.trim() === '' || command.trim() === '' || chosen?.disabledReason != null}>\n Review\n </Button>\n </div>\n </form>\n ) : (\n <div className={styles.dialogBody}>\n <p>\n {proposal.value.action === 'replace' ? 'Replaces' : 'Adds'} <strong>{proposal.value.server.name}</strong> in{' '}\n <code className={styles.inlineCode}>{proposal.value.targetRef}</code>\n {proposal.value.targetLabel ? ` (${proposal.value.targetLabel})` : ''}.\n </p>\n <McpServerDisclosure server={proposal.value.server} heading=\"This will run\" />\n {proposal.value.replaces ? <McpServerDisclosure server={proposal.value.replaces} heading=\"Replacing\" /> : null}\n {proposal.value.warnings.length > 0 ? (\n <ul className={styles.warnings}>{proposal.value.warnings.map((w) => <li key={w}>{w}</li>)}</ul>\n ) : null}\n {proposal.value.note ? <p className={styles.hint}>{proposal.value.note}</p> : null}\n {error ? <p className={styles.error} role=\"alert\">{error}</p> : null}\n <div className={styles.dialogActions}>\n <Button variant=\"ghost\" onClick={() => setProposal(null)}>Back</Button>\n <Button variant=\"primary\" busy={busy} onClick={() => void apply()}>\n {proposal.value.action === 'replace' ? 'Replace server' : 'Add server'}\n </Button>\n </div>\n </div>\n )}\n </Sheet>\n );\n}\n\nexport function McpGroup({\n snapshot,\n cliHealth,\n unavailable,\n loading,\n run,\n onAdded,\n headingRef,\n}: {\n snapshot: McpSnapshot | null;\n cliHealth: CliHealthSnapshot | null;\n /** Why the per-seat read is missing; null when it arrived (or is loading). */\n unavailable: string | null;\n loading: boolean;\n run: GatedRun;\n onAdded: (message: string) => void;\n headingRef?: React.Ref<HTMLHeadingElement>;\n}) {\n const [adding, setAdding] = useState(false);\n const rows = snapshot ? mcpSeatRows(snapshot) : [];\n return (\n <AppGroup\n id=\"mcp-servers\"\n title=\"MCP servers\"\n headingRef={headingRef}\n action={\n <Button variant=\"subtle\" size=\"sm\" icon={<IconPlus size={14} />} onClick={() => setAdding(true)} aria-haspopup=\"dialog\">\n Add server\n </Button>\n }\n caveat={\n <>\n Claude and local seats load no MCP servers: Verse starts them with{' '}\n <code>--strict-mcp-config</code> and an empty <code>--mcp-config</code>. Codex and Grok seats load their own\n account’s config — and an <code>ashlr__</code> write through one is refused on a folder that is not enrolled.\n </>\n }\n >\n {snapshot !== null && snapshot.notes.length > 0 ? (\n <div className={styles.loadingLine} role=\"note\">\n <strong>Configured, but unused.</strong> {snapshot.notes.join(' ')} {snapshot.machine.note}\n </div>\n ) : null}\n {cliHealth !== null && cliHealth.driftDetected ? (\n <div className={styles.loadingLine} role=\"alert\">\n <strong>CLI version drift.</strong> {cliHealth.notes.join(' ')}{' '}\n {cliHealth.accounts.filter((a) => a.versionState === 'drift').map((a) => `${a.label}: ${a.version ?? 'unread'}, pinned ${a.pinnedVersion ?? '—'}.`).join(' ')}\n </div>\n ) : null}\n {snapshot === null ? (\n <p className={styles.loadingLine} aria-busy={loading || undefined}>\n {loading ? 'Reading each seat’s configuration…' : (unavailable ?? 'No per-seat reading is available.')}\n </p>\n ) : (\n <ul className={styles.rows}>\n {rows.map((row) => <SeatRow key={row.seatId} row={row} />)}\n </ul>\n )}\n {snapshot?.scope ? (\n <p className={styles.scopeLine}>\n Scope: {reasonSentence(SCOPE_REASON_COPY, snapshot.scope.reason, 'Locus did not report a usable scope.')}\n {snapshot.scope.tenantRef ? ` (${snapshot.scope.tenantRef})` : ''}\n </p>\n ) : null}\n <AddServerSheet open={adding} snapshot={snapshot} run={run} onClose={() => setAdding(false)} onAdded={onAdded} />\n </AppGroup>\n );\n}\n","/**\n * routes/verse/apps/ServedGroups.tsx — the three groups GET /api/verse/apps\n * serves: DESKTOP (Ollama's switches for other apps), TERMINAL AGENTS and\n * LOCAL MODELS. Rendering only; every decision about a word or an enabled\n * control was made by the server or apps-model.ts.\n */\nimport type { VerseAppGroup, VerseAppRow } from '../../../../core/verse/workbench-types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { IconChevronDown, IconPlay } from '../../../components/primitives/icons.js';\nimport { Switch } from '../../../components/primitives/Switch.js';\nimport { appHealthTone } from './apps-model.js';\nimport { AppGroup, AppRow } from './AppRow.js';\nimport { CopyPill } from './CopyPill.js';\nimport { commandText } from './launch.js';\nimport styles from './Apps.module.css';\n\nfunction rowHealth(row: VerseAppRow) {\n return { tone: appHealthTone(row.health.state), label: row.health.label };\n}\n\nexport function DesktopGroup({\n group,\n onToggle,\n onRestore,\n}: {\n group: VerseAppGroup;\n /** Opens the confirmation; never flips anything by itself. */\n onToggle: (row: VerseAppRow, enable: boolean) => void;\n onRestore: (row: VerseAppRow) => void;\n}) {\n return (\n <AppGroup id={group.id} title={group.title} caveat={group.caveat}>\n <ul className={styles.rows}>\n {group.apps.map((row) => {\n const restore = row.actions.find((a) => a.kind === 'restore') ?? null;\n return (\n <AppRow\n key={row.id}\n id={`app-${row.id}`}\n name={row.name}\n monogram={row.monogram}\n engine={row.engine}\n description={row.description}\n health={rowHealth(row)}\n detail={row.toggle === null ? row.detail : null}\n aside={\n row.toggle === null ? null : (\n <>\n {restore ? (\n <Button variant=\"ghost\" size=\"sm\" onClick={() => onRestore(row)} disabled={restore.disabledReason !== null} title={commandText(restore.command ?? [])}>\n {restore.label}\n </Button>\n ) : null}\n <Switch\n checked={row.toggle.enabled}\n onChange={(next) => onToggle(row, next)}\n aria-label={`${row.description}: ${row.toggle.enabled ? 'on' : 'off'}`}\n aria-describedby={`app-${row.id}-name`}\n />\n </>\n )\n }\n />\n );\n })}\n </ul>\n </AppGroup>\n );\n}\n\nexport function AgentsGroup({\n group,\n quickLaunchReason,\n onQuickLaunch,\n onLaunchOptions,\n}: {\n group: VerseAppGroup;\n /** Why the one-click Launch cannot run anywhere right now (no folder and no Verse tab), or null. */\n quickLaunchReason: string | null;\n onQuickLaunch: (row: VerseAppRow) => void;\n onLaunchOptions: (row: VerseAppRow) => void;\n}) {\n return (\n <AppGroup id={group.id} title={group.title} caveat={group.caveat}>\n <ul className={styles.rows}>\n {group.apps.map((row) => {\n const launch = row.actions.find((a) => a.kind === 'launch') ?? null;\n const disabled = launch?.disabledReason ?? quickLaunchReason;\n return (\n <AppRow\n key={row.id}\n id={`app-${row.id}`}\n name={row.name}\n monogram={row.monogram}\n engine={row.engine}\n description={row.description}\n version={row.version}\n health={rowHealth(row)}\n detail={row.detail}\n aside={\n <>\n {row.copy && row.installed ? <CopyPill text={row.copy.text} label={row.copy.label} what={`the ${row.name} command`} /> : null}\n {row.ollamaLaunch ? (\n <CopyPill text={commandText(row.ollamaLaunch)} what={`the Ollama launch command for ${row.name}`} />\n ) : null}\n {launch ? (\n launch.disabledReason !== null ? (\n <span className={styles.disabledNote}>{launch.disabledReason}</span>\n ) : (\n <span className={styles.split}>\n <Button\n variant=\"subtle\"\n size=\"sm\"\n icon={<IconPlay size={14} />}\n disabled={disabled !== null}\n title={disabled ?? undefined}\n onClick={() => onQuickLaunch(row)}\n aria-label={`Launch ${row.name}`}\n >\n Launch\n </Button>\n <Button\n variant=\"subtle\"\n size=\"sm\"\n iconOnly\n icon={<IconChevronDown size={14} />}\n aria-label={`Launch options for ${row.name}`}\n title={`Launch options for ${row.name}`}\n aria-haspopup=\"dialog\"\n onClick={() => onLaunchOptions(row)}\n />\n </span>\n )\n ) : null}\n </>\n }\n />\n );\n })}\n </ul>\n </AppGroup>\n );\n}\n\nexport function LocalModelsGroup({ group }: { group: VerseAppGroup }) {\n return (\n <AppGroup id={group.id} title={group.title} caveat={group.caveat}>\n <ul className={styles.rows}>\n {group.apps.map((row) => (\n <AppRow\n key={row.id}\n id={`app-${row.id}`}\n name={row.name}\n monogram={row.monogram}\n engine={row.engine}\n description={row.description}\n version={row.version}\n health={rowHealth(row)}\n detail={row.detail}\n />\n ))}\n </ul>\n </AppGroup>\n );\n}\n","/**\n * routes/verse/sections/AppsSection.tsx — Apps & Accounts (unit C6,\n * SPEC-310C §4; the gear tray's \"Apps & Accounts\", and where MCP now lives).\n *\n * One page that answers \"what can I run with on this Mac, and is it ready\":\n *\n * ACCOUNTS each seat's plan, connection, 5-hour and weekly windows\n * with resets, \"Reserved for you N%\", and Reconnect / Fix /\n * Edit budget — the shared CapacityStrip;\n * DESKTOP Ollama's switches for Claude Desktop and Hermes Desktop,\n * shown OFF with Restore (SPEC-310C §0.5);\n * TERMINAL AGENTS installed version or \"not installed\", the agent's own\n * command, `ollama launch <id>` only where the installed\n * Ollama lists it, and [Launch ▾];\n * LOCAL MODELS Ollama (models, end-to-end tok/s), llama-server, LM Studio;\n * MCP SERVERS what each seat would load, and Add (propose → disclose → apply).\n *\n * Takes no props, per the shell contract (C1 mounts `sections/*Section.tsx`).\n * `focusGroup` is only for the legacy MCP entry point, which lands on the MCP\n * group of this same page.\n *\n * Polls only while visible (usePollWhileVisible): apps every 60 s (the server\n * caches and re-probes in the background), seats 30 s, health 30 s, budget\n * 60 s. Every mutation goes through the mutation-token gate; nothing on this\n * page spends — the actions open visible Terminal windows or write a config\n * the operator just read.\n */\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport type { VerseAppRow } from '../../../../core/verse/workbench-types.js';\nimport { MutationTokenDialog } from '../../../components/auth/MutationTokenDialog.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { IconRefresh } from '../../../components/primitives/icons.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport { useQuery, useRefetch } from '../../../data/hooks.js';\nimport type { VerseBootstrap } from '../../../data/api-types.js';\nimport { AccountsGroup } from '../apps/AccountsGroup.js';\nimport { launchProjects, localModelTags, type LaunchChoice } from '../apps/apps-model.js';\nimport { appsQuery, launchInTerminalApp, refreshApps, terminalStatusQuery, toggleDesktopApp } from '../apps/apps-queries.js';\nimport { DesktopToggleDialog } from '../apps/DesktopToggleDialog.js';\nimport { inVerseAvailability, launchInVerse } from '../apps/launch.js';\nimport { LaunchDialog, type LaunchRequest } from '../apps/LaunchDialog.js';\nimport { McpGroup } from '../apps/McpGroup.js';\nimport { AgentsGroup, DesktopGroup, LocalModelsGroup } from '../apps/ServedGroups.js';\nimport { describeContextError, useTokenGate } from '../context/use-token-gate.js';\nimport { reconnectSeat, refreshSeatHealth } from '../health/health-queries.js';\nimport { projectCliHealth, projectMcpSnapshot } from '../mcp/mcp-contract.js';\nimport { mcpCliHealthQuery, mcpSnapshotQuery } from '../mcp/mcp-queries.js';\nimport { usePollWhileVisible } from '../shell/section-visibility.js';\nimport { useCapacityData } from '../usage/CapacityStrip.js';\nimport type { CapacityRow } from '../usage/capacity-strip-model.js';\nimport { useVerseUi } from '../useVerseUi.js';\nimport { verseBootstrapQuery } from '../verse-queries.js';\nimport styles from '../apps/Apps.module.css';\n\n/** The server re-probes in the background after 60 s; reading faster only re-reads its cache. */\nexport const APPS_POLL_MS = 60_000;\n\nfunction checkedAgo(iso: string, now: number): string {\n const t = Date.parse(iso);\n if (!Number.isFinite(t)) return 'not checked';\n const minutes = Math.max(0, Math.round((now - t) / 60_000));\n if (minutes < 1) return 'checked just now';\n if (minutes < 120) return `checked ${minutes} min ago`;\n return `checked ${Math.round(minutes / 60)} h ago`;\n}\n\nexport function AppsSection({ focusGroup }: { focusGroup?: 'mcp-servers' } = {}) {\n const apps = useQuery(appsQuery);\n const refetchApps = useRefetch(appsQuery);\n usePollWhileVisible(refetchApps, APPS_POLL_MS);\n const terminal = useQuery(terminalStatusQuery);\n const mcp = useQuery(mcpSnapshotQuery);\n const cli = useQuery(mcpCliHealthQuery);\n const refetchMcp = useRefetch(mcpSnapshotQuery);\n const bootstrap = useQuery(verseBootstrapQuery);\n const capacity = useCapacityData();\n const ui = useVerseUi();\n const gate = useTokenGate();\n\n const [status, setStatus] = useState<{ tone: 'neutral' | 'danger'; text: string } | null>(null);\n const [refreshing, setRefreshing] = useState(false);\n const [reconnecting, setReconnecting] = useState<string | null>(null);\n const [toggle, setToggle] = useState<{ row: VerseAppRow; enable: boolean } | null>(null);\n const [toggleBusy, setToggleBusy] = useState(false);\n const [toggleError, setToggleError] = useState<string | null>(null);\n const [launchRow, setLaunchRow] = useState<VerseAppRow | null>(null);\n const [launchBusy, setLaunchBusy] = useState(false);\n const [launchError, setLaunchError] = useState<string | null>(null);\n const [nowMs, setNowMs] = useState(() => Date.now());\n usePollWhileVisible(() => setNowMs(Date.now()), 30_000);\n\n const mcpHeading = useRef<HTMLHeadingElement>(null);\n useEffect(() => {\n if (focusGroup !== 'mcp-servers') return;\n const el = mcpHeading.current;\n if (!el) return;\n if (typeof el.scrollIntoView === 'function') el.scrollIntoView({ block: 'start' });\n el.focus({ preventScroll: true });\n }, [focusGroup]);\n\n const data = bootstrap.data as VerseBootstrap | undefined;\n const projects = launchProjects(data);\n const models = localModelTags(capacity.seats);\n const inVerse = inVerseAvailability({\n terminalAvailable: terminal.data?.available ? terminal.data.data.available : terminal.data ? false : null,\n terminalReason: terminal.data?.available ? terminal.data.data.reason : null,\n activeSessionId: ui.activeSessionId,\n });\n\n const served = apps.data?.available ? apps.data.data : null;\n const group = (id: 'desktop' | 'terminal-agents' | 'local-models') => served?.groups.find((g) => g.id === id) ?? null;\n const snapshot = mcp.data?.available ? projectMcpSnapshot(mcp.data.raw) : null;\n const cliHealth = cli.data?.available ? projectCliHealth(cli.data.raw) : null;\n\n const say = useCallback((text: string, tone: 'neutral' | 'danger' = 'neutral') => setStatus({ text, tone }), []);\n\n const onRefresh = async () => {\n setRefreshing(true);\n try {\n const done = await gate.run('Check every app and seat again', async () => {\n await Promise.all([refreshApps(), refreshSeatHealth().catch(() => null)]);\n refetchMcp();\n return true;\n });\n if (done) {\n setNowMs(Date.now());\n say('Checked again.');\n }\n } catch (err) {\n say(describeContextError(err), 'danger');\n } finally {\n setRefreshing(false);\n }\n };\n\n const onReconnect = async (row: CapacityRow) => {\n setReconnecting(row.seatId);\n try {\n const done = await gate.run(`Open the sign-in for ${row.label} in Terminal`, async () => {\n await reconnectSeat(row.seatId);\n return true;\n });\n if (done) say(`Opened the sign-in for ${row.label} in Terminal. Finish it there; this page picks it up.`);\n } catch (err) {\n say(describeContextError(err), 'danger');\n } finally {\n setReconnecting(null);\n }\n };\n\n const onConfirmToggle = async () => {\n if (!toggle) return;\n setToggleBusy(true);\n setToggleError(null);\n try {\n const result = await gate.run(`${toggle.enable ? 'Switch on' : 'Restore'} ${toggle.row.name}`, () => toggleDesktopApp(toggle.row.id, toggle.enable));\n if (result) {\n say(`Opened “${result.command.join(' ')}” in Terminal. Answer its prompts there.`);\n setToggle(null);\n }\n } catch (err) {\n setToggleError(describeContextError(err));\n } finally {\n setToggleBusy(false);\n }\n };\n\n const launch = async (row: VerseAppRow, request: LaunchRequest) => {\n if (request.target === 'verse') {\n launchInVerse(row.id, request.choice);\n setLaunchRow(null);\n return;\n }\n if (request.root === null) return;\n setLaunchBusy(true);\n setLaunchError(null);\n try {\n const result = await gate.run(`Launch ${row.name} in Terminal`, () =>\n launchInTerminalApp(row.id, { root: request.root!, via: request.choice.via, model: request.choice.model }));\n if (result) {\n say(`Opened ${row.name} in Terminal.`);\n setLaunchRow(null);\n }\n } catch (err) {\n const message = describeContextError(err);\n if (launchRow) setLaunchError(message);\n else say(message, 'danger');\n } finally {\n setLaunchBusy(false);\n }\n };\n\n const quickLaunchReason = inVerse.available || projects.length > 0 ? null : 'Open a chat or enrol a project first.';\n const onQuickLaunch = (row: VerseAppRow) => {\n const choice: LaunchChoice = { via: 'native', model: null };\n const command = row.actions.find((a) => a.kind === 'launch')?.command ?? null;\n if (!command) return;\n void launch(row, { choice, target: inVerse.available ? 'verse' : 'terminal-app', root: projects[0]?.path ?? null, command });\n };\n\n const servedLoading = apps.data === undefined && (apps.status === 'loading' || apps.status === 'idle');\n\n return (\n <section className={styles.section} aria-label=\"Apps & Accounts\">\n <div className={styles.scroll}>\n <div className={styles.page}>\n <header className={styles.header}>\n <div className={styles.headerText}>\n <h2 className={styles.title}>Apps &amp; Accounts</h2>\n <p className={styles.lede}>Everything Verse can run with on this Mac, and whether it is ready.</p>\n </div>\n <div className={styles.headerMeta}>\n {served ? (\n <span>\n {checkedAgo(served.checkedAt, nowMs)}\n {served.pathSource === 'fallback' ? ' · PATH from known folders (your login shell did not answer)' : ''}\n </span>\n ) : null}\n <Button variant=\"ghost\" size=\"sm\" icon={<IconRefresh size={14} />} busy={refreshing} onClick={() => void onRefresh()}>\n Check again\n </Button>\n </div>\n </header>\n\n <p className={status ? styles.banner : styles.visuallyHidden} data-tone={status?.tone} role=\"status\" aria-live=\"polite\">\n {status?.text ?? ''}\n </p>\n\n <AccountsGroup\n seats={capacity.seats}\n health={capacity.health}\n budget={capacity.budget}\n loading={capacity.loading}\n reconnecting={reconnecting}\n onReconnect={(row) => void onReconnect(row)}\n />\n\n {apps.data && !apps.data.available ? (\n <p className={styles.banner}>{apps.data.reason}</p>\n ) : servedLoading ? (\n <div aria-busy=\"true\" aria-label=\"Checking apps\">\n <SkeletonLine width=\"30%\" />\n <SkeletonLine width=\"80%\" />\n <SkeletonLine width=\"70%\" />\n </div>\n ) : (\n <>\n {group('desktop') ? (\n <DesktopGroup\n group={group('desktop')!}\n onToggle={(row, enable) => { setToggleError(null); setToggle({ row, enable }); }}\n onRestore={(row) => { setToggleError(null); setToggle({ row, enable: false }); }}\n />\n ) : null}\n {group('terminal-agents') ? (\n <AgentsGroup\n group={group('terminal-agents')!}\n quickLaunchReason={quickLaunchReason}\n onQuickLaunch={onQuickLaunch}\n onLaunchOptions={(row) => { setLaunchError(null); setLaunchRow(row); }}\n />\n ) : null}\n {group('local-models') ? <LocalModelsGroup group={group('local-models')!} /> : null}\n </>\n )}\n\n <McpGroup\n snapshot={snapshot}\n cliHealth={cliHealth}\n unavailable={mcp.data && !mcp.data.available ? mcp.data.reason : null}\n loading={mcp.data === undefined}\n run={gate.run}\n onAdded={(text) => { say(text); refetchMcp(); }}\n headingRef={mcpHeading}\n />\n </div>\n </div>\n\n <DesktopToggleDialog\n row={toggle?.row ?? null}\n enable={toggle?.enable ?? false}\n busy={toggleBusy}\n error={toggleError}\n onCancel={() => setToggle(null)}\n onConfirm={() => void onConfirmToggle()}\n />\n <LaunchDialog\n row={launchRow}\n projects={projects}\n models={models}\n inVerse={inVerse}\n busy={launchBusy}\n error={launchError}\n onCancel={() => setLaunchRow(null)}\n onLaunch={(request) => { if (launchRow) void launch(launchRow, request); }}\n />\n <MutationTokenDialog\n open={gate.dialog.open}\n reason={gate.dialog.reason}\n tokenLabel=\"Mutation token\"\n tokenHelp=\"the mutation token ashlr verse printed\"\n onClose={gate.dialog.onClose}\n onUnlocked={gate.dialog.onUnlocked}\n />\n </section>\n );\n}\n"],"mappings":"spCAwCM,EAAmB,CACvB,KAAM,OACN,QAAS,UACT,KAAM,OACN,IAAK,MACL,UAAW,WACb,EAEM,EAAiB,CACrB,OAAQ,SACR,MAAO,QACP,OAAQ,SACR,UAAW,YACX,QAAS,UACT,OAAQ,SACR,WAAY,aACZ,aAAc,eACd,MAAO,OACT,EAEM,EAAoB,CACxB,QAAS,UACT,WAAY,aACZ,KAAM,MACR,EAEM,EAAqB,CACzB,UAAW,YACX,MAAO,QACP,QAAS,UACT,MAAO,QACP,MAAO,OACT,EAEM,EAA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,cAAc,GAAI,EAAA,EAAA,IAAA,CAAC,GAAD,CAAkB,MAAO,EAAM,cAAc,CAAK,CAAA,EAAI,IAC/E,CAAA,CAAA,GAGJ,EAAA,EAAA,IAAA,CAAC,GAAD,CACY,WACC,YACX,YAAa,EAAI,MAAQ,CAAC,EAAI,KAAK,UAAY,EAAI,KAAK,OAAS,KACjE,QAAS,EAAI,OAAS,IAAA,GACtB,IAAK,EAAK,IACV,QAAU,GAAS,CAAE,EAAI,CAAI,EAAG,EAAW,CAAG,EAC9C,WAAY,CACb,CAAA,CACE,GACF,CAAA,GAEL,EAAA,EAAA,IAAA,CAAC,GAAD,CACE,IAAK,GAAQ,KAAO,KACpB,OAAQ,GAAQ,QAAU,GAC1B,KAAM,GACN,MAAO,GACP,aAAgB,EAAU,IAAI,EAC9B,cAAiB,KAAK,EAAgB,CACvC,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,GAAD,CACE,IAAK,EACK,WACF,SACC,UACT,KAAM,GACN,MAAO,GACP,aAAgB,EAAa,IAAI,EACjC,SAAW,GAAY,CAAM,GAAW,EAAY,EAAW,CAAO,CAAG,CAC1E,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,KAAM,EAAK,OAAO,KAClB,OAAQ,EAAK,OAAO,OACpB,WAAW,iBACX,UAAU,yCACV,QAAS,EAAK,OAAO,QACrB,WAAY,EAAK,OAAO,UACzB,CAAA,CACM,GAEb"}
@@ -0,0 +1,2 @@
1
+ import{a as e,n as t,s as n}from"./index-Dk8R-3a7.js";import{C as r,D as i,E as a,I as ee,L as te,P as o,R as ne,T as re,_ as ie,c as s,d as ae,f as oe,g as se,i as c,k as l,l as ce,m as le,n as ue,p as de,r as fe,s as pe,t as me,u as he,w as ge}from"./useChartWidth-0APW0BR3.js";import{_ as _e}from"./colors-BZ3a9wFf.js";import{l as ve,o as u,t as ye}from"./format-DKrNjdwD.js";var d=n(e(),1),f=t(),p=12,be=26,m=12,xe=6.6,Se=120,h=14;function g({title:e,description:t,caveat:n,status:g,series:_,stacked:v=!1,height:y=200,width:Ce,formatX:b,formatY:x,threshold:S,yDomain:we,ariaLabel:Te}){let C=b??u,w=x??ye,T=(0,d.useRef)(null),E=me(T,Ce),D=he(),[O,k]=(0,d.useState)(null),A=(0,d.useId)(),j=_.map((e,t)=>e.color??_e(t)),M=(0,d.useMemo)(()=>{let e=_.flatMap(e=>e.points.map(e=>e.x)),t=ne(e),n=Array.from(new Set(e.filter(t))).sort((e,t)=>e-t),r=_.map(e=>new Map(e.points.map(e=>[e.x,e.y])));return n.map(e=>{let t=r.map(t=>t.has(e)?t.get(e):null);return{x:e,values:t,total:t.some(e=>e===null)?null:t.reduce((e,t)=>e+(t??0),0)}})},[_]),Ee=M.some(e=>e.values.some(e=>e!==null)),De=g??(Ee?{kind:`ready`}:{kind:`empty`}),N=v?M.map(e=>e.total).filter(e=>e!==null):M.flatMap(e=>e.values).filter(e=>e!==null),P=x?l(x):null,F=we??(P!==null&&(e=>N.every(t=>t>=e[0]&&t<=e[1]))([0,P])?[0,P]:null),I=le(Math.min(0,F?.[0]??0,...N),Math.max(0,F?.[1]??0,...N,S?.value??0),{count:4,integer:N.length>0&&oe(N),format:x}),L=I.ticks,R=L[0],Oe=L[L.length-1],z=te(I.labels,28,64,D),B=y-p-be,V=i(R,Oe,p+B,p),H=!v&&_.length<=4?Math.max(0,..._.map(e=>e.label.length))*xe*D+6:0,U=_.flatMap((e,t)=>{for(let n=M.length-1;n>=0;n--){let r=M[n].values[t];if(r!=null)return[{key:e.id,y:V(r)}]}return[]}),W=H>0&&H<=Se&&E>=420?se(U,h*D,p,p+B):null,G=W!==null&&U.length>0,ke=m+(G?H:0),K=Math.max(40,E-z-ke),q=M.length?M[0].x:0,J=M.length?M[M.length-1].x:1,Y=r(M.map(e=>e.x)),[Ae,je]=Y&&J>q?ie(q,J,ae):[q,J],X=i(Ae,je,z,z+K),Me=(()=>{if(v){let e=M.map(()=>0);return _.map((t,n)=>{let r=M.map((t,r)=>{if(t.total===null)return{x:t.x,y:null,base:null};let i=e[r];return e[r]=i+(t.values[n]??0),{x:t.x,y:e[r],base:i}});return o(r.map(e=>({x:e.x,y:e.y}))).map(e=>({top:e.map(e=>({x:X(e.x),y:V(e.y)})),bottom:e.map(e=>{let t=r.find(t=>t.x===e.x);return{x:X(e.x),y:V(t.base??0)}})}))})}return _.map((e,t)=>o(M.map(e=>({x:e.x,y:e.values[t]??null}))).map(e=>({top:e.map(e=>({x:X(e.x),y:V(e.y)})),bottom:e.map(e=>({x:X(e.x),y:V(Math.max(R,0))}))})))})(),Z=ee(M.length,Math.max(2,Math.floor(K/84))),Ne=Y?ve(q,J,b,Z.map(e=>M[e].x)):[C],Pe=re(Z.map((e,t)=>{let n=X(M[e].x),r=t===0,i=t===Z.length-1;return{key:String(e),x:n,anchor:M.length===1?`middle`:r&&n<=z+.5?`start`:i&&n>=z+K-.5?`end`:`middle`,priority:i?3:r?2:1,required:r||i,variants:Ne.map(t=>t(M[e].x))}}),{min:z,max:z+K,charPx:ge(D)});function Fe(e){let t=T.current;if(!t||M.length===0)return null;let n=e-t.getBoundingClientRect().left,r=0,i=1/0;return M.forEach((e,t)=>{let a=Math.abs(X(e.x)-n);a<i&&(i=a,r=t)}),r}function Ie(e){if(M.length===0)return;let t=O??M.length-1,n=e.key===`ArrowLeft`?t-1:e.key===`ArrowRight`?t+1:e.key===`Home`?0:e.key===`End`?M.length-1:null;n!==null&&(e.preventDefault(),k(Math.max(0,Math.min(M.length-1,n))))}let Q=O===null?void 0:M[O],$=[...M].reverse().find(e=>e.values.some(e=>e!==null)),Le=Te??(M.length?`${e}: ${M.length} points from ${C(q)} to ${C(J)}.`+($?` Latest ${C($.x)}: ${_.map((e,t)=>`${e.label} ${$.values[t]===null?`no data`:w($.values[t])}`).join(`, `)}.`:``):`${e}: no data.`),Re=[{key:`x`,label:`When`,render:e=>C(e.x)},..._.map((e,t)=>({key:e.id,label:e.label,numeric:!0,render:e=>e.values[t]===null?`—`:w(e.values[t])})),...v&&_.length>1?[{key:`__total`,label:`Total`,numeric:!0,render:e=>e.total===null?`—`:w(e.total)}]:[]];return(0,f.jsx)(ue,{title:e,description:t,caveat:n,status:De,table:(0,f.jsx)(ce,{caption:e,columns:Re,rows:M,rowKey:e=>String(e.x)}),footer:(0,f.jsx)(fe,{items:_.map((e,t)=>({label:e.label,color:j[t],kind:v?`swatch`:`line`}))}),children:(0,f.jsxs)(`div`,{ref:T,className:`${s.plotWrap} ${s.focusable}`,tabIndex:0,role:`group`,"aria-label":`${e}. Use the left and right arrow keys to read values.`,"aria-describedby":A,onFocus:()=>k(e=>e??(M.length?M.length-1:null)),onBlur:()=>k(null),onKeyDown:Ie,children:[(0,f.jsxs)(`svg`,{className:s.svg,width:E,height:y,viewBox:`0 0 ${E} ${y}`,role:`img`,"aria-label":Le,onPointerMove:e=>k(Fe(e.clientX)),onPointerLeave:()=>k(null),children:[L.map((e,t)=>(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{className:s.grid,x1:z,x2:z+K,y1:V(e),y2:V(e)}),(0,f.jsx)(`text`,{className:s.tick,x:z-6,y:V(e),dy:`0.32em`,textAnchor:`end`,children:I.labels[t]})]},e)),(0,f.jsx)(`line`,{className:s.axis,x1:z,x2:z+K,y1:V(Math.max(R,0)),y2:V(Math.max(R,0))}),Pe.map(e=>(0,f.jsx)(`text`,{"data-axis-label":e.key,className:s.tick,x:e.x,y:y-8,textAnchor:e.anchor,children:e.text},e.key)),Me.map((e,t)=>(0,f.jsxs)(`g`,{"data-series":_[t].id,children:[e.map((e,n)=>(0,f.jsx)(`path`,{d:de(e.top,e.bottom),fill:j[t],className:v?void 0:s.wash,opacity:v?.85:void 0,stroke:v?`var(--chart-surface)`:void 0,strokeWidth:v?2:void 0},`a${n}`)),v?null:e.map((e,n)=>e.top.length===1?(0,f.jsx)(`circle`,{cx:e.top[0].x,cy:e.top[0].y,r:3,fill:j[t]},`p${n}`):(0,f.jsx)(`path`,{d:a(e.top),stroke:j[t],className:s.line},`l${n}`)),G&&e.length?(()=>{let n=e[e.length-1].top,r=n[n.length-1];return(0,f.jsx)(`text`,{"data-end-label":_[t].id,className:s.label,x:r.x+6,y:W.get(_[t].id)??r.y,dy:`0.32em`,children:_[t].label})})():null]},_[t].id)),S?(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{className:s.reference,x1:z,x2:z+K,y1:V(S.value),y2:V(S.value)}),(0,f.jsxs)(`text`,{className:s.tick,x:z+K,y:V(S.value)-4,textAnchor:`end`,children:[S.label,` · `,w(S.value)]})]}):null,Q?(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{className:s.crosshair,x1:X(Q.x),x2:X(Q.x),y1:p,y2:p+B}),_.map((e,t)=>{let n=v?Q.total===null?null:Q.values.slice(0,t+1).reduce((e,t)=>e+(t??0),0):Q.values[t];return n==null?null:(0,f.jsx)(`circle`,{className:s.marker,cx:X(Q.x),cy:V(n),r:4,fill:j[t]},e.id)})]}):null]}),(0,f.jsx)(`span`,{id:A,className:s.srOnly,"aria-live":`polite`,children:Q?`${C(Q.x)}: ${_.map((e,t)=>`${e.label} ${Q.values[t]===null?`no data`:w(Q.values[t])}`).join(`, `)}`:``}),Q?(0,f.jsx)(c,{left:pe(X(Q.x),E),top:p,title:C(Q.x),rows:[..._.map((e,t)=>({key:e.id,label:e.label,value:Q.values[t]===null?null:w(Q.values[t]),color:j[t]})),...v&&_.length>1?[{key:`__t`,label:`Total`,value:Q.total===null?null:w(Q.total)}]:[]]}):null]})})}export{g as t};
2
+ //# sourceMappingURL=AreaTrend-BgnK0wAy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AreaTrend-BgnK0wAy.js","names":[],"sources":["../../../../../../src/web-ui/components/charts/AreaTrend.tsx"],"sourcesContent":["/**\n * components/charts/AreaTrend.tsx — change over time for 1–4 series, as lines\n * over a 10% wash (overlaid) or as a stacked composition (`stacked`).\n *\n * Honesty: a `null` y is a GAP — the line and wash break there, and in stacked\n * mode an unknown in any layer breaks the whole stack at that x (the total is\n * unknown), never a silent zero. One y-axis only; a threshold is a labelled\n * reference line, not a second scale.\n *\n * Interaction: crosshair + tooltip on hover; the plot is focusable and the\n * arrow keys (Home/End) walk the same crosshair, announced through a live\n * region. The Table view carries every value without hovering.\n */\nimport { useId, useMemo, useRef, useState, type KeyboardEvent, type PointerEvent } from 'react';\nimport type { Series } from './types.js';\nimport { seriesColor } from './colors.js';\nimport { ChartFrame, type ChartStatus } from './ChartFrame.js';\nimport { ChartLegend, ChartTooltip, clampTooltipLeft } from './ChartParts.js';\nimport { TableView, type TableColumn } from './TableView.js';\nimport {\n MIN_TIME_SPAN_MS,\n allIntegers,\n areaPath,\n axisTicks,\n dodgeLabels,\n ensureSpan,\n isTimeAxis,\n labelCharPx,\n layoutAxisLabels,\n linePath,\n linearScale,\n percentScale,\n splitRuns,\n thinIndexes,\n tickGutter,\n xKeeper,\n type XY,\n} from './chart-math.js';\nimport { formatCompact, formatTimeLabel, timeLabelLadder } from './format.js';\nimport { useChartWidth } from './useChartWidth.js';\nimport { useTextScale } from './useTextScale.js';\nimport plot from './plot.module.css';\n\nexport interface AreaTrendSeries extends Series {\n /** Override the identity colour (defaults to the fixed categorical slot by index). */\n color?: string;\n}\n\nexport interface AreaTrendProps {\n title: string;\n description?: string;\n caveat?: string;\n status?: ChartStatus;\n series: AreaTrendSeries[];\n stacked?: boolean;\n /** Plot height in px, including the x-axis band. */\n height?: number;\n /** Fixed width (tests, print). Omit to fill the container. */\n width?: number;\n formatX?: (x: number) => string;\n formatY?: (y: number) => string;\n /** A labelled horizontal reference (a cap, a target). */\n threshold?: { value: number; label: string };\n /**\n * The y range to draw (widened, never clipped, if a value falls outside).\n * Default: a percent formatter (`formatY(50)` → \"50%\") gets 0–100 — or 0–1\n * for a fraction formatter — so percent cards share one scale; anything\n * else fits its data.\n */\n yDomain?: readonly [number, number];\n /** Accessible summary override. */\n ariaLabel?: string;\n}\n\nconst PAD_T = 12;\nconst PAD_B = 26;\nconst PAD_R = 12;\n/* End-label estimates are for 12 px text and are multiplied by the Display\n size (useTextScale) where they are used. END_LABEL_MAX is a budget of plot\n width, not a text measure, so it stays in px: at a larger size a long name\n falls back to the legend sooner rather than squeezing the plot. */\nconst END_LABEL_CH = 6.6;\nconst END_LABEL_MAX = 120;\n/** Line height of a direct end label at 12 px: two closer than this overlap. */\nconst END_LABEL_GAP_Y = 14;\n\ninterface Row {\n x: number;\n values: (number | null)[];\n total: number | null;\n}\n\nexport function AreaTrend({\n title,\n description,\n caveat,\n status,\n series,\n stacked = false,\n height = 200,\n width: fixedWidth,\n formatX: formatXProp,\n formatY: formatYProp,\n threshold,\n yDomain,\n ariaLabel,\n}: AreaTrendProps) {\n const formatX = formatXProp ?? formatTimeLabel;\n const formatY = formatYProp ?? formatCompact;\n const wrapRef = useRef<HTMLDivElement>(null);\n const width = useChartWidth(wrapRef, fixedWidth);\n const textScale = useTextScale();\n const [active, setActive] = useState<number | null>(null);\n const liveId = useId();\n\n const colors = series.map((s, i) => s.color ?? seriesColor(i));\n\n const rows: Row[] = useMemo(() => {\n // On a time axis a 0 / NaN / pre-2000 x is a null timestamp that leaked\n // through, not a moment — it would start the axis at \"Dec 31\" 1969.\n const all = series.flatMap((s) => s.points.map((p) => p.x));\n const keep = xKeeper(all);\n const xs = Array.from(new Set(all.filter(keep))).sort((a, b) => a - b);\n const lookup = series.map((s) => new Map(s.points.map((p) => [p.x, p.y])));\n return xs.map((x) => {\n const values = lookup.map((m) => (m.has(x) ? m.get(x)! : null));\n const total = values.some((v) => v === null) ? null : values.reduce<number>((a, v) => a + (v ?? 0), 0);\n return { x, values, total };\n });\n }, [series]);\n\n const hasData = rows.some((r) => r.values.some((v) => v !== null));\n const resolvedStatus: ChartStatus = status ?? (hasData ? { kind: 'ready' } : { kind: 'empty' });\n\n // ── scales ─────────────────────────────────────────────────────────────\n const known = stacked\n ? rows.map((r) => r.total).filter((v): v is number => v !== null)\n : rows.flatMap((r) => r.values).filter((v): v is number => v !== null);\n const pctScale = formatYProp ? percentScale(formatYProp) : null;\n const inDomain = (d: readonly [number, number]) => known.every((v) => v >= d[0] && v <= d[1]);\n const baseDomain: readonly [number, number] | null = yDomain ?? (pctScale !== null && inDomain([0, pctScale]) ? [0, pctScale] : null);\n const yAxis = axisTicks(\n Math.min(0, baseDomain?.[0] ?? 0, ...known),\n Math.max(0, baseDomain?.[1] ?? 0, ...known, threshold?.value ?? 0),\n { count: 4, integer: known.length > 0 && allIntegers(known), format: formatYProp },\n );\n const ticksY = yAxis.ticks;\n const yMin = ticksY[0]!;\n const yMax = ticksY[ticksY.length - 1]!;\n const padL = tickGutter(yAxis.labels, 28, 64, textScale);\n const plotH = height - PAD_T - PAD_B;\n const ys = linearScale(yMin, yMax, PAD_T + plotH, PAD_T);\n\n // Direct end labels (series names at each line's last point), dodged so\n // two lines ending on the same value (\"Struggles\" and \"Wins\" both at 3)\n // never print over each other. If they cannot all fit, the legend alone\n // names the series. Decided before the x scale: the gutter they need is\n // what plotW is measured against.\n const endLabelW = !stacked && series.length <= 4\n ? Math.max(0, ...series.map((s) => s.label.length)) * END_LABEL_CH * textScale + 6\n : 0;\n const endPoints = series.flatMap((s, si) => {\n for (let r = rows.length - 1; r >= 0; r--) {\n const v = rows[r]!.values[si];\n if (v !== null && v !== undefined) return [{ key: s.id, y: ys(v) }];\n }\n return [];\n });\n const dodged = endLabelW > 0 && endLabelW <= END_LABEL_MAX && width >= 420\n ? dodgeLabels(endPoints, END_LABEL_GAP_Y * textScale, PAD_T, PAD_T + plotH)\n : null;\n const showEndLabels = dodged !== null && endPoints.length > 0;\n const padR = PAD_R + (showEndLabels ? endLabelW : 0);\n const plotW = Math.max(40, width - padL - padR);\n\n const rawMin = rows.length ? rows[0]!.x : 0;\n const rawMax = rows.length ? rows[rows.length - 1]!.x : 1;\n const timeAxis = isTimeAxis(rows.map((r) => r.x));\n // A burst of readings seconds apart is widened to MIN_TIME_SPAN_MS around\n // itself, not stretched edge to edge (a lone point stays centred as before).\n const [xMin, xMax] = timeAxis && rawMax > rawMin ? ensureSpan(rawMin, rawMax, MIN_TIME_SPAN_MS) : [rawMin, rawMax];\n const xs = linearScale(xMin, xMax, padL, padL + plotW);\n\n // ── geometry ───────────────────────────────────────────────────────────\n // Recomputed per render on purpose: the scales depend on the measured width.\n const layers = (() => {\n if (stacked) {\n const acc = rows.map(() => 0);\n return series.map((_, si) => {\n const top = rows.map((r, ri) => {\n if (r.total === null) return { x: r.x, y: null as number | null, base: null as number | null };\n const base = acc[ri]!;\n acc[ri] = base + (r.values[si] ?? 0);\n return { x: r.x, y: acc[ri]!, base };\n });\n const runs = splitRuns(top.map((p) => ({ x: p.x, y: p.y })));\n return runs.map((run) => {\n const topPx: XY[] = run.map((p) => ({ x: xs(p.x), y: ys(p.y) }));\n const bottomPx: XY[] = run.map((p) => {\n const src = top.find((t) => t.x === p.x)!;\n return { x: xs(p.x), y: ys(src.base ?? 0) };\n });\n return { top: topPx, bottom: bottomPx };\n });\n });\n }\n return series.map((_, si) => {\n const runs = splitRuns(rows.map((r) => ({ x: r.x, y: r.values[si] ?? null })));\n return runs.map((run) => {\n const topPx = run.map((p) => ({ x: xs(p.x), y: ys(p.y) }));\n const bottomPx = run.map((p) => ({ x: xs(p.x), y: ys(Math.max(yMin, 0)) }));\n return { top: topPx, bottom: bottomPx };\n });\n });\n })();\n\n const xTickIdx = thinIndexes(rows.length, Math.max(2, Math.floor(plotW / 84)));\n // Collision-free x labels: the last point outranks the first, and both\n // outrank the interior ticks, which are simply dropped when they collide.\n // On a time axis the labels walk one shared detail ladder (caller's format\n // → shorter date/time; clock time only inside one day) until the ends fit.\n const ladder = timeAxis\n ? timeLabelLadder(rawMin, rawMax, formatXProp, xTickIdx.map((i) => rows[i]!.x))\n : [formatX];\n const xLabels = layoutAxisLabels(\n xTickIdx.map((i, n) => {\n const px = xs(rows[i]!.x);\n const isFirst = n === 0;\n const isLast = n === xTickIdx.length - 1;\n return {\n key: String(i),\n x: px,\n anchor: rows.length === 1 ? 'middle' as const : isFirst && px <= padL + 0.5 ? 'start' as const : isLast && px >= padL + plotW - 0.5 ? 'end' as const : 'middle' as const,\n priority: isLast ? 3 : isFirst ? 2 : 1,\n required: isFirst || isLast,\n variants: ladder.map((f) => f(rows[i]!.x)),\n };\n }),\n { min: padL, max: padL + plotW, charPx: labelCharPx(textScale) },\n );\n\n function indexAt(clientX: number): number | null {\n const el = wrapRef.current;\n if (!el || rows.length === 0) return null;\n const rect = el.getBoundingClientRect();\n const px = clientX - rect.left;\n let best = 0;\n let bestD = Infinity;\n rows.forEach((r, i) => {\n const d = Math.abs(xs(r.x) - px);\n if (d < bestD) { bestD = d; best = i; }\n });\n return best;\n }\n\n function onKey(e: KeyboardEvent<HTMLDivElement>): void {\n if (rows.length === 0) return;\n const cur = active ?? rows.length - 1;\n const next = e.key === 'ArrowLeft' ? cur - 1 : e.key === 'ArrowRight' ? cur + 1 : e.key === 'Home' ? 0 : e.key === 'End' ? rows.length - 1 : null;\n if (next === null) return;\n e.preventDefault();\n setActive(Math.max(0, Math.min(rows.length - 1, next)));\n }\n\n const activeRow = active !== null ? rows[active] : undefined;\n const latest = [...rows].reverse().find((r) => r.values.some((v) => v !== null));\n const summary = ariaLabel ?? (rows.length\n ? `${title}: ${rows.length} points from ${formatX(rawMin)} to ${formatX(rawMax)}.` +\n (latest ? ` Latest ${formatX(latest.x)}: ${series.map((s, i) => `${s.label} ${latest.values[i] === null ? 'no data' : formatY(latest.values[i]!)}`).join(', ')}.` : '')\n : `${title}: no data.`);\n\n const columns: TableColumn<Row>[] = [\n { key: 'x', label: 'When', render: (r) => formatX(r.x) },\n ...series.map((s, i) => ({\n key: s.id,\n label: s.label,\n numeric: true,\n render: (r: Row) => (r.values[i] === null ? '—' : formatY(r.values[i]!)),\n })),\n ...(stacked && series.length > 1\n ? [{ key: '__total', label: 'Total', numeric: true, render: (r: Row) => (r.total === null ? '—' : formatY(r.total)) }]\n : []),\n ];\n\n return (\n <ChartFrame\n title={title}\n description={description}\n caveat={caveat}\n status={resolvedStatus}\n table={<TableView caption={title} columns={columns} rows={rows} rowKey={(r) => String(r.x)} />}\n footer={\n <ChartLegend\n items={series.map((s, i) => ({ label: s.label, color: colors[i], kind: stacked ? 'swatch' : 'line' }))}\n />\n }\n >\n <div\n ref={wrapRef}\n className={`${plot.plotWrap} ${plot.focusable}`}\n tabIndex={0}\n role=\"group\"\n aria-label={`${title}. Use the left and right arrow keys to read values.`}\n aria-describedby={liveId}\n onFocus={() => setActive((a) => a ?? (rows.length ? rows.length - 1 : null))}\n onBlur={() => setActive(null)}\n onKeyDown={onKey}\n >\n <svg\n className={plot.svg}\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n role=\"img\"\n aria-label={summary}\n onPointerMove={(e: PointerEvent<SVGSVGElement>) => setActive(indexAt(e.clientX))}\n onPointerLeave={() => setActive(null)}\n >\n {ticksY.map((t, i) => (\n <g key={t}>\n <line className={plot.grid} x1={padL} x2={padL + plotW} y1={ys(t)} y2={ys(t)} />\n <text className={plot.tick} x={padL - 6} y={ys(t)} dy=\"0.32em\" textAnchor=\"end\">{yAxis.labels[i]}</text>\n </g>\n ))}\n <line className={plot.axis} x1={padL} x2={padL + plotW} y1={ys(Math.max(yMin, 0))} y2={ys(Math.max(yMin, 0))} />\n {xLabels.map((l) => (\n <text key={l.key} data-axis-label={l.key} className={plot.tick} x={l.x} y={height - 8} textAnchor={l.anchor}>\n {l.text}\n </text>\n ))}\n\n {layers.map((runs, si) => (\n <g key={series[si]!.id} data-series={series[si]!.id}>\n {runs.map((run, ri) => (\n <path\n key={`a${ri}`}\n d={areaPath(run.top, run.bottom)}\n fill={colors[si]}\n className={stacked ? undefined : plot.wash}\n opacity={stacked ? 0.85 : undefined}\n stroke={stacked ? 'var(--chart-surface)' : undefined}\n strokeWidth={stacked ? 2 : undefined}\n />\n ))}\n {!stacked\n ? runs.map((run, ri) =>\n run.top.length === 1 ? (\n <circle key={`p${ri}`} cx={run.top[0]!.x} cy={run.top[0]!.y} r={3} fill={colors[si]} />\n ) : (\n <path key={`l${ri}`} d={linePath(run.top)} stroke={colors[si]} className={plot.line} />\n ),\n )\n : null}\n {showEndLabels && runs.length ? (() => {\n const last = runs[runs.length - 1]!.top;\n const end = last[last.length - 1]!;\n return (\n <text data-end-label={series[si]!.id} className={plot.label} x={end.x + 6} y={dodged!.get(series[si]!.id) ?? end.y} dy=\"0.32em\">{series[si]!.label}</text>\n );\n })() : null}\n </g>\n ))}\n\n {threshold ? (\n <g>\n <line className={plot.reference} x1={padL} x2={padL + plotW} y1={ys(threshold.value)} y2={ys(threshold.value)} />\n <text className={plot.tick} x={padL + plotW} y={ys(threshold.value) - 4} textAnchor=\"end\">\n {threshold.label} · {formatY(threshold.value)}\n </text>\n </g>\n ) : null}\n\n {activeRow ? (\n <g>\n <line className={plot.crosshair} x1={xs(activeRow.x)} x2={xs(activeRow.x)} y1={PAD_T} y2={PAD_T + plotH} />\n {series.map((s, si) => {\n const v = stacked\n ? (activeRow.total === null ? null : activeRow.values.slice(0, si + 1).reduce<number>((a, b) => a + (b ?? 0), 0))\n : activeRow.values[si];\n return v === null || v === undefined ? null : (\n <circle key={s.id} className={plot.marker} cx={xs(activeRow.x)} cy={ys(v)} r={4} fill={colors[si]} />\n );\n })}\n </g>\n ) : null}\n\n </svg>\n <span id={liveId} className={plot.srOnly} aria-live=\"polite\">\n {activeRow\n ? `${formatX(activeRow.x)}: ${series.map((s, i) => `${s.label} ${activeRow.values[i] === null ? 'no data' : formatY(activeRow.values[i]!)}`).join(', ')}`\n : ''}\n </span>\n {activeRow ? (\n <ChartTooltip\n left={clampTooltipLeft(xs(activeRow.x), width)}\n top={PAD_T}\n title={formatX(activeRow.x)}\n rows={[\n ...series.map((s, i) => ({\n key: s.id,\n label: s.label,\n value: activeRow.values[i] === null ? null : formatY(activeRow.values[i]!),\n color: colors[i],\n })),\n ...(stacked && series.length > 1\n ? [{ key: '__t', label: 'Total', value: activeRow.total === null ? null : formatY(activeRow.total) }]\n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,EAAQ,EAAU,KAAK,CAAE,CAAC,EAClG,CAAC,CACP,CACD,CAAA,EACC,IACD,GACK,CAAA,CAEhB"}
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./index-Dk8R-3a7.js";import{n as t}from"./Advanced-xVYFAeA8.js";var n=e();function r(){return(0,n.jsx)(t,{})}export{r as AutonomySection};
2
+ //# sourceMappingURL=AutonomySection-BF5UCsMv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutonomySection-CoMngwNB.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/sections/AutonomySection.tsx"],"sourcesContent":["/**\n * routes/verse/sections/AutonomySection.tsx — the 3.9 rail entry for the\n * legacy Autonomy cockpit. 3.10 moved the cockpit to Fleet ▸ Advanced\n * (fleet/Advanced.tsx; SPEC-310C §5, unit C7); stored `autonomy` sections\n * migrate to Fleet (workbench-types migrateSectionId).\n *\n * WHY this wrapper still exists: the shell (C1) retires the old rail entry in\n * the same release, and until it lands the current rail still lazy-loads\n * `sections/AutonomySection.tsx` by name — deleting it first would turn the\n * rail item into a MissingSection. Delete this file once C1's rail no longer\n * lists `autonomy` (follow-up noted in the C7 report).\n */\nimport { FleetAdvanced } from '../fleet/Advanced.js';\n\nexport function AutonomySection() {\n return <FleetAdvanced />;\n}\n"],"mappings":"6FAcA,SAAgB,GAAkB,CAChC,OAAO,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,CAAA,CACzB"}
1
+ {"version":3,"file":"AutonomySection-BF5UCsMv.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/sections/AutonomySection.tsx"],"sourcesContent":["/**\n * routes/verse/sections/AutonomySection.tsx — the 3.9 rail entry for the\n * legacy Autonomy cockpit. 3.10 moved the cockpit to Fleet ▸ Advanced\n * (fleet/Advanced.tsx; SPEC-310C §5, unit C7); stored `autonomy` sections\n * migrate to Fleet (workbench-types migrateSectionId).\n *\n * WHY this wrapper still exists: the shell (C1) retires the old rail entry in\n * the same release, and until it lands the current rail still lazy-loads\n * `sections/AutonomySection.tsx` by name — deleting it first would turn the\n * rail item into a MissingSection. Delete this file once C1's rail no longer\n * lists `autonomy` (follow-up noted in the C7 report).\n */\nimport { FleetAdvanced } from '../fleet/Advanced.js';\n\nexport function AutonomySection() {\n return <FleetAdvanced />;\n}\n"],"mappings":"6FAcA,SAAgB,GAAkB,CAChC,OAAO,EAAA,EAAA,IAAA,CAAC,EAAD,CAAgB,CAAA,CACzB"}
@@ -0,0 +1 @@
1
+ ._bar_1j44k_8{gap:var(--space-1);flex-direction:column;min-width:0;display:flex}._rows_1j44k_15{gap:var(--space-1);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._row_1j44k_15{align-items:center;gap:var(--space-2);min-width:0;min-height:var(--control-h-sm);padding:var(--space-1) var(--space-1) var(--space-1) var(--space-3);border:1px solid var(--border-subtle);border-radius:var(--radius-md);background:var(--bg-surface);font-size:var(--text-sm-size);line-height:var(--text-sm-line);flex-wrap:wrap;display:flex}._ident_1j44k_39{align-items:center;gap:var(--space-2);flex:0 auto;min-width:0;display:inline-flex;overflow:hidden}._glyph_1j44k_47{color:var(--text-tertiary);flex:none}._repo_1j44k_48{color:var(--text-primary);font-weight:var(--font-weight-semibold);text-overflow:ellipsis;white-space:nowrap;flex:none;max-width:18ch;overflow:hidden}._branch_1j44k_57{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs-size);color:var(--text-secondary);overflow:hidden}._drift_1j44k_66{font-size:var(--text-xs-size);color:var(--status-warning-fg);flex:none}._stat_1j44k_72{align-items:center;gap:var(--space-2);min-height:var(--control-h-xs);padding:0 var(--space-2);border-radius:var(--radius-sm);font-family:var(--font-mono);font-size:var(--text-xs-size);font-variant-numeric:tabular-nums;cursor:pointer;transition:background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);background:0 0;border:1px solid #0000;flex:none;display:inline-flex}._stat_1j44k_72:hover{background:var(--bg-hover);border-color:var(--border-default)}._stat_1j44k_72:focus-visible{box-shadow:var(--shadow-focus-ring);outline:none}._add_1j44k_90{color:var(--status-success-fg)}._del_1j44k_91{color:var(--status-danger-fg)}._checking_1j44k_93,._conflicts_1j44k_94{font-size:var(--text-xs-size);color:var(--text-tertiary);flex:none}._conflicts_1j44k_94{color:var(--status-danger-fg);font-weight:var(--font-weight-medium)}._spacer_1j44k_101{flex:1 1 0;min-width:0}._split_1j44k_105{flex:none;align-items:stretch;margin-left:auto;display:inline-flex;position:relative}._primary_1j44k_113,._menuButton_1j44k_114{justify-content:center;align-items:center;gap:var(--space-2);min-height:var(--control-h-sm);border:1px solid var(--accent-600);background:var(--accent-600);color:var(--text-on-accent);font:inherit;font-size:var(--text-sm-size);font-weight:var(--font-weight-semibold);cursor:pointer;transition:background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);display:inline-flex}._primary_1j44k_113{padding:0 var(--space-3);border-radius:var(--radius-sm) 0 0 var(--radius-sm)}._menuButton_1j44k_114{width:var(--control-h-sm);border-left-color:color-mix(in srgb, var(--text-on-accent) 35%, var(--accent-600));border-radius:0 var(--radius-sm) var(--radius-sm) 0;padding:0}._primary_1j44k_113:hover,._menuButton_1j44k_114:hover{background:var(--accent-700);border-color:var(--accent-700)}._primary_1j44k_113:focus-visible,._menuButton_1j44k_114:focus-visible{box-shadow:var(--shadow-focus-ring);z-index:1;outline:none}._primary_1j44k_113:disabled,._menuButton_1j44k_114:disabled{cursor:default;opacity:.6}._primary_1j44k_113[data-tone=subtle],._primary_1j44k_113[data-tone=subtle]+._visuallyHidden_1j44k_148+._menuButton_1j44k_114,._menuButton_1j44k_114[data-alone=true]{background:var(--bg-surface-raised);border-color:var(--border-default);color:var(--text-primary)}._primary_1j44k_113[data-tone=subtle]:hover,._primary_1j44k_113[data-tone=subtle]+._visuallyHidden_1j44k_148+._menuButton_1j44k_114:hover,._menuButton_1j44k_114[data-alone=true]:hover{background:var(--bg-hover);border-color:var(--border-strong)}._menuButton_1j44k_114[data-alone=true]{border-radius:var(--radius-sm)}._primary_1j44k_113{position:relative}._primary_1j44k_113[aria-busy=true] ._primaryLabel_1j44k_162{color:#0000}._spinner_1j44k_163{border:2px solid color-mix(in srgb, currentColor 35%, transparent);border-radius:var(--radius-full);border-top-color:currentColor;width:12px;height:12px;margin:-6px 0 0 -6px;animation:.8s linear infinite _branch-spin_1j44k_1;position:absolute;top:50%;left:50%}@keyframes _branch-spin_1j44k_1{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) ._spinner_1j44k_163{animation-duration:2.4s}}._menu_1j44k_114{right:0;bottom:calc(100% + var(--space-1));z-index:var(--z-dropdown);min-width:15rem;max-width:min(20rem, calc(100vw - var(--space-8)));padding:var(--space-1);background:var(--bg-surface-raised);border:1px solid var(--border-default);border-radius:var(--radius-md);box-shadow:var(--shadow-menu);animation:_menu-in_1j44k_1 var(--duration-fast) var(--ease-decelerate);flex-direction:column;display:flex;position:absolute}._menu_1j44k_114:focus{outline:none}@keyframes _menu-in_1j44k_1{0%{opacity:0;transform:translateY(2px)}}@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) ._menu_1j44k_114{animation:none}}._menuItem_1j44k_204{width:100%;padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);color:var(--text-primary);font:inherit;font-size:var(--text-sm-size);line-height:var(--text-sm-line);text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;align-items:flex-start;gap:2px;display:flex}._menuItem_1j44k_204:hover:not([aria-disabled=true]),._menuItem_1j44k_204:focus-visible{background:var(--bg-hover);outline:none}._menuItem_1j44k_204[aria-disabled=true]{cursor:default;color:var(--text-tertiary)}._menuLabel_1j44k_224{font-weight:var(--font-weight-medium)}._menuReason_1j44k_225{font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--text-tertiary)}._more_1j44k_233{min-height:var(--control-h-xs);padding:0 var(--space-2);color:var(--text-link);font:inherit;font-size:var(--text-xs-size);cursor:pointer;border-radius:var(--radius-sm);background:0 0;border:0;align-self:flex-start}._more_1j44k_233:hover{text-decoration:underline}._more_1j44k_233:focus-visible{box-shadow:var(--shadow-focus-ring);outline:none}._notice_1j44k_248{padding:0 var(--space-3);font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--text-secondary);margin:0}._notice_1j44k_248:empty{display:none}._notice_1j44k_248[data-tone=error]{color:var(--status-danger-fg)}._visuallyHidden_1j44k_148{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._bar_1j44k_8[data-compact=true] ._row_1j44k_15{padding-left:var(--space-2)}._bar_1j44k_8[data-compact=true] ._ident_1j44k_39{flex:100%}._bar_1j44k_8[data-compact=true] ._repo_1j44k_48{max-width:14ch}._form_1pzii_5{gap:var(--space-2);flex-direction:column;display:flex}._facts_1pzii_11{margin:0 0 var(--space-2);padding:var(--space-3);gap:var(--space-2);border:1px solid var(--border-subtle);border-radius:var(--radius-md);background:var(--bg-surface);flex-direction:column;list-style:none;display:flex}._fact_1pzii_11{gap:var(--space-2);color:var(--text-secondary);font-size:var(--text-sm-size);line-height:var(--text-sm-line);align-items:baseline;display:flex}._fact_1pzii_11 strong{color:var(--text-primary);font-weight:var(--font-weight-semibold)}._fact_1pzii_11[data-tone=warning]{color:var(--text-primary)}._factWord_1pzii_34{font-family:var(--font-display);font-size:var(--text-2xs-size);line-height:var(--text-2xs-line);letter-spacing:var(--tracking-label);text-transform:uppercase;color:var(--status-warning-fg);font-weight:var(--font-weight-semibold);flex:none}._ref_1pzii_45{font-family:var(--font-mono);font-size:var(--text-xs-size);color:var(--text-primary);padding:0 var(--space-1);border-radius:var(--radius-xs);background:var(--bg-code);overflow-wrap:anywhere}._label_1pzii_55{font-size:var(--text-sm-size);line-height:var(--text-sm-line);font-weight:var(--font-weight-semibold);color:var(--text-primary);margin-top:var(--space-1)}._optional_1pzii_62{font-weight:var(--font-weight-regular);color:var(--text-tertiary);margin-left:var(--space-1)}._input_1pzii_68,._textarea_1pzii_69{box-sizing:border-box;border:1px solid var(--border-default);border-radius:var(--radius-sm);background:var(--bg-input);width:100%;color:var(--text-primary);font:inherit;font-size:var(--text-base-size);line-height:var(--text-base-line);padding:var(--space-2) var(--space-3)}._input_1pzii_68{min-height:var(--control-h-sm)}._textarea_1pzii_69{resize:vertical;min-height:calc(var(--text-base-line) * 3 + var(--space-4))}._input_1pzii_68:focus-visible,._textarea_1pzii_69:focus-visible{border-color:var(--border-focus);box-shadow:var(--shadow-focus-ring);outline:none}._mono_1pzii_85{font-family:var(--font-mono);font-size:var(--text-sm-size)}._row_1pzii_87{align-items:flex-end;gap:var(--space-3);flex-wrap:wrap;display:flex}._field_1pzii_93{gap:var(--space-2);flex-direction:column;flex:12rem;min-width:0;display:flex}._check_1pzii_100{align-items:center;gap:var(--space-2);min-height:var(--control-h-sm);font-size:var(--text-sm-size);color:var(--text-primary);cursor:pointer;display:inline-flex}._check_1pzii_100 input{accent-color:var(--accent-600);width:16px;height:16px}._hint_1pzii_111{color:var(--text-tertiary);font-size:var(--text-xs-size);line-height:var(--text-xs-line);margin:0}._hint_1pzii_111 kbd{font-family:var(--font-mono);font-size:var(--text-2xs-size);padding:0 var(--space-1);border:1px solid var(--border-subtle);border-radius:var(--radius-xs);margin-right:2px}._error_1pzii_126{padding:var(--space-2) var(--space-3);border-left:2px solid var(--status-danger-solid);background:var(--status-danger-bg);color:var(--status-danger-fg);font-size:var(--text-sm-size);line-height:var(--text-sm-line);border-radius:var(--radius-xs);margin:0}._actions_1pzii_137{justify-content:flex-end;gap:var(--space-2);margin-top:var(--space-3);display:flex}._chip_1sdua_5{align-items:center;gap:var(--space-1);min-width:0;max-width:100%;min-height:var(--control-h-xs);padding:0 var(--space-2);border:1px solid var(--border-subtle);border-radius:var(--radius-full);background:var(--bg-surface);color:var(--text-secondary);font-size:var(--text-xs-size);line-height:var(--text-xs-line);white-space:nowrap;transition:border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);text-decoration:none;display:inline-flex}._chip_1sdua_5:hover{background:var(--bg-hover);border-color:var(--border-default)}._chip_1sdua_5:focus-visible{box-shadow:var(--shadow-focus-ring);outline:none}._glyph_1sdua_26{flex:none}._chip_1sdua_5[data-tone=success] ._glyph_1sdua_26,._chip_1sdua_5[data-tone=merged] ._glyph_1sdua_26,._chip_1sdua_5[data-tone=success] ._state_1sdua_30,._chip_1sdua_5[data-tone=merged] ._state_1sdua_30{color:var(--status-success-fg)}._chip_1sdua_5[data-tone=danger] ._glyph_1sdua_26,._chip_1sdua_5[data-tone=danger] ._checks_1sdua_33{color:var(--status-danger-fg)}._chip_1sdua_5[data-tone=running] ._checks_1sdua_33{color:var(--status-running-fg)}._chip_1sdua_5[data-tone=warning] ._glyph_1sdua_26{color:var(--status-warning-fg)}._number_1sdua_37{font-family:var(--font-mono);color:var(--text-primary);font-variant-numeric:tabular-nums}._title_1sdua_43{text-overflow:ellipsis;min-width:0;max-width:22ch;color:var(--text-secondary);overflow:hidden}._state_1sdua_30{font-weight:var(--font-weight-medium);color:var(--text-primary)}._state_1sdua_30:before,._checks_1sdua_33:before{content:"·";margin-right:var(--space-1);color:var(--text-tertiary);font-weight:var(--font-weight-regular)}._checks_1sdua_33{color:var(--text-secondary);flex:none}._number_1sdua_37,._state_1sdua_30{flex:none}._pulse_1sdua_65{border-radius:var(--radius-full);background:var(--status-running-solid);width:8px;height:8px;animation:_pr-pulse_1sdua_1 var(--duration-pulse) var(--ease-standard) infinite;flex:none;margin:0 2px}@keyframes _pr-pulse_1sdua_1{50%{opacity:.35}}