@ashlr/hub 3.5.0 → 3.7.0

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 (210) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/README.md +3 -0
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/activation.d.ts +41 -0
  5. package/dist/cli/activation.js +485 -0
  6. package/dist/cli/activation.js.map +1 -0
  7. package/dist/core/daemon/cutoff-checkpoint-scheduler.js +7 -0
  8. package/dist/core/daemon/cutoff-checkpoint-scheduler.js.map +1 -1
  9. package/dist/core/daemon/loop.d.ts +19 -0
  10. package/dist/core/daemon/loop.js +235 -5
  11. package/dist/core/daemon/loop.js.map +1 -1
  12. package/dist/core/daemon/overnight-status.d.ts +152 -0
  13. package/dist/core/daemon/overnight-status.js +275 -0
  14. package/dist/core/daemon/overnight-status.js.map +1 -0
  15. package/dist/core/daemon/post-merge-halt.d.ts +212 -0
  16. package/dist/core/daemon/post-merge-halt.js +503 -0
  17. package/dist/core/daemon/post-merge-halt.js.map +1 -0
  18. package/dist/core/daemon/run-window.d.ts +218 -0
  19. package/dist/core/daemon/run-window.js +420 -0
  20. package/dist/core/daemon/run-window.js.map +1 -0
  21. package/dist/core/fleet/external-skill-audit.js +1 -1
  22. package/dist/core/fleet/external-skill-audit.js.map +1 -1
  23. package/dist/core/fleet/generated-repair-resolution.d.ts +36 -0
  24. package/dist/core/fleet/generated-repair-resolution.js +245 -0
  25. package/dist/core/fleet/generated-repair-resolution.js.map +1 -0
  26. package/dist/core/local-runtime/llama/config.d.ts +28 -6
  27. package/dist/core/local-runtime/llama/config.js +28 -6
  28. package/dist/core/local-runtime/llama/config.js.map +1 -1
  29. package/dist/core/local-runtime/llama/port.d.ts +17 -0
  30. package/dist/core/local-runtime/llama/port.js +47 -0
  31. package/dist/core/local-runtime/llama/port.js.map +1 -0
  32. package/dist/core/local-runtime/llama/proxy-host.d.ts +54 -0
  33. package/dist/core/local-runtime/llama/proxy-host.js +159 -0
  34. package/dist/core/local-runtime/llama/proxy-host.js.map +1 -0
  35. package/dist/core/local-runtime/llama/proxy-process.d.ts +148 -0
  36. package/dist/core/local-runtime/llama/proxy-process.js +250 -0
  37. package/dist/core/local-runtime/llama/proxy-process.js.map +1 -0
  38. package/dist/core/local-runtime/llama/proxy-record.d.ts +40 -0
  39. package/dist/core/local-runtime/llama/proxy-record.js +133 -0
  40. package/dist/core/local-runtime/llama/proxy-record.js.map +1 -0
  41. package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +118 -0
  42. package/dist/core/local-runtime/llama/proxy-supervisor.js +511 -0
  43. package/dist/core/local-runtime/llama/proxy-supervisor.js.map +1 -0
  44. package/dist/core/web/public/next/assets/App-Cgi6j1Gk.css +1 -0
  45. package/dist/core/web/public/next/assets/App-vtaHB9mp.js +7 -0
  46. package/dist/core/web/public/next/assets/App-vtaHB9mp.js.map +1 -0
  47. package/dist/core/web/public/next/assets/ApprovalsSection-B-bFJ0I9.js +2 -0
  48. package/dist/core/web/public/next/assets/ApprovalsSection-B-bFJ0I9.js.map +1 -0
  49. package/dist/core/web/public/next/assets/ApprovalsSection-Su-NUTis.css +1 -0
  50. package/dist/core/web/public/next/assets/AutonomySection-CHjxJt2z.css +1 -0
  51. package/dist/core/web/public/next/assets/AutonomySection-DoqmsCjw.js +2 -0
  52. package/dist/core/web/public/next/assets/AutonomySection-DoqmsCjw.js.map +1 -0
  53. package/dist/core/web/public/next/assets/ChatSection-BfnLe5dT.css +1 -0
  54. package/dist/core/web/public/next/assets/ChatSection-vNPIJffd.js +80 -0
  55. package/dist/core/web/public/next/assets/ChatSection-vNPIJffd.js.map +1 -0
  56. package/dist/core/web/public/next/assets/ConfirmDialog-Dd2APQhB.js +2 -0
  57. package/dist/core/web/public/next/assets/ConfirmDialog-Dd2APQhB.js.map +1 -0
  58. package/dist/core/web/public/next/assets/{ConfirmDialog-cYuivhCX.css → ConfirmDialog-Dx15x0Ho.css} +1 -1
  59. package/dist/core/web/public/next/assets/Dialog-CPM9JxBc.js +2 -0
  60. package/dist/core/web/public/next/assets/Dialog-CPM9JxBc.js.map +1 -0
  61. package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
  62. package/dist/core/web/public/next/assets/DiffViewer-B84qVef9.js +7 -0
  63. package/dist/core/web/public/next/assets/DiffViewer-B84qVef9.js.map +1 -0
  64. package/dist/core/web/public/next/assets/DiffViewer-C8HHTnVE.css +1 -0
  65. package/dist/core/web/public/next/assets/McpSection-CEUpV_5X.js +2 -0
  66. package/dist/core/web/public/next/assets/McpSection-CEUpV_5X.js.map +1 -0
  67. package/dist/core/web/public/next/assets/McpSection-D88QlDpG.css +1 -0
  68. package/dist/core/web/public/next/assets/Meter--h3MmZS-.js +2 -0
  69. package/dist/core/web/public/next/assets/Meter--h3MmZS-.js.map +1 -0
  70. package/dist/core/web/public/next/assets/Meter-CLcr-4wS.css +1 -0
  71. package/dist/core/web/public/next/assets/{MutationTokenDialog-jWLLCxWn.css → MutationTokenDialog-CrfJ0PdD.css} +1 -1
  72. package/dist/core/web/public/next/assets/MutationTokenDialog-DA8t97XT.js +2 -0
  73. package/dist/core/web/public/next/assets/MutationTokenDialog-DA8t97XT.js.map +1 -0
  74. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Bq7Vyud0.js +7 -0
  75. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Bq7Vyud0.js.map +1 -0
  76. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-CM_8pJs6.css +1 -0
  77. package/dist/core/web/public/next/assets/RouteErrorBoundary-Badio_uO.js +2 -0
  78. package/dist/core/web/public/next/assets/RouteErrorBoundary-Badio_uO.js.map +1 -0
  79. package/dist/core/web/public/next/assets/RouteErrorBoundary-ekyMXAK8.css +1 -0
  80. package/dist/core/web/public/next/assets/SettingsSection-BII7TTSD.css +1 -0
  81. package/dist/core/web/public/next/assets/SettingsSection-BwrpQlpP.js +2 -0
  82. package/dist/core/web/public/next/assets/SettingsSection-BwrpQlpP.js.map +1 -0
  83. package/dist/core/web/public/next/assets/UniverseConsoleApp-Dh7A-hLD.css +1 -0
  84. package/dist/core/web/public/next/assets/UniverseConsoleApp-_FSohAdN.js +2 -0
  85. package/dist/core/web/public/next/assets/UniverseConsoleApp-_FSohAdN.js.map +1 -0
  86. package/dist/core/web/public/next/assets/UniverseView-Bqa8DH57.css +1 -0
  87. package/dist/core/web/public/next/assets/UniverseView-DqcXbed4.js +9 -0
  88. package/dist/core/web/public/next/assets/UniverseView-DqcXbed4.js.map +1 -0
  89. package/dist/core/web/public/next/assets/UsageSection-Bq6Daaby.js +2 -0
  90. package/dist/core/web/public/next/assets/UsageSection-Bq6Daaby.js.map +1 -0
  91. package/dist/core/web/public/next/assets/UsageSection-DwgNOYvi.css +1 -0
  92. package/dist/core/web/public/next/assets/VerseConsoleApp-CMkCizvL.css +1 -0
  93. package/dist/core/web/public/next/assets/VerseConsoleApp-CsIQv9id.js +3 -0
  94. package/dist/core/web/public/next/assets/VerseConsoleApp-CsIQv9id.js.map +1 -0
  95. package/dist/core/web/public/next/assets/charts-CTZJ-JrH.js +2 -0
  96. package/dist/core/web/public/next/assets/charts-CTZJ-JrH.js.map +1 -0
  97. package/dist/core/web/public/next/assets/charts-CsrtT4rk.css +1 -0
  98. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js +2 -0
  99. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js.map +1 -0
  100. package/dist/core/web/public/next/assets/format-BNYWGJat.js +2 -0
  101. package/dist/core/web/public/next/assets/format-BNYWGJat.js.map +1 -0
  102. package/dist/core/web/public/next/assets/global-D6bTxIRn.js +2 -0
  103. package/dist/core/web/public/next/assets/global-D6bTxIRn.js.map +1 -0
  104. package/dist/core/web/public/next/assets/global-z-JfD3ow.css +1 -0
  105. package/dist/core/web/public/next/assets/icons-D9vlf85u.js +2 -0
  106. package/dist/core/web/public/next/assets/icons-D9vlf85u.js.map +1 -0
  107. package/dist/core/web/public/next/assets/index-CZamKRUg.js +11 -0
  108. package/dist/core/web/public/next/assets/index-CZamKRUg.js.map +1 -0
  109. package/dist/core/web/public/next/assets/queries-B8eBnFox.js +2 -0
  110. package/dist/core/web/public/next/assets/queries-B8eBnFox.js.map +1 -0
  111. package/dist/core/web/public/next/assets/use-guarded-action-bzrVVAYq.js +2 -0
  112. package/dist/core/web/public/next/assets/use-guarded-action-bzrVVAYq.js.map +1 -0
  113. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js +2 -0
  114. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js.map +1 -0
  115. package/dist/core/web/public/next/assets/workspace-model-v0a1gl-C.js +2 -0
  116. package/dist/core/web/public/next/assets/workspace-model-v0a1gl-C.js.map +1 -0
  117. package/dist/core/web/public/next/index.html +1 -1
  118. package/dist/release-dependency-inventory.json +1 -1
  119. package/node_modules/marked/README.md +8 -0
  120. package/node_modules/marked/bin/main.js +12 -11
  121. package/node_modules/marked/lib/marked.d.ts +88 -25
  122. package/node_modules/marked/lib/marked.esm.js +50 -44
  123. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  124. package/node_modules/marked/lib/marked.umd.js +50 -44
  125. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  126. package/node_modules/marked/man/marked.1 +1 -1
  127. package/node_modules/marked/package.json +21 -21
  128. package/package.json +13 -8
  129. package/dist/core/web/public/next/assets/App-BCKqSppK.css +0 -1
  130. package/dist/core/web/public/next/assets/App-CsbPYQqy.js +0 -16
  131. package/dist/core/web/public/next/assets/App-CsbPYQqy.js.map +0 -1
  132. package/dist/core/web/public/next/assets/ApprovalsSection-CBZquyLK.js +0 -2
  133. package/dist/core/web/public/next/assets/ApprovalsSection-CBZquyLK.js.map +0 -1
  134. package/dist/core/web/public/next/assets/ApprovalsSection-CRP59wSb.css +0 -1
  135. package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js +0 -2
  136. package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js.map +0 -1
  137. package/dist/core/web/public/next/assets/AutonomySection-DTN6m6QE.css +0 -1
  138. package/dist/core/web/public/next/assets/ChatSection-DiRvNX3Q.css +0 -1
  139. package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js +0 -77
  140. package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js.map +0 -1
  141. package/dist/core/web/public/next/assets/ConfirmDialog-deO0C0iY.js +0 -2
  142. package/dist/core/web/public/next/assets/ConfirmDialog-deO0C0iY.js.map +0 -1
  143. package/dist/core/web/public/next/assets/Dialog-CNd7q89m.js +0 -2
  144. package/dist/core/web/public/next/assets/Dialog-CNd7q89m.js.map +0 -1
  145. package/dist/core/web/public/next/assets/Dialog-DxN7RgB5.css +0 -1
  146. package/dist/core/web/public/next/assets/DiffViewer-DTO0KRuG.js +0 -7
  147. package/dist/core/web/public/next/assets/DiffViewer-DTO0KRuG.js.map +0 -1
  148. package/dist/core/web/public/next/assets/DiffViewer-hN7X6wGT.css +0 -1
  149. package/dist/core/web/public/next/assets/Epistemic-53PikaUI.js +0 -2
  150. package/dist/core/web/public/next/assets/Epistemic-53PikaUI.js.map +0 -1
  151. package/dist/core/web/public/next/assets/Epistemic-DiyMyeaN.css +0 -1
  152. package/dist/core/web/public/next/assets/Meter-CGBsbXUX.css +0 -1
  153. package/dist/core/web/public/next/assets/Meter-DRWZQgr1.js +0 -2
  154. package/dist/core/web/public/next/assets/Meter-DRWZQgr1.js.map +0 -1
  155. package/dist/core/web/public/next/assets/MutationTokenDialog-DYF8n_RD.js +0 -2
  156. package/dist/core/web/public/next/assets/MutationTokenDialog-DYF8n_RD.js.map +0 -1
  157. package/dist/core/web/public/next/assets/RefreshIndicator-DXJQXKyA.js +0 -2
  158. package/dist/core/web/public/next/assets/RefreshIndicator-DXJQXKyA.js.map +0 -1
  159. package/dist/core/web/public/next/assets/RefreshIndicator-O7jUBOmX.css +0 -1
  160. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-DLl4DbGG.css +0 -1
  161. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-hDSEFdLU.js +0 -7
  162. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-hDSEFdLU.js.map +0 -1
  163. package/dist/core/web/public/next/assets/RouteErrorBoundary-BIpdnxp-.css +0 -1
  164. package/dist/core/web/public/next/assets/RouteErrorBoundary-CZd7ln8v.js +0 -2
  165. package/dist/core/web/public/next/assets/RouteErrorBoundary-CZd7ln8v.js.map +0 -1
  166. package/dist/core/web/public/next/assets/SettingsSection-C9Qs9JWW.js +0 -2
  167. package/dist/core/web/public/next/assets/SettingsSection-C9Qs9JWW.js.map +0 -1
  168. package/dist/core/web/public/next/assets/SettingsSection-DGJMdUh2.css +0 -1
  169. package/dist/core/web/public/next/assets/Skeleton-D2JaTXyv.css +0 -1
  170. package/dist/core/web/public/next/assets/Skeleton-YkcOpgFb.js +0 -2
  171. package/dist/core/web/public/next/assets/Skeleton-YkcOpgFb.js.map +0 -1
  172. package/dist/core/web/public/next/assets/StatusBadge-DJw0LSPg.js +0 -2
  173. package/dist/core/web/public/next/assets/StatusBadge-DJw0LSPg.js.map +0 -1
  174. package/dist/core/web/public/next/assets/StatusBadge-TpDqZf6K.css +0 -1
  175. package/dist/core/web/public/next/assets/TableView-Bj-w1O6o.js +0 -2
  176. package/dist/core/web/public/next/assets/TableView-Bj-w1O6o.js.map +0 -1
  177. package/dist/core/web/public/next/assets/TableView-R6Yeztp1.css +0 -1
  178. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bs2fxaen.js +0 -2
  179. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bs2fxaen.js.map +0 -1
  180. package/dist/core/web/public/next/assets/UniverseConsoleApp-CiZZxRPV.css +0 -1
  181. package/dist/core/web/public/next/assets/UniverseView-B6b2hw-8.js +0 -9
  182. package/dist/core/web/public/next/assets/UniverseView-B6b2hw-8.js.map +0 -1
  183. package/dist/core/web/public/next/assets/UniverseView-gBxl6yum.css +0 -1
  184. package/dist/core/web/public/next/assets/UsageSection-C__ziNkV.js +0 -2
  185. package/dist/core/web/public/next/assets/UsageSection-C__ziNkV.js.map +0 -1
  186. package/dist/core/web/public/next/assets/UsageSection-UUYDidOg.css +0 -1
  187. package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js +0 -3
  188. package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js.map +0 -1
  189. package/dist/core/web/public/next/assets/VerseConsoleApp-mOAXvWa6.css +0 -1
  190. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js +0 -2
  191. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js.map +0 -1
  192. package/dist/core/web/public/next/assets/format-fggwu_Rs.js +0 -2
  193. package/dist/core/web/public/next/assets/format-fggwu_Rs.js.map +0 -1
  194. package/dist/core/web/public/next/assets/global-BHjd6fVZ.js +0 -2
  195. package/dist/core/web/public/next/assets/global-BHjd6fVZ.js.map +0 -1
  196. package/dist/core/web/public/next/assets/global-BeRYd1Bu.css +0 -1
  197. package/dist/core/web/public/next/assets/index-CJ-e8YA9.js +0 -2
  198. package/dist/core/web/public/next/assets/index-CJ-e8YA9.js.map +0 -1
  199. package/dist/core/web/public/next/assets/index-CpgkRaTi.js +0 -51
  200. package/dist/core/web/public/next/assets/index-CpgkRaTi.js.map +0 -1
  201. package/dist/core/web/public/next/assets/queries-856qUN3Y.js +0 -2
  202. package/dist/core/web/public/next/assets/queries-856qUN3Y.js.map +0 -1
  203. package/dist/core/web/public/next/assets/use-guarded-action-Bqa2v0a-.css +0 -1
  204. package/dist/core/web/public/next/assets/use-guarded-action-DwaESKVy.js +0 -2
  205. package/dist/core/web/public/next/assets/use-guarded-action-DwaESKVy.js.map +0 -1
  206. package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js +0 -2
  207. package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js.map +0 -1
  208. package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js +0 -2
  209. package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js.map +0 -1
  210. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UniverseView-DqcXbed4.js","names":[],"sources":["../../../../../../src/web-ui/hooks/useScrollRestore.ts","../../../../../../src/web-ui/routes/universe/UniverseView.module.css","../../../../../../src/web-ui/routes/universe/UniverseScope.tsx","../../../../../../src/web-ui/routes/universe/UniverseDeliveries.tsx","../../../../../../src/core/universe/graph-query.ts","../../../../../../src/web-ui/routes/universe/UniverseGraph.module.css","../../../../../../src/web-ui/routes/universe/UniverseGraph.tsx","../../../../../../src/web-ui/data/universe-readiness-queries.ts","../../../../../../src/web-ui/routes/universe/CampaignReadiness.module.css","../../../../../../src/web-ui/routes/universe/CampaignReadiness.tsx","../../../../../../src/web-ui/routes/universe/UniverseView.tsx"],"sourcesContent":["/**\n * hooks/useScrollRestore.ts — React port of the one thing app.js got right\n * for view state (captureMainViewState / restoreMainViewState at\n * app.js:692-718), adapted to survive both route changes AND the\n * background-refresh re-renders the data layer now does constantly.\n *\n * The old bug this fixes: app.js captured `window.scrollY`, but the actual\n * scroll container was `.main` (styles.css sets `body.live-shell {overflow:\n * hidden}`), so scroll position always read 0 and reset on every ~8-15s\n * poll. Here the caller passes the REAL scrolling element's ref directly —\n * there is no ambiguity about which element scrolls.\n *\n * State survives:\n * - scrollTop of the container\n * - which element (if any) had focus, keyed by a stable `data-focus-key`\n * attribute the view puts on focusable rows/controls\n * - open/closed state of any `<details data-state-key>` in the subtree\n *\n * Keyed by `routeKey` (typically the route pathname) so switching views and\n * coming back restores each view's own scroll position independently.\n */\nimport { useEffect, useLayoutEffect, useRef, type RefObject } from 'react';\n\ninterface ViewState {\n scrollTop: number;\n focusKey: string | null;\n details: Map<string, boolean>;\n}\n\nconst stateByKey = new Map<string, ViewState>();\n\nfunction capture(container: HTMLElement): ViewState {\n const active = document.activeElement;\n const focusKey =\n active instanceof HTMLElement && container.contains(active)\n ? active.getAttribute('data-focus-key')\n : null;\n const details = new Map<string, boolean>();\n container.querySelectorAll('details[data-state-key]').forEach((node) => {\n const key = node.getAttribute('data-state-key');\n if (key) details.set(key, (node as HTMLDetailsElement).open);\n });\n return { scrollTop: container.scrollTop, focusKey, details };\n}\n\nfunction restore(container: HTMLElement, saved: ViewState): void {\n container.querySelectorAll('details[data-state-key]').forEach((node) => {\n const key = node.getAttribute('data-state-key');\n if (key && saved.details.has(key)) (node as HTMLDetailsElement).open = saved.details.get(key)!;\n });\n container.scrollTop = saved.scrollTop;\n if (!saved.focusKey) return;\n const target = container.querySelector<HTMLElement>(`[data-focus-key=\"${CSS.escape(saved.focusKey)}\"]`);\n if (!target) return;\n try {\n target.focus({ preventScroll: true });\n } catch {\n target.focus();\n }\n container.scrollTop = saved.scrollTop;\n}\n\n/**\n * Attach to the scrolling container. Call `saveNow()` before any render\n * that's about to replace the subtree wholesale (rare in React, but\n * available for parity with the old imperative call sites); normally you\n * don't need to call anything — mount/unmount and periodic capture on\n * scroll/blur handle it.\n */\nexport function useScrollRestore(routeKey: string, containerRef: RefObject<HTMLElement | null>) {\n const routeKeyRef = useRef(routeKey);\n routeKeyRef.current = routeKey;\n\n // Restore synchronously before paint so there's no visible jump.\n useLayoutEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n const saved = stateByKey.get(routeKey);\n if (saved) restore(el, saved);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- deliberately re-runs only on routeKey; the ref itself is stable for the shell's lifetime.\n }, [routeKey]);\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n let raf = 0;\n function onScroll() {\n cancelAnimationFrame(raf);\n raf = requestAnimationFrame(() => {\n if (el) stateByKey.set(routeKeyRef.current, capture(el));\n });\n }\n el.addEventListener('scroll', onScroll, { passive: true });\n document.addEventListener('focusout', onScroll);\n document.addEventListener('toggle', onScroll, true);\n\n return () => {\n cancelAnimationFrame(raf);\n el.removeEventListener('scroll', onScroll);\n document.removeEventListener('focusout', onScroll);\n document.removeEventListener('toggle', onScroll, true);\n // Final capture on unmount so a same-tick route swap doesn't lose the\n // last scroll position (scroll events can be throttled by the\n // browser right before teardown). Uses the `el` captured when this\n // effect was set up, not containerRef.current — the ref may already\n // point elsewhere (or be null) by the time cleanup runs.\n stateByKey.set(routeKeyRef.current, capture(el));\n };\n }, [containerRef]);\n}\n",".view { max-width: 1600px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-6); }\n.view h1, .view h2, .view h3, .view p, .view dl, .view dd { margin: 0; }\n.view h1 { font-family: var(--font-display, var(--font-ui)); font-size: var(--text-3xl-size); line-height: var(--text-3xl-line); letter-spacing: -.045em; font-weight: var(--font-weight-semibold); }\n.view h2 { font-family: var(--font-display, var(--font-ui)); font-size: var(--text-lg-size); line-height: var(--text-lg-line); letter-spacing: -.02em; font-weight: var(--font-weight-semibold); }\n.view h3 { font-family: var(--font-display, var(--font-ui)); font-size: var(--text-md-size); line-height: var(--text-md-line); }\n.view p { max-width: 78ch; color: var(--text-secondary); line-height: var(--text-base-line); }\n.view button, .view select, .view summary { cursor: pointer; }\n.view button:focus-visible, .view select:focus-visible, .view summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }\n.header, .sectionHeading { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-5); }\n.header p { margin-top: var(--space-2); }\n.actions { display: flex; align-items: flex-end; gap: var(--space-3); }\n.refresh, .selectLabel select { min-height: 36px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); background: var(--bg-surface); color: var(--text-primary); font: inherit; }\n.refresh:hover { background: var(--bg-hover); }\n.refresh:disabled { cursor: wait; color: var(--text-disabled); }\n.selectLabel { display: flex; flex-direction: column; gap: var(--space-1); color: var(--text-secondary); font-size: var(--text-xs-size); }\n.selectLabel select { max-width: 280px; font-size: var(--text-sm-size); }\n.freshness { min-height: 18px; display: flex; gap: var(--space-4); flex-wrap: wrap; color: var(--text-tertiary); font-size: var(--text-xs-size); margin-top: calc(-1 * var(--space-3)); }\n.objective { border-left: 3px solid var(--text-link); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); background: var(--bg-surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; }\n.objective h2 { font-size: var(--text-xl-size); line-height: var(--text-xl-line); }\n.objectiveFacts { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-8); }\n.objectiveFacts dt, .measurements dt, .resources dt, .artifact dt { color: var(--text-secondary); font-size: var(--text-xs-size); }\n.objectiveFacts dd { margin-top: var(--space-1); font-size: var(--text-sm-size); }\n.archive, .comparison { border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); overflow: hidden; }\n.campaign { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-surface); min-width: 0; overflow: hidden; }\n.campaignBody { display: flex; flex-direction: column; gap: var(--space-4); padding: 0 var(--space-5) var(--space-5); }\n.campaignHeading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); overflow-wrap: anywhere; }\n.campaignFacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); padding-block: var(--space-4); border-block: 1px solid var(--border-subtle); }\n.campaignFacts dt { color: var(--text-secondary); font-size: var(--text-xs-size); }\n.campaignFacts dd { margin-top: var(--space-1); font-size: var(--text-sm-size); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }\n.view .campaignNote, .campaignBody > p { font-size: var(--text-xs-size); }\n.campaignBody .command { margin-top: 0; }\n.delivery { border-top: 1px solid var(--border-subtle); padding-top: var(--space-3); font-size: var(--text-sm-size); }\n.delivery summary { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; overflow-wrap: anywhere; }\n.delivery summary::before { content: '+'; color: var(--text-link); }\n.delivery[open] summary::before { content: '−'; }\n.delivery summary span { color: var(--text-secondary); font-size: var(--text-xs-size); }\n.deliveryFacts { display: grid; gap: var(--space-3); padding: var(--space-4) 0; }\n.deliveryFacts dt { color: var(--text-tertiary); font-size: var(--text-xs-size); }\n.deliveryFacts dd { overflow-wrap: anywhere; margin-top: var(--space-1); }\n.sectionHeading { padding: var(--space-5); }\n.sectionHeading p { margin-top: var(--space-1); font-size: var(--text-sm-size); }\n.archiveCount { color: var(--text-secondary); font-size: var(--text-xs-size); white-space: nowrap; padding-top: var(--space-1); }\n.tableScroll { overflow-x: auto; }\n.archiveTable { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }\n.archiveTable thead { color: var(--text-secondary); font-size: var(--text-xs-size); background: var(--bg-canvas); }\n.archiveTable th, .archiveTable td { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border-subtle); }\n.archiveTable th { font-weight: var(--font-weight-medium); }\n.archiveTable tbody tr[data-selected] { background: var(--bg-selected); }\n.archiveTable td { font-size: var(--text-sm-size); }\n.nicheFilled, .nicheEmpty { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: var(--space-3); border: 1px solid var(--status-success-solid); }\n.nicheFilled { background: var(--status-success-solid); }\n.nicheEmpty { border-color: var(--border-strong); }\n.eliteButton { padding: var(--space-1) 0; color: var(--text-link); background: none; border: 0; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }\n.muted { color: var(--text-tertiary); }\n.runMeta { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: 0 var(--space-5) var(--space-4); font-size: var(--text-xs-size); color: var(--text-secondary); }\n.comparisonBody { display: grid; grid-template-columns: minmax(210px, 0.8fr) minmax(0, 2fr); border-top: 1px solid var(--border-default); }\n.trialList { border-right: 1px solid var(--border-default); display: flex; flex-direction: column; align-self: stretch; background: var(--bg-canvas); }\n.trialButton { display: flex; flex-direction: column; gap: var(--space-2); text-align: left; border: 0; border-bottom: 1px solid var(--border-default); border-left: 3px solid transparent; padding: var(--space-4); background: transparent; color: var(--text-primary); font: inherit; }\n.trialButton:hover { background: var(--bg-hover); }\n.trialButton[aria-pressed=\"true\"] { background: var(--bg-selected); border-left-color: var(--accent-500); }\n.trialTitle, .trialSubline { display: flex; justify-content: space-between; gap: var(--space-3); overflow-wrap: anywhere; }\n.trialTitle { font-family: var(--font-display, var(--font-ui)); font-weight: var(--font-weight-medium); }\n.trialTitle > span { font-variant-numeric: tabular-nums; }\n.trialSubline { color: var(--text-secondary); font-size: var(--text-xs-size); }\n.trialDetail { padding: var(--space-5); min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }\n.detailHeading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }\n.hypothesis { font-size: var(--text-sm-size); }\n.lineage { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) 0; font-size: var(--text-sm-size); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); overflow-wrap: anywhere; }\n.generation { margin-left: auto; color: var(--text-tertiary); font-size: var(--text-xs-size); }\n.reason { font-size: var(--text-base-size); }\n.view .currentElite { margin-top: calc(-1 * var(--space-2)); color: var(--status-success-fg); font-size: var(--text-xs-size); }\n.measurements { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4); }\n.measurements dd { font-family: var(--font-display, var(--font-ui)); font-size: var(--text-xl-size); line-height: var(--text-xl-line); font-variant-numeric: tabular-nums; margin-top: var(--space-1); overflow-wrap: anywhere; }\n.generationEvidence { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--border-subtle); }\n.generationEvidence h4 { margin: 0; font-size: var(--text-sm-size); font-weight: var(--font-weight-semibold); }\n.generationEvidence .measurements dd { font-size: var(--text-sm-size); }\n.generationEvidence p { font-size: var(--text-xs-size); }\n.diagnosticCodes { display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-sm-size); }\n.diagnosticCodes ul { margin: 0; padding-left: var(--space-5); }\n.diagnosticCodes p { font-size: var(--text-xs-size); }\n.artifact { color: var(--text-secondary); font-size: var(--text-xs-size); }\n.artifact summary { width: fit-content; padding: var(--space-1) 0; }\n.artifact dl { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-3); }\n.artifact dd { overflow-wrap: anywhere; }\n.artifact pre, .command { overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-code); padding: var(--space-4); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--text-xs-size); line-height: var(--text-base-line); margin: var(--space-3) 0 0; }\n.notice { border: 1px solid var(--status-warning-solid); border-radius: var(--radius-md); background: var(--status-warning-bg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }\n.notice p { color: var(--text-primary); font-size: var(--text-sm-size); overflow-wrap: anywhere; }\n.running { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-sm-size); }\n.view .failure { color: var(--status-danger-fg); overflow-wrap: anywhere; padding: 0 var(--space-5) var(--space-3); }\n.trialDetail .failure { padding: 0; }\n.failureEvidence { margin: 0; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--status-danger-bg); color: var(--status-danger-fg); font-family: var(--font-mono); font-size: var(--text-xs-size); line-height: var(--text-base-line); }\n.empty { border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); background: var(--bg-surface); }\n.empty .command { max-width: 720px; margin: 0; }\n.empty details { color: var(--text-secondary); font-size: var(--text-sm-size); margin-top: var(--space-2); }\n.empty details .command { margin-top: var(--space-3); }\n.noTrials { padding: var(--space-5); }\n.resources { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-1) 0 var(--space-5); }\n.resources h2 { font-size: var(--text-sm-size); }\n.resources dl { display: flex; flex-wrap: wrap; gap: var(--space-5) var(--space-10); }\n.resources dd { font-size: var(--text-base-size); margin-top: var(--space-1); font-variant-numeric: tabular-nums; }\n.resources p { color: var(--text-tertiary); font-size: var(--text-xs-size); }\n@media (max-width: 900px) { .header, .sectionHeading { flex-wrap: wrap; } .comparisonBody { grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.4fr); } }\n@media (max-width: 600px) {\n .view h1 { font-size: var(--text-2xl-size); line-height: var(--text-2xl-line); }\n .view { gap: var(--space-4); }\n .actions { width: 100%; justify-content: space-between; }\n .objective { padding-left: var(--space-3); }\n .comparisonBody { display: flex; flex-direction: column; }\n .trialList { border-right: 0; border-bottom: 1px solid var(--border-default); max-height: 240px; overflow-y: auto; }\n .sectionHeading, .trialDetail { padding: var(--space-4); }\n .campaignBody { padding-right: var(--space-4); padding-left: var(--space-4); }\n .empty { padding: var(--space-5); }\n .running { align-items: flex-start; }\n .archiveTable th, .archiveTable td { padding: var(--space-3); }\n .archiveTable th:first-child { min-width: 120px; }\n .archiveTable td { min-width: 100px; }\n}\n","import { createContext, useCallback, useContext } from 'react';\n\n/** Absent in the ordinary dashboard; scoped consoles obtain this after auth. */\nexport const UniverseRootContext = createContext<string | null>(null);\n\nexport function quoteShellArgument(value: string): string {\n return `'${value.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n\nexport function withUniverseRoot(command: string, root: string | null): string {\n if (root === null) return command;\n return command.split('\\n').map((line) => `${line} --root ${quoteShellArgument(root)}`).join('\\n');\n}\n\n/** Commands are display-only. No browser action invokes a process. */\nexport function useUniverseCommand(): (command: string) => string {\n const root = useContext(UniverseRootContext);\n return useCallback((command: string) => withUniverseRoot(command, root), [root]);\n}\n","import type { UniverseOverview, UniverseSummary } from '../../data/api-types.js';\nimport styles from './UniverseView.module.css';\nimport { quoteShellArgument as quote, useUniverseCommand } from './UniverseScope.js';\n\ntype DeliveryReport = NonNullable<UniverseOverview['deliveryReports']>[number];\n\n// The authenticated API abbreviates this user's home. A quoted tilde does not\n// expand in the shell, so keep the home expansion separate from the path data.\nconst repoArgument = (value: string): string => value.startsWith('~/') ? `\"$HOME\"/${quote(value.slice(2))}` : quote(value);\nconst visibleDigest = (value: string): string => value === '[REDACTED]' ? 'Hidden by the console privacy filter' : value;\n\nexport function UniverseDeliveries({ summary, report, onInspectTrial }: {\n summary: UniverseSummary;\n report?: DeliveryReport;\n onInspectTrial: (runId: string, trialId: string) => void;\n}) {\n const verified = report?.sourceState === 'healthy';\n const command = useUniverseCommand();\n const degraded = report?.sourceState === 'degraded';\n const deliveries = report?.deliveries ?? [];\n return (\n <section className={styles.archive} aria-label=\"Repository delivery\">\n <div className={styles.sectionHeading}>\n <div><h2>Repository delivery</h2><p>Turn a retained artifact into an exact local Git branch. Your current checkout stays untouched.</p></div>\n </div>\n <div className={styles.campaignBody}>\n {degraded ? <div className={styles.notice} role=\"status\"><strong>Delivery evidence could not be verified.</strong><p>{report.reasons.join('; ') || 'Refresh after restoring the recorded repository and receipt.'}</p></div> : null}\n {deliveries.length ? deliveries.map((delivery) => (\n <details key={delivery.id} className={styles.delivery}>\n <summary>\n <code>{delivery.branch}</code>\n <span>{!verified ? `Unverified record (${delivery.status})` : delivery.status === 'delivered' ? 'Local branch verified' : delivery.status === 'unchanged' ? 'No change; no branch created' : 'Pending; not confirmed delivered'}</span>\n </summary>\n <dl className={styles.deliveryFacts}>\n <div><dt>Repository</dt><dd><code>{delivery.repo}</code></dd></div>\n <div><dt>Commit</dt><dd><code>{delivery.commit}</code></dd></div>\n <div><dt>Pinned base</dt><dd><code>{delivery.baseCommit}</code></dd></div>\n <div><dt>Artifact digest</dt><dd><code>{visibleDigest(delivery.artifactDigest)}</code></dd></div>\n <div><dt>Comparator digest</dt><dd><code>{visibleDigest(delivery.comparatorDigest)}</code></dd></div>\n <div><dt>Changed files</dt><dd>{delivery.changedFiles.length ? delivery.changedFiles.map((path) => <code key={path}>{path}<br /></code>) : 'None'}</dd></div>\n </dl>\n {summary.runs.some((run) => run.id === delivery.runId && run.trials.some((trial) => trial.id === delivery.trialId)) ?\n <button type=\"button\" className={styles.eliteButton} onClick={() => onInspectTrial(delivery.runId, delivery.trialId)}>Inspect source trial</button> :\n <p>Source trial unavailable in the current history.</p>}\n {verified && delivery.status === 'delivered' ? <pre className={styles.command}><code>{`git -C ${repoArgument(delivery.repo)} show --stat ${quote(delivery.commit)}`}</code></pre> : null}\n {delivery.artifactDigest === '[REDACTED]' || delivery.comparatorDigest === '[REDACTED]' ?\n <p>Read exact identities locally with <code>{command(`ashlr universe deliveries ${quote(summary.manifest.id)} --json`)}</code>.</p> : null}\n </details>\n )) : <p>{degraded ? 'No delivery can be confirmed from this read.' : 'No local branches delivered yet.'}</p>}\n {summary.sourceState === 'healthy' && !degraded && summary.elites.length ? (\n <details className={styles.artifact}>\n <summary>Deliver a retained artifact from your terminal</summary>\n <p>Choose a new branch name. Each command writes only a new local branch in <code>{summary.manifest.seed.repo}</code>; it does not switch branches, merge, or push.</p>\n {summary.elites.map((elite) => <div key={elite.trialId}>\n <p>{elite.niche}: {elite.variantId}</p>\n <pre className={styles.command}><code>{command(`ashlr universe deliver ${quote(summary.manifest.id)} --trial ${quote(elite.trialId)} --branch ${quote(`codex/universe-${summary.manifest.id}-${elite.trialId.slice(0, 8)}`)} --json`)}</code></pre>\n </div>)}\n </details>\n ) : null}\n <p>Verification binds the branch to the recorded evaluator result. It is not a fresh evaluation, a merge, or a production deployment. Refresh to inspect delivery changes made in your terminal.</p>\n </div>\n </section>\n );\n}\n","import type { UniverseGraph, UniverseGraphEdge, UniverseGraphTraversal } from './graph-types.js';\n\nexport const MAX_UNIVERSE_GRAPH_DEPTH = 64;\nconst MAX_QUERY_NODES = 25_000;\nconst MAX_QUERY_EDGES = 100_000;\n\n/** Browser-safe bounded breadth-first traversal, including the focus node. */\nexport function traverseUniverseGraph(graph: UniverseGraph, options: {\n nodeId: string; direction: 'ancestors' | 'descendants'; maxDepth?: number;\n}): UniverseGraphTraversal {\n const result: UniverseGraphTraversal = { nodeIds: [], edgeIds: [], complete: true, issues: [] };\n const issue = (code: string, message: string): void => {\n result.complete = false;\n result.issues.push({ code, message, nodeIds: [] });\n };\n const depth = options.maxDepth ?? MAX_UNIVERSE_GRAPH_DEPTH;\n if (!Number.isSafeInteger(depth) || depth < 1 || depth > MAX_UNIVERSE_GRAPH_DEPTH ||\n !['ancestors', 'descendants'].includes(options.direction)) {\n issue('invalid-query', 'Traversal requires a direction and depth from 1 to 64.'); return result;\n }\n if (graph.nodes.length > MAX_QUERY_NODES || graph.edges.length > MAX_QUERY_EDGES) {\n issue('graph-limit', 'Graph exceeds the traversal envelope.'); return result;\n }\n const nodes = new Set(graph.nodes.map((node) => node.id));\n if (nodes.size !== graph.nodes.length) { issue('duplicate-node', 'Graph contains duplicated node identities.'); return result; }\n if (!nodes.has(options.nodeId)) { issue('invalid-node', 'The requested graph node is unavailable.'); return result; }\n const adjacency = new Map<string, UniverseGraphEdge[]>();\n const forward = new Map<string, string[]>();\n const incoming = new Map([...nodes].map((id) => [id, 0]));\n const edgeIds = new Set<string>();\n for (const edge of graph.edges) {\n if (!nodes.has(edge.from) || !nodes.has(edge.to) || edgeIds.has(edge.id)) {\n issue('invalid-edge', 'Graph contains an unresolved or duplicated edge.'); return result;\n }\n edgeIds.add(edge.id);\n const targets = forward.get(edge.from) ?? [];\n targets.push(edge.to); forward.set(edge.from, targets);\n incoming.set(edge.to, incoming.get(edge.to)! + 1);\n const from = options.direction === 'ancestors' ? edge.to : edge.from;\n const list = adjacency.get(from) ?? [];\n list.push(edge); adjacency.set(from, list);\n }\n const ordered = [...incoming].filter(([, count]) => count === 0).map(([id]) => id);\n for (let index = 0; index < ordered.length; index++) for (const target of forward.get(ordered[index]!) ?? []) {\n incoming.set(target, incoming.get(target)! - 1);\n if (incoming.get(target) === 0) ordered.push(target);\n }\n if (ordered.length !== nodes.size) { issue('cycle', 'Graph contains a dependency cycle.'); return result; }\n const seen = new Set([options.nodeId]);\n let frontier = [options.nodeId];\n for (let level = 0; frontier.length && level < depth; level++) {\n const next: string[] = [];\n for (const id of frontier) {\n for (const edge of adjacency.get(id) ?? []) {\n const target = options.direction === 'ancestors' ? edge.from : edge.to;\n if (!seen.has(target)) { seen.add(target); next.push(target); }\n }\n }\n frontier = next;\n }\n if (frontier.some((id) => (adjacency.get(id) ?? []).some((edge) => !seen.has(options.direction === 'ancestors' ? edge.from : edge.to)))) {\n issue('depth-limit', 'Additional related nodes exist beyond the selected depth.');\n }\n if (!graph.complete || graph.sourceState !== 'healthy') issue('source-incomplete', 'Traversal uses incomplete or degraded source evidence.');\n result.nodeIds = [...seen].sort();\n // Return the induced graph, including cross-links between nodes discovered\n // at the exact depth boundary, not merely the breadth-first search tree.\n result.edgeIds = graph.edges.filter((edge) => seen.has(edge.from) && seen.has(edge.to)).map((edge) => edge.id).sort();\n return result;\n}\n",".section { min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-surface); overflow: hidden; }\n.header { padding: var(--space-5); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }\n.header p { margin-top: var(--space-1); font-size: var(--text-sm-size); }\n.header h2 { font-family: var(--font-display, var(--font-ui)); letter-spacing: -.025em; }\n.button, .filters select { min-height: 36px; border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); background: var(--bg-surface); color: var(--text-primary); font: inherit; }\n.button { white-space: nowrap; }\n.button:hover { background: var(--bg-hover); }\n.button:disabled { color: var(--text-disabled); cursor: wait; }\n.section button:focus-visible, .section select:focus-visible, .section summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }\n.body { padding: 0 var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }\n.toolbar, .facts { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }\n.facts { font-size: var(--text-xs-size); color: var(--text-secondary); gap: var(--space-2) var(--space-5); padding-block: var(--space-3); border-block: 1px solid var(--border-subtle); font-variant-numeric: tabular-nums; }\n.toolbar .button { margin-left: auto; }\n.notice { padding: var(--space-3); border-left: 3px solid var(--status-warning-solid); background: var(--status-warning-bg); font-size: var(--text-sm-size); }\n.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--bg-canvas); }\n.filters label { display: flex; flex-direction: column; gap: var(--space-1); color: var(--text-secondary); font-size: var(--text-xs-size); }\n.filters select { max-width: 240px; font-size: var(--text-sm-size); }\n.note { font-size: var(--text-xs-size); }\n.diagram { overflow: auto; max-height: 460px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-canvas); scrollbar-color: var(--border-strong) var(--bg-canvas); }\n.diagram svg { display: block; min-height: 220px; }\n.diagram [role='button'] { cursor: pointer; }\n.diagram [role='button']:focus-visible { outline: none; }\n.diagram [role='button']:focus-visible rect { stroke: var(--border-focus); stroke-width: 3; stroke-dasharray: 4 2; }\n.diagram [role='button']:hover rect { stroke: var(--text-link); stroke-width: 2; }\n.edge { stroke: var(--border-strong); stroke-width: 1.5; }\n.feedback { stroke: var(--text-link); stroke-dasharray: 5 4; }\n.arrow { fill: var(--border-strong); }\n.nodeBox { fill: var(--bg-surface-raised); stroke: var(--border-strong); stroke-width: 1.25; }\n.selectedBox { fill: var(--bg-selected); stroke: var(--text-link); stroke-width: 2.5; }\n.nodeLabel { fill: var(--text-primary); font-family: var(--font-display, var(--font-ui)); font-size: var(--text-xs-size); font-weight: var(--font-weight-semibold); }\n.nodeKind, .columnLabel { fill: var(--text-secondary); font-size: var(--text-xs-size); }\n.nodeKind { letter-spacing: -.02em; }\n.columnLabel { font-family: var(--font-display, var(--font-ui)); font-weight: var(--font-weight-medium); }\n/* Shape distinguishes entity kinds; color remains reserved for selection/evidence. */\n.diagram [data-kind='universe'] rect, .diagram [data-kind='campaign'] rect { rx: 14px; }\n.diagram [data-kind='seed'] rect, .diagram [data-kind='artifact'] rect { rx: 1px; }\n.diagram [data-kind='comparator'] rect { stroke-dasharray: 6 3; }\n.diagram [data-kind='delivery'] rect { rx: 1px; stroke-width: 2.5; }\n.diagram [data-kind='reservation'] rect { stroke-dasharray: 2 3; }\n.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-xs-size); color: var(--text-secondary); }\n.legend span::before { content: ''; display: inline-block; width: 24px; margin-right: var(--space-2); vertical-align: middle; border-top: 2px solid var(--border-strong); }\n.legend .feedbackLegend::before { border-top-style: dashed; border-color: var(--text-link); }\n.workspace { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.7fr); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; }\n.nodeList { display: flex; flex-direction: column; max-height: 480px; overflow: auto; border-right: 1px solid var(--border-subtle); padding: var(--space-2); background: var(--bg-canvas); }\n.nodeButton { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3); border: 0; border-left: 3px solid transparent; text-align: left; background: transparent; color: var(--text-primary); font: inherit; font-size: var(--text-sm-size); overflow-wrap: anywhere; }\n.nodeButton:hover { background: var(--bg-hover); }\n.nodeButton[aria-pressed='true'] { border-left-color: var(--accent-500); background: var(--bg-selected); }\n.nodeButton small { color: var(--text-secondary); font-size: var(--text-xs-size); }\n.nodeButton > span { font-family: var(--font-display, var(--font-ui)); font-weight: var(--font-weight-medium); }\n.nodeButton[data-kind='campaign'], .nodeButton[data-kind='universe'] { border-radius: var(--radius-md); }\n.inspector { min-width: 0; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }\n.inspector h3 { font-family: var(--font-display, var(--font-ui)); font-size: var(--text-xl-size); line-height: var(--text-xl-line); letter-spacing: -.025em; overflow-wrap: anywhere; }\n.properties { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }\n.properties dt { font-size: var(--text-xs-size); color: var(--text-secondary); }\n.properties dd { margin-top: var(--space-1); font-size: var(--text-sm-size); overflow-wrap: anywhere; }\n.relations { display: flex; flex-direction: column; gap: var(--space-2); padding-left: var(--space-4); margin: 0; font-size: var(--text-sm-size); }\n.link { background: transparent; border: 0; padding: 0; color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; text-align: left; font: inherit; overflow-wrap: anywhere; }\n.findings { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-inline-start: 3px solid var(--border-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--bg-canvas); }\n.findings ul { margin: 0; padding-left: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }\n.findings p, .findings li { font-size: var(--text-sm-size); }\n.findingLinks { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-1); }\n.exact { overflow-wrap: anywhere; font-size: var(--text-xs-size); }\n.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); font-size: var(--text-xs-size); }\n@media (max-width: 600px) {\n .header { flex-wrap: wrap; padding: var(--space-4); }\n .body { padding-right: var(--space-4); padding-left: var(--space-4); }\n .workspace { display: flex; flex-direction: column; }\n .nodeList { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--border-subtle); padding-right: 0; }\n .inspector { padding: var(--space-4); }\n .filters select { max-width: 190px; }\n .diagram { max-height: 360px; }\n}\n","import { useId, useMemo, useState } from 'react';\nimport type { UniverseGraph as GraphReport, UniverseGraphNode, UniverseGraphEdge } from '../../../core/universe/graph-types.js';\nimport { traverseUniverseGraph } from '../../../core/universe/graph-query.js';\nimport { useQuery, useRefetch } from '../../data/hooks.js';\nimport { useUniverseCommand } from './UniverseScope.js';\nimport { universeGraphQuery } from '../../data/queries.js';\nimport styles from './UniverseGraph.module.css';\n\nconst DISPLAY_LIMIT = 60;\nconst DISPLAY_EDGE_LIMIT = 240;\ntype InspectTrial = (runId: string, trialId: string) => boolean;\nconst KIND_LABELS: Record<UniverseGraphNode['kind'], string> = {\n universe: 'Universe', seed: 'Seed', comparator: 'Evaluator', campaign: 'Campaign',\n reservation: 'Reservation', run: 'Run', trial: 'Trial', artifact: 'Artifact', delivery: 'Delivery',\n};\nconst EDGE_LABELS: Record<UniverseGraphEdge['kind'], string> = {\n contains: 'Contains', 'seed-parent': 'Seed parent', parent: 'Candidate parent', feedback: 'Evaluator feedback',\n evaluates: 'Evaluates', produced: 'Produced artifact', reserved: 'Reserved work',\n 'executed-as': 'Executed as', 'delivered-as': 'Delivered as',\n};\nconst evidenceLabel = (node: UniverseGraphNode): string => node.evidence === 'verified-local-delivery'\n ? 'Local delivery checked' : node.evidence === 'recorded' ? 'Recorded evidence'\n : node.evidence === 'pending' ? 'Pending evidence' : 'Evidence unavailable';\nconst short = (value: string, length: number): string => value.length > length ? `${value.slice(0, length - 1)}…` : value;\n\n/** Bounded, deterministic columns; the full text node list remains usable without the SVG. */\nfunction GraphDiagram({ nodes, edges, selectedId, select }: {\n nodes: UniverseGraphNode[]; edges: UniverseGraphEdge[]; selectedId?: string;\n select: (id: string) => void;\n}) {\n const marker = `universe-arrow-${useId().replaceAll(':', '')}`;\n const columns = [...new Set(nodes.map((node) => node.generation ?? 0))].sort((a, b) => a - b);\n const positions = new Map<string, { x: number; y: number }>();\n let rows = 1;\n columns.forEach((generation, column) => {\n const members = nodes.filter((node) => (node.generation ?? 0) === generation);\n rows = Math.max(rows, members.length);\n members.forEach((node, row) => positions.set(node.id, { x: 24 + column * 225, y: 32 + row * 76 }));\n });\n return (\n <div className={styles.diagram}>\n <svg width={Math.max(260, columns.length * 225 + 24)} height={rows * 76 + 40} role=\"group\" aria-label=\"Evidence relationship diagram\">\n <defs><marker id={marker} markerWidth=\"8\" markerHeight=\"8\" refX=\"7\" refY=\"3\" orient=\"auto\"><path d=\"M0,0 L0,6 L8,3 z\" className={styles.arrow} /></marker></defs>\n {columns.map((generation, column) => <text key={generation} x={24 + column * 225} y={18} className={styles.columnLabel}>{generation === 0 ? 'Experiment context' : `Generation ${generation}`}</text>)}\n {edges.map((edge) => {\n const from = positions.get(edge.from); const to = positions.get(edge.to);\n if (!from || !to) return null;\n const sameColumn = from.x === to.x;\n const startX = from.x + 180; const endX = sameColumn ? to.x + 180 : to.x;\n const mid = sameColumn ? startX + 28 : (startX + endX) / 2;\n return <path key={edge.id} d={`M ${startX} ${from.y + 27} C ${mid} ${from.y + 27}, ${mid} ${to.y + 27}, ${endX} ${to.y + 27}`} fill=\"none\" markerEnd={`url(#${marker})`} className={`${styles.edge} ${edge.kind === 'feedback' ? styles.feedback : ''}`}><title>{EDGE_LABELS[edge.kind]}</title></path>;\n })}\n {nodes.map((node) => {\n const position = positions.get(node.id)!;\n return <g key={node.id} data-kind={node.kind} transform={`translate(${position.x},${position.y})`} role=\"button\" tabIndex={0} aria-label={`Select ${KIND_LABELS[node.kind].toLowerCase()}: ${node.label}`} aria-pressed={node.id === selectedId}\n onClick={() => select(node.id)} onKeyDown={(event) => { if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); select(node.id); } }}>\n <title>{`${node.label}: ${node.state}. ${evidenceLabel(node)}`}</title>\n <rect width=\"180\" height=\"54\" rx=\"5\" className={node.id === selectedId ? styles.selectedBox : styles.nodeBox} />\n <text x=\"10\" y=\"20\" className={styles.nodeLabel}>{short(node.label, 24)}</text>\n <text x=\"10\" y=\"39\" className={styles.nodeKind}>{KIND_LABELS[node.kind]} · {short(node.state, 18)}</text>\n </g>;\n })}\n </svg>\n </div>\n );\n}\n\nfunction NodeInspector({ node, graph, byId, select, onInspectTrial }: {\n node: UniverseGraphNode; graph: GraphReport; byId: Map<string, UniverseGraphNode>;\n select: (id: string) => void; onInspectTrial: InspectTrial;\n}) {\n const [unavailableTrial, setUnavailableTrial] = useState<string | null>(null);\n const command = useUniverseCommand();\n const relationships = graph.edges.filter((edge) => edge.from === node.id || edge.to === node.id);\n return <section className={styles.inspector} aria-label=\"Selected graph evidence\">\n <h3>{node.label}</h3>\n <dl className={styles.properties}>\n <div><dt>Entity</dt><dd>{KIND_LABELS[node.kind]}</dd></div>\n <div><dt>State</dt><dd>{node.state}</dd></div>\n <div><dt>Evidence</dt><dd>{evidenceLabel(node)}</dd></div>\n {node.generation !== undefined ? <div><dt>Generation</dt><dd>{node.generation}</dd></div> : null}\n {node.niche ? <div><dt>Niche</dt><dd>{node.niche}</dd></div> : null}\n {node.score !== undefined ? <div><dt>Evaluator score</dt><dd>{node.score === null ? 'Unavailable' : node.score}</dd></div> : null}\n {node.currentElite ? <div><dt>Archive</dt><dd>Current local elite</dd></div> : null}\n {node.admitted && !node.currentElite ? <div><dt>Archive</dt><dd>Historical admission; not the current elite</dd></div> : null}\n </dl>\n <p className={styles.note}>The graph observes saved evidence. It does not rerun evaluation or establish accepted production value.</p>\n {node.runId && node.trialId ? <button type=\"button\" className={styles.link} onClick={() => setUnavailableTrial(onInspectTrial(node.runId!, node.trialId!) ? null : node.id)}>Inspect exact trial evidence</button> : null}\n {unavailableTrial === node.id ? <p className={styles.notice} role=\"status\">This exact trial is not present in the current overview. Refresh Universe before inspecting it; no other trial was selected.</p> : null}\n <h4>Direct relationships</h4>\n {relationships.length ? <ul className={styles.relations}>{relationships.slice(0, DISPLAY_LIMIT).map((edge) => {\n const incoming = edge.to === node.id;\n const other = byId.get(incoming ? edge.from : edge.to);\n return <li key={edge.id}>{EDGE_LABELS[edge.kind]} {incoming ? 'from' : 'to'}{' '}{other\n ? <button type=\"button\" className={styles.link} onClick={() => select(other.id)}>{other.label}</button>\n : <span>unavailable source</span>}</li>;\n })}</ul> : <p className={styles.note}>No direct relationships in this observation.</p>}\n {relationships.length > DISPLAY_LIMIT ? <p className={styles.note}>{relationships.length - DISPLAY_LIMIT} additional relationships omitted from this panel. Inspect the CLI graph for the full observation.</p> : null}\n <details className={styles.exact}><summary>Record identity</summary>\n <dl className={styles.properties}>\n <div><dt>Graph node</dt><dd><code>{node.id}</code></dd></div>\n {node.runId ? <div><dt>Run</dt><dd><code>{node.runId}</code></dd></div> : null}\n {node.trialId ? <div><dt>Trial</dt><dd><code>{node.trialId}</code></dd></div> : null}\n {node.variantId ? <div><dt>Variant</dt><dd><code>{node.variantId}</code></dd></div> : null}\n {node.campaignId ? <div><dt>Campaign</dt><dd><code>{node.campaignId}</code></dd></div> : null}\n {node.branch ? <div><dt>Local branch</dt><dd><code>{node.branch}</code></dd></div> : null}\n {node.commit ? <div><dt>Commit</dt><dd><code>{node.commit}</code></dd></div> : null}\n {node.manifestDigest ? <div><dt>Manifest digest</dt><dd><code>{node.manifestDigest === '[REDACTED]' ? 'Hidden by the console privacy filter' : node.manifestDigest}</code></dd></div> : null}\n {node.comparatorDigest ? <div><dt>Comparator digest</dt><dd><code>{node.comparatorDigest === '[REDACTED]' ? 'Hidden by the console privacy filter' : node.comparatorDigest}</code></dd></div> : null}\n {node.artifactDigest ? <div><dt>Artifact digest</dt><dd><code>{node.artifactDigest === '[REDACTED]' ? 'Hidden by the console privacy filter' : node.artifactDigest}</code></dd></div> : null}\n </dl>\n <p>Read exact local provenance with <code>{command(`ashlr universe graph ${graph.universeId} --json`)}</code>.</p>\n </details>\n </section>;\n}\n\nfunction GraphExplorer({ graph, onInspectTrial }: { graph: GraphReport; onInspectTrial: InspectTrial }) {\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [kind, setKind] = useState('all');\n const [niche, setNiche] = useState('all');\n const [direction, setDirection] = useState<'all' | 'ancestors' | 'descendants'>('all');\n const [depth, setDepth] = useState(2);\n const [requestedPage, setRequestedPage] = useState<number | null>(null);\n const byId = useMemo(() => new Map(graph.nodes.map((node) => [node.id, node])), [graph.nodes]);\n const selected = selectedId === null ? graph.nodes.find((node) => node.kind === 'trial' && node.currentElite) ?? graph.nodes.find((node) => node.kind === 'trial') ?? graph.nodes[0] : byId.get(selectedId);\n const traversal = useMemo(() => selected && direction !== 'all' ? traverseUniverseGraph(graph, { nodeId: selected.id, direction, maxDepth: depth }) : null, [graph, selected, direction, depth]);\n const traversedIds = useMemo(() => traversal ? new Set(traversal.nodeIds) : null, [traversal]);\n const matching = graph.nodes.filter((node) => (!traversedIds || traversedIds.has(node.id)) && (kind === 'all' || node.kind === kind) && (niche === 'all' || node.niche === niche));\n const pageCount = Math.max(1, Math.ceil(matching.length / DISPLAY_LIMIT));\n const selectedPage = Math.floor(Math.max(0, matching.findIndex((node) => node.id === selected?.id)) / DISPLAY_LIMIT);\n const page = Math.min(requestedPage ?? selectedPage, pageCount - 1);\n const nodes = matching.slice(page * DISPLAY_LIMIT, (page + 1) * DISPLAY_LIMIT);\n const visibleIds = new Set(nodes.map((node) => node.id));\n const edges = graph.edges.filter((edge) => visibleIds.has(edge.from) && visibleIds.has(edge.to));\n const select = (id: string) => { setSelectedId(id); setKind('all'); setNiche('all'); setRequestedPage(null); };\n const niches = [...new Set(graph.nodes.flatMap((node) => node.niche ? [node.niche] : []))].sort();\n return <>\n <div className={styles.facts}><span>Source: {graph.sourceState}</span><span>{graph.complete ? 'Source graph complete' : 'Source graph incomplete'}</span><span>{graph.counts.trials} trial records included</span><span>{graph.counts.verifiedDeliveries} checked local deliveries included</span></div>\n {!graph.complete || graph.sourceState === 'degraded' ? <p className={styles.notice} role=\"status\">Graph evidence is incomplete. Missing relationships are not proof that no work or delivery occurred.</p> : null}\n {graph.issues.length ? <details className={styles.note}><summary>Source issues ({graph.issues.length})</summary><ul>{graph.issues.map((issue, index) => <li key={`${issue.code}-${index}`}><code>{issue.code}</code>: {issue.message}</li>)}</ul></details> : null}\n {graph.findings.length ? <section className={styles.findings} aria-label=\"Graph observations\"><h3>Useful observations</h3><ul>{graph.findings.slice(0, DISPLAY_LIMIT).map((finding) => <li key={finding.id}>\n <strong>{finding.kind === 'repeated-output' ? 'Repeated artifact output' : 'Current elite without recorded delivery'}</strong>\n {finding.kind === 'repeated-output' ? <p>{finding.trialCount} trials share a recorded artifact digest. {finding.usageComplete ? `Reported generation tokens: ${finding.reportedTokens ?? 'unavailable'}.` : `Total generation tokens unavailable; recorded subtotal: ${finding.recordedTokens}.`}</p> : <p>No verified delivery is linked to this current local elite in the observation.</p>}\n <div className={styles.findingLinks}>{finding.nodeIds.slice(0, 8).map((id) => { const node = byId.get(id); return node ? <button type=\"button\" className={styles.link} key={id} onClick={() => select(id)}>Inspect {node.label}</button> : null; })}</div>\n {finding.nodeIds.length > 8 ? <p>{finding.nodeIds.length - 8} additional nodes in this group; inspect CLI JSON for all identities.</p> : null}\n </li>)}</ul><p>These are evidence patterns, not cost savings, automatic delivery instructions or proof of business value.</p>{graph.findings.length > DISPLAY_LIMIT ? <p>{graph.findings.length - DISPLAY_LIMIT} additional observations omitted from this panel.</p> : null}</section> : null}\n {graph.nodes.length ? <>\n <div className={styles.filters}>\n <label>Entity type<select value={kind} onChange={(event) => { setKind(event.target.value); setRequestedPage(null); }}><option value=\"all\">All entity types</option>{Object.entries(KIND_LABELS).map(([value, label]) => <option key={value} value={value}>{label}</option>)}</select></label>\n <label>Niche<select value={niche} onChange={(event) => { setNiche(event.target.value); setRequestedPage(null); }}><option value=\"all\">All niches</option>{niches.map((value) => <option key={value}>{value}</option>)}</select></label>\n <label>Trace from selection<select value={direction} onChange={(event) => { setDirection(event.target.value as typeof direction); setRequestedPage(null); }} disabled={!selected}><option value=\"all\">All nodes</option><option value=\"ancestors\">Ancestors</option><option value=\"descendants\">Descendants</option></select></label>\n <label>Traversal depth<select value={depth} onChange={(event) => { setDepth(Number(event.target.value)); setRequestedPage(null); }} disabled={direction === 'all'}>{[1, 2, 3, 4, 8, 16, 32, 64].map((value) => <option key={value}>{value}</option>)}</select></label>\n </div>\n <p className={styles.note} role=\"status\">Showing {nodes.length} of {matching.length} matching nodes ({graph.nodes.length} in source). {direction !== 'all' ? `Trace is bounded to ${depth} relationship hops. ` : ''}{matching.length > DISPLAY_LIMIT ? `Diagram shows at most ${DISPLAY_LIMIT} nodes per page; relationships crossing pages remain in the inspector. ` : ''}{traversal && !traversal.complete ? 'Traversal is incomplete; the depth bound or source evidence limits this trace.' : ''}</p>\n {pageCount > 1 ? <nav className={styles.pagination} aria-label=\"Graph node pages\"><button type=\"button\" className={styles.button} disabled={page === 0} onClick={() => setRequestedPage(page - 1)}>Previous node page</button><span>Page {page + 1} of {pageCount}</span><button type=\"button\" className={styles.button} disabled={page + 1 === pageCount} onClick={() => setRequestedPage(page + 1)}>Next node page</button></nav> : null}\n {selectedId !== null && !selected ? <p className={styles.notice} role=\"status\">The selected node is no longer present in the current graph. Select another recorded node; no substitute has been chosen.</p> : null}\n {nodes.length ? <><GraphDiagram nodes={nodes} edges={edges.slice(0, DISPLAY_EDGE_LIMIT)} selectedId={selected?.id} select={select} /><div className={styles.legend}><span>Recorded relationship</span><span className={styles.feedbackLegend}>Evaluator feedback (not candidate ancestry)</span></div>{edges.length > DISPLAY_EDGE_LIMIT ? <p className={styles.note}>Diagram shows {DISPLAY_EDGE_LIMIT} of {edges.length} relationships on this page. Select a node to inspect its direct relationships.</p> : null}</> : <p className={styles.notice}>No nodes match these filters. Broaden the entity type, niche or trace direction.</p>}\n <div className={styles.workspace}>\n <div className={styles.nodeList} role=\"group\" aria-label=\"Graph nodes\">{nodes.map((node) => <button type=\"button\" key={node.id} data-kind={node.kind} className={styles.nodeButton} aria-label={`Inspect ${KIND_LABELS[node.kind].toLowerCase()}: ${node.label}`} aria-pressed={node.id === selected?.id} onClick={() => setSelectedId(node.id)}><span>{node.label}</span><small>{KIND_LABELS[node.kind]} · {node.state}{node.generation !== undefined ? ` · generation ${node.generation}` : ''}</small></button>)}</div>\n {selected ? <NodeInspector node={selected} graph={graph} byId={byId} select={select} onInspectTrial={onInspectTrial} /> : null}\n </div>\n </> : <p>{graph.sourceState === 'missing' ? 'No recorded graph source is available for this universe.' : graph.complete ? 'This observation contains no graph nodes.' : 'Graph nodes could not be established from incomplete evidence.'}</p>}\n </>;\n}\n\nfunction LoadedGraph({ universeId, onInspectTrial }: { universeId: string; onInspectTrial: InspectTrial }) {\n const definition = useMemo(() => universeGraphQuery(universeId), [universeId]);\n const query = useQuery(definition);\n const refresh = useRefetch(definition);\n return <div className={styles.body}>\n <div className={styles.toolbar}><p className={styles.note}>{query.data ? `Observed ${query.data.sampledAt}${query.status === 'error' ? ' · Last successful read' : ''}` : 'Read-only graph observation; no work is started.'}</p><button type=\"button\" className={styles.button} onClick={refresh} disabled={query.status === 'loading' || query.status === 'refreshing'}>{query.status === 'refreshing' ? 'Refreshing graph…' : 'Refresh graph'}</button></div>\n {query.status === 'loading' ? <p role=\"status\">Loading graph evidence…</p> : null}\n {query.status === 'error' ? <p className={styles.notice} role=\"alert\">Graph records unavailable. {query.error?.message} Refresh graph to retry.{query.data ? ' The graph below is the last successful observation.' : ''}</p> : null}\n {query.data ? <GraphExplorer graph={query.data} onInspectTrial={onInspectTrial} /> : null}\n </div>;\n}\n\n/** Mounting this section does not fetch: only opening the inspector mounts its query. */\nexport function UniverseGraph({ universeId, onInspectTrial }: { universeId: string; onInspectTrial: InspectTrial }) {\n const [open, setOpen] = useState(false);\n const panelId = `universe-graph-${useId().replaceAll(':', '')}`;\n return <section className={styles.section} aria-label=\"Evidence graph\">\n <div className={styles.header}><div><h2>Evidence graph</h2><p>Trace candidate ancestry, evaluator feedback and local delivery back to recorded trials.</p></div><button type=\"button\" className={styles.button} aria-expanded={open} aria-controls={panelId} onClick={() => setOpen((value) => !value)}>{open ? 'Close graph' : 'Open graph'}</button></div>\n <div id={panelId}>{open ? <LoadedGraph universeId={universeId} onInspectTrial={onInspectTrial} /> : null}</div>\n </section>;\n}\n","import type { UniverseCampaignReadinessView } from '../../core/web/universe-console-types.js';\nimport { apiGet } from './client.js';\nimport type { QueryDef } from './queries.js';\n\nconst ID = /^[a-z0-9][a-z0-9_-]{0,63}$/;\nconst FIELDS = ['schemaVersion', 'readinessScope', 'campaignId', 'universeId', 'observedState', 'sourceState',\n 'disposition', 'reasonCode', 'resourceRuntimeRequired', 'sampledAt'];\nconst STATES = ['ready', 'running', 'pause-requested', 'stop-requested', 'paused', 'interrupted', 'completed', 'stopped', 'failed'];\nconst DISPOSITIONS: Record<UniverseCampaignReadinessView['disposition'], true> = {\n startable: true, owned: true, 'owner-held': true, 'resource-withheld': true, 'recovery-required': true,\n 'attention-required': true, 'budget-exhausted': true, terminal: true, unavailable: true,\n};\nconst REASONS: Record<UniverseCampaignReadinessView['reasonCode'], true> = {\n 'never-started': true, 'owner-active': true, 'pause-requested': true, 'stop-requested': true, 'owner-paused': true,\n 'owner-abandoned': true, 'run-incomplete': true, 'resource-withheld': true, 'resource-outcome-ambiguous': true,\n 'resource-attention-required': true, 'generation-attention-required': true, 'duration-budget-exhausted': true, 'generation-budget-exhausted': true,\n 'stagnation-budget-exhausted': true, 'request-budget-exhausted': true, 'reported-token-budget-exhausted': true,\n 'usage-unavailable': true, 'campaign-completed': true, 'campaign-stopped': true, 'campaign-failed': true,\n 'paused-unclassified': true, 'interrupted-unclassified': true, 'campaign-missing': true, 'evidence-degraded': true, 'snapshot-changed': true,\n 'seed-evaluation-unresolved': true, 'seed-evaluation-attention-required': true,\n};\n\n/** Reject mismatched identities and uncontracted/private fields before they reach the view. */\nexport function validateUniverseCampaignReadinessView(value: unknown, campaignId: string, universeId: string): UniverseCampaignReadinessView {\n const invalid = () => new Error('Recorded campaign check is unavailable.');\n if (!value || typeof value !== 'object' || Array.isArray(value)) throw invalid();\n const report = value as Record<string, unknown>;\n if (Object.keys(report).length !== FIELDS.length || Object.keys(report).some((field) => !FIELDS.includes(field)) ||\n report.schemaVersion !== 1 || report.readinessScope !== 'recorded-campaign-evidence' || report.campaignId !== campaignId ||\n typeof report.sourceState !== 'string' || !['healthy', 'missing', 'degraded'].includes(report.sourceState) ||\n !(report.universeId === universeId || report.universeId === null && report.sourceState !== 'healthy') ||\n !(report.observedState === null && report.sourceState !== 'healthy' || typeof report.observedState === 'string' && STATES.includes(report.observedState)) ||\n typeof report.disposition !== 'string' || !Object.hasOwn(DISPOSITIONS, report.disposition) ||\n typeof report.reasonCode !== 'string' || !Object.hasOwn(REASONS, report.reasonCode) ||\n !(typeof report.resourceRuntimeRequired === 'boolean' || report.resourceRuntimeRequired === null && report.sourceState !== 'healthy') ||\n typeof report.sampledAt !== 'string' || !/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$/.test(report.sampledAt) ||\n !Number.isFinite(Date.parse(report.sampledAt)) || new Date(report.sampledAt).toISOString() !== report.sampledAt ||\n report.sourceState !== 'healthy' && (report.universeId !== null || report.observedState !== null ||\n report.resourceRuntimeRequired !== null || report.disposition !== 'unavailable')) throw invalid();\n return value as UniverseCampaignReadinessView;\n}\n\n/** On demand only: independent from the overview's polling and SSE invalidation keys. */\nexport function universeCampaignReadinessQuery(campaignId: string, universeId: string): QueryDef<UniverseCampaignReadinessView> {\n if (!ID.test(campaignId) || !ID.test(universeId)) throw new Error('Invalid recorded campaign check identity.');\n return {\n key: `universe-campaign-readiness:${universeId}:${campaignId}`,\n fetch: async (signal) => validateUniverseCampaignReadinessView(\n await apiGet<unknown>(`/api/universe/campaign-readiness?campaignId=${encodeURIComponent(campaignId)}`, signal), campaignId, universeId),\n };\n}\n",".panel { border-block: 1px solid var(--border-default); padding-block: 16px; text-align: left; min-width: 0; }\n.result { margin-top: 14px; min-width: 0; }\n.heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }\n.heading h4 { margin: 0; font-family: var(--font-display); font-size: 1rem; color: var(--text-primary); }\n.button { font: inherit; color: var(--text-link); border: 1px solid var(--border-strong); border-radius: 6px; padding: 8px 12px; background: var(--bg-surface); cursor: pointer; white-space: normal; text-align: left; }\n.button:hover:not(:disabled) { background: var(--bg-hover); }\n.button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 3px; }\n.button:disabled { cursor: wait; color: var(--text-secondary); }\n.outcome { font-weight: 600; color: var(--text-primary); }\n.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px 20px; margin: 16px 0; }\n.facts div { min-width: 0; }\n.facts dt { color: var(--text-secondary); font-size: .8rem; }\n.facts dd { margin: 4px 0 0; color: var(--text-primary); overflow-wrap: anywhere; font-size: .9rem; }\n.note { color: var(--text-secondary); font-size: .85rem; max-width: 78ch; line-height: 1.55; margin-bottom: 0; }\n.notice { color: var(--status-warning-fg); font-size: .9rem; }\n","import { useMemo, useState } from 'react';\nimport type { UniverseCampaignReadinessView } from '../../../core/web/universe-console-types.js';\nimport { useQuery, useRefetch } from '../../data/hooks.js';\nimport { universeCampaignReadinessQuery } from '../../data/universe-readiness-queries.js';\nimport styles from './CampaignReadiness.module.css';\n\nconst LABELS: Record<UniverseCampaignReadinessView['disposition'], string> = {\n startable: 'Recorded evidence permitted a run attempt',\n owned: 'Campaign owner was recorded active',\n 'owner-held': 'Owner control held the campaign',\n 'resource-withheld': 'Last attempt was withheld by resources',\n 'recovery-required': 'Recovery inspection was required',\n 'attention-required': 'Attention was required',\n 'budget-exhausted': 'Recorded budget was exhausted',\n terminal: 'Campaign had ended',\n unavailable: 'Recorded check was unavailable',\n};\n\nfunction RecordedCheck({ campaignId, universeId }: { campaignId: string; universeId: string }) {\n const query = useMemo(() => universeCampaignReadinessQuery(campaignId, universeId), [campaignId, universeId]);\n // `freshMs: 0` opts out of useQuery's default mount-freshness window. This\n // component only mounts when the operator discloses it, so every mount IS\n // the request for a new sample — accepting a cached one because it is a few\n // seconds old would silently answer a click with the previous reading.\n const { data, status } = useQuery(query, { freshMs: 0 });\n const refresh = useRefetch(query);\n const busy = status === 'loading' || status === 'refreshing' || status === 'idle';\n const historical = busy || status === 'error';\n return <div className={styles.result} aria-busy={busy}>\n <div className={styles.heading}><h4>Last recorded check</h4><button type=\"button\" className={styles.button} disabled={busy} onClick={refresh}>{busy ? 'Checking recorded evidence…' : 'Refresh check'}</button></div>\n {status === 'error' ? <p className={styles.notice} role=\"alert\">Recorded check could not be refreshed. Retry the check; no current readiness conclusion is available.</p> : null}\n {data ? <>\n {historical ? <p className={styles.notice}>Previous sample only. {busy ? 'A new check is pending.' : 'The latest check failed.'}</p> : null}\n {!historical ? <p className={styles.outcome}>{data.sourceState === 'healthy' ? LABELS[data.disposition] : 'Recorded evidence was unavailable or incomplete'}</p> : null}\n <dl className={styles.facts}>\n <div><dt>Sampled</dt><dd><time dateTime={data.sampledAt}>{new Date(data.sampledAt).toLocaleString()}</time></dd></div>\n <div><dt>Source</dt><dd>{data.sourceState}</dd></div>\n <div><dt>{historical ? 'Previous disposition' : 'Recorded disposition'}</dt><dd>{data.disposition}</dd></div>\n <div><dt>Reason code</dt><dd><code>{data.reasonCode}</code></dd></div>\n <div><dt>Observed campaign state</dt><dd>{data.observedState ?? 'Unavailable'}</dd></div>\n <div><dt>Resource runtime binding</dt><dd>{data.resourceRuntimeRequired === null ? 'Unknown' : data.resourceRuntimeRequired ? 'Explicit private runtime required for a run attempt' : 'Not required by the recorded manifest'}</dd></div>\n </dl>\n </> : busy ? <p role=\"status\">Reading saved campaign controls and outcomes…</p> : null}\n <p className={styles.note}>This checks saved campaign controls and outcomes—not current provider connection, quota, worker capacity, evaluator execution, or execution-lease availability. A recorded startable result is advisory; the runner must still perform its admission checks.</p>\n </div>;\n}\n\n/** Mount the shared query only on request; switching campaigns resets this disclosure. */\nexport function CampaignReadiness({ campaignId, universeId }: { campaignId: string; universeId: string }) {\n const [open, setOpen] = useState(false);\n return <section className={styles.panel} aria-label=\"Recorded campaign readiness\">\n <button type=\"button\" className={styles.button} aria-expanded={open} onClick={() => setOpen((value) => !value)}>{open ? 'Hide recorded readiness' : 'Check recorded readiness'}</button>\n {!open ? <p className={styles.note}>Inspect saved controls, remaining budgets, and recovery conditions for this campaign. This does not start work.</p> : <RecordedCheck campaignId={campaignId} universeId={universeId} />}\n </section>;\n}\n","import { useContext, useEffect, useRef, useState } from 'react';\nimport { StatusBadge } from '../../components/primitives/StatusBadge.js';\nimport { RefreshIndicator } from '../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../components/primitives/Skeleton.js';\nimport { useQuery, useRefetch } from '../../data/hooks.js';\nimport { universeOverviewQuery } from '../../data/queries.js';\nimport type { UniverseOverview, UniverseRun, UniverseSummary, UniverseTrial } from '../../data/api-types.js';\nimport { useScrollRestore } from '../../hooks/useScrollRestore.js';\nimport styles from './UniverseView.module.css';\nimport { UniverseDeliveries } from './UniverseDeliveries.js';\nimport { UniverseGraph } from './UniverseGraph.js';\nimport { UniverseRootContext, useUniverseCommand } from './UniverseScope.js';\nimport { CampaignReadiness } from './CampaignReadiness.js';\n\ntype Campaign = NonNullable<UniverseOverview['campaigns']>[number];\nconst ACTIVE_CAMPAIGN_STATES = new Set(['running', 'pause-requested', 'stop-requested']);\n\nfunction number(value: number): string {\n return value.toLocaleString(undefined, { maximumFractionDigits: 6 });\n}\n\nfunction duration(ms: number): string {\n return ms < 1_000\n ? `${ms.toLocaleString(undefined, { maximumFractionDigits: 0 })} ms`\n : `${(ms / 1_000).toLocaleString(undefined, { maximumFractionDigits: 2 })} s`;\n}\n\nfunction timestamp(value: string): string {\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? value : date.toLocaleString();\n}\n\nfunction FirstExperiment() {\n const command = useUniverseCommand();\n return (\n <section className={styles.empty} aria-labelledby=\"universe-start-title\">\n <h2 id=\"universe-start-title\">Start your first universe</h2>\n <p>Run two measured generations on a disposable seed, then inspect which variants earned a place in the archive.</p>\n <pre className={styles.command}><code>{command('ashlr universe demo')}</code></pre>\n <p>The local demonstration needs no model credentials. Refresh this page after running it.</p>\n <details>\n <summary>Bring your own experiment</summary>\n <pre className={styles.command}><code>{command('ashlr universe init --manifest path/to/universe.json\\nashlr universe run <id>\\nashlr universe status <id> --json\\nashlr universe archive <id> --json')}</code></pre>\n </details>\n </section>\n );\n}\n\nfunction selectionReason(trial: UniverseTrial, summary: UniverseSummary, run: UniverseRun): string {\n if (trial.status !== 'passed') return 'Not admitted. The trial did not finish with a passing measurement.';\n if (run.status !== 'completed') return 'This generation has not completed. Its measurements have not been admitted to the archive.';\n if (trial.selected && trial.delta === null) return 'Established the first measured elite in this niche.';\n if (trial.selected) return `Admitted in generation ${run.generation} after an improvement of ${number(trial.delta!)} over the prior niche elite.`;\n return `Not admitted in this generation. Selection compares passing trials within each niche and requires an improvement of ${number(summary.manifest.metric.minImprovement)}.`;\n}\n\nconst RESOURCE_DISPATCH_LABELS: Record<string, string> = {\n 'not-started': 'Not started', withheld: 'Admission withheld', settled: 'Receipt settled',\n replayed: 'Recorded task replayed; no redispatch', unavailable: 'Evidence unavailable',\n};\nconst RESOURCE_USAGE_LABELS: Record<string, string> = {\n 'codex-turn': 'Codex reported turns', 'claude-main-loop': 'Claude main loop only',\n 'local-chat-completion': 'Local chat completion',\n};\n\nexport function GenerationEvidence({ trial }: { trial: UniverseTrial }) {\n const receipt = trial.generation;\n if (!receipt) return <p className={styles.hypothesis}>Operator command. Model usage was not measured.</p>;\n const pooled = receipt.provider === 'resource-pool';\n const resource = pooled ? receipt.resource : undefined;\n const tokenCount = (value: number | null) => value === null ? 'Unavailable' : number(value);\n return (\n <section className={styles.generationEvidence} aria-label=\"Model generation evidence\">\n <div className={styles.detailHeading}><h4>Model generation</h4><StatusBadge status={receipt.status} tone={receipt.status === 'succeeded' ? 'success' : undefined} /></div>\n <dl className={styles.measurements}>\n <div><dt>Model</dt><dd>{receipt.model ?? resource?.workerModel ?? 'Not assigned'}</dd></div>\n <div><dt>Accounting</dt><dd>{receipt.usage.state === 'reported' ? 'Provider-reported' : 'Unavailable'}</dd></div>\n <div><dt>Input tokens</dt><dd>{tokenCount(receipt.usage.inputTokens)}</dd></div>\n <div><dt>Output tokens</dt><dd>{tokenCount(receipt.usage.outputTokens)}</dd></div>\n <div><dt>Generation duration</dt><dd>{duration(receipt.durationMs)}</dd></div>\n <div><dt>{pooled ? 'Provider request count' : 'Request'}</dt><dd>{pooled ? 'Unknown' : receipt.requestStarted ? 'Started' : 'Not started'}</dd></div>\n </dl>\n {pooled ? <section aria-label=\"Recorded resource task evidence\">\n <h4>Recorded resource task</h4>\n <dl className={styles.measurements}>\n <div><dt>Dispatch evidence</dt><dd>{resource && Object.hasOwn(RESOURCE_DISPATCH_LABELS, resource.dispatch) ? RESOURCE_DISPATCH_LABELS[resource.dispatch] : 'Unavailable'}</dd></div>\n <div><dt>Pool</dt><dd>{resource?.poolId ?? 'Unavailable'}</dd></div>\n <div><dt>Worker</dt><dd>{resource?.workerId ?? 'Not assigned'}</dd></div>\n <div><dt>Worker provider</dt><dd>{resource?.workerProvider ?? 'Not assigned'}</dd></div>\n <div><dt>Task</dt><dd><code>{resource?.taskId ?? 'Unavailable'}</code></dd></div>\n <div><dt>Recorded task outcome</dt><dd>{resource?.taskStatus ?? 'Unavailable'}</dd></div>\n <div><dt>Worker usage scope</dt><dd>{resource?.usageScope && Object.hasOwn(RESOURCE_USAGE_LABELS, resource.usageScope) ? RESOURCE_USAGE_LABELS[resource.usageScope] : 'Unavailable'}</dd></div>\n </dl>\n <p>Recorded provenance only, not a current worker heartbeat. Task completion does not mean the candidate response validated or the evaluator accepted it.</p>\n {resource?.taskStatus === 'reserved' || resource?.taskStatus === 'uncertain'\n ? <p className={styles.notice}>The resource receipt still occupies capacity. Reconcile the affected pool before another attempt; this view does not release its slot.</p> : null}\n </section> : null}\n <details className={styles.artifact}>\n <summary>Generation source and changes</summary>\n <dl>\n <div><dt>Provider</dt><dd>{receipt.provider}</dd></div>\n {!pooled ? <div><dt>Endpoint</dt><dd><code>{receipt.endpoint}</code></dd></div> : null}\n {resource ? <>\n <div><dt>Allowed workers</dt><dd>{resource.allowedWorkerIds.join(', ')}</dd></div>\n <div><dt>Pool digest</dt><dd><code>{resource.poolDigest}</code></dd></div>\n <div><dt>Task digest</dt><dd><code>{resource.taskDigest ?? 'Unavailable'}</code></dd></div>\n <div><dt>Resource receipt digest</dt><dd><code>{resource.receiptDigest ?? 'Unavailable'}</code></dd></div>\n </> : null}\n <div><dt>Changed files</dt><dd>{receipt.changedFiles.length ? receipt.changedFiles.join(', ') : 'None'}</dd></div>\n <div><dt>Prompt digest</dt><dd><code>{receipt.promptDigest ?? 'Unavailable'}</code></dd></div>\n <div><dt>Response digest</dt><dd><code>{receipt.responseDigest ?? 'Unavailable'}</code></dd></div>\n {receipt.feedback ? <><div><dt>Evaluator feedback source</dt><dd>Generation {receipt.feedback.generation} · trial {receipt.feedback.trialId}</dd></div><div><dt>Feedback digest</dt><dd><code>{receipt.feedback.digest}</code></dd></div></> : null}\n {receipt.search ? <><div><dt>Recorded search context</dt><dd>Version {receipt.search.schemaVersion}</dd></div><div><dt>Search context digest</dt><dd><code>{receipt.search.digest}</code></dd></div></> : null}\n {receipt.seedContext ? <><div><dt>Historical seed context</dt><dd>Version {receipt.seedContext.schemaVersion}</dd></div><div><dt>Seed context digest</dt><dd><code>{receipt.seedContext.digest}</code></dd></div></> : null}\n </dl>\n {receipt.seedContext ? <p>Historical measured seed evidence is retained across campaign generations. It is not the trial parent, latest-attempt feedback, or acceptance.</p> : null}\n {pooled ? <p>Some digests are redacted in the web view. Use scoped CLI JSON for exact evidence; this view does not revalidate the resource ledger.</p> : null}\n </details>\n <p>Generation success means a valid replacement response, not evaluator acceptance. {pooled\n ? 'Token counts come from the recorded worker receipt and keep its usage scope; model identity is the configured model name. Native provider request counts and account-wide spend remain unknown.'\n : 'Token counts come from the endpoint response; model identity is the configured name.'}</p>\n {receipt.feedback ? <p>Feedback can come from a failed attempt. It is distinct from the retained parent shown in the lineage.</p> : null}\n {receipt.search ? <p>Search context supplies the metric and bounded repetition evidence, with a retained baseline and previous selection result when available. A repeated artifact is not an evaluator result or a reason to skip evaluation.</p> : null}\n </section>\n );\n}\n\nfunction TrialDetail({ trial, summary, run }: { trial: UniverseTrial; summary: UniverseSummary; run: UniverseRun }) {\n const command = useUniverseCommand();\n const parent = summary.runs.flatMap((item) => item.trials).find((item) => item.id === trial.parentTrialId);\n const current = summary.elites.some((elite) => elite.trialId === trial.id);\n const variant = summary.manifest.variants.find((item) => item.id === trial.variantId);\n return (\n <section className={styles.trialDetail} aria-label={`Evidence for ${trial.variantId}`}>\n <div className={styles.detailHeading}>\n <h3>{trial.variantId}</h3>\n <StatusBadge status={trial.status} tone={trial.status === 'passed' ? 'success' : undefined} />\n </div>\n {variant ? <p className={styles.hypothesis}>{variant.hypothesis}</p> : null}\n <div className={styles.lineage} aria-label=\"Variant lineage\">\n <span>{trial.parentTrialId ? (parent?.variantId ?? trial.parentTrialId) : 'Seed'}</span>\n <span aria-hidden=\"true\">→</span>\n <strong>{trial.variantId}</strong>\n <span className={styles.generation}>Generation {run.generation}</span>\n </div>\n <p className={styles.reason}>{selectionReason(trial, summary, run)}</p>\n {trial.selected ? <p className={styles.currentElite}>{summary.sourceState === 'degraded' ? 'Admission recorded; the current niche elite could not be verified.' : current ? 'Current niche elite' : 'Previously admitted; a later trial now holds this niche.'}</p> : null}\n <dl className={styles.measurements}>\n <div><dt>{summary.manifest.metric.name}</dt><dd>{trial.score === null ? 'Not measured' : number(trial.score)}</dd></div>\n <div><dt>Improvement over prior elite</dt><dd>{trial.delta === null ? 'No prior comparison' : number(trial.delta)}</dd></div>\n <div><dt>Trial duration</dt><dd>{duration(trial.durationMs)}</dd></div>\n {Object.entries(trial.metrics).filter(([key]) => key !== summary.manifest.metric.name).map(([key, value]) => (\n <div key={key}><dt>{key}</dt><dd>{number(value)}</dd></div>\n ))}\n </dl>\n <GenerationEvidence trial={trial} />\n {trial.diagnostics?.length ? <div className={styles.diagnosticCodes} aria-label=\"Evaluator diagnostic codes\"><strong>Evaluator diagnostics</strong><ul>{trial.diagnostics.map((diagnostic, index) => <li key={`${diagnostic.code}-${index}`}><code>{diagnostic.code}</code></li>)}</ul><p>Codes are shown here; diagnostic messages and private locations are omitted.</p></div> : null}\n {trial.error ? <pre role=\"status\" aria-label=\"Trial failure evidence\" className={styles.failureEvidence}>{trial.error}</pre> : null}\n {trial.artifact ? (\n <details className={styles.artifact}>\n <summary>Artifact and evaluator identity</summary>\n <dl>\n <div><dt>Artifact</dt><dd><code>{trial.artifact.path}</code></dd></div>\n <div><dt>Content digest</dt><dd><code>{trial.artifact.digest}</code></dd></div>\n <div><dt>Seed revision</dt><dd><code>{trial.artifact.revision}</code></dd></div>\n <div><dt>Comparator digest</dt><dd><code>{run.comparatorDigest}</code></dd></div>\n </dl>\n <p>For exact local records, run <code>{command(`ashlr universe status ${summary.manifest.id} --json`)}</code>.</p>\n </details>\n ) : null}\n <details className={styles.artifact}>\n <summary>Raw measurement record</summary>\n <pre>{JSON.stringify({ ...trial, ...(trial.diagnostics ? { diagnostics: trial.diagnostics.map(({ code }) => ({ code })) } : {}) }, null, 2)}</pre>\n </details>\n </section>\n );\n}\n\nfunction Campaigns({ campaigns, summary, onInspectRun }: {\n campaigns: Campaign[]; summary: UniverseSummary; onInspectRun: (runId: string) => void;\n}) {\n const [campaignId, setCampaignId] = useState<string | null>(null);\n const command = useUniverseCommand();\n const root = useContext(UniverseRootContext);\n const campaign = campaigns.find((item) => item.definition.id === campaignId) ??\n campaigns.find((item) => ACTIVE_CAMPAIGN_STATES.has(item.state)) ?? campaigns.at(-1);\n if (!campaign) return (\n <section className={styles.campaign} aria-label=\"Campaigns\">\n <div className={styles.sectionHeading}><div><h2>Continue with a campaign</h2><p>Run successive generations automatically within a fixed resource budget. A passing trial does not end the search.</p></div></div>\n <div className={styles.campaignBody}>\n <p>Set <code>universeId</code> to <code>{summary.manifest.id}</code> in your campaign manifest.</p>\n <pre className={styles.command}><code>{command('ashlr universe campaign init --manifest campaign.json\\nashlr universe campaign run <campaign-id>')}</code></pre>\n <p>The console observes saved evidence. These commands run in your terminal, without installing a background service.</p>\n </div>\n </section>\n );\n const { definition, progress } = campaign;\n const verified = campaign.sourceState === 'healthy';\n const value = (count: number) => verified ? number(count) : 'Unavailable';\n const availableRuns = new Set(summary.runs.map((item) => item.id));\n if (summary.activeRun) availableRuns.add(summary.activeRun.id);\n const controls = [`ashlr universe campaign status ${definition.id} --json`];\n controls.push(`ashlr universe campaign check ${definition.id} --json${root === null ? \" --root '/absolute/private/experiments'\" : ''}`);\n if (ACTIVE_CAMPAIGN_STATES.has(campaign.state)) controls.push(`ashlr universe campaign pause ${definition.id}`);\n if (!['completed', 'stopped', 'failed'].includes(campaign.state)) controls.push(`ashlr universe campaign stop ${definition.id}`);\n return (\n <section className={styles.campaign} aria-label=\"Campaigns\">\n <div className={styles.sectionHeading}>\n <div><h2>Autonomous campaign</h2><p>Generations continue until the campaign reaches its resource or stagnation limit.</p></div>\n {campaigns.length > 1 ? <label className={styles.selectLabel}>Campaign<select value={definition.id} onChange={(event) => setCampaignId(event.target.value)}>{campaigns.map((item) => <option key={item.definition.id} value={item.definition.id}>{item.definition.id}</option>)}</select></label> : null}\n </div>\n <div className={styles.campaignBody}>\n <div className={styles.campaignHeading}><h3>{definition.id}</h3><StatusBadge status={campaign.state} tone={campaign.state === 'ready' ? 'neutral' : undefined} /></div>\n {verified ? null : <div className={styles.notice} role=\"status\"><strong>Campaign history is incomplete.</strong><p>{campaign.reasons.join('; ') || 'Recorded progress could not be verified.'}</p></div>}\n <p className={styles.reason}><strong>Reason: </strong>{campaign.reason ?? (campaign.state === 'ready' ? 'Registered; execution readiness has not been checked.' : 'No stop reason recorded.')}</p>\n <p>Use the recovery check before resuming. It reads recorded controls and outcomes, not current worker readiness.{root === null ? ' Replace the example root with your exact Universe store.' : ''}</p>\n <CampaignReadiness key={`${summary.manifest.id}:${definition.id}`} campaignId={definition.id} universeId={summary.manifest.id} />\n {campaign.state === 'pause-requested' || campaign.state === 'stop-requested' ? <p role=\"status\">Control requested. The owner has not yet acknowledged that work has stopped.</p> : null}\n <dl className={styles.campaignFacts}>\n <div><dt>Generation attempts</dt><dd>{value(progress.attempts)} / {definition.budget.maxGenerations}</dd></div>\n <div><dt>Reserved generation invocations</dt><dd>{value(progress.reservedModelRequests)} / {definition.budget.maxModelRequests}</dd></div>\n <div><dt>Stagnant generations</dt><dd>{value(progress.stagnantGenerations)} / {definition.budget.maxStagnantGenerations}</dd></div>\n <div><dt>Deadline</dt><dd>{campaign.deadlineAt ? timestamp(campaign.deadlineAt) : 'Starts on first run'}</dd></div>\n <div><dt>Completed generations</dt><dd>{value(progress.completedRuns)}</dd></div>\n <div><dt>Interrupted generations</dt><dd>{value(progress.interruptedRuns)}</dd></div>\n <div><dt>Initial niche admissions</dt><dd>{value(progress.admissions)}</dd></div>\n <div><dt>Strict improvements</dt><dd>{value(progress.improvements)}</dd></div>\n <div><dt>Reported token total</dt><dd>{verified && progress.usageComplete && progress.reportedTokens !== null ? number(progress.reportedTokens) : 'Unavailable'}</dd></div>\n <div><dt>Recorded token subtotal</dt><dd>{value(progress.recordedTokens)}</dd></div>\n <div><dt>Reported-token stop threshold</dt><dd>{definition.budget.maxReportedTokens === null ? 'Not configured' : number(definition.budget.maxReportedTokens)}</dd></div>\n <div><dt>Bounded evaluator feedback</dt><dd>{definition.feedback ? 'Enabled' : 'Disabled'}</dd></div>\n </dl>\n <p className={styles.campaignNote}>Resume keeps the original deadline and consumed budget. Token figures cover recorded model requests; a recorded subtotal is not proof of complete spend. A reported-token threshold cannot prevent spend already incurred.</p>\n <p className={styles.campaignNote}>The legacy maxModelRequests field reserves generation transport invocations, not native API calls. A native invocation may make zero or multiple provider requests. Resource-pool run/resume requires its explicit private runtime option again; this read-only console does not hold that binding.</p>\n </div>\n {campaign.steps.length ? <div className={styles.tableScroll}>\n <table className={styles.archiveTable} aria-label=\"Campaign generations\">\n <thead><tr><th scope=\"col\">Generation</th><th scope=\"col\">State</th><th scope=\"col\">Trials passed</th><th scope=\"col\">New niches</th><th scope=\"col\">Improvements</th><th scope=\"col\">Generation invocations reserved</th></tr></thead>\n <tbody>{campaign.steps.map((step) => <tr key={step.runId}>\n <th scope=\"row\">{availableRuns.has(step.runId) ? <button type=\"button\" className={styles.eliteButton} aria-label={`Inspect campaign generation ${step.generation}`} onClick={() => onInspectRun(step.runId)}>{step.generation}</button> : <span>{step.generation} · Evidence pending</span>}</th>\n <td>{step.state}</td><td>{value(step.passedTrials)} / {value(step.trialCount)}</td><td>{value(step.admissions)}</td><td>{value(step.improvements)}</td><td>{value(step.reservedModelRequests)}</td>\n </tr>)}</tbody>\n </table>\n </div> : null}\n <div className={styles.campaignBody}>\n <details className={styles.artifact}><summary>Inspect or control from your terminal</summary><pre className={styles.command}><code>{command(controls.join('\\n'))}</code></pre><p>Pause and stop are requests until acknowledged. These controls do not change the legacy fleet daemon or its kill switch.</p></details>\n <p className={styles.campaignNote}>Campaign termination is not project success. Archive admissions are local evaluator results, not accepted production changes.</p>\n </div>\n </section>\n );\n}\n\nfunction UniverseExperiment({ summary, campaigns, deliveryReport }: {\n summary: UniverseSummary;\n campaigns: Campaign[];\n deliveryReport?: NonNullable<UniverseOverview['deliveryReports']>[number];\n}) {\n const [runId, setRunId] = useState<string | null>(null);\n const command = useUniverseCommand();\n const [trialId, setTrialId] = useState<string | null>(null);\n const comparisonRef = useRef<HTMLElement>(null);\n const runs = summary.activeRun && !summary.runs.some((run) => run.id === summary.activeRun!.id)\n ? [...summary.runs, summary.activeRun] : summary.runs;\n const run = runs.find((item) => item.id === runId) ?? summary.activeRun ?? runs.at(-1);\n const trial = run?.trials.find((item) => item.id === trialId) ?? run?.trials.find((item) => item.selected) ?? run?.trials[0];\n const niches = [...new Set(summary.manifest.variants.map((variant) => variant.niche))];\n const totalDuration = runs.reduce((sum, item) => sum + item.durationMs, 0);\n\n return (\n <>\n <section className={styles.objective} aria-label=\"Universe objective\">\n <h2>{summary.manifest.name}</h2>\n <p>{summary.manifest.objective}</p>\n <dl className={styles.objectiveFacts}>\n <div><dt>Selection metric</dt><dd>{summary.manifest.metric.name} · {summary.manifest.metric.direction}</dd></div>\n <div><dt>Minimum improvement</dt><dd>{number(summary.manifest.metric.minImprovement)}</dd></div>\n <div><dt>Run budget</dt><dd>{summary.manifest.budget.maxTrials} trials / {duration(summary.manifest.budget.maxDurationMs)}</dd></div>\n <div><dt>Parallel trials</dt><dd>{summary.manifest.budget.maxParallel}</dd></div>\n </dl>\n </section>\n\n {summary.sourceState === 'degraded' ? (\n <div className={styles.notice} role=\"status\"><strong>Some experiment records could not be read.</strong><p>{summary.reasons.join('; ')}</p></div>\n ) : null}\n {summary.activeRun ? (\n <div className={styles.running} role=\"status\">\n <StatusBadge status={summary.activeRun.status} />\n <span>Generation {summary.activeRun.generation}: {summary.activeRun.trials.length} trial measurements recorded. Refreshing every 3 seconds.</span>\n </div>\n ) : null}\n\n <Campaigns campaigns={campaigns} summary={summary} onInspectRun={(id) => { setRunId(id); setTrialId(null); }} />\n\n <UniverseGraph universeId={summary.manifest.id} onInspectTrial={(run, trial) => {\n if (!runs.some((item) => item.id === run && item.trials.some((candidate) => candidate.id === trial))) return false;\n setRunId(run); setTrialId(trial);\n window.requestAnimationFrame(() => comparisonRef.current?.scrollIntoView?.({ block: 'start' }));\n return true;\n }} />\n\n <section className={styles.archive} aria-labelledby=\"universe-archive-title\">\n <div className={styles.sectionHeading}>\n <div><h2 id=\"universe-archive-title\">Population archive</h2><p>Each niche keeps its best measured variant. Inspect an elite to see the experiment that earned its place.</p></div>\n <span className={styles.archiveCount}>{summary.sourceState === 'degraded' ? 'Archive incomplete' : `${summary.elites.length} / ${niches.length} niches populated`}</span>\n </div>\n <div className={styles.tableScroll}>\n <table className={styles.archiveTable}>\n <thead><tr><th scope=\"col\">Niche</th><th scope=\"col\">Retained variant</th><th scope=\"col\">{summary.manifest.metric.name}</th><th scope=\"col\">Generation</th></tr></thead>\n <tbody>{niches.map((niche) => {\n const elite = summary.elites.find((item) => item.niche === niche);\n return (\n <tr key={niche} data-selected={elite?.trialId === trial?.id || undefined}>\n <th scope=\"row\"><span className={elite ? styles.nicheFilled : styles.nicheEmpty} aria-hidden=\"true\" />{niche}</th>\n <td>{elite ? (\n <button type=\"button\" className={styles.eliteButton} aria-label={`Inspect ${elite.variantId} in ${niche}`} onClick={() => { setRunId(elite.runId); setTrialId(elite.trialId); }}>{elite.variantId}</button>\n ) : <span className={styles.muted}>{summary.sourceState === 'degraded' ? 'History incomplete' : 'No retained variant'}</span>}</td>\n <td>{elite ? number(elite.score) : summary.sourceState === 'degraded' ? 'Unavailable' : 'Not measured'}</td>\n <td>{elite ? elite.generation : '—'}</td>\n </tr>\n );\n })}</tbody>\n </table>\n </div>\n </section>\n\n {run ? (\n <section ref={comparisonRef} className={styles.comparison} aria-labelledby=\"universe-comparison-title\">\n <div className={styles.sectionHeading}>\n <div><h2 id=\"universe-comparison-title\">Experiment comparison</h2><p>Selection is local to a niche. Positive improvement means better in either metric direction.</p></div>\n <label className={styles.selectLabel}>Generation\n <select value={run.id} onChange={(event) => { setRunId(event.target.value); setTrialId(null); }}>\n {[...runs].reverse().map((item) => <option key={item.id} value={item.id}>{item.generation} · {item.status}</option>)}\n </select>\n </label>\n </div>\n <div className={styles.runMeta}><StatusBadge status={run.status} tone={run.status === 'completed' ? 'success' : undefined} /><span>Started {timestamp(run.startedAt)}</span><span>{duration(run.durationMs)} recorded</span><span>{run.trials.filter((item) => item.status === 'passed').length} / {run.trials.length} trials passed</span><span>{run.status === 'completed' ? `${run.trials.filter((item) => item.selected).length} admitted` : run.status === 'running' ? 'Selection pending' : 'Selection not applied'}</span></div>\n {run.error ? <p className={styles.failure} role=\"status\">{run.error}</p> : null}\n {trial ? (\n <div className={styles.comparisonBody}>\n <div className={styles.trialList} aria-label=\"Trials\">\n {run.trials.map((item) => (\n <button type=\"button\" key={item.id} className={styles.trialButton} aria-pressed={item.id === trial.id} onClick={() => setTrialId(item.id)}>\n <span className={styles.trialTitle}>{item.variantId}<span>{item.score === null ? '—' : number(item.score)}</span></span>\n <span className={styles.trialSubline}>{item.niche}<span>{item.selected ? 'Admitted' : item.status}</span></span>\n </button>\n ))}\n </div>\n <TrialDetail trial={trial} summary={summary} run={run} />\n </div>\n ) : <p className={styles.noTrials}>No trial measurements have been recorded for this generation yet.</p>}\n </section>\n ) : (\n <section className={styles.empty}>\n <h2>This universe is registered</h2>\n <pre className={styles.command}><code>{command(`ashlr universe run ${summary.manifest.id}`)}</code></pre>\n <p>No generation has run yet. Verify the evaluator and required runtime before starting, then refresh to compare measurements.</p>\n </section>\n )}\n\n <UniverseDeliveries summary={summary} report={deliveryReport} onInspectTrial={(run, trial) => { setRunId(run); setTrialId(trial); }} />\n\n <footer className={styles.resources} aria-label=\"Generation resources\">\n <h2>Recorded resources</h2>\n <dl><div><dt>Runtime across {runs.length} generations</dt><dd>{duration(totalDuration)}</dd></div><div><dt>Model tokens{run ? ` in generation ${run.generation}` : ''}</dt><dd>{run?.tokensUsed == null ? 'Unavailable' : number(run.tokensUsed)}</dd></div><div><dt>Model cost</dt><dd>Unavailable</dd></div></dl>\n {run?.generationUsage ? <p>Generation usage coverage: {run.generationUsage.reportedRequests} / {run.generationUsage.requestsStarted} recorded started requests reported tokens across {run.generationUsage.trials} model trials. {run.generationUsage.resourceAttempts === undefined\n ? 'Totals require a completed generation, at least one recorded request, and usage from every recorded request. Interrupted in-flight usage may be missing.'\n : 'These request counters cover the direct local path only. Combined totals also require complete resource-attempt usage and a completed generation; interrupted in-flight usage may be missing.'}</p> : null}\n {run?.generationUsage?.resourceAttempts !== undefined ? <p>Resource handoff coverage: {run.generationUsage.resourceReportedAttempts ?? 'Unavailable'} / {run.generationUsage.resourceAttempts} attempted handoffs reported worker tokens. Handoffs do not guarantee worker starts or count provider requests; incomplete resource usage keeps the combined total unavailable.</p> : null}\n <p>Tokens cover model generation only, not command or evaluator work. Missing usage and dollar costs stay unavailable. Evaluator scores do not establish business value or accepted production changes.</p>\n </footer>\n </>\n );\n}\n\nexport function UniverseView() {\n const containerRef = useRef<HTMLDivElement>(null);\n useScrollRestore('/universe', containerRef);\n const query = useQuery(universeOverviewQuery);\n const refresh = useRefetch(universeOverviewQuery);\n const [universeId, setUniverseId] = useState<string | null>(null);\n const overview = query.data;\n const universe = overview?.universes.find((item) => item.manifest.id === universeId) ?? overview?.universes[0];\n const isRunning = (overview?.universes.some((item) => item.activeRun !== null) ?? false) ||\n (overview?.campaigns?.some((item) => ACTIVE_CAMPAIGN_STATES.has(item.state)) ?? false);\n useEffect(() => {\n let disposed = false;\n const poll = () => { if (!disposed && document.visibilityState !== 'hidden') refresh(); };\n // Idle discovery notices work started elsewhere without requiring a manual\n // refresh. The existing cache coalesces overlapping reads and owns their\n // lifetime; hiding/unmounting stops new polling, not a shared in-flight read.\n const timer = window.setInterval(poll, isRunning ? 3_000 : 15_000);\n document.addEventListener('visibilitychange', poll);\n return () => {\n disposed = true;\n window.clearInterval(timer);\n document.removeEventListener('visibilitychange', poll);\n };\n }, [isRunning, refresh]);\n return (\n <div ref={containerRef} className={styles.view}>\n <header className={styles.header}>\n <div><h1>Ashlrverse</h1><p>Run experiments. Compare futures. Keep what earns its place.</p></div>\n <div className={styles.actions}>\n {overview && overview.universes.length > 1 ? (\n <label className={styles.selectLabel}>Universe<select value={universe?.manifest.id} onChange={(event) => setUniverseId(event.target.value)}>{overview.universes.map((item) => <option value={item.manifest.id} key={item.manifest.id}>{item.manifest.name}</option>)}</select></label>\n ) : null}\n <button type=\"button\" className={styles.refresh} onClick={refresh} disabled={query.status === 'loading' || query.status === 'refreshing'}>Refresh</button>\n </div>\n </header>\n <div className={styles.freshness} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n {overview ? <span>Observed {timestamp(overview.sampledAt)}{query.status === 'error' ? ' · Last successful read' : ''}</span> : null}\n {overview ? <span>Local experiments</span> : null}\n <span>Refreshes every {isRunning ? '3' : '15'} seconds while visible</span>\n </div>\n {query.status === 'loading' ? <section className={styles.empty} aria-label=\"Loading Universe experiments\"><SkeletonLine width=\"60%\" /><SkeletonLine width=\"90%\" /><SkeletonLine width=\"80%\" /></section> : null}\n {query.status === 'error' ? <div className={styles.notice} role=\"alert\"><h2>Universe records unavailable</h2><p>{query.error?.message ?? 'The experiment store could not be read.'}</p><p>Refresh to retry. Any records below are from the last successful read.</p></div> : null}\n {overview?.sourceState === 'degraded' ? <div className={styles.notice} role=\"status\"><strong>Experiment history is incomplete.</strong><p>{overview.reasons.join('; ') || 'Some persisted records could not be verified.'}</p></div> : null}\n {universe ? <UniverseExperiment key={universe.manifest.id} summary={universe} campaigns={overview?.campaigns?.filter((item) => item.definition.universeId === universe.manifest.id) ?? []} deliveryReport={overview?.deliveryReports?.find((report) => report.universeId === universe.manifest.id)} /> : overview && overview.sourceState !== 'degraded' ? <FirstExperiment /> : null}\n </div>\n );\n}\n"],"mappings":"kMA6BM,EAAa,IAAI,IAEvB,SAAS,EAAQ,EAAmC,CAClD,IAAM,EAAS,SAAS,cAClB,EACJ,aAAkB,aAAe,EAAU,S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AA,CAAC,SAAD,CAAA,SAAQ,mCAAyC,CAAA,GAAC,EAAA,EAAA,IAAA,CAAC,IAAD,CAAA,SAAI,EAAS,QAAQ,KAAK,IAAI,GAAK,+CAAmD,CAAA,CAAM,CAAI,CAAA,EAAA,KACtO,GAAW,EAAA,EAAA,IAAA,CAAC,GAAD,CAA+C,QAAS,EAAU,UAAW,GAAU,WAAW,OAAQ,GAAS,EAAK,WAAW,aAAe,EAAS,SAAS,EAAE,GAAK,CAAC,EAAG,eAAgB,GAAU,iBAAiB,KAAM,GAAW,EAAO,aAAe,EAAS,SAAS,EAAE,CAAI,EAAhQ,EAAS,SAAS,EAA8O,EAAI,GAAY,EAAS,cAAgB,YAAa,EAAA,EAAA,IAAA,CAAC,GAAD,CAAkB,CAAA,EAAI,IAC9W,GAET"}
@@ -0,0 +1,2 @@
1
+ import{a as e,n as t,o as n}from"./index-CZamKRUg.js";import{b as r,i,p as a,r as o,s,v as c,y as l}from"./global-D6bTxIRn.js";import{i as u}from"./RouteErrorBoundary-Badio_uO.js";import{r as ee}from"./queries-B8eBnFox.js";import{a as d,c as f,d as p,f as m,i as h,l as g,n as _,o as v,r as y,s as b,t as x,u as S}from"./charts-CTZJ-JrH.js";import{A as te,C as ne,D as C,E as re,O as ie,T as w,g as ae,k as oe,w as se}from"./VerseConsoleApp-CsIQv9id.js";import{f as ce}from"./format-BNYWGJat.js";import{f as le}from"./fleet-model-ClBbQ0Uj.js";import{t as T}from"./verse-model-CvtK6vP6.js";var E=n(e(),1),D={claude:`var(--engine-claude, #c96442)`,codex:`var(--engine-codex, #10a37f)`,grok:`var(--engine-grok, #6b7280)`,local:`var(--engine-local, #7c5cff)`},O={claude:`Claude publishes no local utilization signal, so there is no window percentage to read. Ashlr deliberately never throttles this seat on a guess.`,grok:`Grok is absent from the per-engine usage snapshot, so this fallback roster has no window data for it. Its real state comes from the per-account probe.`},k=`The only figure available is derived from the dispatch ledger against a configured cap, not from the subscription itself. It is shown under Dispatch limits.`,A=`Local models have no subscription and no quota window — only whether the runtime is up.`,ue={"account-observation":`from this account’s observed windows`,"subscription-tracker":`from the subscription tracker`};function j(e){return{sourceState:`unknown`,complete:!1,reason:e}}function M(e){return e>=90?`danger`:e>=80?`warn`:`ok`}function N(e){return Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function P(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function F(e,t,n){return{kind:`measured`,source:e,scope:t,windows:n}}function I(e){return{kind:`unknown`,reason:O[e]??`No subscription window reading is reported for this engine.`}}function de(e){let{engine:t,seat:n,subscription:r,frontier:i,engineSeatCount:a=1}=e;if(t===`local`)return{kind:`not-applicable`,reason:A};let o=(n?.health.windows??[]).filter(e=>typeof e.usedPercent==`number`&&Number.isFinite(e.usedPercent));if(o.length>0)return F(`account-observation`,`account`,o.map(e=>{let t=N(e.usedPercent),n=e.resetsAt?Date.parse(e.resetsAt):NaN;return{id:e.id,label:e.id,usedPct:t,resetsAt:Number.isNaN(n)?null:Math.round(n/1e3),tone:M(t)}}));if(r&&r.hasData&&r.windows.length>0)return F(`subscription-tracker`,a>1?`engine`:`account`,r.windows.map((e,t)=>{let n=N(e.usedPercent);return{id:`${e.label}-${t}`,label:e.label,usedPct:n,resetsAt:P(e.resetsAt),tone:M(n)}}));if(r&&!r.hasData)return I(t);if(i&&i.subscriptionWindow.state!==`unknown`){if(i.limit===void 0){let e=N(i.subscriptionWindow.usedPct);return F(`subscription-tracker`,a>1?`engine`:`account`,[{id:i.subscriptionWindow.windowLabel??`window`,label:i.subscriptionWindow.windowLabel??`window`,usedPct:e,resetsAt:P(i.subscriptionWindow.resetsAt),tone:M(e)}])}return{kind:`unknown`,reason:k}}return I(t)}function fe(e){if(!e)return null;let t=(e.byProvider??[]).map(e=>({provider:e.provider,tier:e.tier,tokens:e.tokens,costUsd:e.costUsd,sharePct:e.sharePct})),n=(e,n)=>t.filter(t=>t.tier===e).reduce((e,t)=>e+(t[n]||0),0);return{window:e.window,totalTokens:e.totalTokens,totalCostUsd:e.totalCostUsd,localSavingsUsd:e.localSavingsUsd,localTokens:n(`local`,`tokens`),cloudTokens:n(`cloud`,`tokens`),localCostUsd:n(`local`,`costUsd`),cloudCostUsd:n(`cloud`,`costUsd`),byProvider:[...t].sort((e,t)=>t.tokens-e.tokens),empty:t.length===0&&e.totalTokens===0}}function pe(e,t){let n=[],r=new Set;for(let t of e??[]){let e=`${t.backend}:${t.window}`;r.add(e);let i=t.max>0?N(t.used/t.max*100):null;n.push({id:e,backend:t.backend,window:t.window,max:t.max,used:t.used,standing:t.standing,usedPct:i,configuredOnly:!1})}for(let e of t??[]){let t=`${e.engine}:${e.window}`;r.has(t)||(r.add(t),n.push({id:t,backend:e.engine,window:e.window,max:e.max,used:null,standing:`unknown`,usedPct:null,configuredOnly:!0}))}return n.sort((e,t)=>e.backend.localeCompare(t.backend)||e.window.localeCompare(t.window))}var me=`No per-day series is available: the sources this view reads carry aggregate spend only, not a dated history.`;function he(e){if(!e)return{available:!1,reason:me};if(e.sourceQuality?.sourceState!==`healthy`)return{available:!1,reason:`No per-day series: the daemon ledger is ${e.sourceQuality?.sourceState??`unavailable`}${e.sourceQuality?.reason?` (${e.sourceQuality.reason})`:``}.`};let t=e.ticks;if(!t||t.length===0)return{available:!1,reason:me};let n=new Map;for(let e of t){let t=Date.parse(e.ts);if(Number.isNaN(t))continue;let r=new Date(t).toISOString().slice(0,10);n.set(r,(n.get(r)??0)+(Number.isFinite(e.spentUsd)?e.spentUsd:0))}if(n.size<2)return{available:!1,reason:`No per-day series: only ${n.size} day${n.size===1?``:`s`} of daemon ticks is retained, which is not a trend.`};let r=[...n.keys()].sort(),i=r[0],a=r[r.length-1],o=[];for(let e=Date.parse(`${i}T00:00:00Z`);e<=Date.parse(`${a}T00:00:00Z`);e+=864e5){let t=new Date(e).toISOString().slice(0,10);o.push({day:t,usd:n.has(t)?n.get(t):null})}return{available:!0,days:o,tickCount:t.length,caveat:`From the last ${t.length} recorded daemon ticks. The tick ledger is capped and records the autonomous loop only — interactive chat turns are not in it, and a gap is a day with no retained tick, not a measured zero.`}}var ge={available:!1,reason:null,dailyBudgetUsd:null,subscriptionMaxPercent:null,todaySpentUsd:null,todaySpentDate:null,foundryLimits:[]};function L(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function R(e,t){if(!e)return null;for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t}return null}function _e(e,t=null){let n=L(e);if(!n)return{...ge,reason:t};let r=L(n.caps)??n,i=L(n.daemon),a=L(n.spend),o=[],s=r.foundryLimits;if(Array.isArray(s))for(let e of s){let t=L(e);if(!t)continue;let n=typeof t.engine==`string`?t.engine:null,r=R(t,[`max`]);n!==null&&r!==null&&o.push({engine:n,window:typeof t.window==`string`?t.window:`1d`,max:r})}return{available:!0,reason:t,dailyBudgetUsd:R(r,[`dailyBudgetUsd`]),subscriptionMaxPercent:R(r,[`subscriptionMaxPercent`]),todaySpentUsd:a?R(a,[`todayUsd`]):R(n,[`todaySpentUsd`,`todaySpendUsd`,`spendTodayUsd`])??R(i,[`todaySpentUsd`]),todaySpentDate:a&&typeof a.todayDate==`string`?a.todayDate:null,foundryLimits:o}}function ve(e){return{...ge,reason:e}}var z={section:`_section_1aa17_11`,header:`_header_1aa17_20`,headerTitle:`_headerTitle_1aa17_33`,headerMeta:`_headerMeta_1aa17_41`,ghostButton:`_ghostButton_1aa17_50`,scroll:`_scroll_1aa17_67`,panel:`_panel_1aa17_75`,panelHead:`_panelHead_1aa17_83`,panelTitle:`_panelTitle_1aa17_95`,panelNote:`_panelNote_1aa17_104`,muted:`_muted_1aa17_111`,noteList:`_noteList_1aa17_124`,num:`_num_1aa17_135`,tiles:`_tiles_1aa17_142`,cards:`_cards_1aa17_150`,card:`_card_1aa17_150`,cardHead:`_cardHead_1aa17_177`,cardLabel:`_cardLabel_1aa17_185`,cardMeta:`_cardMeta_1aa17_196`,cardFigures:`_cardFigures_1aa17_206`,figure:`_figure_1aa17_215`,figureLabel:`_figureLabel_1aa17_222`,figureValue:`_figureValue_1aa17_230`,windows:`_windows_1aa17_239`,windowHead:`_windowHead_1aa17_246`,windowPct:`_windowPct_1aa17_256`,windowReset:`_windowReset_1aa17_262`,track:`_track_1aa17_275`,fill:`_fill_1aa17_283`,unknownRule:`_unknownRule_1aa17_311`,signalRow:`_signalRow_1aa17_318`,reason:`_reason_1aa17_325`,sourceLine:`_sourceLine_1aa17_333`,split:`_split_1aa17_348`,splitRow:`_splitRow_1aa17_355`,splitBar:`_splitBar_1aa17_364`,splitFill:`_splitFill_1aa17_371`,limitList:`_limitList_1aa17_377`,limitRow:`_limitRow_1aa17_382`,limitName:`_limitName_1aa17_395`,limitWindow:`_limitWindow_1aa17_404`,limitValue:`_limitValue_1aa17_409`,verdictDetail:`_verdictDetail_1aa17_425`,bindingLabel:`_bindingLabel_1aa17_433`,windowBlock:`_windowBlock_1aa17_443`,windowBlockLead:`_windowBlockLead_1aa17_452`,windowFlag:`_windowFlag_1aa17_465`,creditsRow:`_creditsRow_1aa17_473`,actionBlock:`_actionBlock_1aa17_488`,command:`_command_1aa17_494`,commandInline:`_commandInline_1aa17_495`,negative:`_negative_1aa17_510`,segmented:`_segmented_1aa17_516`,segment:`_segment_1aa17_516`,charts:`_charts_1aa17_558`,tableScroll:`_tableScroll_1aa17_570`,stateBlock:`_stateBlock_1aa17_578`,stateTitle:`_stateTitle_1aa17_586`,stateBody:`_stateBody_1aa17_595`,stateActions:`_stateActions_1aa17_601`,skeletonGrid:`_skeletonGrid_1aa17_605`,capacity:`_capacity_1aa17_660`,capacityHeadline:`_capacityHeadline_1aa17_665`,chips:`_chips_1aa17_680`,chip:`_chip_1aa17_680`,chipLabel:`_chipLabel_1aa17_727`,chipState:`_chipState_1aa17_737`,chipPct:`_chipPct_1aa17_757`,capacityFacts:`_capacityFacts_1aa17_763`,capacityFact:`_capacityFact_1aa17_763`,capacityMuted:`_capacityMuted_1aa17_777`,proseResets:`_proseResets_1aa17_783`,visuallyHidden:`_visuallyHidden_1aa17_787`,cardTrigger:`_cardTrigger_1aa17_807`,cardChevron:`_cardChevron_1aa17_823`,detail:`_detail_1aa17_848`,detailHead:`_detailHead_1aa17_856`,detailTitle:`_detailTitle_1aa17_863`,detailGrid:`_detailGrid_1aa17_871`,detailColumn:`_detailColumn_1aa17_878`,evidenceList:`_evidenceList_1aa17_882`,evidenceRow:`_evidenceRow_1aa17_889`,evidenceValue:`_evidenceValue_1aa17_896`,figureTile:`_figureTile_1aa17_907`,figureBig:`_figureBig_1aa17_918`,figureCaption:`_figureCaption_1aa17_926`,panelActions:`_panelActions_1aa17_934`,placement:`_placement_1aa17_947`,placementBar:`_placementBar_1aa17_954`,placementGpu:`_placementGpu_1aa17_964`,placementCpu:`_placementCpu_1aa17_965`,placementText:`_placementText_1aa17_971`,staleNotice:`_staleNotice_1aa17_984`,staleFlag:`_staleFlag_1aa17_998`},B=t();function V({view:e,ariaPrefix:t,prominent:n=!1}){let r=`${t} ${e.label}`;if(e.limitReached)return(0,B.jsxs)(`div`,{className:n?z.windowBlockLead:z.windowBlock,children:[(0,B.jsxs)(`div`,{className:z.windowHead,children:[(0,B.jsx)(`span`,{children:e.label}),(0,B.jsx)(`span`,{className:z.windowFlag,children:`limit reached`})]}),(0,B.jsx)(`div`,{className:z.track,"data-tone":`danger`,role:`img`,"aria-label":`${r}: the provider flagged this window as rate-limited, so no percentage is shown`,children:(0,B.jsx)(`div`,{className:z.fill,style:{width:`100%`}})}),e.resetText?(0,B.jsx)(`p`,{className:z.windowReset,children:e.resetText}):null]});if(e.usedPct===null)return(0,B.jsxs)(`div`,{className:n?z.windowBlockLead:z.windowBlock,children:[(0,B.jsxs)(`div`,{className:z.windowHead,children:[(0,B.jsx)(`span`,{children:e.label}),(0,B.jsx)(u,{quality:j(`No percentage was reported for this window.`),label:r,children:null})]}),(0,B.jsx)(`hr`,{className:z.unknownRule,"aria-hidden":`true`})]});let i=Math.round(e.usedPct);return(0,B.jsxs)(`div`,{className:n?z.windowBlockLead:z.windowBlock,children:[(0,B.jsxs)(`div`,{className:z.windowHead,children:[(0,B.jsx)(`span`,{children:e.label}),(0,B.jsxs)(`span`,{className:z.windowPct,children:[i,`%`]})]}),(0,B.jsx)(`div`,{className:z.track,"data-tone":e.tone,role:`meter`,"aria-label":`${r} used`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-valuetext":`${i}% used${e.resetText?`, ${e.resetText}`:``}`,children:(0,B.jsx)(`div`,{className:z.fill,style:{width:`${i}%`}})}),e.resetText?(0,B.jsx)(`p`,{className:z.windowReset,children:e.resetText}):null]})}var ye={available:`success`,credits:`success`,tight:`warning`,exhausted:`danger`,"signed-out":`warning`,"probe-unsupported":`warning`,unknown:`unknown`};function be({credits:e}){if(!e)return null;let t=e.unlimited?`unlimited`:e.balance===null?null:e.balanceValue===null?e.balance:e.balanceValue.toLocaleString(`en-US`,{maximumFractionDigits:2});return(0,B.jsxs)(`div`,{className:z.creditsRow,children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:`Credits`}),(0,B.jsx)(`span`,{className:z.num,title:e.balance??void 0,children:t??`not reported`}),(0,B.jsx)(`p`,{className:z.reason,children:`Credits are a separate pool from the window above — a fully used window does not stop a spendable balance from being spent. The provider gives a bare number, not a currency, so it is shown as reported.`})]})}function xe({card:e,onOpen:t,expanded:n=!1,triggerId:r,detailId:i}){let o={"--engine-color":e.color},s=e.verdict.state===`signed-out`,c=t!==void 0&&e.hasDetail,l=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.cardLabel,children:e.label}),(0,B.jsx)(a,{status:e.verdict.state,tone:ye[e.verdict.state],children:e.verdict.headline})]});return(0,B.jsxs)(`article`,{className:z.card,style:o,"aria-label":`${e.label} usage`,"data-selected":n?`true`:void 0,children:[c?(0,B.jsxs)(`button`,{type:`button`,id:r,className:`${z.cardHead} ${z.cardTrigger}`,"aria-expanded":n,...i?{"aria-controls":i}:{},onClick:()=>t(e.id),children:[l,(0,B.jsx)(`span`,{className:z.cardChevron,"aria-hidden":`true`,children:n?`−`:`+`})]}):(0,B.jsx)(`div`,{className:z.cardHead,children:l}),(0,B.jsxs)(`div`,{className:z.cardMeta,children:[(0,B.jsx)(`span`,{children:T[e.engine]}),(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,B.jsx)(`span`,{children:e.plan?`${e.plan} plan`:`plan not reported`})]}),(0,B.jsx)(`p`,{className:z.verdictDetail,children:e.verdict.detail}),e.verdict.code?(0,B.jsxs)(`p`,{className:z.sourceLine,children:[`Probe reason `,(0,B.jsx)(`code`,{className:z.commandInline,children:e.verdict.code})]}):null,e.binding?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.bindingLabel,children:`Binding constraint`}),(0,B.jsx)(V,{view:e.binding,ariaPrefix:e.label,prominent:!0})]}):null,e.others.length>0?(0,B.jsx)(`div`,{className:z.windows,children:e.others.map(t=>(0,B.jsx)(V,{view:t,ariaPrefix:e.label},t.id))}):null,(0,B.jsx)(be,{credits:e.credits}),s?(0,B.jsx)(`div`,{className:z.actionBlock,children:e.reconnectCommand?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:`Reconnect`}),(0,B.jsx)(`code`,{className:z.command,children:e.reconnectCommand})]}):(0,B.jsxs)(`p`,{className:z.reason,children:[`Sign this account back in through its own provider CLI under its pinned profile. Ashlr does not print that invocation here, because the pinned-profile launcher path is never allowed onto a surface. `,(0,B.jsx)(`code`,{className:z.commandInline,children:`ashlr resources`}),` `,`shows the connection state once it is back.`]})}):null,e.sourceNote?(0,B.jsx)(`p`,{className:z.sourceLine,children:e.sourceNote}):null]})}var Se={available:`success`,credits:`success`,tight:`warning`,exhausted:`danger`,"signed-out":`warning`,"probe-unsupported":`warning`,unknown:`unknown`},Ce=`No per-account history is retained by any source this view reads: the accounts route is a point-in-time snapshot and the usage series carries no per-account breakdown. A trend is not drawn from one reading.`;function H(e,t){return e===null?`The source behind this card reports no health verdict at all.`:e===`unknown`?t===`claude`?`Health reads unknown, which is how this provider always reads — the probe has no health channel for it. It is not a fault.`:`Health reads unknown: the monitor took no verdict on this account.`:`Monitor health: ${e}.`}function U({label:e,children:t}){return(0,B.jsxs)(`div`,{className:z.evidenceRow,children:[(0,B.jsx)(`dt`,{className:z.figureLabel,children:e}),(0,B.jsx)(`dd`,{className:z.evidenceValue,children:t})]})}function we({card:e,onClose:t,headingId:n}){let{evidence:r}=e,i=e.credits,o=(0,E.useRef)(null);return(0,E.useEffect)(()=>{o.current?.focus()},[e.id]),(0,B.jsxs)(`section`,{className:z.detail,"aria-labelledby":n,children:[(0,B.jsxs)(`div`,{className:z.detailHead,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h4`,{id:n,ref:o,tabIndex:-1,className:z.detailTitle,children:e.label}),(0,B.jsxs)(`div`,{className:z.cardMeta,children:[(0,B.jsx)(`span`,{children:T[e.engine]}),(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,B.jsx)(`span`,{children:e.plan?`${e.plan} plan`:`plan not reported`}),(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,B.jsx)(a,{status:e.verdict.state,tone:Se[e.verdict.state],children:e.verdict.headline})]})]}),(0,B.jsx)(`button`,{type:`button`,className:z.ghostButton,onClick:t,children:`Close`})]}),(0,B.jsx)(`p`,{className:z.verdictDetail,children:e.verdict.detail}),(0,B.jsxs)(`div`,{className:z.detailGrid,children:[(0,B.jsxs)(`div`,{className:z.detailColumn,children:[(0,B.jsxs)(`span`,{className:z.figureLabel,children:[`All windows (`,e.allWindows.length,`)`]}),e.allWindows.length===0?(0,B.jsx)(`p`,{className:z.reason,children:`This account reported no windows at all. That is an absent reading, not a set of windows at zero.`}):(0,B.jsx)(`div`,{className:z.windows,children:e.allWindows.map((t,n)=>(0,B.jsx)(V,{view:t,ariaPrefix:e.label,prominent:n===0},t.id))}),e.allWindows.some(e=>!e.measured)?(0,B.jsx)(`p`,{className:z.reason,children:`At least one window above carries a provider FLAG rather than a measurement, so no percentage is printed for it. A flagged limit and a measured 100% are different facts.`}):null]}),(0,B.jsxs)(`div`,{className:z.detailColumn,children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:`Probe evidence`}),(0,B.jsxs)(`dl`,{className:z.evidenceList,children:[(0,B.jsx)(U,{label:`Connection`,children:r.state}),(0,B.jsx)(U,{label:`Authentication`,children:r.authentication}),(0,B.jsx)(U,{label:`Health`,children:H(r.health,e.engine)}),(0,B.jsx)(U,{label:`Observed`,children:r.observedAt===null?(0,B.jsx)(`span`,{className:z.capacityMuted,children:`no observation timestamp was reported`}):(0,B.jsx)(`span`,{className:z.num,children:new Date(r.observedAt).toLocaleString()})}),(0,B.jsx)(U,{label:`Probe reason`,children:r.reasonCode===null?(0,B.jsx)(`span`,{className:z.capacityMuted,children:`none reported`}):(0,B.jsx)(`code`,{className:z.commandInline,children:r.reasonCode})}),r.unsupported?(0,B.jsxs)(U,{label:`Version pin`,children:[(0,B.jsx)(`code`,{className:z.commandInline,children:r.unsupported.code}),r.unsupported.pinnedVersion?(0,B.jsxs)(B.Fragment,{children:[` `,`pinned to `,(0,B.jsx)(`span`,{className:z.num,children:r.unsupported.pinnedVersion}),`. A one-line constant bump, not an outage.`]}):null]}):null]}),i?(0,B.jsxs)(`div`,{className:z.creditsRow,children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:`Credits`}),(0,B.jsx)(`span`,{className:z.num,title:i.balance??void 0,children:i.unlimited?`unlimited`:i.balanceValue===null?i.balance??`not reported`:i.balanceValue.toLocaleString(`en-US`,{maximumFractionDigits:2})}),(0,B.jsx)(`p`,{className:z.reason,children:`A separate pool from every window above. The provider gives a bare number, not a currency, so it is shown as reported.`})]}):null,r.notes.length>0?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:`Provider notes`}),(0,B.jsx)(`ul`,{className:z.noteList,children:r.notes.map(e=>(0,B.jsx)(`li`,{className:z.capacityMuted,children:e},e))})]}):null]})]}),(0,B.jsx)(`p`,{className:z.sourceLine,children:Ce})]})}var W={available:`ready`,credits:`ready`,tight:`tight`,exhausted:`blocked`,"signed-out":`blocked`,"probe-unsupported":`blocked`,unknown:`unread`};function G(e,t,n){return e===1?t:n}function K(e){let{ready:t,tight:n,blocked:r,unread:i,total:a,local:o}=e;if(a===0)return`No seats are reported at all. This is an empty roster, not a set of seats at zero.`;let s=o===null?``:o.reachable&&o.residentCount>0?` ${o.residentCount} local ${G(o.residentCount,`model is`,`models are`)} resident and answer with no load delay.`:o.reachable&&o.agenticCount>0?` No local model is resident, but ${o.agenticCount} installed ${G(o.agenticCount,`one can`,`ones can`)} drive a session after a load.`:o.reachable?` No local model is resident.`:` The local runtime did not answer, so local capacity is unknown.`,c=i===0?``:` ${i} ${G(i,`seat has`,`seats have`)} no reading at all — unread, not exhausted.`;return t>0?`${t} of ${a} ${G(a,`seat is`,`seats are`)} usable right now.${c}${s}`:n>0?`No seat is clear: ${n} ${G(n,`is`,`are`)} running tight and ${r} ${G(r,`is`,`are`)} blocked.${c}${s}`:r>0?`No cloud seat reports headroom — ${r} blocked.${c}${s}`:`No seat reported a usable window.${c}${s}`}function Te(e){let t=e.binding;return{id:e.id,label:e.label,kind:`account`,color:e.color,cls:W[e.verdict.state],headline:e.verdict.headline,usedPct:t&&t.measured&&!t.limitReached?t.usedPct:null,measured:t!==null&&t.measured&&!t.limitReached}}function Ee(e){return{id:`local`,label:`Local`,kind:`local`,color:e.color,cls:W[e.verdict.state],headline:e.verdict.headline,usedPct:e.usedPct,measured:e.usedPct!==null}}function De(e,t){let n=[],r=[],i=new Set;for(let a of e)for(let e of a.windows){if(e.resetsAt!==null){let r=Date.parse(e.resetsAt);if(!Number.isNaN(r)){let i=r-t;n.push({seatLabel:a.label,windowLabel:e.label,atMs:r,inMs:i,overdue:i<=0});continue}}if(e.resetText!==null){let t=`${a.label}|${e.label}|${e.resetText}`;if(i.has(t))continue;i.add(t),r.push({seatLabel:a.label,windowLabel:e.label,text:e.resetText})}}return{instants:n,prose:r}}function Oe(e){let t=e.filter(e=>!e.overdue);return t.length>0?t.reduce((e,t)=>t.inMs<e.inMs?t:e):e.length===0?null:e.reduce((e,t)=>t.atMs>e.atMs?t:e)}function ke(e,t){let n=e.filter(e=>e.atMs>t);return n.length>0?n.reduce((e,t)=>t.atMs<e.atMs?t:e):e.length===0?null:e.reduce((e,t)=>t.atMs>e.atMs?t:e)}function Ae(e,t){if(e===null&&t===null)return null;let n=e?.residentBytes??t?.residentBytes??null,r=e?.memoryBudgetBytes??t?.memoryBudgetBytes??null;return{reachable:t?.reachable??e?.verdict.state!==`unknown`,residentCount:e?.residentCount??t?.rows.filter(e=>e.resident).length??0,installedCount:e?.installedCount??t?.rows.length??0,agenticCount:t?.agenticCount??0,unknownToolCount:t?.unknownToolCount??0,residentBytes:n,memoryBudgetBytes:r,headroomBytes:n!==null&&r!==null?Math.max(0,r-n):null,freeMemoryBytes:t?.freeMemoryBytes??null,usedPct:e?.usedPct??t?.memoryUsedPct??null}}function je(e){let t=e.nowMs??Date.now(),n=e.cards.map(Te);e.localCard&&n.push(Ee(e.localCard));let r=e=>n.filter(t=>t.cls===e).length,i=r(`ready`),a=r(`tight`),o=r(`blocked`),s=r(`unread`),{instants:c,prose:l}=De(e.cards.map(e=>({label:e.label,windows:e.allWindows})),t),u=Ae(e.localCard,e.localView);return{seats:n,ready:i,tight:a,blocked:o,unread:s,total:n.length,resets:c,nextReset:Oe(c),proseResets:l,local:u,headline:K({ready:i,tight:a,blocked:o,unread:s,total:n.length,local:u}),noCapacity:n.length>0&&i===0&&a===0&&s<n.length}}function Me(e){if(!Number.isFinite(e))return`—`;if(e<=0)return`overdue`;let t=Math.floor(e/1e3),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:i>0?`${i}m`:`${t}s`}function Ne(e){return e===null?`unknown`:e.includes(`tools`)?`supported`:`unsupported`}function Pe(e,t){return e===null?t!==null&&t.length===0?`unknown`:Ne(t):e?`supported`:`unsupported`}function Fe(e,t){let n=e.expiresAt?Date.parse(e.expiresAt):NaN,r=e.gpuPercent??(e.sizeBytes!==null&&e.sizeBytes>0&&e.sizeVramBytes!==null?Math.max(0,Math.min(100,e.sizeVramBytes/e.sizeBytes*100)):null);return{name:e.name,runtime:e.runtime,resident:e.loaded,placement:e.placement,memoryPct:e.loaded?e.memoryPercent:null,family:e.family,sizeBytes:e.sizeBytes,sizeVramBytes:e.sizeVramBytes,gpuPct:r,expiresInMs:e.loaded&&!Number.isNaN(n)?n-t:null,expiresAtMs:e.loaded&&!Number.isNaN(n)?n:null,parameterSize:e.parameterSize,quantization:e.quantization,nativeContext:e.nativeContext,configuredContext:e.configuredContext,contextTruncated:e.nativeContext!==null&&e.configuredContext!==null&&e.configuredContext<e.nativeContext,tools:Pe(e.supportsTools,e.capabilities)}}function Ie(e){let t=e.filter(e=>e.stale);if(t.length===0)return{stale:!1,staleForMs:null,runtimes:[]};let n=t.map(e=>e.staleForMs).filter(e=>e!==null);return{stale:!0,staleForMs:n.length===0?null:Math.max(...n),runtimes:t.map(e=>e.runtime)}}function Le(e){if(e===null||!Number.isFinite(e)||e<0)return`an unreported interval`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return r===0?`${n}m`:`${n}m ${r}s`}function Re(e,t=Date.now()){if(!e)return null;let n=e.models.map(e=>Fe(e,t)).sort((e,t)=>Number(t.resident)-Number(e.resident)||e.name.localeCompare(t.name)),r=n.filter(e=>e.resident),i=r.some(e=>e.sizeBytes===null)?null:r.reduce((e,t)=>e+(t.sizeBytes??0),0),a=e.memoryBudgetBytes;return{reachable:e.reachable,reason:e.reason,rows:n,residentBytes:i,memoryBudgetBytes:a,memoryUsedPct:i!==null&&a!==null&&a>0?Math.max(0,Math.min(100,i/a*100)):null,freeMemoryBytes:e.freeMemoryBytes,runtimes:e.runtimes,notes:e.notes,agenticCount:n.filter(e=>e.tools===`supported`).length,nonAgenticCount:n.filter(e=>e.tools===`unsupported`).length,unknownToolCount:n.filter(e=>e.tools===`unknown`).length}}function q(e){if(e===null||!Number.isFinite(e))return`—`;let t=e/1024**3;if(t>=10)return`${t.toFixed(0)} GB`;if(t>=1)return`${t.toFixed(1)} GB`;let n=e/1024**2;return`${Math.round(n)} MB`}function ze(e){if(e===null||!Number.isFinite(e))return`—`;if(e<=0)return`expired`;let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function J(e){return e===null||!Number.isFinite(e)?`—`:e>=1024?`${Math.round(e/1024)}k`:String(e)}var Be={ready:`usable`,tight:`tight`,blocked:`blocked`,unread:`no reading`};function Ve(e,t=3e4){let[n,r]=(0,E.useState)(()=>Date.now());return(0,E.useEffect)(()=>{if(!e)return;let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function He({seat:e,selected:t,onSelect:n}){let r={"--engine-color":e.color},i=(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.chipLabel,children:e.label}),(0,B.jsx)(`span`,{className:z.chipState,children:Be[e.cls]}),e.usedPct===null?null:(0,B.jsxs)(`span`,{className:z.chipPct,children:[Math.round(e.usedPct),`%`]})]});return n===null?(0,B.jsx)(`span`,{className:z.chip,style:r,"data-capacity":e.cls,children:i}):(0,B.jsx)(`button`,{type:`button`,className:z.chip,style:r,"data-capacity":e.cls,"aria-pressed":t,onClick:()=>n(e.id),children:i})}function Ue({overview:e,selectedId:t,onSelectSeat:n}){let r=Ve(e.resets.length>0),i=(0,E.useMemo)(()=>ke(e.resets,r),[e.resets,r]),a=i===null?0:i.atMs-r,o=a<=0,s=e.local;return(0,B.jsxs)(`section`,{className:z.capacity,"aria-labelledby":`verse-capacity-heading`,children:[(0,B.jsx)(`h3`,{id:`verse-capacity-heading`,className:z.visuallyHidden,children:`Capacity right now`}),(0,B.jsx)(`p`,{className:z.capacityHeadline,"data-empty":e.noCapacity?`true`:void 0,children:e.headline}),e.seats.length>0?(0,B.jsx)(`div`,{className:z.chips,role:`list`,"aria-label":`Seat capacity`,children:e.seats.map(e=>(0,B.jsx)(`span`,{role:`listitem`,children:(0,B.jsx)(He,{seat:e,selected:t===e.id,onSelect:e.kind===`account`?n:null})},e.id))}):null,(0,B.jsxs)(`dl`,{className:z.capacityFacts,children:[(0,B.jsxs)(`div`,{className:z.capacityFact,children:[(0,B.jsx)(`dt`,{className:z.figureLabel,children:`Nearest reset`}),(0,B.jsx)(`dd`,{children:i===null?(0,B.jsx)(`span`,{className:z.capacityMuted,children:`No seat reported a dated reset. That is an absent timestamp, not "never".`}):o?(0,B.jsxs)(`span`,{className:z.capacityMuted,children:[(0,B.jsx)(`span`,{className:z.num,children:i.seatLabel}),` · `,i.windowLabel,` was due to reset at `,new Date(i.atMs).toLocaleString(),` — this reading predates the rollover.`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.num,children:Me(a)}),` `,(0,B.jsxs)(`span`,{className:z.capacityMuted,children:[`· `,i.seatLabel,` `,i.windowLabel,`, at`,` `,new Date(i.atMs).toLocaleString()]})]})})]}),(0,B.jsxs)(`div`,{className:z.capacityFact,children:[(0,B.jsx)(`dt`,{className:z.figureLabel,children:`Local headroom`}),(0,B.jsx)(`dd`,{children:s===null?(0,B.jsx)(`span`,{className:z.capacityMuted,children:`No local source answered.`}):s.reachable?s.headroomBytes===null?(0,B.jsx)(`span`,{className:z.capacityMuted,children:`Either the resident total or the machine budget was not reported, so headroom cannot be computed.`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.num,children:q(s.headroomBytes)}),` `,(0,B.jsxs)(`span`,{className:z.capacityMuted,children:[`free of `,q(s.memoryBudgetBytes),` · `,s.residentCount,` resident,`,` `,s.installedCount,` installed`]})]}):(0,B.jsx)(`span`,{className:z.capacityMuted,children:`The local runtime did not answer this probe, so headroom is unknown — not zero, and not full.`})})]}),(0,B.jsxs)(`div`,{className:z.capacityFact,children:[(0,B.jsx)(`dt`,{className:z.figureLabel,children:`Agentic locally`}),(0,B.jsx)(`dd`,{children:s===null||!s.reachable?(0,B.jsx)(`span`,{className:z.capacityMuted,children:`unknown`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{className:z.num,children:s.agenticCount}),` `,(0,B.jsxs)(`span`,{className:z.capacityMuted,children:[`of `,s.installedCount,` installed models can drive a session`,s.unknownToolCount>0?`; ${s.unknownToolCount} did not report a capability list`:``]})]})})]})]}),e.proseResets.length>0?(0,B.jsxs)(`div`,{className:z.proseResets,children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:`Resets reported as text`}),(0,B.jsx)(`ul`,{className:z.noteList,children:e.proseResets.map(e=>(0,B.jsxs)(`li`,{className:z.capacityMuted,children:[e.seatLabel,` · `,e.windowLabel,` — `,e.text]},`${e.seatLabel}-${e.windowLabel}-${e.text}`))}),(0,B.jsx)(`p`,{className:z.capacityMuted,children:`These providers publish a sentence rather than a timestamp, so it is shown exactly as given and never turned into a countdown.`})]}):null]})}function We(e){switch(e){case`ok`:return`success`;case`warn`:return`warning`;case`over`:return`danger`;case`unlimited`:return`neutral`;default:return`unknown`}}function Ge({rows:e,capsNote:t}){return(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-limits`,children:[(0,B.jsxs)(`div`,{className:z.panelHead,children:[(0,B.jsx)(`h3`,{id:`verse-usage-limits`,className:z.panelTitle,children:`Dispatch limits`}),(0,B.jsx)(`p`,{className:z.panelNote,children:`Calls recorded in the dispatch ledger against each configured foundry cap. This is not subscription utilization.`})]}),t?(0,B.jsx)(`p`,{className:z.muted,children:t}):null,e.length===0?(0,B.jsx)(`p`,{className:z.muted,children:`No foundry limits are configured, so dispatches are uncapped on this machine. Nothing here is being throttled.`}):(0,B.jsx)(`div`,{className:z.limitList,children:e.map(e=>(0,B.jsxs)(`div`,{className:z.limitRow,children:[(0,B.jsxs)(`span`,{className:z.limitName,children:[e.backend,(0,B.jsxs)(`span`,{className:z.limitWindow,children:[`per `,e.window]}),(0,B.jsx)(a,{status:e.standing,tone:We(e.standing),children:e.standing===`unknown`?`no reading`:e.standing})]}),e.usedPct===null?(0,B.jsx)(`hr`,{className:z.unknownRule,"aria-hidden":`true`}):(0,B.jsx)(`div`,{className:z.track,"data-tone":e.usedPct>=100?`danger`:e.usedPct>=80?`warn`:`ok`,role:`meter`,"aria-label":`${e.backend} dispatches against its ${e.window} cap`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.usedPct),children:(0,B.jsx)(`div`,{className:z.fill,style:{width:`${Math.round(e.usedPct)}%`}})}),(0,B.jsx)(`span`,{className:z.limitValue,children:e.used===null?`configured ${y(e.max)}`:`${y(e.used)} / ${y(e.max)}`})]},e.id))})]})}var Ke=`Cost is ESTIMATED from a static price table in this repo, not billed. It will not match a provider invoice.`,qe=`Codex reports cacheRead and cacheWrite as a hardcoded 0 upstream, so any window containing Codex traffic understates cache activity — its cache economics are not comparable to Claude’s.`,Je=`A flat heuristic of $3 per 1M local tokens, not a quote and not a measured price.`,Ye=`Fewer than two days in this window carry a rollup row, which is not a trend.`,Xe=`The daily rollup carries no per-engine or local/cloud columns, and the only tier split available is a single aggregate with no dates on it. Apportioning the daily totals by that aggregate’s ratio would invent a shape nobody measured, so no per-day split is drawn — the aggregate below is the real figure.`;function Ze(e){return Date.parse(`${e}T00:00:00Z`)}function Qe(e,t){return e.reduce((e,n)=>e+(t(n)===null?0:1),0)}function Y(e,t){return e.map(e=>({x:Ze(e.day),y:t(e)}))}function $e(e){return e.reduce((e,t)=>({tokensIn:e.tokensIn+t.tokensIn,tokensOut:e.tokensOut+t.tokensOut,estCostUsd:e.estCostUsd+t.estCostUsd,sessions:e.sessions+t.sessions,dayCount:e.dayCount+1}),{tokensIn:0,tokensOut:0,estCostUsd:0,sessions:0,dayCount:0})}function et(e){return e?e.days.length<2?{available:!1,reason:Ye}:{available:!0,days:e.days,series:[{id:`tokensIn`,label:`Tokens in`,points:Y(e.days,e=>e.tokensIn)},{id:`tokensOut`,label:`Tokens out`,points:Y(e.days,e=>e.tokensOut)}]}:{available:!1,reason:`No usage series has been loaded.`}}function tt(e){return e?e.days.length<2?{available:!1,reason:Ye}:{available:!0,days:e.days,series:[{id:`estCostUsd`,label:`Estimated spend`,points:Y(e.days,e=>e.estCostUsd)}]}:{available:!1,reason:`No usage series has been loaded.`}}function nt(e){if(!e)return{available:!1,reason:`No usage series has been loaded.`};let t=Qe(e.days,e=>e.cacheHitRate);return t===0?{available:!1,reason:`No day in this window reported a cache hit rate, so there is nothing to plot. This is an absent signal, not a 0% hit rate.`}:t<2?{available:!1,reason:`Only ${t} day in this window reported a cache hit rate, which is not a trend.`}:{available:!0,days:e.days,series:[{id:`cacheHitRate`,label:`Cache hit rate`,points:Y(e.days,e=>e.cacheHitRate)}]}}function rt(e){return e?Qe(e.days,e=>e.cacheRead)+Qe(e.days,e=>e.cacheWrite)===0?{available:!1,reason:`No day in this window reported cache read or write tokens, so there is nothing to plot. This is an absent signal, not zero cache activity.`}:e.days.length<2?{available:!1,reason:Ye}:{available:!0,days:e.days,series:[{id:`cacheRead`,label:`Cache read`,points:Y(e.days,e=>e.cacheRead)},{id:`cacheWrite`,label:`Cache write`,points:Y(e.days,e=>e.cacheWrite)}]}:{available:!1,reason:`No usage series has been loaded.`}}function it(e){if(e.length===0)return{tokensInPerDay:null,tokensOutPerDay:null,estCostUsdPerDay:null,peakCostDay:null};let t=$e(e),n=e.reduce((e,t)=>t.estCostUsd>e.estCostUsd?t:e);return{tokensInPerDay:t.tokensIn/e.length,tokensOutPerDay:t.tokensOut/e.length,estCostUsdPerDay:t.estCostUsd/e.length,peakCostDay:{day:n.day,usd:n.estCostUsd}}}function X(e,t){if(!(!e||e.days.length<2))return e.days.map(t)}var Z={"7d":`Last 7 days`,"30d":`Last 30 days`},at=S(0),ot=S(1),st=[{key:`provider`,label:`Provider`,render:e=>e.provider},{key:`tier`,label:`Tier`,render:e=>e.tier},{key:`tokens`,label:`Tokens`,numeric:!0,render:e=>y(e.tokens)},{key:`cost`,label:`Cost`,numeric:!0,render:e=>b(e.costUsd)},{key:`share`,label:`Share`,numeric:!0,render:e=>`${Math.round(e.sharePct)}%`}];function ct({label:e,tokens:t,total:n,color:r}){let i=n>0?Math.round(t/n*100):0;return(0,B.jsxs)(`div`,{className:z.splitRow,children:[(0,B.jsx)(`span`,{children:e}),(0,B.jsx)(`div`,{className:z.splitBar,role:`meter`,"aria-label":`${e} share of tokens`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:(0,B.jsx)(`div`,{className:z.splitFill,style:{width:`${i}%`,"--split-color":r}})}),(0,B.jsxs)(`span`,{className:z.num,children:[y(t),` · `,i,`%`]})]})}function lt({split:e,savingsNote:t}){let n=e.localTokens+e.cloudTokens,r=e.byProvider.map(e=>({label:e.provider,value:e.tokens}));return(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-split`,children:[(0,B.jsx)(`div`,{className:z.panelHead,children:(0,B.jsxs)(`h3`,{id:`verse-usage-split`,className:z.panelTitle,children:[`Local vs cloud · `,e.window]})}),(0,B.jsxs)(`div`,{className:z.tiles,children:[(0,B.jsx)(_,{label:`Not spent (ran locally)`,value:(0,B.jsx)(`span`,{className:z.num,children:b(e.localSavingsUsd)}),caption:`Estimated cloud list price of the ${e.window} local tokens. ${t??`A heuristic, not a quote.`}`}),(0,B.jsx)(_,{label:`Estimated cloud spend · ${e.window}`,value:(0,B.jsx)(`span`,{className:z.num,children:b(e.cloudCostUsd)}),caption:Ke}),(0,B.jsx)(_,{label:`Tokens · ${e.window}`,value:(0,B.jsx)(`span`,{className:z.num,children:y(e.totalTokens)}),caption:`Local and cloud combined`})]}),e.empty?(0,B.jsx)(`p`,{className:z.muted,style:{marginTop:`var(--space-4)`},children:`No provider activity recorded in this window.`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:z.split,style:{marginTop:`var(--space-4)`},children:[(0,B.jsx)(ct,{label:`Local`,tokens:e.localTokens,total:n,color:at}),(0,B.jsx)(ct,{label:`Cloud`,tokens:e.cloudTokens,total:n,color:ot})]}),(0,B.jsx)(p,{items:[{label:`Local`,color:at,kind:`swatch`},{label:`Cloud`,color:ot,kind:`swatch`}]}),(0,B.jsx)(m,{title:`Tokens by provider`,description:`Share of the ${e.window} window`,empty:r.length===0,emptyMessage:`No provider rows in this window.`,table:(0,B.jsx)(x,{caption:`Tokens and cost by provider`,columns:st,rows:e.byProvider,rowKey:e=>e.provider}),children:(0,B.jsx)(f,{data:r,orientation:`horizontal`,height:Math.max(120,r.length*34),formatValue:e=>y(e),ariaLabel:`Tokens by provider over the ${e.window} window`})})]})]})}var ut={available:`success`,credits:`success`,tight:`warning`,exhausted:`danger`,"signed-out":`warning`,"probe-unsupported":`warning`,unknown:`unknown`},dt=S(0),ft=S(5);function pt(e,t=5e3){let[n,r]=(0,E.useState)(()=>Date.now());return(0,E.useEffect)(()=>{if(!e)return;let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function mt({row:e}){let t=e.resident?e.expiresAtMs:null,n=pt(t!==null);return t===null?`—`:ze(t-n)}function ht({row:e}){return e.tools===`unknown`?(0,B.jsx)(u,{quality:j(`The runtime did not report a capability list for this model.`),label:`${e.name} tool support`,children:null}):e.tools===`supported`?(0,B.jsx)(a,{status:`agentic`,tone:`success`,children:`tools`}):(0,B.jsx)(a,{status:`no-tools`,tone:`danger`,children:`no tools`})}function gt({row:e}){if(e.sizeBytes===null)return(0,B.jsx)(`span`,{children:`—`});let t=e.resident?`Resident size reported by the runtime.`:`On-disk size; this model is not resident, so it is using no memory.`;return(0,B.jsxs)(`span`,{title:t,children:[q(e.sizeBytes),e.resident&&e.memoryPct!==null?` · ${Math.round(e.memoryPct)}% of machine`:``]})}function _t({row:e}){if(!e.resident)return(0,B.jsx)(`span`,{className:z.capacityMuted,children:`not resident`});if(e.gpuPct===null)return(0,B.jsx)(u,{quality:j(`The runtime reported no VRAM split for this resident model.`),label:`${e.name} placement`,children:null});let t=Math.round(e.gpuPct);return(0,B.jsxs)(`span`,{className:z.placement,children:[(0,B.jsxs)(`span`,{className:z.placementBar,role:`img`,"aria-label":`${e.name}: ${t}% of resident bytes on GPU, ${100-t}% on CPU`,children:[(0,B.jsx)(`span`,{className:z.placementGpu,style:{width:`${t}%`,"--split-color":dt}}),(0,B.jsx)(`span`,{className:z.placementCpu,style:{width:`${100-t}%`,"--split-color":ft}})]}),(0,B.jsx)(`span`,{className:z.placementText,children:e.placement===`unknown`?`${t}% GPU`:`${e.placement} · ${t}% GPU`})]})}function vt({row:e}){return e.nativeContext===null&&e.configuredContext===null?(0,B.jsx)(`span`,{children:`—`}):e.contextTruncated?(0,B.jsx)(`span`,{title:`Native context is ${J(e.nativeContext)}; Ashlr runs this seat at ${J(e.configuredContext)}.`,children:`${J(e.configuredContext)} of ${J(e.nativeContext)}`}):(0,B.jsx)(`span`,{children:J(e.nativeContext??e.configuredContext)})}var yt=[{key:`name`,label:`Model`,render:e=>e.name},{key:`state`,label:`State`,render:e=>e.resident?(0,B.jsx)(a,{status:`resident`,tone:`success`,children:`resident`}):(0,B.jsx)(a,{status:`installed`,tone:`neutral`,children:`installed`})},{key:`tools`,label:`Agentic`,render:e=>(0,B.jsx)(ht,{row:e})},{key:`size`,label:`Size`,numeric:!0,render:e=>(0,B.jsx)(gt,{row:e})},{key:`placement`,label:`Placement`,render:e=>(0,B.jsx)(_t,{row:e})},{key:`params`,label:`Params`,numeric:!0,render:e=>e.parameterSize??`—`},{key:`quant`,label:`Quant`,render:e=>e.quantization??`—`},{key:`context`,label:`Context`,numeric:!0,render:e=>(0,B.jsx)(vt,{row:e})},{key:`keepalive`,label:`Keep-alive`,numeric:!0,render:e=>(0,B.jsx)(mt,{row:e})}];function bt({staleness:e}){return e.stale?(0,B.jsxs)(`p`,{className:z.staleNotice,role:`status`,children:[(0,B.jsx)(`span`,{className:z.staleFlag,children:`last known-good`}),` Every local figure below is the last known-good reading from `,Le(e.staleForMs),` ago`,e.runtimes.length>0?` (${e.runtimes.join(`, `)})`:``,`, not a fresh probe: the runtime did not answer in time and the server kept the previous report rather than erasing it.`]}):null}function xt({card:e,staleness:t}){let n={"--engine-color":e.color},r=e.usedPct===null?null:Math.round(e.usedPct);return(0,B.jsxs)(`article`,{className:z.card,style:n,"aria-label":`Local usage`,children:[(0,B.jsxs)(`div`,{className:z.cardHead,children:[(0,B.jsx)(`span`,{className:z.cardLabel,children:`Local`}),(0,B.jsx)(a,{status:e.verdict.state,tone:ut[e.verdict.state],children:e.verdict.headline})]}),(0,B.jsxs)(`div`,{className:z.cardMeta,children:[(0,B.jsx)(`span`,{children:`Ollama`}),(0,B.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,B.jsx)(`span`,{children:`no subscription, no quota, no bill`})]}),t?.stale?(0,B.jsx)(bt,{staleness:t}):null,(0,B.jsx)(`p`,{className:z.verdictDetail,children:e.verdict.detail}),e.verdict.code?(0,B.jsxs)(`p`,{className:z.sourceLine,children:[`Probe reason `,(0,B.jsx)(`code`,{className:z.commandInline,children:e.verdict.code})]}):null,(0,B.jsx)(`span`,{className:z.bindingLabel,children:`Memory budget`}),r===null?(0,B.jsxs)(`div`,{className:z.windowBlockLead,children:[(0,B.jsxs)(`div`,{className:z.windowHead,children:[(0,B.jsx)(`span`,{children:`Resident against machine memory`}),(0,B.jsx)(u,{quality:j(`Either the resident size or the machine memory budget was not reported, so no share can be computed.`),label:`local memory budget`,children:null})]}),(0,B.jsx)(`hr`,{className:z.unknownRule,"aria-hidden":`true`})]}):(0,B.jsxs)(`div`,{className:z.windowBlockLead,children:[(0,B.jsxs)(`div`,{className:z.windowHead,children:[(0,B.jsx)(`span`,{children:`Resident against machine memory`}),(0,B.jsxs)(`span`,{className:z.windowPct,children:[r,`%`]})]}),(0,B.jsx)(`div`,{className:z.track,"data-tone":e.tone,role:`meter`,"aria-label":`Local resident models against machine memory budget`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"aria-valuetext":`${q(e.residentBytes)} of ${q(e.memoryBudgetBytes)} resident`,children:(0,B.jsx)(`div`,{className:z.fill,style:{width:`${r}%`}})}),(0,B.jsxs)(`p`,{className:z.windowReset,children:[q(e.residentBytes),` of `,q(e.memoryBudgetBytes)]})]}),(0,B.jsxs)(`p`,{className:z.sourceLine,children:[e.residentCount,` resident · `,e.installedCount,` installed`]})]})}function St({serving:e}){if(e===void 0)return(0,B.jsx)(`p`,{className:z.sourceLine,children:`Residency is not concurrency. How many local agents can run at once is decided by the serving runtime, not by these models — a resident model can still be served to one agent at a time. The serving runtime and its real slot count are in Autonomy.`});let t=le(e);return(0,B.jsxs)(`p`,{className:z.sourceLine,children:[(0,B.jsxs)(`strong`,{children:[t.headline,`.`]}),` `,t.detail]})}function Ct({view:e,serving:t}){let[n,r]=(0,E.useState)(!1),i=(0,E.useMemo)(()=>Ie(e?.runtimes??[]),[e]),a=(0,E.useMemo)(()=>n?(e?.rows??[]).filter(e=>e.tools!==`unsupported`):e?.rows??[],[e,n]),o=(0,E.useMemo)(()=>a.filter(e=>e.resident&&e.sizeBytes!==null),[a]);return(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-local`,children:[(0,B.jsxs)(`div`,{className:z.panelHead,children:[(0,B.jsx)(`h3`,{id:`verse-usage-local`,className:z.panelTitle,children:`Local availability`}),(0,B.jsx)(`p`,{className:z.panelNote,children:`Resident models answer immediately. A model without tool support cannot drive an agentic session at all, however much memory is free.`})]}),(0,B.jsx)(St,{serving:t}),(0,B.jsx)(bt,{staleness:i}),e===null?(0,B.jsx)(`p`,{className:z.muted,children:`No local-model source answered, so neither resident nor installed models can be listed. This is a missing source, not an empty machine.`}):e.reachable?e.rows.length===0?(0,B.jsx)(`p`,{className:z.muted,children:`The local runtime answered and reports no installed models. Pull one to give Ashlr a local seat.`}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:z.tiles,children:[(0,B.jsx)(Q,{label:`Resident now`,value:String(e.rows.filter(e=>e.resident).length),caption:e.residentBytes===null?`At least one resident model reported no size, so the total is withheld rather than understated.`:`${q(e.residentBytes)} in memory`}),(0,B.jsx)(Q,{label:`Installed`,value:String(e.rows.length),caption:`On disk; the first turn on one of these pays a load`}),(0,B.jsx)(Q,{label:`Can drive a session`,value:String(e.agenticCount),caption:e.unknownToolCount>0?`${e.nonAgenticCount} cannot; ${e.unknownToolCount} did not report a capability list`:`${e.nonAgenticCount} cannot drive one`}),(0,B.jsx)(Q,{label:`Machine memory`,value:e.memoryBudgetBytes===null?`unknown`:q(e.memoryBudgetBytes),caption:e.freeMemoryBytes===null?`The machine reported no free-memory figure.`:`${q(e.freeMemoryBytes)} reported free by the OS`})]}),(0,B.jsxs)(`div`,{className:z.panelActions,children:[(0,B.jsx)(`button`,{type:`button`,className:z.segment,"aria-pressed":n,onClick:()=>r(e=>!e),children:`Hide models that cannot drive a session`}),e.nonAgenticCount>0?(0,B.jsxs)(`span`,{className:z.capacityMuted,children:[e.nonAgenticCount,` of `,e.rows.length,` installed models cannot drive an agentic session.`]}):null]}),(0,B.jsx)(`div`,{className:z.tableScroll,children:(0,B.jsx)(x,{caption:`Local models: residency, tool support, size, placement, parameters, quantization, context and keep-alive`,columns:yt,rows:a,rowKey:e=>`${e.runtime??`runtime`}:${e.name}`})}),(0,B.jsx)(`div`,{className:z.charts,children:(0,B.jsx)(m,{title:`Resident memory by model`,description:`What is actually in memory right now`,caveat:`Only models the runtime reports as resident WITH a size appear here. An installed model occupies no memory and is not a bar at zero.`,empty:o.length===0,emptyMessage:`Nothing is resident, so there is no memory in use to chart. That is an idle machine, not a zero reading.`,table:(0,B.jsx)(x,{caption:`Resident size per model`,columns:[{key:`name`,label:`Model`,render:e=>e.name},{key:`size`,label:`Resident`,numeric:!0,render:e=>q(e.sizeBytes)}],rows:o,rowKey:e=>e.name}),children:(0,B.jsx)(f,{data:o.map(e=>({label:e.name,value:e.sizeBytes})),orientation:`horizontal`,height:Math.max(120,o.length*34),formatValue:e=>q(e),ariaLabel:`Resident memory by local model`})})}),e.runtimes.length>0?(0,B.jsx)(`ul`,{className:z.noteList,children:e.runtimes.map(e=>(0,B.jsxs)(`li`,{className:z.capacityMuted,children:[e.runtime,`:`,` `,e.reachable?`${e.modelCount} model${e.modelCount===1?``:`s`} reported`:`did not answer`,e.stale?` · retained reading, ${Le(e.staleForMs)} old`:``,e.reason?` · `:``,e.reason?(0,B.jsx)(`code`,{className:z.commandInline,children:e.reason}):null]},e.runtime))}):null,e.notes.length>0?(0,B.jsx)(`ul`,{className:z.noteList,children:e.notes.map(e=>(0,B.jsx)(`li`,{className:z.capacityMuted,children:e},e))}):null,(0,B.jsxs)(`p`,{className:z.sourceLine,children:[`Sizes and the GPU share come from the runtime's own resident report; a model with no reported VRAM split shows no placement bar rather than being drawn as fully on GPU.`,` `,y(e.rows.length),` models installed.`]})]}):(0,B.jsxs)(`p`,{className:z.muted,children:[`No local runtime answered this probe, so nothing about local models can be read. That is an unanswered probe, not a report that no models are installed.`,e.reason?(0,B.jsxs)(B.Fragment,{children:[` `,`Probe reason `,(0,B.jsx)(`code`,{className:z.commandInline,children:e.reason}),`.`]}):null]})]})}function Q({label:e,value:t,caption:n}){return(0,B.jsxs)(`div`,{className:z.figureTile,children:[(0,B.jsx)(`span`,{className:z.figureLabel,children:e}),(0,B.jsx)(`span`,{className:z.figureBig,children:t}),(0,B.jsx)(`span`,{className:z.figureCaption,children:n})]})}var wt=[`7d`,`30d`],Tt=[{key:`day`,label:`Day`,render:e=>h(e.day)},{key:`in`,label:`Tokens in`,numeric:!0,render:e=>y(e.tokensIn)},{key:`out`,label:`Tokens out`,numeric:!0,render:e=>y(e.tokensOut)},{key:`sessions`,label:`Sessions`,numeric:!0,render:e=>y(e.sessions)}],Et=[{key:`day`,label:`Day`,render:e=>h(e.day)},{key:`cost`,label:`Estimated spend`,numeric:!0,render:e=>b(e.estCostUsd)}],Dt=[{key:`day`,label:`Day`,render:e=>h(e.day)},{key:`read`,label:`Cache read`,numeric:!0,render:e=>e.cacheRead===null?`not reported`:y(e.cacheRead)},{key:`write`,label:`Cache write`,numeric:!0,render:e=>e.cacheWrite===null?`not reported`:y(e.cacheWrite)}],Ot=[{key:`day`,label:`Day`,render:e=>h(e.day)},{key:`rate`,label:`Cache hit rate`,numeric:!0,render:e=>e.cacheHitRate===null?`not reported`:d(e.cacheHitRate)},{key:`read`,label:`Cache read`,numeric:!0,render:e=>e.cacheRead===null?`not reported`:y(e.cacheRead)}];function kt({series:e,window:t,onWindowChange:n,unavailableReason:r,loading:i}){let a=e?$e(e.days):null,o=e?it(e.days):null,s=et(e),c=tt(e),l=nt(e),u=rt(e);return(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-series`,children:[(0,B.jsxs)(`div`,{className:z.panelHead,children:[(0,B.jsx)(`h3`,{id:`verse-usage-series`,className:z.panelTitle,children:`Token output and spend`}),(0,B.jsx)(`div`,{className:z.segmented,role:`group`,"aria-label":`Series window`,children:wt.map(e=>(0,B.jsx)(`button`,{type:`button`,className:z.segment,"aria-pressed":e===t,onClick:()=>n(e),children:e},e))})]}),r?(0,B.jsxs)(`p`,{className:z.muted,children:[r,` No token or spend series can be drawn, and none is invented in its place.`]}):i&&e===null?(0,B.jsxs)(`p`,{className:z.muted,"aria-busy":`true`,children:[`Loading the `,Z[t].toLowerCase(),` rollup…`]}):e===null||e.days.length===0?(0,B.jsxs)(`p`,{className:z.muted,children:[`The rollup for `,Z[t].toLowerCase(),` came back with no days in it. That is an empty window, not a zero.`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:z.tiles,children:[(0,B.jsx)(_,{label:`Tokens in · ${t}`,value:(0,B.jsx)(`span`,{className:z.num,children:y(a?.tokensIn??0)}),caption:`Across ${a?.dayCount??0} recorded days`,trend:X(e,e=>e.tokensIn),trendLabel:`Tokens in per day`}),(0,B.jsx)(_,{label:`Tokens out · ${t}`,value:(0,B.jsx)(`span`,{className:z.num,children:y(a?.tokensOut??0)}),caption:`What the models actually produced`,trend:X(e,e=>e.tokensOut),trendLabel:`Tokens out per day`}),(0,B.jsx)(_,{label:`Estimated spend · ${t}`,value:(0,B.jsx)(`span`,{className:z.num,children:b(a?.estCostUsd??0)}),caption:`Estimated from a static price table — not billed`,trend:X(e,e=>e.estCostUsd),trendLabel:`Estimated spend per day`}),(0,B.jsx)(_,{label:`Sessions · ${t}`,value:(0,B.jsx)(`span`,{className:z.num,children:y(a?.sessions??0)}),caption:`Rollup rows, not billed calls`,trend:X(e,e=>e.sessions),trendLabel:`Sessions per day`}),(0,B.jsx)(_,{label:`Estimated spend per active day`,value:(0,B.jsx)(`span`,{className:z.num,children:o?.estCostUsdPerDay===null||o===null?`unknown`:b(o.estCostUsdPerDay)}),caption:`Across the ${a?.dayCount??0} days that carry a rollup row — not the ${t} calendar span`}),(0,B.jsx)(_,{label:`Heaviest day`,value:(0,B.jsx)(`span`,{className:z.num,children:o?.peakCostDay?b(o.peakCostDay.usd):`unknown`}),caption:o?.peakCostDay?`${h(o.peakCostDay.day)} — estimated, not billed`:`No day in this window carries a cost row.`})]}),(0,B.jsxs)(`div`,{className:z.charts,children:[(0,B.jsx)(m,{title:`Tokens per day`,description:Z[t],empty:!s.available,emptyMessage:s.available?``:s.reason,table:(0,B.jsx)(x,{caption:`Tokens in and out per day`,columns:Tt,rows:e.days,rowKey:e=>e.day}),children:s.available?(0,B.jsx)(g,{series:s.series,formatX:e=>v(e),formatY:e=>y(e),ariaLabel:`Tokens in and out per day over ${Z[t].toLowerCase()}`}):null}),(0,B.jsx)(m,{title:`Estimated spend per day`,description:Z[t],caveat:Ke,empty:!c.available,emptyMessage:c.available?``:c.reason,table:(0,B.jsx)(x,{caption:`Estimated spend per day`,columns:Et,rows:e.days,rowKey:e=>e.day}),children:c.available?(0,B.jsx)(g,{series:c.series,area:!0,formatX:e=>v(e),formatY:e=>b(e),ariaLabel:`Estimated spend per day over ${Z[t].toLowerCase()}`}):null}),(0,B.jsx)(m,{title:`Cache hit rate`,description:Z[t],caveat:qe,empty:!l.available,emptyMessage:l.available?``:l.reason,table:l.available?(0,B.jsx)(x,{caption:`Cache hit rate per day`,columns:Ot,rows:e.days,rowKey:e=>e.day}):void 0,children:l.available?(0,B.jsx)(g,{series:l.series,formatX:e=>v(e),formatY:e=>d(e),ariaLabel:`Cache hit rate per day over ${Z[t].toLowerCase()}`}):null}),(0,B.jsx)(m,{title:`Cache read and write tokens`,description:Z[t],caveat:qe,empty:!u.available,emptyMessage:u.available?``:u.reason,table:u.available?(0,B.jsx)(x,{caption:`Cache read and write tokens per day`,columns:Dt,rows:e.days,rowKey:e=>e.day}):void 0,children:u.available?(0,B.jsx)(g,{series:u.series,formatX:e=>v(e),formatY:e=>y(e),ariaLabel:`Cache read and write tokens per day over ${Z[t].toLowerCase()}`}):null}),(0,B.jsx)(m,{title:`Local vs cloud per day`,description:Z[t],empty:!0,emptyMessage:Xe,children:null})]}),e.caveats.length>0?(0,B.jsx)(`ul`,{className:z.noteList,children:e.caveats.map(e=>(0,B.jsx)(`li`,{className:z.capacityMuted,children:e},e))}):null]})]})}var At=[{key:`day`,label:`Day`,render:e=>h(e.day)},{key:`usd`,label:`Spend`,numeric:!0,render:e=>e.usd===null?`no tick retained`:b(e.usd)}];function jt({series:e,todaySpentUsd:t,todaySpentDate:n,dailyBudgetUsd:r,showSeries:i=!0}){let a=n!==null&&!ce(n),o=a?null:t,s=a?`Nothing recorded today — the last ledger day is ${n}`:r===null?`Configured daily budget unavailable`:r===0?`Daily budget is 0 — the loop is stopped`:`of a ${b(r)} daily budget`;return(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-spend`,children:[(0,B.jsx)(`div`,{className:z.panelHead,children:(0,B.jsx)(`h3`,{id:`verse-usage-spend`,className:z.panelTitle,children:`Spend`})}),(0,B.jsx)(`div`,{className:z.tiles,children:(0,B.jsx)(_,{label:`Spend today`,value:(0,B.jsx)(`span`,{className:z.num,children:o===null?`unknown`:b(o)}),caption:s})}),i?(0,B.jsx)(`div`,{style:{marginTop:`var(--space-4)`},children:e.available?(0,B.jsx)(m,{title:`Spend per day`,description:`Autonomous loop, from the daemon tick ledger`,caveat:e.caveat,table:(0,B.jsx)(x,{caption:`Spend per day from the daemon tick ledger`,columns:At,rows:e.days,rowKey:e=>e.day}),children:(0,B.jsx)(g,{series:[{id:`spend`,label:`Spend`,points:e.days.map(e=>({x:Date.parse(`${e.day}T00:00:00Z`),y:e.usd}))}],area:!0,formatX:e=>v(e),formatY:e=>b(e),ariaLabel:`Autonomous loop spend per day`})}):(0,B.jsx)(m,{title:`Spend per day`,empty:!0,emptyMessage:e.reason,children:null})}):(0,B.jsx)(`p`,{className:z.sourceLine,children:`Per-day spend is charted above from the full usage rollup. The daemon tick ledger is not drawn again here.`})]})}var Mt={five_hour:`Session · rolling 5h`,seven_day:`Week · all models`,seven_day_sonnet:`Week · Sonnet`,seven_day_opus:`Week · Opus`,seven_day_fable:`Week · Fable`,codex:`Week · Codex`,primary:`Primary window`,secondary:`Secondary window`};function Nt(e){if(e.label)return e.label;let t=Mt[e.id];if(t)return t;let n=/^seven_day_(.+)$/.exec(e.id);return n?`Week · ${n[1]}`:e.id}function Pt(e){let t=e.resetDescription??e.resetsAt;return{id:e.id,label:Nt(e),usedPct:e.limitReached?null:e.usedPercent,tone:e.limitReached?`danger`:e.usedPercent===null?`ok`:M(e.usedPercent),resetText:t,resetsAt:e.resetsAt,limitReached:e.limitReached,measured:e.measured}}function Ft(e){let t=e.windows,n=t.find(e=>e.limitReached);if(n)return n;let r=t.filter(e=>e.usedPercent!==null),i=r.length===0?null:r.reduce((e,t)=>(t.usedPercent??0)>(e.usedPercent??0)?t:e),a=e.binding;if(a){let e=t.find(e=>e.id===a.id)??null;if(e&&(a.limitReached||e.limitReached||i===null||(a.usedPercent??-1)>=(i.usedPercent??-1)))return e}return i}var It={"connection-monitor-stopped":"Native polling stopped after a metadata sample could not confirm its process cleanup, so these readings are frozen and no new ones are being taken. Restarting `ashlr verse` begins a new collection generation.","collector-unavailable":`This server is not collecting native metadata, so nothing here is a live reading.`,"collector-not-running":`No account collector is running in this server, so these cards fall back to whatever shared evidence exists.`,"collector-owned":"Another collector (`ashlr resource-console`) owns the exclusive metadata lease, so Verse is reading its shared evidence rather than probing.","collector-start-failed":`The metadata collectors could not be started in this server, so no probe has run.`,"connection-polling-paused":`Native polling is paused because no client has asked for account data recently; it resumes on the next request.`,"connection-not-checked":`No probe has run for this account yet in this server.`,"connection-probe-unavailable":`The probe for this account did not return a usable result, so there is no measurement to show.`,"accounts-pool-unavailable":`This accounts root has no readable pool or bindings, so there is nothing to probe.`,"accounts-collection-not-configured":`Native account collection is not configured for this accounts root.`,"usage-version-unsupported":`The usage probe is pinned to a specific provider build and failed closed on the installed one. That is a version pin, not an outage.`,"usage-account-changed":`The account behind this profile changed between two reads, so the reading was discarded rather than attributed to the wrong account.`,"probe-account-unavailable":`The pinned profile answered but carries no usable account identity — it is not authenticated.`,"probe-account-unsupported":`The pinned profile is authenticated by a method this probe does not accept, so no reading was taken.`,"probe-account-changed":`The account behind this pinned profile changed mid-probe, so the reading was discarded.`,"probe-account-hint-mismatch":`The pinned profile is signed in as a different account than this seat expects.`,"probe-native-unavailable":`The provider CLI for this pinned profile could not be run, so no reading was taken.`,"probe-native-exit-failed":`The provider CLI for this pinned profile exited without a usable result.`,"probe-provider-error":`The provider CLI returned an error instead of account metadata.`,"probe-protocol-unsupported":`The installed provider CLI does not speak the metadata protocol this probe requires.`,"probe-quota-invalid":`The provider returned a quota shape this probe does not recognise, so nothing was accepted as a reading.`,"probe-timed-out":`The metadata probe for this account timed out before it returned anything.`};function Lt(e,t){return e===null?t:It[e]??t}var Rt={available:0,credits:1,tight:2,exhausted:3,"signed-out":4,"probe-unsupported":5,unknown:6},zt=80,Bt=100;function Vt(e){return e?e.unlimited?!0:e.hasCredits?e.balanceValue!==null&&e.balanceValue>0:!1:!1}function Ht(e){return e.unlimited?`credits are unlimited on this plan`:`a credit balance of ${e.balance??`an unreported amount`} is still spendable`}function Ut(e,t){if(e.authentication===`signed-out`||e.state===`signed-out`)return{state:`signed-out`,headline:`Signed out`,detail:Lt(e.reason,`The probe reached this account’s pinned profile but it is not authenticated, so there is nothing to measure.`),code:e.reason};if(e.unsupported)return{state:`probe-unsupported`,headline:`Probe version-pinned`,detail:`The usage probe failed closed with ${e.unsupported.code}${e.unsupported.pinnedVersion?`; it is pinned to ${e.unsupported.pinnedVersion}`:``}. This is a version pin, not an outage — no window can be read until the pin is bumped.`,code:e.unsupported.code};let n=Vt(e.credits);if(t===null||t.usedPercent===null&&!t.limitReached)return n&&e.credits?{state:`credits`,headline:`Usable on credits`,detail:`No window reading reached this surface, but ${Ht(e.credits)}.`,code:e.reason}:{state:`unknown`,headline:`No reading`,detail:Lt(e.reason,`No window percentage reached this surface for this account, so nothing here is a measurement.`),code:e.reason};let r=t.usedPercent,i=t.limitReached||r!==null&&r>=Bt,a=Nt(t);return i?n&&e.credits?{state:`credits`,headline:`Usable on credits`,detail:`${a} is ${t.limitReached?`reported as limit reached`:`fully used`}, but ${Ht(e.credits)} — credits are independent of the window, so this account is not blocked.`,code:null}:{state:`exhausted`,headline:t.limitReached?`Limit reached`:`Window exhausted`,detail:t.limitReached?`The provider flagged ${a} as rate-limited. That flag is a denial, not a measurement, so no percentage is shown.`:`${a} is at ${Math.round(r)}% — it is the binding constraint on this account.`,code:null}:r>=zt?{state:`tight`,headline:`Running tight`,detail:`${a} is the binding constraint at ${Math.round(r)}%.`,code:null}:{state:`available`,headline:`Usable now`,detail:`${a} is the binding constraint at ${Math.round(r)}%.`,code:null}}function Wt(e,t=null){let n=Ft(e),r=Ut(e,n),i=e.provider,a=e.windows.filter(e=>e.id!==n?.id).map(Pt),o=n?Pt(n):null,s={state:e.state,authentication:e.authentication,health:e.health,reasonCode:e.reason,observedAt:e.observedAt,notes:e.notes,unsupported:e.unsupported};return{id:e.id,label:e.label,engine:i,color:D[i],plan:e.planType,verdict:r,allWindows:o?[o,...a]:a,evidence:s,hasDetail:e.windows.length>0||e.notes.length>0||e.credits!==null||e.reason!==null,binding:o,others:a,credits:e.credits,reconnectCommand:e.reconnectCommand,observedAt:e.observedAt,rank:Rt[r.state],sourceNote:t}}function Gt(e){if(!e)return[];let t=new Set;for(let n of e.accounts)for(let e of n.notes)t.add(e);return[...t]}function Kt(e){return e?e.accounts.map(e=>Wt(e)).sort((e,t)=>e.rank-t.rank||e.label.localeCompare(t.label)):[]}function qt(e){if(!e)return null;let t=e.models.filter(e=>e.loaded),n=e.reachable?t.length===0?0:t.some(e=>e.sizeBytes===null)?null:t.reduce((e,t)=>e+(t.sizeBytes??0),0):null,r=e.memoryBudgetBytes,i=n!==null&&r!==null&&r>0?Math.max(0,Math.min(100,n/r*100)):null,a=e.reachable?t.length>0?{state:`available`,headline:`Resident now`,detail:`${t.length} model${t.length===1?``:`s`} already in memory — no load delay, no quota, no bill.`,code:null}:e.models.length>0?{state:`tight`,headline:`Installed, not loaded`,detail:`${e.models.length} model${e.models.length===1?` is`:`s are`} installed but nothing is resident, so the first turn pays a load.`,code:null}:{state:`unknown`,headline:`No models installed`,detail:`The runtime is reachable but reports no installed models.`,code:null}:{state:`unknown`,headline:`Runtime unreachable`,detail:`No local runtime answered, so neither resident nor installed models can be listed. This is an unanswered probe, not a report that the machine is empty.`,code:e.reason};return{residentCount:t.length,installedCount:e.models.length,residentBytes:n,memoryBudgetBytes:r,usedPct:i,tone:i===null?`ok`:M(i),verdict:a,color:D.local,rank:Rt[a.state]}}var Jt=`Per-account probes are unavailable on this server, so these cards are derived from the seat roster and the per-engine snapshots.`;function Yt(e){let{seat:t,control:n,frontier:r,engineSeatCount:i}=e;if(t.engine===`local`)return null;let a=n?.subscriptionUsage?.find(e=>String(e.engine)===t.engine),o=r?.engines.find(e=>String(e.engine)===t.engine),s=de({engine:t.engine,seat:t,subscription:a,frontier:o,engineSeatCount:i}),c=s.kind===`measured`?s.windows.map(e=>({id:e.id,label:e.label,usedPercent:e.usedPct,resetsAt:e.resetsAt===null?null:new Date(e.resetsAt*1e3).toISOString(),resetDescription:null,limitReached:!1,measured:!0})):[];return{account:{id:t.id,label:t.label,provider:t.engine,state:s.kind===`measured`?`observed`:`unavailable`,authentication:`unknown`,health:null,planType:a?.plan??null,observedAt:t.health.observedAt,windows:c,binding:null,credits:null,reason:s.kind===`measured`?null:s.reason,unsupported:null,reconnectCommand:null,notes:[]},sourceNote:s.kind===`measured`?`${ue[s.source]}${s.scope===`engine`?` · engine-wide, shared by every account on this engine`:``}`:null}}function Xt(e){let t=e.bootstrap?.seats??[],n=new Map;for(let e of t)n.set(e.engine,(n.get(e.engine)??0)+1);return t.map(t=>Yt({seat:t,control:e.control,frontier:e.frontier,engineSeatCount:n.get(t.engine)??1})).filter(e=>e!==null).map(e=>Wt(e.account,e.sourceNote)).sort((e,t)=>e.rank-t.rank||e.label.localeCompare(t.label))}function $(e){return e instanceof s&&e.status===401}function Zt({title:e,body:t,action:n}){return(0,B.jsxs)(`div`,{className:z.stateBlock,role:`status`,children:[(0,B.jsx)(`p`,{className:z.stateTitle,children:e}),(0,B.jsx)(`p`,{className:z.stateBody,children:t}),n?(0,B.jsx)(`div`,{className:z.stateActions,children:n}):null]})}var Qt=3e4,$t={gridColumn:`1 / -1`};function en(e,t){(0,E.useEffect)(()=>{let n=null,r=()=>{n!==null&&clearInterval(n),n=null},i=()=>{let i=typeof document>`u`||document.visibilityState===`visible`;i&&n===null?n=setInterval(e,t):i||r()};return i(),document.addEventListener(`visibilitychange`,i),()=>{document.removeEventListener(`visibilitychange`,i),r()}},[e,t])}function tn(){let[e,t]=(0,E.useState)(`7d`),[n,a]=(0,E.useState)(null),s=c(w),u=c(C),f=c(se(e)),p=c(ne),m=c(ee),h=c(re),g=c(ae),v=r(w),y=r(C),b=r(se(e)),x=r(ne),S=r(ee),ce=r(re),le=r(ae),T=l(w),D=l(C);en(T,Qt),en(D,Qt);let O=()=>{v(),y(),b(),x(),S(),ce(),le()},k=(0,E.useMemo)(()=>s.data?.available?ie(s.data.raw):null,[s.data]),A=(0,E.useMemo)(()=>u.data?.available?oe(u.data.raw):null,[u.data]),ue=(0,E.useMemo)(()=>f.data?.available?te(f.data.raw,e):null,[f.data,e]),j=(0,E.useMemo)(()=>h.data?h.data.available?_e(h.data.raw,h.data.reason):ve(h.data.reason??`Configured caps unavailable.`):ve(`Configured caps not loaded yet.`),[h.data]),M=k===null,N=(0,E.useMemo)(()=>k?Kt(k):Xt({bootstrap:g.data,control:m.data,frontier:p.data}),[k,g.data,m.data,p.data]),P=(0,E.useMemo)(()=>Re(A),[A]),F=(0,E.useMemo)(()=>qt(A),[A]),I=(0,E.useMemo)(()=>Gt(k),[k]),de=(0,E.useMemo)(()=>{let e=N.map(e=>({key:e.id,rank:e.rank,label:e.label,kind:`account`,card:e}));return F&&e.push({key:`local`,rank:F.rank,label:`Local`,kind:`local`,card:F}),e.sort((e,t)=>e.rank-t.rank||e.label.localeCompare(t.label))},[N,F]),me=(0,E.useMemo)(()=>je({cards:N,localCard:F,localView:P}),[N,F,P]),ge=(0,E.useMemo)(()=>Ie(P?.runtimes??[]),[P]),L=e=>{a(t=>t===e?null:e)},R=(0,E.useCallback)(()=>{let e=n;a(null),e!==null&&typeof document<`u`&&document.getElementById(`verse-account-trigger-${e}`)?.focus()},[n]),V=(0,E.useMemo)(()=>fe(m.data?.usage),[m.data]),ye=(0,E.useMemo)(()=>pe(m.data?.limits,j.foundryLimits),[m.data,j.foundryLimits]),be=(0,E.useMemo)(()=>he(m.data?.daemonObservation),[m.data]),Se=j.available?j.todaySpentUsd:m.data?.daemon.todaySpentUsd??null,Ce=j.available?j.todaySpentDate:null,H=$(s.error)||$(u.error)||$(f.error)||$(p.error)||$(m.error)||$(g.error),U=!H&&p.status===`error`&&m.status===`error`&&p.data===void 0&&m.data===void 0,W=!H&&!U&&s.data===void 0&&p.data===void 0&&m.data===void 0&&(s.status===`loading`||s.status===`idle`||p.status===`loading`||m.status===`loading`||p.status===`idle`||m.status===`idle`),G=s.status===`refreshing`||p.status===`refreshing`||m.status===`refreshing`,K=k?.sampledAt??p.data?.generatedAt??m.data?.ts??null;return(0,B.jsxs)(`section`,{className:z.section,"aria-label":`Usage`,children:[(0,B.jsxs)(`header`,{className:z.header,"data-app-region":`drag`,children:[(0,B.jsx)(`h2`,{className:z.headerTitle,children:`Usage`}),(0,B.jsxs)(`div`,{className:z.headerMeta,children:[K?(0,B.jsxs)(`span`,{children:[G?`refreshing · `:``,`as of `,new Date(K).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})]}):null,(0,B.jsx)(`button`,{type:`button`,className:z.ghostButton,onClick:O,children:`Refresh`})]})]}),(0,B.jsx)(`div`,{className:z.scroll,children:H?(0,B.jsx)(Zt,{title:`Read session expired`,body:`Usage data needs an authenticated read session. Unlock the console with the read token ashlr verse printed, then refresh.`,action:(0,B.jsx)(`button`,{type:`button`,className:z.ghostButton,onClick:O,children:`Try again`})}):U?(0,B.jsx)(Zt,{title:`Usage sources unreachable`,body:`Neither /api/usage nor /api/control answered. ${m.error?.message??p.error?.message??``}`.trim(),action:(0,B.jsx)(`button`,{type:`button`,className:z.ghostButton,onClick:O,children:`Retry`})}):W?(0,B.jsxs)(`div`,{"aria-busy":`true`,children:[(0,B.jsx)(i,{width:`30%`}),(0,B.jsx)(`div`,{className:z.skeletonGrid,style:{marginTop:`var(--space-4)`},children:(0,B.jsx)(o,{count:5})})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ue,{overview:me,selectedId:n,onSelectSeat:L}),(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-accounts`,children:[(0,B.jsxs)(`div`,{className:z.panelHead,children:[(0,B.jsx)(`h3`,{id:`verse-usage-accounts`,className:z.panelTitle,children:`Accounts`}),(0,B.jsx)(`p`,{className:z.panelNote,children:`Ordered by what you can use right now. Each card leads with its binding constraint — the window with the highest used percent, because that is what blocks work.`})]}),M&&s.data&&!s.data.available?(0,B.jsxs)(`p`,{className:z.muted,children:[s.data.reason,` `,Jt]}):null,k?.collectorNote?(0,B.jsx)(`p`,{className:z.muted,children:k.collectorNote}):null,I.length>0?(0,B.jsx)(`ul`,{className:z.noteList,children:I.map(e=>(0,B.jsx)(`li`,{className:z.muted,children:e},e))}):null,N.length===0&&F===null?(0,B.jsx)(`p`,{className:z.muted,children:`No accounts and no local runtime were reported. Connect an account or start Ollama, then refresh — this is an empty roster, not a set of accounts at zero.`}):(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(`div`,{className:z.cards,children:de.map(e=>{if(e.kind!==`account`)return(0,B.jsx)(xt,{card:e.card,staleness:ge},e.key);let t=n===e.key;return(0,B.jsxs)(E.Fragment,{children:[(0,B.jsx)(xe,{card:e.card,onOpen:L,expanded:t,triggerId:`verse-account-trigger-${e.key}`,detailId:`verse-account-detail-${e.key}`}),t?(0,B.jsx)(`div`,{id:`verse-account-detail-${e.key}`,style:$t,children:(0,B.jsx)(we,{card:e.card,headingId:`verse-account-heading-${e.key}`,onClose:R})}):null]},e.key)})})})]}),(0,B.jsx)(Ct,{view:P}),(0,B.jsx)(kt,{series:ue,window:e,onWindowChange:t,unavailableReason:f.data&&!f.data.available?f.data.reason:null,loading:f.status===`loading`||f.status===`idle`}),V?(0,B.jsx)(lt,{split:V,savingsNote:Je}):(0,B.jsxs)(`section`,{className:z.panel,"aria-labelledby":`verse-usage-split-missing`,children:[(0,B.jsx)(`div`,{className:z.panelHead,children:(0,B.jsx)(`h3`,{id:`verse-usage-split-missing`,className:z.panelTitle,children:`Local vs cloud`})}),(0,B.jsx)(`div`,{className:z.tiles,children:(0,B.jsx)(_,{label:`Not spent (ran locally)`,value:(0,B.jsx)(`span`,{className:z.num,children:`unknown`}),caption:`/api/control did not answer, so the split is unavailable`})})]}),(0,B.jsx)(Ge,{rows:ye,capsNote:j.available?null:j.reason}),(0,B.jsx)(jt,{series:be,todaySpentUsd:Se,todaySpentDate:Ce,dailyBudgetUsd:j.dailyBudgetUsd,showSeries:ue===null}),j.available&&j.subscriptionMaxPercent!==null?(0,B.jsxs)(`p`,{className:z.muted,children:[`Subscription throttle threshold is`,` `,(0,B.jsx)(`span`,{className:z.num,children:d(j.subscriptionMaxPercent/100)}),`. It only applies to engines that publish a real window reading — no seat is ever throttled on a guess.`]}):null]})})]})}export{tn as UsageSection};
2
+ //# sourceMappingURL=UsageSection-Bq6Daaby.js.map