@ashlr/hub 3.11.0 → 3.11.2

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 (403) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/dist/authority-surface.json +12 -7
  3. package/dist/build-identity.json +2 -2
  4. package/dist/core/universe/builtins/preparation/manifest.json +1 -1
  5. package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +5 -4
  6. package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +4 -3
  7. package/dist/core/universe/campaign.js +9 -1
  8. package/dist/core/universe/campaign.js.map +1 -1
  9. package/dist/core/universe/runner.d.ts +3 -0
  10. package/dist/core/universe/runner.js +7 -3
  11. package/dist/core/universe/runner.js.map +1 -1
  12. package/dist/core/verse/compaction-point.d.ts +55 -0
  13. package/dist/core/verse/compaction-point.js +75 -0
  14. package/dist/core/verse/compaction-point.js.map +1 -0
  15. package/dist/core/verse/context-math.d.ts +1 -38
  16. package/dist/core/verse/context-math.js +5 -59
  17. package/dist/core/verse/context-math.js.map +1 -1
  18. package/dist/core/web/public/next/assets/{ActionMenu-CQvNJvHY.js → ActionMenu-_DhtX2gO.js} +2 -2
  19. package/dist/core/web/public/next/assets/{ActionMenu-CQvNJvHY.js.map → ActionMenu-_DhtX2gO.js.map} +1 -1
  20. package/dist/core/web/public/next/assets/Advanced-CAAfaBke.js +2 -0
  21. package/dist/core/web/public/next/assets/{Advanced-DEM93sKI.js.map → Advanced-CAAfaBke.js.map} +1 -1
  22. package/dist/core/web/public/next/assets/App-BAywyjE8.js +7 -0
  23. package/dist/core/web/public/next/assets/{App-CimXmK0L.js.map → App-BAywyjE8.js.map} +1 -1
  24. package/dist/core/web/public/next/assets/AppsSection-CUypKeog.js +2 -0
  25. package/dist/core/web/public/next/assets/{AppsSection-D6U-dSj6.js.map → AppsSection-CUypKeog.js.map} +1 -1
  26. package/dist/core/web/public/next/assets/{AreaTrend-LD9lCPkT.js → AreaTrend-CblDqC8Q.js} +2 -2
  27. package/dist/core/web/public/next/assets/{AreaTrend-LD9lCPkT.js.map → AreaTrend-CblDqC8Q.js.map} +1 -1
  28. package/dist/core/web/public/next/assets/AutonomySection-D3d8lYO3.js +2 -0
  29. package/dist/core/web/public/next/assets/{AutonomySection-3V9pUyxm.js.map → AutonomySection-D3d8lYO3.js.map} +1 -1
  30. package/dist/core/web/public/next/assets/BranchBar-DU0jAV1E.js +2 -0
  31. package/dist/core/web/public/next/assets/{BranchBar-U8UdpfEB.js.map → BranchBar-DU0jAV1E.js.map} +1 -1
  32. package/dist/core/web/public/next/assets/{BudgetControl-DOTlMSmW.js → BudgetControl-Mm1ZL4u6.js} +2 -2
  33. package/dist/core/web/public/next/assets/{BudgetControl-DOTlMSmW.js.map → BudgetControl-Mm1ZL4u6.js.map} +1 -1
  34. package/dist/core/web/public/next/assets/{BurnDown-x4PWH9JF.js → BurnDown-C1fgcFqo.js} +2 -2
  35. package/dist/core/web/public/next/assets/{BurnDown-x4PWH9JF.js.map → BurnDown-C1fgcFqo.js.map} +1 -1
  36. package/dist/core/web/public/next/assets/{Button-DYv_KKxr.js → Button-DqgLUZvd.js} +2 -2
  37. package/dist/core/web/public/next/assets/{Button-DYv_KKxr.js.map → Button-DqgLUZvd.js.map} +1 -1
  38. package/dist/core/web/public/next/assets/CapacityStrip-nWFHvqFB.js +2 -0
  39. package/dist/core/web/public/next/assets/CapacityStrip-nWFHvqFB.js.map +1 -0
  40. package/dist/core/web/public/next/assets/ChatSection-DUZNpiVr.js +3 -0
  41. package/dist/core/web/public/next/assets/ChatSection-DUZNpiVr.js.map +1 -0
  42. package/dist/core/web/public/next/assets/{CloudBudgetForm-DJeJvBEu.js → CloudBudgetForm-2OW38o_C.js} +2 -2
  43. package/dist/core/web/public/next/assets/{CloudBudgetForm-DJeJvBEu.js.map → CloudBudgetForm-2OW38o_C.js.map} +1 -1
  44. package/dist/core/web/public/next/assets/CommandPalette-C5w2o1-r.js +2 -0
  45. package/dist/core/web/public/next/assets/{CommandPalette-FiD4N8XD.js.map → CommandPalette-C5w2o1-r.js.map} +1 -1
  46. package/dist/core/web/public/next/assets/CommandSection-Bx2knNqY.js +2 -0
  47. package/dist/core/web/public/next/assets/{CommandSection-DN8KwH-X.js.map → CommandSection-Bx2knNqY.js.map} +1 -1
  48. package/dist/core/web/public/next/assets/ConfirmDialog-B7ZwCQOX.js +2 -0
  49. package/dist/core/web/public/next/assets/ConfirmDialog-B7ZwCQOX.js.map +1 -0
  50. package/dist/core/web/public/next/assets/ConfirmDialog-Dx15x0Ho.css +1 -0
  51. package/dist/core/web/public/next/assets/Dialog-BpgcEW6b.js +2 -0
  52. package/dist/core/web/public/next/assets/Dialog-BpgcEW6b.js.map +1 -0
  53. package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
  54. package/dist/core/web/public/next/assets/{DiffPane-DLJ3gGGK.js → DiffPane-DpqRUtCx.js} +2 -2
  55. package/dist/core/web/public/next/assets/{DiffPane-DLJ3gGGK.js.map → DiffPane-DpqRUtCx.js.map} +1 -1
  56. package/dist/core/web/public/next/assets/{DiffViewer-B7NWPjIO.js → DiffViewer-CoV5-nUf.js} +2 -2
  57. package/dist/core/web/public/next/assets/{DiffViewer-B7NWPjIO.js.map → DiffViewer-CoV5-nUf.js.map} +1 -1
  58. package/dist/core/web/public/next/assets/DockHost-C0Pq7Jak.js +2 -0
  59. package/dist/core/web/public/next/assets/{DockHost-DvR-hPhZ.js.map → DockHost-C0Pq7Jak.js.map} +1 -1
  60. package/dist/core/web/public/next/assets/{EmptyState-DhNgDDrF.js → EmptyState-DYW29ncw.js} +2 -2
  61. package/dist/core/web/public/next/assets/{EmptyState-DhNgDDrF.js.map → EmptyState-DYW29ncw.js.map} +1 -1
  62. package/dist/core/web/public/next/assets/{Epistemic-uARPnx9x.js → Epistemic-DVx6oHzp.js} +2 -2
  63. package/dist/core/web/public/next/assets/{Epistemic-uARPnx9x.js.map → Epistemic-DVx6oHzp.js.map} +1 -1
  64. package/dist/core/web/public/next/assets/FleetSection-DSETviPK.js +3 -0
  65. package/dist/core/web/public/next/assets/{FleetSection-D_zRBCub.js.map → FleetSection-DSETviPK.js.map} +1 -1
  66. package/dist/core/web/public/next/assets/{Funnel-CL8uHONq.js → Funnel-DxiGqJrt.js} +2 -2
  67. package/dist/core/web/public/next/assets/{Funnel-CL8uHONq.js.map → Funnel-DxiGqJrt.js.map} +1 -1
  68. package/dist/core/web/public/next/assets/GearTray-C3I89sIt.js +2 -0
  69. package/dist/core/web/public/next/assets/{GearTray-C7k4l_BW.js.map → GearTray-C3I89sIt.js.map} +1 -1
  70. package/dist/core/web/public/next/assets/{GrowthSection-DwdNSGj8.js → GrowthSection-C3m2bPEz.js} +2 -2
  71. package/dist/core/web/public/next/assets/{GrowthSection-DwdNSGj8.js.map → GrowthSection-C3m2bPEz.js.map} +1 -1
  72. package/dist/core/web/public/next/assets/HandoffDialog-Bjb96a0N.js +2 -0
  73. package/dist/core/web/public/next/assets/{HandoffDialog-FPVOqOMN.js.map → HandoffDialog-Bjb96a0N.js.map} +1 -1
  74. package/dist/core/web/public/next/assets/{Input-B9-VLcHS.js → Input-ekTehVaH.js} +2 -2
  75. package/dist/core/web/public/next/assets/{Input-B9-VLcHS.js.map → Input-ekTehVaH.js.map} +1 -1
  76. package/dist/core/web/public/next/assets/LeaderCard-85VBbbaZ.js +2 -0
  77. package/dist/core/web/public/next/assets/{LeaderCard-4R0BhDzT.js.map → LeaderCard-85VBbbaZ.js.map} +1 -1
  78. package/dist/core/web/public/next/assets/{MatrixHeatmap-DiuushcS.js → MatrixHeatmap-Bo8j0QPC.js} +2 -2
  79. package/dist/core/web/public/next/assets/{MatrixHeatmap-DiuushcS.js.map → MatrixHeatmap-Bo8j0QPC.js.map} +1 -1
  80. package/dist/core/web/public/next/assets/McpSection-DvHFaVyp.js +2 -0
  81. package/dist/core/web/public/next/assets/{McpSection-CJ__OJKl.js.map → McpSection-DvHFaVyp.js.map} +1 -1
  82. package/dist/core/web/public/next/assets/{MessageMarkdown-qWKyJvAQ.js → MessageMarkdown-fsY_ltVa.js} +3 -3
  83. package/dist/core/web/public/next/assets/{MessageMarkdown-qWKyJvAQ.js.map → MessageMarkdown-fsY_ltVa.js.map} +1 -1
  84. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-x05TrsrW.js → MessageMarkdownRenderer-DDdtu82l.js} +2 -2
  85. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-x05TrsrW.js.map → MessageMarkdownRenderer-DDdtu82l.js.map} +1 -1
  86. package/dist/core/web/public/next/assets/{Meter-D-hncpkO.js → Meter-CeGDXdDM.js} +2 -2
  87. package/dist/core/web/public/next/assets/{Meter-D-hncpkO.js.map → Meter-CeGDXdDM.js.map} +1 -1
  88. package/dist/core/web/public/next/assets/MindSection-CDVhHvXl.js +2 -0
  89. package/dist/core/web/public/next/assets/{MindSection-BjXHkQPS.js.map → MindSection-CDVhHvXl.js.map} +1 -1
  90. package/dist/core/web/public/next/assets/MutationTokenDialog-CrfJ0PdD.css +1 -0
  91. package/dist/core/web/public/next/assets/MutationTokenDialog-DTQzEOHR.js +2 -0
  92. package/dist/core/web/public/next/assets/MutationTokenDialog-DTQzEOHR.js.map +1 -0
  93. package/dist/core/web/public/next/assets/NeedsYouDrawer-6AuN0BF3.js +2 -0
  94. package/dist/core/web/public/next/assets/{NeedsYouDrawer-rSd1ZHAR.js.map → NeedsYouDrawer-6AuN0BF3.js.map} +1 -1
  95. package/dist/core/web/public/next/assets/{NeedsYouList-CG-nB1tr.js → NeedsYouList-ChnRmbSk.js} +2 -2
  96. package/dist/core/web/public/next/assets/{NeedsYouList-CG-nB1tr.js.map → NeedsYouList-ChnRmbSk.js.map} +1 -1
  97. package/dist/core/web/public/next/assets/NewChatDialog-B06E7sqg.js +3 -0
  98. package/dist/core/web/public/next/assets/{NewChatDialog-BeDQ1eW3.js.map → NewChatDialog-B06E7sqg.js.map} +1 -1
  99. package/dist/core/web/public/next/assets/OnboardingFlow-C2M3zov9.js +2 -0
  100. package/dist/core/web/public/next/assets/{OnboardingFlow-CkTZtt-m.js.map → OnboardingFlow-C2M3zov9.js.map} +1 -1
  101. package/dist/core/web/public/next/assets/PreviewPane-Bd6HsX1k.js +2 -0
  102. package/dist/core/web/public/next/assets/{PreviewPane-kzbbSK4u.js.map → PreviewPane-Bd6HsX1k.js.map} +1 -1
  103. package/dist/core/web/public/next/assets/ProviderLogo-Bz7KR5j3.js +2 -0
  104. package/dist/core/web/public/next/assets/ProviderLogo-Bz7KR5j3.js.map +1 -0
  105. package/dist/core/web/public/next/assets/{RailStatus-D-t2gPae.js → RailStatus-CctCuuLy.js} +2 -2
  106. package/dist/core/web/public/next/assets/{RailStatus-D-t2gPae.js.map → RailStatus-CctCuuLy.js.map} +1 -1
  107. package/dist/core/web/public/next/assets/{RefreshIndicator-BLnr9IOM.js → RefreshIndicator-CKY5BGdD.js} +2 -2
  108. package/dist/core/web/public/next/assets/{RefreshIndicator-BLnr9IOM.js.map → RefreshIndicator-CKY5BGdD.js.map} +1 -1
  109. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-CM_8pJs6.css → ResourcePoolConsoleApp-BX9JLkT4.css} +1 -1
  110. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BeG0gBif.js → ResourcePoolConsoleApp-CspIsW_G.js} +5 -5
  111. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BeG0gBif.js.map → ResourcePoolConsoleApp-CspIsW_G.js.map} +1 -1
  112. package/dist/core/web/public/next/assets/ResourcesChrome-B7fHZ6zX.js +3 -0
  113. package/dist/core/web/public/next/assets/ResourcesChrome-B7fHZ6zX.js.map +1 -0
  114. package/dist/core/web/public/next/assets/ResourcesChrome-uZEqC2EM.css +1 -0
  115. package/dist/core/web/public/next/assets/ResourcesDrawer-B7-N9n7-.js +2 -0
  116. package/dist/core/web/public/next/assets/ResourcesDrawer-B7-N9n7-.js.map +1 -0
  117. package/dist/core/web/public/next/assets/RouteErrorBoundary-C_B11J0s.js +2 -0
  118. package/dist/core/web/public/next/assets/RouteErrorBoundary-C_B11J0s.js.map +1 -0
  119. package/dist/core/web/public/next/assets/RouteErrorBoundary-DdxhTdZ6.css +1 -0
  120. package/dist/core/web/public/next/assets/{RunInCloudAction-C3LBp7C4.js → RunInCloudAction-_juw4EXd.js} +2 -2
  121. package/dist/core/web/public/next/assets/{RunInCloudAction-C3LBp7C4.js.map → RunInCloudAction-_juw4EXd.js.map} +1 -1
  122. package/dist/core/web/public/next/assets/SeatSelector-D_YXvkPy.js +3 -0
  123. package/dist/core/web/public/next/assets/{SeatSelector-DpvvbjNm.js.map → SeatSelector-D_YXvkPy.js.map} +1 -1
  124. package/dist/core/web/public/next/assets/{Segmented-BL40udoO.js → Segmented-DnKP6rr7.js} +2 -2
  125. package/dist/core/web/public/next/assets/{Segmented-BL40udoO.js.map → Segmented-DnKP6rr7.js.map} +1 -1
  126. package/dist/core/web/public/next/assets/{Select-FWLnAw_j.js → Select-DlbUupTX.js} +2 -2
  127. package/dist/core/web/public/next/assets/{Select-FWLnAw_j.js.map → Select-DlbUupTX.js.map} +1 -1
  128. package/dist/core/web/public/next/assets/SessionGate-DnuTZACL.js +2 -0
  129. package/dist/core/web/public/next/assets/SessionGate-DnuTZACL.js.map +1 -0
  130. package/dist/core/web/public/next/assets/SessionGate-DvMpXNpJ.css +1 -0
  131. package/dist/core/web/public/next/assets/SessionInsightChip-C33-k-Q5.js +2 -0
  132. package/dist/core/web/public/next/assets/{SessionInsightChip-CWye87Ju.js.map → SessionInsightChip-C33-k-Q5.js.map} +1 -1
  133. package/dist/core/web/public/next/assets/{SessionSearch-YvCHFUuN.js → SessionSearch-DhhR9Csg.js} +2 -2
  134. package/dist/core/web/public/next/assets/{SessionSearch-YvCHFUuN.js.map → SessionSearch-DhhR9Csg.js.map} +1 -1
  135. package/dist/core/web/public/next/assets/SettingsSection-C0xQvCz3.js +2 -0
  136. package/dist/core/web/public/next/assets/SettingsSection-C0xQvCz3.js.map +1 -0
  137. package/dist/core/web/public/next/assets/Sheet-BvNYOYv5.js +2 -0
  138. package/dist/core/web/public/next/assets/{Sheet-DZKcQXQg.js.map → Sheet-BvNYOYv5.js.map} +1 -1
  139. package/dist/core/web/public/next/assets/ShortcutsOverlay-1nUBVO-Z.js +2 -0
  140. package/dist/core/web/public/next/assets/{ShortcutsOverlay-BpDimdPq.js.map → ShortcutsOverlay-1nUBVO-Z.js.map} +1 -1
  141. package/dist/core/web/public/next/assets/Sidebar-YrVvvBNM.js +3 -0
  142. package/dist/core/web/public/next/assets/{Sidebar-BoBzBEFX.js.map → Sidebar-YrVvvBNM.js.map} +1 -1
  143. package/dist/core/web/public/next/assets/{Slider-DUMo9HDD.js → Slider-B2c-dbQb.js} +2 -2
  144. package/dist/core/web/public/next/assets/{Slider-DUMo9HDD.js.map → Slider-B2c-dbQb.js.map} +1 -1
  145. package/dist/core/web/public/next/assets/{StatusBadge-BwnBNFQr.js → StatusBadge-Q9YYkijx.js} +2 -2
  146. package/dist/core/web/public/next/assets/{StatusBadge-BwnBNFQr.js.map → StatusBadge-Q9YYkijx.js.map} +1 -1
  147. package/dist/core/web/public/next/assets/{StepBand-PDXMIlRk.js → StepBand-Ci-C0GUG.js} +2 -2
  148. package/dist/core/web/public/next/assets/{StepBand-PDXMIlRk.js.map → StepBand-Ci-C0GUG.js.map} +1 -1
  149. package/dist/core/web/public/next/assets/{Surface-B3TZVoER.js → Surface-DBovMq4P.js} +2 -2
  150. package/dist/core/web/public/next/assets/{Surface-B3TZVoER.js.map → Surface-DBovMq4P.js.map} +1 -1
  151. package/dist/core/web/public/next/assets/{Swimlane-DR4OgON_.js → Swimlane-Cdc4TqDe.js} +2 -2
  152. package/dist/core/web/public/next/assets/{Swimlane-DR4OgON_.js.map → Swimlane-Cdc4TqDe.js.map} +1 -1
  153. package/dist/core/web/public/next/assets/{Switch-CcR5Llk5.js → Switch-CUrvzO2k.js} +2 -2
  154. package/dist/core/web/public/next/assets/{Switch-CcR5Llk5.js.map → Switch-CUrvzO2k.js.map} +1 -1
  155. package/dist/core/web/public/next/assets/{Tag-_-K1h7Hk.js → Tag-Bv8u6APt.js} +2 -2
  156. package/dist/core/web/public/next/assets/{Tag-_-K1h7Hk.js.map → Tag-Bv8u6APt.js.map} +1 -1
  157. package/dist/core/web/public/next/assets/TerminalPane-BE4Xlqi5.js +7 -0
  158. package/dist/core/web/public/next/assets/{TerminalPane-_1aH4ndN.js.map → TerminalPane-BE4Xlqi5.js.map} +1 -1
  159. package/dist/core/web/public/next/assets/UniverseConsoleApp-BGwejf0m.js +2 -0
  160. package/dist/core/web/public/next/assets/{UniverseConsoleApp-BUsq-inZ.js.map → UniverseConsoleApp-BGwejf0m.js.map} +1 -1
  161. package/dist/core/web/public/next/assets/{UniverseConsoleApp-Dh7A-hLD.css → UniverseConsoleApp-DfuT-wFw.css} +1 -1
  162. package/dist/core/web/public/next/assets/{UniverseView-Dogy_dsB.js → UniverseView-CgKa-WXC.js} +4 -4
  163. package/dist/core/web/public/next/assets/{UniverseView-Dogy_dsB.js.map → UniverseView-CgKa-WXC.js.map} +1 -1
  164. package/dist/core/web/public/next/assets/UsageSection-CazsHm1f.js +2 -0
  165. package/dist/core/web/public/next/assets/{UsageSection-DiX_dTyo.js.map → UsageSection-CazsHm1f.js.map} +1 -1
  166. package/dist/core/web/public/next/assets/VerseConsoleApp-CTF3Shs0.js +3 -0
  167. package/dist/core/web/public/next/assets/VerseConsoleApp-CTF3Shs0.js.map +1 -0
  168. package/dist/core/web/public/next/assets/Workspace-CgdyXiEV.js +10 -0
  169. package/dist/core/web/public/next/assets/Workspace-CgdyXiEV.js.map +1 -0
  170. package/dist/core/web/public/next/assets/Workspace-Dwri2jFJ.css +1 -0
  171. package/dist/core/web/public/next/assets/actions-MtxBGS5B.js +2 -0
  172. package/dist/core/web/public/next/assets/{actions-s2lfm_5k.js.map → actions-MtxBGS5B.js.map} +1 -1
  173. package/dist/core/web/public/next/assets/budget-queries-CP7hgR-p.js +2 -0
  174. package/dist/core/web/public/next/assets/{budget-queries-wUshcovN.js.map → budget-queries-CP7hgR-p.js.map} +1 -1
  175. package/dist/core/web/public/next/assets/{capacity-strip-model-Bj_9ztzs.js → capacity-strip-model-fHfu5cph.js} +2 -2
  176. package/dist/core/web/public/next/assets/{capacity-strip-model-Bj_9ztzs.js.map → capacity-strip-model-fHfu5cph.js.map} +1 -1
  177. package/dist/core/web/public/next/assets/{charts-CMSgAUKn.js → charts-Bis9WSiS.js} +2 -2
  178. package/dist/core/web/public/next/assets/{charts-CMSgAUKn.js.map → charts-Bis9WSiS.js.map} +1 -1
  179. package/dist/core/web/public/next/assets/cloud-queries-BsOepFz6.js +2 -0
  180. package/dist/core/web/public/next/assets/{cloud-queries-CnV1yaNG.js.map → cloud-queries-BsOepFz6.js.map} +1 -1
  181. package/dist/core/web/public/next/assets/{cloud.module-CiwatLj3.js → cloud.module-DoFnr8ZH.js} +2 -2
  182. package/dist/core/web/public/next/assets/{cloud.module-CiwatLj3.js.map → cloud.module-DoFnr8ZH.js.map} +1 -1
  183. package/dist/core/web/public/next/assets/{command-bus-DqimKCUY.js → command-bus-CMvbYP5K.js} +2 -2
  184. package/dist/core/web/public/next/assets/{command-bus-DqimKCUY.js.map → command-bus-CMvbYP5K.js.map} +1 -1
  185. package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js +2 -0
  186. package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js.map +1 -0
  187. package/dist/core/web/public/next/assets/compaction-point-VL9oegWS.js +2 -0
  188. package/dist/core/web/public/next/assets/compaction-point-VL9oegWS.js.map +1 -0
  189. package/dist/core/web/public/next/assets/{composer-keys-DBRymxQn.js → composer-keys-su0g1h9o.js} +2 -2
  190. package/dist/core/web/public/next/assets/{composer-keys-DBRymxQn.js.map → composer-keys-su0g1h9o.js.map} +1 -1
  191. package/dist/core/web/public/next/assets/context-model-Ci3Ch9t5.js +2 -0
  192. package/dist/core/web/public/next/assets/{context-model-Dwd49-dp.js.map → context-model-Ci3Ch9t5.js.map} +1 -1
  193. package/dist/core/web/public/next/assets/context-model-CjiJTnf1.js +2 -0
  194. package/dist/core/web/public/next/assets/{context-model-MT17V86_.js.map → context-model-CjiJTnf1.js.map} +1 -1
  195. package/dist/core/web/public/next/assets/context-queries-BDXT6LQ3.js +2 -0
  196. package/dist/core/web/public/next/assets/{context-queries-xVKIeynP.js.map → context-queries-BDXT6LQ3.js.map} +1 -1
  197. package/dist/core/web/public/next/assets/control-queries-Dv-h1Clu.js +2 -0
  198. package/dist/core/web/public/next/assets/{control-queries-DOZR-D8G.js.map → control-queries-Dv-h1Clu.js.map} +1 -1
  199. package/dist/core/web/public/next/assets/{dock-icons-8EtARwUm.js → dock-icons-t--Eugrd.js} +2 -2
  200. package/dist/core/web/public/next/assets/{dock-icons-8EtARwUm.js.map → dock-icons-t--Eugrd.js.map} +1 -1
  201. package/dist/core/web/public/next/assets/{dock-store-BA1cHOYA.js → dock-store-qIu7kSQE.js} +2 -2
  202. package/dist/core/web/public/next/assets/{dock-store-BA1cHOYA.js.map → dock-store-qIu7kSQE.js.map} +1 -1
  203. package/dist/core/web/public/next/assets/{fleet-model-CNe8Wh-s.js → fleet-model-IRbwfhkR.js} +2 -2
  204. package/dist/core/web/public/next/assets/{fleet-model-CNe8Wh-s.js.map → fleet-model-IRbwfhkR.js.map} +1 -1
  205. package/dist/core/web/public/next/assets/fleet-queries-7FVNByX1.js +2 -0
  206. package/dist/core/web/public/next/assets/{fleet-queries-BSdRlUwJ.js.map → fleet-queries-7FVNByX1.js.map} +1 -1
  207. package/dist/core/web/public/next/assets/focus-trap-QqQxQdvH.js +2 -0
  208. package/dist/core/web/public/next/assets/focus-trap-QqQxQdvH.js.map +1 -0
  209. package/dist/core/web/public/next/assets/{format-B8DAVcn2.js → format-CaMmVQCn.js} +2 -2
  210. package/dist/core/web/public/next/assets/{format-B8DAVcn2.js.map → format-CaMmVQCn.js.map} +1 -1
  211. package/dist/core/web/public/next/assets/git-model-B4S_GUNA.js +5 -0
  212. package/dist/core/web/public/next/assets/{git-model-CivuBY_D.js.map → git-model-B4S_GUNA.js.map} +1 -1
  213. package/dist/core/web/public/next/assets/global-BkNl4e6E.js +2 -0
  214. package/dist/core/web/public/next/assets/global-BkNl4e6E.js.map +1 -0
  215. package/dist/core/web/public/next/assets/global-BlI2BYa1.css +1 -0
  216. package/dist/core/web/public/next/assets/guarded-action-DHiL8tY5.js +3 -0
  217. package/dist/core/web/public/next/assets/guarded-action-DHiL8tY5.js.map +1 -0
  218. package/dist/core/web/public/next/assets/guarded-runners-DmGEkM2P.js +2 -0
  219. package/dist/core/web/public/next/assets/guarded-runners-DmGEkM2P.js.map +1 -0
  220. package/dist/core/web/public/next/assets/icon-base-NtFmP2yB.js +2 -0
  221. package/dist/core/web/public/next/assets/icon-base-NtFmP2yB.js.map +1 -0
  222. package/dist/core/web/public/next/assets/icons-C5EFt_Ts.js +2 -0
  223. package/dist/core/web/public/next/assets/icons-C5EFt_Ts.js.map +1 -0
  224. package/dist/core/web/public/next/assets/{index-oAAq8XJa.js → index-DbDw9UAs.js} +3 -3
  225. package/dist/core/web/public/next/assets/{index-oAAq8XJa.js.map → index-DbDw9UAs.js.map} +1 -1
  226. package/dist/core/web/public/next/assets/{live-model-DCw_IFRI.js → live-model-DEwrl7_A.js} +2 -2
  227. package/dist/core/web/public/next/assets/{live-model-DCw_IFRI.js.map → live-model-DEwrl7_A.js.map} +1 -1
  228. package/dist/core/web/public/next/assets/{mind.module-vnuJcwvD.js → mind.module-CLhqMQak.js} +2 -2
  229. package/dist/core/web/public/next/assets/{mind.module-vnuJcwvD.js.map → mind.module-CLhqMQak.js.map} +1 -1
  230. package/dist/core/web/public/next/assets/mutations-Kvzsg-iK.js +2 -0
  231. package/dist/core/web/public/next/assets/{mutations-Dpsql5t7.js.map → mutations-Kvzsg-iK.js.map} +1 -1
  232. package/dist/core/web/public/next/assets/nav-C0IunEYF.js +2 -0
  233. package/dist/core/web/public/next/assets/nav-C0IunEYF.js.map +1 -0
  234. package/dist/core/web/public/next/assets/overnight-queries-C_AfcL7q.js +2 -0
  235. package/dist/core/web/public/next/assets/{overnight-queries-X-44Gsw5.js.map → overnight-queries-C_AfcL7q.js.map} +1 -1
  236. package/dist/core/web/public/next/assets/preloaded-CctOitLu.js +2 -0
  237. package/dist/core/web/public/next/assets/preloaded-CctOitLu.js.map +1 -0
  238. package/dist/core/web/public/next/assets/primitives-CbAGCNKt.js +1 -0
  239. package/dist/core/web/public/next/assets/{queries-BA4rNGD-.js → queries-THD05gHP.js} +2 -2
  240. package/dist/core/web/public/next/assets/{queries-BA4rNGD-.js.map → queries-THD05gHP.js.map} +1 -1
  241. package/dist/core/web/public/next/assets/reasoning-pref-BVPu0SME.js +2 -0
  242. package/dist/core/web/public/next/assets/{reasoning-pref-B9-DJUXP.js.map → reasoning-pref-BVPu0SME.js.map} +1 -1
  243. package/dist/core/web/public/next/assets/reveal-anchor-wCT5b4m3.js +2 -0
  244. package/dist/core/web/public/next/assets/reveal-anchor-wCT5b4m3.js.map +1 -0
  245. package/dist/core/web/public/next/assets/seat-subscription-CR_VylsK.js +2 -0
  246. package/dist/core/web/public/next/assets/{seat-subscription-CH6fW4fJ.js.map → seat-subscription-CR_VylsK.js.map} +1 -1
  247. package/dist/core/web/public/next/assets/{section-visibility-qFqc_d4Z.js → section-visibility-B0xXUQJ0.js} +2 -2
  248. package/dist/core/web/public/next/assets/{section-visibility-qFqc_d4Z.js.map → section-visibility-B0xXUQJ0.js.map} +1 -1
  249. package/dist/core/web/public/next/assets/{sidebar-model-M1GaQU5l.js → sidebar-model-C5wVXGpb.js} +2 -2
  250. package/dist/core/web/public/next/assets/{sidebar-model-M1GaQU5l.js.map → sidebar-model-C5wVXGpb.js.map} +1 -1
  251. package/dist/core/web/public/next/assets/slots-DDd8cEoh.js +3 -0
  252. package/dist/core/web/public/next/assets/{slots-Ds9ZIqUL.js.map → slots-DDd8cEoh.js.map} +1 -1
  253. package/dist/core/web/public/next/assets/surface-data-BFxAlefI.js +2 -0
  254. package/dist/core/web/public/next/assets/{surface-data-J52iIGMD.js.map → surface-data-BFxAlefI.js.map} +1 -1
  255. package/dist/core/web/public/next/assets/surface-prefetch-CHusyO9q.js +2 -0
  256. package/dist/core/web/public/next/assets/{surface-prefetch-CgZ-LEJK.js.map → surface-prefetch-CHusyO9q.js.map} +1 -1
  257. package/dist/core/web/public/next/assets/{tasks-model-ent8f0jZ.js → tasks-model-DvkWveXs.js} +2 -2
  258. package/dist/core/web/public/next/assets/{tasks-model-ent8f0jZ.js.map → tasks-model-DvkWveXs.js.map} +1 -1
  259. package/dist/core/web/public/next/assets/{terminal-icons-DJTK7QpR.js → terminal-icons-Dp6pJgV2.js} +2 -2
  260. package/dist/core/web/public/next/assets/{terminal-icons-DJTK7QpR.js.map → terminal-icons-Dp6pJgV2.js.map} +1 -1
  261. package/dist/core/web/public/next/assets/{usage-queries-Bn8ccqyN.js → usage-queries-CUTmnegA.js} +2 -2
  262. package/dist/core/web/public/next/assets/{usage-queries-Bn8ccqyN.js.map → usage-queries-CUTmnegA.js.map} +1 -1
  263. package/dist/core/web/public/next/assets/use-guarded-action-UCX2u1t1.js +2 -0
  264. package/dist/core/web/public/next/assets/{use-guarded-action-C2HlSzkz.js.map → use-guarded-action-UCX2u1t1.js.map} +1 -1
  265. package/dist/core/web/public/next/assets/{use-ticker-BNc1H4ZC.js → use-ticker-OXAjob3y.js} +2 -2
  266. package/dist/core/web/public/next/assets/{use-ticker-BNc1H4ZC.js.map → use-ticker-OXAjob3y.js.map} +1 -1
  267. package/dist/core/web/public/next/assets/use-token-gate-CDDRAoKH.js +2 -0
  268. package/dist/core/web/public/next/assets/{use-token-gate-B3IJL6bf.js.map → use-token-gate-CDDRAoKH.js.map} +1 -1
  269. package/dist/core/web/public/next/assets/useChartWidth-BW6SwYIK.css +1 -0
  270. package/dist/core/web/public/next/assets/useChartWidth-D9M7kUw7.js +2 -0
  271. package/dist/core/web/public/next/assets/{useChartWidth-lZ9PrQn0.js.map → useChartWidth-D9M7kUw7.js.map} +1 -1
  272. package/dist/core/web/public/next/assets/{useSeatsRefresh-CG4jczeL.js → useSeatsRefresh-B2dCVcj9.js} +2 -2
  273. package/dist/core/web/public/next/assets/{useSeatsRefresh-CG4jczeL.js.map → useSeatsRefresh-B2dCVcj9.js.map} +1 -1
  274. package/dist/core/web/public/next/assets/useVerseTranscript-BL3CljSI.js +2 -0
  275. package/dist/core/web/public/next/assets/useVerseTranscript-BL3CljSI.js.map +1 -0
  276. package/dist/core/web/public/next/assets/verse-icons-DASWdYuE.js +2 -0
  277. package/dist/core/web/public/next/assets/verse-icons-DASWdYuE.js.map +1 -0
  278. package/dist/core/web/public/next/assets/verse-model-BQ0Y2CSr.js +2 -0
  279. package/dist/core/web/public/next/assets/verse-model-BQ0Y2CSr.js.map +1 -0
  280. package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js +3 -0
  281. package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js.map +1 -0
  282. package/dist/core/web/public/next/assets/verse-ui-store-D7YXi63q.js +3 -0
  283. package/dist/core/web/public/next/assets/{verse-ui-store-zafyzXKD.js.map → verse-ui-store-D7YXi63q.js.map} +1 -1
  284. package/dist/core/web/public/next/assets/{viewport-BEqGUoTA.js → viewport-BYGH5EgA.js} +2 -2
  285. package/dist/core/web/public/next/assets/{viewport-BEqGUoTA.js.map → viewport-BYGH5EgA.js.map} +1 -1
  286. package/dist/core/web/public/next/assets/warmup-AsqwWCUi.js +3 -0
  287. package/dist/core/web/public/next/assets/{warmup-BR6pxAKs.js.map → warmup-AsqwWCUi.js.map} +1 -1
  288. package/dist/core/web/public/next/assets/{workspace-model-D_tWD5Wt.js → workspace-model-CXorJr0G.js} +2 -2
  289. package/dist/core/web/public/next/assets/{workspace-model-D_tWD5Wt.js.map → workspace-model-CXorJr0G.js.map} +1 -1
  290. package/dist/core/web/public/next/index.html +1 -1
  291. package/dist/release-dependency-inventory.json +1 -1
  292. package/package.json +5 -2
  293. package/dist/cli/activation.d.ts +0 -41
  294. package/dist/cli/activation.js +0 -485
  295. package/dist/cli/activation.js.map +0 -1
  296. package/dist/core/fleet/generated-repair-resolution.d.ts +0 -36
  297. package/dist/core/fleet/generated-repair-resolution.js +0 -245
  298. package/dist/core/fleet/generated-repair-resolution.js.map +0 -1
  299. package/dist/core/local-runtime/llama/port.d.ts +0 -17
  300. package/dist/core/local-runtime/llama/port.js +0 -47
  301. package/dist/core/local-runtime/llama/port.js.map +0 -1
  302. package/dist/core/local-runtime/llama/proxy-host.d.ts +0 -54
  303. package/dist/core/local-runtime/llama/proxy-host.js +0 -159
  304. package/dist/core/local-runtime/llama/proxy-host.js.map +0 -1
  305. package/dist/core/local-runtime/llama/proxy-process.d.ts +0 -148
  306. package/dist/core/local-runtime/llama/proxy-process.js +0 -250
  307. package/dist/core/local-runtime/llama/proxy-process.js.map +0 -1
  308. package/dist/core/local-runtime/llama/proxy-record.d.ts +0 -40
  309. package/dist/core/local-runtime/llama/proxy-record.js +0 -133
  310. package/dist/core/local-runtime/llama/proxy-record.js.map +0 -1
  311. package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +0 -118
  312. package/dist/core/local-runtime/llama/proxy-supervisor.js +0 -511
  313. package/dist/core/local-runtime/llama/proxy-supervisor.js.map +0 -1
  314. package/dist/core/web/public/next/assets/Advanced-DEM93sKI.js +0 -2
  315. package/dist/core/web/public/next/assets/App-CimXmK0L.js +0 -7
  316. package/dist/core/web/public/next/assets/AppsSection-D6U-dSj6.js +0 -2
  317. package/dist/core/web/public/next/assets/AutonomySection-3V9pUyxm.js +0 -2
  318. package/dist/core/web/public/next/assets/BranchBar-U8UdpfEB.js +0 -2
  319. package/dist/core/web/public/next/assets/CapacityStrip-C667yQe8.js +0 -2
  320. package/dist/core/web/public/next/assets/CapacityStrip-C667yQe8.js.map +0 -1
  321. package/dist/core/web/public/next/assets/ChatSection-CCcIPpOq.js +0 -3
  322. package/dist/core/web/public/next/assets/ChatSection-CCcIPpOq.js.map +0 -1
  323. package/dist/core/web/public/next/assets/CommandPalette-FiD4N8XD.js +0 -2
  324. package/dist/core/web/public/next/assets/CommandSection-DN8KwH-X.js +0 -2
  325. package/dist/core/web/public/next/assets/DockHost-DvR-hPhZ.js +0 -2
  326. package/dist/core/web/public/next/assets/FleetSection-D_zRBCub.js +0 -3
  327. package/dist/core/web/public/next/assets/GearTray-C7k4l_BW.js +0 -2
  328. package/dist/core/web/public/next/assets/HandoffDialog-FPVOqOMN.js +0 -2
  329. package/dist/core/web/public/next/assets/LeaderCard-4R0BhDzT.js +0 -2
  330. package/dist/core/web/public/next/assets/McpSection-CJ__OJKl.js +0 -2
  331. package/dist/core/web/public/next/assets/MindSection-BjXHkQPS.js +0 -2
  332. package/dist/core/web/public/next/assets/MutationTokenDialog-Cum_DqQZ.css +0 -1
  333. package/dist/core/web/public/next/assets/MutationTokenDialog-SkRxqV_I.js +0 -2
  334. package/dist/core/web/public/next/assets/MutationTokenDialog-SkRxqV_I.js.map +0 -1
  335. package/dist/core/web/public/next/assets/NeedsYouDrawer-rSd1ZHAR.js +0 -2
  336. package/dist/core/web/public/next/assets/NewChatDialog-BeDQ1eW3.js +0 -3
  337. package/dist/core/web/public/next/assets/OnboardingFlow-CkTZtt-m.js +0 -2
  338. package/dist/core/web/public/next/assets/PreviewPane-kzbbSK4u.js +0 -2
  339. package/dist/core/web/public/next/assets/ResourcesChrome-B3Z3O98t.css +0 -1
  340. package/dist/core/web/public/next/assets/ResourcesChrome-BzV6bkIa.js +0 -3
  341. package/dist/core/web/public/next/assets/ResourcesChrome-BzV6bkIa.js.map +0 -1
  342. package/dist/core/web/public/next/assets/ResourcesDrawer-o4ILHdep.js +0 -2
  343. package/dist/core/web/public/next/assets/ResourcesDrawer-o4ILHdep.js.map +0 -1
  344. package/dist/core/web/public/next/assets/RouteErrorBoundary-6RMd_aZg.css +0 -1
  345. package/dist/core/web/public/next/assets/RouteErrorBoundary-C5SxA2Dg.js +0 -2
  346. package/dist/core/web/public/next/assets/RouteErrorBoundary-C5SxA2Dg.js.map +0 -1
  347. package/dist/core/web/public/next/assets/SeatSelector-DpvvbjNm.js +0 -3
  348. package/dist/core/web/public/next/assets/SessionInsightChip-CWye87Ju.js +0 -2
  349. package/dist/core/web/public/next/assets/SettingsSection-Dr18upeE.js +0 -2
  350. package/dist/core/web/public/next/assets/SettingsSection-Dr18upeE.js.map +0 -1
  351. package/dist/core/web/public/next/assets/Sheet-DZKcQXQg.js +0 -2
  352. package/dist/core/web/public/next/assets/ShortcutsOverlay-BpDimdPq.js +0 -2
  353. package/dist/core/web/public/next/assets/Sidebar-BoBzBEFX.js +0 -3
  354. package/dist/core/web/public/next/assets/TerminalPane-_1aH4ndN.js +0 -7
  355. package/dist/core/web/public/next/assets/UniverseConsoleApp-BUsq-inZ.js +0 -2
  356. package/dist/core/web/public/next/assets/UsageSection-DiX_dTyo.js +0 -2
  357. package/dist/core/web/public/next/assets/VerseConsoleApp-WVeyJnW7.js +0 -3
  358. package/dist/core/web/public/next/assets/VerseConsoleApp-WVeyJnW7.js.map +0 -1
  359. package/dist/core/web/public/next/assets/Workspace-BYW9dm90.css +0 -1
  360. package/dist/core/web/public/next/assets/Workspace-BbxZHwQd.js +0 -10
  361. package/dist/core/web/public/next/assets/Workspace-BbxZHwQd.js.map +0 -1
  362. package/dist/core/web/public/next/assets/actions-s2lfm_5k.js +0 -2
  363. package/dist/core/web/public/next/assets/budget-queries-wUshcovN.js +0 -2
  364. package/dist/core/web/public/next/assets/cloud-queries-CnV1yaNG.js +0 -2
  365. package/dist/core/web/public/next/assets/command-catalog-BdtDH93o.js +0 -2
  366. package/dist/core/web/public/next/assets/command-catalog-BdtDH93o.js.map +0 -1
  367. package/dist/core/web/public/next/assets/context-model-Dwd49-dp.js +0 -2
  368. package/dist/core/web/public/next/assets/context-model-MT17V86_.js +0 -2
  369. package/dist/core/web/public/next/assets/context-queries-xVKIeynP.js +0 -2
  370. package/dist/core/web/public/next/assets/control-queries-DOZR-D8G.js +0 -2
  371. package/dist/core/web/public/next/assets/dock-panes-UKS-mXhr.js +0 -2
  372. package/dist/core/web/public/next/assets/dock-panes-UKS-mXhr.js.map +0 -1
  373. package/dist/core/web/public/next/assets/fleet-queries-BSdRlUwJ.js +0 -2
  374. package/dist/core/web/public/next/assets/git-model-CivuBY_D.js +0 -5
  375. package/dist/core/web/public/next/assets/global-Di2PUgj4.js +0 -2
  376. package/dist/core/web/public/next/assets/global-Di2PUgj4.js.map +0 -1
  377. package/dist/core/web/public/next/assets/global-_tOCFt9y.css +0 -1
  378. package/dist/core/web/public/next/assets/guarded-action-CvOHcqyH.js +0 -2
  379. package/dist/core/web/public/next/assets/guarded-action-CvOHcqyH.js.map +0 -1
  380. package/dist/core/web/public/next/assets/icons-B_yuAgdN.js +0 -2
  381. package/dist/core/web/public/next/assets/icons-B_yuAgdN.js.map +0 -1
  382. package/dist/core/web/public/next/assets/mutations-Dpsql5t7.js +0 -2
  383. package/dist/core/web/public/next/assets/overnight-queries-X-44Gsw5.js +0 -2
  384. package/dist/core/web/public/next/assets/primitives-BDIcUvob.js +0 -1
  385. package/dist/core/web/public/next/assets/reasoning-pref-B9-DJUXP.js +0 -2
  386. package/dist/core/web/public/next/assets/seat-subscription-CH6fW4fJ.js +0 -2
  387. package/dist/core/web/public/next/assets/slots-Ds9ZIqUL.js +0 -3
  388. package/dist/core/web/public/next/assets/surface-data-J52iIGMD.js +0 -2
  389. package/dist/core/web/public/next/assets/surface-prefetch-CgZ-LEJK.js +0 -2
  390. package/dist/core/web/public/next/assets/use-guarded-action-C2HlSzkz.js +0 -2
  391. package/dist/core/web/public/next/assets/use-token-gate-B3IJL6bf.js +0 -2
  392. package/dist/core/web/public/next/assets/useActivity-Bk3XgXjL.js +0 -2
  393. package/dist/core/web/public/next/assets/useActivity-Bk3XgXjL.js.map +0 -1
  394. package/dist/core/web/public/next/assets/useChartWidth-BAtVgn2n.css +0 -1
  395. package/dist/core/web/public/next/assets/useChartWidth-lZ9PrQn0.js +0 -2
  396. package/dist/core/web/public/next/assets/verse-model-D7NZQFAR.js +0 -2
  397. package/dist/core/web/public/next/assets/verse-model-D7NZQFAR.js.map +0 -1
  398. package/dist/core/web/public/next/assets/verse-queries-DvIJcn6Z.js +0 -2
  399. package/dist/core/web/public/next/assets/verse-queries-DvIJcn6Z.js.map +0 -1
  400. package/dist/core/web/public/next/assets/verse-store-DjBWj04q.js +0 -3
  401. package/dist/core/web/public/next/assets/verse-store-DjBWj04q.js.map +0 -1
  402. package/dist/core/web/public/next/assets/verse-ui-store-zafyzXKD.js +0 -3
  403. package/dist/core/web/public/next/assets/warmup-BR6pxAKs.js +0 -3
