@ashlr/hub 3.5.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/README.md +3 -0
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/activation.d.ts +41 -0
  5. package/dist/cli/activation.js +485 -0
  6. package/dist/cli/activation.js.map +1 -0
  7. package/dist/core/daemon/cutoff-checkpoint-scheduler.js +7 -0
  8. package/dist/core/daemon/cutoff-checkpoint-scheduler.js.map +1 -1
  9. package/dist/core/daemon/loop.d.ts +19 -0
  10. package/dist/core/daemon/loop.js +235 -5
  11. package/dist/core/daemon/loop.js.map +1 -1
  12. package/dist/core/daemon/overnight-status.d.ts +152 -0
  13. package/dist/core/daemon/overnight-status.js +275 -0
  14. package/dist/core/daemon/overnight-status.js.map +1 -0
  15. package/dist/core/daemon/post-merge-halt.d.ts +212 -0
  16. package/dist/core/daemon/post-merge-halt.js +503 -0
  17. package/dist/core/daemon/post-merge-halt.js.map +1 -0
  18. package/dist/core/daemon/run-window.d.ts +218 -0
  19. package/dist/core/daemon/run-window.js +420 -0
  20. package/dist/core/daemon/run-window.js.map +1 -0
  21. package/dist/core/fleet/external-skill-audit.js +1 -1
  22. package/dist/core/fleet/external-skill-audit.js.map +1 -1
  23. package/dist/core/fleet/generated-repair-resolution.d.ts +36 -0
  24. package/dist/core/fleet/generated-repair-resolution.js +245 -0
  25. package/dist/core/fleet/generated-repair-resolution.js.map +1 -0
  26. package/dist/core/local-runtime/llama/config.d.ts +28 -6
  27. package/dist/core/local-runtime/llama/config.js +28 -6
  28. package/dist/core/local-runtime/llama/config.js.map +1 -1
  29. package/dist/core/local-runtime/llama/port.d.ts +17 -0
  30. package/dist/core/local-runtime/llama/port.js +47 -0
  31. package/dist/core/local-runtime/llama/port.js.map +1 -0
  32. package/dist/core/local-runtime/llama/proxy-host.d.ts +54 -0
  33. package/dist/core/local-runtime/llama/proxy-host.js +159 -0
  34. package/dist/core/local-runtime/llama/proxy-host.js.map +1 -0
  35. package/dist/core/local-runtime/llama/proxy-process.d.ts +148 -0
  36. package/dist/core/local-runtime/llama/proxy-process.js +250 -0
  37. package/dist/core/local-runtime/llama/proxy-process.js.map +1 -0
  38. package/dist/core/local-runtime/llama/proxy-record.d.ts +40 -0
  39. package/dist/core/local-runtime/llama/proxy-record.js +133 -0
  40. package/dist/core/local-runtime/llama/proxy-record.js.map +1 -0
  41. package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +118 -0
  42. package/dist/core/local-runtime/llama/proxy-supervisor.js +511 -0
  43. package/dist/core/local-runtime/llama/proxy-supervisor.js.map +1 -0
  44. package/dist/core/web/public/next/assets/App-Cgi6j1Gk.css +1 -0
  45. package/dist/core/web/public/next/assets/App-vtaHB9mp.js +7 -0
  46. package/dist/core/web/public/next/assets/App-vtaHB9mp.js.map +1 -0
  47. package/dist/core/web/public/next/assets/ApprovalsSection-B-bFJ0I9.js +2 -0
  48. package/dist/core/web/public/next/assets/ApprovalsSection-B-bFJ0I9.js.map +1 -0
  49. package/dist/core/web/public/next/assets/ApprovalsSection-Su-NUTis.css +1 -0
  50. package/dist/core/web/public/next/assets/AutonomySection-CHjxJt2z.css +1 -0
  51. package/dist/core/web/public/next/assets/AutonomySection-DoqmsCjw.js +2 -0
  52. package/dist/core/web/public/next/assets/AutonomySection-DoqmsCjw.js.map +1 -0
  53. package/dist/core/web/public/next/assets/ChatSection-BfnLe5dT.css +1 -0
  54. package/dist/core/web/public/next/assets/ChatSection-vNPIJffd.js +80 -0
  55. package/dist/core/web/public/next/assets/ChatSection-vNPIJffd.js.map +1 -0
  56. package/dist/core/web/public/next/assets/ConfirmDialog-Dd2APQhB.js +2 -0
  57. package/dist/core/web/public/next/assets/ConfirmDialog-Dd2APQhB.js.map +1 -0
  58. package/dist/core/web/public/next/assets/{ConfirmDialog-cYuivhCX.css → ConfirmDialog-Dx15x0Ho.css} +1 -1
  59. package/dist/core/web/public/next/assets/Dialog-CPM9JxBc.js +2 -0
  60. package/dist/core/web/public/next/assets/Dialog-CPM9JxBc.js.map +1 -0
  61. package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
  62. package/dist/core/web/public/next/assets/DiffViewer-B84qVef9.js +7 -0
  63. package/dist/core/web/public/next/assets/DiffViewer-B84qVef9.js.map +1 -0
  64. package/dist/core/web/public/next/assets/DiffViewer-C8HHTnVE.css +1 -0
  65. package/dist/core/web/public/next/assets/McpSection-CEUpV_5X.js +2 -0
  66. package/dist/core/web/public/next/assets/McpSection-CEUpV_5X.js.map +1 -0
  67. package/dist/core/web/public/next/assets/McpSection-D88QlDpG.css +1 -0
  68. package/dist/core/web/public/next/assets/Meter--h3MmZS-.js +2 -0
  69. package/dist/core/web/public/next/assets/Meter--h3MmZS-.js.map +1 -0
  70. package/dist/core/web/public/next/assets/Meter-CLcr-4wS.css +1 -0
  71. package/dist/core/web/public/next/assets/{MutationTokenDialog-jWLLCxWn.css → MutationTokenDialog-CrfJ0PdD.css} +1 -1
  72. package/dist/core/web/public/next/assets/MutationTokenDialog-DA8t97XT.js +2 -0
  73. package/dist/core/web/public/next/assets/MutationTokenDialog-DA8t97XT.js.map +1 -0
  74. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Bq7Vyud0.js +7 -0
  75. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Bq7Vyud0.js.map +1 -0
  76. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-CM_8pJs6.css +1 -0
  77. package/dist/core/web/public/next/assets/RouteErrorBoundary-Badio_uO.js +2 -0
  78. package/dist/core/web/public/next/assets/RouteErrorBoundary-Badio_uO.js.map +1 -0
  79. package/dist/core/web/public/next/assets/RouteErrorBoundary-ekyMXAK8.css +1 -0
  80. package/dist/core/web/public/next/assets/SettingsSection-BII7TTSD.css +1 -0
  81. package/dist/core/web/public/next/assets/SettingsSection-BwrpQlpP.js +2 -0
  82. package/dist/core/web/public/next/assets/SettingsSection-BwrpQlpP.js.map +1 -0
  83. package/dist/core/web/public/next/assets/UniverseConsoleApp-Dh7A-hLD.css +1 -0
  84. package/dist/core/web/public/next/assets/UniverseConsoleApp-_FSohAdN.js +2 -0
  85. package/dist/core/web/public/next/assets/UniverseConsoleApp-_FSohAdN.js.map +1 -0
  86. package/dist/core/web/public/next/assets/UniverseView-Bqa8DH57.css +1 -0
  87. package/dist/core/web/public/next/assets/UniverseView-DqcXbed4.js +9 -0
  88. package/dist/core/web/public/next/assets/UniverseView-DqcXbed4.js.map +1 -0
  89. package/dist/core/web/public/next/assets/UsageSection-Bq6Daaby.js +2 -0
  90. package/dist/core/web/public/next/assets/UsageSection-Bq6Daaby.js.map +1 -0
  91. package/dist/core/web/public/next/assets/UsageSection-DwgNOYvi.css +1 -0
  92. package/dist/core/web/public/next/assets/VerseConsoleApp-CMkCizvL.css +1 -0
  93. package/dist/core/web/public/next/assets/VerseConsoleApp-CsIQv9id.js +3 -0
  94. package/dist/core/web/public/next/assets/VerseConsoleApp-CsIQv9id.js.map +1 -0
  95. package/dist/core/web/public/next/assets/charts-CTZJ-JrH.js +2 -0
  96. package/dist/core/web/public/next/assets/charts-CTZJ-JrH.js.map +1 -0
  97. package/dist/core/web/public/next/assets/charts-CsrtT4rk.css +1 -0
  98. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js +2 -0
  99. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js.map +1 -0
  100. package/dist/core/web/public/next/assets/format-BNYWGJat.js +2 -0
  101. package/dist/core/web/public/next/assets/format-BNYWGJat.js.map +1 -0
  102. package/dist/core/web/public/next/assets/global-D6bTxIRn.js +2 -0
  103. package/dist/core/web/public/next/assets/global-D6bTxIRn.js.map +1 -0
  104. package/dist/core/web/public/next/assets/global-z-JfD3ow.css +1 -0
  105. package/dist/core/web/public/next/assets/icons-D9vlf85u.js +2 -0
  106. package/dist/core/web/public/next/assets/icons-D9vlf85u.js.map +1 -0
  107. package/dist/core/web/public/next/assets/index-CZamKRUg.js +11 -0
  108. package/dist/core/web/public/next/assets/index-CZamKRUg.js.map +1 -0
  109. package/dist/core/web/public/next/assets/queries-B8eBnFox.js +2 -0
  110. package/dist/core/web/public/next/assets/queries-B8eBnFox.js.map +1 -0
  111. package/dist/core/web/public/next/assets/use-guarded-action-bzrVVAYq.js +2 -0
  112. package/dist/core/web/public/next/assets/use-guarded-action-bzrVVAYq.js.map +1 -0
  113. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js +2 -0
  114. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js.map +1 -0
  115. package/dist/core/web/public/next/assets/workspace-model-v0a1gl-C.js +2 -0
  116. package/dist/core/web/public/next/assets/workspace-model-v0a1gl-C.js.map +1 -0
  117. package/dist/core/web/public/next/index.html +1 -1
  118. package/dist/release-dependency-inventory.json +1 -1
  119. package/node_modules/marked/README.md +8 -0
  120. package/node_modules/marked/bin/main.js +12 -11
  121. package/node_modules/marked/lib/marked.d.ts +88 -25
  122. package/node_modules/marked/lib/marked.esm.js +50 -44
  123. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  124. package/node_modules/marked/lib/marked.umd.js +50 -44
  125. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  126. package/node_modules/marked/man/marked.1 +1 -1
  127. package/node_modules/marked/package.json +21 -21
  128. package/package.json +13 -8
  129. package/dist/core/web/public/next/assets/App-BCKqSppK.css +0 -1
  130. package/dist/core/web/public/next/assets/App-CsbPYQqy.js +0 -16
  131. package/dist/core/web/public/next/assets/App-CsbPYQqy.js.map +0 -1
  132. package/dist/core/web/public/next/assets/ApprovalsSection-CBZquyLK.js +0 -2
  133. package/dist/core/web/public/next/assets/ApprovalsSection-CBZquyLK.js.map +0 -1
  134. package/dist/core/web/public/next/assets/ApprovalsSection-CRP59wSb.css +0 -1
  135. package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js +0 -2
  136. package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js.map +0 -1
  137. package/dist/core/web/public/next/assets/AutonomySection-DTN6m6QE.css +0 -1
  138. package/dist/core/web/public/next/assets/ChatSection-DiRvNX3Q.css +0 -1
  139. package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js +0 -77
  140. package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js.map +0 -1
  141. package/dist/core/web/public/next/assets/ConfirmDialog-deO0C0iY.js +0 -2
  142. package/dist/core/web/public/next/assets/ConfirmDialog-deO0C0iY.js.map +0 -1
  143. package/dist/core/web/public/next/assets/Dialog-CNd7q89m.js +0 -2
  144. package/dist/core/web/public/next/assets/Dialog-CNd7q89m.js.map +0 -1
  145. package/dist/core/web/public/next/assets/Dialog-DxN7RgB5.css +0 -1
  146. package/dist/core/web/public/next/assets/DiffViewer-DTO0KRuG.js +0 -7
  147. package/dist/core/web/public/next/assets/DiffViewer-DTO0KRuG.js.map +0 -1
  148. package/dist/core/web/public/next/assets/DiffViewer-hN7X6wGT.css +0 -1
  149. package/dist/core/web/public/next/assets/Epistemic-53PikaUI.js +0 -2
  150. package/dist/core/web/public/next/assets/Epistemic-53PikaUI.js.map +0 -1
  151. package/dist/core/web/public/next/assets/Epistemic-DiyMyeaN.css +0 -1
  152. package/dist/core/web/public/next/assets/Meter-CGBsbXUX.css +0 -1
  153. package/dist/core/web/public/next/assets/Meter-DRWZQgr1.js +0 -2
  154. package/dist/core/web/public/next/assets/Meter-DRWZQgr1.js.map +0 -1
  155. package/dist/core/web/public/next/assets/MutationTokenDialog-DYF8n_RD.js +0 -2
  156. package/dist/core/web/public/next/assets/MutationTokenDialog-DYF8n_RD.js.map +0 -1
  157. package/dist/core/web/public/next/assets/RefreshIndicator-DXJQXKyA.js +0 -2
  158. package/dist/core/web/public/next/assets/RefreshIndicator-DXJQXKyA.js.map +0 -1
  159. package/dist/core/web/public/next/assets/RefreshIndicator-O7jUBOmX.css +0 -1
  160. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-DLl4DbGG.css +0 -1
  161. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-hDSEFdLU.js +0 -7
  162. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-hDSEFdLU.js.map +0 -1
  163. package/dist/core/web/public/next/assets/RouteErrorBoundary-BIpdnxp-.css +0 -1
  164. package/dist/core/web/public/next/assets/RouteErrorBoundary-CZd7ln8v.js +0 -2
  165. package/dist/core/web/public/next/assets/RouteErrorBoundary-CZd7ln8v.js.map +0 -1
  166. package/dist/core/web/public/next/assets/SettingsSection-C9Qs9JWW.js +0 -2
  167. package/dist/core/web/public/next/assets/SettingsSection-C9Qs9JWW.js.map +0 -1
  168. package/dist/core/web/public/next/assets/SettingsSection-DGJMdUh2.css +0 -1
  169. package/dist/core/web/public/next/assets/Skeleton-D2JaTXyv.css +0 -1
  170. package/dist/core/web/public/next/assets/Skeleton-YkcOpgFb.js +0 -2
  171. package/dist/core/web/public/next/assets/Skeleton-YkcOpgFb.js.map +0 -1
  172. package/dist/core/web/public/next/assets/StatusBadge-DJw0LSPg.js +0 -2
  173. package/dist/core/web/public/next/assets/StatusBadge-DJw0LSPg.js.map +0 -1
  174. package/dist/core/web/public/next/assets/StatusBadge-TpDqZf6K.css +0 -1
  175. package/dist/core/web/public/next/assets/TableView-Bj-w1O6o.js +0 -2
  176. package/dist/core/web/public/next/assets/TableView-Bj-w1O6o.js.map +0 -1
  177. package/dist/core/web/public/next/assets/TableView-R6Yeztp1.css +0 -1
  178. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bs2fxaen.js +0 -2
  179. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bs2fxaen.js.map +0 -1
  180. package/dist/core/web/public/next/assets/UniverseConsoleApp-CiZZxRPV.css +0 -1
  181. package/dist/core/web/public/next/assets/UniverseView-B6b2hw-8.js +0 -9
  182. package/dist/core/web/public/next/assets/UniverseView-B6b2hw-8.js.map +0 -1
  183. package/dist/core/web/public/next/assets/UniverseView-gBxl6yum.css +0 -1
  184. package/dist/core/web/public/next/assets/UsageSection-C__ziNkV.js +0 -2
  185. package/dist/core/web/public/next/assets/UsageSection-C__ziNkV.js.map +0 -1
  186. package/dist/core/web/public/next/assets/UsageSection-UUYDidOg.css +0 -1
  187. package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js +0 -3
  188. package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js.map +0 -1
  189. package/dist/core/web/public/next/assets/VerseConsoleApp-mOAXvWa6.css +0 -1
  190. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js +0 -2
  191. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js.map +0 -1
  192. package/dist/core/web/public/next/assets/format-fggwu_Rs.js +0 -2
  193. package/dist/core/web/public/next/assets/format-fggwu_Rs.js.map +0 -1
  194. package/dist/core/web/public/next/assets/global-BHjd6fVZ.js +0 -2
  195. package/dist/core/web/public/next/assets/global-BHjd6fVZ.js.map +0 -1
  196. package/dist/core/web/public/next/assets/global-BeRYd1Bu.css +0 -1
  197. package/dist/core/web/public/next/assets/index-CJ-e8YA9.js +0 -2
  198. package/dist/core/web/public/next/assets/index-CJ-e8YA9.js.map +0 -1
  199. package/dist/core/web/public/next/assets/index-CpgkRaTi.js +0 -51
  200. package/dist/core/web/public/next/assets/index-CpgkRaTi.js.map +0 -1
  201. package/dist/core/web/public/next/assets/queries-856qUN3Y.js +0 -2
  202. package/dist/core/web/public/next/assets/queries-856qUN3Y.js.map +0 -1
  203. package/dist/core/web/public/next/assets/use-guarded-action-Bqa2v0a-.css +0 -1
  204. package/dist/core/web/public/next/assets/use-guarded-action-DwaESKVy.js +0 -2
  205. package/dist/core/web/public/next/assets/use-guarded-action-DwaESKVy.js.map +0 -1
  206. package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js +0 -2
  207. package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js.map +0 -1
  208. package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js +0 -2
  209. package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js.map +0 -1
  210. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as p,j as e}from"./index-CpgkRaTi.js";import{f as R,v as F,D as I}from"./global-BHjd6fVZ.js";import{p as H,i as O}from"./queries-856qUN3Y.js";import{M as B}from"./MutationTokenDialog-DYF8n_RD.js";import{E as W}from"./Epistemic-53PikaUI.js";import{R as q}from"./RefreshIndicator-DXJQXKyA.js";import{S as C,b as D}from"./Skeleton-YkcOpgFb.js";import{S as A}from"./StatusBadge-DJw0LSPg.js";import{C as J,a as Q,r as U}from"./ConfirmDialog-deO0C0iY.js";import{D as K}from"./DiffViewer-DTO0KRuG.js";import{f as $,a as V}from"./format-fggwu_Rs.js";import{d as z,S as G}from"./use-guarded-action-DwaESKVy.js";import{v as Y}from"./VerseConsoleApp-Cu5aG6J6.js";import"./Dialog-CNd7q89m.js";import"./index-CJ-e8YA9.js";import"./RouteErrorBoundary-CZd7ln8v.js";function X(a){return[...a].sort((l,r)=>{const d=l.status==="pending"?0:1,i=r.status==="pending"?0:1;if(d!==i)return d-i;const o=Date.parse(l.createdAt),c=Date.parse(r.createdAt),h=Number.isNaN(o)?0:o,m=Number.isNaN(c)?0:c;return h!==m?m-h:l.id.localeCompare(r.id)})}function Z(a,l,r){const d=l.trim().toLowerCase(),i=r.trim().toLowerCase();return!d&&!i?[...a]:a.filter(o=>!(d&&!o.title.toLowerCase().includes(d)&&!(o.summary??"").toLowerCase().includes(d)||i&&!(o.repo??"").toLowerCase().includes(i)))}function ee(a,l){const r=l||"the target repository";switch(a){case"pr":return`Pushes a branch to ${r}'s remote and opens a real pull request. Other people can see it immediately, and this dialog cannot undo it.`;case"patch":return`Writes the diff to ${r} on disk now. Nothing is pushed, but the working tree changes.`;default:return`Applies this ${String(a)} proposal to ${r} now.`}}function L(a){return a==="pr"}function E(a){return a.engineModel?a.engineModel:a.engineTier?a.engineTier:null}const se="_layout_1e5d8_8",te="_listPane_1e5d8_9",ne="_detailPane_1e5d8_10",re="_filters_1e5d8_12",ae="_filterField_1e5d8_13",ie="_filterLabel_1e5d8_14",le="_filterSelect_1e5d8_31",oe="_count_1e5d8_46",de="_rows_1e5d8_48",ce="_row_1e5d8_48",ue="_rowActive_1e5d8_63",pe="_riskRule_1e5d8_68",he="_rowTitle_1e5d8_72",me="_rowMeta_1e5d8_73",fe="_rowMetaMono_1e5d8_82",je="_rowAge_1e5d8_83",xe="_riskWord_1e5d8_84",ge="_detail_1e5d8_10",_e="_detailHead_1e5d8_91",ve="_detailTitle_1e5d8_92",ye="_detailMeta_1e5d8_93",be="_summary_1e5d8_95",we="_block_1e5d8_97",ke="_blockTitle_1e5d8_98",Ne="_defs_1e5d8_107",Ae="_muted_1e5d8_111",Re="_failedChecks_1e5d8_112",Se="_actions_1e5d8_114",Ce="_actionNote_1e5d8_115",De="_reject_1e5d8_116",Me="_approve_1e5d8_117",Te="_decided_1e5d8_133",Pe="_empty_1e5d8_135",Fe="_emptyStrong_1e5d8_136",$e="_error_1e5d8_137",Le="_skeletons_1e5d8_138",t={layout:se,listPane:te,detailPane:ne,filters:re,filterField:ae,filterLabel:ie,filterSelect:le,count:oe,rows:de,row:ce,rowActive:ue,riskRule:pe,rowTitle:he,rowMeta:me,rowMetaMono:fe,rowAge:je,riskWord:xe,detail:ge,detailHead:_e,detailTitle:ve,detailMeta:ye,summary:be,block:we,blockTitle:ke,defs:Ne,muted:Ae,failedChecks:Re,actions:Se,actionNote:Ce,reject:De,approve:Me,decided:Te,empty:Pe,emptyStrong:Fe,error:$e,skeletons:Le},Oe={"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 qe(a){const l=a.filter(r=>r.action==="judged"&&r.judgeReasonCode);return l.length===0?null:l.reduce((r,d)=>Date.parse(d.ts)>Date.parse(r.ts)?d:r)}function Ee({id:a,dispatchEnabled:l,onDispatchDisabled:r,onDecided:d}){const i=R(H(a)),[o,c]=p.useState(null),[h,m]=p.useState(!1),[v,f]=p.useState(!1),[u,j]=p.useState(!1),[y,n]=p.useState(null);function g(_){n(null),c(_),F()?f(!0):m(!0)}function b(){m(!1),F()?f(!0):c(null)}async function w(){if(o){j(!0),n(null);try{o==="approve"?await Q(a):await U(a),f(!1),c(null),d()}catch(_){_ instanceof I?(f(!1),c(null),r()):n(z(_))}finally{j(!1)}}}if(i.status==="loading")return e.jsxs("div",{className:t.detail,children:[e.jsx(C,{width:"55%"}),e.jsx(C,{width:"30%"}),e.jsx(C,{width:"88%"})]});if(i.status==="error"||!i.data)return e.jsx("p",{className:t.error,role:"alert",children:i.error?.message??"Could not load this proposal."});const s=i.data,M=s.decisionEvidence,k=qe(M?.decisions??[]),S=k?.judgeReasonCode?Oe[k.judgeReasonCode]:null,T=s.status==="pending"&&l,N=E(s),P=ee(s.kind,s.repo);return e.jsxs("div",{className:t.detail,children:[e.jsxs("header",{className:t.detailHead,children:[e.jsx("h3",{className:t.detailTitle,children:s.title}),e.jsxs("div",{className:t.detailMeta,children:[e.jsx(A,{status:s.status}),e.jsx("span",{children:s.kind}),e.jsx("code",{title:s.repo??void 0,children:s.repo??"no repo"}),e.jsx("span",{children:s.riskClass?`${s.riskClass} risk`:"risk unstated"}),N?e.jsx("code",{children:N}):null,e.jsxs("span",{children:["created ",$(s.createdAt)]}),s.decidedAt?e.jsxs("span",{children:["decided ",$(s.decidedAt)]}):null,i.status==="refreshing"?e.jsx(q,{}):null]}),s.summary?e.jsx("p",{className:t.summary,children:s.summary}):null]}),e.jsxs("section",{className:t.block,"aria-label":"Evidence",children:[e.jsx("h4",{className:t.blockTitle,children:"Evidence"}),e.jsxs("dl",{className:t.defs,children:[e.jsx("dt",{children:"Judge verdict"}),e.jsx("dd",{children:e.jsx(W,{quality:M?.sourceQuality,label:"judge verdict",children:S&&k?.judgeReasonCode?e.jsx(A,{status:k.judgeReasonCode,tone:S.tone,children:S.label}):e.jsx("span",{className:t.muted,children:"not yet judged"})})}),e.jsx("dt",{children:"Verification"}),e.jsx("dd",{children:s.verifyResult?e.jsxs(e.Fragment,{children:[e.jsx(A,{status:s.verifyResult.passed?"success":"failed",children:s.verifyResult.passed?"passed":"failed"}),s.verifyResult.ran&&s.verifyResult.ran.length>0?e.jsxs("span",{className:t.muted,children:[" · ran ",s.verifyResult.ran.map(_=>_.kind).join(", ")]}):null,!s.verifyResult.passed&&s.verifyResult.failureCategory&&s.verifyResult.failureCategory!=="code"?e.jsxs("span",{className:t.muted,children:[" · ",s.verifyResult.failureCategory," failure — the verifier itself, not the diff"]}):null,s.verifyResult.failed&&s.verifyResult.failed.length>0?e.jsxs("p",{className:t.failedChecks,children:["failed: ",s.verifyResult.failed.join(", ")]}):null]}):e.jsx("span",{className:t.muted,children:"not verified"})}),s.decisionReason?e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Decision reason"}),e.jsx("dd",{children:s.decisionReason})]}):null,s.evidenceOutcome?e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Gates"}),e.jsxs("dd",{className:t.muted,children:[s.evidenceOutcome.gateCount??0," gate",s.evidenceOutcome.gateCount===1?"":"s",s.evidenceOutcome.policyAction?` · policy ${s.evidenceOutcome.policyAction}`:"",s.evidenceOutcome.trustBasis?` · trust ${s.evidenceOutcome.trustBasis}`:""]})]}):null,s.result?e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Result"}),e.jsx("dd",{children:s.result})]}):null]})]}),e.jsxs("section",{className:t.block,"aria-label":"Provenance",children:[e.jsx("h4",{className:t.blockTitle,children:"Provenance"}),e.jsxs("dl",{className:t.defs,children:[e.jsx("dt",{children:"Produced by"}),e.jsx("dd",{children:N?e.jsx("code",{children:N}):e.jsx("span",{className:t.muted,children:"unknown engine"})}),e.jsx("dt",{children:"Origin"}),e.jsx("dd",{children:s.origin}),s.workItemId?e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Work item"}),e.jsx("dd",{children:e.jsx("code",{children:s.workItemId})})]}):null,s.runId?e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Run"}),e.jsx("dd",{children:e.jsx("code",{children:s.runId})})]}):null,e.jsx("dt",{children:"Attestation"}),e.jsxs("dd",{className:t.muted,children:[s.producerProvenanceSig?`signed by the sandboxed producer (v${s.producerProvenanceVersion??2})`:s.provenanceSig?"legacy signature present":"unsigned — earns no positive routing credit",s.diffHash?" · diff hashed at signing time":""]})]})]}),e.jsxs("section",{className:t.block,"aria-label":"Diff",children:[e.jsx("h4",{className:t.blockTitle,children:"Diff"}),e.jsx(K,{diff:s.diff,proposalKind:s.kind})]}),s.status==="pending"?e.jsxs("footer",{className:t.actions,children:[e.jsx("p",{className:t.actionNote,children:l?P:"Read-only session — approve and reject are unavailable without dispatch."}),y&&!v?e.jsx("p",{className:t.error,role:"alert",children:y}):null,e.jsx("button",{type:"button",className:t.reject,disabled:!T||u,onClick:()=>g("reject"),children:"Reject"}),e.jsx("button",{type:"button",className:t.approve,disabled:!T||u,onClick:()=>g("approve"),children:"Approve…"})]}):e.jsxs("footer",{className:t.decided,children:["This proposal is already ",e.jsx("strong",{children:s.status})," — no further action is available."]}),e.jsx(B,{open:h,onClose:b,reason:o==="approve"?"Approving a proposal writes to a real repository and requires the dispatch token.":"Rejecting a proposal requires the dispatch token.",tokenHelp:"the mutation token ashlr verse printed"}),e.jsx(J,{open:v,onClose:()=>{f(!1),c(null),n(null)},title:o==="approve"?`Approve this ${s.kind} against ${s.repo?s.repo.split("/").pop():"the repository"}?`:"Reject this proposal?",body:o==="approve"?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:s.title}),e.jsx("br",{}),"Kind ",e.jsx("strong",{children:s.kind})," · repository ",e.jsx("code",{children:s.repo??"unknown"}),e.jsx("br",{}),e.jsx("br",{}),P,L(s.kind)?e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),"This one leaves your machine."]}):null]}):e.jsxs(e.Fragment,{children:["This rejects ",e.jsx("strong",{children:s.title})," and discards it. It stays in history as rejected and is never applied."]}),confirmLabel:o==="approve"?`Approve and ${L(s.kind)?"open the pull request":"apply"}`:"Reject",destructive:o==="approve",busy:u,error:y,onConfirm:()=>void w()})]})}const Ie=[{value:"pending",label:"Pending"},{value:"all",label:"All statuses"},{value:"approved",label:"Approved"},{value:"applied",label:"Applied"},{value:"rejected",label:"Rejected"},{value:"failed",label:"Failed"},{value:"awaiting-host-merge",label:"Awaiting host merge"}];function He({selectedId:a,onSelect:l}){const[r,d]=p.useState("pending"),[i,o]=p.useState(""),[c,h]=p.useState(""),[m,v]=p.useState(0),f=p.useRef(new Map),u=R(O({status:r,limit:500})),j=p.useMemo(()=>X(Z(u.data?.proposals??[],i,c)),[u.data,i,c]);function y(n){if(j.length!==0&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault();const g=n.key==="ArrowDown"?Math.min(m+1,j.length-1):Math.max(m-1,0);v(g),f.current.get(j[g].id)?.focus()}}return e.jsxs("div",{className:t.listPane,children:[e.jsxs("div",{className:t.filters,children:[e.jsx(G,{className:t.filterSelect,label:"Status",value:r,onChange:n=>d(n.target.value),children:Ie.map(n=>e.jsx("option",{value:n.value,children:n.label},n.value))}),e.jsxs("label",{className:t.filterField,children:[e.jsx("span",{className:t.filterLabel,children:"Repo"}),e.jsx("input",{type:"text",value:c,placeholder:"filter by repo",onChange:n=>h(n.target.value)})]}),e.jsxs("label",{className:t.filterField,children:[e.jsx("span",{className:t.filterLabel,children:"Search"}),e.jsx("input",{type:"search",value:i,placeholder:"title or summary",onChange:n=>o(n.target.value)})]})]}),e.jsxs("div",{className:t.count,"aria-live":"polite",children:[u.status==="refreshing"?e.jsx(q,{}):null,u.data?e.jsxs("span",{children:[j.length," shown · ",u.data.pending," pending",u.data.truncated?" · capped, narrow the filter":""]}):e.jsx("span",{children:"Loading proposals…"})]}),u.status==="loading"?e.jsxs("div",{className:t.skeletons,children:[e.jsx(D,{}),e.jsx(D,{}),e.jsx(D,{})]}):u.status==="error"?e.jsx("p",{className:t.error,role:"alert",children:u.error?.message??"Could not read the approvals queue."}):j.length===0?e.jsx("p",{className:t.empty,children:r==="pending"&&!i&&!c?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.emptyStrong,children:"Nothing is waiting on you."})," The loop only produces proposals for enrolled repositories — if you expected something here, check the scope list in Autonomy."]}):"No proposals match this filter."}):e.jsx("div",{className:t.rows,role:"list",onKeyDown:y,children:j.map((n,g)=>{const b=E(n);return e.jsx("div",{role:"listitem",children:e.jsxs("button",{type:"button",ref:w=>{w?f.current.set(n.id,w):f.current.delete(n.id)},tabIndex:g===m?0:-1,className:`${t.row} ${n.id===a?t.rowActive:""}`,"aria-current":n.id===a?"true":void 0,onFocus:()=>v(g),onClick:()=>l(n.id),children:[e.jsx("span",{className:t.riskRule,"data-risk":n.riskClass??"unstated","aria-hidden":"true"}),e.jsx("span",{className:t.rowTitle,title:n.title,children:n.title}),e.jsxs("span",{className:t.rowMeta,children:[e.jsx("span",{className:t.riskWord,"data-risk":n.riskClass??"unstated",children:n.riskClass?`${n.riskClass} risk`:"risk unstated"}),e.jsx("span",{className:t.rowMetaMono,title:n.repo??void 0,children:n.repo?n.repo.split("/").pop():"no repo"}),e.jsx("span",{className:t.rowMetaMono,title:b??void 0,children:b??"engine unknown"}),e.jsx("span",{className:t.rowAge,children:V(n.createdAt)}),n.status==="pending"?null:e.jsx(A,{status:n.status})]})]})},n.id)})})]})}const Be="_section_sshlm_7",We="_header_sshlm_9",Je="_title_sshlm_22",Qe="_headerMeta_sshlm_30",Ue="_banner_sshlm_32",Ke="_bannerTitle_sshlm_42",Ve="_body_sshlm_44",ze="_placeholder_sshlm_46",Ge="_placeholderHint_sshlm_47",x={section:Be,header:We,title:Je,headerMeta:Qe,banner:Ue,bannerTitle:Ke,body:Ve,placeholder:ze,placeholderHint:Ge};function hs(){const a=R(Y),l=R(O({status:"pending",limit:500})),[r,d]=p.useState(null),[i,o]=p.useState(!1),c=(a.data?.dispatchEnabled??!0)&&!i,h=l.data?.pending;return e.jsxs("section",{className:x.section,"aria-label":"Approvals",children:[e.jsxs("header",{className:x.header,"data-app-region":"drag",children:[e.jsx("h2",{className:x.title,children:"Approvals"}),e.jsx("span",{className:x.headerMeta,children:typeof h=="number"?`${h} awaiting you`:"counting…"})]}),c?null:e.jsxs("div",{className:x.banner,role:"status",children:[e.jsx("span",{className:x.bannerTitle,children:"Read-only session"}),"This server was started without dispatch, so approve and reject are unavailable. Diffs, verification results and provenance still read normally — run ",e.jsx("code",{children:"ashlr verse"})," to decide."]}),e.jsxs("div",{className:`${x.body} ${t.layout}`,children:[e.jsx(He,{selectedId:r,onSelect:d}),e.jsx("div",{className:t.detailPane,children:r?e.jsx(Ee,{id:r,dispatchEnabled:c,onDispatchDisabled:()=>o(!0),onDecided:()=>d(null)},r):e.jsxs("div",{className:x.placeholder,children:["Select a proposal to read its diff, its verification result, and where it came from before deciding.",e.jsx("p",{className:x.placeholderHint,children:"↑/↓ moves through the queue · pending proposals sort first."})]})})]})]})}export{hs as ApprovalsSection};
