@ashlr/hub 3.11.3 → 3.11.5

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 (556) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +44 -18
  3. package/dist/authority-surface.json +72 -57
  4. package/dist/build-identity.json +2 -2
  5. package/dist/cli/authority.d.ts +39 -0
  6. package/dist/cli/authority.js +222 -55
  7. package/dist/cli/authority.js.map +1 -1
  8. package/dist/cli/help.js +1 -1
  9. package/dist/cli/help.js.map +1 -1
  10. package/dist/cli/verse.d.ts +3 -0
  11. package/dist/cli/verse.js +10 -0
  12. package/dist/cli/verse.js.map +1 -1
  13. package/dist/core/authority/types.d.ts +2 -2
  14. package/dist/core/cloud/cloud-api.js +1 -1
  15. package/dist/core/cloud/cloud-api.js.map +1 -1
  16. package/dist/core/cloud/delivery-contract.d.ts +1 -1
  17. package/dist/core/cloud/delivery-contract.js +25 -15
  18. package/dist/core/cloud/delivery-contract.js.map +1 -1
  19. package/dist/core/cloud/store.js +6 -0
  20. package/dist/core/cloud/store.js.map +1 -1
  21. package/dist/core/cloud/tracker.d.ts +2 -0
  22. package/dist/core/cloud/tracker.js +140 -37
  23. package/dist/core/cloud/tracker.js.map +1 -1
  24. package/dist/core/cloud/types.d.ts +9 -1
  25. package/dist/core/cloud/types.js.map +1 -1
  26. package/dist/core/comms/dispatch.d.ts +5 -0
  27. package/dist/core/comms/dispatch.js +12 -1
  28. package/dist/core/comms/dispatch.js.map +1 -1
  29. package/dist/core/comms/requests.d.ts +27 -1
  30. package/dist/core/comms/requests.js +50 -1
  31. package/dist/core/comms/requests.js.map +1 -1
  32. package/dist/core/daemon/loop.d.ts +14 -0
  33. package/dist/core/daemon/loop.js +35 -0
  34. package/dist/core/daemon/loop.js.map +1 -1
  35. package/dist/core/fabric/claude-usage.js +23 -1
  36. package/dist/core/fabric/claude-usage.js.map +1 -1
  37. package/dist/core/fleet/dispatch-router.d.ts +7 -0
  38. package/dist/core/fleet/dispatch-router.js +4 -1
  39. package/dist/core/fleet/dispatch-router.js.map +1 -1
  40. package/dist/core/fleet/tick-hooks-live.d.ts +5 -1
  41. package/dist/core/fleet/tick-hooks-live.js +10 -1
  42. package/dist/core/fleet/tick-hooks-live.js.map +1 -1
  43. package/dist/core/local-runtime/llama/config.d.ts +14 -0
  44. package/dist/core/local-runtime/llama/config.js +20 -2
  45. package/dist/core/local-runtime/llama/config.js.map +1 -1
  46. package/dist/core/local-runtime/llama/process.d.ts +19 -0
  47. package/dist/core/local-runtime/llama/process.js +67 -17
  48. package/dist/core/local-runtime/llama/process.js.map +1 -1
  49. package/dist/core/local-runtime/llama/supervisor.js +14 -3
  50. package/dist/core/local-runtime/llama/supervisor.js.map +1 -1
  51. package/dist/core/observability/rollup.d.ts +12 -0
  52. package/dist/core/observability/rollup.js +37 -2
  53. package/dist/core/observability/rollup.js.map +1 -1
  54. package/dist/core/observability/usage-source.js +49 -1
  55. package/dist/core/observability/usage-source.js.map +1 -1
  56. package/dist/core/resources/connection-monitor.js +47 -4
  57. package/dist/core/resources/connection-monitor.js.map +1 -1
  58. package/dist/core/resources/engineering-mission-store.d.ts +1 -1
  59. package/dist/core/routing/headroom.js +7 -2
  60. package/dist/core/routing/headroom.js.map +1 -1
  61. package/dist/core/routing/router.d.ts +48 -0
  62. package/dist/core/routing/router.js +129 -13
  63. package/dist/core/routing/router.js.map +1 -1
  64. package/dist/core/run/best-of-n.d.ts +7 -0
  65. package/dist/core/run/best-of-n.js +3 -0
  66. package/dist/core/run/best-of-n.js.map +1 -1
  67. package/dist/core/run/harness-dispatch.d.ts +147 -0
  68. package/dist/core/run/harness-dispatch.js +234 -0
  69. package/dist/core/run/harness-dispatch.js.map +1 -0
  70. package/dist/core/run/orchestrator.js +3 -0
  71. package/dist/core/run/orchestrator.js.map +1 -1
  72. package/dist/core/run/provider-client.d.ts +8 -0
  73. package/dist/core/run/provider-client.js +4 -0
  74. package/dist/core/run/provider-client.js.map +1 -1
  75. package/dist/core/run/sandboxed-engine.d.ts +8 -0
  76. package/dist/core/run/sandboxed-engine.js +60 -7
  77. package/dist/core/run/sandboxed-engine.js.map +1 -1
  78. package/dist/core/types.d.ts +14 -0
  79. package/dist/core/types.js.map +1 -1
  80. package/dist/core/universe/builtins/preparation/manifest.json +1 -1
  81. package/dist/core/universe/builtins/preparation/preparation-bridge.mjs +181 -5
  82. package/dist/core/universe/builtins/preparation/preparation-verification-fixtures.mjs +180 -4
  83. package/dist/core/universe/firm-demo.d.ts +1 -1
  84. package/dist/core/universe/firm-graph.d.ts +2 -2
  85. package/dist/core/util/scrub.js +16 -3
  86. package/dist/core/util/scrub.js.map +1 -1
  87. package/dist/core/verse/accounts.d.ts +9 -1
  88. package/dist/core/verse/accounts.js +52 -11
  89. package/dist/core/verse/accounts.js.map +1 -1
  90. package/dist/core/verse/apps-api.d.ts +12 -0
  91. package/dist/core/verse/apps-api.js +22 -4
  92. package/dist/core/verse/apps-api.js.map +1 -1
  93. package/dist/core/verse/apps.js +22 -12
  94. package/dist/core/verse/apps.js.map +1 -1
  95. package/dist/core/verse/local-models.js +3 -7
  96. package/dist/core/verse/local-models.js.map +1 -1
  97. package/dist/core/verse/model-display-name.d.ts +34 -0
  98. package/dist/core/verse/model-display-name.js +125 -0
  99. package/dist/core/verse/model-display-name.js.map +1 -0
  100. package/dist/core/verse/seats.d.ts +11 -2
  101. package/dist/core/verse/seats.js +42 -18
  102. package/dist/core/verse/seats.js.map +1 -1
  103. package/dist/core/verse/transient-events.d.ts +21 -0
  104. package/dist/core/verse/transient-events.js +12 -0
  105. package/dist/core/verse/transient-events.js.map +1 -0
  106. package/dist/core/verse/types.d.ts +6 -13
  107. package/dist/core/verse/types.js +5 -36
  108. package/dist/core/verse/types.js.map +1 -1
  109. package/dist/core/web/public/next/assets/ActionMenu-DffwPklw.js +2 -0
  110. package/dist/core/web/public/next/assets/{ActionMenu-FxXeRbPx.js.map → ActionMenu-DffwPklw.js.map} +1 -1
  111. package/dist/core/web/public/next/assets/Advanced-CxzE6ekM.js +2 -0
  112. package/dist/core/web/public/next/assets/Advanced-CxzE6ekM.js.map +1 -0
  113. package/dist/core/web/public/next/assets/App-DFlp-vdv.js +7 -0
  114. package/dist/core/web/public/next/assets/App-DFlp-vdv.js.map +1 -0
  115. package/dist/core/web/public/next/assets/AppsSection-Ct2O605-.js +2 -0
  116. package/dist/core/web/public/next/assets/AppsSection-Ct2O605-.js.map +1 -0
  117. package/dist/core/web/public/next/assets/AreaTrend-o-GLl2Is.js +2 -0
  118. package/dist/core/web/public/next/assets/{AreaTrend-CDxrQU4b.js.map → AreaTrend-o-GLl2Is.js.map} +1 -1
  119. package/dist/core/web/public/next/assets/AutonomyOffState-CXhXpsim.js +2 -0
  120. package/dist/core/web/public/next/assets/AutonomyOffState-CXhXpsim.js.map +1 -0
  121. package/dist/core/web/public/next/assets/AutonomyOffState-DmbE71vI.css +1 -0
  122. package/dist/core/web/public/next/assets/AutonomySection-BTg7yVa1.js +2 -0
  123. package/dist/core/web/public/next/assets/{AutonomySection-DuQkHGD_.js.map → AutonomySection-BTg7yVa1.js.map} +1 -1
  124. package/dist/core/web/public/next/assets/BranchBar-BjPFtGsj.js +2 -0
  125. package/dist/core/web/public/next/assets/{BranchBar-CLsvOcyK.js.map → BranchBar-BjPFtGsj.js.map} +1 -1
  126. package/dist/core/web/public/next/assets/BudgetControl-ng6swoZp.js +2 -0
  127. package/dist/core/web/public/next/assets/{BudgetControl-TL3FeZ1D.js.map → BudgetControl-ng6swoZp.js.map} +1 -1
  128. package/dist/core/web/public/next/assets/{Button-HHXgoXGr.js → Button-OjVJSrFq.js} +2 -2
  129. package/dist/core/web/public/next/assets/{Button-HHXgoXGr.js.map → Button-OjVJSrFq.js.map} +1 -1
  130. package/dist/core/web/public/next/assets/CapacityStrip-Bx4c3dxD.js +2 -0
  131. package/dist/core/web/public/next/assets/{CapacityStrip-qReu0RaF.js.map → CapacityStrip-Bx4c3dxD.js.map} +1 -1
  132. package/dist/core/web/public/next/assets/{useChartWidth-BW6SwYIK.css → ChartFrame-BVuBe6RP.css} +1 -1
  133. package/dist/core/web/public/next/assets/ChartFrame-B_w2Siqg.js +2 -0
  134. package/dist/core/web/public/next/assets/ChartFrame-B_w2Siqg.js.map +1 -0
  135. package/dist/core/web/public/next/assets/ChatSection-Bisj9R6E.js +3 -0
  136. package/dist/core/web/public/next/assets/ChatSection-Bisj9R6E.js.map +1 -0
  137. package/dist/core/web/public/next/assets/CloudBudgetForm-5Gf4iAok.js +2 -0
  138. package/dist/core/web/public/next/assets/CloudBudgetForm-5Gf4iAok.js.map +1 -0
  139. package/dist/core/web/public/next/assets/CommandPalette-iTpk6I8r.js +2 -0
  140. package/dist/core/web/public/next/assets/CommandPalette-iTpk6I8r.js.map +1 -0
  141. package/dist/core/web/public/next/assets/CommandSection-CvAVd1w4.css +1 -0
  142. package/dist/core/web/public/next/assets/CommandSection-D8ZihzvE.js +2 -0
  143. package/dist/core/web/public/next/assets/CommandSection-D8ZihzvE.js.map +1 -0
  144. package/dist/core/web/public/next/assets/ConfirmDialog-_S9iE-cJ.js +2 -0
  145. package/dist/core/web/public/next/assets/{ConfirmDialog-DLrLKM0c.js.map → ConfirmDialog-_S9iE-cJ.js.map} +1 -1
  146. package/dist/core/web/public/next/assets/DeleteChatDialog-KUYUygiA.js +2 -0
  147. package/dist/core/web/public/next/assets/DeleteChatDialog-KUYUygiA.js.map +1 -0
  148. package/dist/core/web/public/next/assets/Dialog-BuIaG6HF.js +2 -0
  149. package/dist/core/web/public/next/assets/{Dialog-BS9Dxi3G.js.map → Dialog-BuIaG6HF.js.map} +1 -1
  150. package/dist/core/web/public/next/assets/DiffPane-De4IQt82.js +2 -0
  151. package/dist/core/web/public/next/assets/{DiffPane-TOmUf3b2.js.map → DiffPane-De4IQt82.js.map} +1 -1
  152. package/dist/core/web/public/next/assets/DiffViewer-B75t6Ile.js +2 -0
  153. package/dist/core/web/public/next/assets/{DiffViewer-BpH56302.js.map → DiffViewer-B75t6Ile.js.map} +1 -1
  154. package/dist/core/web/public/next/assets/DockHost-BPqyhtCP.js +2 -0
  155. package/dist/core/web/public/next/assets/DockHost-BPqyhtCP.js.map +1 -0
  156. package/dist/core/web/public/next/assets/{EmptyState-BqR5YAmf.js → EmptyState-DXkT4vhW.js} +2 -2
  157. package/dist/core/web/public/next/assets/{EmptyState-BqR5YAmf.js.map → EmptyState-DXkT4vhW.js.map} +1 -1
  158. package/dist/core/web/public/next/assets/{Epistemic-dhvDTwAZ.js → Epistemic-CfqFe_aP.js} +2 -2
  159. package/dist/core/web/public/next/assets/{Epistemic-dhvDTwAZ.js.map → Epistemic-CfqFe_aP.js.map} +1 -1
  160. package/dist/core/web/public/next/assets/FleetSection-B7f-XBiX.js +3 -0
  161. package/dist/core/web/public/next/assets/FleetSection-B7f-XBiX.js.map +1 -0
  162. package/dist/core/web/public/next/assets/Funnel-pXYySwXQ.js +2 -0
  163. package/dist/core/web/public/next/assets/{Funnel-D2u7Wlzc.js.map → Funnel-pXYySwXQ.js.map} +1 -1
  164. package/dist/core/web/public/next/assets/GearTray-gj6lT7ba.js +2 -0
  165. package/dist/core/web/public/next/assets/{GearTray-Cb2npoxM.js.map → GearTray-gj6lT7ba.js.map} +1 -1
  166. package/dist/core/web/public/next/assets/GrowthSection-D8e9m9Wy.js +2 -0
  167. package/dist/core/web/public/next/assets/{GrowthSection-C5aDPs8B.js.map → GrowthSection-D8e9m9Wy.js.map} +1 -1
  168. package/dist/core/web/public/next/assets/HandoffDialog-VfKxKhxF.js +2 -0
  169. package/dist/core/web/public/next/assets/{HandoffDialog-BF3AYg-X.js.map → HandoffDialog-VfKxKhxF.js.map} +1 -1
  170. package/dist/core/web/public/next/assets/Input-u1YR_Ogl.js +2 -0
  171. package/dist/core/web/public/next/assets/{Input-B5dmGLZx.js.map → Input-u1YR_Ogl.js.map} +1 -1
  172. package/dist/core/web/public/next/assets/LeaderCard-BDELBrnx.js +2 -0
  173. package/dist/core/web/public/next/assets/LeaderCard-BDELBrnx.js.map +1 -0
  174. package/dist/core/web/public/next/assets/MatrixHeatmap-NKLF2srR.js +2 -0
  175. package/dist/core/web/public/next/assets/{MatrixHeatmap-BgEUs2Eu.js.map → MatrixHeatmap-NKLF2srR.js.map} +1 -1
  176. package/dist/core/web/public/next/assets/McpSection-D1tDvlRa.js +2 -0
  177. package/dist/core/web/public/next/assets/{McpSection-DZkiOuoq.js.map → McpSection-D1tDvlRa.js.map} +1 -1
  178. package/dist/core/web/public/next/assets/MessageMarkdown-DlfLEJxu.js +3 -0
  179. package/dist/core/web/public/next/assets/{MessageMarkdown-BauY8ZTY.js.map → MessageMarkdown-DlfLEJxu.js.map} +1 -1
  180. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-DLBNLfsn.js → MessageMarkdownRenderer-BYZzI115.js} +4 -4
  181. package/dist/core/web/public/next/assets/{MessageMarkdownRenderer-DLBNLfsn.js.map → MessageMarkdownRenderer-BYZzI115.js.map} +1 -1
  182. package/dist/core/web/public/next/assets/{Meter-DNeocJnD.js → Meter-BSVhU43Q.js} +2 -2
  183. package/dist/core/web/public/next/assets/{Meter-DNeocJnD.js.map → Meter-BSVhU43Q.js.map} +1 -1
  184. package/dist/core/web/public/next/assets/MindSection-lqV2e_Sq.js +2 -0
  185. package/dist/core/web/public/next/assets/MindSection-lqV2e_Sq.js.map +1 -0
  186. package/dist/core/web/public/next/assets/MutationTokenDialog-CLGP72g6.js +2 -0
  187. package/dist/core/web/public/next/assets/{MutationTokenDialog-mxrw0Yvy.js.map → MutationTokenDialog-CLGP72g6.js.map} +1 -1
  188. package/dist/core/web/public/next/assets/NeedsYouDrawer-D992XTOn.js +2 -0
  189. package/dist/core/web/public/next/assets/{NeedsYouDrawer-CO-Balfp.js.map → NeedsYouDrawer-D992XTOn.js.map} +1 -1
  190. package/dist/core/web/public/next/assets/NeedsYouList-eBOlJr0b.js +2 -0
  191. package/dist/core/web/public/next/assets/{NeedsYouList-CzDZbzRD.js.map → NeedsYouList-eBOlJr0b.js.map} +1 -1
  192. package/dist/core/web/public/next/assets/NewChatDialog-DoYTH26M.js +3 -0
  193. package/dist/core/web/public/next/assets/NewChatDialog-DoYTH26M.js.map +1 -0
  194. package/dist/core/web/public/next/assets/OnboardingFlow-D3yfITK1.js +2 -0
  195. package/dist/core/web/public/next/assets/OnboardingFlow-D3yfITK1.js.map +1 -0
  196. package/dist/core/web/public/next/assets/OnboardingFlow-HUNQGQuU.css +1 -0
  197. package/dist/core/web/public/next/assets/OnboardingGate-DrDEVBqw.js +3 -0
  198. package/dist/core/web/public/next/assets/OnboardingGate-DrDEVBqw.js.map +1 -0
  199. package/dist/core/web/public/next/assets/PreviewPane-ULN673zm.js +2 -0
  200. package/dist/core/web/public/next/assets/{PreviewPane-BS-CleCd.js.map → PreviewPane-ULN673zm.js.map} +1 -1
  201. package/dist/core/web/public/next/assets/{ProviderLogo-C5mBg8i0.js → ProviderLogo-8WaUjTlN.js} +2 -2
  202. package/dist/core/web/public/next/assets/{ProviderLogo-C5mBg8i0.js.map → ProviderLogo-8WaUjTlN.js.map} +1 -1
  203. package/dist/core/web/public/next/assets/RailStatus-Ckw9nvYU.js +2 -0
  204. package/dist/core/web/public/next/assets/{RailStatus-cPRyOmrk.js.map → RailStatus-Ckw9nvYU.js.map} +1 -1
  205. package/dist/core/web/public/next/assets/{RefreshIndicator-CMwSCiz5.js → RefreshIndicator-DGubF4vR.js} +2 -2
  206. package/dist/core/web/public/next/assets/{RefreshIndicator-CMwSCiz5.js.map → RefreshIndicator-DGubF4vR.js.map} +1 -1
  207. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BFi1opsC.js → ResourcePoolConsoleApp-BahEaY4d.js} +4 -4
  208. package/dist/core/web/public/next/assets/{ResourcePoolConsoleApp-BFi1opsC.js.map → ResourcePoolConsoleApp-BahEaY4d.js.map} +1 -1
  209. package/dist/core/web/public/next/assets/ResourcesChrome-C2ZrA7la.js +3 -0
  210. package/dist/core/web/public/next/assets/ResourcesChrome-C2ZrA7la.js.map +1 -0
  211. package/dist/core/web/public/next/assets/ResourcesDrawer-BC93fzwQ.js +2 -0
  212. package/dist/core/web/public/next/assets/ResourcesDrawer-BC93fzwQ.js.map +1 -0
  213. package/dist/core/web/public/next/assets/ResourcesDrawer-BCFJ2Uq8.css +1 -0
  214. package/dist/core/web/public/next/assets/RouteErrorBoundary-BvhHNpE_.js +2 -0
  215. package/dist/core/web/public/next/assets/{RouteErrorBoundary-DYtwc2ja.js.map → RouteErrorBoundary-BvhHNpE_.js.map} +1 -1
  216. package/dist/core/web/public/next/assets/RunInCloudAction-Dywfnw0C.js +2 -0
  217. package/dist/core/web/public/next/assets/{RunInCloudAction-BEGEEM8O.js.map → RunInCloudAction-Dywfnw0C.js.map} +1 -1
  218. package/dist/core/web/public/next/assets/SeatSelector-CH7hTgwy.js +3 -0
  219. package/dist/core/web/public/next/assets/{SeatSelector-CYHRR7Wp.js.map → SeatSelector-CH7hTgwy.js.map} +1 -1
  220. package/dist/core/web/public/next/assets/Segmented-Wynbg0F5.js +2 -0
  221. package/dist/core/web/public/next/assets/{Segmented-BE53BenI.js.map → Segmented-Wynbg0F5.js.map} +1 -1
  222. package/dist/core/web/public/next/assets/Select-DMyLCkId.js +2 -0
  223. package/dist/core/web/public/next/assets/{Select-BwSGkHCS.js.map → Select-DMyLCkId.js.map} +1 -1
  224. package/dist/core/web/public/next/assets/SessionGate-8RtQFWeZ.js +2 -0
  225. package/dist/core/web/public/next/assets/{SessionGate-e0dFJm9d.js.map → SessionGate-8RtQFWeZ.js.map} +1 -1
  226. package/dist/core/web/public/next/assets/SessionInsightChip-zBJbKv2L.js +2 -0
  227. package/dist/core/web/public/next/assets/{SessionInsightChip-CxlSyueJ.js.map → SessionInsightChip-zBJbKv2L.js.map} +1 -1
  228. package/dist/core/web/public/next/assets/SessionSearch-DfJIcxxM.js +2 -0
  229. package/dist/core/web/public/next/assets/{SessionSearch-_yp7S2TP.js.map → SessionSearch-DfJIcxxM.js.map} +1 -1
  230. package/dist/core/web/public/next/assets/SettingsSection-Da9RYyH5.js +2 -0
  231. package/dist/core/web/public/next/assets/SettingsSection-Da9RYyH5.js.map +1 -0
  232. package/dist/core/web/public/next/assets/Sheet-DhXyIDmq.js +2 -0
  233. package/dist/core/web/public/next/assets/{Sheet-DVP2Mgy6.js.map → Sheet-DhXyIDmq.js.map} +1 -1
  234. package/dist/core/web/public/next/assets/ShortcutsOverlay-Bi5f-wUw.js +2 -0
  235. package/dist/core/web/public/next/assets/{ShortcutsOverlay-BcIcoClX.js.map → ShortcutsOverlay-Bi5f-wUw.js.map} +1 -1
  236. package/dist/core/web/public/next/assets/Sidebar-BuO3sViG.js +3 -0
  237. package/dist/core/web/public/next/assets/Sidebar-BuO3sViG.js.map +1 -0
  238. package/dist/core/web/public/next/assets/Slider-Bd9YFWEV.js +2 -0
  239. package/dist/core/web/public/next/assets/{Slider-BypUWjpH.js.map → Slider-Bd9YFWEV.js.map} +1 -1
  240. package/dist/core/web/public/next/assets/StatTile-DScTd3c-.js +2 -0
  241. package/dist/core/web/public/next/assets/StatTile-DScTd3c-.js.map +1 -0
  242. package/dist/core/web/public/next/assets/{StatusBadge-HCZp416_.js → StatusBadge-DQ1UtQAJ.js} +2 -2
  243. package/dist/core/web/public/next/assets/{StatusBadge-HCZp416_.js.map → StatusBadge-DQ1UtQAJ.js.map} +1 -1
  244. package/dist/core/web/public/next/assets/StepBand-BB3IJxhr.js +2 -0
  245. package/dist/core/web/public/next/assets/{StepBand-Duz1PUes.js.map → StepBand-BB3IJxhr.js.map} +1 -1
  246. package/dist/core/web/public/next/assets/Surface-DWMtQe3Q.js +2 -0
  247. package/dist/core/web/public/next/assets/Surface-DWMtQe3Q.js.map +1 -0
  248. package/dist/core/web/public/next/assets/Surface-e1z6GdZt.css +1 -0
  249. package/dist/core/web/public/next/assets/Swimlane-DcENqtdp.js +2 -0
  250. package/dist/core/web/public/next/assets/{Swimlane-DGcIcnNA.js.map → Swimlane-DcENqtdp.js.map} +1 -1
  251. package/dist/core/web/public/next/assets/{Switch-iveI-8NY.js → Switch-CenChEYf.js} +2 -2
  252. package/dist/core/web/public/next/assets/{Switch-iveI-8NY.js.map → Switch-CenChEYf.js.map} +1 -1
  253. package/dist/core/web/public/next/assets/{Tag-DH15CUJp.js → Tag-D4k5E3u0.js} +2 -2
  254. package/dist/core/web/public/next/assets/{Tag-DH15CUJp.js.map → Tag-D4k5E3u0.js.map} +1 -1
  255. package/dist/core/web/public/next/assets/TerminalPane-DCQTukcE.js +7 -0
  256. package/dist/core/web/public/next/assets/TerminalPane-DCQTukcE.js.map +1 -0
  257. package/dist/core/web/public/next/assets/UniverseConsoleApp-DsuWT0pi.js +2 -0
  258. package/dist/core/web/public/next/assets/{UniverseConsoleApp-C8yQ0AaR.js.map → UniverseConsoleApp-DsuWT0pi.js.map} +1 -1
  259. package/dist/core/web/public/next/assets/{UniverseView-_nPURPqe.js → UniverseView-DyI5ApsA.js} +3 -3
  260. package/dist/core/web/public/next/assets/{UniverseView-_nPURPqe.js.map → UniverseView-DyI5ApsA.js.map} +1 -1
  261. package/dist/core/web/public/next/assets/UsageSection-Imr28nwK.js +3 -0
  262. package/dist/core/web/public/next/assets/UsageSection-Imr28nwK.js.map +1 -0
  263. package/dist/core/web/public/next/assets/VerseConsoleApp-DeuBEvAO.js +3 -0
  264. package/dist/core/web/public/next/assets/VerseConsoleApp-DeuBEvAO.js.map +1 -0
  265. package/dist/core/web/public/next/assets/Workspace-CpxBO98E.js +10 -0
  266. package/dist/core/web/public/next/assets/Workspace-CpxBO98E.js.map +1 -0
  267. package/dist/core/web/public/next/assets/actions-BmIf9avl.css +1 -0
  268. package/dist/core/web/public/next/assets/actions-DE8NoWV_.js +2 -0
  269. package/dist/core/web/public/next/assets/actions-DE8NoWV_.js.map +1 -0
  270. package/dist/core/web/public/next/assets/apps-model-CFGCUu9p.js +2 -0
  271. package/dist/core/web/public/next/assets/apps-model-CFGCUu9p.js.map +1 -0
  272. package/dist/core/web/public/next/assets/authority-model-CmnfJzmM.js +2 -0
  273. package/dist/core/web/public/next/assets/authority-model-CmnfJzmM.js.map +1 -0
  274. package/dist/core/web/public/next/assets/binding-left-DZpq5sLf.js +2 -0
  275. package/dist/core/web/public/next/assets/binding-left-DZpq5sLf.js.map +1 -0
  276. package/dist/core/web/public/next/assets/{budget-queries-V3wcJVK_.js → budget-queries-DjrPRFwl.js} +2 -2
  277. package/dist/core/web/public/next/assets/{budget-queries-V3wcJVK_.js.map → budget-queries-DjrPRFwl.js.map} +1 -1
  278. package/dist/core/web/public/next/assets/capacity-strip-model-C7cdQnuK.js +2 -0
  279. package/dist/core/web/public/next/assets/capacity-strip-model-C7cdQnuK.js.map +1 -0
  280. package/dist/core/web/public/next/assets/charts-DUD_jprE.js +2 -0
  281. package/dist/core/web/public/next/assets/charts-DUD_jprE.js.map +1 -0
  282. package/dist/core/web/public/next/assets/charts-DhKTrQLw.css +1 -0
  283. package/dist/core/web/public/next/assets/clipboard-DkZdqlxf.js +2 -0
  284. package/dist/core/web/public/next/assets/clipboard-DkZdqlxf.js.map +1 -0
  285. package/dist/core/web/public/next/assets/cloud-D-HXms6q.css +1 -0
  286. package/dist/core/web/public/next/assets/cloud-model-DoxBMDvx.js +2 -0
  287. package/dist/core/web/public/next/assets/cloud-model-DoxBMDvx.js.map +1 -0
  288. package/dist/core/web/public/next/assets/cloud-queries-CTGvO-k-.js +2 -0
  289. package/dist/core/web/public/next/assets/cloud-queries-CTGvO-k-.js.map +1 -0
  290. package/dist/core/web/public/next/assets/cloud.module-DOP-N4Ch.js +2 -0
  291. package/dist/core/web/public/next/assets/cloud.module-DOP-N4Ch.js.map +1 -0
  292. package/dist/core/web/public/next/assets/command-catalog-CmrHNFzh.js +2 -0
  293. package/dist/core/web/public/next/assets/command-catalog-CmrHNFzh.js.map +1 -0
  294. package/dist/core/web/public/next/assets/context-model-2Owp2jYF.js +3 -0
  295. package/dist/core/web/public/next/assets/context-model-2Owp2jYF.js.map +1 -0
  296. package/dist/core/web/public/next/assets/context-model-9xywbXxX.js +2 -0
  297. package/dist/core/web/public/next/assets/context-model-9xywbXxX.js.map +1 -0
  298. package/dist/core/web/public/next/assets/{context-queries-CrPcHWTz.js → context-queries-wvcRnV-I.js} +2 -2
  299. package/dist/core/web/public/next/assets/{context-queries-CrPcHWTz.js.map → context-queries-wvcRnV-I.js.map} +1 -1
  300. package/dist/core/web/public/next/assets/{control-queries-CmgBgKV7.js → control-queries-DB6Kh7UN.js} +2 -2
  301. package/dist/core/web/public/next/assets/{control-queries-CmgBgKV7.js.map → control-queries-DB6Kh7UN.js.map} +1 -1
  302. package/dist/core/web/public/next/assets/copy-setup-CJQhFl-4.js +2 -0
  303. package/dist/core/web/public/next/assets/copy-setup-CJQhFl-4.js.map +1 -0
  304. package/dist/core/web/public/next/assets/dock-icons-BBUGl4tE.js +2 -0
  305. package/dist/core/web/public/next/assets/{dock-icons-CUh8dOxJ.js.map → dock-icons-BBUGl4tE.js.map} +1 -1
  306. package/dist/core/web/public/next/assets/fleet-model-BRfRWkZl.js +2 -0
  307. package/dist/core/web/public/next/assets/fleet-model-BRfRWkZl.js.map +1 -0
  308. package/dist/core/web/public/next/assets/fleet-queries-tU6UEXN2.js +2 -0
  309. package/dist/core/web/public/next/assets/fleet-queries-tU6UEXN2.js.map +1 -0
  310. package/dist/core/web/public/next/assets/{focus-trap-HtcoXeEq.js → focus-trap-BGOceFvj.js} +2 -2
  311. package/dist/core/web/public/next/assets/{focus-trap-HtcoXeEq.js.map → focus-trap-BGOceFvj.js.map} +1 -1
  312. package/dist/core/web/public/next/assets/format-DEAaVF6X.js +2 -0
  313. package/dist/core/web/public/next/assets/format-DEAaVF6X.js.map +1 -0
  314. package/dist/core/web/public/next/assets/{git-model-bk_RXh3y.js → git-model-53iRLInY.js} +2 -2
  315. package/dist/core/web/public/next/assets/{git-model-bk_RXh3y.js.map → git-model-53iRLInY.js.map} +1 -1
  316. package/dist/core/web/public/next/assets/global-CXHHMz9o.js +2 -0
  317. package/dist/core/web/public/next/assets/{global-oEl9Qj8u.js.map → global-CXHHMz9o.js.map} +1 -1
  318. package/dist/core/web/public/next/assets/{guarded-runners-LHLXmXIk.js → guarded-runners-B8zFVBVZ.js} +2 -2
  319. package/dist/core/web/public/next/assets/{guarded-runners-LHLXmXIk.js.map → guarded-runners-B8zFVBVZ.js.map} +1 -1
  320. package/dist/core/web/public/next/assets/icons-D4s-jlxX.js +2 -0
  321. package/dist/core/web/public/next/assets/icons-D4s-jlxX.js.map +1 -0
  322. package/dist/core/web/public/next/assets/{index-BVxOlseC.js → index-BG177cPN.js} +3 -3
  323. package/dist/core/web/public/next/assets/{index-BVxOlseC.js.map → index-BG177cPN.js.map} +1 -1
  324. package/dist/core/web/public/next/assets/live-model-CEf01wrW.js +2 -0
  325. package/dist/core/web/public/next/assets/live-model-CEf01wrW.js.map +1 -0
  326. package/dist/core/web/public/next/assets/local-model-C9xNi9fN.js +2 -0
  327. package/dist/core/web/public/next/assets/local-model-C9xNi9fN.js.map +1 -0
  328. package/dist/core/web/public/next/assets/mind.module-D_xk6HIQ.js +2 -0
  329. package/dist/core/web/public/next/assets/{mind.module-gTGAuJt1.js.map → mind.module-D_xk6HIQ.js.map} +1 -1
  330. package/dist/core/web/public/next/assets/mutations-CbTSofVH.js +2 -0
  331. package/dist/core/web/public/next/assets/{mutations-C5S7okTW.js.map → mutations-CbTSofVH.js.map} +1 -1
  332. package/dist/core/web/public/next/assets/nav-CmZcbPFJ.js +2 -0
  333. package/dist/core/web/public/next/assets/{nav-NVtnuG7A.js.map → nav-CmZcbPFJ.js.map} +1 -1
  334. package/dist/core/web/public/next/assets/{overnight-queries-DGm3qL1b.js → overnight-queries-CR0b_j-V.js} +2 -2
  335. package/dist/core/web/public/next/assets/{overnight-queries-DGm3qL1b.js.map → overnight-queries-CR0b_j-V.js.map} +1 -1
  336. package/dist/core/web/public/next/assets/primitives-DNI-uJBd.js +1 -0
  337. package/dist/core/web/public/next/assets/{queries-CYisSAAB.js → queries-rvRsAGW2.js} +2 -2
  338. package/dist/core/web/public/next/assets/{queries-CYisSAAB.js.map → queries-rvRsAGW2.js.map} +1 -1
  339. package/dist/core/web/public/next/assets/reasoning-pref-DMPQkujg.js +2 -0
  340. package/dist/core/web/public/next/assets/{reasoning-pref-BUcFF_5G.js.map → reasoning-pref-DMPQkujg.js.map} +1 -1
  341. package/dist/core/web/public/next/assets/{reveal-anchor-D-tV8xau.js → reveal-anchor-BKk2wZZZ.js} +2 -2
  342. package/dist/core/web/public/next/assets/{reveal-anchor-D-tV8xau.js.map → reveal-anchor-BKk2wZZZ.js.map} +1 -1
  343. package/dist/core/web/public/next/assets/seat-subscription-CLn2ReSZ.js +2 -0
  344. package/dist/core/web/public/next/assets/{seat-subscription-B-f9ViU2.js.map → seat-subscription-CLn2ReSZ.js.map} +1 -1
  345. package/dist/core/web/public/next/assets/{sidebar-model-DQ-FyBHW.js → sidebar-model-CjQLvdag.js} +2 -2
  346. package/dist/core/web/public/next/assets/{sidebar-model-DQ-FyBHW.js.map → sidebar-model-CjQLvdag.js.map} +1 -1
  347. package/dist/core/web/public/next/assets/slots-DRxNosZg.js +3 -0
  348. package/dist/core/web/public/next/assets/{slots-BhP8b8tf.js.map → slots-DRxNosZg.js.map} +1 -1
  349. package/dist/core/web/public/next/assets/surface-data-DshUC_TU.js +2 -0
  350. package/dist/core/web/public/next/assets/surface-data-DshUC_TU.js.map +1 -0
  351. package/dist/core/web/public/next/assets/surface-prefetch-DO8r4ttQ.js +2 -0
  352. package/dist/core/web/public/next/assets/surface-prefetch-DO8r4ttQ.js.map +1 -0
  353. package/dist/core/web/public/next/assets/{tasks-model-BKDNqmmt.js → tasks-model-BKPFZAmZ.js} +2 -2
  354. package/dist/core/web/public/next/assets/{tasks-model-BKDNqmmt.js.map → tasks-model-BKPFZAmZ.js.map} +1 -1
  355. package/dist/core/web/public/next/assets/{terminal-icons-D2xe-aM1.js → terminal-icons-DoeQkP3y.js} +2 -2
  356. package/dist/core/web/public/next/assets/{terminal-icons-D2xe-aM1.js.map → terminal-icons-DoeQkP3y.js.map} +1 -1
  357. package/dist/core/web/public/next/assets/transient-events-nTLhMBND.js +2 -0
  358. package/dist/core/web/public/next/assets/transient-events-nTLhMBND.js.map +1 -0
  359. package/dist/core/web/public/next/assets/types-D5XOdyw8.js.map +1 -1
  360. package/dist/core/web/public/next/assets/{usage-queries-BZuAANlI.js → usage-queries-MnUeYzwp.js} +2 -2
  361. package/dist/core/web/public/next/assets/{usage-queries-BZuAANlI.js.map → usage-queries-MnUeYzwp.js.map} +1 -1
  362. package/dist/core/web/public/next/assets/{use-guarded-action-Cf4MeNBa.js → use-guarded-action-P12MfNwU.js} +2 -2
  363. package/dist/core/web/public/next/assets/{use-guarded-action-Cf4MeNBa.js.map → use-guarded-action-P12MfNwU.js.map} +1 -1
  364. package/dist/core/web/public/next/assets/{use-ticker-D9yi49my.js → use-ticker-DIvAZ4Ey.js} +2 -2
  365. package/dist/core/web/public/next/assets/{use-ticker-D9yi49my.js.map → use-ticker-DIvAZ4Ey.js.map} +1 -1
  366. package/dist/core/web/public/next/assets/{use-token-gate-DqrSXdX6.js → use-token-gate-DfEja7Wr.js} +2 -2
  367. package/dist/core/web/public/next/assets/{use-token-gate-DqrSXdX6.js.map → use-token-gate-DfEja7Wr.js.map} +1 -1
  368. package/dist/core/web/public/next/assets/useOnboarding-CkOHadqC.js +2 -0
  369. package/dist/core/web/public/next/assets/useOnboarding-CkOHadqC.js.map +1 -0
  370. package/dist/core/web/public/next/assets/useSeatsRefresh-BDlbDlIU.js +2 -0
  371. package/dist/core/web/public/next/assets/useSeatsRefresh-BDlbDlIU.js.map +1 -0
  372. package/dist/core/web/public/next/assets/useVerseTranscript-BGtA55k2.js +2 -0
  373. package/dist/core/web/public/next/assets/{useVerseTranscript-CDYrrWOO.js.map → useVerseTranscript-BGtA55k2.js.map} +1 -1
  374. package/dist/core/web/public/next/assets/verse-icons-wOet9JZy.js +2 -0
  375. package/dist/core/web/public/next/assets/verse-icons-wOet9JZy.js.map +1 -0
  376. package/dist/core/web/public/next/assets/verse-model-CSzzdyu2.js +2 -0
  377. package/dist/core/web/public/next/assets/verse-model-CSzzdyu2.js.map +1 -0
  378. package/dist/core/web/public/next/assets/verse-store-DNVRuiJL.js +2 -0
  379. package/dist/core/web/public/next/assets/verse-store-DNVRuiJL.js.map +1 -0
  380. package/dist/core/web/public/next/assets/warmup-CecO_Nk0.js +3 -0
  381. package/dist/core/web/public/next/assets/{warmup-HG5vYbsN.js.map → warmup-CecO_Nk0.js.map} +1 -1
  382. package/dist/core/web/public/next/assets/why-seat-model-D68ZA7G8.js +2 -0
  383. package/dist/core/web/public/next/assets/why-seat-model-D68ZA7G8.js.map +1 -0
  384. package/dist/core/web/public/next/assets/{workspace-model-CbhdPhei.js → workspace-model-BdIVybKr.js} +2 -2
  385. package/dist/core/web/public/next/assets/{workspace-model-CbhdPhei.js.map → workspace-model-BdIVybKr.js.map} +1 -1
  386. package/dist/core/web/public/next/index.html +1 -1
  387. package/dist/release-dependency-inventory.json +1 -1
  388. package/docs/README.md +2 -1
  389. package/package.json +1 -1
  390. package/dist/core/web/public/next/assets/ActionMenu-FxXeRbPx.js +0 -2
  391. package/dist/core/web/public/next/assets/Advanced-D_eS4472.js +0 -2
  392. package/dist/core/web/public/next/assets/Advanced-D_eS4472.js.map +0 -1
  393. package/dist/core/web/public/next/assets/App-Cj4zKbG3.js +0 -7
  394. package/dist/core/web/public/next/assets/App-Cj4zKbG3.js.map +0 -1
  395. package/dist/core/web/public/next/assets/AppsSection-Ddu_RCQE.js +0 -2
  396. package/dist/core/web/public/next/assets/AppsSection-Ddu_RCQE.js.map +0 -1
  397. package/dist/core/web/public/next/assets/AreaTrend-CDxrQU4b.js +0 -2
  398. package/dist/core/web/public/next/assets/AutonomySection-DuQkHGD_.js +0 -2
  399. package/dist/core/web/public/next/assets/BranchBar-CLsvOcyK.js +0 -2
  400. package/dist/core/web/public/next/assets/BudgetControl-TL3FeZ1D.js +0 -2
  401. package/dist/core/web/public/next/assets/BurnDown-sFXkUGdB.js +0 -2
  402. package/dist/core/web/public/next/assets/BurnDown-sFXkUGdB.js.map +0 -1
  403. package/dist/core/web/public/next/assets/CapacityStrip-qReu0RaF.js +0 -2
  404. package/dist/core/web/public/next/assets/ChatSection-DZuZfTaC.js +0 -3
  405. package/dist/core/web/public/next/assets/ChatSection-DZuZfTaC.js.map +0 -1
  406. package/dist/core/web/public/next/assets/CloudBudgetForm-DJbiT1wi.js +0 -2
  407. package/dist/core/web/public/next/assets/CloudBudgetForm-DJbiT1wi.js.map +0 -1
  408. package/dist/core/web/public/next/assets/CommandPalette-zYLFZRnj.js +0 -2
  409. package/dist/core/web/public/next/assets/CommandPalette-zYLFZRnj.js.map +0 -1
  410. package/dist/core/web/public/next/assets/CommandSection-rIeMK5Ch.js +0 -2
  411. package/dist/core/web/public/next/assets/CommandSection-rIeMK5Ch.js.map +0 -1
  412. package/dist/core/web/public/next/assets/ConfirmDialog-DLrLKM0c.js +0 -2
  413. package/dist/core/web/public/next/assets/Dialog-BS9Dxi3G.js +0 -2
  414. package/dist/core/web/public/next/assets/DiffPane-TOmUf3b2.js +0 -2
  415. package/dist/core/web/public/next/assets/DiffViewer-BpH56302.js +0 -2
  416. package/dist/core/web/public/next/assets/DockHost-DzkzR-HD.js +0 -2
  417. package/dist/core/web/public/next/assets/DockHost-DzkzR-HD.js.map +0 -1
  418. package/dist/core/web/public/next/assets/FleetSection-ViAb549H.js +0 -3
  419. package/dist/core/web/public/next/assets/FleetSection-ViAb549H.js.map +0 -1
  420. package/dist/core/web/public/next/assets/Funnel-D2u7Wlzc.js +0 -2
  421. package/dist/core/web/public/next/assets/GearTray-Cb2npoxM.js +0 -2
  422. package/dist/core/web/public/next/assets/GrowthSection-C5aDPs8B.js +0 -2
  423. package/dist/core/web/public/next/assets/HandoffDialog-BF3AYg-X.js +0 -2
  424. package/dist/core/web/public/next/assets/Input-B5dmGLZx.js +0 -2
  425. package/dist/core/web/public/next/assets/LeaderCard-DZrmjDbI.js +0 -2
  426. package/dist/core/web/public/next/assets/LeaderCard-DZrmjDbI.js.map +0 -1
  427. package/dist/core/web/public/next/assets/MatrixHeatmap-BgEUs2Eu.js +0 -2
  428. package/dist/core/web/public/next/assets/McpSection-DZkiOuoq.js +0 -2
  429. package/dist/core/web/public/next/assets/MessageMarkdown-BauY8ZTY.js +0 -3
  430. package/dist/core/web/public/next/assets/MindSection-BvJXFjyX.js +0 -2
  431. package/dist/core/web/public/next/assets/MindSection-BvJXFjyX.js.map +0 -1
  432. package/dist/core/web/public/next/assets/MutationTokenDialog-mxrw0Yvy.js +0 -2
  433. package/dist/core/web/public/next/assets/NeedsYouDrawer-CO-Balfp.js +0 -2
  434. package/dist/core/web/public/next/assets/NeedsYouList-CzDZbzRD.js +0 -2
  435. package/dist/core/web/public/next/assets/NewChatDialog-B8eJjlFf.js +0 -3
  436. package/dist/core/web/public/next/assets/NewChatDialog-B8eJjlFf.js.map +0 -1
  437. package/dist/core/web/public/next/assets/OnboardingFlow-Cij6KWat.js +0 -2
  438. package/dist/core/web/public/next/assets/OnboardingFlow-Cij6KWat.js.map +0 -1
  439. package/dist/core/web/public/next/assets/OnboardingFlow-DSpPj8UE.css +0 -1
  440. package/dist/core/web/public/next/assets/PreviewPane-BS-CleCd.js +0 -2
  441. package/dist/core/web/public/next/assets/RailStatus-cPRyOmrk.js +0 -2
  442. package/dist/core/web/public/next/assets/ResourcesChrome-BJCauW_t.js +0 -3
  443. package/dist/core/web/public/next/assets/ResourcesChrome-BJCauW_t.js.map +0 -1
  444. package/dist/core/web/public/next/assets/ResourcesDrawer-BDecg6nO.js +0 -2
  445. package/dist/core/web/public/next/assets/ResourcesDrawer-BDecg6nO.js.map +0 -1
  446. package/dist/core/web/public/next/assets/ResourcesDrawer-CSKIO_wZ.css +0 -1
  447. package/dist/core/web/public/next/assets/RouteErrorBoundary-DYtwc2ja.js +0 -2
  448. package/dist/core/web/public/next/assets/RunInCloudAction-BEGEEM8O.js +0 -2
  449. package/dist/core/web/public/next/assets/SeatSelector-CYHRR7Wp.js +0 -3
  450. package/dist/core/web/public/next/assets/Segmented-BE53BenI.js +0 -2
  451. package/dist/core/web/public/next/assets/Select-BwSGkHCS.js +0 -2
  452. package/dist/core/web/public/next/assets/SessionGate-e0dFJm9d.js +0 -2
  453. package/dist/core/web/public/next/assets/SessionInsightChip-CxlSyueJ.js +0 -2
  454. package/dist/core/web/public/next/assets/SessionSearch-_yp7S2TP.js +0 -2
  455. package/dist/core/web/public/next/assets/SettingsSection-wGnpWeGW.js +0 -2
  456. package/dist/core/web/public/next/assets/SettingsSection-wGnpWeGW.js.map +0 -1
  457. package/dist/core/web/public/next/assets/Sheet-DVP2Mgy6.js +0 -2
  458. package/dist/core/web/public/next/assets/ShortcutsOverlay-BcIcoClX.js +0 -2
  459. package/dist/core/web/public/next/assets/Sidebar-DjQOqPbm.js +0 -3
  460. package/dist/core/web/public/next/assets/Sidebar-DjQOqPbm.js.map +0 -1
  461. package/dist/core/web/public/next/assets/Slider-BypUWjpH.js +0 -2
  462. package/dist/core/web/public/next/assets/StepBand-Duz1PUes.js +0 -2
  463. package/dist/core/web/public/next/assets/Surface-B75lVfzm.js +0 -2
  464. package/dist/core/web/public/next/assets/Surface-B75lVfzm.js.map +0 -1
  465. package/dist/core/web/public/next/assets/Surface-DMca0gAe.css +0 -1
  466. package/dist/core/web/public/next/assets/Swimlane-DGcIcnNA.js +0 -2
  467. package/dist/core/web/public/next/assets/TerminalPane-MQT-veKZ.js +0 -7
  468. package/dist/core/web/public/next/assets/TerminalPane-MQT-veKZ.js.map +0 -1
  469. package/dist/core/web/public/next/assets/UniverseConsoleApp-C8yQ0AaR.js +0 -2
  470. package/dist/core/web/public/next/assets/UsageSection-CqxRGJ40.js +0 -2
  471. package/dist/core/web/public/next/assets/UsageSection-CqxRGJ40.js.map +0 -1
  472. package/dist/core/web/public/next/assets/VerseConsoleApp-DTjDpGCd.js +0 -3
  473. package/dist/core/web/public/next/assets/VerseConsoleApp-DTjDpGCd.js.map +0 -1
  474. package/dist/core/web/public/next/assets/Workspace-DfcFGzME.js +0 -10
  475. package/dist/core/web/public/next/assets/Workspace-DfcFGzME.js.map +0 -1
  476. package/dist/core/web/public/next/assets/actions-Ddfg2iLl.css +0 -1
  477. package/dist/core/web/public/next/assets/actions-tWevL9HV.js +0 -2
  478. package/dist/core/web/public/next/assets/actions-tWevL9HV.js.map +0 -1
  479. package/dist/core/web/public/next/assets/apps-model-CDFvmsQV.js +0 -2
  480. package/dist/core/web/public/next/assets/apps-model-CDFvmsQV.js.map +0 -1
  481. package/dist/core/web/public/next/assets/capacity-strip-model-BDbmQ3e3.js +0 -2
  482. package/dist/core/web/public/next/assets/capacity-strip-model-BDbmQ3e3.js.map +0 -1
  483. package/dist/core/web/public/next/assets/charts-CfAjuKMv.js +0 -2
  484. package/dist/core/web/public/next/assets/charts-CfAjuKMv.js.map +0 -1
  485. package/dist/core/web/public/next/assets/charts-uSX6xVYN.css +0 -1
  486. package/dist/core/web/public/next/assets/cloud-C1KPNRHC.css +0 -1
  487. package/dist/core/web/public/next/assets/cloud-queries-Br_r0UAz.js +0 -2
  488. package/dist/core/web/public/next/assets/cloud-queries-Br_r0UAz.js.map +0 -1
  489. package/dist/core/web/public/next/assets/cloud.module-ascz58c3.js +0 -2
  490. package/dist/core/web/public/next/assets/cloud.module-ascz58c3.js.map +0 -1
  491. package/dist/core/web/public/next/assets/command-bus-xYZoK9nQ.js +0 -2
  492. package/dist/core/web/public/next/assets/command-bus-xYZoK9nQ.js.map +0 -1
  493. package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js +0 -2
  494. package/dist/core/web/public/next/assets/command-catalog-Bb_PxC5w.js.map +0 -1
  495. package/dist/core/web/public/next/assets/composer-keys-su0g1h9o.js +0 -2
  496. package/dist/core/web/public/next/assets/composer-keys-su0g1h9o.js.map +0 -1
  497. package/dist/core/web/public/next/assets/context-model-BC-HOmPo.js +0 -2
  498. package/dist/core/web/public/next/assets/context-model-BC-HOmPo.js.map +0 -1
  499. package/dist/core/web/public/next/assets/context-model-CIBmSugV.js +0 -2
  500. package/dist/core/web/public/next/assets/context-model-CIBmSugV.js.map +0 -1
  501. package/dist/core/web/public/next/assets/dark-since-DOMvtB_G.js +0 -2
  502. package/dist/core/web/public/next/assets/dark-since-DOMvtB_G.js.map +0 -1
  503. package/dist/core/web/public/next/assets/dock-icons-CUh8dOxJ.js +0 -2
  504. package/dist/core/web/public/next/assets/dock-store-B2vlxqPu.js +0 -2
  505. package/dist/core/web/public/next/assets/dock-store-B2vlxqPu.js.map +0 -1
  506. package/dist/core/web/public/next/assets/fleet-model-7i-FbzKI.js +0 -2
  507. package/dist/core/web/public/next/assets/fleet-model-7i-FbzKI.js.map +0 -1
  508. package/dist/core/web/public/next/assets/fleet-queries-DzGoqq8X.js +0 -2
  509. package/dist/core/web/public/next/assets/fleet-queries-DzGoqq8X.js.map +0 -1
  510. package/dist/core/web/public/next/assets/format-BkWdOQDL.js +0 -2
  511. package/dist/core/web/public/next/assets/format-BkWdOQDL.js.map +0 -1
  512. package/dist/core/web/public/next/assets/global-oEl9Qj8u.js +0 -2
  513. package/dist/core/web/public/next/assets/guarded-action-OzqcPjmh.js +0 -3
  514. package/dist/core/web/public/next/assets/guarded-action-OzqcPjmh.js.map +0 -1
  515. package/dist/core/web/public/next/assets/icon-base-DvM1eI5V.js +0 -2
  516. package/dist/core/web/public/next/assets/icon-base-DvM1eI5V.js.map +0 -1
  517. package/dist/core/web/public/next/assets/icons-DEQa2rTx.js +0 -2
  518. package/dist/core/web/public/next/assets/icons-DEQa2rTx.js.map +0 -1
  519. package/dist/core/web/public/next/assets/live-model-bmsJgnYD.js +0 -2
  520. package/dist/core/web/public/next/assets/live-model-bmsJgnYD.js.map +0 -1
  521. package/dist/core/web/public/next/assets/local-model-DFyjKX0b.js +0 -2
  522. package/dist/core/web/public/next/assets/local-model-DFyjKX0b.js.map +0 -1
  523. package/dist/core/web/public/next/assets/mind.module-gTGAuJt1.js +0 -2
  524. package/dist/core/web/public/next/assets/mutations-C5S7okTW.js +0 -2
  525. package/dist/core/web/public/next/assets/nav-NVtnuG7A.js +0 -2
  526. package/dist/core/web/public/next/assets/preloaded-Cwf9rsnZ.js +0 -2
  527. package/dist/core/web/public/next/assets/preloaded-Cwf9rsnZ.js.map +0 -1
  528. package/dist/core/web/public/next/assets/primitives-DyCKYSBG.js +0 -1
  529. package/dist/core/web/public/next/assets/reasoning-pref-BUcFF_5G.js +0 -2
  530. package/dist/core/web/public/next/assets/seat-subscription-B-f9ViU2.js +0 -2
  531. package/dist/core/web/public/next/assets/section-visibility-Yctxu-if.js +0 -2
  532. package/dist/core/web/public/next/assets/section-visibility-Yctxu-if.js.map +0 -1
  533. package/dist/core/web/public/next/assets/slots-BhP8b8tf.js +0 -3
  534. package/dist/core/web/public/next/assets/surface-data-DTI7LjvH.js +0 -2
  535. package/dist/core/web/public/next/assets/surface-data-DTI7LjvH.js.map +0 -1
  536. package/dist/core/web/public/next/assets/surface-prefetch-CdUEBFrl.js +0 -2
  537. package/dist/core/web/public/next/assets/surface-prefetch-CdUEBFrl.js.map +0 -1
  538. package/dist/core/web/public/next/assets/useChartWidth-owwodNVz.js +0 -2
  539. package/dist/core/web/public/next/assets/useChartWidth-owwodNVz.js.map +0 -1
  540. package/dist/core/web/public/next/assets/useSeatsRefresh-DgFy-Ph4.js +0 -2
  541. package/dist/core/web/public/next/assets/useSeatsRefresh-DgFy-Ph4.js.map +0 -1
  542. package/dist/core/web/public/next/assets/useVerseTranscript-CDYrrWOO.js +0 -2
  543. package/dist/core/web/public/next/assets/verse-icons-F9VwX07_.js +0 -2
  544. package/dist/core/web/public/next/assets/verse-icons-F9VwX07_.js.map +0 -1
  545. package/dist/core/web/public/next/assets/verse-model-DyCwZF-M.js +0 -2
  546. package/dist/core/web/public/next/assets/verse-model-DyCwZF-M.js.map +0 -1
  547. package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js +0 -3
  548. package/dist/core/web/public/next/assets/verse-store-b_Lek_c5.js.map +0 -1
  549. package/dist/core/web/public/next/assets/verse-ui-store-62DxpVHS.js +0 -3
  550. package/dist/core/web/public/next/assets/verse-ui-store-62DxpVHS.js.map +0 -1
  551. package/dist/core/web/public/next/assets/viewport-nTubFCwf.js +0 -2
  552. package/dist/core/web/public/next/assets/viewport-nTubFCwf.js.map +0 -1
  553. package/dist/core/web/public/next/assets/warmup-HG5vYbsN.js +0 -3
  554. package/dist/core/web/public/next/assets/workbench-types-DzN-5trg.js +0 -2
  555. package/dist/core/web/public/next/assets/workbench-types-DzN-5trg.js.map +0 -1
  556. /package/dist/core/web/public/next/assets/{BurnDown-BuLMsJMx.css → StatTile-BuLMsJMx.css} +0 -0