@@ -1,2 +0,0 @@
1
- import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{M as r,O as i,a,l as o,s}from"./global-Di2PUgj4.js";import{d as c,f as l,y as u}from"./workbench-types-DzN-5trg.js";import{n as ee}from"./viewport-BEqGUoTA.js";import{i as te,r as ne}from"./section-visibility-qFqc_d4Z.js";import{T as d,l as re,v as ie}from"./icons-B_yuAgdN.js";import{t as f}from"./MessageMarkdown-qWKyJvAQ.js";import{t as ae}from"./Segmented-BL40udoO.js";import{n as p,t as m}from"./Button-DYv_KKxr.js";import{t as h}from"./EmptyState-DhNgDDrF.js";import{a as oe,c as se,d as ce,i as le,l as ue,n as de,o as fe,s as g,t as pe}from"./terminal-icons-DJTK7QpR.js";import{t as me}from"./pane-chrome.module-D7o-fVd0.js";var _=n(e(),1),v=`/api/verse/preview/ticket`;function y(e){return new URLSearchParams(e).toString()}var b={targets:(e,t)=>o(`${l}?${y({sessionId:e})}`,t),ticket:(e,t)=>o(`${v}?${y({sessionId:e,path:t})}`),text:async(e,t)=>{let n=`${c}?${y({sessionId:e,path:t})}`,a=await fetch(n,{credentials:`same-origin`,headers:{"x-ashlr-read-client":i()}});if(a.status===401)throw r(),new s(`Read session expired.`,401,n);if(!a.ok)throw new s(`GET ${n} failed (HTTP ${a.status}).`,a.status,n);return a.text()}};function x(e){return e.port||(e.protocol===`https:`?`443`:`80`)}function S(e,t){let n=e.trim();if(n.length===0||n.length>2048||/\s/.test(n))return{kind:`invalid`};let r=n;if(/^:?\d{2,5}$/.test(n))r=`http://localhost:${n.replace(`:`,``)}/`;else if(/^(?:localhost|127\.0\.0\.1)(?::\d{1,5})?(?:[/?#].*)?$/i.test(n))r=`http://${n}`;else if(!/^[a-z][a-z0-9+.-]*:/i.test(n)){if(!/^[\w-]+(?:\.[\w-]+)+(?::\d{1,5})?(?:[/?#].*)?$/.test(n))return{kind:`invalid`};r=`https://${n}`}let i;try{i=new URL(r)}catch{return{kind:`invalid`}}if(i.protocol!==`http:`&&i.protocol!==`https:`)return{kind:`invalid`};if(u(i.href)){let e=null;try{e=new URL(t)}catch{e=null}return e&&(e.hostname===`localhost`||e.hostname===`127.0.0.1`)&&x(e)===x(i)?{kind:`self`,url:i.href}:{kind:`loopback`,url:i.href}}return i.username||i.password?{kind:`invalid`}:{kind:`external`,url:i.href}}function C(e){try{let t=new URL(e),n=t.pathname===`/`?``:t.pathname;return`${t.host}${n}${t.search}`}catch{return e}}function w(e){return!Number.isFinite(e)||e<0?`—`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(+(e<10240))} KB`:`${(e/1048576).toFixed(1)} MB`}var T={pane:`_pane_k6hui_8`,strip:`_strip_k6hui_19`,tabs:`_tabs_k6hui_28`,tab:`_tab_k6hui_28`,tabButton:`_tabButton_k6hui_60`,tabClose:`_tabClose_k6hui_78`,noticeClose:`_noticeClose_k6hui_79`,external:`_external_k6hui_80`,tabTitle:`_tabTitle_k6hui_85`,newTab:`_newTab_k6hui_118`,toolbar:`_toolbar_k6hui_126`,nav:`_nav_k6hui_128`,addressForm:`_addressForm_k6hui_134`,address:`_address_k6hui_134`,addressNote:`_addressNote_k6hui_177`,notice:`_notice_k6hui_79`,waiting:`_waiting_k6hui_179`,waitingText:`_waitingText_k6hui_201`,pulse:`_pulse_k6hui_208`,body:`_body_k6hui_234`,loading:`_loading_k6hui_243`,stage:`_stage_k6hui_250`,frame:`_frame_k6hui_262`,frameHint:`_frameHint_k6hui_278`,imageStage:`_imageStage_k6hui_291`,image:`_image_k6hui_291`,markdown:`_markdown_k6hui_308`,launcher:`_launcher_k6hui_316`,section:`_section_k6hui_322`,sectionTitle:`_sectionTitle_k6hui_328`,muted:`_muted_k6hui_339`,rows:`_rows_k6hui_347`,row:`_row_k6hui_347`,dot:`_dot_k6hui_364`,fileIcon:`_fileIcon_k6hui_376`,rowMain:`_rowMain_k6hui_378`,rowTitle:`_rowTitle_k6hui_385`,rowMeta:`_rowMeta_k6hui_395`,rowCommand:`_rowCommand_k6hui_405`},E=t(),he={api:b,origin:()=>window.location.origin,now:()=>Date.now()},ge=12e4,_e=2e3,ve=5e3,D=`ashlr.verse.preview.v1:`,O={"launch-json":`launch.json`,"package-json":`package.json`,listening:`running`},ye={html:`HTML`,md:`Markdown`,svg:`SVG`,image:`Image`,pdf:`PDF`},k=0,A=0,j=()=>`p${++A}`;function M(){k=0,A=0}function N(e){let t=e.toLowerCase().slice(e.lastIndexOf(`.`));return t===`.html`||t===`.htm`?`html`:t===`.md`||t===`.markdown`?`md`:t===`.svg`?`svg`:t===`.pdf`?`pdf`:[`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.avif`,`.bmp`,`.ico`].includes(t)?`image`:null}function P(e){return e.slice(e.lastIndexOf(`/`)+1)||e}function F(e){return e.kind===`launcher`?`New tab`:e.kind===`url`?C(e.history[e.index]??``):P(e.path)}function be(e){return e?.kind===`url`?e.history[e.index]??null:null}function xe(e,t){try{let n=localStorage.getItem(`${D}${e}`);if(!n)return null;let r=JSON.parse(n),i=[],a=null;return Array.isArray(r.tabs)&&r.tabs.slice(0,12).forEach((e,n)=>{if(!e||typeof e!=`object`)return;let o=e,s=j();if(o.url&&typeof o.url==`string`&&S(o.url,t).kind===`loopback`)i.push({id:s,kind:`url`,history:[o.url],index:0,reloadKey:0});else if(typeof o.path==`string`){let e=N(o.path);if(e)i.push({id:s,kind:`artifact`,path:o.path,artifactKind:e,reloadKey:0});else return}else return;r.active===n&&(a=s)}),{tabs:i,activeId:a??i.at(-1)?.id??null,device:r.device===`phone`?`phone`:`desktop`}}catch{return null}}function Se(e,t,n,r){try{let i=t.filter(e=>e.kind!==`launcher`);localStorage.setItem(`${D}${e}`,JSON.stringify({tabs:i.map(e=>e.kind===`url`?{url:e.history[e.index]}:e.kind===`artifact`?{path:e.path}:{}),active:i.findIndex(e=>e.id===n),device:r}))}catch{}}function I({sessionId:e,roots:t,request:n,onOpenTerminal:r,visible:i,deps:a}){let o=(0,_.useMemo)(()=>({...he,...a}),[a]),c=te(),l=i&&c,u=ee().compact,[f]=(0,_.useState)(()=>xe(e,o.origin())),[h,g]=(0,_.useState)(()=>f?.tabs??[]),[v,y]=(0,_.useState)(()=>f?.activeId??null),[b,x]=(0,_.useState)(()=>f?.device??`desktop`),[w,ge]=(0,_.useState)(e),[D,O]=(0,_.useState)(null),[ye,A]=(0,_.useState)(null),[M,P]=(0,_.useState)(``),[I,L]=(0,_.useState)(null),[R,z]=(0,_.useState)(null),[Ee,B]=(0,_.useState)(null),[V,H]=(0,_.useState)(()=>new Map),[De,Oe]=(0,_.useState)(()=>o.now()),U=(0,_.useRef)(!0),W=(0,_.useRef)(new Map),ke=(0,_.useRef)(null);if(w!==e){let t=xe(e,o.origin());ge(e),g(t?.tabs??[]),y(t?.activeId??null),O(null),z(null),B(null)}let G=h.find(e=>e.id===v)??null,K=be(G),q=!G||G.kind===`launcher`;(0,_.useEffect)(()=>(U.current=!0,()=>{U.current=!1}),[]),(0,_.useEffect)(()=>{w===e&&Se(e,h,v,b)},[w,e,h,v,b]),(0,_.useEffect)(()=>{P(G?.kind===`url`?G.history[G.index]??``:G?.kind===`artifact`?G.path:``),L(null)},[G]);let J=(0,_.useCallback)(async()=>{try{let t=await o.api.targets(e);return U.current?(O(t),A(null),t):null}catch(e){return U.current&&A(e instanceof s&&e.detail?e.detail:`Dev servers and files could not be listed.`),null}},[o.api,e]),Ae=(0,_.useRef)(null);(0,_.useEffect)(()=>{l&&Ae.current!==e&&(Ae.current=e,J())},[l,e,J]),ne(()=>{J()},R?_e:ve,{enabled:i&&(R!==null||q)});let Y=(0,_.useCallback)((e,t={})=>{B(null);let n=h.find(e=>e.id===v);if(!t.newTab&&n?.kind===`launcher`){g(h.map(t=>t.id===n.id?{id:t.id,kind:`url`,history:[e],index:0,reloadKey:0}:t));return}let r=h.find(t=>t.kind===`url`&&t.history[t.index]===e);if(r&&!t.newTab){y(r.id);return}let i=j();g([...h,{id:i,kind:`url`,history:[e],index:0,reloadKey:0}]),y(i)},[h,v]),je=(0,_.useCallback)(e=>{if(!G||G.kind!==`url`){Y(e);return}g(t=>t.map(t=>{if(t.id!==G.id||t.kind!==`url`)return t;let n=[...t.history.slice(0,t.index+1),e].slice(-50);return{...t,history:n,index:n.length-1}}))},[G,Y]),X=(0,_.useCallback)((e,t)=>{B(null);let n=h.find(t=>t.kind===`artifact`&&t.path===e);if(n){y(n.id);return}let r=h.find(e=>e.id===v);if(r?.kind===`launcher`){g(h.map(n=>n.id===r.id?{id:n.id,kind:`artifact`,path:e,artifactKind:t,reloadKey:0}:n));return}let i=j();g([...h,{id:i,kind:`artifact`,path:e,artifactKind:t,reloadKey:0}]),y(i)},[h,v]),Me=()=>{let e=h.find(e=>e.kind===`launcher`);if(e)y(e.id);else{let e=j();g(t=>[...t,{id:e,kind:`launcher`}]),y(e)}J()},Ne=e=>{let t=h.findIndex(t=>t.id===e.id),n=h.filter(t=>t.id!==e.id);g(n),H(t=>{let n=new Map(t);for(let r of t.keys())r.startsWith(`${e.id}:`)&&n.delete(r);return n}),v===e.id&&y((n[t]??n[t-1]??null)?.id??null)},Pe=(e,t)=>{let n=-1;if(e.key===`ArrowRight`?n=(t+1)%h.length:e.key===`ArrowLeft`?n=(t-1+h.length)%h.length:e.key===`Home`?n=0:e.key===`End`&&(n=h.length-1),n<0)return;e.preventDefault();let r=h[n];y(r.id),W.current.get(r.id)?.focus()},Fe=(0,_.useCallback)(e=>{B(null),r({root:e.root,devServerId:e.id}),z({server:e,since:o.now()})},[o,r]),Z=(0,_.useCallback)(e=>{e.running?Y(e.url):Fe(e)},[Y,Fe]);(0,_.useEffect)(()=>{if(R&&D){if(D.devServers.find(e=>e.running&&(e.id===R.server.id||e.port===R.server.port))){z(null),Y(R.server.url);return}o.now()-R.since>12e4&&(z(null),B(`Nothing answered on port ${R.server.port} within 2 minutes. Check the terminal for errors.`))}},[D,R,Y,o,De]),(0,_.useEffect)(()=>{if(!R)return;let e=setInterval(()=>Oe(o.now()),1e3);return()=>clearInterval(e)},[R,o]);let Q=(0,_.useCallback)(async e=>{if(e.url){let t=S(e.url,o.origin());t.kind===`loopback`?Y(t.url):L(t);return}if(e.artifactPath){let t=D?.artifacts.find(t=>t.path===e.artifactPath)?.kind??N(e.artifactPath);t?X(e.artifactPath,t):B(`That file cannot be previewed.`);return}if(e.devServerId){let t=(await J()??D)?.devServers.find(t=>t.id===e.devServerId);t?Z(t):B(`That dev server is no longer listed for this chat.`)}},[o,X,Z,Y,J,D]);(0,_.useEffect)(()=>{!n||n.nonce<=k||(k=n.nonce,Q(n))},[n,Q]);let $=G?.kind===`artifact`?`${G.id}:${G.reloadKey}`:null;(0,_.useEffect)(()=>{if(!l||!G||G.kind!==`artifact`||!$||V.has($))return;let t=G,n=$;H(e=>new Map(e).set(n,{status:`loading`})),(t.artifactKind===`md`?o.api.text(e,t.path).then(e=>({status:`text`,text:e})):o.api.ticket(e,t.path).then(e=>({status:`frame`,src:e.url}))).then(e=>{U.current&&H(t=>new Map(t).set(n,e))},e=>{let t=e instanceof s&&e.status===404?`This file is no longer in the chat's folder.`:e instanceof s&&e.status===413?`This file is larger than 5 MB, too large to preview.`:`This file could not be loaded.`;U.current&&H(e=>new Map(e).set(n,{status:`error`,message:t}))})},[l,G,$,V,o.api,e]);let Ie=e=>{G&&G.kind===`url`&&g(t=>t.map(t=>t.id===G.id&&t.kind===`url`?{...t,index:Math.min(t.history.length-1,Math.max(0,t.index+e))}:t))},Le=()=>{if(G){if(G.kind===`launcher`){J();return}g(e=>e.map(e=>e.id===G.id&&e.kind!==`launcher`?{...e,reloadKey:e.reloadKey+1}:e))}},Re=e=>{e.preventDefault();let t=S(M,o.origin());if(t.kind===`loopback`){L(null),G?.kind===`url`?je(t.url):Y(t.url);return}L(t)},ze=e=>{e.key===`Escape`&&(e.preventDefault(),P(K??(G?.kind===`artifact`?G.path:``)),L(null),e.currentTarget.blur())},Be=G?.kind===`url`&&G.index>0,Ve=G?.kind===`url`&&G.index<G.history.length-1;return(0,E.jsxs)(`div`,{className:T.pane,"data-compact":u||void 0,children:[(0,E.jsxs)(`div`,{className:T.strip,children:[(0,E.jsx)(`div`,{className:T.tabs,role:`tablist`,"aria-label":`Previews`,children:h.map((e,t)=>{let n=e.id===v,r=F(e);return(0,E.jsxs)(`div`,{className:T.tab,"data-selected":n||void 0,role:`presentation`,children:[(0,E.jsxs)(`button`,{ref:t=>{t?W.current.set(e.id,t):W.current.delete(e.id)},type:`button`,role:`tab`,id:`preview-tab-${e.id}`,"aria-selected":n,"aria-controls":`preview-panel`,tabIndex:n?0:-1,className:T.tabButton,title:e.kind===`url`?e.history[e.index]:e.kind===`artifact`?e.path:`Choose what to preview`,onClick:()=>y(e.id),onKeyDown:e=>Pe(e,t),children:[e.kind===`artifact`?(0,E.jsx)(oe,{size:12}):e.kind===`url`?(0,E.jsx)(ce,{size:12}):(0,E.jsx)(se,{size:12}),(0,E.jsx)(`span`,{className:T.tabTitle,children:r})]}),(0,E.jsx)(`button`,{type:`button`,className:T.tabClose,"aria-label":`Close preview ${r}`,title:`Close`,onClick:()=>Ne(e),children:(0,E.jsx)(d,{size:12})})]},e.id)})}),(0,E.jsx)(p,{variant:`ghost`,size:`sm`,icon:(0,E.jsx)(ie,{}),"aria-label":`New preview tab`,title:`New preview tab`,className:T.newTab,onClick:Me})]}),(0,E.jsxs)(`div`,{className:`${me.header} ${T.toolbar}`,children:[(0,E.jsxs)(`div`,{className:T.nav,children:[(0,E.jsx)(p,{variant:`ghost`,size:`sm`,icon:(0,E.jsx)(pe,{}),"aria-label":`Back`,title:`Back`,disabled:!Be,onClick:()=>Ie(-1)}),(0,E.jsx)(p,{variant:`ghost`,size:`sm`,icon:(0,E.jsx)(de,{}),"aria-label":`Forward`,title:`Forward`,disabled:!Ve,onClick:()=>Ie(1)}),(0,E.jsx)(p,{variant:`ghost`,size:`sm`,icon:(0,E.jsx)(ue,{}),"aria-label":q?`Refresh the list`:`Reload`,title:q?`Refresh the list`:`Reload`,disabled:!G&&q&&D===null,onClick:Le})]}),(0,E.jsx)(`form`,{className:T.addressForm,onSubmit:Re,role:`search`,"aria-label":`Preview address`,children:(0,E.jsx)(`input`,{ref:ke,className:T.address,value:M,onChange:e=>P(e.target.value),onKeyDown:ze,onFocus:e=>e.currentTarget.select(),placeholder:`localhost:5173`,"aria-label":`Address`,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,inputMode:`url`,readOnly:G?.kind===`artifact`})}),(0,E.jsxs)(`div`,{className:me.actions,children:[u?null:(0,E.jsx)(ae,{"aria-label":`Frame width`,size:`sm`,value:b,onChange:x,options:[{value:`desktop`,label:(0,E.jsx)(le,{size:14}),ariaLabel:`Desktop width`},{value:`phone`,label:(0,E.jsx)(fe,{size:14}),ariaLabel:`375 px width`}]}),K?(0,E.jsx)(`a`,{className:T.external,href:K,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in browser`,title:`Open in browser`,children:(0,E.jsx)(re,{})}):(0,E.jsx)(`span`,{className:T.external,"data-placeholder":`true`,"aria-hidden":`true`})]})]}),I?(0,E.jsx)(Ce,{note:I,onDismiss:()=>L(null)}):null,R?(0,E.jsxs)(`div`,{className:T.waiting,role:`status`,children:[(0,E.jsx)(`span`,{className:T.pulse,"aria-hidden":`true`}),(0,E.jsxs)(`span`,{className:T.waitingText,children:[`Starting `,(0,E.jsx)(`code`,{children:R.server.command??R.server.label}),` — waiting for `,C(R.server.url),` · `,Math.max(0,Math.round((De-R.since)/1e3)),`s`]}),(0,E.jsx)(m,{size:`sm`,variant:`ghost`,onClick:()=>z(null),children:`Stop waiting`})]}):null,Ee?(0,E.jsxs)(`div`,{className:T.notice,role:`alert`,children:[(0,E.jsx)(`span`,{children:Ee}),(0,E.jsx)(`button`,{type:`button`,className:T.noticeClose,"aria-label":`Dismiss`,title:`Dismiss`,onClick:()=>B(null),children:(0,E.jsx)(d,{size:12})})]}):null,(0,E.jsx)(`div`,{className:T.body,id:`preview-panel`,role:`tabpanel`,"aria-labelledby":G?`preview-tab-${G.id}`:void 0,children:q?(0,E.jsx)(Te,{targets:D,error:ye,roots:t,onOpenServer:Z,onOpenArtifact:e=>X(e.path,e.kind),onRetry:()=>void J(),onOpenTerminal:()=>r(t[0]?{root:t[0]}:{}),waitingId:R?.server.id??null}):G?.kind===`url`?(0,E.jsxs)(`div`,{className:T.stage,"data-device":b,children:[(0,E.jsx)(`iframe`,{className:T.frame,src:G.history[G.index],title:`Preview of ${F(G)}`,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups allow-modals allow-downloads`,referrerPolicy:`no-referrer`},`${G.id}:${G.index}:${G.reloadKey}`),(0,E.jsxs)(`p`,{className:T.frameHint,children:[`Blank page? Some servers refuse to be framed.`,` `,(0,E.jsx)(`a`,{href:G.history[G.index],target:`_blank`,rel:`noopener noreferrer`,children:`Open in browser ↗`})]})]}):G?.kind===`artifact`?(0,E.jsx)(we,{tab:G,content:$?V.get($)??{status:`loading`}:{status:`loading`},device:b,onRetry:Le}):null})]})}function Ce({note:e,onDismiss:t}){return(0,E.jsxs)(`div`,{className:T.addressNote,role:`status`,children:[e.kind===`external`?(0,E.jsxs)(`span`,{children:[`Only local dev servers open here.`,` `,(0,E.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open in browser ↗`})]}):e.kind===`self`?(0,E.jsx)(`span`,{children:`That address is Verse itself.`}):(0,E.jsxs)(`span`,{children:[`Enter a local address, like `,(0,E.jsx)(`code`,{children:`localhost:5173`}),`.`]}),(0,E.jsx)(`button`,{type:`button`,className:T.noticeClose,"aria-label":`Dismiss`,title:`Dismiss`,onClick:t,children:(0,E.jsx)(d,{size:12})})]})}function we({tab:e,content:t,device:n,onRetry:r}){return t.status===`loading`?(0,E.jsxs)(`div`,{className:T.loading,"aria-busy":`true`,children:[(0,E.jsx)(a,{width:`50%`}),(0,E.jsx)(a,{width:`80%`})]}):t.status===`error`?(0,E.jsx)(h,{compact:!0,tone:`error`,title:`Preview unavailable`,body:t.message,action:(0,E.jsx)(m,{size:`sm`,variant:`subtle`,onClick:r,children:`Try again`})}):t.status===`text`?(0,E.jsx)(`article`,{className:T.markdown,"aria-label":e.path,children:(0,E.jsx)(f,{text:t.text})}):e.artifactKind===`image`?(0,E.jsx)(`div`,{className:T.imageStage,children:(0,E.jsx)(`img`,{className:T.image,src:t.src,alt:P(e.path)})}):(0,E.jsx)(`div`,{className:T.stage,"data-device":e.artifactKind===`pdf`?`desktop`:n,children:(0,E.jsx)(`iframe`,{className:T.frame,src:t.src,title:`Preview of ${e.path}`,...e.artifactKind===`pdf`?{}:{sandbox:`allow-scripts`},referrerPolicy:`no-referrer`},t.src)})}function Te({targets:e,error:t,roots:n,onOpenServer:r,onOpenArtifact:i,onRetry:o,onOpenTerminal:s,waitingId:c}){if(!e)return t?(0,E.jsx)(h,{compact:!0,tone:`error`,title:`Could not list what to preview`,body:t,action:(0,E.jsx)(m,{size:`sm`,variant:`subtle`,onClick:o,children:`Try again`})}):(0,E.jsxs)(`div`,{className:T.loading,"aria-busy":`true`,children:[(0,E.jsx)(a,{width:`35%`}),(0,E.jsx)(a,{width:`70%`}),(0,E.jsx)(a,{width:`60%`})]});let l=n.length>1;return e.devServers.length===0&&e.artifacts.length===0?(0,E.jsx)(h,{compact:!0,icon:(0,E.jsx)(se,{size:20}),title:`Nothing to preview yet`,body:`Start a dev server in the terminal, or ask for an HTML report. Local servers and the files this chat writes show up here.`,action:(0,E.jsx)(m,{size:`sm`,variant:`subtle`,onClick:s,children:`Open a terminal`})}):(0,E.jsxs)(`div`,{className:T.launcher,children:[(0,E.jsxs)(`section`,{className:T.section,"aria-labelledby":`preview-servers-title`,children:[(0,E.jsx)(`h3`,{className:T.sectionTitle,id:`preview-servers-title`,children:`Dev servers`}),e.devServers.length===0?(0,E.jsxs)(`p`,{className:T.muted,children:[`No dev server found in this chat's folders. Add one to `,(0,E.jsx)(`code`,{children:`.claude/launch.json`}),`, or start it in the terminal.`]}):(0,E.jsx)(`ul`,{className:T.rows,children:e.devServers.map(e=>(0,E.jsxs)(`li`,{className:T.row,children:[(0,E.jsx)(`span`,{className:T.dot,"data-running":e.running||void 0,"aria-hidden":`true`}),(0,E.jsxs)(`span`,{className:T.rowMain,children:[(0,E.jsx)(`span`,{className:T.rowTitle,title:e.label,children:e.label}),(0,E.jsxs)(`span`,{className:T.rowMeta,title:`${C(e.url)} · ${e.running?`running`:`stopped`} · ${O[e.source]}${l?` · ${e.root}`:``}`,children:[C(e.url),` · `,e.running?`running`:`stopped`,` · `,O[e.source],l?` · ${P(e.root)}`:``]}),!e.running&&e.command&&e.command!==e.label?(0,E.jsx)(`code`,{className:T.rowCommand,title:e.command,children:e.command}):null]}),e.running?(0,E.jsx)(m,{size:`sm`,variant:`subtle`,onClick:()=>r(e),"aria-label":`Open ${e.label}`,children:`Open`}):(0,E.jsx)(m,{size:`sm`,variant:`subtle`,icon:(0,E.jsx)(g,{size:12}),busy:c===e.id,onClick:()=>r(e),"aria-label":`Start ${e.label}`,title:`Runs ${e.command??e.label} in a terminal tab`,children:`Start`})]},e.id))})]}),(0,E.jsxs)(`section`,{className:T.section,"aria-labelledby":`preview-files-title`,children:[(0,E.jsx)(`h3`,{className:T.sectionTitle,id:`preview-files-title`,children:`This chat's files`}),e.artifacts.length===0?(0,E.jsx)(`p`,{className:T.muted,children:`Ask the chat for a report or a page: HTML, Markdown, SVG, images and PDFs it writes appear here.`}):(0,E.jsx)(`ul`,{className:T.rows,children:e.artifacts.map(e=>{let t=e.bytes>5242880;return(0,E.jsxs)(`li`,{className:T.row,children:[(0,E.jsx)(oe,{size:14,className:T.fileIcon}),(0,E.jsxs)(`span`,{className:T.rowMain,children:[(0,E.jsx)(`span`,{className:T.rowTitle,title:e.path,children:e.path}),(0,E.jsxs)(`span`,{className:T.rowMeta,children:[ye[e.kind],` · `,w(e.bytes)]})]}),(0,E.jsx)(m,{size:`sm`,variant:`subtle`,disabled:t,title:t?`Larger than 5 MB`:void 0,onClick:()=>i(e),"aria-label":`Open ${e.path}`,children:`Open`})]},e.path)})})]})]})}export{ge as PREVIEW_START_TIMEOUT_MS,I as PreviewPane,M as resetPreviewPaneForTest};
2
- //# sourceMappingURL=PreviewPane-kzbbSK4u.js.map
@@ -1 +0,0 @@
1
- ._handle_1pzoz_6{z-index:var(--z-sticky);justify-content:center;align-items:center;gap:var(--space-1);border:1px solid var(--border-default);border-radius:var(--radius-md) 0 0 var(--radius-md);background:var(--bg-surface);width:24px;height:64px;box-shadow:var(--shadow-sm);color:var(--text-secondary);cursor:pointer;transition:transform var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard);border-right:0;flex-direction:column;padding:0;display:flex;position:fixed;top:50%;right:0;transform:translate(4px,-50%)}._handle_1pzoz_6:hover,._handle_1pzoz_6:focus-visible{background:var(--bg-surface-raised);color:var(--text-primary);transform:translateY(-50%)}._handle_1pzoz_6:focus-visible{box-shadow:var(--shadow-focus-ring);outline:none}._dot_1pzoz_47{border-radius:var(--radius-full);width:7px;height:7px;box-shadow:0 0 0 2px var(--bg-surface);background:var(--status-success-solid);flex:none;display:block}._dot_1pzoz_47[data-tone=tight]{border:2px solid var(--status-warning-solid);background:0 0}._dot_1pzoz_47[data-tone=alert]{background:var(--status-danger-solid);border-radius:1px;transform:rotate(45deg)scale(.9)}._railDot_1pzoz_67{position:absolute;top:-3px;right:-3px}._railDot_1pzoz_67 ._dot_1pzoz_47{box-shadow:0 0 0 2px var(--bg-canvas)}@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) ._handle_1pzoz_6{transition:none}}:root[data-motion=reduce] ._handle_1pzoz_6{transition:none}@media print{._handle_1pzoz_6{display:none}}._dock_1pzoz_84{background:var(--bg-surface);grid-area:1/3;min-width:0;min-height:0;display:flex}
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ResourcesDrawer-o4ILHdep.js","assets/index-oAAq8XJa.js","assets/global-Di2PUgj4.js","assets/global-_tOCFt9y.css","assets/MutationTokenDialog-SkRxqV_I.js","assets/MutationTokenDialog-Cum_DqQZ.css","assets/command-catalog-BdtDH93o.js","assets/guarded-action-CvOHcqyH.js","assets/RouteErrorBoundary-C5SxA2Dg.js","assets/RouteErrorBoundary-6RMd_aZg.css","assets/verse-ui-store-zafyzXKD.js","assets/workbench-types-DzN-5trg.js","assets/dock-store-BA1cHOYA.js","assets/viewport-BEqGUoTA.js","assets/section-visibility-qFqc_d4Z.js","assets/icons-B_yuAgdN.js","assets/VerseConsoleApp-WVeyJnW7.js","assets/verse-queries-DvIJcn6Z.js","assets/composer-keys-DBRymxQn.js","assets/command-bus-DqimKCUY.js","assets/useActivity-Bk3XgXjL.js","assets/VerseConsoleApp-Cxqr-3qc.css","assets/format-B8DAVcn2.js","assets/format-DKrNjdwD.js","assets/verse-model-D7NZQFAR.js","assets/CapacityStrip-C667yQe8.js","assets/Tag-_-K1h7Hk.js","assets/Tag-D0rAEciH.css","assets/budget-queries-wUshcovN.js","assets/useSeatsRefresh-CG4jczeL.js","assets/capacity-strip-model-Bj_9ztzs.js","assets/seat-subscription-CH6fW4fJ.js","assets/context-model-Dwd49-dp.js","assets/verse-store-DjBWj04q.js","assets/CapacityStrip-Cc28CyWk.css","assets/Button-DYv_KKxr.js","assets/Button-DrnKsvnQ.css","assets/types-D5XOdyw8.js","assets/fleet-queries-BSdRlUwJ.js","assets/control-queries-DOZR-D8G.js","assets/mutations-Dpsql5t7.js","assets/fleet-model-CNe8Wh-s.js","assets/usage-queries-Bn8ccqyN.js","assets/local-model-DFyjKX0b.js","assets/apps-model-CDFvmsQV.js","assets/ResourcesDrawer-CSKIO_wZ.css"])))=>i.map(i=>d[i]);
2
- import{a as e,n as t,o as n,s as r,t as i}from"./index-oAAq8XJa.js";import{c as a,s as o}from"./command-catalog-BdtDH93o.js";import{s}from"./verse-ui-store-zafyzXKD.js";import{n as c}from"./command-bus-DqimKCUY.js";import{S as l,T as u,b as d,h as f,j as p,m,w as h,x as g}from"./VerseConsoleApp-WVeyJnW7.js";import{i as _}from"./CapacityStrip-C667yQe8.js";import{n as v,t as y}from"./capacity-strip-model-Bj_9ztzs.js";import{t as b}from"./types-D5XOdyw8.js";import{i as x}from"./local-model-DFyjKX0b.js";var S=r(e(),1),C={handle:`_handle_1pzoz_6`,dot:`_dot_1pzoz_47`,railDot:`_railDot_1pzoz_67`,dock:`_dock_1pzoz_84`},w=t();function T(){return(0,w.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,w.jsx)(`path`,{d:`M2.75 4h10.5M2.75 8h10.5M2.75 12h10.5`,opacity:`.35`}),(0,w.jsx)(`path`,{d:`M2.75 4h7M2.75 8h4M2.75 12h8.5`})]})}function E({summary:e,rail:t=!1}){if(!e||e.tone===`unknown`)return null;let n=(0,w.jsx)(`span`,{className:C.dot,"data-tone":e.tone,"data-resources-dot":e.tone,"aria-hidden":`true`});return t?(0,w.jsx)(`span`,{className:C.railDot,children:n}):n}function D(e){return e?`Resources — ${e.spoken}`:`Resources`}function O({summary:e,shortcut:t,onOpen:n,onWarm:r}){return(0,w.jsx)(p,{label:D(e),shortcut:t,placement:`left`,children:(0,w.jsxs)(`button`,{type:`button`,className:C.handle,"data-resources-handle":!0,"aria-label":D(e),"aria-haspopup":`dialog`,onClick:n,onPointerEnter:r,onFocus:r,children:[(0,w.jsx)(T,{}),(0,w.jsx)(E,{summary:e})]})})}var k=new Set([`spent`,`signed-out`,`unavailable`]),A=[[`usable`,`usable`],[`low`,`running low`],[`spent`,`spent`],[`signed-out`,`signed out`],[`unavailable`,`unavailable`]];function j(e,t){let n=e.filter(e=>e.kind===`subscription`).map(e=>y(e,{healthRead:t.healthRead,...t.now===void 0?{}:{now:t.now}}).kind),r=new Map;for(let e of n)r.set(e,(r.get(e)??0)+1);let i=A.filter(([e])=>r.has(e)).map(([e,t])=>`${r.get(e)} ${t}`).join(` · `),a=`unknown`;return n.some(e=>k.has(e))?a=`alert`:n.includes(`low`)?a=`tight`:n.includes(`usable`)&&(a=`ok`),{tone:a,spoken:i||(n.length===0?`no accounts connected`:`not read yet`)}}function M(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function N(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function P(e){return typeof e==`string`&&e.trim().length>0?e.trim():null}var F=`An estimate from the sessions Verse launched — the real balance is on claude.ai.`;function I(e){let t=M(e),n=M(t?.budget);if(!t||!n)return null;let r=N(n.creditsTotalUsd),i=N(n.estimatedSpentUsd),a=N(n.estimatedRemainingUsd);if(r===null||i===null&&a===null)return null;let o=Math.max(0,a??r-(i??0)),s=M(t.seat),c=M(n.canLaunch),l=P(n.balanceUrl),u=M(n.budget);return{totalUsd:r,spentUsd:i??Math.max(0,r-o),remainingUsd:o,remainingPercent:r>0?Math.max(0,Math.min(100,o/r*100)):0,running:Math.max(0,N(n.running)??0),sessionsToday:Math.max(0,N(n.sessionsToday)??0),maxSessionsPerDay:N(u?.maxSessionsPerDay),seatReady:s?.ready!==!1,seatReason:P(s?.reason),canLaunch:c?.ok!==!1,canLaunchReason:P(c?.reason),estimateNote:P(n.estimateNote)??F,balanceUrl:l!==null&&l.startsWith(`https://claude.ai/`)?l:b}}function L(e){let t=Math.max(0,e);return t>=100||Number.isInteger(t)?`$${Math.round(t)}`:`$${t.toFixed(2)}`}var R={"llama-server":`llama-server`,ollama:`Ollama`,vllm:`vLLM`,unknown:`Serving runtime`},z={running:`Running`,starting:`Starting…`,stopping:`Stopping…`,stopped:`Stopped`,unknown:`State not reported`};function B(e){if(!e)return null;let t=[];e.model&&t.push(e.model),e.contextTokens!==null&&t.push(`${x(e.contextTokens)} context per agent`),e.slotsTotal!==null&&e.slotsTotal>0&&t.push(e.slotsBusy===null?`${e.slotsTotal} slots`:`${e.slotsBusy} of ${e.slotsTotal} slots busy`);let n=e.state;return{name:R[e.kind]??R.unknown,state:n,word:z[n]??z.unknown,tone:n===`running`?`success`:n===`starting`||n===`stopping`?`warning`:`neutral`,detail:t.length>0?t.join(` · `):null,canStart:e.supervised&&n===`stopped`,canStop:e.supervised&&n===`running`,managedElsewhere:!e.supervised}}function V(e){let t=e.configuredContext,n=e.nativeContext;return t!==null&&e.contextTruncated&&n!==null?`${x(t)} of ${x(n)} context`:t===null?n===null?null:`${x(n)} context`:`${x(t)} context`}function H(){let e=_({withBudget:!1}),t=e.health!==null,n=(0,S.useMemo)(()=>e.loading?null:j(v(e.seats,{health:e.health,local:`hide`}),{healthRead:t}),[e.loading,e.seats,e.health,t]);return(0,S.useEffect)(()=>{h(n)},[n]),null}var U=n({ResourcesChrome:()=>Z,ResourcesRailButton:()=>Q,preloadResourcesDrawer:()=>K,resourcesDocked:()=>X,runResourcesCommand:()=>J}),W=()=>i(()=>import(`./ResourcesDrawer-o4ILHdep.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])),G=(0,S.lazy)(()=>W().then(e=>({default:e.ResourcesDrawer})));function K(){return W()}var q=()=>{W().catch(()=>void 0)};function J(e){if(g().open&&(e===`key`||e===`button`)){d();return}s(),l()}function Y(){let e=o(`resources.toggle`)?.keys[0];return e?a(e):void 0}function X(e,t){return e.open&&e.pinned&&!t}function Z({compact:e}){let t=u(),{overlay:n}=m(),r=X(t,e);return(0,S.useEffect)(()=>c(`resources.toggle`,e=>J(e.via)),[]),(0,S.useEffect)(()=>{n!==null&&!X(g(),e)&&d()},[n,e]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(H,{}),r?(0,w.jsx)(`div`,{className:C.dock,"data-resources-dock":!0,children:(0,w.jsx)(S.Suspense,{fallback:null,children:(0,w.jsx)(G,{mode:`docked`})})}):null,t.open&&!r?(0,w.jsx)(S.Suspense,{fallback:null,children:(0,w.jsx)(G,{mode:`overlay`,compact:e})}):null,t.open?null:(0,w.jsx)(O,{summary:t.summary,shortcut:Y(),onWarm:q,onOpen:()=>f(`resources.toggle`,{via:`button`})})]})}function Q({expanded:e,buttonClass:t,iconClass:n,labelClass:r}){let i=u(),a=D(i.summary);return(0,w.jsx)(p,{label:a,shortcut:Y(),placement:`right`,disabled:e,children:(0,w.jsxs)(`button`,{type:`button`,className:t,"aria-label":a,"aria-expanded":i.open,"data-resources-rail":!0,onPointerEnter:q,onClick:()=>f(`resources.toggle`,{via:`button`}),children:[(0,w.jsxs)(`span`,{className:n,children:[(0,w.jsx)(T,{}),(0,w.jsx)(E,{summary:i.summary,rail:!0})]}),e?(0,w.jsx)(`span`,{className:r,children:`Resources`}):null]})})}export{Z as ResourcesChrome,Q as ResourcesRailButton,B as a,I as i,L as n,K as preloadResourcesDrawer,V as r,X as resourcesDocked,J as runResourcesCommand,U as t};
3
- //# sourceMappingURL=ResourcesChrome-BzV6bkIa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";inBAeA,SAAgB,GAAgB,CAC9B,OACE,UAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,OAAO,eAAe,YAAY,MAAM,cAAc,QAAQ,cAAY,OAAO,UAAU,QAAvJ,WACE,SAAC,OAAD,CAAM,EAAE,wCAAwC,QAAQ,KAAO,IAC/D,SAAC,OAAD,CAAM,EAAE,gCAAk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AAU,EAC3E,oBAAC,SAAD,CACE,KAAK,SACL,UAAW,EACX,aAAY,EACZ,gBAAe,EAAU,KACzB,yBACA,eAAgB,EAChB,YAAe,EAAsB,mBAAoB,CAAE,IAAK,QAAS,CAAC,EAP5E,WASE,UAAC,OAAD,CAAM,UAAW,EAAjB,WACE,SAAC,EAAD,CAAgB,IAChB,SAAC,EAAD,CAAc,QAAS,EAAU,QAAS,OAAM,EAC5C,CACL,MAAW,SAAC,OAAD,CAAM,UAAW,EAAY,oBAAe,GAAI,IACtD,GACD,EAEb","names":[],"ignoreList":[],"sources":["../../../../../../src/web-ui/routes/verse/resources/ResourcesHandle.tsx","../../../../../../src/web-ui/routes/verse/resources/resources-model.ts","../../../../../../src/web-ui/routes/verse/resources/resources-summary.tsx","../../../../../../src/web-ui/routes/verse/resources/ResourcesChrome.tsx"],"sourcesContent":["/**\n * routes/verse/resources/ResourcesHandle.tsx — the slim tab on the right edge\n * of every surface that opens the Resources drawer, its icon and its status\n * dot (unit 3.11 C6).\n *\n * Part of the ResourcesChrome chunk, fetched right after first paint (like the\n * rail's capacity ring). Until the summary has read there is no dot — \"not\n * known\" is never drawn as \"fine\". The dot is a shape plus words in the\n * accessible name, never colour alone.\n */\nimport { Tooltip } from '../../../components/primitives/Tooltip.js';\nimport type { ResourcesSummary } from './resources-model.js';\nimport styles from './ResourcesChrome.module.css';\n\n/** Three stacked capacity bars: accounts, compute, credits. 16px, 1.5px stroke, like the shared set. */\nexport function ResourcesIcon() {\n return (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M2.75 4h10.5M2.75 8h10.5M2.75 12h10.5\" opacity=\".35\" />\n <path d=\"M2.75 4h7M2.75 8h4M2.75 12h8.5\" />\n </svg>\n );\n}\n\n/** `rail`: pinned to the corner of a rail icon, like the rail's own badges. */\nexport function ResourcesDot({ summary, rail = false }: { summary: ResourcesSummary | null; rail?: boolean }) {\n if (!summary || summary.tone === 'unknown') return null;\n const dot = <span className={styles.dot} data-tone={summary.tone} data-resources-dot={summary.tone} aria-hidden=\"true\" />;\n return rail ? <span className={styles.railDot}>{dot}</span> : dot;\n}\n\n/** \"Resources — 2 usable · 1 spent\": the tooltip and the accessible name. */\nexport function resourcesLabel(summary: ResourcesSummary | null): string {\n return summary ? `Resources — ${summary.spoken}` : 'Resources';\n}\n\nexport function ResourcesHandle({ summary, shortcut, onOpen, onWarm }: { summary: ResourcesSummary | null; shortcut: string | undefined; onOpen: () => void; onWarm?: () => void }) {\n return (\n <Tooltip label={resourcesLabel(summary)} shortcut={shortcut} placement=\"left\">\n <button type=\"button\" className={styles.handle} data-resources-handle aria-label={resourcesLabel(summary)} aria-haspopup=\"dialog\" onClick={onOpen} onPointerEnter={onWarm} onFocus={onWarm}>\n <ResourcesIcon />\n <ResourcesDot summary={summary} />\n </button>\n </Tooltip>\n );\n}\n","/**\n * routes/verse/resources/resources-model.ts — what the Resources drawer says,\n * projected from reads other units already own (unit 3.11 C6). Pure: no\n * React, no I/O.\n *\n * Nothing about a seat is worded here. Every account line comes from C6's\n * capacity projection (usage/capacity-strip-model.ts: `accountStatus`,\n * `orderAccountRows`), so the drawer, Apps & Accounts and the rail ring can\n * never describe one seat two ways. What IS new here:\n *\n * - the edge handle's one-dot summary across the paid accounts;\n * - the cloud lane's overview (GET /api/verse/cloud), narrowed field by\n * field — the route is landing in parallel, so a missing or drifted body\n * reads as \"not available yet\", never as a crash or a zero;\n * - short sentences for the serving runtime and each local model's context.\n */\nimport { CLOUD_BALANCE_URL, type CloudOverviewResponse } from '../../../../core/cloud/types.js';\nimport type { ServingRuntimeSnapshot } from '../../../data/api-types.js';\nimport { accountStatus, type AccountStatusKind, type CapacityRow } from '../usage/capacity-strip-model.js';\nimport { formatContext, type LocalModelRow } from '../usage/local-model.js';\n\n// ---------------------------------------------------------------------------\n// The handle's dot\n// ---------------------------------------------------------------------------\n\n/**\n * ok every account read is usable, none tight\n * tight something is running low (or usable only on credits)\n * alert something is spent, signed out or unavailable\n * unknown nothing has been read yet — no dot at all (never \"all good\")\n */\nexport type ResourcesTone = 'ok' | 'tight' | 'alert' | 'unknown';\n\nexport interface ResourcesSummary {\n tone: ResourcesTone;\n /** Appended to the handle's accessible name and tooltip: \"2 usable · 1 spent\". */\n spoken: string;\n}\n\nconst ALERT_KINDS: ReadonlySet<AccountStatusKind> = new Set(['spent', 'signed-out', 'unavailable']);\n\nconst COUNT_WORDS: ReadonlyArray<[AccountStatusKind, string]> = [\n ['usable', 'usable'],\n ['low', 'running low'],\n ['spent', 'spent'],\n ['signed-out', 'signed out'],\n ['unavailable', 'unavailable'],\n];\n\n/** The paid accounts, reduced to one tone and one sentence. Local seats have no quota to run out of. */\nexport function summarizeResources(rows: readonly CapacityRow[], opts: { healthRead: boolean; now?: number }): ResourcesSummary {\n const kinds = rows\n .filter((r) => r.kind === 'subscription')\n .map((r) => accountStatus(r, { healthRead: opts.healthRead, ...(opts.now !== undefined ? { now: opts.now } : {}) }).kind);\n const counts = new Map<AccountStatusKind, number>();\n for (const k of kinds) counts.set(k, (counts.get(k) ?? 0) + 1);\n const spoken = COUNT_WORDS.filter(([k]) => counts.has(k))\n .map(([k, word]) => `${counts.get(k)} ${word}`)\n .join(' · ');\n let tone: ResourcesTone = 'unknown';\n if (kinds.some((k) => ALERT_KINDS.has(k))) tone = 'alert';\n else if (kinds.includes('low')) tone = 'tight';\n else if (kinds.includes('usable')) tone = 'ok';\n return { tone, spoken: spoken || (kinds.length === 0 ? 'no accounts connected' : 'not read yet') };\n}\n\nexport const TONE_WORD: Readonly<Record<ResourcesTone, string>> = {\n ok: 'all usable',\n tight: 'running low',\n alert: 'needs attention',\n unknown: 'not read yet',\n};\n\n// ---------------------------------------------------------------------------\n// Cloud credits\n// ---------------------------------------------------------------------------\n\nexport interface CloudCreditsView {\n totalUsd: number;\n spentUsd: number;\n remainingUsd: number;\n /** 0–100, remaining of total. */\n remainingPercent: number;\n running: number;\n sessionsToday: number;\n maxSessionsPerDay: number | null;\n seatReady: boolean;\n seatReason: string | null;\n canLaunch: boolean;\n canLaunchReason: string | null;\n estimateNote: string;\n /** Always https://claude.ai/… — anything else falls back to the frozen constant. */\n balanceUrl: string;\n}\n\nfunction rec(value: unknown): Record<string, unknown> | null {\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : null;\n}\n\nfunction num(value: unknown): number | null {\n return typeof value === 'number' && Number.isFinite(value) ? value : null;\n}\n\nfunction text(value: unknown): string | null {\n return typeof value === 'string' && value.trim().length > 0 ? value.trim() : null;\n}\n\nconst DEFAULT_ESTIMATE_NOTE = 'An estimate from the sessions Verse launched — the real balance is on claude.ai.';\n\n/** Narrow a GET /api/verse/cloud body; null when it is not one. */\nexport function projectCloudCredits(raw: unknown): CloudCreditsView | null {\n const root = rec(raw) as Partial<Record<keyof CloudOverviewResponse, unknown>> | null;\n const budget = rec(root?.budget);\n if (!root || !budget) return null;\n const total = num(budget['creditsTotalUsd']);\n const spent = num(budget['estimatedSpentUsd']);\n const remainingRaw = num(budget['estimatedRemainingUsd']);\n if (total === null || (spent === null && remainingRaw === null)) return null;\n const remaining = Math.max(0, remainingRaw ?? total - (spent ?? 0));\n const seat = rec(root.seat);\n const gate = rec(budget['canLaunch']);\n const url = text(budget['balanceUrl']);\n const policy = rec(budget['budget']);\n return {\n totalUsd: total,\n spentUsd: spent ?? Math.max(0, total - remaining),\n remainingUsd: remaining,\n remainingPercent: total > 0 ? Math.max(0, Math.min(100, (remaining / total) * 100)) : 0,\n running: Math.max(0, num(budget['running']) ?? 0),\n sessionsToday: Math.max(0, num(budget['sessionsToday']) ?? 0),\n maxSessionsPerDay: num(policy?.['maxSessionsPerDay']),\n seatReady: seat?.['ready'] !== false,\n seatReason: text(seat?.['reason']),\n canLaunch: gate?.['ok'] !== false,\n canLaunchReason: text(gate?.['reason']),\n estimateNote: text(budget['estimateNote']) ?? DEFAULT_ESTIMATE_NOTE,\n balanceUrl: url !== null && url.startsWith('https://claude.ai/') ? url : CLOUD_BALANCE_URL,\n };\n}\n\n/** \"$212\" / \"$3.50\" — whole dollars once the cents stop mattering. */\nexport function formatUsd(value: number): string {\n const v = Math.max(0, value);\n return v >= 100 || Number.isInteger(v) ? `$${Math.round(v)}` : `$${v.toFixed(2)}`;\n}\n\n// ---------------------------------------------------------------------------\n// Local\n// ---------------------------------------------------------------------------\n\nconst RUNTIME_NAME: Readonly<Record<ServingRuntimeSnapshot['kind'], string>> = {\n 'llama-server': 'llama-server',\n ollama: 'Ollama',\n vllm: 'vLLM',\n unknown: 'Serving runtime',\n};\n\nconst STATE_WORD: Readonly<Record<ServingRuntimeSnapshot['state'], string>> = {\n running: 'Running',\n starting: 'Starting…',\n stopping: 'Stopping…',\n stopped: 'Stopped',\n unknown: 'State not reported',\n};\n\nexport interface RuntimeView {\n name: string;\n state: ServingRuntimeSnapshot['state'];\n word: string;\n tone: 'success' | 'warning' | 'neutral';\n /** \"Qwen3-32B · 16k context per agent · 1 of 4 slots busy\" — only the parts that were reported. */\n detail: string | null;\n canStart: boolean;\n canStop: boolean;\n /** Set when Verse cannot start or stop it (launchd, the operator's own terminal). */\n managedElsewhere: boolean;\n}\n\nexport function runtimeView(runtime: ServingRuntimeSnapshot | null): RuntimeView | null {\n if (!runtime) return null;\n const parts: string[] = [];\n if (runtime.model) parts.push(runtime.model);\n // Per-slot context, the number one agent actually gets (fleet-types.ts).\n if (runtime.contextTokens !== null) parts.push(`${formatContext(runtime.contextTokens)} context per agent`);\n if (runtime.slotsTotal !== null && runtime.slotsTotal > 0) {\n parts.push(runtime.slotsBusy !== null ? `${runtime.slotsBusy} of ${runtime.slotsTotal} slots busy` : `${runtime.slotsTotal} slots`);\n }\n const state = runtime.state;\n return {\n name: RUNTIME_NAME[runtime.kind] ?? RUNTIME_NAME.unknown,\n state,\n word: STATE_WORD[state] ?? STATE_WORD.unknown,\n tone: state === 'running' ? 'success' : state === 'starting' || state === 'stopping' ? 'warning' : 'neutral',\n detail: parts.length > 0 ? parts.join(' · ') : null,\n canStart: runtime.supervised && state === 'stopped',\n canStop: runtime.supervised && state === 'running',\n managedElsewhere: !runtime.supervised,\n };\n}\n\n/**\n * The context a local model runs with. The configured window is the one a\n * turn actually gets; when it is below the model's native window both are\n * said, so \"256k model\" is never read as \"256k here\".\n */\nexport function modelContextText(row: Pick<LocalModelRow, 'nativeContext' | 'configuredContext' | 'contextTruncated'>): string | null {\n const configured = row.configuredContext;\n const native = row.nativeContext;\n if (configured !== null && row.contextTruncated && native !== null) return `${formatContext(configured)} of ${formatContext(native)} context`;\n if (configured !== null) return `${formatContext(configured)} context`;\n if (native !== null) return `${formatContext(native)} context`;\n return null;\n}\n\n/** How many models the drawer lists before pointing at Usage for the rest. */\nexport const LOCAL_MODELS_SHOWN = 6;\n","/**\n * routes/verse/resources/resources-summary.tsx — the edge handle's dot,\n * loaded after first paint (unit 3.11 C6).\n *\n * Mounted by the shell once, renders nothing, and publishes one tone and one\n * sentence to resources-store for the handle and the rail button. It reads the\n * same app-wide seat + health caches as the rail's capacity ring\n * (useCapacityData, budget OFF), so it adds no request of its own and keeps\n * no poll alive that the rail does not already keep — the cheap summary the\n * handle needs, never the drawer's heavier reads.\n */\nimport { useEffect, useMemo } from 'react';\nimport { useCapacityData } from '../usage/CapacityStrip.js';\nimport { buildCapacityRows } from '../usage/capacity-strip-model.js';\nimport { summarizeResources } from './resources-model.js';\nimport { setResourcesSummary } from './resources-store.js';\n\nexport function ResourcesSummaryProbe() {\n const data = useCapacityData({ withBudget: false });\n const healthRead = data.health !== null;\n const summary = useMemo(\n () => (data.loading ? null : summarizeResources(buildCapacityRows(data.seats, { health: data.health, local: 'hide' }), { healthRead })),\n [data.loading, data.seats, data.health, healthRead],\n );\n useEffect(() => {\n setResourcesSummary(summary);\n }, [summary]);\n return null;\n}\n","/**\n * routes/verse/resources/ResourcesChrome.tsx — everything the Resources\n * drawer puts on every surface, as ONE chunk fetched right after first paint\n * (unit 3.11 C6):\n *\n * ResourcesChrome the edge tab on the right, the summary behind its\n * dot, the ⌘. / palette command, and the drawer itself\n * (overlay, or the docked column when pinned);\n * ResourcesRailButton the rail-foot button with the same dot.\n *\n * WHY A CHUNK. Chat first paint has ~3 KB of budget left (SPEC-310A §1;\n * `npm run check:first-paint`), and nothing here can draw anything useful\n * before the seat reads answer anyway. The shell keeps only the tiny store\n * static — it must know at first paint whether a pinned column takes a grid\n * track, so the surface never jumps — and mounts this module's two\n * components lazily, like the rail's capacity ring. The drawer body is a\n * further chunk still, mounted only while open (so it polls only while open)\n * and warmed on idle / on hover.\n */\nimport { Suspense, lazy, useEffect } from 'react';\nimport { Tooltip } from '../../../components/primitives/Tooltip.js';\nimport { findCommand, formatChord } from '../shell/command-catalog.js';\nimport { registerCommandHandler } from '../shell/command-bus.js';\nimport { executeCatalogCommand } from '../shell/run-command.js';\nimport { useVerseUi } from '../useVerseUi.js';\nimport { closeVerseOverlay } from '../verse-ui-store.js';\nimport { ResourcesDot, ResourcesHandle, ResourcesIcon, resourcesLabel } from './ResourcesHandle.js';\nimport { closeResources, getResourcesUi, openResources, useResourcesUi } from './resources-store.js';\nimport { ResourcesSummaryProbe } from './resources-summary.js';\nimport styles from './ResourcesChrome.module.css';\n\nconst importDrawer = () => import('./ResourcesDrawer.js');\nconst ResourcesDrawer = lazy(() => importDrawer().then((m) => ({ default: m.ResourcesDrawer })));\n\n/** Fetch the drawer's chunk ahead of the first open (the shell's idle warm-up, a hover). */\nexport function preloadResourcesDrawer(): Promise<unknown> {\n return importDrawer();\n}\n\nconst warm = () => {\n void importDrawer().catch(() => undefined);\n};\n\n/** The key and the buttons toggle; the palette (\"Show resources\") and the desktop menu open. */\nexport function runResourcesCommand(via: string | undefined): void {\n if (getResourcesUi().open && (via === 'key' || via === 'button')) {\n closeResources();\n return;\n }\n // One overlay at a time: the drawer replaces ⌘K / ⌘J / ⌘/.\n closeVerseOverlay();\n openResources();\n}\n\nfunction shortcutText(): string | undefined {\n const chord = findCommand('resources.toggle')?.keys[0];\n return chord ? formatChord(chord) : undefined;\n}\n\n/** Pinned docks beside the surface; a phone-width window has no room, so it floats there. */\nexport function resourcesDocked(state: { open: boolean; pinned: boolean }, compact: boolean): boolean {\n return state.open && state.pinned && !compact;\n}\n\nexport function ResourcesChrome({ compact }: { compact: boolean }) {\n const resources = useResourcesUi();\n const { overlay } = useVerseUi();\n const docked = resourcesDocked(resources, compact);\n\n useEffect(() => registerCommandHandler('resources.toggle', (inv) => runResourcesCommand(inv.via)), []);\n // Another overlay (⌘K, ⌘J, ⌘/) replaces a FLOATING drawer; a pinned one stays docked.\n useEffect(() => {\n if (overlay !== null && !resourcesDocked(getResourcesUi(), compact)) closeResources();\n }, [overlay, compact]);\n\n return (\n <>\n <ResourcesSummaryProbe />\n {docked ? (\n <div className={styles.dock} data-resources-dock>\n <Suspense fallback={null}>\n <ResourcesDrawer mode=\"docked\" />\n </Suspense>\n </div>\n ) : null}\n {resources.open && !docked ? (\n <Suspense fallback={null}>\n <ResourcesDrawer mode=\"overlay\" compact={compact} />\n </Suspense>\n ) : null}\n {resources.open ? null : (\n <ResourcesHandle summary={resources.summary} shortcut={shortcutText()} onWarm={warm} onOpen={() => executeCatalogCommand('resources.toggle', { via: 'button' })} />\n )}\n </>\n );\n}\n\n/**\n * The rail-foot button. The shell passes its own rail classes so the button\n * is indistinguishable from its neighbours (no tooltip while the rail's\n * labelled mode already shows the name).\n */\nexport function ResourcesRailButton({ expanded, buttonClass, iconClass, labelClass }: {\n expanded: boolean;\n buttonClass: string | undefined;\n iconClass: string | undefined;\n labelClass: string | undefined;\n}) {\n const resources = useResourcesUi();\n const label = resourcesLabel(resources.summary);\n return (\n <Tooltip label={label} shortcut={shortcutText()} placement=\"right\" disabled={expanded}>\n <button\n type=\"button\"\n className={buttonClass}\n aria-label={label}\n aria-expanded={resources.open}\n data-resources-rail\n onPointerEnter={warm}\n onClick={() => executeCatalogCommand('resources.toggle', { via: 'button' })}\n >\n <span className={iconClass}>\n <ResourcesIcon />\n <ResourcesDot summary={resources.summary} rail />\n </span>\n {expanded ? <span className={labelClass}>Resources</span> : null}\n </button>\n </Tooltip>\n );\n}\n"],"file":"ResourcesChrome-BzV6bkIa.js"}
@@ -1,2 +0,0 @@
1
- import{a as e,i as t,n,s as r}from"./index-oAAq8XJa.js";import{h as i,l as a,m as o,s}from"./global-Di2PUgj4.js";import{r as c}from"./MutationTokenDialog-SkRxqV_I.js";import{c as l,s as u}from"./command-catalog-BdtDH93o.js";import{i as d,r as f}from"./guarded-action-CvOHcqyH.js";import{C as p}from"./verse-ui-store-zafyzXKD.js";import{r as m}from"./section-visibility-qFqc_d4Z.js";import{T as h,l as g,y as _}from"./icons-B_yuAgdN.js";import{C as v,b as y,j as b,t as x}from"./VerseConsoleApp-WVeyJnW7.js";import{v as S}from"./format-B8DAVcn2.js";import{a as C,i as ee,t as te}from"./CapacityStrip-C667yQe8.js";import{a as ne,i as re,o as ie}from"./useSeatsRefresh-CG4jczeL.js";import{l as w,n as ae,o as oe,r as se,t as T}from"./capacity-strip-model-Bj_9ztzs.js";import{n as E,t as D}from"./Button-DYv_KKxr.js";import{l as O}from"./types-D5XOdyw8.js";import{a as k,i as A}from"./fleet-queries-BSdRlUwJ.js";import{a as j,s as M}from"./usage-queries-Bn8ccqyN.js";import{t as N}from"./local-model-DFyjKX0b.js";import{a as P,i as F,n as I,r as L}from"./ResourcesChrome-BzV6bkIa.js";import{t as R}from"./apps-model-CDFvmsQV.js";var z=r(e(),1),ce=r(t(),1),B={key:`verse-resources-cloud`,fetch:async e=>{try{let t=await a(O,e);return{available:!0,credits:F(t)}}catch(e){if(e instanceof s&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return{available:!1,credits:null}}}},V={cloud:6e4,local:3e4,runtime:15e3},H={backdrop:`_backdrop_ldzh8_8`,fade:`_fade_ldzh8_1`,panel:`_panel_ldzh8_18`,slide:`_slide_ldzh8_1`,head:`_head_ldzh8_49`,headText:`_headText_ldzh8_60`,title:`_title_ldzh8_67`,headline:`_headline_ldzh8_76`,headActions:`_headActions_ldzh8_83`,body:`_body_ldzh8_92`,group:`_group_ldzh8_100`,groupTitle:`_groupTitle_ldzh8_102`,cards:`_cards_ldzh8_113`,card:`_card_ldzh8_113`,cardHead:`_cardHead_ldzh8_138`,cardName:`_cardName_ldzh8_145`,plan:`_plan_ldzh8_157`,status:`_status_ldzh8_165`,statusDot:`_statusDot_ldzh8_180`,statusLabel:`_statusLabel_ldzh8_192`,statusDetail:`_statusDetail_ldzh8_197`,stamp:`_stamp_ldzh8_199`,subtle:`_subtle_ldzh8_200`,fine:`_fine_ldzh8_201`,reserveLine:`_reserveLine_ldzh8_202`,meters:`_meters_ldzh8_214`,meter:`_meter_ldzh8_214`,meterLabel:`_meterLabel_ldzh8_236`,meterTrack:`_meterTrack_ldzh8_243`,meterFill:`_meterFill_ldzh8_257`,meterReserve:`_meterReserve_ldzh8_266`,meterTick:`_meterTick_ldzh8_276`,meterValue:`_meterValue_ldzh8_284`,meterReset:`_meterReset_ldzh8_293`,cardActions:`_cardActions_ldzh8_301`,note:`_note_ldzh8_308`,pill:`_pill_ldzh8_316`,runtime:`_runtime_ldzh8_334`,runtimeHead:`_runtimeHead_ldzh8_343`,runtimeName:`_runtimeName_ldzh8_351`,models:`_models_ldzh8_353`,model:`_model_ldzh8_353`,modelName:`_modelName_ldzh8_373`,modelFacts:`_modelFacts_ldzh8_380`,creditsHead:`_creditsHead_ldzh8_392`,creditsAmount:`_creditsAmount_ldzh8_400`,external:`_external_ldzh8_410`,foot:`_foot_ldzh8_428`,linkButton:`_linkButton_ldzh8_435`,visuallyHidden:`_visuallyHidden_ldzh8_450`},U=n(),W=20;function G({credits:e}){let t=e.remainingPercent,n=t<=0?`limit`:t<W?`tight`:`ok`,r=`${I(e.remainingUsd)} of ${I(e.totalUsd)} left`,i=[`${e.running} running`,e.maxSessionsPerDay===null?`${e.sessionsToday} today`:`${e.sessionsToday} of ${e.maxSessionsPerDay} today`].join(` · `),a=e.seatReady?e.canLaunch?null:e.canLaunchReason:e.seatReason;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:H.creditsHead,children:[(0,U.jsx)(`span`,{className:H.creditsAmount,children:r}),(0,U.jsx)(`span`,{className:H.pill,"data-tone":`neutral`,title:e.estimateNote,children:`estimate`})]}),(0,U.jsxs)(`div`,{className:H.meter,"data-level":n,"data-single":!0,children:[(0,U.jsx)(`span`,{className:H.meterTrack,role:`img`,"aria-label":`Cloud credits: an estimated ${I(e.remainingUsd)} of ${I(e.totalUsd)} left, ${x(t)}`,children:(0,U.jsx)(`span`,{className:H.meterFill,"data-kind":`left`,style:{width:`${Math.round(t)}%`}})}),(0,U.jsxs)(`span`,{className:H.meterValue,"aria-hidden":`true`,children:[x(t),` left`]})]}),(0,U.jsx)(`p`,{className:H.subtle,children:i}),a===null?null:(0,U.jsxs)(`p`,{className:H.status,"data-tone":`warning`,children:[(0,U.jsx)(`span`,{className:H.statusDot,"aria-hidden":`true`}),(0,U.jsx)(`span`,{children:a})]}),(0,U.jsx)(`p`,{className:H.fine,children:e.estimateNote}),(0,U.jsxs)(`a`,{className:H.external,href:e.balanceUrl,target:`_blank`,rel:`noopener noreferrer`,children:[`Real balance on claude.ai`,(0,U.jsx)(g,{}),(0,U.jsx)(`span`,{className:H.visuallyHidden,children:` (opens in a new tab)`})]})]})}function le(){let e=o(B),t=i(B);m(t,V.cloud);let n=e.data===void 0&&e.status!==`error`,r=e.data?.available??!1,a=e.data?.credits??null;return(0,U.jsxs)(`li`,{className:H.card,"data-resource":`cloud`,"data-cloud":n?`loading`:r?a?`ready`:`unrecognised`:`unavailable`,children:[(0,U.jsxs)(`div`,{className:H.cardHead,children:[(0,U.jsx)(C,{monogram:`C`,engine:`claude`,size:`sm`}),(0,U.jsxs)(`h4`,{className:H.cardName,children:[(0,U.jsx)(`span`,{children:`Claude cloud credits`}),(0,U.jsx)(`span`,{className:H.plan,children:`claude.ai`})]})]}),n?(0,U.jsx)(`p`,{className:H.subtle,"aria-busy":`true`,children:`Reading cloud credits…`}):r?a===null?(0,U.jsx)(`p`,{className:H.subtle,children:`The cloud lane answered in a shape this drawer does not recognise, so nothing is shown rather than guessed.`}):(0,U.jsx)(G,{credits:a}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:H.status,"data-tone":`neutral`,children:[(0,U.jsx)(`span`,{className:H.statusDot,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:H.statusLabel,children:`Cloud lane not available yet`})]}),(0,U.jsx)(`p`,{className:H.fine,children:`Credits show here once this build has the cloud lane.`})]})]})}var K=90,q={"all-in":`all-in mode`,balanced:`balanced mode`,reserve:`reserve mode`};function J(e){return Math.max(0,Math.min(100,Math.round(e)))}function Y({status:e}){let t=[e.detail,e.usableAgain].filter(e=>e!==null&&e.length>0),n=[e.label,...t].join(` · `);return(0,U.jsxs)(`p`,{className:H.status,"data-tone":e.tone,"data-status":e.kind,title:n,children:[(0,U.jsx)(`span`,{className:H.statusDot,"aria-hidden":`true`}),(0,U.jsxs)(`span`,{children:[(0,U.jsx)(`span`,{className:H.statusLabel,children:e.label}),t.map(e=>(0,U.jsx)(`span`,{className:H.statusDetail,children:` · ${e}`},e))]})]})}function X({row:e,w:t,reservePercent:n}){let r=w(e,t,t.binding?n:null),i=t.binding&&n!==null&&n>0?100-J(n):null,a=t.label.replace(/ window$/,``),o,s,c=0;return t.limitReached?(o=`limit`,s=`limit reached`,c=100):t.usedPercent===null?(o=`unknown`,s=`no reading`):(c=J(t.usedPercent),o=c>=K?`tight`:`ok`,s=x(t.usedPercent)),(0,U.jsxs)(`div`,{className:H.meter,"data-binding":t.binding||void 0,"data-level":o,children:[(0,U.jsx)(`span`,{className:H.meterLabel,title:t.label,children:a.charAt(0).toUpperCase()+a.slice(1)}),(0,U.jsxs)(`span`,{className:H.meterTrack,role:`img`,"aria-label":r,"data-unknown":o===`unknown`||void 0,children:[i===null?null:(0,U.jsx)(`span`,{className:H.meterReserve,style:{left:`${i}%`,width:`${100-i}%`}}),o===`unknown`?null:(0,U.jsx)(`span`,{className:H.meterFill,style:{width:`${c}%`}}),i===null?null:(0,U.jsx)(`span`,{className:H.meterTick,style:{left:`${i}%`}})]}),(0,U.jsx)(`span`,{className:H.meterValue,"aria-hidden":`true`,children:s}),t.resetText===null?null:(0,U.jsx)(`span`,{className:H.meterReset,title:t.resetText,"aria-hidden":`true`,children:t.resetText})]})}function ue({row:e,status:t,settled:n,mode:r,busy:i,onAction:a}){let o=R(e,n).filter(e=>e.kind!==`edit-budget`),s=e.reserve,c=s===null?null:s.percent!==null&&r!==null?`${s.label} · ${q[r]}`:s.label;return(0,U.jsxs)(`li`,{className:H.card,"data-status":t.kind,"data-seat":e.seatId,"data-verse-anchor":`resources:${e.seatId}`,children:[(0,U.jsxs)(`div`,{className:H.cardHead,children:[(0,U.jsx)(C,{monogram:e.monogram,engine:e.engine,size:`sm`}),(0,U.jsxs)(`h4`,{className:H.cardName,children:[(0,U.jsx)(`span`,{title:e.label,children:e.label}),e.plan===null?null:(0,U.jsx)(`span`,{className:H.plan,children:e.plan})]})]}),(0,U.jsx)(Y,{status:t}),t.checked===null?null:(0,U.jsx)(`p`,{className:H.stamp,title:t.checkedTitle??void 0,children:t.checked}),e.windows.length>0?(0,U.jsx)(`div`,{className:H.meters,children:e.windows.map(t=>(0,U.jsx)(X,{row:e,w:t,reservePercent:s?.percent??null},t.id))}):null,c!==null||e.credits!==null?(0,U.jsxs)(`p`,{className:H.reserveLine,children:[c===null?null:(0,U.jsx)(`span`,{title:s?.why,children:c}),c!==null&&e.credits!==null?` · `:null,e.credits===null?null:(0,U.jsx)(`span`,{children:e.credits})]}):null,o.length>0?(0,U.jsx)(`div`,{className:H.cardActions,children:o.map(t=>(0,U.jsx)(D,{size:`sm`,variant:t.primary?`primary`:`ghost`,busy:i?.seatId===e.seatId&&i.kind===t.kind,"aria-label":`${t.kind===`fix`?`Fix in Apps`:t.label}: ${e.label}`,onClick:()=>a(e,t),children:t.kind===`fix`?`Fix in Apps`:t.label},t.kind))}):null]})}var Z=`Every local agent turn in flight is answered by this process. Stopping it ends those turns — nothing in flight is rolled back, and no local seat can take a new turn until it is running again.`;function de({status:e,onOpenUsage:t,now:n}){let r=o(j),a=o(k),s=i(j),c=i(k);m(s,V.local),m(c,V.runtime);let[l,u]=(0,z.useState)(null),[f,p]=(0,z.useState)(null),h=r.data?.available?N(M(r.data.raw),n):null,g=P(a.data?.value??null),_=r.data===void 0&&r.status!==`error`,v=h?.rows??[],y=v.slice(0,6),b=v.length-y.length,x=e=>{let t=e===`start`?`Start`:`Stop`;u(null),d({title:`Stop the serving runtime?`,body:Z,confirmLabel:`Stop runtime`,destructive:!0,skipConfirm:e===`start`,token:!0,tokenReason:`${t===`Start`?`Starting`:`Stopping`} the serving runtime requires the dispatch token.`,run:async()=>{p(e);try{let t=await A(e);u({tone:`neutral`,text:(t.note?S(t.note):``)||(e===`start`?`Runtime starting.`:`Runtime stopped.`)})}finally{p(null)}},onError:e=>u({tone:`danger`,text:e})})};return(0,U.jsxs)(`li`,{className:H.card,"data-resource":`local`,"data-status":e?.kind,children:[(0,U.jsxs)(`div`,{className:H.cardHead,children:[(0,U.jsx)(C,{monogram:`L`,engine:`local`,size:`sm`}),(0,U.jsxs)(`h4`,{className:H.cardName,children:[(0,U.jsx)(`span`,{children:`Local models`}),(0,U.jsx)(`span`,{className:H.plan,children:`this machine`})]})]}),e===null?h!==null&&!h.reachable?(0,U.jsxs)(`p`,{className:H.status,"data-tone":`neutral`,children:[(0,U.jsx)(`span`,{className:H.statusDot,"aria-hidden":`true`}),(0,U.jsx)(`span`,{className:H.statusLabel,children:`No local runtime answering`})]}):null:(0,U.jsx)(Y,{status:e}),g===null?null:(0,U.jsxs)(`div`,{className:H.runtime,"data-runtime-state":g.state,children:[(0,U.jsxs)(`p`,{className:H.runtimeHead,children:[(0,U.jsx)(`span`,{className:H.runtimeName,children:g.name}),(0,U.jsx)(`span`,{className:H.pill,"data-tone":g.tone,children:g.word})]}),g.detail===null?null:(0,U.jsx)(`p`,{className:H.subtle,title:g.detail,children:g.detail}),g.canStart||g.canStop?(0,U.jsxs)(`div`,{className:H.cardActions,children:[g.canStart?(0,U.jsx)(D,{size:`sm`,variant:`primary`,busy:f===`start`,"aria-label":`Start ${g.name}`,onClick:()=>x(`start`),children:`Start`}):null,g.canStop?(0,U.jsx)(D,{size:`sm`,variant:`subtle`,busy:f===`stop`,"aria-label":`Stop ${g.name}`,onClick:()=>x(`stop`),children:`Stop`}):null]}):g.managedElsewhere?(0,U.jsx)(`p`,{className:H.subtle,children:`Started and stopped outside Verse.`}):null]}),_?(0,U.jsx)(`p`,{className:H.subtle,"aria-busy":`true`,children:`Reading local models…`}):r.data?.available?h===null||v.length===0?(0,U.jsx)(`p`,{className:H.subtle,children:h?.reachable?`No models installed.`:`Start Ollama or llama-server to use local models.`}):(0,U.jsx)(`ul`,{className:H.models,"aria-label":`Local models`,children:y.map(e=>{let t=L(e);return(0,U.jsxs)(`li`,{className:H.model,"data-resident":e.resident||void 0,children:[(0,U.jsx)(`span`,{className:H.modelName,title:e.name,children:e.name}),(0,U.jsxs)(`span`,{className:H.modelFacts,children:[e.resident?(0,U.jsx)(`span`,{className:H.pill,"data-tone":`success`,children:`Loaded`}):null,t===null?null:(0,U.jsx)(`span`,{title:e.contextTruncated?`Configured below the model’s native window`:void 0,children:t})]})]},`${e.runtime??`local`}:${e.name}`)})}):(0,U.jsx)(`p`,{className:H.subtle,children:`Local model details are not available from this server yet.`}),b>0?(0,U.jsx)(`button`,{type:`button`,className:H.linkButton,onClick:t,children:`${b} more in Usage`}):null,(0,U.jsx)(`p`,{className:l?H.note:H.visuallyHidden,"data-tone":l?.tone,role:`status`,"aria-live":`polite`,children:l?.text??``})]})}var Q=`No accounts connected yet. Sign in to Claude Code, Codex or Grok in a terminal — they show up here within a minute.`;function fe({pinned:e}){return(0,U.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:e?`currentColor`:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`,strokeLinecap:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,U.jsx)(`path`,{d:`M6 2.5h4l-.5 4 2.25 2.25H4.25L6.5 6.5z`}),(0,U.jsx)(`path`,{d:`M8 8.75v4.75`,fill:`none`})]})}function $({mode:e,compact:t=!1,now:n}){let r=(0,z.useId)(),a=(0,z.useRef)(null),o=e===`overlay`,s=ee(),[g,x]=(0,z.useState)(()=>Date.now());m(()=>x(Date.now()),te,{enabled:n===void 0});let S=n??g,C=s.health!==null,[w,D]=(0,z.useState)(null),[O,A]=(0,z.useState)(null),M=i(ie),N=i(j),P=i(k),F=i(B),I=(0,z.useMemo)(()=>ae(s.seats,{health:s.health,budget:s.budget,now:S}),[s.seats,s.health,s.budget,S]),L=(0,z.useMemo)(()=>oe(I.filter(e=>e.kind===`subscription`),{healthRead:C,now:S}),[I,C,S]),R=I.find(e=>e.kind===`local`)??null,V=s.budget?.mode??null,W=(0,z.useCallback)(()=>{y()},[]),G=(0,z.useCallback)(()=>{f()||document.querySelector(`[aria-modal="true"]:not([data-verse-overlay])`)||y()},[]);c({open:o,containerRef:a,onClose:G}),(0,z.useEffect)(()=>{if(o)return()=>{window.setTimeout(()=>{let e=document.activeElement;(e===null||e===document.body)&&document.querySelector(`[data-resources-handle]`)?.focus({preventScroll:!0})},0)}},[o]);let K=(e,t=null)=>{o&&y(),p(e,t)},q=(e,t)=>{if(A(null),t.kind===`fix`||t.kind===`edit-budget`){K(`apps`,`seat:${e.seatId}`);return}let n=t.kind===`reconnect`;d({title:n?`Reconnect ${e.label}?`:`Check ${e.label} again?`,body:``,confirmLabel:t.label,destructive:!1,skipConfirm:!0,token:!0,tokenReason:n?`Open the sign-in for ${e.label} in Terminal`:`Check ${e.label} again (status commands only — nothing is spent)`,run:async()=>{D({seatId:e.seatId,kind:t.kind});try{n?await re(e.seatId):await ne()}finally{D(null)}},onDone:()=>A({tone:`neutral`,text:n?`Opened the sign-in for ${e.label} in Terminal. Finish it there; this drawer picks it up.`:`Checked ${e.label} again.`}),onError:e=>A({tone:`danger`,text:e})})},J=()=>{A(null),M(),N(),P(),F(),x(Date.now())},Y=u(`resources.toggle`)?.keys[0],X=Y?l(Y):void 0,Z=!t,$=e===`docked`,pe=(0,U.jsxs)(`div`,{ref:a,className:H.panel,"data-mode":e,"data-presentation":t?`full`:`side`,"data-verse-overlay":`resources`,...o?{role:`dialog`,"aria-modal":!0,"aria-labelledby":r,tabIndex:-1}:{role:`complementary`,"aria-labelledby":r},children:[(0,U.jsxs)(`header`,{className:H.head,children:[(0,U.jsxs)(`div`,{className:H.headText,children:[(0,U.jsx)(`h2`,{id:r,className:H.title,children:`Resources`}),!s.loading&&I.length>0?(0,U.jsx)(`p`,{className:H.headline,children:se(I)}):null]}),(0,U.jsxs)(`div`,{className:H.headActions,children:[(0,U.jsx)(b,{label:`Read everything again`,placement:`bottom`,children:(0,U.jsx)(E,{variant:`ghost`,size:`sm`,icon:(0,U.jsx)(_,{}),"aria-label":`Read everything again`,onClick:J})}),Z?(0,U.jsx)(b,{label:$?`Unpin — float over the page`:`Pin beside the page`,placement:`bottom`,children:(0,U.jsx)(E,{variant:`ghost`,size:`sm`,icon:(0,U.jsx)(fe,{pinned:$}),"aria-label":$?`Unpin resources`:`Pin resources beside the page`,"aria-pressed":$,"data-resources-pin":!0,onClick:()=>v(!$)})}):null,(0,U.jsx)(b,{label:`Close resources`,shortcut:X,placement:`bottom`,children:(0,U.jsx)(E,{variant:`ghost`,size:`sm`,icon:(0,U.jsx)(h,{}),"aria-label":`Close resources`,onClick:W})})]})]}),(0,U.jsxs)(`div`,{className:H.body,children:[(0,U.jsxs)(`section`,{className:H.group,"aria-labelledby":`${r}-accounts`,children:[(0,U.jsx)(`h3`,{id:`${r}-accounts`,className:H.groupTitle,children:`Accounts`}),s.loading?(0,U.jsx)(`p`,{className:H.subtle,"aria-busy":`true`,children:`Reading accounts…`}):L.length===0?(0,U.jsx)(`p`,{className:H.subtle,children:Q}):(0,U.jsx)(`ul`,{className:H.cards,children:L.map(e=>{let t=T(e,{healthRead:C,now:S}),n=w?.seatId===e.seatId&&w.kind===`check-again`?T(e,{healthRead:C,now:S,checking:!0}):t;return(0,U.jsx)(ue,{row:e,status:n,settled:t,mode:V,busy:w,onAction:q},e.seatId)})}),(0,U.jsx)(`p`,{className:O?H.note:H.visuallyHidden,"data-tone":O?.tone,role:`status`,"aria-live":`polite`,children:O?.text??``})]}),(0,U.jsxs)(`section`,{className:H.group,"aria-labelledby":`${r}-local`,children:[(0,U.jsx)(`h3`,{id:`${r}-local`,className:H.groupTitle,children:`Local`}),(0,U.jsx)(`ul`,{className:H.cards,children:(0,U.jsx)(de,{status:R?T(R,{healthRead:C,now:S}):null,onOpenUsage:()=>K(`usage`),now:S})})]}),(0,U.jsxs)(`section`,{className:H.group,"aria-labelledby":`${r}-cloud`,children:[(0,U.jsx)(`h3`,{id:`${r}-cloud`,className:H.groupTitle,children:`Cloud`}),(0,U.jsx)(`ul`,{className:H.cards,children:(0,U.jsx)(le,{})})]})]}),(0,U.jsxs)(`footer`,{className:H.foot,children:[(0,U.jsx)(`button`,{type:`button`,className:H.linkButton,onClick:()=>K(`apps`),children:`Apps & Accounts`}),(0,U.jsx)(`button`,{type:`button`,className:H.linkButton,onClick:()=>K(`usage`),children:`Usage`})]})]});return o?(0,ce.createPortal)((0,U.jsx)(`div`,{className:H.backdrop,"data-presentation":t?`full`:`side`,onMouseDown:e=>e.target===e.currentTarget&&W(),children:pe}),document.body):pe}export{Q as RESOURCES_EMPTY_TEXT,$ as ResourcesDrawer};
2
- //# sourceMappingURL=ResourcesDrawer-o4ILHdep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResourcesDrawer-o4ILHdep.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/resources/resources-queries.ts","../../../../../../src/web-ui/routes/verse/resources/ResourcesDrawer.module.css","../../../../../../src/web-ui/routes/verse/resources/CloudCredits.tsx","../../../../../../src/web-ui/routes/verse/resources/ResourceCard.tsx","../../../../../../src/web-ui/routes/verse/resources/LocalResources.tsx","../../../../../../src/web-ui/routes/verse/resources/ResourcesDrawer.tsx"],"sourcesContent":["/**\n * routes/verse/resources/resources-queries.ts — the one read the Resources\n * drawer adds (unit 3.11 C6). Seats, health, budget, local models and the\n * serving runtime are read through their owners' QueryDefs (usage/, health/,\n * budget/, autonomy/fleet-queries); only the cloud lane's overview is new.\n *\n * GET /api/verse/cloud lands in parallel with this drawer. Until it does the\n * server answers 404, and that is a designed state (\"Cloud lane not available\n * yet\"), not an error: the fetcher resolves `{ available: false }` instead of\n * throwing. A 401 still propagates — an expired session is the whole app's\n * problem, not this panel's.\n */\nimport { VERSE_CLOUD_PATH } from '../../../../core/cloud/types.js';\nimport { ApiError, apiGet } from '../../../data/client.js';\nimport type { QueryDef } from '../../../data/queries.js';\nimport { projectCloudCredits, type CloudCreditsView } from './resources-model.js';\n\nexport const RESOURCES_CLOUD_KEY = 'verse-resources-cloud';\n\nexport interface CloudCreditsRead {\n /** False when the route is absent (404) or unreachable. */\n available: boolean;\n /** Null when absent, or when the body was not a cloud overview. */\n credits: CloudCreditsView | null;\n}\n\nexport const cloudCreditsQuery: QueryDef<CloudCreditsRead> = {\n key: RESOURCES_CLOUD_KEY,\n fetch: async (signal) => {\n try {\n const raw = await apiGet<unknown>(VERSE_CLOUD_PATH, signal);\n return { available: true, credits: projectCloudCredits(raw) };\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 { available: false, credits: null };\n }\n },\n};\n\n/** While the drawer is open: seats and health ride their own 30 s polls; these are the drawer's own. */\nexport const RESOURCES_POLL_MS = { cloud: 60_000, local: 30_000, runtime: 15_000 } as const;\n","/* Resources — a 360px right-hand panel: over the surface (overlay) or beside\n it (docked). Tokens only, so light and dark follow the theme. Cards are\n hairline-separated blocks on the surface; state is a WORD first, a shape\n second, colour last. */\n\n/* ── Overlay chrome ─────────────────────────────────────────────────── */\n\n.backdrop {\n position: fixed;\n inset: 0;\n z-index: var(--z-overlay);\n display: flex;\n justify-content: flex-end;\n background: color-mix(in srgb, var(--bg-overlay) 55%, transparent);\n animation: fade var(--duration-fast) var(--ease-standard);\n}\n\n.panel {\n display: flex;\n flex-direction: column;\n min-height: 0;\n height: 100%;\n background: var(--bg-surface);\n color: var(--text-primary);\n font-family: var(--font-ui);\n outline: none;\n}\n\n.panel[data-mode='overlay'] {\n width: min(360px, calc(100vw - var(--space-8)));\n border-left: 1px solid var(--border-default);\n box-shadow: var(--shadow-dialog);\n animation: slide var(--duration-base) var(--ease-decelerate);\n}\n\n.panel[data-mode='overlay'][data-presentation='full'] {\n width: 100%;\n border-left: 0;\n}\n\n/* Docked: the shell gives it a grid track; it fills that track. */\n.panel[data-mode='docked'] {\n width: 100%;\n border-left: 1px solid var(--border-subtle);\n}\n\n/* ── Head ───────────────────────────────────────────────────────────── */\n\n.head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--space-3);\n min-height: var(--strip-height);\n /* Clear the desktop title bar (0px in a browser), like the rail. */\n padding: calc(var(--space-3) + var(--app-titlebar-height, 0px)) var(--space-3) var(--space-3) var(--space-4);\n border-bottom: 1px solid var(--border-subtle);\n}\n\n.headText {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.title {\n margin: 0;\n font-family: var(--font-display);\n font-size: var(--text-md-size);\n line-height: var(--text-md-line);\n font-weight: var(--font-weight-semibold);\n letter-spacing: var(--tracking-display);\n}\n\n.headline {\n margin: 0;\n color: var(--text-secondary);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n\n.headActions {\n display: flex;\n align-items: center;\n gap: 2px;\n flex: none;\n}\n\n/* ── Body ───────────────────────────────────────────────────────────── */\n\n.body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: var(--space-2) var(--space-3) var(--space-4);\n}\n\n.group + .group { margin-top: var(--space-4); }\n\n.groupTitle {\n margin: var(--space-2) var(--space-1) var(--space-2);\n color: var(--text-tertiary);\n font-family: var(--font-display);\n font-size: var(--text-2xs-size);\n line-height: var(--text-2xs-line);\n font-weight: var(--font-weight-semibold);\n letter-spacing: var(--tracking-label);\n text-transform: uppercase;\n}\n\n.cards {\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: var(--space-1);\n padding: var(--space-3);\n border: 1px solid var(--border-subtle);\n border-radius: var(--radius-lg);\n /* The panel's own ground: tertiary text is certified AA on --bg-surface in\n both themes (tokens-contrast.test.ts), not on the raised ground. */\n background: var(--bg-surface);\n /* Never break inside a word; long names wrap at spaces and carry a tooltip. */\n overflow-wrap: normal;\n word-break: normal;\n hyphens: none;\n}\n\n.cardHead {\n display: flex;\n align-items: center;\n gap: var(--space-2);\n min-width: 0;\n}\n\n.cardName {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n column-gap: var(--space-2);\n min-width: 0;\n margin: 0;\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n font-weight: var(--font-weight-semibold);\n}\n\n.plan {\n color: var(--text-tertiary);\n font-size: var(--text-xs-size);\n font-weight: var(--font-weight-regular);\n}\n\n/* ── Status ─────────────────────────────────────────────────────────── */\n\n.status {\n --tone: var(--status-neutral-solid);\n display: flex;\n align-items: baseline;\n gap: var(--space-2);\n margin: var(--space-1) 0 0;\n color: var(--text-secondary);\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n}\n.status[data-tone='success'] { --tone: var(--status-success-solid); }\n.status[data-tone='warning'] { --tone: var(--status-warning-solid); }\n.status[data-tone='danger'] { --tone: var(--status-danger-solid); }\n\n/* Shape follows the tone: a disc when fine, a ring when tight, a diamond when blocked. */\n.statusDot {\n flex: none;\n width: 7px;\n height: 7px;\n border-radius: var(--radius-full);\n background: var(--tone);\n transform: translateY(-1px);\n}\n.status[data-tone='warning'] .statusDot { background: transparent; border: 2px solid var(--tone); }\n.status[data-tone='danger'] .statusDot { border-radius: 1px; transform: translateY(-1px) rotate(45deg) scale(0.9); }\n.status[data-tone='neutral'] .statusDot { background: transparent; border: 1.5px dashed var(--text-tertiary); }\n\n.statusLabel {\n color: var(--text-primary);\n font-weight: var(--font-weight-medium);\n}\n\n.statusDetail { white-space: normal; }\n\n.stamp,\n.subtle,\n.fine,\n.reserveLine {\n margin: 0;\n color: var(--text-tertiary);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n.stamp { padding-left: calc(7px + var(--space-2)); }\n.subtle { color: var(--text-secondary); }\n.reserveLine { margin-top: var(--space-1); color: var(--text-secondary); }\n\n/* ── Window meters ──────────────────────────────────────────────────── */\n\n.meters,\n.meter[data-single] {\n display: grid;\n align-items: center;\n column-gap: var(--space-2);\n row-gap: 2px;\n margin-top: var(--space-2);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n/* One grid for all of a card's windows, so the tracks line up under the\n longest label (\"Weekly fable\") instead of wrapping it. */\n.meters { grid-template-columns: max-content minmax(0, 1fr) auto; }\n.meter[data-single] { grid-template-columns: minmax(0, 1fr) auto; }\n\n.meter {\n --fill: var(--data-seq-5);\n display: contents;\n}\n.meter[data-level='tight'] { --fill: var(--status-warning-solid); }\n.meter[data-level='limit'] { --fill: var(--status-danger-solid); }\n\n.meterLabel {\n grid-column: 1;\n color: var(--text-secondary);\n white-space: nowrap;\n}\n.meter[data-binding] .meterLabel { color: var(--text-primary); font-weight: var(--font-weight-medium); }\n\n.meterTrack {\n position: relative;\n display: block;\n height: 6px;\n border-radius: var(--radius-full);\n background: var(--meter-track);\n overflow: hidden;\n}\n/* No reading: absence drawn as absence (a dashed outline), never a 0% bar. */\n.meterTrack[data-unknown] {\n background: transparent;\n border: 1px dashed var(--border-strong);\n}\n\n.meterFill {\n position: absolute;\n inset: 0 auto 0 0;\n border-radius: inherit;\n background: var(--fill);\n transition: width var(--duration-slow) var(--ease-standard);\n}\n\n/* The band kept for the operator, past a tick at 100 − reserve. */\n.meterReserve {\n position: absolute;\n top: 0;\n bottom: 0;\n background: repeating-linear-gradient(\n 135deg,\n color-mix(in srgb, var(--text-tertiary) 30%, transparent) 0 2px,\n transparent 2px 4px\n );\n}\n.meterTick {\n position: absolute;\n top: -1px;\n bottom: -1px;\n width: 1.5px;\n background: var(--text-secondary);\n}\n\n.meterValue {\n color: var(--text-primary);\n font-variant-numeric: tabular-nums;\n text-align: right;\n white-space: nowrap;\n}\n.meter[data-level='limit'] .meterValue { font-weight: var(--font-weight-semibold); }\n.meter[data-level='unknown'] .meterValue { color: var(--text-tertiary); }\n\n.meterReset {\n grid-column: 2 / 4;\n margin-bottom: var(--space-1);\n color: var(--text-tertiary);\n}\n\n/* ── Actions and notes ──────────────────────────────────────────────── */\n\n.cardActions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--space-2);\n margin-top: var(--space-2);\n}\n\n.note {\n margin: var(--space-2) var(--space-1) 0;\n color: var(--text-secondary);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n.note[data-tone='danger'] { color: var(--text-primary); font-weight: var(--font-weight-medium); }\n\n.pill {\n display: inline-flex;\n align-items: center;\n flex: none;\n padding: 0 var(--space-2);\n border-radius: var(--radius-full);\n background: var(--status-neutral-bg);\n color: var(--status-neutral-fg);\n font-size: var(--text-2xs-size);\n line-height: 18px;\n font-weight: var(--font-weight-medium);\n white-space: nowrap;\n}\n.pill[data-tone='success'] { background: var(--status-success-bg); color: var(--status-success-fg); }\n.pill[data-tone='warning'] { background: var(--status-warning-bg); color: var(--status-warning-fg); }\n\n/* ── Local ──────────────────────────────────────────────────────────── */\n\n.runtime {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin-top: var(--space-2);\n padding-top: var(--space-2);\n border-top: 1px solid var(--border-subtle);\n}\n\n.runtimeHead {\n display: flex;\n align-items: center;\n gap: var(--space-2);\n margin: 0;\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n}\n.runtimeName { font-weight: var(--font-weight-medium); }\n\n.models {\n display: flex;\n flex-direction: column;\n margin: var(--space-2) 0 0;\n padding: var(--space-1) 0 0;\n border-top: 1px solid var(--border-subtle);\n list-style: none;\n}\n\n.model {\n display: flex;\n flex-wrap: wrap;\n align-items: baseline;\n justify-content: space-between;\n column-gap: var(--space-3);\n padding: var(--space-1) 0;\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n}\n\n.modelName {\n min-width: 0;\n font-family: var(--font-mono);\n color: var(--text-primary);\n overflow-wrap: anywhere; /* model tags have no spaces; break at any point rather than overflow */\n}\n\n.modelFacts {\n display: inline-flex;\n align-items: center;\n gap: var(--space-2);\n margin-left: auto;\n color: var(--text-secondary);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n/* ── Cloud ──────────────────────────────────────────────────────────── */\n\n.creditsHead {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-2);\n margin: var(--space-1) 0 0;\n}\n\n.creditsAmount {\n font-family: var(--font-display);\n font-size: var(--text-md-size);\n line-height: var(--text-md-line);\n font-weight: var(--font-weight-semibold);\n font-variant-numeric: tabular-nums;\n}\n\n.meterFill[data-kind='left'] { background: var(--fill); }\n\n.external {\n display: inline-flex;\n align-items: center;\n gap: var(--space-1);\n align-self: flex-start;\n margin-top: var(--space-1);\n color: var(--text-link);\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n text-decoration: none;\n border-radius: var(--radius-xs);\n}\n.external:hover { text-decoration: underline; }\n.external:focus-visible { outline: none; box-shadow: var(--shadow-focus-ring); }\n.external svg { width: 12px; height: 12px; }\n\n/* ── Foot ───────────────────────────────────────────────────────────── */\n\n.foot {\n display: flex;\n gap: var(--space-4);\n padding: var(--space-2) var(--space-4);\n border-top: 1px solid var(--border-subtle);\n}\n\n.linkButton {\n align-self: flex-start;\n padding: 2px 0;\n border: 0;\n border-radius: var(--radius-xs);\n background: none;\n color: var(--text-link);\n font: inherit;\n font-size: var(--text-xs-size);\n line-height: var(--text-xs-line);\n cursor: pointer;\n}\n.linkButton:hover { text-decoration: underline; }\n.linkButton:focus-visible { outline: none; box-shadow: var(--shadow-focus-ring); }\n\n.visuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n/* ── Motion ─────────────────────────────────────────────────────────── */\n\n@keyframes fade { from { opacity: 0; } }\n@keyframes slide { from { transform: translateX(100%); } }\n\n@media (prefers-reduced-motion: reduce) {\n :root:not([data-motion='full']) .backdrop,\n :root:not([data-motion='full']) .panel { animation: none; }\n :root:not([data-motion='full']) .meterFill { transition: none; }\n}\n:root[data-motion='reduce'] .backdrop,\n:root[data-motion='reduce'] .panel { animation: none; }\n:root[data-motion='reduce'] .meterFill { transition: none; }\n","/**\n * routes/verse/resources/CloudCredits.tsx — Claude cloud credits in the\n * Resources drawer (unit 3.11 C6): estimated remaining of the total, the\n * sessions running now and launched today, and the link to the real balance\n * on claude.ai. The balance is not readable programmatically (core/cloud\n * types.ts), so every figure is labelled an ESTIMATE, with the server's own\n * note beside it.\n *\n * GET /api/verse/cloud lands with another unit; until it does, this card says\n * \"Cloud lane not available yet\" — a designed state, not an error.\n */\nimport { useQuery, useRefetch } from '../../../data/hooks.js';\nimport { IconExternalLink } from '../../../components/primitives/icons.js';\nimport { MonogramTile } from '../apps/MonogramTile.js';\nimport { usePollWhileVisible } from '../shell/section-visibility.js';\nimport { usedPercentText } from '../percent-text.js';\nimport { formatUsd, type CloudCreditsView } from './resources-model.js';\nimport { cloudCreditsQuery, RESOURCES_POLL_MS } from './resources-queries.js';\nimport styles from './ResourcesDrawer.module.css';\n\n/** Below this share of the total left, the meter turns amber. */\nconst LOW_AT = 20;\n\nfunction Credits({ credits }: { credits: CloudCreditsView }) {\n const left = credits.remainingPercent;\n const level = left <= 0 ? 'limit' : left < LOW_AT ? 'tight' : 'ok';\n const headline = `${formatUsd(credits.remainingUsd)} of ${formatUsd(credits.totalUsd)} left`;\n const sessions = [\n `${credits.running} running`,\n credits.maxSessionsPerDay !== null ? `${credits.sessionsToday} of ${credits.maxSessionsPerDay} today` : `${credits.sessionsToday} today`,\n ].join(' · ');\n const blocker = !credits.seatReady ? credits.seatReason : !credits.canLaunch ? credits.canLaunchReason : null;\n return (\n <>\n <p className={styles.creditsHead}>\n <span className={styles.creditsAmount}>{headline}</span>\n <span className={styles.pill} data-tone=\"neutral\" title={credits.estimateNote}>estimate</span>\n </p>\n <div className={styles.meter} data-level={level} data-single>\n <span\n className={styles.meterTrack}\n role=\"img\"\n aria-label={`Cloud credits: an estimated ${formatUsd(credits.remainingUsd)} of ${formatUsd(credits.totalUsd)} left, ${usedPercentText(left)}`}\n >\n <span className={styles.meterFill} data-kind=\"left\" style={{ width: `${Math.round(left)}%` }} />\n </span>\n <span className={styles.meterValue} aria-hidden=\"true\">{usedPercentText(left)} left</span>\n </div>\n <p className={styles.subtle}>{sessions}</p>\n {blocker !== null ? (\n <p className={styles.status} data-tone=\"warning\"><span className={styles.statusDot} aria-hidden=\"true\" /><span>{blocker}</span></p>\n ) : null}\n <p className={styles.fine}>{credits.estimateNote}</p>\n <a className={styles.external} href={credits.balanceUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n Real balance on claude.ai\n <IconExternalLink />\n <span className={styles.visuallyHidden}> (opens in a new tab)</span>\n </a>\n </>\n );\n}\n\nexport function CloudCredits() {\n const read = useQuery(cloudCreditsQuery);\n const refetch = useRefetch(cloudCreditsQuery);\n usePollWhileVisible(refetch, RESOURCES_POLL_MS.cloud);\n const loading = read.data === undefined && read.status !== 'error';\n const available = read.data?.available ?? false;\n const credits = read.data?.credits ?? null;\n return (\n <li className={styles.card} data-resource=\"cloud\" data-cloud={loading ? 'loading' : !available ? 'unavailable' : credits ? 'ready' : 'unrecognised'}>\n <div className={styles.cardHead}>\n <MonogramTile monogram=\"C\" engine=\"claude\" size=\"sm\" />\n <h4 className={styles.cardName}>\n <span>Claude cloud credits</span>\n <span className={styles.plan}>claude.ai</span>\n </h4>\n </div>\n {loading ? (\n <p className={styles.subtle} aria-busy=\"true\">Reading cloud credits…</p>\n ) : !available ? (\n <>\n <p className={styles.status} data-tone=\"neutral\">\n <span className={styles.statusDot} aria-hidden=\"true\" />\n <span className={styles.statusLabel}>Cloud lane not available yet</span>\n </p>\n <p className={styles.fine}>Credits show here once this build has the cloud lane.</p>\n </>\n ) : credits === null ? (\n <p className={styles.subtle}>The cloud lane answered in a shape this drawer does not recognise, so nothing is shown rather than guessed.</p>\n ) : (\n <Credits credits={credits} />\n )}\n </li>\n );\n}\n","/**\n * routes/verse/resources/ResourceCard.tsx — one paid account in the Resources\n * drawer (unit 3.11 C6):\n *\n * [C] Claude Max · max\n * ● Spent · resets Sat 11:46 PM · usable again in 1d 7h\n * checked 2m ago\n * 5-hour ▇▇▇▇▇▇▇▇▇▇▇▇│▨▨ limit reached\n * resets Sat 11:46 PM\n * Weekly ▇▇▇▇░░░░░░░░ 40%\n * Reserved for you 40% · balanced mode\n * [Check again]\n *\n * Every word comes from the shared capacity projection — `accountStatus` for\n * the status line, the row's windows for the meters (resets already worded by\n * `describeResetAt`), `usedPercentText` for every percent, `accountActions`\n * for what the account needs — so this card and Apps & Accounts can never\n * disagree about one seat. Text wraps at word boundaries; anything long also\n * carries its full text as a tooltip.\n */\nimport type { BudgetMode } from '../../../../core/routing/types.js';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { accountActions, type AccountAction } from '../apps/apps-model.js';\nimport { MonogramTile } from '../apps/MonogramTile.js';\nimport { usedPercentText } from '../percent-text.js';\nimport { windowSentence, type AccountStatus, type CapacityRow, type CapacityWindowRow } from '../usage/capacity-strip-model.js';\nimport styles from './ResourcesDrawer.module.css';\n\n/** Above this share of a window the meter turns amber (the capacity strip's own line). */\nconst TIGHT_AT = 90;\n\nconst MODE_WORD: Readonly<Record<BudgetMode, string>> = {\n 'all-in': 'all-in mode',\n balanced: 'balanced mode',\n reserve: 'reserve mode',\n};\n\nfunction clamp(n: number): number {\n return Math.max(0, Math.min(100, Math.round(n)));\n}\n\nexport function StatusLine({ status }: { status: AccountStatus }) {\n const parts = [status.detail, status.usableAgain].filter((p): p is string => p !== null && p.length > 0);\n const full = [status.label, ...parts].join(' · ');\n return (\n <p className={styles.status} data-tone={status.tone} data-status={status.kind} title={full}>\n <span className={styles.statusDot} aria-hidden=\"true\" />\n <span>\n <span className={styles.statusLabel}>{status.label}</span>\n {parts.map((p) => (\n <span key={p} className={styles.statusDetail}>{` · ${p}`}</span>\n ))}\n </span>\n </p>\n );\n}\n\nfunction WindowMeter({ row, w, reservePercent }: { row: CapacityRow; w: CapacityWindowRow; reservePercent: number | null }) {\n const sentence = windowSentence(row, w, w.binding ? reservePercent : null);\n const ceiling = w.binding && reservePercent !== null && reservePercent > 0 ? 100 - clamp(reservePercent) : null;\n const label = w.label.replace(/ window$/, '');\n let level: 'ok' | 'tight' | 'limit' | 'unknown';\n let value: string;\n let used = 0;\n if (w.limitReached) {\n level = 'limit';\n value = 'limit reached';\n used = 100;\n } else if (w.usedPercent === null) {\n level = 'unknown';\n value = 'no reading';\n } else {\n used = clamp(w.usedPercent);\n level = used >= TIGHT_AT ? 'tight' : 'ok';\n value = usedPercentText(w.usedPercent);\n }\n return (\n <div className={styles.meter} data-binding={w.binding || undefined} data-level={level}>\n <span className={styles.meterLabel} title={w.label}>{label.charAt(0).toUpperCase() + label.slice(1)}</span>\n <span className={styles.meterTrack} role=\"img\" aria-label={sentence} data-unknown={level === 'unknown' || undefined}>\n {ceiling !== null ? <span className={styles.meterReserve} style={{ left: `${ceiling}%`, width: `${100 - ceiling}%` }} /> : null}\n {level !== 'unknown' ? <span className={styles.meterFill} style={{ width: `${used}%` }} /> : null}\n {ceiling !== null ? <span className={styles.meterTick} style={{ left: `${ceiling}%` }} /> : null}\n </span>\n <span className={styles.meterValue} aria-hidden=\"true\">{value}</span>\n {w.resetText !== null ? <span className={styles.meterReset} title={w.resetText} aria-hidden=\"true\">{w.resetText}</span> : null}\n </div>\n );\n}\n\nexport interface ResourceCardProps {\n row: CapacityRow;\n /** Worded against the drawer's clock, with any running check applied. */\n status: AccountStatus;\n /** The status with no check applied, so a button does not vanish while its own check runs. */\n settled: AccountStatus;\n mode: BudgetMode | null;\n busy: { seatId: string; kind: AccountAction['kind'] } | null;\n onAction: (row: CapacityRow, action: AccountAction) => void;\n}\n\nexport function ResourceCard({ row, status, settled, mode, busy, onAction }: ResourceCardProps) {\n // Budget editing lives in Apps & Accounts; the drawer offers what the seat needs now.\n const actions = accountActions(row, settled).filter((a) => a.kind !== 'edit-budget');\n const reserve = row.reserve;\n const reserveText = reserve === null ? null : reserve.percent !== null && mode !== null ? `${reserve.label} · ${MODE_WORD[mode]}` : reserve.label;\n return (\n <li className={styles.card} data-status={status.kind} data-seat={row.seatId} data-verse-anchor={`resources:${row.seatId}`}>\n <div className={styles.cardHead}>\n <MonogramTile monogram={row.monogram} engine={row.engine} size=\"sm\" />\n <h4 className={styles.cardName}>\n <span title={row.label}>{row.label}</span>\n {row.plan !== null ? <span className={styles.plan}>{row.plan}</span> : null}\n </h4>\n </div>\n <StatusLine status={status} />\n {status.checked !== null ? (\n <p className={styles.stamp} title={status.checkedTitle ?? undefined}>{status.checked}</p>\n ) : null}\n {row.windows.length > 0 ? (\n <div className={styles.meters}>\n {row.windows.map((w) => (\n <WindowMeter key={w.id} row={row} w={w} reservePercent={reserve?.percent ?? null} />\n ))}\n </div>\n ) : null}\n {reserveText !== null || row.credits !== null ? (\n <p className={styles.reserveLine}>\n {reserveText !== null ? <span title={reserve?.why}>{reserveText}</span> : null}\n {reserveText !== null && row.credits !== null ? ' · ' : null}\n {row.credits !== null ? <span>{row.credits}</span> : null}\n </p>\n ) : null}\n {actions.length > 0 ? (\n <div className={styles.cardActions}>\n {actions.map((action) => (\n <Button\n key={action.kind}\n size=\"sm\"\n variant={action.primary ? 'primary' : 'ghost'}\n busy={busy?.seatId === row.seatId && busy.kind === action.kind}\n aria-label={`${action.kind === 'fix' ? 'Fix in Apps' : action.label}: ${row.label}`}\n onClick={() => onAction(row, action)}\n >\n {action.kind === 'fix' ? 'Fix in Apps' : action.label}\n </Button>\n ))}\n </div>\n ) : null}\n </li>\n );\n}\n","/**\n * routes/verse/resources/LocalResources.tsx — local compute in the Resources\n * drawer (unit 3.11 C6): the local seat's readiness (the shared capacity\n * projection's word), the serving runtime (llama-server / Ollama: state,\n * loaded model, per-agent context, slots) with Start / Stop when THIS server\n * supervises it, and the installed models with the context each one really\n * runs at.\n *\n * Reads are the owners' own QueryDefs — `/api/verse/local-models`\n * (usage-queries, with its burst retry) and `/api/verse/runtime`\n * (autonomy/fleet-queries) — polled only while the drawer is mounted, which\n * is only while it is open. Start / Stop go through the shell's guard (Stop\n * confirms first, both ask for the token), with the same words as the Fleet\n * runtime panel.\n */\nimport { useState } from 'react';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { useQuery, useRefetch } from '../../../data/hooks.js';\nimport { runRuntimeAction, servingRuntimeQuery } from '../autonomy/fleet-queries.js';\nimport { MonogramTile } from '../apps/MonogramTile.js';\nimport { tidyProse } from '../autonomy/format.js';\nimport { requestGuarded } from '../shell/guarded-action.js';\nimport { usePollWhileVisible } from '../shell/section-visibility.js';\nimport type { AccountStatus } from '../usage/capacity-strip-model.js';\nimport { buildLocalModelsView } from '../usage/local-model.js';\nimport { projectLocalModels } from '../usage/usage-contract.js';\nimport { verseLocalModelsQuery } from '../usage/usage-queries.js';\nimport { LOCAL_MODELS_SHOWN, modelContextText, runtimeView } from './resources-model.js';\nimport { RESOURCES_POLL_MS } from './resources-queries.js';\nimport { StatusLine } from './ResourceCard.js';\nimport styles from './ResourcesDrawer.module.css';\n\nconst STOP_BODY =\n 'Every local agent turn in flight is answered by this process. Stopping it ends those turns — nothing in flight is rolled back, and no local seat can take a new turn until it is running again.';\n\nexport function LocalResources({ status, onOpenUsage, now }: { status: AccountStatus | null; onOpenUsage: () => void; now: number }) {\n const models = useQuery(verseLocalModelsQuery);\n const runtimeRead = useQuery(servingRuntimeQuery);\n const refetchModels = useRefetch(verseLocalModelsQuery);\n const refetchRuntime = useRefetch(servingRuntimeQuery);\n usePollWhileVisible(refetchModels, RESOURCES_POLL_MS.local);\n usePollWhileVisible(refetchRuntime, RESOURCES_POLL_MS.runtime);\n const [note, setNote] = useState<{ tone: 'neutral' | 'danger'; text: string } | null>(null);\n const [busy, setBusy] = useState<'start' | 'stop' | null>(null);\n\n const view = models.data?.available ? buildLocalModelsView(projectLocalModels(models.data.raw), now) : null;\n const runtime = runtimeView(runtimeRead.data?.value ?? null);\n const modelsLoading = models.data === undefined && models.status !== 'error';\n const rows = view?.rows ?? [];\n const shown = rows.slice(0, LOCAL_MODELS_SHOWN);\n const more = rows.length - shown.length;\n\n const act = (action: 'start' | 'stop') => {\n const label = action === 'start' ? 'Start' : 'Stop';\n setNote(null);\n requestGuarded({\n title: 'Stop the serving runtime?',\n body: STOP_BODY,\n confirmLabel: 'Stop runtime',\n destructive: true,\n skipConfirm: action === 'start',\n token: true,\n tokenReason: `${label === 'Start' ? 'Starting' : 'Stopping'} the serving runtime requires the dispatch token.`,\n run: async () => {\n setBusy(action);\n try {\n const result = await runRuntimeAction(action);\n setNote({ tone: 'neutral', text: (result.note ? tidyProse(result.note) : '') || (action === 'start' ? 'Runtime starting.' : 'Runtime stopped.') });\n } finally {\n setBusy(null);\n }\n },\n onError: (message) => setNote({ tone: 'danger', text: message }),\n });\n };\n\n return (\n <li className={styles.card} data-resource=\"local\" data-status={status?.kind}>\n <div className={styles.cardHead}>\n <MonogramTile monogram=\"L\" engine=\"local\" size=\"sm\" />\n <h4 className={styles.cardName}>\n <span>Local models</span>\n <span className={styles.plan}>this machine</span>\n </h4>\n </div>\n {status !== null ? (\n <StatusLine status={status} />\n ) : view !== null && !view.reachable ? (\n <p className={styles.status} data-tone=\"neutral\"><span className={styles.statusDot} aria-hidden=\"true\" /><span className={styles.statusLabel}>No local runtime answering</span></p>\n ) : null}\n\n {runtime !== null ? (\n <div className={styles.runtime} data-runtime-state={runtime.state}>\n <p className={styles.runtimeHead}>\n <span className={styles.runtimeName}>{runtime.name}</span>\n <span className={styles.pill} data-tone={runtime.tone}>{runtime.word}</span>\n </p>\n {runtime.detail !== null ? <p className={styles.subtle} title={runtime.detail}>{runtime.detail}</p> : null}\n {runtime.canStart || runtime.canStop ? (\n <div className={styles.cardActions}>\n {runtime.canStart ? (\n <Button size=\"sm\" variant=\"primary\" busy={busy === 'start'} aria-label={`Start ${runtime.name}`} onClick={() => act('start')}>Start</Button>\n ) : null}\n {runtime.canStop ? (\n <Button size=\"sm\" variant=\"subtle\" busy={busy === 'stop'} aria-label={`Stop ${runtime.name}`} onClick={() => act('stop')}>Stop</Button>\n ) : null}\n </div>\n ) : runtime.managedElsewhere ? (\n <p className={styles.subtle}>Started and stopped outside Verse.</p>\n ) : null}\n </div>\n ) : null}\n\n {modelsLoading ? (\n <p className={styles.subtle} aria-busy=\"true\">Reading local models…</p>\n ) : !models.data?.available ? (\n <p className={styles.subtle}>Local model details are not available from this server yet.</p>\n ) : view === null || rows.length === 0 ? (\n <p className={styles.subtle}>\n {view?.reachable ? 'No models installed.' : 'Start Ollama or llama-server to use local models.'}\n </p>\n ) : (\n <ul className={styles.models} aria-label=\"Local models\">\n {shown.map((m) => {\n const context = modelContextText(m);\n return (\n <li key={`${m.runtime ?? 'local'}:${m.name}`} className={styles.model} data-resident={m.resident || undefined}>\n <span className={styles.modelName} title={m.name}>{m.name}</span>\n <span className={styles.modelFacts}>\n {m.resident ? <span className={styles.pill} data-tone=\"success\">Loaded</span> : null}\n {context !== null ? <span title={m.contextTruncated ? 'Configured below the model’s native window' : undefined}>{context}</span> : null}\n </span>\n </li>\n );\n })}\n </ul>\n )}\n {more > 0 ? (\n <button type=\"button\" className={styles.linkButton} onClick={onOpenUsage}>\n {`${more} more in Usage`}\n </button>\n ) : null}\n <p className={note ? styles.note : styles.visuallyHidden} data-tone={note?.tone} role=\"status\" aria-live=\"polite\">{note?.text ?? ''}</p>\n </li>\n );\n}\n","/**\n * routes/verse/resources/ResourcesDrawer.tsx — RESOURCES: every account,\n * local runtime and cloud credit the operator can spend, on every surface\n * (unit 3.11 C6). A lazy chunk: the shell mounts it only while open.\n *\n * overlay ~360px from the right edge over the surface. Esc, a click\n * outside or ⌘. closes it; focus is trapped inside and returned\n * to whatever opened it.\n * docked PINNED: a right-hand column beside the surface (the shell gives\n * it a grid track, so the surface shrinks rather than hides).\n * Not modal — no trap, no backdrop, Esc is the surface's.\n *\n * Accounts one card per paid seat, usable first (orderAccountRows)\n * Local models the local seat, the serving runtime, installed models\n * Cloud credits GET /api/verse/cloud, or \"Cloud lane not available yet\"\n *\n * Data is the app-wide caches (useCapacityData: bootstrap seats, /health,\n * /budget) plus the owners' local and cloud reads — nothing polls unless the\n * drawer is open, because nothing here is mounted unless it is.\n *\n * Writes go through the shell's guard (confirm where the regular UI confirms,\n * then the mutation token): Reconnect opens the provider's own sign-in in\n * Terminal, Check again is the zero-cost health sweep.\n */\nimport { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { IconButton } from '../../../components/primitives/Button.js';\nimport { useFocusTrap } from '../../../components/primitives/focus-trap.js';\nimport { IconRefresh, IconX } from '../../../components/primitives/icons.js';\nimport { Tooltip } from '../../../components/primitives/Tooltip.js';\nimport { useRefetch } from '../../../data/hooks.js';\nimport type { AccountAction } from '../apps/apps-model.js';\nimport { servingRuntimeQuery } from '../autonomy/fleet-queries.js';\nimport { reconnectSeat, refreshSeatHealth, verseHealthQuery } from '../health/health-queries.js';\nimport { findCommand, formatChord } from '../shell/command-catalog.js';\nimport { isGuardOpen, requestGuarded } from '../shell/guarded-action.js';\nimport { usePollWhileVisible } from '../shell/section-visibility.js';\nimport { ACCOUNT_CLOCK_MS, useCapacityData } from '../usage/CapacityStrip.js';\nimport { accountStatus, buildCapacityRows, capacityHeadline, orderAccountRows, type CapacityRow } from '../usage/capacity-strip-model.js';\nimport { verseLocalModelsQuery } from '../usage/usage-queries.js';\nimport { setVerseSection, type VerseSectionId } from '../verse-ui-store.js';\nimport { CloudCredits } from './CloudCredits.js';\nimport { LocalResources } from './LocalResources.js';\nimport { ResourceCard } from './ResourceCard.js';\nimport { cloudCreditsQuery } from './resources-queries.js';\nimport { closeResources, setResourcesPinned } from './resources-store.js';\nimport styles from './ResourcesDrawer.module.css';\n\nexport const RESOURCES_EMPTY_TEXT =\n 'No accounts connected yet. Sign in to Claude Code, Codex or Grok in a terminal — they show up here within a minute.';\n\nfunction PinIcon({ pinned }: { pinned: boolean }) {\n return (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill={pinned ? 'currentColor' : 'none'} stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinejoin=\"round\" strokeLinecap=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M6 2.5h4l-.5 4 2.25 2.25H4.25L6.5 6.5z\" />\n <path d=\"M8 8.75v4.75\" fill=\"none\" />\n </svg>\n );\n}\n\ntype Note = { tone: 'neutral' | 'danger'; text: string } | null;\n\nexport interface ResourcesDrawerProps {\n mode: 'overlay' | 'docked';\n /** Phone-width window: the overlay takes the whole screen and cannot be pinned. */\n compact?: boolean;\n /** Injected clock for tests; otherwise the drawer re-reads the clock every ACCOUNT_CLOCK_MS. */\n now?: number;\n}\n\nexport function ResourcesDrawer({ mode, compact = false, now: fixedNow }: ResourcesDrawerProps) {\n const titleId = useId();\n const panelRef = useRef<HTMLDivElement>(null);\n const overlay = mode === 'overlay';\n const data = useCapacityData();\n const [tick, setTick] = useState(() => Date.now());\n usePollWhileVisible(() => setTick(Date.now()), ACCOUNT_CLOCK_MS, { enabled: fixedNow === undefined });\n const now = fixedNow ?? tick;\n const healthRead = data.health !== null;\n const [busy, setBusy] = useState<{ seatId: string; kind: AccountAction['kind'] } | null>(null);\n const [note, setNote] = useState<Note>(null);\n\n const refetchHealth = useRefetch(verseHealthQuery);\n const refetchLocal = useRefetch(verseLocalModelsQuery);\n const refetchRuntime = useRefetch(servingRuntimeQuery);\n const refetchCloud = useRefetch(cloudCreditsQuery);\n\n const rows = useMemo(\n () => buildCapacityRows(data.seats, { health: data.health, budget: data.budget, now }),\n [data.seats, data.health, data.budget, now],\n );\n const paid = useMemo(() => orderAccountRows(rows.filter((r) => r.kind === 'subscription'), { healthRead, now }), [rows, healthRead, now]);\n const localRow = rows.find((r) => r.kind === 'local') ?? null;\n const mode_ = data.budget?.mode ?? null;\n\n // ── close: Esc (overlay), outside click, the close button, ⌘. ─────────\n const close = useCallback(() => {\n closeResources();\n }, []);\n const trapClose = useCallback(() => {\n // Esc in a dialog opened FROM the drawer (a confirmation, the token\n // prompt) belongs to that dialog: every trap hears Escape, and this one\n // registered first.\n if (isGuardOpen() || document.querySelector('[aria-modal=\"true\"]:not([data-verse-overlay])')) return;\n closeResources();\n }, []);\n useFocusTrap({ open: overlay, containerRef: panelRef, onClose: trapClose });\n // Focus goes back to whatever opened the drawer (the trap does that). When\n // that is gone — the palette that ran \"Show resources\" unmounts — it lands\n // on the edge handle rather than on <body>.\n useEffect(() => {\n if (!overlay) return undefined;\n return () => {\n window.setTimeout(() => {\n const active = document.activeElement;\n if (active === null || active === document.body) document.querySelector<HTMLElement>('[data-resources-handle]')?.focus({ preventScroll: true });\n }, 0);\n };\n }, [overlay]);\n\n const go = (section: VerseSectionId, anchor: string | null = null) => {\n if (overlay) closeResources();\n setVerseSection(section, anchor);\n };\n\n const onAction = (row: CapacityRow, action: AccountAction) => {\n setNote(null);\n if (action.kind === 'fix' || action.kind === 'edit-budget') {\n go('apps', `seat:${row.seatId}`);\n return;\n }\n const reconnect = action.kind === 'reconnect';\n requestGuarded({\n title: reconnect ? `Reconnect ${row.label}?` : `Check ${row.label} again?`,\n body: '',\n confirmLabel: action.label,\n destructive: false,\n skipConfirm: true,\n token: true,\n tokenReason: reconnect\n ? `Open the sign-in for ${row.label} in Terminal`\n : `Check ${row.label} again (status commands only — nothing is spent)`,\n run: async () => {\n setBusy({ seatId: row.seatId, kind: action.kind });\n try {\n if (reconnect) await reconnectSeat(row.seatId);\n else await refreshSeatHealth();\n } finally {\n setBusy(null);\n }\n },\n onDone: () =>\n setNote({\n tone: 'neutral',\n text: reconnect\n ? `Opened the sign-in for ${row.label} in Terminal. Finish it there; this drawer picks it up.`\n : `Checked ${row.label} again.`,\n }),\n onError: (message) => setNote({ tone: 'danger', text: message }),\n });\n };\n\n const refreshAll = () => {\n setNote(null);\n refetchHealth();\n refetchLocal();\n refetchRuntime();\n refetchCloud();\n setTick(Date.now());\n };\n\n const chord = findCommand('resources.toggle')?.keys[0];\n const shortcut = chord ? formatChord(chord) : undefined;\n const canPin = !compact;\n const pinned = mode === 'docked';\n\n const panel = (\n <div\n ref={panelRef}\n className={styles.panel}\n data-mode={mode}\n data-presentation={compact ? 'full' : 'side'}\n data-verse-overlay=\"resources\"\n {...(overlay\n ? { role: 'dialog', 'aria-modal': true, 'aria-labelledby': titleId, tabIndex: -1 }\n : { role: 'complementary', 'aria-labelledby': titleId })}\n >\n <header className={styles.head}>\n <div className={styles.headText}>\n <h2 id={titleId} className={styles.title}>Resources</h2>\n {!data.loading && rows.length > 0 ? <p className={styles.headline}>{capacityHeadline(rows)}</p> : null}\n </div>\n <div className={styles.headActions}>\n <Tooltip label=\"Read everything again\" placement=\"bottom\">\n <IconButton variant=\"ghost\" size=\"sm\" icon={<IconRefresh />} aria-label=\"Read everything again\" onClick={refreshAll} />\n </Tooltip>\n {canPin ? (\n <Tooltip label={pinned ? 'Unpin — float over the page' : 'Pin beside the page'} placement=\"bottom\">\n <IconButton\n variant=\"ghost\"\n size=\"sm\"\n icon={<PinIcon pinned={pinned} />}\n aria-label={pinned ? 'Unpin resources' : 'Pin resources beside the page'}\n aria-pressed={pinned}\n data-resources-pin\n onClick={() => setResourcesPinned(!pinned)}\n />\n </Tooltip>\n ) : null}\n <Tooltip label=\"Close resources\" shortcut={shortcut} placement=\"bottom\">\n <IconButton variant=\"ghost\" size=\"sm\" icon={<IconX />} aria-label=\"Close resources\" onClick={close} />\n </Tooltip>\n </div>\n </header>\n\n <div className={styles.body}>\n <section className={styles.group} aria-labelledby={`${titleId}-accounts`}>\n <h3 id={`${titleId}-accounts`} className={styles.groupTitle}>Accounts</h3>\n {data.loading ? (\n <p className={styles.subtle} aria-busy=\"true\">Reading accounts…</p>\n ) : paid.length === 0 ? (\n <p className={styles.subtle}>{RESOURCES_EMPTY_TEXT}</p>\n ) : (\n <ul className={styles.cards}>\n {paid.map((row) => {\n const settled = accountStatus(row, { healthRead, now });\n const checking = busy?.seatId === row.seatId && busy.kind === 'check-again';\n const status = checking ? accountStatus(row, { healthRead, now, checking: true }) : settled;\n return <ResourceCard key={row.seatId} row={row} status={status} settled={settled} mode={mode_} busy={busy} onAction={onAction} />;\n })}\n </ul>\n )}\n <p className={note ? styles.note : styles.visuallyHidden} data-tone={note?.tone} role=\"status\" aria-live=\"polite\">{note?.text ?? ''}</p>\n </section>\n\n <section className={styles.group} aria-labelledby={`${titleId}-local`}>\n <h3 id={`${titleId}-local`} className={styles.groupTitle}>Local</h3>\n <ul className={styles.cards}>\n <LocalResources status={localRow ? accountStatus(localRow, { healthRead, now }) : null} onOpenUsage={() => go('usage')} now={now} />\n </ul>\n </section>\n\n <section className={styles.group} aria-labelledby={`${titleId}-cloud`}>\n <h3 id={`${titleId}-cloud`} className={styles.groupTitle}>Cloud</h3>\n <ul className={styles.cards}>\n <CloudCredits />\n </ul>\n </section>\n </div>\n\n <footer className={styles.foot}>\n <button type=\"button\" className={styles.linkButton} onClick={() => go('apps')}>Apps &amp; Accounts</button>\n <button type=\"button\" className={styles.linkButton} onClick={() => go('usage')}>Usage</button>\n </footer>\n </div>\n );\n\n if (!overlay) return panel;\n return createPortal(\n <div className={styles.backdrop} data-presentation={compact ? 'full' : 'side'}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,KAAD,CAAI,UAAW,EAAO,MACpB,UAAA,EAAA,EAAA,IAAA,CAAC,GAAD,CAAgB,OAAQ,EAAW,EAAc,EAAU,CAAE,aAAY,KAAI,CAAC,EAAI,KAAM,gBAAmB,EAAG,OAAO,EAAQ,KAAM,CAAA,CACjI,CAAA,CACG,KAET,EAAA,EAAA,KAAA,CAAC,UAAD,CAAS,UAAW,EAAO,MAAO,kBAAiB,GAAG,EAAQ,QAA9D,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,GAAI,GAAG,EAAQ,QAAS,UAAW,EAAO,WAAY,SAAA,OAAS,CAAA,GACnE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAW,EAAO,MACpB,UAAA,EAAA,EAAA,IAAA,CAAC,GAAD,CAAe,CAAA,CACb,CAAA,CACG,GACN,KAEL,EAAA,EAAA,KAAA,CAAC,SAAD,CAAQ,UAAW,EAAO,KAA1B,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,WAAY,YAAe,EAAG,MAAM,EAAG,SAAA,iBAA2B,CAAA,GAC1G,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,WAAY,YAAe,EAAG,OAAO,EAAG,SAAA,OAAa,CAAA,CACvF,GACL,IAIP,OADK,GACL,EAAO,GAAA,aAAA,EACL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,SAAU,oBAAmB,EAAU,OAAS,OAAQ,YAAc,GAAM,EAAE,SAAW,EAAE,eAAiB,EAAM,EACtI,SAAA,EACE,CAAA,EACL,SAAS,IACX,EANqB,EAOvB"}
@@ -1 +0,0 @@
1
- ._body_15hsz_1{font-size:var(--text-sm-size);color:var(--text-secondary);line-height:var(--text-sm-line);margin:var(--space-3) 0}._error_15hsz_8{padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);background:var(--status-danger-bg);color:var(--status-danger-fg);font-size:var(--text-xs-size);margin-bottom:var(--space-3)}._actions_15hsz_17{justify-content:flex-end;gap:var(--space-2);display:flex}._cancel_15hsz_23{padding:var(--space-2) var(--space-4);border-radius:var(--radius-sm);border:1px solid var(--border-default);background:var(--bg-surface);color:var(--text-secondary);font-size:var(--text-sm-size);cursor:pointer}._confirm_15hsz_33{padding:var(--space-2) var(--space-4);border-radius:var(--radius-sm);border:1px solid var(--accent-600);background:var(--accent-600);color:var(--text-on-accent);font-size:var(--text-sm-size);font-weight:var(--font-weight-medium);cursor:pointer}._confirm_15hsz_33:disabled{opacity:.6;cursor:not-allowed}._destructive_15hsz_48{padding:var(--space-2) var(--space-4);border-radius:var(--radius-sm);border:1px solid var(--status-danger-solid);background:var(--status-danger-solid);color:var(--text-on-accent);font-size:var(--text-sm-size);font-weight:var(--font-weight-medium);cursor:pointer}._destructive_15hsz_48:disabled{opacity:.6;cursor:not-allowed}._region_1818x_1{bottom:var(--space-6);right:var(--space-6);gap:var(--space-2);z-index:var(--z-toast);flex-direction:column;max-width:360px;display:flex;position:fixed}._toast_1818x_12{justify-content:space-between;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);box-shadow:var(--shadow-toast);font-size:var(--text-sm-size);animation:_slide-in_1818x_1 var(--duration-base) var(--ease-decelerate);border:1px solid var(--border-default);background:var(--bg-surface-raised);color:var(--text-primary);display:flex}._success_1818x_27{border-color:var(--status-success-solid)}._danger_1818x_30{border-color:var(--status-danger-solid)}._dismiss_1818x_34{color:var(--text-tertiary);border-radius:var(--radius-xs);font-size:var(--text-lg-size);padding:var(--space-1);transition:color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);line-height:1}._dismiss_1818x_34:hover{color:var(--text-primary);background:var(--bg-hover)}._dismiss_1818x_34:active{background:var(--bg-active)}@keyframes _slide-in_1818x_1{0%{opacity:0;transform:translateY(8px)}}@media (prefers-reduced-motion:reduce){:root:not([data-motion=full]) ._toast_1818x_12{animation:none}}:root[data-motion=reduce] ._toast_1818x_12{animation:none}._wrap_1759l_1{align-items:flex-start;gap:var(--space-3);max-width:640px;margin:var(--space-8) auto;padding:var(--space-6);border:1px solid var(--status-danger-solid);border-radius:var(--radius-lg);background:var(--status-danger-bg);flex-direction:column;display:flex}._title_1759l_14{font-size:var(--text-md-size);line-height:var(--text-md-line);font-weight:var(--font-weight-semibold);color:var(--status-danger-fg)}._detail_1759l_21{font-size:var(--text-sm-size);line-height:var(--text-sm-line);color:var(--text-secondary)}._retry_1759l_27{padding:var(--space-2) var(--space-4);border:1px solid var(--status-danger-solid);border-radius:var(--radius-sm);background:var(--bg-surface);color:var(--status-danger-fg);font-size:var(--text-sm-size);font-weight:var(--font-weight-medium);cursor:pointer}._retry_1759l_27:hover{background:var(--bg-hover)}
@@ -1,2 +0,0 @@
1
- import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{n as r}from"./MutationTokenDialog-SkRxqV_I.js";var i=n(e(),1),a={body:`_body_15hsz_1`,error:`_error_15hsz_8`,actions:`_actions_15hsz_17`,cancel:`_cancel_15hsz_23`,confirm:`_confirm_15hsz_33`,destructive:`_destructive_15hsz_48`},o=t();function s({open:e,onClose:t,title:n,body:s,confirmLabel:c,destructive:l,onConfirm:u,busy:d,error:f}){let p=(0,i.useId)(),m=(0,i.useRef)(null);return(0,o.jsxs)(r,{open:e,onClose:t,titleId:p,title:n,initialFocusRef:m,children:[(0,o.jsx)(`div`,{className:a.body,children:s}),f?(0,o.jsx)(`p`,{className:a.error,role:`alert`,children:f}):null,(0,o.jsxs)(`div`,{className:a.actions,children:[(0,o.jsx)(`button`,{type:`button`,className:a.cancel,onClick:t,disabled:d,children:`Cancel`}),(0,o.jsx)(`button`,{ref:m,type:`button`,className:l?a.destructive:a.confirm,onClick:u,disabled:d,children:d?`Working…`:c})]})]})}var c={region:`_region_1818x_1`,toast:`_toast_1818x_12`,"slide-in":`_slide-in_1818x_1`,success:`_success_1818x_27`,danger:`_danger_1818x_30`,dismiss:`_dismiss_1818x_34`},l=(0,i.createContext)(null);function u(){let e=(0,i.useContext)(l);if(!e)throw Error(`useToast() called outside <ToastProvider>`);return e}var d=5e3;function f({children:e}){let[t,n]=(0,i.useState)([]),r=(0,i.useRef)(0),a=(0,i.useCallback)(e=>{n(t=>t.filter(t=>t.id!==e))},[]),s=(0,i.useCallback)((e,t=`neutral`)=>{let i=r.current++;n(n=>[...n,{id:i,message:e,tone:t}]),setTimeout(()=>a(i),d)},[a]),u=(0,i.useMemo)(()=>({show:s}),[s]);return(0,o.jsxs)(l.Provider,{value:u,children:[e,(0,o.jsx)(`div`,{className:c.region,role:`status`,"aria-live":`polite`,children:t.map(e=>(0,o.jsxs)(`div`,{className:`${c.toast} ${c[e.tone]}`,children:[(0,o.jsx)(`span`,{children:e.message}),(0,o.jsx)(`button`,{type:`button`,className:c.dismiss,onClick:()=>a(e.id),"aria-label":`Dismiss`,children:`×`})]},e.id))})]})}var p={wrap:`_wrap_1759l_1`,title:`_title_1759l_14`,detail:`_detail_1759l_21`,retry:`_retry_1759l_27`},m=class extends i.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`[ashlr] view crashed while rendering`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){return this.state.error?(0,o.jsxs)(`div`,{className:p.wrap,role:`alert`,children:[(0,o.jsx)(`p`,{className:p.title,children:`This view hit an error and couldn't render.`}),(0,o.jsxs)(`p`,{className:p.detail,children:[this.state.error.message||`Unknown error.`,` — the rest of ashlr is still working; pick another view from the sidebar, or retry this one.`]}),(0,o.jsx)(`button`,{type:`button`,className:p.retry,onClick:()=>this.setState({error:null}),children:`Retry this view`})]}):this.props.children}};export{s as i,f as n,u as r,m as t};
2
- //# sourceMappingURL=RouteErrorBoundary-C5SxA2Dg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RouteErrorBoundary-C5SxA2Dg.js","names":[],"sources":["../../../../../../src/web-ui/routes/inbox/ConfirmDialog.module.css","../../../../../../src/web-ui/routes/inbox/ConfirmDialog.tsx","../../../../../../src/web-ui/components/primitives/Toast.module.css","../../../../../../src/web-ui/components/primitives/Toast.tsx","../../../../../../src/web-ui/components/primitives/RouteErrorBoundary.module.css","../../../../../../src/web-ui/components/primitives/RouteErrorBoundary.tsx"],"sourcesContent":[".body {\n font-size: var(--text-sm-size);\n color: var(--text-secondary);\n line-height: var(--text-sm-line);\n margin: var(--space-3) 0;\n}\n\n.error {\n padding: var(--space-2) var(--space-3);\n border-radius: var(--radius-sm);\n background: var(--status-danger-bg);\n color: var(--status-danger-fg);\n font-size: var(--text-xs-size);\n margin-bottom: var(--space-3);\n}\n\n.actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--space-2);\n}\n\n.cancel {\n padding: var(--space-2) var(--space-4);\n border-radius: var(--radius-sm);\n border: 1px solid var(--border-default);\n background: var(--bg-surface);\n color: var(--text-secondary);\n font-size: var(--text-sm-size);\n cursor: pointer;\n}\n\n.confirm {\n padding: var(--space-2) var(--space-4);\n border-radius: var(--radius-sm);\n border: 1px solid var(--accent-600);\n background: var(--accent-600);\n color: var(--text-on-accent);\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-medium);\n cursor: pointer;\n}\n.confirm:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.destructive {\n padding: var(--space-2) var(--space-4);\n border-radius: var(--radius-sm);\n border: 1px solid var(--status-danger-solid);\n background: var(--status-danger-solid);\n color: var(--text-on-accent);\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-medium);\n cursor: pointer;\n}\n.destructive:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n","/**\n * routes/inbox/ConfirmDialog.tsx — explicit confirmation for approve/reject\n * (single or batch). Approve is the single most irreversible action in the\n * product (operator-console brief non-negotiable): it must require explicit\n * confirmation and clearly state what will happen, never fire on a single\n * click. Built on the shared Dialog primitive so it gets the same focus\n * trap / Escape / backdrop-close behavior as MutationTokenDialog and the\n * command palette for free.\n */\nimport { useId, useRef, type ReactNode } from 'react';\nimport { Dialog } from '../../components/primitives/Dialog.js';\nimport styles from './ConfirmDialog.module.css';\n\nexport interface ConfirmDialogProps {\n open: boolean;\n onClose: () => void;\n title: string;\n body: ReactNode;\n confirmLabel: string;\n /**\n * Weight the confirm button as the dangerous one. The rule is IRREVERSIBLE,\n * not \"negative-sounding\": whichever branch the operator cannot undo gets\n * the weight. In Verse's approvals that is Approve — a `pr` pushes a branch\n * and opens a real pull request other people see immediately, a `patch`\n * writes to disk now — while Reject only discards a proposal that stays in\n * history. This doc used to say the opposite, which is how the red button\n * came to be the safe one.\n */\n destructive?: boolean;\n onConfirm: () => void;\n busy?: boolean;\n error?: string | null;\n}\n\nexport function ConfirmDialog({ open, onClose, title, body, confirmLabel, destructive, onConfirm, busy, error }: ConfirmDialogProps) {\n const titleId = useId();\n const confirmRef = useRef<HTMLButtonElement>(null);\n\n return (\n <Dialog open={open} onClose={onClose} titleId={titleId} title={title} initialFocusRef={confirmRef}>\n <div className={styles.body}>{body}</div>\n {error ? (\n <p className={styles.error} role=\"alert\">\n {error}\n </p>\n ) : null}\n <div className={styles.actions}>\n <button type=\"button\" className={styles.cancel} onClick={onClose} disabled={busy}>\n Cancel\n </button>\n <button\n ref={confirmRef}\n type=\"button\"\n className={destructive ? styles.destructive : styles.confirm}\n onClick={onConfirm}\n disabled={busy}\n >\n {busy ? 'Working…' : confirmLabel}\n </button>\n </div>\n </Dialog>\n );\n}\n",".region {\n position: fixed;\n bottom: var(--space-6);\n right: var(--space-6);\n display: flex;\n flex-direction: column;\n gap: var(--space-2);\n z-index: var(--z-toast);\n max-width: 360px;\n}\n\n.toast {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--space-3);\n padding: var(--space-3) var(--space-4);\n border-radius: var(--radius-md);\n box-shadow: var(--shadow-toast);\n font-size: var(--text-sm-size);\n animation: slide-in var(--duration-base) var(--ease-decelerate);\n border: 1px solid var(--border-default);\n background: var(--bg-surface-raised);\n color: var(--text-primary);\n}\n\n.success {\n border-color: var(--status-success-solid);\n}\n.danger {\n border-color: var(--status-danger-solid);\n}\n\n.dismiss {\n color: var(--text-tertiary);\n border-radius: var(--radius-xs);\n font-size: var(--text-lg-size);\n line-height: 1;\n padding: var(--space-1);\n}\n.dismiss {\n transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);\n}\n.dismiss:hover {\n color: var(--text-primary);\n background: var(--bg-hover);\n}\n.dismiss:active {\n background: var(--bg-active);\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateY(8px);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n :root:not([data-motion=\"full\"]) .toast {\n animation: none;\n }\n}\n\n:root[data-motion=\"reduce\"] .toast {\n animation: none;\n}\n","/**\n * components/primitives/Toast.tsx — app-wide notifications. A single\n * aria-live region so screen readers announce toasts once, not per-toast\n * duplicate regions.\n */\nimport { createContext, useCallback, useContext, useMemo, useRef, useState, type ReactNode } from 'react';\nimport styles from './Toast.module.css';\n\nexport type ToastTone = 'neutral' | 'success' | 'danger';\n\ninterface ToastItem {\n id: number;\n message: string;\n tone: ToastTone;\n}\n\ninterface ToastContextValue {\n show: (message: string, tone?: ToastTone) => void;\n}\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nexport function useToast(): ToastContextValue {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error('useToast() called outside <ToastProvider>');\n return ctx;\n}\n\nconst AUTO_DISMISS_MS = 5000;\n\nexport function ToastProvider({ children }: { children: ReactNode }) {\n const [toasts, setToasts] = useState<ToastItem[]>([]);\n const nextId = useRef(0);\n\n const dismiss = useCallback((id: number) => {\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const show = useCallback(\n (message: string, tone: ToastTone = 'neutral') => {\n const id = nextId.current++;\n setToasts((prev) => [...prev, { id, message, tone }]);\n setTimeout(() => dismiss(id), AUTO_DISMISS_MS);\n },\n [dismiss],\n );\n\n const value = useMemo(() => ({ show }), [show]);\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n <div className={styles.region} role=\"status\" aria-live=\"polite\">\n {toasts.map((t) => (\n <div key={t.id} className={`${styles.toast} ${styles[t.tone]}`}>\n <span>{t.message}</span>\n <button type=\"button\" className={styles.dismiss} onClick={() => dismiss(t.id)} aria-label=\"Dismiss\">\n ×\n </button>\n </div>\n ))}\n </div>\n </ToastContext.Provider>\n );\n}\n",".wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--space-3);\n max-width: 640px;\n margin: var(--space-8) auto;\n padding: var(--space-6);\n border: 1px solid var(--status-danger-solid);\n border-radius: var(--radius-lg);\n background: var(--status-danger-bg);\n}\n\n.title {\n font-size: var(--text-md-size);\n line-height: var(--text-md-line);\n font-weight: var(--font-weight-semibold);\n color: var(--status-danger-fg);\n}\n\n.detail {\n font-size: var(--text-sm-size);\n line-height: var(--text-sm-line);\n color: var(--text-secondary);\n}\n\n.retry {\n padding: var(--space-2) var(--space-4);\n border: 1px solid var(--status-danger-solid);\n border-radius: var(--radius-sm);\n background: var(--bg-surface);\n color: var(--status-danger-fg);\n font-size: var(--text-sm-size);\n font-weight: var(--font-weight-medium);\n cursor: pointer;\n}\n\n.retry:hover {\n background: var(--bg-hover);\n}\n","/**\n * components/primitives/RouteErrorBoundary.tsx — the last line of defense\n * against a view crashing on real-world data that doesn't match its\n * expected shape (see SwarmsView.tsx's `plan?.tasks` guard for a concrete\n * example: 2 of 80 real swarm records on this machine predate the `plan`\n * field entirely).\n *\n * React error boundaries can only be class components — there is no hook\n * equivalent. Wraps `<Outlet/>` in Shell.tsx, not the whole app: if one\n * routed view throws during render, the sidebar/topbar/command palette\n * survive and the operator can navigate to a working view instead of being\n * stuck on a permanently blank screen (DESIGN.md §11 point 4 — \"never a\n * full-page error, the shell stays usable\" — extended here to cover\n * uncaught render exceptions, not just query-status `'error'`).\n */\nimport { Component, type ErrorInfo, type ReactNode } from 'react';\nimport styles from './RouteErrorBoundary.module.css';\n\ninterface Props {\n children: ReactNode;\n /** Identity that, when changed, resets the boundary — pass the route pathname. */\n resetKey: string;\n}\n\ninterface State {\n error: Error | null;\n}\n\nexport class RouteErrorBoundary extends Component<Props, State> {\n override state: State = { error: null };\n\n static getDerivedStateFromError(error: Error): State {\n return { error };\n }\n\n override componentDidCatch(error: Error, info: ErrorInfo) {\n console.error('[ashlr] view crashed while rendering', error, info.componentStack);\n }\n\n override componentDidUpdate(prevProps: Props) {\n if (this.state.error && prevProps.resetKey !== this.props.resetKey) {\n this.setState({ error: null });\n }\n }\n\n override render() {\n if (this.state.error) {\n return (\n <div className={styles.wrap} role=\"alert\">\n <p className={styles.title}>This view hit an error and couldn&apos;t render.</p>\n <p className={styles.detail}>\n {this.state.error.message || 'Unknown error.'} — the rest of ashlr is still working; pick another view\n from the sidebar, or retry this one.\n </p>\n <button type=\"button\" className={styles.retry} onClick={() => this.setState({ error: null })}>\n Retry this view\n </button>\n </div>\n );\n }\n return this.props.children;\n }\n}\n"],"mappings":"uSCkCA,SAAgB,EAAc,CAAE,OAAM,UAAS,QAAO,OAAM,eAAc,cAAa,YAAW,OAAM,SAA6B,CACnI,IAAM,GAAA,EAAU,EAAA,MAAA,CAAM,EAChB,GAAA,EAAa,EAAA,OAAA,CAA0B,IAAI,EAEjD,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CAAc,OAAe,UAAkB,UAAgB,QAAO,gBAAiB,EAAvF,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAW,EAAO,KAAO,SAAA,CAAU,CAAA,EACvC,GACC,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAW,EAAO,MAAO,KAAK,QAC9B,SAAA,CACA,CAAA,EACD,MACJ,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,QAAvB,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,OAAQ,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QAAvD,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAA,SAAO,EAAE,OAAc,CAAA,GACvB,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,QAAS,YAAe,EAAQ,EAAE,EAAE,EAAG,aAAW,UAAU,SAAA,GAE5F,CAAA,CACL,CALK,EAAA,EAAE,EAKP,CACN,CACE,CAAA,CACgB,GAE3B,wGEpCa,EAAb,cAAwC,EAAA,SAAwB,CAC9D,MAAwB,CAAE,MAAO,IAAK,EAEtC,OAAO,yBAAyB,EAAqB,CACnD,MAAO,CAAE,OAAM,CACjB,CAEA,kBAA2B,EAAc,EAAiB,CACxD,QAAQ,MAAM,uCAAwC,EAAO,EAAK,cAAc,CAClF,CAEA,mBAA4B,EAAkB,CACxC,KAAK,MAAM,OAAS,EAAU,WAAa,KAAK,MAAM,UACxD,KAAK,SAAS,CAAE,MAAO,IAAK,CAAC,CAEjC,CAEA,QAAkB,CAehB,OAdI,KAAK,MAAM,OAEX,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAO,KAAM,KAAK,QAAlC,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAW,EAAO,MAAO,SAAA,6CAAmD,CAAA,GAC/E,EAAA,EAAA,KAAA,CAAC,IAAD,CAAG,UAAW,EAAO,OAArB,SAAA,CACG,KAAK,MAAM,MAAM,SAAW,iBAAiB,+FAE7C,KACH,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,KAAK,SAAS,UAAW,EAAO,MAAO,YAAe,KAAK,SAAS,CAAE,MAAO,IAAK,CAAC,EAAG,SAAA,iBAEtF,CAAA,CACL,IAGF,KAAK,MAAM,QACpB,CACF"}
@@ -1,3 +0,0 @@
1
- import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{b as r,x as i}from"./format-B8DAVcn2.js";import{b as a,l as o,n as s}from"./verse-model-D7NZQFAR.js";import{n as c}from"./seat-subscription-CH6fW4fJ.js";import{b as l,g as u,h as d,m as f,p,r as m,x as h}from"./context-model-MT17V86_.js";import{t as g}from"./Composer.module-C8U73KdQ.js";var _=n(e(),1),v=t();function y(e){return JSON.stringify([e.seatId,e.model])}function b(e){try{let t=JSON.parse(e);if(!Array.isArray(t)||t.length!==2)return null;let[n,r]=t;return typeof n!=`string`||typeof r!=`string`?null:{seatId:n,model:r}}catch{return null}}function x(e,t=null){for(let n of o(e))for(let e of n.seats){if(e.health.state===`unavailable`||i(e,S(t,e.id))!==null)continue;let n=e.models.find(t=>u(e,t)===null);if(n)return{seatId:e.id,model:n.id}}return null}function S(e,t){return e?.find(e=>e.seatId===t)??null}function C(e,t,n=null,a=Date.now()){let o=i(e,S(n,e.id),a);if(o===null)return null;let s=o.reason.replace(`${e.label} is `,``).replace(/ to use this seat\.$/,``).replace(/\.$/,``),c=r(e.id,t,n,a)[0],l=c===void 0?null:t.find(e=>e.id===c)?.label??null;return l===null?s:`${s} · try ${l}`}function w(e){let t=d(e.workingSetTokens,e.model,e.mode,e.seat.engine),n=t===null?``:` · ${m[t]}`,r=e.note===null?``:` (${e.note})`;return`${e.seat.label} — ${e.model.label} · ${p(e.model,e.mode)}${n}${r}`}function T(e,t,n){let r=[];n!==null&&r.push(n.charAt(0).toUpperCase()+n.slice(1)),r.push(f(t));let i=l(e);return i!==null&&r.push(`Runs ${i}.`),r.push(...h(e)),r.join(`
2
- `)}function E({seats:e,value:t,onChange:n,disabled:r=!1,label:i=`Seat and model`,id:l,compact:d=!1,workingSetTokens:f=null,modeFor:p,healthReports:m=null}){let h=(0,_.useId)(),x=l??h,S=o(e),E=t?y(t):``,D=t&&e.some(e=>e.id===t.seatId&&e.models.some(e=>e.id===t.model));return(0,v.jsxs)(`label`,{className:`${g.seatField} ${d?g.seatFieldCompact:``}`,htmlFor:x,children:[(0,v.jsx)(`span`,{className:d?`visually-hidden`:g.fieldLabel,children:i}),(0,v.jsxs)(`select`,{id:x,className:g.seatSelect,value:D?E:``,disabled:r||S.length===0,"aria-label":d?i:void 0,onChange:e=>{let t=b(e.target.value);t&&n(t)},children:[D?null:(0,v.jsx)(`option`,{value:``,disabled:!0,children:S.length===0?`No seats discovered`:`Choose a seat…`}),S.map(t=>(0,v.jsx)(`optgroup`,{label:s[t.engine],children:t.seats.flatMap(t=>{let n=a(t)??C(t,e,m),r=c(t),i=r.cls===`unread`||r.kind===`local`?null:`${r.plan===null?``:`${r.plan} · `}${r.word} · ${r.summary}`;return t.models.map(e=>{let r=n??u(t,e),a=r===null?i:`unavailable: ${r}`,o=p?.(t,e)??`standard`,s=y({seatId:t.id,model:e.id});return(0,v.jsx)(`option`,{value:s,disabled:r!==null,title:T(t,e,a),children:w({seat:t,model:e,mode:o,workingSetTokens:f,note:a})},s)})})},t.engine))]})]})}export{x as n,E as t};
3
- //# sourceMappingURL=SeatSelector-DpvvbjNm.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{m as r}from"./global-Di2PUgj4.js";import{_ as i}from"./VerseConsoleApp-WVeyJnW7.js";import{l as a}from"./format-B8DAVcn2.js";import{d as o}from"./surface-data-J52iIGMD.js";import{n as s,o as c,t as l}from"./mind.module-vnuJcwvD.js";var u=n(e(),1),d=t();function f({sessionId:e}){let t=r(o,{freshMs:6e4}),[n,f]=(0,u.useState)(!1),p=(0,u.useId)(),m=c(t.data?.value??null,e);if(m.length===0)return null;let h=m[0],g=`${s[h.kind]} · ${h.count}×`;function _(e){e.key===`Escape`&&n&&(e.stopPropagation(),f(!1))}return(0,d.jsxs)(`span`,{className:l.chipWrap,onKeyDown:_,children:[(0,d.jsxs)(`button`,{type:`button`,className:l.chip,"data-severity":h.severity,"aria-expanded":n,"aria-controls":p,"aria-label":`Reasoning insight for this chat: ${h.title}${m.length>1?` and ${m.length-1} more`:``}`,onClick:()=>f(e=>!e),children:[(0,d.jsx)(`span`,{className:l.chipDot,"data-severity":h.severity,"aria-hidden":`true`}),g,m.length>1?(0,d.jsxs)(`span`,{className:l.chipMore,children:[`+`,m.length-1]}):null]}),n?(0,d.jsxs)(`div`,{id:p,className:l.chipPanel,role:`region`,"aria-label":`Insights for this chat`,children:[(0,d.jsx)(`ul`,{className:l.chipList,children:m.map(e=>(0,d.jsxs)(`li`,{children:[(0,d.jsx)(`span`,{className:l.insightTitle,children:e.title}),(0,d.jsxs)(`span`,{className:l.insightMeta,children:[s[e.kind],` · `,e.count,`× · last seen `,a(e.lastAt)]})]},e.id))}),(0,d.jsx)(`button`,{type:`button`,className:l.link,onClick:()=>{f(!1),i(`mind`,`insight-${h.id}`)},children:`See it in Mind`})]}):null]})}export{f as SessionInsightChip};
2
- //# sourceMappingURL=SessionInsightChip-CWye87Ju.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,n as t,s as n}from"./index-oAAq8XJa.js";import{T as r,b as i,d as a,f as o,p as s,s as c,v as l,w as u,x as d,y as f}from"./global-Di2PUgj4.js";import{n as p,t as m}from"./MutationTokenDialog-SkRxqV_I.js";import{n as h}from"./StatusBadge-BwnBNFQr.js";import{r as ee}from"./RouteErrorBoundary-C5SxA2Dg.js";import{a as te,c as g,s as _}from"./command-catalog-BdtDH93o.js";import{f as v,g as y,h as ne,l as re,m as ie,r as ae,s as oe,t as se,w as b}from"./icons-B_yuAgdN.js";import{E as ce,M as x,N as le,P as ue,k as de}from"./VerseConsoleApp-WVeyJnW7.js";import{t as S}from"./Segmented-BL40udoO.js";import{v as C}from"./verse-store-DjBWj04q.js";import{n as w}from"./Tag-_-K1h7Hk.js";import{v as fe}from"./context-model-Dwd49-dp.js";import{t as T}from"./Button-DYv_KKxr.js";import{i as pe,n as me,p as he,r as ge,s as _e,t as ve}from"./reasoning-pref-B9-DJUXP.js";import{n as ye,t as E}from"./use-token-gate-B3IJL6bf.js";import{t as D}from"./Meter-D-hncpkO.js";import{t as O}from"./Slider-DUMo9HDD.js";import{t as k}from"./Switch-CcR5Llk5.js";import{t as A}from"./Select-FWLnAw_j.js";import{t as j}from"./Input-B9-VLcHS.js";import"./primitives-BDIcUvob.js";import{n as M}from"./ShortcutsOverlay-BpDimdPq.js";var N={section:`_section_1m00s_5`,strip:`_strip_1m00s_13`,stripTitle:`_stripTitle_1m00s_25`,scroll:`_scroll_1m00s_32`,column:`_column_1m00s_38`,panel:`_panel_1m00s_51`,panelHead:`_panelHead_1m00s_56`,panelTitle:`_panelTitle_1m00s_64`,panelBody:`_panelBody_1m00s_74`,row:`_row_1m00s_81`,rowStacked:`_rowStacked_1m00s_90`,rowText:`_rowText_1m00s_95`,rowLabel:`_rowLabel_1m00s_99`,rowDescription:`_rowDescription_1m00s_107`,rowControl:`_rowControl_1m00s_114`,swatches:`_swatches_1m00s_140`,swatch:`_swatch_1m00s_140`,swatchCheck:`_swatchCheck_1m00s_165`,sliderStack:`_sliderStack_1m00s_173`,contrastWarning:`_contrastWarning_1m00s_180`,preview:`_preview_1m00s_197`,previewRow:`_previewRow_1m00s_207`,previewHeading:`_previewHeading_1m00s_214`,previewBody:`_previewBody_1m00s_222`,previewNumerals:`_previewNumerals_1m00s_228`,origin:`_origin_1m00s_238`,note:`_note_1m00s_242`,noteIcon:`_noteIcon_1m00s_258`,code:`_code_1m00s_249`,panelNote:`_panelNote_1m00s_278`,about:`_about_1m00s_285`,aboutLine:`_aboutLine_1m00s_291`,aboutName:`_aboutName_1m00s_299`,link:`_link_1m00s_308`},P=t();function F({title:e,action:t,children:n}){return(0,P.jsxs)(`section`,{className:N.panel,children:[(0,P.jsxs)(`div`,{className:N.panelHead,children:[(0,P.jsx)(`h3`,{className:N.panelTitle,children:e}),t]}),(0,P.jsx)(`div`,{className:N.panelBody,children:n})]})}function I({label:e,description:t,htmlFor:n,labelId:r,stacked:i=!1,children:a}){let o=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`span`,{className:N.rowLabel,id:r,children:e}),t?(0,P.jsx)(`span`,{className:N.rowDescription,children:t}):null]});return(0,P.jsxs)(`div`,{className:`${N.row} ${i?N.rowStacked:``}`,children:[(0,P.jsx)(`div`,{className:N.rowText,children:n?(0,P.jsx)(`label`,{htmlFor:n,className:N.rowText,children:o}):o}),(0,P.jsx)(`div`,{className:N.rowControl,children:a})]})}function be(e,t,n=Date.now()){if(e){let t=fe(e,n);return t?`Last completed ${t}.`:`Completed.`}return t?`Skipped. Nothing was missed — it is all reachable from the sections themselves.`:`Not seen yet. Replay it to take the two-minute tour.`}function xe(){let{completedAt:e,dismissedAt:t,open:n}=ce();return(0,P.jsx)(F,{title:`Onboarding`,children:(0,P.jsx)(I,{label:`Replay the first-run tour`,description:`Your connected seats, whether a local runtime is available, and what each of the three stop controls really halts. ${be(e,t)}`,children:(0,P.jsx)(T,{variant:`subtle`,size:`sm`,onClick:de,disabled:n,children:n?`Showing`:`Replay`})})})}var Se=`3.11.0`,Ce=`Ashlr Verse`;function we(){return(0,P.jsx)(F,{title:`About`,children:(0,P.jsx)(`div`,{className:`${N.row} ${N.rowStacked}`,children:(0,P.jsxs)(`div`,{className:N.about,children:[(0,P.jsx)(`p`,{className:N.aboutName,children:Ce}),(0,P.jsxs)(`p`,{className:N.aboutLine,children:[(0,P.jsxs)(w,{mono:!0,children:[`v`,Se]}),(0,P.jsx)(`span`,{children:`ashlr-hub — local-first command center for agentic engineers.`})]}),(0,P.jsx)(`p`,{className:N.aboutLine,children:`Every session, token and artifact stays on this machine. The console talks to one local server and no third-party service.`}),(0,P.jsx)(`p`,{className:N.aboutLine,children:(0,P.jsxs)(`a`,{className:N.link,href:`https://github.com/ashlrai/ashlr-hub`,target:`_blank`,rel:`noreferrer noopener`,children:[`Source and changelog`,(0,P.jsx)(re,{size:12})]})})]})})})}var L=n(e(),1),Te=/^#([0-9a-f]{3,8})$/i,Ee=/^(rgba?|hsla?)\(([^)]*)\)$/i;function R(e,t,n){return Math.min(n,Math.max(t,e))}function z(e,t){let n=e.trim();return n.endsWith(`%`)?Number.parseFloat(n)/100*t:Number.parseFloat(n)}function B(e,t,n){let r=(e%360+360)%360,i=(1-Math.abs(2*n-1))*t,a=i*(1-Math.abs(r/60%2-1)),o=n-i/2,s;return s=r<60?[i,a,0]:r<120?[a,i,0]:r<180?[0,i,a]:r<240?[0,a,i]:r<300?[a,0,i]:[i,0,a],{r:Math.round((s[0]+o)*255),g:Math.round((s[1]+o)*255),b:Math.round((s[2]+o)*255)}}function De(e){let t=[],n=0,r=``;for(let i of e){if(i===`(`?n+=1:i===`)`&&--n,i===`,`&&n===0){t.push(r),r=``;continue}r+=i}return t.push(r),t.map(e=>e.trim()).filter(e=>e.length>0)}function V(e){let t=e.trim(),n=/\s(\d*\.?\d+)%$/.exec(t);if(n)return{color:t.slice(0,n.index).trim(),pct:Number.parseFloat(n[1])};let r=/^(\d*\.?\d+)%\s/.exec(t);return r?{color:t.slice(r[0].length).trim(),pct:Number.parseFloat(r[1])}:{color:t,pct:null}}function Oe(e){let t=/^color-mix\((.*)\)$/is.exec(e.trim());if(!t)return null;let n=De(t[1]);if(n.length!==3||n[0].replace(/\s+/g,` `).trim()!==`in srgb`)return null;let r=V(n[1]),i=V(n[2]);if(!r||!i)return null;let a=H(r.color),o=H(i.color);if(!a||!o)return null;let s=r.pct,c=i.pct;s===null&&c===null?(s=50,c=50):s===null?s=100-c:c===null&&(c=100-s);let l=s+c;if(l<=0)return null;let u=s/l,d=c/l,f=a.a*u+o.a*d;if(f<=0)return{r:0,g:0,b:0,a:0};let p=e=>R(Math.round((a[e]*a.a*u+o[e]*o.a*d)/f),0,255);return{r:p(`r`),g:p(`g`),b:p(`b`),a:R(f,0,1)}}function H(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};if(t.startsWith(`color-mix(`))return Oe(t);let n=Te.exec(t);if(n){let e=n[1],t=e=>Number.parseInt(e.length===1?e+e:e,16);return e.length===3||e.length===4?{r:t(e[0]),g:t(e[1]),b:t(e[2]),a:e.length===4?t(e[3])/255:1}:e.length===6||e.length===8?{r:t(e.slice(0,2)),g:t(e.slice(2,4)),b:t(e.slice(4,6)),a:e.length===8?t(e.slice(6,8))/255:1}:null}let r=Ee.exec(t);if(!r)return null;let i=r[1],a=r[2].replace(/\//g,` `).split(/[\s,]+/).filter(Boolean);if(a.length<3)return null;let o=a.length>=4?R(z(a[3],1),0,1):1;if(i.startsWith(`rgb`))return{r:R(Math.round(z(a[0],255)),0,255),g:R(Math.round(z(a[1],255)),0,255),b:R(Math.round(z(a[2],255)),0,255),a:o};let s=Number.parseFloat(a[0]),c=R(z(a[1],1),0,1),l=R(z(a[2],1),0,1);return Number.isFinite(s)?{...B(s,c,l),a:o}:null}function U(e,t){if(e.a>=1)return e;let n=e.a;return{r:Math.round(e.r*n+t.r*(1-n)),g:Math.round(e.g*n+t.g*(1-n)),b:Math.round(e.b*n+t.b*(1-n)),a:1}}function W(e){let t=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function G(e,t,n=`#ffffff`){let r=H(t),i=H(e),a=H(n);if(!r||!i||!a)return null;let o=U(r,a),s=W(U(i,o)),c=W(o),[l,u]=s>=c?[s,c]:[c,s];return(l+.05)/(u+.05)}function K(e,t,n,r=0){let i=B(e,R(t,0,100)/100,R(n+r,0,100)/100),a=e=>e.toString(16).padStart(2,`0`);return`#${a(i.r)}${a(i.g)}${a(i.b)}`}var ke=`#ffffff`,Ae=`#121214`,je=[{value:`system`,label:`System`,icon:(0,P.jsx)(ne,{})},{value:`light`,label:`Light`,icon:(0,P.jsx)(b,{})},{value:`dark`,label:`Dark`,icon:(0,P.jsx)(y,{})}],Me=[{value:`default`,label:`Default`},{value:`large`,label:`Large`},{value:`xlarge`,label:`Extra large`}],Ne=[{value:`comfortable`,label:`Comfortable`},{value:`compact`,label:`Compact`}],Pe=[{value:`grotesk`,label:`Space Grotesk`},{value:`ui`,label:`UI sans`},{value:`mono`,label:`Mono`}],Fe=[{value:`sharp`,label:`Sharp`},{value:`default`,label:`Default`},{value:`soft`,label:`Soft`}];function Ie(e,t){return`linear-gradient(to right, ${[0,60,120,180,240,300,360].map(n=>`${K(n,e,t)} ${n/360*100}%`).join(`, `)})`}function Le(e,t,n){let r=K(e,t,n,-8),i=K(e,t,n,14),a=G(r,ke),o=G(i,Ae),s=[];return a!==null&&a<4.5&&s.push(`light`),o!==null&&o<4.5&&s.push(`dark`),{lightRatio:a,darkRatio:o,failing:s}}function Re({appearance:e,onChange:t,onReset:n}){let r=(0,L.useId)(),a=(0,L.useId)(),o=(0,L.useId)(),s=(0,L.useId)(),c=(0,L.useId)(),u=d(e),p=Le(e.accentH,e.accentS,e.accentL);return(0,P.jsxs)(F,{title:`Appearance`,action:(0,P.jsx)(T,{variant:`ghost`,size:`sm`,onClick:n,disabled:i(e),title:`Restore the shipped theme, accent, display size, density, font, radius and motion`,children:`Reset to defaults`}),children:[(0,P.jsx)(I,{label:`Theme`,description:`System follows your OS appearance setting.`,children:(0,P.jsx)(S,{"aria-label":`Theme`,options:je,value:e.theme,onChange:e=>t({theme:e})})}),(0,P.jsx)(I,{label:`Accent`,labelId:r,description:u?`${u.label} — used for links, focus rings and the one primary action per surface.`:`Custom hue — used for links, focus rings and the one primary action per surface.`,children:(0,P.jsx)(`div`,{className:N.swatches,role:`radiogroup`,"aria-labelledby":r,children:f.map(e=>{let n=u?.id===e.id;return(0,P.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":n,"aria-label":e.label,tabIndex:n||!u&&e.id===f[0].id?0:-1,className:N.swatch,style:{background:K(e.h,e.s,e.l)},onClick:()=>t({accentH:e.h,accentS:e.s,accentL:e.l}),children:n?(0,P.jsx)(`span`,{className:N.swatchCheck,children:(0,P.jsx)(ae,{size:12})}):null},e.id)})})}),(0,P.jsx)(I,{label:`Accent channels`,description:`Hue, saturation and lightness are written straight onto the root element — the whole app follows as you drag.`,stacked:!0,children:(0,P.jsxs)(`div`,{className:N.sliderStack,children:[(0,P.jsx)(O,{id:a,label:`Hue`,min:0,max:359,value:e.accentH,valueLabel:`${e.accentH}°`,valueText:`${e.accentH} degrees`,trackImage:Ie(e.accentS,e.accentL),onChange:e=>t({accentH:Number(e.currentTarget.value)})}),(0,P.jsx)(O,{id:o,label:`Saturation`,min:0,max:100,value:e.accentS,valueLabel:`${e.accentS}%`,valueText:`${e.accentS} percent`,onChange:e=>t({accentS:Number(e.currentTarget.value)})}),(0,P.jsx)(O,{id:s,label:`Lightness`,min:l.min,max:l.max,value:e.accentL,valueLabel:`${e.accentL}%`,valueText:`${e.accentL} percent`,onChange:e=>t({accentL:Number(e.currentTarget.value)})}),p.failing.length>0?(0,P.jsxs)(`p`,{className:N.contrastWarning,role:`status`,children:[(0,P.jsx)(se,{size:14}),(0,P.jsxs)(`span`,{children:[`This accent falls below 4.5:1 as link text in`,` `,p.failing.length===2?`both themes`:`${p.failing[0]} mode`,`. Raise or lower the lightness to keep it readable.`]})]}):null]})}),(0,P.jsx)(I,{label:`Display size`,description:`Scales text AND spacing together across the whole app, for a large display or a long session. Applies as you pick it.`,children:(0,P.jsx)(S,{"aria-label":`Display size`,options:Me,value:e.uiScale,onChange:e=>t({uiScale:e})})}),(0,P.jsx)(I,{label:`Density`,description:`Row height and control padding across every view. Independent of display size — a large, tightly packed interface is a valid choice.`,children:(0,P.jsx)(S,{"aria-label":`Density`,options:Ne,value:e.density,onChange:e=>t({density:e})})}),(0,P.jsx)(I,{label:`Display font`,description:`Titles, seat names, metrics and numerals. Body copy stays in the UI sans.`,children:(0,P.jsx)(S,{"aria-label":`Display font`,options:Pe,value:e.displayFont,onChange:e=>t({displayFont:e})})}),(0,P.jsx)(I,{label:`Corner radius`,description:`Sharp reads like a terminal; soft reads like a consumer app.`,children:(0,P.jsx)(S,{"aria-label":`Corner radius`,options:Fe,value:e.radius,onChange:e=>t({radius:e})})}),(0,P.jsx)(I,{label:`Reduce motion`,htmlFor:c,description:`Collapses every transition to 1ms. Defaults to your system preference; turning it off here overrides that.`,children:(0,P.jsx)(k,{id:c,checked:e.reduceMotion,onChange:e=>t({reduceMotion:e}),"aria-label":`Reduce motion`})}),(0,P.jsx)(I,{label:`Preview`,description:`Live — these are the real primitives, not a picture of them.`,stacked:!0,children:(0,P.jsxs)(`div`,{className:N.preview,children:[(0,P.jsx)(`p`,{className:N.previewHeading,children:`Ashlr Verse`}),(0,P.jsxs)(`p`,{className:N.previewBody,children:[`Body copy stays in the UI sans at the reading measure; numerals like`,` `,(0,P.jsx)(`span`,{className:N.previewNumerals,children:`18,420 / 66,000`}),` use the display face.`]}),(0,P.jsxs)(`div`,{className:N.previewRow,children:[(0,P.jsx)(T,{variant:`primary`,size:`sm`,children:`Primary`}),(0,P.jsx)(T,{variant:`subtle`,size:`sm`,children:`Subtle`}),(0,P.jsx)(T,{variant:`ghost`,size:`sm`,children:`Ghost`}),(0,P.jsx)(T,{variant:`danger`,size:`sm`,children:`Destructive`})]}),(0,P.jsxs)(`div`,{className:N.previewRow,children:[(0,P.jsx)(h,{status:`running`}),(0,P.jsx)(w,{engine:`claude`,children:`Claude Max`}),(0,P.jsx)(w,{engine:`local`,mono:!0,children:`qwen3-coder`})]}),(0,P.jsx)(D,{value:18420,max:66e3,label:`Context`}),(0,P.jsx)(j,{"aria-label":`Preview field`,placeholder:`A field at the current density`,size:`sm`})]})})]})}var ze={collapsed:`Streams three lines while the model thinks, then folds to “Thought 12s · ~1.8k tok”.`,expanded:`Streams, and stays open when the thinking is done.`,hidden:`No reasoning in the transcript. The live status still says it is thinking, so a long think never looks like a hang.`},q=[`plan`,`accept-edits`,`auto`],J={plan:`Plan`,"accept-edits":`Accept edits`,auto:`Auto`},Be={plan:`New chats plan and edit nothing until you switch them.`,"accept-edits":`New chats apply edits without asking — the default.`,auto:`New chats run in the CLI’s own auto mode.`},Y={minimal:`Minimal`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra high`,max:`Max`},X=``,Ve=new Set(q),He=new Set(C);function Z(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Q(e){if(!Z(e)||!Z(e.global))return null;let t=e=>{let t={};return Z(e)?(typeof e.permissionMode==`string`&&Ve.has(e.permissionMode)&&(t.permissionMode=e.permissionMode),typeof e.effort==`string`&&He.has(e.effort)&&(t.effort=e.effort),t):t},n={};if(Z(e.seats))for(let[r,i]of Object.entries(e.seats))n[r]=t(i);return{global:t(e.global),seats:n}}function $(e){return e instanceof c&&(e.status===404||e.status===501)?"This server can’t set new-chat defaults yet — update Ashlr and restart `ashlr verse`.":`Couldn’t read the new-chat defaults. Reopen Settings to try again.`}function Ue(){let[e,t]=(0,L.useState)({state:`loading`}),[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(null),o=ye(),s=(0,L.useId)(),c=(0,L.useId)();(0,L.useEffect)(()=>{let e=new AbortController;return _e(e.signal).then(e=>{let n=Q(e);t(n?{state:`ready`,defaults:n}:{state:`unavailable`,message:$(null)})},n=>{e.signal.aborted||t({state:`unavailable`,message:$(n)})}),()=>e.abort()},[]);let l=(0,L.useCallback)(async(e,n)=>{a(null),r(!0);try{let r=await o.run(n,()=>he(e));if(r){let e=Q(r);e&&t({state:`ready`,defaults:e})}}catch(e){a(E(e))}finally{r(!1)}},[o]);if(e.state===`loading`)return(0,P.jsx)(`p`,{className:N.panelNote,"aria-busy":`true`,children:`Reading new-chat defaults…`});if(e.state===`unavailable`)return(0,P.jsx)(`p`,{className:N.panelNote,children:e.message});let u=e.defaults.global,d=u.permissionMode&&u.permissionMode!==`bypass`?u.permissionMode:`accept-edits`,f=u.effort??null,p=Object.keys(e.defaults.seats).length;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(I,{label:`New chats start in`,description:Be[d],labelId:s,children:(0,P.jsx)(S,{"aria-labelledby":s,size:`sm`,value:d,onChange:e=>{e!==d&&l({permissionMode:e},`Start new chats in ${J[e]}.`)},options:q.map(e=>({value:e,label:J[e],disabled:n}))})}),(0,P.jsx)(I,{label:`Reasoning effort for new chats`,description:p>0?`A seat that can’t use this level starts at its model’s own default. ${p===1?`One seat has its`:`${p} seats have their`} own default, which wins.`:`A seat that can’t use this level starts at its model’s own default.`,htmlFor:c,children:(0,P.jsxs)(A,{id:c,size:`sm`,value:f??X,disabled:n,onChange:e=>{let t=e.target.value,n=t===X?null:t;n!==f&&l({effort:n},n?`Start new chats at ${Y[n]} effort.`:`Start new chats at the model’s default effort.`)},children:[(0,P.jsx)(`option`,{value:X,children:`Model default`}),C.map(e=>(0,P.jsx)(`option`,{value:e,children:Y[e]},e))]})}),i?(0,P.jsx)(`p`,{className:N.panelNote,role:`alert`,children:i}):null,(0,P.jsx)(m,{...o.dialog})]})}function We(){let e=pe(),t=(0,L.useId)();return(0,P.jsxs)(F,{title:`Chat`,children:[(0,P.jsx)(I,{label:`Reasoning`,description:ze[e],labelId:t,children:(0,P.jsx)(S,{"aria-labelledby":t,size:`sm`,value:e,onChange:ge,options:ve.map(e=>({value:e,label:me[e]}))})}),(0,P.jsx)(Ue,{})]})}function Ge(e){if(e===null)return`locked`;let t=Math.max(0,Math.round((e-Date.now())/6e4));return t<=0?`expiring now`:`unlocked for ${t} more minute${t===1?``:`s`}`}function Ke(){let e=o(),t=s(),n=ee(),[i,a]=(0,L.useState)(!1),c=(0,L.useRef)(null),l=typeof window>`u`?``:window.location.origin;async function d(){try{await navigator.clipboard.writeText(l),n.show(`Server address copied.`)}catch{n.show(`Could not reach the clipboard — select the field and copy manually.`,`danger`)}}async function f(){a(!1),await r(),n.show(`Disconnected. Paste the read token to reconnect.`)}return(0,P.jsxs)(F,{title:`Connection`,children:[(0,P.jsxs)(I,{label:`Server`,description:`This window talks to one local hub. Nothing leaves your machine.`,children:[(0,P.jsx)(`div`,{className:N.origin,children:(0,P.jsx)(j,{value:l,readOnly:!0,mono:!0,size:`sm`,"aria-label":`Server address`})}),(0,P.jsx)(T,{variant:`ghost`,size:`sm`,icon:(0,P.jsx)(oe,{}),onClick:()=>void d(),children:`Copy`})]}),(0,P.jsx)(I,{label:`Read session`,description:`A 15-minute signed cookie, renewed silently while this tab stays open.`,children:(0,P.jsx)(h,{status:e===`authenticated`?`connected`:e===`checking`?`checking`:`disconnected`,tone:e===`authenticated`?`success`:e===`checking`?`running`:`danger`})}),(0,P.jsxs)(I,{label:`Mutation hold`,description:`Every action that changes something needs the mutation token. It is held in memory only, never stored, and clears when this tab closes.`,children:[(0,P.jsx)(h,{status:t.hasHold?Ge(t.heldUntil):`locked`,tone:t.hasHold?`success`:`neutral`}),(0,P.jsx)(T,{variant:`subtle`,size:`sm`,icon:(0,P.jsx)(ie,{}),onClick:()=>{u(),n.show(`Mutation hold cleared.`)},disabled:!t.hasHold,children:`Lock now`})]}),(0,P.jsx)(I,{label:`Disconnect`,description:`Ends the read session in this browser and clears the mutation hold. Chats on the server are untouched.`,children:(0,P.jsx)(T,{variant:`danger`,size:`sm`,onClick:()=>a(!0),children:`Disconnect`})}),(0,P.jsx)(`div`,{className:N.row,children:(0,P.jsxs)(`p`,{className:N.note,children:[(0,P.jsx)(`span`,{className:N.noteIcon,children:(0,P.jsx)(v,{size:14})}),(0,P.jsxs)(`span`,{children:[(0,P.jsx)(`strong`,{children:`Where the tokens come from.`}),` Start the console with`,` `,(0,P.jsx)(`code`,{className:N.code,children:`ashlr verse`}),` — it prints a read token and a mutation token in that terminal, and opens this page. The desktop app injects both for you. Tokens are never displayed here, and the hub never writes them into a page, a log line or an API response. Lost them? Stop the server and start it again; it mints a fresh pair.`]})]})}),(0,P.jsx)(p,{open:i,onClose:()=>a(!1),titleId:`verse-settings-disconnect`,title:`Disconnect from this server?`,description:`You will need the read token again to get back in. Running sessions keep running on the server.`,initialFocusRef:c,children:(0,P.jsxs)(`div`,{className:N.previewRow,style:{justifyContent:`flex-end`},children:[(0,P.jsx)(T,{ref:c,variant:`subtle`,onClick:()=>a(!1),children:`Cancel`}),(0,P.jsx)(T,{variant:`danger`,onClick:()=>void f(),children:`Disconnect`})]})})]})}var qe=4e3;function Je(e){let{enabled:t,registered:n,accelerator:r,error:i}=e.hotkey;return t?n?`Press ${r} in any app to bring Verse forward with the composer focused.`:`${r} is not active: ${i??`another app already uses it`}. Free the shortcut in that app, or turn this off.`:`Off. Turning it on takes ${r} away from every other app on this Mac.`}function Ye(e){let t=e.notifications.enabled?`Finished and failed chats, and new items that need you — only while Verse is in the background.`:`Off. The tray and the Dock badge still show what needs you.`;return e.notifications.delivery===`script`?`${t} On this unsigned build banners appear as Script Editor, and clicking one opens Script Editor rather than Verse.`:t}function Xe(){let e=ue(),[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null),a=(0,L.useRef)(null);if((0,L.useEffect)(()=>{n(null),i(null),a.current!==null&&window.clearTimeout(a.current),a.current=null},[e]),(0,L.useEffect)(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]),e===null)return(0,P.jsx)(F,{title:`Desktop`,children:(0,P.jsx)(`p`,{className:N.panelNote,"aria-busy":x()||void 0,children:x()?`Reading the desktop app’s settings…`:`The system-wide shortcut and notifications are available in the Verse desktop app.`})});function o(e,t){if(i(null),!le(e,t)){i(`The desktop app did not take the change. Nothing was changed.`);return}n(e),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>{a.current=null,n(null),i(`The desktop app did not answer. The switches show what it last reported.`)},qe)}let s=e.hotkey.enabled&&!e.hotkey.registered;return(0,P.jsxs)(F,{title:`Desktop`,children:[(0,P.jsx)(I,{label:`System-wide shortcut (${e.hotkey.accelerator})`,description:(0,P.jsx)(`span`,{"data-tone":s?`warning`:void 0,role:s?`status`:void 0,children:Je(e)}),children:(0,P.jsx)(k,{"aria-label":`System-wide shortcut`,checked:e.hotkey.enabled,disabled:t!==null,onChange:e=>o(`globalHotkey`,e)})}),(0,P.jsx)(I,{label:`Notifications`,description:Ye(e),children:(0,P.jsx)(k,{"aria-label":`Notifications`,checked:e.notifications.enabled,disabled:t!==null,onChange:e=>o(`notifications`,e)})}),t?(0,P.jsx)(`p`,{className:N.panelNote,role:`status`,children:`Waiting for the desktop app…`}):null,r?(0,P.jsx)(`p`,{className:N.panelNote,role:`alert`,children:r}):null]})}function Ze(){let e=(0,L.useMemo)(()=>te(),[]),t=_(`shortcuts.open`)?.keys[0];return(0,P.jsxs)(F,{title:`Keyboard`,children:[(0,P.jsx)(`p`,{className:N.panelNote,children:t?`${g(t,e)} shows this list from anywhere.`:null}),(0,P.jsx)(M,{platform:e})]})}function Qe(){let{appearance:e,set:t,reset:n}=a();return(0,P.jsxs)(`div`,{className:N.section,children:[(0,P.jsx)(`header`,{className:N.strip,"data-app-region":`drag`,children:(0,P.jsx)(`h2`,{className:N.stripTitle,children:`Settings`})}),(0,P.jsx)(`div`,{className:N.scroll,children:(0,P.jsxs)(`div`,{className:N.column,children:[(0,P.jsx)(Re,{appearance:e,onChange:t,onReset:n}),(0,P.jsx)(We,{}),(0,P.jsx)(Xe,{}),(0,P.jsx)(Ke,{}),(0,P.jsx)(Ze,{}),(0,P.jsx)(xe,{}),(0,P.jsx)(we,{})]})})]})}export{Qe as SettingsSection};
2
- //# sourceMappingURL=SettingsSection-Dr18upeE.js.map