2
- //# sourceMappingURL=ApprovalsSection-CBZquyLK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApprovalsSection-CBZquyLK.js","sources":["../../../../../../src/web-ui/routes/verse/approvals/approvals-model.ts","../../../../../../src/web-ui/routes/verse/approvals/ApprovalDetail.tsx","../../../../../../src/web-ui/routes/verse/approvals/ApprovalsList.tsx","../../../../../../src/web-ui/routes/verse/sections/ApprovalsSection.tsx"],"sourcesContent":["/**\n * routes/verse/approvals/approvals-model.ts — the pure decisions behind the\n * approvals queue: what order rows come in, and exactly what a human is\n * agreeing to when they press Approve.\n *\n * Kept framework-free and unit-tested because both are easy to get subtly\n * wrong: \"pending first\" must survive a status filter that also returns\n * decided rows, and the approve consequence sentence is the last thing\n * standing between a click and a real pull request against a real remote.\n */\nimport type { Proposal, ProposalKind } from '../../../data/api-types.js';\n\n/** Pending first, then newest first within each group. Stable and total. */\nexport function orderProposals(rows: readonly Proposal[]): Proposal[] {\n return [...rows].sort((a, b) => {\n const pendingA = a.status === 'pending' ? 0 : 1;\n const pendingB = b.status === 'pending' ? 0 : 1;\n if (pendingA !== pendingB) return pendingA - pendingB;\n const tsA = Date.parse(a.createdAt);\n const tsB = Date.parse(b.createdAt);\n const safeA = Number.isNaN(tsA) ? 0 : tsA;\n const safeB = Number.isNaN(tsB) ? 0 : tsB;\n if (safeA !== safeB) return safeB - safeA;\n return a.id.localeCompare(b.id);\n });\n}\n\nexport type RiskClass = NonNullable<Proposal['riskClass']>;\n\n/** high → medium → low → unstated. Used for the risk column's sort affordance. */\nexport function riskRank(risk: Proposal['riskClass']): number {\n switch (risk) {\n case 'high':\n return 0;\n case 'medium':\n return 1;\n case 'low':\n return 2;\n default:\n return 3;\n }\n}\n\n/** Client-side narrowing over whatever page the server returned. */\nexport function filterProposals(rows: readonly Proposal[], search: string, repo: string): Proposal[] {\n const s = search.trim().toLowerCase();\n const r = repo.trim().toLowerCase();\n if (!s && !r) return [...rows];\n return rows.filter((p) => {\n if (s && !p.title.toLowerCase().includes(s) && !(p.summary ?? '').toLowerCase().includes(s)) return false;\n if (r && !(p.repo ?? '').toLowerCase().includes(r)) return false;\n return true;\n });\n}\n\n/**\n * What approving this proposal actually does, in one sentence, naming the\n * repo. `pr` is the dangerous one: it pushes a branch to the remote and opens\n * a real pull request, which is visible to other people and cannot be undone\n * from the dialog. The confirm step MUST show this before the click.\n */\nexport function describeApproveConsequence(kind: ProposalKind | string, repo: string | null): string {\n const where = repo ? repo : 'the target repository';\n switch (kind) {\n case 'pr':\n return `Pushes a branch to ${where}'s remote and opens a real pull request. Other people can see it immediately, and this dialog cannot undo it.`;\n case 'patch':\n return `Writes the diff to ${where} on disk now. Nothing is pushed, but the working tree changes.`;\n default:\n return `Applies this ${String(kind)} proposal to ${where} now.`;\n }\n}\n\n/** True when approving reaches a remote — the loudest confirm wording. */\nexport function reachesRemote(kind: ProposalKind | string): boolean {\n return kind === 'pr';\n}\n\n/** The engine that produced the diff, as a short display string. */\nexport function engineOf(proposal: Pick<Proposal, 'engineModel' | 'engineTier'>): string | null {\n if (proposal.engineModel) return proposal.engineModel;\n if (proposal.engineTier) return proposal.engineTier;\n return null;\n}\n","/**\n * routes/verse/approvals/ApprovalDetail.tsx — everything a human needs before\n * deciding, and an approve path that cannot fire on one click.\n *\n * Reuses the inbox review machinery verbatim (`DiffViewer` + `diff-parser.ts`\n * + `highlight.ts`, and `ConfirmDialog`) rather than growing a second diff\n * renderer, per docs/VERSE-CONTRACT-V2.md.\n *\n * Two rules enforced here:\n * - **Judge evidence is epistemic.** A `judge-parse-failure` /\n * `judge-network-failure` is an infra failure, never a considered verdict,\n * and a degraded decisions-ledger read renders \"unknown\" via <Epistemic/>\n * instead of letting an empty array read as \"never judged\".\n * - **Nothing signed is ever printed.** Provenance shows WHETHER a proposal\n * carries a producer attestation, never the HMAC itself — the same rule\n * that keeps launcher commands and tokens off every Verse payload.\n */\nimport { useState } from 'react';\nimport { MutationTokenDialog } from '../../../components/auth/MutationTokenDialog.js';\nimport { Epistemic } from '../../../components/primitives/Epistemic.js';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { SkeletonLine } from '../../../components/primitives/Skeleton.js';\nimport { StatusBadge, type Tone } from '../../../components/primitives/StatusBadge.js';\nimport type { DecisionEntry, JudgeDecisionReasonCode } from '../../../data/api-types.js';\nimport { hasMutationHold } from '../../../data/auth-store.js';\nimport { DispatchDisabledError } from '../../../data/client.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { approveProposal, rejectProposal } from '../../../data/mutations.js';\nimport { proposalDetailQuery } from '../../../data/queries.js';\nimport { ConfirmDialog } from '../../inbox/ConfirmDialog.js';\nimport { DiffViewer } from '../../inbox/DiffViewer.js';\nimport { formatRelative } from '../autonomy/format.js';\nimport { describeControlError } from '../autonomy/use-guarded-action.js';\nimport { describeApproveConsequence, engineOf, reachesRemote } from './approvals-model.js';\nimport styles from './approvals.module.css';\n\nconst JUDGE_REASON_DISPLAY: Record<JudgeDecisionReasonCode, { label: string; tone: Tone }> = {\n 'judge-ship-would-merge': { label: 'Ship (would merge)', tone: 'success' },\n 'judge-ship-review-required': { label: 'Ship (review required)', tone: 'success' },\n 'judge-review': { label: 'Review', tone: 'warning' },\n 'judge-noise': { label: 'Noise', tone: 'neutral' },\n 'judge-harmful': { label: 'Harmful', tone: 'danger' },\n 'judge-verdict-unrecognized': { label: 'Unrecognized verdict', tone: 'unknown' },\n 'judge-parse-failure': { label: 'Judge parse failure — not a review', tone: 'unknown' },\n 'judge-network-failure': { label: 'Judge network failure — not a review', tone: 'unknown' },\n};\n\nfunction latestJudged(decisions: DecisionEntry[]): DecisionEntry | null {\n const judged = decisions.filter((d) => d.action === 'judged' && d.judgeReasonCode);\n if (judged.length === 0) return null;\n return judged.reduce((a, b) => (Date.parse(b.ts) > Date.parse(a.ts) ? b : a));\n}\n\ntype PendingAction = 'approve' | 'reject' | null;\n\nexport interface ApprovalDetailProps {\n id: string;\n dispatchEnabled: boolean;\n onDispatchDisabled: () => void;\n onDecided: () => void;\n}\n\nexport function ApprovalDetail({ id, dispatchEnabled, onDispatchDisabled, onDecided }: ApprovalDetailProps) {\n const query = useQuery(proposalDetailQuery(id));\n const [pendingAction, setPendingAction] = useState<PendingAction>(null);\n const [tokenPrompt, setTokenPrompt] = useState(false);\n const [confirmOpen, setConfirmOpen] = useState(false);\n const [busy, setBusy] = useState(false);\n const [actionError, setActionError] = useState<string | null>(null);\n\n function requestAction(action: 'approve' | 'reject') {\n setActionError(null);\n setPendingAction(action);\n if (hasMutationHold()) setConfirmOpen(true);\n else setTokenPrompt(true);\n }\n\n function closeTokenPrompt() {\n setTokenPrompt(false);\n // Live read — MutationTokenDialog closes synchronously after setToken().\n if (hasMutationHold()) setConfirmOpen(true);\n else setPendingAction(null);\n }\n\n async function confirmAction() {\n if (!pendingAction) return;\n setBusy(true);\n setActionError(null);\n try {\n if (pendingAction === 'approve') await approveProposal(id);\n else await rejectProposal(id);\n setConfirmOpen(false);\n setPendingAction(null);\n onDecided();\n } catch (err) {\n if (err instanceof DispatchDisabledError) {\n setConfirmOpen(false);\n setPendingAction(null);\n onDispatchDisabled();\n } else {\n setActionError(describeControlError(err));\n }\n } finally {\n setBusy(false);\n }\n }\n\n if (query.status === 'loading') {\n return (\n <div className={styles.detail}>\n <SkeletonLine width=\"55%\" />\n <SkeletonLine width=\"30%\" />\n <SkeletonLine width=\"88%\" />\n </div>\n );\n }\n\n if (query.status === 'error' || !query.data) {\n return (\n <p className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Could not load this proposal.'}\n </p>\n );\n }\n\n const p = query.data;\n const evidence = p.decisionEvidence;\n const judged = latestJudged(evidence?.decisions ?? []);\n const judgeDisplay = judged?.judgeReasonCode ? JUDGE_REASON_DISPLAY[judged.judgeReasonCode] : null;\n const canDecide = p.status === 'pending' && dispatchEnabled;\n const engine = engineOf(p);\n const consequence = describeApproveConsequence(p.kind, p.repo);\n\n return (\n <div className={styles.detail}>\n <header className={styles.detailHead}>\n <h3 className={styles.detailTitle}>{p.title}</h3>\n <div className={styles.detailMeta}>\n <StatusBadge status={p.status} />\n <span>{p.kind}</span>\n <code title={p.repo ?? undefined}>{p.repo ?? 'no repo'}</code>\n <span>{p.riskClass ? `${p.riskClass} risk` : 'risk unstated'}</span>\n {engine ? <code>{engine}</code> : null}\n <span>created {formatRelative(p.createdAt)}</span>\n {p.decidedAt ? <span>decided {formatRelative(p.decidedAt)}</span> : null}\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n </div>\n {p.summary ? <p className={styles.summary}>{p.summary}</p> : null}\n </header>\n\n <section className={styles.block} aria-label=\"Evidence\">\n <h4 className={styles.blockTitle}>Evidence</h4>\n <dl className={styles.defs}>\n <dt>Judge verdict</dt>\n <dd>\n <Epistemic quality={evidence?.sourceQuality} label=\"judge verdict\">\n {judgeDisplay && judged?.judgeReasonCode ? (\n <StatusBadge status={judged.judgeReasonCode} tone={judgeDisplay.tone}>\n {judgeDisplay.label}\n </StatusBadge>\n ) : (\n <span className={styles.muted}>not yet judged</span>\n )}\n </Epistemic>\n </dd>\n\n <dt>Verification</dt>\n <dd>\n {p.verifyResult ? (\n <>\n <StatusBadge status={p.verifyResult.passed ? 'success' : 'failed'}>\n {p.verifyResult.passed ? 'passed' : 'failed'}\n </StatusBadge>\n {p.verifyResult.ran && p.verifyResult.ran.length > 0 ? (\n <span className={styles.muted}> · ran {p.verifyResult.ran.map((r) => r.kind).join(', ')}</span>\n ) : null}\n {!p.verifyResult.passed && p.verifyResult.failureCategory && p.verifyResult.failureCategory !== 'code' ? (\n <span className={styles.muted}> · {p.verifyResult.failureCategory} failure — the verifier itself, not the diff</span>\n ) : null}\n {p.verifyResult.failed && p.verifyResult.failed.length > 0 ? (\n <p className={styles.failedChecks}>failed: {p.verifyResult.failed.join(', ')}</p>\n ) : null}\n </>\n ) : (\n <span className={styles.muted}>not verified</span>\n )}\n </dd>\n\n {p.decisionReason ? (\n <>\n <dt>Decision reason</dt>\n <dd>{p.decisionReason}</dd>\n </>\n ) : null}\n\n {p.evidenceOutcome ? (\n <>\n <dt>Gates</dt>\n <dd className={styles.muted}>\n {p.evidenceOutcome.gateCount ?? 0} gate{p.evidenceOutcome.gateCount === 1 ? '' : 's'}\n {p.evidenceOutcome.policyAction ? ` · policy ${p.evidenceOutcome.policyAction}` : ''}\n {p.evidenceOutcome.trustBasis ? ` · trust ${p.evidenceOutcome.trustBasis}` : ''}\n </dd>\n </>\n ) : null}\n\n {p.result ? (\n <>\n <dt>Result</dt>\n <dd>{p.result}</dd>\n </>\n ) : null}\n </dl>\n </section>\n\n <section className={styles.block} aria-label=\"Provenance\">\n <h4 className={styles.blockTitle}>Provenance</h4>\n <dl className={styles.defs}>\n <dt>Produced by</dt>\n <dd>{engine ? <code>{engine}</code> : <span className={styles.muted}>unknown engine</span>}</dd>\n <dt>Origin</dt>\n <dd>{p.origin}</dd>\n {p.workItemId ? (\n <>\n <dt>Work item</dt>\n <dd>\n <code>{p.workItemId}</code>\n </dd>\n </>\n ) : null}\n {p.runId ? (\n <>\n <dt>Run</dt>\n <dd>\n <code>{p.runId}</code>\n </dd>\n </>\n ) : null}\n <dt>Attestation</dt>\n <dd className={styles.muted}>\n {/* The signature itself is never rendered — only whether one exists. */}\n {p.producerProvenanceSig\n ? `signed by the sandboxed producer (v${p.producerProvenanceVersion ?? 2})`\n : p.provenanceSig\n ? 'legacy signature present'\n : 'unsigned — earns no positive routing credit'}\n {p.diffHash ? ' · diff hashed at signing time' : ''}\n </dd>\n </dl>\n </section>\n\n <section className={styles.block} aria-label=\"Diff\">\n <h4 className={styles.blockTitle}>Diff</h4>\n <DiffViewer diff={p.diff} proposalKind={p.kind} />\n </section>\n\n {p.status === 'pending' ? (\n <footer className={styles.actions}>\n <p className={styles.actionNote}>\n {dispatchEnabled ? consequence : 'Read-only session — approve and reject are unavailable without dispatch.'}\n </p>\n {actionError && !confirmOpen ? (\n <p className={styles.error} role=\"alert\">\n {actionError}\n </p>\n ) : null}\n <button type=\"button\" className={styles.reject} disabled={!canDecide || busy} onClick={() => requestAction('reject')}>\n Reject\n </button>\n <button type=\"button\" className={styles.approve} disabled={!canDecide || busy} onClick={() => requestAction('approve')}>\n Approve…\n </button>\n </footer>\n ) : (\n <footer className={styles.decided}>\n This proposal is already <strong>{p.status}</strong> — no further action is available.\n </footer>\n )}\n\n <MutationTokenDialog\n open={tokenPrompt}\n onClose={closeTokenPrompt}\n reason={\n pendingAction === 'approve'\n ? 'Approving a proposal writes to a real repository and requires the dispatch token.'\n : 'Rejecting a proposal requires the dispatch token.'\n }\n tokenHelp=\"the mutation token ashlr verse printed\"\n />\n\n <ConfirmDialog\n open={confirmOpen}\n onClose={() => {\n setConfirmOpen(false);\n setPendingAction(null);\n setActionError(null);\n }}\n title={\n pendingAction === 'approve'\n ? `Approve this ${p.kind} against ${p.repo ? p.repo.split('/').pop() : 'the repository'}?`\n : 'Reject this proposal?'\n }\n body={\n pendingAction === 'approve' ? (\n <>\n <strong>{p.title}</strong>\n <br />\n Kind <strong>{p.kind}</strong> · repository <code>{p.repo ?? 'unknown'}</code>\n <br />\n <br />\n {consequence}\n {reachesRemote(p.kind) ? (\n <>\n <br />\n <br />\n This one leaves your machine.\n </>\n ) : null}\n </>\n ) : (\n <>\n This rejects <strong>{p.title}</strong> and discards it. It stays in history as rejected and is never\n applied.\n </>\n )\n }\n confirmLabel={pendingAction === 'approve' ? `Approve and ${reachesRemote(p.kind) ? 'open the pull request' : 'apply'}` : 'Reject'}\n // Approve is the irreversible one — a `pr` pushes a branch and opens a\n // real PR other people can see, a `patch` writes to disk now. Reject\n // only discards a proposal that stays in history. Putting the danger\n // styling on Reject trained the reflex that the red button is the safe\n // one; VERSE-CONTRACT-V2 calls Approve destructive explicitly.\n destructive={pendingAction === 'approve'}\n busy={busy}\n error={actionError}\n onConfirm={() => void confirmAction()}\n />\n </div>\n );\n}\n","/**\n * routes/verse/approvals/ApprovalsList.tsx — the triage queue.\n *\n * Reads the existing `GET /api/inbox?status=&limit=` through the shared\n * `inboxListQuery` (server-side status filter, client-side repo/text narrowing\n * over the returned page) and orders it pending-first via approvals-model.ts,\n * so a history filter still surfaces anything still awaiting a decision at the\n * top instead of burying it by date.\n *\n * Risk is carried by a 2px left rule AND by the word, never by colour alone.\n * Rows are buttons, not links: the Verse console has no router, selection is\n * section-local state.\n */\nimport { useMemo, useRef, useState } from 'react';\nimport { RefreshIndicator } from '../../../components/primitives/RefreshIndicator.js';\nimport { Select } from '../../../components/primitives/Select.js';\nimport { SkeletonRow } from '../../../components/primitives/Skeleton.js';\nimport { StatusBadge } from '../../../components/primitives/StatusBadge.js';\nimport type { Proposal } from '../../../data/api-types.js';\nimport { useQuery } from '../../../data/hooks.js';\nimport { inboxListQuery, type InboxHistoryStatus } from '../../../data/queries.js';\nimport { formatAge } from '../autonomy/format.js';\nimport { engineOf, filterProposals, orderProposals } from './approvals-model.js';\nimport styles from './approvals.module.css';\n\nconst STATUS_OPTIONS: { value: InboxHistoryStatus; label: string }[] = [\n { value: 'pending', label: 'Pending' },\n { value: 'all', label: 'All statuses' },\n { value: 'approved', label: 'Approved' },\n { value: 'applied', label: 'Applied' },\n { value: 'rejected', label: 'Rejected' },\n { value: 'failed', label: 'Failed' },\n { value: 'awaiting-host-merge', label: 'Awaiting host merge' },\n];\n\nexport interface ApprovalsListProps {\n selectedId: string | null;\n onSelect: (id: string) => void;\n}\n\nexport function ApprovalsList({ selectedId, onSelect }: ApprovalsListProps) {\n const [status, setStatus] = useState<InboxHistoryStatus>('pending');\n const [search, setSearch] = useState('');\n const [repo, setRepo] = useState('');\n const [focusedIndex, setFocusedIndex] = useState(0);\n const rowRefs = useRef<Map<string, HTMLButtonElement>>(new Map());\n\n const query = useQuery(inboxListQuery({ status, limit: 500 }));\n\n const rows = useMemo<Proposal[]>(\n () => orderProposals(filterProposals(query.data?.proposals ?? [], search, repo)),\n [query.data, search, repo],\n );\n\n function onKeyDown(e: React.KeyboardEvent) {\n if (rows.length === 0) return;\n if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n const next = e.key === 'ArrowDown' ? Math.min(focusedIndex + 1, rows.length - 1) : Math.max(focusedIndex - 1, 0);\n setFocusedIndex(next);\n rowRefs.current.get(rows[next]!.id)?.focus();\n }\n }\n\n return (\n <div className={styles.listPane}>\n <div className={styles.filters}>\n {/* Select primitive — see the note in ActivityPanel: an unreset\n <select> is a default browser control, which §7 forbids. */}\n <Select\n className={styles.filterSelect}\n label=\"Status\"\n value={status}\n onChange={(e) => setStatus(e.target.value as InboxHistoryStatus)}\n >\n {STATUS_OPTIONS.map((o) => (\n <option key={o.value} value={o.value}>\n {o.label}\n </option>\n ))}\n </Select>\n <label className={styles.filterField}>\n <span className={styles.filterLabel}>Repo</span>\n <input type=\"text\" value={repo} placeholder=\"filter by repo\" onChange={(e) => setRepo(e.target.value)} />\n </label>\n <label className={styles.filterField}>\n <span className={styles.filterLabel}>Search</span>\n <input type=\"search\" value={search} placeholder=\"title or summary\" onChange={(e) => setSearch(e.target.value)} />\n </label>\n </div>\n\n <div className={styles.count} aria-live=\"polite\">\n {query.status === 'refreshing' ? <RefreshIndicator /> : null}\n {query.data ? (\n <span>\n {rows.length} shown · {query.data.pending} pending\n {query.data.truncated ? ' · capped, narrow the filter' : ''}\n </span>\n ) : (\n <span>Loading proposals…</span>\n )}\n </div>\n\n {query.status === 'loading' ? (\n <div className={styles.skeletons}>\n <SkeletonRow />\n <SkeletonRow />\n <SkeletonRow />\n </div>\n ) : query.status === 'error' ? (\n <p className={styles.error} role=\"alert\">\n {query.error?.message ?? 'Could not read the approvals queue.'}\n </p>\n ) : rows.length === 0 ? (\n <p className={styles.empty}>\n {status === 'pending' && !search && !repo ? (\n <>\n <span className={styles.emptyStrong}>Nothing is waiting on you.</span> The loop only produces proposals\n for enrolled repositories — if you expected something here, check the scope list in Autonomy.\n </>\n ) : (\n 'No proposals match this filter.'\n )}\n </p>\n ) : (\n <div className={styles.rows} role=\"list\" onKeyDown={onKeyDown}>\n {rows.map((p, i) => {\n const engine = engineOf(p);\n return (\n <div role=\"listitem\" key={p.id}>\n <button\n type=\"button\"\n ref={(el) => {\n if (el) rowRefs.current.set(p.id, el);\n else rowRefs.current.delete(p.id);\n }}\n tabIndex={i === focusedIndex ? 0 : -1}\n className={`${styles.row} ${p.id === selectedId ? styles.rowActive : ''}`}\n aria-current={p.id === selectedId ? 'true' : undefined}\n onFocus={() => setFocusedIndex(i)}\n onClick={() => onSelect(p.id)}\n >\n <span className={styles.riskRule} data-risk={p.riskClass ?? 'unstated'} aria-hidden=\"true\" />\n <span className={styles.rowTitle} title={p.title}>\n {p.title}\n </span>\n <span className={styles.rowMeta}>\n <span className={styles.riskWord} data-risk={p.riskClass ?? 'unstated'}>\n {p.riskClass ? `${p.riskClass} risk` : 'risk unstated'}\n </span>\n <span className={styles.rowMetaMono} title={p.repo ?? undefined}>\n {p.repo ? p.repo.split('/').pop() : 'no repo'}\n </span>\n <span className={styles.rowMetaMono} title={engine ?? undefined}>\n {engine ?? 'engine unknown'}\n </span>\n <span className={styles.rowAge}>{formatAge(p.createdAt)}</span>\n {p.status === 'pending' ? null : <StatusBadge status={p.status} />}\n </span>\n </button>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n}\n","/**\n * routes/verse/sections/ApprovalsSection.tsx — the leash's other end: what the\n * autonomous loop produced while the human was out of it, and the two buttons\n * that decide its fate. Lazy-mounted by VerseApp's rail; takes no props.\n *\n * List + detail are section-local state rather than routed, because the Verse\n * console deliberately has no router (app/VerseConsoleApp.tsx). Selection\n * survives a background refresh; it does not survive a reload, which is\n * correct — a stale approval id is worse than an empty pane.\n *\n * A server without dispatch 404s approve/reject. That is surfaced once, at the\n * top, as a read-only session — the diff, the evidence and the provenance are\n * all still worth reading in that mode, so nothing else is hidden.\n */\nimport { useState } from 'react';\nimport { useQuery } from '../../../data/hooks.js';\nimport { inboxListQuery } from '../../../data/queries.js';\nimport { ApprovalDetail } from '../approvals/ApprovalDetail.js';\nimport { ApprovalsList } from '../approvals/ApprovalsList.js';\nimport { verseBootstrapQuery } from '../verse-queries.js';\nimport approvals from '../approvals/approvals.module.css';\nimport styles from './ApprovalsSection.module.css';\n\nexport function ApprovalsSection() {\n const bootstrap = useQuery(verseBootstrapQuery);\n const pending = useQuery(inboxListQuery({ status: 'pending', limit: 500 }));\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [dispatchDenied, setDispatchDenied] = useState(false);\n\n const dispatchEnabled = (bootstrap.data?.dispatchEnabled ?? true) && !dispatchDenied;\n const pendingCount = pending.data?.pending;\n\n return (\n <section className={styles.section} aria-label=\"Approvals\">\n <header className={styles.header} data-app-region=\"drag\">\n <h2 className={styles.title}>Approvals</h2>\n <span className={styles.headerMeta}>\n {typeof pendingCount === 'number' ? `${pendingCount} awaiting you` : 'counting…'}\n </span>\n </header>\n\n {!dispatchEnabled ? (\n <div className={styles.banner} role=\"status\">\n <span className={styles.bannerTitle}>Read-only session</span>\n This server was started without dispatch, so approve and reject are unavailable. Diffs, verification results\n and provenance still read normally — run <code>ashlr verse</code> to decide.\n </div>\n ) : null}\n\n <div className={`${styles.body} ${approvals.layout}`}>\n <ApprovalsList selectedId={selectedId} onSelect={setSelectedId} />\n <div className={approvals.detailPane}>\n {selectedId ? (\n <ApprovalDetail\n key={selectedId}\n id={selectedId}\n dispatchEnabled={dispatchEnabled}\n onDispatchDisabled={() => setDispatchDenied(true)}\n onDecided={() => setSelectedId(null)}\n />\n ) : (\n <div className={styles.placeholder}>\n Select a proposal to read its diff, its verification result, and where it came from before deciding.\n <p className={styles.placeholderHint}>↑/↓ moves through the queue · pending proposals sort first.</p>\n </div>\n )}\n </div>\n </div>\n </section>\n );\n}\n"],"names":["orderProposals","rows","a","b","pendingA","pendingB","tsA","tsB","safeA","safeB","filterProposals","search","repo","s","r","p","describeApproveConsequence","kind","where","reachesRemote","engineOf","proposal","JUDGE_REASON_DISPLAY","latestJudged","decisions","judged","d","ApprovalDetail","id","dispatchEnabled","onDispatchDisabled","onDecided","query","useQuery","proposalDetailQuery","pendingAction","setPendingAction","useState","tokenPrompt","setTokenPrompt","confirmOpen","setConfirmOpen","busy","setBusy","actionError","setActionError","requestAction","action","hasMutationHold","closeTokenPrompt","confirmAction","approveProposal","rejectProposal","err","DispatchDisabledError","describeControlError","jsxs","styles","jsx","SkeletonLine","evidence","judgeDisplay","canDecide","engine","consequence","StatusBadge","formatRelative","RefreshIndicator","Epistemic","Fragment","DiffViewer","MutationTokenDialog","ConfirmDialog","STATUS_OPTIONS","ApprovalsList","selectedId","onSelect","status","setStatus","setSearch","setRepo","focusedIndex","setFocusedIndex","rowRefs","useRef","inboxListQuery","useMemo","onKeyDown","e","next","Select","o","SkeletonRow","i","el","formatAge","ApprovalsSection","bootstrap","verseBootstrapQuery","pending","setSelectedId","dispatchDenied","setDispatchDenied","pendingCount","approvals"],"mappings":"uvBAaO,SAASA,EAAeC,EAAuC,CACpE,MAAO,CAAC,GAAGA,CAAI,EAAE,KAAK,CAACC,EAAGC,IAAM,CAC9B,MAAMC,EAAWF,EAAE,SAAW,UAAY,EAAI,EACxCG,EAAWF,EAAE,SAAW,UAAY,EAAI,EAC9C,GAAIC,IAAaC,EAAU,OAAOD,EAAWC,EAC7C,MAAMC,EAAM,KAAK,MAAMJ,EAAE,SAAS,EAC5BK,EAAM,KAAK,MAAMJ,EAAE,SAAS,EAC5BK,EAAQ,OAAO,MAAMF,CAAG,EAAI,EAAIA,EAChCG,EAAQ,OAAO,MAAMF,CAAG,EAAI,EAAIA,EACtC,OAAIC,IAAUC,EAAcA,EAAQD,EAC7BN,EAAE,GAAG,cAAcC,EAAE,EAAE,CAChC,CAAC,CACH,CAmBO,SAASO,EAAgBT,EAA2BU,EAAgBC,EAA0B,CACnG,MAAMC,EAAIF,EAAO,KAAA,EAAO,YAAA,EAClBG,EAAIF,EAAK,KAAA,EAAO,YAAA,EACtB,MAAI,CAACC,GAAK,CAACC,EAAU,CAAC,GAAGb,CAAI,EACtBA,EAAK,OAAQc,GACd,EAAAF,GAAK,CAACE,EAAE,MAAM,YAAA,EAAc,SAASF,CAAC,GAAK,EAAEE,EAAE,SAAW,IAAI,YAAA,EAAc,SAASF,CAAC,GACtFC,GAAK,EAAEC,EAAE,MAAQ,IAAI,cAAc,SAASD,CAAC,EAElD,CACH,CAQO,SAASE,GAA2BC,EAA6BL,EAA6B,CACnG,MAAMM,EAAQN,GAAc,wBAC5B,OAAQK,EAAA,CACN,IAAK,KACH,MAAO,sBAAsBC,CAAK,gHACpC,IAAK,QACH,MAAO,sBAAsBA,CAAK,iEACpC,QACE,MAAO,gBAAgB,OAAOD,CAAI,CAAC,gBAAgBC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e5d8_9{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--border-subtle);background:var(--bg-surface)}._detailPane_1e5d8_10{display:flex;flex-direction:column;min-height:0;overflow-y:auto;scrollbar-gutter:stable;background:var(--bg-canvas)}._filters_1e5d8_12{flex-shrink:0;display:flex;flex-wrap:wrap;gap:var(--space-2);padding:var(--space-3) var(--space-4);border-bottom:1px solid var(--border-subtle)}._filterField_1e5d8_13{display:flex;flex-direction:column;gap:var(--space-1);flex:1;min-width:120px}._filterLabel_1e5d8_14{font-family:var(--font-display);font-size:var(--text-2xs-size, 11px);letter-spacing:var(--tracking-label, .06em);text-transform:uppercase;color:var(--text-tertiary)}._filters_1e5d8_12 input{min-height:var(--density-row, 32px);padding:0 var(--space-2);border:1px solid var(--border-default);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--text-primary);font-family:var(--font-ui);font-size:var(--text-xs-size)}._filterSelect_1e5d8_31{flex:1;min-width:120px}._filterSelect_1e5d8_31>label{font-family:var(--font-display);font-size:var(--text-2xs-size, 11px);letter-spacing:var(--tracking-label, .06em);text-transform:uppercase;font-weight:var(--font-weight-regular, 400);color:var(--text-tertiary)}._filters_1e5d8_12 input[type=search]::-webkit-search-cancel-button{appearance:none}._count_1e5d8_46{flex-shrink:0;display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-4);font-size:var(--text-xs-size);color:var(--text-tertiary);border-bottom:1px solid var(--border-subtle)}._rows_1e5d8_48{flex:1;min-height:0;overflow-y:auto;scrollbar-gutter:stable}._row_1e5d8_48{display:grid;grid-template-columns:2px minmax(0,1fr);column-gap:var(--space-3);width:100%;padding:var(--space-3) var(--space-4);border:0;border-bottom:1px solid var(--border-subtle);background:transparent;text-align:left;color:var(--text-primary);cursor:pointer}._row_1e5d8_48:hover{background:var(--bg-hover)}._rowActive_1e5d8_63{background:var(--bg-selected)}._row_1e5d8_48:focus-visible{outline:2px solid var(--border-focus);outline-offset:-2px;box-shadow:none}._riskRule_1e5d8_68{grid-row:1 / span 2;border-radius:var(--radius-full);background:var(--border-strong)}._riskRule_1e5d8_68[data-risk=high]{background:var(--status-danger-solid)}._riskRule_1e5d8_68[data-risk=medium]{background:var(--status-warning-solid)}._riskRule_1e5d8_68[data-risk=low]{background:var(--status-success-solid)}._rowTitle_1e5d8_72{font-size:var(--text-sm-size);line-height:var(--text-sm-line);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._rowMeta_1e5d8_73{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1) var(--space-3);margin-top:2px;font-size:var(--text-xs-size);color:var(--text-tertiary)}._row_1e5d8_48:hover ._rowMeta_1e5d8_73,._rowActive_1e5d8_63 ._rowMeta_1e5d8_73{color:var(--text-secondary)}._rowMetaMono_1e5d8_82{font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:14ch}._rowAge_1e5d8_83{font-family:var(--font-display)}._riskWord_1e5d8_84{font-family:var(--font-display);letter-spacing:var(--tracking-label, .06em);text-transform:uppercase;font-size:var(--text-2xs-size, 11px)}._riskWord_1e5d8_84[data-risk=high]{color:var(--status-danger-fg)}._riskWord_1e5d8_84[data-risk=medium]{color:var(--status-warning-fg)}._riskWord_1e5d8_84[data-risk=low]{color:var(--status-success-fg)}._detail_1e5d8_10{padding:var(--space-5) var(--space-6) var(--space-16);max-width:1040px}._detailHead_1e5d8_91{padding-bottom:var(--space-4);border-bottom:1px solid var(--border-subtle)}._detailTitle_1e5d8_92{font-family:var(--font-display);font-size:var(--text-xl-size);line-height:var(--text-xl-line);font-weight:var(--font-weight-semibold);letter-spacing:var(--tracking-display, -.02em)}._detailMeta_1e5d8_93{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2) var(--space-3);margin-top:var(--space-2);font-size:var(--text-xs-size);color:var(--text-tertiary)}._detailMeta_1e5d8_93 code{font-family:var(--font-mono)}._summary_1e5d8_95{margin-top:var(--space-3);font-size:var(--text-base-size);line-height:var(--text-base-line);color:var(--text-secondary);max-width:72ch}._block_1e5d8_97{padding-block:var(--space-5);border-bottom:1px solid var(--border-subtle)}._blockTitle_1e5d8_98{font-family:var(--font-display);font-size:var(--text-xs-size);letter-spacing:var(--tracking-label, .06em);text-transform:uppercase;font-weight:var(--font-weight-semibold);color:var(--text-tertiary);margin-bottom:var(--space-3)}._defs_1e5d8_107{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:var(--space-2) var(--space-4);margin:0;font-size:var(--text-sm-size);line-height:var(--text-sm-line)}._defs_1e5d8_107 dt{color:var(--text-tertiary)}._defs_1e5d8_107 dd{margin:0;color:var(--text-primary);min-width:0;overflow-wrap:anywhere}._defs_1e5d8_107 dd code{font-family:var(--font-mono);font-size:var(--text-xs-size)}._muted_1e5d8_111{color:var(--text-tertiary)}._failedChecks_1e5d8_112{margin:var(--space-1) 0 0;font-family:var(--font-mono);font-size:var(--text-xs-size);color:var(--status-danger-fg)}._actions_1e5d8_114{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-5)}._actionNote_1e5d8_115{flex:1;min-width:240px;font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--text-secondary)}._reject_1e5d8_116,._approve_1e5d8_117{min-height:var(--density-row, 32px);padding:0 var(--space-4);border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-sm-size);font-weight:var(--font-weight-medium);cursor:pointer}._reject_1e5d8_116{border:1px solid var(--border-default);background:var(--bg-surface);color:var(--text-primary)}._reject_1e5d8_116:hover:not(:disabled){border-color:var(--status-danger-solid);color:var(--status-danger-fg)}._approve_1e5d8_117{border:1px solid var(--accent-500);background:var(--accent-500);color:var(--accent-contrast)}._approve_1e5d8_117:hover:not(:disabled){background:var(--accent-600);border-color:var(--accent-600)}._reject_1e5d8_116:disabled,._approve_1e5d8_117:disabled{border-color:var(--border-default);background:var(--bg-surface);color:var(--text-disabled);cursor:not-allowed}._decided_1e5d8_133{padding-top:var(--space-5);font-size:var(--text-sm-size);color:var(--text-secondary)}._empty_1e5d8_135{padding:var(--space-8) var(--space-6);font-size:var(--text-sm-size);line-height:var(--text-base-line);color:var(--text-secondary);max-width:62ch}._emptyStrong_1e5d8_136{color:var(--text-primary);font-weight:var(--font-weight-medium)}._error_1e5d8_137{margin:var(--space-4);padding:var(--space-3);border:1px solid var(--status-danger-solid);border-radius:var(--radius-sm);background:var(--status-danger-bg);color:var(--status-danger-fg);font-size:var(--text-sm-size);line-height:var(--text-sm-line)}._skeletons_1e5d8_138{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-4)}@media(max-width:900px){._layout_1e5d8_8{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(160px,38%) minmax(0,1fr)}._listPane_1e5d8_9{border-right:0;border-bottom:1px solid var(--border-subtle)}._detail_1e5d8_10{padding:var(--space-4) var(--space-4) var(--space-12)}}._section_sshlm_7{display:flex;flex-direction:column;min-height:0;height:100%;background:var(--bg-canvas)}._header_sshlm_9{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);height:var(--strip-height);padding:0 var(--space-5);border-bottom:1px solid var(--border-subtle);background:var(--bg-surface)}._title_sshlm_22{font-family:var(--font-display);font-size:var(--text-md-size);line-height:var(--text-md-line);font-weight:var(--font-weight-semibold);letter-spacing:var(--tracking-display, -.02em);color:var(--text-primary)}._headerMeta_sshlm_30{font-family:var(--font-display);font-size:var(--text-xs-size);color:var(--text-tertiary)}._banner_sshlm_32{flex-shrink:0;padding:var(--space-3) var(--space-5);border-bottom:1px solid var(--border-subtle);background:var(--bg-surface);color:var(--text-secondary);font-size:var(--text-sm-size);line-height:var(--text-base-line)}._banner_sshlm_32 code{font-family:var(--font-mono);font-size:var(--text-xs-size)}._bannerTitle_sshlm_42{display:block;color:var(--text-primary);font-weight:var(--font-weight-medium)}._body_sshlm_44{flex:1;min-height:0}._placeholder_sshlm_46{padding:var(--space-8) var(--space-6);max-width:62ch;font-size:var(--text-sm-size);line-height:var(--text-base-line);color:var(--text-secondary)}._placeholderHint_sshlm_47{margin-top:var(--space-2);font-size:var(--text-xs-size);color:var(--text-tertiary)}._header_sshlm_9{padding-left:max(var(--space-5),calc(var(--app-traffic-light-inset, 0px) - var(--rail-width, 56px)))}
@@ -1,2 +0,0 @@
1
- import{r as g,j as e}from"./index-CpgkRaTi.js";import{M as ye}from"./MutationTokenDialog-DYF8n_RD.js";import{R as I}from"./RefreshIndicator-DXJQXKyA.js";import{b as _,S as E}from"./Skeleton-YkcOpgFb.js";import{f as k,w as B,j as Q,o as $,b as ge,t as fe,g as be,a as je,A as ee}from"./global-BHjd6fVZ.js";import{V as _e,v as Ne,S as G,a as ve,u as K,r as R,e as ke,b as we,c as Se,f as Te,g as te,h as Re,i as Y,j as Ce,k as z,l as X,m as Le,n as Ee}from"./use-guarded-action-DwaESKVy.js";import{d as se,b as q,a as M,c as D,U as N,e as U,g as F,n as $e,h as Ae,i as De,j as He,f as Me}from"./format-fggwu_Rs.js";import{C as w}from"./ConfirmDialog-deO0C0iY.js";import{i as ne}from"./Epistemic-53PikaUI.js";import{M as ae}from"./Meter-DRWZQgr1.js";import{S as H}from"./StatusBadge-DJw0LSPg.js";import{r as le,s as oe,f as Fe,o as Ie,e as Oe,p as Pe,a as qe,b as Ue,l as Be,c as We,d as Ve,g as Qe,h as Ge,C as Ke}from"./fleet-model-DXCfVtNW.js";import{a as Ye,v as ze}from"./VerseConsoleApp-Cu5aG6J6.js";import{R as Xe,a as Je}from"./workspace-model-JgmWDKt4.js";import"./Dialog-CNd7q89m.js";import"./index-CJ-e8YA9.js";import"./RouteErrorBoundary-CZd7ln8v.js";import"./queries-856qUN3Y.js";import"./verse-model-Dllo8rRt.js";function Ze(s){const n=s.limit;if(typeof n!="number"||!Number.isFinite(n)||n<=0)return"unlimited";const l=typeof s.callsToday=="number"&&Number.isFinite(s.callsToday)?s.callsToday:0;return l>=n?"over":l>=n*.8?"warn":"ok"}const et="_panel_1lat4_12",tt="_panelHead_1lat4_15",st="_panelTitle_1lat4_16",nt="_panelHeadSpaced_1lat4_25",at="_panelNote_1lat4_26",lt="_panelActions_1lat4_27",ot="_status_1lat4_30",it="_statusTop_1lat4_31",rt="_runState_1lat4_32",ct="_runDot_1lat4_33",dt="_facts_1lat4_39",ut="_fact_1lat4_39",ht="_factLabel_1lat4_41",mt="_factValue_1lat4_42",pt="_budget_1lat4_49",xt="_budgetLine_1lat4_50",yt="_budgetLabel_1lat4_51",gt="_budgetNote_1lat4_52",ft="_meter_1lat4_53",bt="_meterFill_1lat4_58",jt="_controls_1lat4_61",_t="_button_1lat4_62",Nt="_buttonPrimary_1lat4_76",vt="_emergency_1lat4_80",kt="_emergencyButton_1lat4_81",wt="_emergencyNote_1lat4_102",St="_capGrid_1lat4_105",Tt="_cap_1lat4_105",Rt="_capLabel_1lat4_107",Ct="_capRow_1lat4_108",Lt="_capInput_1lat4_109",Et="_capInputInvalid_1lat4_123",$t="_capUnit_1lat4_124",At="_capHelp_1lat4_125",Dt="_capUsage_1lat4_126",Ht="_capError_1lat4_127",Mt="_actionNote_1lat4_130",Ft="_capApplied_1lat4_131",It="_repoList_1lat4_135",Ot="_repoRow_1lat4_136",Pt="_repoName_1lat4_137",qt="_repoPath_1lat4_138",Ut="_repoMissing_1lat4_139",Bt="_addRow_1lat4_140",Wt="_addInput_1lat4_141",Vt="_tableScroll_1lat4_156",Qt="_table_1lat4_156",Gt="_cellAction_1lat4_176",Kt="_cellTime_1lat4_177",Yt="_cellSummary_1lat4_178",zt="_cellRepo_1lat4_179",Xt="_resultTag_1lat4_188",Jt="_filters_1lat4_197",Zt="_filterField_1lat4_198",es="_filterLabel_1lat4_199",ts="_filterSelect_1lat4_214",ss="_checkList_1lat4_229",ns="_check_1lat4_229",as="_checkMark_1lat4_231",ls="_checkLabel_1lat4_234",os="_checkDetail_1lat4_235",is="_summaryColumns_1lat4_238",rs="_summaryList_1lat4_239",cs="_summaryRow_1lat4_240",ds="_summaryTitle_1lat4_241",us="_summaryMeta_1lat4_242",hs="_empty_1lat4_245",ms="_emptyStrong_1lat4_246",ps="_error_1lat4_247",xs="_readOnly_1lat4_248",ys="_skeletons_1lat4_250",gs="_srOnly_1lat4_251",fs="_runtimeTop_1lat4_266",bs="_runtimeState_1lat4_267",js="_runtimeStateText_1lat4_268",_s="_factWide_1lat4_275",Ns="_factMono_1lat4_276",vs="_capacityBlock_1lat4_280",ks="_capacityHead_1lat4_281",ws="_capacityBig_1lat4_282",Ss="_capacityWords_1lat4_296",Ts="_capacityHeadline_1lat4_297",Rs="_capacityDetail_1lat4_298",Cs="_evidence_1lat4_301",Ls="_evidenceLead_1lat4_302",Es="_evidenceScroll_1lat4_303",$s="_evidenceTable_1lat4_304",As="_evidenceNums_1lat4_309",Ds="_evidenceCode_1lat4_310",Hs="_utilisation_1lat4_312",Ms="_toggleRow_1lat4_315",Fs="_toggleState_1lat4_316",Is="_policyExplain_1lat4_317",Os="_impact_1lat4_320",Ps="_impactTitle_1lat4_321",qs="_impactSummary_1lat4_322",Us="_seatList_1lat4_323",Bs="_seatRow_1lat4_324",Ws="_seatEngine_1lat4_325",Vs="_seatLabel_1lat4_340",Qs="_seatRefusal_1lat4_341",Gs="_pressure_1lat4_344",Ks="_pressureHead_1lat4_345",Ys="_pressureHeadline_1lat4_346",zs="_pressureDetail_1lat4_349",Xs="_fleetMeters_1lat4_351",Js="_elapsedQualifier_1lat4_352",Zs="_noteList_1lat4_353",en="_repoStanding_1lat4_357",tn="_repoPriority_1lat4_364",sn="_repoSection_1lat4_365",nn="_repoOutsideFocus_1lat4_366",t={panel:et,panelHead:tt,panelTitle:st,panelHeadSpaced:nt,panelNote:at,panelActions:lt,status:ot,statusTop:it,runState:rt,runDot:ct,facts:dt,fact:ut,factLabel:ht,factValue:mt,budget:pt,budgetLine:xt,budgetLabel:yt,budgetNote:gt,meter:ft,meterFill:bt,controls:jt,button:_t,buttonPrimary:Nt,emergency:vt,emergencyButton:kt,emergencyNote:wt,capGrid:St,cap:Tt,capLabel:Rt,capRow:Ct,capInput:Lt,capInputInvalid:Et,capUnit:$t,capHelp:At,capUsage:Dt,capError:Ht,actionNote:Mt,capApplied:Ft,repoList:It,repoRow:Ot,repoName:Pt,repoPath:qt,repoMissing:Ut,addRow:Bt,addInput:Wt,tableScroll:Vt,table:Qt,cellAction:Gt,cellTime:Kt,cellSummary:Yt,cellRepo:zt,resultTag:Xt,filters:Jt,filterField:Zt,filterLabel:es,filterSelect:ts,checkList:ss,check:ns,checkMark:as,checkLabel:ls,checkDetail:os,summaryColumns:is,summaryList:rs,summaryRow:cs,summaryTitle:ds,summaryMeta:us,empty:hs,emptyStrong:ms,error:ps,readOnly:xs,skeletons:ys,srOnly:gs,runtimeTop:fs,runtimeState:bs,runtimeStateText:js,factWide:_s,factMono:Ns,capacityBlock:vs,capacityHead:ks,capacityBig:ws,capacityWords:Ss,capacityHeadline:Ts,capacityDetail:Rs,evidence:Cs,evidenceLead:Ls,evidenceScroll:Es,evidenceTable:$s,evidenceNums:As,evidenceCode:Ds,utilisation:Hs,toggleRow:Ms,toggleState:Fs,policyExplain:Is,impact:Os,impactTitle:Ps,impactSummary:qs,seatList:Us,seatRow:Bs,seatEngine:Ws,seatLabel:Vs,seatRefusal:Qs,pressure:Gs,pressureHead:Ks,pressureHeadline:Ys,pressureDetail:zs,fleetMeters:Xs,elapsedQualifier:Js,noteList:Zs,repoStanding:en,repoPriority:tn,repoSection:sn,repoOutsideFocus:nn},J=20,P=40;function an({snapshot:s}){const n=s.daemon?.ticks??null,l=g.useMemo(()=>n?[...n].slice(-J).reverse():[],[n]),o=g.useMemo(()=>{if(!n)return[];const a=[];for(let r=n.length-1;r>=0&&a.length<P;r-=1){const d=n[r];if(d?.dispatches)for(let c=d.dispatches.length-1;c>=0&&a.length<P;c-=1)a.push({...d.dispatches[c],tickTs:d.ts})}return a},[n]);return e.jsxs("section",{className:t.panel,"aria-label":"Activity",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{className:t.panelTitle,children:"Recent ticks"}),e.jsxs("p",{className:t.panelNote,children:["Newest first · last ",J]})]}),n===null?e.jsx("p",{className:t.empty,children:"The daemon ledger is not readable right now, so tick history is unknown."}):l.length===0?e.jsx("p",{className:t.empty,children:"No ticks have been recorded yet. Start the loop, or run one tick, to produce the first."}):e.jsx("div",{className:t.tableScroll,children:e.jsxs("table",{className:t.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Time"}),e.jsx("th",{scope:"col",children:"Outcome"}),e.jsx("th",{scope:"col",children:"Items"}),e.jsx("th",{scope:"col",children:"Proposals"}),e.jsx("th",{scope:"col",children:"Dispatched"}),e.jsx("th",{scope:"col",children:"Spend"}),e.jsx("th",{scope:"col",children:"Direction"})]})}),e.jsx("tbody",{children:l.map(a=>{const r=se(a.reason);return e.jsxs("tr",{children:[e.jsx("td",{className:t.cellTime,title:M(a.ts),children:q(a.ts)}),e.jsxs("td",{className:t.cellSummary,"data-tone":r.tone,children:[r.label,a.dryRun?" (dry run)":""]}),e.jsx("td",{className:t.cellTime,children:D(a.itemsConsidered)}),e.jsx("td",{className:t.cellTime,children:D(a.proposalsCreated)}),e.jsx("td",{className:t.cellTime,children:a.dispatches?a.dispatches.length:N}),e.jsx("td",{className:t.cellTime,children:U(a.spentUsd)}),e.jsx("td",{className:t.cellSummary,children:a.directionMode??"—"})]},`${a.ts}-${a.reason}`)})})]})}),e.jsxs("div",{className:`${t.panelHead} ${t.panelHeadSpaced}`,children:[e.jsx("h3",{className:t.panelTitle,children:"Recent dispatches"}),e.jsxs("p",{className:t.panelNote,children:["Newest first · last ",P]})]}),o.length===0?e.jsx("p",{className:t.empty,children:"No dispatch traces in the recorded ticks. A tick that finds nothing eligible records no dispatches — that is normal, not a gap."}):e.jsx("div",{className:t.tableScroll,children:e.jsxs("table",{className:t.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Time"}),e.jsx("th",{scope:"col",children:"Item"}),e.jsx("th",{scope:"col",children:"Repo"}),e.jsx("th",{scope:"col",children:"Engine"}),e.jsx("th",{scope:"col",children:"Outcome"}),e.jsx("th",{scope:"col",children:"Spend"})]})}),e.jsx("tbody",{children:o.map((a,r)=>e.jsxs("tr",{children:[e.jsx("td",{className:t.cellTime,title:M(a.tickTs),children:q(a.tickTs)}),e.jsx("td",{className:t.cellSummary,title:a.title,children:a.title}),e.jsx("td",{className:t.cellRepo,title:a.repo,children:a.repo?a.repo.split("/").pop():N}),e.jsx("td",{className:t.cellAction,children:a.backend??"not routed"}),e.jsx("td",{className:t.cellSummary,children:a.dispatched?"dispatched":`skipped — ${a.reason}`}),e.jsx("td",{className:t.cellTime,children:U(a.spentUsd)})]},`${a.tickTs}-${a.itemId}-${r}`))})]})}),e.jsx(ln,{})]})}function ln(){const[s,n]=g.useState(""),[l,o]=g.useState(""),[a,r]=g.useState(""),[d,c]=g.useState(_e),y=g.useMemo(()=>Ne({limit:d,action:l||void 0,result:a||void 0}),[d,l,a]),i=k(y),p=B(y),h=i.data?.entries??[];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`${t.panelHead} ${t.panelHeadSpaced}`,children:[e.jsx("h3",{className:t.panelTitle,children:"Audit trail"}),e.jsxs("div",{className:t.panelActions,children:[i.status==="refreshing"?e.jsx(I,{}):null,e.jsx("button",{type:"button",className:t.button,onClick:p,children:"Refresh"})]})]}),e.jsxs("div",{className:t.filters,children:[e.jsxs("label",{className:t.filterField,children:[e.jsx("span",{className:t.filterLabel,children:"Action"}),e.jsx("input",{type:"search",value:s,placeholder:"e.g. enroll.add",onChange:u=>n(u.target.value),onBlur:()=>o(s.trim()),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),o(s.trim()))}})]}),e.jsxs(G,{className:t.filterSelect,label:"Result",value:a,onChange:u=>r(u.target.value),children:[e.jsx("option",{value:"",children:"Any result"}),e.jsx("option",{value:"ok",children:"ok"}),e.jsx("option",{value:"refused",children:"refused"}),e.jsx("option",{value:"error",children:"error"})]}),e.jsxs(G,{className:t.filterSelect,label:"Rows",value:d,onChange:u=>c(Number(u.target.value)),children:[e.jsx("option",{value:50,children:"50"}),e.jsx("option",{value:200,children:"200"}),e.jsx("option",{value:500,children:"500"})]})]}),i.status==="loading"?e.jsxs("div",{className:t.skeletons,children:[e.jsx(_,{}),e.jsx(_,{}),e.jsx(_,{})]}):i.status==="error"?e.jsx("p",{className:t.error,role:"alert",children:i.error?.message??"Could not read the audit trail."}):h.length===0?e.jsx("p",{className:t.empty,children:l||a?"No audit entries match this filter.":"No audit entries recorded yet. Every autonomous or sandbox action appends one here, and none are ever deleted."}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:t.panelNote,"aria-live":"polite",children:[h.length," ",h.length===1?"entry":"entries"," · newest first",i.data?.truncated?" · capped by the server, narrow the filter to see more":""]}),e.jsx("div",{className:t.tableScroll,children:e.jsxs("table",{className:t.table,children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Time"}),e.jsx("th",{scope:"col",children:"Action"}),e.jsx("th",{scope:"col",children:"Result"}),e.jsx("th",{scope:"col",children:"Repo"}),e.jsx("th",{scope:"col",children:"Summary"})]})}),e.jsx("tbody",{children:h.map((u,m)=>e.jsxs("tr",{children:[e.jsx("td",{className:t.cellTime,title:M(u.ts),children:q(u.ts)}),e.jsx("td",{className:t.cellAction,children:u.action}),e.jsx("td",{children:e.jsx("span",{className:t.resultTag,"data-result":u.result,children:u.result})}),e.jsx("td",{className:t.cellRepo,title:u.repo??void 0,children:u.repo?u.repo.split("/").pop():"—"}),e.jsx("td",{className:t.cellSummary,children:u.summary})]},`${u.ts}-${u.action}-${m}`))})]})})]})]})}const j=s=>s,Z=6e4,on=[{key:"dailyBudgetUsd",label:"Daily budget",unit:"USD / day",min:0,max:1e3,integer:!1,step:1,help:'Hard ceiling on what the loop may spend in a calendar day. 0 means the loop is stopped — it is not "unlimited".',toDisplay:j,fromDisplay:j},{key:"perTickItems",label:"Items per tick",unit:"items",min:1,max:50,integer:!0,step:1,help:"How many backlog items one tick may pick up.",toDisplay:j,fromDisplay:j},{key:"parallel",label:"Parallel swarms",unit:"swarms",min:1,max:16,integer:!0,step:1,help:"Sandboxed swarms run simultaneously inside one tick (batch mode).",toDisplay:j,fromDisplay:j},{key:"intervalMs",label:"Tick interval",unit:"minutes",min:.5,max:1440,integer:!1,step:.5,help:"Gap between ticks in loop mode. 30 seconds minimum, 24 hours maximum.",toDisplay:s=>Math.round(s/Z*100)/100,fromDisplay:s=>Math.round(s*Z)},{key:"maxConcurrent",label:"Max concurrent",unit:"dispatches",min:1,max:32,integer:!0,step:1,help:"Absolute ceiling on in-flight dispatches in continuous mode. Takes precedence over the per-tier totals.",toDisplay:j,fromDisplay:j},{key:"concurrency.local",label:"Local tier",unit:"slots",min:1,max:32,integer:!0,step:1,help:"On-device engines. GPU/RAM bound — keep this low.",toDisplay:j,fromDisplay:j},{key:"concurrency.cloud",label:"Cloud tier",unit:"slots",min:1,max:32,integer:!0,step:1,help:"Subscription cloud agents. I/O bound — many can run at once.",toDisplay:j,fromDisplay:j},{key:"concurrency.total",label:"All tiers",unit:"slots",min:1,max:32,integer:!0,step:1,help:"Hard cap across every tier combined.",toDisplay:j,fromDisplay:j},{key:"subscriptionMaxPercent",label:"Subscription ceiling",unit:"% of window",min:1,max:100,integer:!0,step:1,help:"How much of a flat-fee provider window the fleet may consume before it backs off.",toDisplay:j,fromDisplay:j}];function rn(s,n){if(!s)return null;const l=n==="concurrency.local"?s.concurrency?.local:n==="concurrency.cloud"?s.concurrency?.cloud:n==="concurrency.total"?s.concurrency?.total:s[n];return typeof l=="number"&&Number.isFinite(l)?l:null}function cn(s,n){const l=n.trim();if(l==="")return{ok:!1,error:`${s.label} cannot be blank.`};const o=Number(l);return Number.isFinite(o)?s.integer&&!Number.isInteger(o)?{ok:!1,error:`${s.label} must be a whole number of ${s.unit}.`}:o<s.min||o>s.max?{ok:!1,error:`${s.label} must be between ${s.min} and ${s.max} ${s.unit}.`}:{ok:!0,stored:s.fromDisplay(o),display:o}:{ok:!1,error:`${s.label} must be a number.`}}function dn(s,n){switch(s){case"concurrency.local":return{concurrency:{local:n}};case"concurrency.cloud":return{concurrency:{cloud:n}};case"concurrency.total":return{concurrency:{total:n}};default:return{[s]:n}}}const A=ve.foundryLimitMax;function un(s,n){const l=s.trim();if(l==="")return{ok:!1,error:`${n} limit cannot be blank.`};const o=Number(l);return Number.isFinite(o)?Number.isInteger(o)?o<A.min?{ok:!1,error:`${n} limit cannot be negative.`}:o>A.max?{ok:!1,error:`${n} limit must be at most ${A.max} dispatches.`}:{ok:!0,stored:o,display:o}:{ok:!1,error:`${n} limit must be a whole number of dispatches.`}:{ok:!1,error:`${n} limit must be a number.`}}function hn(s,n,l){const o=l.daemon,a=o?.ticks?.[o.ticks.length-1]??null;switch(s){case"dailyBudgetUsd":{const r=n.dailyBudgetUsd;if(r===0)return'Loop stopped — a budget of 0 is a stop, not "unlimited".';const d=l.spend,c=d?F(d.todayUsd,r,d.todayDate):F(o?.todaySpentUsd??null,r,null);return c.state==="unknown"?c.note:`${U(d?d.todayUsd:o?.todaySpentUsd??null)} spent today`}case"perTickItems":return a?`${D(a.itemsConsidered)} considered on the last tick`:null;case"parallel":return a?.dispatches?`${a.dispatches.length} dispatched on the last tick`:null;case"intervalMs":return o?.lastTickAt?`last tick ${M(o.lastTickAt)} ago`:null;default:return null}}function mn({caps:s,snapshot:n,guard:l,dispatchEnabled:o}){const[a,r]=g.useState(null),[d,c]=g.useState(null),[y,i]=g.useState(null),p=!o||l.readOnly;function h(m,f,b){r(m),i(null),l.request(async()=>{c(m);try{await b(),i(m)}finally{c(null)}},f)}const u=s.foundryLimits??[];return e.jsxs("section",{className:t.panel,"aria-label":"Budget and limits",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{className:t.panelTitle,children:"Budget and limits"}),e.jsx("p",{className:t.panelNote,children:"Committed on blur or Enter. The daemon re-reads config each tick, so changes apply live."})]}),e.jsx("div",{className:t.capGrid,children:on.map(m=>e.jsx(xn,{spec:m,stored:rn(s,m.key),usage:hn(m.key,s,n),disabled:p||d!==null&&d!==m.key,busy:d===m.key,applied:y===m.key,error:a===m.key?l.error:null,onCommit:f=>h(m.key,`Changing ${m.label.toLowerCase()} requires the dispatch token.`,()=>K(dn(m.key,f)))},m.key))}),e.jsx("div",{className:`${t.panelHead} ${t.panelHeadSpaced}`,children:e.jsx("h3",{className:t.panelTitle,children:"Per-engine dispatch limits"})}),u.length===0?e.jsx("p",{className:t.empty,children:"No per-engine dispatch limits are configured. Every engine is bounded only by the caps above and by its own provider quota."}):e.jsx("div",{className:t.capGrid,children:u.map((m,f)=>e.jsx(yn,{limit:m,usage:pn(m.engine,n),disabled:p||d!==null&&d!==C(m),busy:d===C(m),applied:y===C(m),error:a===C(m)?l.error:null,onCommit:b=>h(C(m),`Changing the ${m.engine} dispatch limit requires the dispatch token.`,()=>{const x=u.map((S,O)=>O===f?{...S,max:b}:S);return K({foundryLimits:x})})},`${m.engine}:${m.window}`))})]})}function C(s){return`foundry:${s.engine}:${s.window}`}function pn(s,n){const l=n.quota?.find(r=>r.engine===s);if(!l)return null;const o=Ze(l),a=o==="unlimited"?"no limit configured":o;return`${D(l.callsToday)} dispatched in the last ${l.limitWindow??"1d"} · ${a}`}function ie(s){const n=[s.usage?`${s.id}-usage`:null,s.help?`${s.id}-help`:null].filter(l=>l!==null).join(" ");return e.jsxs("div",{className:t.cap,children:[e.jsx("label",{className:t.capLabel,htmlFor:s.id,children:s.label}),e.jsxs("div",{className:t.capRow,children:[e.jsx("input",{id:s.id,type:"number",inputMode:"decimal",className:`${t.capInput} ${s.invalid?t.capInputInvalid:""}`,value:s.value,step:s.step,min:s.min,max:s.max,disabled:s.disabled||s.busy,"aria-invalid":s.invalid?!0:void 0,"aria-describedby":n||void 0,onChange:l=>s.onChange(l.target.value),onBlur:s.onCommit,onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),s.onCommit())}}),e.jsx("span",{className:t.capUnit,children:s.unit})]}),s.usage?e.jsx("span",{className:t.capUsage,id:`${s.id}-usage`,children:s.usage}):null,s.help?e.jsx("span",{className:t.capHelp,id:`${s.id}-help`,children:s.help}):null,s.invalid?e.jsx("span",{className:t.capError,role:"alert",children:s.invalid}):null,s.error&&!s.invalid?e.jsx("span",{className:t.capError,role:"alert",children:s.error}):null,s.applied&&!s.invalid&&!s.error?e.jsx("span",{className:t.capApplied,children:"applied live"}):null]})}function xn({spec:s,stored:n,usage:l,disabled:o,busy:a,applied:r,error:d,onCommit:c}){const y=n===null?"":String(s.toDisplay(n)),[i,p]=g.useState(y),[h,u]=g.useState(null);g.useEffect(()=>{h===null&&p(y)},[y]);function m(){if(i===y){u(null);return}const f=cn(s,i);if(!f.ok){u(f.error);return}u(null),c(f.stored)}return e.jsx(ie,{id:`cap-${s.key.replace(".","-")}`,label:s.label,unit:s.unit,help:s.help,usage:l,value:i,invalid:h,disabled:o,busy:a,applied:r,error:d,step:s.step,min:s.min,max:s.max,onChange:f=>{p(f),h&&u(null)},onCommit:m})}function yn({limit:s,usage:n,disabled:l,busy:o,applied:a,error:r,onCommit:d}){const c=String(s.max),[y,i]=g.useState(c),[p,h]=g.useState(null);g.useEffect(()=>{p===null&&i(c)},[c]);function u(){if(y===c){h(null);return}const m=un(y,s.engine);if(!m.ok){h(m.error);return}h(null),d(m.stored)}return e.jsx(ie,{id:`cap-foundry-${s.engine}-${s.window}`,label:s.engine,unit:`dispatches / ${s.window}`,usage:n,value:y,invalid:p,disabled:l,busy:o,applied:a,error:r,step:1,min:A.min,max:A.max,onChange:m=>{i(m),p&&h(null)},onCommit:u})}function W(s=1e3){const[n,l]=g.useState(()=>Date.now());return g.useEffect(()=>{const o=setInterval(()=>l(Date.now()),s);return()=>clearInterval(o)},[s]),n}function re(s){if(s.killSwitch?.state==="active")return{state:"killed",label:"Kill switch engaged"};const n=s.daemon;return!n||!ne(n.sourceQuality)?{state:"unknown",label:"Run state unknown"}:n.runtimeState==="running"?{state:"running",label:"Running"}:n.runtimeState==="stopped"?{state:"stopped",label:"Stopped"}:{state:"unknown",label:"Run state unknown"}}function gn({snapshot:s}){const n=W(1e3),{state:l,label:o}=re(s),a=s.daemon,r=ne(a?.sourceQuality),d=a?.ticks?.[a.ticks.length-1]??null,c=se(d?.reason),y=s.fleet?.directionMode??d?.directionMode??null,i=s.scope?.repos??null,p=s.caps?.intervalMs??null,h=l==="running"?$e(a?.lastTickAt,p):null,u=s.spend,m=u?F(u.todayUsd,s.caps?.dailyBudgetUsd??null,u.todayDate):F(a?.todaySpentUsd??null,s.caps?.dailyBudgetUsd??null,null);return e.jsxs("section",{className:t.status,"aria-label":"Autonomy status",children:[e.jsxs("div",{className:t.statusTop,children:[e.jsxs("span",{className:t.runState,"data-state":l,children:[e.jsx("span",{className:t.runDot,"aria-hidden":"true"}),o]}),e.jsxs("div",{className:t.facts,children:[e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Direction"}),e.jsx("span",{className:t.factValue,children:y??"default"})]}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Last tick"}),e.jsx("span",{className:t.factValue,"data-tone":c.tone,children:r&&a?.lastTickAt?`${Ae(a.lastTickAt)} · ${c.label}`:c.label})]}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Next tick"}),e.jsx("span",{className:t.factValue,children:l==="running"?De(h,n):l==="killed"?"blocked":"not scheduled"})]}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Interval"}),e.jsx("span",{className:t.factValue,children:He(p)})]}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Scope"}),e.jsx("span",{className:t.factValue,"data-tone":(i?.length??0)===0?"warning":void 0,children:i?`${i.length} repos`:N})]}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Awaiting you"}),e.jsx("span",{className:t.factValue,children:typeof s.pendingApprovals=="number"?`${s.pendingApprovals} approvals`:N})]}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Started"}),e.jsx("span",{className:t.factValue,children:r?Me(a?.startedAt):N})]})]})]}),e.jsxs("div",{className:t.budget,children:[e.jsxs("div",{className:t.budgetLine,children:[e.jsx("span",{className:t.budgetLabel,children:m.label}),e.jsx("span",{className:t.budgetNote,children:m.note})]}),e.jsx("div",{className:t.meter,"data-state":m.state,role:"meter","aria-label":"Today's spend against the daily budget","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m.percent??void 0,"aria-valuetext":`${m.label}. ${m.note}`,children:e.jsx("div",{className:t.meterFill,style:{width:`${m.percent??0}%`}})})]})]})}function fn({snapshot:s,guard:n,dispatchEnabled:l}){const[o,a]=g.useState(null),[r,d]=g.useState(null),{state:c}=re(s),y=s.killSwitch?.state==="active",i=s.killSwitch?.state==="unknown",p=s.pause?.state??"unknown",h=p!=="running",u=p==="unknown",f=!l||n.readOnly||n.busy,b=x=>d(x.note||null);return e.jsxs("section",{className:t.panel,"aria-label":"Loop controls",children:[e.jsx("div",{className:t.panelHead,children:e.jsx("h3",{className:t.panelTitle,children:"Controls"})}),e.jsxs("div",{className:t.controls,children:[h?e.jsx("button",{type:"button",className:`${t.button} ${t.buttonPrimary}`,disabled:f,onClick:()=>n.request(()=>R("resume"),"Resuming autonomous dispatch requires the dispatch token.",b),children:"Resume"}):e.jsx("button",{type:"button",className:`${t.button} ${t.buttonPrimary}`,disabled:f,onClick:()=>n.request(()=>R("pause"),"Pausing autonomous dispatch requires the dispatch token.",b),children:"Pause"}),e.jsx("button",{type:"button",className:t.button,disabled:f||c==="running"||y||h,title:y?"Release the emergency stop before starting the loop.":h?"Dispatch is paused — resume before starting the loop.":void 0,onClick:()=>n.request(()=>R("start"),"Starting the autonomous loop requires the dispatch token.",b),children:"Start loop"}),e.jsx("button",{type:"button",className:t.button,disabled:f||c==="stopped",onClick:()=>a("stop"),children:"Stop loop"}),e.jsx("button",{type:"button",className:t.button,disabled:f||y||h,title:h?"Dispatch is paused — resume before running a tick.":void 0,onClick:()=>n.request(()=>R("once"),"Running one tick requires the dispatch token.",b),children:"Run one tick"})]}),h?e.jsx("p",{className:t.actionNote,role:"status",children:u?"Dispatch is treated as paused: the pause sentinel could not be read, and the daemon fails safe rather than running on an unreadable signal.":"Autonomous dispatch is paused. The loop parks between ticks; your own write tools are unaffected, and the global kill switch is not engaged."}):null,e.jsx("div",{className:t.emergency,children:y?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:t.button,disabled:f,onClick:()=>a("release"),children:"Release emergency stop"}),e.jsxs("p",{className:t.emergencyNote,children:["The global kill switch is engaged. The daemon refuses to tick ",e.jsx("em",{children:"and"})," the agent’s own write tools refuse to edit anything, anywhere — not just in enrolled repos."]})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:t.emergencyButton,disabled:f,onClick:()=>a("engage"),children:"Emergency stop"}),e.jsxs("p",{className:t.emergencyNote,children:["Engages the global kill switch. Wider than “stop the loop”: it also disables the agent’s own write tools everywhere until you release it. To halt only the loop, use ",e.jsx("strong",{children:"Pause"}),".",i?" The switch’s current state could not be read.":""]})]})}),n.error&&o===null?e.jsx("p",{className:t.capError,role:"alert",children:n.error}):null,r&&!n.error?e.jsx("p",{className:t.actionNote,role:"status",children:r}):null,e.jsx(w,{open:o==="stop",onClose:()=>a(null),title:"Stop the autonomous loop?",body:e.jsxs(e.Fragment,{children:["This is the ordinary stop, but it works by engaging the global kill switch — the same",e.jsx("code",{children:" ~/.ashlr/KILL "})," sentinel the emergency stop writes. While it is set, the agent’s own write tools also refuse to edit anything, anywhere, until you release it from this panel.",e.jsx("br",{}),e.jsx("br",{}),"If you only want the loop to stop working, ",e.jsx("strong",{children:"Pause"})," does exactly that and nothing else — it leaves your own tools alone and undoes in one click.",e.jsx("br",{}),e.jsx("br",{}),"Nothing in flight is rolled back. The loop will not restart by itself."]}),confirmLabel:"Stop loop",destructive:!0,busy:n.busy,error:n.error,onConfirm:()=>n.request(()=>R("stop"),"Stopping the autonomous loop requires the dispatch token.",x=>{b(x),a(null)})}),e.jsx(w,{open:o==="engage",onClose:()=>a(null),title:"Engage the emergency stop?",body:e.jsxs(e.Fragment,{children:["This writes the global kill switch. It stops the autonomous loop ",e.jsx("strong",{children:"and"})," disables the agent’s own write tools — every edit, apply, and merge path refuses while it is engaged, in every repo, not only the enrolled ones. Nothing in flight is rolled back; nothing new can start.",e.jsx("br",{}),e.jsx("br",{}),e.jsx("strong",{children:"Pause"})," halts autonomous dispatch only and leaves everything else working."," ",e.jsx("strong",{children:"Stop loop"})," is not narrower than this button: it engages the same global kill switch."]}),confirmLabel:"Engage emergency stop",destructive:!0,busy:n.busy,error:n.error,onConfirm:()=>n.request(async()=>{await ke(),a(null)},"Engaging the emergency stop requires the dispatch token.")}),e.jsx(w,{open:o==="release",onClose:()=>a(null),title:"Release the emergency stop?",body:e.jsxs(e.Fragment,{children:["This clears the global kill switch. Write tools become usable again immediately. The autonomous loop does not restart by itself — use ",e.jsx("strong",{children:"Start loop"})," when you want it running."]}),confirmLabel:"Release emergency stop",busy:n.busy,error:n.error,onConfirm:()=>n.request(async()=>{await we(),a(null)},"Releasing the emergency stop requires the dispatch token.")})]})}const bn={idle:"neutral",working:"running",saturated:"running",queued:"warning",unknown:"unknown"},jn={running:"running",finishing:"running",queued:"neutral"};function _n({read:s,runtime:n,loading:l=!1}){const o=W(1e3),a=s?.value??null,r=le(n),d=a?.slotsBusy??n?.slotsBusy??null,c=oe(d,r.effectiveConcurrency),y=Fe(a,c,r),i=a?Ie(a.agents):[],p=a?.queueDepth??i.filter(h=>h.state==="queued").length;return e.jsxs("section",{className:t.panel,"aria-labelledby":"verse-fleet-title",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{id:"verse-fleet-title",className:t.panelTitle,children:"Fleet in flight"}),e.jsx("p",{className:t.panelNote,children:"Every agent mid-turn right now, what it is working on, and how long it has been at it."})]}),l&&s===null?e.jsx("p",{className:t.empty,children:"Reading the fleet…"}):s===null||!s.available&&s.value===null?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"No fleet source. "}),s?.reason??"Nothing answered for the fleet, so what is in flight cannot be listed. That is a missing reading, not an empty fleet."]}):a===null?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"Unreadable reading. "}),s.reason??"The fleet reading could not be narrowed, so nothing is shown rather than guessed."]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.pressure,"data-state":y.state,children:[e.jsxs("span",{className:t.pressureHead,children:[e.jsx("span",{className:t.pressureHeadline,children:y.headline}),e.jsx(H,{status:y.state,tone:bn[y.state]??"unknown",children:y.state})]}),e.jsx("p",{className:t.pressureDetail,children:y.detail})]}),e.jsxs("div",{className:t.fleetMeters,children:[e.jsx(ae,{value:c.busy,max:c.total,label:"Slot utilisation",valueText:c.percent===null?"unknown":`${c.busy} / ${c.total} · ${c.percent}%`,tone:c.saturated?"warning":void 0}),e.jsxs("div",{className:t.fact,children:[e.jsx("span",{className:t.factLabel,children:"Queue depth"}),e.jsx("span",{className:t.factValue,"data-tone":p>0?"warning":void 0,children:a.queueDepth===null&&i.length===0?N:`${D(p)} waiting`})]})]}),c.saturated&&p===0?e.jsx("p",{className:t.capHelp,children:"Every slot is occupied. Nothing is waiting yet, but the next turn will."}):null,i.length===0?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"Nothing in flight. "}),"No agent is mid-turn. The fleet answered and reported an empty list — an idle fleet, not a missing reading."]}):e.jsx("div",{className:t.tableScroll,children:e.jsxs("table",{className:t.table,children:[e.jsx("caption",{className:t.srOnly,children:"Agents in flight: state, task, repository, model, slot and elapsed time"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"State"}),e.jsx("th",{scope:"col",children:"Working on"}),e.jsx("th",{scope:"col",children:"Repo"}),e.jsx("th",{scope:"col",children:"Model"}),e.jsx("th",{scope:"col",children:"Slot"}),e.jsx("th",{scope:"col",children:"Elapsed"})]})}),e.jsx("tbody",{children:i.map(h=>e.jsx(Nn,{agent:h,now:o,capacity:r},h.id))})]})}),a.notes.length>0?e.jsx("ul",{className:t.noteList,children:a.notes.map(h=>e.jsx("li",{className:t.capHelp,children:h},h))}):null]})]})}function Nn({agent:s,now:n,capacity:l}){const o=Oe(s.startedAt,n),a=s.state==="queued";return e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx(H,{status:s.state,tone:jn[s.state],children:s.state})}),e.jsx("td",{className:t.cellSummary,children:s.task??e.jsx("span",{className:t.capHelp,children:"not reported"})}),e.jsx("td",{className:t.cellRepo,children:s.repo??N}),e.jsx("td",{className:t.cellRepo,children:s.model??s.engine??N}),e.jsx("td",{className:t.cellTime,children:s.slot===null?a?e.jsx("span",{className:t.capHelp,title:l.verdict==="serialized"?"This runtime serializes, so only one slot ever frees up at a time.":void 0,children:"no slot"}):N:`#${s.slot}`}),e.jsxs("td",{className:t.cellTime,children:[o,a?e.jsx("span",{className:t.elapsedQualifier,children:" queued"}):null]})]})}const T=8;function vn(){const s=k(Se),n=k(Te),l=(s.data??[]).filter(a=>a.status!=="done"&&a.status!=="archived"),o=n.data?.items??[];return e.jsxs("section",{className:t.panel,"aria-label":"Goals and backlog",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{className:t.panelTitle,children:"Goals and backlog"}),e.jsx("p",{className:t.panelNote,children:"Read-only in this view."})]}),e.jsxs("div",{className:t.summaryColumns,children:[e.jsxs("div",{children:[e.jsx("p",{className:t.factLabel,children:"Active goals"}),s.status==="loading"?e.jsxs("div",{className:t.skeletons,children:[e.jsx(_,{}),e.jsx(_,{})]}):s.status==="error"?e.jsx("p",{className:t.error,role:"alert",children:s.error?.message??"Could not read goals."}):l.length===0?e.jsx("p",{className:t.empty,children:"No active goals. The loop falls back to the backlog for work."}):e.jsxs("div",{className:t.summaryList,children:[l.slice(0,T).map(a=>{const r=Math.round((a.progress?.fractionDone??0)*100);return e.jsxs("div",{className:t.summaryRow,children:[e.jsx("span",{className:t.summaryTitle,title:a.objective,children:a.objective}),e.jsxs("span",{className:t.summaryMeta,children:[r,"% · ",a.status]})]},a.id)}),l.length>T?e.jsxs("p",{className:t.panelNote,children:["+",l.length-T," more"]}):null]})]}),e.jsxs("div",{children:[e.jsx("p",{className:t.factLabel,children:"Backlog"}),n.status==="loading"?e.jsxs("div",{className:t.skeletons,children:[e.jsx(_,{}),e.jsx(_,{})]}):n.status==="error"?e.jsx("p",{className:t.error,role:"alert",children:n.error?.message??"Could not read the backlog."}):n.data?.absent?e.jsx("p",{className:t.empty,children:"No backlog has been built yet — run a tick, or `ashlr backlog`, to produce one."}):o.length===0?e.jsx("p",{className:t.empty,children:"The backlog is empty. A tick with nothing to do records `no-backlog` and idles."}):e.jsxs("div",{className:t.summaryList,children:[o.slice(0,T).map((a,r)=>e.jsxs("div",{className:t.summaryRow,children:[e.jsx("span",{className:t.summaryTitle,title:a.title,children:a.title??a.id??"untitled item"}),e.jsxs("span",{className:t.summaryMeta,children:[a.repo?a.repo.split("/").pop():"—",typeof a.score=="number"?` · ${a.score}`:""]})]},a.id??`${a.title??"item"}-${r}`)),o.length>T?e.jsxs("p",{className:t.panelNote,children:["+",o.length-T," more"]}):null]})]})]})]})}const ce="verse-runtime",de="verse-fleet",ue="verse-local-only";function kn(s,n){return n instanceof ee?n.status===404?`This server does not expose ${s}, so this panel has no source. It is a missing route, not an idle machine.`:`${s} answered HTTP ${n.status}.`:`${s} could not be reached.`}function V(s,n){return async l=>{try{const o=await je(s,l),a=n(o);return a===null?{value:null,available:!0,reason:`${s} answered in a shape this client does not recognise, so nothing is shown rather than guessed.`}:{value:a,available:!0,reason:null}}catch(o){if(o instanceof ee&&o.status===401||o instanceof DOMException&&o.name==="AbortError")throw o;return{value:null,available:!1,reason:kn(s,o)}}}}const he={key:ce,fetch:V("/api/verse/runtime",Pe)},me={key:de,fetch:V("/api/verse/fleet",qe)},wn={key:ue,fetch:V("/api/verse/local-only",Ue)};async function pe(s,n){const l=be();if(!l)throw new Re;const o=await ge(s,n,l);return fe(),o}async function Sn(s){const n=await pe("/api/verse/runtime",{action:s});return $(ce),$(de),$(te),n}async function Tn(s){const n=await pe("/api/verse/local-only",{enabled:s});return $(ue),$(te),n}const Rn=4e3;function Cn(s=Rn){const n=Q(he),l=Q(me);g.useEffect(()=>{let o=null;const a=()=>{n(),l()},r=()=>{o===null&&(o=setInterval(a,s))},d=()=>{o!==null&&(clearInterval(o),o=null)},c=()=>{if(document.visibilityState==="hidden"){d();return}a(),r()};return document.visibilityState!=="hidden"&&r(),document.addEventListener("visibilitychange",c),()=>{d(),document.removeEventListener("visibilitychange",c)}},[s,n,l])}function Ln({read:s,seats:n,guard:l,dispatchEnabled:o,loading:a=!1}){const[r,d]=g.useState(!1),[c,y]=g.useState(null),i=s?.value??null,p=Be(i,n),h=We(i),u=i?.enabled??!1,f=!o||l.readOnly||l.busy||!(i?.mutable??!1),b=x=>{l.request(()=>Tn(x),x?"Turning local-only on requires the dispatch token.":"Turning local-only off requires the dispatch token.",S=>{y(S.note||null),d(!1)})};return e.jsxs("section",{className:t.panel,"aria-labelledby":"verse-local-only-title",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{id:"verse-local-only-title",className:t.panelTitle,children:"Local only"}),e.jsx("p",{className:t.panelNote,children:"A refusal, not a preference. While it is on, cloud engines are unreachable."})]}),a&&s===null?e.jsx("p",{className:t.empty,children:"Reading the local-only policy…"}):s===null||i===null?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"No local-only source. "}),s?.reason??"Nothing answered for the local-only policy, so whether cloud engines are reachable cannot be stated here. It is not shown as off — an unread switch is not a switch that is off."]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.toggleRow,children:[e.jsx("span",{className:t.toggleState,"data-on":u?"true":"false",children:e.jsx(H,{status:u?"local-only-on":"local-only-off",tone:u?"success":"neutral",children:u?"on — cloud refused":"off — cloud reachable"})}),e.jsx("button",{type:"button",className:`${t.button} ${u?"":t.buttonPrimary}`,disabled:f,"aria-pressed":u,onClick:()=>u?b(!1):d(!0),children:u?"Turn local-only off":"Turn local-only on"})]}),e.jsx("p",{className:t.policyExplain,children:u?e.jsxs(e.Fragment,{children:["Every non-local engine is ",e.jsx("strong",{children:"refused at dispatch"}),". A turn sent to one does not fall back, does not queue, and does not run more slowly — it fails with a named refusal. Nothing can spend money while this is on."]}):e.jsxs(e.Fragment,{children:["Cloud engines are reachable. Turning this on makes them ",e.jsx("strong",{children:"unreachable"}),", not deprioritised: a dispatch to one fails outright rather than being routed elsewhere. That is the difference between a budget and a guarantee."]})}),h?e.jsx("p",{className:t.capHelp,children:h}):null,!i.mutable&&o&&!l.readOnly?e.jsx("p",{className:t.actionNote,role:"status",children:"This switch is not editable from here, so it is shown read-only rather than as a control that would refuse the click."}):null,e.jsxs("div",{className:t.impact,children:[e.jsx("h4",{className:t.impactTitle,children:u?"What is blocked right now":"What this would block"}),e.jsx("p",{className:t.impactSummary,children:p.summary}),p.blocked.length>0?e.jsx("ul",{className:t.seatList,children:p.blocked.map(x=>e.jsxs("li",{className:t.seatRow,children:[e.jsx("span",{className:t.seatEngine,"data-engine":x.engine,children:x.engine}),e.jsx("span",{className:t.seatLabel,children:x.label}),e.jsx("span",{className:t.seatRefusal,children:p.refusalFor(x.engine)})]},x.id))}):null,p.allowed.length>0?e.jsxs("p",{className:t.capHelp,children:["Still reachable:"," ",p.allowed.map(x=>x.label).join(", "),". Local seats cost nothing to run and are unaffected by this switch."]}):e.jsx("p",{className:t.capHelp,children:"No local seat is configured. With local-only on there would be nothing left to dispatch to — add a local seat before relying on this switch."})]}),c&&!l.error?e.jsx("p",{className:t.actionNote,role:"status",children:c}):null,l.error&&!r?e.jsx("p",{className:t.capError,role:"alert",children:l.error}):null,e.jsx(w,{open:r,onClose:()=>d(!1),title:"Make cloud engines unreachable?",body:e.jsxs(e.Fragment,{children:["This is a refusal, not a routing preference. While local-only is on, a dispatch to a non-local engine ",e.jsx("strong",{children:"fails"})," with a named refusal — it does not fall back to a local seat and it does not wait.",e.jsx("br",{}),e.jsx("br",{}),p.blocked.length===0?"No seat on this machine is affected today: every configured seat is local.":`${p.blocked.length} of your ${n.length} seats stop working: ${p.blocked.map(x=>x.label).join(", ")}.`,e.jsx("br",{}),e.jsx("br",{}),"It is reversible from this panel at any time."]}),confirmLabel:"Turn local-only on",busy:l.busy,error:l.error,onConfirm:()=>b(!0)})]})]})}const En={running:"success",starting:"running",stopping:"running",stopped:"neutral",unknown:"unknown"},$n={success:"success",warning:"warning",danger:"danger",neutral:"neutral",unknown:"unknown"};function An({read:s,guard:n,dispatchEnabled:l,loading:o=!1}){const a=W(1e3),[r,d]=g.useState(null),[c,y]=g.useState(null),i=s?.value??null,p=le(i),h=oe(i?.slotsBusy??null,p.effectiveConcurrency),u=!l||n.readOnly,m=i?.supervised??!1,f=u||n.busy||!m,b=i?.state==="running",x=(S,O)=>{n.request(()=>Sn(S),O,xe=>{y(xe.note||null),d(null)})};return e.jsxs("section",{className:t.panel,"aria-labelledby":"verse-runtime-title",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{id:"verse-runtime-title",className:t.panelTitle,children:"Serving runtime"}),e.jsx("p",{className:t.panelNote,children:"The process that answers local agent turns. Without it, a local fleet has nowhere to run."})]}),o&&s===null?e.jsx("p",{className:t.empty,children:"Reading the serving runtime…"}):s===null||!s.available&&s.value===null?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"No serving-runtime source. "}),s?.reason??"Nothing answered for the serving runtime, so whether a local fleet can run cannot be stated here."]}):i===null?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"Unreadable reading. "}),s.reason??"The serving-runtime reading could not be narrowed, so nothing is shown rather than guessed."]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:t.runtimeTop,children:[e.jsxs("span",{className:t.runtimeState,"data-state":i.state,children:[e.jsx("span",{className:t.runDot,"aria-hidden":"true"}),e.jsxs("span",{className:t.runtimeStateText,children:[Ve(i.kind)," · ",i.state==="unknown"?"state unknown":i.state]})]}),e.jsx(H,{status:i.state,tone:En[i.state],children:i.state==="running"?"serving":i.state}),i.reason?e.jsx("code",{className:t.evidenceCode,children:i.reason}):null]}),e.jsxs("div",{className:t.facts,children:[e.jsx(L,{label:"Model",value:i.model??N,wide:!0}),e.jsx(L,{label:"Endpoint",value:i.endpoint??N,mono:!0}),e.jsx(L,{label:"Context",value:Qe(i.contextTokens)}),e.jsx(L,{label:"Slots configured",value:i.slotsTotal===null?N:String(i.slotsTotal)}),e.jsx(L,{label:"Uptime",value:b?Ge(i.startedAt,a):"not running"})]}),e.jsxs("div",{className:t.capacityBlock,"data-verdict":p.verdict,children:[e.jsxs("div",{className:t.capacityHead,children:[e.jsx("span",{className:t.capacityBig,children:p.effectiveConcurrency===null?N:p.effectiveConcurrency}),e.jsxs("div",{className:t.capacityWords,children:[e.jsxs("span",{className:t.capacityHeadline,children:[p.headline,e.jsx(H,{status:p.verdict,tone:$n[p.tone],children:p.verdict==="batched"?"batches":p.verdict==="serialized"?"serializes":p.verdict==="offline"?"not serving":"unconfirmed"})]}),e.jsx("span",{className:t.capacityDetail,children:p.detail})]})]}),p.overstated?e.jsx(Dn,{configured:p.configuredSlots,refusal:i.parallel.refusal}):null]}),e.jsxs("div",{className:t.utilisation,children:[e.jsx(ae,{value:h.busy,max:h.total,label:"Slots in use",valueText:h.percent===null?"unknown":`${h.busy} / ${h.total}`,tone:h.saturated?"warning":void 0}),e.jsx("p",{className:t.capHelp,children:h.label})]}),e.jsxs("div",{className:t.controls,children:[e.jsx("button",{type:"button",className:`${t.button} ${t.buttonPrimary}`,disabled:f||b,onClick:()=>x("start","Starting the serving runtime requires the dispatch token."),children:"Start runtime"}),e.jsx("button",{type:"button",className:t.button,disabled:f||!b,onClick:()=>d("stop"),children:"Stop runtime"}),e.jsx("button",{type:"button",className:t.button,disabled:f,onClick:()=>d("restart"),children:"Restart runtime"})]}),m?null:e.jsx("p",{className:t.actionNote,role:"status",children:"This runtime is managed outside the hub, so it cannot be started or stopped from here. Whoever launched it — a login item, a terminal — still owns it; these controls stay disabled rather than sending an action that cannot land."}),c&&!n.error?e.jsx("p",{className:t.actionNote,role:"status",children:c}):null,n.error&&r===null?e.jsx("p",{className:t.capError,role:"alert",children:n.error}):null,e.jsx(w,{open:r==="stop",onClose:()=>d(null),title:"Stop the serving runtime?",body:e.jsxs(e.Fragment,{children:["Every local agent turn in flight is answered by this process. Stopping it ends those turns — nothing in flight is rolled back, and no local seat can take a new turn until it is running again.",e.jsx("br",{}),e.jsx("br",{}),"This does not touch the autonomous loop, the kill switch, or your own write tools."]}),confirmLabel:"Stop runtime",destructive:!0,busy:n.busy,error:n.error,onConfirm:()=>x("stop","Stopping the serving runtime requires the dispatch token.")}),e.jsx(w,{open:r==="restart",onClose:()=>d(null),title:"Restart the serving runtime?",body:e.jsxs(e.Fragment,{children:["The process is stopped and started again. Turns in flight end with it, and the first turn afterwards pays the model load — on a 27 GB model that is not instant.",e.jsx("br",{}),e.jsx("br",{}),"Restart is the way to pick up a changed slot count or context size, since both are fixed at launch."]}),confirmLabel:"Restart runtime",destructive:!0,busy:n.busy,error:n.error,onConfirm:()=>x("restart","Restarting the serving runtime requires the dispatch token.")})]})]})}function Dn({configured:s,refusal:n}){return e.jsxs("div",{className:t.evidence,children:[e.jsx("p",{className:t.evidenceLead,children:s===null?"The configured slot count is not a concurrency on this runtime.":`${s} slots are configured, but this runtime will not run them in parallel. Measured on this machine, four concurrent requests to the same model:`}),e.jsx("div",{className:t.evidenceScroll,children:e.jsxs("table",{className:t.evidenceTable,children:[e.jsx("caption",{className:t.srOnly,children:"Four concurrent requests to the same Qwen3.8 model file, per-runtime completion times in seconds"}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Runtime"}),e.jsx("th",{scope:"col",children:"Per request (s)"}),e.jsx("th",{scope:"col",children:"Wall (s)"}),e.jsx("th",{scope:"col",children:"Finished"})]})}),e.jsx("tbody",{children:Ke.map(l=>e.jsxs("tr",{children:[e.jsx("th",{scope:"row",children:l.runtime}),e.jsx("td",{className:t.evidenceNums,children:l.perRequestSeconds.join(" · ")}),e.jsx("td",{className:t.evidenceNums,children:l.wallSeconds.toFixed(1)}),e.jsx("td",{children:l.verdict})]},l.runtime))})]})}),n?e.jsxs("p",{className:t.capHelp,children:["The runtime’s own words: ",e.jsx("code",{className:t.evidenceCode,children:n})]}):null]})}function L({label:s,value:n,mono:l=!1,wide:o=!1}){return e.jsxs("div",{className:`${t.fact} ${o?t.factWide:""}`,children:[e.jsx("span",{className:t.factLabel,children:s}),e.jsx("span",{className:`${t.factValue} ${l?t.factMono:""}`,children:n})]})}function Hn(){const s=k(Y),n=B(Y),l=s.data,o=l?.checks?.filter(r=>r.pass).length??0,a=l?.checks?.length??0;return e.jsxs("section",{className:t.panel,"aria-label":"Safety checks",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{className:t.panelTitle,children:"Safety"}),e.jsxs("div",{className:t.panelActions,children:[s.status==="refreshing"?e.jsx(I,{}):null,l?e.jsxs("span",{className:t.panelNote,children:[o,"/",a," passing"]}):null,e.jsx("button",{type:"button",className:t.button,onClick:n,disabled:s.status==="loading",children:"Re-run checks"})]})]}),s.status==="loading"?e.jsxs("div",{className:t.skeletons,children:[e.jsx(E,{width:"70%"}),e.jsx(E,{width:"55%"}),e.jsx(E,{width:"62%"})]}):s.status==="error"?e.jsx("p",{className:t.error,role:"alert",children:s.error?.message??"Could not run the safety checks."}):!l||a===0?e.jsx("p",{className:t.empty,children:"The safety report came back with no checks. That is itself a problem worth investigating — treat it as a failure, not as a pass."}):e.jsx("div",{className:t.checkList,children:l.checks.map(r=>e.jsxs("div",{className:t.check,"data-pass":r.pass,children:[e.jsx("span",{className:t.checkMark,"aria-hidden":"true",children:r.pass?"✓":"✕"}),e.jsxs("span",{className:t.checkLabel,children:[r.label,e.jsx("span",{className:t.srOnly,children:r.pass?" — passed":" — failed"})]}),e.jsx("span",{className:t.checkDetail,children:r.detail||r.id})]},r.id))})]})}function Mn(s){const n=s.trim();return n===""?"Enter the absolute path of the repository to enroll.":n.startsWith("/")?n==="/"?"The filesystem root cannot be enrolled as autonomous scope.":/(^|\/)\.codex\/artifacts(\/|$)/.test(n)?"Paths under ~/.codex/artifacts cannot be enrolled.":/(^|\/)\.ashlr(\/|$)/.test(n)?"Paths under ~/.ashlr cannot be enrolled — that is the agent’s own control directory.":null:"Enrollment takes an absolute path, e.g. /Users/you/code/project."}function Fn({path:s,scope:n}){const l=n?.entries.find(a=>a.path===s)??null;if(l===null)return null;const o=l.priority!=="normal";return!o&&l.sections.length===0?null:e.jsxs("span",{className:t.repoStanding,title:Xe,children:[o?e.jsx("span",{className:t.repoPriority,children:Je[l.priority]}):null,l.sections.map(a=>e.jsx("span",{className:t.repoSection,children:a.name},a.id)),l.outsideFocus?e.jsx("span",{className:t.repoOutsideFocus,children:"outside the focused section"}):null]})}function In({guard:s,dispatchEnabled:n}){const l=k(Ce),o=k(Ye),[a,r]=g.useState(""),[d,c]=g.useState(null),[y,i]=g.useState(null),[p,h]=g.useState(null),u=!n||s.readOnly;function m(){const x=Mn(a);if(x){c(x);return}c(null),h(a.trim())}function f(){const x=p;x&&s.request(async()=>{await z({action:"enroll",path:x}),r(""),h(null)},"Enrolling a repository for autonomous work requires the dispatch token.")}const b=l.data?.repos??[];return e.jsxs("section",{className:t.panel,"aria-label":"Scope",children:[e.jsxs("div",{className:t.panelHead,children:[e.jsx("h3",{className:t.panelTitle,children:"Scope — enrolled repositories"}),l.status==="refreshing"?e.jsx(I,{}):null]}),l.data?.degradedReason?e.jsxs("p",{className:t.readOnly,children:["The enrollment registry read is degraded: ",l.data.degradedReason]}):null,l.status==="loading"?e.jsxs("div",{className:t.skeletons,children:[e.jsx(_,{}),e.jsx(_,{})]}):l.status==="error"?e.jsx("p",{className:t.error,role:"alert",children:l.error?.message??"Could not read the enrollment registry."}):b.length===0?e.jsxs("p",{className:t.empty,children:[e.jsx("span",{className:t.emptyStrong,children:"No repositories are enrolled, so the daemon will do nothing."})," ","That is the default and it is not a bug — nothing autonomous can mutate a real repository until you enroll it here. Add one below to give the loop somewhere to work."]}):e.jsx("div",{className:t.repoList,children:b.map(x=>e.jsxs("div",{className:t.repoRow,children:[e.jsx("span",{className:t.repoName,children:x.name}),e.jsx("span",{className:t.repoPath,title:x.path,children:x.path}),x.exists?null:e.jsx("span",{className:t.repoMissing,children:"⚠ path missing on disk"}),e.jsx(Fn,{path:x.path,scope:o.data??null}),e.jsx("button",{type:"button",className:t.button,disabled:u||s.busy,onClick:()=>i(x),children:"Remove"})]},x.path))}),e.jsxs("div",{className:t.addRow,children:[e.jsx("input",{className:t.addInput,type:"text",value:a,placeholder:"/absolute/path/to/repository","aria-label":"Repository path to enroll","aria-invalid":d?!0:void 0,disabled:u||s.busy,onChange:x=>{r(x.target.value),d&&c(null)},onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),m())}}),e.jsx("button",{type:"button",className:t.button,disabled:u||s.busy,onClick:m,children:"Enroll repository"})]}),d?e.jsx("p",{className:t.capError,role:"alert",children:d}):null,s.error&&!d?e.jsx("p",{className:t.capError,role:"alert",children:s.error}):null,e.jsx(w,{open:p!==null,onClose:()=>h(null),title:"Give the autonomous loop write authority here?",body:e.jsxs(e.Fragment,{children:[e.jsx("code",{children:p})," becomes autonomous scope. The loop may propose work against it, and the agent’s own mcp-native write tools will act on it — enrolment is the gate those tools check.",e.jsx("br",{}),e.jsx("br",{}),"Nothing is written by enrolling. You can remove it again from this panel at any time."]}),confirmLabel:"Enroll repository",busy:s.busy,error:s.error,onConfirm:f}),e.jsx(w,{open:y!==null,onClose:()=>i(null),title:"Remove this repository from scope?",body:e.jsxs(e.Fragment,{children:["The autonomous loop will stop proposing work for ",e.jsx("code",{children:y?.path}),". Existing proposals stay in the inbox; nothing on disk is changed or deleted."]}),confirmLabel:"Remove from scope",destructive:!0,busy:s.busy,error:s.error,onConfirm:()=>{const x=y;x&&s.request(async()=>{await z({action:"unenroll",path:x.path}),i(null)},"Removing a repository from autonomous scope requires the dispatch token.")}})]})}const On="_section_1vgpf_8",Pn="_header_1vgpf_10",qn="_title_1vgpf_23",Un="_headerActions_1vgpf_31",Bn="_ghost_1vgpf_32",Wn="_scroll_1vgpf_45",Vn="_measure_1vgpf_46",Qn="_banner_1vgpf_48",Gn="_bannerTitle_1vgpf_59",Kn="_failure_1vgpf_61",Yn="_retry_1vgpf_70",zn="_loading_1vgpf_82",v={section:On,header:Pn,title:qn,headerActions:Un,ghost:Bn,scroll:Wn,measure:Vn,banner:Qn,bannerTitle:Gn,failure:Kn,retry:Yn,loading:zn};function ya(){const s=k(X),n=k(Le),l=k(ze),o=k(he),a=k(me),r=k(wn),d=B(X),c=Ee();Cn();const y=(l.data?.dispatchEnabled??!0)&&!c.readOnly,i=s.data,p=g.useMemo(()=>(l.data?.seats??[]).map(h=>({id:h.id,engine:h.engine,label:h.label})),[l.data]);return e.jsxs("section",{className:v.section,"aria-label":"Autonomy",children:[e.jsxs("header",{className:v.header,"data-app-region":"drag",children:[e.jsx("h2",{className:v.title,children:"Autonomy"}),e.jsxs("div",{className:v.headerActions,children:[s.status==="refreshing"?e.jsx(I,{}):null,e.jsx("button",{type:"button",className:v.ghost,onClick:d,children:"Refresh"})]})]}),e.jsx("div",{className:v.scroll,children:e.jsxs("div",{className:v.measure,children:[y?null:e.jsxs("div",{className:v.banner,role:"status",children:[e.jsx("span",{className:v.bannerTitle,children:"Read-only session"}),"This server was started without dispatch, so starting, stopping, editing caps, and changing scope are unavailable. Everything below is live and accurate — run ",e.jsx("code",{children:"ashlr verse"})," to get the controls."]}),s.status==="loading"?e.jsxs("div",{className:v.loading,children:[e.jsx(E,{width:"42%"}),e.jsx(E,{width:"68%"}),e.jsx(_,{}),e.jsx(_,{})]}):s.status==="error"||!i?e.jsxs("div",{className:v.failure,role:"alert",children:[s.error?.message??"Could not read the autonomy control snapshot.",e.jsx("br",{}),"Without it the cockpit cannot honestly say whether the loop is running, so nothing below is shown rather than guessed.",e.jsx("br",{}),e.jsx("button",{type:"button",className:v.retry,onClick:d,children:"Try again"})]}):e.jsxs(e.Fragment,{children:[e.jsx(gn,{snapshot:i}),e.jsx(fn,{snapshot:i,guard:c,dispatchEnabled:y}),e.jsx(An,{read:o.data??null,guard:c,dispatchEnabled:y,loading:o.status==="loading"}),e.jsx(Ln,{read:r.data??null,seats:p,guard:c,dispatchEnabled:y,loading:r.status==="loading"}),e.jsx(_n,{read:a.data??null,runtime:o.data?.value??null,loading:a.status==="loading"}),n.status==="loading"?e.jsxs("div",{className:t.panel,children:[e.jsx(_,{}),e.jsx(_,{})]}):n.data?e.jsx(mn,{caps:n.data,snapshot:i,guard:c,dispatchEnabled:y}):e.jsxs("section",{className:t.panel,"aria-label":"Budget and limits",children:[e.jsx("div",{className:t.panelHead,children:e.jsx("h3",{className:t.panelTitle,children:"Budget and limits"})}),e.jsx("p",{className:t.error,role:"alert",children:n.error?.message??"Could not read the configured caps, so none are shown or editable."})]}),e.jsx(In,{guard:c,dispatchEnabled:y}),e.jsx(an,{snapshot:i}),e.jsx(Hn,{}),e.jsx(vn,{})]})]})}),e.jsx(ye,{open:c.tokenOpen,onClose:c.closeToken,reason:c.tokenReason,tokenHelp:"the mutation token ashlr verse printed"})]})}export{ya as AutonomySection};
2
- //# sourceMappingURL=AutonomySection-CQVpEdCE.js.map