@ashlr/hub 3.11.0 → 3.11.3

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 +104 -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-FxXeRbPx.js} +2 -2
  19. package/dist/core/web/public/next/assets/{ActionMenu-CQvNJvHY.js.map → ActionMenu-FxXeRbPx.js.map} +1 -1
  20. package/dist/core/web/public/next/assets/Advanced-D_eS4472.js +2 -0
  21. package/dist/core/web/public/next/assets/{Advanced-DEM93sKI.js.map → Advanced-D_eS4472.js.map} +1 -1
  22. package/dist/core/web/public/next/assets/App-Cj4zKbG3.js +7 -0
  23. package/dist/core/web/public/next/assets/{App-CimXmK0L.js.map → App-Cj4zKbG3.js.map} +1 -1
  24. package/dist/core/web/public/next/assets/AppsSection-Ddu_RCQE.js +2 -0
  25. package/dist/core/web/public/next/assets/{AppsSection-D6U-dSj6.js.map → AppsSection-Ddu_RCQE.js.map} +1 -1
  26. package/dist/core/web/public/next/assets/{AreaTrend-LD9lCPkT.js → AreaTrend-CDxrQU4b.js} +2 -2
  27. package/dist/core/web/public/next/assets/{AreaTrend-LD9lCPkT.js.map → AreaTrend-CDxrQU4b.js.map} +1 -1
  28. package/dist/core/web/public/next/assets/AutonomySection-DuQkHGD_.js +2 -0
  29. package/dist/core/web/public/next/assets/{AutonomySection-3V9pUyxm.js.map → AutonomySection-DuQkHGD_.js.map} +1 -1
  30. package/dist/core/web/public/next/assets/BranchBar-CLsvOcyK.js +2 -0
  31. package/dist/core/web/public/next/assets/{BranchBar-U8UdpfEB.js.map → BranchBar-CLsvOcyK.js.map} +1 -1
  32. package/dist/core/web/public/next/assets/{BudgetControl-DOTlMSmW.js → BudgetControl-TL3FeZ1D.js} +2 -2
  33. package/dist/core/web/public/next/assets/{BudgetControl-DOTlMSmW.js.map → BudgetControl-TL3FeZ1D.js.map} +1 -1
  34. package/dist/core/web/public/next/assets/{BurnDown-x4PWH9JF.js → BurnDown-sFXkUGdB.js} +2 -2
  35. package/dist/core/web/public/next/assets/{BurnDown-x4PWH9JF.js.map → BurnDown-sFXkUGdB.js.map} +1 -1
  36. package/dist/core/web/public/next/assets/{Button-DYv_KKxr.js → Button-HHXgoXGr.js} +2 -2
  37. package/dist/core/web/public/next/assets/{Button-DYv_KKxr.js.map → Button-HHXgoXGr.js.map} +1 -1
  38. package/dist/core/web/public/next/assets/CapacityStrip-qReu0RaF.js +2 -0
  39. package/dist/core/web/public/next/assets/CapacityStrip-qReu0RaF.js.map +1 -0
  40. package/dist/core/web/public/next/assets/ChatSection-DZuZfTaC.js +3 -0
  41. package/dist/core/web/public/next/assets/ChatSection-DZuZfTaC.js.map +1 -0
  42. package/dist/core/web/public/next/assets/{CloudBudgetForm-DJeJvBEu.js → CloudBudgetForm-DJbiT1wi.js} +2 -2
  43. package/dist/core/web/public/next/assets/{CloudBudgetForm-DJeJvBEu.js.map → CloudBudgetForm-DJbiT1wi.js.map} +1 -1
  44. package/dist/core/web/public/next/assets/CommandPalette-zYLFZRnj.js +2 -0
  45. package/dist/core/web/public/next/assets/{CommandPalette-FiD4N8XD.js.map → CommandPalette-zYLFZRnj.js.map} +1 -1
  46. package/dist/core/web/public/next/assets/CommandSection-rIeMK5Ch.js +2 -0
  47. package/dist/core/web/public/next/assets/{CommandSection-DN8KwH-X.js.map → CommandSection-rIeMK5Ch.js.map} +1 -1
  48. package/dist/core/web/public/next/assets/ConfirmDialog-DLrLKM0c.js +2 -0
  49. package/dist/core/web/public/next/assets/ConfirmDialog-DLrLKM0c.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-BS9Dxi3G.js +2 -0
  52. package/dist/core/web/public/next/assets/Dialog-BS9Dxi3G.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-TOmUf3b2.js} +2 -2
  55. package/dist/core/web/public/next/assets/{DiffPane-DLJ3gGGK.js.map → DiffPane-TOmUf3b2.js.map} +1 -1
  56. package/dist/core/web/public/next/assets/{DiffViewer-B7NWPjIO.js → DiffViewer-BpH56302.js} +2 -2
  57. package/dist/core/web/public/next/assets/{DiffViewer-B7NWPjIO.js.map → DiffViewer-BpH56302.js.map} +1 -1
  58. package/dist/core/web/public/next/assets/DockHost-DzkzR-HD.js +2 -0
  59. package/dist/core/web/public/next/assets/{DockHost-DvR-hPhZ.js.map → DockHost-DzkzR-HD.js.map} +1 -1
  60. package/dist/core/web/public/next/assets/{EmptyState-DhNgDDrF.js → EmptyState-BqR5YAmf.js} +2 -2
  61. package/dist/core/web/public/next/assets/{EmptyState-DhNgDDrF.js.map → EmptyState-BqR5YAmf.js.map} +1 -1
  62. package/dist/core/web/public/next/assets/{Epistemic-uARPnx9x.js → Epistemic-dhvDTwAZ.js} +2 -2
  63. package/dist/core/web/public/next/assets/{Epistemic-uARPnx9x.js.map → Epistemic-dhvDTwAZ.js.map} +1 -1
  64. package/dist/core/web/public/next/assets/FleetSection-ViAb549H.js +3 -0
  65. package/dist/core/web/public/next/assets/{FleetSection-D_zRBCub.js.map → FleetSection-ViAb549H.js.map} +1 -1
  66. package/dist/core/web/public/next/assets/{Funnel-CL8uHONq.js → Funnel-D2u7Wlzc.js} +2 -2
  67. package/dist/core/web/public/next/assets/{Funnel-CL8uHONq.js.map → Funnel-D2u7Wlzc.js.map} +1 -1
  68. package/dist/core/web/public/next/assets/GearTray-Cb2npoxM.js +2 -0
  69. package/dist/core/web/public/next/assets/{GearTray-C7k4l_BW.js.map → GearTray-Cb2npoxM.js.map} +1 -1
  70. package/dist/core/web/public/next/assets/{GrowthSection-DwdNSGj8.js → GrowthSection-C5aDPs8B.js} +2 -2
  71. package/dist/core/web/public/next/assets/{GrowthSection-DwdNSGj8.js.map → GrowthSection-C5aDPs8B.js.map} +1 -1
  72. package/dist/core/web/public/next/assets/HandoffDialog-BF3AYg-X.js +2 -0
  73. package/dist/core/web/public/next/assets/{HandoffDialog-FPVOqOMN.js.map → HandoffDialog-BF3AYg-X.js.map} +1 -1
  74. package/dist/core/web/public/next/assets/{Input-B9-VLcHS.js → Input-B5dmGLZx.js} +2 -2
  75. package/dist/core/web/public/next/assets/{Input-B9-VLcHS.js.map → Input-B5dmGLZx.js.map} +1 -1
  76. package/dist/core/web/public/next/assets/LeaderCard-DZrmjDbI.js +2 -0
  77. package/dist/core/web/public/next/assets/{LeaderCard-4R0BhDzT.js.map → LeaderCard-DZrmjDbI.js.map} +1 -1
  78. package/dist/core/web/public/next/assets/{MatrixHeatmap-DiuushcS.js → MatrixHeatmap-BgEUs2Eu.js} +2 -2
  79. package/dist/core/web/public/next/assets/{MatrixHeatmap-DiuushcS.js.map → MatrixHeatmap-BgEUs2Eu.js.map} +1 -1
  80. package/dist/core/web/public/next/assets/McpSection-DZkiOuoq.js +2 -0
  81. package/dist/core/web/public/next/assets/{McpSection-CJ__OJKl.js.map → McpSection-DZkiOuoq.js.map} +1 -1
  82. package/dist/core/web/public/next/assets/{MessageMarkdown-qWKyJvAQ.js → MessageMarkdown-BauY8ZTY.js} +3 -3
  83. package/dist/core/web/public/next/assets/{MessageMarkdown-qWKyJvAQ.js.map → MessageMarkdown-BauY8ZTY.js.map} +1 -1
  84. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-x05TrsrW.js → MessageMarkdownRenderer-DLBNLfsn.js} +2 -2
  85. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-x05TrsrW.js.map → MessageMarkdownRenderer-DLBNLfsn.js.map} +1 -1
  86. package/dist/core/web/public/next/assets/{Meter-D-hncpkO.js → Meter-DNeocJnD.js} +2 -2
  87. package/dist/core/web/public/next/assets/{Meter-D-hncpkO.js.map → Meter-DNeocJnD.js.map} +1 -1
  88. package/dist/core/web/public/next/assets/MindSection-BvJXFjyX.js +2 -0
  89. package/dist/core/web/public/next/assets/{MindSection-BjXHkQPS.js.map → MindSection-BvJXFjyX.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-mxrw0Yvy.js +2 -0
  92. package/dist/core/web/public/next/assets/MutationTokenDialog-mxrw0Yvy.js.map +1 -0
  93. package/dist/core/web/public/next/assets/NeedsYouDrawer-CO-Balfp.js +2 -0
  94. package/dist/core/web/public/next/assets/{NeedsYouDrawer-rSd1ZHAR.js.map → NeedsYouDrawer-CO-Balfp.js.map} +1 -1
  95. package/dist/core/web/public/next/assets/{NeedsYouList-CG-nB1tr.js → NeedsYouList-CzDZbzRD.js} +2 -2
  96. package/dist/core/web/public/next/assets/{NeedsYouList-CG-nB1tr.js.map → NeedsYouList-CzDZbzRD.js.map} +1 -1
  97. package/dist/core/web/public/next/assets/NewChatDialog-B8eJjlFf.js +3 -0
  98. package/dist/core/web/public/next/assets/{NewChatDialog-BeDQ1eW3.js.map → NewChatDialog-B8eJjlFf.js.map} +1 -1
  99. package/dist/core/web/public/next/assets/OnboardingFlow-Cij6KWat.js +2 -0
  100. package/dist/core/web/public/next/assets/{OnboardingFlow-CkTZtt-m.js.map → OnboardingFlow-Cij6KWat.js.map} +1 -1
  101. package/dist/core/web/public/next/assets/PreviewPane-BS-CleCd.js +2 -0
  102. package/dist/core/web/public/next/assets/{PreviewPane-kzbbSK4u.js.map → PreviewPane-BS-CleCd.js.map} +1 -1
  103. package/dist/core/web/public/next/assets/ProviderLogo-C5mBg8i0.js +2 -0
  104. package/dist/core/web/public/next/assets/ProviderLogo-C5mBg8i0.js.map +1 -0
  105. package/dist/core/web/public/next/assets/{RailStatus-D-t2gPae.js → RailStatus-cPRyOmrk.js} +2 -2
  106. package/dist/core/web/public/next/assets/{RailStatus-D-t2gPae.js.map → RailStatus-cPRyOmrk.js.map} +1 -1
  107. package/dist/core/web/public/next/assets/{RefreshIndicator-BLnr9IOM.js → RefreshIndicator-CMwSCiz5.js} +2 -2
  108. package/dist/core/web/public/next/assets/{RefreshIndicator-BLnr9IOM.js.map → RefreshIndicator-CMwSCiz5.js.map} +1 -1
  109. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BeG0gBif.js → ResourcePoolConsoleApp-BFi1opsC.js} +5 -5
  110. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BeG0gBif.js.map → ResourcePoolConsoleApp-BFi1opsC.js.map} +1 -1
  111. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-CM_8pJs6.css → ResourcePoolConsoleApp-BX9JLkT4.css} +1 -1
  112. package/dist/core/web/public/next/assets/ResourcesChrome-BJCauW_t.js +3 -0
  113. package/dist/core/web/public/next/assets/ResourcesChrome-BJCauW_t.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-BDecg6nO.js +2 -0
  116. package/dist/core/web/public/next/assets/ResourcesDrawer-BDecg6nO.js.map +1 -0
  117. package/dist/core/web/public/next/assets/RouteErrorBoundary-DYtwc2ja.js +2 -0
  118. package/dist/core/web/public/next/assets/RouteErrorBoundary-DYtwc2ja.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-BEGEEM8O.js} +2 -2
  121. package/dist/core/web/public/next/assets/{RunInCloudAction-C3LBp7C4.js.map → RunInCloudAction-BEGEEM8O.js.map} +1 -1
  122. package/dist/core/web/public/next/assets/SeatSelector-CYHRR7Wp.js +3 -0
  123. package/dist/core/web/public/next/assets/{SeatSelector-DpvvbjNm.js.map → SeatSelector-CYHRR7Wp.js.map} +1 -1
  124. package/dist/core/web/public/next/assets/{Segmented-BL40udoO.js → Segmented-BE53BenI.js} +2 -2
  125. package/dist/core/web/public/next/assets/{Segmented-BL40udoO.js.map → Segmented-BE53BenI.js.map} +1 -1
  126. package/dist/core/web/public/next/assets/{Select-FWLnAw_j.js → Select-BwSGkHCS.js} +2 -2
  127. package/dist/core/web/public/next/assets/{Select-FWLnAw_j.js.map → Select-BwSGkHCS.js.map} +1 -1
  128. package/dist/core/web/public/next/assets/SessionGate-DvMpXNpJ.css +1 -0
  129. package/dist/core/web/public/next/assets/SessionGate-e0dFJm9d.js +2 -0
  130. package/dist/core/web/public/next/assets/SessionGate-e0dFJm9d.js.map +1 -0
  131. package/dist/core/web/public/next/assets/SessionInsightChip-CxlSyueJ.js +2 -0
  132. package/dist/core/web/public/next/assets/{SessionInsightChip-CWye87Ju.js.map → SessionInsightChip-CxlSyueJ.js.map} +1 -1
  133. package/dist/core/web/public/next/assets/{SessionSearch-YvCHFUuN.js → SessionSearch-_yp7S2TP.js} +2 -2
  134. package/dist/core/web/public/next/assets/{SessionSearch-YvCHFUuN.js.map → SessionSearch-_yp7S2TP.js.map} +1 -1
  135. package/dist/core/web/public/next/assets/SettingsSection-wGnpWeGW.js +2 -0
  136. package/dist/core/web/public/next/assets/SettingsSection-wGnpWeGW.js.map +1 -0
  137. package/dist/core/web/public/next/assets/Sheet-DVP2Mgy6.js +2 -0
  138. package/dist/core/web/public/next/assets/{Sheet-DZKcQXQg.js.map → Sheet-DVP2Mgy6.js.map} +1 -1
  139. package/dist/core/web/public/next/assets/ShortcutsOverlay-BcIcoClX.js +2 -0
  140. package/dist/core/web/public/next/assets/{ShortcutsOverlay-BpDimdPq.js.map → ShortcutsOverlay-BcIcoClX.js.map} +1 -1
  141. package/dist/core/web/public/next/assets/Sidebar-DjQOqPbm.js +3 -0
  142. package/dist/core/web/public/next/assets/{Sidebar-BoBzBEFX.js.map → Sidebar-DjQOqPbm.js.map} +1 -1
  143. package/dist/core/web/public/next/assets/{Slider-DUMo9HDD.js → Slider-BypUWjpH.js} +2 -2
  144. package/dist/core/web/public/next/assets/{Slider-DUMo9HDD.js.map → Slider-BypUWjpH.js.map} +1 -1
  145. package/dist/core/web/public/next/assets/{StatusBadge-BwnBNFQr.js → StatusBadge-HCZp416_.js} +2 -2
  146. package/dist/core/web/public/next/assets/{StatusBadge-BwnBNFQr.js.map → StatusBadge-HCZp416_.js.map} +1 -1
  147. package/dist/core/web/public/next/assets/{StepBand-PDXMIlRk.js → StepBand-Duz1PUes.js} +2 -2
  148. package/dist/core/web/public/next/assets/{StepBand-PDXMIlRk.js.map → StepBand-Duz1PUes.js.map} +1 -1
  149. package/dist/core/web/public/next/assets/{Surface-B3TZVoER.js → Surface-B75lVfzm.js} +2 -2
  150. package/dist/core/web/public/next/assets/{Surface-B3TZVoER.js.map → Surface-B75lVfzm.js.map} +1 -1
  151. package/dist/core/web/public/next/assets/{Swimlane-DR4OgON_.js → Swimlane-DGcIcnNA.js} +2 -2
  152. package/dist/core/web/public/next/assets/{Swimlane-DR4OgON_.js.map → Swimlane-DGcIcnNA.js.map} +1 -1
  153. package/dist/core/web/public/next/assets/{Switch-CcR5Llk5.js → Switch-iveI-8NY.js} +2 -2
  154. package/dist/core/web/public/next/assets/{Switch-CcR5Llk5.js.map → Switch-iveI-8NY.js.map} +1 -1
  155. package/dist/core/web/public/next/assets/{Tag-_-K1h7Hk.js → Tag-DH15CUJp.js} +2 -2
  156. package/dist/core/web/public/next/assets/{Tag-_-K1h7Hk.js.map → Tag-DH15CUJp.js.map} +1 -1
  157. package/dist/core/web/public/next/assets/TerminalPane-MQT-veKZ.js +7 -0
  158. package/dist/core/web/public/next/assets/{TerminalPane-_1aH4ndN.js.map → TerminalPane-MQT-veKZ.js.map} +1 -1
  159. package/dist/core/web/public/next/assets/UniverseConsoleApp-C8yQ0AaR.js +2 -0
  160. package/dist/core/web/public/next/assets/{UniverseConsoleApp-BUsq-inZ.js.map → UniverseConsoleApp-C8yQ0AaR.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-_nPURPqe.js} +4 -4
  163. package/dist/core/web/public/next/assets/{UniverseView-Dogy_dsB.js.map → UniverseView-_nPURPqe.js.map} +1 -1
  164. package/dist/core/web/public/next/assets/UsageSection-CqxRGJ40.js +2 -0
  165. package/dist/core/web/public/next/assets/{UsageSection-DiX_dTyo.js.map → UsageSection-CqxRGJ40.js.map} +1 -1
  166. package/dist/core/web/public/next/assets/VerseConsoleApp-DTjDpGCd.js +3 -0
  167. package/dist/core/web/public/next/assets/VerseConsoleApp-DTjDpGCd.js.map +1 -0
  168. package/dist/core/web/public/next/assets/Workspace-DfcFGzME.js +10 -0
  169. package/dist/core/web/public/next/assets/Workspace-DfcFGzME.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-tWevL9HV.js +2 -0
  172. package/dist/core/web/public/next/assets/{actions-s2lfm_5k.js.map → actions-tWevL9HV.js.map} +1 -1
  173. package/dist/core/web/public/next/assets/budget-queries-V3wcJVK_.js +2 -0
  174. package/dist/core/web/public/next/assets/{budget-queries-wUshcovN.js.map → budget-queries-V3wcJVK_.js.map} +1 -1
  175. package/dist/core/web/public/next/assets/{capacity-strip-model-Bj_9ztzs.js → capacity-strip-model-BDbmQ3e3.js} +2 -2
  176. package/dist/core/web/public/next/assets/{capacity-strip-model-Bj_9ztzs.js.map → capacity-strip-model-BDbmQ3e3.js.map} +1 -1
  177. package/dist/core/web/public/next/assets/{charts-CMSgAUKn.js → charts-CfAjuKMv.js} +2 -2
  178. package/dist/core/web/public/next/assets/{charts-CMSgAUKn.js.map → charts-CfAjuKMv.js.map} +1 -1
  179. package/dist/core/web/public/next/assets/cloud-queries-Br_r0UAz.js +2 -0
  180. package/dist/core/web/public/next/assets/{cloud-queries-CnV1yaNG.js.map → cloud-queries-Br_r0UAz.js.map} +1 -1
  181. package/dist/core/web/public/next/assets/{cloud.module-CiwatLj3.js → cloud.module-ascz58c3.js} +2 -2
  182. package/dist/core/web/public/next/assets/{cloud.module-CiwatLj3.js.map → cloud.module-ascz58c3.js.map} +1 -1
  183. package/dist/core/web/public/next/assets/{command-bus-DqimKCUY.js → command-bus-xYZoK9nQ.js} +2 -2
  184. package/dist/core/web/public/next/assets/{command-bus-DqimKCUY.js.map → command-bus-xYZoK9nQ.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-BC-HOmPo.js +2 -0
  192. package/dist/core/web/public/next/assets/{context-model-Dwd49-dp.js.map → context-model-BC-HOmPo.js.map} +1 -1
  193. package/dist/core/web/public/next/assets/context-model-CIBmSugV.js +2 -0
  194. package/dist/core/web/public/next/assets/{context-model-MT17V86_.js.map → context-model-CIBmSugV.js.map} +1 -1
  195. package/dist/core/web/public/next/assets/context-queries-CrPcHWTz.js +2 -0
  196. package/dist/core/web/public/next/assets/{context-queries-xVKIeynP.js.map → context-queries-CrPcHWTz.js.map} +1 -1
  197. package/dist/core/web/public/next/assets/control-queries-CmgBgKV7.js +2 -0
  198. package/dist/core/web/public/next/assets/{control-queries-DOZR-D8G.js.map → control-queries-CmgBgKV7.js.map} +1 -1
  199. package/dist/core/web/public/next/assets/{dock-icons-8EtARwUm.js → dock-icons-CUh8dOxJ.js} +2 -2
  200. package/dist/core/web/public/next/assets/{dock-icons-8EtARwUm.js.map → dock-icons-CUh8dOxJ.js.map} +1 -1
  201. package/dist/core/web/public/next/assets/{dock-store-BA1cHOYA.js → dock-store-B2vlxqPu.js} +2 -2
  202. package/dist/core/web/public/next/assets/{dock-store-BA1cHOYA.js.map → dock-store-B2vlxqPu.js.map} +1 -1
  203. package/dist/core/web/public/next/assets/{fleet-model-CNe8Wh-s.js → fleet-model-7i-FbzKI.js} +2 -2
  204. package/dist/core/web/public/next/assets/{fleet-model-CNe8Wh-s.js.map → fleet-model-7i-FbzKI.js.map} +1 -1
  205. package/dist/core/web/public/next/assets/fleet-queries-DzGoqq8X.js +2 -0
  206. package/dist/core/web/public/next/assets/{fleet-queries-BSdRlUwJ.js.map → fleet-queries-DzGoqq8X.js.map} +1 -1
  207. package/dist/core/web/public/next/assets/focus-trap-HtcoXeEq.js +2 -0
  208. package/dist/core/web/public/next/assets/focus-trap-HtcoXeEq.js.map +1 -0
  209. package/dist/core/web/public/next/assets/{format-B8DAVcn2.js → format-BkWdOQDL.js} +2 -2
  210. package/dist/core/web/public/next/assets/{format-B8DAVcn2.js.map → format-BkWdOQDL.js.map} +1 -1
  211. package/dist/core/web/public/next/assets/git-model-bk_RXh3y.js +5 -0
  212. package/dist/core/web/public/next/assets/{git-model-CivuBY_D.js.map → git-model-bk_RXh3y.js.map} +1 -1
  213. package/dist/core/web/public/next/assets/global-BlI2BYa1.css +1 -0
  214. package/dist/core/web/public/next/assets/global-oEl9Qj8u.js +2 -0
  215. package/dist/core/web/public/next/assets/global-oEl9Qj8u.js.map +1 -0
  216. package/dist/core/web/public/next/assets/guarded-action-OzqcPjmh.js +3 -0
  217. package/dist/core/web/public/next/assets/guarded-action-OzqcPjmh.js.map +1 -0
  218. package/dist/core/web/public/next/assets/guarded-runners-LHLXmXIk.js +2 -0
  219. package/dist/core/web/public/next/assets/guarded-runners-LHLXmXIk.js.map +1 -0
  220. package/dist/core/web/public/next/assets/icon-base-DvM1eI5V.js +2 -0
  221. package/dist/core/web/public/next/assets/icon-base-DvM1eI5V.js.map +1 -0
  222. package/dist/core/web/public/next/assets/icons-DEQa2rTx.js +2 -0
  223. package/dist/core/web/public/next/assets/icons-DEQa2rTx.js.map +1 -0
  224. package/dist/core/web/public/next/assets/{index-oAAq8XJa.js → index-BVxOlseC.js} +3 -3
  225. package/dist/core/web/public/next/assets/{index-oAAq8XJa.js.map → index-BVxOlseC.js.map} +1 -1
  226. package/dist/core/web/public/next/assets/{live-model-DCw_IFRI.js → live-model-bmsJgnYD.js} +2 -2
  227. package/dist/core/web/public/next/assets/{live-model-DCw_IFRI.js.map → live-model-bmsJgnYD.js.map} +1 -1
  228. package/dist/core/web/public/next/assets/{mind.module-vnuJcwvD.js → mind.module-gTGAuJt1.js} +2 -2
  229. package/dist/core/web/public/next/assets/{mind.module-vnuJcwvD.js.map → mind.module-gTGAuJt1.js.map} +1 -1
  230. package/dist/core/web/public/next/assets/mutations-C5S7okTW.js +2 -0
  231. package/dist/core/web/public/next/assets/{mutations-Dpsql5t7.js.map → mutations-C5S7okTW.js.map} +1 -1
  232. package/dist/core/web/public/next/assets/nav-NVtnuG7A.js +2 -0
  233. package/dist/core/web/public/next/assets/nav-NVtnuG7A.js.map +1 -0
  234. package/dist/core/web/public/next/assets/overnight-queries-DGm3qL1b.js +2 -0
  235. package/dist/core/web/public/next/assets/{overnight-queries-X-44Gsw5.js.map → overnight-queries-DGm3qL1b.js.map} +1 -1
  236. package/dist/core/web/public/next/assets/preloaded-Cwf9rsnZ.js +2 -0
  237. package/dist/core/web/public/next/assets/preloaded-Cwf9rsnZ.js.map +1 -0
  238. package/dist/core/web/public/next/assets/primitives-DyCKYSBG.js +1 -0
  239. package/dist/core/web/public/next/assets/{queries-BA4rNGD-.js → queries-CYisSAAB.js} +2 -2
  240. package/dist/core/web/public/next/assets/{queries-BA4rNGD-.js.map → queries-CYisSAAB.js.map} +1 -1
  241. package/dist/core/web/public/next/assets/reasoning-pref-BUcFF_5G.js +2 -0
  242. package/dist/core/web/public/next/assets/{reasoning-pref-B9-DJUXP.js.map → reasoning-pref-BUcFF_5G.js.map} +1 -1
  243. package/dist/core/web/public/next/assets/reveal-anchor-D-tV8xau.js +2 -0
  244. package/dist/core/web/public/next/assets/reveal-anchor-D-tV8xau.js.map +1 -0
  245. package/dist/core/web/public/next/assets/seat-subscription-B-f9ViU2.js +2 -0
  246. package/dist/core/web/public/next/assets/{seat-subscription-CH6fW4fJ.js.map → seat-subscription-B-f9ViU2.js.map} +1 -1
  247. package/dist/core/web/public/next/assets/{section-visibility-qFqc_d4Z.js → section-visibility-Yctxu-if.js} +2 -2
  248. package/dist/core/web/public/next/assets/{section-visibility-qFqc_d4Z.js.map → section-visibility-Yctxu-if.js.map} +1 -1
  249. package/dist/core/web/public/next/assets/{sidebar-model-M1GaQU5l.js → sidebar-model-DQ-FyBHW.js} +2 -2
  250. package/dist/core/web/public/next/assets/{sidebar-model-M1GaQU5l.js.map → sidebar-model-DQ-FyBHW.js.map} +1 -1
  251. package/dist/core/web/public/next/assets/slots-BhP8b8tf.js +3 -0
  252. package/dist/core/web/public/next/assets/{slots-Ds9ZIqUL.js.map → slots-BhP8b8tf.js.map} +1 -1
  253. package/dist/core/web/public/next/assets/surface-data-DTI7LjvH.js +2 -0
  254. package/dist/core/web/public/next/assets/{surface-data-J52iIGMD.js.map → surface-data-DTI7LjvH.js.map} +1 -1
  255. package/dist/core/web/public/next/assets/surface-prefetch-CdUEBFrl.js +2 -0
  256. package/dist/core/web/public/next/assets/{surface-prefetch-CgZ-LEJK.js.map → surface-prefetch-CdUEBFrl.js.map} +1 -1
  257. package/dist/core/web/public/next/assets/{tasks-model-ent8f0jZ.js → tasks-model-BKDNqmmt.js} +2 -2
  258. package/dist/core/web/public/next/assets/{tasks-model-ent8f0jZ.js.map → tasks-model-BKDNqmmt.js.map} +1 -1
  259. package/dist/core/web/public/next/assets/{terminal-icons-DJTK7QpR.js → terminal-icons-D2xe-aM1.js} +2 -2
  260. package/dist/core/web/public/next/assets/{terminal-icons-DJTK7QpR.js.map → terminal-icons-D2xe-aM1.js.map} +1 -1
  261. package/dist/core/web/public/next/assets/{usage-queries-Bn8ccqyN.js → usage-queries-BZuAANlI.js} +2 -2
  262. package/dist/core/web/public/next/assets/{usage-queries-Bn8ccqyN.js.map → usage-queries-BZuAANlI.js.map} +1 -1
  263. package/dist/core/web/public/next/assets/use-guarded-action-Cf4MeNBa.js +2 -0
  264. package/dist/core/web/public/next/assets/{use-guarded-action-C2HlSzkz.js.map → use-guarded-action-Cf4MeNBa.js.map} +1 -1
  265. package/dist/core/web/public/next/assets/{use-ticker-BNc1H4ZC.js → use-ticker-D9yi49my.js} +2 -2
  266. package/dist/core/web/public/next/assets/{use-ticker-BNc1H4ZC.js.map → use-ticker-D9yi49my.js.map} +1 -1
  267. package/dist/core/web/public/next/assets/use-token-gate-DqrSXdX6.js +2 -0
  268. package/dist/core/web/public/next/assets/{use-token-gate-B3IJL6bf.js.map → use-token-gate-DqrSXdX6.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-owwodNVz.js +2 -0
  271. package/dist/core/web/public/next/assets/{useChartWidth-lZ9PrQn0.js.map → useChartWidth-owwodNVz.js.map} +1 -1
  272. package/dist/core/web/public/next/assets/{useSeatsRefresh-CG4jczeL.js → useSeatsRefresh-DgFy-Ph4.js} +2 -2
  273. package/dist/core/web/public/next/assets/{useSeatsRefresh-CG4jczeL.js.map → useSeatsRefresh-DgFy-Ph4.js.map} +1 -1
  274. package/dist/core/web/public/next/assets/useVerseTranscript-CDYrrWOO.js +2 -0
  275. package/dist/core/web/public/next/assets/useVerseTranscript-CDYrrWOO.js.map +1 -0
  276. package/dist/core/web/public/next/assets/verse-icons-F9VwX07_.js +2 -0
  277. package/dist/core/web/public/next/assets/verse-icons-F9VwX07_.js.map +1 -0
  278. package/dist/core/web/public/next/assets/verse-model-DyCwZF-M.js +2 -0
  279. package/dist/core/web/public/next/assets/verse-model-DyCwZF-M.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-62DxpVHS.js +3 -0
  283. package/dist/core/web/public/next/assets/{verse-ui-store-zafyzXKD.js.map → verse-ui-store-62DxpVHS.js.map} +1 -1
  284. package/dist/core/web/public/next/assets/{viewport-BEqGUoTA.js → viewport-nTubFCwf.js} +2 -2
  285. package/dist/core/web/public/next/assets/{viewport-BEqGUoTA.js.map → viewport-nTubFCwf.js.map} +1 -1
  286. package/dist/core/web/public/next/assets/warmup-HG5vYbsN.js +3 -0
  287. package/dist/core/web/public/next/assets/{warmup-BR6pxAKs.js.map → warmup-HG5vYbsN.js.map} +1 -1
  288. package/dist/core/web/public/next/assets/{workspace-model-D_tWD5Wt.js → workspace-model-CbhdPhei.js} +2 -2
  289. package/dist/core/web/public/next/assets/{workspace-model-D_tWD5Wt.js.map → workspace-model-CbhdPhei.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
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/reveal-anchor-D-tV8xau.js","assets/nav-NVtnuG7A.js","assets/verse-ui-store-62DxpVHS.js","assets/index-BVxOlseC.js","assets/workbench-types-DzN-5trg.js","assets/dock-store-B2vlxqPu.js","assets/viewport-nTubFCwf.js","assets/guarded-runners-LHLXmXIk.js","assets/global-oEl9Qj8u.js","assets/global-BlI2BYa1.css","assets/CommandPalette-zYLFZRnj.js","assets/focus-trap-HtcoXeEq.js","assets/ProviderLogo-C5mBg8i0.js","assets/command-catalog-Bb_PxC5w.js","assets/verse-icons-F9VwX07_.js","assets/icons-DEQa2rTx.js","assets/icon-base-DvM1eI5V.js","assets/CommandPalette-B5Q4hGMK.css","assets/NeedsYouDrawer-CO-Balfp.js","assets/Epistemic-dhvDTwAZ.js","assets/Epistemic-OaGnEJkn.css","assets/StatusBadge-HCZp416_.js","assets/StatusBadge-BVi0IBb9.css","assets/queries-CYisSAAB.js","assets/mutations-C5S7okTW.js","assets/MutationTokenDialog-mxrw0Yvy.js","assets/Dialog-BS9Dxi3G.js","assets/Dialog-tQ8kFulD.css","assets/MutationTokenDialog-CrfJ0PdD.css","assets/ConfirmDialog-DLrLKM0c.js","assets/ConfirmDialog-Dx15x0Ho.css","assets/RouteErrorBoundary-DYtwc2ja.js","assets/RouteErrorBoundary-DdxhTdZ6.css","assets/RefreshIndicator-CMwSCiz5.js","assets/RefreshIndicator-CVv22U_j.css","assets/DiffViewer-BpH56302.js","assets/highlight-CMCZK9jW.js","assets/DiffViewer-C8HHTnVE.css","assets/guarded-action-OzqcPjmh.js","assets/preloaded-Cwf9rsnZ.js","assets/format-BkWdOQDL.js","assets/format-DKrNjdwD.js","assets/verse-model-DyCwZF-M.js","assets/compaction-point-VL9oegWS.js","assets/Button-HHXgoXGr.js","assets/Button-DrnKsvnQ.css","assets/NeedsYouList-CzDZbzRD.js","assets/NeedsYouList-CruOt4JT.css","assets/NeedsYouDrawer-BpvidnM2.css","assets/ShortcutsOverlay-BcIcoClX.js","assets/ShortcutsOverlay-QSjxmW0a.css","assets/GearTray-Cb2npoxM.js","assets/GearTray-DQbH_yZZ.css","assets/OnboardingFlow-Cij6KWat.js","assets/CapacityStrip-qReu0RaF.js","assets/section-visibility-Yctxu-if.js","assets/Tag-DH15CUJp.js","assets/Tag-D0rAEciH.css","assets/budget-queries-V3wcJVK_.js","assets/useSeatsRefresh-DgFy-Ph4.js","assets/capacity-strip-model-BDbmQ3e3.js","assets/seat-subscription-B-f9ViU2.js","assets/context-model-BC-HOmPo.js","assets/verse-store-b_Lek_c5.js","assets/CapacityStrip-Cc28CyWk.css","assets/primitives-DyCKYSBG.js","assets/Segmented-BE53BenI.js","assets/Segmented-BnjHbKzH.css","assets/EmptyState-BqR5YAmf.js","assets/EmptyState-B3YUPGaa.css","assets/Meter-DNeocJnD.js","assets/Meter-CYt9KpM0.css","assets/Slider-BypUWjpH.js","assets/Slider-AgAdMFpo.css","assets/Switch-iveI-8NY.js","assets/Switch-CU044EaE.css","assets/Select-BwSGkHCS.js","assets/Select-DSu5ghId.css","assets/Input-B5dmGLZx.js","assets/Input-BQ3PR065.css","assets/Sheet-DVP2Mgy6.js","assets/Sheet-ChxlNivX.css","assets/usage-queries-BZuAANlI.js","assets/OnboardingFlow-DSpPj8UE.css","assets/RailStatus-cPRyOmrk.js","assets/RailStatus-C3sN_ghP.css","assets/warmup-HG5vYbsN.js","assets/ResourcesChrome-BJCauW_t.js","assets/command-bus-xYZoK9nQ.js","assets/types-D5XOdyw8.js","assets/local-model-DFyjKX0b.js","assets/ResourcesChrome-uZEqC2EM.css","assets/SessionGate-e0dFJm9d.js","assets/SessionGate-DvMpXNpJ.css"])))=>i.map(i=>d[i]);
2
+ import{a as e,i as t,n,s as r,t as i}from"./index-BVxOlseC.js";import{A as a,D as o,F as s,G as c,H as l,S as u,U as d,a as f,c as p,d as m,g as h,i as g,l as _,n as v,o as y,q as b,t as x,x as S}from"./global-oEl9Qj8u.js";import{n as C,r as ee,t as w}from"./RouteErrorBoundary-DYtwc2ja.js";import{a as te,c as ne,d as T,l as re,r as ie,s as ae}from"./command-catalog-Bb_PxC5w.js";import{a as oe,g as se,o as ce}from"./workbench-types-DzN-5trg.js";import{i as le,t as ue}from"./guarded-action-OzqcPjmh.js";import{n as de}from"./viewport-nTubFCwf.js";import{A as fe,C as E,D as pe,E as me,O as he,T as ge,_ as _e,a as ve,b as ye,c as be,f as xe,g as Se,i as Ce,k as we,m as Te,n as Ee,r as De,s as Oe,u as D,y as ke}from"./verse-ui-store-62DxpVHS.js";import{t as Ae}from"./composer-keys-su0g1h9o.js";import{i as je,n as O,r as Me,t as Ne}from"./command-bus-xYZoK9nQ.js";import{n as Pe,t as Fe}from"./section-visibility-Yctxu-if.js";import{a as Ie,i as Le,n as Re,r as ze}from"./icon-base-DvM1eI5V.js";var k=r(e(),1),Be=`ashlr:desktop-command`;function Ve(){try{return document.documentElement.getAttribute(`data-app-shell`)===`desktop`}catch{return!1}}function He(e){if(e===`light`||e===`dark`)return e;try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}catch{return`light`}}function Ue(){return window.__ASHLR_DESKTOP__}function We(e){try{Ue()?.reportTheme?.(He(e))}catch{}}function Ge(e){function t(t){let n=T(t.detail?.command);n&&e(n)}return window.addEventListener(Be,t),()=>window.removeEventListener(Be,t)}var Ke=`ashlr:desktop-state`;function qe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Je(e){if(!qe(e)||!qe(e.hotkey)||!qe(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 Ye,Xe=!1,Ze=new Set;function Qe(){try{let e=Ue()?.getState?.();return Je(e)?e:null}catch{return null}}function $e(e){let t=e.detail;if(Je(t)){Ye=t;for(let e of[...Ze])e(t)}}function et(){Xe||(Xe=!0,window.addEventListener(Ke,$e))}function tt(){return et(),Ye??=Qe(),Ye}function nt(e){return et(),Ze.add(e),()=>{Ze.delete(e)}}function rt(e,t){if(e!==`globalHotkey`&&e!==`notifications`||typeof t!=`boolean`)return!1;try{return Ue()?.setPreference?.(e,t)===!0}catch{return!1}}function it(e){return nt(()=>e())}function at(){return(0,k.useSyncExternalStore)(it,tt,()=>null)}var ot=r(t(),1),A={wrapper:`_wrapper_6cgsw_4`,bubble:`_bubble_6cgsw_12`,"tooltip-in":`_tooltip-in_6cgsw_1`,label:`_label_6cgsw_44`,shortcut:`_shortcut_6cgsw_49`},j=n(),st=160,M=8,N=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-M};case`bottom`:return{left:t.left+t.width/2-n/2,top:t.bottom+M};case`left`:return{left:t.left-n-M,top:t.top+t.height/2-r/2};case`right`:return{left:t.right+M,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>=N&&c>=N&&r+t<=i-N&&c+n<=a-N)return{left:r,top:c,placement:s}}let s=o;return{placement:s.placement,left:Math.max(N,Math.min(s.left,i-t-N)),top:Math.max(N,Math.min(s.top,a-n-N))}}function P(e){let{label:t,content:n,shortcut:r,placement:i=`top`,disabled:a=!1,className:o,children:s}=e,[c,l]=(0,k.useState)(!1),[u,d]=(0,k.useState)(null),f=(0,k.useId)(),p=(0,k.useRef)(null),m=(0,k.useRef)(null),h=(0,k.useRef)(null),g=(0,k.useCallback)(()=>{h.current!==null&&(clearTimeout(h.current),h.current=null)},[]),_=(0,k.useCallback)(()=>{g(),l(!1),d(null)},[g]);(0,k.useEffect)(()=>g,[g]);let v=(0,k.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,k.useLayoutEffect)(()=>{c&&v()},[c,v]),(0,k.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,ee=(0,k.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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{className:`${A.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:ee}),c?(0,ot.createPortal)((0,j.jsxs)(`div`,{ref:m,role:`tooltip`,id:f,className:A.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,j.jsx)(`span`,{className:A.label,children:y}),r?(0,j.jsx)(`kbd`,{className:A.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(),F={...gt,open:ht(gt),step:0},_t=new Set;function I(e){let t={...F,...e};if(!Object.keys(e).every(e=>Object.is(F[e],t[e]))){F=t;for(let e of _t)e()}}function vt(e){return _t.add(e),()=>_t.delete(e)}function yt(){return F}function bt(e){I({step:Math.max(0,Math.trunc(e))})}function xt(){let e={completedAt:F.completedAt,dismissedAt:new Date().toISOString()};mt(e),I({...e,open:!1})}function St(){let e={completedAt:new Date().toISOString(),dismissedAt:F.dismissedAt};mt(e),I({...e,open:!1})}function Ct(){I({open:!0,step:0})}function wt(){return(0,k.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,bar:e?.bar!==!1,summary:null}}catch{return{open:!1,pinned:!1,bar:!0,summary:null}}}var L=Et(),Dt=new Set;function R(e){let t={...L,...e};if(t.open===L.open&&t.pinned===L.pinned&&t.bar===L.bar&&t.summary===L.summary)return;let n=t.open!==L.open||t.pinned!==L.pinned||t.bar!==L.bar;if(L=t,n)try{localStorage.setItem(Tt,JSON.stringify({open:t.open,pinned:t.pinned,bar:t.bar}))}catch{}for(let e of[...Dt])e()}function Ot(){return L}function kt(){R({open:!0})}function At(){R({open:!1})}function jt(e){R({pinned:e})}function Mt(e){R({bar:e})}function Nt(e){(e===null||L.summary===null||e.tone!==L.summary.tone||e.spoken!==L.summary.spoken)&&R({summary:e})}function Pt(e){return Dt.add(e),()=>Dt.delete(e)}function Ft(){return(0,k.useSyncExternalStore)(Pt,Ot,Ot)}var It=null,Lt=null;function Rt(){return Lt??=i(()=>import(`./reveal-anchor-D-tV8xau.js`).then(e=>It=e,e=>{throw Lt=null,e}),__vite__mapDeps([0,1,2,3,4,5,6])),Lt}typeof window<`u`&&Rt().catch(()=>void 0);function zt(e){if(It){It.revealAnchor(e);return}Rt().then(t=>t.revealAnchor(e),()=>void 0)}function Bt(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||zt({section:n,anchor:r})}return window.addEventListener(e,t),()=>window.removeEventListener(e,t)}var Vt=()=>{};function Ht(e){Vt=e??(()=>{})}function Ut(e,t){Vt(e,t)}var Wt=new Set([`chats.stop-all`,`fleet.stop`]);function Gt(){return document.querySelector(`[data-surface="chat"] textarea[aria-label="Message"]`)!==null}function Kt(e){window.dispatchEvent(new CustomEvent(ie,{detail:{id:e}}))}function qt(e,t=Ne){if(typeof document>`u`)return;if(D().section!==`chat`&&E(`chat`),Gt()){Kt(e);return}let n=!1,r=t=>{n||(n=!0,i.disconnect(),window.clearTimeout(a),t&&window.setTimeout(()=>Kt(e),50))},i=new MutationObserver(()=>{Gt()&&r(!0)});i.observe(document.body,{childList:!0,subtree:!0});let a=window.setTimeout(()=>r(!1),t)}var Jt=new Set(Ae);function z(e,t={}){let n=ae(e);if(!n)return!1;if(n.group!==null&&t.via===`palette`&&_e(n.id),n.guard){if(!Wt.has(n.id))return Me(e,t);let r=n.id,{confirm:a,token:o}=n.guard;return le({title:a.title,body:a.body,confirmLabel:a.confirmLabel,destructive:a.destructive,token:o,tokenReason:`${n.title.replace(/…$/,``)} requires the dispatch token.`,run:()=>i(()=>import(`./guarded-runners-LHLXmXIk.js`).then(e=>e.runGuardedShellCommand(r)),__vite__mapDeps([7,8,3,9]))}),!0}return Jt.has(n.id)?(Me(e,t)||qt(e),!0):n.scope===`chat`||n.scope===`composer`?Me(e,t)?!0:(D().section!==`chat`&&E(`chat`),je(e,t),!0):Me(e,t)?!0:(Vt(`${n.title} isn't available here yet.`,`neutral`),!1)}function Yt(){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])=>O(e,()=>E(t))),O(`palette.open`,()=>pe(`palette`)),O(`needs-you.open`,e=>{e.via!==`menu`&&D().overlay===`needs-you`?Oe():Te()}),O(`shortcuts.open`,()=>pe(`shortcuts`)),O(`history.back`,()=>{ge(-1)}),O(`history.forward`,()=>{ge(1)}),O(`chat.recent-next`,()=>{be(1)}),O(`chat.recent-prev`,()=>{be(-1)}),O(`rail.toggle-labels`,()=>he()),O(`chat.new`,()=>ke(`new-chat`)),O(`chat.new-on`,e=>{let t=e.argument?.kind===`seat`?e.argument.id:void 0;ke(`new-chat`,t?{seatId:t}:{})}),O(`appearance.toggle-theme`,()=>S()),O(`app.summon`,()=>ke(`focus-composer`))];return()=>e.forEach(e=>e())}function Xt(){let e=ee();(0,k.useEffect)(()=>(Ht(e.show),()=>Ht(null)),[e.show]),(0,k.useEffect)(()=>Yt(),[])}var B={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`},Zt=new Set([`command`,`fleet`,`growth`,`mind`]);function Qt({section:e,label:t}){return(0,j.jsxs)(`div`,{className:B.frame,role:`status`,"aria-label":`Loading ${t}`,"data-skeleton":e,children:[(0,j.jsx)(`div`,{className:B.strip,children:(0,j.jsx)(g,{width:`140px`})}),e===`chat`?(0,j.jsxs)(`div`,{className:B.chat,children:[(0,j.jsx)(`div`,{className:B.chatList,children:Array.from({length:8},(e,t)=>(0,j.jsx)(g,{width:`${70+t*13%25}%`},t))}),(0,j.jsxs)(`div`,{className:B.chatBody,children:[(0,j.jsx)(g,{width:`42%`}),(0,j.jsx)(g,{width:`88%`}),(0,j.jsx)(g,{width:`76%`}),(0,j.jsx)(g,{width:`64%`})]})]}):Zt.has(e)?(0,j.jsxs)(`div`,{className:B.grid,children:[(0,j.jsx)(`div`,{className:B.wide,children:(0,j.jsx)(g,{width:`60%`})}),Array.from({length:5},(e,t)=>(0,j.jsx)(`div`,{className:B.kpi,children:(0,j.jsx)(v,{})},t)),(0,j.jsx)(`div`,{className:B.half,children:(0,j.jsx)(v,{})}),(0,j.jsx)(`div`,{className:B.half,children:(0,j.jsx)(v,{})})]}):(0,j.jsx)(`div`,{className:B.column,children:Array.from({length:6},(e,t)=>(0,j.jsx)(f,{},t))})]})}function $t({label:e,blurb:t}){return(0,j.jsxs)(`div`,{className:B.missing,role:`status`,children:[(0,j.jsxs)(`h1`,{className:B.missingTitle,children:[e,` isn't in this build yet`]}),(0,j.jsx)(`p`,{className:B.missingBody,children:t}),(0,j.jsx)(`p`,{className:B.missingBody,children:`It appears here as soon as it ships. Everything else in Verse works normally.`})]})}var en=5e3,tn=3e4,nn=(e,t)=>p(e,t),V={status:`idle`,data:null,updatedAt:null},H=null,U=null,W=null,G=0,rn=new Set,an=new Set;function K(e){V=e;for(let e of[...rn])e()}function on(){return typeof document<`u`&&document.visibilityState===`hidden`}function sn(){if(U&&clearTimeout(U),U=null,G===0)return;let e=Math.max(Fe,on()?tn:en);U=setTimeout(()=>{q()},e)}function q(){if(W)return W;V.status===`idle`&&K({...V,status:`loading`});let e=H?`${oe}?since=${encodeURIComponent(H)}`:oe;return W=(async()=>{try{let t=await nn(e),n=H===null;if(H=typeof t.cursor==`string`?t.cursor:null,K({status:`ready`,data:t,updatedAt:Date.now()}),!n&&Array.isArray(t.completions)&&t.completions.length>0)for(let e of[...an])try{e(t.completions)}catch{}}catch(e){e instanceof y&&e.status===404?K({status:`unavailable`,data:null,updatedAt:V.updatedAt}):e instanceof y&&e.status===400&&H?(H=null,K({...V,status:V.data?`stale`:`loading`})):K({...V,status:V.data?`stale`:`unavailable`})}finally{W=null,sn()}})(),W}function cn(){!on()&&G>0?q():sn()}function ln(){G+=1,G===1&&(typeof document<`u`&&document.addEventListener(`visibilitychange`,cn),q())}function un(){G=Math.max(0,G-1),!(G>0)&&(U&&clearTimeout(U),U=null,typeof document<`u`&&document.removeEventListener(`visibilitychange`,cn))}function dn(e){return rn.add(e),ln(),()=>{rn.delete(e),un()}}function fn(){return V}function pn(){return(0,k.useSyncExternalStore)(dn,fn,fn)}function mn(e){return an.add(e),()=>an.delete(e)}function hn(){return(0,k.useSyncExternalStore)(me,D,D)}var gn=Re,_n=ze,vn=Ie;function J({size:e=16,children:t,...n}){return(0,j.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 yn(e){let{size:t=20,...n}=e;return(0,j.jsxs)(`svg`,{viewBox:`54 67 146 124`,width:t,height:t,"aria-hidden":`true`,focusable:`false`,...n,children:[(0,j.jsx)(`path`,{fill:`currentColor`,d:`M106 76H123V115H100L113 154L99 179H72L59 156Z M130 76H147L194 156L181 179H154L140 154L153 115H130Z`}),(0,j.jsx)(`path`,{fill:`#2563EB`,d:`M110 121H143L133 152H120Z`})]})}function bn(e){return(0,j.jsxs)(J,{...e,children:[(0,j.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`5`,height:`6`,rx:`1`}),(0,j.jsx)(`rect`,{x:`8.5`,y:`2.5`,width:`5`,height:`3.5`,rx:`1`}),(0,j.jsx)(`rect`,{x:`8.5`,y:`7.5`,width:`5`,height:`6`,rx:`1`}),(0,j.jsx)(`rect`,{x:`2.5`,y:`10`,width:`5`,height:`3.5`,rx:`1`})]})}function xn(e){return(0,j.jsxs)(J,{...e,children:[(0,j.jsx)(`path`,{d:`M2.5 4.5h5M2.5 8h9M2.5 11.5h3.5`}),(0,j.jsx)(`circle`,{cx:`10`,cy:`4.5`,r:`1.3`}),(0,j.jsx)(`circle`,{cx:`13.2`,cy:`8`,r:`1.3`}),(0,j.jsx)(`circle`,{cx:`8.5`,cy:`11.5`,r:`1.3`})]})}function Sn(e){return(0,j.jsxs)(J,{...e,children:[(0,j.jsx)(`path`,{d:`M2.5 12.5 6.5 8.5l2.5 2.5 4.5-5`}),(0,j.jsx)(`path`,{d:`M10.5 6h3v3`})]})}function Cn(e){return(0,j.jsxs)(J,{...e,children:[(0,j.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,j.jsx)(`path`,{d:`M6.5 13.5h3`})]})}function wn(e){return(0,j.jsxs)(J,{...e,children:[(0,j.jsx)(`rect`,{x:`2.5`,y:`2.5`,width:`4.5`,height:`4.5`,rx:`1`}),(0,j.jsx)(`rect`,{x:`9`,y:`2.5`,width:`4.5`,height:`4.5`,rx:`1`}),(0,j.jsx)(`rect`,{x:`2.5`,y:`9`,width:`4.5`,height:`4.5`,rx:`1`}),(0,j.jsx)(`rect`,{x:`9`,y:`9`,width:`4.5`,height:`4.5`,rx:`1`})]})}function Tn(e){return(0,j.jsxs)(J,{...e,children:[(0,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2.1`}),(0,j.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,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`4.4`})]})}var En=Le,Dn={command:bn,fleet:xn,growth:Sn,mind:Cn,chat:gn,settings:vn,apps:wn,usage:_n},Y={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 On(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 kn({label:e,blurb:t}){return(0,j.jsx)($t,{label:e,blurb:t??``})}function An(e){let t=ye(e);return async()=>{let n=xe(e),r=n?fe(n):void 0;if(!n||!r)return{default:()=>(0,j.jsx)(kn,{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,j.jsx)(kn,{label:t.label,blurb:t.blurb})}}}var jn=new Map,Mn=new Map;function Nn(e){let t=jn.get(e);return t||(t=An(e)().then(t=>(Mn.set(e,t.default),t)),jn.set(e,t)),t}var Pn=new Map(Ce.map(e=>[e.id,(0,k.lazy)(()=>Nn(e.id))])),Fn=()=>i(()=>import(`./CommandPalette-zYLFZRnj.js`),__vite__mapDeps([10,3,8,9,11,12,13,4,2,5,6,14,15,16,17])),In=()=>i(()=>import(`./NeedsYouDrawer-CO-Balfp.js`),__vite__mapDeps([18,3,8,9,11,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,13,4,38,39,6,2,5,40,41,42,43,44,45,15,16,14,46,47,48])),Ln=()=>i(()=>import(`./ShortcutsOverlay-BcIcoClX.js`).then(e=>e.t),__vite__mapDeps([49,3,26,11,27,13,2,4,5,6,50])),Rn=()=>i(()=>import(`./GearTray-Cb2npoxM.js`),__vite__mapDeps([51,3,8,9,13,2,4,5,6,15,16,14,52])),zn=()=>i(()=>import(`./OnboardingFlow-Cij6KWat.js`),__vite__mapDeps([53,3,8,9,2,4,5,6,16,40,41,42,43,54,12,55,56,57,58,59,60,61,62,63,64,44,45,15,14,65,11,26,27,19,20,21,22,31,32,33,34,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83])),Bn=()=>i(()=>import(`./RailStatus-cPRyOmrk.js`),__vite__mapDeps([84,3,54,8,9,12,55,40,41,42,43,56,57,58,59,60,4,61,62,63,64,85])),Vn=()=>i(()=>import(`./warmup-HG5vYbsN.js`),__vite__mapDeps([86,3,2,4,5,6])),Hn=()=>i(()=>import(`./ResourcesChrome-BJCauW_t.js`).then(e=>e.t),__vite__mapDeps([87,3,8,9,12,13,2,4,5,6,88,54,55,40,41,42,43,56,57,58,59,60,61,62,63,64,89,90,91])),Un=(0,k.lazy)(()=>Fn().then(e=>({default:e.CommandPalette}))),Wn=(0,k.lazy)(()=>In().then(e=>({default:e.NeedsYouDrawer}))),Gn=(0,k.lazy)(()=>Ln().then(e=>({default:e.ShortcutsOverlay}))),Kn=(0,k.lazy)(()=>Rn().then(e=>({default:e.GearTray}))),qn=(0,k.lazy)(()=>zn().then(e=>({default:e.OnboardingFlow}))),Jn=(0,k.lazy)(()=>Hn().then(e=>({default:e.ResourcesChrome}))),Yn=(0,k.lazy)(()=>Hn().then(e=>({default:e.ResourcesRailButton}))),Xn=(0,k.lazy)(()=>Hn().then(e=>({default:e.ResourcesBar})));function Zn(e){let t=()=>{let e=c();return e.active+e.queued>0},n=!0,r=null;return Vn().then(i=>{n&&(r=i.warmUpAfterFirstPaint({loadSection:Nn,overlays:[Fn,In,Ln,()=>Hn().then(e=>e.preloadResourcesDrawer())],readsInFlight:t},e))},()=>void 0),()=>{n=!1,r?.()}}var Qn=null;function $n(){let[e,t]=(0,k.useState)(Qn);return(0,k.useEffect)(()=>{if(e)return;let n=!0;return Bn().then(e=>{Qn=e,n&&t(e)},e=>console.error(`[verse] rail status failed to load`,e)),()=>{n=!1}},[e]),e}function er(){return[...document.querySelectorAll(`[aria-modal="true"]`)].some(e=>!e.hasAttribute(`data-verse-overlay`)&&!e.querySelector(`[data-verse-overlay]`))}var tr=3;function nr(){let e=hn(),t=h(),n=ee(),r=pn(),{compact:i}=de(),a=(0,k.useMemo)(()=>te(),[]),s=(0,k.useRef)(null),[c,l]=(0,k.useState)(!1),u=r.data,d=$n(),f=wt(),p=Ft();(0,k.useEffect)(()=>Zn(),[]);let[m,g]=(0,k.useState)(!1);(0,k.useEffect)(()=>{let e=!0;return Rn().then(()=>{e&&g(!0)},e=>console.error(`[verse] settings tray failed to load`,e)),()=>{e=!1}},[]),Xt(),(0,k.useEffect)(()=>{function e(e){if(e.defaultPrevented||D().overlay===`palette`||er())return;let t=re(e,[`global`]);t&&(e.preventDefault(),z(t.id,{via:`key`}))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]),(0,k.useEffect)(()=>Ge(e=>{if(e.kind===`open-session`){Oe(),Se(e.sessionId);return}(e.name===`new-chat`||e.name===`focus-composer`)&&Oe(),z(e.commandId,{via:`menu`})}),[]),(0,k.useEffect)(()=>Bt(De),[]),(0,k.useEffect)(()=>{We(t.theme)},[t.theme]),(0,k.useEffect)(()=>{if(!e.announceChatMoved)return;let t=ae(`surface.chat`)?.keys[0];n.show(`Chat moved to ${t?ne(t,a):`⌘5`} — Command, Fleet, Growth and Mind come first now.`),ve()},[e.announceChatMoved,n,a]),(0,k.useEffect)(()=>mn(e=>{if(typeof document<`u`&&document.visibilityState===`hidden`)return;let t=D(),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,tr))n.show(`Failed: ${e.title}`,`danger`);let a=r.filter(e=>e.outcome===`ok`);if(a.length>tr)n.show(`${a.length} chats finished.`,`success`);else for(let e of a)n.show(`Finished: ${e.title}`,`success`)}),[n]);let[v,y]=(0,k.useState)(null),b=u?.mind?.latestMemoAt??null;(0,k.useEffect)(()=>{if(e.section!==`mind`||!u?.mind?.unseen||!b)return;y(b);let t=o();t&&_(ce,{surface:`mind`},t).catch(()=>void 0)},[e.section,u?.mind?.unseen,b]);let x=e.railExpanded&&!i,S=u?u.counts.needsYou:null,C=ye(e.section),w=C.placement===`tray`?C:null,T=d?.RailBadgeMark??null,ie=e=>{let t=ae(e)?.keys[0];return t?ne(t,a):void 0};return(0,j.jsxs)(`div`,{className:Y.shell,"data-rail":x?`expanded`:`collapsed`,"data-compact":i||void 0,"data-resources":p.open&&p.pinned&&!i?`docked`:void 0,children:[(0,j.jsxs)(`nav`,{className:Y.rail,"data-rail":x?`expanded`:`collapsed`,"aria-label":`Verse sections`,children:[(0,j.jsx)(`span`,{className:Y.railDragStrip,"data-app-region":`drag`,"aria-hidden":`true`}),(0,j.jsx)(P,{label:`Ashlr Verse`,placement:`right`,disabled:x,children:(0,j.jsxs)(`span`,{className:Y.mark,children:[(0,j.jsx)(yn,{}),(0,j.jsx)(`span`,{className:`visually-hidden`,children:`Ashlr Verse`})]})}),(0,j.jsx)(`ul`,{className:Y.railList,children:Ee.map(t=>{let n=Dn[t.id],r=t.id===`mind`&&b!==null&&v===b||!d?null:d.railBadgeFor(t.id,u),a=e.section===t.id,o=ie(`surface.${t.id}`);return(0,j.jsx)(`li`,{children:(0,j.jsx)(P,{label:t.label,shortcut:o,placement:`right`,disabled:x||i,children:(0,j.jsxs)(`button`,{type:`button`,className:Y.railButton,"aria-current":a?`page`:void 0,"data-section":t.id,"aria-label":`${t.label}${r?.spoken??``}`,onClick:()=>E(t.id),children:[(0,j.jsxs)(`span`,{className:Y.railIcon,children:[(0,j.jsx)(n,{}),r&&T?(0,j.jsx)(T,{badge:r}):null]}),x||i?(0,j.jsx)(`span`,{className:Y.railLabel,children:t.label}):null,x&&o?(0,j.jsx)(`span`,{className:Y.railKey,"aria-hidden":`true`,children:o}):null]})})},t.id)})}),(0,j.jsxs)(`div`,{className:Y.railFoot,children:[(0,j.jsx)(P,{label:`Needs you`,shortcut:ie(`needs-you.open`),placement:`right`,disabled:x||i,children:(0,j.jsxs)(`button`,{type:`button`,className:Y.railButton,"aria-label":S===null?`Needs you`:`Needs you, ${S}`,"aria-expanded":e.overlay===`needs-you`,"data-needs-you":S??void 0,onClick:()=>z(`needs-you.open`,{via:`button`}),children:[(0,j.jsxs)(`span`,{className:Y.railIcon,children:[(0,j.jsx)(En,{}),S&&T?(0,j.jsx)(T,{badge:{kind:`count`,count:S,spoken:``,tone:`warning`}}):null]}),x||i?(0,j.jsx)(`span`,{className:Y.railLabel,children:i?`Inbox`:`Needs you`}):null]})}),i?null:(0,j.jsx)(k.Suspense,{fallback:null,children:(0,j.jsx)(Yn,{expanded:x,buttonClass:Y.railButton,iconClass:Y.railIcon,labelClass:Y.railLabel})}),i?null:p.bar?(0,j.jsx)(k.Suspense,{fallback:null,children:(0,j.jsx)(Xn,{expanded:x})}):d?(0,j.jsx)(rr,{rail:d,expanded:x}):null,(0,j.jsx)(P,{label:`Settings and more`,placement:`right`,disabled:x||i||c,children:(0,j.jsxs)(`button`,{ref:s,type:`button`,className:Y.railButton,"aria-label":w?`Settings and more (${w.label} open)`:`Settings and more`,"aria-haspopup":`menu`,"aria-expanded":c,"aria-current":w?`page`:void 0,"data-gear":!0,"data-active":w?!0:void 0,onClick:()=>l(e=>!e),children:[(0,j.jsx)(`span`,{className:Y.railIcon,children:(0,j.jsx)(Tn,{})}),x||i?(0,j.jsx)(`span`,{className:Y.railLabel,children:i?`More`:`Settings`}):null]})})]})]}),(0,j.jsx)(`main`,{className:Y.section,"data-section":e.section,id:`main-content`,tabIndex:-1,children:e.mounted.map(t=>(0,j.jsx)(ir,{id:t,active:t===e.section},t))}),(0,j.jsx)(k.Suspense,{fallback:null,children:m||c?(0,j.jsx)(Kn,{open:c,anchorRef:s,onClose:()=>l(!1),compact:i}):null}),(0,j.jsx)(k.Suspense,{fallback:null,children:(0,j.jsx)(Jn,{compact:i})}),(0,j.jsxs)(k.Suspense,{fallback:null,children:[e.overlay===`palette`?(0,j.jsx)(Un,{}):null,e.overlay===`needs-you`?(0,j.jsx)(Wn,{}):null,e.overlay===`shortcuts`?(0,j.jsx)(Gn,{}):null]}),(0,j.jsx)(ue,{}),(0,j.jsx)(k.Suspense,{fallback:null,children:f.open?(0,j.jsx)(qn,{}):null})]})}function rr({rail:e,expanded:t}){let n=e.useRailCapacity();if(!n)return null;let{CapacityRing:r,describeRailCapacity:i}=e;return(0,j.jsx)(P,{label:i(n),placement:`right`,disabled:t,children:(0,j.jsxs)(`button`,{type:`button`,className:Y.railButton,"aria-label":`Capacity — ${i(n)}`,"data-capacity":Math.round(n.usedPercent),onClick:()=>E(`apps`,`seat:${n.seatId}`),children:[(0,j.jsx)(`span`,{className:Y.railIcon,children:(0,j.jsx)(r,{badge:n})}),t?(0,j.jsxs)(`span`,{className:Y.railLabel,children:[n.label,` `,n.limitReached?`limit`:On(n.usedPercent)]}):null]})})}function ir({id:e,active:t}){let[n]=(0,k.useState)(()=>Mn.get(e)??Pn.get(e)),r=ye(e);return(0,j.jsx)(`div`,{className:Y.surface,"data-surface":e,hidden:!t,inert:!t,children:(0,j.jsx)(Pe,{visible:t,children:(0,j.jsx)(w,{resetKey:e,children:(0,j.jsx)(k.Suspense,{fallback:(0,j.jsx)(Qt,{section:e,label:r.label}),children:(0,j.jsx)(n,{})})})})})}var ar=`verse-bootstrap`,X=`verse-sessions`,or={key:ar,fetch:e=>p(`/api/verse/bootstrap`,e)},sr={key:X,fetch:e=>p(`/api/verse/sessions`,e)};function Z(e,t=``){return`/api/verse/sessions/${encodeURIComponent(e)}${t}`}function cr(e,t){return p(Z(e),t)}var lr=class extends Error{constructor(){super(`Unlock actions with the mutation token before chatting.`),this.name=`VerseMutationLockedError`}};async function Q(e,t){let n=o();if(!n)throw new lr;let r=await _(e,t,n);return s(),r}function ur(){d(X),d(ar)}async function dr(e){let t=await Q(`/api/verse/sessions`,e);return ur(),t}async function fr(e,t){let n={text:t},r=await Q(Z(e,`/turns`),n);return d(X),r}async function pr(e){await Q(Z(e,`/cancel`),{}),d(X)}async function mr(e){await Q(Z(e,`/delete`),{}),ur()}async function hr(e,t){let n=await Q(Z(e,`/rename`),{title:t});return d(X),n}var gr=`verse-workspaces`,_r=`verse-autonomy-scope`,vr={key:gr,fetch:e=>p(`/api/verse/workspaces`,e)},yr={key:_r,fetch:e=>p(`/api/verse/autonomy-scope`,e)};function br(e,t){return p(Z(e,`/roots`),t)}function $(){d(gr),d(_r),d(ar)}async function xr(e){let t=await Q(`/api/verse/workspaces`,e);return $(),t}async function Sr(e,t){let n=await Q(`/api/verse/workspaces/${encodeURIComponent(e)}/update`,t);return $(),n}async function Cr(e){await Q(`/api/verse/workspaces/${encodeURIComponent(e)}/delete`,{}),$()}async function wr(e,t){await Q(`/api/verse/workspaces/priority`,{path:e,priority:t}),$()}async function Tr(e){await Q(`/api/verse/workspaces/focus`,{sectionId:e}),$()}var Er=`verse-activity`,Dr=`verse-session-meta`;async function Or(e,t){try{return await p(e,t)}catch(e){if(e instanceof y&&e.status===404)return null;throw e}}var kr={key:Er,fetch:e=>Or(oe,e)},Ar={key:Dr,fetch:e=>Or(se,e)};async function jr(e,t){let n={};typeof t.pinned==`boolean`&&(n.pinned=t.pinned),typeof t.archived==`boolean`&&(n.archived=t.archived);let r=await Q(`${se}/${encodeURIComponent(e)}`,n);return d(Dr),r}async function Mr(e,t){let n=o();if(!n)return!1;let r={sessionId:e,turnCount:t};try{return await _(ce,r,n),!0}catch{return!1}}var Nr=`/next/assets/AshlrSans-latin-DVBgX9ac.woff2`,Pr=`/next/assets/SpaceGrotesk-latin-C6WxOMZt.woff2`,Fr={shell:`_shell_k4nf7_1`,checking:`_checking_k4nf7_2`};function Ir(e=typeof document>`u`?null:document){let t=Ce.find(e=>e.id===D().section),n=t?we[`./sections/${t.module}.tsx`]:void 0;if(n&&n().catch(()=>void 0),e?.head)for(let t of[Nr,Pr]){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 Lr=()=>i(()=>import(`./SessionGate-e0dFJm9d.js`),__vite__mapDeps([92,3,8,9,93])),Rr=(0,k.lazy)(()=>Lr().then(e=>({default:e.SessionGate})));function zr(){Lr().catch(()=>void 0)}var Br=`ashlr:sidecar-restarted`;function Vr(e=window){let t=!1,n=!1,r=!1,i=()=>{if(!r){if(t){n=!0;return}t=!0,u().then(e=>{e&&ur()}).catch(()=>void 0).finally(()=>{t=!1,n&&(n=!1,i())})}};return e.addEventListener(Br,i),()=>{r=!0,e.removeEventListener(Br,i)}}function Hr(){let e=m();return(0,k.useEffect)(()=>Vr(),[]),(0,k.useEffect)(()=>{if(e!==`checking`)return;zr();let t=!1;return u().then(e=>{if(!(t||e))return b(or.key,or.fetch).then(()=>{t||a(l(or.key).status===`success`)})}),()=>{t=!0}},[e]),e===`checking`?(0,j.jsx)(`p`,{className:Fr.checking,role:`status`,children:`Checking for an existing Verse session…`}):e===`unauthenticated`?(0,j.jsx)(k.Suspense,{fallback:(0,j.jsx)(`p`,{className:Fr.checking,role:`status`,children:`Checking for an existing Verse session…`}),children:(0,j.jsx)(Rr,{heading:`Connect to Ashlr Verse`,command:`ashlr verse`,subject:`Ashlr Verse`,mutationField:!0})}):(0,j.jsxs)(C,{children:[(0,j.jsx)(x,{}),(0,j.jsx)(`div`,{className:Fr.shell,children:(0,j.jsx)(nr,{})})]})}export{rt as $,vn as A,Ot as B,Z as C,wn as D,On as E,q as F,Ft as G,Mt as H,pn as I,xt as J,wt as K,z as L,yn as M,hn as N,J as O,fn as P,Ve as Q,Ut as R,Ar as S,vr as T,jt as U,kt as V,Hr as VerseConsoleApp,Nt as W,bt as X,Ct as Y,P as Z,jr as _,dr as a,yr as b,Cr as c,ur as d,at as et,Mr as f,wr as g,Tr as h,pr as i,_n as j,Dn as k,cr as l,fr as m,X as n,xr as o,hr as p,St as q,lr as r,mr as s,ar as t,br as u,Sr as v,sr as w,or as x,kr as y,At as z};
3
+ //# sourceMappingURL=VerseConsoleApp-DTjDpGCd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":";u/BA2BM,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,IAAoC,CAC3C,OAAQ,OAA4D,iBACtE,CAQA,SAAgB,GAAmB,EAAmC,CACpE,GAAI,CACF,GAAO,CAAC,EAAE,cAAc,GAAa,CAAU,CAAC,CAClD,MAAQ,CAER,CACF,CAgCA,SAAgB,GAAuB,EAA8D,CACnG,SAAS,EAAU,EAAoB,CACrC,IAAM,EAAS,EAAqB,EAA6C,QAAQ,OAAO,EAC5F,GAAQ,EAAQ,CAAM,CAC5B,CAEA,OADA,OAAO,iBAAiB,GAAuB,CAAS,MAC3C,OAAO,oBAAo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X,EAAO,oBAAoB,GAAyB,CAAS,CAC/D,CACF,CAEA,SAAgB,IAAkB,CAChC,IAAM,EAAQ,EAAa,EAsB3B,OArBA,mBAAgB,GAAwB,EAAG,CAAC,CAAC,GAC7C,mBAAgB,CACd,GAAI,IAAU,WAAY,OAC1B,GAAmB,EACnB,IAAI,EAAY,GAOhB,OANA,EAAyB,CAAC,CAAC,KAAM,GAAY,CACvC,QAAa,GACjB,OAAO,EAAS,GAAoB,IAAK,GAAoB,KAAK,CAAC,CAAC,SAAW,CACxE,GAAW,EAAkB,EAAiB,GAAoB,GAAG,CAAC,CAAC,SAAW,SAAS,CAClG,CAAC,CACH,CAAC,MACY,CAAE,EAAY,EAAM,CACnC,EAAG,CAAC,CAAK,CAAC,EACN,IAAU,YAAmB,SAAC,IAAD,CAAG,UAAW,GAAO,SAAU,KAAK,SAAS,kDAA0C,GACpH,IAAU,mBAEV,SAAC,WAAD,CAAU,UAAU,SAAC,IAAD,CAAG,UAAW,GAAO,SAAU,KAAK,SAAS,kDAA0C,GACzG,mBAAC,GAAD,CAAa,QAAQ,yBAAyB,QAAQ,cAAc,QAAQ,cAAc,gBAAe,EACjG,IAIZ,UAAC,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/shell/anchor-requests.ts","../../../../../../src/web-ui/routes/verse/shell/run-command.ts","../../../../../../src/web-ui/routes/verse/shell/skeletons.tsx","../../../../../../src/web-ui/routes/verse/shell/useActivity.ts","../../../../../../src/web-ui/routes/verse/useVerseUi.ts","../../../../../../src/web-ui/routes/verse/rail-icons.tsx","../../../../../../src/web-ui/routes/verse/percent-text.ts","../../../../../../src/web-ui/routes/verse/VerseApp.tsx","../../../../../../src/web-ui/routes/verse/verse-queries.ts","../../../../../../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 /** The always-on resource bar in the rail foot (3.11.1). On by default; persisted. */\n bar: 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, bar: raw?.bar !== false, summary: null };\n } catch {\n return { open: false, pinned: false, bar: true, 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.bar === state.bar && next.summary === state.summary) return;\n const persist = next.open !== state.open || next.pinned !== state.pinned || next.bar !== state.bar;\n state = next;\n if (persist) {\n try {\n localStorage.setItem(RESOURCES_STORAGE_KEY, JSON.stringify({ open: next.open, pinned: next.pinned, bar: next.bar }));\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\n/** Show or hide the always-on resource bar in the rail foot. */\nexport function setResourcesBar(bar: boolean): void {\n patch({ bar });\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/shell/anchor-requests.ts — the shell's one listener for\n * VERSE_ANCHOR_EVENT (\"go to that card\"); the reveal itself is\n * shell/reveal-anchor.ts.\n *\n * WHY SEPARATE: VerseApp installs this listener at first paint, but nothing\n * is revealed until an operator follows a link into a surface. The reveal\n * logic (and command/nav.ts with it) is preloaded instead of imported: its\n * download starts when this module evaluates, and once it is in a request\n * is revealed synchronously, exactly as with a static import. A request\n * that arrives before it lands is revealed when it does — the reveal waits\n * for its element for up to ANCHOR_WAIT_MS anyway.\n */\nimport type { VerseAnchorRequest } from '../verse-ui-store.js';\n\ntype RevealModule = typeof import('./reveal-anchor.js');\n\nlet loaded: RevealModule | null = null;\nlet pending: Promise<RevealModule> | null = null;\nfunction loadReveal(): Promise<RevealModule> {\n // A failed download is not cached: the next request asks again.\n pending ??= import('./reveal-anchor.js').then((m) => (loaded = m), (err: unknown) => { pending = null; throw err; });\n return pending;\n}\nif (typeof window !== 'undefined') void loadReveal().catch(() => undefined);\n\nfunction reveal(request: VerseAnchorRequest): void {\n if (loaded) {\n void loaded.revealAnchor(request);\n return;\n }\n void loadReveal().then((m) => m.revealAnchor(request), () => undefined);\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 reveal({ 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 * by the SHELL (guarded-runners.ts, loaded when a run is confirmed):\n * they are shell actions, and a guard must never depend on some other\n * 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 { cycleTheme } from '../../../data/theme-store.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';\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\n/** Toast through whatever the shell installed (guarded-runners.ts reports with it). */\nexport function shellNotify(message: string, tone?: 'neutral' | 'success' | 'danger'): void {\n notify(message, tone);\n}\n\n/**\n * The guarded catalog commands the shell runs itself. Their runners\n * (guarded-runners.ts: a cancel per running chat, the fleet stop and its\n * toast) are a dynamic import — they run only after the operator confirmed\n * (and unlocked), never at first paint, so they stay out of the chat\n * first-paint critical JS. guarded-runners.test.ts pins that this list and\n * the runner table name the same ids.\n */\nexport const SHELL_GUARDED_COMMAND_IDS: ReadonlySet<string> = new Set(['chats.stop-all', 'fleet.stop']);\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\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 if (!SHELL_GUARDED_COMMAND_IDS.has(command.id)) return runCommand(id, invocation);\n const commandId = command.id;\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: () => import('./guarded-runners.js').then((m) => m.runGuardedShellCommand(commandId)),\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/shell/useActivity.ts — the shell's one CURSOR loop over\n * GET /api/verse/activity (unit C1; route: core/verse/activity-api.ts).\n *\n * The rail badges, the palette's \"Needs you\" and running chats, the Needs-you\n * drawer and the in-app \"Finished / Failed\" toasts all read this ONE store,\n * so the whole shell costs one request per tick however many things show a\n * count. (The chat list polls the same route WITHOUT a cursor for its\n * present-tense view — chat/use-chat-activity.ts, C2.)\n *\n * CADENCE. Every 5 s while the window is visible, every 30 s while it is\n * hidden (the badges still need to be right when it comes back, and the tab\n * title count; C8's Rust owns native notifications). Never under the 2 s\n * floor (section-visibility MIN_POLL_INTERVAL_MS). Polls only while\n * something is subscribed.\n *\n * HONESTY. A 404 means the activity module is not in this build →\n * `unavailable`, and every badge renders \"unknown\" (no dot), never zero. A\n * failed poll keeps the last good data and says `stale` — a badge that\n * flashes to 0 on one dropped request would read as a false all-clear.\n *\n * COMPLETIONS arrive once per cursor; `onActivityCompletions` listeners get\n * each batch exactly once. The first poll of a page carries none (history is\n * not news).\n */\nimport { useSyncExternalStore } from 'react';\nimport type { VerseActivityCompletion, VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport { VERSE_ACTIVITY_PATH } from '../../../../core/verse/workbench-types.js';\nimport { ApiError, apiGet } from '../../../data/client.js';\nimport { MIN_POLL_INTERVAL_MS } from './section-visibility.js';\n\nexport const ACTIVITY_POLL_VISIBLE_MS = 5_000;\nexport const ACTIVITY_POLL_HIDDEN_MS = 30_000;\n\nexport type ActivityStatus = 'idle' | 'loading' | 'ready' | 'stale' | 'unavailable';\n\nexport interface ActivityState {\n status: ActivityStatus;\n data: VerseActivityResponse | null;\n /** ms epoch of the last successful poll. */\n updatedAt: number | null;\n}\n\ntype Fetcher = (path: string, signal?: AbortSignal) => Promise<VerseActivityResponse>;\n\nlet fetcher: Fetcher = (path, signal) => apiGet<VerseActivityResponse>(path, signal);\nlet snapshot: ActivityState = { status: 'idle', data: null, updatedAt: null };\nlet cursor: string | null = null;\nlet timer: ReturnType<typeof setTimeout> | null = null;\nlet inFlight: Promise<void> | null = null;\nlet subscribers = 0;\nconst listeners = new Set<() => void>();\nconst completionListeners = new Set<(batch: VerseActivityCompletion[]) => void>();\n\nfunction emit(next: ActivityState): void {\n snapshot = next;\n for (const l of [...listeners]) l();\n}\n\nfunction hidden(): boolean {\n return typeof document !== 'undefined' && document.visibilityState === 'hidden';\n}\n\nfunction schedule(): void {\n if (timer) clearTimeout(timer);\n timer = null;\n if (subscribers === 0) return;\n const every = Math.max(MIN_POLL_INTERVAL_MS, hidden() ? ACTIVITY_POLL_HIDDEN_MS : ACTIVITY_POLL_VISIBLE_MS);\n timer = setTimeout(() => {\n void refreshActivity();\n }, every);\n}\n\n/** Poll now (joins one already running). Resolves when it has settled; never rejects. */\nexport function refreshActivity(): Promise<void> {\n if (inFlight) return inFlight;\n if (snapshot.status === 'idle') emit({ ...snapshot, status: 'loading' });\n const path = cursor ? `${VERSE_ACTIVITY_PATH}?since=${encodeURIComponent(cursor)}` : VERSE_ACTIVITY_PATH;\n inFlight = (async () => {\n try {\n const data = await fetcher(path);\n const firstPoll = cursor === null;\n cursor = typeof data.cursor === 'string' ? data.cursor : null;\n emit({ status: 'ready', data, updatedAt: Date.now() });\n if (!firstPoll && Array.isArray(data.completions) && data.completions.length > 0) {\n for (const l of [...completionListeners]) {\n try { l(data.completions); } catch { /* a listener must not stop the loop */ }\n }\n }\n } catch (err) {\n if (err instanceof ApiError && err.status === 404) {\n emit({ status: 'unavailable', data: null, updatedAt: snapshot.updatedAt });\n } else if (err instanceof ApiError && err.status === 400 && cursor) {\n // A cursor the server no longer accepts: start over rather than stall.\n cursor = null;\n emit({ ...snapshot, status: snapshot.data ? 'stale' : 'loading' });\n } else {\n emit({ ...snapshot, status: snapshot.data ? 'stale' : 'unavailable' });\n }\n } finally {\n inFlight = null;\n schedule();\n }\n })();\n return inFlight;\n}\n\nfunction onVisibility(): void {\n // Back in view: catch up now rather than up to 30 s late.\n if (!hidden() && subscribers > 0) void refreshActivity();\n else schedule();\n}\n\nfunction start(): void {\n subscribers += 1;\n if (subscribers === 1) {\n if (typeof document !== 'undefined') document.addEventListener('visibilitychange', onVisibility);\n void refreshActivity();\n }\n}\n\nfunction stop(): void {\n subscribers = Math.max(0, subscribers - 1);\n if (subscribers > 0) return;\n if (timer) clearTimeout(timer);\n timer = null;\n if (typeof document !== 'undefined') document.removeEventListener('visibilitychange', onVisibility);\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n start();\n return () => {\n listeners.delete(listener);\n stop();\n };\n}\n\nexport function getActivityState(): ActivityState {\n return snapshot;\n}\n\n/** The shell's activity. Subscribing starts the poll; the last unsubscribe stops it. */\nexport function useActivity(): ActivityState {\n return useSyncExternalStore(subscribe, getActivityState, getActivityState);\n}\n\n/** Each batch of newly finished turns, exactly once. Returns the unsubscribe. */\nexport function onActivityCompletions(listener: (batch: VerseActivityCompletion[]) => void): () => void {\n completionListeners.add(listener);\n return () => completionListeners.delete(listener);\n}\n\n/** Test seam: inject the fetch, clear state (and any timer). */\nexport function resetActivityForTest(next?: Fetcher): void {\n if (timer) clearTimeout(timer);\n timer = null;\n inFlight = null;\n cursor = null;\n subscribers = 0;\n listeners.clear();\n completionListeners.clear();\n fetcher = next ?? ((path, signal) => apiGet<VerseActivityResponse>(path, signal));\n snapshot = { status: 'idle', data: null, updatedAt: null };\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/rail-icons.tsx — the icons the shell rail draws at first\n * paint: the section glyphs, Needs you, the gear and the Verse mark.\n *\n * Split from verse-icons.tsx (which re-exports all of these) because the\n * rail is on the chat first-paint path: importing verse-icons there pulled\n * every Verse glyph and the whole shared icon set into the chat first-paint\n * critical JS (SPEC-310A §1). This module imports only icon-base.tsx, the\n * shared set's first-paint subset. See verse-icons.tsx for why each glyph is\n * drawn here or aliased onto the shared set.\n */\nimport type { ComponentType, ReactNode } from 'react';\nimport { IconChat, IconGauge, IconInbox, IconSliders, type IconProps } from '../../components/primitives/icon-base.js';\nimport type { VerseSectionId } from './verse-ui-store.js';\n\nexport const ChatIcon = IconChat;\nexport const UsageIcon = IconGauge;\nexport const SettingsIcon = IconSliders;\n\n/** The Verse chrome geometry (verse-icons.tsx draws its local glyphs with it too). */\nexport function 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\n/**\n * The mark in the rail head: the Ashlr.AI keystone \"A\" (traced from the brand\n * mark, ashlar-landing public/logos/ashlar-mark.png). The legs take the ink\n * colour so it reads in light and dark themes; the core keeps the brand blue\n * (#2563EB). Not a section icon — it never gets a color state.\n */\nexport function VerseMark(props: IconProps) {\n const { size = 20, ...rest } = props;\n return (\n <svg viewBox=\"54 67 146 124\" width={size} height={size} aria-hidden=\"true\" focusable=\"false\" {...rest}>\n <path fill=\"currentColor\" d=\"M106 76H123V115H100L113 154L99 179H72L59 156Z M130 76H147L194 156L181 179H154L140 154L153 115H130Z\" />\n <path fill=\"#2563EB\" d=\"M110 121H143L133 152H120Z\" />\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 * (listened for by shell/anchor-requests.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/anchor-requests.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';\n// rail-icons, not verse-icons: only the rail's glyphs belong in first paint.\nimport { GearIcon, NeedsYouIcon, SECTION_ICON, VerseMark } from './rail-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 })));\nconst ResourcesBar = lazy(() => importResources().then((m) => ({ default: m.ResourcesBar })));\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 {/* 3.11.1: the always-on resource bar (logos + batteries) replaces the\n single capacity ring while it is on; off brings the ring back. */}\n {compact ? null : resources.bar ? (\n <Suspense fallback={null}>\n <ResourcesBar expanded={expanded} />\n </Suspense>\n ) : rail ? <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","/**\n * routes/verse/verse-queries.ts — every /api/verse/* call the Verse console\n * makes. Reads are QueryDefs consumed through useQuery (cache-backed, so a\n * sidebar refresh never blanks the list); writes are wrapped like\n * data/mutations.ts's helpers — they pull the held mutation token from\n * auth-store, touch the hold on success, and invalidate the cache keys they\n * obviously affect. Nothing here ever sees launcher commands or env: the\n * server strips those before any payload leaves it (docs/VERSE-CONTRACT-V1).\n */\nimport type {\n VerseAutonomyScopeView,\n VerseBootstrap,\n VerseCreateSessionRequest,\n VerseRootPriority,\n VerseSession,\n VerseSessionDetail,\n VerseSessionRootsResponse,\n VerseTurnRequest,\n VerseTurnResponse,\n VerseWorkspace,\n VerseWorkspaceCreateRequest,\n VerseWorkspacesResponse,\n VerseWorkspaceUpdateRequest,\n} from '../../data/api-types.js';\nimport type {\n VerseActivityResponse,\n VerseActivitySeenRequest,\n VerseSessionMeta,\n VerseSessionMetaResponse,\n VerseSessionMetaUpdate,\n} from '../../../core/verse/workbench-types.js';\nimport { VERSE_ACTIVITY_PATH, VERSE_ACTIVITY_SEEN_PATH, VERSE_SESSION_META_PATH } from '../../../core/verse/workbench-types.js';\nimport { getMutationToken, touchMutationHold } from '../../data/auth-store.js';\nimport { ApiError, apiGet, apiPost } from '../../data/client.js';\nimport { invalidate } from '../../data/cache.js';\nimport type { QueryDef } from '../../data/queries.js';\n\nexport const VERSE_BOOTSTRAP_KEY = 'verse-bootstrap';\nexport const VERSE_SESSIONS_KEY = 'verse-sessions';\n\nexport const verseBootstrapQuery: QueryDef<VerseBootstrap> = {\n key: VERSE_BOOTSTRAP_KEY,\n fetch: (signal) => apiGet<VerseBootstrap>('/api/verse/bootstrap', signal),\n};\n\nexport const verseSessionsQuery: QueryDef<VerseSession[]> = {\n key: VERSE_SESSIONS_KEY,\n fetch: (signal) => apiGet<VerseSession[]>('/api/verse/sessions', signal),\n};\n\nexport function verseSessionPath(sessionId: string, suffix = ''): string {\n return `/api/verse/sessions/${encodeURIComponent(sessionId)}${suffix}`;\n}\n\nexport function fetchVerseSessionDetail(sessionId: string, signal?: AbortSignal): Promise<VerseSessionDetail> {\n return apiGet<VerseSessionDetail>(verseSessionPath(sessionId), signal);\n}\n\nexport class VerseMutationLockedError extends Error {\n constructor() {\n super('Unlock actions with the mutation token before chatting.');\n this.name = 'VerseMutationLockedError';\n }\n}\n\nasync function post<T>(path: string, body: unknown): Promise<T> {\n const token = getMutationToken();\n if (!token) throw new VerseMutationLockedError();\n const result = await apiPost<T>(path, body, token);\n touchMutationHold();\n return result;\n}\n\n/** Sidebar + resources panel both read these; refresh them after any write. */\nexport function invalidateVerseLists(): void {\n invalidate(VERSE_SESSIONS_KEY);\n invalidate(VERSE_BOOTSTRAP_KEY);\n}\n\nexport async function createVerseSession(req: VerseCreateSessionRequest): Promise<VerseSession> {\n const session = await post<VerseSession>('/api/verse/sessions', req);\n invalidateVerseLists();\n return session;\n}\n\nexport async function sendVerseTurn(sessionId: string, text: string): Promise<VerseTurnResponse> {\n const body: VerseTurnRequest = { text };\n const response = await post<VerseTurnResponse>(verseSessionPath(sessionId, '/turns'), body);\n invalidate(VERSE_SESSIONS_KEY);\n return response;\n}\n\nexport async function cancelVerseTurn(sessionId: string): Promise<void> {\n await post<{ ok: true }>(verseSessionPath(sessionId, '/cancel'), {});\n invalidate(VERSE_SESSIONS_KEY);\n}\n\nexport async function deleteVerseSession(sessionId: string): Promise<void> {\n await post<{ ok: true }>(verseSessionPath(sessionId, '/delete'), {});\n invalidateVerseLists();\n}\n\nexport async function renameVerseSession(sessionId: string, title: string): Promise<VerseSession> {\n const session = await post<VerseSession>(verseSessionPath(sessionId, '/rename'), { title });\n invalidate(VERSE_SESSIONS_KEY);\n return session;\n}\n\n// ---------------------------------------------------------------------------\n// Workspaces (V2.2)\n// ---------------------------------------------------------------------------\n\nexport const VERSE_WORKSPACES_KEY = 'verse-workspaces';\nexport const VERSE_AUTONOMY_SCOPE_KEY = 'verse-autonomy-scope';\n\nexport const verseWorkspacesQuery: QueryDef<VerseWorkspacesResponse> = {\n key: VERSE_WORKSPACES_KEY,\n fetch: (signal) => apiGet<VerseWorkspacesResponse>('/api/verse/workspaces', signal),\n};\n\n/**\n * Enrolled repos, ordered by section focus and priority. Kept on its own key\n * from `verseScopeQuery` (which is the raw registry) so a re-rank refreshes\n * the ORDER without re-reading enrollment — and so it is obvious in the cache\n * that these are two different facts.\n */\nexport const verseAutonomyScopeQuery: QueryDef<VerseAutonomyScopeView> = {\n key: VERSE_AUTONOMY_SCOPE_KEY,\n fetch: (signal) => apiGet<VerseAutonomyScopeView>('/api/verse/autonomy-scope', signal),\n};\n\n/**\n * Per-root identity for one session: branch, dirty state, remote, whether the\n * engine can reach each root and whether the autonomous lane would.\n *\n * Deliberately NOT cached by session id alone at module scope — a branch goes\n * stale the moment a turn commits, so the panel refetches it per open.\n */\nexport function fetchVerseSessionRoots(sessionId: string, signal?: AbortSignal): Promise<VerseSessionRootsResponse> {\n return apiGet<VerseSessionRootsResponse>(verseSessionPath(sessionId, '/roots'), signal);\n}\n\nfunction invalidateWorkspaces(): void {\n invalidate(VERSE_WORKSPACES_KEY);\n invalidate(VERSE_AUTONOMY_SCOPE_KEY);\n invalidate(VERSE_BOOTSTRAP_KEY);\n}\n\nexport async function createVerseWorkspace(req: VerseWorkspaceCreateRequest): Promise<VerseWorkspace> {\n const workspace = await post<VerseWorkspace>('/api/verse/workspaces', req);\n invalidateWorkspaces();\n return workspace;\n}\n\nexport async function updateVerseWorkspace(id: string, patch: VerseWorkspaceUpdateRequest): Promise<VerseWorkspace> {\n const workspace = await post<VerseWorkspace>(`/api/verse/workspaces/${encodeURIComponent(id)}/update`, patch);\n invalidateWorkspaces();\n return workspace;\n}\n\nexport async function deleteVerseWorkspace(id: string): Promise<void> {\n await post<{ ok: true }>(`/api/verse/workspaces/${encodeURIComponent(id)}/delete`, {});\n invalidateWorkspaces();\n}\n\nexport async function setVerseRootPriority(path: string, priority: VerseRootPriority): Promise<void> {\n await post<unknown>('/api/verse/workspaces/priority', { path, priority });\n invalidateWorkspaces();\n}\n\nexport async function setVerseFocusSection(sectionId: string | null): Promise<void> {\n await post<unknown>('/api/verse/workspaces/focus', { sectionId });\n invalidateWorkspaces();\n}\n\n// ---------------------------------------------------------------------------\n// 3.10 — activity + per-chat meta (C1's routes; C2's sidebar reads them)\n// ---------------------------------------------------------------------------\n//\n// Both route families are mounted lazily (C0's mount table): on a build where\n// C1's module has not landed they answer a plain 404. That is \"this server\n// has no activity yet\", not an error the sidebar should paint red — so a 404\n// reads as `null` and every consumer falls back to what the session list\n// alone can say (running dot from `status`, no pins, no unread).\n\nexport const VERSE_ACTIVITY_KEY = 'verse-activity';\nexport const VERSE_SESSION_META_KEY = 'verse-session-meta';\n\nasync function getOrNull<T>(path: string, signal?: AbortSignal): Promise<T | null> {\n try {\n return await apiGet<T>(path, signal);\n } catch (err) {\n if (err instanceof ApiError && err.status === 404) return null;\n throw err;\n }\n}\n\n/**\n * The poll-shaped read (no `since`): running chats with their live line and\n * the Needs-you items. Completions are C1's concern (its cursor loop feeds\n * the rail and the native notifications); the sidebar needs only the present.\n */\nexport const verseActivityQuery: QueryDef<VerseActivityResponse | null> = {\n key: VERSE_ACTIVITY_KEY,\n fetch: (signal) => getOrNull<VerseActivityResponse>(VERSE_ACTIVITY_PATH, signal),\n};\n\nexport const verseSessionMetaQuery: QueryDef<VerseSessionMetaResponse | null> = {\n key: VERSE_SESSION_META_KEY,\n fetch: (signal) => getOrNull<VerseSessionMetaResponse>(VERSE_SESSION_META_PATH, signal),\n};\n\n/** Pin / archive one chat. Unknown keys are a 400 on the server, so only the two known ones are ever sent. */\nexport async function setVerseSessionMeta(sessionId: string, update: VerseSessionMetaUpdate): Promise<VerseSessionMeta> {\n const body: VerseSessionMetaUpdate = {};\n if (typeof update.pinned === 'boolean') body.pinned = update.pinned;\n if (typeof update.archived === 'boolean') body.archived = update.archived;\n const meta = await post<VerseSessionMeta>(`${VERSE_SESSION_META_PATH}/${encodeURIComponent(sessionId)}`, body);\n invalidate(VERSE_SESSION_META_KEY);\n return meta;\n}\n\n/**\n * \"The operator has read this chat up to `turnCount`.\" Best-effort and SILENT:\n * it runs only when a token is already held (opening a chat must never raise\n * the token dialog), and a failure is swallowed — the sidebar keeps its own\n * optimistic read state, so the unread dot clears either way.\n */\nexport async function markVerseSessionSeen(sessionId: string, turnCount: number): Promise<boolean> {\n const token = getMutationToken();\n if (!token) return false;\n const body: VerseActivitySeenRequest = { sessionId, turnCount };\n try {\n // apiPost, not post(): reading a chat is not operator ACTIVITY, so it\n // must not extend the mutation hold the way a real write does.\n await apiPost<unknown>(VERSE_ACTIVITY_SEEN_PATH, body, token);\n return true;\n } catch {\n return false;\n }\n}\n","export default \"__VITE_ASSET__WPGYjwIlzWVNM1bYhOc83w__\"","export default \"__VITE_ASSET__VRAku6fjghkApIISiBWPzg__\"","/**\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 { lazy, Suspense, useEffect } from 'react';\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/**\n * The session gate is a dynamic import: a signed-in cold load (the common\n * case — the desktop shell injects its tokens) never draws it, and as a\n * static import it cost ~3 KB of chat first-paint critical JS (SPEC-310A §1).\n * `preloadSessionGate` starts the download while the auth probe is in flight,\n * so an unauthenticated answer finds the chunk already there instead of\n * paying a second round trip. Vite shares the in-flight import with lazy().\n */\nconst importSessionGate = () => import('../components/auth/SessionGate.js');\nconst SessionGate = lazy(() => importSessionGate().then((m) => ({ default: m.SessionGate })));\nfunction preloadSessionGate(): void {\n void importSessionGate().catch(() => undefined);\n}\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 preloadSessionGate();\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 (\n <Suspense fallback={<p className={styles.checking} role=\"status\">Checking for an existing Verse session…</p>}>\n <SessionGate heading=\"Connect to Ashlr Verse\" command=\"ashlr verse\" subject=\"Ashlr Verse\" mutationField />\n </Suspense>\n );\n }\n return (\n <ToastProvider>\n <SkipToContent />\n <div className={styles.shell}><VerseApp /></div>\n </ToastProvider>\n );\n}\n"],"file":"VerseConsoleApp-DTjDpGCd.js"}