@@ -0,0 +1,7 @@
1
+ import{a as e,c as t,i as n,n as r,t as i}from"./index-BG177cPN.js";import{D as a,K as o,O as s,V as c,a as l,b as u,d,f,g as p,i as m,k as h,m as g,o as _,p as v,r as y,s as b,t as x}from"./global-CXHHMz9o.js";import{t as S}from"./Dialog-BuIaG6HF.js";import{n as C,r as w,t as T}from"./Epistemic-CfqFe_aP.js";import{n as E,r as ee,t as D}from"./StatusBadge-DQ1UtQAJ.js";import{C as te,_ as ne,a as O,b as re,c as ie,d as ae,f as oe,g as se,h as ce,i as le,l as k,m as ue,n as de,o as fe,p as pe,r as me,s as he,t as ge,u as _e,v as ve,y as ye}from"./queries-rvRsAGW2.js";import{i as be,n as xe,r as Se,t as Ce}from"./mutations-CbTSofVH.js";import{t as we}from"./MutationTokenDialog-CLGP72g6.js";import{t as Te}from"./ConfirmDialog-_S9iE-cJ.js";import{n as Ee,r as De,t as Oe}from"./RouteErrorBoundary-BvhHNpE_.js";import{r as ke,t as Ae}from"./UniverseView-DyI5ApsA.js";import{t as A}from"./RefreshIndicator-DGubF4vR.js";import{c as je}from"./ChartFrame-B_w2Siqg.js";import{a as Me,n as Ne,r as Pe}from"./charts-DUD_jprE.js";import{n as Fe,r as Ie,s as Le,t as Re}from"./format-DKrNjdwD.js";import{t as j}from"./StatTile-DScTd3c-.js";import{t as ze}from"./calendar-day-BxBYHfX1.js";import{t as Be}from"./DiffViewer-B75t6Ile.js";import{SessionGate as Ve}from"./SessionGate-8RtQFWeZ.js";var M=t(e(),1),He=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ue=/^[\\/]{2}/;function We(e,t){return t+e.replace(/\\/g,`/`)}var Ge=`popstate`;function Ke(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function qe(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=$e(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),Ze(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:Qe(t))}function r(e,t){Je(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return et(t,n,r,e)}function N(e,t){if(e===!1||e==null)throw Error(t)}function Je(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Ye(){return Math.random().toString(36).substring(2,10)}function Xe(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ze(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?$e(t):t,state:n,key:t&&t.key||r||Ye(),mask:i}}function Qe({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function $e(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function et(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Ke(e)?e:Ze(h.location,e,t);n&&n(r,e),l=u()+1;let d=Xe(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Ke(e)?e:Ze(h.location,e,t);n&&n(r,e),l=u();let i=Xe(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return tt(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Ge,d),c=e,()=>{i.removeEventListener(Ge,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function tt(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),N(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Qe(t);return i=i.replace(/ $/,`%20`),!n&&Ue.test(i)&&(i=r+i),new URL(i,r)}function nt(e,t,n=`/`){return rt(e,t,n,!1)}function rt(e,t,n,r,i){let a=St((typeof t==`string`?$e(t):t).pathname||`/`,n);if(a==null)return null;let o=i??it(e),s=null,c=xt(a);for(let e=0;s==null&&e<o.length;++e)s=_t(o[e],c,r);return s}function it(e){let t=at(e);return st(t),t}function at(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;N(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=At([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(N(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),at(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:ht(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=bt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ot(e.path))a(e,t,!0,n)}),t}function ot(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ot(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function st(e){e.sort((e,t)=>e.score===t.score?gt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ct=/^:[\w-]+$/,lt=3,ut=2,dt=1,ft=10,pt=-2,mt=e=>e===`*`;function ht(e,t){let n=e.split(`/`),r=n.length;return n.some(mt)&&(r+=pt),t&&(r+=ut),n.filter(e=>!mt(e)).reduce((e,t)=>e+(ct.test(t)?lt:t===``?dt:ft),r)}function gt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _t(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?yt(u,l,s.matcher,s.compiledParams):vt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=vt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:At([a,d.pathname]),pathnameBase:Mt(At([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=At([a,d.pathnameBase]))}return o}function vt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=bt(e.path,e.caseSensitive,e.end);return yt(e,t,n,r)}function yt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=jt(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=jt(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function bt(e,t=!1,n=!0){Je(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function xt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Je(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function St(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ct(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?$e(e):e,a;return n?(n=kt(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?wt(n.substring(1),`/`):wt(n,t)):a=t,{pathname:a,search:Nt(r),hash:Pt(i)}}function wt(e,t){let n=jt(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Tt(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Et(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Dt(e){let t=Et(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ot(e,t,n,r=!1){let i;typeof e==`string`?i=$e(e):(i={...e},N(!i.pathname||!i.pathname.includes(`?`),Tt(`?`,`pathname`,`search`,i)),N(!i.pathname||!i.pathname.includes(`#`),Tt(`#`,`pathname`,`hash`,i)),N(!i.search||!i.search.includes(`#`),Tt(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Ct(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var kt=e=>e.replace(/[\\/]{2,}/g,`/`),At=e=>kt(e.join(`/`));function jt(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Mt=e=>jt(e).replace(/^\/*/,`/`),Nt=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pt=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ft=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function It(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Lt(e){return At(e.map(e=>e.route.path).filter(Boolean))||`/`}var Rt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function zt(e,t){let n=e;if(typeof n!=`string`||!He.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Rt)try{let e=new URL(window.location.href),r=Ue.test(n)?new URL(We(n,e.protocol)):new URL(n),a=St(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Je(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Bt=new URL(`http://localhost`);function Vt(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Bt)}catch{return Bt}}function Ht(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Ut(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Wt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ht(i,n),s=!Ht(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Ut(e,i)||!Ht(i,a)))throw Error(`External navigation is not allowed`)}var Gt=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Gt);var Kt=[`GET`,...Gt];new Set(Kt);var qt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Jt(e){try{return qt.includes(new URL(e).protocol)}catch{return!1}}var Yt=M.createContext(null);Yt.displayName=`DataRouter`;var Xt=M.createContext(null);Xt.displayName=`DataRouterState`;var Zt=M.createContext(!1);function Qt(){return M.useContext(Zt)}var $t=M.createContext({isTransitioning:!1});$t.displayName=`ViewTransition`;var en=M.createContext(new Map);en.displayName=`Fetchers`;var tn=M.createContext(null);tn.displayName=`Await`;var P=M.createContext(null);P.displayName=`Navigation`;var nn=M.createContext(null);nn.displayName=`Location`;var rn=M.createContext({outlet:null,matches:[],isDataRoute:!1});rn.displayName=`Route`;var an=M.createContext(null);an.displayName=`RouteError`;var on=`REACT_ROUTER_ERROR`,sn=`REDIRECT`,cn=`ROUTE_ERROR_RESPONSE`;function ln(e){if(e.startsWith(`${on}:${sn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function un(e){if(e.startsWith(`${on}:${cn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ft(t.status,t.statusText,t.data)}catch{}}function dn(e,{relative:t}={}){N(fn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=M.useContext(P),{hash:i,pathname:a,search:o}=bn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:At([n,a])),r.createHref({pathname:s,search:o,hash:i})}function fn(){return M.useContext(nn)!=null}function F(){return N(fn(),`useLocation() may be used only in the context of a <Router> component.`),M.useContext(nn).location}var pn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function mn(e){M.useContext(P).static||M.useLayoutEffect(e)}function hn(){let{isDataRoute:e}=M.useContext(rn);return e?Ln():gn()}function gn(){N(fn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=M.useContext(Yt),{basename:t,navigator:n}=M.useContext(P),{matches:r}=M.useContext(rn),{pathname:i}=F(),a=JSON.stringify(Dt(r)),o=M.useRef(!1);return mn(()=>{o.current=!0}),M.useCallback((r,s={})=>{if(Je(o.current,pn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ot(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:At([t,c.pathname])),Wt(typeof r==`string`?r:Qe(r),n.createHref(c),Vt(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var _n=M.createContext(null);function vn(e){let t=M.useContext(rn).outlet;return M.useMemo(()=>t&&M.createElement(_n.Provider,{value:e},t),[t,e])}function yn(){let{matches:e}=M.useContext(rn);return e[e.length-1]?.params??{}}function bn(e,{relative:t}={}){let{matches:n}=M.useContext(rn),{pathname:r}=F(),i=JSON.stringify(Dt(n));return M.useMemo(()=>Ot(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function xn(e,t){return Sn(e,t)}function Sn(e,t,n){N(fn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=M.useContext(P),{matches:i}=M.useContext(rn),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;zn(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
+
3
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=F(),d;if(t){let e=typeof t==`string`?$e(t):t;N(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):nt(e,{pathname:p});Je(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Je(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=kn(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:At([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:At([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?M.createElement(nn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Cn(){let e=In(),t=It(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=M.createElement(M.Fragment,null,M.createElement(`p`,null,`💿 Hey developer 👋`),M.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,M.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,M.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),M.createElement(M.Fragment,null,M.createElement(`h2`,null,`Unexpected Application Error!`),M.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?M.createElement(`pre`,{style:i},n):null,o)}var wn=M.createElement(Cn,null),Tn=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=un(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:M.createElement(rn.Provider,{value:this.props.routeContext},M.createElement(an.Provider,{value:e,children:this.props.component}));return this.context?M.createElement(Dn,{error:e},t):t}};Tn.contextType=Zt;var En=new WeakMap;function Dn({children:e,error:t}){let{basename:n,navigator:r}=M.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ln(t.digest);if(e){let i=En.get(t);if(i)throw i;let a=zt(e.location,n),o=a.absoluteURL||a.to;if(Wt(e.location,o,Vt(r),`allow-explicit`),Jt(o))throw Error(`Invalid redirect location`);if(Rt&&!En.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw En.set(t,n),n}}return M.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function On({routeContext:e,match:t,children:n}){let r=M.useContext(Yt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(rn.Provider,{value:e},n)}function kn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);N(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Lt(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||wn,o&&(s<0&&c===0?(zn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?M.createElement(n.route.Component,null):n.route.element?n.route.element:e,M.createElement(On,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?M.createElement(Tn,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function An(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jn(e){let t=M.useContext(Yt);return N(t,An(e)),t}function Mn(e){let t=M.useContext(Xt);return N(t,An(e)),t}function Nn(e){let t=M.useContext(rn);return N(t,An(e)),t}function Pn(e){let t=Nn(e),n=t.matches[t.matches.length-1];return N(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Fn(){return Pn(`useRouteId`)}function In(){let e=M.useContext(an),t=Mn(`useRouteError`),n=Pn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ln(){let{router:e}=jn(`useNavigate`),t=Pn(`useNavigate`),n=M.useRef(!1);return mn(()=>{n.current=!0}),M.useCallback(async(r,i={})=>{Je(n.current,pn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Rn={};function zn(e,t,n){!t&&!Rn[e]&&(Rn[e]=!0,Je(!1,n))}M.memo(Bn);function Bn({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Sn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Vn({to:e,replace:t,state:n,relative:r}){N(fn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=M.useContext(P);Je(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=M.useContext(rn),{pathname:s}=F(),c=hn(),l=Ot(e,Dt(o),s,r===`path`);Wt(typeof e==`string`?e:Qe(e),a.createHref(l),Vt(a),`reject`);let u=JSON.stringify(l);return M.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Hn(e){return vn(e.context)}function I(e){N(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Un({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){N(!fn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=M.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=$e(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=M.useMemo(()=>{let e=St(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Je(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:M.createElement(P.Provider,{value:c},M.createElement(nn.Provider,{children:t,value:h}))}function Wn({children:e,location:t}){return xn(Gn(e),t)}M.Component;function Gn(e,t=[]){let n=[];return M.Children.forEach(e,(e,r)=>{if(!M.isValidElement(e))return;let i=[...t,r];if(e.type===M.Fragment){n.push.apply(n,Gn(e.props.children,i));return}N(e.type===I,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),N(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Gn(e.props.children,i)),n.push(a)}),n}var Kn=`get`,qn=`application/x-www-form-urlencoded`;function Jn(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Yn(e){return Jn(e)&&e.tagName.toLowerCase()===`button`}function Xn(e){return Jn(e)&&e.tagName.toLowerCase()===`form`}function Zn(e){return Jn(e)&&e.tagName.toLowerCase()===`input`}function Qn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $n(e,t){return e.button===0&&(!t||t===`_self`)&&!Qn(e)}var er=null;function tr(){if(er===null)try{new FormData(document.createElement(`form`),0),er=!1}catch{er=!0}return er}var nr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function rr(e){return e!=null&&!nr.has(e)?(Je(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qn}"`),null):e}function ir(e,t){let n,r,i,a,o;if(Xn(e)){let o=e.getAttribute(`action`);r=o?St(o,t):null,n=e.getAttribute(`method`)||Kn,i=rr(e.getAttribute(`enctype`))||qn,a=new FormData(e)}else if(Yn(e)||Zn(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?St(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Kn,i=rr(e.getAttribute(`formenctype`))||rr(o.getAttribute(`enctype`))||qn,a=new FormData(o,e),!tr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Jn(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Kn,r=null,i=qn,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ar(e,t){if(e===!1||e==null)throw Error(t)}function or(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&St(i.pathname,t)===`/`?`${jt(t)}/_root.${r}`:`${jt(i.pathname)}.${r}`,i}async function sr(e,t){if(e.id in t)return t[e.id];try{let n=await i(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function cr(e){return e!=null&&typeof e.page==`string`}function lr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ur(e,t,n){return hr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await sr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(lr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function dr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function fr(e,t,{includeHydrateFallback:n}={}){return pr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function pr(e){return[...new Set(e)]}function mr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function hr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!cr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(mr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function gr(){let e=M.useContext(Yt);return ar(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function _r(){let e=M.useContext(Xt);return ar(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var vr=M.createContext(void 0);vr.displayName=`FrameworkContext`;function yr(){let e=M.useContext(vr);return ar(e,`You must render this element inside a <HydratedRouter> element`),e}function br(e,t){let n=M.useContext(vr),[r,i]=M.useState(!1),[a,o]=M.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=M.useRef(null);M.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),M.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:xr(s,p),onBlur:xr(c,m),onMouseEnter:xr(l,p),onMouseLeave:xr(u,m),onTouchStart:xr(d,p)}]:[a,f,{}]:[!1,f,{}]}function xr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Sr({page:e,...t}){let n=Qt(),{nonce:r}=yr(),{router:i}=gr(),a=M.useMemo(()=>nt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?M.createElement(wr,{page:e,matches:a,...t}):M.createElement(Tr,{page:e,matches:a,...t})):null}function Cr(e){let{manifest:t,routeModules:n}=yr(),[r,i]=M.useState([]);return M.useEffect(()=>{let r=!1;return ur(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function wr({page:e,matches:t,...n}){let r=F(),{future:i}=yr(),{basename:a}=gr(),o=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=or(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return M.createElement(M.Fragment,null,o.map(e=>M.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Tr({page:e,matches:t,...n}){let r=F(),{future:i,manifest:a,routeModules:o}=yr(),{basename:s}=gr(),{loaderData:c,matches:l}=_r(),u=M.useMemo(()=>dr(e,t,l,a,r,`data`),[e,t,l,a,r]),d=M.useMemo(()=>dr(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=or(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=M.useMemo(()=>fr(d,a),[d,a]),m=Cr(d);return M.createElement(M.Fragment,null,f.map(e=>M.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>M.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>M.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Er(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}M.Component;var Dr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Dr&&(window.__reactRouterVersion=`7.18.4`)}catch{}function Or({basename:e,children:t,useTransitions:n,window:r}){let i=M.useRef();i.current??=qe({window:r,v5Compat:!0});let a=i.current,[o,s]=M.useState({action:a.action,location:a.location}),c=M.useCallback(e=>{n===!1?s(e):M.startTransition(()=>s(e))},[n]);return M.useLayoutEffect(()=>a.listen(c),[a,c]),M.createElement(Un,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var kr=M.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=M.useContext(P),v=typeof l==`string`&&He.test(l),y=zt(l,h);l=y.to;let b=dn(l,{relative:r}),x=F(),S=null;if(o){let e=Ot(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:At([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=br(n,p),E=Pr(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function ee(t){e&&e(t),t.defaultPrevented||E(t)}let D=!(y.isExternal||i),te=M.createElement(`a`,{...p,...T,href:(D?S:void 0)||y.absoluteURL||b,onClick:D?ee:e,ref:Er(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?M.createElement(M.Fragment,null,te,M.createElement(Sr,{page:b})):te});kr.displayName=`Link`;var Ar=M.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=bn(a,{relative:c.relative}),d=F(),f=M.useContext(Xt),{navigator:p,basename:m}=M.useContext(P),h=f!=null&&zr(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=St(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return M.createElement(kr,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Ar.displayName=`NavLink`;var jr=M.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Kn,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=M.useContext(P),g=Lr(),_=Rr(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&He.test(s);return M.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?M.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});jr.displayName=`Form`;function Mr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Nr(e){let t=M.useContext(Yt);return N(t,Mr(e)),t}function Pr(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=hn(),d=F(),f=bn(e,{relative:o});return M.useCallback(p=>{if($n(p,t)){p.preventDefault();let t=n===void 0?Qe(d)===Qe(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?M.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Fr=0,Ir=()=>`__${String(++Fr)}__`;function Lr(){let{router:e}=Nr(`useSubmit`),{basename:t}=M.useContext(P),n=Fn(),r=e.fetch,i=e.navigate;return M.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ir(e,t);if(a.navigate===!1){let e=a.fetcherKey||Ir();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Rr(e,{relative:t}={}){let{basename:n}=M.useContext(P),r=M.useContext(rn);N(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...bn(e||`.`,{relative:t})},o=F();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:At([n,a.pathname])),Qe(a)}function zr(e,{relative:t}={}){let n=M.useContext($t);N(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Nr(`useViewTransitionState`),i=bn(e,{relative:t});if(!n.isTransitioning)return!1;let a=St(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=St(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vt(i.pathname,o)!=null||vt(i.pathname,a)!=null}var Br=[{id:`overview`,label:`Overview`,leaves:[{path:`/overview`,label:`Fleet Dashboard`,description:`Repos, activity, runs, swarms, MCP health, genome, and daemon status at a glance.`,implemented:!0},{path:`/agent-os`,label:`Agent OS`,description:`Authenticated, observation-only decision spine for capability runway and value bets.`,implemented:!0},{path:`/universe`,label:`Universe`,description:`Compare experiments, follow variant lineages, and inspect the retained population.`,implemented:!0}]},{id:`journal`,label:`Journal`,leaves:[{path:`/journal`,label:`Work Journal`,description:`Chronological, filterable, scrubable record of runs, merges, judge verdicts, and daemon ticks — with live streaming into any in-progress run.`,implemented:!0}]},{id:`work`,label:`Work`,leaves:[{path:`/work/runs`,label:`Runs`,description:`Dispatched goal runs and their token burn.`,implemented:!0},{path:`/work/swarms`,label:`Swarms`,description:`Multi-task DAG runs with live burndown.`,implemented:!0}]},{id:`inbox`,label:`Inbox`,leaves:[{path:`/inbox`,label:`Proposals`,description:`Review, filter, and approve/reject proposals — including history (rejected/approved).`,implemented:!0}]},{id:`control`,label:`Control`,leaves:[{path:`/control/daemon`,label:`Daemon`,description:`Autonomous operator state, spend, and direction mode.`,implemented:!0},{path:`/control/fleet`,label:`Fleet`,description:`Queue depth, lease health, and the kill switch.`,implemented:!0},{path:`/control/security`,label:`Security`,description:`Supply-chain / binshield findings from the cached backlog.`,implemented:!0}]},{id:`intelligence`,label:`Intelligence`,leaves:[{path:`/intelligence/pulse`,label:`Pulse`,description:`Activity rollups over the dashboard window.`,implemented:!0},{path:`/intelligence/genome`,label:`Genome`,description:`Cross-repo knowledge search and recall.`,implemented:!0},{path:`/intelligence/production`,label:`Production`,description:`Ships-per-day, judge verdicts, auto-merges.`,implemented:!0}]},{id:`portfolio`,label:`Portfolio`,leaves:[{path:`/portfolio`,label:`Portfolio`,description:`Org-level roll-up across enrolled repos.`,implemented:!0}]},{id:`goals`,label:`Goals`,leaves:[{path:`/goals`,label:`Goals`,description:`Active goals and milestone progress.`,implemented:!0}]}],Vr=Br.flatMap(e=>e.leaves),Hr={sidebar:`_sidebar_vbjva_1`,brand:`_brand_vbjva_11`,brandMark:`_brandMark_vbjva_19`,group:`_group_vbjva_23`,groupLabel:`_groupLabel_vbjva_27`,leaves:`_leaves_vbjva_37`,link:`_link_vbjva_43`,active:`_active_vbjva_60`,soon:`_soon_vbjva_66`},L=r();function Ur(){return(0,L.jsxs)(`nav`,{className:Hr.sidebar,"aria-label":`Primary`,children:[(0,L.jsxs)(`div`,{className:Hr.brand,children:[(0,L.jsx)(`span`,{className:Hr.brandMark,"aria-hidden":`true`,children:`▲`}),(0,L.jsx)(`span`,{className:Hr.brandName,children:`ashlr`})]}),Br.map(e=>(0,L.jsxs)(`div`,{className:Hr.group,children:[(0,L.jsx)(`h2`,{className:Hr.groupLabel,children:e.label}),(0,L.jsx)(`ul`,{className:Hr.leaves,children:e.leaves.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsxs)(Ar,{to:e.path,className:({isActive:e})=>`${Hr.link} ${e?Hr.active:``}`,children:[e.label,e.implemented?null:(0,L.jsx)(`span`,{className:Hr.soon,children:`soon`})]})},e.path))})]},e.id))]})}var Wr=18e4,Gr=72e5,Kr=864e5;function qr(e){let t=e.toLowerCase();return t.includes(`proposal`)||t.includes(`inbox`)?`/inbox`:t.includes(`security`)||t.includes(`audit`)?`/control/security`:t.includes(`evidence`)||t.includes(`fleet`)||t.includes(`queue`)?`/control/fleet`:`/control/daemon`}function Jr(e){let t=[],n=Date.now();for(let r of e.fleet?.nextActions??[])t.push({id:`next-action-${r.id}`,category:`action-required`,severity:r.priority,title:r.label,detail:r.detail,ts:new Date(n).toISOString(),actionHref:qr(r.id),actionLabel:`Inspect`});let r=e.fleet?.autonomousShipReadiness;r&&(r.verdict===`blocked`&&r.topBlocker?t.push({id:`readiness-blocked-${r.topBlocker.id}`,category:`readiness`,severity:r.topBlocker.severity,title:`Autonomous readiness is blocked`,detail:r.topBlocker.detail,ts:r.freshness.generatedAt,actionHref:`/control/fleet`,actionLabel:`Inspect fleet`}):r.verdict===`unknown`&&t.push({id:`readiness-unknown`,category:`readiness`,severity:`medium`,title:`Autonomous readiness is unknown`,detail:`Fresh, authoritative state is required before autonomous operation can be treated as clear.`,ts:r.freshness.generatedAt,actionHref:`/control/fleet`,actionLabel:`Inspect fleet`}));let i=e.control?.security;if(i?.available){if(i.counts.critical>0){let e=i.findings.find(e=>e.severity===`critical`);t.push({id:`security-critical`,category:`security`,severity:`critical`,title:`${i.counts.critical} critical security finding${i.counts.critical===1?``:`s`}`,detail:e?`${e.repo}: ${e.title}`:`See the security backlog for details.`,ts:new Date(n).toISOString(),actionHref:`/control/security`,actionLabel:`Review findings`})}else if(i.counts.high>0){let e=i.findings.find(e=>e.severity===`high`);t.push({id:`security-high`,category:`security`,severity:`high`,title:`${i.counts.high} high-severity security finding${i.counts.high===1?``:`s`}`,detail:e?`${e.repo}: ${e.title}`:`See the security backlog for details.`,ts:new Date(n).toISOString(),actionHref:`/control/security`,actionLabel:`Review findings`})}}for(let r of e.control?.limits??[])r.standing===`over`?t.push({id:`budget-over-${r.backend}-${r.window}`,category:`budget`,severity:`high`,title:`${r.backend} is over its ${r.window} limit`,detail:`${r.used.toLocaleString()} / ${r.max.toLocaleString()} used.`,ts:new Date(n).toISOString(),actionHref:`/control/daemon`,actionLabel:`Review usage`}):r.standing===`warn`&&t.push({id:`budget-warn-${r.backend}-${r.window}`,category:`budget`,severity:`medium`,title:`${r.backend} is approaching its ${r.window} limit`,detail:`${r.used.toLocaleString()} / ${r.max.toLocaleString()} used.`,ts:new Date(n).toISOString(),actionHref:`/control/daemon`,actionLabel:`Review usage`});let a=e.control?.daemon;if(a&&(a.sourceQuality.sourceState!==`healthy`||a.sourceQuality.complete===!1)){let e=a.sourceQuality.reason;t.push({id:`daemon-health-degraded`,category:`daemon-health`,severity:e===`missing`||e===`unavailable`?`high`:`medium`,title:`Daemon state cannot be confirmed`,detail:e?`Source: ${e}.`:`The daemon state source is degraded or incomplete.`,ts:new Date(n).toISOString(),actionHref:`/control/daemon`,actionLabel:`Inspect daemon`,sourceQuality:a.sourceQuality})}if(e.inbox&&e.inbox.pending>0){let r=e.inbox.proposals.reduce((e,t)=>{let n=new Date(t.createdAt).getTime();return e===null||n<e?n:e},null),i=r===null?0:n-r,a=i>Gr?`high`:`medium`;t.push({id:`proposal-backlog`,category:`proposal`,severity:a,title:`${e.inbox.pending} proposal${e.inbox.pending===1?``:`s`} awaiting review`,detail:i>Gr?`Oldest has been waiting ${Math.round(i/36e5)}h.`:`Approve, reject, or leave for autonomous handling per policy.`,ts:r===null?new Date(n).toISOString():new Date(r).toISOString(),actionHref:`/inbox`,actionLabel:`Open inbox`})}for(let r of e.runs??[]){if(r.status===`failed`||r.status===`aborted`){if(n-new Date(r.updatedAt).getTime()>Kr)continue;t.push({id:`run-failed-${r.id}`,category:`run`,severity:r.status===`failed`?`high`:`medium`,title:`Run ${r.status}: ${r.goal}`,detail:r.result??r.terminationReason??`Run ${r.id} ${r.status}.`,ts:r.updatedAt,actionHref:`/work/runs/${r.id}`,actionLabel:`Open run`});continue}if(r.status===`running`){let e=n-new Date(r.updatedAt).getTime();e>Wr&&t.push({id:`run-stalled-${r.id}`,category:`run`,severity:`medium`,title:`No update from a running run in ${Math.round(e/6e4)}m`,detail:r.goal,ts:r.updatedAt,actionHref:`/work/runs/${r.id}`,actionLabel:`Watch live`})}}return t}function Yr(e){let t={critical:0,high:1,medium:2,low:3,info:4};return[...e].sort((e,n)=>{let r=t[e.severity]-t[n.severity];return r===0?new Date(n.ts).getTime()-new Date(e.ts).getTime():r})}var Xr=`ashlr.notifications.mutedCategories.v1`,Zr=`ashlr.notifications.desktopEnabled.v1`;function Qr(){try{let e=localStorage.getItem(Xr);if(!e)return new Set;let t=JSON.parse(e);if(Array.isArray(t))return new Set(t)}catch{}return new Set}function $r(e){try{localStorage.setItem(Xr,JSON.stringify([...e]))}catch{}}function ei(){try{return localStorage.getItem(Zr)===`1`}catch{return!1}}function ti(){return typeof Notification>`u`?`unsupported`:Notification.permission}var ni=Qr(),ri=[],ii=!1,ai=ei(),oi=new Set,si={items:[],panelOpen:!1,mutedCategories:[...ni],desktopEnabled:ai,desktopPermission:ti()},ci=new Set;function li(){for(let e of ci)e()}function ui(){si={items:Yr(ri.filter(e=>!ni.has(e.category))),panelOpen:ii,mutedCategories:[...ni],desktopEnabled:ai,desktopPermission:ti()},li()}function di(e){return ci.add(e),()=>ci.delete(e)}function fi(){return si}function pi(e){let t=new Set(ri.map(e=>e.id));if(ri=e,ai&&ti()===`granted`){for(let n of e)if(!ni.has(n.category)&&(n.severity===`critical`||n.severity===`high`)&&!(t.has(n.id)||oi.has(n.id))){oi.add(n.id);try{new Notification(n.title,{body:n.detail,tag:n.id})}catch{}}}for(let t of e)oi.add(t.id);ui()}function mi(){ii=!0,ui()}function hi(){ii=!1,ui()}function gi(){ii=!ii,ui()}function _i(e){return ni.has(e)}function vi(e,t){t?ni.add(e):ni.delete(e),$r(ni),ui()}async function yi(){if(typeof Notification>`u`)return`unsupported`;let e=Notification.permission;e==="default"&&(e=await Notification.requestPermission()),ai=e===`granted`;try{localStorage.setItem(Zr,ai?`1`:`0`)}catch{}return ui(),e}function bi(){ai=!1;try{localStorage.setItem(Zr,`0`)}catch{}ui()}function xi(){return(0,M.useSyncExternalStore)(di,fi,fi)}var Si={bell:`_bell_c1uhc_1`,badge:`_badge_c1uhc_25`,badgeUrgent:`_badgeUrgent_c1uhc_41`};function Ci(){let{items:e}=xi(),t=e.filter(e=>e.severity===`critical`||e.severity===`high`).length,n=e.length,r=(0,M.useRef)(t),[i,a]=(0,M.useState)(``);return(0,M.useEffect)(()=>{if(t>r.current){let e=t-r.current;a(`${e} new urgent notification${e===1?``:`s`}, ${t} urgent total.`)}r.current=t},[t]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`button`,{type:`button`,className:Si.bell,onClick:gi,"aria-haspopup":`dialog`,"aria-label":n===0?`Notifications, none open`:`Notifications, ${n} open, ${t} urgent`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`🔔`}),n>0?(0,L.jsx)(`span`,{className:`${Si.badge} ${t>0?Si.badgeUrgent:``}`,"aria-hidden":`true`,children:n>99?`99+`:n}):null]}),(0,L.jsx)(`div`,{"aria-live":`polite`,className:`visually-hidden`,children:i})]})}function wi(e){switch(e){case`critical`:return`danger`;case`high`:return`warning`;case`medium`:return`running`;case`low`:return`neutral`;case`info`:return`info`}}var Ti={"action-required":`Action required`,readiness:`Autonomous readiness`,security:`Security`,budget:`Budget & limits`,"daemon-health":`Daemon health`,proposal:`Proposals`,run:`Runs`,"log-source":`Log source`},Ei={item:`_item_1gxz9_1`,top:`_top_1gxz9_15`,category:`_category_1gxz9_21`,time:`_time_1gxz9_26`,title:`_title_1gxz9_32`,detail:`_detail_1gxz9_39`,actions:`_actions_1gxz9_45`,actionLink:`_actionLink_1gxz9_52`,muteBtn:`_muteBtn_1gxz9_58`};function Di(e){let t=Math.max(0,Math.round((Date.now()-new Date(e).getTime())/1e3));if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.round(t/60);if(n<60)return`${n}m ago`;let r=Math.round(n/60);return r<48?`${r}h ago`:`${Math.round(r/24)}d ago`}function Oi({item:e}){let t=_i(e.category);return(0,L.jsxs)(`article`,{className:Ei.item,"data-focus-key":`notification-${e.id}`,children:[(0,L.jsxs)(`div`,{className:Ei.top,children:[(0,L.jsx)(E,{status:e.severity,tone:wi(e.severity),children:e.severity.toUpperCase()}),(0,L.jsx)(`span`,{className:Ei.category,children:Ti[e.category]}),(0,L.jsx)(`span`,{className:Ei.time,title:new Date(e.ts).toLocaleString(),children:Di(e.ts)})]}),(0,L.jsx)(`h3`,{className:Ei.title,children:e.title}),(0,L.jsx)(`p`,{className:Ei.detail,children:e.sourceQuality?(0,L.jsx)(T,{quality:e.sourceQuality,label:e.title,children:e.detail}):e.detail}),(0,L.jsxs)(`div`,{className:Ei.actions,children:[e.actionHref?(0,L.jsx)(`a`,{className:Ei.actionLink,href:`#${e.actionHref}`,"data-focus-key":`notification-${e.id}-action`,children:e.actionLabel??`Open`}):null,(0,L.jsx)(`button`,{type:`button`,className:Ei.muteBtn,onClick:()=>vi(e.category,!t),"aria-pressed":t,children:t?`Unmute ${Ti[e.category]}`:`Mute ${Ti[e.category]}`})]})]})}function ki(){let e=v(me),t=v(he),n=v(ve),r=v(ae),i=e.data,a=t.data,o=n.data,s=r.data;(0,M.useEffect)(()=>{pi(Jr({control:i,fleet:a,runs:o,inbox:s}))},[i,a,o,s])}var Ai={drawer:`_drawer_itt3q_1`,titleRow:`_titleRow_itt3q_16`,closeBtn:`_closeBtn_itt3q_23`,header:`_header_itt3q_37`,desktopToggle:`_desktopToggle_itt3q_42`,clear:`_clear_itt3q_57`,list:`_list_itt3q_66`,journalLink:`_journalLink_itt3q_77`};function ji(){ki();let{items:e,panelOpen:t,desktopEnabled:n,desktopPermission:r}=xi(),i=(0,M.useRef)(null);async function a(){n?bi():await yi()}return(0,L.jsxs)(S,{open:t,onClose:hi,titleId:`notification-center-title`,title:(0,L.jsxs)(`span`,{className:Ai.titleRow,children:[(0,L.jsx)(`span`,{children:`Notifications`}),(0,L.jsx)(`button`,{type:`button`,ref:i,className:Ai.closeBtn,onClick:hi,"aria-label":`Close notifications`,children:`×`})]}),widthClassName:Ai.drawer,initialFocusRef:i,children:[(0,L.jsx)(`div`,{className:Ai.header,children:(0,L.jsx)(`button`,{type:`button`,className:Ai.desktopToggle,onClick:()=>void a(),disabled:r===`unsupported`||r===`denied`,children:r===`unsupported`?`Desktop alerts not supported in this browser`:r===`denied`?`Desktop alerts blocked in browser settings`:n?`🔔 Desktop alerts on`:`🔕 Desktop alerts off — enable`})}),e.length===0?(0,L.jsxs)(`div`,{className:Ai.clear,children:[(0,L.jsx)(`strong`,{children:`Nothing needs you right now.`}),(0,L.jsx)(`span`,{children:`The fleet is operating within its observed authority.`})]}):(0,L.jsx)(`ul`,{className:Ai.list,children:e.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(Oi,{item:e})},e.id))}),(0,L.jsx)(`a`,{href:`#/journal`,className:Ai.journalLink,onClick:hi,children:`See full history in the Work Journal →`})]})}var Mi={topbar:`_topbar_nwlse_1`,paletteTrigger:`_paletteTrigger_nwlse_12`,kbd:`_kbd_nwlse_32`,actions:`_actions_nwlse_41`,lockedIndicator:`_lockedIndicator_nwlse_47`,lockBtn:`_lockBtn_nwlse_52`,themeBtn:`_themeBtn_nwlse_60`};function Ni({onOpenPalette:e}){let{theme:t,cycle:n}=p(),r=f();return(0,L.jsxs)(`header`,{className:Mi.topbar,children:[(0,L.jsxs)(`button`,{type:`button`,className:Mi.paletteTrigger,onClick:e,children:[(0,L.jsx)(`span`,{children:`Search or run a command`}),(0,L.jsx)(`kbd`,{className:Mi.kbd,children:`⌘K`})]}),(0,L.jsxs)(`div`,{className:Mi.actions,children:[(0,L.jsx)(Ci,{}),r.hasHold?(0,L.jsx)(`button`,{type:`button`,className:Mi.lockBtn,onClick:r.clear,title:`Lock actions now`,children:`🔓 Unlocked`}):(0,L.jsx)(`span`,{className:Mi.lockedIndicator,title:`Actions require the dispatch token`,children:`🔒 Locked`}),(0,L.jsx)(`button`,{type:`button`,className:Mi.themeBtn,onClick:n,"aria-label":`Theme: ${t}`,children:t===`system`?`🖥️`:t===`light`?`☀️`:`🌙`})]}),(0,L.jsx)(ji,{})]})}var Pi=t(n(),1),Fi=Vr.map(e=>({id:`nav:${e.path}`,title:e.label,subtitle:e.description,group:`Navigate`,run:t=>t(e.path)})),Ii=[{id:`action:pause-fleet`,title:`Pause fleet`,subtitle:`Engage the fleet kill switch`,group:`Actions`,keywords:[`stop`,`kill`,`halt`],requiresConfirm:{title:`Pause the fleet?`,body:`This engages the global kill switch. Autonomous dispatch halts fleet-wide until explicitly resumed.`,confirmLabel:`Yes, pause`},requiresMutationToken:!0,run:async()=>{await xe()}},{id:`action:resume-fleet`,title:`Resume fleet`,subtitle:`Clear the fleet kill switch`,group:`Actions`,keywords:[`start`,`unpause`],requiresConfirm:{title:`Resume the fleet?`,body:`This clears the global kill switch. Autonomous dispatch will resume across the fleet.`,confirmLabel:`Yes, resume`},requiresMutationToken:!0,run:async()=>{await be()}},{id:`action:open-notifications`,title:`Open notification centre`,subtitle:`What needs you right now, ranked by severity`,group:`Actions`,keywords:[`alerts`,`attention`,`bell`,`needs you`],run:()=>{mi()}},{id:`action:toggle-theme`,title:`Toggle theme`,subtitle:`Cycle system → light → dark`,group:`Actions`,keywords:[`dark mode`,`light mode`,`appearance`,`dark`,`light`],run:()=>{u()}},{id:`action:open-journal-today`,title:`Open journal — today`,subtitle:`Work journal filtered to today`,group:`Actions`,keywords:[`journal`,`today`,`log`,`history`],run:e=>{e(`/journal`,{state:{windowToday:!0}})}}],Li=[...Fi,...Ii];function Ri(){o(ve.key,ve.fetch),o(k.key,k.fetch);let e=_e({status:`all`,limit:500});o(e.key,e.fetch)}var zi=5,Bi=2;function Vi(e,t){return e.toLowerCase().includes(t)}function Hi(e){let t=e.trim().toLowerCase();if(t.length<Bi)return[];let n=[],r=c(ve.key).data??[];for(let e of r){if(n.length>=zi)break;(Vi(e.id,t)||Vi(e.goal,t))&&n.push({id:`jump:run:${e.id}`,title:e.goal,subtitle:`Run ${e.id} · ${e.status}`,group:`Jump to`,run:t=>t(`/work/runs/${e.id}`)})}let i=c(k.key).data??[],a=0;for(let e of i){if(a>=zi)break;(Vi(e.id,t)||Vi(e.objective,t))&&(a++,n.push({id:`jump:goal:${e.id}`,title:e.objective,subtitle:`Goal ${e.id} · ${e.status}`,group:`Jump to`,run:e=>e(`/goals`)}))}let o=_e({status:`all`,limit:500}).key,s=c(o).data?.proposals??[],l=0;for(let e of s){if(l>=zi)break;(Vi(e.id,t)||Vi(e.title,t))&&(l++,n.push({id:`jump:proposal:${e.id}`,title:e.title,subtitle:`Proposal ${e.id} · ${e.status}`,group:`Jump to`,run:t=>t(`/inbox/${encodeURIComponent(e.id)}`)}))}return n}var Ui=/^\/inbox\/([^/]+)$/;function Wi(e){let t=Ui.exec(e);if(!t)return[];let n=decodeURIComponent(t[1]),r=c(`proposal-detail-${n}`).data;return!r||r.status!==`pending`?[]:[{id:`action:approve-proposal:${n}`,title:`Approve "${r.title}"`,subtitle:`Writes the diff to disk and dispatches it`,group:`Actions`,keywords:[`approve`,`ship`,`proposal`],requiresConfirm:{title:`Approve this proposal?`,body:`"${r.title}" will be applied. This writes the diff to disk and dispatches it.`,confirmLabel:`Approve`},requiresMutationToken:!0,run:async()=>{await Ce(n)}},{id:`action:reject-proposal:${n}`,title:`Reject "${r.title}"`,subtitle:`Cannot be undone`,group:`Actions`,keywords:[`reject`,`decline`,`proposal`],requiresConfirm:{title:`Reject this proposal?`,body:`"${r.title}" will be rejected. This cannot be undone.`,confirmLabel:`Reject`,destructive:!0},requiresMutationToken:!0,run:async()=>{await Se(n)}}]}function Gi(e,t=[]){let n=e.trim().toLowerCase(),r=[...t,...Li];return[...n?r.filter(e=>{let t=[e.title,e.subtitle??``,...e.keywords??[]].join(` `).toLowerCase();return n.split(/\s+/).every(e=>t.includes(e))}):r,...Hi(e)]}var Ki={backdrop:`_backdrop_1odjm_1`,panel:`_panel_1odjm_12`,input:`_input_1odjm_24`,list:`_list_1odjm_37`,item:`_item_1odjm_42`,active:`_active_1odjm_51`,itemTitle:`_itemTitle_1odjm_55`,itemSubtitle:`_itemSubtitle_1odjm_61`,itemGroup:`_itemGroup_1odjm_67`,empty:`_empty_1odjm_75`};function qi(e){(0,M.useEffect)(()=>{function t(t){(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`k`&&(t.preventDefault(),e(!0))}return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e])}function Ji({open:e,onClose:t}){let[n,r]=(0,M.useState)(``),[i,a]=(0,M.useState)(0),[o,c]=(0,M.useState)(null),[l,u]=(0,M.useState)(!1),[d,f]=(0,M.useState)(!1),p=(0,M.useRef)(null),m=(0,M.useId)(),h=hn(),g=F(),_=De(),v=(0,M.useMemo)(()=>e?Wi(g.pathname):[],[e,g.pathname]),y=(0,M.useMemo)(()=>Gi(n,v),[n,v]);(0,M.useEffect)(()=>{if(!e)return;let t=document.activeElement;r(``),a(0),Ri();let n=requestAnimationFrame(()=>p.current?.focus());return()=>{cancelAnimationFrame(n),t?.focus()}},[e]),(0,M.useEffect)(()=>{a(0)},[n]),(0,M.useEffect)(()=>{a(e=>Math.min(e,Math.max(y.length-1,0)))},[y.length]);async function b(e){try{await e.run((e,t)=>h(e,t))}catch(e){_.show(e instanceof Error?e.message:`Command failed.`,`danger`)}finally{c(null)}}function x(e){if(t(),e.requiresConfirm){c(e),u(!0);return}if(e.requiresMutationToken&&!s()){c(e),f(!0);return}b(e)}function S(){u(!1),o&&(o.requiresMutationToken&&!s()?f(!0):b(o))}function C(){u(!1),c(null)}function w(e){if(e.key===`Escape`){t();return}if(e.key===`Tab`){e.preventDefault();return}if(e.key===`ArrowDown`)e.preventDefault(),a(e=>Math.min(e+1,y.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),a(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=y[i];t&&x(t)}}return(0,L.jsxs)(L.Fragment,{children:[e?(0,Pi.createPortal)((0,L.jsx)(`div`,{className:Ki.backdrop,onMouseDown:e=>e.target===e.currentTarget&&t(),children:(0,L.jsxs)(`div`,{className:Ki.panel,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,L.jsx)(`input`,{ref:p,className:Ki.input,value:n,onChange:e=>r(e.target.value),onKeyDown:w,placeholder:`Navigate or run a command…`,role:`combobox`,"aria-expanded":`true`,"aria-controls":m,"aria-activedescendant":y[i]?`cmd-${y[i].id}`:void 0,autoComplete:`off`}),(0,L.jsx)(`ul`,{id:m,role:`listbox`,className:Ki.list,children:y.length===0?(0,L.jsx)(`li`,{className:Ki.empty,children:`No matching commands.`}):y.map((e,t)=>(0,L.jsxs)(`li`,{id:`cmd-${e.id}`,role:`option`,"aria-selected":t===i,className:`${Ki.item} ${t===i?Ki.active:``}`,onMouseEnter:()=>a(t),onMouseDown:t=>{t.preventDefault(),x(e)},children:[(0,L.jsx)(`span`,{className:Ki.itemTitle,children:e.title}),e.subtitle?(0,L.jsx)(`span`,{className:Ki.itemSubtitle,children:e.subtitle}):null,(0,L.jsx)(`span`,{className:Ki.itemGroup,children:e.group})]},e.id))})]})}),document.body):null,o?.requiresConfirm?(0,L.jsx)(Te,{open:l,onClose:C,title:o.requiresConfirm.title,body:o.requiresConfirm.body,confirmLabel:o.requiresConfirm.confirmLabel,destructive:o.requiresConfirm.destructive,onConfirm:S}):null,(0,L.jsx)(we,{open:d,onClose:()=>{f(!1),c(null)},onUnlocked:()=>{let e=o;f(!1),c(null),e&&b(e)},reason:o?`"${o.title}" requires the dispatch token.`:void 0})]})}var Yi={shell:`_shell_2db09_1`,body:`_body_2db09_9`,main:`_main_2db09_17`};function Xi(){let e=(0,M.useRef)(null),t=F(),[n,r]=(0,M.useState)(!1);return ke(t.pathname,e),qi(r),(0,L.jsxs)(`div`,{className:Yi.shell,children:[(0,L.jsx)(Ur,{}),(0,L.jsxs)(`div`,{className:Yi.body,children:[(0,L.jsx)(Ni,{onOpenPalette:()=>r(!0)}),(0,L.jsx)(`main`,{ref:e,className:Yi.main,id:`main-content`,tabIndex:-1,children:(0,L.jsx)(Oe,{resetKey:t.pathname,children:(0,L.jsx)(Hn,{})})})]}),(0,L.jsx)(Ji,{open:n,onClose:()=>r(!1)})]})}var Zi={wrap:`_wrap_152mr_1`,title:`_title_152mr_6`,description:`_description_152mr_13`,note:`_note_152mr_19`};function Qi({title:e,description:t}){return(0,L.jsxs)(`div`,{className:Zi.wrap,children:[(0,L.jsx)(`h1`,{className:Zi.title,children:e}),(0,L.jsx)(`p`,{className:Zi.description,children:t}),(0,L.jsx)(`p`,{className:Zi.note,children:`Not built yet — this route, its nav entry, and its ⌘K command all already work.`})]})}var $i={grid:`_grid_1exd8_1`,stat:`_stat_1exd8_7`,statLabel:`_statLabel_1exd8_17`,statValue:`_statValue_1exd8_24`,statCaption:`_statCaption_1exd8_30`};function ea(){return(0,L.jsx)(y,{count:6})}function ta({label:e,value:t,caption:n}){return(0,L.jsxs)(`div`,{className:$i.stat,children:[(0,L.jsx)(`span`,{className:$i.statLabel,children:e}),(0,L.jsx)(`span`,{className:$i.statValue,children:t}),n?(0,L.jsx)(`span`,{className:$i.statCaption,children:n}):null]})}function na({snapshot:e}){let t=e.mcp.filter(e=>e.ok).length;return(0,L.jsxs)(`div`,{className:$i.grid,children:[(0,L.jsx)(ta,{label:`Repos`,value:String(e.repos.total),caption:`${e.repos.dirty} dirty · ${e.repos.stale} stale`}),(0,L.jsx)(ta,{label:`Tools`,value:`${e.tools.installed}/${e.tools.total}`,caption:`installed`}),(0,L.jsx)(ta,{label:`Activity`,value:String(e.activity.sessions),caption:`${e.activity.tokens.toLocaleString()} tok · $${e.activity.estCostUsd.toFixed(2)}`}),(0,L.jsx)(ta,{label:`MCP`,value:`${t}/${e.mcp.length}`,caption:`reachable`}),(0,L.jsx)(ta,{label:`Genome`,value:String(e.genome.entries),caption:`${e.genome.projects} projects`}),(0,L.jsx)(ta,{label:`Inbox`,value:String(e.inbox.pending),caption:`pending`})]})}var R={panel:`_panel_1gx0q_3`,panelHeader:`_panelHeader_1gx0q_10`,panelTitle:`_panelTitle_1gx0q_25`,panelBody:`_panelBody_1gx0q_33`,emptyState:`_emptyState_1gx0q_37`},ra={table:`_table_78j3m_1`,statusCol:`_statusCol_78j3m_27`,tokensCol:`_tokensCol_78j3m_31`,goalLink:`_goalLink_78j3m_35`,tokens:`_tokens_78j3m_31`};function ia(){return(0,L.jsxs)(`details`,{className:R.panel,open:!0,"data-state-key":`fleet-dashboard-runs`,children:[(0,L.jsx)(`summary`,{className:R.panelHeader,children:(0,L.jsx)(`span`,{className:R.panelTitle,children:`Recent runs`})}),(0,L.jsxs)(`div`,{className:R.panelBody,children:[(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{})]})]})}function aa({runs:e}){return(0,L.jsxs)(`details`,{className:R.panel,open:!0,"data-state-key":`fleet-dashboard-runs`,children:[(0,L.jsxs)(`summary`,{className:R.panelHeader,children:[(0,L.jsx)(`span`,{className:R.panelTitle,children:`Recent runs`}),(0,L.jsx)(`span`,{className:`text-tertiary text-xs`,children:e.length})]}),(0,L.jsx)(`div`,{className:R.panelBody,children:e.length===0?(0,L.jsx)(`p`,{className:R.emptyState,children:`No runs yet.`}):(0,L.jsxs)(`table`,{className:ra.table,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Goal`}),(0,L.jsx)(`th`,{scope:`col`,className:ra.statusCol,children:`Status`}),(0,L.jsx)(`th`,{scope:`col`,className:ra.tokensCol,children:`Tokens`})]})}),(0,L.jsx)(`tbody`,{children:e.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{children:(0,L.jsx)(`a`,{href:`#/work/runs/${e.id}`,"data-focus-key":`run-${e.id}`,className:ra.goalLink,title:e.goal,children:e.goal})}),(0,L.jsx)(`td`,{children:(0,L.jsx)(E,{status:e.status})}),(0,L.jsx)(`td`,{className:ra.tokens,children:e.tokens.toLocaleString()})]},e.id))})]})})]})}var oa={list:`_list_1fq6m_1`,item:`_item_1fq6m_7`,itemHeader:`_itemHeader_1fq6m_13`,goal:`_goal_1fq6m_21`,burndown:`_burndown_1fq6m_42`,burndownTrack:`_burndownTrack_1fq6m_48`,burndownFill:`_burndownFill_1fq6m_56`,burndownLabel:`_burndownLabel_1fq6m_63`};function sa({swarms:e}){return(0,L.jsxs)(`details`,{className:R.panel,open:!0,"data-state-key":`fleet-dashboard-swarms`,children:[(0,L.jsxs)(`summary`,{className:R.panelHeader,children:[(0,L.jsx)(`span`,{className:R.panelTitle,children:`Swarms`}),(0,L.jsx)(`span`,{className:`text-tertiary text-xs`,children:e.length})]}),(0,L.jsx)(`div`,{className:R.panelBody,children:e.length===0?(0,L.jsx)(`p`,{className:R.emptyState,children:`No active swarms.`}):(0,L.jsx)(`ul`,{className:oa.list,children:e.map((e,t)=>{let n=e.tasksTotal>0?Math.round(e.tasksDone/e.tasksTotal*100):0;return(0,L.jsxs)(`li`,{className:oa.item,children:[(0,L.jsxs)(`a`,{href:`#/work/swarms/${e.id}`,"data-focus-key":`swarm-${e.id}`,className:oa.itemHeader,title:e.goal,children:[e.phase?(0,L.jsx)(D,{index:t}):null,(0,L.jsx)(`span`,{className:oa.goal,children:e.goal}),(0,L.jsx)(E,{status:e.status})]}),(0,L.jsxs)(`div`,{className:oa.burndown,children:[(0,L.jsx)(`div`,{className:oa.burndownTrack,children:(0,L.jsx)(`div`,{className:oa.burndownFill,style:{width:`${n}%`}})}),(0,L.jsxs)(`span`,{className:oa.burndownLabel,children:[e.tasksDone,`/`,e.tasksTotal,e.phase?` · ${e.phase}`:``]})]})]},e.id)})})})]})}var ca={grid:`_grid_qy4m7_1`};function la(){return(0,L.jsxs)(`details`,{className:R.panel,open:!0,"data-state-key":`fleet-dashboard-daemon`,children:[(0,L.jsx)(`summary`,{className:R.panelHeader,children:(0,L.jsx)(`span`,{className:R.panelTitle,children:`Daemon`})}),(0,L.jsx)(`div`,{className:R.panelBody,children:(0,L.jsx)(m,{width:`40%`})})]})}function ua({daemon:e}){return(0,L.jsxs)(`details`,{className:R.panel,open:!0,"data-state-key":`fleet-dashboard-daemon`,children:[(0,L.jsxs)(`summary`,{className:R.panelHeader,children:[(0,L.jsx)(`span`,{className:R.panelTitle,children:`Daemon`}),(0,L.jsx)(T,{quality:e.sourceQuality,label:`daemon state`,children:(0,L.jsx)(E,{status:e.running?`running`:`pending`,children:e.running?`running`:`stopped`})})]}),(0,L.jsx)(`div`,{className:R.panelBody,children:(0,L.jsxs)(`dl`,{className:ca.grid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Runtime state`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:e.sourceQuality,label:`runtime state`,children:e.runtimeState})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`PID`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:e.sourceQuality,label:`pid`,children:e.pid??`—`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Today's spend`}),(0,L.jsx)(`dd`,{children:(0,L.jsxs)(T,{quality:e.sourceQuality,label:`spend`,children:[`$`,e.todaySpentUsd.toFixed(2)]})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Direction mode`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:e.sourceQuality,label:`direction mode`,children:e.activeDirectionMode??`none`})})]})]})})]})}var da={view:`_view_1nttk_1`,header:`_header_1nttk_8`,title:`_title_1nttk_14`,freshness:`_freshness_1nttk_20`,freshnessLabel:`_freshnessLabel_1nttk_26`,panels:`_panels_1nttk_32`,error:`_error_1nttk_39`};function fa(){let e=v(O),t=v(me);return(0,L.jsxs)(`div`,{className:da.view,children:[(0,L.jsxs)(`header`,{className:da.header,children:[(0,L.jsx)(`h1`,{className:da.title,children:`Fleet Dashboard`}),(0,L.jsxs)(`div`,{className:da.freshness,"aria-live":`polite`,children:[e.status===`refreshing`?(0,L.jsx)(A,{}):null,e.updatedAt?(0,L.jsxs)(`span`,{className:da.freshnessLabel,children:[`Updated `,ma(e.updatedAt)]}):null]})]}),e.status===`loading`?(0,L.jsx)(ea,{}):e.status===`error`?(0,L.jsx)(pa,{message:e.error?.message??`Failed to load snapshot.`}):e.data?(0,L.jsx)(na,{snapshot:e.data}):null,(0,L.jsxs)(`div`,{className:da.panels,children:[e.status===`loading`?(0,L.jsx)(ia,{}):e.data?(0,L.jsx)(aa,{runs:e.data.runs}):null,e.data?(0,L.jsx)(sa,{swarms:e.data.swarms}):null,t.status===`loading`?(0,L.jsx)(la,{}):t.status===`error`?(0,L.jsx)(pa,{message:t.error?.message??`Failed to load control snapshot.`}):t.data?(0,L.jsx)(ua,{daemon:t.data.daemon}):null]})]})}function pa({message:e}){return(0,L.jsx)(`div`,{className:da.error,role:`alert`,children:e})}function ma(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}var ha={status:`connecting`,chunks:[],outputChunks:[],starts:[],stall:null,runDone:null,version:0};function ga(e){let t=e;try{return JSON.parse(t.data)}catch{return null}}function _a(e,t){let[n,r]=(0,M.useState)(ha);return(0,M.useEffect)(()=>{if(!t){r(ha);return}if(r(ha),typeof EventSource>`u`){r(e=>({...e,status:`unavailable`}));return}let n=`/api/run/${encodeURIComponent(e)}/events?client=${encodeURIComponent(a())}`,i=new EventSource(n,{withCredentials:!0});return i.onopen=()=>{r(e=>e.status===`unavailable`?e:{...e,status:`open`})},i.onerror=()=>{r(e=>e.status===`open`?e:{...e,status:`unavailable`})},i.addEventListener(`step-started`,e=>{let t=ga(e);t&&r(e=>({...e,starts:[...e.starts,t],version:e.version+1}))}),i.addEventListener(`step-output-chunk`,e=>{let t=ga(e);t&&r(e=>({...e,chunks:[...e.chunks,t],version:e.version+1}))}),i.addEventListener(`step-done`,()=>{r(e=>({...e,stall:null,version:e.version+1}))}),i.addEventListener(`output-chunk`,e=>{let t=ga(e);t&&r(e=>({...e,outputChunks:[...e.outputChunks,t],version:e.version+1}))}),i.addEventListener(`stall`,e=>{let t=ga(e);t&&r(e=>({...e,stall:{ageMs:t.ageMs,at:Date.now()},version:e.version+1}))}),i.addEventListener(`run-done`,e=>{let t=ga(e);r(e=>({...e,runDone:t??{status:`done`,result:null,terminationReason:null},stall:null,version:e.version+1}))}),()=>{i.close()}},[e,t]),n}var va=2e3,ya=va*4;function ba(e){return e?`${e.status}:${e.steps.length}:${e.updatedAt}`:null}function xa(e){let t=(0,M.useMemo)(()=>ne(e),[e]),n=v(t),r=g(t),[i,a]=(0,M.useState)(null),[o,s]=(0,M.useState)(null),[,c]=(0,M.useState)(0),l=n.data?n.data.status!==`running`:!1,u=n.error instanceof _&&n.error.status===404,d=_a(e,!l&&!u),f=d.status===`open`?`sse`:`polling`,p=ba(n.data);(0,M.useEffect)(()=>{p!==null&&a(Date.now())},[p]),(0,M.useEffect)(()=>{if(l||u||f===`sse`)return;let e=setInterval(()=>{r(),s(Date.now()),c(e=>e+1)},va);return()=>clearInterval(e)},[r,l,u,f]),(0,M.useEffect)(()=>{f===`sse`&&d.version!==0&&(r(),s(Date.now()))},[d.version,f,r]);let m=va*6,h=f===`sse`&&d.stall!==null&&Date.now()-d.stall.at<m,y;return y=u?`not-found`:n.status===`error`&&n.data===void 0?`error`:n.status===`loading`?`connecting`:n.data?n.data.status===`running`?f===`sse`?h?`stalled`:`live`:i!==null&&Date.now()-i>ya?`stalled`:`live`:`done`:`connecting`,{phase:y,run:n.data,error:n.error,lastChangedAt:i,lastPolledAt:o,pollNow:()=>{r(),s(Date.now())},transport:f,chunks:d.chunks,outputChunks:d.outputChunks,stallAgeMs:h?d.stall.ageMs:null}}var z={panel:`_panel_z6jlr_1`,header:`_header_z6jlr_12`,headerTop:`_headerTop_z6jlr_18`,title:`_title_z6jlr_25`,statRow:`_statRow_z6jlr_35`,banner:`_banner_z6jlr_53`,bannerWarning:`_bannerWarning_z6jlr_64`,bannerDanger:`_bannerDanger_z6jlr_69`,bannerDot:`_bannerDot_z6jlr_74`,livePulse:`_livePulse_z6jlr_1`,transcriptWrap:`_transcriptWrap_z6jlr_102`,transcript:`_transcript_z6jlr_102`,followButton:`_followButton_z6jlr_122`,empty:`_empty_z6jlr_151`,step:`_step_z6jlr_158`,stepKind:`_stepKind_z6jlr_171`,stepTime:`_stepTime_z6jlr_191`,stepTask:`_stepTask_z6jlr_195`,stepSummary:`_stepSummary_z6jlr_202`,stepUsage:`_stepUsage_z6jlr_207`},Sa={plan:`Plan`,model:`Model`,tool:`Tool`,synthesize:`Synthesize`};function Ca(e,t){let n=new Date(e).getTime(),r=t?new Date(t).getTime():Date.now(),i=Math.max(0,Math.round((r-n)/1e3));return i<60?`${i}s`:`${Math.floor(i/60)}m ${i%60}s`}function wa(e){try{return new Date(e).toLocaleTimeString(void 0,{hour12:!1})}catch{return e}}function Ta({phase:e,lastChangedAt:t,stallAgeMs:n,transport:r,error:i}){if(e===`connecting`)return(0,L.jsxs)(`div`,{className:z.banner,role:`status`,children:[(0,L.jsx)(`span`,{className:z.bannerDot,"data-tone":`connecting`,"aria-hidden":`true`}),`Connecting to run…`]});if(e===`not-found`)return(0,L.jsxs)(`div`,{className:`${z.banner} ${z.bannerDanger}`,role:`alert`,children:[(0,L.jsx)(`span`,{className:z.bannerDot,"data-tone":`danger`,"aria-hidden":`true`}),`Run not found. It may have been pruned from disk since this link was opened.`]});if(e===`error`)return(0,L.jsxs)(`div`,{className:`${z.banner} ${z.bannerDanger}`,role:`alert`,children:[(0,L.jsx)(`span`,{className:z.bannerDot,"data-tone":`danger`,"aria-hidden":`true`}),`Stream disconnected`,i?`: ${i.message}`:``,`. Retrying every `,va/1e3,`s…`]});if(e===`stalled`){let e=n===null?t===null?null:Math.round((Date.now()-t)/1e3):Math.round(n/1e3);return(0,L.jsxs)(`div`,{className:`${z.banner} ${z.bannerWarning}`,role:`status`,"aria-live":`polite`,children:[(0,L.jsx)(`span`,{className:z.bannerDot,"data-tone":`warning`,"aria-hidden":`true`}),`No change observed`,e===null?``:` in ${e}s`,` — this run may be stalled, or is simply quiet between steps. Still `,r===`sse`?`watching`:`polling`,`.`]})}return e===`live`?(0,L.jsxs)(`div`,{className:z.banner,role:`status`,children:[(0,L.jsx)(`span`,{className:z.bannerDot,"data-tone":`live`,"aria-hidden":`true`}),r===`sse`?`Live · streaming (server tail ~500ms)`:`Live · polling every ${va/1e3}s (server refresh floor ~1.5s — this cannot be faster than that)`]}):(0,L.jsxs)(`div`,{className:z.banner,role:`status`,children:[(0,L.jsx)(`span`,{className:z.bannerDot,"data-tone":`done`,"aria-hidden":`true`}),`Run finished — no longer `,r===`sse`?`streaming`:`polling`,`.`]})}function Ea(){return(0,L.jsxs)(`div`,{className:z.panel,children:[(0,L.jsx)(m,{width:`40%`}),(0,L.jsx)(m,{width:`90%`}),(0,L.jsx)(m,{width:`70%`})]})}function Da({runId:e}){let{phase:t,run:n,error:r,lastChangedAt:i,transport:a,stallAgeMs:o,outputChunks:s}=xa(e),c=(0,M.useRef)(null),l=(0,M.useRef)(!0),[u,d]=(0,M.useState)(!0),f=(0,M.useRef)(null),p=(0,M.useRef)(!0),[m,h]=(0,M.useState)(!0);(0,M.useEffect)(()=>{let e=c.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[n?.steps.length]),(0,M.useEffect)(()=>{let e=f.current;e&&p.current&&(e.scrollTop=e.scrollHeight)},[s.length]);function g(){let e=c.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<48;l.current=t,d(t)}function _(){let e=f.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<48;p.current=t,h(t)}function v(){l.current=!0,d(!0);let e=c.current;e&&(e.scrollTop=e.scrollHeight)}function y(){p.current=!0,h(!0);let e=f.current;e&&(e.scrollTop=e.scrollHeight)}return!n&&t===`connecting`?(0,L.jsx)(Ea,{}):(0,L.jsxs)(`div`,{className:z.panel,children:[(0,L.jsxs)(`header`,{className:z.header,children:[(0,L.jsxs)(`div`,{className:z.headerTop,children:[(0,L.jsx)(`h3`,{className:z.title,children:n?.goal??`Run ${e}`}),n?(0,L.jsx)(E,{status:n.status}):null]}),n?(0,L.jsxs)(`dl`,{className:z.statRow,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Elapsed`}),(0,L.jsx)(`dd`,{children:Ca(n.createdAt,n.status===`running`?void 0:n.updatedAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Tokens`}),(0,L.jsxs)(`dd`,{children:[n.usage.tokensIn.toLocaleString(),` in / `,n.usage.tokensOut.toLocaleString(),` out`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Cost`}),(0,L.jsxs)(`dd`,{children:[`$`,n.usage.estCostUsd.toFixed(3)]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Steps`}),(0,L.jsx)(`dd`,{children:n.steps.length})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Tasks`}),(0,L.jsxs)(`dd`,{children:[n.tasks.filter(e=>e.status===`done`).length,`/`,n.tasks.length]})]})]}):null]}),(0,L.jsx)(Ta,{phase:t,lastChangedAt:i,stallAgeMs:o,transport:a,error:r}),s.length>0?(0,L.jsxs)(`div`,{className:z.transcriptWrap,children:[(0,L.jsx)(`div`,{ref:f,className:z.transcript,onScroll:_,tabIndex:0,role:`log`,"aria-label":`Live engine output`,"aria-live":m?`polite`:`off`,children:s.map((e,t)=>(0,L.jsxs)(`div`,{className:z.step,"data-focus-key":`run-output-chunk-${t}`,children:[(0,L.jsx)(`span`,{className:z.stepKind,"data-kind":e.kind,children:e.kind}),(0,L.jsx)(`span`,{className:z.stepTime,title:e.ts,children:wa(e.ts)}),(0,L.jsx)(`span`,{className:z.stepTask,children:e.taskId??``}),(0,L.jsx)(`span`,{className:z.stepSummary,children:e.text})]},`${e.ts}-${t}`))}),m?null:(0,L.jsx)(`button`,{type:`button`,className:z.followButton,onClick:y,children:`↓ Follow`})]}):null,(0,L.jsxs)(`div`,{className:z.transcriptWrap,children:[(0,L.jsx)(`div`,{ref:c,className:z.transcript,onScroll:g,tabIndex:0,role:`log`,"aria-label":`Run step transcript`,"aria-live":u?`polite`:`off`,children:!n||n.steps.length===0?(0,L.jsx)(`p`,{className:z.empty,children:`No steps recorded yet.`}):n.steps.map((e,t)=>(0,L.jsxs)(`div`,{className:z.step,"data-focus-key":`run-stream-step-${t}`,children:[(0,L.jsx)(`span`,{className:z.stepKind,"data-kind":e.kind,children:Sa[e.kind]??e.kind}),(0,L.jsx)(`span`,{className:z.stepTime,title:e.ts,children:wa(e.ts)}),(0,L.jsx)(`span`,{className:z.stepTask,children:e.taskId}),(0,L.jsx)(`span`,{className:z.stepSummary,children:e.summary}),e.usage?(0,L.jsxs)(`span`,{className:z.stepUsage,children:[(e.usage.tokensIn+e.usage.tokensOut).toLocaleString(),` tok`]}):null]},`${e.ts}-${t}`))}),u?null:(0,L.jsx)(`button`,{type:`button`,className:z.followButton,onClick:v,children:`↓ Follow`})]})]})}var Oa={strip:`_strip_21e8x_1`,label:`_label_21e8x_11`,list:`_list_21e8x_20`,watchBtn:`_watchBtn_21e8x_29`,pulse:`_pulse_21e8x_46`,dialogWidth:`_dialogWidth_21e8x_70`};function ka(){let e=v(O),[t,n]=(0,M.useState)(null),r=(e.data?.runs??[]).filter(e=>e.status===`running`);return r.length===0?null:(0,L.jsxs)(`div`,{className:Oa.strip,children:[(0,L.jsx)(`span`,{className:Oa.label,children:`Live now`}),(0,L.jsx)(`ul`,{className:Oa.list,"aria-live":`polite`,"aria-label":`Currently running`,children:r.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{type:`button`,className:Oa.watchBtn,onClick:()=>n(e.id),children:[(0,L.jsx)(`span`,{className:Oa.pulse,"aria-hidden":`true`}),e.goal]})},e.id))}),(0,L.jsx)(S,{open:t!==null,onClose:()=>n(null),titleId:`live-now-title`,title:`Watching live`,widthClassName:Oa.dialogWidth,children:t?(0,L.jsx)(Da,{runId:t}):null})]})}function Aa(e){switch(e){case`merge`:return`merged`;case`dispatch`:return`running`;case`tick`:return`info`;default:return`pending`}}function ja(e){let t=[];for(let[n,r]of(e.logs?.entries??[]).entries())t.push({id:`log-${r.ts}-${n}`,ts:r.ts,source:`daemon-tick`,title:r.kind===`merge`?`Daemon merge`:r.kind===`dispatch`?`Daemon dispatch`:`Daemon tick`,detail:r.msg+(r.dryRun?` (dry run)`:``),statusLabel:Aa(r.kind),sourceQuality:e.logs?.sourceQuality});for(let[n,r]of(e.fleetActivity?.recentTicks??[]).entries())t.push({id:`fleet-tick-${r.ts}-${n}`,ts:r.ts,source:`daemon-tick`,title:`Fleet tick`,detail:[r.reason,r.directionReason].filter(Boolean).join(` — `)||`${r.merged} merged, $${r.spentUsd.toFixed(2)} spent`,statusLabel:r.dryRun?`pending`:`info`,sourceQuality:e.fleetActivity?.recentTicksSourceQuality});for(let[n,r]of(e.fleetActivity?.recentMerges??[]).entries())t.push({id:`merge-${r.ts}-${n}`,ts:r.ts,source:`merge`,title:`Merged in ${r.repo??`unknown repo`}`,detail:`${r.engine??`unknown engine`}${r.proposalId?` · proposal ${r.proposalId}`:``}`,repo:r.repo??void 0,statusLabel:`merged`,sourceQuality:e.fleetActivity?.recentMergesSourceQuality,drillIn:r.proposalId?{proposalId:r.proposalId}:void 0});for(let[n,r]of(e.fleetActivity?.recentActions??[]).entries())t.push({id:`action-${r.ts}-${n}`,ts:r.ts,source:`agent-action`,title:r.proseDigest??r.summary??r.action,detail:r.summary,repo:r.repo,statusLabel:r.outcome,sourceQuality:e.fleetActivity?.recentActionsSource,drillIn:r.proposalId?{proposalId:r.proposalId}:r.runId?{runId:r.runId}:void 0});for(let n of e.runs??[])t.push({id:`run-${n.id}`,ts:n.updatedAt,source:`run`,title:n.goal,detail:n.result??n.terminationReason??`${n.steps.length} step(s), ${n.tasks.length} task(s)`,statusLabel:n.status,drillIn:{runId:n.id}});for(let n of e.inbox?.proposals??[])t.push({id:`proposal-pending-${n.id}`,ts:n.createdAt,source:`proposal`,title:n.title,detail:`${n.kind} · ${n.origin}`,repo:n.repo,statusLabel:`pending`,drillIn:{proposalId:n.id}});return t.sort((e,t)=>new Date(t.ts).getTime()-new Date(e.ts).getTime()),t}function Ma(e=new Date){let t=new Date(e.getFullYear(),e.getMonth(),e.getDate());return e.getTime()-t.getTime()}function Na(e,t){let n=Date.now(),r=t.query.trim().toLowerCase();return e.filter(e=>!(!t.sources.has(e.source)||t.windowMs!==null&&n-new Date(e.ts).getTime()>t.windowMs||r&&!`${e.title} ${e.detail} ${e.repo??``} ${e.statusLabel}`.toLowerCase().includes(r)))}function Pa(e,t){let n=Date.now(),r=36e5,i=[];for(let e=t-1;e>=0;e--)i.push({bucketStartMs:n-e*r,count:0});for(let a of e){let e=n-new Date(a.ts).getTime();if(e<0||e>t*r)continue;let o=t-1-Math.floor(e/r);o>=0&&o<i.length&&(i[o].count+=1)}return i}var Fa={bar:`_bar_1kce8_1`,search:`_search_1kce8_12`,sources:`_sources_1kce8_28`,sourceOption:`_sourceOption_1kce8_34`,windowSelect:`_windowSelect_1kce8_43`},Ia=[{value:`run`,label:`Runs`},{value:`merge`,label:`Merges`},{value:`proposal`,label:`Proposals`},{value:`agent-action`,label:`Agent actions`},{value:`daemon-tick`,label:`Daemon ticks`}],La=[{value:`1h`,label:`Last hour`,ms:36e5},{value:`today`,label:`Today`,ms:null,dynamic:!0},{value:`24h`,label:`Last 24h`,ms:864e5},{value:`7d`,label:`Last 7 days`,ms:6048e5},{value:`all`,label:`All available`,ms:null}];function Ra({sources:e,onSourcesChange:t,query:n,onQueryChange:r,windowValue:i,onWindowChange:a}){function o(n){let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)}return(0,L.jsxs)(`div`,{className:Fa.bar,children:[(0,L.jsx)(`input`,{type:`search`,className:Fa.search,placeholder:`Search title, detail, repo…`,value:n,onChange:e=>r(e.target.value),"aria-label":`Search the work journal`}),(0,L.jsx)(`div`,{className:Fa.sources,role:`group`,"aria-label":`Filter by source`,children:Ia.map(t=>(0,L.jsxs)(`label`,{className:Fa.sourceOption,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:e.has(t.value),onChange:()=>o(t.value)}),t.label]},t.value))}),(0,L.jsx)(`select`,{className:Fa.windowSelect,value:i,onChange:e=>{let t=La.find(t=>t.value===e.target.value);a(e.target.value,t?.dynamic?Ma():t?.ms??null)},"aria-label":`Time window`,children:La.map(e=>(0,L.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})}var za=new Set(Ia.map(e=>e.value)),Ba={strip:`_strip_h22ae_1`,bar:`_bar_h22ae_12`,fill:`_fill_h22ae_33`};function Va({entries:e,hours:t,onScrubTo:n}){let r=Pa(e,t),i=Math.max(1,...r.map(e=>e.count));return(0,L.jsx)(`div`,{className:Ba.strip,role:`group`,"aria-label":`Activity density over the last ${t} hours`,children:r.map(e=>{let t=Math.round(e.count/i*100),r=new Date(e.bucketStartMs).toLocaleTimeString(void 0,{hour:`numeric`});return(0,L.jsx)(`button`,{type:`button`,className:Ba.bar,onClick:()=>n(e.bucketStartMs),disabled:e.count===0,title:`${r}: ${e.count} entr${e.count===1?`y`:`ies`}`,"aria-label":`${r}: ${e.count} entries`,children:(0,L.jsx)(`span`,{className:Ba.fill,style:{height:`${Math.max(t,e.count>0?8:0)}%`}})},e.bucketStartMs)})})}var Ha={detailBody:`_detailBody_bgyq9_1`,grid:`_grid_bgyq9_10`,rationale:`_rationale_bgyq9_27`,diffDetails:`_diffDetails_bgyq9_34`,diff:`_diff_bgyq9_34`,error:`_error_bgyq9_56`};function Ua({proposalId:e}){let t=v(ce(e));if(t.status===`loading`)return(0,L.jsx)(m,{width:`80%`});if(t.status===`error`)return(0,L.jsxs)(`p`,{className:Ha.error,children:[`Could not load proposal `,e,`: `,t.error?.message??`not found on disk (it may have been pruned).`]});let n=t.data;return n?(0,L.jsxs)(`div`,{className:Ha.detailBody,children:[(0,L.jsxs)(`dl`,{className:Ha.grid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Status`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(E,{status:n.status})})]}),n.riskClass?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Risk`}),(0,L.jsx)(`dd`,{children:n.riskClass})]}):null,n.taste?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Judge verdict`}),(0,L.jsxs)(`dd`,{children:[n.taste.verdict,` · alignment `,n.taste.alignment,`/10 · ambition `,n.taste.ambition,`/10 · design`,` `,n.taste.design,`/10`]})]}):null,n.decisionReason?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Decision`}),(0,L.jsx)(`dd`,{children:n.decisionReason})]}):null,n.learningSource?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Learning source`}),(0,L.jsx)(`dd`,{children:n.learningSource})]}):null]}),n.taste?.rationale?(0,L.jsx)(`p`,{className:Ha.rationale,children:n.taste.rationale}):null,n.diff?(0,L.jsxs)(`details`,{className:Ha.diffDetails,children:[(0,L.jsxs)(`summary`,{children:[`Diff (`,n.diff.split(`
4
+ `).length,` lines)`]}),(0,L.jsx)(`pre`,{className:Ha.diff,children:n.diff})]}):(0,L.jsx)(`p`,{className:Ha.error,children:`No diff recorded for this proposal.`})]}):null}function Wa({drillIn:e}){return e.runId?(0,L.jsx)(Da,{runId:e.runId}):e.proposalId?(0,L.jsx)(Ua,{proposalId:e.proposalId}):null}var Ga={row:`_row_194dy_1`,summary:`_summary_194dy_9`,sourceTag:`_sourceTag_194dy_31`,when:`_when_194dy_53`,repo:`_repo_194dy_61`,title:`_title_194dy_70`,expandHint:`_expandHint_194dy_80`,body:`_body_194dy_86`,detailText:`_detailText_194dy_90`},Ka={"daemon-tick":`Daemon`,merge:`Merge`,"agent-action":`Agent`,run:`Run`,proposal:`Proposal`};function qa(e){let t=new Date(e);return`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})} ${t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`})}`}function Ja({entry:e}){let t=!!e.drillIn,[n,r]=(0,M.useState)(!1);return(0,L.jsxs)(`details`,{className:Ga.row,"data-state-key":`journal-${e.id}`,onToggle:e=>r(e.currentTarget.open),children:[(0,L.jsxs)(`summary`,{className:Ga.summary,"data-focus-key":`journal-${e.id}`,children:[(0,L.jsx)(`span`,{className:Ga.sourceTag,"data-source":e.source,children:Ka[e.source]}),(0,L.jsx)(`span`,{className:Ga.when,title:e.ts,children:qa(e.ts)}),(0,L.jsx)(E,{status:e.statusLabel}),e.repo?(0,L.jsx)(`span`,{className:Ga.repo,children:e.repo}):null,(0,L.jsx)(`span`,{className:Ga.title,children:e.title}),(0,L.jsx)(C,{quality:e.sourceQuality}),t?(0,L.jsx)(`span`,{className:Ga.expandHint,"aria-hidden":`true`,children:`why? ▾`}):null]}),(0,L.jsxs)(`div`,{className:Ga.body,children:[(0,L.jsx)(`p`,{className:Ga.detailText,children:e.detail}),n&&e.drillIn?(0,L.jsx)(Wa,{drillIn:e.drillIn}):null]})]})}var Ya={view:`_view_1omi1_1`,header:`_header_1omi1_9`,title:`_title_1omi1_16`,windowNote:`_windowNote_1omi1_23`,freshness:`_freshness_1omi1_30`,freshnessLabel:`_freshnessLabel_1omi1_37`,errorBanner:`_errorBanner_1omi1_42`,panel:`_panel_1omi1_50`,list:`_list_1omi1_57`,empty:`_empty_1omi1_63`},Xa=8e3;function Za(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}function Qa(){let e=F().state?.windowToday===!0,t=v(de),n=v(fe),r=v(ve),i=v(ae),a=g(de);(0,M.useEffect)(()=>{let e=setInterval(a,Xa);return()=>clearInterval(e)},[a]);let[o,s]=(0,M.useState)(new Set(za)),[c,u]=(0,M.useState)(``),[d,f]=(0,M.useState)(e?`today`:`24h`),[p,m]=(0,M.useState)(e?Ma():864e5),h=(0,M.useMemo)(()=>ja({logs:t.data,fleetActivity:n.data,runs:r.data,inbox:i.data}),[t.data,n.data,r.data,i.data]),_=(0,M.useMemo)(()=>Na(h,{sources:o,query:c,windowMs:p}),[h,o,c,p]),y=(0,M.useRef)(new Map);function b(e){let t=_.find(t=>new Date(t.ts).getTime()<=e+36e5);t&&y.current.get(t.id)?.scrollIntoView({behavior:`smooth`,block:`center`})}let x=t.status===`loading`&&n.status===`loading`&&r.status===`loading`&&i.status===`loading`,S=[t,n,r,i].some(e=>e.status===`refreshing`),C=Math.max(t.updatedAt??0,n.updatedAt??0,r.updatedAt??0,i.updatedAt??0),w=[t.status===`error`?`daemon log: ${t.error?.message}`:null,n.status===`error`?`fleet activity: ${n.error?.message}`:null,r.status===`error`?`runs: ${r.error?.message}`:null,i.status===`error`?`inbox: ${i.error?.message}`:null].filter(e=>e!==null);return(0,L.jsxs)(`div`,{className:Ya.view,children:[(0,L.jsxs)(`header`,{className:Ya.header,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h1`,{className:Ya.title,children:`Work Journal`}),(0,L.jsx)(`p`,{className:Ya.windowNote,children:`Merges the daemon log (last 200 lines), fleet activity (last ~20 merges/ticks/agent actions), recent runs (last 200), and the pending-proposal inbox. The read API does not expose the full on-disk history beyond this window.`})]}),(0,L.jsxs)(`div`,{className:Ya.freshness,"aria-live":`polite`,children:[S?(0,L.jsx)(A,{}):null,C>0?(0,L.jsxs)(`span`,{className:Ya.freshnessLabel,children:[`Updated `,Za(C)]}):null]})]}),w.length>0?(0,L.jsxs)(`div`,{className:Ya.errorBanner,role:`alert`,children:[`Some sources failed to load: `,w.join(`; `)]}):null,(0,L.jsx)(ka,{}),x?(0,L.jsxs)(`div`,{className:Ya.panel,children:[(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Va,{entries:h,hours:24,onScrubTo:b}),(0,L.jsx)(Ra,{sources:o,onSourcesChange:s,query:c,onQueryChange:u,windowValue:d,onWindowChange:(e,t)=>{f(e),m(t)}}),(0,L.jsx)(`div`,{className:Ya.panel,children:_.length===0?(0,L.jsx)(`p`,{className:Ya.empty,children:`Nothing matches the current filters in this window.`}):(0,L.jsx)(`ul`,{className:Ya.list,children:_.map(e=>(0,L.jsx)(`li`,{ref:t=>{t?y.current.set(e.id,t):y.current.delete(e.id)},children:(0,L.jsx)(Ja,{entry:e})},e.id))})})]})]})}var $a={view:`_view_7836g_1`,header:`_header_7836g_7`,title:`_title_7836g_15`,freshness:`_freshness_7836g_21`,freshnessLabel:`_freshnessLabel_7836g_27`,filterRow:`_filterRow_7836g_32`,windowGroup:`_windowGroup_7836g_38`,windowButton:`_windowButton_7836g_45`,windowButtonActive:`_windowButtonActive_7836g_64`,kpiGrid:`_kpiGrid_7836g_70`,chartsGrid:`_chartsGrid_7836g_76`,error:`_error_7836g_82`},eo=[`1d`,`7d`,`30d`],to={ok:`success`,warn:`warning`,over:`danger`};function no(e){let t=e.replace(/\/+$/,``).split(`/`);return t[t.length-1]||e}function ro(){let[e,t]=(0,M.useState)(`7d`),n=v(se(e));return(0,L.jsxs)(`div`,{className:$a.view,children:[(0,L.jsxs)(`header`,{className:$a.header,children:[(0,L.jsx)(`h1`,{className:$a.title,children:`Pulse`}),(0,L.jsxs)(`div`,{className:$a.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,L.jsx)(A,{}):null,n.updatedAt?(0,L.jsxs)(`span`,{className:$a.freshnessLabel,children:[`Updated `,ao(n.updatedAt)]}):null]})]}),(0,L.jsxs)(`div`,{className:$a.filterRow,role:`group`,"aria-label":`Time window`,children:[(0,L.jsx)(`div`,{className:$a.windowGroup,children:eo.map(n=>(0,L.jsx)(`button`,{type:`button`,className:`${$a.windowButton} ${n===e?$a.windowButtonActive:``}`,"aria-pressed":n===e,onClick:()=>t(n),children:n},n))}),n.data?(0,L.jsx)(E,{status:n.data.budget.level,tone:to[n.data.budget.level],children:n.data.budget.message}):null]}),n.status===`loading`?(0,L.jsx)(y,{count:4}):n.status===`error`?(0,L.jsx)(`div`,{className:$a.error,role:`alert`,children:n.error?.message??`Failed to load pulse data.`}):n.data?(0,L.jsx)(io,{rollup:n.data}):null]})}function io({rollup:e}){let t=[{id:`cost`,label:`Est. cost (USD)`,points:e.byDay.map(e=>({x:ze(e.day),y:e.estCostUsd}))}],n=[...e.byProject].sort((e,t)=>t.estCostUsd-e.estCostUsd).slice(0,8),r=n.map(e=>({label:no(e.project),value:e.estCostUsd})),i=[...e.byModel].sort((e,t)=>t.estCostUsd-e.estCostUsd).slice(0,8),a=i.map(e=>({label:e.model,value:e.estCostUsd}));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:$a.kpiGrid,children:[(0,L.jsx)(j,{label:`Est. cost`,value:Le(e.totals.estCostUsd),caption:e.window}),(0,L.jsx)(j,{label:`Tokens`,value:Re(e.totals.tokensIn+e.totals.tokensOut),caption:`${Re(e.totals.tokensIn)} in / ${Re(e.totals.tokensOut)} out`}),(0,L.jsx)(j,{label:`Sessions`,value:String(e.totals.sessions)}),(0,L.jsx)(j,{label:`Commits`,value:String(e.totals.commits)})]}),(0,L.jsxs)(`div`,{className:$a.chartsGrid,children:[(0,L.jsx)(Me,{title:`Cost over time`,description:`since ${new Date(e.since).toLocaleDateString()}`,empty:e.byDay.length===0,emptyMessage:`No activity recorded in this window.`,table:(0,L.jsx)(je,{caption:`Daily cost`,rowKey:e=>e.day,rows:e.byDay,columns:[{key:`day`,label:`Day`,render:e=>e.day},{key:`cost`,label:`Cost`,numeric:!0,render:e=>Le(e.estCostUsd)},{key:`sessions`,label:`Sessions`,numeric:!0,render:e=>String(e.sessions)}]}),children:(0,L.jsx)(Pe,{series:t,area:!0,ariaLabel:`Estimated cost over time`,formatX:e=>new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`}),formatY:e=>Le(e)})}),(0,L.jsx)(Me,{title:`Top projects by cost`,empty:r.length===0,emptyMessage:`No project activity in this window.`,table:(0,L.jsx)(je,{caption:`Cost by project`,rowKey:e=>e.project,rows:n,columns:[{key:`project`,label:`Project`,render:e=>no(e.project)},{key:`sessions`,label:`Sessions`,numeric:!0,render:e=>String(e.sessions)},{key:`commits`,label:`Commits`,numeric:!0,render:e=>String(e.commits)},{key:`cost`,label:`Cost`,numeric:!0,render:e=>Le(e.estCostUsd)}]}),children:(0,L.jsx)(Ne,{data:r,orientation:`horizontal`,ariaLabel:`Top projects by estimated cost`,formatValue:e=>Le(e)})}),(0,L.jsx)(Me,{title:`Cost by model`,empty:a.length===0,emptyMessage:`No model activity in this window.`,table:(0,L.jsx)(je,{caption:`Cost by model`,rowKey:e=>e.model,rows:i,columns:[{key:`model`,label:`Model`,render:e=>e.model},{key:`calls`,label:`Calls`,numeric:!0,render:e=>String(e.calls)},{key:`tokens`,label:`Tokens`,numeric:!0,render:e=>Re(e.tokensIn+e.tokensOut)},{key:`cost`,label:`Cost`,numeric:!0,render:e=>Le(e.estCostUsd)}]}),children:(0,L.jsx)(Ne,{data:a,ariaLabel:`Cost by model`,formatValue:e=>Le(e)})})]})]})}function ao(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}var B={view:`_view_44i9i_1`,header:`_header_44i9i_7`,title:`_title_44i9i_15`,searchRow:`_searchRow_44i9i_21`,searchInput:`_searchInput_44i9i_27`,resultCount:`_resultCount_44i9i_43`,results:`_results_44i9i_48`,row:`_row_44i9i_57`,rowHeader:`_rowHeader_44i9i_64`,rowTitle:`_rowTitle_44i9i_72`,rowMeta:`_rowMeta_44i9i_78`,badge:`_badge_44i9i_87`,snippet:`_snippet_44i9i_97`,tags:`_tags_44i9i_107`,tag:`_tag_44i9i_107`,skeletons:`_skeletons_44i9i_123`,empty:`_empty_44i9i_129`,error:`_error_44i9i_136`},oo=50,so=300;function co(e,t){let[n,r]=(0,M.useState)(e);return(0,M.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function lo(e,t=220){let n=e.trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function uo(e){let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.floor((Date.now()-t)/864e5);return n<=0?`today`:n===1?`yesterday`:n<30?`${n}d ago`:`${Math.floor(n/30)}mo ago`}function fo(){let[e,t]=(0,M.useState)(``),n=co(e,so),r=v(ie(n)),i=n.trim().length>0,a=r.data,{rows:o,totalCount:s}=(0,M.useMemo)(()=>{if(!a)return{rows:[],totalCount:0};if(i)return{rows:a,totalCount:a.length};let e=a;return{rows:[...e].sort((e,t)=>Date.parse(t.ts)-Date.parse(e.ts)).slice(0,oo),totalCount:e.length}},[a,i]),c=(0,M.useMemo)(()=>{if(!a||i)return[];let e=a,t=new Map;for(let n of e){let e=n.project??`(unscoped)`;t.set(e,(t.get(e)??0)+1)}return[...t.entries()].sort((e,t)=>t[1]-e[1]).slice(0,8).map(([e,t])=>({label:e,value:t}))},[a,i]);return(0,L.jsxs)(`div`,{className:B.view,children:[(0,L.jsxs)(`header`,{className:B.header,children:[(0,L.jsx)(`h1`,{className:B.title,children:`Genome`}),(0,L.jsx)(`div`,{"aria-live":`polite`,children:r.status===`refreshing`?(0,L.jsx)(A,{}):null})]}),(0,L.jsxs)(`div`,{className:B.searchRow,children:[(0,L.jsx)(`input`,{type:`search`,className:B.searchInput,placeholder:`Search the genome (title, tags, body text)…`,value:e,onChange:e=>t(e.target.value),"aria-label":`Search cross-repo knowledge`}),a?(0,L.jsx)(`span`,{className:B.resultCount,children:i?`${s} match${s===1?``:`es`}`:`showing ${o.length} of ${s}`}):null]}),!i&&c.length>0?(0,L.jsx)(Me,{title:`Top projects by genome entries`,description:`browse mode — all loaded entries`,children:(0,L.jsx)(Ne,{data:c,orientation:`horizontal`,ariaLabel:`Top projects by genome entry count`,formatValue:e=>Re(e)})}):null,r.status===`loading`?(0,L.jsxs)(`div`,{className:B.skeletons,"aria-hidden":`true`,children:[(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{})]}):r.status===`error`?(0,L.jsx)(`div`,{className:B.error,role:`alert`,children:r.error?.message??`Failed to load genome data.`}):o.length===0?(0,L.jsx)(`p`,{className:B.empty,children:i?`No genome entries match "${n}".`:`No genome entries recorded yet.`}):(0,L.jsx)(`ul`,{className:B.results,children:o.map(e=>{let t=oe(e)?e:null,n=t?t.entry:e;return(0,L.jsxs)(`li`,{className:B.row,children:[(0,L.jsxs)(`div`,{className:B.rowHeader,children:[(0,L.jsx)(`span`,{className:B.rowTitle,children:n.title}),(0,L.jsxs)(`span`,{className:B.rowMeta,children:[t?(0,L.jsxs)(`span`,{className:B.badge,children:[t.method,` · `,t.score.toFixed(2)]}):null,(0,L.jsx)(`span`,{children:uo(n.ts)})]})]}),(0,L.jsxs)(`div`,{className:B.rowMeta,children:[(0,L.jsx)(`span`,{className:B.badge,children:n.project??`unscoped`}),(0,L.jsx)(`span`,{className:B.badge,children:n.source})]}),(0,L.jsx)(`p`,{className:B.snippet,children:lo(n.text)}),n.tags.length>0?(0,L.jsx)(`div`,{className:B.tags,children:n.tags.map(e=>(0,L.jsx)(`span`,{className:B.tag,children:e},e))}):null]},n.id)})})]})}var V={view:`_view_1frm3_1`,header:`_header_1frm3_7`,title:`_title_1frm3_15`,filterRow:`_filterRow_1frm3_21`,windowGroup:`_windowGroup_1frm3_27`,windowButton:`_windowButton_1frm3_34`,windowButtonActive:`_windowButtonActive_1frm3_53`,kpiGrid:`_kpiGrid_1frm3_59`,chartsGrid:`_chartsGrid_1frm3_65`,section:`_section_1frm3_71`,sectionTitle:`_sectionTitle_1frm3_77`,goalsList:`_goalsList_1frm3_83`,goalRow:`_goalRow_1frm3_92`,goalObjective:`_goalObjective_1frm3_102`,meterTrack:`_meterTrack_1frm3_107`,meterFill:`_meterFill_1frm3_115`,goalMeta:`_goalMeta_1frm3_121`,error:`_error_1frm3_126`,notAvailable:`_notAvailable_1frm3_135`},po=[`7d`,`30d`,`all`];function mo(e){return`${e.engine}:${e.model}`}function ho(){let[e,t]=(0,M.useState)(`30d`),n=v(O),r=v(pe(e)),i=n.data?.production;return(0,L.jsxs)(`div`,{className:V.view,children:[(0,L.jsxs)(`header`,{className:V.header,children:[(0,L.jsx)(`h1`,{className:V.title,children:`Production`}),(0,L.jsx)(`div`,{"aria-live":`polite`,children:n.status===`refreshing`||r.status===`refreshing`?(0,L.jsx)(A,{}):null})]}),n.status===`loading`?(0,L.jsx)(y,{count:4}):n.status===`error`?(0,L.jsx)(`div`,{className:V.error,role:`alert`,children:n.error?.message??`Failed to load production summary.`}):i?(0,L.jsx)(go,{production:i}):(0,L.jsx)(`p`,{className:V.notAvailable,children:`Production summary not available on this server (older producer, or not yet populated).`}),(0,L.jsx)(`div`,{className:V.filterRow,role:`group`,"aria-label":`Model stats window`,children:(0,L.jsx)(`div`,{className:V.windowGroup,children:po.map(n=>(0,L.jsx)(`button`,{type:`button`,className:`${V.windowButton} ${n===e?V.windowButtonActive:``}`,"aria-pressed":n===e,onClick:()=>t(n),children:n},n))})}),r.status===`loading`?(0,L.jsx)(y,{count:3}):r.status===`error`?(0,L.jsx)(`div`,{className:V.error,role:`alert`,children:r.error?.message??`Failed to load per-model stats.`}):r.data?(0,L.jsx)(_o,{result:r.data}):null]})}function go({production:e}){let t=e.judgeVerdicts24h,n=e.judgeFailures24h??{total:0,parse:0,network:0},r=[{label:`ship`,value:t.ship},{label:`review`,value:t.review},{label:`noise`,value:t.noise},{label:`harmful`,value:t.harmful}],i=e.shipsPerDayTrend.map(e=>({label:Fe(e.date),value:e.count})),a=e.shipsPerDayTrend.reduce((e,t)=>e+t.count,0),o=w(e.proposalSourceQuality),s=w(e.judgeTraceSourceQuality);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:V.kpiGrid,children:[(0,L.jsx)(j,{label:`Proposals (24h)`,value:(0,L.jsx)(T,{quality:e.proposalSourceQuality,label:`proposals`,children:String(e.proposals24h.total)}),caption:(0,L.jsx)(T,{quality:e.proposalSourceQuality,label:`pending proposals`,children:`${e.proposals24h.pending} pending`})}),(0,L.jsx)(j,{label:`Auto-merges today`,value:(0,L.jsx)(T,{quality:e.proposalSourceQuality,label:`auto-merges`,children:String(e.autoMergesToday.count)})}),(0,L.jsx)(j,{label:`Judged (24h)`,value:(0,L.jsx)(T,{quality:e.judgeTraceSourceQuality,label:`judge verdicts`,children:String(t.total)})}),(0,L.jsx)(j,{label:`Judge failures (24h)`,value:(0,L.jsx)(T,{quality:e.judgeFailureSourceQuality,label:`judge failures`,children:String(n.total)}),caption:(0,L.jsx)(T,{quality:e.judgeFailureSourceQuality,children:`${n.parse} parse · ${n.network} network`})}),(0,L.jsx)(j,{label:`Active goals`,value:(0,L.jsx)(T,{quality:e.activeGoalsSourceQuality,label:`active goals`,children:String(e.activeGoals.length)})})]}),(0,L.jsxs)(`div`,{className:V.chartsGrid,children:[(0,L.jsxs)(Me,{title:`Ships per day`,description:`last 7 days`,empty:o&&i.length===0,emptyMessage:`No ship history recorded yet.`,table:o?(0,L.jsx)(je,{caption:`Ships per day`,rowKey:e=>e.label,rows:i,columns:[{key:`day`,label:`Day`,render:e=>e.label},{key:`count`,label:`Ships`,numeric:!0,render:e=>String(e.value??0)}]}):void 0,children:[o?a===0?(0,L.jsx)(`p`,{className:V.notAvailable,children:`0 ships in the last 7 days — this is the real number, not a loading state.`}):null:(0,L.jsx)(T,{quality:e.proposalSourceQuality,label:`ship history`,children:`ship history`}),o?(0,L.jsx)(Ne,{data:i,ariaLabel:`Ships per day, last 7 days`,formatValue:e=>String(e)}):null]}),(0,L.jsx)(Me,{title:`Judge verdict breakdown`,description:`last 24h`,empty:s&&t.total===0,emptyMessage:`No judge verdicts recorded in the last 24h.`,children:s?(0,L.jsx)(Ne,{data:r,ariaLabel:`Judge verdict breakdown, last 24h`,formatValue:e=>String(e)}):(0,L.jsx)(T,{quality:e.judgeTraceSourceQuality,label:`judge verdicts`,children:`judge verdicts`})})]}),w(e.activeGoalsSourceQuality)?e.activeGoals.length>0?(0,L.jsxs)(`div`,{className:V.section,children:[(0,L.jsx)(`h2`,{className:V.sectionTitle,children:`Active goals`}),(0,L.jsx)(`ul`,{className:V.goalsList,children:e.activeGoals.map(e=>{let t=e.totalMilestones>0?e.doneMilestones/e.totalMilestones:0;return(0,L.jsxs)(`li`,{className:V.goalRow,children:[(0,L.jsx)(`span`,{className:V.goalObjective,children:e.objective}),(0,L.jsx)(`div`,{className:V.meterTrack,children:(0,L.jsx)(`div`,{className:V.meterFill,style:{width:`${Math.round(t*100)}%`}})}),(0,L.jsxs)(`span`,{className:V.goalMeta,children:[e.doneMilestones,` / `,e.totalMilestones,` milestones`]})]},e.goalId)})})]}):null:(0,L.jsxs)(`div`,{className:V.section,children:[(0,L.jsx)(`h2`,{className:V.sectionTitle,children:`Active goals`}),(0,L.jsx)(T,{quality:e.activeGoalsSourceQuality,label:`active goals`,children:`active goals`})]})]})}function _o({result:e}){let t=[...e.models].sort((e,t)=>t.dispatches-e.dispatches).slice(0,12),n=t.map(e=>({label:mo(e),value:e.judged>0?e.shipRate:null}));return(0,L.jsx)(`div`,{className:V.chartsGrid,children:(0,L.jsx)(Me,{title:`Ship rate by model`,description:`judged proposals in the selected window`,empty:t.length===0,emptyMessage:`No dispatch history for this window.`,table:(0,L.jsx)(je,{caption:`Per-model economics`,rowKey:mo,rows:t,columns:[{key:`model`,label:`Model`,render:e=>mo(e)},{key:`dispatches`,label:`Dispatches`,numeric:!0,render:e=>String(e.dispatches)},{key:`shipRate`,label:`Ship rate`,numeric:!0,render:e=>e.judged>0?Ie(e.shipRate):`—`},{key:`merged`,label:`Merged`,numeric:!0,render:e=>String(e.merged)},{key:`costPerMerged`,label:`Cost / merge`,numeric:!0,render:e=>e.costPerMergedUsd===null?`—`:Le(e.costPerMergedUsd)},{key:`bestOfN`,label:`Best-of-N win rate`,numeric:!0,render:t=>t.bestOfNAvailable?(0,L.jsx)(T,{quality:e.bestOfNSource,label:`best-of-N win rate`,children:Ie(t.bestOfN.winRate)}):`—`}]}),children:(0,L.jsx)(Ne,{data:n,ariaLabel:`Ship rate by model`,formatValue:e=>Ie(e)})})})}var H={view:`_view_ruego_1`,header:`_header_ruego_7`,title:`_title_ruego_15`,freshness:`_freshness_ruego_21`,freshnessLabel:`_freshnessLabel_ruego_27`,kpiGrid:`_kpiGrid_ruego_32`,chartsGrid:`_chartsGrid_ruego_38`,section:`_section_ruego_44`,sectionTitle:`_sectionTitle_ruego_50`,list:`_list_ruego_56`,row:`_row_ruego_65`,rowTitle:`_rowTitle_ruego_75`,meterTrack:`_meterTrack_ruego_84`,meterFill:`_meterFill_ruego_92`,rowMeta:`_rowMeta_ruego_98`,effectiveness:`_effectiveness_ruego_103`,effectivenessHeadline:`_effectivenessHeadline_ruego_110`,error:`_error_ruego_116`,notAvailable:`_notAvailable_ruego_125`};function vo(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?`just now`:t<60?`${t}s ago`:`${Math.round(t/60)}m ago`}function yo(){let e=v(ue),t=v(O);return(0,L.jsxs)(`div`,{className:H.view,children:[(0,L.jsxs)(`header`,{className:H.header,children:[(0,L.jsx)(`h1`,{className:H.title,children:`Portfolio`}),(0,L.jsxs)(`div`,{className:H.freshness,"aria-live":`polite`,children:[e.status===`refreshing`||t.status===`refreshing`?(0,L.jsx)(A,{}):null,e.updatedAt?(0,L.jsxs)(`span`,{className:H.freshnessLabel,children:[`Updated `,vo(e.updatedAt)]}):null]})]}),e.status===`loading`?(0,L.jsx)(y,{count:6}):e.status===`error`?(0,L.jsx)(`div`,{className:H.error,role:`alert`,children:e.error?.message??`Failed to load portfolio.`}):e.data===null?(0,L.jsx)(`p`,{className:H.notAvailable,children:`No portfolio roll-up available — either this server has no enrolled repos, or it predates the portfolio feature.`}):e.data?(0,L.jsx)(bo,{portfolio:e.data}):null]})}function bo({portfolio:e}){let{health:t,goalsInFlight:n,backlogTop:r,cost:i,effectiveness:a,today:o}=e,s=t.worstRepos.map(e=>({label:e.repo.split(`/`).filter(Boolean).pop()??e.repo,value:e.score}));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:H.kpiGrid,children:[(0,L.jsx)(j,{label:`Portfolio health`,value:`${t.averageScore.toFixed(0)} (${t.averageGrade})`,caption:`${t.reposScored} repos scored`,delta:o.healthScoreDelta===null?null:{value:o.healthScoreDelta,goodWhenPositive:!0}}),(0,L.jsx)(j,{label:`Goals in flight`,value:String(n.length)}),(0,L.jsx)(j,{label:`Backlog top items`,value:String(r.length),delta:o.pendingProposalsDelta===null?null:{value:o.pendingProposalsDelta,versus:`pending proposals`}}),(0,L.jsx)(j,{label:`Spend`,value:Le(i.spentUsd),caption:`${i.window} window`,delta:o.spendUsdDelta===null?null:{value:o.spendUsdDelta,goodWhenPositive:!1}}),(0,L.jsx)(j,{label:`Local savings`,value:Le(i.localSavingsUsd)}),(0,L.jsx)(j,{label:`Projected monthly`,value:Le(i.projectedMonthlyUsd)})]}),a?(0,L.jsxs)(`div`,{className:H.effectiveness,children:[(0,L.jsx)(`p`,{className:H.effectivenessHeadline,children:a.headline}),(0,L.jsxs)(`span`,{className:H.rowMeta,children:[`Success rate `,Ie(a.successRate),a.effectivenessDeltaPct===null?``:` (${a.effectivenessDeltaPct>=0?`+`:``}${a.effectivenessDeltaPct.toFixed(1)}pp)`]})]}):null,(0,L.jsxs)(`div`,{className:H.chartsGrid,children:[(0,L.jsx)(Me,{title:`Worst-scoring repos`,empty:s.length===0,emptyMessage:`No enrolled repos scored yet.`,table:(0,L.jsx)(je,{caption:`Worst-scoring repos`,rowKey:e=>e.repo,rows:t.worstRepos,columns:[{key:`repo`,label:`Repo`,render:e=>e.repo},{key:`score`,label:`Score`,numeric:!0,render:e=>e.score.toFixed(0)},{key:`grade`,label:`Grade`,render:e=>e.grade}]}),children:(0,L.jsx)(Ne,{data:s,orientation:`horizontal`,ariaLabel:`Worst-scoring repos by health score`,formatValue:e=>e.toFixed(0)})}),(0,L.jsxs)(`div`,{className:H.section,children:[(0,L.jsx)(`h2`,{className:H.sectionTitle,children:`In-flight goals`}),n.length===0?(0,L.jsx)(`p`,{className:H.notAvailable,children:`No goals currently in flight.`}):(0,L.jsx)(`ul`,{className:H.list,children:n.map(e=>(0,L.jsxs)(`li`,{className:H.row,children:[(0,L.jsxs)(`span`,{className:H.rowTitle,children:[e.objective,(0,L.jsxs)(`span`,{className:H.rowMeta,children:[Math.round(e.fractionDone*100),`%`]})]}),(0,L.jsx)(`div`,{className:H.meterTrack,children:(0,L.jsx)(`div`,{className:H.meterFill,style:{width:`${Math.round(e.fractionDone*100)}%`}})}),(0,L.jsx)(`span`,{className:H.rowMeta,children:e.nextActionable?`Next: ${e.nextActionable}`:`Nothing actionable queued`})]},e.goalId))})]})]}),(0,L.jsxs)(`div`,{className:H.section,children:[(0,L.jsx)(`h2`,{className:H.sectionTitle,children:`Top backlog`}),r.length===0?(0,L.jsx)(`p`,{className:H.notAvailable,children:`Backlog is empty.`}):(0,L.jsx)(je,{caption:`Top backlog items`,rowKey:e=>e.title,rows:r,columns:[{key:`title`,label:`Item`,render:e=>e.title},{key:`repo`,label:`Repo`,render:e=>e.repo??`—`},{key:`score`,label:`Score`,numeric:!0,render:e=>e.score.toFixed(1)}]})]})]})}var U={view:`_view_1eb19_1`,header:`_header_1eb19_8`,title:`_title_1eb19_16`,freshness:`_freshness_1eb19_22`,count:`_count_1eb19_28`,filters:`_filters_1eb19_34`,field:`_field_1eb19_45`,fieldLabel:`_fieldLabel_1eb19_51`,input:`_input_1eb19_56`,select:`_select_1eb19_57`,clear:`_clear_1eb19_74`,tableWrap:`_tableWrap_1eb19_87`,table:`_table_1eb19_87`,statusCol:`_statusCol_1eb19_101`,engineCol:`_engineCol_1eb19_104`,providerCol:`_providerCol_1eb19_107`,tokensCol:`_tokensCol_1eb19_110`,costCol:`_costCol_1eb19_113`,stepsCol:`_stepsCol_1eb19_116`,createdCol:`_createdCol_1eb19_119`,row:`_row_1eb19_143`,sortHeader:`_sortHeader_1eb19_151`,goalLink:`_goalLink_1eb19_168`,numeric:`_numeric_1eb19_180`,date:`_date_1eb19_186`,empty:`_empty_1eb19_192`,error:`_error_1eb19_199`};function xo(e){return e.usage.tokensIn+e.usage.tokensOut}function So(e,t){if(!t)return!0;let n=t.toLowerCase();return e.id.toLowerCase().includes(n)||e.goal.toLowerCase().includes(n)}function Co(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function wo(){let e=(0,M.useRef)(null);ke(`/work/runs`,e);let t=hn(),n=v(ve),[r,i]=(0,M.useState)(0),a=(0,M.useRef)(new Map),[o,s]=(0,M.useState)(``),[c,u]=(0,M.useState)(`all`),[d,f]=(0,M.useState)(`all`),[p,m]=(0,M.useState)(`all`),[h,g]=(0,M.useState)(``),[_,y]=(0,M.useState)(`createdAt`),[b,x]=(0,M.useState)(`desc`),S=(0,M.useMemo)(()=>n.data??[],[n.data]),{statuses:C,engines:w,providers:T}=(0,M.useMemo)(()=>{let e=new Set,t=new Set,n=new Set;for(let r of S)e.add(r.status),t.add(r.engine),n.add(r.provider);return{statuses:Array.from(e).sort(),engines:Array.from(t).sort(),providers:Array.from(n).sort()}},[S]),ee=h?new Date(h).getTime():null,D=(0,M.useMemo)(()=>{let e=S.filter(e=>{if(c!==`all`&&e.status!==c||d!==`all`&&e.engine!==d||p!==`all`&&e.provider!==p)return!1;if(ee!==null){let t=new Date(e.createdAt).getTime();if(Number.isNaN(t)||t<ee)return!1}return!!So(e,o.trim())});return e=[...e].sort((e,t)=>{let n=0;switch(_){case`createdAt`:n=e.createdAt.localeCompare(t.createdAt);break;case`updatedAt`:n=e.updatedAt.localeCompare(t.updatedAt);break;case`tokens`:n=xo(e)-xo(t);break;case`estCostUsd`:n=e.usage.estCostUsd-t.usage.estCostUsd;break;case`steps`:n=e.steps.length-t.steps.length;break;case`status`:n=e.status.localeCompare(t.status)}return b===`asc`?n:-n}),e},[S,c,d,p,ee,o,_,b]);(0,M.useEffect)(()=>{i(e=>Math.min(e,Math.max(D.length-1,0)))},[D.length]);function te(e){if(D.length!==0){if(e.key===`ArrowDown`){e.preventDefault();let t=Math.min(r+1,D.length-1);i(t),a.current.get(D[t].id)?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let t=Math.max(r-1,0);i(t),a.current.get(D[t].id)?.focus()}else if(e.key===`Enter`){let e=D[r];e&&t(`/work/runs/${e.id}`)}}}function ne(e){e===_?x(e=>e===`asc`?`desc`:`asc`):(y(e),x(`desc`))}function O(e){return e===_?b===`asc`?` ↑`:` ↓`:``}return(0,L.jsxs)(`div`,{ref:e,className:U.view,children:[(0,L.jsxs)(`header`,{className:U.header,children:[(0,L.jsx)(`h1`,{className:U.title,children:`Runs`}),(0,L.jsxs)(`div`,{className:U.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,L.jsx)(A,{}):null,(0,L.jsxs)(`span`,{className:U.count,children:[D.length,` of `,S.length,` runs (server caps at 200 most recent)`]})]})]}),(0,L.jsxs)(`form`,{className:U.filters,role:`search`,"aria-label":`Filter runs`,onSubmit:e=>e.preventDefault(),children:[(0,L.jsxs)(`label`,{className:U.field,children:[(0,L.jsx)(`span`,{className:U.fieldLabel,children:`Search`}),(0,L.jsx)(`input`,{type:`text`,className:U.input,placeholder:`goal or run id (e.g. repo/project name)`,value:o,onChange:e=>s(e.target.value)})]}),(0,L.jsxs)(`label`,{className:U.field,children:[(0,L.jsx)(`span`,{className:U.fieldLabel,children:`Status`}),(0,L.jsxs)(`select`,{className:U.select,value:c,onChange:e=>u(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),C.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))]})]}),(0,L.jsxs)(`label`,{className:U.field,children:[(0,L.jsx)(`span`,{className:U.fieldLabel,children:`Engine`}),(0,L.jsxs)(`select`,{className:U.select,value:d,onChange:e=>f(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),w.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))]})]}),(0,L.jsxs)(`label`,{className:U.field,children:[(0,L.jsx)(`span`,{className:U.fieldLabel,children:`Provider`}),(0,L.jsxs)(`select`,{className:U.select,value:p,onChange:e=>m(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),T.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))]})]}),(0,L.jsxs)(`label`,{className:U.field,children:[(0,L.jsx)(`span`,{className:U.fieldLabel,children:`Since`}),(0,L.jsx)(`input`,{type:`date`,className:U.input,value:h,onChange:e=>g(e.target.value)})]}),(c!==`all`||d!==`all`||p!==`all`||h||o)&&(0,L.jsx)(`button`,{type:`button`,className:U.clear,onClick:()=>{s(``),u(`all`),f(`all`),m(`all`),g(``)},children:`Clear filters`})]}),n.status===`loading`?(0,L.jsxs)(`div`,{className:U.tableWrap,children:[(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{})]}):n.status===`error`?(0,L.jsx)(`div`,{className:U.error,role:`alert`,children:n.error?.message??`Failed to load runs.`}):D.length===0?(0,L.jsx)(`p`,{className:U.empty,children:`No runs match the current filters.`}):(0,L.jsx)(`div`,{className:U.tableWrap,children:(0,L.jsxs)(`table`,{className:U.table,onKeyDown:te,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Goal`}),(0,L.jsx)(`th`,{scope:`col`,className:U.statusCol,children:(0,L.jsxs)(`button`,{type:`button`,className:U.sortHeader,onClick:()=>ne(`status`),children:[`Status`,O(`status`)]})}),(0,L.jsx)(`th`,{scope:`col`,className:U.engineCol,children:`Engine`}),(0,L.jsx)(`th`,{scope:`col`,className:U.providerCol,children:`Provider`}),(0,L.jsx)(`th`,{scope:`col`,className:U.tokensCol,children:(0,L.jsxs)(`button`,{type:`button`,className:U.sortHeader,onClick:()=>ne(`tokens`),children:[`Tokens in/out`,O(`tokens`)]})}),(0,L.jsx)(`th`,{scope:`col`,className:U.costCol,children:(0,L.jsxs)(`button`,{type:`button`,className:U.sortHeader,onClick:()=>ne(`estCostUsd`),children:[`Est cost`,O(`estCostUsd`)]})}),(0,L.jsx)(`th`,{scope:`col`,className:U.stepsCol,children:(0,L.jsxs)(`button`,{type:`button`,className:U.sortHeader,onClick:()=>ne(`steps`),children:[`Steps`,O(`steps`)]})}),(0,L.jsx)(`th`,{scope:`col`,className:U.createdCol,children:(0,L.jsxs)(`button`,{type:`button`,className:U.sortHeader,onClick:()=>ne(`createdAt`),children:[`Created`,O(`createdAt`)]})})]})}),(0,L.jsx)(`tbody`,{children:D.map((e,t)=>(0,L.jsxs)(`tr`,{ref:t=>{t?a.current.set(e.id,t):a.current.delete(e.id)},tabIndex:t===r?0:-1,onFocus:()=>i(t),"aria-current":t===r?`true`:void 0,className:U.row,children:[(0,L.jsx)(`td`,{children:(0,L.jsx)(kr,{to:`/work/runs/${e.id}`,"data-focus-key":`run-${e.id}`,className:U.goalLink,title:e.goal,tabIndex:-1,children:e.goal})}),(0,L.jsx)(`td`,{children:(0,L.jsx)(E,{status:e.status})}),(0,L.jsx)(`td`,{children:e.engine}),(0,L.jsx)(`td`,{children:e.provider}),(0,L.jsxs)(`td`,{className:U.numeric,children:[e.usage.tokensIn.toLocaleString(),` / `,e.usage.tokensOut.toLocaleString()]}),(0,L.jsxs)(`td`,{className:U.numeric,children:[`$`,e.usage.estCostUsd.toFixed(4)]}),(0,L.jsx)(`td`,{className:U.numeric,children:e.steps.length}),(0,L.jsx)(`td`,{className:U.date,children:Co(e.createdAt)})]},e.id))})]})})]})}var W={view:`_view_16nop_1`,header:`_header_16nop_8`,eyebrow:`_eyebrow_16nop_16`,title:`_title_16nop_22`,freshness:`_freshness_16nop_29`,metaGrid:`_metaGrid_16nop_35`,numeric:`_numeric_16nop_55`,section:`_section_16nop_59`,sectionTitle:`_sectionTitle_16nop_65`,resultText:`_resultText_16nop_70`,taskList:`_taskList_16nop_79`,taskItem:`_taskItem_16nop_85`,taskHeader:`_taskHeader_16nop_98`,taskId:`_taskId_16nop_105`,taskGoal:`_taskGoal_16nop_111`,taskDeps:`_taskDeps_16nop_116`,depLink:`_depLink_16nop_122`,depMissing:`_depMissing_16nop_127`,taskError:`_taskError_16nop_132`,taskUsage:`_taskUsage_16nop_141`,stepList:`_stepList_16nop_148`,stepItem:`_stepItem_16nop_155`,stepTs:`_stepTs_16nop_164`,stepKind:`_stepKind_16nop_170`,stepTask:`_stepTask_16nop_176`,stepSummary:`_stepSummary_16nop_180`,empty:`_empty_16nop_185`,error:`_error_16nop_190`};function To(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Eo(e){return`task-${encodeURIComponent(e)}`}function Do(){let{id:e}=yn(),t=(0,M.useRef)(null);ke(`/work/runs/${e??``}`,t);let n=v(ne(e??``));if(!e)return(0,L.jsx)(`div`,{className:W.view,children:(0,L.jsx)(`p`,{className:W.error,role:`alert`,children:`No run id in URL.`})});if(n.status===`loading`)return(0,L.jsxs)(`div`,{ref:t,className:W.view,children:[(0,L.jsx)(m,{width:`60%`}),(0,L.jsx)(m,{width:`30%`}),(0,L.jsx)(m,{width:`80%`})]});if(n.status===`error`||!n.data)return(0,L.jsx)(`div`,{ref:t,className:W.view,children:(0,L.jsx)(`p`,{className:W.error,role:`alert`,children:n.error?.message??`Run ${e} not found.`})});let r=n.data,i=new Map(r.tasks.map(e=>[e.id,e]));return(0,L.jsxs)(`div`,{ref:t,className:W.view,children:[(0,L.jsxs)(`header`,{className:W.header,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`p`,{className:W.eyebrow,children:[`Run `,r.id]}),(0,L.jsx)(`h1`,{className:W.title,children:r.goal})]}),(0,L.jsxs)(`div`,{className:W.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,L.jsx)(A,{}):null,(0,L.jsx)(E,{status:r.status})]})]}),(0,L.jsxs)(`dl`,{className:W.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Engine`}),(0,L.jsx)(`dd`,{children:r.engine})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Provider`}),(0,L.jsx)(`dd`,{children:r.provider})]}),r.engineModel?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Model`}),(0,L.jsx)(`dd`,{children:r.engineModel})]}):null,(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Tokens in / out`}),(0,L.jsxs)(`dd`,{className:W.numeric,children:[r.usage.tokensIn.toLocaleString(),` / `,r.usage.tokensOut.toLocaleString()]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Est cost`}),(0,L.jsxs)(`dd`,{className:W.numeric,children:[`$`,r.usage.estCostUsd.toFixed(4)]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Steps`}),(0,L.jsx)(`dd`,{className:W.numeric,children:r.usage.steps})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Budget (tokens / steps)`}),(0,L.jsxs)(`dd`,{className:W.numeric,children:[r.budget.maxTokens.toLocaleString(),` / `,r.budget.maxSteps]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Created`}),(0,L.jsx)(`dd`,{children:To(r.createdAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Updated`}),(0,L.jsx)(`dd`,{children:To(r.updatedAt)})]}),r.terminationReason?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Termination reason`}),(0,L.jsx)(`dd`,{children:r.terminationReason})]}):null]}),r.result?(0,L.jsxs)(`section`,{className:W.section,children:[(0,L.jsx)(`h2`,{className:W.sectionTitle,children:`Result`}),(0,L.jsx)(`p`,{className:W.resultText,children:r.result})]}):null,(0,L.jsxs)(`section`,{className:W.section,children:[(0,L.jsxs)(`h2`,{className:W.sectionTitle,children:[`Tasks (`,r.tasks.length,`)`]}),r.tasks.length===0?(0,L.jsx)(`p`,{className:W.empty,children:`No tasks recorded.`}):(0,L.jsx)(`ul`,{className:W.taskList,children:r.tasks.map(e=>(0,L.jsxs)(`li`,{id:Eo(e.id),className:W.taskItem,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:W.taskHeader,children:[(0,L.jsx)(`span`,{className:W.taskId,children:e.id}),(0,L.jsx)(E,{status:e.status})]}),(0,L.jsx)(`p`,{className:W.taskGoal,children:e.goal}),e.deps.length>0?(0,L.jsxs)(`p`,{className:W.taskDeps,children:[`depends on:`,` `,e.deps.map((e,t)=>(0,L.jsxs)(`span`,{children:[t>0?`, `:``,i.has(e)?(0,L.jsx)(`a`,{href:`#${Eo(e)}`,className:W.depLink,children:e}):(0,L.jsxs)(`span`,{className:W.depMissing,children:[e,` (unresolved)`]})]},e))]}):null,e.error?(0,L.jsx)(`p`,{className:W.taskError,role:`alert`,children:e.error}):null,e.usage?(0,L.jsxs)(`p`,{className:W.taskUsage,children:[e.usage.tokensIn.toLocaleString(),` / `,e.usage.tokensOut.toLocaleString(),` tokens · $`,e.usage.estCostUsd.toFixed(4)]}):null]},e.id))})]}),(0,L.jsxs)(`section`,{className:W.section,children:[(0,L.jsxs)(`h2`,{className:W.sectionTitle,children:[`Step log (`,r.steps.length,`)`]}),r.steps.length===0?(0,L.jsx)(`p`,{className:W.empty,children:`No steps recorded.`}):(0,L.jsx)(`ol`,{className:W.stepList,children:r.steps.map((e,t)=>(0,L.jsxs)(`li`,{className:W.stepItem,children:[(0,L.jsx)(`span`,{className:W.stepTs,children:To(e.ts)}),(0,L.jsx)(`span`,{className:W.stepKind,children:e.kind}),(0,L.jsx)(`span`,{className:W.stepTask,children:e.taskId?(0,L.jsx)(`a`,{href:`#${Eo(e.taskId)}`,className:W.depLink,children:e.taskId}):null}),(0,L.jsx)(`span`,{className:W.stepSummary,children:e.summary})]},`${e.ts}-${t}`))})]})]})}var G={view:`_view_1kj6a_1`,header:`_header_1kj6a_8`,title:`_title_1kj6a_16`,freshness:`_freshness_1kj6a_22`,count:`_count_1kj6a_28`,filters:`_filters_1kj6a_34`,field:`_field_1kj6a_45`,fieldLabel:`_fieldLabel_1kj6a_51`,input:`_input_1kj6a_56`,select:`_select_1kj6a_57`,listWrap:`_listWrap_1kj6a_73`,listHeader:`_listHeader_1kj6a_80`,sortHeader:`_sortHeader_1kj6a_90`,list:`_list_1kj6a_73`,item:`_item_1kj6a_112`,goalLink:`_goalLink_1kj6a_124`,goalText:`_goalText_1kj6a_140`,burndown:`_burndown_1kj6a_150`,burndownTrack:`_burndownTrack_1kj6a_156`,burndownFill:`_burndownFill_1kj6a_164`,burndownLabel:`_burndownLabel_1kj6a_170`,numeric:`_numeric_1kj6a_177`,date:`_date_1kj6a_184`,empty:`_empty_1kj6a_191`,error:`_error_1kj6a_198`};function Oo(e){return e.tasks.filter(e=>e.status===`done`).length}function ko(e){return Math.max(e.plan?.tasks.length??0,e.tasks.length)}function Ao(e){return e.usage??{tokensIn:0,tokensOut:0,estCostUsd:0}}function jo(e){let t=Ao(e);return t.tokensIn+t.tokensOut}function Mo(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function No(){let e=(0,M.useRef)(null);ke(`/work/swarms`,e);let t=v(re),n=(0,M.useMemo)(()=>t.data??[],[t.data]),[r,i]=(0,M.useState)(``),[a,o]=(0,M.useState)(`all`),[s,c]=(0,M.useState)(`createdAt`),[u,d]=(0,M.useState)(`desc`),f=(0,M.useMemo)(()=>Array.from(new Set(n.map(e=>e.status))).sort(),[n]),p=(0,M.useMemo)(()=>{let e=n.filter(e=>{if(a!==`all`&&e.status!==a)return!1;if(!r.trim())return!0;let t=r.trim().toLowerCase();return e.id.toLowerCase().includes(t)||e.goal.toLowerCase().includes(t)});return e=[...e].sort((e,t)=>{let n=0;switch(s){case`createdAt`:n=e.createdAt.localeCompare(t.createdAt);break;case`updatedAt`:n=e.updatedAt.localeCompare(t.updatedAt);break;case`progress`:n=(ko(e)>0?Oo(e)/ko(e):0)-(ko(t)>0?Oo(t)/ko(t):0);break;case`tokens`:n=jo(e)-jo(t);break;case`estCostUsd`:n=Ao(e).estCostUsd-Ao(t).estCostUsd}return u===`asc`?n:-n}),e},[n,a,r,s,u]);function m(e){e===s?d(e=>e===`asc`?`desc`:`asc`):(c(e),d(`desc`))}function h(e){return e===s?u===`asc`?` ↑`:` ↓`:``}return(0,L.jsxs)(`div`,{ref:e,className:G.view,children:[(0,L.jsxs)(`header`,{className:G.header,children:[(0,L.jsx)(`h1`,{className:G.title,children:`Swarms`}),(0,L.jsxs)(`div`,{className:G.freshness,"aria-live":`polite`,children:[t.status===`refreshing`?(0,L.jsx)(A,{}):null,(0,L.jsxs)(`span`,{className:G.count,children:[p.length,` of `,n.length,` swarms`]})]})]}),(0,L.jsxs)(`form`,{className:G.filters,role:`search`,"aria-label":`Filter swarms`,onSubmit:e=>e.preventDefault(),children:[(0,L.jsxs)(`label`,{className:G.field,children:[(0,L.jsx)(`span`,{className:G.fieldLabel,children:`Search`}),(0,L.jsx)(`input`,{type:`text`,className:G.input,placeholder:`goal or swarm id`,value:r,onChange:e=>i(e.target.value)})]}),(0,L.jsxs)(`label`,{className:G.field,children:[(0,L.jsx)(`span`,{className:G.fieldLabel,children:`Status`}),(0,L.jsxs)(`select`,{className:G.select,value:a,onChange:e=>o(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),f.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))]})]})]}),t.status===`loading`?(0,L.jsxs)(`div`,{className:G.listWrap,children:[(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{})]}):t.status===`error`?(0,L.jsx)(`div`,{className:G.error,role:`alert`,children:t.error?.message??`Failed to load swarms.`}):p.length===0?(0,L.jsx)(`p`,{className:G.empty,children:`No swarms match the current filters.`}):(0,L.jsxs)(`div`,{className:G.listWrap,children:[(0,L.jsxs)(`div`,{className:G.listHeader,children:[(0,L.jsx)(`span`,{children:`Goal`}),(0,L.jsxs)(`button`,{type:`button`,className:G.sortHeader,onClick:()=>m(`progress`),children:[`Progress`,h(`progress`)]}),(0,L.jsxs)(`button`,{type:`button`,className:G.sortHeader,onClick:()=>m(`tokens`),children:[`Tokens`,h(`tokens`)]}),(0,L.jsxs)(`button`,{type:`button`,className:G.sortHeader,onClick:()=>m(`estCostUsd`),children:[`Cost`,h(`estCostUsd`)]}),(0,L.jsxs)(`button`,{type:`button`,className:G.sortHeader,onClick:()=>m(`createdAt`),children:[`Created`,h(`createdAt`)]})]}),(0,L.jsx)(`ul`,{className:G.list,children:p.map(e=>{let t=Oo(e),n=ko(e),r=n>0?Math.round(t/n*100):0,i=Ao(e);return(0,L.jsxs)(`li`,{className:G.item,children:[(0,L.jsxs)(kr,{to:`/work/swarms/${e.id}`,"data-focus-key":`swarm-${e.id}`,className:G.goalLink,title:e.goal,children:[(0,L.jsx)(`span`,{className:G.goalText,children:e.goal}),(0,L.jsx)(E,{status:e.status})]}),(0,L.jsxs)(`div`,{className:G.burndown,children:[(0,L.jsx)(`div`,{className:G.burndownTrack,children:(0,L.jsx)(`div`,{className:G.burndownFill,style:{width:`${r}%`}})}),(0,L.jsxs)(`span`,{className:G.burndownLabel,children:[t,`/`,n]})]}),(0,L.jsxs)(`span`,{className:G.numeric,children:[i.tokensIn.toLocaleString(),`/`,i.tokensOut.toLocaleString()]}),(0,L.jsxs)(`span`,{className:G.numeric,children:[`$`,i.estCostUsd.toFixed(4)]}),(0,L.jsx)(`span`,{className:G.date,children:Mo(e.createdAt)})]},e.id)})})]})]})}var Po={svg:`_svg_2w2xr_1`,phaseLabel:`_phaseLabel_2w2xr_7`,edge:`_edge_2w2xr_14`,arrowHead:`_arrowHead_2w2xr_19`,nodeLink:`_nodeLink_2w2xr_23`,nodeRect:`_nodeRect_2w2xr_26`,nodeId:`_nodeId_2w2xr_31`,nodeGoal:`_nodeGoal_2w2xr_37`,neutral:`_neutral_2w2xr_45`,statusDot:`_statusDot_2w2xr_49`,info:`_info_2w2xr_53`,running:`_running_2w2xr_61`,success:`_success_2w2xr_69`,warning:`_warning_2w2xr_77`,danger:`_danger_2w2xr_85`,unknown:`_unknown_2w2xr_93`,empty:`_empty_2w2xr_105`},Fo={scaffold:0,build:1,integrate:2,verify:3,review:4};function Io(e,t){let n=new Map;for(let t of e?.tasks??[])n.set(t.id,{id:t.id,phase:t.phase,goal:t.goal,deps:t.deps,status:`pending`});for(let e of t){let t=n.get(e.id);n.set(e.id,{id:e.id,phase:e.phase||t?.phase||`build`,goal:t?.goal??``,deps:t?.deps??[],status:e.status})}return Array.from(n.values())}function Lo(e,t){return e.length>t?`${e.slice(0,t-1)}…`:e}var Ro=140,zo=48,Bo=20;function Vo({tasks:e,taskAnchorPrefix:t=`dag-task`}){if(e.length===0)return(0,L.jsx)(`p`,{className:Po.empty,children:`No tasks in this swarm.`});let n=new Map;for(let t of e){let e=t.phase||`build`,r=n.get(e)??[];r.push(t),n.set(e,r)}let r=Array.from(n.keys()).sort((e,t)=>(Fo[e]??99)-(Fo[t]??99)),i=new Map,a=Bo;for(let e of r)i.set(e,a),a+=200;let o=a+Bo,s=new Map;for(let e of r){let t=Bo;for(let r of n.get(e)){let n=i.get(e);s.set(r.id,{x:n,y:t,cx:n+Ro/2,cy:t+zo/2}),t+=68}}let c=Math.max(...Array.from(s.values()).map(e=>e.y+zo))+40,l=[];for(let t of e){let e=s.get(t.id);if(e)for(let n of t.deps){let r=s.get(n);if(!r)continue;let i=r.x+Ro,a=r.cy,o=e.x,c=e.cy,u=(i+o)/2;l.push({key:`${n}->${t.id}`,d:`M ${i} ${a} C ${u} ${a}, ${u} ${c}, ${o} ${c}`})}}return(0,L.jsxs)(`svg`,{width:o,height:c,viewBox:`0 0 ${o} ${c}`,className:Po.svg,role:`img`,"aria-label":`Swarm task dependency graph`,children:[(0,L.jsx)(`defs`,{children:(0,L.jsx)(`marker`,{id:`dag-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`3`,orient:`auto`,children:(0,L.jsx)(`path`,{d:`M0,0 L0,6 L8,3 z`,className:Po.arrowHead})})}),r.map(e=>(0,L.jsx)(`text`,{x:i.get(e)+Ro/2,y:14,textAnchor:`middle`,className:Po.phaseLabel,children:e},e)),l.map(e=>(0,L.jsx)(`path`,{d:e.d,className:Po.edge,fill:`none`,markerEnd:`url(#dag-arrow)`},e.key)),e.map(e=>{let n=s.get(e.id);if(!n)return null;let r=ee(e.status);return(0,L.jsx)(`g`,{transform:`translate(${n.x},${n.y})`,children:(0,L.jsxs)(`a`,{href:`#${t}-${encodeURIComponent(e.id)}`,className:Po.nodeLink,children:[(0,L.jsx)(`title`,{children:`${e.id} — ${e.goal} (${e.status})`}),(0,L.jsx)(`rect`,{width:Ro,height:zo,rx:6,ry:6,className:`${Po.nodeRect} ${Po[r]}`}),(0,L.jsx)(`circle`,{cx:10,cy:zo/2,r:4,className:`${Po.statusDot} ${Po[r]}`}),(0,L.jsx)(`text`,{x:20,y:17,className:Po.nodeId,children:Lo(e.id,18)}),(0,L.jsx)(`text`,{x:20,y:33,className:Po.nodeGoal,children:Lo(e.goal,20)})]})},e.id)})]})}var K={view:`_view_19up6_1`,header:`_header_19up6_8`,eyebrow:`_eyebrow_19up6_16`,title:`_title_19up6_22`,freshness:`_freshness_19up6_29`,burndownRow:`_burndownRow_19up6_35`,burndownTrack:`_burndownTrack_19up6_41`,burndownFill:`_burndownFill_19up6_49`,burndownLabel:`_burndownLabel_19up6_55`,metaGrid:`_metaGrid_19up6_62`,numeric:`_numeric_19up6_80`,mono:`_mono_19up6_84`,section:`_section_19up6_90`,sectionTitle:`_sectionTitle_19up6_96`,resultText:`_resultText_19up6_101`,escalationList:`_escalationList_19up6_110`,escalationItem:`_escalationItem_19up6_115`,escalationJson:`_escalationJson_19up6_120`,dagWrap:`_dagWrap_19up6_130`,taskList:`_taskList_19up6_138`,taskItem:`_taskItem_19up6_144`,taskHeader:`_taskHeader_19up6_157`,taskId:`_taskId_19up6_163`,taskPhase:`_taskPhase_19up6_169`,taskGoal:`_taskGoal_19up6_176`,taskDeps:`_taskDeps_19up6_181`,error:`_error_19up6_188`},Ho=`dag-task`;function Uo(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Wo(){let{id:e}=yn(),t=(0,M.useRef)(null);ke(`/work/swarms/${e??``}`,t);let n=v(ye(e??``));if(!e)return(0,L.jsx)(`div`,{className:K.view,children:(0,L.jsx)(`p`,{className:K.error,role:`alert`,children:`No swarm id in URL.`})});if(n.status===`loading`)return(0,L.jsxs)(`div`,{ref:t,className:K.view,children:[(0,L.jsx)(m,{width:`60%`}),(0,L.jsx)(m,{width:`30%`}),(0,L.jsx)(m,{width:`80%`})]});if(n.status===`error`||!n.data)return(0,L.jsx)(`div`,{ref:t,className:K.view,children:(0,L.jsx)(`p`,{className:K.error,role:`alert`,children:n.error?.message??`Swarm ${e} not found.`})});let r=n.data,i=r.tasks.filter(e=>e.status===`done`).length,a=Math.max(r.plan?.tasks.length??0,r.tasks.length),o=a>0?Math.round(i/a*100):0,s=Io(r.plan,r.tasks),c=r.usage??{tokensIn:0,tokensOut:0,estCostUsd:0};return(0,L.jsxs)(`div`,{ref:t,className:K.view,children:[(0,L.jsxs)(`header`,{className:K.header,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`p`,{className:K.eyebrow,children:[`Swarm `,r.id]}),(0,L.jsx)(`h1`,{className:K.title,children:r.goal})]}),(0,L.jsxs)(`div`,{className:K.freshness,"aria-live":`polite`,children:[n.status===`refreshing`?(0,L.jsx)(A,{}):null,(0,L.jsx)(E,{status:r.status})]})]}),(0,L.jsxs)(`div`,{className:K.burndownRow,children:[(0,L.jsx)(`div`,{className:K.burndownTrack,children:(0,L.jsx)(`div`,{className:K.burndownFill,style:{width:`${o}%`}})}),(0,L.jsxs)(`span`,{className:K.burndownLabel,children:[i,`/`,a,` tasks done (`,o,`%)`]})]}),(0,L.jsxs)(`dl`,{className:K.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Tokens in / out`}),(0,L.jsxs)(`dd`,{className:K.numeric,children:[c.tokensIn.toLocaleString(),` / `,c.tokensOut.toLocaleString()]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Est cost`}),(0,L.jsxs)(`dd`,{className:K.numeric,children:[`$`,c.estCostUsd.toFixed(4)]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Parallelism`}),(0,L.jsx)(`dd`,{className:K.numeric,children:r.parallel})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Created`}),(0,L.jsx)(`dd`,{children:Uo(r.createdAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Updated`}),(0,L.jsx)(`dd`,{children:Uo(r.updatedAt)})]}),r.project?(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Project`}),(0,L.jsx)(`dd`,{className:K.mono,children:r.project})]}):null]}),r.escalations&&r.escalations.length>0?(0,L.jsxs)(`section`,{className:K.section,children:[(0,L.jsxs)(`h2`,{className:K.sectionTitle,children:[`Escalations (`,r.escalations.length,`)`]}),(0,L.jsx)(`ul`,{className:K.escalationList,children:r.escalations.map((e,t)=>(0,L.jsx)(`li`,{className:K.escalationItem,children:(0,L.jsx)(`pre`,{className:K.escalationJson,children:JSON.stringify(e,null,2)})},t))})]}):null,r.result?(0,L.jsxs)(`section`,{className:K.section,children:[(0,L.jsx)(`h2`,{className:K.sectionTitle,children:`Result`}),(0,L.jsx)(`p`,{className:K.resultText,children:r.result})]}):null,(0,L.jsxs)(`section`,{className:K.section,children:[(0,L.jsx)(`h2`,{className:K.sectionTitle,children:`Task graph`}),(0,L.jsx)(`div`,{className:K.dagWrap,children:(0,L.jsx)(Vo,{tasks:s,taskAnchorPrefix:Ho})})]}),(0,L.jsxs)(`section`,{className:K.section,children:[(0,L.jsxs)(`h2`,{className:K.sectionTitle,children:[`Tasks (`,s.length,`)`]}),(0,L.jsx)(`ul`,{className:K.taskList,children:s.map(e=>(0,L.jsxs)(`li`,{id:`${Ho}-${e.id}`,"data-focus-key":`swarm-task-${e.id}`,className:K.taskItem,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:K.taskHeader,children:[(0,L.jsx)(`span`,{className:K.taskId,children:e.id}),(0,L.jsx)(`span`,{className:K.taskPhase,children:e.phase}),(0,L.jsx)(E,{status:e.status})]}),(0,L.jsx)(`p`,{className:K.taskGoal,children:e.goal}),e.deps.length>0?(0,L.jsxs)(`p`,{className:K.taskDeps,children:[`depends on: `,e.deps.join(`, `)]}):null]},e.id))})]})]})}var q={view:`_view_1bwoy_1`,header:`_header_1bwoy_8`,title:`_title_1bwoy_16`,freshness:`_freshness_1bwoy_22`,callout:`_callout_1bwoy_28`,calloutTitle:`_calloutTitle_1bwoy_39`,calloutBody:`_calloutBody_1bwoy_44`,calloutCommand:`_calloutCommand_1bwoy_48`,metaGrid:`_metaGrid_1bwoy_59`,section:`_section_1bwoy_77`,sectionTitle:`_sectionTitle_1bwoy_83`,serviceError:`_serviceError_1bwoy_88`,tickTableWrap:`_tickTableWrap_1bwoy_96`,tickTable:`_tickTable_1bwoy_96`,date:`_date_1bwoy_124`,numeric:`_numeric_1bwoy_130`,dryRun:`_dryRun_1bwoy_135`,empty:`_empty_1bwoy_140`,error:`_error_1bwoy_145`},Go={missing:`No daemon state file has been written yet — the daemon may never have run on this machine.`,malformed:`The daemon state file exists but failed to parse.`,unreadable:`The daemon state file could not be read. This is also the exact signal produced when a state-recovery marker is present (a prior repair left a quarantine in progress) — the API does not distinguish the two cases, so treat this as "inspect before trusting displayed daemon state."`,inconsistent:`The daemon state file and the live lock/activity check disagree — the daemon may be mid-restart.`,unavailable:`The daemon state read path itself failed (I/O error or similar).`};function Ko(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function qo({quality:e}){let t=e.reason,n=Go[t]??`Daemon state could not be verified.`;return(0,L.jsxs)(`section`,{className:q.callout,role:`alert`,children:[(0,L.jsxs)(`p`,{className:q.calloutTitle,children:[`Daemon state is unknown (`,t,`)`]}),(0,L.jsx)(`p`,{className:q.calloutBody,children:n}),(0,L.jsx)(`p`,{className:q.calloutBody,children:`Real remedy — preview or execute a state recovery from a terminal on this machine:`}),(0,L.jsx)(`pre`,{className:q.calloutCommand,children:`ashlr daemon recover-state --dry-run --expected-sha256 <sha256> [--json]
5
+ ashlr daemon recover-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> [--json]`}),(0,L.jsx)(`p`,{className:q.calloutBody,children:`If a quarantine already exists and needs resolving instead:`}),(0,L.jsx)(`pre`,{className:q.calloutCommand,children:`ashlr daemon resolve-state --dry-run --quarantine-plan-id <uuid> --quarantine-receipt-sha256 <sha256> [--json]
6
+ ashlr daemon resolve-state --execute --plan-id <uuid> --plan-sha256 <sha256> --authorize <plan-sha256> --confirm <plan-sha256> [--json]`})]})}function Jo(){let e=(0,M.useRef)(null);ke(`/control/daemon`,e);let t=v(me),n=v(le),r=t.data?.daemon,i=n.data;return(0,L.jsxs)(`div`,{ref:e,className:q.view,children:[(0,L.jsxs)(`header`,{className:q.header,children:[(0,L.jsx)(`h1`,{className:q.title,children:`Daemon`}),(0,L.jsxs)(`div`,{className:q.freshness,"aria-live":`polite`,children:[t.status===`refreshing`||n.status===`refreshing`?(0,L.jsx)(A,{}):null,r?(0,L.jsx)(T,{quality:r.sourceQuality,label:`daemon state`,children:(0,L.jsx)(E,{status:r.running?`running`:`pending`,children:r.running?`running`:`stopped`})}):null]})]}),t.status===`loading`?(0,L.jsx)(m,{width:`60%`}):t.status===`error`||!r?(0,L.jsx)(`p`,{className:q.error,role:`alert`,children:t.error?.message??`Failed to load control snapshot.`}):(0,L.jsxs)(L.Fragment,{children:[w(r.sourceQuality)?null:(0,L.jsx)(qo,{quality:r.sourceQuality}),(0,L.jsxs)(`dl`,{className:q.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Runtime state`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`runtime state`,children:r.runtimeState})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`PID`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`pid`,children:r.pid??`—`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Last tick`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`last tick`,children:Ko(r.lastTickAt)})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Today's spend`}),(0,L.jsx)(`dd`,{children:(0,L.jsxs)(T,{quality:r.sourceQuality,label:`spend`,children:[`$`,r.todaySpentUsd.toFixed(2)]})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Direction mode`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`direction mode`,children:r.activeDirectionMode??`none`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Direction reason`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`direction reason`,children:r.activeDirectionReason??`—`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Autonomy control loop`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`autonomy control loop`,children:r.autonomyControlLoop?`enabled`:`disabled`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Autonomy control mode`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:r.sourceQuality,label:`autonomy control mode`,children:r.autonomyControlMode})})]})]}),(0,L.jsxs)(`section`,{className:q.section,children:[(0,L.jsx)(`h2`,{className:q.sectionTitle,children:`OS service`}),(0,L.jsxs)(`dl`,{className:q.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Registration state`}),(0,L.jsx)(`dd`,{children:r.service.registrationState})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Installed`}),(0,L.jsx)(`dd`,{children:r.service.installed?`yes`:`no`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Running`}),(0,L.jsx)(`dd`,{children:r.service.running?`yes`:`no`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Runtime state`}),(0,L.jsx)(`dd`,{children:r.service.runtimeState??`unknown`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Platform`}),(0,L.jsx)(`dd`,{children:r.service.platformSpec})]})]}),r.service.errorLog?(0,L.jsx)(`p`,{className:q.serviceError,role:`alert`,children:r.service.errorLog}):null]})]}),(0,L.jsxs)(`section`,{className:q.section,children:[(0,L.jsx)(`h2`,{className:q.sectionTitle,children:`Recent ticks`}),n.status===`loading`?(0,L.jsx)(m,{width:`80%`}):!i||!i.ticks||i.ticks.length===0?(0,L.jsx)(`p`,{className:q.empty,children:`No tick history available.`}):(0,L.jsx)(`div`,{className:q.tickTableWrap,children:(0,L.jsxs)(`table`,{className:q.tickTable,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Time`}),(0,L.jsx)(`th`,{scope:`col`,children:`Reason`}),(0,L.jsx)(`th`,{scope:`col`,children:`Items`}),(0,L.jsx)(`th`,{scope:`col`,children:`Proposals`}),(0,L.jsx)(`th`,{scope:`col`,children:`Spend`})]})}),(0,L.jsx)(`tbody`,{children:[...i.ticks].reverse().slice(0,20).map((e,t)=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{className:q.date,children:Ko(e.ts)}),(0,L.jsxs)(`td`,{children:[e.reason,e.dryRun?(0,L.jsx)(`span`,{className:q.dryRun,children:` (dry-run)`}):null]}),(0,L.jsx)(`td`,{className:q.numeric,children:e.itemsConsidered}),(0,L.jsx)(`td`,{className:q.numeric,children:e.proposalsCreated}),(0,L.jsxs)(`td`,{className:q.numeric,children:[`$`,e.spentUsd.toFixed(4)]})]},`${e.ts}-${t}`))})]})})]})]})}var J={view:`_view_ssrhq_1`,header:`_header_ssrhq_8`,title:`_title_ssrhq_14`,freshness:`_freshness_ssrhq_20`,section:`_section_ssrhq_26`,sectionTitle:`_sectionTitle_ssrhq_32`,killSwitchRow:`_killSwitchRow_ssrhq_37`,pauseButton:`_pauseButton_ssrhq_47`,resumeButton:`_resumeButton_ssrhq_65`,mutationError:`_mutationError_ssrhq_83`,metaGrid:`_metaGrid_ssrhq_91`,numeric:`_numeric_ssrhq_109`,lockWarning:`_lockWarning_ssrhq_113`,tableWrap:`_tableWrap_ssrhq_117`,table:`_table_ssrhq_117`,mono:`_mono_ssrhq_144`,empty:`_empty_ssrhq_149`,error:`_error_ssrhq_154`,confirmBody:`_confirmBody_ssrhq_162`,confirmActions:`_confirmActions_ssrhq_168`,cancelButton:`_cancelButton_ssrhq_174`,confirmButton:`_confirmButton_ssrhq_186`};function Yo(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Xo(){let e=(0,M.useRef)(null);ke(`/control/fleet`,e);let t=v(he),n=v(fe),r=f(),[i,a]=(0,M.useState)(null),[o,s]=(0,M.useState)(!1),[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(!1),[p,h]=(0,M.useState)(null);async function g(e){d(!0),h(null);try{e===`pause`?await xe():await be()}catch(e){h(e instanceof Error?e.message:String(e))}finally{d(!1),a(null)}}function _(e){h(null),a(e),s(!0)}function y(){s(!1),r.hasHold?i&&g(i):l(!0)}(0,M.useEffect)(()=>{c||i&&(r.hasHold?g(i):a(null))},[c]);let b=t.data,x=b?.killSwitch,C=x?{sourceState:x.sourceState,complete:x.sourceState===`healthy`,reason:x.reason}:void 0,w=b?.killed===!0;return(0,L.jsxs)(`div`,{ref:e,className:J.view,children:[(0,L.jsxs)(`header`,{className:J.header,children:[(0,L.jsx)(`h1`,{className:J.title,children:`Fleet`}),(0,L.jsx)(`div`,{className:J.freshness,"aria-live":`polite`,children:t.status===`refreshing`||n.status===`refreshing`?(0,L.jsx)(A,{}):null})]}),t.status===`loading`?(0,L.jsx)(m,{width:`60%`}):t.status===`error`||!b?(0,L.jsx)(`p`,{className:J.error,role:`alert`,children:t.error?.message??`Failed to load fleet status.`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`section`,{className:J.section,children:[(0,L.jsx)(`h2`,{className:J.sectionTitle,children:`Kill switch`}),(0,L.jsx)(`div`,{className:J.killSwitchRow,children:(0,L.jsx)(T,{quality:C,label:`kill switch`,renderControl:()=>(0,L.jsx)(`button`,{type:`button`,className:w?J.resumeButton:J.pauseButton,onClick:()=>_(w?`resume`:`pause`),disabled:u,children:u?`Working…`:w?`Resume fleet`:`Pause fleet`}),children:(0,L.jsx)(E,{status:w?`paused`:`running`,children:w?`engaged — fleet paused`:`clear — fleet active`})})}),p?(0,L.jsx)(`p`,{className:J.mutationError,role:`alert`,children:p}):null]}),(0,L.jsxs)(`section`,{className:J.section,children:[(0,L.jsx)(`h2`,{className:J.sectionTitle,children:`Queue depth`}),(0,L.jsxs)(`dl`,{className:J.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Backlog items`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.backlogItems})]}),b.queue.eligibleBacklogItems===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Eligible`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.eligibleBacklogItems})]}),b.queue.cooldownItems===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Cooldown`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.cooldownItems})]}),b.queue.pendingItems===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Pending`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.pendingItems})]}),b.queue.nextEligibleAt===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Next eligible`}),(0,L.jsx)(`dd`,{children:Yo(b.queue.nextEligibleAt)})]})]})]}),(0,L.jsxs)(`section`,{className:J.section,children:[(0,L.jsx)(`h2`,{className:J.sectionTitle,children:`Lease health`}),b.queue.shared?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`dl`,{className:J.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Active claims`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.shared.activeClaims})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Owned by this machine`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.shared.ownedClaims})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Reclaimable (expired)`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.shared.reclaimableClaims})]}),b.queue.shared.executingClaims===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Executing`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.shared.executingClaims})]}),b.queue.shared.ambiguousClaims===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Ambiguous (needs reconciliation)`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b.queue.shared.ambiguousClaims})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Next lease expiry`}),(0,L.jsx)(`dd`,{children:Yo(b.queue.shared.nextLeaseExpiryAt)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Advisory lock`}),(0,L.jsxs)(`dd`,{children:[b.queue.shared.lock.present?b.queue.shared.lock.stale?`present, stale`:`present, healthy`:`absent`,b.queue.shared.lock.recoveryRequired?(0,L.jsx)(`span`,{className:J.lockWarning,children:` — recovery required`}):null]})]})]}),b.queue.shared.claimsByMachine.length>0?(0,L.jsx)(`div`,{className:J.tableWrap,children:(0,L.jsxs)(`table`,{className:J.table,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Machine`}),(0,L.jsx)(`th`,{scope:`col`,children:`Active`}),(0,L.jsx)(`th`,{scope:`col`,children:`Expired`}),(0,L.jsx)(`th`,{scope:`col`,children:`Executing`})]})}),(0,L.jsx)(`tbody`,{children:b.queue.shared.claimsByMachine.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{className:J.mono,children:e.machineId}),(0,L.jsx)(`td`,{className:J.numeric,children:e.active}),(0,L.jsx)(`td`,{className:J.numeric,children:e.expired}),(0,L.jsx)(`td`,{className:J.numeric,children:e.executing??`—`})]},e.machineId))})]})}):null]}):(0,L.jsx)(`p`,{className:J.empty,children:`Shared fleet queue is not in use on this deployment.`})]})]}),(0,L.jsxs)(`section`,{className:J.section,children:[(0,L.jsx)(`h2`,{className:J.sectionTitle,children:`Recent activity`}),n.status===`loading`?(0,L.jsx)(m,{width:`70%`}):n.status===`error`||!n.data?(0,L.jsx)(`p`,{className:J.error,role:`alert`,children:n.error?.message??`Failed to load fleet activity.`}):(0,L.jsxs)(`dl`,{className:J.metaGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Cooldown items`}),(0,L.jsx)(`dd`,{className:J.numeric,children:n.data.cooldownCount})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Engines ready`}),(0,L.jsxs)(`dd`,{className:J.numeric,children:[n.data.engineReadiness.filter(e=>e.installed&&e.authed===!0).length,` /`,` `,n.data.engineReadiness.length]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Recent auto-merges`}),(0,L.jsx)(`dd`,{className:J.numeric,children:b?.merges.recent??`—`})]})]})]}),(0,L.jsxs)(S,{open:o,onClose:()=>{s(!1),a(null)},titleId:`fleet-kill-switch-confirm`,title:i===`resume`?`Resume the fleet?`:`Pause the fleet?`,children:[(0,L.jsx)(`p`,{className:J.confirmBody,children:i===`resume`?`This clears the global kill switch. Autonomous dispatch will resume across the fleet.`:`This engages the global kill switch. Autonomous dispatch halts fleet-wide until explicitly resumed.`}),(0,L.jsxs)(`div`,{className:J.confirmActions,children:[(0,L.jsx)(`button`,{type:`button`,className:J.cancelButton,onClick:()=>{s(!1),a(null)},children:`Cancel`}),(0,L.jsx)(`button`,{type:`button`,className:J.confirmButton,onClick:y,children:i===`resume`?`Yes, resume`:`Yes, pause`})]})]}),(0,L.jsx)(we,{open:c,onClose:()=>l(!1),reason:i===`resume`?`Resuming the fleet requires the dispatch token.`:`Pausing the fleet requires the dispatch token.`})]})}var Y={view:`_view_1fet3_1`,header:`_header_1fet3_8`,title:`_title_1fet3_14`,freshness:`_freshness_1fet3_20`,unavailable:`_unavailable_1fet3_26`,counts:`_counts_1fet3_35`,countTile:`_countTile_1fet3_41`,countValue:`_countValue_1fet3_51`,countLabel:`_countLabel_1fet3_57`,critical:`_critical_1fet3_64`,high:`_high_1fet3_65`,medium:`_medium_1fet3_68`,low:`_low_1fet3_71`,filters:`_filters_1fet3_75`,field:`_field_1fet3_86`,fieldLabel:`_fieldLabel_1fet3_92`,input:`_input_1fet3_97`,select:`_select_1fet3_98`,tableWrap:`_tableWrap_1fet3_114`,table:`_table_1fet3_114`,mono:`_mono_1fet3_141`,empty:`_empty_1fet3_146`,error:`_error_1fet3_153`},Zo={critical:`danger`,high:`danger`,medium:`warning`,low:`neutral`},Qo={critical:0,high:1,medium:2,low:3};function $o(){let e=(0,M.useRef)(null);ke(`/control/security`,e);let t=v(me),n=t.data?.security,[r,i]=(0,M.useState)(``),[a,o]=(0,M.useState)(`all`),[s,c]=(0,M.useState)(`all`),l=(0,M.useMemo)(()=>Array.from(new Set((n?.findings??[]).map(e=>e.repo))).sort(),[n]),u=(0,M.useMemo)(()=>(n?.findings??[]).filter(e=>a===`all`||e.severity===a).filter(e=>s===`all`||e.repo===s).filter(e=>{if(!r.trim())return!0;let t=r.trim().toLowerCase();return e.title.toLowerCase().includes(t)||e.repo.toLowerCase().includes(t)}).sort((e,t)=>(Qo[e.severity]??9)-(Qo[t.severity]??9)),[n,a,s,r]);return(0,L.jsxs)(`div`,{ref:e,className:Y.view,children:[(0,L.jsxs)(`header`,{className:Y.header,children:[(0,L.jsx)(`h1`,{className:Y.title,children:`Security`}),(0,L.jsx)(`div`,{className:Y.freshness,"aria-live":`polite`,children:t.status===`refreshing`?(0,L.jsx)(A,{}):null})]}),t.status===`loading`?(0,L.jsx)(m,{width:`60%`}):t.status===`error`||!n?(0,L.jsx)(`p`,{className:Y.error,role:`alert`,children:t.error?.message??`Failed to load control snapshot.`}):n.available?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:Y.counts,children:[(0,L.jsxs)(`div`,{className:`${Y.countTile} ${Y.critical}`,children:[(0,L.jsx)(`span`,{className:Y.countValue,children:n.counts.critical}),(0,L.jsx)(`span`,{className:Y.countLabel,children:`Critical`})]}),(0,L.jsxs)(`div`,{className:`${Y.countTile} ${Y.high}`,children:[(0,L.jsx)(`span`,{className:Y.countValue,children:n.counts.high}),(0,L.jsx)(`span`,{className:Y.countLabel,children:`High`})]}),(0,L.jsxs)(`div`,{className:`${Y.countTile} ${Y.medium}`,children:[(0,L.jsx)(`span`,{className:Y.countValue,children:n.counts.medium}),(0,L.jsx)(`span`,{className:Y.countLabel,children:`Medium`})]}),(0,L.jsxs)(`div`,{className:`${Y.countTile} ${Y.low}`,children:[(0,L.jsx)(`span`,{className:Y.countValue,children:n.counts.low}),(0,L.jsx)(`span`,{className:Y.countLabel,children:`Low`})]})]}),(0,L.jsxs)(`form`,{className:Y.filters,role:`search`,"aria-label":`Filter findings`,onSubmit:e=>e.preventDefault(),children:[(0,L.jsxs)(`label`,{className:Y.field,children:[(0,L.jsx)(`span`,{className:Y.fieldLabel,children:`Search`}),(0,L.jsx)(`input`,{type:`text`,className:Y.input,placeholder:`title or repo`,value:r,onChange:e=>i(e.target.value)})]}),(0,L.jsxs)(`label`,{className:Y.field,children:[(0,L.jsx)(`span`,{className:Y.fieldLabel,children:`Severity`}),(0,L.jsxs)(`select`,{className:Y.select,value:a,onChange:e=>o(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),(0,L.jsx)(`option`,{value:`critical`,children:`Critical`}),(0,L.jsx)(`option`,{value:`high`,children:`High`}),(0,L.jsx)(`option`,{value:`medium`,children:`Medium`}),(0,L.jsx)(`option`,{value:`low`,children:`Low`})]})]}),(0,L.jsxs)(`label`,{className:Y.field,children:[(0,L.jsx)(`span`,{className:Y.fieldLabel,children:`Repo`}),(0,L.jsxs)(`select`,{className:Y.select,value:s,onChange:e=>c(e.target.value),children:[(0,L.jsx)(`option`,{value:`all`,children:`All`}),l.map(e=>(0,L.jsx)(`option`,{value:e,children:e},e))]})]})]}),u.length===0?(0,L.jsx)(`p`,{className:Y.empty,children:`No findings match the current filters.`}):(0,L.jsx)(`div`,{className:Y.tableWrap,children:(0,L.jsxs)(`table`,{className:Y.table,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Severity`}),(0,L.jsx)(`th`,{scope:`col`,children:`Repo`}),(0,L.jsx)(`th`,{scope:`col`,children:`Finding`})]})}),(0,L.jsx)(`tbody`,{children:u.map((e,t)=>(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`td`,{children:(0,L.jsx)(E,{status:e.severity,tone:Zo[e.severity]??`neutral`})}),(0,L.jsx)(`td`,{className:Y.mono,children:e.repo}),(0,L.jsx)(`td`,{children:e.title})]},`${e.repo}-${e.title}-${t}`))})]})})]}):(0,L.jsx)(`p`,{className:Y.unavailable,children:`No cached security data available — the backlog is absent, empty, or has no security-source findings. This is not the same as "clean": it means binshield hasn't produced cached findings for this fleet yet.`})]})}var X={view:`_view_1yeql_1`,header:`_header_1yeql_8`,title:`_title_1yeql_14`,freshness:`_freshness_1yeql_20`,count:`_count_1yeql_26`,missionCard:`_missionCard_1yeql_31`,sectionTitle:`_sectionTitle_1yeql_41`,missionState:`_missionState_1yeql_49`,sourceGrid:`_sourceGrid_1yeql_54`,list:`_list_1yeql_68`,goalCard:`_goalCard_1yeql_74`,goalHeader:`_goalHeader_1yeql_88`,goalObjective:`_goalObjective_1yeql_95`,progressRow:`_progressRow_1yeql_100`,progressTrack:`_progressTrack_1yeql_106`,progressFill:`_progressFill_1yeql_114`,progressLabel:`_progressLabel_1yeql_120`,nextActionable:`_nextActionable_1yeql_127`,mono:`_mono_1yeql_132`,milestoneList:`_milestoneList_1yeql_136`,milestoneItem:`_milestoneItem_1yeql_142`,milestoneTitle:`_milestoneTitle_1yeql_149`,noMilestones:`_noMilestones_1yeql_153`,empty:`_empty_1yeql_158`,error:`_error_1yeql_165`};function es(){let e=(0,M.useRef)(null);ke(`/goals`,e);let t=v(k),n=v(te),r=t.data??[],i=n.data;return(0,L.jsxs)(`div`,{ref:e,className:X.view,children:[(0,L.jsxs)(`header`,{className:X.header,children:[(0,L.jsx)(`h1`,{className:X.title,children:`Goals`}),(0,L.jsxs)(`div`,{className:X.freshness,"aria-live":`polite`,children:[t.status===`refreshing`||n.status===`refreshing`?(0,L.jsx)(A,{}):null,(0,L.jsxs)(`span`,{className:X.count,children:[r.length,` goals`]})]})]}),n.status===`loading`?(0,L.jsx)(m,{width:`50%`}):n.status===`success`&&i?(0,L.jsxs)(`section`,{className:X.missionCard,children:[(0,L.jsx)(`h2`,{className:X.sectionTitle,children:`Mission state`}),(0,L.jsx)(`p`,{className:X.missionState,children:i.state}),(0,L.jsxs)(`dl`,{className:X.sourceGrid,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Briefing`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:i.sources.briefing??void 0,label:`briefing source`,children:`available`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Goals source`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:i.sources.goals??void 0,label:`goals source`,children:`available`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Enrollment`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:i.sources.enrollment??void 0,label:`enrollment source`,children:`available`})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Proposals`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(T,{quality:i.sources.proposals??void 0,label:`proposals source`,children:`available`})})]})]})]}):null,t.status===`loading`?(0,L.jsxs)(`div`,{className:X.list,children:[(0,L.jsx)(m,{width:`90%`}),(0,L.jsx)(m,{width:`70%`})]}):t.status===`error`?(0,L.jsx)(`p`,{className:X.error,role:`alert`,children:t.error?.message??`Failed to load goals.`}):r.length===0?(0,L.jsx)(`p`,{className:X.empty,children:`No active goals.`}):(0,L.jsx)(`ul`,{className:X.list,children:r.map(e=>{let t=Math.round((e.progress.fractionDone??0)*100);return(0,L.jsxs)(`li`,{className:X.goalCard,"data-focus-key":`goal-${e.id}`,tabIndex:0,children:[(0,L.jsxs)(`div`,{className:X.goalHeader,children:[(0,L.jsx)(`h3`,{className:X.goalObjective,children:e.objective}),(0,L.jsx)(E,{status:e.status})]}),(0,L.jsxs)(`div`,{className:X.progressRow,children:[(0,L.jsx)(`div`,{className:X.progressTrack,children:(0,L.jsx)(`div`,{className:X.progressFill,style:{width:`${t}%`}})}),(0,L.jsxs)(`span`,{className:X.progressLabel,children:[t,`%`]})]}),e.progress.nextActionableId?(0,L.jsxs)(`p`,{className:X.nextActionable,children:[`Next actionable milestone id: `,(0,L.jsx)(`span`,{className:X.mono,children:e.progress.nextActionableId})]}):null,e.milestones.length>0?(0,L.jsx)(`ol`,{className:X.milestoneList,children:[...e.milestones].sort((e,t)=>e.order-t.order).map(e=>(0,L.jsxs)(`li`,{className:X.milestoneItem,children:[(0,L.jsx)(E,{status:e.status}),(0,L.jsx)(`span`,{className:X.milestoneTitle,children:e.title})]},e.title))}):(0,L.jsx)(`p`,{className:X.noMilestones,children:`No milestones yet.`})]},e.id)})})]})}var Z={list:`_list_1nh33_1`,filters:`_filters_1nh33_8`,filterField:`_filterField_1nh33_14`,filterLabel:`_filterLabel_1nh33_21`,summary:`_summary_1nh33_36`,batchBar:`_batchBar_1nh33_44`,batchApprove:`_batchApprove_1nh33_61`,batchReject:`_batchReject_1nh33_66`,skeletons:`_skeletons_1nh33_71`,error:`_error_1nh33_77`,empty:`_empty_1nh33_85`,table:`_table_1nh33_94`,checkboxCol:`_checkboxCol_1nh33_121`,repoCol:`_repoCol_1nh33_125`,kindCol:`_kindCol_1nh33_129`,ageCol:`_ageCol_1nh33_133`,statusCol:`_statusCol_1nh33_137`,whyCol:`_whyCol_1nh33_141`,row:`_row_1nh33_145`,rowActive:`_rowActive_1nh33_155`,titleLink:`_titleLink_1nh33_159`,repoCell:`_repoCell_1nh33_172`,age:`_age_1nh33_133`,why:`_why_1nh33_141`},ts=[{value:`pending`,label:`Pending`},{value:`rejected`,label:`Rejected`},{value:`approved`,label:`Approved`},{value:`applied`,label:`Applied`},{value:`failed`,label:`Failed`},{value:`awaiting-host-merge`,label:`Awaiting host merge`},{value:`all`,label:`All statuses`}];function ns(e){let t=Date.parse(e);if(Number.isNaN(t))return`—`;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return`${n}s`;let r=Math.round(n/60);if(r<60)return`${r}m`;let i=Math.round(r/60);return i<24?`${i}h`:`${Math.round(i/24)}d`}function rs({selectedId:e,onDispatchDisabled:t}){let[n,r]=(0,M.useState)(`pending`),[i,a]=(0,M.useState)(``),[o,c]=(0,M.useState)(``),[u,d]=(0,M.useState)(``),[f,p]=(0,M.useState)(new Set),[m,h]=(0,M.useState)(0),[g,_]=(0,M.useState)(null),[y,x]=(0,M.useState)(!1),[S,C]=(0,M.useState)(!1),[w,T]=(0,M.useState)(!1),[ee,D]=(0,M.useState)(null),te=(0,M.useRef)(null),ne=(0,M.useRef)(new Map),O=hn(),re=v(_e({status:n,since:i||void 0,limit:500})),ie=(0,M.useMemo)(()=>{let e=re.data?.proposals??[],t=o.trim().toLowerCase(),n=u.trim().toLowerCase();return e.filter(e=>!(t&&!e.title.toLowerCase().includes(t)&&!(e.summary??``).toLowerCase().includes(t)||n&&!(e.repo??``).toLowerCase().includes(n)))},[re.data,o,u]);(0,M.useEffect)(()=>{h(e=>Math.min(e,Math.max(ie.length-1,0)))},[ie.length]);function ae(e,t){t===`pending`&&p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function oe(e){if(ie.length!==0){if(e.key===`ArrowDown`){e.preventDefault();let t=Math.min(m+1,ie.length-1);h(t),ne.current.get(ie[t].id)?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let t=Math.max(m-1,0);h(t),ne.current.get(ie[t].id)?.focus()}else if(e.key===`Enter`){let e=ie[m];e&&O(`/inbox/${encodeURIComponent(e.id)}`)}else if(e.key===` `){let t=ie[m];t&&(e.preventDefault(),ae(t.id,t.status))}else e.key===`/`&&(e.preventDefault(),te.current?.focus())}}function se(e){f.size!==0&&(D(null),_(e),s()?C(!0):x(!0))}function ce(){x(!1),s()?C(!0):_(null)}async function le(){if(!g)return;T(!0),D(null);let e=Array.from(f),n=[];for(let r of e)try{g===`approve`?await Ce(r):await Se(r)}catch(e){if(e instanceof b){T(!1),C(!1),_(null),t();return}n.push(r)}T(!1),n.length>0?(D(`${n.length} of ${e.length} failed (already decided, or a transient error). Selection kept for retry.`),p(new Set(n))):(C(!1),_(null),p(new Set))}let k=f.size;return(0,L.jsxs)(`div`,{className:Z.list,children:[(0,L.jsxs)(`div`,{className:Z.filters,children:[(0,L.jsxs)(`label`,{className:Z.filterField,children:[(0,L.jsx)(`span`,{className:Z.filterLabel,children:`Status`}),(0,L.jsx)(`select`,{value:n,onChange:e=>r(e.target.value),children:ts.map(e=>(0,L.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,L.jsxs)(`label`,{className:Z.filterField,children:[(0,L.jsx)(`span`,{className:Z.filterLabel,children:`Since`}),(0,L.jsx)(`input`,{type:`date`,value:i,onChange:e=>a(e.target.value)})]}),(0,L.jsxs)(`label`,{className:Z.filterField,children:[(0,L.jsx)(`span`,{className:Z.filterLabel,children:`Repo`}),(0,L.jsx)(`input`,{type:`text`,placeholder:`filter by repo`,value:u,onChange:e=>d(e.target.value)})]}),(0,L.jsxs)(`label`,{className:Z.filterField,children:[(0,L.jsx)(`span`,{className:Z.filterLabel,children:`Search`}),(0,L.jsx)(`input`,{ref:te,type:`search`,placeholder:`title or summary — press / to focus`,value:o,onChange:e=>c(e.target.value)})]})]}),(0,L.jsxs)(`div`,{className:Z.summary,"aria-live":`polite`,children:[re.status===`refreshing`?(0,L.jsx)(A,{}):null,re.data?(0,L.jsxs)(`span`,{children:[ie.length,` shown of `,re.data.total,` total`,re.data.truncated?` · narrow filters to see more`:``]}):null]}),k>0?(0,L.jsxs)(`div`,{className:Z.batchBar,children:[(0,L.jsxs)(`span`,{children:[k,` selected`]}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>p(new Set),children:`Clear`}),(0,L.jsxs)(`button`,{type:`button`,className:Z.batchReject,onClick:()=>se(`reject`),children:[`Reject `,k]}),(0,L.jsxs)(`button`,{type:`button`,className:Z.batchApprove,onClick:()=>se(`approve`),children:[`Approve `,k]})]}):null,re.status===`loading`?(0,L.jsxs)(`div`,{className:Z.skeletons,children:[(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{}),(0,L.jsx)(l,{})]}):re.status===`error`?(0,L.jsx)(`div`,{className:Z.error,role:`alert`,children:re.error?.message??`Failed to load proposals.`}):ie.length===0?(0,L.jsxs)(`p`,{className:Z.empty,children:[`No `,n===`all`?``:n+` `,`proposals match`,o||u?` this filter`:``,`.`]}):(0,L.jsxs)(`table`,{className:Z.table,role:`grid`,"aria-label":`Proposals`,onKeyDown:oe,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,className:Z.checkboxCol}),(0,L.jsx)(`th`,{scope:`col`,children:`Title`}),(0,L.jsx)(`th`,{scope:`col`,className:Z.repoCol,children:`Repo`}),(0,L.jsx)(`th`,{scope:`col`,className:Z.kindCol,children:`Kind`}),(0,L.jsx)(`th`,{scope:`col`,className:Z.ageCol,children:`Age`}),(0,L.jsx)(`th`,{scope:`col`,className:Z.statusCol,children:`Status`}),(0,L.jsx)(`th`,{scope:`col`,className:Z.whyCol,children:`Why`})]})}),(0,L.jsx)(`tbody`,{children:ie.map((t,n)=>(0,L.jsxs)(`tr`,{ref:e=>{e?ne.current.set(t.id,e):ne.current.delete(t.id)},"data-focus-key":`proposal-${t.id}`,tabIndex:n===m?0:-1,className:`${Z.row} ${t.id===e?Z.rowActive:``}`,onFocus:()=>h(n),"aria-selected":t.id===e,children:[(0,L.jsx)(`td`,{className:Z.checkboxCol,children:(0,L.jsx)(`input`,{type:`checkbox`,checked:f.has(t.id),disabled:t.status!==`pending`,title:t.status===`pending`?void 0:`Only pending proposals can be approved/rejected`,onChange:()=>ae(t.id,t.status),onClick:e=>e.stopPropagation()})}),(0,L.jsx)(`td`,{children:(0,L.jsx)(kr,{to:`/inbox/${encodeURIComponent(t.id)}`,className:Z.titleLink,title:t.title,children:t.title})}),(0,L.jsx)(`td`,{className:Z.repoCell,title:t.repo??void 0,children:t.repo?t.repo.split(`/`).pop():`—`}),(0,L.jsx)(`td`,{children:t.kind}),(0,L.jsx)(`td`,{className:Z.age,children:ns(t.createdAt)}),(0,L.jsx)(`td`,{children:(0,L.jsx)(E,{status:t.status})}),(0,L.jsx)(`td`,{className:Z.why,title:t.decisionReason??void 0,children:t.decisionReason??`—`})]},t.id))})]}),(0,L.jsx)(we,{open:y,onClose:ce,reason:`${g===`approve`?`Approving`:`Rejecting`} ${k} proposals requires the dispatch token.`}),(0,L.jsx)(Te,{open:S,onClose:()=>{C(!1),_(null),D(null)},title:g===`approve`?`Approve ${k} proposals?`:`Reject ${k} proposals?`,body:g===`approve`?(0,L.jsxs)(L.Fragment,{children:[`This applies all `,k,` selected proposals to their repos now, one at a time. This cannot be undone from this dialog.`]}):(0,L.jsxs)(L.Fragment,{children:[`This rejects all `,k,` selected proposals. They stay visible in history as rejected.`]}),confirmLabel:g===`approve`?`Approve ${k}`:`Reject ${k}`,destructive:g===`reject`,busy:w,error:ee,onConfirm:()=>void le()})]})}var Q={panel:`_panel_1n6q8_1`,error:`_error_1n6q8_8`,header:`_header_1n6q8_16`,titleRow:`_titleRow_1n6q8_22`,title:`_title_1n6q8_22`,metaRow:`_metaRow_1n6q8_35`,metaItem:`_metaItem_1n6q8_44`,riskBadge:`_riskBadge_1n6q8_48`,risk_low:`_risk_low_1n6q8_54`,risk_medium:`_risk_medium_1n6q8_55`,risk_high:`_risk_high_1n6q8_56`,summary:`_summary_1n6q8_58`,evidence:`_evidence_1n6q8_64`,evidenceRow:`_evidenceRow_1n6q8_74`,evidenceLabel:`_evidenceLabel_1n6q8_81`,muted:`_muted_1n6q8_89`,rationaleNote:`_rationaleNote_1n6q8_94`,failedChecks:`_failedChecks_1n6q8_101`,diffSection:`_diffSection_1n6q8_107`,actions:`_actions_1n6q8_111`,actionConsequence:`_actionConsequence_1n6q8_124`,actionError:`_actionError_1n6q8_133`,rejectButton:`_rejectButton_1n6q8_144`,approveButton:`_approveButton_1n6q8_165`,decided:`_decided_1n6q8_176`},is={"judge-ship-would-merge":{label:`Ship (would merge)`,tone:`success`},"judge-ship-review-required":{label:`Ship (review required)`,tone:`success`},"judge-review":{label:`Review`,tone:`warning`},"judge-noise":{label:`Noise`,tone:`neutral`},"judge-harmful":{label:`Harmful`,tone:`danger`},"judge-verdict-unrecognized":{label:`Unrecognized verdict`,tone:`unknown`},"judge-parse-failure":{label:`Judge parse failure — not a review`,tone:`unknown`},"judge-network-failure":{label:`Judge network failure — not a review`,tone:`unknown`}};function as(e){let t=e.filter(e=>e.action===`judged`&&e.judgeReasonCode);return t.length===0?null:t.reduce((e,t)=>Date.parse(t.ts)>Date.parse(e.ts)?t:e)}function os(e){if(!e)return`—`;let t=Date.parse(e);if(Number.isNaN(t))return`—`;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return`${n}s ago`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);return i<24?`${i}h ago`:`${Math.round(i/24)}d ago`}function ss(e,t){let n=t&&t.length>0?t:`the target repository`;return e===`pr`?`Approving pushes a branch to ${n}'s remote and opens a real pull request. Other people can see it immediately, and it cannot be undone from here.`:e===`patch`?`Approving writes this diff to ${n} on disk now. Nothing is pushed, but the working tree changes.`:`Approving applies this ${e} proposal to ${n} now.`}function cs({id:e,onDispatchDisabled:t}){let n=v(ce(e)),[r,i]=(0,M.useState)(null),[a,o]=(0,M.useState)(!1),[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(!1),[f,p]=(0,M.useState)(null);function h(e){p(null),i(e),s()?l(!0):o(!0)}function g(){o(!1),s()?l(!0):i(null)}async function _(){if(r){d(!0),p(null);try{r===`approve`?await Ce(e):await Se(e),l(!1),i(null)}catch(e){e instanceof b?(l(!1),i(null),t()):p(e instanceof Error?e.message:`Action failed. Try again.`)}finally{d(!1)}}}if(n.status===`loading`)return(0,L.jsxs)(`div`,{className:Q.panel,children:[(0,L.jsx)(m,{width:`60%`}),(0,L.jsx)(m,{width:`30%`}),(0,L.jsx)(m,{width:`90%`})]});if(n.status===`error`||!n.data)return(0,L.jsx)(`div`,{className:Q.error,role:`alert`,children:n.error?.message??`Failed to load this proposal.`});let y=n.data,x=y.decisionEvidence,S=as(x.decisions),C=S?.judgeReasonCode?is[S.judgeReasonCode]:null,w=y.status===`pending`;return(0,L.jsxs)(`div`,{className:Q.panel,children:[(0,L.jsxs)(`header`,{className:Q.header,children:[(0,L.jsxs)(`div`,{className:Q.titleRow,children:[(0,L.jsx)(`h2`,{className:Q.title,children:y.title}),n.status===`refreshing`?(0,L.jsx)(A,{}):null]}),(0,L.jsxs)(`div`,{className:Q.metaRow,children:[(0,L.jsx)(E,{status:y.status}),(0,L.jsx)(`span`,{className:Q.metaItem,children:y.kind}),(0,L.jsx)(`span`,{className:Q.metaItem,title:y.repo??void 0,children:y.repo??`no repo`}),(0,L.jsxs)(`span`,{className:Q.metaItem,children:[`created `,os(y.createdAt)]}),y.decidedAt?(0,L.jsxs)(`span`,{className:Q.metaItem,children:[`decided `,os(y.decidedAt)]}):null,y.riskClass?(0,L.jsxs)(`span`,{className:`${Q.riskBadge} ${Q[`risk_${y.riskClass}`]}`,children:[y.riskClass,` risk`]}):null]}),y.summary?(0,L.jsx)(`p`,{className:Q.summary,children:y.summary}):null]}),(0,L.jsxs)(`section`,{className:Q.evidence,"aria-label":`Evidence`,children:[(0,L.jsxs)(`div`,{className:Q.evidenceRow,children:[(0,L.jsx)(`span`,{className:Q.evidenceLabel,children:`Judge verdict`}),(0,L.jsx)(T,{quality:x.sourceQuality,label:`judge verdict`,children:C?(0,L.jsx)(E,{status:S.judgeReasonCode,tone:C.tone,children:C.label}):(0,L.jsx)(`span`,{className:Q.muted,children:`not yet judged`})})]}),S?.judgeRationaleState?(0,L.jsxs)(`p`,{className:Q.rationaleNote,children:[`Model rationale:`,` `,S.judgeRationaleState===`not-persisted`?`not persisted`:`legacy (redacted)`]}):null,y.decisionReason?(0,L.jsxs)(`div`,{className:Q.evidenceRow,children:[(0,L.jsx)(`span`,{className:Q.evidenceLabel,children:`Decision reason`}),(0,L.jsx)(`span`,{children:y.decisionReason})]}):null,y.verifyResult?(0,L.jsxs)(`div`,{className:Q.evidenceRow,children:[(0,L.jsx)(`span`,{className:Q.evidenceLabel,children:`Verification`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(E,{status:y.verifyResult.passed?`success`:`failed`,children:y.verifyResult.passed?`passed`:`failed`}),y.verifyResult.ran&&y.verifyResult.ran.length>0?(0,L.jsxs)(`span`,{className:Q.muted,children:[` · ran `,y.verifyResult.ran.map(e=>e.kind).join(`, `)]}):null,y.verifyResult.failed&&y.verifyResult.failed.length>0?(0,L.jsxs)(`p`,{className:Q.failedChecks,children:[`Failed: `,y.verifyResult.failed.join(`, `)]}):null]})]}):null,y.evidenceOutcome?(0,L.jsxs)(`div`,{className:Q.evidenceRow,children:[(0,L.jsx)(`span`,{className:Q.evidenceLabel,children:`Gates`}),(0,L.jsxs)(`span`,{className:Q.muted,children:[y.evidenceOutcome.gateCount??0,` gate`,y.evidenceOutcome.gateCount===1?``:`s`,y.evidenceOutcome.policyAction?` · policy: ${y.evidenceOutcome.policyAction}`:``,y.evidenceOutcome.trustBasis?` · trust: ${y.evidenceOutcome.trustBasis}`:``]})]}):null,y.result?(0,L.jsxs)(`div`,{className:Q.evidenceRow,children:[(0,L.jsx)(`span`,{className:Q.evidenceLabel,children:`Result`}),(0,L.jsx)(`span`,{children:y.result})]}):null]}),(0,L.jsx)(`section`,{className:Q.diffSection,"aria-label":`Diff`,children:(0,L.jsx)(Be,{diff:y.diff,proposalKind:y.kind})}),w?(0,L.jsxs)(`footer`,{className:Q.actions,children:[f&&!c?(0,L.jsx)(`p`,{className:Q.actionError,role:`alert`,children:f}):null,(0,L.jsx)(`p`,{className:Q.actionConsequence,children:ss(y.kind,y.repo)}),(0,L.jsx)(`button`,{type:`button`,className:Q.rejectButton,onClick:()=>h(`reject`),children:`Reject`}),(0,L.jsx)(`button`,{type:`button`,className:Q.approveButton,onClick:()=>h(`approve`),children:`Approve`})]}):(0,L.jsxs)(`footer`,{className:Q.decided,children:[`This proposal is already `,(0,L.jsx)(`strong`,{children:y.status}),` — no further action available.`]}),(0,L.jsx)(we,{open:a,onClose:g,reason:r===`approve`?`Approving a proposal mutates the fleet and requires the dispatch token.`:`Rejecting a proposal requires the dispatch token.`}),(0,L.jsx)(Te,{open:c,onClose:()=>{l(!1),i(null),p(null)},title:r===`approve`?`Approve this proposal?`:`Reject this proposal?`,body:r===`approve`?(0,L.jsxs)(L.Fragment,{children:[`This applies `,(0,L.jsx)(`strong`,{children:y.title}),` to `,(0,L.jsx)(`code`,{children:y.repo}),` now.`,` `,ss(y.kind,y.repo),` Review the diff above before confirming.`]}):(0,L.jsxs)(L.Fragment,{children:[`This rejects `,(0,L.jsx)(`strong`,{children:y.title}),` and discards it. It stays visible in history (status: rejected) but will never be applied. Nothing is written to `,(0,L.jsx)(`code`,{children:y.repo}),`.`]}),confirmLabel:r===`approve`?y.kind===`pr`?`Approve and open the pull request`:`Approve and apply`:`Reject`,destructive:r===`approve`,busy:u,error:f,onConfirm:()=>void _()})]})}var ls={view:`_view_19z5m_1`,header:`_header_19z5m_8`,title:`_title_19z5m_14`,subtitle:`_subtitle_19z5m_20`,dispatchBanner:`_dispatchBanner_19z5m_25`,layout:`_layout_19z5m_39`,listPane:`_listPane_19z5m_57`,detailPane:`_detailPane_19z5m_61`,emptyDetail:`_emptyDetail_19z5m_69`,hint:`_hint_19z5m_81`};function us(){let{id:e}=yn(),[t,n]=(0,M.useState)(!1);return(0,L.jsxs)(`div`,{className:ls.view,children:[(0,L.jsxs)(`header`,{className:ls.header,children:[(0,L.jsx)(`h1`,{className:ls.title,children:`Inbox`}),(0,L.jsx)(`p`,{className:ls.subtitle,children:`Review proposals, inspect diffs and judge evidence, approve or reject.`})]}),t?(0,L.jsxs)(`div`,{className:ls.dispatchBanner,role:`alert`,children:[`This server was started without `,(0,L.jsx)(`code`,{children:`--allow-dispatch`}),`, so approve/reject are read-only right now. Restart `,(0,L.jsx)(`code`,{children:`ashlr serve --allow-dispatch`}),` to enable them. Browsing and diff review still work.`]}):null,(0,L.jsxs)(`div`,{className:ls.layout,children:[(0,L.jsx)(`div`,{className:ls.listPane,children:(0,L.jsx)(rs,{selectedId:e??null,onDispatchDisabled:()=>n(!0)})}),(0,L.jsx)(`div`,{className:ls.detailPane,children:e?(0,L.jsx)(cs,{id:e,onDispatchDisabled:()=>n(!0)}):(0,L.jsxs)(`div`,{className:ls.emptyDetail,children:[(0,L.jsx)(`p`,{children:`Select a proposal to review its diff and evidence.`}),(0,L.jsx)(`p`,{className:ls.hint,children:`↑/↓ to move · Enter to open · Space to select · / to search`})]})})]})]})}var $={cockpit:`_cockpit_1km3b_1`,decisionSpine:`_decisionSpine_1km3b_9`,mission:`_mission_1km3b_18`,titleLine:`_titleLine_1km3b_25`,revision:`_revision_1km3b_39`,northStar:`_northStar_1km3b_44`,bottleneck:`_bottleneck_1km3b_52`,nextActionLabel:`_nextActionLabel_1km3b_60`,fieldLabel:`_fieldLabel_1km3b_61`,nextAction:`_nextAction_1km3b_60`,exception:`_exception_1km3b_79`,attention:`_attention_1km3b_84`,clear:`_clear_1km3b_89`,spectrum:`_spectrum_1km3b_106`,bets:`_bets_1km3b_107`,sectionHeading:`_sectionHeading_1km3b_113`,capabilityList:`_capabilityList_1km3b_133`,betList:`_betList_1km3b_134`,capabilityLane:`_capabilityLane_1km3b_141`,bet:`_bet_1km3b_107`,laneIdentity:`_laneIdentity_1km3b_155`,laneName:`_laneName_1km3b_162`,headroomTrack:`_headroomTrack_1km3b_167`,headroomFill:`_headroomFill_1km3b_174`,ample:`_ample_1km3b_181`,usable:`_usable_1km3b_182`,tight:`_tight_1km3b_183`,none:`_none_1km3b_184`,unknown:`_unknown_1km3b_185`,allocation:`_allocation_1km3b_187`,reset:`_reset_1km3b_188`,betAllocation:`_betAllocation_1km3b_189`,assurance:`_assurance_1km3b_190`,betDecision:`_betDecision_1km3b_216`,betEvidence:`_betEvidence_1km3b_217`,betThesis:`_betThesis_1km3b_227`,empty:`_empty_1km3b_251`,omitted:`_omitted_1km3b_252`,authorityNote:`_authorityNote_1km3b_253`};function ds(e){return e===`complete`?`success`:e===`pending`?`running`:e===`incomplete`?`warning`:`unknown`}function fs(e){return e===`ready`?`success`:e===`tight`?`warning`:e===`unavailable`?`danger`:`unknown`}function ps(e){return e===`continue`?`running`:e===`observing`?`info`:`warning`}function ms(e){return e===`effective`?`success`:e===`refuted`?`danger`:e===`pending`?`running`:`unknown`}function hs({capability:e}){return(0,L.jsxs)(`li`,{className:$.capabilityLane,children:[(0,L.jsxs)(`div`,{className:$.laneIdentity,children:[(0,L.jsx)(`span`,{className:$.laneName,children:e.label}),(0,L.jsx)(E,{status:e.state,tone:fs(e.state)})]}),(0,L.jsx)(`div`,{className:$.headroomTrack,role:`img`,"aria-label":`${e.label} headroom: ${e.headroom}`,children:(0,L.jsx)(`span`,{className:`${$.headroomFill} ${$[e.headroom]}`})}),(0,L.jsx)(`span`,{className:$.allocation,children:e.allocationLabel}),(0,L.jsx)(`span`,{className:$.reset,"data-urgency":e.resetUrgency,children:e.resetLabel})]})}function gs({bet:e}){return(0,L.jsxs)(`li`,{className:$.bet,children:[(0,L.jsxs)(`div`,{className:$.betDecision,children:[(0,L.jsx)(E,{status:e.decision,tone:ps(e.decision)}),(0,L.jsx)(`span`,{className:$.assurance,children:e.assurance})]}),(0,L.jsxs)(`div`,{className:$.betThesis,children:[(0,L.jsx)(`h3`,{children:e.title}),(0,L.jsx)(`p`,{children:e.valueCase})]}),(0,L.jsx)(`span`,{className:$.betAllocation,children:e.allocationLabel}),(0,L.jsxs)(`div`,{className:$.betEvidence,children:[(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`span`,{className:$.fieldLabel,children:`Outcome`}),(0,L.jsx)(E,{status:e.outcome.state,tone:ms(e.outcome.state),children:e.outcome.label})]}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`span`,{className:$.fieldLabel,children:`Evidence`}),(0,L.jsx)(E,{status:e.evidence.state,tone:ds(e.evidence.state),children:e.evidence.label})]})]})]})}function _s({snapshot:e}){let t=e.activeValueBets.slice(0,3),n=Math.max(0,e.activeValueBets.length-t.length),r=e.nextAction;return(0,L.jsxs)(`section`,{className:$.cockpit,"aria-labelledby":`agent-os-title`,children:[(0,L.jsxs)(`header`,{className:$.decisionSpine,children:[(0,L.jsxs)(`div`,{className:$.mission,children:[(0,L.jsxs)(`div`,{className:$.titleLine,children:[(0,L.jsx)(`h2`,{id:`agent-os-title`,children:`Agent OS`}),(0,L.jsx)(E,{status:e.sourceState,tone:e.sourceState===`healthy`?`success`:e.sourceState===`degraded`?`warning`:`unknown`}),(0,L.jsx)(`span`,{className:$.revision,children:e.livingEndState.revisionLabel})]}),(0,L.jsx)(`p`,{className:$.northStar,children:e.livingEndState.northStar}),(0,L.jsxs)(`p`,{className:$.bottleneck,children:[(0,L.jsx)(`span`,{children:`Current bottleneck`}),e.livingEndState.currentBottleneck]})]}),(0,L.jsxs)(`aside`,{className:`${$.nextAction} ${r?$[r.kind]:$.clear}`,"aria-label":`Exception-first next action`,children:[(0,L.jsx)(`span`,{className:$.nextActionLabel,children:`Next action`}),(0,L.jsx)(`strong`,{children:r?.title??`No verified next action available`}),(0,L.jsx)(`p`,{children:r?.reason??`No exception or clearance evidence was provided.`}),r?(0,L.jsxs)(E,{status:r.evidenceState,tone:ds(r.evidenceState),children:[r.evidenceState,` evidence`]}):null]})]}),(0,L.jsxs)(`section`,{className:$.spectrum,"aria-labelledby":`capability-spectrum-title`,children:[(0,L.jsxs)(`div`,{className:$.sectionHeading,children:[(0,L.jsx)(`h3`,{id:`capability-spectrum-title`,children:`Capability spectrum`}),(0,L.jsx)(`p`,{children:`Usable model runway, ordered by reset urgency`})]}),e.capabilitySpectrum.length>0?(0,L.jsx)(`ul`,{className:$.capabilityList,children:e.capabilitySpectrum.map(e=>(0,L.jsx)(hs,{capability:e},e.lane))}):(0,L.jsx)(`p`,{className:$.empty,children:`Capability evidence is not available.`})]}),(0,L.jsxs)(`section`,{className:$.bets,"aria-labelledby":`active-value-bets-title`,children:[(0,L.jsxs)(`div`,{className:$.sectionHeading,children:[(0,L.jsx)(`h3`,{id:`active-value-bets-title`,children:`Active value bets`}),(0,L.jsxs)(`p`,{children:[t.length,` of 3 portfolio slots visible`]})]}),t.length>0?(0,L.jsx)(`ol`,{className:$.betList,children:t.map(e=>(0,L.jsx)(gs,{bet:e},e.key))}):(0,L.jsx)(`p`,{className:$.empty,children:`No active value bet is verified.`}),n>0?(0,L.jsxs)(`p`,{className:$.omitted,children:[n,` lower-ranked `,n===1?`bet is`:`bets are`,` held outside this view.`]}):null]}),(0,L.jsx)(`p`,{className:$.authorityNote,children:`Observation only. This view cannot dispatch, merge, release, deploy, or change policy.`})]})}var vs={view:`_view_k4f4y_1`,header:`_header_k4f4y_8`,eyebrow:`_eyebrow_k4f4y_15`,title:`_title_k4f4y_24`,subtitle:`_subtitle_k4f4y_31`,freshness:`_freshness_k4f4y_37`,loading:`_loading_k4f4y_44`,unavailable:`_unavailable_k4f4y_45`,unavailableHeading:`_unavailableHeading_k4f4y_75`,boundary:`_boundary_k4f4y_82`};function ys(e){return e.authority===`observation-only`&&e.sameUserTamperResistant===!1&&e.rollbackProtected===!1&&e.historicalAuthority===!1&&e.executionAuthority===!1&&e.proposalAuthority===!1&&e.mergeAuthority===!1&&e.deployAuthority===!1&&e.publicationAuthority===!1&&e.externalMutationAuthority===!1}function bs(e){return e.reason?e.reason:e.sourceState===`missing`?`No authenticated Agent OS snapshot has been recorded.`:e.authentication===`authenticated`?e.sameUserTamperResistant===!1?ys(e)?e.complete?e.snapshot?`The Agent OS snapshot is degraded.`:`No verified Agent OS snapshot is available.`:`The snapshot chain is incomplete.`:`The response crossed the observation-only authority boundary.`:`The response made an unsupported same-user tamper-resistance claim.`:`Snapshot authentication is unavailable or invalid.`}function xs(e){return e.sourceState===`healthy`&&e.complete&&e.authentication===`authenticated`&&ys(e)&&e.snapshot!==null?`success`:e.sourceState===`degraded`||e.authentication===`invalid`||!ys(e)?`warning`:`unknown`}function Ss(){let e=(0,M.useRef)(null);ke(`/agent-os`,e);let t=v(ge),n=t.data,r=n?.sourceState===`healthy`&&n.complete&&n.authentication===`authenticated`&&ys(n)&&n.snapshot!==null;return(0,L.jsxs)(`div`,{ref:e,className:vs.view,children:[(0,L.jsxs)(`header`,{className:vs.header,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:vs.eyebrow,children:`Overview`}),(0,L.jsx)(`h1`,{className:vs.title,children:`Agent-native engineering OS`}),(0,L.jsx)(`p`,{className:vs.subtitle,children:`Authenticated fleet intelligence. Observation only.`})]}),(0,L.jsxs)(`div`,{className:vs.freshness,"aria-live":`polite`,children:[t.status===`refreshing`?(0,L.jsx)(A,{}):null,n?(0,L.jsx)(E,{status:n.sourceState,tone:xs(n),children:n.sourceState}):null]})]}),t.status===`loading`?(0,L.jsxs)(`section`,{className:vs.loading,"aria-label":`Loading Agent OS snapshot`,children:[(0,L.jsx)(m,{width:`65%`}),(0,L.jsx)(m,{width:`90%`}),(0,L.jsx)(m,{width:`75%`})]}):t.status===`error`?(0,L.jsxs)(`section`,{className:vs.unavailable,role:`alert`,children:[(0,L.jsx)(`h2`,{children:`Agent OS snapshot unavailable`}),(0,L.jsx)(`p`,{children:t.error?.message??`The read-only Agent OS endpoint could not be reached.`}),(0,L.jsx)(`p`,{className:vs.boundary,children:`No capability, value, or next-action values are inferred when the source cannot be read.`})]}):n&&r&&n.snapshot?(0,L.jsx)(_s,{snapshot:n.snapshot}):n?(0,L.jsxs)(`section`,{className:vs.unavailable,role:`status`,children:[(0,L.jsxs)(`div`,{className:vs.unavailableHeading,children:[(0,L.jsx)(`h2`,{children:n.sourceState===`missing`?`No Agent OS snapshot yet`:`Agent OS snapshot degraded`}),(0,L.jsx)(E,{status:n.authentication,tone:n.authentication===`authenticated`?`success`:`warning`})]}),(0,L.jsx)(`p`,{children:bs(n)}),(0,L.jsx)(`p`,{className:vs.boundary,children:`The cockpit remains hidden until a complete authenticated observation-only snapshot is available.`})]}):(0,L.jsxs)(`section`,{className:vs.unavailable,role:`status`,children:[(0,L.jsx)(`h2`,{children:`Agent OS snapshot unavailable`}),(0,L.jsx)(`p`,{children:`No response was provided by the read-only Agent OS endpoint.`})]})]})}function Cs(){return(0,L.jsx)(Wn,{children:(0,L.jsxs)(I,{element:(0,L.jsx)(Xi,{}),children:[(0,L.jsx)(I,{index:!0,element:(0,L.jsx)(Vn,{to:`/overview`,replace:!0})}),Vr.map(e=>e.implemented?null:(0,L.jsx)(I,{path:e.path,element:(0,L.jsx)(Qi,{title:e.label,description:e.description})},e.path)),(0,L.jsx)(I,{path:`/overview`,element:(0,L.jsx)(fa,{})}),(0,L.jsx)(I,{path:`/agent-os`,element:(0,L.jsx)(Ss,{})}),(0,L.jsx)(I,{path:`/universe`,element:(0,L.jsx)(Ae,{})}),(0,L.jsx)(I,{path:`/journal`,element:(0,L.jsx)(Qa,{})}),(0,L.jsx)(I,{path:`/intelligence/pulse`,element:(0,L.jsx)(ro,{})}),(0,L.jsx)(I,{path:`/intelligence/genome`,element:(0,L.jsx)(fo,{})}),(0,L.jsx)(I,{path:`/intelligence/production`,element:(0,L.jsx)(ho,{})}),(0,L.jsx)(I,{path:`/portfolio`,element:(0,L.jsx)(yo,{})}),(0,L.jsx)(I,{path:`/work/runs`,element:(0,L.jsx)(wo,{})}),(0,L.jsx)(I,{path:`/work/runs/:id`,element:(0,L.jsx)(Do,{})}),(0,L.jsx)(I,{path:`/work/swarms`,element:(0,L.jsx)(No,{})}),(0,L.jsx)(I,{path:`/work/swarms/:id`,element:(0,L.jsx)(Wo,{})}),(0,L.jsx)(I,{path:`/control/daemon`,element:(0,L.jsx)(Jo,{})}),(0,L.jsx)(I,{path:`/control/fleet`,element:(0,L.jsx)(Xo,{})}),(0,L.jsx)(I,{path:`/control/security`,element:(0,L.jsx)($o,{})}),(0,L.jsx)(I,{path:`/goals`,element:(0,L.jsx)(es,{})}),(0,L.jsx)(I,{path:`/inbox`,element:(0,L.jsx)(us,{})}),(0,L.jsx)(I,{path:`/inbox/:id`,element:(0,L.jsx)(us,{})}),(0,L.jsx)(I,{path:`*`,element:(0,L.jsx)(Vn,{to:`/overview`,replace:!0})})]})})}function ws(e){(0,M.useEffect)(()=>{if(e!==`checking`)return;let t=!1;return o(O.key,O.fetch).then(()=>{if(t)return;let e=c(O.key);h(e.status===`success`)}),()=>{t=!0}},[e])}function Ts(){let e=d();return ws(e),(0,L.jsx)(Ee,{children:e===`checking`?(0,L.jsx)(`div`,{"aria-live":`polite`,className:`visually-hidden`,children:`Checking for an existing session…`}):e===`unauthenticated`?(0,L.jsx)(Ve,{}):(0,L.jsxs)(Or,{children:[(0,L.jsx)(x,{}),(0,L.jsx)(Cs,{})]})})}export{Ts as App};
7
+ //# sourceMappingURL=App-DFlp-vdv.js.map