@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
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-model-M1GaQU5l.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/chat/sidebar-model.ts"],"sourcesContent":["/**\n * routes/verse/chat/sidebar-model.ts — the chat list, as data (SPEC-310C §2\n * \"Sidebar\", unit C2).\n *\n * [ All ] [ Running 2 ] [ Needs you 1 ] [ Pinned 3 ]\n * PINNED ▸ rows\n * <project> … ▸ rows, most recently touched project first\n * ARCHIVED (12) ▸ collapsed\n *\n * Each row states ONE status, the most urgent that applies:\n *\n * running a pulse and the elapsed time — plus a muted second line from\n * activity.live (\"npm test\", or the tail of the live reasoning);\n * failed the last turn errored;\n * unread a turn finished since the operator last looked;\n * time otherwise, how long ago it was touched.\n *\n * The inputs are three sources of different reliability, and the model is\n * explicit about what each is allowed to claim:\n * - the session list (always present): status, turnCount, updatedAt;\n * - activity (C1's route; null until it lands): who is running and what\n * they are doing, and the Needs-you items;\n * - session meta (C1's route; null until it lands): pinned, archived, and\n * how far the operator has read. With no meta, NOTHING is unread — an\n * unknown read state is not an unread one (honesty rule: null = unknown).\n *\n * Pure: no React, no fetch.\n */\nimport type { VerseProject, VerseSession } from '../../../data/api-types.js';\nimport type {\n NeedsYouItem,\n VerseActivityLive,\n VerseActivityResponse,\n VerseSessionMeta,\n VerseSessionMetaResponse,\n} from '../../../../core/verse/workbench-types.js';\nimport { groupSessions } from '../verse-model.js';\n\nexport const SIDEBAR_FILTERS = ['all', 'running', 'needs-you', 'pinned'] as const;\nexport type SidebarFilter = (typeof SIDEBAR_FILTERS)[number];\n\nexport const SIDEBAR_FILTER_LABEL: Readonly<Record<SidebarFilter, string>> = {\n all: 'All',\n running: 'Running',\n 'needs-you': 'Needs you',\n pinned: 'Pinned',\n};\n\nexport type RowStatus =\n | { kind: 'running'; startedAt: string | null }\n | { kind: 'failed' }\n | { kind: 'unread'; newTurns: number }\n | { kind: 'time'; at: string };\n\nexport interface SidebarRow {\n session: VerseSession;\n status: RowStatus;\n /** The running chat's muted second line; null when it is not running or nothing is known. */\n live: { text: string; startedAt: string | null } | null;\n pinned: boolean;\n archived: boolean;\n needsYou: boolean;\n}\n\nexport type SidebarGroupKind = 'pinned' | 'project' | 'archived';\n\nexport interface SidebarGroup {\n id: string;\n kind: SidebarGroupKind;\n label: string;\n /** The project's path (tooltip) for a project group. */\n projectPath: string | null;\n enrolled: boolean;\n rows: SidebarRow[];\n}\n\nexport interface SidebarModel {\n groups: SidebarGroup[];\n counts: Record<SidebarFilter, number>;\n /** Meta is known (C1's route answered) — pin/archive controls can work. */\n metaAvailable: boolean;\n}\n\nexport interface SidebarInput {\n sessions: readonly VerseSession[];\n projects: readonly VerseProject[];\n query: string;\n filter: SidebarFilter;\n activity: VerseActivityResponse | null;\n meta: VerseSessionMetaResponse | null;\n /** turnCount this tab has seen per chat (opened here) — clears a dot before the server confirms. */\n localSeen: ReadonlyMap<string, number>;\n /** The open chat is never unread. */\n selectedId: string | null;\n}\n\n/** Ids of chats a Needs-you item points at (as its subject or its target). */\nexport function needsYouSessionIds(items: readonly NeedsYouItem[]): Set<string> {\n const out = new Set<string>();\n for (const item of items) {\n if (item.subject.sessionId) out.add(item.subject.sessionId);\n if (item.target.kind === 'session') out.add(item.target.sessionId);\n }\n return out;\n}\n\nconst THINKING_TAIL_CHARS = 72;\n\n/** \"npm test\" / \"…the tail of what it is thinking\" / \"Writing\" — never a guess. */\nexport function liveLine(live: VerseActivityLive | null): string | null {\n if (!live) return null;\n if (live.phase === 'tool' && live.tool) return live.tool;\n if (live.thinkingTail && live.thinkingTail.trim()) {\n const tail = live.thinkingTail.replace(/\\s+/g, ' ').trim();\n return tail.length > THINKING_TAIL_CHARS ? `…${tail.slice(tail.length - THINKING_TAIL_CHARS + 1).trimStart()}` : tail;\n }\n switch (live.phase) {\n case 'thinking': return 'Thinking';\n case 'writing': return 'Writing';\n case 'waiting': return 'Waiting for the model';\n case 'tool': return 'Running a tool';\n default: return null;\n }\n}\n\nfunction metaFor(meta: VerseSessionMetaResponse | null, id: string): VerseSessionMeta | null {\n return meta?.sessions[id] ?? null;\n}\n\nexport function buildSidebar(input: SidebarInput): SidebarModel {\n const { sessions, projects, query, filter, activity, meta, localSeen, selectedId } = input;\n const running = new Map((activity?.running ?? []).map((r) => [r.sessionId, r]));\n const needs = needsYouSessionIds(activity?.needsYou ?? []);\n const metaAvailable = meta !== null;\n\n const rows = new Map<string, SidebarRow>();\n for (const session of sessions) {\n const m = metaFor(meta, session.id);\n const activityRow = running.get(session.id);\n const isRunning = session.status === 'running' || activityRow !== undefined;\n const serverSeen = m?.seenTurnCount ?? null;\n const seen = Math.max(serverSeen ?? -1, localSeen.get(session.id) ?? -1);\n // Unread needs a KNOWN read state: meta answered (this chat's entry or,\n // absent one, its default of \"never opened\" = 0) or this tab opened it.\n const knownSeen = metaAvailable ? Math.max(seen, 0) : seen;\n const unread = session.id !== selectedId && knownSeen >= 0 && session.turnCount > knownSeen ? session.turnCount - knownSeen : 0;\n // Without activity, a failed chat is the one \"needs you\" signal the list itself carries.\n const needsYou = activity ? needs.has(session.id) : session.status === 'error';\n const status: RowStatus = isRunning\n ? { kind: 'running', startedAt: activityRow?.startedAt ?? null }\n : session.status === 'error'\n ? { kind: 'failed' }\n : unread > 0\n ? { kind: 'unread', newTurns: unread }\n : { kind: 'time', at: session.updatedAt };\n const text = isRunning ? liveLine(activityRow?.live ?? null) : null;\n rows.set(session.id, {\n session,\n status,\n live: text === null ? null : { text, startedAt: activityRow?.startedAt ?? null },\n pinned: m?.pinned === true,\n archived: m?.archived === true,\n needsYou,\n });\n }\n\n const all = [...rows.values()];\n const counts: Record<SidebarFilter, number> = {\n all: all.filter((r) => !r.archived).length,\n running: all.filter((r) => r.status.kind === 'running').length,\n 'needs-you': all.filter((r) => r.needsYou).length,\n pinned: all.filter((r) => r.pinned && !r.archived).length,\n };\n\n const pass = (row: SidebarRow): boolean => {\n switch (filter) {\n case 'running': return row.status.kind === 'running';\n case 'needs-you': return row.needsYou;\n case 'pinned': return row.pinned;\n default: return true;\n }\n };\n\n // Title/project search reuses the 3.9 grouping (same matching, same order).\n const matched = groupSessions(all.filter(pass).map((r) => r.session), projects, query);\n const groups: SidebarGroup[] = [];\n const pinnedRows: SidebarRow[] = [];\n const archivedRows: SidebarRow[] = [];\n const projectGroups: SidebarGroup[] = [];\n for (const group of matched) {\n const projectRows: SidebarRow[] = [];\n for (const session of group.sessions) {\n const row = rows.get(session.id)!;\n if (row.archived) archivedRows.push(row);\n else if (row.pinned) pinnedRows.push(row);\n else projectRows.push(row);\n }\n if (projectRows.length > 0) {\n projectGroups.push({\n id: `project:${group.projectPath}`,\n kind: 'project',\n label: group.name,\n projectPath: group.projectPath,\n enrolled: group.enrolled,\n rows: projectRows,\n });\n }\n }\n const newest = (a: SidebarRow, b: SidebarRow) => b.session.updatedAt.localeCompare(a.session.updatedAt);\n if (pinnedRows.length > 0) groups.push({ id: 'pinned', kind: 'pinned', label: 'Pinned', projectPath: null, enrolled: false, rows: pinnedRows.sort(newest) });\n groups.push(...projectGroups);\n if (archivedRows.length > 0) groups.push({ id: 'archived', kind: 'archived', label: 'Archived', projectPath: null, enrolled: false, rows: archivedRows.sort(newest) });\n return { groups, counts, metaAvailable };\n}\n"],"mappings":"8CAsCA,IAAa,EAAkB,CAAC,MAAO,UAAW,YAAa,QAAQ,EAG1D,EAAgE,CAC3E,IAAK,MACL,QAAS,UACT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O,EAAI,OAC1B,QAAS,MAAO,EAClB,CACF,CAG6C,CAAC,CAAC,IAAK,GAAM,EAAE,OAAO,EAAG,EAAU,CAAK,EAC/E,EAAyB,CAAC,EAC1B,EAA2B,CAAC,EAC5B,EAA6B,CAAC,EAC9B,EAAgC,CAAC,EACvC,IAAK,IAAM,KAAS,EAAS,CAC3B,IAAM,EAA4B,CAAC,EACnC,IAAK,IAAM,KAAW,EAAM,SAAU,CACpC,IAAM,EAAM,EAAK,IAAI,EAAQ,EAAE,EAC3B,EAAI,SAAU,EAAa,KAAK,CAAG,EAC9B,EAAI,OAAQ,EAAW,KAAK,CAAG,EACnC,EAAY,KAAK,CAAG,CAC3B,CACI,EAAY,OAAS,GACvB,EAAc,KAAK,CACjB,GAAI,WAAW,EAAM,cACrB,KAAM,UACN,MAAO,EAAM,KACb,YAAa,EAAM,YACnB,SAAU,EAAM,SAChB,KAAM,CACR,CAAC,CAEL,CACA,IAAM,GAAU,EAAe,IAAkB,EAAE,QAAQ,UAAU,cAAc,EAAE,QAAQ,SAAS,EAItG,OAHI,EAAW,OAAS,GAAG,EAAO,KAAK,CAAE,GAAI,SAAU,KAAM,SAAU,MAAO,SAAU,YAAa,KAAM,SAAU,GAAO,KAAM,EAAW,KAAK,CAAM,CAAE,CAAC,EAC3J,EAAO,KAAK,GAAG,CAAa,EACxB,EAAa,OAAS,GAAG,EAAO,KAAK,CAAE,GAAI,WAAY,KAAM,WAAY,MAAO,WAAY,YAAa,KAAM,SAAU,GAAO,KAAM,EAAa,KAAK,CAAM,CAAE,CAAC,EAC9J,CAAE,SAAQ,SAAQ,eAAc,CACzC"}
1
+ {"version":3,"file":"sidebar-model-DQ-FyBHW.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/chat/sidebar-model.ts"],"sourcesContent":["/**\n * routes/verse/chat/sidebar-model.ts — the chat list, as data (SPEC-310C §2\n * \"Sidebar\", unit C2).\n *\n * [ All ] [ Running 2 ] [ Needs you 1 ] [ Pinned 3 ]\n * PINNED ▸ rows\n * <project> … ▸ rows, most recently touched project first\n * ARCHIVED (12) ▸ collapsed\n *\n * Each row states ONE status, the most urgent that applies:\n *\n * running a pulse and the elapsed time — plus a muted second line from\n * activity.live (\"npm test\", or the tail of the live reasoning);\n * failed the last turn errored;\n * unread a turn finished since the operator last looked;\n * time otherwise, how long ago it was touched.\n *\n * The inputs are three sources of different reliability, and the model is\n * explicit about what each is allowed to claim:\n * - the session list (always present): status, turnCount, updatedAt;\n * - activity (C1's route; null until it lands): who is running and what\n * they are doing, and the Needs-you items;\n * - session meta (C1's route; null until it lands): pinned, archived, and\n * how far the operator has read. With no meta, NOTHING is unread — an\n * unknown read state is not an unread one (honesty rule: null = unknown).\n *\n * Pure: no React, no fetch.\n */\nimport type { VerseProject, VerseSession } from '../../../data/api-types.js';\nimport type {\n NeedsYouItem,\n VerseActivityLive,\n VerseActivityResponse,\n VerseSessionMeta,\n VerseSessionMetaResponse,\n} from '../../../../core/verse/workbench-types.js';\nimport { groupSessions } from '../verse-model.js';\n\nexport const SIDEBAR_FILTERS = ['all', 'running', 'needs-you', 'pinned'] as const;\nexport type SidebarFilter = (typeof SIDEBAR_FILTERS)[number];\n\nexport const SIDEBAR_FILTER_LABEL: Readonly<Record<SidebarFilter, string>> = {\n all: 'All',\n running: 'Running',\n 'needs-you': 'Needs you',\n pinned: 'Pinned',\n};\n\nexport type RowStatus =\n | { kind: 'running'; startedAt: string | null }\n | { kind: 'failed' }\n | { kind: 'unread'; newTurns: number }\n | { kind: 'time'; at: string };\n\nexport interface SidebarRow {\n session: VerseSession;\n status: RowStatus;\n /** The running chat's muted second line; null when it is not running or nothing is known. */\n live: { text: string; startedAt: string | null } | null;\n pinned: boolean;\n archived: boolean;\n needsYou: boolean;\n}\n\nexport type SidebarGroupKind = 'pinned' | 'project' | 'archived';\n\nexport interface SidebarGroup {\n id: string;\n kind: SidebarGroupKind;\n label: string;\n /** The project's path (tooltip) for a project group. */\n projectPath: string | null;\n enrolled: boolean;\n rows: SidebarRow[];\n}\n\nexport interface SidebarModel {\n groups: SidebarGroup[];\n counts: Record<SidebarFilter, number>;\n /** Meta is known (C1's route answered) — pin/archive controls can work. */\n metaAvailable: boolean;\n}\n\nexport interface SidebarInput {\n sessions: readonly VerseSession[];\n projects: readonly VerseProject[];\n query: string;\n filter: SidebarFilter;\n activity: VerseActivityResponse | null;\n meta: VerseSessionMetaResponse | null;\n /** turnCount this tab has seen per chat (opened here) — clears a dot before the server confirms. */\n localSeen: ReadonlyMap<string, number>;\n /** The open chat is never unread. */\n selectedId: string | null;\n}\n\n/** Ids of chats a Needs-you item points at (as its subject or its target). */\nexport function needsYouSessionIds(items: readonly NeedsYouItem[]): Set<string> {\n const out = new Set<string>();\n for (const item of items) {\n if (item.subject.sessionId) out.add(item.subject.sessionId);\n if (item.target.kind === 'session') out.add(item.target.sessionId);\n }\n return out;\n}\n\nconst THINKING_TAIL_CHARS = 72;\n\n/** \"npm test\" / \"…the tail of what it is thinking\" / \"Writing\" — never a guess. */\nexport function liveLine(live: VerseActivityLive | null): string | null {\n if (!live) return null;\n if (live.phase === 'tool' && live.tool) return live.tool;\n if (live.thinkingTail && live.thinkingTail.trim()) {\n const tail = live.thinkingTail.replace(/\\s+/g, ' ').trim();\n return tail.length > THINKING_TAIL_CHARS ? `…${tail.slice(tail.length - THINKING_TAIL_CHARS + 1).trimStart()}` : tail;\n }\n switch (live.phase) {\n case 'thinking': return 'Thinking';\n case 'writing': return 'Writing';\n case 'waiting': return 'Waiting for the model';\n case 'tool': return 'Running a tool';\n default: return null;\n }\n}\n\nfunction metaFor(meta: VerseSessionMetaResponse | null, id: string): VerseSessionMeta | null {\n return meta?.sessions[id] ?? null;\n}\n\nexport function buildSidebar(input: SidebarInput): SidebarModel {\n const { sessions, projects, query, filter, activity, meta, localSeen, selectedId } = input;\n const running = new Map((activity?.running ?? []).map((r) => [r.sessionId, r]));\n const needs = needsYouSessionIds(activity?.needsYou ?? []);\n const metaAvailable = meta !== null;\n\n const rows = new Map<string, SidebarRow>();\n for (const session of sessions) {\n const m = metaFor(meta, session.id);\n const activityRow = running.get(session.id);\n const isRunning = session.status === 'running' || activityRow !== undefined;\n const serverSeen = m?.seenTurnCount ?? null;\n const seen = Math.max(serverSeen ?? -1, localSeen.get(session.id) ?? -1);\n // Unread needs a KNOWN read state: meta answered (this chat's entry or,\n // absent one, its default of \"never opened\" = 0) or this tab opened it.\n const knownSeen = metaAvailable ? Math.max(seen, 0) : seen;\n const unread = session.id !== selectedId && knownSeen >= 0 && session.turnCount > knownSeen ? session.turnCount - knownSeen : 0;\n // Without activity, a failed chat is the one \"needs you\" signal the list itself carries.\n const needsYou = activity ? needs.has(session.id) : session.status === 'error';\n const status: RowStatus = isRunning\n ? { kind: 'running', startedAt: activityRow?.startedAt ?? null }\n : session.status === 'error'\n ? { kind: 'failed' }\n : unread > 0\n ? { kind: 'unread', newTurns: unread }\n : { kind: 'time', at: session.updatedAt };\n const text = isRunning ? liveLine(activityRow?.live ?? null) : null;\n rows.set(session.id, {\n session,\n status,\n live: text === null ? null : { text, startedAt: activityRow?.startedAt ?? null },\n pinned: m?.pinned === true,\n archived: m?.archived === true,\n needsYou,\n });\n }\n\n const all = [...rows.values()];\n const counts: Record<SidebarFilter, number> = {\n all: all.filter((r) => !r.archived).length,\n running: all.filter((r) => r.status.kind === 'running').length,\n 'needs-you': all.filter((r) => r.needsYou).length,\n pinned: all.filter((r) => r.pinned && !r.archived).length,\n };\n\n const pass = (row: SidebarRow): boolean => {\n switch (filter) {\n case 'running': return row.status.kind === 'running';\n case 'needs-you': return row.needsYou;\n case 'pinned': return row.pinned;\n default: return true;\n }\n };\n\n // Title/project search reuses the 3.9 grouping (same matching, same order).\n const matched = groupSessions(all.filter(pass).map((r) => r.session), projects, query);\n const groups: SidebarGroup[] = [];\n const pinnedRows: SidebarRow[] = [];\n const archivedRows: SidebarRow[] = [];\n const projectGroups: SidebarGroup[] = [];\n for (const group of matched) {\n const projectRows: SidebarRow[] = [];\n for (const session of group.sessions) {\n const row = rows.get(session.id)!;\n if (row.archived) archivedRows.push(row);\n else if (row.pinned) pinnedRows.push(row);\n else projectRows.push(row);\n }\n if (projectRows.length > 0) {\n projectGroups.push({\n id: `project:${group.projectPath}`,\n kind: 'project',\n label: group.name,\n projectPath: group.projectPath,\n enrolled: group.enrolled,\n rows: projectRows,\n });\n }\n }\n const newest = (a: SidebarRow, b: SidebarRow) => b.session.updatedAt.localeCompare(a.session.updatedAt);\n if (pinnedRows.length > 0) groups.push({ id: 'pinned', kind: 'pinned', label: 'Pinned', projectPath: null, enrolled: false, rows: pinnedRows.sort(newest) });\n groups.push(...projectGroups);\n if (archivedRows.length > 0) groups.push({ id: 'archived', kind: 'archived', label: 'Archived', projectPath: null, enrolled: false, rows: archivedRows.sort(newest) });\n return { groups, counts, metaAvailable };\n}\n"],"mappings":"8CAsCA,IAAa,EAAkB,CAAC,MAAO,UAAW,YAAa,QAAQ,EAG1D,EAAgE,CAC3E,IAAK,MACL,QAAS,UACT,YAAa,YACb,OAAQ,QACV,EAmDA,SAAgB,EAAmB,EAA6C,CAC9E,IAAM,EAAM,IAAI,IAChB,IAAK,IAAM,KAAQ,EACb,EAAK,QAAQ,WAAW,EAAI,IAAI,EAAK,QAAQ,SAAS,EACtD,EAAK,OAAO,OAAS,WAAW,EAAI,IAAI,EAAK,OAAO,SAAS,EAEnE,OAAO,CACT,CAEA,IAAM,EAAsB,GAG5B,SAAgB,EAAS,EAA+C,CACtE,GAAI,CAAC,EAAM,OAAO,KAClB,GAAI,EAAK,QAAU,QAAU,EAAK,KAAM,OAAO,EAAK,KACpD,GAAI,EAAK,cAAgB,EAAK,aAAa,KAAK,EAAG,CACjD,IAAM,EAAO,EAAK,aAAa,QAAQ,OAAQ,GAAG,CAAC,CAAC,KAAK,EACzD,OAAO,EAAK,OAAS,EAAsB,IAAI,EAAK,MAAM,EAAK,OAAS,EAAsB,CAAC,CAAC,CAAC,UAAU,IAAM,CACnH,CACA,OAAQ,EAAK,MAAb,CAC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,UAAU,cAAc,EAAE,QAAQ,SAAS,EAItG,OAHI,EAAW,OAAS,GAAG,EAAO,KAAK,CAAE,GAAI,SAAU,KAAM,SAAU,MAAO,SAAU,YAAa,KAAM,SAAU,GAAO,KAAM,EAAW,KAAK,CAAM,CAAE,CAAC,EAC3J,EAAO,KAAK,GAAG,CAAa,EACxB,EAAa,OAAS,GAAG,EAAO,KAAK,CAAE,GAAI,WAAY,KAAM,WAAY,MAAO,WAAY,YAAa,KAAM,SAAU,GAAO,KAAM,EAAa,KAAK,CAAM,CAAE,CAAC,EAC9J,CAAE,SAAQ,SAAQ,eAAc,CACzC"}
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PreviewPane-BS-CleCd.js","assets/index-BVxOlseC.js","assets/global-oEl9Qj8u.js","assets/global-BlI2BYa1.css","assets/workbench-types-DzN-5trg.js","assets/viewport-nTubFCwf.js","assets/section-visibility-Yctxu-if.js","assets/MessageMarkdown-BauY8ZTY.js","assets/MessageMarkdown-Cgh5f1-Q.css","assets/Segmented-BE53BenI.js","assets/Segmented-BnjHbKzH.css","assets/Button-HHXgoXGr.js","assets/Button-DrnKsvnQ.css","assets/icons-DEQa2rTx.js","assets/icon-base-DvM1eI5V.js","assets/EmptyState-BqR5YAmf.js","assets/EmptyState-B3YUPGaa.css","assets/terminal-icons-D2xe-aM1.js","assets/pane-chrome.module-D7o-fVd0.js","assets/pane-chrome-8JmEhHVD.css","assets/PreviewPane-DoMsJSG3.css","assets/TerminalPane-MQT-veKZ.js","assets/command-catalog-Bb_PxC5w.js","assets/verse-model-DyCwZF-M.js","assets/VerseConsoleApp-DTjDpGCd.js","assets/RouteErrorBoundary-DYtwc2ja.js","assets/RouteErrorBoundary-DdxhTdZ6.css","assets/guarded-action-OzqcPjmh.js","assets/preloaded-Cwf9rsnZ.js","assets/verse-ui-store-62DxpVHS.js","assets/dock-store-B2vlxqPu.js","assets/composer-keys-su0g1h9o.js","assets/command-bus-xYZoK9nQ.js","assets/VerseConsoleApp-Cxqr-3qc.css","assets/compaction-point-VL9oegWS.js","assets/ActionMenu-FxXeRbPx.js","assets/ActionMenu-DPjsLU1g.css","assets/TerminalPane-BwfMbnJz.css","assets/BranchBar-CLsvOcyK.js","assets/Dialog-BS9Dxi3G.js","assets/focus-trap-HtcoXeEq.js","assets/Dialog-tQ8kFulD.css","assets/MutationTokenDialog-mxrw0Yvy.js","assets/MutationTokenDialog-CrfJ0PdD.css","assets/git-model-bk_RXh3y.js","assets/use-token-gate-DqrSXdX6.js","assets/format-BkWdOQDL.js","assets/format-DKrNjdwD.js","assets/BranchBar-BZNQ50YE.css","assets/DiffPane-TOmUf3b2.js","assets/highlight-CMCZK9jW.js","assets/line-diff-B5Eonif2.js","assets/DiffPane-BAvvbBsf.css","assets/SessionInsightChip-CxlSyueJ.js","assets/nav-NVtnuG7A.js","assets/surface-data-DTI7LjvH.js","assets/control-queries-CmgBgKV7.js","assets/mutations-C5S7okTW.js","assets/mind.module-gTGAuJt1.js","assets/colors-BZ3a9wFf.js","assets/workspace-model-CbhdPhei.js","assets/calendar-day-BxBYHfX1.js","assets/mind-B9PzLcl0.css"])))=>i.map(i=>d[i]);
2
+ import{a as e,n as t,s as n,t as r}from"./index-BVxOlseC.js";import{t as i}from"./Button-HHXgoXGr.js";import{t as a}from"./EmptyState-BqR5YAmf.js";var o=n(e(),1),s=t(),c={"branch-bar":{path:`git/BranchBar.tsx`,exportName:`BranchBar`,owner:`C5`,kind:`inline`,label:`Branch bar`},"diff-pane":{path:`git/DiffPane.tsx`,exportName:`DiffPane`,owner:`C5`,kind:`pane`,label:`Review`},"terminal-pane":{path:`dock/terminal/TerminalPane.tsx`,exportName:`TerminalPane`,owner:`C4`,kind:`pane`,label:`Terminal`},"preview-pane":{path:`dock/preview/PreviewPane.tsx`,exportName:`PreviewPane`,owner:`C4`,kind:`pane`,label:`Preview`},"session-insight-chip":{path:`mind/SessionInsightChip.tsx`,exportName:`SessionInsightChip`,owner:`C7`,kind:`inline`,label:`Insight`}};Object.keys(c);var l=Object.assign({"../dock/preview/PreviewPane.tsx":()=>r(()=>import(`./PreviewPane-BS-CleCd.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),"../dock/terminal/TerminalPane.tsx":()=>r(()=>import(`./TerminalPane-MQT-veKZ.js`),__vite__mapDeps([21,1,2,3,22,4,5,6,23,24,25,26,27,28,29,30,31,32,14,33,34,11,12,35,36,13,15,16,17,18,19,37])),"../git/BranchBar.tsx":()=>r(()=>import(`./BranchBar-CLsvOcyK.js`),__vite__mapDeps([38,1,39,40,41,42,2,3,43,5,32,6,44,24,25,26,22,4,27,28,29,30,31,14,33,11,12,13,45,46,47,23,34,48])),"../git/DiffPane.tsx":()=>r(()=>import(`./DiffPane-TOmUf3b2.js`),__vite__mapDeps([49,1,2,3,50,9,10,44,24,25,26,22,4,27,28,5,29,30,31,32,6,14,33,11,12,51,13,15,16,18,19,52])),"../mind/SessionInsightChip.tsx":()=>r(()=>import(`./SessionInsightChip-CxlSyueJ.js`),__vite__mapDeps([53,1,2,3,46,47,24,25,26,22,4,27,28,5,29,30,31,32,6,14,33,23,34,54,55,56,57,58,59,60,61,62]))});function u(e,t){return t[`../${c[e].path}`]}function d(e,t=l){return u(e,t)!==void 0}function f(e,t=l){let n=u(e,t);if(!n)return null;let{exportName:r}=c[e];return(0,o.lazy)(async()=>{let t=(await n())[r];if(typeof t!=`function`&&(typeof t!=`object`||!t))throw Error(`${c[e].path} exports no ${r}`);return{default:t}})}var p=new Map;function m(e){return p.has(e)||p.set(e,f(e)),p.get(e)}var h=class extends o.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){console.error(`[verse] ${this.props.label} failed`,e,t.componentStack)}render(){return this.state.failed?this.props.kind===`inline`?null:(0,s.jsx)(g,{label:this.props.label,onRetry:this.props.onRetry}):this.props.children}};function g({label:e,onRetry:t}){return(0,s.jsx)(a,{compact:!0,tone:`error`,title:`${e} could not load`,body:`The rest of the chat still works.`,action:(0,s.jsx)(i,{variant:`subtle`,size:`sm`,onClick:t,children:`Try again`})})}function _({id:e,props:t,resolve:n=m,forget:r=e=>p.delete(e)}){let[i,a]=(0,o.useState)(0),l=n(e);if(!l)return null;let{kind:u,label:d}=c[e];return(0,s.jsx)(h,{kind:u,label:d,onRetry:()=>{r(e),a(e=>e+1)},children:(0,s.jsx)(o.Suspense,{fallback:null,children:(0,s.jsx)(l,{...t})})},i)}function v(e){return(0,s.jsx)(_,{id:`branch-bar`,props:e})}function y(e){return(0,s.jsx)(_,{id:`diff-pane`,props:e})}function b(e){return(0,s.jsx)(_,{id:`terminal-pane`,props:e})}function x(e){return(0,s.jsx)(_,{id:`preview-pane`,props:e})}function S(e){return(0,s.jsx)(_,{id:`session-insight-chip`,props:e})}export{b as a,S as i,y as n,d as o,x as r,v as t};
3
+ //# sourceMappingURL=slots-BhP8b8tf.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";wKA2Ia,EAAQ,CACnB,aAAc,CAAE,KAAM,oBAAqB,WAAY,YAAa,MAAO,KAAM,KAAM,SAAU,MAAO,YAAa,EACrH,YAAa,CAAE,KAAM,mBAAoB,WAAY,WAAY,MAAO,KAAM,KAAM,OAAQ,MAAO,QAAS,EAC5G,gBAAiB,CAAE,KAAM,iCAAkC,WAAY,eAAgB,MAAO,KAAM,KAAM,OAAQ,MAAO,UAAW,EACpI,eAAgB,CAAE,KAAM,+BAAgC,WAAY,cAAe,MAAO,KAAM,KAAM,OAAQ,MAAO,SAAU,EAC/H,uBAAwB,CAAE,KAAM,8BAA+B,WAAY,qBAAsB,MAAO,KAAM,KAAM,SAAU,MAAO,SAAU,CACjJ,EAEwB,OAAO,KAAK,CAAK,EAazC,IAAa,EAAyC,g2BAMrD,GAED,SAAS,EAAY,EAAY,EAAyD,CACxF,OAAO,EAAQ,MAAM,EAAM,EAAG,CAAC,OACjC,CAGA,SAAgB,EAAg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,EAAS,OAAO,CAAI,GAM9C,CACD,GAAM,CAAC,EAAS,MAAc,YAAS,CAAC,EAClC,EAAW,EAAQ,CAAE,EAC3B,GAAI,CAAC,EAAU,OAAO,KACtB,GAAM,CAAE,OAAM,SAAU,EAAM,GAK9B,OAEE,SAAC,EAAD,CAAkC,OAAa,QAAO,YANpC,CAClB,EAAO,CAAE,EACT,EAAY,GAAM,EAAI,CAAC,CACzB,EAII,mBAAC,WAAD,CAAU,SAAU,KAClB,mBAAC,EAAD,CAAU,GAAK,CAA+C,EACtD,EACE,EAJK,CAIL,CAElB,CAYA,SAAgB,EAAc,EAAuB,CACnD,OAAO,SAAC,EAAD,CAAU,GAAG,aAAoB,OAAQ,EAClD,CAEA,SAAgB,EAAa,EAAsB,CACjD,OAAO,SAAC,EAAD,CAAU,GAAG,YAAmB,OAAQ,EACjD,CAEA,SAAgB,EAAiB,EAA0B,CACzD,OAAO,SAAC,EAAD,CAAU,GAAG,gBAAuB,OAAQ,EACrD,CAEA,SAAgB,EAAgB,EAAyB,CACvD,OAAO,SAAC,EAAD,CAAU,GAAG,eAAsB,OAAQ,EACpD,CAEA,SAAgB,EAAuB,EAAgC,CACrE,OAAO,SAAC,EAAD,CAAU,GAAG,uBAA8B,OAAQ,EAC5D","names":[],"ignoreList":[],"sources":["../../../../../../src/web-ui/routes/verse/shell/slots.tsx"],"sourcesContent":["/**\n * routes/verse/shell/slots.tsx — where Chat mounts other units' UI (unit C0;\n * SPEC-310C §7 \"Slots\").\n *\n * C2 owns the chat, the dock and the header; C4, C5 and C7 own things that\n * render INSIDE them. Rather than C2 importing their files — which would not\n * compile until every one of them landed, and would drag each into C2's\n * chunk — C2 renders these slots. Each resolves ONE fixed file lazily and:\n * - renders nothing until that file lands (and `isSlotAvailable` says so,\n * so C2 can hide the toggle for a pane that does not exist yet);\n * - loads in its own chunk (xterm and the diff viewer stay off the chat's\n * critical path — SPEC-310C budgets: chat critical JS ≤ 350 KB);\n * - is fenced by an error boundary: a crashed inline slot vanishes, a\n * crashed pane says so with a retry — neither takes the chat down.\n *\n * The props below ARE the contract: each owning unit's component takes\n * exactly its slot's props, as a NAMED export (`export function BranchBar`).\n *\n * Resolution uses `import.meta.glob` with literal paths — the same \"absent\n * file is an absent key\" mechanism VerseApp uses for sections.\n */\nimport { Component, Suspense, lazy, useState, type ComponentType, type ErrorInfo, type ReactNode } from 'react';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { EmptyState } from '../../../components/primitives/EmptyState.js';\nimport type { VerseReviewScope, VerseTerminalLaunchVia } from '../../../../core/verse/workbench-types.js';\n\n// ===========================================================================\n// Contracts\n// ===========================================================================\n\n/** Open the Review pane on a root, at a scope (and optionally one file). */\nexport interface DiffPaneRequest {\n root: string;\n scope: VerseReviewScope;\n file?: string;\n}\n\n/** A file the chat's latest turn touched — the Review pane's \"This turn\" scope (C2 derives it from events). */\nexport interface TurnFileChange {\n root: string;\n /** Relative to `root`. */\n path: string;\n}\n\n/** Open the Terminal pane: a tab at `root`, optionally pasting (never running) a command. */\nexport interface TerminalOpenRequest {\n /** Changes on every request, so the same request twice is two opens. */\n nonce: number;\n root?: string;\n /** Force a new tab instead of focusing the root's existing one (⌃⇧`). */\n newTab?: boolean;\n /** \"Run in terminal\": pasted at the prompt, NEVER executed — the operator presses Enter. */\n paste?: string;\n /** Apps [Launch ▸]: the catalog app to launch in the new tab. */\n appId?: string;\n /**\n * With `appId`: HOW to launch it — the app's own CLI (`native`) or through\n * Ollama (`ollama`, with `model` naming the local tag). These mirror\n * VerseTerminalCreateRequest; the page only names the choice, the server\n * resolves the argv from the catalog and the installed binaries\n * (`resolveAppLaunch`) and refuses via/model without an appId.\n */\n via?: VerseTerminalLaunchVia;\n /** With `via: 'ollama'`: the local model tag to launch the app on. */\n model?: string;\n /** Preview's dev-server Start: the server to run in the new tab. */\n devServerId?: string;\n}\n\n/** Open the Preview pane on a loopback URL, a chat artifact, or a dev server. */\nexport interface PreviewOpenRequest {\n nonce: number;\n url?: string;\n artifactPath?: string;\n devServerId?: string;\n}\n\n/** C5 `git/BranchBar.tsx` → `export function BranchBar(props: BranchBarProps)` — above the composer. */\nexport interface BranchBarProps {\n sessionId: string;\n /** The chat's roots in priority order; the bar shows one row per root with changes, then \"Show N more\". */\n roots: readonly string[];\n /** The ± counts open the branch diff: C2 opens the dock's Review pane with this. */\n onOpenDiff: (request: DiffPaneRequest) => void;\n}\n\n/** C5 `git/DiffPane.tsx` → `export function DiffPane(props: DiffPaneProps)` — the dock's Review pane. */\nexport interface DiffPaneProps {\n sessionId: string;\n roots: readonly string[];\n /** Latest open request; null = the pane chooses (Uncommitted, first root with changes). */\n request: (DiffPaneRequest & { nonce: number }) | null;\n turnFiles: readonly TurnFileChange[];\n /** \"Add to message\": drafts `path:line: note` into the composer (⌘Enter sends). */\n onAddToMessage: (text: string) => void;\n /** False while the pane is a background tab — stop timers, skip work. */\n visible: boolean;\n}\n\n/** C4 `dock/terminal/TerminalPane.tsx` → `export function TerminalPane(props: TerminalPaneProps)`. */\nexport interface TerminalPaneProps {\n sessionId: string;\n roots: readonly string[];\n request: TerminalOpenRequest | null;\n /** \"Send selection to chat\": the text, already fenced as a code block. */\n onSendToChat: (text: string) => void;\n visible: boolean;\n}\n\n/** C4 `dock/preview/PreviewPane.tsx` → `export function PreviewPane(props: PreviewPaneProps)`. */\nexport interface PreviewPaneProps {\n sessionId: string;\n roots: readonly string[];\n request: PreviewOpenRequest | null;\n /** Dev-server Start runs the server in a terminal tab — through the dock, never directly. */\n onOpenTerminal: (request: Omit<TerminalOpenRequest, 'nonce'>) => void;\n visible: boolean;\n}\n\n/** C7 `mind/SessionInsightChip.tsx` → `export function SessionInsightChip(props)` — the chat header chip. */\nexport interface SessionInsightChipProps {\n sessionId: string;\n}\n\nexport interface SlotPropsMap {\n 'branch-bar': BranchBarProps;\n 'diff-pane': DiffPaneProps;\n 'terminal-pane': TerminalPaneProps;\n 'preview-pane': PreviewPaneProps;\n 'session-insight-chip': SessionInsightChipProps;\n}\n\nexport type SlotId = keyof SlotPropsMap;\n\n/**\n * Each slot's fixed file (relative to routes/verse), its named export, its\n * owner, and how a crash is shown: an INLINE slot vanishes; a PANE fills the\n * dock, so it says it failed and offers a retry.\n */\nexport const SLOTS = {\n 'branch-bar': { path: 'git/BranchBar.tsx', exportName: 'BranchBar', owner: 'C5', kind: 'inline', label: 'Branch bar' },\n 'diff-pane': { path: 'git/DiffPane.tsx', exportName: 'DiffPane', owner: 'C5', kind: 'pane', label: 'Review' },\n 'terminal-pane': { path: 'dock/terminal/TerminalPane.tsx', exportName: 'TerminalPane', owner: 'C4', kind: 'pane', label: 'Terminal' },\n 'preview-pane': { path: 'dock/preview/PreviewPane.tsx', exportName: 'PreviewPane', owner: 'C4', kind: 'pane', label: 'Preview' },\n 'session-insight-chip': { path: 'mind/SessionInsightChip.tsx', exportName: 'SessionInsightChip', owner: 'C7', kind: 'inline', label: 'Insight' },\n} as const satisfies Record<SlotId, { path: string; exportName: string; owner: string; kind: 'inline' | 'pane'; label: string }>;\n\nexport const SLOT_IDS = Object.keys(SLOTS) as SlotId[];\n\n// ===========================================================================\n// Resolution\n// ===========================================================================\n\ntype Importer = () => Promise<unknown>;\n\n/**\n * Every slot file that exists at build time, keyed `../<path>`. Literal\n * patterns (no wildcards): a slot may only ever load its owner's one file.\n * EXPORTED for the slot test, which checks it against SLOTS.\n */\nexport const SLOT_MODULES: Record<string, Importer> = import.meta.glob([\n '../git/BranchBar.tsx',\n '../git/DiffPane.tsx',\n '../dock/terminal/TerminalPane.tsx',\n '../dock/preview/PreviewPane.tsx',\n '../mind/SessionInsightChip.tsx',\n]);\n\nfunction importerFor(id: SlotId, modules: Record<string, Importer>): Importer | undefined {\n return modules[`../${SLOTS[id].path}`];\n}\n\n/** True once the slot's file has landed in this build. */\nexport function isSlotAvailable(id: SlotId, modules: Record<string, Importer> = SLOT_MODULES): boolean {\n return importerFor(id, modules) !== undefined;\n}\n\ntype AnyComponent = ComponentType<Record<string, unknown>>;\n\n/**\n * Build the lazy component for one slot. Absent → renders nothing. Present\n * but exporting no component of the contract name → throws on load, so the\n * boundary shows it (a slot that silently renders nothing because of a typo\n * would look exactly like \"not landed yet\").\n */\nexport function createSlotComponent(id: SlotId, modules: Record<string, Importer> = SLOT_MODULES): AnyComponent | null {\n const importer = importerFor(id, modules);\n if (!importer) return null;\n const { exportName } = SLOTS[id];\n return lazy(async () => {\n const mod = (await importer()) as Record<string, unknown>;\n const exported = mod[exportName];\n if (typeof exported !== 'function' && (typeof exported !== 'object' || exported === null)) {\n throw new Error(`${SLOTS[id].path} exports no ${exportName}`);\n }\n return { default: exported as AnyComponent };\n });\n}\n\n// One lazy component per slot for the life of the page: re-creating it per\n// render would remount the pane (and drop a terminal's scrollback) each time.\nconst RESOLVED = new Map<SlotId, AnyComponent | null>();\nfunction slotComponent(id: SlotId): AnyComponent | null {\n if (!RESOLVED.has(id)) RESOLVED.set(id, createSlotComponent(id));\n return RESOLVED.get(id)!;\n}\n\n// ===========================================================================\n// Rendering\n// ===========================================================================\n\ninterface BoundaryProps {\n kind: 'inline' | 'pane';\n label: string;\n /** Drop the cached module and mount a fresh boundary (a failed lazy import stays failed otherwise). */\n onRetry: () => void;\n children: ReactNode;\n}\n\nclass SlotBoundary extends Component<BoundaryProps, { failed: boolean }> {\n override state = { failed: false };\n\n static getDerivedStateFromError(): { failed: boolean } {\n return { failed: true };\n }\n\n override componentDidCatch(error: Error, info: ErrorInfo): void {\n // The console, not the page: operator copy never carries a stack or a path.\n console.error(`[verse] ${this.props.label} failed`, error, info.componentStack);\n }\n\n override render(): ReactNode {\n if (!this.state.failed) return this.props.children;\n if (this.props.kind === 'inline') return null;\n return <PaneFailed label={this.props.label} onRetry={this.props.onRetry} />;\n }\n}\n\nfunction PaneFailed({ label, onRetry }: { label: string; onRetry: () => void }) {\n return (\n <EmptyState\n compact\n tone=\"error\"\n title={`${label} could not load`}\n body=\"The rest of the chat still works.\"\n action={\n <Button variant=\"subtle\" size=\"sm\" onClick={onRetry}>\n Try again\n </Button>\n }\n />\n );\n}\n\nfunction SlotHost<K extends SlotId>({\n id,\n props,\n resolve = slotComponent,\n forget = (slot: SlotId) => RESOLVED.delete(slot),\n}: {\n id: K;\n props: SlotPropsMap[K];\n resolve?: (id: SlotId) => AnyComponent | null;\n forget?: (id: SlotId) => void;\n}) {\n const [attempt, setAttempt] = useState(0);\n const Resolved = resolve(id);\n if (!Resolved) return null;\n const { kind, label } = SLOTS[id];\n const retry = () => {\n forget(id);\n setAttempt((n) => n + 1);\n };\n return (\n // A new key per attempt: a fresh boundary AND a fresh lazy component.\n <SlotBoundary key={attempt} kind={kind} label={label} onRetry={retry}>\n <Suspense fallback={null}>\n <Resolved {...(props as unknown as Record<string, unknown>)} />\n </Suspense>\n </SlotBoundary>\n );\n}\n\n/** Test seam: render a slot against an injected module map (fake landed / absent / broken files). */\nexport function SlotForTest<K extends SlotId>({ id, props, modules }: { id: K; props: SlotPropsMap[K]; modules: Record<string, Importer> }) {\n const [cache] = useState(() => new Map<SlotId, AnyComponent | null>());\n const resolve = (slot: SlotId) => {\n if (!cache.has(slot)) cache.set(slot, createSlotComponent(slot, modules));\n return cache.get(slot)!;\n };\n return <SlotHost id={id} props={props} resolve={resolve} forget={(slot) => cache.delete(slot)} />;\n}\n\nexport function BranchBarSlot(props: BranchBarProps) {\n return <SlotHost id=\"branch-bar\" props={props} />;\n}\n\nexport function DiffPaneSlot(props: DiffPaneProps) {\n return <SlotHost id=\"diff-pane\" props={props} />;\n}\n\nexport function TerminalPaneSlot(props: TerminalPaneProps) {\n return <SlotHost id=\"terminal-pane\" props={props} />;\n}\n\nexport function PreviewPaneSlot(props: PreviewPaneProps) {\n return <SlotHost id=\"preview-pane\" props={props} />;\n}\n\nexport function SessionInsightChipSlot(props: SessionInsightChipProps) {\n return <SlotHost id=\"session-insight-chip\" props={props} />;\n}\n"],"file":"slots-Ds9ZIqUL.js"}
1
+ {"version":3,"mappings":";wKA2Ia,EAAQ,CACnB,aAAc,CAAE,KAAM,oBA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,OAAQ,EACpD,CAEA,SAAgB,EAAuB,EAAgC,CACrE,OAAO,SAAC,EAAD,CAAU,GAAG,uBAA8B,OAAQ,EAC5D","names":[],"ignoreList":[],"sources":["../../../../../../src/web-ui/routes/verse/shell/slots.tsx"],"sourcesContent":["/**\n * routes/verse/shell/slots.tsx — where Chat mounts other units' UI (unit C0;\n * SPEC-310C §7 \"Slots\").\n *\n * C2 owns the chat, the dock and the header; C4, C5 and C7 own things that\n * render INSIDE them. Rather than C2 importing their files — which would not\n * compile until every one of them landed, and would drag each into C2's\n * chunk — C2 renders these slots. Each resolves ONE fixed file lazily and:\n * - renders nothing until that file lands (and `isSlotAvailable` says so,\n * so C2 can hide the toggle for a pane that does not exist yet);\n * - loads in its own chunk (xterm and the diff viewer stay off the chat's\n * critical path — SPEC-310C budgets: chat critical JS ≤ 350 KB);\n * - is fenced by an error boundary: a crashed inline slot vanishes, a\n * crashed pane says so with a retry — neither takes the chat down.\n *\n * The props below ARE the contract: each owning unit's component takes\n * exactly its slot's props, as a NAMED export (`export function BranchBar`).\n *\n * Resolution uses `import.meta.glob` with literal paths — the same \"absent\n * file is an absent key\" mechanism VerseApp uses for sections.\n */\nimport { Component, Suspense, lazy, useState, type ComponentType, type ErrorInfo, type ReactNode } from 'react';\nimport { Button } from '../../../components/primitives/Button.js';\nimport { EmptyState } from '../../../components/primitives/EmptyState.js';\nimport type { VerseReviewScope, VerseTerminalLaunchVia } from '../../../../core/verse/workbench-types.js';\n\n// ===========================================================================\n// Contracts\n// ===========================================================================\n\n/** Open the Review pane on a root, at a scope (and optionally one file). */\nexport interface DiffPaneRequest {\n root: string;\n scope: VerseReviewScope;\n file?: string;\n}\n\n/** A file the chat's latest turn touched — the Review pane's \"This turn\" scope (C2 derives it from events). */\nexport interface TurnFileChange {\n root: string;\n /** Relative to `root`. */\n path: string;\n}\n\n/** Open the Terminal pane: a tab at `root`, optionally pasting (never running) a command. */\nexport interface TerminalOpenRequest {\n /** Changes on every request, so the same request twice is two opens. */\n nonce: number;\n root?: string;\n /** Force a new tab instead of focusing the root's existing one (⌃⇧`). */\n newTab?: boolean;\n /** \"Run in terminal\": pasted at the prompt, NEVER executed — the operator presses Enter. */\n paste?: string;\n /** Apps [Launch ▸]: the catalog app to launch in the new tab. */\n appId?: string;\n /**\n * With `appId`: HOW to launch it — the app's own CLI (`native`) or through\n * Ollama (`ollama`, with `model` naming the local tag). These mirror\n * VerseTerminalCreateRequest; the page only names the choice, the server\n * resolves the argv from the catalog and the installed binaries\n * (`resolveAppLaunch`) and refuses via/model without an appId.\n */\n via?: VerseTerminalLaunchVia;\n /** With `via: 'ollama'`: the local model tag to launch the app on. */\n model?: string;\n /** Preview's dev-server Start: the server to run in the new tab. */\n devServerId?: string;\n}\n\n/** Open the Preview pane on a loopback URL, a chat artifact, or a dev server. */\nexport interface PreviewOpenRequest {\n nonce: number;\n url?: string;\n artifactPath?: string;\n devServerId?: string;\n}\n\n/** C5 `git/BranchBar.tsx` → `export function BranchBar(props: BranchBarProps)` — above the composer. */\nexport interface BranchBarProps {\n sessionId: string;\n /** The chat's roots in priority order; the bar shows one row per root with changes, then \"Show N more\". */\n roots: readonly string[];\n /** The ± counts open the branch diff: C2 opens the dock's Review pane with this. */\n onOpenDiff: (request: DiffPaneRequest) => void;\n}\n\n/** C5 `git/DiffPane.tsx` → `export function DiffPane(props: DiffPaneProps)` — the dock's Review pane. */\nexport interface DiffPaneProps {\n sessionId: string;\n roots: readonly string[];\n /** Latest open request; null = the pane chooses (Uncommitted, first root with changes). */\n request: (DiffPaneRequest & { nonce: number }) | null;\n turnFiles: readonly TurnFileChange[];\n /** \"Add to message\": drafts `path:line: note` into the composer (⌘Enter sends). */\n onAddToMessage: (text: string) => void;\n /** False while the pane is a background tab — stop timers, skip work. */\n visible: boolean;\n}\n\n/** C4 `dock/terminal/TerminalPane.tsx` → `export function TerminalPane(props: TerminalPaneProps)`. */\nexport interface TerminalPaneProps {\n sessionId: string;\n roots: readonly string[];\n request: TerminalOpenRequest | null;\n /** \"Send selection to chat\": the text, already fenced as a code block. */\n onSendToChat: (text: string) => void;\n visible: boolean;\n}\n\n/** C4 `dock/preview/PreviewPane.tsx` → `export function PreviewPane(props: PreviewPaneProps)`. */\nexport interface PreviewPaneProps {\n sessionId: string;\n roots: readonly string[];\n request: PreviewOpenRequest | null;\n /** Dev-server Start runs the server in a terminal tab — through the dock, never directly. */\n onOpenTerminal: (request: Omit<TerminalOpenRequest, 'nonce'>) => void;\n visible: boolean;\n}\n\n/** C7 `mind/SessionInsightChip.tsx` → `export function SessionInsightChip(props)` — the chat header chip. */\nexport interface SessionInsightChipProps {\n sessionId: string;\n}\n\nexport interface SlotPropsMap {\n 'branch-bar': BranchBarProps;\n 'diff-pane': DiffPaneProps;\n 'terminal-pane': TerminalPaneProps;\n 'preview-pane': PreviewPaneProps;\n 'session-insight-chip': SessionInsightChipProps;\n}\n\nexport type SlotId = keyof SlotPropsMap;\n\n/**\n * Each slot's fixed file (relative to routes/verse), its named export, its\n * owner, and how a crash is shown: an INLINE slot vanishes; a PANE fills the\n * dock, so it says it failed and offers a retry.\n */\nexport const SLOTS = {\n 'branch-bar': { path: 'git/BranchBar.tsx', exportName: 'BranchBar', owner: 'C5', kind: 'inline', label: 'Branch bar' },\n 'diff-pane': { path: 'git/DiffPane.tsx', exportName: 'DiffPane', owner: 'C5', kind: 'pane', label: 'Review' },\n 'terminal-pane': { path: 'dock/terminal/TerminalPane.tsx', exportName: 'TerminalPane', owner: 'C4', kind: 'pane', label: 'Terminal' },\n 'preview-pane': { path: 'dock/preview/PreviewPane.tsx', exportName: 'PreviewPane', owner: 'C4', kind: 'pane', label: 'Preview' },\n 'session-insight-chip': { path: 'mind/SessionInsightChip.tsx', exportName: 'SessionInsightChip', owner: 'C7', kind: 'inline', label: 'Insight' },\n} as const satisfies Record<SlotId, { path: string; exportName: string; owner: string; kind: 'inline' | 'pane'; label: string }>;\n\nexport const SLOT_IDS = Object.keys(SLOTS) as SlotId[];\n\n// ===========================================================================\n// Resolution\n// ===========================================================================\n\ntype Importer = () => Promise<unknown>;\n\n/**\n * Every slot file that exists at build time, keyed `../<path>`. Literal\n * patterns (no wildcards): a slot may only ever load its owner's one file.\n * EXPORTED for the slot test, which checks it against SLOTS.\n */\nexport const SLOT_MODULES: Record<string, Importer> = import.meta.glob([\n '../git/BranchBar.tsx',\n '../git/DiffPane.tsx',\n '../dock/terminal/TerminalPane.tsx',\n '../dock/preview/PreviewPane.tsx',\n '../mind/SessionInsightChip.tsx',\n]);\n\nfunction importerFor(id: SlotId, modules: Record<string, Importer>): Importer | undefined {\n return modules[`../${SLOTS[id].path}`];\n}\n\n/** True once the slot's file has landed in this build. */\nexport function isSlotAvailable(id: SlotId, modules: Record<string, Importer> = SLOT_MODULES): boolean {\n return importerFor(id, modules) !== undefined;\n}\n\ntype AnyComponent = ComponentType<Record<string, unknown>>;\n\n/**\n * Build the lazy component for one slot. Absent → renders nothing. Present\n * but exporting no component of the contract name → throws on load, so the\n * boundary shows it (a slot that silently renders nothing because of a typo\n * would look exactly like \"not landed yet\").\n */\nexport function createSlotComponent(id: SlotId, modules: Record<string, Importer> = SLOT_MODULES): AnyComponent | null {\n const importer = importerFor(id, modules);\n if (!importer) return null;\n const { exportName } = SLOTS[id];\n return lazy(async () => {\n const mod = (await importer()) as Record<string, unknown>;\n const exported = mod[exportName];\n if (typeof exported !== 'function' && (typeof exported !== 'object' || exported === null)) {\n throw new Error(`${SLOTS[id].path} exports no ${exportName}`);\n }\n return { default: exported as AnyComponent };\n });\n}\n\n// One lazy component per slot for the life of the page: re-creating it per\n// render would remount the pane (and drop a terminal's scrollback) each time.\nconst RESOLVED = new Map<SlotId, AnyComponent | null>();\nfunction slotComponent(id: SlotId): AnyComponent | null {\n if (!RESOLVED.has(id)) RESOLVED.set(id, createSlotComponent(id));\n return RESOLVED.get(id)!;\n}\n\n// ===========================================================================\n// Rendering\n// ===========================================================================\n\ninterface BoundaryProps {\n kind: 'inline' | 'pane';\n label: string;\n /** Drop the cached module and mount a fresh boundary (a failed lazy import stays failed otherwise). */\n onRetry: () => void;\n children: ReactNode;\n}\n\nclass SlotBoundary extends Component<BoundaryProps, { failed: boolean }> {\n override state = { failed: false };\n\n static getDerivedStateFromError(): { failed: boolean } {\n return { failed: true };\n }\n\n override componentDidCatch(error: Error, info: ErrorInfo): void {\n // The console, not the page: operator copy never carries a stack or a path.\n console.error(`[verse] ${this.props.label} failed`, error, info.componentStack);\n }\n\n override render(): ReactNode {\n if (!this.state.failed) return this.props.children;\n if (this.props.kind === 'inline') return null;\n return <PaneFailed label={this.props.label} onRetry={this.props.onRetry} />;\n }\n}\n\nfunction PaneFailed({ label, onRetry }: { label: string; onRetry: () => void }) {\n return (\n <EmptyState\n compact\n tone=\"error\"\n title={`${label} could not load`}\n body=\"The rest of the chat still works.\"\n action={\n <Button variant=\"subtle\" size=\"sm\" onClick={onRetry}>\n Try again\n </Button>\n }\n />\n );\n}\n\nfunction SlotHost<K extends SlotId>({\n id,\n props,\n resolve = slotComponent,\n forget = (slot: SlotId) => RESOLVED.delete(slot),\n}: {\n id: K;\n props: SlotPropsMap[K];\n resolve?: (id: SlotId) => AnyComponent | null;\n forget?: (id: SlotId) => void;\n}) {\n const [attempt, setAttempt] = useState(0);\n const Resolved = resolve(id);\n if (!Resolved) return null;\n const { kind, label } = SLOTS[id];\n const retry = () => {\n forget(id);\n setAttempt((n) => n + 1);\n };\n return (\n // A new key per attempt: a fresh boundary AND a fresh lazy component.\n <SlotBoundary key={attempt} kind={kind} label={label} onRetry={retry}>\n <Suspense fallback={null}>\n <Resolved {...(props as unknown as Record<string, unknown>)} />\n </Suspense>\n </SlotBoundary>\n );\n}\n\n/** Test seam: render a slot against an injected module map (fake landed / absent / broken files). */\nexport function SlotForTest<K extends SlotId>({ id, props, modules }: { id: K; props: SlotPropsMap[K]; modules: Record<string, Importer> }) {\n const [cache] = useState(() => new Map<SlotId, AnyComponent | null>());\n const resolve = (slot: SlotId) => {\n if (!cache.has(slot)) cache.set(slot, createSlotComponent(slot, modules));\n return cache.get(slot)!;\n };\n return <SlotHost id={id} props={props} resolve={resolve} forget={(slot) => cache.delete(slot)} />;\n}\n\nexport function BranchBarSlot(props: BranchBarProps) {\n return <SlotHost id=\"branch-bar\" props={props} />;\n}\n\nexport function DiffPaneSlot(props: DiffPaneProps) {\n return <SlotHost id=\"diff-pane\" props={props} />;\n}\n\nexport function TerminalPaneSlot(props: TerminalPaneProps) {\n return <SlotHost id=\"terminal-pane\" props={props} />;\n}\n\nexport function PreviewPaneSlot(props: PreviewPaneProps) {\n return <SlotHost id=\"preview-pane\" props={props} />;\n}\n\nexport function SessionInsightChipSlot(props: SessionInsightChipProps) {\n return <SlotHost id=\"session-insight-chip\" props={props} />;\n}\n"],"file":"slots-BhP8b8tf.js"}
@@ -0,0 +1,2 @@
1
+ import{D as e,F as t,U as n,c as r,l as i,o as a}from"./global-oEl9Qj8u.js";import{F as o}from"./VerseConsoleApp-DTjDpGCd.js";import{n as s}from"./control-queries-CmgBgKV7.js";var c=`/api/verse/authority`,l=`/api/verse/authority/draft`,u=`/api/verse/fleet/live`,d=`/api/verse/leader`,f=`/api/verse/learning`,p=`/api/verse/fleet/history?days=90`,m=`/api/reasoning/digest?days=30`,h=`/api/verse/budget/history?days=8`,g=Object.freeze({authority:`verse-authority`,authorityDraft:`verse-authority-draft`,fleetLive:`verse-fleet-live`,leader:`verse-leader`,learning:`verse-learning`,fleetHistory:`verse-fleet-history-90d`,reasoningDigest:`verse-reasoning-digest-30d`,seatHistory:`verse-seat-history-8d`});function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var v={authority(e){return _(e)&&e.v===1&&typeof e.switch==`string`&&_(e.grant)?e:null},draft(e){return _(e)&&_(e.payload)&&typeof e.digest==`string`?e:null},fleetLive(e){return _(e)&&e.v===1&&Array.isArray(e.runs)&&Array.isArray(e.repos)&&Array.isArray(e.lanes)&&_(e.summary)?e:null},leader(e){return _(e)&&e.v===1&&Array.isArray(e.timeline)&&Array.isArray(e.actions)&&_(e.hitRate)?e:null},learning(e){return _(e)&&e.v===1&&Array.isArray(e.versions)&&Array.isArray(e.experiments)?e:null},activity(e){return _(e)&&Array.isArray(e.needsYou)&&Array.isArray(e.running)&&_(e.sources)?e:null},fleetHistory(e){return _(e)&&Array.isArray(e.days)&&_(e.sources)&&_(e.funnel)?e:null},reasoningDigest(e){return _(e)&&Array.isArray(e.insights)&&Array.isArray(e.trends)&&_(e.totals)?e:null},seatHistory(e){return _(e)&&e.v===1&&Array.isArray(e.series)?e:null}};function y(e,t){return t instanceof a?t.status===404?`${e} is not in this build yet, so this card has no source.`:t.status===503?`${e} failed to load on the server.`:`${e} answered HTTP ${t.status}.`:`${e} could not be reached.`}function b(e,t,n,i){return{key:e,fetch:async e=>{try{let a=i(await r(t,e));return a===null?{value:null,available:!0,reason:`${n} answered in a shape this version does not recognise, so nothing is shown rather than guessed.`}:{value:a,available:!0,reason:null}}catch(e){if(e instanceof a&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return{value:null,available:!1,reason:y(n,e)}}}}}var x=b(g.authority,c,`The authority service`,v.authority),S=b(g.authorityDraft,l,`The grant draft`,v.draft),C=b(g.fleetLive,u,`The live fleet view`,v.fleetLive),w=b(g.leader,d,`The Leader`,v.leader),T=b(g.learning,f,`Self-improvement`,v.learning),E=b(g.fleetHistory,p,`Fleet history`,v.fleetHistory),D=b(g.reasoningDigest,m,`The reasoning digest`,v.reasoningDigest),O=b(g.seatHistory,h,`Seat history`,v.seatHistory);async function k(n,r){let a=e();if(!a)throw new s;let o=await i(n,r,a);return t(),o}async function A(e){let t=await k(c,e);return n(g.authority),n(g.fleetLive),o(),(e.action===`grant`||e.action===`re-approve`)&&n(g.authorityDraft),v.authority(t)}async function j(e){let t=await k(u,e);return n(g.fleetLive),o(),t}async function M(e){let t=await k(d,e);return n(g.leader),o(),t}async function N(e,t){if(!/^\/api\/[^\s\\]*$/.test(e)||e.startsWith(`//`)||e.includes(`..`))throw Error(`That action points outside this app, so it was not sent.`);let r=await k(e,t);return o(),n(g.fleetLive),n(g.leader),n(g.authority),r}export{w as a,j as c,D as d,O as f,C as i,M as l,x as n,T as o,E as r,A as s,S as t,N as u};
2
+ //# sourceMappingURL=surface-data-DTI7LjvH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"surface-data-J52iIGMD.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/command/surface-data.ts"],"sourcesContent":["/**\n * routes/verse/command/surface-data.ts — every read and write behind the\n * four 3.10 surfaces (Command, Fleet, Growth, Mind), in one place (unit C7).\n *\n * GET /api/verse/authority AuthorityStatusV1 (B-U1)\n * GET /api/verse/authority/draft AuthorityGrantDraft (B-U1)\n * POST /api/verse/authority AuthorityActionRequest\n * GET /api/verse/fleet/live FleetLiveSnapshotV1 (B-U5)\n * POST /api/verse/fleet/live FleetLiveActionRequest\n * GET /api/verse/leader LeaderStateV1 (B-U8)\n * POST /api/verse/leader LeaderActionRequest\n * GET /api/verse/learning LearningStateV1 (B-U9)\n * GET /api/verse/activity VerseActivityResponse (C1 — read through\n * the shell's ONE useActivity poll, never a\n * second loop from here)\n * GET /api/verse/fleet/history FleetHistoryResponse (A8)\n * GET /api/reasoning/digest ReasoningDigest (A7)\n * GET /api/verse/budget BudgetView (A9 — budget-queries.ts)\n * GET /api/verse/budget/history CapacityHistoryResponse (3.10.1 — recorded\n * seat window history for the burn-downs)\n * GET /api/models per-model ROI (data/queries.ts)\n *\n * WHY every read is OPTIONAL: Track B's modules land in parallel with these\n * surfaces (SPEC-310BC-COORD), and C0's mount answers 404 for a family that\n * has not landed. A 404 is \"this card has no source yet\", never \"Command is\n * broken\" — so a read resolves to `{ value: null, available: false, reason }`\n * and the card renders a designed not-available state from `reason`. A body\n * this client cannot narrow is treated the same way (available, but nothing\n * shown rather than guessed). 401 and aborts still propagate: an expired\n * read session is the whole app's state, not one card's.\n *\n * Writes pull the held mutation token (VerseControlLockedError without one —\n * the surfaces route every write through useGuardedAction, which opens the\n * token dialog first) and invalidate exactly the keys they change.\n */\nimport { ApiError, apiGet, apiPost } from '../../../data/client.js';\nimport { getMutationToken, touchMutationHold } from '../../../data/auth-store.js';\nimport { invalidate } from '../../../data/cache.js';\nimport type { QueryDef } from '../../../data/queries.js';\nimport { VerseControlLockedError } from '../autonomy/control-queries.js';\nimport { refreshActivity } from '../shell/useActivity.js';\nimport type { OptionalFleetRead } from '../autonomy/fleet-contract.js';\nimport type {\n AuthorityActionRequest,\n AuthorityGrantDraft,\n AuthorityStatusV1,\n} from '../../../../core/authority/types.js';\nimport type { FleetLiveActionRequest, FleetLiveSnapshotV1 } from '../../../../core/fleet/fleet-types.js';\nimport type { LeaderActionRequest, LeaderStateV1 } from '../../../../core/vision/leader-types.js';\nimport type { LearningStateV1 } from '../../../../core/learn/harness-types.js';\nimport type { VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport type { FleetHistoryResponse } from '../../../../core/verse/fleet-history-types.js';\nimport type { ReasoningDigest } from '../../../../core/reasoning/types.js';\nimport type { CapacityHistoryResponse } from '../../../../core/routing/capacity-history-types.js';\n\n/** A read that is allowed to be absent (the autonomy folder's shape, reused). */\nexport type OptionalRead<T> = OptionalFleetRead<T>;\n\nexport const AUTHORITY_PATH = '/api/verse/authority';\nexport const AUTHORITY_DRAFT_PATH = '/api/verse/authority/draft';\nexport const FLEET_LIVE_PATH = '/api/verse/fleet/live';\nexport const LEADER_PATH = '/api/verse/leader';\nexport const LEARNING_PATH = '/api/verse/learning';\nexport const FLEET_HISTORY_PATH = '/api/verse/fleet/history?days=90';\nexport const REASONING_DIGEST_PATH = '/api/reasoning/digest?days=30';\n/** Eight days: the whole weekly window plus the day before it opened. */\nexport const SEAT_HISTORY_PATH = '/api/verse/budget/history?days=8';\n\nexport const SURFACE_KEYS = Object.freeze({\n authority: 'verse-authority',\n authorityDraft: 'verse-authority-draft',\n fleetLive: 'verse-fleet-live',\n leader: 'verse-leader',\n learning: 'verse-learning',\n fleetHistory: 'verse-fleet-history-90d',\n reasoningDigest: 'verse-reasoning-digest-30d',\n seatHistory: 'verse-seat-history-8d',\n});\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\n/**\n * Structural guards: just enough to know the body is the contract's shape\n * (version tag + the arrays the cards iterate), so a mismatched server can\n * never crash a render with `undefined.map`. Field-level honesty (null =\n * unknown) is the cards' job.\n */\nexport const narrow = {\n authority(raw: unknown): AuthorityStatusV1 | null {\n return isRecord(raw) && raw['v'] === 1 && typeof raw['switch'] === 'string' && isRecord(raw['grant']) ? (raw as unknown as AuthorityStatusV1) : null;\n },\n draft(raw: unknown): AuthorityGrantDraft | null {\n return isRecord(raw) && isRecord(raw['payload']) && typeof raw['digest'] === 'string' ? (raw as unknown as AuthorityGrantDraft) : null;\n },\n fleetLive(raw: unknown): FleetLiveSnapshotV1 | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['runs']) && Array.isArray(raw['repos']) && Array.isArray(raw['lanes']) && isRecord(raw['summary'])\n ? (raw as unknown as FleetLiveSnapshotV1)\n : null;\n },\n leader(raw: unknown): LeaderStateV1 | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['timeline']) && Array.isArray(raw['actions']) && isRecord(raw['hitRate'])\n ? (raw as unknown as LeaderStateV1)\n : null;\n },\n learning(raw: unknown): LearningStateV1 | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['versions']) && Array.isArray(raw['experiments']) ? (raw as unknown as LearningStateV1) : null;\n },\n activity(raw: unknown): VerseActivityResponse | null {\n return isRecord(raw) && Array.isArray(raw['needsYou']) && Array.isArray(raw['running']) && isRecord(raw['sources']) ? (raw as unknown as VerseActivityResponse) : null;\n },\n fleetHistory(raw: unknown): FleetHistoryResponse | null {\n return isRecord(raw) && Array.isArray(raw['days']) && isRecord(raw['sources']) && isRecord(raw['funnel']) ? (raw as unknown as FleetHistoryResponse) : null;\n },\n reasoningDigest(raw: unknown): ReasoningDigest | null {\n return isRecord(raw) && Array.isArray(raw['insights']) && Array.isArray(raw['trends']) && isRecord(raw['totals']) ? (raw as unknown as ReasoningDigest) : null;\n },\n /** Series and points are re-checked one by one where they are merged (command-model mergeSeatHistory). */\n seatHistory(raw: unknown): CapacityHistoryResponse | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['series']) ? (raw as unknown as CapacityHistoryResponse) : null;\n },\n};\n\n/** Operator words for a source that did not answer (never a path, never a trace). */\nfunction absence(what: string, err: unknown): string {\n if (err instanceof ApiError) {\n if (err.status === 404) return `${what} is not in this build yet, so this card has no source.`;\n if (err.status === 503) return `${what} failed to load on the server.`;\n return `${what} answered HTTP ${err.status}.`;\n }\n return `${what} could not be reached.`;\n}\n\n/** A QueryDef whose value is an OptionalRead: 404 / unreachable / unrecognised all resolve, never throw. */\nexport function optionalQuery<T>(key: string, path: string, what: string, guard: (raw: unknown) => T | null): QueryDef<OptionalRead<T>> {\n return {\n key,\n fetch: async (signal) => {\n try {\n const raw = await apiGet<unknown>(path, signal);\n const value = guard(raw);\n if (value === null) {\n return { value: null, available: true, reason: `${what} answered in a shape this version does not recognise, so nothing is shown rather than guessed.` };\n }\n return { value, available: true, reason: null };\n } catch (err) {\n if (err instanceof ApiError && err.status === 401) throw err;\n if (err instanceof DOMException && err.name === 'AbortError') throw err;\n return { value: null, available: false, reason: absence(what, err) };\n }\n },\n };\n}\n\nexport const authorityQuery = optionalQuery(SURFACE_KEYS.authority, AUTHORITY_PATH, 'The authority service', narrow.authority);\nexport const authorityDraftQuery = optionalQuery(SURFACE_KEYS.authorityDraft, AUTHORITY_DRAFT_PATH, 'The grant draft', narrow.draft);\nexport const fleetLiveQuery = optionalQuery(SURFACE_KEYS.fleetLive, FLEET_LIVE_PATH, 'The live fleet view', narrow.fleetLive);\nexport const leaderQuery = optionalQuery(SURFACE_KEYS.leader, LEADER_PATH, 'The Leader', narrow.leader);\nexport const learningQuery = optionalQuery(SURFACE_KEYS.learning, LEARNING_PATH, 'Self-improvement', narrow.learning);\nexport const fleetHistoryQuery = optionalQuery(SURFACE_KEYS.fleetHistory, FLEET_HISTORY_PATH, 'Fleet history', narrow.fleetHistory);\nexport const reasoningDigestQuery = optionalQuery(SURFACE_KEYS.reasoningDigest, REASONING_DIGEST_PATH, 'The reasoning digest', narrow.reasoningDigest);\n/** Optional like every surface read: a server without the route leaves the burn-downs on this page's own readings. */\nexport const seatHistoryQuery = optionalQuery(SURFACE_KEYS.seatHistory, SEAT_HISTORY_PATH, 'Seat history', narrow.seatHistory);\n\n// ---------------------------------------------------------------------------\n// Writes\n// ---------------------------------------------------------------------------\n\nasync function post<T>(path: string, body: unknown): Promise<T> {\n const token = getMutationToken();\n if (!token) throw new VerseControlLockedError();\n const result = await apiPost<T>(path, body, token);\n touchMutationHold();\n return result;\n}\n\n/**\n * One authority action. The server answers the new AuthorityStatusV1 for\n * every form; raising past the grant is its 409 `grant-required` (the page\n * opens the Touch ID sheet BEFORE ever sending that, but the server is the\n * authority — a stale page gets the refusal, not a raise).\n */\nexport async function postAuthority(action: AuthorityActionRequest): Promise<AuthorityStatusV1 | null> {\n const result = await post<unknown>(AUTHORITY_PATH, action);\n invalidate(SURFACE_KEYS.authority);\n invalidate(SURFACE_KEYS.fleetLive);\n void refreshActivity();\n if (action.action === 'grant' || action.action === 're-approve') invalidate(SURFACE_KEYS.authorityDraft);\n return narrow.authority(result);\n}\n\nexport async function postFleetLive(action: FleetLiveActionRequest): Promise<unknown> {\n const result = await post<unknown>(FLEET_LIVE_PATH, action);\n invalidate(SURFACE_KEYS.fleetLive);\n void refreshActivity();\n return result;\n}\n\nexport async function postLeader(action: LeaderActionRequest): Promise<unknown> {\n const result = await post<unknown>(LEADER_PATH, action);\n invalidate(SURFACE_KEYS.leader);\n void refreshActivity();\n return result;\n}\n\n/**\n * A Needs-you item's own action. `path` was validated by the producer\n * (isNeedsYouItem → isSafeApiRoute) and is re-checked here: the mutation\n * token must never be aimed anywhere but this origin's /api/.\n */\nexport async function postNeedsYouAction(path: string, body: Record<string, unknown>): Promise<unknown> {\n if (!/^\\/api\\/[^\\s\\\\]*$/.test(path) || path.startsWith('//') || path.includes('..')) {\n throw new Error('That action points outside this app, so it was not sent.');\n }\n const result = await post<unknown>(path, body);\n void refreshActivity();\n invalidate(SURFACE_KEYS.fleetLive);\n invalidate(SURFACE_KEYS.leader);\n invalidate(SURFACE_KEYS.authority);\n return result;\n}\n"],"mappings":"6KA0DA,IAAa,EAAiB,uBACjB,EAAuB,6BACvB,EAAkB,wBAClB,EAAc,oBACd,EAAgB,sBAChB,EAAqB,mCACrB,EAAwB,gCAExB,EAAoB,mCAEpB,EAAe,OAAO,OAAO,CACxC,UAAW,kBACX,eAAgB,wBAChB,UAAW,mBACX,OAAQ,eACR,SAAU,iBACV,aAAc,0BACd,gBAAiB,6BACjB,YAAa,uBACf,CAAC,EAED,SAAS,EAAS,EAAkD,CAClE,OAAyB,OAAO,GAAU,YAAnC,GAA+C,CAAC,MAAM,QAAQ,CAAK,CAC5E,CAQA,IAAa,EAAS,CACpB,UAAU,EAAwC,CAChD,OAAO,EAAS,CAAG,GAAK,EAAI,IAAS,GAAK,OAAO,EAAI,QAAc,UAAY,EAAS,EAAI,KAAQ,EAAK,EAAuC,IAClJ,EACA,MAAM,EAA0C,CAC9C,OAAO,EAAS,CAAG,GAAK,EAAS,EAAI,OAAU,GAAK,OAAO,EAAI,QAAc,SAAY,EAAyC,IACpI,EACA,UAAU,EAA0C,CAClD,OAAO,EAAS,CAAG,GAAK,EAAI,IAAS,GAAK,MAAM,QAAQ,EAAI,IAAO,GAAK,MAAM,QAAQ,EAAI,KAAQ,GAAK,MAAM,QAAQ,EAAI,KAAQ,GAAK,EAAS,EAAI,OAAU,EACxJ,EACD,IACN,EACA,OAAO,EAAoC,CACzC,OAAO,EAAS,CAAG,GAAK,EAAI,IAAS,GAAK,MAAM,QAAQ,EAAI,QAAW,GAAK,MAAM,QAAQ,EAAI,OAAU,GAAK,EAAS,EAAI,OAAU,EA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FA,EAAW,EAAa,MAAM,EAC9B,EAAqB,EACd,CACT,CAOA,eAAsB,EAAmB,EAAc,EAAiD,CACtG,GAAI,CAAC,oBAAoB,KAAK,CAAI,GAAK,EAAK,WAAW,IAAI,GAAK,EAAK,SAAS,IAAI,EAChF,MAAU,MAAM,0DAA0D,EAE5E,IAAM,EAAS,MAAM,EAAc,EAAM,CAAI,EAK7C,OAJA,EAAqB,EACrB,EAAW,EAAa,SAAS,EACjC,EAAW,EAAa,MAAM,EAC9B,EAAW,EAAa,SAAS,EAC1B,CACT"}
1
+ {"version":3,"file":"surface-data-DTI7LjvH.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/command/surface-data.ts"],"sourcesContent":["/**\n * routes/verse/command/surface-data.ts — every read and write behind the\n * four 3.10 surfaces (Command, Fleet, Growth, Mind), in one place (unit C7).\n *\n * GET /api/verse/authority AuthorityStatusV1 (B-U1)\n * GET /api/verse/authority/draft AuthorityGrantDraft (B-U1)\n * POST /api/verse/authority AuthorityActionRequest\n * GET /api/verse/fleet/live FleetLiveSnapshotV1 (B-U5)\n * POST /api/verse/fleet/live FleetLiveActionRequest\n * GET /api/verse/leader LeaderStateV1 (B-U8)\n * POST /api/verse/leader LeaderActionRequest\n * GET /api/verse/learning LearningStateV1 (B-U9)\n * GET /api/verse/activity VerseActivityResponse (C1 — read through\n * the shell's ONE useActivity poll, never a\n * second loop from here)\n * GET /api/verse/fleet/history FleetHistoryResponse (A8)\n * GET /api/reasoning/digest ReasoningDigest (A7)\n * GET /api/verse/budget BudgetView (A9 — budget-queries.ts)\n * GET /api/verse/budget/history CapacityHistoryResponse (3.10.1 — recorded\n * seat window history for the burn-downs)\n * GET /api/models per-model ROI (data/queries.ts)\n *\n * WHY every read is OPTIONAL: Track B's modules land in parallel with these\n * surfaces (SPEC-310BC-COORD), and C0's mount answers 404 for a family that\n * has not landed. A 404 is \"this card has no source yet\", never \"Command is\n * broken\" — so a read resolves to `{ value: null, available: false, reason }`\n * and the card renders a designed not-available state from `reason`. A body\n * this client cannot narrow is treated the same way (available, but nothing\n * shown rather than guessed). 401 and aborts still propagate: an expired\n * read session is the whole app's state, not one card's.\n *\n * Writes pull the held mutation token (VerseControlLockedError without one —\n * the surfaces route every write through useGuardedAction, which opens the\n * token dialog first) and invalidate exactly the keys they change.\n */\nimport { ApiError, apiGet, apiPost } from '../../../data/client.js';\nimport { getMutationToken, touchMutationHold } from '../../../data/auth-store.js';\nimport { invalidate } from '../../../data/cache.js';\nimport type { QueryDef } from '../../../data/queries.js';\nimport { VerseControlLockedError } from '../autonomy/control-queries.js';\nimport { refreshActivity } from '../shell/useActivity.js';\nimport type { OptionalFleetRead } from '../autonomy/fleet-contract.js';\nimport type {\n AuthorityActionRequest,\n AuthorityGrantDraft,\n AuthorityStatusV1,\n} from '../../../../core/authority/types.js';\nimport type { FleetLiveActionRequest, FleetLiveSnapshotV1 } from '../../../../core/fleet/fleet-types.js';\nimport type { LeaderActionRequest, LeaderStateV1 } from '../../../../core/vision/leader-types.js';\nimport type { LearningStateV1 } from '../../../../core/learn/harness-types.js';\nimport type { VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport type { FleetHistoryResponse } from '../../../../core/verse/fleet-history-types.js';\nimport type { ReasoningDigest } from '../../../../core/reasoning/types.js';\nimport type { CapacityHistoryResponse } from '../../../../core/routing/capacity-history-types.js';\n\n/** A read that is allowed to be absent (the autonomy folder's shape, reused). */\nexport type OptionalRead<T> = OptionalFleetRead<T>;\n\nexport const AUTHORITY_PATH = '/api/verse/authority';\nexport const AUTHORITY_DRAFT_PATH = '/api/verse/authority/draft';\nexport const FLEET_LIVE_PATH = '/api/verse/fleet/live';\nexport const LEADER_PATH = '/api/verse/leader';\nexport const LEARNING_PATH = '/api/verse/learning';\nexport const FLEET_HISTORY_PATH = '/api/verse/fleet/history?days=90';\nexport const REASONING_DIGEST_PATH = '/api/reasoning/digest?days=30';\n/** Eight days: the whole weekly window plus the day before it opened. */\nexport const SEAT_HISTORY_PATH = '/api/verse/budget/history?days=8';\n\nexport const SURFACE_KEYS = Object.freeze({\n authority: 'verse-authority',\n authorityDraft: 'verse-authority-draft',\n fleetLive: 'verse-fleet-live',\n leader: 'verse-leader',\n learning: 'verse-learning',\n fleetHistory: 'verse-fleet-history-90d',\n reasoningDigest: 'verse-reasoning-digest-30d',\n seatHistory: 'verse-seat-history-8d',\n});\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\n/**\n * Structural guards: just enough to know the body is the contract's shape\n * (version tag + the arrays the cards iterate), so a mismatched server can\n * never crash a render with `undefined.map`. Field-level honesty (null =\n * unknown) is the cards' job.\n */\nexport const narrow = {\n authority(raw: unknown): AuthorityStatusV1 | null {\n return isRecord(raw) && raw['v'] === 1 && typeof raw['switch'] === 'string' && isRecord(raw['grant']) ? (raw as unknown as AuthorityStatusV1) : null;\n },\n draft(raw: unknown): AuthorityGrantDraft | null {\n return isRecord(raw) && isRecord(raw['payload']) && typeof raw['digest'] === 'string' ? (raw as unknown as AuthorityGrantDraft) : null;\n },\n fleetLive(raw: unknown): FleetLiveSnapshotV1 | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['runs']) && Array.isArray(raw['repos']) && Array.isArray(raw['lanes']) && isRecord(raw['summary'])\n ? (raw as unknown as FleetLiveSnapshotV1)\n : null;\n },\n leader(raw: unknown): LeaderStateV1 | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['timeline']) && Array.isArray(raw['actions']) && isRecord(raw['hitRate'])\n ? (raw as unknown as LeaderStateV1)\n : null;\n },\n learning(raw: unknown): LearningStateV1 | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['versions']) && Array.isArray(raw['experiments']) ? (raw as unknown as LearningStateV1) : null;\n },\n activity(raw: unknown): VerseActivityResponse | null {\n return isRecord(raw) && Array.isArray(raw['needsYou']) && Array.isArray(raw['running']) && isRecord(raw['sources']) ? (raw as unknown as VerseActivityResponse) : null;\n },\n fleetHistory(raw: unknown): FleetHistoryResponse | null {\n return isRecord(raw) && Array.isArray(raw['days']) && isRecord(raw['sources']) && isRecord(raw['funnel']) ? (raw as unknown as FleetHistoryResponse) : null;\n },\n reasoningDigest(raw: unknown): ReasoningDigest | null {\n return isRecord(raw) && Array.isArray(raw['insights']) && Array.isArray(raw['trends']) && isRecord(raw['totals']) ? (raw as unknown as ReasoningDigest) : null;\n },\n /** Series and points are re-checked one by one where they are merged (command-model mergeSeatHistory). */\n seatHistory(raw: unknown): CapacityHistoryResponse | null {\n return isRecord(raw) && raw['v'] === 1 && Array.isArray(raw['series']) ? (raw as unknown as CapacityHistoryResponse) : null;\n },\n};\n\n/** Operator words for a source that did not answer (never a path, never a trace). */\nfunction absence(what: string, err: unknown): string {\n if (err instanceof ApiError) {\n if (err.status === 404) return `${what} is not in this build yet, so this card has no source.`;\n if (err.status === 503) return `${what} failed to load on the server.`;\n return `${what} answered HTTP ${err.status}.`;\n }\n return `${what} could not be reached.`;\n}\n\n/** A QueryDef whose value is an OptionalRead: 404 / unreachable / unrecognised all resolve, never throw. */\nexport function optionalQuery<T>(key: string, path: string, what: string, guard: (raw: unknown) => T | null): QueryDef<OptionalRead<T>> {\n return {\n key,\n fetch: async (signal) => {\n try {\n const raw = await apiGet<unknown>(path, signal);\n const value = guard(raw);\n if (value === null) {\n return { value: null, available: true, reason: `${what} answered in a shape this version does not recognise, so nothing is shown rather than guessed.` };\n }\n return { value, available: true, reason: null };\n } catch (err) {\n if (err instanceof ApiError && err.status === 401) throw err;\n if (err instanceof DOMException && err.name === 'AbortError') throw err;\n return { value: null, available: false, reason: absence(what, err) };\n }\n },\n };\n}\n\nexport const authorityQuery = optionalQuery(SURFACE_KEYS.authority, AUTHORITY_PATH, 'The authority service', narrow.authority);\nexport const authorityDraftQuery = optionalQuery(SURFACE_KEYS.authorityDraft, AUTHORITY_DRAFT_PATH, 'The grant draft', narrow.draft);\nexport const fleetLiveQuery = optionalQuery(SURFACE_KEYS.fleetLive, FLEET_LIVE_PATH, 'The live fleet view', narrow.fleetLive);\nexport const leaderQuery = optionalQuery(SURFACE_KEYS.leader, LEADER_PATH, 'The Leader', narrow.leader);\nexport const learningQuery = optionalQuery(SURFACE_KEYS.learning, LEARNING_PATH, 'Self-improvement', narrow.learning);\nexport const fleetHistoryQuery = optionalQuery(SURFACE_KEYS.fleetHistory, FLEET_HISTORY_PATH, 'Fleet history', narrow.fleetHistory);\nexport const reasoningDigestQuery = optionalQuery(SURFACE_KEYS.reasoningDigest, REASONING_DIGEST_PATH, 'The reasoning digest', narrow.reasoningDigest);\n/** Optional like every surface read: a server without the route leaves the burn-downs on this page's own readings. */\nexport const seatHistoryQuery = optionalQuery(SURFACE_KEYS.seatHistory, SEAT_HISTORY_PATH, 'Seat history', narrow.seatHistory);\n\n// ---------------------------------------------------------------------------\n// Writes\n// ---------------------------------------------------------------------------\n\nasync function post<T>(path: string, body: unknown): Promise<T> {\n const token = getMutationToken();\n if (!token) throw new VerseControlLockedError();\n const result = await apiPost<T>(path, body, token);\n touchMutationHold();\n return result;\n}\n\n/**\n * One authority action. The server answers the new AuthorityStatusV1 for\n * every form; raising past the grant is its 409 `grant-required` (the page\n * opens the Touch ID sheet BEFORE ever sending that, but the server is the\n * authority — a stale page gets the refusal, not a raise).\n */\nexport async function postAuthority(action: AuthorityActionRequest): Promise<AuthorityStatusV1 | null> {\n const result = await post<unknown>(AUTHORITY_PATH, action);\n invalidate(SURFACE_KEYS.authority);\n invalidate(SURFACE_KEYS.fleetLive);\n void refreshActivity();\n if (action.action === 'grant' || action.action === 're-approve') invalidate(SURFACE_KEYS.authorityDraft);\n return narrow.authority(result);\n}\n\nexport async function postFleetLive(action: FleetLiveActionRequest): Promise<unknown> {\n const result = await post<unknown>(FLEET_LIVE_PATH, action);\n invalidate(SURFACE_KEYS.fleetLive);\n void refreshActivity();\n return result;\n}\n\nexport async function postLeader(action: LeaderActionRequest): Promise<unknown> {\n const result = await post<unknown>(LEADER_PATH, action);\n invalidate(SURFACE_KEYS.leader);\n void refreshActivity();\n return result;\n}\n\n/**\n * A Needs-you item's own action. `path` was validated by the producer\n * (isNeedsYouItem → isSafeApiRoute) and is re-checked here: the mutation\n * token must never be aimed anywhere but this origin's /api/.\n */\nexport async function postNeedsYouAction(path: string, body: Record<string, unknown>): Promise<unknown> {\n if (!/^\\/api\\/[^\\s\\\\]*$/.test(path) || path.startsWith('//') || path.includes('..')) {\n throw new Error('That action points outside this app, so it was not sent.');\n }\n const result = await post<unknown>(path, body);\n void refreshActivity();\n invalidate(SURFACE_KEYS.fleetLive);\n invalidate(SURFACE_KEYS.leader);\n invalidate(SURFACE_KEYS.authority);\n return result;\n}\n"],"mappings":"gLA0DA,IAAa,EAAiB,uBACjB,EAAuB,6BACvB,EAAkB,wBAClB,EAAc,oBACd,EAAgB,sBAChB,EAAqB,mCACrB,EAAwB,gCAExB,EAAoB,mCAEpB,EAAe,OAAO,OAAO,CACxC,UAAW,kBACX,eAAgB,wBAChB,UAAW,mBACX,OAAQ,eACR,SAAU,iBACV,aAAc,0BACd,gBAAiB,6BACjB,YAAa,uBACf,CAAC,EAED,SAAS,EAAS,EAAkD,CAClE,OAAyB,OAAO,GAAU,YAAnC,GAA+C,CAAC,MAAM,QAAQ,CAAK,CAC5E,CAQA,IAAa,EAAS,CACpB,UAAU,EAAwC,CAChD,OAAO,EAAS,CAAG,GAAK,EAAI,IAAS,GAAK,OAAO,EAAI,QAAc,UAAY,EAAS,EAAI,KAAQ,EAAK,EAAuC,IAClJ,EACA,MAAM,EAA0C,CAC9C,OAAO,EAAS,CAAG,GAAK,EAAS,EAAI,OAAU,GAAK,OAAO,EAAI,QAAc,SAAY,EAAyC,IACpI,EACA,UAAU,EAA0C,CAClD,OAAO,EAAS,CAAG,GAAK,EAAI,IAAS,GAAK,MAAM,QAAQ,EAAI,IAAO,GAAK,MAAM,QAAQ,EAAI,KAAQ,GAAK,MAAM,QAAQ,EAAI,KAAQ,GAAK,EAAS,EAAI,O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IAAM,EAAS,MAAM,EAAc,EAAiB,CAAM,EAG1D,OAFA,EAAW,EAAa,SAAS,EACjC,EAAqB,EACd,CACT,CAEA,eAAsB,EAAW,EAA+C,CAC9E,IAAM,EAAS,MAAM,EAAc,EAAa,CAAM,EAGtD,OAFA,EAAW,EAAa,MAAM,EAC9B,EAAqB,EACd,CACT,CAOA,eAAsB,EAAmB,EAAc,EAAiD,CACtG,GAAI,CAAC,oBAAoB,KAAK,CAAI,GAAK,EAAK,WAAW,IAAI,GAAK,EAAK,SAAS,IAAI,EAChF,MAAU,MAAM,0DAA0D,EAE5E,IAAM,EAAS,MAAM,EAAc,EAAM,CAAI,EAK7C,OAJA,EAAqB,EACrB,EAAW,EAAa,SAAS,EACjC,EAAW,EAAa,MAAM,EAC9B,EAAW,EAAa,SAAS,EAC1B,CACT"}
@@ -0,0 +1,2 @@
1
+ import{V as e}from"./global-oEl9Qj8u.js";import{p as t}from"./queries-CYisSAAB.js";import{T as n,w as r,x as i}from"./VerseConsoleApp-DTjDpGCd.js";import{n as a,t as o}from"./budget-queries-V3wcJVK_.js";import{n as s}from"./cloud-queries-Br_r0UAz.js";import{r as c}from"./overnight-queries-DGm3qL1b.js";import{a as l,d as u,f as d,i as f,n as p,o as m,r as h}from"./surface-data-DTI7LjvH.js";var g={command:[p,f,l,m,h,a,d,s],fleet:[f,c,a,o],growth:[h,m,t(`30d`)],mind:[l,u,i,n],chat:[i,r,n]},_=6e4;async function v(t,n={}){let r=n.ensure??e;for(let e of g[t]??[])try{if(n.beforeEach&&!await n.beforeEach())return;await r(e.key,()=>e.fetch(),_)}catch{}}export{_ as PREFETCH_FRESH_MS,g as SURFACE_PREFETCH,v as prefetchSurfaceData};
2
+ //# sourceMappingURL=surface-prefetch-CdUEBFrl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"surface-prefetch-CgZ-LEJK.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/shell/surface-prefetch.ts"],"sourcesContent":["/**\n * routes/verse/shell/surface-prefetch.ts — the reads each rail surface opens\n * with, so the shell can warm them while the operator is still reading chat\n * (shell/warmup.ts, once the operator is idle after first paint). A first\n * visit to Command, Fleet, Growth or Mind then paints from the cache instead\n * of a skeleton; the surface's own useQuery still refreshes whatever is older\n * than it accepts.\n *\n * LAZY ONLY. shell/warmup.ts loads this module with import(): these query\n * defs pull in the surfaces' data modules, none of which may cost chat\n * first-paint bytes (VerseApp.first-paint.test.ts pins it). The QueryDefs\n * themselves are the surfaces' own — same keys, same fetchers — so a warmed\n * entry IS the entry the surface reads.\n *\n * Keep each list in step with its surface's useQuery calls:\n * surface-prefetch.test.ts renders Command, Growth and Mind and fails when\n * they read something this table does not warm.\n */\nimport { ensureQuery } from '../../../data/cache.js';\nimport { modelsQuery, type QueryDef } from '../../../data/queries.js';\nimport { overnightQuery } from '../autonomy/overnight-queries.js';\nimport { budgetPreviewQuery, budgetQuery } from '../budget/budget-queries.js';\nimport { cloudQuery } from '../cloud/cloud-queries.js';\nimport {\n authorityQuery,\n fleetHistoryQuery,\n fleetLiveQuery,\n leaderQuery,\n learningQuery,\n reasoningDigestQuery,\n seatHistoryQuery,\n} from '../command/surface-data.js';\nimport { verseBootstrapQuery, verseSessionsQuery, verseWorkspacesQuery } from '../verse-queries.js';\nimport type { VerseSectionId } from '../verse-ui-store.js';\n\ntype AnyQuery = QueryDef<unknown>;\n\n/** What each rail surface reads the moment it mounts. */\nexport const SURFACE_PREFETCH: Readonly<Partial<Record<VerseSectionId, readonly AnyQuery[]>>> = {\n // seatHistoryQuery: without it the first Command visit draws each seat's\n // burn-down from this page's own readings (\"since Verse opened\"), then\n // redraws once the recorded week lands — the reset-on-reload look 3.10.1\n // set out to remove.\n // cloudQuery (3.11): the Cloud card's overview — without it a first visit\n // paints \"Reading the cloud lane…\" under the burn-downs.\n command: [authorityQuery, fleetLiveQuery, leaderQuery, learningQuery, fleetHistoryQuery, budgetQuery, seatHistoryQuery, cloudQuery],\n fleet: [fleetLiveQuery, overnightQuery, budgetQuery, budgetPreviewQuery],\n growth: [fleetHistoryQuery, learningQuery, modelsQuery('30d')],\n mind: [leaderQuery, reasoningDigestQuery, verseBootstrapQuery, verseWorkspacesQuery],\n chat: [verseBootstrapQuery, verseSessionsQuery, verseWorkspacesQuery],\n};\n\n/**\n * A cached answer younger than this is left alone. The surfaces accept 10–60 s\n * old data on mount, so anything fresher than a minute is already as good as\n * a warm-up can make it.\n */\nexport const PREFETCH_FRESH_MS = 60_000;\n\ntype Ensure = (key: string, fetcher: () => Promise<unknown>, maxAgeMs: number) => Promise<void>;\n\nexport interface PrefetchOptions {\n /** The cache's mount path (a seam for tests). */\n ensure?: Ensure;\n /**\n * Awaited before EACH read (the warm-up's idle gate). Resolving false stops\n * the warm-up there — the gate was cancelled.\n */\n beforeEach?: () => Promise<boolean> | boolean;\n}\n\n/**\n * Warm one surface's reads through the shared cache (joins an in-flight read,\n * skips a fresh one, and goes through the cache's concurrency gate).\n *\n * ONE AT A TIME: each read is awaited before the next is even considered, so\n * the warm-up never holds more than one of the gate's slots, and the operator\n * (who gets the other three, and whose reads the next `beforeEach` waits out)\n * is never queued behind a burst of it.\n *\n * Never rejects: a read that fails leaves the surface to load it as it always did.\n */\nexport async function prefetchSurfaceData(id: VerseSectionId, options: PrefetchOptions = {}): Promise<void> {\n const ensure = options.ensure ?? ensureQuery;\n for (const def of SURFACE_PREFETCH[id] ?? []) {\n try {\n if (options.beforeEach && !(await options.beforeEach())) return;\n await ensure(def.key, () => def.fetch(), PREFETCH_FRESH_MS);\n } catch {\n // A warm-up read that fails (or cannot even start) is not worth surfacing.\n }\n }\n}\n"],"mappings":"uYAsCA,IAAa,EAAmF,CAO9F,QAAS,CAAC,EAAgB,EAAgB,EAAa,EAAe,EAAmB,EAAa,EAAkB,CAAU,EAClI,MAAO,CAAC,EAAgB,EAAgB,EAAa,CAAkB,EACvE,OAAQ,CAAC,EAAmB,EAAe,EAAY,KAAK,CAAC,EAC7D,KAAM,CAAC,EAAa,EAAsB,EAAqB,CAAoB,EACnF,KAAM,CAAC,EAAqB,EAAoB,CAAoB,CACtE,EAOa,EAAoB,IAyBjC,eAAsB,EAAoB,EAAoB,EAA2B,CAAC,EAAkB,CAC1G,IAAM,EAAS,EAAQ,QAAU,EACjC,IAAK,IAAM,KAAO,EAAiB,IAAO,CAAC,EACzC,GAAI,CACF,GAAI,EAAQ,YAAc,CAAE,MAAM,EAAQ,WAAW,EAAI,OACzD,MAAM,EAAO,EAAI,QAAW,EAAI,MAAM,EAAG,CAAiB,CAC5D,MAAQ,CAER,CAEJ"}
1
+ {"version":3,"file":"surface-prefetch-CdUEBFrl.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/shell/surface-prefetch.ts"],"sourcesContent":["/**\n * routes/verse/shell/surface-prefetch.ts — the reads each rail surface opens\n * with, so the shell can warm them while the operator is still reading chat\n * (shell/warmup.ts, once the operator is idle after first paint). A first\n * visit to Command, Fleet, Growth or Mind then paints from the cache instead\n * of a skeleton; the surface's own useQuery still refreshes whatever is older\n * than it accepts.\n *\n * LAZY ONLY. shell/warmup.ts loads this module with import(): these query\n * defs pull in the surfaces' data modules, none of which may cost chat\n * first-paint bytes (VerseApp.first-paint.test.ts pins it). The QueryDefs\n * themselves are the surfaces' own — same keys, same fetchers — so a warmed\n * entry IS the entry the surface reads.\n *\n * Keep each list in step with its surface's useQuery calls:\n * surface-prefetch.test.ts renders Command, Growth and Mind and fails when\n * they read something this table does not warm.\n */\nimport { ensureQuery } from '../../../data/cache.js';\nimport { modelsQuery, type QueryDef } from '../../../data/queries.js';\nimport { overnightQuery } from '../autonomy/overnight-queries.js';\nimport { budgetPreviewQuery, budgetQuery } from '../budget/budget-queries.js';\nimport { cloudQuery } from '../cloud/cloud-queries.js';\nimport {\n authorityQuery,\n fleetHistoryQuery,\n fleetLiveQuery,\n leaderQuery,\n learningQuery,\n reasoningDigestQuery,\n seatHistoryQuery,\n} from '../command/surface-data.js';\nimport { verseBootstrapQuery, verseSessionsQuery, verseWorkspacesQuery } from '../verse-queries.js';\nimport type { VerseSectionId } from '../verse-ui-store.js';\n\ntype AnyQuery = QueryDef<unknown>;\n\n/** What each rail surface reads the moment it mounts. */\nexport const SURFACE_PREFETCH: Readonly<Partial<Record<VerseSectionId, readonly AnyQuery[]>>> = {\n // seatHistoryQuery: without it the first Command visit draws each seat's\n // burn-down from this page's own readings (\"since Verse opened\"), then\n // redraws once the recorded week lands — the reset-on-reload look 3.10.1\n // set out to remove.\n // cloudQuery (3.11): the Cloud card's overview — without it a first visit\n // paints \"Reading the cloud lane…\" under the burn-downs.\n command: [authorityQuery, fleetLiveQuery, leaderQuery, learningQuery, fleetHistoryQuery, budgetQuery, seatHistoryQuery, cloudQuery],\n fleet: [fleetLiveQuery, overnightQuery, budgetQuery, budgetPreviewQuery],\n growth: [fleetHistoryQuery, learningQuery, modelsQuery('30d')],\n mind: [leaderQuery, reasoningDigestQuery, verseBootstrapQuery, verseWorkspacesQuery],\n chat: [verseBootstrapQuery, verseSessionsQuery, verseWorkspacesQuery],\n};\n\n/**\n * A cached answer younger than this is left alone. The surfaces accept 10–60 s\n * old data on mount, so anything fresher than a minute is already as good as\n * a warm-up can make it.\n */\nexport const PREFETCH_FRESH_MS = 60_000;\n\ntype Ensure = (key: string, fetcher: () => Promise<unknown>, maxAgeMs: number) => Promise<void>;\n\nexport interface PrefetchOptions {\n /** The cache's mount path (a seam for tests). */\n ensure?: Ensure;\n /**\n * Awaited before EACH read (the warm-up's idle gate). Resolving false stops\n * the warm-up there — the gate was cancelled.\n */\n beforeEach?: () => Promise<boolean> | boolean;\n}\n\n/**\n * Warm one surface's reads through the shared cache (joins an in-flight read,\n * skips a fresh one, and goes through the cache's concurrency gate).\n *\n * ONE AT A TIME: each read is awaited before the next is even considered, so\n * the warm-up never holds more than one of the gate's slots, and the operator\n * (who gets the other three, and whose reads the next `beforeEach` waits out)\n * is never queued behind a burst of it.\n *\n * Never rejects: a read that fails leaves the surface to load it as it always did.\n */\nexport async function prefetchSurfaceData(id: VerseSectionId, options: PrefetchOptions = {}): Promise<void> {\n const ensure = options.ensure ?? ensureQuery;\n for (const def of SURFACE_PREFETCH[id] ?? []) {\n try {\n if (options.beforeEach && !(await options.beforeEach())) return;\n await ensure(def.key, () => def.fetch(), PREFETCH_FRESH_MS);\n } catch {\n // A warm-up read that fails (or cannot even start) is not worth surfacing.\n }\n }\n}\n"],"mappings":"wYAsCA,IAAa,EAAmF,CAO9F,QAAS,CAAC,EAAgB,EAAgB,EAAa,EAAe,EAAmB,EAAa,EAAkB,CAAU,EAClI,MAAO,CAAC,EAAgB,EAAgB,EAAa,CAAkB,EACvE,OAAQ,CAAC,EAAmB,EAAe,EAAY,KAAK,CAAC,EAC7D,KAAM,CAAC,EAAa,EAAsB,EAAqB,CAAoB,EACnF,KAAM,CAAC,EAAqB,EAAoB,CAAoB,CACtE,EAOa,EAAoB,IAyBjC,eAAsB,EAAoB,EAAoB,EAA2B,CAAC,EAAkB,CAC1G,IAAM,EAAS,EAAQ,QAAU,EACjC,IAAK,IAAM,KAAO,EAAiB,IAAO,CAAC,EACzC,GAAI,CACF,GAAI,EAAQ,YAAc,CAAE,MAAM,EAAQ,WAAW,EAAI,OACzD,MAAM,EAAO,EAAI,QAAW,EAAI,MAAM,EAAG,CAAiB,CAC5D,MAAQ,CAER,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{C as e}from"./verse-model-D7NZQFAR.js";import{n as t}from"./tool-semantics-GX8ScuSH.js";import{i as n}from"./sidebar-model-M1GaQU5l.js";function r(n){let r=0;for(let e=n.length-1;e>=0;--e)if(n[e].kind===`user`){r=e;break}let i=[],a=[];for(let o=r;o<n.length;o+=1){let r=n[o];if(r.kind!==`tool`)continue;let s={toolUseId:r.toolUseId,kind:t(r.name)===`task`?`subagent`:`tool`,name:r.name,detail:e(r.input)||r.name,startedAt:r.at,status:r.result===null?`running`:r.result.isError?`failed`:`done`,durationMs:r.durationMs};(s.status===`running`?i:a).push(s)}return[...i,...a.reverse()]}function i(e,t,r){let i=new Map;for(let e of t?.running??[])e.sessionId!==r&&i.set(e.sessionId,{sessionId:e.sessionId,title:e.title,engine:e.engine,startedAt:e.startedAt,live:n(e.live)});for(let t of e)t.id===r||t.status!==`running`||i.has(t.id)||i.set(t.id,{sessionId:t.id,title:t.title,engine:t.engine,startedAt:null,live:null});return[...i.values()]}function a(e,t){let n=e.filter(e=>e.status===`running`);return{turn:n.length,subagents:n.filter(e=>e.kind===`subagent`).length,chats:t.length,total:n.length+t.length}}function o(e){let t=`${e.total} running task${e.total===1?``:`s`}`,n=[];return e.turn>0&&n.push(`${e.turn} in this chat`),e.chats>0&&n.push(`${e.chats} other chat${e.chats===1?``:`s`}`),n.length>0?`${t}: ${n.join(`, `)}`:t}export{a as countTasks,r as currentTurnTasks,o as describeTaskCounts,i as otherRunningChats};
2
- //# sourceMappingURL=tasks-model-ent8f0jZ.js.map
1
+ import{C as e}from"./verse-model-DyCwZF-M.js";import{n as t}from"./tool-semantics-GX8ScuSH.js";import{i as n}from"./sidebar-model-DQ-FyBHW.js";function r(n){let r=0;for(let e=n.length-1;e>=0;--e)if(n[e].kind===`user`){r=e;break}let i=[],a=[];for(let o=r;o<n.length;o+=1){let r=n[o];if(r.kind!==`tool`)continue;let s={toolUseId:r.toolUseId,kind:t(r.name)===`task`?`subagent`:`tool`,name:r.name,detail:e(r.input)||r.name,startedAt:r.at,status:r.result===null?`running`:r.result.isError?`failed`:`done`,durationMs:r.durationMs};(s.status===`running`?i:a).push(s)}return[...i,...a.reverse()]}function i(e,t,r){let i=new Map;for(let e of t?.running??[])e.sessionId!==r&&i.set(e.sessionId,{sessionId:e.sessionId,title:e.title,engine:e.engine,startedAt:e.startedAt,live:n(e.live)});for(let t of e)t.id===r||t.status!==`running`||i.has(t.id)||i.set(t.id,{sessionId:t.id,title:t.title,engine:t.engine,startedAt:null,live:null});return[...i.values()]}function a(e,t){let n=e.filter(e=>e.status===`running`);return{turn:n.length,subagents:n.filter(e=>e.kind===`subagent`).length,chats:t.length,total:n.length+t.length}}function o(e){let t=`${e.total} running task${e.total===1?``:`s`}`,n=[];return e.turn>0&&n.push(`${e.turn} in this chat`),e.chats>0&&n.push(`${e.chats} other chat${e.chats===1?``:`s`}`),n.length>0?`${t}: ${n.join(`, `)}`:t}export{a as countTasks,r as currentTurnTasks,o as describeTaskCounts,i as otherRunningChats};
2
+ //# sourceMappingURL=tasks-model-BKDNqmmt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tasks-model-ent8f0jZ.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/chat/tasks-model.ts"],"sourcesContent":["/**\n * routes/verse/chat/tasks-model.ts — what is running right now, for the\n * \"◌ 3 running tasks\" chip and the dock's Tasks pane (SPEC-310C §2–§3, C2).\n *\n * Two kinds of task, because the operator is waiting on both:\n * - THIS TURN: the open chat's tool calls and subagents since its last ask\n * (a running `Task` is a subagent; everything else is a tool);\n * - OTHER CHATS: every other chat with a turn in flight, from activity\n * (C1) when it answers, else from the session list's `status`.\n *\n * Pure over transcript items and the session / activity lists.\n */\nimport type { VerseEngine, VerseSession } from '../../../data/api-types.js';\nimport type { VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport type { TranscriptItem } from '../verse-store.js';\nimport { summarizeToolInput } from '../verse-model.js';\nimport { liveLine } from './sidebar-model.js';\nimport { actionForName } from './tool-semantics.js';\n\nexport type TurnTaskStatus = 'running' | 'done' | 'failed';\n\nexport interface TurnTask {\n toolUseId: string;\n kind: 'subagent' | 'tool';\n /** Tool name as the CLI spelled it. */\n name: string;\n /** What it is doing: the command, the path, the subagent's description. */\n detail: string;\n /** ISO time the call started. */\n startedAt: string;\n status: TurnTaskStatus;\n durationMs: number | null;\n}\n\nexport interface ChatTask {\n sessionId: string;\n title: string;\n engine: VerseEngine;\n /** ISO start of the running turn when activity knows it; null = unknown. */\n startedAt: string | null;\n /** The muted \"what it is doing\" line; null when unknown. */\n live: string | null;\n}\n\n/** The last turn's tool calls, running first (in start order), then finished (newest first). */\nexport function currentTurnTasks(items: readonly TranscriptItem[]): TurnTask[] {\n let start = 0;\n for (let i = items.length - 1; i >= 0; i -= 1) {\n if (items[i]!.kind === 'user') {\n start = i;\n break;\n }\n }\n const running: TurnTask[] = [];\n const finished: TurnTask[] = [];\n for (let i = start; i < items.length; i += 1) {\n const item = items[i]!;\n if (item.kind !== 'tool') continue;\n const task: TurnTask = {\n toolUseId: item.toolUseId,\n kind: actionForName(item.name) === 'task' ? 'subagent' : 'tool',\n name: item.name,\n detail: summarizeToolInput(item.input) || item.name,\n startedAt: item.at,\n status: item.result === null ? 'running' : item.result.isError ? 'failed' : 'done',\n durationMs: item.durationMs,\n };\n (task.status === 'running' ? running : finished).push(task);\n }\n return [...running, ...finished.reverse()];\n}\n\nexport function otherRunningChats(\n sessions: readonly VerseSession[],\n activity: VerseActivityResponse | null,\n currentId: string | null,\n): ChatTask[] {\n const out = new Map<string, ChatTask>();\n for (const row of activity?.running ?? []) {\n if (row.sessionId === currentId) continue;\n out.set(row.sessionId, {\n sessionId: row.sessionId,\n title: row.title,\n engine: row.engine,\n startedAt: row.startedAt,\n live: liveLine(row.live),\n });\n }\n // The session list can know about a run activity has not reported (a\n // server without C1's route, or the few seconds between polls).\n for (const session of sessions) {\n if (session.id === currentId || session.status !== 'running' || out.has(session.id)) continue;\n out.set(session.id, { sessionId: session.id, title: session.title, engine: session.engine, startedAt: null, live: null });\n }\n return [...out.values()];\n}\n\nexport interface TaskCounts {\n /** Running calls in this turn. */\n turn: number;\n /** Of which subagents. */\n subagents: number;\n /** Other chats running. */\n chats: number;\n total: number;\n}\n\nexport function countTasks(turn: readonly TurnTask[], chats: readonly ChatTask[]): TaskCounts {\n const running = turn.filter((t) => t.status === 'running');\n return {\n turn: running.length,\n subagents: running.filter((t) => t.kind === 'subagent').length,\n chats: chats.length,\n total: running.length + chats.length,\n };\n}\n\n/** \"3 running tasks\" — and what they are, for the chip's accessible name. */\nexport function describeTaskCounts(counts: TaskCounts): string {\n const head = `${counts.total} running task${counts.total === 1 ? '' : 's'}`;\n const parts: string[] = [];\n if (counts.turn > 0) parts.push(`${counts.turn} in this chat`);\n if (counts.chats > 0) parts.push(`${counts.chats} other chat${counts.chats === 1 ? '' : 's'}`);\n return parts.length > 0 ? `${head}: ${parts.join(', ')}` : head;\n}\n"],"mappings":"+IA6CA,SAAgB,EAAiB,EAA8C,CAC7E,IAAI,EAAQ,EACZ,IAAK,IAAI,EAAI,EAAM,OAAS,EAAG,GAAK,EAAG,IACrC,GAAI,EAAM,EAAE,CAAE,OAAS,OAAQ,CAC7B,EAAQ,EACR,KACF,CAEF,IAAM,EAAsB,CAAC,EACvB,EAAuB,CAAC,EAC9B,IAAK,IAAI,EAAI,EAAO,EAAI,EAAM,OAAQ,GAAK,EAAG,CAC5C,IAAM,EAAO,EAAM,GACnB,GAAI,EAAK,OAAS,OAAQ,SAC1B,IAAM,EAAiB,CACrB,UAAW,EAAK,UAChB,KAAM,EAAc,EAAK,IAAI,IAAM,OAAS,WAAa,OACzD,KAAM,EAAK,KACX,OAAQ,EAAmB,EAAK,KAAK,GAAK,EAAK,KAC/C,UAAW,EAAK,GAChB,OAAQ,EAAK,SAAW,KAAO,UAAY,EAAK,OAAO,QAAU,SAAW,OAC5E,WAAY,EAAK,UACnB,GACC,EAAK,SAAW,UAAY,EAAU,EAAA,CAAU,KAAK,CAAI,CAC5D,CACA,MAAO,CAAC,GAAG,EAAS,GAAG,EAAS,QAAQ,CAAC,CAC3C,CAEA,SAAgB,EACd,EACA,EACA,EACY,CACZ,IAAM,EAAM,IAAI,IAChB,IAAK,IAAM,KAAO,GAAU,SAAW,CAAC,EAClC,EAAI,YAAc,GACtB,EAAI,IAAI,EAAI,UAAW,CACrB,UAAW,EAAI,UACf,MAAO,EAAI,MACX,OAAQ,EAAI,OACZ,UAAW,EAAI,UACf,KAAM,EAAS,EAAI,IAAI,CACzB,CAAC,EAIH,IAAK,IAAM,KAAW,EAChB,EAAQ,KAAO,GAAa,EAAQ,SAAW,WAAa,EAAI,IAAI,EAAQ,EAAE,GAClF,EAAI,IAAI,EAAQ,GAAI,CAAE,UAAW,EAAQ,GAAI,MAAO,EAAQ,MAAO,OAAQ,EAAQ,OAAQ,UAAW,KAAM,KAAM,IAAK,CAAC,EAE1H,MAAO,CAAC,GAAG,EAAI,OAAO,CAAC,CACzB,CAYA,SAAgB,EAAW,EAA2B,EAAwC,CAC5F,IAAM,EAAU,EAAK,OAAQ,GAAM,EAAE,SAAW,SAAS,EACzD,MAAO,CACL,KAAM,EAAQ,OACd,UAAW,EAAQ,OAAQ,GAAM,EAAE,OAAS,UAAU,CAAC,CAAC,OACxD,MAAO,EAAM,OACb,MAAO,EAAQ,OAAS,EAAM,MAChC,CACF,CAGA,SAAgB,EAAmB,EAA4B,CAC7D,IAAM,EAAO,GAAG,EAAO,MAAM,eAAe,EAAO,QAAU,EAAI,GAAK,MAChE,EAAkB,CAAC,EAGzB,OAFI,EAAO,KAAO,GAAG,EAAM,KAAK,GAAG,EAAO,KAAK,cAAc,EACzD,EAAO,MAAQ,GAAG,EAAM,KAAK,GAAG,EAAO,MAAM,aAAa,EAAO,QAAU,EAAI,GAAK,KAAK,EACtF,EAAM,OAAS,EAAI,GAAG,EAAK,IAAI,EAAM,KAAK,IAAI,IAAM,CAC7D"}
1
+ {"version":3,"file":"tasks-model-BKDNqmmt.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/chat/tasks-model.ts"],"sourcesContent":["/**\n * routes/verse/chat/tasks-model.ts — what is running right now, for the\n * \"◌ 3 running tasks\" chip and the dock's Tasks pane (SPEC-310C §2–§3, C2).\n *\n * Two kinds of task, because the operator is waiting on both:\n * - THIS TURN: the open chat's tool calls and subagents since its last ask\n * (a running `Task` is a subagent; everything else is a tool);\n * - OTHER CHATS: every other chat with a turn in flight, from activity\n * (C1) when it answers, else from the session list's `status`.\n *\n * Pure over transcript items and the session / activity lists.\n */\nimport type { VerseEngine, VerseSession } from '../../../data/api-types.js';\nimport type { VerseActivityResponse } from '../../../../core/verse/workbench-types.js';\nimport type { TranscriptItem } from '../verse-store.js';\nimport { summarizeToolInput } from '../verse-model.js';\nimport { liveLine } from './sidebar-model.js';\nimport { actionForName } from './tool-semantics.js';\n\nexport type TurnTaskStatus = 'running' | 'done' | 'failed';\n\nexport interface TurnTask {\n toolUseId: string;\n kind: 'subagent' | 'tool';\n /** Tool name as the CLI spelled it. */\n name: string;\n /** What it is doing: the command, the path, the subagent's description. */\n detail: string;\n /** ISO time the call started. */\n startedAt: string;\n status: TurnTaskStatus;\n durationMs: number | null;\n}\n\nexport interface ChatTask {\n sessionId: string;\n title: string;\n engine: VerseEngine;\n /** ISO start of the running turn when activity knows it; null = unknown. */\n startedAt: string | null;\n /** The muted \"what it is doing\" line; null when unknown. */\n live: string | null;\n}\n\n/** The last turn's tool calls, running first (in start order), then finished (newest first). */\nexport function currentTurnTasks(items: readonly TranscriptItem[]): TurnTask[] {\n let start = 0;\n for (let i = items.length - 1; i >= 0; i -= 1) {\n if (items[i]!.kind === 'user') {\n start = i;\n break;\n }\n }\n const running: TurnTask[] = [];\n const finished: TurnTask[] = [];\n for (let i = start; i < items.length; i += 1) {\n const item = items[i]!;\n if (item.kind !== 'tool') continue;\n const task: TurnTask = {\n toolUseId: item.toolUseId,\n kind: actionForName(item.name) === 'task' ? 'subagent' : 'tool',\n name: item.name,\n detail: summarizeToolInput(item.input) || item.name,\n startedAt: item.at,\n status: item.result === null ? 'running' : item.result.isError ? 'failed' : 'done',\n durationMs: item.durationMs,\n };\n (task.status === 'running' ? running : finished).push(task);\n }\n return [...running, ...finished.reverse()];\n}\n\nexport function otherRunningChats(\n sessions: readonly VerseSession[],\n activity: VerseActivityResponse | null,\n currentId: string | null,\n): ChatTask[] {\n const out = new Map<string, ChatTask>();\n for (const row of activity?.running ?? []) {\n if (row.sessionId === currentId) continue;\n out.set(row.sessionId, {\n sessionId: row.sessionId,\n title: row.title,\n engine: row.engine,\n startedAt: row.startedAt,\n live: liveLine(row.live),\n });\n }\n // The session list can know about a run activity has not reported (a\n // server without C1's route, or the few seconds between polls).\n for (const session of sessions) {\n if (session.id === currentId || session.status !== 'running' || out.has(session.id)) continue;\n out.set(session.id, { sessionId: session.id, title: session.title, engine: session.engine, startedAt: null, live: null });\n }\n return [...out.values()];\n}\n\nexport interface TaskCounts {\n /** Running calls in this turn. */\n turn: number;\n /** Of which subagents. */\n subagents: number;\n /** Other chats running. */\n chats: number;\n total: number;\n}\n\nexport function countTasks(turn: readonly TurnTask[], chats: readonly ChatTask[]): TaskCounts {\n const running = turn.filter((t) => t.status === 'running');\n return {\n turn: running.length,\n subagents: running.filter((t) => t.kind === 'subagent').length,\n chats: chats.length,\n total: running.length + chats.length,\n };\n}\n\n/** \"3 running tasks\" — and what they are, for the chip's accessible name. */\nexport function describeTaskCounts(counts: TaskCounts): string {\n const head = `${counts.total} running task${counts.total === 1 ? '' : 's'}`;\n const parts: string[] = [];\n if (counts.turn > 0) parts.push(`${counts.turn} in this chat`);\n if (counts.chats > 0) parts.push(`${counts.chats} other chat${counts.chats === 1 ? '' : 's'}`);\n return parts.length > 0 ? `${head}: ${parts.join(', ')}` : head;\n}\n"],"mappings":"+IA6CA,SAAgB,EAAiB,EAA8C,CAC7E,IAAI,EAAQ,EACZ,IAAK,IAAI,EAAI,EAAM,OAAS,EAAG,GAAK,EAAG,IACrC,GAAI,EAAM,EAAE,CAAE,OAAS,OAAQ,CAC7B,EAAQ,EACR,KACF,CAEF,IAAM,EAAsB,CAAC,EACvB,EAAuB,CAAC,EAC9B,IAAK,IAAI,EAAI,EAAO,EAAI,EAAM,OAAQ,GAAK,EAAG,CAC5C,IAAM,EAAO,EAAM,GACnB,GAAI,EAAK,OAAS,OAAQ,SAC1B,IAAM,EAAiB,CACrB,UAAW,EAAK,UAChB,KAAM,EAAc,EAAK,IAAI,IAAM,OAAS,WAAa,OACzD,KAAM,EAAK,KACX,OAAQ,EAAmB,EAAK,KAAK,GAAK,EAAK,KAC/C,UAAW,EAAK,GAChB,OAAQ,EAAK,SAAW,KA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AM,OAAS,EAAI,GAAG,EAAK,IAAI,EAAM,KAAK,IAAI,IAAM,CAC7D"}
@@ -1,2 +1,2 @@
1
- import{n as e}from"./index-oAAq8XJa.js";var t=e();function n({size:e=16,children:n,...r}){return(0,t.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,...r,children:n})}function r(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`1.75`,y:`2.75`,width:`12.5`,height:`10.5`,rx:`1.5`}),(0,t.jsx)(`path`,{d:`m4.5 6.25 2 1.75-2 1.75M8.25 10h3`})]})}function i(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`1.75`,y:`2.75`,width:`12.5`,height:`10.5`,rx:`1.5`}),(0,t.jsx)(`path`,{d:`M1.75 5.75h12.5M4 4.25h.01M5.75 4.25h.01`})]})}function a(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`m4.5 6.5 3.5 3.5 3.5-3.5`})})}function o(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`path`,{d:`M2.5 6v4h2.5l3.5 3V3L5 6H2.5Z`}),(0,t.jsx)(`path`,{d:`M11 5.5a3.5 3.5 0 0 1 0 5M12.75 3.75a6 6 0 0 1 0 8.5`})]})}function s(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`M13 8H3.5M7.5 4 3.5 8l4 4`})})}function c(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`M3 8h9.5M8.5 4l4 4-4 4`})})}function l(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`path`,{d:`M13 8a5 5 0 1 1-1.46-3.54`}),(0,t.jsx)(`path`,{d:`M13 2.75v2.5h-2.5`})]})}function u(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`1.75`,y:`2.75`,width:`12.5`,height:`8.5`,rx:`1.25`}),(0,t.jsx)(`path`,{d:`M6 13.75h4M8 11.25v2.5`})]})}function d(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`4.75`,y:`1.75`,width:`6.5`,height:`12.5`,rx:`1.5`}),(0,t.jsx)(`path`,{d:`M7.25 12h1.5`})]})}function f(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`M5 3.5v9l7-4.5-7-4.5Z`})})}function p(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`path`,{d:`M9 1.75H4.25a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V5.5L9 1.75Z`}),(0,t.jsx)(`path`,{d:`M9 1.75V5.5h3.75`})]})}function m(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`2.25`,y:`2.25`,width:`11.5`,height:`4.5`,rx:`1`}),(0,t.jsx)(`rect`,{x:`2.25`,y:`9.25`,width:`11.5`,height:`4.5`,rx:`1`}),(0,t.jsx)(`path`,{d:`M4.75 4.5h.01M4.75 11.5h.01`})]})}export{p as a,i as c,m as d,r as f,u as i,l,c as n,d as o,a as r,f as s,s as t,o as u};
2
- //# sourceMappingURL=terminal-icons-DJTK7QpR.js.map
1
+ import{n as e}from"./index-BVxOlseC.js";var t=e();function n({size:e=16,children:n,...r}){return(0,t.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,...r,children:n})}function r(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`1.75`,y:`2.75`,width:`12.5`,height:`10.5`,rx:`1.5`}),(0,t.jsx)(`path`,{d:`m4.5 6.25 2 1.75-2 1.75M8.25 10h3`})]})}function i(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`1.75`,y:`2.75`,width:`12.5`,height:`10.5`,rx:`1.5`}),(0,t.jsx)(`path`,{d:`M1.75 5.75h12.5M4 4.25h.01M5.75 4.25h.01`})]})}function a(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`m4.5 6.5 3.5 3.5 3.5-3.5`})})}function o(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`path`,{d:`M2.5 6v4h2.5l3.5 3V3L5 6H2.5Z`}),(0,t.jsx)(`path`,{d:`M11 5.5a3.5 3.5 0 0 1 0 5M12.75 3.75a6 6 0 0 1 0 8.5`})]})}function s(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`M13 8H3.5M7.5 4 3.5 8l4 4`})})}function c(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`M3 8h9.5M8.5 4l4 4-4 4`})})}function l(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`path`,{d:`M13 8a5 5 0 1 1-1.46-3.54`}),(0,t.jsx)(`path`,{d:`M13 2.75v2.5h-2.5`})]})}function u(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`1.75`,y:`2.75`,width:`12.5`,height:`8.5`,rx:`1.25`}),(0,t.jsx)(`path`,{d:`M6 13.75h4M8 11.25v2.5`})]})}function d(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`4.75`,y:`1.75`,width:`6.5`,height:`12.5`,rx:`1.5`}),(0,t.jsx)(`path`,{d:`M7.25 12h1.5`})]})}function f(e){return(0,t.jsx)(n,{...e,children:(0,t.jsx)(`path`,{d:`M5 3.5v9l7-4.5-7-4.5Z`})})}function p(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`path`,{d:`M9 1.75H4.25a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V5.5L9 1.75Z`}),(0,t.jsx)(`path`,{d:`M9 1.75V5.5h3.75`})]})}function m(e){return(0,t.jsxs)(n,{...e,children:[(0,t.jsx)(`rect`,{x:`2.25`,y:`2.25`,width:`11.5`,height:`4.5`,rx:`1`}),(0,t.jsx)(`rect`,{x:`2.25`,y:`9.25`,width:`11.5`,height:`4.5`,rx:`1`}),(0,t.jsx)(`path`,{d:`M4.75 4.5h.01M4.75 11.5h.01`})]})}export{p as a,i as c,m as d,r as f,u as i,l,c as n,d as o,a as r,f as s,s as t,o as u};
2
+ //# sourceMappingURL=terminal-icons-D2xe-aM1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-icons-DJTK7QpR.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/dock/terminal/terminal-icons.tsx"],"sourcesContent":["/**\n * dock/terminal/terminal-icons.tsx — the Terminal / Preview panes' own 16px\n * glyphs (unit C4). Same grammar as components/primitives/icons.tsx (16-unit\n * box, 1.5 stroke, round caps, currentColor, decorative) so they sit beside\n * the shared set; kept here because the shared set is not this unit's file.\n */\nimport type { ReactNode, SVGProps } from 'react';\n\nexport interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, 'children' | 'viewBox'> {\n size?: number;\n}\n\nfunction Glyph({ size = 16, children, ...rest }: GlyphProps & { children: ReactNode }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5}\n strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\" focusable=\"false\" {...rest}>\n {children}\n </svg>\n );\n}\n\nexport function TerminalGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"1.75\" y=\"2.75\" width=\"12.5\" height=\"10.5\" rx=\"1.5\" /><path d=\"m4.5 6.25 2 1.75-2 1.75M8.25 10h3\" /></Glyph>;\n}\n\nexport function PreviewGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"1.75\" y=\"2.75\" width=\"12.5\" height=\"10.5\" rx=\"1.5\" /><path d=\"M1.75 5.75h12.5M4 4.25h.01M5.75 4.25h.01\" /></Glyph>;\n}\n\nexport function ChevronDownGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"m4.5 6.5 3.5 3.5 3.5-3.5\" /></Glyph>;\n}\n\n/** Screen-reader mode: a speaker with sound lines. */\nexport function ScreenReaderGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M2.5 6v4h2.5l3.5 3V3L5 6H2.5Z\" /><path d=\"M11 5.5a3.5 3.5 0 0 1 0 5M12.75 3.75a6 6 0 0 1 0 8.5\" /></Glyph>;\n}\n\nexport function ArrowLeftGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M13 8H3.5M7.5 4 3.5 8l4 4\" /></Glyph>;\n}\n\nexport function ArrowRightGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M3 8h9.5M8.5 4l4 4-4 4\" /></Glyph>;\n}\n\nexport function ReloadGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M13 8a5 5 0 1 1-1.46-3.54\" /><path d=\"M13 2.75v2.5h-2.5\" /></Glyph>;\n}\n\nexport function DesktopGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"1.75\" y=\"2.75\" width=\"12.5\" height=\"8.5\" rx=\"1.25\" /><path d=\"M6 13.75h4M8 11.25v2.5\" /></Glyph>;\n}\n\nexport function PhoneGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"4.75\" y=\"1.75\" width=\"6.5\" height=\"12.5\" rx=\"1.5\" /><path d=\"M7.25 12h1.5\" /></Glyph>;\n}\n\nexport function PlayGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M5 3.5v9l7-4.5-7-4.5Z\" /></Glyph>;\n}\n\nexport function FileGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M9 1.75H4.25a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V5.5L9 1.75Z\" /><path d=\"M9 1.75V5.5h3.75\" /></Glyph>;\n}\n\nexport function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AAO,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,cAAgB,CAAA,CAAQ,GACpH,CAEA,SAAgB,EAAU,EAAe,CACvC,OAAO,EAAA,EAAA,IAAA,CAAC,EAAD,CAAO,GAAI,EAAG,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,uBAAyB,CAAA,CAAQ,CAAA,CAChE,CAEA,SAAgB,EAAU,EAAe,CACvC,OAAO,EAAA,EAAA,KAAA,CAAC,EAAD,CAAO,GAAI,EAAX,SAAA,EAAc,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,6EAA+E,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,kBAAoB,CAAA,CAAQ,GACnJ,CAEA,SAAgB,EAAY,EAAe,CACzC,OAAO,EAAA,EAAA,KAAA,CAAC,EAAD,CAAO,GAAI,EAAX,SAAA,EAAc,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,OAAO,EAAE,OAAO,MAAM,OAAO,OAAO,MAAM,GAAG,GAAK,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,OAAO,EAAE,OAAO,MAAM,OAAO,OAAO,MAAM,GAAG,GAAK,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,6BAA+B,CAAA,CAAQ,GAC5L"}
1
+ {"version":3,"file":"terminal-icons-D2xe-aM1.js","names":[],"sources":["../../../../../../src/web-ui/routes/verse/dock/terminal/terminal-icons.tsx"],"sourcesContent":["/**\n * dock/terminal/terminal-icons.tsx — the Terminal / Preview panes' own 16px\n * glyphs (unit C4). Same grammar as components/primitives/icons.tsx (16-unit\n * box, 1.5 stroke, round caps, currentColor, decorative) so they sit beside\n * the shared set; kept here because the shared set is not this unit's file.\n */\nimport type { ReactNode, SVGProps } from 'react';\n\nexport interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, 'children' | 'viewBox'> {\n size?: number;\n}\n\nfunction Glyph({ size = 16, children, ...rest }: GlyphProps & { children: ReactNode }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5}\n strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\" focusable=\"false\" {...rest}>\n {children}\n </svg>\n );\n}\n\nexport function TerminalGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"1.75\" y=\"2.75\" width=\"12.5\" height=\"10.5\" rx=\"1.5\" /><path d=\"m4.5 6.25 2 1.75-2 1.75M8.25 10h3\" /></Glyph>;\n}\n\nexport function PreviewGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"1.75\" y=\"2.75\" width=\"12.5\" height=\"10.5\" rx=\"1.5\" /><path d=\"M1.75 5.75h12.5M4 4.25h.01M5.75 4.25h.01\" /></Glyph>;\n}\n\nexport function ChevronDownGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"m4.5 6.5 3.5 3.5 3.5-3.5\" /></Glyph>;\n}\n\n/** Screen-reader mode: a speaker with sound lines. */\nexport function ScreenReaderGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M2.5 6v4h2.5l3.5 3V3L5 6H2.5Z\" /><path d=\"M11 5.5a3.5 3.5 0 0 1 0 5M12.75 3.75a6 6 0 0 1 0 8.5\" /></Glyph>;\n}\n\nexport function ArrowLeftGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M13 8H3.5M7.5 4 3.5 8l4 4\" /></Glyph>;\n}\n\nexport function ArrowRightGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M3 8h9.5M8.5 4l4 4-4 4\" /></Glyph>;\n}\n\nexport function ReloadGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M13 8a5 5 0 1 1-1.46-3.54\" /><path d=\"M13 2.75v2.5h-2.5\" /></Glyph>;\n}\n\nexport function DesktopGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"1.75\" y=\"2.75\" width=\"12.5\" height=\"8.5\" rx=\"1.25\" /><path d=\"M6 13.75h4M8 11.25v2.5\" /></Glyph>;\n}\n\nexport function PhoneGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"4.75\" y=\"1.75\" width=\"6.5\" height=\"12.5\" rx=\"1.5\" /><path d=\"M7.25 12h1.5\" /></Glyph>;\n}\n\nexport function PlayGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M5 3.5v9l7-4.5-7-4.5Z\" /></Glyph>;\n}\n\nexport function FileGlyph(p: GlyphProps) {\n return <Glyph {...p}><path d=\"M9 1.75H4.25a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V5.5L9 1.75Z\" /><path d=\"M9 1.75V5.5h3.75\" /></Glyph>;\n}\n\nexport function ServerGlyph(p: GlyphProps) {\n return <Glyph {...p}><rect x=\"2.25\" y=\"2.25\" width=\"11.5\" height=\"4.5\" rx=\"1\" /><rect x=\"2.25\" y=\"9.25\" width=\"11.5\" height=\"4.5\" rx=\"1\" /><path d=\"M4.75 4.5h.01M4.75 11.5h.01\" /></Glyph>;\n}\n"],"mappings":"kDAYA,SAAS,EAAM,CAAE,OAAO,GAAI,WAAU,GAAG,GAA8C,CACrF,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,MAAO,EAAM,OAAQ,EAAM,QAAQ,YAAY,KAAK,OAAO,OAAO,eAAe,YAAa,IACjG,cAAc,QAAQ,eAAe,QAAQ,cAAY,OAAO,UAAU,QAAQ,GAAI,EACrF,UACE,CAAA,CAET,CAEA,SAAgB,EAAc,EAAe,CAC3C,OAAO,EAAA,EAAA,KAAA,CAAC,EAAD,CAAO,GAAI,EAAX,SAAA,EAAc,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,OAAO,EAAE,OAAO,MAAM,OAAO,OAAO,OAAO,GAAG,KAAO,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,OAAD,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CAAC,OAAD,CAAM,EAAE,OAAO,EAAE,OAAO,MAAM,OAAO,OAAO,MAAM,GAAG,GAAK,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,EAAE,6BAA+B,CAAA,CAAQ,GAC5L"}
@@ -1,2 +1,2 @@
1
- import{l as e,s as t}from"./global-Di2PUgj4.js";var n=`2.1.280`;function r(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function i(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:null}function a(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:null}function o(e,t,n=!1){let r=e[t];return typeof r==`boolean`?r:n}function s(e){return Array.isArray(e)?e:[]}var c=/(launcher\.mjs|native-profiles|account-connections|console-startup|\/\.ashlr\b|Bearer\s|--token\b)/i;function l(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length===0||t.length>200||c.test(t)||/[\r\n]/.test(t)?null:t}function u(e){return e===null?null:Math.max(0,Math.min(100,e))}function d(e){let t=r(e);if(!t)return null;let n=i(t,`id`)??i(t,`label`);if(n===null)return null;let s=r(t.nativeReport),c=o(t,`limitReached`)||o(t,`rateLimitReached`),l=t.measured;return{id:n,label:i(t,`label`),usedPercent:u(a(t,`usedPercent`)??a(t,`used_percent`)),resetsAt:i(t,`resetsAt`)??i(t,`resets_at`),resetDescription:(s?i(s,`resetDescription`):null)??i(t,`resetDescription`),limitReached:c,measured:typeof l==`boolean`?l:!c}}function f(e){let t=r(e);if(!t)return null;let n=i(t,`balance`),s=n===null?a(t,`balance`):Number.parseFloat(n);return{hasCredits:o(t,`hasCredits`)||o(t,`has_credits`),unlimited:o(t,`unlimited`),balance:n,balanceValue:typeof s==`number`&&Number.isFinite(s)?s:null}}var p=[`claude`,`codex`,`grok`];function m(e){let t=r(e);if(!t)return null;let n=i(t,`id`),a=i(t,`provider`);if(n===null||a===null||!p.includes(a))return null;let o=s(t.windows).map(d).filter(e=>e!==null),c=i(t,`state`),u=i(t,`authentication`),m=r(t.unsupported);return{id:n,label:i(t,`label`)??n,provider:a,state:c===`checking`||c===`observed`||c===`signed-out`||c===`unavailable`?c:`unavailable`,authentication:u===`signed-in`||u===`signed-out`?u:`unknown`,health:i(t,`health`),planType:i(t,`planType`)??i(t,`plan_type`),observedAt:i(t,`observedAt`),windows:o,binding:d(t.binding),credits:f(t.credits),reason:i(t,`reason`),unsupported:h(t,m),reconnectCommand:l(t.reconnectCommand),notes:s(t.notes).filter(e=>typeof e==`string`)}}function h(e,t){if(t)return{code:i(t,`code`)??`usage-version-unsupported`,pinnedVersion:i(t,`pinnedVersion`)??i(t,`version`)};let r=i(e,`reason`);return r===`usage-version-unsupported`?{code:r,pinnedVersion:n}:null}function g(e){let t=i(e,`collectorNote`);if(t)return t;let n=r(e.collector);return!n||i(n,`owner`)!==`another-collector`?null:i(n,`note`)??`Another collector process owns the quota-refresh lease, so these readings are read-only and may be staler than this server’s poll interval.`}function _(e){let t=r(e);if(!t)return null;let n=Array.isArray(t.accounts)?t.accounts:Array.isArray(e)?e:null;return n===null?null:{sampledAt:i(t,`sampledAt`),refreshing:o(t,`refreshing`),accounts:n.map(m).filter(e=>e!==null),collectorNote:g(t)}}function v(e){let t=r(e);if(!t)return null;let n=i(t,`day`);return n===null||!/^\d{4}-\d{2}-\d{2}$/.test(n)?null:{day:n,tokensIn:a(t,`tokensIn`)??0,tokensOut:a(t,`tokensOut`)??0,estCostUsd:a(t,`estCostUsd`)??0,sessions:a(t,`sessions`)??0,cacheRead:a(t,`cacheRead`),cacheWrite:a(t,`cacheWrite`),cacheHitRate:a(t,`cacheHitRate`)}}function y(e,t){let n=r(e),a=n?Array.isArray(n.byDay)?n.byDay:Array.isArray(n.days)?n.days:null:Array.isArray(e)?e:null;if(a===null)return null;let c=n?i(n,`window`):null;return{window:c===`7d`||c===`30d`?c:t,days:a.map(v).filter(e=>e!==null).sort((e,t)=>e.day.localeCompare(t.day)),generatedAt:n?i(n,`generatedAt`):null,estimated:!n||o(n,`estimated`,!0),caveats:n?s(n.caveats).filter(e=>typeof e==`string`):[]}}function b(e,t){let n=r(e);if(!n)return null;let s=i(n,`label`)??i(n,`id`)??i(n,`name`)??i(n,`model`);if(s===null)return null;let c=n.capabilities,l=i(n,`state`),d=n.supportsTools,f=a(n,`nativeContextLength`)??a(n,`nativeContext`),p=a(n,`contextLength`)??a(n,`configuredContext`),m=i(n,`placement`);return{name:s,runtime:t,loaded:l===null?o(n,`loaded`)||o(n,`resident`):l===`loaded`,sizeBytes:a(n,`sizeBytes`)??a(n,`size`),sizeVramBytes:a(n,`sizeVramBytes`)??a(n,`size_vram`),placement:m===`gpu`||m===`cpu`||m===`split`?m:`unknown`,gpuPercent:u(a(n,`gpuPercent`)),memoryPercent:u(a(n,`memoryPercent`)),family:i(n,`family`),arch:i(n,`arch`),expiresAt:i(n,`expiresAt`)??i(n,`expires_at`),parameterSize:i(n,`parameterSize`)??i(n,`parameter_size`),quantization:i(n,`quantization`)??i(n,`quantization_level`),nativeContext:f,configuredContext:p!==null&&f!==null&&p===f?null:p,capabilities:Array.isArray(c)?c.filter(e=>typeof e==`string`):null,supportsTools:typeof d==`boolean`?d:null}}function x(e,t){let n=r(e);if(!n)return null;let s=Array.isArray(n.models)?n.models:null;if(s===null)return null;let c=s.map(e=>b(e,t)).filter(e=>e!==null),l=o(n,`stale`);return{models:c,status:{runtime:t,reachable:o(n,`reachable`),reason:i(n,`reason`),stale:l,staleForMs:l?a(n,`staleForMs`):null,modelCount:c.length}}}function S(e){let t=r(e);if(!t)return null;let n=x(t.ollama,`ollama`),c=x(t.lmStudio??t.lmstudio,`lmstudio`);if(n!==null||c!==null){let e=[n,c].filter(e=>e!==null),o=e.some(e=>e.status.reachable),l=r(t.machine);return{reachable:o,models:e.flatMap(e=>e.models),memoryBudgetBytes:(l?a(l,`totalMemoryBytes`):null)??a(t,`memoryBudgetBytes`)??a(t,`memoryBudget`),freeMemoryBytes:l?a(l,`freeMemoryBytes`):null,reason:o?null:e.map(e=>e.status.reason).find(e=>e!==null)??null,runtimes:e.map(e=>e.status),notes:s(t.notes).filter(e=>typeof e==`string`),sampledAt:i(t,`sampledAt`)}}let l=Array.isArray(t.models)?t.models:null;return l===null?null:{reachable:o(t,`reachable`,!0),models:l.map(e=>b(e,null)).filter(e=>e!==null),memoryBudgetBytes:a(t,`memoryBudgetBytes`)??a(t,`memoryBudget`),freeMemoryBytes:a(t,`freeMemoryBytes`),reason:i(t,`reason`),runtimes:[],notes:s(t.notes).filter(e=>typeof e==`string`),sampledAt:i(t,`sampledAt`)}}var C=`verse-usage-frontier`,w=`verse-usage-control`,T={key:C,fetch:t=>e(`/api/usage`,t)};function E(e){return e instanceof t?e.status===404?`This server does not expose /api/verse/control, so configured caps and today’s spend are unavailable here.`:`Configured caps unavailable (HTTP ${e.status}).`:`Configured caps unavailable: the request failed.`}var D={key:w,fetch:async n=>{try{return{raw:await e(`/api/verse/control`,n),available:!0,reason:null}}catch(e){if(e instanceof t&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return{raw:null,available:!1,reason:E(e)}}}},O=`verse-usage-accounts`,k=`verse-usage-local-models`,A=`verse-usage-series`;function j(e,n){return n instanceof t?n.status===404?`This server does not expose ${e} yet, so this panel has no source.`:`${e} answered HTTP ${n.status}.`:`${e} could not be reached.`}function M(n){return async r=>{try{return{raw:await e(n,r),available:!0,reason:null}}catch(e){if(e instanceof t&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return{raw:null,available:!1,reason:j(n,e)}}}}var N={key:O,fetch:M(`/api/verse/accounts`)},P=[350,1200],F=M(`/api/verse/local-models`);function I(e){if(!e.available)return!1;let t=S(e.raw);return t!==null&&!t.reachable}function L(e,t){return new Promise((n,r)=>{if(t?.aborted){r(new DOMException(`Aborted`,`AbortError`));return}let i=()=>{clearTimeout(a),r(new DOMException(`Aborted`,`AbortError`))},a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);t?.addEventListener(`abort`,i,{once:!0})})}var R={key:k,fetch:async e=>{let t=await F(e);for(let n of P){if(!I(t))return t;await L(n,e),t=await F(e)}return t}},z={"7d":{key:`${A}:7d`,fetch:M(`/api/verse/usage-series?window=7d`)},"30d":{key:`${A}:30d`,fetch:M(`/api/verse/usage-series?window=30d`)}};function B(e){return z[e]}export{R as a,y as c,D as i,B as n,_ as o,N as r,S as s,T as t};
2
- //# sourceMappingURL=usage-queries-Bn8ccqyN.js.map
1
+ import{c as e,o as t}from"./global-oEl9Qj8u.js";var n=`2.1.280`;function r(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function i(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:null}function a(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:null}function o(e,t,n=!1){let r=e[t];return typeof r==`boolean`?r:n}function s(e){return Array.isArray(e)?e:[]}var c=/(launcher\.mjs|native-profiles|account-connections|console-startup|\/\.ashlr\b|Bearer\s|--token\b)/i;function l(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length===0||t.length>200||c.test(t)||/[\r\n]/.test(t)?null:t}function u(e){return e===null?null:Math.max(0,Math.min(100,e))}function d(e){let t=r(e);if(!t)return null;let n=i(t,`id`)??i(t,`label`);if(n===null)return null;let s=r(t.nativeReport),c=o(t,`limitReached`)||o(t,`rateLimitReached`),l=t.measured;return{id:n,label:i(t,`label`),usedPercent:u(a(t,`usedPercent`)??a(t,`used_percent`)),resetsAt:i(t,`resetsAt`)??i(t,`resets_at`),resetDescription:(s?i(s,`resetDescription`):null)??i(t,`resetDescription`),limitReached:c,measured:typeof l==`boolean`?l:!c}}function f(e){let t=r(e);if(!t)return null;let n=i(t,`balance`),s=n===null?a(t,`balance`):Number.parseFloat(n);return{hasCredits:o(t,`hasCredits`)||o(t,`has_credits`),unlimited:o(t,`unlimited`),balance:n,balanceValue:typeof s==`number`&&Number.isFinite(s)?s:null}}var p=[`claude`,`codex`,`grok`];function m(e){let t=r(e);if(!t)return null;let n=i(t,`id`),a=i(t,`provider`);if(n===null||a===null||!p.includes(a))return null;let o=s(t.windows).map(d).filter(e=>e!==null),c=i(t,`state`),u=i(t,`authentication`),m=r(t.unsupported);return{id:n,label:i(t,`label`)??n,provider:a,state:c===`checking`||c===`observed`||c===`signed-out`||c===`unavailable`?c:`unavailable`,authentication:u===`signed-in`||u===`signed-out`?u:`unknown`,health:i(t,`health`),planType:i(t,`planType`)??i(t,`plan_type`),observedAt:i(t,`observedAt`),windows:o,binding:d(t.binding),credits:f(t.credits),reason:i(t,`reason`),unsupported:h(t,m),reconnectCommand:l(t.reconnectCommand),notes:s(t.notes).filter(e=>typeof e==`string`)}}function h(e,t){if(t)return{code:i(t,`code`)??`usage-version-unsupported`,pinnedVersion:i(t,`pinnedVersion`)??i(t,`version`)};let r=i(e,`reason`);return r===`usage-version-unsupported`?{code:r,pinnedVersion:n}:null}function g(e){let t=i(e,`collectorNote`);if(t)return t;let n=r(e.collector);return!n||i(n,`owner`)!==`another-collector`?null:i(n,`note`)??`Another collector process owns the quota-refresh lease, so these readings are read-only and may be staler than this server’s poll interval.`}function _(e){let t=r(e);if(!t)return null;let n=Array.isArray(t.accounts)?t.accounts:Array.isArray(e)?e:null;return n===null?null:{sampledAt:i(t,`sampledAt`),refreshing:o(t,`refreshing`),accounts:n.map(m).filter(e=>e!==null),collectorNote:g(t)}}function v(e){let t=r(e);if(!t)return null;let n=i(t,`day`);return n===null||!/^\d{4}-\d{2}-\d{2}$/.test(n)?null:{day:n,tokensIn:a(t,`tokensIn`)??0,tokensOut:a(t,`tokensOut`)??0,estCostUsd:a(t,`estCostUsd`)??0,sessions:a(t,`sessions`)??0,cacheRead:a(t,`cacheRead`),cacheWrite:a(t,`cacheWrite`),cacheHitRate:a(t,`cacheHitRate`)}}function y(e,t){let n=r(e),a=n?Array.isArray(n.byDay)?n.byDay:Array.isArray(n.days)?n.days:null:Array.isArray(e)?e:null;if(a===null)return null;let c=n?i(n,`window`):null;return{window:c===`7d`||c===`30d`?c:t,days:a.map(v).filter(e=>e!==null).sort((e,t)=>e.day.localeCompare(t.day)),generatedAt:n?i(n,`generatedAt`):null,estimated:!n||o(n,`estimated`,!0),caveats:n?s(n.caveats).filter(e=>typeof e==`string`):[]}}function b(e,t){let n=r(e);if(!n)return null;let s=i(n,`label`)??i(n,`id`)??i(n,`name`)??i(n,`model`);if(s===null)return null;let c=n.capabilities,l=i(n,`state`),d=n.supportsTools,f=a(n,`nativeContextLength`)??a(n,`nativeContext`),p=a(n,`contextLength`)??a(n,`configuredContext`),m=i(n,`placement`);return{name:s,runtime:t,loaded:l===null?o(n,`loaded`)||o(n,`resident`):l===`loaded`,sizeBytes:a(n,`sizeBytes`)??a(n,`size`),sizeVramBytes:a(n,`sizeVramBytes`)??a(n,`size_vram`),placement:m===`gpu`||m===`cpu`||m===`split`?m:`unknown`,gpuPercent:u(a(n,`gpuPercent`)),memoryPercent:u(a(n,`memoryPercent`)),family:i(n,`family`),arch:i(n,`arch`),expiresAt:i(n,`expiresAt`)??i(n,`expires_at`),parameterSize:i(n,`parameterSize`)??i(n,`parameter_size`),quantization:i(n,`quantization`)??i(n,`quantization_level`),nativeContext:f,configuredContext:p!==null&&f!==null&&p===f?null:p,capabilities:Array.isArray(c)?c.filter(e=>typeof e==`string`):null,supportsTools:typeof d==`boolean`?d:null}}function x(e,t){let n=r(e);if(!n)return null;let s=Array.isArray(n.models)?n.models:null;if(s===null)return null;let c=s.map(e=>b(e,t)).filter(e=>e!==null),l=o(n,`stale`);return{models:c,status:{runtime:t,reachable:o(n,`reachable`),reason:i(n,`reason`),stale:l,staleForMs:l?a(n,`staleForMs`):null,modelCount:c.length}}}function S(e){let t=r(e);if(!t)return null;let n=x(t.ollama,`ollama`),c=x(t.lmStudio??t.lmstudio,`lmstudio`);if(n!==null||c!==null){let e=[n,c].filter(e=>e!==null),o=e.some(e=>e.status.reachable),l=r(t.machine);return{reachable:o,models:e.flatMap(e=>e.models),memoryBudgetBytes:(l?a(l,`totalMemoryBytes`):null)??a(t,`memoryBudgetBytes`)??a(t,`memoryBudget`),freeMemoryBytes:l?a(l,`freeMemoryBytes`):null,reason:o?null:e.map(e=>e.status.reason).find(e=>e!==null)??null,runtimes:e.map(e=>e.status),notes:s(t.notes).filter(e=>typeof e==`string`),sampledAt:i(t,`sampledAt`)}}let l=Array.isArray(t.models)?t.models:null;return l===null?null:{reachable:o(t,`reachable`,!0),models:l.map(e=>b(e,null)).filter(e=>e!==null),memoryBudgetBytes:a(t,`memoryBudgetBytes`)??a(t,`memoryBudget`),freeMemoryBytes:a(t,`freeMemoryBytes`),reason:i(t,`reason`),runtimes:[],notes:s(t.notes).filter(e=>typeof e==`string`),sampledAt:i(t,`sampledAt`)}}var C=`verse-usage-frontier`,w=`verse-usage-control`,T={key:C,fetch:t=>e(`/api/usage`,t)};function E(e){return e instanceof t?e.status===404?`This server does not expose /api/verse/control, so configured caps and today’s spend are unavailable here.`:`Configured caps unavailable (HTTP ${e.status}).`:`Configured caps unavailable: the request failed.`}var D={key:w,fetch:async n=>{try{return{raw:await e(`/api/verse/control`,n),available:!0,reason:null}}catch(e){if(e instanceof t&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return{raw:null,available:!1,reason:E(e)}}}},O=`verse-usage-accounts`,k=`verse-usage-local-models`,A=`verse-usage-series`;function j(e,n){return n instanceof t?n.status===404?`This server does not expose ${e} yet, so this panel has no source.`:`${e} answered HTTP ${n.status}.`:`${e} could not be reached.`}function M(n){return async r=>{try{return{raw:await e(n,r),available:!0,reason:null}}catch(e){if(e instanceof t&&e.status===401||e instanceof DOMException&&e.name===`AbortError`)throw e;return{raw:null,available:!1,reason:j(n,e)}}}}var N={key:O,fetch:M(`/api/verse/accounts`)},P=[350,1200],F=M(`/api/verse/local-models`);function I(e){if(!e.available)return!1;let t=S(e.raw);return t!==null&&!t.reachable}function L(e,t){return new Promise((n,r)=>{if(t?.aborted){r(new DOMException(`Aborted`,`AbortError`));return}let i=()=>{clearTimeout(a),r(new DOMException(`Aborted`,`AbortError`))},a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);t?.addEventListener(`abort`,i,{once:!0})})}var R={key:k,fetch:async e=>{let t=await F(e);for(let n of P){if(!I(t))return t;await L(n,e),t=await F(e)}return t}},z={"7d":{key:`${A}:7d`,fetch:M(`/api/verse/usage-series?window=7d`)},"30d":{key:`${A}:30d`,fetch:M(`/api/verse/usage-series?window=30d`)}};function B(e){return z[e]}export{R as a,y as c,D as i,B as n,_ as o,N as r,S as s,T as t};
2
+ //# sourceMappingURL=usage-queries-BZuAANlI.js.map