@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{a as r,g as i,h as a,i as o,m as s,s as c}from"./global-Di2PUgj4.js";import{t as l}from"./Epistemic-uARPnx9x.js";import{n as u}from"./StatusBadge-BwnBNFQr.js";import{r as ee}from"./queries-BA4rNGD-.js";import{l as d}from"./useChartWidth-lZ9PrQn0.js";import{i as f,n as p,r as m,t as h}from"./charts-CMSgAUKn.js";import{_ as g}from"./colors-BZ3a9wFf.js";import{n as _,o as v,r as te,s as y,t as b}from"./format-DKrNjdwD.js";import{n as x}from"./BurnDown-x4PWH9JF.js";import{x as ne}from"./verse-queries-DvIJcn6Z.js";import{r as re}from"./section-visibility-qFqc_d4Z.js";import{l as ie}from"./icons-B_yuAgdN.js";import{r as S}from"./verse-store-DjBWj04q.js";import{f as ae,g as C,m as w,p as T,v as oe,y as E}from"./format-B8DAVcn2.js";import{n as D}from"./verse-model-D7NZQFAR.js";import{S as se,d as O}from"./context-model-MT17V86_.js";import{i as ce,n as le}from"./CapacityStrip-C667yQe8.js";import{h as k,m as A,p as ue}from"./capacity-strip-model-Bj_9ztzs.js";import{v as de}from"./context-model-Dwd49-dp.js";import{t as fe}from"./Meter-D-hncpkO.js";import{t as pe}from"./types-D5XOdyw8.js";import{d as me,l as j,t as M,v as N}from"./cloud.module-CiwatLj3.js";import{n as P,s as he,t as ge}from"./cloud-queries-CnV1yaNG.js";import{f as _e}from"./fleet-model-CNe8Wh-s.js";import{t as F}from"./calendar-day-BxBYHfX1.js";import{a as ve,c as ye,i as be,n as xe,o as Se,r as Ce,s as we,t as Te}from"./usage-queries-Bn8ccqyN.js";import{a as Ee,i as I,n as De,o as Oe,r as L,t as ke}from"./local-model-DFyjKX0b.js";import{n as Ae,t as je}from"./actions-s2lfm_5k.js";import{t as R}from"./CloudBudgetForm-DJeJvBEu.js";var z=n(e(),1),B={claude:`var(--engine-claude, #c96442)`,codex:`var(--engine-codex, #10a37f)`,grok:`var(--engine-grok, #6b7280)`,local:`var(--engine-local, #7c5cff)`},Me={claude:`Claude publishes no local utilization signal, so there is no window percentage to read. Ashlr deliberately never throttles this seat on a guess.`,grok:`Grok is absent from the per-engine usage snapshot, so this fallback roster has no window data for it. Its real state comes from the per-account probe.`},Ne=`The only figure available is derived from the dispatch ledger against a configured cap, not from the subscription itself. It is shown under Dispatch limits.`,Pe=`Local models have no subscription and no quota window — only whether the runtime is up.`,Fe={"account-observation":`from this account’s observed windows`,"subscription-tracker":`from the subscription tracker`};function V(e){return{sourceState:`unknown`,complete:!1,reason:e}}function H(e){return e>=90?`danger`:e>=80?`warn`:`ok`}function U(e){return Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function Ie(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Le(e,t,n){return{kind:`measured`,source:e,scope:t,windows:n}}function Re(e){return{kind:`unknown`,reason:Me[e]??`No subscription window reading is reported for this engine.`}}function ze(e){let{engine:t,seat:n,subscription:r,frontier:i,engineSeatCount:a=1}=e;if(t===`local`)return{kind:`not-applicable`,reason:Pe};let o=(n?.health.windows??[]).filter(e=>typeof e.usedPercent==`number`&&Number.isFinite(e.usedPercent));if(o.length>0)return Le(`account-observation`,`account`,o.map(e=>{let t=U(e.usedPercent),n=e.resetsAt?Date.parse(e.resetsAt):NaN;return{id:e.id,label:e.id,usedPct:t,resetsAt:Number.isNaN(n)?null:Math.round(n/1e3),tone:H(t)}}));if(r&&r.hasData&&r.windows.length>0)return Le(`subscription-tracker`,a>1?`engine`:`account`,r.windows.map((e,t)=>{let n=U(e.usedPercent);return{id:`${e.label}-${t}`,label:e.label,usedPct:n,resetsAt:Ie(e.resetsAt),tone:H(n)}}));if(r&&!r.hasData)return Re(t);if(i&&i.subscriptionWindow.state!==`unknown`){if(i.limit===void 0){let e=U(i.subscriptionWindow.usedPct);return Le(`subscription-tracker`,a>1?`engine`:`account`,[{id:i.subscriptionWindow.windowLabel??`window`,label:i.subscriptionWindow.windowLabel??`window`,usedPct:e,resetsAt:Ie(i.subscriptionWindow.resetsAt),tone:H(e)}])}return{kind:`unknown`,reason:Ne}}return Re(t)}function Be(e){if(!e)return null;let t=(e.byProvider??[]).map(e=>({provider:e.provider,tier:e.tier,tokens:e.tokens,costUsd:e.costUsd,sharePct:e.sharePct})),n=(e,n)=>t.filter(t=>t.tier===e).reduce((e,t)=>e+(t[n]||0),0);return{window:e.window,totalTokens:e.totalTokens,totalCostUsd:e.totalCostUsd,localSavingsUsd:e.localSavingsUsd,localTokens:n(`local`,`tokens`),cloudTokens:n(`cloud`,`tokens`),localCostUsd:n(`local`,`costUsd`),cloudCostUsd:n(`cloud`,`costUsd`),byProvider:[...t].sort((e,t)=>t.tokens-e.tokens),empty:t.length===0&&e.totalTokens===0}}function Ve(e,t){let n=[],r=new Set;for(let t of e??[]){let e=`${t.backend}:${t.window}`;r.add(e);let i=t.max>0?U(t.used/t.max*100):null;n.push({id:e,backend:t.backend,window:t.window,max:t.max,used:t.used,standing:t.standing,usedPct:i,configuredOnly:!1})}for(let e of t??[]){let t=`${e.engine}:${e.window}`;r.has(t)||(r.add(t),n.push({id:t,backend:e.engine,window:e.window,max:e.max,used:null,standing:`unknown`,usedPct:null,configuredOnly:!0}))}return n.sort((e,t)=>e.backend.localeCompare(t.backend)||e.window.localeCompare(t.window))}var He=`No per-day series is available: the sources this view reads carry aggregate spend only, not a dated history.`;function Ue(e){if(!e)return{available:!1,reason:He};if(e.sourceQuality?.sourceState!==`healthy`)return{available:!1,reason:`No per-day series: the daemon ledger is ${e.sourceQuality?.sourceState??`unavailable`}${e.sourceQuality?.reason?` (${e.sourceQuality.reason})`:``}.`};let t=e.ticks;if(!t||t.length===0)return{available:!1,reason:He};let n=new Map;for(let e of t){let t=Date.parse(e.ts);if(Number.isNaN(t))continue;let r=w(new Date(t));n.set(r,(n.get(r)??0)+(Number.isFinite(e.spentUsd)?e.spentUsd:0))}if(n.size<2)return{available:!1,reason:`No per-day series: only ${n.size} day${n.size===1?``:`s`} of daemon ticks is retained, which is not a trend.`};let r=[...n.keys()].sort(),i=r[0],a=r[r.length-1],o=[],s=F(a);for(let e=new Date(F(i));e.getTime()<=s;e=new Date(e.getFullYear(),e.getMonth(),e.getDate()+1)){let t=w(e);o.push({day:t,usd:n.has(t)?n.get(t):null})}return{available:!0,days:o,tickCount:t.length,caveat:`From the last ${t.length} recorded daemon ticks. The tick ledger is capped and records the autonomous loop only — interactive chat turns are not in it, and a gap is a day with no retained tick, not a measured zero.`}}var We={available:!1,reason:null,dailyBudgetUsd:null,subscriptionMaxPercent:null,todaySpentUsd:null,todaySpentDate:null,foundryLimits:[]};function W(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function G(e,t){if(!e)return null;for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t}return null}function Ge(e,t=null){let n=W(e);if(!n)return{...We,reason:t};let r=W(n.caps)??n,i=W(n.daemon),a=W(n.spend),o=[],s=r.foundryLimits;if(Array.isArray(s))for(let e of s){let t=W(e);if(!t)continue;let n=typeof t.engine==`string`?t.engine:null,r=G(t,[`max`]);n!==null&&r!==null&&o.push({engine:n,window:typeof t.window==`string`?t.window:`1d`,max:r})}return{available:!0,reason:t,dailyBudgetUsd:G(r,[`dailyBudgetUsd`]),subscriptionMaxPercent:G(r,[`subscriptionMaxPercent`]),todaySpentUsd:a?G(a,[`todayUsd`]):G(n,[`todaySpentUsd`,`todaySpendUsd`,`spendTodayUsd`])??G(i,[`todaySpentUsd`]),todaySpentDate:a&&typeof a.todayDate==`string`?a.todayDate:null,foundryLimits:o}}function Ke(e){return{...We,reason:e}}var K={section:`_section_trwms_11`,header:`_header_trwms_20`,headerTitle:`_headerTitle_trwms_33`,headerMeta:`_headerMeta_trwms_41`,ghostButton:`_ghostButton_trwms_50`,scroll:`_scroll_trwms_67`,panel:`_panel_trwms_75`,panelHead:`_panelHead_trwms_83`,panelTitle:`_panelTitle_trwms_95`,panelNote:`_panelNote_trwms_104`,muted:`_muted_trwms_111`,noteList:`_noteList_trwms_124`,num:`_num_trwms_135`,tiles:`_tiles_trwms_142`,cards:`_cards_trwms_150`,card:`_card_trwms_150`,cardHead:`_cardHead_trwms_177`,cardLabel:`_cardLabel_trwms_187`,cardMeta:`_cardMeta_trwms_198`,cardFigures:`_cardFigures_trwms_208`,figure:`_figure_trwms_217`,figureLabel:`_figureLabel_trwms_224`,figureValue:`_figureValue_trwms_232`,windows:`_windows_trwms_241`,windowHead:`_windowHead_trwms_248`,windowPct:`_windowPct_trwms_258`,windowReset:`_windowReset_trwms_264`,track:`_track_trwms_277`,fill:`_fill_trwms_285`,unknownRule:`_unknownRule_trwms_313`,signalRow:`_signalRow_trwms_320`,reason:`_reason_trwms_327`,sourceLine:`_sourceLine_trwms_335`,split:`_split_trwms_350`,splitRow:`_splitRow_trwms_357`,splitBar:`_splitBar_trwms_366`,splitFill:`_splitFill_trwms_373`,limitList:`_limitList_trwms_379`,limitRow:`_limitRow_trwms_384`,limitName:`_limitName_trwms_397`,limitWindow:`_limitWindow_trwms_406`,limitValue:`_limitValue_trwms_411`,verdictDetail:`_verdictDetail_trwms_427`,bindingLabel:`_bindingLabel_trwms_435`,windowBlock:`_windowBlock_trwms_445`,windowBlockLead:`_windowBlockLead_trwms_454`,windowFlag:`_windowFlag_trwms_467`,creditsRow:`_creditsRow_trwms_475`,actionBlock:`_actionBlock_trwms_490`,command:`_command_trwms_496`,commandInline:`_commandInline_trwms_497`,negative:`_negative_trwms_512`,segmented:`_segmented_trwms_518`,segment:`_segment_trwms_518`,charts:`_charts_trwms_560`,tableScroll:`_tableScroll_trwms_572`,stateBlock:`_stateBlock_trwms_580`,stateTitle:`_stateTitle_trwms_588`,stateBody:`_stateBody_trwms_597`,stateActions:`_stateActions_trwms_603`,skeletonGrid:`_skeletonGrid_trwms_607`,capacity:`_capacity_trwms_662`,capacityHeadline:`_capacityHeadline_trwms_667`,chips:`_chips_trwms_682`,chip:`_chip_trwms_682`,chipLabel:`_chipLabel_trwms_729`,chipState:`_chipState_trwms_739`,chipPct:`_chipPct_trwms_759`,capacityFacts:`_capacityFacts_trwms_765`,capacityFact:`_capacityFact_trwms_765`,capacityMuted:`_capacityMuted_trwms_779`,proseResets:`_proseResets_trwms_785`,visuallyHidden:`_visuallyHidden_trwms_789`,cardTrigger:`_cardTrigger_trwms_809`,cardChevron:`_cardChevron_trwms_825`,detail:`_detail_trwms_850`,detailHead:`_detailHead_trwms_858`,detailTitle:`_detailTitle_trwms_865`,detailGrid:`_detailGrid_trwms_873`,detailColumn:`_detailColumn_trwms_880`,evidenceList:`_evidenceList_trwms_884`,evidenceRow:`_evidenceRow_trwms_891`,evidenceValue:`_evidenceValue_trwms_898`,figureTile:`_figureTile_trwms_909`,figureBig:`_figureBig_trwms_920`,figureCaption:`_figureCaption_trwms_928`,panelActions:`_panelActions_trwms_936`,placement:`_placement_trwms_949`,placementBar:`_placementBar_trwms_956`,placementGpu:`_placementGpu_trwms_966`,placementCpu:`_placementCpu_trwms_967`,placementText:`_placementText_trwms_973`,staleNotice:`_staleNotice_trwms_986`,staleFlag:`_staleFlag_trwms_1000`},q=t();function qe({view:e,ariaPrefix:t,prominent:n=!1}){let r=`${t} ${e.label}`;if(e.limitReached)return(0,q.jsxs)(`div`,{className:n?K.windowBlockLead:K.windowBlock,children:[(0,q.jsxs)(`div`,{className:K.windowHead,children:[(0,q.jsx)(`span`,{children:e.label}),(0,q.jsx)(`span`,{className:K.windowFlag,children:`limit reached`})]}),(0,q.jsx)(`div`,{className:K.track,"data-tone":`danger`,role:`img`,"aria-label":`${r}: the provider flagged this window as rate-limited, so no percentage is shown`,children:(0,q.jsx)(`div`,{className:K.fill,style:{width:`100%`}})}),e.resetText?(0,q.jsx)(`p`,{className:K.windowReset,children:e.resetText}):null]});if(e.usedPct===null)return(0,q.jsxs)(`div`,{className:n?K.windowBlockLead:K.windowBlock,children:[(0,q.jsxs)(`div`,{className:K.windowHead,children:[(0,q.jsx)(`span`,{children:e.label}),(0,q.jsx)(l,{quality:V(`No percentage was reported for this window.`),label:r,children:null})]}),(0,q.jsx)(`hr`,{className:K.unknownRule,"aria-hidden":`true`})]});let i=Math.round(e.usedPct);return(0,q.jsxs)(`div`,{className:n?K.windowBlockLead:K.windowBlock,children:[(0,q.jsxs)(`div`,{className:K.windowHead,children:[(0,q.jsx)(`span`,{children:e.label}),(0,q.jsx)(`span`,{className:K.windowPct,children:C(e.usedPct)})]}),(0,q.jsx)(`div`,{className:K.track,"data-tone":e.tone,role:`meter`,"aria-label":`${r} used`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-valuetext":`${C(e.usedPct)} used${e.resetText?`, ${e.resetText}`:``}`,children:(0,q.jsx)(`div`,{className:K.fill,style:{width:`${i}%`}})}),e.resetText?(0,q.jsx)(`p`,{className:K.windowReset,children:e.resetText}):null]})}var Je={available:`success`,credits:`success`,tight:`warning`,exhausted:`danger`,"signed-out":`warning`,"probe-unsupported":`warning`,unknown:`unknown`};function Ye({credits:e}){if(!e)return null;let t=e.unlimited?`unlimited`:e.balance===null?null:e.balanceValue===null?e.balance:e.balanceValue.toLocaleString(`en-US`,{maximumFractionDigits:2});return(0,q.jsxs)(`div`,{className:K.creditsRow,children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:`Credits`}),(0,q.jsx)(`span`,{className:K.num,title:e.balance??void 0,children:t??`not reported`}),(0,q.jsx)(`p`,{className:K.reason,children:`Credits are a separate pool from the window above — a fully used window does not stop a spendable balance from being spent. The provider gives a bare number, not a currency, so it is shown as reported.`})]})}function Xe({card:e,onOpen:t,expanded:n=!1,triggerId:r,detailId:i}){let a={"--engine-color":e.color},o=e.verdict.state===`signed-out`,s=t!==void 0&&e.hasDetail,c=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.cardLabel,children:e.label}),(0,q.jsx)(u,{status:e.verdict.state,tone:Je[e.verdict.state],children:e.verdict.headline})]});return(0,q.jsxs)(`article`,{className:K.card,style:a,"aria-label":`${e.label} usage`,"data-selected":n?`true`:void 0,children:[s?(0,q.jsxs)(`button`,{type:`button`,id:r,className:`${K.cardHead} ${K.cardTrigger}`,"aria-expanded":n,...i?{"aria-controls":i}:{},onClick:()=>t(e.id),children:[c,(0,q.jsx)(`span`,{className:K.cardChevron,"aria-hidden":`true`,children:n?`−`:`+`})]}):(0,q.jsx)(`div`,{className:K.cardHead,children:c}),(0,q.jsxs)(`div`,{className:K.cardMeta,children:[(0,q.jsx)(`span`,{children:D[e.engine]}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,q.jsx)(`span`,{children:e.plan?`${e.plan} plan`:`plan not reported`})]}),(0,q.jsx)(`p`,{className:K.verdictDetail,children:e.verdict.detail}),e.verdict.code?(0,q.jsxs)(`p`,{className:K.sourceLine,children:[`Probe reason `,(0,q.jsx)(`code`,{className:K.commandInline,children:e.verdict.code})]}):null,e.binding?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.bindingLabel,children:`Binding constraint`}),(0,q.jsx)(qe,{view:e.binding,ariaPrefix:e.label,prominent:!0})]}):null,e.others.length>0?(0,q.jsx)(`div`,{className:K.windows,children:e.others.map(t=>(0,q.jsx)(qe,{view:t,ariaPrefix:e.label},t.id))}):null,(0,q.jsx)(Ye,{credits:e.credits}),o?(0,q.jsx)(`div`,{className:K.actionBlock,children:e.reconnectCommand?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:`Reconnect`}),(0,q.jsx)(`code`,{className:K.command,children:e.reconnectCommand})]}):(0,q.jsxs)(`p`,{className:K.reason,children:[`Sign this account back in through its own provider CLI under its pinned profile. Ashlr does not print that invocation here, because the pinned-profile launcher path is never allowed onto a surface. `,(0,q.jsx)(`code`,{className:K.commandInline,children:`ashlr resources`}),` `,`shows the connection state once it is back.`]})}):null,e.sourceNote?(0,q.jsx)(`p`,{className:K.sourceLine,children:e.sourceNote}):null]})}var Ze={available:`success`,credits:`success`,tight:`warning`,exhausted:`danger`,"signed-out":`warning`,"probe-unsupported":`warning`,unknown:`unknown`},Qe=`No per-account history is retained by any source this view reads: the accounts route is a point-in-time snapshot and the usage series carries no per-account breakdown. A trend is not drawn from one reading.`;function $e(e,t){return e===null?`The source behind this card reports no health verdict at all.`:e===`unknown`?t===`claude`?`Health reads unknown, which is how this provider always reads — the probe has no health channel for it. It is not a fault.`:`Health reads unknown: the monitor took no verdict on this account.`:`Monitor health: ${e}.`}function J({label:e,children:t}){return(0,q.jsxs)(`div`,{className:K.evidenceRow,children:[(0,q.jsx)(`dt`,{className:K.figureLabel,children:e}),(0,q.jsx)(`dd`,{className:K.evidenceValue,children:t})]})}function et({card:e,onClose:t,headingId:n}){let{evidence:r}=e,i=e.credits,a=(0,z.useRef)(null);return(0,z.useEffect)(()=>{a.current?.focus()},[e.id]),(0,q.jsxs)(`section`,{className:K.detail,"aria-labelledby":n,children:[(0,q.jsxs)(`div`,{className:K.detailHead,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h4`,{id:n,ref:a,tabIndex:-1,className:K.detailTitle,children:e.label}),(0,q.jsxs)(`div`,{className:K.cardMeta,children:[(0,q.jsx)(`span`,{children:D[e.engine]}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,q.jsx)(`span`,{children:e.plan?`${e.plan} plan`:`plan not reported`}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,q.jsx)(u,{status:e.verdict.state,tone:Ze[e.verdict.state],children:e.verdict.headline})]})]}),(0,q.jsx)(`button`,{type:`button`,className:K.ghostButton,onClick:t,children:`Close`})]}),(0,q.jsx)(`p`,{className:K.verdictDetail,children:e.verdict.detail}),(0,q.jsxs)(`div`,{className:K.detailGrid,children:[(0,q.jsxs)(`div`,{className:K.detailColumn,children:[(0,q.jsxs)(`span`,{className:K.figureLabel,children:[`All windows (`,e.allWindows.length,`)`]}),e.allWindows.length===0?(0,q.jsx)(`p`,{className:K.reason,children:`This account reported no windows at all. That is an absent reading, not a set of windows at zero.`}):(0,q.jsx)(`div`,{className:K.windows,children:e.allWindows.map((t,n)=>(0,q.jsx)(qe,{view:t,ariaPrefix:e.label,prominent:n===0},t.id))}),e.allWindows.some(e=>!e.measured)?(0,q.jsx)(`p`,{className:K.reason,children:`At least one window above carries a provider FLAG rather than a measurement, so no percentage is printed for it. A flagged limit and a measured 100% are different facts.`}):null]}),(0,q.jsxs)(`div`,{className:K.detailColumn,children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:`Probe evidence`}),(0,q.jsxs)(`dl`,{className:K.evidenceList,children:[(0,q.jsx)(J,{label:`Connection`,children:r.state}),(0,q.jsx)(J,{label:`Authentication`,children:r.authentication}),(0,q.jsx)(J,{label:`Health`,children:$e(r.health,e.engine)}),(0,q.jsx)(J,{label:`Observed`,children:r.observedAt===null?(0,q.jsx)(`span`,{className:K.capacityMuted,children:`no observation timestamp was reported`}):(0,q.jsx)(`span`,{className:K.num,title:new Date(r.observedAt).toLocaleString(),children:de(r.observedAt)??new Date(r.observedAt).toLocaleString()})}),(0,q.jsx)(J,{label:`Probe reason`,children:r.reasonCode===null?(0,q.jsx)(`span`,{className:K.capacityMuted,children:`none reported`}):(0,q.jsx)(`code`,{className:K.commandInline,children:r.reasonCode})}),r.unsupported?(0,q.jsxs)(J,{label:`Version pin`,children:[(0,q.jsx)(`code`,{className:K.commandInline,children:r.unsupported.code}),r.unsupported.pinnedVersion?(0,q.jsxs)(q.Fragment,{children:[` `,`pinned to `,(0,q.jsx)(`span`,{className:K.num,children:r.unsupported.pinnedVersion}),`. A one-line constant bump, not an outage.`]}):null]}):null]}),i?(0,q.jsxs)(`div`,{className:K.creditsRow,children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:`Credits`}),(0,q.jsx)(`span`,{className:K.num,title:i.balance??void 0,children:i.unlimited?`unlimited`:i.balanceValue===null?i.balance??`not reported`:i.balanceValue.toLocaleString(`en-US`,{maximumFractionDigits:2})}),(0,q.jsx)(`p`,{className:K.reason,children:`A separate pool from every window above. The provider gives a bare number, not a currency, so it is shown as reported.`})]}):null,r.notes.length>0?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:`Provider notes`}),(0,q.jsx)(`ul`,{className:K.noteList,children:r.notes.map(e=>(0,q.jsx)(`li`,{className:K.capacityMuted,children:e},e))})]}):null]})]}),(0,q.jsx)(`p`,{className:K.sourceLine,children:Qe})]})}function tt(e,t=3e4){let[n,r]=(0,z.useState)(()=>Date.now());return(0,z.useEffect)(()=>{if(!e)return;let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function nt({overview:e}){let t=tt(e.resets.length>0),n=(0,z.useMemo)(()=>k(e.resets,t),[e.resets,t]),r=n===null?0:n.atMs-t,i=r<=0,a=e.local;return(0,q.jsxs)(`section`,{className:K.capacity,"aria-label":`Resets and local headroom`,children:[(0,q.jsxs)(`dl`,{className:K.capacityFacts,children:[(0,q.jsxs)(`div`,{className:K.capacityFact,children:[(0,q.jsx)(`dt`,{className:K.figureLabel,children:`Nearest reset`}),(0,q.jsx)(`dd`,{children:n===null?(0,q.jsx)(`span`,{className:K.capacityMuted,children:`No seat reported a dated reset. That is an absent timestamp, not "never".`}):i?(0,q.jsxs)(`span`,{className:K.capacityMuted,children:[(0,q.jsx)(`span`,{className:K.num,children:n.seatLabel}),` · `,n.windowLabel,` was due to reset `,E(new Date(n.atMs).toISOString(),t),` — this reading predates the rollover.`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.num,children:A(r)}),` `,(0,q.jsxs)(`span`,{className:K.capacityMuted,children:[`· `,n.seatLabel,` `,n.windowLabel,`, resets`,` `,E(new Date(n.atMs).toISOString(),t)]})]})})]}),(0,q.jsxs)(`div`,{className:K.capacityFact,children:[(0,q.jsx)(`dt`,{className:K.figureLabel,children:`Local headroom`}),(0,q.jsx)(`dd`,{children:a===null?(0,q.jsx)(`span`,{className:K.capacityMuted,children:`No local source answered.`}):a.reachable?a.headroomBytes===null?(0,q.jsx)(`span`,{className:K.capacityMuted,children:`Either the resident total or the machine budget was not reported, so headroom cannot be computed.`}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.num,children:L(a.headroomBytes)}),` `,(0,q.jsxs)(`span`,{className:K.capacityMuted,children:[`free of `,L(a.memoryBudgetBytes),` · `,a.residentCount,` resident,`,` `,a.installedCount,` installed`]})]}):(0,q.jsx)(`span`,{className:K.capacityMuted,children:`The local runtime did not answer this probe, so headroom is unknown — not zero, and not full.`})})]}),(0,q.jsxs)(`div`,{className:K.capacityFact,children:[(0,q.jsx)(`dt`,{className:K.figureLabel,children:`Agentic locally`}),(0,q.jsx)(`dd`,{children:a===null||!a.reachable?(0,q.jsx)(`span`,{className:K.capacityMuted,children:`unknown`}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:K.num,children:a.agenticCount}),` `,(0,q.jsxs)(`span`,{className:K.capacityMuted,children:[`of `,a.installedCount,` installed models can drive a session`,a.unknownToolCount>0?`; ${a.unknownToolCount} did not report a capability list`:``]})]})})]})]}),e.proseResets.length>0?(0,q.jsxs)(`div`,{className:K.proseResets,children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:`Resets reported as text`}),(0,q.jsx)(`ul`,{className:K.noteList,children:e.proseResets.map(e=>(0,q.jsxs)(`li`,{className:K.capacityMuted,children:[e.seatLabel,` · `,e.windowLabel,` — `,e.text]},`${e.seatLabel}-${e.windowLabel}-${e.text}`))}),(0,q.jsx)(`p`,{className:K.capacityMuted,children:`These providers publish a sentence rather than a timestamp, so it is shown exactly as given and never turned into a countdown.`})]}):null]})}function rt(e){let t=e.fullest;if(t===null)return`—`;let n=`${t.exact?``:`≤`}${S(t.tokens)}`;if(t.window===null)return n;let r=t.tokens/t.window*100;return`${n} / ${S(t.window)} · ${r<=100?C(r):te(r/100)}`}var it=[{key:`seat`,label:`Seat`,render:e=>(0,q.jsxs)(q.Fragment,{children:[e.label,(0,q.jsxs)(`span`,{className:K.limitWindow,children:[` · ${D[e.engine]}`,e.retired?` · no longer connected`:``]})]})},{key:`chats`,label:`Chats`,numeric:!0,render:e=>b(e.sessions)},{key:`turns`,label:`Turns`,numeric:!0,render:e=>b(e.turns)},{key:`prompt`,label:`Prompt tokens`,numeric:!0,render:e=>S(e.promptTokens)},{key:`hit`,label:`Cache hit`,numeric:!0,render:e=>e.cacheHitRatio===null?e.promptTokens>0?`none reported`:`—`:O(e.cacheHitRatio)},{key:`compactions`,label:`Compactions`,numeric:!0,render:e=>b(e.compactions)},{key:`expansive`,label:`Expansive chats`,numeric:!0,render:e=>b(e.expansiveSessions)},{key:`fullest`,label:`Fullest context`,numeric:!0,render:e=>rt(e)}];function at({rows:e,unavailableReason:t}){return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-efficiency`,children:[(0,q.jsxs)(`div`,{className:K.panelHead,children:[(0,q.jsx)(`h3`,{id:`verse-usage-efficiency`,className:K.panelTitle,children:`Context efficiency`}),(0,q.jsx)(`p`,{className:K.panelNote,children:`Per seat, across every chat on this machine. Cache hit is the share of prompt tokens served from the provider's cache — the higher it is, the less each turn re-reads at full price. Compactions are the CLI summarizing a context that outgrew its budget.`})]}),t===null?e.length===0?(0,q.jsx)(`p`,{className:K.muted,children:`No chats yet, so there is nothing to measure — this is an empty history, not a seat at 0%. Start a chat on any seat and its context use shows up here.`}):(0,q.jsx)(`div`,{className:K.tableScroll,children:(0,q.jsx)(d,{caption:`Context efficiency per seat: chats, turns, prompt tokens, cache-hit ratio, compactions, expansive chats and the fullest context`,columns:it,rows:[...e],rowKey:e=>e.seatId})}):(0,q.jsx)(`p`,{className:K.muted,children:t}),(0,q.jsx)(`p`,{className:K.sourceLine,children:`Computed in this browser from each chat's recorded totals — no extra request, no spend. “None reported” means the provider reported no cache activity, not a 0% hit rate; a figure marked ≤ is an upper bound. Compactions are counted from Verse 3.9 on; earlier ones were not recorded.`})]})}function ot(e){switch(e){case`ok`:return`success`;case`warn`:return`warning`;case`over`:return`danger`;case`unlimited`:return`neutral`;default:return`unknown`}}function st({rows:e,capsNote:t}){return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-limits`,children:[(0,q.jsxs)(`div`,{className:K.panelHead,children:[(0,q.jsx)(`h3`,{id:`verse-usage-limits`,className:K.panelTitle,children:`Dispatch limits`}),(0,q.jsx)(`p`,{className:K.panelNote,children:`Calls recorded in the dispatch ledger against each configured foundry cap. This is not subscription utilization.`})]}),t?(0,q.jsx)(`p`,{className:K.muted,children:t}):null,e.length===0?(0,q.jsx)(`p`,{className:K.muted,children:`No foundry limits are configured, so dispatches are uncapped on this machine. Nothing here is being throttled.`}):(0,q.jsx)(`div`,{className:K.limitList,children:e.map(e=>(0,q.jsxs)(`div`,{className:K.limitRow,children:[(0,q.jsxs)(`span`,{className:K.limitName,children:[e.backend,(0,q.jsxs)(`span`,{className:K.limitWindow,children:[`per `,e.window]}),(0,q.jsx)(u,{status:e.standing,tone:ot(e.standing),children:e.standing===`unknown`?`no reading`:e.standing})]}),e.usedPct===null?(0,q.jsx)(`hr`,{className:K.unknownRule,"aria-hidden":`true`}):(0,q.jsx)(`div`,{className:K.track,"data-tone":e.usedPct>=100?`danger`:e.usedPct>=80?`warn`:`ok`,role:`meter`,"aria-label":`${e.backend} dispatches against its ${e.window} cap`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.usedPct),children:(0,q.jsx)(`div`,{className:K.fill,style:{width:`${Math.round(e.usedPct)}%`}})}),(0,q.jsx)(`span`,{className:K.limitValue,children:e.used===null?`configured ${b(e.max)}`:`${b(e.used)} / ${b(e.max)}`})]},e.id))})]})}var ct=`Cost is ESTIMATED from a static price table in this repo, not billed. It will not match a provider invoice.`,lt=`Codex reports cacheRead and cacheWrite as a hardcoded 0 upstream, so any window containing Codex traffic understates cache activity — its cache economics are not comparable to Claude’s.`,ut=`A flat heuristic of $3 per 1M local tokens, not a quote and not a measured price.`,dt=`Fewer than two days in this window carry a rollup row, which is not a trend.`,ft=`The daily rollup carries no per-engine or local/cloud columns, and the only tier split available is a single aggregate with no dates on it. Apportioning the daily totals by that aggregate’s ratio would invent a shape nobody measured, so no per-day split is drawn — the aggregate below is the real figure.`;function pt(e,t){return e.reduce((e,n)=>e+(t(n)===null?0:1),0)}function Y(e,t){return e.map(e=>({x:F(e.day),y:t(e)}))}function mt(e){return e.reduce((e,t)=>({tokensIn:e.tokensIn+t.tokensIn,tokensOut:e.tokensOut+t.tokensOut,estCostUsd:e.estCostUsd+t.estCostUsd,sessions:e.sessions+t.sessions,dayCount:e.dayCount+1}),{tokensIn:0,tokensOut:0,estCostUsd:0,sessions:0,dayCount:0})}function ht(e){return e?e.days.length<2?{available:!1,reason:dt}:{available:!0,days:e.days,series:[{id:`tokensIn`,label:`Tokens in`,points:Y(e.days,e=>e.tokensIn)},{id:`tokensOut`,label:`Tokens out`,points:Y(e.days,e=>e.tokensOut)}]}:{available:!1,reason:`No usage series has been loaded.`}}function gt(e){return e?e.days.length<2?{available:!1,reason:dt}:{available:!0,days:e.days,series:[{id:`estCostUsd`,label:`Estimated spend`,points:Y(e.days,e=>e.estCostUsd)}]}:{available:!1,reason:`No usage series has been loaded.`}}function _t(e){if(!e)return{available:!1,reason:`No usage series has been loaded.`};let t=pt(e.days,e=>e.cacheHitRate);return t===0?{available:!1,reason:`No day in this window reported a cache hit rate, so there is nothing to plot. This is an absent signal, not a 0% hit rate.`}:t<2?{available:!1,reason:`Only ${t} day in this window reported a cache hit rate, which is not a trend.`}:{available:!0,days:e.days,series:[{id:`cacheHitRate`,label:`Cache hit rate`,points:Y(e.days,e=>e.cacheHitRate)}]}}function vt(e){return e?pt(e.days,e=>e.cacheRead)+pt(e.days,e=>e.cacheWrite)===0?{available:!1,reason:`No day in this window reported cache read or write tokens, so there is nothing to plot. This is an absent signal, not zero cache activity.`}:e.days.length<2?{available:!1,reason:dt}:{available:!0,days:e.days,series:[{id:`cacheRead`,label:`Cache read`,points:Y(e.days,e=>e.cacheRead)},{id:`cacheWrite`,label:`Cache write`,points:Y(e.days,e=>e.cacheWrite)}]}:{available:!1,reason:`No usage series has been loaded.`}}function yt(e){if(e.length===0)return{tokensInPerDay:null,tokensOutPerDay:null,estCostUsdPerDay:null,peakCostDay:null};let t=mt(e),n=e.reduce((e,t)=>t.estCostUsd>e.estCostUsd?t:e);return{tokensInPerDay:t.tokensIn/e.length,tokensOutPerDay:t.tokensOut/e.length,estCostUsdPerDay:t.estCostUsd/e.length,peakCostDay:{day:n.day,usd:n.estCostUsd}}}function X(e,t){if(!(!e||e.days.length<2))return e.days.map(t)}var Z={"7d":`Last 7 days`,"30d":`Last 30 days`},bt=g(0),xt=g(1),St=[{key:`provider`,label:`Provider`,render:e=>e.provider},{key:`tier`,label:`Tier`,render:e=>e.tier},{key:`tokens`,label:`Tokens`,numeric:!0,render:e=>b(e.tokens)},{key:`cost`,label:`Cost`,numeric:!0,render:e=>y(e.costUsd)},{key:`share`,label:`Share`,numeric:!0,render:e=>C(e.sharePct)}];function Ct({label:e,tokens:t,total:n,color:r}){let i=n>0?t/n*100:0,a=Math.round(i);return(0,q.jsxs)(`div`,{className:K.splitRow,children:[(0,q.jsx)(`span`,{children:e}),(0,q.jsx)(`div`,{className:K.splitBar,role:`meter`,"aria-label":`${e} share of tokens`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,children:(0,q.jsx)(`div`,{className:K.splitFill,style:{width:`${a}%`,"--split-color":r}})}),(0,q.jsxs)(`span`,{className:K.num,children:[b(t),` · `,C(i)]})]})}function wt({split:e,savingsNote:t}){let n=e.localTokens+e.cloudTokens,r=e.byProvider.map(e=>({label:e.provider,value:e.tokens}));return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-split`,children:[(0,q.jsx)(`div`,{className:K.panelHead,children:(0,q.jsxs)(`h3`,{id:`verse-usage-split`,className:K.panelTitle,children:[`Local vs cloud · `,e.window]})}),(0,q.jsxs)(`div`,{className:K.tiles,children:[(0,q.jsx)(x,{label:`Not spent (ran locally)`,value:(0,q.jsx)(`span`,{className:K.num,children:y(e.localSavingsUsd)}),caption:`Estimated cloud list price of the ${e.window} local tokens. ${t??`A heuristic, not a quote.`}`}),(0,q.jsx)(x,{label:`Estimated cloud spend · ${e.window}`,value:(0,q.jsx)(`span`,{className:K.num,children:y(e.cloudCostUsd)}),caption:ct}),(0,q.jsx)(x,{label:`Tokens · ${e.window}`,value:(0,q.jsx)(`span`,{className:K.num,children:b(e.totalTokens)}),caption:`Local and cloud combined`})]}),e.empty?(0,q.jsx)(`p`,{className:K.muted,style:{marginTop:`var(--space-4)`},children:`No provider activity recorded in this window. Choose a longer window, or run a chat turn and it appears here.`}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:K.split,style:{marginTop:`var(--space-4)`},children:[(0,q.jsx)(Ct,{label:`Local`,tokens:e.localTokens,total:n,color:bt}),(0,q.jsx)(Ct,{label:`Cloud`,tokens:e.cloudTokens,total:n,color:xt})]}),(0,q.jsx)(m,{items:[{label:`Local`,color:bt,kind:`swatch`},{label:`Cloud`,color:xt,kind:`swatch`}]}),(0,q.jsx)(f,{title:`Tokens by provider`,description:`Share of the ${e.window} window`,empty:r.length===0,emptyMessage:`No provider rows in this window.`,table:(0,q.jsx)(d,{caption:`Tokens and cost by provider`,columns:St,rows:e.byProvider,rowKey:e=>e.provider}),children:(0,q.jsx)(h,{data:r,orientation:`horizontal`,height:Math.max(120,r.length*34),formatValue:e=>b(e),ariaLabel:`Tokens by provider over the ${e.window} window`})})]})]})}var Tt={available:`success`,credits:`success`,tight:`warning`,exhausted:`danger`,"signed-out":`warning`,"probe-unsupported":`warning`,unknown:`unknown`},Et=g(0),Dt=g(5);function Ot(e,t=5e3){let[n,r]=(0,z.useState)(()=>Date.now());return(0,z.useEffect)(()=>{if(!e)return;let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function kt({row:e}){let t=e.resident?e.expiresAtMs:null,n=Ot(t!==null);return t===null?`—`:Ee(t-n)}function At({row:e}){return e.tools===`unknown`?(0,q.jsx)(l,{quality:V(`The runtime did not report a capability list for this model.`),label:`${e.name} tool support`,children:null}):e.tools===`supported`?(0,q.jsx)(u,{status:`agentic`,tone:`success`,children:`tools`}):(0,q.jsx)(u,{status:`no-tools`,tone:`danger`,children:`no tools`})}function jt({row:e}){if(e.sizeBytes===null)return(0,q.jsx)(`span`,{children:`—`});let t=e.resident?`Resident size reported by the runtime.`:`On-disk size; this model is not resident, so it is using no memory.`;return(0,q.jsxs)(`span`,{title:t,children:[L(e.sizeBytes),e.resident&&e.memoryPct!==null?` · ${C(e.memoryPct)} of machine`:``]})}function Mt({row:e}){if(!e.resident)return(0,q.jsx)(`span`,{className:K.capacityMuted,children:`not resident`});if(e.gpuPct===null)return(0,q.jsx)(l,{quality:V(`The runtime reported no VRAM split for this resident model.`),label:`${e.name} placement`,children:null});let t=Math.round(e.gpuPct);return(0,q.jsxs)(`span`,{className:K.placement,children:[(0,q.jsxs)(`span`,{className:K.placementBar,role:`img`,"aria-label":`${e.name}: ${C(e.gpuPct)} of resident bytes on GPU, ${C(100-e.gpuPct)} on CPU`,children:[(0,q.jsx)(`span`,{className:K.placementGpu,style:{width:`${t}%`,"--split-color":Et}}),(0,q.jsx)(`span`,{className:K.placementCpu,style:{width:`${100-t}%`,"--split-color":Dt}})]}),(0,q.jsx)(`span`,{className:K.placementText,children:e.placement===`unknown`?`${C(e.gpuPct)} GPU`:`${e.placement} · ${C(e.gpuPct)} GPU`})]})}function Nt({row:e}){return e.nativeContext===null&&e.configuredContext===null?(0,q.jsx)(`span`,{children:`—`}):e.contextTruncated?(0,q.jsx)(`span`,{title:`Native context is ${I(e.nativeContext)}; Ashlr runs this seat at ${I(e.configuredContext)}.`,children:`${I(e.configuredContext)} of ${I(e.nativeContext)}`}):(0,q.jsx)(`span`,{children:I(e.nativeContext??e.configuredContext)})}var Pt=[{key:`name`,label:`Model`,render:e=>e.name},{key:`state`,label:`State`,render:e=>e.resident?(0,q.jsx)(u,{status:`resident`,tone:`success`,children:`resident`}):(0,q.jsx)(u,{status:`installed`,tone:`neutral`,children:`installed`})},{key:`tools`,label:`Agentic`,render:e=>(0,q.jsx)(At,{row:e})},{key:`size`,label:`Size`,numeric:!0,render:e=>(0,q.jsx)(jt,{row:e})},{key:`placement`,label:`Placement`,render:e=>(0,q.jsx)(Mt,{row:e})},{key:`params`,label:`Params`,numeric:!0,render:e=>e.parameterSize??`—`},{key:`quant`,label:`Quant`,render:e=>e.quantization??`—`},{key:`context`,label:`Context`,numeric:!0,render:e=>(0,q.jsx)(Nt,{row:e})},{key:`keepalive`,label:`Keep-alive`,numeric:!0,render:e=>(0,q.jsx)(kt,{row:e})}];function Ft({staleness:e}){return e.stale?(0,q.jsxs)(`p`,{className:K.staleNotice,role:`status`,children:[(0,q.jsx)(`span`,{className:K.staleFlag,children:`last known-good`}),` Every local figure below is the last known-good reading from `,De(e.staleForMs),` ago`,e.runtimes.length>0?` (${e.runtimes.join(`, `)})`:``,`, not a fresh probe: the runtime did not answer in time and the server kept the previous report rather than erasing it.`]}):null}function It({card:e,staleness:t}){let n={"--engine-color":e.color},r=e.usedPct===null?null:Math.round(e.usedPct),i=e.usedPct===null?null:C(e.usedPct);return(0,q.jsxs)(`article`,{className:K.card,style:n,"aria-label":`Local usage`,children:[(0,q.jsxs)(`div`,{className:K.cardHead,children:[(0,q.jsx)(`span`,{className:K.cardLabel,children:`Local`}),(0,q.jsx)(u,{status:e.verdict.state,tone:Tt[e.verdict.state],children:e.verdict.headline})]}),(0,q.jsxs)(`div`,{className:K.cardMeta,children:[(0,q.jsx)(`span`,{children:`Ollama`}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,q.jsx)(`span`,{children:`no subscription, no quota, no bill`})]}),t?.stale?(0,q.jsx)(Ft,{staleness:t}):null,(0,q.jsx)(`p`,{className:K.verdictDetail,children:e.verdict.detail}),e.verdict.code?(0,q.jsxs)(`p`,{className:K.sourceLine,children:[`Probe reason `,(0,q.jsx)(`code`,{className:K.commandInline,children:e.verdict.code})]}):null,(0,q.jsx)(`span`,{className:K.bindingLabel,children:`Memory budget`}),r===null?(0,q.jsxs)(`div`,{className:K.windowBlockLead,children:[(0,q.jsxs)(`div`,{className:K.windowHead,children:[(0,q.jsx)(`span`,{children:`Resident against machine memory`}),(0,q.jsx)(l,{quality:V(`Either the resident size or the machine memory budget was not reported, so no share can be computed.`),label:`local memory budget`,children:null})]}),(0,q.jsx)(`hr`,{className:K.unknownRule,"aria-hidden":`true`})]}):(0,q.jsxs)(`div`,{className:K.windowBlockLead,children:[(0,q.jsxs)(`div`,{className:K.windowHead,children:[(0,q.jsx)(`span`,{children:`Resident against machine memory`}),(0,q.jsx)(`span`,{className:K.windowPct,children:i})]}),(0,q.jsx)(`div`,{className:K.track,"data-tone":e.tone,role:`meter`,"aria-label":`Local resident models against machine memory budget`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"aria-valuetext":`${L(e.residentBytes)} of ${L(e.memoryBudgetBytes)} resident`,children:(0,q.jsx)(`div`,{className:K.fill,style:{width:`${r}%`}})}),(0,q.jsxs)(`p`,{className:K.windowReset,children:[L(e.residentBytes),` of `,L(e.memoryBudgetBytes)]})]}),(0,q.jsxs)(`p`,{className:K.sourceLine,children:[e.residentCount,` resident · `,e.installedCount,` installed`]})]})}function Lt({serving:e}){if(e===void 0)return(0,q.jsx)(`p`,{className:K.sourceLine,children:`Residency is not concurrency. How many local agents can run at once is decided by the serving runtime, not by these models — a resident model can still be served to one agent at a time. The serving runtime and its real slot count are in Autonomy.`});let t=_e(e);return(0,q.jsxs)(`p`,{className:K.sourceLine,children:[(0,q.jsxs)(`strong`,{children:[t.headline,`.`]}),` `,t.detail]})}function Rt({view:e,serving:t}){let[n,r]=(0,z.useState)(!1),i=(0,z.useMemo)(()=>Oe(e?.runtimes??[]),[e]),a=(0,z.useMemo)(()=>n?(e?.rows??[]).filter(e=>e.tools!==`unsupported`):e?.rows??[],[e,n]),o=(0,z.useMemo)(()=>a.filter(e=>e.resident&&e.sizeBytes!==null),[a]);return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-local`,children:[(0,q.jsxs)(`div`,{className:K.panelHead,children:[(0,q.jsx)(`h3`,{id:`verse-usage-local`,className:K.panelTitle,children:`Local availability`}),(0,q.jsx)(`p`,{className:K.panelNote,children:`Resident models answer immediately. A model without tool support cannot drive an agentic session at all, however much memory is free.`})]}),(0,q.jsx)(Lt,{serving:t}),(0,q.jsx)(Ft,{staleness:i}),e===null?(0,q.jsxs)(`p`,{className:K.muted,children:[`No local-model source answered, so neither resident nor installed models can be listed. This is a missing source, not an empty machine. Start Ollama (`,(0,q.jsx)(`code`,{className:K.commandInline,children:`ollama serve`}),`) or llama-server, and this fills in on the next check.`]}):e.reachable?e.rows.length===0?(0,q.jsx)(`p`,{className:K.muted,children:`The local runtime answered and reports no installed models. Pull one to give Ashlr a local seat.`}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:K.tiles,children:[(0,q.jsx)(Q,{label:`Resident now`,value:String(e.rows.filter(e=>e.resident).length),caption:e.residentBytes===null?`At least one resident model reported no size, so the total is withheld rather than understated.`:`${L(e.residentBytes)} in memory`}),(0,q.jsx)(Q,{label:`Installed`,value:String(e.rows.length),caption:`On disk; the first turn on one of these pays a load`}),(0,q.jsx)(Q,{label:`Can drive a session`,value:String(e.agenticCount),caption:e.unknownToolCount>0?`${e.nonAgenticCount} cannot; ${e.unknownToolCount} did not report a capability list`:`${e.nonAgenticCount} cannot drive one`}),(0,q.jsx)(Q,{label:`Machine memory`,value:e.memoryBudgetBytes===null?`unknown`:L(e.memoryBudgetBytes),caption:e.freeMemoryBytes===null?`The machine reported no free-memory figure.`:`${L(e.freeMemoryBytes)} reported free by the OS`})]}),(0,q.jsxs)(`div`,{className:K.panelActions,children:[(0,q.jsx)(`button`,{type:`button`,className:K.segment,"aria-pressed":n,onClick:()=>r(e=>!e),children:`Hide models that cannot drive a session`}),e.nonAgenticCount>0?(0,q.jsxs)(`span`,{className:K.capacityMuted,children:[e.nonAgenticCount,` of `,e.rows.length,` installed models cannot drive an agentic session.`]}):null]}),(0,q.jsx)(`div`,{className:K.tableScroll,children:(0,q.jsx)(d,{caption:`Local models: residency, tool support, size, placement, parameters, quantization, context and keep-alive`,columns:Pt,rows:a,rowKey:e=>`${e.runtime??`runtime`}:${e.name}`})}),(0,q.jsx)(`div`,{className:K.charts,children:(0,q.jsx)(f,{title:`Resident memory by model`,description:`What is actually in memory right now`,caveat:`Only models the runtime reports as resident WITH a size appear here. An installed model occupies no memory and is not a bar at zero.`,empty:o.length===0,emptyMessage:`Nothing is resident, so there is no memory in use to chart. That is an idle machine, not a zero reading.`,table:(0,q.jsx)(d,{caption:`Resident size per model`,columns:[{key:`name`,label:`Model`,render:e=>e.name},{key:`size`,label:`Resident`,numeric:!0,render:e=>L(e.sizeBytes)}],rows:o,rowKey:e=>e.name}),children:(0,q.jsx)(h,{data:o.map(e=>({label:e.name,value:e.sizeBytes})),orientation:`horizontal`,height:Math.max(120,o.length*34),formatValue:e=>L(e),ariaLabel:`Resident memory by local model`})})}),e.runtimes.length>0?(0,q.jsx)(`ul`,{className:K.noteList,children:e.runtimes.map(e=>(0,q.jsxs)(`li`,{className:K.capacityMuted,children:[e.runtime,`:`,` `,e.reachable?`${e.modelCount} model${e.modelCount===1?``:`s`} reported`:`did not answer`,e.stale?` · retained reading, ${De(e.staleForMs)} old`:``,e.reason?` · `:``,e.reason?(0,q.jsx)(`code`,{className:K.commandInline,children:e.reason}):null]},e.runtime))}):null,e.notes.length>0?(0,q.jsx)(`ul`,{className:K.noteList,children:e.notes.map(e=>(0,q.jsx)(`li`,{className:K.capacityMuted,children:e},e))}):null,(0,q.jsxs)(`p`,{className:K.sourceLine,children:[`Sizes and the GPU share come from the runtime's own resident report; a model with no reported VRAM split shows no placement bar rather than being drawn as fully on GPU.`,` `,b(e.rows.length),` models installed.`]})]}):(0,q.jsxs)(`p`,{className:K.muted,children:[`No local runtime answered this probe, so nothing about local models can be read. That is an unanswered probe, not a report that no models are installed. Start Ollama (`,(0,q.jsx)(`code`,{className:K.commandInline,children:`ollama serve`}),`) or llama-server, then check again.`,e.reason?(0,q.jsxs)(q.Fragment,{children:[` `,`Probe reason `,(0,q.jsx)(`code`,{className:K.commandInline,children:e.reason}),`.`]}):null]})]})}function Q({label:e,value:t,caption:n}){return(0,q.jsxs)(`div`,{className:K.figureTile,children:[(0,q.jsx)(`span`,{className:K.figureLabel,children:e}),(0,q.jsx)(`span`,{className:K.figureBig,children:t}),(0,q.jsx)(`span`,{className:K.figureCaption,children:n})]})}var zt=[`7d`,`30d`],Bt=[{key:`day`,label:`Day`,render:e=>_(e.day)},{key:`in`,label:`Tokens in`,numeric:!0,render:e=>b(e.tokensIn)},{key:`out`,label:`Tokens out`,numeric:!0,render:e=>b(e.tokensOut)},{key:`sessions`,label:`Sessions`,numeric:!0,render:e=>b(e.sessions)}],Vt=[{key:`day`,label:`Day`,render:e=>_(e.day)},{key:`cost`,label:`Estimated spend`,numeric:!0,render:e=>y(e.estCostUsd)}],Ht=[{key:`day`,label:`Day`,render:e=>_(e.day)},{key:`read`,label:`Cache read`,numeric:!0,render:e=>e.cacheRead===null?`not reported`:b(e.cacheRead)},{key:`write`,label:`Cache write`,numeric:!0,render:e=>e.cacheWrite===null?`not reported`:b(e.cacheWrite)}],Ut=[{key:`day`,label:`Day`,render:e=>_(e.day)},{key:`rate`,label:`Cache hit rate`,numeric:!0,render:e=>e.cacheHitRate===null?`not reported`:ae(e.cacheHitRate)},{key:`read`,label:`Cache read`,numeric:!0,render:e=>e.cacheRead===null?`not reported`:b(e.cacheRead)}];function Wt({series:e,window:t,onWindowChange:n,unavailableReason:r,loading:i}){let a=e?mt(e.days):null,o=e?yt(e.days):null,s=ht(e),c=gt(e),l=_t(e),u=vt(e);return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-series`,children:[(0,q.jsxs)(`div`,{className:K.panelHead,children:[(0,q.jsx)(`h3`,{id:`verse-usage-series`,className:K.panelTitle,children:`Token output and spend`}),(0,q.jsx)(`div`,{className:K.segmented,role:`group`,"aria-label":`Series window`,children:zt.map(e=>(0,q.jsx)(`button`,{type:`button`,className:K.segment,"aria-pressed":e===t,onClick:()=>n(e),children:e},e))})]}),r?(0,q.jsxs)(`p`,{className:K.muted,children:[r,` No token or spend series can be drawn, and none is invented in its place.`]}):i&&e===null?(0,q.jsxs)(`p`,{className:K.muted,"aria-busy":`true`,children:[`Loading the `,Z[t].toLowerCase(),` rollup…`]}):e===null||e.days.length===0?(0,q.jsxs)(`p`,{className:K.muted,children:[`The rollup for `,Z[t].toLowerCase(),` came back with no days in it. That is an empty window, not a zero.`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:K.tiles,children:[(0,q.jsx)(x,{label:`Tokens in · ${t}`,value:(0,q.jsx)(`span`,{className:K.num,children:b(a?.tokensIn??0)}),caption:`Across ${a?.dayCount??0} recorded days`,trend:X(e,e=>e.tokensIn),trendLabel:`Tokens in per day`}),(0,q.jsx)(x,{label:`Tokens out · ${t}`,value:(0,q.jsx)(`span`,{className:K.num,children:b(a?.tokensOut??0)}),caption:`What the models actually produced`,trend:X(e,e=>e.tokensOut),trendLabel:`Tokens out per day`}),(0,q.jsx)(x,{label:`Estimated spend · ${t}`,value:(0,q.jsx)(`span`,{className:K.num,children:y(a?.estCostUsd??0)}),caption:`Estimated from a static price table — not billed`,trend:X(e,e=>e.estCostUsd),trendLabel:`Estimated spend per day`}),(0,q.jsx)(x,{label:`Sessions · ${t}`,value:(0,q.jsx)(`span`,{className:K.num,children:b(a?.sessions??0)}),caption:`Rollup rows, not billed calls`,trend:X(e,e=>e.sessions),trendLabel:`Sessions per day`}),(0,q.jsx)(x,{label:`Estimated spend per active day`,value:(0,q.jsx)(`span`,{className:K.num,children:o?.estCostUsdPerDay===null||o===null?`unknown`:y(o.estCostUsdPerDay)}),caption:`Across the ${a?.dayCount??0} days that carry a rollup row — not the ${t} calendar span`}),(0,q.jsx)(x,{label:`Heaviest day`,value:(0,q.jsx)(`span`,{className:K.num,children:o?.peakCostDay?y(o.peakCostDay.usd):`unknown`}),caption:o?.peakCostDay?`${_(o.peakCostDay.day)} — estimated, not billed`:`No day in this window carries a cost row.`})]}),(0,q.jsxs)(`div`,{className:K.charts,children:[(0,q.jsx)(f,{title:`Tokens per day`,description:Z[t],empty:!s.available,emptyMessage:s.available?``:s.reason,table:(0,q.jsx)(d,{caption:`Tokens in and out per day`,columns:Bt,rows:e.days,rowKey:e=>e.day}),children:s.available?(0,q.jsx)(p,{series:s.series,formatX:e=>v(e),formatY:e=>b(e),ariaLabel:`Tokens in and out per day over ${Z[t].toLowerCase()}`}):null}),(0,q.jsx)(f,{title:`Estimated spend per day`,description:Z[t],caveat:ct,empty:!c.available,emptyMessage:c.available?``:c.reason,table:(0,q.jsx)(d,{caption:`Estimated spend per day`,columns:Vt,rows:e.days,rowKey:e=>e.day}),children:c.available?(0,q.jsx)(p,{series:c.series,area:!0,formatX:e=>v(e),formatY:e=>y(e),ariaLabel:`Estimated spend per day over ${Z[t].toLowerCase()}`}):null}),(0,q.jsx)(f,{title:`Cache hit rate`,description:Z[t],caveat:lt,empty:!l.available,emptyMessage:l.available?``:l.reason,table:l.available?(0,q.jsx)(d,{caption:`Cache hit rate per day`,columns:Ut,rows:e.days,rowKey:e=>e.day}):void 0,children:l.available?(0,q.jsx)(p,{series:l.series,formatX:e=>v(e),formatY:e=>te(e),ariaLabel:`Cache hit rate per day over ${Z[t].toLowerCase()}`}):null}),(0,q.jsx)(f,{title:`Cache read and write tokens`,description:Z[t],caveat:lt,empty:!u.available,emptyMessage:u.available?``:u.reason,table:u.available?(0,q.jsx)(d,{caption:`Cache read and write tokens per day`,columns:Ht,rows:e.days,rowKey:e=>e.day}):void 0,children:u.available?(0,q.jsx)(p,{series:u.series,formatX:e=>v(e),formatY:e=>b(e),ariaLabel:`Cache read and write tokens per day over ${Z[t].toLowerCase()}`}):null}),(0,q.jsx)(f,{title:`Local vs cloud per day`,description:Z[t],empty:!0,emptyMessage:ft,children:null})]}),e.caveats.length>0?(0,q.jsx)(`ul`,{className:K.noteList,children:e.caveats.map(e=>(0,q.jsx)(`li`,{className:K.capacityMuted,children:e},e))}):null]})]})}var Gt=[{key:`day`,label:`Day`,render:e=>_(e.day)},{key:`usd`,label:`Spend`,numeric:!0,render:e=>e.usd===null?`no tick retained`:y(e.usd)}];function Kt({series:e,todaySpentUsd:t,todaySpentDate:n,dailyBudgetUsd:r,showSeries:i=!0}){let a=n!==null&&!T(n),o=a?null:t,s=a?`Nothing recorded today — the last ledger day is ${_(n)}`:r===null?`Configured daily budget unavailable`:r===0?`Daily budget is 0 — the loop is stopped`:`of a ${y(r)} daily budget`;return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-spend`,children:[(0,q.jsx)(`div`,{className:K.panelHead,children:(0,q.jsx)(`h3`,{id:`verse-usage-spend`,className:K.panelTitle,children:`Spend`})}),(0,q.jsx)(`div`,{className:K.tiles,children:(0,q.jsx)(x,{label:`Spend today`,value:(0,q.jsx)(`span`,{className:K.num,children:o===null?`unknown`:y(o)}),caption:s})}),i?(0,q.jsx)(`div`,{style:{marginTop:`var(--space-4)`},children:e.available?(0,q.jsx)(f,{title:`Spend per day`,description:`Autonomous loop, from the daemon tick ledger`,caveat:e.caveat,table:(0,q.jsx)(d,{caption:`Spend per day from the daemon tick ledger`,columns:Gt,rows:e.days,rowKey:e=>e.day}),children:(0,q.jsx)(p,{series:[{id:`spend`,label:`Spend`,points:e.days.map(e=>({x:F(e.day),y:e.usd}))}],area:!0,formatX:e=>v(e),formatY:e=>y(e),ariaLabel:`Autonomous loop spend per day`})}):(0,q.jsx)(f,{title:`Spend per day`,empty:!0,emptyMessage:e.reason,children:null})}):(0,q.jsx)(`p`,{className:K.sourceLine,children:`Per-day spend is charted above from the full usage rollup. The daemon tick ledger is not drawn again here.`})]})}function qt({now:e=Date.now()}){let t=s(P,{freshMs:15e3}),n=a(P);re(n,ge);let r=Ae();if(!t.data||!t.data.available)return null;let i=t.data.value?.budget??null,o=i?j(i):null,c=i?me(i.canLaunch,`The cloud budget does not allow another launch right now.`):null;return(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-cloud-credits`,children:[(0,q.jsxs)(`div`,{className:K.panelHead,children:[(0,q.jsx)(`h3`,{id:`verse-usage-cloud-credits`,className:K.panelTitle,children:`Cloud credits`}),(0,q.jsx)(`p`,{className:K.panelNote,children:`What Claude Code cloud sessions launched by Verse have cost, as an estimate, and the limits Verse keeps them inside.`})]}),!i||!o?(0,q.jsx)(`p`,{className:M.muted,children:t.data.reason??`The cloud lane did not answer.`}):(0,q.jsxs)(`div`,{className:M.body,children:[(0,q.jsx)(je,{actions:r}),(0,q.jsx)(fe,{value:o.value,max:o.max,label:`Credits remaining`,valueText:o.text,tone:o.tone,"aria-label":`Estimated cloud credits remaining: ${o.text}, ${o.usedText}`}),(0,q.jsxs)(`p`,{className:M.estimateNote,children:[oe(i.estimateNote,e),` `,(0,q.jsxs)(`a`,{className:M.link,href:pe,target:`_blank`,rel:`noreferrer noopener`,"aria-label":`Check the real balance on claude.ai`,children:[`Check usage on claude.ai `,(0,q.jsx)(ie,{width:12,height:12,"aria-hidden":`true`})]})]}),o.warning?(0,q.jsx)(`p`,{className:M.notice,"data-tone":`warning`,role:`note`,children:o.warning}):null,(0,q.jsx)(`p`,{className:M.facts,children:N(i,e)}),c?(0,q.jsxs)(`p`,{className:M.notice,"data-tone":`warning`,role:`note`,children:[`New launches are paused: `,c]}):null,(0,q.jsx)(R,{idPrefix:`usage-cloud-budget`,budget:i.budget,busy:r.busy,disabled:r.readOnly,onSave:e=>r.act(()=>he(e),`Change the cloud budget.`)})]}),r.dialogs]})}var Jt={five_hour:`Session · rolling 5h`,seven_day:`Week · all models`,seven_day_sonnet:`Week · Sonnet`,seven_day_opus:`Week · Opus`,seven_day_fable:`Week · Fable`,codex:`Week · Codex`,primary:`Primary window`,secondary:`Secondary window`};function Yt(e){if(e.label)return e.label;let t=Jt[e.id];if(t)return t;let n=/^seven_day_(.+)$/.exec(e.id);return n?`Week · ${n[1]}`:e.id}function Xt(e,t){let n=E(e,t);return n===null?null:`resets ${n}`}function Zt(e,t=Date.now()){let n=e.resetDescription??Xt(e.resetsAt,t);return{id:e.id,label:Yt(e),usedPct:e.limitReached?null:e.usedPercent,tone:e.limitReached?`danger`:e.usedPercent===null?`ok`:H(e.usedPercent),resetText:n,resetsAt:e.resetsAt,limitReached:e.limitReached,measured:e.measured}}function Qt(e){let t=e.windows,n=t.find(e=>e.limitReached);if(n)return n;let r=t.filter(e=>e.usedPercent!==null),i=r.length===0?null:r.reduce((e,t)=>(t.usedPercent??0)>(e.usedPercent??0)?t:e),a=e.binding;if(a){let e=t.find(e=>e.id===a.id)??null;if(e&&(a.limitReached||e.limitReached||i===null||(a.usedPercent??-1)>=(i.usedPercent??-1)))return e}return i}var $t={"connection-monitor-stopped":"Native polling stopped after a metadata sample could not confirm its process cleanup, so these readings are frozen and no new ones are being taken. Restarting `ashlr verse` begins a new collection generation.","collector-unavailable":`This server is not collecting native metadata, so nothing here is a live reading.`,"collector-not-running":`No account collector is running in this server, so these cards fall back to whatever shared evidence exists.`,"collector-owned":"Another collector (`ashlr resource-console`) owns the exclusive metadata lease, so Verse is reading its shared evidence rather than probing.","collector-start-failed":`The metadata collectors could not be started in this server, so no probe has run.`,"connection-polling-paused":`Native polling is paused because no client has asked for account data recently; it resumes on the next request.`,"connection-not-checked":`No probe has run for this account yet in this server.`,"connection-probe-unavailable":`The probe for this account did not return a usable result, so there is no measurement to show.`,"accounts-pool-unavailable":`This accounts root has no readable pool or bindings, so there is nothing to probe.`,"accounts-collection-not-configured":`Native account collection is not configured for this accounts root.`,"usage-version-unsupported":`The usage probe is pinned to a specific provider build and failed closed on the installed one. That is a version pin, not an outage.`,"usage-account-changed":`The account behind this profile changed between two reads, so the reading was discarded rather than attributed to the wrong account.`,"probe-account-unavailable":`The pinned profile answered but carries no usable account identity — it is not authenticated.`,"probe-account-unsupported":`The pinned profile is authenticated by a method this probe does not accept, so no reading was taken.`,"probe-account-changed":`The account behind this pinned profile changed mid-probe, so the reading was discarded.`,"probe-account-hint-mismatch":`The pinned profile is signed in as a different account than this seat expects.`,"probe-native-unavailable":`The provider CLI for this pinned profile could not be run, so no reading was taken.`,"probe-native-exit-failed":`The provider CLI for this pinned profile exited without a usable result.`,"probe-provider-error":`The provider CLI returned an error instead of account metadata.`,"probe-protocol-unsupported":`The installed provider CLI does not speak the metadata protocol this probe requires.`,"probe-quota-invalid":`The provider returned a quota shape this probe does not recognise, so nothing was accepted as a reading.`,"probe-timed-out":`The metadata probe for this account timed out before it returned anything.`};function en(e,t){return e===null?t:$t[e]??t}var tn={available:0,credits:1,tight:2,exhausted:3,"signed-out":4,"probe-unsupported":5,unknown:6},nn=80,rn=100;function an(e){return e?e.unlimited?!0:e.hasCredits?e.balanceValue!==null&&e.balanceValue>0:!1:!1}function on(e){return e.unlimited?`credits are unlimited on this plan`:`a credit balance of ${e.balance??`an unreported amount`} is still spendable`}function sn(e,t){if(e.authentication===`signed-out`||e.state===`signed-out`)return{state:`signed-out`,headline:`Signed out`,detail:en(e.reason,`The probe reached this account’s pinned profile but it is not authenticated, so there is nothing to measure.`),code:e.reason};if(e.unsupported)return{state:`probe-unsupported`,headline:`Probe version-pinned`,detail:`The usage probe failed closed with ${e.unsupported.code}${e.unsupported.pinnedVersion?`; it is pinned to ${e.unsupported.pinnedVersion}`:``}. This is a version pin, not an outage — no window can be read until the pin is bumped.`,code:e.unsupported.code};let n=an(e.credits);if(t===null||t.usedPercent===null&&!t.limitReached)return n&&e.credits?{state:`credits`,headline:`Usable on credits`,detail:`No window reading reached this surface, but ${on(e.credits)}.`,code:e.reason}:{state:`unknown`,headline:`No reading`,detail:en(e.reason,`No window percentage reached this surface for this account, so nothing here is a measurement.`),code:e.reason};let r=t.usedPercent,i=t.limitReached||r!==null&&r>=rn,a=Yt(t);return i?n&&e.credits?{state:`credits`,headline:`Usable on credits`,detail:`${a} is ${t.limitReached?`reported as limit reached`:`fully used`}, but ${on(e.credits)} — credits are independent of the window, so this account is not blocked.`,code:null}:{state:`exhausted`,headline:t.limitReached?`Limit reached`:`Window exhausted`,detail:t.limitReached?`The provider flagged ${a} as rate-limited. That flag is a denial, not a measurement, so no percentage is shown.`:`${a} is at ${C(r)} — it is the binding constraint on this account.`,code:null}:r>=nn?{state:`tight`,headline:`Running tight`,detail:`${a} is the binding constraint at ${C(r)}.`,code:null}:{state:`available`,headline:`Usable now`,detail:`${a} is the binding constraint at ${C(r)}.`,code:null}}function cn(e,t=null){let n=Qt(e),r=sn(e,n),i=e.provider,a=e.windows.filter(e=>e.id!==n?.id).map(e=>Zt(e)),o=n?Zt(n):null,s={state:e.state,authentication:e.authentication,health:e.health,reasonCode:e.reason,observedAt:e.observedAt,notes:e.notes,unsupported:e.unsupported};return{id:e.id,label:e.label,engine:i,color:B[i],plan:e.planType,verdict:r,allWindows:o?[o,...a]:a,evidence:s,hasDetail:e.windows.length>0||e.notes.length>0||e.credits!==null||e.reason!==null,binding:o,others:a,credits:e.credits,reconnectCommand:e.reconnectCommand,observedAt:e.observedAt,rank:tn[r.state],sourceNote:t}}function ln(e){if(!e)return[];let t=new Set;for(let n of e.accounts)for(let e of n.notes)t.add(e);return[...t]}function un(e){return e?e.accounts.map(e=>cn(e)).sort((e,t)=>e.rank-t.rank||e.label.localeCompare(t.label)):[]}function dn(e){if(!e)return null;let t=e.models.filter(e=>e.loaded),n=e.reachable?t.length===0?0:t.some(e=>e.sizeBytes===null)?null:t.reduce((e,t)=>e+(t.sizeBytes??0),0):null,r=e.memoryBudgetBytes,i=n!==null&&r!==null&&r>0?Math.max(0,Math.min(100,n/r*100)):null,a=e.reachable?t.length>0?{state:`available`,headline:`Resident now`,detail:`${t.length} model${t.length===1?``:`s`} already in memory — no load delay, no quota, no bill.`,code:null}:e.models.length>0?{state:`tight`,headline:`Installed, not loaded`,detail:`${e.models.length} model${e.models.length===1?` is`:`s are`} installed but nothing is resident, so the first turn pays a load.`,code:null}:{state:`unknown`,headline:`No models installed`,detail:`The runtime is reachable but reports no installed models.`,code:null}:{state:`unknown`,headline:`Runtime unreachable`,detail:`No local runtime answered, so neither resident nor installed models can be listed. This is an unanswered probe, not a report that the machine is empty.`,code:e.reason};return{residentCount:t.length,installedCount:e.models.length,residentBytes:n,memoryBudgetBytes:r,usedPct:i,tone:i===null?`ok`:H(i),verdict:a,color:B.local,rank:tn[a.state]}}var fn=`Per-account probes are unavailable on this server, so these cards are derived from the seat roster and the per-engine snapshots.`;function pn(e){let{seat:t,control:n,frontier:r,engineSeatCount:i}=e;if(t.engine===`local`)return null;let a=n?.subscriptionUsage?.find(e=>String(e.engine)===t.engine),o=r?.engines.find(e=>String(e.engine)===t.engine),s=ze({engine:t.engine,seat:t,subscription:a,frontier:o,engineSeatCount:i}),c=s.kind===`measured`?s.windows.map(e=>({id:e.id,label:e.label,usedPercent:e.usedPct,resetsAt:e.resetsAt===null?null:new Date(e.resetsAt*1e3).toISOString(),resetDescription:null,limitReached:!1,measured:!0})):[];return{account:{id:t.id,label:t.label,provider:t.engine,state:s.kind===`measured`?`observed`:`unavailable`,authentication:`unknown`,health:null,planType:a?.plan??null,observedAt:t.health.observedAt,windows:c,binding:null,credits:null,reason:s.kind===`measured`?null:s.reason,unsupported:null,reconnectCommand:null,notes:[]},sourceNote:s.kind===`measured`?`${Fe[s.source]}${s.scope===`engine`?` · engine-wide, shared by every account on this engine`:``}`:null}}function mn(e){let t=e.bootstrap?.seats??[],n=new Map;for(let e of t)n.set(e.engine,(n.get(e.engine)??0)+1);return t.map(t=>pn({seat:t,control:e.control,frontier:e.frontier,engineSeatCount:n.get(t.engine)??1})).filter(e=>e!==null).map(e=>cn(e.account,e.sourceNote)).sort((e,t)=>e.rank-t.rank||e.label.localeCompare(t.label))}function $(e){return e instanceof c&&e.status===401}function hn({title:e,body:t,action:n}){return(0,q.jsxs)(`div`,{className:K.stateBlock,role:`status`,children:[(0,q.jsx)(`p`,{className:K.stateTitle,children:e}),(0,q.jsx)(`p`,{className:K.stateBody,children:t}),n?(0,q.jsx)(`div`,{className:K.stateActions,children:n}):null]})}var gn=3e4,_n={gridColumn:`1 / -1`};function vn(e,t){(0,z.useEffect)(()=>{let n=null,r=()=>{n!==null&&clearInterval(n),n=null},i=()=>{let i=typeof document>`u`||document.visibilityState===`visible`;i&&n===null?n=setInterval(e,t):i||r()};return i(),document.addEventListener(`visibilitychange`,i),()=>{document.removeEventListener(`visibilitychange`,i),r()}},[e,t])}function yn(){let[e,t]=(0,z.useState)(`7d`),[n,c]=(0,z.useState)(null),l=s(Ce),u=s(ve),d=s(xe(e)),f=s(Te),p=s(ee),m=s(be),h=s(ne),g=i(Ce),_=i(ve),v=i(xe(e)),y=i(Te),b=i(ee),re=i(be),ie=i(ne),S=a(Ce),ae=a(ve);vn(S,gn),vn(ae,gn);let C=()=>{g(),_(),v(),y(),b(),re(),ie()},w=(0,z.useMemo)(()=>l.data?.available?Se(l.data.raw):null,[l.data]),T=(0,z.useMemo)(()=>u.data?.available?we(u.data.raw):null,[u.data]),oe=(0,z.useMemo)(()=>d.data?.available?ye(d.data.raw,e):null,[d.data,e]),E=(0,z.useMemo)(()=>m.data?m.data.available?Ge(m.data.raw,m.data.reason):Ke(m.data.reason??`Configured caps unavailable.`):Ke(`Configured caps not loaded yet.`),[m.data]),D=w===null,O=(0,z.useMemo)(()=>w?un(w):mn({bootstrap:h.data,control:p.data,frontier:f.data}),[w,h.data,p.data,f.data]),k=(0,z.useMemo)(()=>ke(T),[T]),A=(0,z.useMemo)(()=>dn(T),[T]),de=(0,z.useMemo)(()=>ln(w),[w]),fe=(0,z.useMemo)(()=>{let e=O.map(e=>({key:e.id,rank:e.rank,label:e.label,kind:`account`,card:e}));return A&&e.push({key:`local`,rank:A.rank,label:`Local`,kind:`local`,card:A}),e.sort((e,t)=>e.rank-t.rank||e.label.localeCompare(t.label))},[O,A]),pe=(0,z.useMemo)(()=>ue({cards:O,localCard:A,localView:k}),[O,A,k]),me=(0,z.useMemo)(()=>Oe(k?.runtimes??[]),[k]),j=ce(),M=(0,z.useMemo)(()=>new Set(O.map(e=>e.id)),[O]),N=(0,z.useMemo)(()=>new Map(j.seats.map(e=>[e.id,e.accountId])),[j.seats]),P=(0,z.useMemo)(()=>{if(n===null)return null;for(let[e,t]of N)if(t===n)return e;return null},[N,n]),he=(0,z.useCallback)(e=>{let t=N.get(e)??e;M.has(t)&&c(e=>e===t?null:t)},[N,M]),ge=e=>{c(t=>t===e?null:e)},_e=(0,z.useCallback)(()=>{let e=n;c(null),e!==null&&typeof document<`u`&&document.getElementById(`verse-account-trigger-${e}`)?.focus()},[n]),F=(0,z.useMemo)(()=>se(h.data?.sessions??[],h.data?.seats??[]),[h.data]),Ee=h.data?null:h.status===`error`?`The chat list could not be read${h.error?.message?` (${h.error.message})`:``}, so efficiency cannot be computed.`:`Reading the chat list…`,I=(0,z.useMemo)(()=>Be(p.data?.usage),[p.data]),De=(0,z.useMemo)(()=>Ve(p.data?.limits,E.foundryLimits),[p.data,E.foundryLimits]),L=(0,z.useMemo)(()=>Ue(p.data?.daemonObservation),[p.data]),Ae=E.available?E.todaySpentUsd:p.data?.daemon.todaySpentUsd??null,je=E.available?E.todaySpentDate:null,R=$(l.error)||$(u.error)||$(d.error)||$(f.error)||$(p.error)||$(h.error),B=!R&&f.status===`error`&&p.status===`error`&&f.data===void 0&&p.data===void 0,Me=!R&&!B&&l.data===void 0&&f.data===void 0&&p.data===void 0&&(l.status===`loading`||l.status===`idle`||f.status===`loading`||p.status===`loading`||f.status===`idle`||p.status===`idle`),Ne=l.status===`refreshing`||f.status===`refreshing`||p.status===`refreshing`,Pe=w?.sampledAt??f.data?.generatedAt??p.data?.ts??null;return(0,q.jsxs)(`section`,{className:K.section,"aria-label":`Usage`,children:[(0,q.jsxs)(`header`,{className:K.header,"data-app-region":`drag`,children:[(0,q.jsx)(`h2`,{className:K.headerTitle,children:`Usage`}),(0,q.jsxs)(`div`,{className:K.headerMeta,children:[Pe?(0,q.jsxs)(`span`,{children:[Ne?`refreshing · `:``,`as of `,new Date(Pe).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})]}):null,(0,q.jsx)(`button`,{type:`button`,className:K.ghostButton,onClick:C,children:`Refresh`})]})]}),(0,q.jsx)(`div`,{className:K.scroll,children:R?(0,q.jsx)(hn,{title:`Read session expired`,body:`Usage data needs an authenticated read session. Unlock the console with the read token ashlr verse printed, then refresh.`,action:(0,q.jsx)(`button`,{type:`button`,className:K.ghostButton,onClick:C,children:`Try again`})}):B?(0,q.jsx)(hn,{title:`Usage sources unreachable`,body:`Neither /api/usage nor /api/control answered. ${p.error?.message??f.error?.message??``}`.trim(),action:(0,q.jsx)(`button`,{type:`button`,className:K.ghostButton,onClick:C,children:`Retry`})}):Me?(0,q.jsxs)(`div`,{"aria-busy":`true`,children:[(0,q.jsx)(r,{width:`30%`}),(0,q.jsx)(`div`,{className:K.skeletonGrid,style:{marginTop:`var(--space-4)`},children:(0,q.jsx)(o,{count:5})})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(le,{seats:j.seats,health:j.health,budget:j.budget,selectedSeatId:P,onSelectSeat:he}),(0,q.jsx)(nt,{overview:pe}),(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-accounts`,children:[(0,q.jsxs)(`div`,{className:K.panelHead,children:[(0,q.jsx)(`h3`,{id:`verse-usage-accounts`,className:K.panelTitle,children:`Accounts`}),(0,q.jsx)(`p`,{className:K.panelNote,children:`Ordered by what you can use right now. Each card leads with its binding constraint — the window with the highest used percent, because that is what blocks work.`})]}),D&&l.data&&!l.data.available?(0,q.jsxs)(`p`,{className:K.muted,children:[l.data.reason,` `,fn]}):null,w?.collectorNote?(0,q.jsx)(`p`,{className:K.muted,children:w.collectorNote}):null,de.length>0?(0,q.jsx)(`ul`,{className:K.noteList,children:de.map(e=>(0,q.jsx)(`li`,{className:K.muted,children:e},e))}):null,O.length===0&&A===null?(0,q.jsx)(`p`,{className:K.muted,children:`No accounts and no local runtime were reported. Connect an account or start Ollama, then refresh — this is an empty roster, not a set of accounts at zero.`}):(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(`div`,{className:K.cards,children:fe.map(e=>{if(e.kind!==`account`)return(0,q.jsx)(It,{card:e.card,staleness:me},e.key);let t=n===e.key;return(0,q.jsxs)(z.Fragment,{children:[(0,q.jsx)(Xe,{card:e.card,onOpen:ge,expanded:t,triggerId:`verse-account-trigger-${e.key}`,detailId:`verse-account-detail-${e.key}`}),t?(0,q.jsx)(`div`,{id:`verse-account-detail-${e.key}`,style:_n,children:(0,q.jsx)(et,{card:e.card,headingId:`verse-account-heading-${e.key}`,onClose:_e})}):null]},e.key)})})})]}),(0,q.jsx)(Rt,{view:k}),(0,q.jsx)(Wt,{series:oe,window:e,onWindowChange:t,unavailableReason:d.data&&!d.data.available?d.data.reason:null,loading:d.status===`loading`||d.status===`idle`}),(0,q.jsx)(at,{rows:F,unavailableReason:Ee}),I?(0,q.jsx)(wt,{split:I,savingsNote:ut}):(0,q.jsxs)(`section`,{className:K.panel,"aria-labelledby":`verse-usage-split-missing`,children:[(0,q.jsx)(`div`,{className:K.panelHead,children:(0,q.jsx)(`h3`,{id:`verse-usage-split-missing`,className:K.panelTitle,children:`Local vs cloud`})}),(0,q.jsx)(`div`,{className:K.tiles,children:(0,q.jsx)(x,{label:`Not spent (ran locally)`,value:(0,q.jsx)(`span`,{className:K.num,children:`unknown`}),caption:`/api/control did not answer, so the split is unavailable`})})]}),(0,q.jsx)(qt,{}),(0,q.jsx)(st,{rows:De,capsNote:E.available?null:E.reason}),(0,q.jsx)(Kt,{series:L,todaySpentUsd:Ae,todaySpentDate:je,dailyBudgetUsd:E.dailyBudgetUsd,showSeries:oe===null}),E.available&&E.subscriptionMaxPercent!==null?(0,q.jsxs)(`p`,{className:K.muted,children:[`Subscription throttle threshold is`,` `,(0,q.jsx)(`span`,{className:K.num,children:te(E.subscriptionMaxPercent/100)}),`. It only applies to engines that publish a real window reading — no seat is ever throttled on a guess.`]}):null]})})]})}export{yn as UsageSection};
2
- //# sourceMappingURL=UsageSection-DiX_dTyo.js.map
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CommandPalette-FiD4N8XD.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/workbench-types-DzN-5trg.js","assets/verse-ui-store-zafyzXKD.js","assets/dock-store-BA1cHOYA.js","assets/viewport-BEqGUoTA.js","assets/verse-queries-DvIJcn6Z.js","assets/useActivity-Bk3XgXjL.js","assets/section-visibility-qFqc_d4Z.js","assets/CommandPalette-B5Q4hGMK.css","assets/NeedsYouDrawer-rSd1ZHAR.js","assets/Epistemic-uARPnx9x.js","assets/Epistemic-OaGnEJkn.css","assets/StatusBadge-BwnBNFQr.js","assets/StatusBadge-BVi0IBb9.css","assets/queries-BA4rNGD-.js","assets/mutations-Dpsql5t7.js","assets/RouteErrorBoundary-C5SxA2Dg.js","assets/RouteErrorBoundary-6RMd_aZg.css","assets/RefreshIndicator-BLnr9IOM.js","assets/RefreshIndicator-CVv22U_j.css","assets/DiffViewer-B7NWPjIO.js","assets/highlight-CMCZK9jW.js","assets/DiffViewer-C8HHTnVE.css","assets/guarded-action-CvOHcqyH.js","assets/icons-B_yuAgdN.js","assets/format-B8DAVcn2.js","assets/format-DKrNjdwD.js","assets/verse-model-D7NZQFAR.js","assets/Button-DYv_KKxr.js","assets/Button-DrnKsvnQ.css","assets/NeedsYouList-CG-nB1tr.js","assets/NeedsYouList-CruOt4JT.css","assets/NeedsYouDrawer-BpvidnM2.css","assets/ShortcutsOverlay-BpDimdPq.js","assets/ShortcutsOverlay-QSjxmW0a.css","assets/GearTray-C7k4l_BW.js","assets/GearTray-DQbH_yZZ.css","assets/OnboardingFlow-CkTZtt-m.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/primitives-BDIcUvob.js","assets/Segmented-BL40udoO.js","assets/Segmented-BnjHbKzH.css","assets/EmptyState-DhNgDDrF.js","assets/EmptyState-B3YUPGaa.css","assets/Meter-D-hncpkO.js","assets/Meter-CYt9KpM0.css","assets/Slider-DUMo9HDD.js","assets/Slider-AgAdMFpo.css","assets/Switch-CcR5Llk5.js","assets/Switch-CU044EaE.css","assets/Select-FWLnAw_j.js","assets/Select-DSu5ghId.css","assets/Input-B9-VLcHS.js","assets/Input-BQ3PR065.css","assets/Sheet-DZKcQXQg.js","assets/Sheet-ChxlNivX.css","assets/usage-queries-Bn8ccqyN.js","assets/OnboardingFlow-DSpPj8UE.css","assets/RailStatus-D-t2gPae.js","assets/RailStatus-C3sN_ghP.css","assets/warmup-BR6pxAKs.js","assets/ResourcesChrome-BzV6bkIa.js","assets/command-bus-DqimKCUY.js","assets/types-D5XOdyw8.js","assets/local-model-DFyjKX0b.js","assets/ResourcesChrome-B3Z3O98t.css"])))=>i.map(i=>d[i]);
2
- import{a as e,i as t,n,s as r,t as i}from"./index-oAAq8XJa.js";import{A as a,C as o,D as s,P as c,S as l,_ as u,a as d,f,it as p,lt as m,n as h,o as g,r as _,s as v,st as y,t as b,u as x}from"./global-Di2PUgj4.js";import{n as S,r as C,t as w}from"./RouteErrorBoundary-C5SxA2Dg.js";import{a as ee,c as te,d as T,l as ne,r as E,s as re}from"./command-catalog-BdtDH93o.js";import{o as ie}from"./workbench-types-DzN-5trg.js";import{i as ae,t as oe}from"./guarded-action-CvOHcqyH.js";import{n as se}from"./viewport-BEqGUoTA.js";import{A as ce,C as D,D as le,E as ue,O as de,T as fe,_ as pe,a as me,b as he,c as ge,f as _e,g as ve,i as ye,k as be,m as xe,n as Se,r as Ce,s as O,u as k,y as we}from"./verse-ui-store-zafyzXKD.js";import{d as Te,i as Ee,x as De}from"./verse-queries-DvIJcn6Z.js";import{t as Oe}from"./composer-keys-DBRymxQn.js";import{i as ke,n as A,r as j,t as Ae}from"./command-bus-DqimKCUY.js";import{n as je}from"./section-visibility-qFqc_d4Z.js";import{i as Me,n as Ne,r as Pe,t as Fe}from"./useActivity-Bk3XgXjL.js";import{S as Ie,a as Le,b as Re,d as ze,n as Be,o as Ve,u as He,v as Ue}from"./icons-B_yuAgdN.js";var M=r(e(),1),We=`ashlr:desktop-command`;function Ge(){try{return document.documentElement.getAttribute(`data-app-shell`)===`desktop`}catch{return!1}}function Ke(e){if(e===`light`||e===`dark`)return e;try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}catch{return`light`}}function N(){return window.__ASHLR_DESKTOP__}function qe(e){try{N()?.reportTheme?.(Ke(e))}catch{}}function Je(e){function t(t){let n=T(t.detail?.command);n&&e(n)}return window.addEventListener(We,t),()=>window.removeEventListener(We,t)}var Ye=`ashlr:desktop-state`;function P(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Xe(e){if(!P(e)||!P(e.hotkey)||!P(e.notifications))return!1;let t=e.hotkey,n=e.notifications;return typeof t.enabled==`boolean`&&typeof t.registered==`boolean`&&typeof t.accelerator==`string`&&t.accelerator.length>0&&t.accelerator.length<=32&&(t.error===null||typeof t.error==`string`&&t.error.length<=300)&&typeof n.enabled==`boolean`&&(n.delivery===`native`||n.delivery===`script`)}var F,Ze=!1,I=new Set;function Qe(){try{let e=N()?.getState?.();return Xe(e)?e:null}catch{return null}}function $e(e){let t=e.detail;if(Xe(t)){F=t;for(let e of[...I])e(t)}}function et(){Ze||(Ze=!0,window.addEventListener(Ye,$e))}function tt(){return et(),F??=Qe(),F}function nt(e){return et(),I.add(e),()=>{I.delete(e)}}function rt(e,t){if(e!==`globalHotkey`&&e!==`notifications`||typeof t!=`boolean`)return!1;try{return N()?.setPreference?.(e,t)===!0}catch{return!1}}function it(e){return nt(()=>e())}function at(){return(0,M.useSyncExternalStore)(it,tt,()=>null)}var ot=r(t(),1),L={wrapper:`_wrapper_6cgsw_4`,bubble:`_bubble_6cgsw_12`,"tooltip-in":`_tooltip-in_6cgsw_1`,label:`_label_6cgsw_44`,shortcut:`_shortcut_6cgsw_49`},R=n(),st=160,z=8,B=8;function ct(e){let t={top:`bottom`,bottom:`top`,left:`right`,right:`left`},n=[`top`,`bottom`,`right`,`left`].filter(n=>n!==e&&n!==t[e]);return[e,t[e],...n]}function lt(e,t,n,r){switch(e){case`top`:return{left:t.left+t.width/2-n/2,top:t.top-r-z};case`bottom`:return{left:t.left+t.width/2-n/2,top:t.bottom+z};case`left`:return{left:t.left-n-z,top:t.top+t.height/2-r/2};case`right`:return{left:t.right+z,top:t.top+t.height/2-r/2}}}function ut(e,t,n,r){let i=window.innerWidth||0,a=window.innerHeight||0,o=null;for(let s of ct(r)){let{left:r,top:c}=lt(s,e,t,n);if(o||={left:r,top:c,placement:s},r>=B&&c>=B&&r+t<=i-B&&c+n<=a-B)return{left:r,top:c,placement:s}}let s=o;return{placement:s.placement,left:Math.max(B,Math.min(s.left,i-t-B)),top:Math.max(B,Math.min(s.top,a-n-B))}}function V(e){let{label:t,content:n,shortcut:r,placement:i=`top`,disabled:a=!1,className:o,children:s}=e,[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(null),f=(0,M.useId)(),p=(0,M.useRef)(null),m=(0,M.useRef)(null),h=(0,M.useRef)(null),g=(0,M.useCallback)(()=>{h.current!==null&&(clearTimeout(h.current),h.current=null)},[]),_=(0,M.useCallback)(()=>{g(),l(!1),d(null)},[g]);(0,M.useEffect)(()=>g,[g]);let v=(0,M.useCallback)(()=>{let e=p.current,t=m.current;if(!e||!t)return;let n=e.getBoundingClientRect();d(ut(n,t.offsetWidth,t.offsetHeight,i))},[i]);(0,M.useLayoutEffect)(()=>{c&&v()},[c,v]),(0,M.useEffect)(()=>{if(!c)return;function e(e){e.key===`Escape`&&_()}return document.addEventListener(`keydown`,e),window.addEventListener(`resize`,v),window.addEventListener(`scroll`,v,!0),()=>{document.removeEventListener(`keydown`,e),window.removeEventListener(`resize`,v),window.removeEventListener(`scroll`,v,!0)}},[c,_,v]);let y=t??n;if(a||y==null||y===``)return s;function b(e){p.current=e,g(),h.current=setTimeout(()=>{h.current=null,l(!0)},st)}function x(e){p.current=e,g(),l(!0)}let S=s.props.disabled===!0,C=c?f:void 0,w=(0,M.cloneElement)(s,{"aria-describedby":C,onMouseEnter:e=>{s.props.onMouseEnter?.(e),b(e.currentTarget)},onMouseLeave:e=>{s.props.onMouseLeave?.(e),_()},onFocus:e=>{s.props.onFocus?.(e),x(e.currentTarget)},onBlur:e=>{s.props.onBlur?.(e),_()}});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{className:`${L.wrapper} ${o??``}`,"aria-describedby":C,"data-disabled-trigger":S?`true`:void 0,onMouseOver:S?e=>x(e.currentTarget):void 0,onMouseOut:S?_:void 0,children:w}),c?(0,ot.createPortal)((0,R.jsxs)(`div`,{ref:m,role:`tooltip`,id:f,className:L.bubble,"data-placement":u?.placement??i,style:{position:`fixed`,left:u?`${u.left}px`:`0px`,top:u?`${u.top}px`:`0px`,visibility:u?`visible`:`hidden`},children:[(0,R.jsx)(`span`,{className:L.label,children:y}),r?(0,R.jsx)(`kbd`,{className:L.shortcut,children:r}):null]}),document.body):null]})}var dt=`ashlr.verse.onboarding.v1`,ft={completedAt:null,dismissedAt:null};function pt(){try{let e=localStorage.getItem(dt);if(!e)return ft;let t=JSON.parse(e);return{completedAt:typeof t.completedAt==`string`?t.completedAt:null,dismissedAt:typeof t.dismissedAt==`string`?t.dismissedAt:null}}catch{return{completedAt:null,dismissedAt:new Date(0).toISOString()}}}function mt(e){try{localStorage.setItem(dt,JSON.stringify(e))}catch{}}function ht(e){return e.completedAt===null&&e.dismissedAt===null}var gt=pt(),H={...gt,open:ht(gt),step:0},_t=new Set;function U(e){let t={...H,...e};if(!Object.keys(e).every(e=>Object.is(H[e],t[e]))){H=t;for(let e of _t)e()}}function vt(e){return _t.add(e),()=>_t.delete(e)}function yt(){return H}function bt(e){U({step:Math.max(0,Math.trunc(e))})}function xt(){let e={completedAt:H.completedAt,dismissedAt:new Date().toISOString()};mt(e),U({...e,open:!1})}function St(){let e={completedAt:new Date().toISOString(),dismissedAt:H.dismissedAt};mt(e),U({...e,open:!1})}function Ct(){U({open:!0,step:0})}function wt(){return(0,M.useSyncExternalStore)(vt,yt,yt)}var Tt=`ashlr.verse.resources.v1`;function Et(){try{let e=JSON.parse(localStorage.getItem(`ashlr.verse.resources.v1`)??`null`),t=e?.pinned===!0;return{pinned:t,open:t&&e?.open===!0,summary:null}}catch{return{open:!1,pinned:!1,summary:null}}}var W=Et(),G=new Set;function K(e){let t={...W,...e};if(t.open===W.open&&t.pinned===W.pinned&&t.summary===W.summary)return;let n=t.open!==W.open||t.pinned!==W.pinned;if(W=t,n)try{localStorage.setItem(Tt,JSON.stringify({open:t.open,pinned:t.pinned}))}catch{}for(let e of[...G])e()}function q(){return W}function Dt(){K({open:!0})}function Ot(){K({open:!1})}function kt(e){K({pinned:e})}function At(e){(e===null||W.summary===null||e.tone!==W.summary.tone||e.spoken!==W.summary.spoken)&&K({summary:e})}function jt(e){return G.add(e),()=>G.delete(e)}function Mt(){return(0,M.useSyncExternalStore)(jt,q,q)}function Nt(e=null){xe(e?{focusId:e}:{})}function J(e){return`c7-anchor-${e.replace(/[^A-Za-z0-9_-]/g,`-`)}`}function Pt(e){let t=document.getElementById(J(e));t&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`center`,behavior:`smooth`})}function Ft(e,t=null){D(e),t&&requestAnimationFrame(()=>{document.getElementById(J(t))?Pt(t):requestAnimationFrame(()=>Pt(t))})}function It(e){ve(e)}var Lt=3e3;function Rt(e){return typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):e.replace(/["\\]/g,`\\$&`)}function zt(e,t,n=document){let r=n.querySelector(`[data-surface="${Rt(e)}"]`);return r?r.querySelector(`#${Rt(J(t))}`)??r.querySelector(`[data-verse-anchor="${Rt(t)}"]`):null}function Bt(e){typeof e.scrollIntoView==`function`&&e.scrollIntoView({block:`center`,behavior:`smooth`}),(e.tabIndex>=0||e.matches(`a[href],button,input,select,textarea,[tabindex]`))&&e.focus({preventScroll:!0})}function Vt({section:e,anchor:t},n=Lt){if(typeof document>`u`)return Promise.resolve(!1);let r=zt(e,t);return r&&!r.closest(`[hidden]`)?(Bt(r),Promise.resolve(!0)):new Promise(r=>{let i=!1,a=e=>{i||(i=!0,s.disconnect(),window.clearTimeout(c),e&&Bt(e),r(e!==null))},o=()=>{let n=zt(e,t);n&&!n.closest(`[hidden]`)&&a(n)},s=new MutationObserver(o);s.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`hidden`,`id`,`data-verse-anchor`]});let c=window.setTimeout(()=>a(null),n);o()})}function Ht(e){if(typeof window>`u`)return()=>{};function t(e){let t=e.detail;if(typeof t!=`object`||!t)return;let{section:n,anchor:r}=t;typeof n!=`string`||typeof r!=`string`||r.length===0||r.length>200||Vt({section:n,anchor:r})}return window.addEventListener(e,t),()=>window.removeEventListener(e,t)}var Y=()=>{};function Ut(e){Y=e??(()=>{})}function Wt(e){let t=s();if(!t)throw new v(`Mutation token was rejected.`,401,e);return t}async function Gt(){await Pe();let e=Fe().data?.running??[];if(e.length===0){Y(`Nothing is running.`,`neutral`);return}Wt(`/api/verse/sessions`);let t=await Promise.allSettled(e.map(e=>Ee(e.sessionId)));c();let n=t.filter(e=>e.status===`rejected`).length;if(Pe(),n>0)throw Error(`Stopped ${e.length-n} of ${e.length} chats; ${n} did not answer.`);Y(e.length===1?`Stopped 1 chat.`:`Stopped ${e.length} chats.`,`success`)}async function Kt(){let e=Wt(`/api/verse/authority`),t=null;try{t=await x(`/api/verse/authority`,{action:`stop`},e)}catch(t){if(!(t instanceof v&&t.status===404&&t.code===null))throw t;await x(`/api/verse/daemon`,{action:`stop`},e)}c(),Pe(),Y(qt(t),`success`)}function qt(e){let t=`Fleet stopped. It stays stopped until you resume it.`,n=e?.result?.stop;if(typeof n!=`object`||!n)return t;let{quiesced:r,liveExecutionLeases:i,mergeRevokeFailures:a}=n,o=[t];if(r===!1){let e=typeof i==`number`&&Number.isFinite(i)&&i>0?i:null;o.push(e===null?`Agents already running are finishing.`:`${e} agent${e===1?` is`:`s are`} still finishing work started before Stop.`)}if(Array.isArray(a)&&a.length>0){let e=a.length;o.push(`${e} armed merge${e===1?``:`s`} could not be revoked; Stop still blocks ${e===1?`it`:`them`}.`)}return o.join(` `)}function Jt(){return document.querySelector(`[data-surface="chat"] textarea[aria-label="Message"]`)!==null}function Yt(e){window.dispatchEvent(new CustomEvent(E,{detail:{id:e}}))}function Xt(e,t=Ae){if(typeof document>`u`)return;if(k().section!==`chat`&&D(`chat`),Jt()){Yt(e);return}let n=!1,r=t=>{n||(n=!0,i.disconnect(),window.clearTimeout(a),t&&window.setTimeout(()=>Yt(e),50))},i=new MutationObserver(()=>{Jt()&&r(!0)});i.observe(document.body,{childList:!0,subtree:!0});let a=window.setTimeout(()=>r(!1),t)}var Zt=new Set(Oe),Qt={"chats.stop-all":Gt,"fleet.stop":Kt};function X(e,t={}){let n=re(e);if(!n)return!1;if(n.group!==null&&t.via===`palette`&&pe(n.id),n.guard){let r=Qt[n.id];if(!r)return j(e,t);let{confirm:i,token:a}=n.guard;return ae({title:i.title,body:i.body,confirmLabel:i.confirmLabel,destructive:i.destructive,token:a,tokenReason:`${n.title.replace(/…$/,``)} requires the dispatch token.`,run:r}),!0}return Zt.has(n.id)?(j(e,t)||Xt(e),!0):n.scope===`chat`||n.scope===`composer`?j(e,t)?!0:(k().section!==`chat`&&D(`chat`),ke(e,t),!0):j(e,t)?!0:(Y(`${n.title} isn't available here yet.`,`neutral`),!1)}function $t(){let e=[...[[`surface.command`,`command`],[`surface.fleet`,`fleet`],[`surface.growth`,`growth`],[`surface.mind`,`mind`],[`surface.chat`,`chat`],[`section.settings`,`settings`],[`section.apps`,`apps`],[`section.usage`,`usage`]].map(([e,t])=>A(e,()=>D(t))),A(`palette.open`,()=>le(`palette`)),A(`needs-you.open`,e=>{e.via!==`menu`&&k().overlay===`needs-you`?O():xe()}),A(`shortcuts.open`,()=>le(`shortcuts`)),A(`history.back`,()=>{fe(-1)}),A(`history.forward`,()=>{fe(1)}),A(`chat.recent-next`,()=>{ge(1)}),A(`chat.recent-prev`,()=>{ge(-1)}),A(`rail.toggle-labels`,()=>de()),A(`chat.new`,()=>we(`new-chat`)),A(`chat.new-on`,e=>{let t=e.argument?.kind===`seat`?e.argument.id:void 0;we(`new-chat`,t?{seatId:t}:{})}),A(`appearance.toggle-theme`,()=>l()),A(`app.summon`,()=>we(`focus-composer`))];return()=>e.forEach(e=>e())}function en(){let e=C();(0,M.useEffect)(()=>(Ut(e.show),()=>Ut(null)),[e.show]),(0,M.useEffect)(()=>$t(),[])}var Z={frame:`_frame_hm6ck_1`,strip:`_strip_hm6ck_9`,chat:`_chat_hm6ck_18`,chatList:`_chatList_hm6ck_19`,chatBody:`_chatBody_hm6ck_20`,grid:`_grid_hm6ck_22`,wide:`_wide_hm6ck_29`,kpi:`_kpi_hm6ck_30`,half:`_half_hm6ck_31`,column:`_column_hm6ck_33`,missing:`_missing_hm6ck_35`,missingTitle:`_missingTitle_hm6ck_42`,missingBody:`_missingBody_hm6ck_49`},tn=new Set([`command`,`fleet`,`growth`,`mind`]);function nn({section:e,label:t}){return(0,R.jsxs)(`div`,{className:Z.frame,role:`status`,"aria-label":`Loading ${t}`,"data-skeleton":e,children:[(0,R.jsx)(`div`,{className:Z.strip,children:(0,R.jsx)(d,{width:`140px`})}),e===`chat`?(0,R.jsxs)(`div`,{className:Z.chat,children:[(0,R.jsx)(`div`,{className:Z.chatList,children:Array.from({length:8},(e,t)=>(0,R.jsx)(d,{width:`${70+t*13%25}%`},t))}),(0,R.jsxs)(`div`,{className:Z.chatBody,children:[(0,R.jsx)(d,{width:`42%`}),(0,R.jsx)(d,{width:`88%`}),(0,R.jsx)(d,{width:`76%`}),(0,R.jsx)(d,{width:`64%`})]})]}):tn.has(e)?(0,R.jsxs)(`div`,{className:Z.grid,children:[(0,R.jsx)(`div`,{className:Z.wide,children:(0,R.jsx)(d,{width:`60%`})}),Array.from({length:5},(e,t)=>(0,R.jsx)(`div`,{className:Z.kpi,children:(0,R.jsx)(_,{})},t)),(0,R.jsx)(`div`,{className:Z.half,children:(0,R.jsx)(_,{})}),(0,R.jsx)(`div`,{className:Z.half,children:(0,R.jsx)(_,{})})]}):(0,R.jsx)(`div`,{className:Z.column,children:Array.from({length:6},(e,t)=>(0,R.jsx)(g,{},t))})]})}function rn({label:e,blurb:t}){return(0,R.jsxs)(`div`,{className:Z.missing,role:`status`,children:[(0,R.jsxs)(`h1`,{className:Z.missingTitle,children:[e,` isn't in this build yet`]}),(0,R.jsx)(`p`,{className:Z.missingBody,children:t}),(0,R.jsx)(`p`,{className:Z.missingBody,children:`It appears here as soon as it ships. Everything else in Verse works normally.`})]})}function an(){return(0,M.useSyncExternalStore)(ue,k,k)}var on=Be,sn=He,cn=Ie,ln=Re,un=Ue,dn=Le,fn=Ve;function Q({size:e=16,children:t,...n}){return(0,R.jsx)(`svg`,{viewBox:`0 0 16 16`,width:e,height:e,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,...n,children:t})}function pn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`rect`,{x:`2.5`,y:`3`,width:`11`,height:`10`,rx:`1.5`}),(0,R.jsx)(`path`,{d:`M10 3v10`})]})}function mn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`rect`,{x:`2.5`,y:`3`,width:`11`,height:`10`,rx:`1.5`}),(0,R.jsx)(`path`,{d:`M6 3v10`})]})}function hn(e){return(0,R.jsxs)(Q,{width:`1em`,height:`1em`,style:{display:`inline-block`,verticalAlign:`-0.125em`},...e,children:[(0,R.jsx)(`path`,{d:`M13 3.5v5a2 2 0 0 1-2 2H3.5`}),(0,R.jsx)(`path`,{d:`M6 8 3.5 10.5 6 13`})]})}function gn(e){let{size:t=20,...n}=e;return(0,R.jsx)(`svg`,{viewBox:`0 0 32 32`,width:t,height:t,fill:`none`,stroke:`currentColor`,strokeWidth:1.8,strokeLinejoin:`round`,strokeLinecap:`round`,"aria-hidden":`true`,focusable:`false`,...n,children:(0,R.jsx)(`path`,{d:`m5 11 11-6 11 6-11 6Z M5 16l11 6 11-6 M5 21l11 6 11-6`})})}function _n(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`5`,height:`6`,rx:`1`}),(0,R.jsx)(`rect`,{x:`8.5`,y:`2.5`,width:`5`,height:`3.5`,rx:`1`}),(0,R.jsx)(`rect`,{x:`8.5`,y:`7.5`,width:`5`,height:`6`,rx:`1`}),(0,R.jsx)(`rect`,{x:`2.5`,y:`10`,width:`5`,height:`3.5`,rx:`1`})]})}function vn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`path`,{d:`M2.5 4.5h5M2.5 8h9M2.5 11.5h3.5`}),(0,R.jsx)(`circle`,{cx:`10`,cy:`4.5`,r:`1.3`}),(0,R.jsx)(`circle`,{cx:`13.2`,cy:`8`,r:`1.3`}),(0,R.jsx)(`circle`,{cx:`8.5`,cy:`11.5`,r:`1.3`})]})}function yn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`path`,{d:`M2.5 12.5 6.5 8.5l2.5 2.5 4.5-5`}),(0,R.jsx)(`path`,{d:`M10.5 6h3v3`})]})}function bn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`path`,{d:`M8 2.5a4 4 0 0 0-2.4 7.2c.3.25.4.6.4 1v.8h4v-.8c0-.4.1-.75.4-1A4 4 0 0 0 8 2.5Z`}),(0,R.jsx)(`path`,{d:`M6.5 13.5h3`})]})}function xn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`4.5`,height:`4.5`,rx:`1`}),(0,R.jsx)(`rect`,{x:`9`,y:`2.5`,width:`4.5`,height:`4.5`,rx:`1`}),(0,R.jsx)(`rect`,{x:`2.5`,y:`9`,width:`4.5`,height:`4.5`,rx:`1`}),(0,R.jsx)(`rect`,{x:`9`,y:`9`,width:`4.5`,height:`4.5`,rx:`1`})]})}function Sn(e){return(0,R.jsxs)(Q,{...e,children:[(0,R.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2.1`}),(0,R.jsx)(`path`,{d:`M8 1.8v1.7M8 12.5v1.7M14.2 8h-1.7M3.5 8H1.8M12.4 3.6l-1.2 1.2M4.8 11.2l-1.2 1.2M12.4 12.4l-1.2-1.2M4.8 4.8 3.6 3.6`}),(0,R.jsx)(`circle`,{cx:`8`,cy:`8`,r:`4.4`})]})}var Cn=ze,wn={command:_n,fleet:vn,growth:yn,mind:bn,chat:on,settings:cn,apps:xn,usage:sn},$={shell:`_shell_k3usr_6`,rail:`_rail_k3usr_51`,railDragStrip:`_railDragStrip_k3usr_85`,mark:`_mark_k3usr_94`,railList:`_railList_k3usr_104`,railFoot:`_railFoot_k3usr_113`,railButton:`_railButton_k3usr_128`,railIcon:`_railIcon_k3usr_154`,railLabel:`_railLabel_k3usr_164`,railKey:`_railKey_k3usr_178`,section:`_section_k3usr_229`,surface:`_surface_k3usr_242`};function Tn(e){if(typeof e!=`number`||!Number.isFinite(e))return`—`;let t=Math.max(0,Math.min(100,e));return t>0&&t<1?`<1%`:t>99&&t<100?`99%`:`${Math.round(t)}%`}function En({label:e,blurb:t}){return(0,R.jsx)(rn,{label:e,blurb:t??``})}function Dn(e){let t=he(e);return async()=>{let n=_e(e),r=n?ce(n):void 0;if(!n||!r)return{default:()=>(0,R.jsx)(En,{label:t.label,blurb:t.blurb})};try{let e=await r(),t=e[n]??e.default;if(typeof t==`function`)return{default:t};console.error(`[verse] ${n} exports no ${n} component`)}catch(e){console.error(`[verse] ${t.label} failed to load`,e)}return{default:()=>(0,R.jsx)(En,{label:t.label,blurb:t.blurb})}}}var On=new Map,kn=new Map;function An(e){let t=On.get(e);return t||(t=Dn(e)().then(t=>(kn.set(e,t.default),t)),On.set(e,t)),t}var jn=new Map(ye.map(e=>[e.id,(0,M.lazy)(()=>An(e.id))])),Mn=()=>i(()=>import(`./CommandPalette-FiD4N8XD.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])),Nn=()=>i(()=>import(`./NeedsYouDrawer-rSd1ZHAR.js`),__vite__mapDeps([15,1,2,3,4,5,16,17,18,19,20,21,22,23,24,25,26,27,28,6,7,29,10,8,9,11,12,13,30,31,32,33,34,35,36,37,38])),Pn=()=>i(()=>import(`./ShortcutsOverlay-BpDimdPq.js`).then(e=>e.t),__vite__mapDeps([39,1,4,2,3,5,6,8,7,9,10,40])),Fn=()=>i(()=>import(`./GearTray-C7k4l_BW.js`),__vite__mapDeps([41,1,2,3,6,8,7,9,10,30,42])),In=()=>i(()=>import(`./OnboardingFlow-CkTZtt-m.js`),__vite__mapDeps([43,1,2,3,8,7,9,10,30,31,32,33,44,11,13,45,46,47,48,49,50,51,52,53,34,35,54,4,5,16,17,18,19,22,23,24,25,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72])),Ln=()=>i(()=>import(`./RailStatus-D-t2gPae.js`),__vite__mapDeps([73,1,44,2,3,11,7,13,31,32,33,45,46,47,48,49,50,51,52,53,74])),Rn=()=>i(()=>import(`./warmup-BR6pxAKs.js`),__vite__mapDeps([75,1,8,7,9,10])),zn=()=>i(()=>import(`./ResourcesChrome-BzV6bkIa.js`).then(e=>e.t),__vite__mapDeps([76,1,6,8,7,9,10,77,44,2,3,11,13,31,32,33,45,46,47,48,49,50,51,52,53,78,79,80])),Bn=(0,M.lazy)(()=>Mn().then(e=>({default:e.CommandPalette}))),Vn=(0,M.lazy)(()=>Nn().then(e=>({default:e.NeedsYouDrawer}))),Hn=(0,M.lazy)(()=>Pn().then(e=>({default:e.ShortcutsOverlay}))),Un=(0,M.lazy)(()=>Fn().then(e=>({default:e.GearTray}))),Wn=(0,M.lazy)(()=>In().then(e=>({default:e.OnboardingFlow}))),Gn=(0,M.lazy)(()=>zn().then(e=>({default:e.ResourcesChrome}))),Kn=(0,M.lazy)(()=>zn().then(e=>({default:e.ResourcesRailButton})));function qn(e){let t=()=>{let e=y();return e.active+e.queued>0},n=!0,r=null;return Rn().then(i=>{n&&(r=i.warmUpAfterFirstPaint({loadSection:An,overlays:[Mn,Nn,Pn,()=>zn().then(e=>e.preloadResourcesDrawer())],readsInFlight:t},e))},()=>void 0),()=>{n=!1,r?.()}}var Jn=null;function Yn(){let[e,t]=(0,M.useState)(Jn);return(0,M.useEffect)(()=>{if(e)return;let n=!0;return Ln().then(e=>{Jn=e,n&&t(e)},e=>console.error(`[verse] rail status failed to load`,e)),()=>{n=!1}},[e]),e}function Xn(){return[...document.querySelectorAll(`[aria-modal="true"]`)].some(e=>!e.hasAttribute(`data-verse-overlay`)&&!e.querySelector(`[data-verse-overlay]`))}var Zn=3;function Qn(){let e=an(),t=u(),n=C(),r=Me(),{compact:i}=se(),a=(0,M.useMemo)(()=>ee(),[]),o=(0,M.useRef)(null),[c,l]=(0,M.useState)(!1),d=r.data,f=Yn(),p=wt(),m=Mt();(0,M.useEffect)(()=>qn(),[]);let[h,g]=(0,M.useState)(!1);(0,M.useEffect)(()=>{let e=!0;return Fn().then(()=>{e&&g(!0)},e=>console.error(`[verse] settings tray failed to load`,e)),()=>{e=!1}},[]),en(),(0,M.useEffect)(()=>{function e(e){if(e.defaultPrevented||k().overlay===`palette`||Xn())return;let t=ne(e,[`global`]);t&&(e.preventDefault(),X(t.id,{via:`key`}))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]),(0,M.useEffect)(()=>Je(e=>{if(e.kind===`open-session`){O(),ve(e.sessionId);return}(e.name===`new-chat`||e.name===`focus-composer`)&&O(),X(e.commandId,{via:`menu`})}),[]),(0,M.useEffect)(()=>Ht(Ce),[]),(0,M.useEffect)(()=>{qe(t.theme)},[t.theme]),(0,M.useEffect)(()=>{if(!e.announceChatMoved)return;let t=re(`surface.chat`)?.keys[0];n.show(`Chat moved to ${t?te(t,a):`⌘5`} — Command, Fleet, Growth and Mind come first now.`),me()},[e.announceChatMoved,n,a]),(0,M.useEffect)(()=>Ne(e=>{if(typeof document<`u`&&document.visibilityState===`hidden`)return;let t=k(),r=e.filter(e=>t.section!==`chat`||t.activeSessionId!==e.sessionId),i=r.filter(e=>e.outcome===`failed`);for(let e of i.slice(0,Zn))n.show(`Failed: ${e.title}`,`danger`);let a=r.filter(e=>e.outcome===`ok`);if(a.length>Zn)n.show(`${a.length} chats finished.`,`success`);else for(let e of a)n.show(`Finished: ${e.title}`,`success`)}),[n]);let[_,v]=(0,M.useState)(null),y=d?.mind?.latestMemoAt??null;(0,M.useEffect)(()=>{if(e.section!==`mind`||!d?.mind?.unseen||!y)return;v(y);let t=s();t&&x(ie,{surface:`mind`},t).catch(()=>void 0)},[e.section,d?.mind?.unseen,y]);let b=e.railExpanded&&!i,S=d?d.counts.needsYou:null,w=he(e.section),T=w.placement===`tray`?w:null,E=f?.RailBadgeMark??null,ae=e=>{let t=re(e)?.keys[0];return t?te(t,a):void 0};return(0,R.jsxs)(`div`,{className:$.shell,"data-rail":b?`expanded`:`collapsed`,"data-compact":i||void 0,"data-resources":m.open&&m.pinned&&!i?`docked`:void 0,children:[(0,R.jsxs)(`nav`,{className:$.rail,"data-rail":b?`expanded`:`collapsed`,"aria-label":`Verse sections`,children:[(0,R.jsx)(`span`,{className:$.railDragStrip,"data-app-region":`drag`,"aria-hidden":`true`}),(0,R.jsx)(V,{label:`Ashlr Verse`,placement:`right`,disabled:b,children:(0,R.jsxs)(`span`,{className:$.mark,children:[(0,R.jsx)(gn,{}),(0,R.jsx)(`span`,{className:`visually-hidden`,children:`Ashlr Verse`})]})}),(0,R.jsx)(`ul`,{className:$.railList,children:Se.map(t=>{let n=wn[t.id],r=t.id===`mind`&&y!==null&&_===y||!f?null:f.railBadgeFor(t.id,d),a=e.section===t.id,o=ae(`surface.${t.id}`);return(0,R.jsx)(`li`,{children:(0,R.jsx)(V,{label:t.label,shortcut:o,placement:`right`,disabled:b||i,children:(0,R.jsxs)(`button`,{type:`button`,className:$.railButton,"aria-current":a?`page`:void 0,"data-section":t.id,"aria-label":`${t.label}${r?.spoken??``}`,onClick:()=>D(t.id),children:[(0,R.jsxs)(`span`,{className:$.railIcon,children:[(0,R.jsx)(n,{}),r&&E?(0,R.jsx)(E,{badge:r}):null]}),b||i?(0,R.jsx)(`span`,{className:$.railLabel,children:t.label}):null,b&&o?(0,R.jsx)(`span`,{className:$.railKey,"aria-hidden":`true`,children:o}):null]})})},t.id)})}),(0,R.jsxs)(`div`,{className:$.railFoot,children:[(0,R.jsx)(V,{label:`Needs you`,shortcut:ae(`needs-you.open`),placement:`right`,disabled:b||i,children:(0,R.jsxs)(`button`,{type:`button`,className:$.railButton,"aria-label":S===null?`Needs you`:`Needs you, ${S}`,"aria-expanded":e.overlay===`needs-you`,"data-needs-you":S??void 0,onClick:()=>X(`needs-you.open`,{via:`button`}),children:[(0,R.jsxs)(`span`,{className:$.railIcon,children:[(0,R.jsx)(Cn,{}),S&&E?(0,R.jsx)(E,{badge:{kind:`count`,count:S,spoken:``,tone:`warning`}}):null]}),b||i?(0,R.jsx)(`span`,{className:$.railLabel,children:i?`Inbox`:`Needs you`}):null]})}),i?null:(0,R.jsx)(M.Suspense,{fallback:null,children:(0,R.jsx)(Kn,{expanded:b,buttonClass:$.railButton,iconClass:$.railIcon,labelClass:$.railLabel})}),f&&!i?(0,R.jsx)($n,{rail:f,expanded:b}):null,(0,R.jsx)(V,{label:`Settings and more`,placement:`right`,disabled:b||i||c,children:(0,R.jsxs)(`button`,{ref:o,type:`button`,className:$.railButton,"aria-label":T?`Settings and more (${T.label} open)`:`Settings and more`,"aria-haspopup":`menu`,"aria-expanded":c,"aria-current":T?`page`:void 0,"data-gear":!0,"data-active":T?!0:void 0,onClick:()=>l(e=>!e),children:[(0,R.jsx)(`span`,{className:$.railIcon,children:(0,R.jsx)(Sn,{})}),b||i?(0,R.jsx)(`span`,{className:$.railLabel,children:i?`More`:`Settings`}):null]})})]})]}),(0,R.jsx)(`main`,{className:$.section,"data-section":e.section,id:`main-content`,tabIndex:-1,children:e.mounted.map(t=>(0,R.jsx)(er,{id:t,active:t===e.section},t))}),(0,R.jsx)(M.Suspense,{fallback:null,children:h||c?(0,R.jsx)(Un,{open:c,anchorRef:o,onClose:()=>l(!1),compact:i}):null}),(0,R.jsx)(M.Suspense,{fallback:null,children:(0,R.jsx)(Gn,{compact:i})}),(0,R.jsxs)(M.Suspense,{fallback:null,children:[e.overlay===`palette`?(0,R.jsx)(Bn,{}):null,e.overlay===`needs-you`?(0,R.jsx)(Vn,{}):null,e.overlay===`shortcuts`?(0,R.jsx)(Hn,{}):null]}),(0,R.jsx)(oe,{}),(0,R.jsx)(M.Suspense,{fallback:null,children:p.open?(0,R.jsx)(Wn,{}):null})]})}function $n({rail:e,expanded:t}){let n=e.useRailCapacity();if(!n)return null;let{CapacityRing:r,describeRailCapacity:i}=e;return(0,R.jsx)(V,{label:i(n),placement:`right`,disabled:t,children:(0,R.jsxs)(`button`,{type:`button`,className:$.railButton,"aria-label":`Capacity — ${i(n)}`,"data-capacity":Math.round(n.usedPercent),onClick:()=>D(`apps`,`seat:${n.seatId}`),children:[(0,R.jsx)(`span`,{className:$.railIcon,children:(0,R.jsx)(r,{badge:n})}),t?(0,R.jsxs)(`span`,{className:$.railLabel,children:[n.label,` `,n.limitReached?`limit`:Tn(n.usedPercent)]}):null]})})}function er({id:e,active:t}){let[n]=(0,M.useState)(()=>kn.get(e)??jn.get(e)),r=he(e);return(0,R.jsx)(`div`,{className:$.surface,"data-surface":e,hidden:!t,inert:!t,children:(0,R.jsx)(je,{visible:t,children:(0,R.jsx)(w,{resetKey:e,children:(0,R.jsx)(M.Suspense,{fallback:(0,R.jsx)(nn,{section:e,label:r.label}),children:(0,R.jsx)(n,{})})})})})}var tr=`/next/assets/AshlrSans-latin-DVBgX9ac.woff2`,nr=`/next/assets/SpaceGrotesk-latin-C6WxOMZt.woff2`,rr={shell:`_shell_k4nf7_1`,checking:`_checking_k4nf7_2`};function ir(e=typeof document>`u`?null:document){let t=ye.find(e=>e.id===k().section),n=t?be[`./sections/${t.module}.tsx`]:void 0;if(n&&n().catch(()=>void 0),e?.head)for(let t of[tr,nr]){if([...e.head.querySelectorAll(`link[rel="preload"]`)].some(e=>e.getAttribute(`href`)===t))continue;let n=e.createElement(`link`);n.rel=`preload`,n.as=`font`,n.type=`font/woff2`,n.crossOrigin=`anonymous`,n.href=t,e.head.append(n)}}ir();var ar=`ashlr:sidecar-restarted`;function or(e=window){let t=!1,n=!1,r=!1,i=()=>{if(!r){if(t){n=!0;return}t=!0,o().then(e=>{e&&Te()}).catch(()=>void 0).finally(()=>{t=!1,n&&(n=!1,i())})}};return e.addEventListener(ar,i),()=>{r=!0,e.removeEventListener(ar,i)}}function sr(){let e=f();return(0,M.useEffect)(()=>or(),[]),(0,M.useEffect)(()=>{if(e!==`checking`)return;let t=!1;return o().then(e=>{if(!(t||e))return m(De.key,De.fetch).then(()=>{t||a(p(De.key).status===`success`)})}),()=>{t=!0}},[e]),e===`checking`?(0,R.jsx)(`p`,{className:rr.checking,role:`status`,children:`Checking for an existing Verse session…`}):e===`unauthenticated`?(0,R.jsx)(b,{heading:`Connect to Ashlr Verse`,command:`ashlr verse`,subject:`Ashlr Verse`,mutationField:!0}):(0,R.jsxs)(S,{children:[(0,R.jsx)(h,{}),(0,R.jsx)(`div`,{className:rr.shell,children:(0,R.jsx)(Qn,{})})]})}export{bt as A,kt as C,St as D,wt as E,Ge as M,rt as N,xt as O,at as P,Dt as S,Mt as T,sr as VerseConsoleApp,Ft as _,pn as a,Ot as b,wn as c,mn as d,sn as f,J as g,X as h,fn as i,V as j,Ct as k,ln as l,an as m,xn as n,un as o,gn as p,dn as r,hn as s,Tn as t,cn as u,It as v,At as w,q as x,Nt as y};
3
- //# sourceMappingURL=VerseConsoleApp-WVeyJnW7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";snCA2BM,GAAwB,wBAS9B,SAAgB,IAA0B,CACxC,GAAI,CACF,OAAO,SAAS,gBAAgB,aAAa,gBAAgB,IAAM,SACrE,MAAQ,CACN,MAAO,EACT,CACF,CASA,SAAgB,GAAa,EAA+C,CAC1E,GAAI,IAAe,SAAW,IAAe,OAAQ,OAAO,EAC5D,GAAI,CACF,OAAO,OAAO,WAAW,8BAA8B,CAAC,CAAC,QAAU,OAAS,OAC9E,MAAQ,CAEN,MAAO,OACT,CACF,CAQA,SAAS,GAAoC,CAC3C,OAAQ,OAA4D,iBACtE,CAQA,SAAgB,GAAmB,EAAmC,CACpE,GAAI,CACF,EAAO,CAAC,EAAE,cAAc,GAAa,CAAU,CAAC,CAClD,MAAQ,CAER,CACF,CAgCA,SAAgB,GAA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,EAAD,YACE,SAAC,EAAD,CAAgB,IAChB,SAAC,MAAD,CAAK,UAAW,GAAO,MAAO,mBAAC,GAAD,CAAW,EAAM,EAClC,GAEnB","names":[],"ignoreList":[],"sources":["../../../../../../src/web-ui/app/desktop-shell.ts","../../../../../../src/web-ui/components/primitives/Tooltip.tsx","../../../../../../src/web-ui/routes/verse/onboarding/onboarding-store.ts","../../../../../../src/web-ui/routes/verse/onboarding/useOnboarding.ts","../../../../../../src/web-ui/routes/verse/resources/resources-store.ts","../../../../../../src/web-ui/routes/verse/command/nav.ts","../../../../../../src/web-ui/routes/verse/shell/reveal-anchor.ts","../../../../../../src/web-ui/routes/verse/shell/run-command.ts","../../../../../../src/web-ui/routes/verse/shell/skeletons.tsx","../../../../../../src/web-ui/routes/verse/useVerseUi.ts","../../../../../../src/web-ui/routes/verse/verse-icons.tsx","../../../../../../src/web-ui/routes/verse/percent-text.ts","../../../../../../src/web-ui/routes/verse/VerseApp.tsx","../../../../../../src/web-ui/design/fonts/AshlrSans-latin.woff2?url","../../../../../../src/web-ui/design/fonts/SpaceGrotesk-latin.woff2?url","../../../../../../src/web-ui/app/VerseConsoleApp.tsx"],"sourcesContent":["/**\n * app/desktop-shell.ts — the web half of the desktop shell contract.\n *\n * The native side (`desktop/src-tauri/src/shell_contract.{rs,js}`, documented\n * in `desktop/README.md` → \"Desktop shell contract\") injects markers, CSS\n * variables, a drag-region mirror, a command event (menu bar, tray, clicked\n * notifications, the global hotkey), the desktop state behind Settings ▸\n * Desktop, and two page→native calls (theme, preferences). This module is the\n * ONLY place the web UI touches any of it, so the console keeps exactly one\n * seam to the desktop app and never references Tauri.\n *\n * Everything here is inert in a browser: the markers are absent, the global\n * is undefined, and the event is never dispatched. No caller needs a\n * conditional build or a feature flag.\n */\nimport { useSyncExternalStore } from 'react';\nimport type { ThemePreference } from '../data/theme-store.js';\nimport { parseDesktopCommand, type ParsedDesktopCommand } from '../routes/verse/shell/command-catalog.js';\n\n/**\n * The two commands the native MENU BAR sends (the 3.9 contract).\n * `subscribeDesktopCommands` keeps delivering exactly these; everything the\n * 3.10 shell sends (tray, notifications, hotkey) arrives through\n * `subscribeShellCommands`, parsed by the command catalog.\n */\nexport type DesktopCommand = 'open-settings' | 'toggle-theme';\n\nconst DESKTOP_COMMAND_EVENT = 'ashlr:desktop-command';\nconst COMMANDS: readonly DesktopCommand[] = ['open-settings', 'toggle-theme'];\n\n/**\n * True only inside the Tauri window, where `shell_contract.js` has stamped\n * `data-app-shell=\"desktop\"` on `<html>`. Layout does NOT branch on this —\n * the CSS reads `--app-titlebar-height` / `--app-traffic-light-inset` with a\n * `0px` fallback instead, so there is one layout, not two.\n */\nexport function isDesktopShell(): boolean {\n try {\n return document.documentElement.getAttribute('data-app-shell') === 'desktop';\n } catch {\n return false;\n }\n}\n\n/**\n * Resolve a three-state preference down to what is actually painted, which is\n * what the native side needs: it stores the value and paints the window\n * background with the matching canvas colour on the NEXT launch, before the\n * webview has painted. 'system' therefore has to become a concrete answer\n * here, not be passed through.\n */\nexport function resolveTheme(preference: ThemePreference): 'light' | 'dark' {\n if (preference === 'light' || preference === 'dark') return preference;\n try {\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n } catch {\n // jsdom and old webviews without matchMedia: light is the token default.\n return 'light';\n }\n}\n\ninterface DesktopBridge {\n reportTheme?: (theme: 'light' | 'dark') => void;\n getState?: () => unknown;\n setPreference?: (name: DesktopPreference, value: boolean) => boolean;\n}\n\nfunction bridge(): DesktopBridge | undefined {\n return (window as unknown as { __ASHLR_DESKTOP__?: DesktopBridge }).__ASHLR_DESKTOP__;\n}\n\n/**\n * Tell the native window which theme is painted, so the next cold launch does\n * not flash white. Optional by contract, best-effort by implementation: a\n * browser has no bridge, and a throwing bridge must never break a render.\n * Repeat calls with the same value are dropped on the native side.\n */\nexport function reportThemeToShell(preference: ThemePreference): void {\n try {\n bridge()?.reportTheme?.(resolveTheme(preference));\n } catch {\n /* the shell is an enhancement; never let it fail the page */\n }\n}\n\nfunction isDesktopCommand(value: unknown): value is DesktopCommand {\n return typeof value === 'string' && (COMMANDS as readonly string[]).includes(value);\n}\n\n/**\n * Listen for menu commands. Returns an unsubscribe function, so a component\n * can register it from an effect.\n *\n * Unknown commands are ignored rather than forwarded: the native menu can\n * grow ahead of the web UI, and an unhandled command is specified to be inert\n * rather than an error.\n */\nexport function subscribeDesktopCommands(handler: (command: DesktopCommand) => void): () => void {\n function onCommand(event: Event): void {\n const detail = (event as CustomEvent<{ command?: unknown }>).detail;\n const command = detail?.command;\n if (isDesktopCommand(command)) handler(command);\n }\n window.addEventListener(DESKTOP_COMMAND_EVENT, onCommand);\n return () => window.removeEventListener(DESKTOP_COMMAND_EVENT, onCommand);\n}\n\n/**\n * Every desktop command — menu bar, tray, a clicked notification, the global\n * hotkey — parsed by the command catalog (`parseDesktopCommand`): a catalog\n * command (`open-needs-you`, `new-chat`, `focus-composer`, …) or\n * `open-session:<id>`. Unknown strings are dropped, never guessed. This is\n * what the workbench shell (C1) listens to; `subscribeDesktopCommands` stays\n * for the 3.9 menu-only contract.\n */\nexport function subscribeShellCommands(handler: (command: ParsedDesktopCommand) => void): () => void {\n function onCommand(event: Event): void {\n const parsed = parseDesktopCommand((event as CustomEvent<{ command?: unknown }>).detail?.command);\n if (parsed) handler(parsed);\n }\n window.addEventListener(DESKTOP_COMMAND_EVENT, onCommand);\n return () => window.removeEventListener(DESKTOP_COMMAND_EVENT, onCommand);\n}\n\n// ===========================================================================\n// Desktop state — Settings ▸ Desktop (V3.10, C8)\n// ===========================================================================\n\n/** Preferences Settings ▸ Desktop may change (desktop_prefs.rs `PrefsPatch`). */\nexport type DesktopPreference = 'globalHotkey' | 'notifications';\n\n/**\n * What the desktop app reports (desktop_prefs.rs `DesktopStateView`). Every\n * string is the shell's own copy — nothing from the server.\n */\nexport interface DesktopState {\n hotkey: {\n /** The operator's choice. */\n enabled: boolean;\n /** Whether macOS actually gave Ashlr the chord. */\n registered: boolean;\n /** Display form, e.g. \"⌃⌥Space\". */\n accelerator: string;\n /** Why `registered` is false while `enabled` is true; null otherwise. */\n error: string | null;\n };\n notifications: {\n enabled: boolean;\n /**\n * `native` — a signed build, banners come from Ashlr.\n * `script` — an unsigned build, banners come through osascript and show\n * as Script Editor (say so beside the toggle).\n */\n delivery: 'native' | 'script';\n };\n}\n\nconst DESKTOP_STATE_EVENT = 'ashlr:desktop-state';\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Boundary check: the value crossed from another runtime. */\nexport function isDesktopState(value: unknown): value is DesktopState {\n if (!isRecord(value) || !isRecord(value['hotkey']) || !isRecord(value['notifications'])) return false;\n const h = value['hotkey'];\n const n = value['notifications'];\n return (\n typeof h['enabled'] === 'boolean' &&\n typeof h['registered'] === 'boolean' &&\n typeof h['accelerator'] === 'string' &&\n h['accelerator'].length > 0 &&\n h['accelerator'].length <= 32 &&\n (h['error'] === null || (typeof h['error'] === 'string' && h['error'].length <= 300)) &&\n typeof n['enabled'] === 'boolean' &&\n (n['delivery'] === 'native' || n['delivery'] === 'script')\n );\n}\n\n// One module-level listener feeds a cached snapshot, so readers (and\n// useSyncExternalStore, which needs a STABLE snapshot) never see a stale or\n// freshly-copied object.\nlet cachedState: DesktopState | null | undefined;\nlet listening = false;\nconst stateListeners = new Set<(state: DesktopState) => void>();\n\nfunction readBridgeState(): DesktopState | null {\n try {\n const raw = bridge()?.getState?.();\n return isDesktopState(raw) ? raw : null;\n } catch {\n return null;\n }\n}\n\nfunction onDesktopState(event: Event): void {\n const detail = (event as CustomEvent<unknown>).detail;\n if (!isDesktopState(detail)) return;\n cachedState = detail;\n for (const listener of [...stateListeners]) listener(detail);\n}\n\nfunction ensureListening(): void {\n if (listening) return;\n listening = true;\n window.addEventListener(DESKTOP_STATE_EVENT, onDesktopState);\n}\n\n/** The latest desktop state, or null in a browser (and before native answered). */\nexport function getDesktopState(): DesktopState | null {\n ensureListening();\n if (cachedState === undefined || cachedState === null) cachedState = readBridgeState();\n return cachedState;\n}\n\n/** Called with every new state native sends. Returns an unsubscribe function. */\nexport function subscribeDesktopState(handler: (state: DesktopState) => void): () => void {\n ensureListening();\n stateListeners.add(handler);\n return () => {\n stateListeners.delete(handler);\n };\n}\n\n/**\n * Ask the desktop app to change a preference. True when the request was sent\n * (a desktop bridge exists), false in a browser. The answer arrives as a new\n * state — e.g. a hotkey another app holds comes back\n * `{ enabled: true, registered: false, error }` — so render from state, never\n * from the value you asked for.\n */\nexport function setDesktopPreference(name: DesktopPreference, value: boolean): boolean {\n if (name !== 'globalHotkey' && name !== 'notifications') return false;\n if (typeof value !== 'boolean') return false;\n try {\n return bridge()?.setPreference?.(name, value) === true;\n } catch {\n return false;\n }\n}\n\nfunction subscribeStore(onChange: () => void): () => void {\n return subscribeDesktopState(() => onChange());\n}\n\n/**\n * React: the live desktop state, or null in a browser. Settings ▸ Desktop\n * renders its hotkey and notification rows from this and hides them (or says\n * \"available in the desktop app\") when it is null.\n */\nexport function useDesktopState(): DesktopState | null {\n return useSyncExternalStore(subscribeStore, getDesktopState, () => null);\n}\n\n/** Tests only: forget the cached state and the module listener. */\nexport function resetDesktopStateForTests(): void {\n if (listening) window.removeEventListener(DESKTOP_STATE_EVENT, onDesktopState);\n listening = false;\n cachedState = undefined;\n stateListeners.clear();\n}\n","/**\n * components/primitives/Tooltip.tsx — the label for an icon-only control and\n * the numbers behind a 2px meter line.\n *\n * Rules it enforces so a tooltip never becomes the only way to read the UI:\n * - it shows on HOVER *and* on keyboard FOCUS (a mouse-only tooltip is\n * invisible to keyboard operators);\n * - Escape dismisses it while the trigger keeps focus (WCAG 1.4.13);\n * - the trigger is wired with aria-describedby, so the content is\n * announced rather than merely drawn;\n * - it carries description, never the accessible NAME — icon buttons still\n * need their own aria-label.\n *\n * WHY IT RENDERS THROUGH A PORTAL. This used to be an absolutely-positioned\n * span inside a `position: relative` wrapper, which is correct right up until\n * the trigger lives inside something that clips — and the first real consumer,\n * the Verse rail, is exactly that: a 56px flex column inside a grid shell with\n * its own stacking context. A bubble anchored there is cut off at the rail's\n * edge, which is the failure the native `title=` tooltip already had. Rendering\n * into `document.body` at `position: fixed`, positioned from the trigger's\n * bounding rect, means NO ancestor can clip it: not `overflow: hidden`, not a\n * `transform`, not a lower `z-index` on a sibling pane.\n *\n * The Popover API (`popover=\"manual\"` + the top layer) would do the same job\n * without the portal, but it is not yet safe to depend on across the WebKit\n * version bundled with the Tauri shell, and it still needs manual positioning\n * without `anchor-name`. The portal is the boring, verifiable option.\n *\n * TWO PROP SPELLINGS, on purpose. `label` + `shortcut` is the shape icon\n * controls want, and is what new call sites should use. `content` predates it\n * and takes arbitrary nodes (the Meter's numbers, for one), so it stays as the\n * other half of a union rather than being renamed out from under its callers.\n * Exactly one of the two is required.\n */\nimport {\n cloneElement,\n useCallback,\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n type FocusEvent as ReactFocusEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport styles from './Tooltip.module.css';\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Hovering across a rail of six icons must not strobe six bubbles, so the\n * POINTER waits. Focus does not: a keyboard operator has already committed to\n * the control, and a delay there just reads as lag.\n */\nconst OPEN_DELAY_MS = 160;\n/** Distance between the trigger's edge and the bubble. */\nconst GAP = 8;\n/** Smallest distance the bubble may sit from the viewport edge. */\nconst MARGIN = 8;\n\n/** The props Tooltip clones onto its trigger. */\ninterface TooltipTriggerProps {\n 'aria-describedby'?: string;\n /** Read, never set: a disabled trigger fires no pointer events, so the wrapper must take over. */\n disabled?: boolean;\n onMouseEnter?: (event: ReactMouseEvent<HTMLElement>) => void;\n onMouseLeave?: (event: ReactMouseEvent<HTMLElement>) => void;\n onFocus?: (event: ReactFocusEvent<HTMLElement>) => void;\n onBlur?: (event: ReactFocusEvent<HTMLElement>) => void;\n}\n\ninterface TooltipCommonProps {\n /** Rendered as a distinct keycap beside the label, e.g. `⌘2`. */\n shortcut?: string;\n placement?: TooltipPlacement;\n /** Skip the tooltip entirely without changing the tree (e.g. the label is already visible). */\n disabled?: boolean;\n className?: string;\n /** The trigger. Tooltip adds no layout box of its own around it. */\n children: ReactElement<TooltipTriggerProps>;\n}\n\nexport type TooltipProps = TooltipCommonProps &\n (\n | { label: string; content?: undefined }\n | { label?: undefined; content: ReactNode }\n );\n\ninterface Position {\n left: number;\n top: number;\n placement: TooltipPlacement;\n}\n\n/** Placement order: the caller's choice first, then its opposite, then the rest. */\nfunction candidates(preferred: TooltipPlacement): TooltipPlacement[] {\n const opposite: Record<TooltipPlacement, TooltipPlacement> = {\n top: 'bottom', bottom: 'top', left: 'right', right: 'left',\n };\n const rest = (['top', 'bottom', 'right', 'left'] as const).filter(\n (p) => p !== preferred && p !== opposite[preferred],\n );\n return [preferred, opposite[preferred], ...rest];\n}\n\nfunction place(placement: TooltipPlacement, trigger: DOMRect, w: number, h: number): { left: number; top: number } {\n switch (placement) {\n case 'top': return { left: trigger.left + trigger.width / 2 - w / 2, top: trigger.top - h - GAP };\n case 'bottom': return { left: trigger.left + trigger.width / 2 - w / 2, top: trigger.bottom + GAP };\n case 'left': return { left: trigger.left - w - GAP, top: trigger.top + trigger.height / 2 - h / 2 };\n case 'right': return { left: trigger.right + GAP, top: trigger.top + trigger.height / 2 - h / 2 };\n }\n}\n\n/**\n * First placement whose bubble fits the viewport wins; if none fits we keep\n * the preferred one and clamp, which is still readable — a bubble nudged\n * inward beats a bubble half off-screen.\n */\nfunction resolve(trigger: DOMRect, w: number, h: number, preferred: TooltipPlacement): Position {\n const vw = window.innerWidth || 0;\n const vh = window.innerHeight || 0;\n let fallback: Position | null = null;\n for (const placement of candidates(preferred)) {\n const { left, top } = place(placement, trigger, w, h);\n if (!fallback) fallback = { left, top, placement };\n const fits = left >= MARGIN && top >= MARGIN && left + w <= vw - MARGIN && top + h <= vh - MARGIN;\n if (fits) return { left, top, placement };\n }\n const chosen = fallback!;\n return {\n placement: chosen.placement,\n left: Math.max(MARGIN, Math.min(chosen.left, vw - w - MARGIN)),\n top: Math.max(MARGIN, Math.min(chosen.top, vh - h - MARGIN)),\n };\n}\n\nexport function Tooltip(props: TooltipProps) {\n const { label, content, shortcut, placement = 'top', disabled = false, className, children } = props;\n const [open, setOpen] = useState(false);\n const [position, setPosition] = useState<Position | null>(null);\n const id = useId();\n const triggerRef = useRef<HTMLElement | null>(null);\n const bubbleRef = useRef<HTMLDivElement | null>(null);\n const timer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const cancelTimer = useCallback(() => {\n if (timer.current !== null) {\n clearTimeout(timer.current);\n timer.current = null;\n }\n }, []);\n\n const close = useCallback(() => {\n cancelTimer();\n setOpen(false);\n setPosition(null);\n }, [cancelTimer]);\n\n // Unmounting mid-delay must not fire setOpen on a dead component.\n useEffect(() => cancelTimer, [cancelTimer]);\n\n const reposition = useCallback(() => {\n const trigger = triggerRef.current;\n const bubble = bubbleRef.current;\n if (!trigger || !bubble) return;\n const rect = trigger.getBoundingClientRect();\n setPosition(resolve(rect, bubble.offsetWidth, bubble.offsetHeight, placement));\n }, [placement]);\n\n // Measure AFTER the bubble exists but BEFORE paint, so it is never seen at\n // its unpositioned origin first.\n useLayoutEffect(() => {\n if (!open) return;\n reposition();\n }, [open, reposition]);\n\n // Escape closes while the trigger keeps focus (WCAG 1.4.13). Held at the\n // document so it works wherever the keystroke lands, and a scroll or resize\n // under an open bubble re-anchors it rather than leaving it stranded.\n useEffect(() => {\n if (!open) return;\n function onKeyDown(event: globalThis.KeyboardEvent) {\n if (event.key === 'Escape') close();\n }\n document.addEventListener('keydown', onKeyDown);\n window.addEventListener('resize', reposition);\n // Capture: a scroll inside any ancestor moves the trigger too, and scroll\n // events from those do not bubble to window.\n window.addEventListener('scroll', reposition, true);\n return () => {\n document.removeEventListener('keydown', onKeyDown);\n window.removeEventListener('resize', reposition);\n window.removeEventListener('scroll', reposition, true);\n };\n }, [open, close, reposition]);\n\n const body = label ?? content;\n const empty = body === null || body === undefined || body === '';\n if (disabled || empty) return children;\n\n function openAfterDelay(element: HTMLElement) {\n triggerRef.current = element;\n cancelTimer();\n timer.current = setTimeout(() => {\n timer.current = null;\n setOpen(true);\n }, OPEN_DELAY_MS);\n }\n\n function openNow(element: HTMLElement) {\n triggerRef.current = element;\n cancelTimer();\n setOpen(true);\n }\n\n const triggerDisabled = children.props.disabled === true;\n const describedBy = open ? id : undefined;\n\n const trigger = cloneElement(children, {\n 'aria-describedby': describedBy,\n onMouseEnter: (event: ReactMouseEvent<HTMLElement>) => {\n children.props.onMouseEnter?.(event);\n openAfterDelay(event.currentTarget);\n },\n onMouseLeave: (event: ReactMouseEvent<HTMLElement>) => {\n children.props.onMouseLeave?.(event);\n close();\n },\n onFocus: (event: ReactFocusEvent<HTMLElement>) => {\n children.props.onFocus?.(event);\n openNow(event.currentTarget);\n },\n onBlur: (event: ReactFocusEvent<HTMLElement>) => {\n children.props.onBlur?.(event);\n close();\n },\n });\n\n return (\n <>\n {/*\n `display: contents` — the wrapper exists in the DOM but generates no\n box, so it cannot disturb the trigger's own flex/grid placement. It is\n here only to carry the describedby relationship at the trigger's parent\n as well as on the trigger itself; the behaviour all lives on the cloned\n child, which is what actually has a hover target.\n */}\n <span\n className={`${styles.wrapper} ${className ?? ''}`}\n aria-describedby={describedBy}\n /*\n A DISABLED trigger emits no pointer events at all, so handlers on the\n cloned child can never fire and its tooltip could never open — which\n is precisely the tooltip that matters, since it is the one explaining\n WHY the control is disabled. When the child is disabled the wrapper\n stops being `display: contents`, takes a box of its own, and carries\n the hover itself. Focus is not mirrored here: a disabled control is\n not focusable, so there is no focus to mirror.\n */\n data-disabled-trigger={triggerDisabled ? 'true' : undefined}\n onMouseOver={triggerDisabled ? (event) => openNow(event.currentTarget) : undefined}\n onMouseOut={triggerDisabled ? close : undefined}\n >\n {trigger}\n </span>\n {open\n ? createPortal(\n <div\n ref={bubbleRef}\n role=\"tooltip\"\n id={id}\n className={styles.bubble}\n data-placement={position?.placement ?? placement}\n style={{\n // Inline, though the stylesheet says it too: `left`/`top`\n // below are VIEWPORT coordinates, and they only mean that\n // under `fixed`. The two travel together or the bubble lands\n // somewhere arbitrary.\n position: 'fixed',\n left: position ? `${position.left}px` : '0px',\n top: position ? `${position.top}px` : '0px',\n // Hidden until measured, but still laid out — the measurement\n // needs a real offsetWidth, and `visibility` gives one where\n // `display: none` would not.\n visibility: position ? 'visible' : 'hidden',\n }}\n >\n <span className={styles.label}>{body}</span>\n {shortcut ? <kbd className={styles.shortcut}>{shortcut}</kbd> : null}\n </div>,\n document.body,\n )\n : null}\n </>\n );\n}\n","/**\n * routes/verse/onboarding/onboarding-store.ts — whether the first-run tour\n * is showing, and whether it has already been answered.\n *\n * Framework-free, same shape as verse-ui-store.ts: a module-level snapshot,\n * a listener set, and one `useSyncExternalStore` hook in ./useOnboarding.ts.\n *\n * Persisted under `ashlr.verse.onboarding.v1`. Two facts are stored and they\n * are deliberately different:\n *\n * - `completedAt` — the operator walked to the end.\n * - `dismissedAt` — the operator skipped, or closed it part-way.\n *\n * Either one silences the tour for good; storing which happened means a\n * later build can tell \"has seen it\" from \"chose not to\", and it makes the\n * Settings replay affordance honest about what it is replaying.\n *\n * SHOWING IT IS FAIL-SAFE IN THE QUIET DIRECTION. A storage read that throws\n * (private window, storage disabled) or returns something malformed resolves\n * to NOT showing the tour. A first-run flow that reappears on every launch\n * because storage is unavailable would be worse than one that never appears:\n * the app is fully usable without it, and it is reachable from Settings.\n */\n\nexport interface OnboardingRecord {\n /** ISO timestamp of the run that reached the last step. */\n completedAt: string | null;\n /** ISO timestamp of a skip or an early close. */\n dismissedAt: string | null;\n}\n\nexport interface OnboardingState extends OnboardingRecord {\n /** Is the flow on screen right now? */\n open: boolean;\n /** 0-based index into the step list (./onboarding-model.ts ONBOARDING_STEPS). */\n step: number;\n}\n\nexport const VERSE_ONBOARDING_STORAGE_KEY = 'ashlr.verse.onboarding.v1';\n\nconst EMPTY: OnboardingRecord = { completedAt: null, dismissedAt: null };\n\nfunction readRecord(): OnboardingRecord {\n try {\n const raw = localStorage.getItem(VERSE_ONBOARDING_STORAGE_KEY);\n if (!raw) return EMPTY;\n const parsed = JSON.parse(raw) as Partial<OnboardingRecord>;\n return {\n completedAt: typeof parsed.completedAt === 'string' ? parsed.completedAt : null,\n dismissedAt: typeof parsed.dismissedAt === 'string' ? parsed.dismissedAt : null,\n };\n } catch {\n // Unreadable storage means \"answered\" — see the fail-safe note above.\n return { completedAt: null, dismissedAt: new Date(0).toISOString() };\n }\n}\n\nfunction persist(record: OnboardingRecord): void {\n try {\n localStorage.setItem(VERSE_ONBOARDING_STORAGE_KEY, JSON.stringify(record));\n } catch {\n /* best-effort: a private window without storage still runs the app */\n }\n}\n\n/** True when neither answer has been recorded yet. */\nexport function isFirstRun(record: OnboardingRecord): boolean {\n return record.completedAt === null && record.dismissedAt === null;\n}\n\nconst initialRecord = readRecord();\n\nlet state: OnboardingState = {\n ...initialRecord,\n open: isFirstRun(initialRecord),\n step: 0,\n};\n\nconst listeners = new Set<() => void>();\n\nfunction patch(delta: Partial<OnboardingState>): void {\n const next = { ...state, ...delta };\n if ((Object.keys(delta) as (keyof OnboardingState)[]).every((k) => Object.is(state[k], next[k]))) return;\n state = next;\n for (const l of listeners) l();\n}\n\nexport function subscribeOnboarding(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nexport function getOnboardingState(): OnboardingState {\n return state;\n}\n\nexport function setOnboardingStep(step: number): void {\n patch({ step: Math.max(0, Math.trunc(step)) });\n}\n\n/** Skip, Escape, or the close button — all the same answer. */\nexport function dismissOnboarding(): void {\n const record: OnboardingRecord = { completedAt: state.completedAt, dismissedAt: new Date().toISOString() };\n persist(record);\n patch({ ...record, open: false });\n}\n\n/** Walked to the end. */\nexport function completeOnboarding(): void {\n const record: OnboardingRecord = { completedAt: new Date().toISOString(), dismissedAt: state.dismissedAt };\n persist(record);\n patch({ ...record, open: false });\n}\n\n/** Settings → \"Replay onboarding\". Reopens at the first step; the stored\n * answer is kept, so closing the replay does not re-arm the first run. */\nexport function replayOnboarding(): void {\n patch({ open: true, step: 0 });\n}\n\n/** Test hygiene — forgets the stored answer and re-arms the first run. */\nexport function resetOnboarding(): void {\n try {\n localStorage.removeItem(VERSE_ONBOARDING_STORAGE_KEY);\n } catch {\n /* ignore */\n }\n state = { completedAt: null, dismissedAt: null, open: true, step: 0 };\n for (const l of listeners) l();\n}\n","/**\n * routes/verse/onboarding/useOnboarding.ts — the single React binding over\n * onboarding-store.ts, kept in its own file for the same reason\n * useVerseUi.ts is: the store stays framework-free and unit-testable\n * without a DOM.\n */\nimport { useSyncExternalStore } from 'react';\nimport { getOnboardingState, subscribeOnboarding, type OnboardingState } from './onboarding-store.js';\n\nexport function useOnboarding(): OnboardingState {\n return useSyncExternalStore(subscribeOnboarding, getOnboardingState, getOnboardingState);\n}\n","/**\n * routes/verse/resources/resources-store.ts — is the Resources drawer open,\n * and is it pinned (unit 3.11 C6).\n *\n * overlay ~360px over the surface; Esc, an outside click or ⌘. closes it,\n * focus is trapped inside and returned on close;\n * pinned a docked right column that shrinks the surface beside it.\n *\n * PERSISTED under its own key, one writer (this module), every access in a\n * try/catch: a private window without storage still runs the drawer. The\n * shell's `ashlr.verse.ui.v3` blob is not touched — its `resourcesOpen`\n * field belongs to an older panel and has one writer already.\n *\n * On load the drawer comes back open only when it was PINNED open: a docked\n * column is a layout preference, whereas an overlay restored on reload would\n * steal focus from whatever the operator came back to do.\n *\n * Kept tiny and framework-free apart from one hook: this file is imported by\n * the shell, so it is on the chat first-paint path.\n */\nimport { useSyncExternalStore } from 'react';\nimport type { ResourcesSummary } from './resources-model.js';\n\nexport const RESOURCES_STORAGE_KEY = 'ashlr.verse.resources.v1';\n\nexport interface ResourcesUiState {\n open: boolean;\n pinned: boolean;\n /**\n * The handle's dot, written by the lazily loaded summary probe\n * (resources-summary.tsx). NOT persisted; null until the probe has read.\n */\n summary: ResourcesSummary | null;\n}\n\nfunction load(): ResourcesUiState {\n try {\n const raw = JSON.parse(localStorage.getItem(RESOURCES_STORAGE_KEY) ?? 'null') as Partial<ResourcesUiState> | null;\n const pinned = raw?.pinned === true;\n return { pinned, open: pinned && raw?.open === true, summary: null };\n } catch {\n return { open: false, pinned: false, summary: null };\n }\n}\n\nlet state: ResourcesUiState = load();\nconst listeners = new Set<() => void>();\n\nfunction patch(delta: Partial<ResourcesUiState>): void {\n const next = { ...state, ...delta };\n if (next.open === state.open && next.pinned === state.pinned && next.summary === state.summary) return;\n const persist = next.open !== state.open || next.pinned !== state.pinned;\n state = next;\n if (persist) {\n try {\n localStorage.setItem(RESOURCES_STORAGE_KEY, JSON.stringify({ open: next.open, pinned: next.pinned }));\n } catch {\n /* best-effort */\n }\n }\n for (const l of [...listeners]) l();\n}\n\nexport function getResourcesUi(): ResourcesUiState {\n return state;\n}\n\nexport function openResources(): void {\n patch({ open: true });\n}\n\nexport function closeResources(): void {\n patch({ open: false });\n}\n\nexport function toggleResources(): void {\n patch({ open: !state.open });\n}\n\nexport function setResourcesPinned(pinned: boolean): void {\n patch({ pinned });\n}\n\nexport function setResourcesSummary(summary: ResourcesSummary | null): void {\n const same = summary !== null && state.summary !== null && summary.tone === state.summary.tone && summary.spoken === state.summary.spoken;\n if (!same) patch({ summary });\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nexport function useResourcesUi(): ResourcesUiState {\n return useSyncExternalStore(subscribe, getResourcesUi, getResourcesUi);\n}\n\n/** Test hygiene: re-read storage as a fresh page load would. */\nexport function reloadResourcesUiForTest(): void {\n state = load();\n for (const l of [...listeners]) l();\n}\n","/**\n * routes/verse/command/nav.ts — how a surface card asks the shell to go\n * somewhere (unit C7). The shell (C1) owns navigation state; these are thin\n * wrappers over its store so every card words navigation the same way:\n *\n * openNeedsYou() ⌘J's drawer, optionally focused on one item;\n * goToSection(s, a) switch surface (keep-alive: the target keeps its\n * state) and, when `anchor` names a card or row on\n * it, scroll that into view once it is on screen;\n * openChat(sessionId) the chat a Needs-you item or insight is about.\n */\nimport type { WorkbenchSectionId } from '../../../../core/verse/workbench-types.js';\nimport { openVerseNeedsYou, openVerseSession, setVerseSection } from '../verse-ui-store.js';\n\nexport function openNeedsYou(focusId: string | null = null): void {\n openVerseNeedsYou(focusId ? { focusId } : {});\n}\n\n/** DOM id for an anchor (\"repo-ashlrai/binshield\" → \"c7-anchor-repo-ashlrai-binshield\"). */\nexport function anchorId(anchor: string): string {\n return `c7-anchor-${anchor.replace(/[^A-Za-z0-9_-]/g, '-')}`;\n}\n\nexport function scrollToAnchor(anchor: string): void {\n const el = document.getElementById(anchorId(anchor));\n if (el && typeof el.scrollIntoView === 'function') el.scrollIntoView({ block: 'center', behavior: 'smooth' });\n}\n\nexport function goToSection(section: WorkbenchSectionId, anchor: string | null = null): void {\n setVerseSection(section);\n if (!anchor) return;\n // The target surface may be mounting (lazy chunk) or un-hiding (keep-alive):\n // try on the next two frames, then give up quietly — a missing anchor is\n // never an error, the operator is already on the right surface.\n requestAnimationFrame(() => {\n if (document.getElementById(anchorId(anchor))) scrollToAnchor(anchor);\n else requestAnimationFrame(() => scrollToAnchor(anchor));\n });\n}\n\nexport function openChat(sessionId: string): void {\n openVerseSession(sessionId);\n}\n","/**\n * routes/verse/shell/reveal-anchor.ts — \"go to that card\" for any surface\n * (unit C1; C7 cross-unit request 3).\n *\n * Needs-you items, Leader memos and Command cards point INTO a surface\n * (\"memo:m-7\" on Mind, \"seat:claude-a\" on Apps). Whoever raises it calls\n * `setVerseSection(section, anchor)` (or dispatches VERSE_ANCHOR_EVENT); the\n * shell listens once (VerseApp) and reveals the element here.\n *\n * WHY WAIT, AND FOR HOW LONG. The target surface may be a lazy chunk that has\n * not loaded, a keep-alive surface un-hiding, or a list still fetching its\n * rows. Two animation frames (C7's own fallback in command/nav.ts) cover the\n * keep-alive case only; a cold chunk takes longer. So this watches the\n * surface's subtree until the element appears, and gives up quietly after\n * ANCHOR_WAIT_MS — a missing anchor is never an error, the operator is\n * already on the right surface.\n *\n * WHICH ELEMENT. C7 stamps `id=\"c7-anchor-<key>\"` (command/nav.ts anchorId);\n * any other owner may stamp `data-verse-anchor=\"<key>\"` instead of adopting\n * C7's id scheme. The search is scoped to `[data-surface=<section>]` so an\n * identically-keyed card on a HIDDEN keep-alive surface never wins.\n */\nimport { anchorId } from '../command/nav.js';\nimport type { VerseAnchorRequest } from '../verse-ui-store.js';\n\nexport const ANCHOR_WAIT_MS = 3_000;\n\nfunction cssEscape(value: string): string {\n return typeof CSS !== 'undefined' && typeof CSS.escape === 'function' ? CSS.escape(value) : value.replace(/[\"\\\\]/g, '\\\\$&');\n}\n\n/** The anchor's element on `section`'s surface, or null when it is not in the DOM (yet). */\nexport function findAnchorElement(section: string, anchor: string, root: ParentNode = document): HTMLElement | null {\n const host = root.querySelector<HTMLElement>(`[data-surface=\"${cssEscape(section)}\"]`);\n if (!host) return null;\n return (\n host.querySelector<HTMLElement>(`#${cssEscape(anchorId(anchor))}`) ??\n host.querySelector<HTMLElement>(`[data-verse-anchor=\"${cssEscape(anchor)}\"]`)\n );\n}\n\nfunction reveal(el: HTMLElement): void {\n if (typeof el.scrollIntoView === 'function') el.scrollIntoView({ block: 'center', behavior: 'smooth' });\n // Keyboard users land ON the card, not just near it. Only an element that\n // can already take focus is focused — the shell never rewrites another\n // unit's tab order to make a div focusable.\n if (el.tabIndex >= 0 || el.matches('a[href],button,input,select,textarea,[tabindex]')) {\n el.focus({ preventScroll: true });\n }\n}\n\n/**\n * Reveal `anchor` on `section`. Resolves true when it was found and scrolled\n * to, false when it did not appear within `waitMs`. Never throws.\n */\nexport function revealAnchor({ section, anchor }: VerseAnchorRequest, waitMs: number = ANCHOR_WAIT_MS): Promise<boolean> {\n if (typeof document === 'undefined') return Promise.resolve(false);\n const now = findAnchorElement(section, anchor);\n if (now && !now.closest('[hidden]')) {\n reveal(now);\n return Promise.resolve(true);\n }\n return new Promise((resolve) => {\n let done = false;\n const finish = (el: HTMLElement | null) => {\n if (done) return;\n done = true;\n observer.disconnect();\n window.clearTimeout(timer);\n if (el) reveal(el);\n resolve(el !== null);\n };\n const check = () => {\n const el = findAnchorElement(section, anchor);\n // Wait for the surface to be un-hidden too: scrolling a hidden element is a no-op.\n if (el && !el.closest('[hidden]')) finish(el);\n };\n const observer = new MutationObserver(check);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['hidden', 'id', 'data-verse-anchor'] });\n const timer = window.setTimeout(() => finish(null), waitMs);\n check();\n });\n}\n\n/** The shell's one listener. Returns the unsubscribe. */\nexport function subscribeAnchorRequests(eventName: string): () => void {\n if (typeof window === 'undefined') return () => {};\n function onAnchor(event: Event): void {\n const detail = (event as CustomEvent<unknown>).detail;\n if (typeof detail !== 'object' || detail === null) return;\n const { section, anchor } = detail as Record<string, unknown>;\n if (typeof section !== 'string' || typeof anchor !== 'string' || anchor.length === 0 || anchor.length > 200) return;\n void revealAnchor({ section: section as VerseAnchorRequest['section'], anchor });\n }\n window.addEventListener(eventName, onAnchor);\n return () => window.removeEventListener(eventName, onAnchor);\n}\n","/**\n * routes/verse/shell/run-command.ts — \"run catalog command X\" from anywhere:\n * a key, the palette, the native menu, a button (unit C1).\n *\n * - guarded commands (Stop running chats…, Stop the fleet…) go through\n * confirm → token → run (guarded-action.tsx), with the runner defined\n * HERE: they are shell actions, and a guard must never depend on some\n * other unit remembering to confirm;\n * - chat commands run on the chat's handler, and when Chat is not on\n * screen the shell switches to it and parks the command until the chat\n * registers (command-bus runCommandWhenReady);\n * - the composer's commands (`composer.*`, C3) are answered by the Composer\n * through the `ashlr:command` window event, not the bus — so they are\n * DISPATCHED to it, after switching to Chat and waiting for a composer to\n * exist (deliverComposerCommand);\n * - everything else runs on its registered handler.\n *\n * Palette-listed commands are remembered for the empty-query \"Recent\" list.\n */\nimport { useEffect } from 'react';\nimport { useToast } from '../../../components/primitives/Toast.js';\nimport { getMutationToken, touchMutationHold } from '../../../data/auth-store.js';\nimport { ApiError, apiPost } from '../../../data/client.js';\nimport { cycleTheme } from '../../../data/theme-store.js';\nimport { cancelVerseTurn } from '../verse-queries.js';\nimport {\n closeVerseOverlay,\n cycleVerseRecentChat,\n getVerseUiState,\n openVerseNeedsYou,\n recordVerseAction,\n requestVerseCommand,\n setVerseSection,\n stepVerseHistory,\n toggleVerseOverlay,\n toggleVerseRail,\n type VerseSectionId,\n} from '../verse-ui-store.js';\nimport { COMPOSER_COMMAND_IDS, WORKBENCH_COMMAND_EVENT } from '../composer/composer-keys.js';\nimport { PARKED_COMMAND_TTL_MS, registerCommandHandler, runCommand, runCommandWhenReady, type CommandInvocation } from './command-bus.js';\nimport { findCommand } from './command-catalog.js';\nimport { requestGuarded } from './guarded-action.js';\nimport { getActivityState, refreshActivity } from './useActivity.js';\n\nexport type ShellNotify = (message: string, tone?: 'neutral' | 'success' | 'danger') => void;\n\nlet notify: ShellNotify = () => {};\n\n/** The shell installs its toast here (run-command has no React context). */\nexport function setShellNotifier(fn: ShellNotify | null): void {\n notify = fn ?? (() => {});\n}\n\nfunction requireToken(path: string): string {\n const token = getMutationToken();\n if (!token) throw new ApiError('Mutation token was rejected.', 401, path);\n return token;\n}\n\n/** Stop every running chat. Stops what activity says is running NOW, one cancel each. */\nasync function stopRunningChats(): Promise<void> {\n await refreshActivity();\n const running = getActivityState().data?.running ?? [];\n if (running.length === 0) {\n notify('Nothing is running.', 'neutral');\n return;\n }\n requireToken('/api/verse/sessions');\n const results = await Promise.allSettled(running.map((r) => cancelVerseTurn(r.sessionId)));\n touchMutationHold();\n const failed = results.filter((r) => r.status === 'rejected').length;\n void refreshActivity();\n if (failed > 0) throw new Error(`Stopped ${running.length - failed} of ${running.length} chats; ${failed} did not answer.`);\n notify(running.length === 1 ? 'Stopped 1 chat.' : `Stopped ${running.length} chats.`, 'success');\n}\n\n/**\n * Stop the fleet: the authority route's `stop` (B-U1) when this build has it;\n * otherwise the daemon's ordinary stop, which engages the kill switch\n * (control-api.ts `POST /api/verse/daemon {action:'stop'}`). Both stop\n * autonomous work only — chats keep running.\n */\nasync function stopFleet(): Promise<void> {\n const token = requireToken('/api/verse/authority');\n let body: unknown = null;\n try {\n body = await apiPost<unknown>('/api/verse/authority', { action: 'stop' }, token);\n } catch (err) {\n // A CODELESS 404 from the authority route = not in this build (or no\n // dispatch, which the daemon route will then report on its own).\n if (!(err instanceof ApiError && err.status === 404 && err.code === null)) throw err;\n await apiPost<unknown>('/api/verse/daemon', { action: 'stop' }, token);\n }\n touchMutationHold();\n void refreshActivity();\n notify(describeFleetStop(body), 'success');\n}\n\n/**\n * The toast after Stop, from B-U1's StopResult (`{ result: { stop } }` on\n * the authority route). Stop arms KILL at once but does not wait for agents\n * admitted before it (waitMs 0), so \"stopped\" alone would claim more than the\n * server knows (B-U6 request 8): the drain state and any armed merge it could\n * not revoke are said out loud. The daemon fallback has no such fields and\n * gets the plain sentence.\n */\nexport function describeFleetStop(body: unknown): string {\n const base = 'Fleet stopped. It stays stopped until you resume it.';\n const stop = (body as { result?: { stop?: unknown } } | null)?.result?.stop;\n if (typeof stop !== 'object' || stop === null) return base;\n const { quiesced, liveExecutionLeases, mergeRevokeFailures } = stop as {\n quiesced?: unknown;\n liveExecutionLeases?: unknown;\n mergeRevokeFailures?: unknown;\n };\n const parts = [base];\n if (quiesced === false) {\n const n = typeof liveExecutionLeases === 'number' && Number.isFinite(liveExecutionLeases) && liveExecutionLeases > 0 ? liveExecutionLeases : null;\n // Unknown counts as still running (the server fails closed the same way).\n parts.push(n === null ? 'Agents already running are finishing.' : `${n} agent${n === 1 ? ' is' : 's are'} still finishing work started before Stop.`);\n }\n if (Array.isArray(mergeRevokeFailures) && mergeRevokeFailures.length > 0) {\n const m = mergeRevokeFailures.length;\n parts.push(`${m} armed merge${m === 1 ? '' : 's'} could not be revoked; Stop still blocks ${m === 1 ? 'it' : 'them'}.`);\n }\n return parts.join(' ');\n}\n\n/** The composer's message box inside the Chat surface (C3's Composer names it \"Message\"). */\nfunction composerPresent(): boolean {\n return document.querySelector('[data-surface=\"chat\"] textarea[aria-label=\"Message\"]') !== null;\n}\n\nfunction dispatchComposerCommand(id: string): void {\n window.dispatchEvent(new CustomEvent(WORKBENCH_COMMAND_EVENT, { detail: { id } }));\n}\n\n/**\n * How long after the composer's box appears before the command is sent. The\n * box is in the DOM at React's commit; the Composer's window listener is a\n * passive effect that runs a moment LATER. Firing on the mutation itself can\n * beat the listener and the command vanishes, so the dispatch waits a beat.\n */\nexport const COMPOSER_LISTEN_GRACE_MS = 50;\n\n/**\n * Run a `composer.*` command on the Composer. With a composer already mounted\n * (even behind another surface: keep-alive leaves its listener live) it goes\n * now. Otherwise Chat is opened and the command waits — within the same TTL\n * as a parked bus command — for a composer to mount. A command that finds no\n * composer in time is dropped: running it 20 s later would be a surprise.\n */\nexport function deliverComposerCommand(id: string, ttlMs: number = PARKED_COMMAND_TTL_MS): void {\n if (typeof document === 'undefined') return;\n if (getVerseUiState().section !== 'chat') setVerseSection('chat');\n if (composerPresent()) {\n dispatchComposerCommand(id);\n return;\n }\n let done = false;\n const finish = (found: boolean) => {\n if (done) return;\n done = true;\n observer.disconnect();\n window.clearTimeout(expiry);\n if (found) window.setTimeout(() => dispatchComposerCommand(id), COMPOSER_LISTEN_GRACE_MS);\n };\n const observer = new MutationObserver(() => {\n if (composerPresent()) finish(true);\n });\n observer.observe(document.body, { childList: true, subtree: true });\n const expiry = window.setTimeout(() => finish(false), ttlMs);\n}\n\nconst COMPOSER_IDS: ReadonlySet<string> = new Set(COMPOSER_COMMAND_IDS);\n\nconst GUARDED_RUNNERS: Readonly<Record<string, () => Promise<void>>> = {\n 'chats.stop-all': stopRunningChats,\n 'fleet.stop': stopFleet,\n};\n\n/** Run catalog command `id`. Returns false when nothing could run it. */\nexport function executeCatalogCommand(id: string, invocation: CommandInvocation = {}): boolean {\n const command = findCommand(id);\n if (!command) return false;\n if (command.group !== null && invocation.via === 'palette') recordVerseAction(command.id);\n\n if (command.guard) {\n const runner = GUARDED_RUNNERS[command.id];\n if (!runner) return runCommand(id, invocation);\n const { confirm, token } = command.guard;\n requestGuarded({\n title: confirm.title,\n body: confirm.body,\n confirmLabel: confirm.confirmLabel,\n destructive: confirm.destructive,\n token,\n tokenReason: `${command.title.replace(/…$/, '')} requires the dispatch token.`,\n run: runner,\n });\n return true;\n }\n\n if (COMPOSER_IDS.has(command.id)) {\n // A bus handler (should C3 ever register one) outranks the event.\n if (runCommand(id, invocation)) return true;\n deliverComposerCommand(id);\n return true;\n }\n\n if (command.scope === 'chat' || command.scope === 'composer') {\n if (runCommand(id, invocation)) return true;\n // Explicitly asked for a chat action: going to Chat is the point.\n if (getVerseUiState().section !== 'chat') setVerseSection('chat');\n runCommandWhenReady(id, invocation);\n return true;\n }\n\n if (runCommand(id, invocation)) return true;\n notify(`${command.title} isn't available here yet.`, 'neutral');\n return false;\n}\n\n/**\n * The GLOBAL commands the shell itself serves (every other id belongs to the\n * unit that owns the behaviour). Returns the unregister function.\n */\nexport function registerShellCommandHandlers(): () => void {\n const surfaces: Array<[string, VerseSectionId]> = [\n ['surface.command', 'command'],\n ['surface.fleet', 'fleet'],\n ['surface.growth', 'growth'],\n ['surface.mind', 'mind'],\n ['surface.chat', 'chat'],\n ['section.settings', 'settings'],\n ['section.apps', 'apps'],\n ['section.usage', 'usage'],\n ];\n const offs = [\n ...surfaces.map(([id, section]) => registerCommandHandler(id, () => setVerseSection(section))),\n registerCommandHandler('palette.open', () => toggleVerseOverlay('palette')),\n registerCommandHandler('needs-you.open', (inv) => {\n // The menu / a notification OPENS it; the key toggles.\n if (inv.via !== 'menu' && getVerseUiState().overlay === 'needs-you') closeVerseOverlay();\n else openVerseNeedsYou();\n }),\n registerCommandHandler('shortcuts.open', () => toggleVerseOverlay('shortcuts')),\n registerCommandHandler('history.back', () => { stepVerseHistory(-1); }),\n registerCommandHandler('history.forward', () => { stepVerseHistory(1); }),\n registerCommandHandler('chat.recent-next', () => { cycleVerseRecentChat(1); }),\n registerCommandHandler('chat.recent-prev', () => { cycleVerseRecentChat(-1); }),\n registerCommandHandler('rail.toggle-labels', () => toggleVerseRail()),\n registerCommandHandler('chat.new', () => requestVerseCommand('new-chat')),\n registerCommandHandler('chat.new-on', (inv) => {\n const seat = inv.argument?.kind === 'seat' ? inv.argument.id : undefined;\n requestVerseCommand('new-chat', seat ? { seatId: seat } : {});\n }),\n registerCommandHandler('appearance.toggle-theme', () => cycleTheme()),\n registerCommandHandler('app.summon', () => requestVerseCommand('focus-composer')),\n ];\n return () => offs.forEach((off) => off());\n}\n\n/** Mounted once by the shell: the global handlers, and toasts for run-command. */\nexport function useShellCommands(): void {\n const toast = useToast();\n useEffect(() => {\n setShellNotifier(toast.show);\n return () => setShellNotifier(null);\n }, [toast.show]);\n useEffect(() => registerShellCommandHandlers(), []);\n}\n","/**\n * routes/verse/shell/skeletons.tsx — what a surface looks like while its\n * chunk loads (unit C1; SPEC-310C §1 \"Surfaces show skeletons while\n * loading\"). The pre-3.10 fallback was a bare \"Loading…\" line; a skeleton in\n * the surface's own shape means the layout does not jump when it lands.\n *\n * Also the designed state for a surface whose module is not in this build\n * (`SurfaceNotInBuild`): it names the surface in operator language — never a\n * source path (the old MissingSection printed `routes/verse/sections/X.tsx`).\n */\nimport { SkeletonCard, SkeletonLine, SkeletonRow } from '../../../components/primitives/Skeleton.js';\nimport type { VerseSectionId } from '../verse-ui-store.js';\nimport styles from './skeletons.module.css';\n\nconst DASHBOARD: ReadonlySet<VerseSectionId> = new Set(['command', 'fleet', 'growth', 'mind']);\n\nexport function SurfaceSkeleton({ section, label }: { section: VerseSectionId; label: string }) {\n return (\n <div className={styles.frame} role=\"status\" aria-label={`Loading ${label}`} data-skeleton={section}>\n <div className={styles.strip}>\n <SkeletonLine width=\"140px\" />\n </div>\n {section === 'chat' ? (\n <div className={styles.chat}>\n <div className={styles.chatList}>\n {Array.from({ length: 8 }, (_, i) => (\n <SkeletonLine key={i} width={`${70 + ((i * 13) % 25)}%`} />\n ))}\n </div>\n <div className={styles.chatBody}>\n <SkeletonLine width=\"42%\" />\n <SkeletonLine width=\"88%\" />\n <SkeletonLine width=\"76%\" />\n <SkeletonLine width=\"64%\" />\n </div>\n </div>\n ) : DASHBOARD.has(section) ? (\n <div className={styles.grid}>\n <div className={styles.wide}><SkeletonLine width=\"60%\" /></div>\n {Array.from({ length: 5 }, (_, i) => (\n <div key={i} className={styles.kpi}><SkeletonCard /></div>\n ))}\n <div className={styles.half}><SkeletonCard /></div>\n <div className={styles.half}><SkeletonCard /></div>\n </div>\n ) : (\n <div className={styles.column}>\n {Array.from({ length: 6 }, (_, i) => (\n <SkeletonRow key={i} />\n ))}\n </div>\n )}\n </div>\n );\n}\n\n/** A surface this build does not ship yet. */\nexport function SurfaceNotInBuild({ label, blurb }: { label: string; blurb: string }) {\n return (\n <div className={styles.missing} role=\"status\">\n <h1 className={styles.missingTitle}>{label} isn't in this build yet</h1>\n <p className={styles.missingBody}>{blurb}</p>\n <p className={styles.missingBody}>It appears here as soon as it ships. Everything else in Verse works normally.</p>\n </div>\n );\n}\n","/**\n * routes/verse/useVerseUi.ts — the React glue over verse-ui-store.ts (same\n * split as useVerseSession.ts over verse-store.ts: the store stays\n * framework-free, this file is the only place that knows about React).\n */\nimport { useSyncExternalStore } from 'react';\nimport { getVerseUiState, subscribeVerseUi, type VerseUiState } from './verse-ui-store.js';\n\nexport function useVerseUi(): VerseUiState {\n return useSyncExternalStore(subscribeVerseUi, getVerseUiState, getVerseUiState);\n}\n","/**\n * routes/verse/verse-icons.tsx — the icons the shell rail and the chat chrome\n * use, under the names the Verse surfaces already import.\n *\n * Owner A's `components/primitives/icons.tsx` is now the drawing authority:\n * one geometry (16px box, 1.5px stroke, round caps/joins, currentColor), one\n * stroke weight, one accessibility convention. Everything below that has an\n * equivalent there is an ALIAS of it, so the rail and the inbox cannot drift\n * to two different chat glyphs.\n *\n * 3.10 adds the workbench surfaces (Command, Fleet, Growth, Mind), the gear\n * tray and Apps. They are drawn here, not in the shared set, because they\n * name Verse surfaces — a console page borrowing \"Fleet\" would be a lie.\n *\n * Five icons stay drawn here because the shared set has no equivalent and\n * they are Verse-specific chrome, not general console vocabulary:\n * `PanelIcon` / `SidebarIcon` (the two pane toggles, which must read as\n * mirror images of each other), `RailToggleIcon` (the rail's own expand /\n * collapse control, which has to read as the same family as those two),\n * `VerseMark` (the brand mark in the rail head, which is 32px and never takes\n * a color state) and `McpIcon` (a plug — the shared set has no connector\n * glyph, and every candidate in it already means another rail section).\n */\nimport type { ComponentType, ReactNode } from 'react';\nimport {\n IconChat,\n IconChevronDown,\n IconChevronRight,\n IconCpu,\n IconGauge,\n IconInbox,\n IconMoon,\n IconPlus,\n IconSearch,\n IconSliders,\n IconTrash,\n type IconProps,\n} from '../../components/primitives/icons.js';\nimport type { VerseSectionId } from './verse-ui-store.js';\n\nexport type { IconProps };\n\n/**\n * Aliases onto the shared set. The names are the ones the Verse rail, sidebar\n * and composer already import — keeping them means this reconciliation\n * touched no call site.\n */\nexport const ChatIcon = IconChat;\nexport const AutonomyIcon = IconCpu;\nexport const ApprovalsIcon = IconInbox;\nexport const UsageIcon = IconGauge;\nexport const SettingsIcon = IconSliders;\nexport const SearchIcon = IconSearch;\nexport const PlusIcon = IconPlus;\nexport const TrashIcon = IconTrash;\nexport const ArrowDownIcon = IconChevronDown;\nexport const ChevronIcon = IconChevronRight;\n/** The rail's theme quick-toggle. One glyph for the control, not per-theme. */\nexport const ThemeIcon = IconMoon;\n\n/** Local shell chrome — see the header note for why these three stay here. */\nfunction Icon({ size = 16, children, ...rest }: IconProps & { children: ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 16 16\"\n width={size}\n height={size}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n {...rest}\n >\n {children}\n </svg>\n );\n}\n\nexport function PanelIcon(props: IconProps) {\n return <Icon {...props}><rect x=\"2.5\" y=\"3\" width=\"11\" height=\"10\" rx=\"1.5\" /><path d=\"M10 3v10\" /></Icon>;\n}\n\nexport function SidebarIcon(props: IconProps) {\n return <Icon {...props}><rect x=\"2.5\" y=\"3\" width=\"11\" height=\"10\" rx=\"1.5\" /><path d=\"M6 3v10\" /></Icon>;\n}\n\n/**\n * The Return key (↩) as a key-legend glyph, 1em and inline so it sits in a\n * <kbd> like the letters around it. WHY drawn: of the fonts the console\n * serves, only the 230 KB full Plex face has U+21A9, so typing it into the\n * palette's or the drawer's key legend fetched that face each time one opened\n * (3.10 first-paint review; global.css scopes the full faces).\n */\nexport function ReturnKeyIcon(props: IconProps) {\n return (\n <Icon width=\"1em\" height=\"1em\" style={{ display: 'inline-block', verticalAlign: '-0.125em' }} {...props}>\n <path d=\"M13 3.5v5a2 2 0 0 1-2 2H3.5\" /><path d=\"M6 8 3.5 10.5 6 13\" />\n </Icon>\n );\n}\n\n/**\n * The rail's own expand/collapse control: the same framed panel as the two\n * pane toggles above, plus a chevron saying which way it is about to move.\n * ONE glyph that rotates rather than two drawings, so the control reads as a\n * single thing in two states — and so the state is carried by direction, the\n * one property a user can read without having memorised the other icon.\n */\nexport function RailToggleIcon({ expanded = false, ...props }: IconProps & { expanded?: boolean }) {\n return (\n <Icon {...props}>\n <rect x=\"2.5\" y=\"3\" width=\"11\" height=\"10\" rx=\"1.5\" />\n <path d=\"M6 3v10\" />\n {expanded ? <path d=\"M11.2 6.4 9.6 8l1.6 1.6\" /> : <path d=\"M9.4 6.4 11 8l-1.6 1.6\" />}\n </Icon>\n );\n}\n\n/**\n * MCP — a plug in a socket. Drawn here rather than aliased: the shared set's\n * nearest candidates (`IconCpu`, `IconSliders`, `IconKey`) are already the\n * Autonomy, Settings and credential glyphs, and two rail items that read as\n * the same picture is worse than one more 16px drawing.\n */\nexport function McpIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <path d=\"M6 1.8v3.2M10 1.8v3.2\" />\n <path d=\"M3.8 5h8.4v2.6a4.2 4.2 0 0 1-4.2 4.2 4.2 4.2 0 0 1-4.2-4.2V5Z\" />\n <path d=\"M8 11.8v2.4\" />\n </Icon>\n );\n}\n\n/** The mark in the rail head. Not a section icon — it never gets a color state. */\nexport function VerseMark(props: IconProps) {\n const { size = 20, ...rest } = props;\n return (\n <svg viewBox=\"0 0 32 32\" width={size} height={size} fill=\"none\" stroke=\"currentColor\" strokeWidth={1.8}\n strokeLinejoin=\"round\" strokeLinecap=\"round\" aria-hidden=\"true\" focusable=\"false\" {...rest}>\n <path d=\"m5 11 11-6 11 6-11 6Z M5 16l11 6 11-6 M5 21l11 6 11-6\" />\n </svg>\n );\n}\n\n/** Command — the morning read: a dashboard of unequal panes. */\nexport function CommandIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <rect x=\"2.5\" y=\"2.5\" width=\"5\" height=\"6\" rx=\"1\" />\n <rect x=\"8.5\" y=\"2.5\" width=\"5\" height=\"3.5\" rx=\"1\" />\n <rect x=\"8.5\" y=\"7.5\" width=\"5\" height=\"6\" rx=\"1\" />\n <rect x=\"2.5\" y=\"10\" width=\"5\" height=\"3.5\" rx=\"1\" />\n </Icon>\n );\n}\n\n/** Fleet — lanes of work, each with its runner (the live swimlane). */\nexport function FleetIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.5 4.5h5M2.5 8h9M2.5 11.5h3.5\" />\n <circle cx=\"10\" cy=\"4.5\" r=\"1.3\" />\n <circle cx=\"13.2\" cy=\"8\" r=\"1.3\" />\n <circle cx=\"8.5\" cy=\"11.5\" r=\"1.3\" />\n </Icon>\n );\n}\n\n/** Growth — a trend that climbs. */\nexport function GrowthIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <path d=\"M2.5 12.5 6.5 8.5l2.5 2.5 4.5-5\" />\n <path d=\"M10.5 6h3v3\" />\n </Icon>\n );\n}\n\n/** Mind — the Leader's thinking: a lit bulb. */\nexport function MindIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <path d=\"M8 2.5a4 4 0 0 0-2.4 7.2c.3.25.4.6.4 1v.8h4v-.8c0-.4.1-.75.4-1A4 4 0 0 0 8 2.5Z\" />\n <path d=\"M6.5 13.5h3\" />\n </Icon>\n );\n}\n\n/** Apps & Accounts — a grid of tiles. */\nexport function AppsIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <rect x=\"2.5\" y=\"2.5\" width=\"4.5\" height=\"4.5\" rx=\"1\" />\n <rect x=\"9\" y=\"2.5\" width=\"4.5\" height=\"4.5\" rx=\"1\" />\n <rect x=\"2.5\" y=\"9\" width=\"4.5\" height=\"4.5\" rx=\"1\" />\n <rect x=\"9\" y=\"9\" width=\"4.5\" height=\"4.5\" rx=\"1\" />\n </Icon>\n );\n}\n\n/** The gear tray (Settings, Apps, Usage, Shortcuts). */\nexport function GearIcon(props: IconProps) {\n return (\n <Icon {...props}>\n <circle cx=\"8\" cy=\"8\" r=\"2.1\" />\n <path d=\"M8 1.8v1.7M8 12.5v1.7M14.2 8h-1.7M3.5 8H1.8M12.4 3.6l-1.2 1.2M4.8 11.2l-1.2 1.2M12.4 12.4l-1.2-1.2M4.8 4.8 3.6 3.6\" />\n <circle cx=\"8\" cy=\"8\" r=\"4.4\" />\n </Icon>\n );\n}\n\n/** Needs you — the one inbox (⌘J). */\nexport const NeedsYouIcon = IconInbox;\n\nexport const SECTION_ICON: Record<VerseSectionId, ComponentType<IconProps>> = {\n command: CommandIcon,\n fleet: FleetIcon,\n growth: GrowthIcon,\n mind: MindIcon,\n chat: ChatIcon,\n settings: SettingsIcon,\n apps: AppsIcon,\n usage: UsageIcon,\n};\n","/**\n * THE ONE PERCENT RULE, dependency-free.\n *\n * A measured share of a window (or anything capped at 100) printed the same\n * way everywhere: a whole percent, except that a real reading under 1% is\n * \"<1%\" (never \"0%\", which reads as \"untouched\") and one just short of 100 is\n * \"99%\" (never a rounded \"100%\", which reads as \"spent\"). `used` is 0–100 and\n * is clamped; not a number is \"—\".\n *\n * This module imports nothing so the rail, composer and chat header can use\n * it without pulling panel code into chat first paint. `autonomy/format.ts`\n * `percentText` delegates here, so there is one rule, not two.\n */\nexport function usedPercentText(used: number | null | undefined): string {\n if (typeof used !== 'number' || !Number.isFinite(used)) return '—';\n const clamped = Math.max(0, Math.min(100, used));\n if (clamped > 0 && clamped < 1) return '<1%';\n if (clamped > 99 && clamped < 100) return '99%';\n return `${Math.round(clamped)}%`;\n}\n","/**\n * routes/verse/VerseApp.tsx — the Verse 3.10 workbench shell (unit C1;\n * SPEC-310C §1, SPEC-310B §6).\n *\n * [rail] Command ⌘1 · Fleet ⌘2 · Growth ⌘3 · Mind ⌘4 · Chat ⌘5\n * foot: Needs you (⌘J) · the scarcest seat's capacity ring · ⚙ tray\n * [main] the current surface, with up to three recent surfaces (and Chat,\n * once visited) kept MOUNTED behind it — hidden + inert\n * [dock] the Resources drawer when PINNED (3.11 C6): a third grid track\n * that shrinks [main]. Unpinned it floats over the surface, opened\n * from the right-edge tab, the rail, ⌘. or ⌘K \"Show resources\".\n * overlays ⌘K palette · ⌘J Needs-you drawer · ⌘/ shortcuts · the guard\n *\n * KEEP-ALIVE. Switching surfaces used to unmount the one you left: the\n * approvals selection, the autonomy scroll and the chat's streams were\n * rebuilt every time. Now a left surface stays mounted, `hidden` (no paint,\n * no layout) and `inert` (no focus, no clicks, out of the accessibility\n * tree), inside a SectionVisibilityProvider that tells its polls to stop\n * (C0's usePollWhileVisible). Coming back is instant and exactly where you\n * were. The list is bounded (verse-ui-store KEEP_ALIVE_SURFACES).\n *\n * KEYS come from C0's command catalog — the shell handles the GLOBAL ones\n * (surfaces, palette, drawer, shortcuts, history, recent chats, rail labels,\n * new chat, theme) through the command bus, so the palette, the native menu\n * and a key press all run the same handler. Chat and composer keys belong to\n * C2 / C3 and are never bound here. While the palette is open it owns every\n * key; while a dialog the shell did not open is up (a confirmation, the\n * token prompt, New chat), global keys stand down.\n *\n * SECTIONS resolve through `shell/section-modules.ts`'s glob, one lazy chunk\n * each; a surface whose module has not landed shows a designed \"not in this\n * build\" state (no source paths), and Fleet falls back to the legacy Autonomy\n * panels until C7 lands its own.\n *\n * NATIVE (C8). The desktop app's menu, tray, clicked notifications and the\n * system-wide hotkey arrive through app/desktop-shell.ts\n * `subscribeShellCommands` — the one web seam to the desktop app — already\n * parsed by the catalog: `open-needs-you`, `new-chat`, `focus-composer`,\n * `open-session:<id>` (and the 3.9 menu's two). Anchors (\"go to that card\")\n * arrive as VERSE_ANCHOR_EVENT and are revealed by shell/reveal-anchor.ts.\n */\nimport { Suspense, lazy, useEffect, useMemo, useRef, useState, type ComponentType } from 'react';\nimport { reportThemeToShell, subscribeShellCommands } from '../../app/desktop-shell.js';\nimport { RouteErrorBoundary } from '../../components/primitives/RouteErrorBoundary.js';\nimport { Tooltip } from '../../components/primitives/Tooltip.js';\nimport { useToast } from '../../components/primitives/Toast.js';\nimport { getMutationToken } from '../../data/auth-store.js';\nimport { queryGateStats } from '../../data/cache.js';\nimport { apiPost } from '../../data/client.js';\nimport { useTheme } from '../../data/hooks.js';\nimport { VERSE_ACTIVITY_SEEN_PATH, type VerseActivityCompletion } from '../../../core/verse/workbench-types.js';\nimport { useOnboarding } from './onboarding/useOnboarding.js';\nimport { useResourcesUi } from './resources/resources-store.js';\nimport { detectKeyPlatform, findCommand, formatChord, matchCommand } from './shell/command-catalog.js';\nimport { GuardHost } from './shell/guarded-action.js';\nimport type { RailBadge } from './shell/RailStatus.js';\nimport { subscribeAnchorRequests } from './shell/reveal-anchor.js';\nimport { executeCatalogCommand, useShellCommands } from './shell/run-command.js';\nimport { SectionVisibilityProvider } from './shell/section-visibility.js';\nimport { SECTION_MODULES, sectionImporter } from './shell/section-modules.js';\nimport { SurfaceNotInBuild, SurfaceSkeleton } from './shell/skeletons.js';\nimport { onActivityCompletions, useActivity } from './shell/useActivity.js';\nimport { useViewport } from './shell/viewport.js';\nimport type { WarmupOptions } from './shell/warmup.js';\nimport { useVerseUi } from './useVerseUi.js';\nimport { GearIcon, NeedsYouIcon, SECTION_ICON, VerseMark } from './verse-icons.js';\nimport {\n acknowledgeChatMoved,\n closeVerseOverlay,\n getVerseUiState,\n landedModule,\n openVerseSession,\n RAIL_SECTIONS,\n sectionEntry,\n setVerseSection,\n VERSE_ANCHOR_EVENT,\n VERSE_SECTIONS,\n type VerseSectionId,\n} from './verse-ui-store.js';\nimport styles from './VerseApp.module.css';\nimport { usedPercentText } from './percent-text.js';\n\nexport { SECTION_MODULES };\n\n/**\n * The designed state for a surface whose module has not landed. Exported so\n * it can be tested directly (which surfaces exist changes as owners land).\n */\nexport function MissingSection({ label, blurb }: { label: string; blurb?: string }) {\n return <SurfaceNotInBuild label={label} blurb={blurb ?? ''} />;\n}\n\n/**\n * Resolve one section to a lazy component: the primary module, else its\n * fallback, else the designed missing state. A module that throws while\n * loading is logged to the console (never printed to the operator: messages\n * can carry paths) and shown as missing, never as a torn-down shell.\n */\nfunction sectionLoader(id: VerseSectionId): () => Promise<{ default: ComponentType }> {\n const entry = sectionEntry(id);\n return async () => {\n const module = landedModule(id);\n const importer = module ? sectionImporter(module) : undefined;\n if (!module || !importer) return { default: () => <MissingSection label={entry.label} blurb={entry.blurb} /> };\n try {\n const mod = (await importer()) as Record<string, unknown>;\n const exported = mod[module] ?? mod.default;\n if (typeof exported === 'function') return { default: exported as ComponentType };\n console.error(`[verse] ${module} exports no ${module} component`);\n } catch (err) {\n console.error(`[verse] ${entry.label} failed to load`, err);\n }\n return { default: () => <MissingSection label={entry.label} blurb={entry.blurb} /> };\n };\n}\n\n/** One load per section for the life of the tab — shared by its lazy component and the idle prefetch. */\nconst sectionLoads = new Map<VerseSectionId, Promise<{ default: ComponentType }>>();\n/** Sections whose module has arrived, mounted directly (no Suspense round-trip, so no skeleton frame). */\nconst loadedSections = new Map<VerseSectionId, ComponentType>();\n\nfunction loadSection(id: VerseSectionId): Promise<{ default: ComponentType }> {\n let load = sectionLoads.get(id);\n if (!load) {\n load = sectionLoader(id)().then((mod) => {\n loadedSections.set(id, mod.default);\n return mod;\n });\n sectionLoads.set(id, load);\n }\n return load;\n}\n\n/** One lazy component per section, for the life of the tab. */\nconst SECTION_COMPONENTS = new Map<VerseSectionId, ComponentType>(\n VERSE_SECTIONS.map((s) => [s.id, lazy(() => loadSection(s.id))] as const),\n);\n\n// ---------------------------------------------------------------------------\n// Off the first-paint path (review 3.10 d1)\n// ---------------------------------------------------------------------------\n//\n// WHY: every module this file imports statically is in the chunk a cold chat\n// paint must download and parse before anything shows (SPEC-310A §1: chat\n// critical JS ≤ 350 KB, SPEC-310C \"xterm, the charts and the palette each load\n// as separate lazy chunks\"). The overlays render only while open, onboarding\n// only on a first run, and the rail's badges and capacity ring only once the\n// activity / capacity reads answer — none of them can draw anything at first\n// paint, so none of them may cost first-paint bytes. Each is its own chunk,\n// fetched after first paint (the overlays on idle, below) so ⌘K still opens\n// without a visible wait.\n\nconst importPalette = () => import('./shell/CommandPalette.js');\nconst importDrawer = () => import('./shell/NeedsYouDrawer.js');\nconst importShortcuts = () => import('./shell/ShortcutsOverlay.js');\nconst importGearTray = () => import('./shell/GearTray.js');\nconst importOnboarding = () => import('./onboarding/OnboardingFlow.js');\nconst importRailStatus = () => import('./shell/RailStatus.js');\nconst importWarmup = () => import('./shell/warmup.js');\n// Resources (3.11 C6): the edge tab, rail button, ⌘. handler and the drawer\n// (itself a further chunk) — see resources/ResourcesChrome.tsx for why.\nconst importResources = () => import('./resources/ResourcesChrome.js');\n\nconst CommandPalette = lazy(() => importPalette().then((m) => ({ default: m.CommandPalette })));\nconst NeedsYouDrawer = lazy(() => importDrawer().then((m) => ({ default: m.NeedsYouDrawer })));\nconst ShortcutsOverlay = lazy(() => importShortcuts().then((m) => ({ default: m.ShortcutsOverlay })));\nconst GearTray = lazy(() => importGearTray().then((m) => ({ default: m.GearTray })));\nconst OnboardingFlow = lazy(() => importOnboarding().then((m) => ({ default: m.OnboardingFlow })));\nconst ResourcesChrome = lazy(() => importResources().then((m) => ({ default: m.ResourcesChrome })));\nconst ResourcesRailButton = lazy(() => importResources().then((m) => ({ default: m.ResourcesRailButton })));\n\n/**\n * The after-first-paint warm-up (shell/warmup.ts): the overlay chunks, then\n * each rail surface not yet open — its chunk (the same load its lazy\n * component uses, so the first visit mounts it directly) and the reads it\n * opens with — one piece at a time, and only while the operator is idle: no\n * input for a quiet period and none of their reads in flight.\n *\n * The scheduler and the step list are a lazy chunk; this trigger is all the\n * warm-up costs chat first paint. Returns a cancel (called on unmount; safe\n * before the chunk has even arrived).\n */\nexport function prefetchAfterFirstPaint(options?: WarmupOptions): () => void {\n const readsInFlight = () => {\n const gate = queryGateStats();\n return gate.active + gate.queued > 0;\n };\n let live = true;\n let cancel: (() => void) | null = null;\n void importWarmup().then(\n (m) => {\n if (live) cancel = m.warmUpAfterFirstPaint({ loadSection, overlays: [importPalette, importDrawer, importShortcuts, () => importResources().then((r) => r.preloadResourcesDrawer())], readsInFlight }, options);\n },\n () => undefined,\n );\n return () => {\n live = false;\n cancel?.();\n };\n}\n\ntype RailStatusModule = typeof import('./shell/RailStatus.js');\nlet railStatusModule: RailStatusModule | null = null;\n\n/**\n * The rail badge / capacity module, loaded after first paint. RailStatus\n * pulls the usage contract and capacity-strip model (~30 KB) for the ring;\n * the badges it draws depend on the activity read, which is not back at first\n * paint either, so waiting for the module costs nothing visible. Null until\n * loaded — the rail then draws no badge, which RailStatus already defines as\n * \"not known yet\", never \"zero\".\n */\nfunction useRailStatusModule(): RailStatusModule | null {\n const [mod, setMod] = useState<RailStatusModule | null>(railStatusModule);\n useEffect(() => {\n if (mod) return undefined;\n let alive = true;\n void importRailStatus().then(\n (m) => {\n railStatusModule = m;\n if (alive) setMod(m);\n },\n (err) => console.error('[verse] rail status failed to load', err),\n );\n return () => {\n alive = false;\n };\n }, [mod]);\n return mod;\n}\n\n/** A dialog the shell did not open (a confirmation, the token prompt, New chat) is up. */\nfunction foreignModalOpen(): boolean {\n return [...document.querySelectorAll('[aria-modal=\"true\"]')].some(\n (el) => !el.hasAttribute('data-verse-overlay') && !el.querySelector('[data-verse-overlay]'),\n );\n}\n\nconst COMPLETION_TOAST_LIMIT = 3;\n\nexport function VerseApp() {\n const ui = useVerseUi();\n const theme = useTheme();\n const toast = useToast();\n const activity = useActivity();\n const { compact } = useViewport();\n const platform = useMemo(() => detectKeyPlatform(), []);\n const gearRef = useRef<HTMLButtonElement>(null);\n const [trayOpen, setTrayOpen] = useState(false);\n const data = activity.data;\n const rail = useRailStatusModule();\n const onboarding = useOnboarding();\n const resources = useResourcesUi();\n\n useEffect(() => prefetchAfterFirstPaint(), []);\n // The gear tray is fetched right after mount (not on idle) and then stays\n // MOUNTED closed, exactly as before it was split out: its open effect\n // schedules the first item's focus on a frame, and mounting it only on the\n // click shifted that frame behind the operator's first arrow key.\n const [gearReady, setGearReady] = useState(false);\n useEffect(() => {\n let alive = true;\n void importGearTray().then(\n () => { if (alive) setGearReady(true); },\n (err) => console.error('[verse] settings tray failed to load', err),\n );\n return () => { alive = false; };\n }, []);\n\n // ── the global commands the shell serves, and run-command's toasts ─────\n useShellCommands();\n\n // ── global keys ─────────────────────────────────────────────────────────\n useEffect(() => {\n function onKey(event: KeyboardEvent) {\n if (event.defaultPrevented) return;\n if (getVerseUiState().overlay === 'palette') return;\n if (foreignModalOpen()) return;\n const command = matchCommand(event, ['global']);\n if (!command) return;\n // preventDefault BEFORE running: the chat's key fallback and the\n // transcript's ⌥↑/⌥↓ skip default-prevented events (C2), which is what\n // keeps one press from running two handlers. stopPropagation is not\n // used — other listeners still see the event, they just know it is taken.\n event.preventDefault();\n executeCatalogCommand(command.id, { via: 'key' });\n }\n document.addEventListener('keydown', onKey);\n return () => document.removeEventListener('keydown', onKey);\n }, []);\n\n // ── the desktop shell: menu, tray, notifications, hotkey ────────────────\n useEffect(\n () =>\n subscribeShellCommands((command) => {\n if (command.kind === 'open-session') {\n closeVerseOverlay();\n openVerseSession(command.sessionId);\n return;\n }\n // The tray's \"New chat\" and the hotkey's \"focus the composer\" must\n // land in the composer: an open palette or shortcuts sheet would keep\n // focus (and every key) for itself. The drawer opener, the theme and\n // Settings leave overlays alone — open-needs-you REPLACES the overlay.\n if (command.name === 'new-chat' || command.name === 'focus-composer') closeVerseOverlay();\n executeCatalogCommand(command.commandId, { via: 'menu' });\n }),\n [],\n );\n // \"Go to that card\": whoever raises it (drawer, Command, Mind), the shell reveals it.\n useEffect(() => subscribeAnchorRequests(VERSE_ANCHOR_EVENT), []);\n // Report the PAINTED theme so the native window pre-paints its background\n // on the next cold launch instead of flashing white. No-op in a browser.\n useEffect(() => { reportThemeToShell(theme.theme); }, [theme.theme]);\n\n // ── one-time announcements ──────────────────────────────────────────────\n useEffect(() => {\n if (!ui.announceChatMoved) return;\n const chat = findCommand('surface.chat')?.keys[0];\n toast.show(`Chat moved to ${chat ? formatChord(chat, platform) : '⌘5'} — Command, Fleet, Growth and Mind come first now.`);\n acknowledgeChatMoved();\n }, [ui.announceChatMoved, toast, platform]);\n\n // ── in-app \"Finished / Failed\" (the window is visible; C8 notifies when it is not) ─\n useEffect(\n () =>\n onActivityCompletions((batch: VerseActivityCompletion[]) => {\n if (typeof document !== 'undefined' && document.visibilityState === 'hidden') return;\n const s = getVerseUiState();\n const news = batch.filter((c) => !(s.section === 'chat' && s.activeSessionId === c.sessionId));\n const failed = news.filter((c) => c.outcome === 'failed');\n for (const c of failed.slice(0, COMPLETION_TOAST_LIMIT)) toast.show(`Failed: ${c.title}`, 'danger');\n const done = news.filter((c) => c.outcome === 'ok');\n if (done.length > COMPLETION_TOAST_LIMIT) toast.show(`${done.length} chats finished.`, 'success');\n else for (const c of done) toast.show(`Finished: ${c.title}`, 'success');\n }),\n [toast],\n );\n\n // ── Mind's dot clears when Mind is opened ───────────────────────────────\n const [mindSeenLocal, setMindSeenLocal] = useState<string | null>(null);\n const latestMemoAt = data?.mind?.latestMemoAt ?? null;\n useEffect(() => {\n if (ui.section !== 'mind' || !data?.mind?.unseen || !latestMemoAt) return;\n setMindSeenLocal(latestMemoAt);\n // Best-effort on the server too (it needs a held token; reading Mind is\n // not worth a token prompt — the local mark already clears the dot).\n const token = getMutationToken();\n if (token) void apiPost<unknown>(VERSE_ACTIVITY_SEEN_PATH, { surface: 'mind' }, token).catch(() => undefined);\n }, [ui.section, data?.mind?.unseen, latestMemoAt]);\n\n const expanded = ui.railExpanded && !compact;\n const needsYouCount = data ? data.counts.needsYou : null;\n // Settings, Apps & Accounts and Usage open from the gear, so on those pages\n // the gear IS the current rail item — for assistive tech too (aria-current,\n // and the page's name, since one gear stands for three pages), not only\n // through the data-active styling.\n const currentPage = sectionEntry(ui.section);\n const gearPage = currentPage.placement === 'tray' ? currentPage : null;\n const BadgeMark = rail?.RailBadgeMark ?? null;\n const shortcut = (id: string) => {\n const chord = findCommand(id)?.keys[0];\n return chord ? formatChord(chord, platform) : undefined;\n };\n\n return (\n <div\n className={styles.shell}\n data-rail={expanded ? 'expanded' : 'collapsed'}\n data-compact={compact || undefined}\n data-resources={resources.open && resources.pinned && !compact ? 'docked' : undefined}\n >\n <nav className={styles.rail} data-rail={expanded ? 'expanded' : 'collapsed'} aria-label=\"Verse sections\">\n {/*\n Desktop shell: the window's top 48px is overlaid by the OS title bar\n and the traffic lights. The rail clears it in CSS; this strip makes\n the cleared space drag the window. 0px tall in a browser, where\n `--app-titlebar-height` is not set. See desktop/README.md.\n */}\n <span className={styles.railDragStrip} data-app-region=\"drag\" aria-hidden=\"true\" />\n <Tooltip label=\"Ashlr Verse\" placement=\"right\" disabled={expanded}>\n <span className={styles.mark}>\n <VerseMark />\n <span className=\"visually-hidden\">Ashlr Verse</span>\n </span>\n </Tooltip>\n <ul className={styles.railList}>\n {RAIL_SECTIONS.map((entry) => {\n const IconComponent = SECTION_ICON[entry.id];\n // Mind's dot also clears on sight in THIS window, whether or not\n // the server-side mark could be written (it needs a held token).\n const mindSeenHere = entry.id === 'mind' && latestMemoAt !== null && mindSeenLocal === latestMemoAt;\n const badge: RailBadge | null = mindSeenHere || !rail ? null : rail.railBadgeFor(entry.id, data);\n const active = ui.section === entry.id;\n const keys = shortcut(`surface.${entry.id}`);\n return (\n <li key={entry.id}>\n {/* The name stays on the button; badges ride it so they are announced, not just drawn. */}\n <Tooltip label={entry.label} shortcut={keys} placement=\"right\" disabled={expanded || compact}>\n <button\n type=\"button\"\n className={styles.railButton}\n aria-current={active ? 'page' : undefined}\n data-section={entry.id}\n aria-label={`${entry.label}${badge?.spoken ?? ''}`}\n onClick={() => setVerseSection(entry.id)}\n >\n <span className={styles.railIcon}>\n <IconComponent />\n {badge && BadgeMark ? <BadgeMark badge={badge} /> : null}\n </span>\n {expanded || compact ? <span className={styles.railLabel}>{entry.label}</span> : null}\n {expanded && keys ? <span className={styles.railKey} aria-hidden=\"true\">{keys}</span> : null}\n </button>\n </Tooltip>\n </li>\n );\n })}\n </ul>\n <div className={styles.railFoot}>\n <Tooltip label=\"Needs you\" shortcut={shortcut('needs-you.open')} placement=\"right\" disabled={expanded || compact}>\n <button\n type=\"button\"\n className={styles.railButton}\n aria-label={needsYouCount === null ? 'Needs you' : `Needs you, ${needsYouCount}`}\n aria-expanded={ui.overlay === 'needs-you'}\n data-needs-you={needsYouCount ?? undefined}\n onClick={() => executeCatalogCommand('needs-you.open', { via: 'button' })}\n >\n <span className={styles.railIcon}>\n <NeedsYouIcon />\n {needsYouCount && BadgeMark ? <BadgeMark badge={{ kind: 'count', count: needsYouCount, spoken: '', tone: 'warning' }} /> : null}\n </span>\n {expanded || compact ? <span className={styles.railLabel}>{compact ? 'Inbox' : 'Needs you'}</span> : null}\n </button>\n </Tooltip>\n {compact ? null : (\n <Suspense fallback={null}>\n <ResourcesRailButton expanded={expanded} buttonClass={styles.railButton} iconClass={styles.railIcon} labelClass={styles.railLabel} />\n </Suspense>\n )}\n {rail && !compact ? <RailCapacityButton rail={rail} expanded={expanded} /> : null}\n <Tooltip label=\"Settings and more\" placement=\"right\" disabled={expanded || compact || trayOpen}>\n <button\n ref={gearRef}\n type=\"button\"\n className={styles.railButton}\n aria-label={gearPage ? `Settings and more (${gearPage.label} open)` : 'Settings and more'}\n aria-haspopup=\"menu\"\n aria-expanded={trayOpen}\n aria-current={gearPage ? 'page' : undefined}\n data-gear\n data-active={gearPage ? true : undefined}\n onClick={() => setTrayOpen((v) => !v)}\n >\n <span className={styles.railIcon}><GearIcon /></span>\n {expanded || compact ? <span className={styles.railLabel}>{compact ? 'More' : 'Settings'}</span> : null}\n </button>\n </Tooltip>\n </div>\n </nav>\n\n {/*\n The ONE <main id=\"main-content\"> for the whole shell (SkipToContent\n focuses it). Every mounted surface lives inside it; only the current\n one is visible.\n */}\n <main className={styles.section} data-section={ui.section} id=\"main-content\" tabIndex={-1}>\n {ui.mounted.map((id) => (\n <SurfaceHost key={id} id={id} active={id === ui.section} />\n ))}\n </main>\n\n {/* Lazy chunks (see \"Off the first-paint path\"); each mounts only while it can draw. */}\n <Suspense fallback={null}>\n {gearReady || trayOpen ? <GearTray open={trayOpen} anchorRef={gearRef} onClose={() => setTrayOpen(false)} compact={compact} /> : null}\n </Suspense>\n <Suspense fallback={null}>\n <ResourcesChrome compact={compact} />\n </Suspense>\n <Suspense fallback={null}>\n {ui.overlay === 'palette' ? <CommandPalette /> : null}\n {ui.overlay === 'needs-you' ? <NeedsYouDrawer /> : null}\n {ui.overlay === 'shortcuts' ? <ShortcutsOverlay /> : null}\n </Suspense>\n <GuardHost />\n {/*\n First run only, outside the surfaces: a docked card, not a modal, so\n the rail and the surface stay usable while it is open.\n */}\n <Suspense fallback={null}>{onboarding.open ? <OnboardingFlow /> : null}</Suspense>\n </div>\n );\n}\n\n/**\n * The rail foot's capacity ring for the scarcest seat. Its own component so\n * `useRailCapacity` (a hook from the lazily loaded RailStatus module) is only\n * called once that module is here, always in the same place.\n */\nfunction RailCapacityButton({ rail, expanded }: { rail: RailStatusModule; expanded: boolean }) {\n const capacity = rail.useRailCapacity();\n if (!capacity) return null;\n const { CapacityRing, describeRailCapacity } = rail;\n return (\n <Tooltip label={describeRailCapacity(capacity)} placement=\"right\" disabled={expanded}>\n <button\n type=\"button\"\n className={styles.railButton}\n aria-label={`Capacity — ${describeRailCapacity(capacity)}`}\n data-capacity={Math.round(capacity.usedPercent)}\n onClick={() => setVerseSection('apps', `seat:${capacity.seatId}`)}\n >\n <span className={styles.railIcon}>\n <CapacityRing badge={capacity} />\n </span>\n {expanded ? (\n <span className={styles.railLabel}>\n {capacity.label} {capacity.limitReached ? 'limit' : usedPercentText(capacity.usedPercent)}\n </span>\n ) : null}\n </button>\n </Tooltip>\n );\n}\n\nfunction SurfaceHost({ id, active }: { id: VerseSectionId; active: boolean }) {\n // A section the idle prefetch already loaded mounts directly: React.lazy\n // would still suspend once on its first render — even with the module in\n // hand — and commit the skeleton, the very flash the prefetch exists to\n // remove. Chosen ONCE per host, so a load that lands while this surface is\n // up never swaps the component type under it (that would remount the\n // surface and drop its state).\n const [Section] = useState<ComponentType>(() => loadedSections.get(id) ?? SECTION_COMPONENTS.get(id)!);\n const entry = sectionEntry(id);\n return (\n <div className={styles.surface} data-surface={id} hidden={!active} inert={!active}>\n <SectionVisibilityProvider visible={active}>\n <RouteErrorBoundary resetKey={id}>\n <Suspense fallback={<SurfaceSkeleton section={id} label={entry.label} />}>\n <Section />\n </Suspense>\n </RouteErrorBoundary>\n </SectionVisibilityProvider>\n </div>\n );\n}\n","export default \"__VITE_ASSET__VRAku6fjghkApIISiBWPzg__\"","export default \"__VITE_ASSET__WPGYjwIlzWVNM1bYhOc83w__\"","/**\n * app/VerseConsoleApp.tsx — isolated bootstrap for /verse (pattern:\n * ResourcePoolConsoleApp). No global dashboard shell, router, or observer\n * stream: the read session is probed against /api/verse/bootstrap, host-\n * injected tokens (desktop wrapper) are adopted before that probe, and the\n * full-bleed VerseApp takes over once authenticated.\n *\n * V3.10 — first paint without a serial wait. The chunk of the section the\n * shell will mount (Chat, unless the operator left another one open) used to\n * start downloading only AFTER the bootstrap probe answered: index →\n * this module → probe → section chunk, one round trip after another. Now\n * this module starts that import the moment it evaluates, in parallel with\n * the probe (Vite shares the in-flight import with the lazy() that mounts\n * it later), and preloads the two Latin font subsets the first paint needs.\n *\n * V3.10 — a restarted desktop sidecar is re-adopted at once. The desktop\n * shell restarts a crashed server in the background, hands the new tokens to\n * this page as `window.__ASHLR_TOKENS__` and fires `ashlr:sidecar-restarted`\n * (desktop/src-tauri/src/main.rs token_handoff_script). The old cookie died\n * with the old server, so without listening the page would sit until its\n * next 401 → failed renewal → SessionGate → adoption.\n */\nimport { useEffect } from 'react';\nimport { SessionGate } from '../components/auth/SessionGate.js';\nimport { ToastProvider } from '../components/primitives/Toast.js';\nimport { adoptInjectedTokens, markCheckComplete } from '../data/auth-store.js';\nimport { getQuerySnapshot, runQuery } from '../data/cache.js';\nimport { useAuthPhase } from '../data/hooks.js';\nimport { SECTION_MODULES, VerseApp } from '../routes/verse/VerseApp.js';\nimport { invalidateVerseLists, verseBootstrapQuery } from '../routes/verse/verse-queries.js';\nimport { getVerseUiState, VERSE_SECTIONS } from '../routes/verse/verse-ui-store.js';\nimport uiFontLatin from '../design/fonts/AshlrSans-latin.woff2?url';\nimport displayFontLatin from '../design/fonts/SpaceGrotesk-latin.woff2?url';\nimport { SkipToContent } from './SkipToContent.js';\nimport styles from './VerseConsoleApp.module.css';\nimport '../design/global.css';\n\n/**\n * Start what the first paint will need, without waiting for the auth probe.\n * Everything here is a cache warm-up: a failure is ignored, because the real\n * mount (VerseApp's sectionLoader, the CSS @font-face) repeats the request\n * and owns the error handling.\n */\nexport function preloadVerseFirstPaint(doc: Document | null = typeof document === 'undefined' ? null : document): void {\n const section = VERSE_SECTIONS.find((s) => s.id === getVerseUiState().section);\n const importer = section ? SECTION_MODULES[`./sections/${section.module}.tsx`] : undefined;\n if (importer) void importer().catch(() => undefined);\n if (!doc?.head) return;\n for (const href of [uiFontLatin, displayFontLatin]) {\n const present = [...doc.head.querySelectorAll('link[rel=\"preload\"]')].some((l) => l.getAttribute('href') === href);\n if (present) continue;\n const link = doc.createElement('link');\n link.rel = 'preload';\n link.as = 'font';\n link.type = 'font/woff2';\n // Font preloads are CORS requests even same-origin; without this the\n // browser fetches the file twice.\n link.crossOrigin = 'anonymous';\n link.href = href;\n doc.head.append(link);\n }\n}\n\npreloadVerseFirstPaint();\n\n/** DOM event the desktop shell fires after handing a restarted sidecar's tokens to this page. */\nexport const SIDECAR_RESTARTED_EVENT = 'ashlr:sidecar-restarted';\n\n/**\n * Re-adopt host tokens whenever the desktop shell says its sidecar restarted.\n * Returns the disposer.\n *\n * Installed for the page's whole life, whatever the auth phase: the event may\n * land while the SessionGate is showing (adoption then replaces the prompt,\n * because establishReadSession flips the phase) or while the app looks\n * authenticated on a dead cookie. After a successful adoption the lists are\n * refetched — the restarted server may have marked turns interrupted — and\n * the live streams reconnect on their own: their next attempt now carries a\n * valid cookie. A failed adoption changes nothing; the ordinary 401 path\n * still ends at the SessionGate. The event carries no data, so a page script\n * firing it can at most make the page re-read tokens that are already there.\n */\nexport function listenForSidecarRestart(target: Pick<Window, 'addEventListener' | 'removeEventListener'> = window): () => void {\n let inFlight = false;\n let again = false;\n let disposed = false;\n const onRestart = (): void => {\n if (disposed) return;\n // Restarts in quick succession: adoption reads `window.__ASHLR_TOKENS__`\n // when it STARTS, so a second restart during an exchange left newer\n // tokens behind it. Run exactly once more after the current exchange\n // instead of racing a second one for the cookie.\n if (inFlight) {\n again = true;\n return;\n }\n inFlight = true;\n void adoptInjectedTokens()\n .then((adopted) => { if (adopted) invalidateVerseLists(); })\n .catch(() => undefined)\n .finally(() => {\n inFlight = false;\n if (again) {\n again = false;\n onRestart();\n }\n });\n };\n target.addEventListener(SIDECAR_RESTARTED_EVENT, onRestart);\n return () => {\n disposed = true;\n target.removeEventListener(SIDECAR_RESTARTED_EVENT, onRestart);\n };\n}\n\nexport function VerseConsoleApp() {\n const phase = useAuthPhase();\n useEffect(() => listenForSidecarRestart(), []);\n useEffect(() => {\n if (phase !== 'checking') return;\n let cancelled = false;\n void adoptInjectedTokens().then((adopted) => {\n if (cancelled || adopted) return;\n return runQuery(verseBootstrapQuery.key, verseBootstrapQuery.fetch).then(() => {\n if (!cancelled) markCheckComplete(getQuerySnapshot(verseBootstrapQuery.key).status === 'success');\n });\n });\n return () => { cancelled = true; };\n }, [phase]);\n if (phase === 'checking') return <p className={styles.checking} role=\"status\">Checking for an existing Verse session…</p>;\n if (phase === 'unauthenticated') {\n return <SessionGate heading=\"Connect to Ashlr Verse\" command=\"ashlr verse\" subject=\"Ashlr Verse\" mutationField />;\n }\n return (\n <ToastProvider>\n <SkipToContent />\n <div className={styles.shell}><VerseApp /></div>\n </ToastProvider>\n );\n}\n"],"file":"VerseConsoleApp-WVeyJnW7.js"}