@dylanpiercey/work 0.0.71 → 0.0.73

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 (249) hide show
  1. package/dist/{_DgDsZuoQ.js → _BDyG-m5v.js} +1248 -158
  2. package/dist/{_8t6K8Jk8.js → _a4E7JVTq.js} +65 -65
  3. package/dist/{_D3qriis-.js → _hclnI8dX.js} +2 -2
  4. package/dist/_wbad_ZHd.js +2 -0
  5. package/dist/index.mjs +155 -915
  6. package/dist/public/assets/{_DSg_vc6H2.js → _29x9Ht-Q2.js} +1 -1
  7. package/dist/public/assets/_29x9Ht-Q2.js.br +0 -0
  8. package/dist/public/assets/{_BejV602Y.js → _A-SnIf68.js} +1 -1
  9. package/dist/public/assets/_A-SnIf68.js.br +0 -0
  10. package/dist/public/assets/{_AeL166wR2.js → _B-PT04Ok2.js} +1 -1
  11. package/dist/public/assets/_B-PT04Ok2.js.br +0 -0
  12. package/dist/public/assets/{_B3wjms9s2.js → _BGsHhxfZ2.js} +1 -1
  13. package/dist/public/assets/_BGsHhxfZ2.js.br +0 -0
  14. package/dist/public/assets/{_BZNMfrgb.js → _BN-ThWaS.js} +1 -1
  15. package/dist/public/assets/_BN-ThWaS.js.br +0 -0
  16. package/dist/public/assets/{_DZss8Wq02.js → _BTjgy5c62.js} +1 -1
  17. package/dist/public/assets/_BTjgy5c62.js.br +0 -0
  18. package/dist/public/assets/{_Dp1TBNWN.js → _BU_ZD020.js} +1 -1
  19. package/dist/public/assets/_BU_ZD020.js.br +0 -0
  20. package/dist/public/assets/{_Cn0DEemU.js → _BUc_Vl5e.js} +1 -1
  21. package/dist/public/assets/_BUc_Vl5e.js.br +0 -0
  22. package/dist/public/assets/{_C-wce-RA.js → _BYAOEh2-.js} +1 -1
  23. package/dist/public/assets/_BYAOEh2-.js.br +0 -0
  24. package/dist/public/assets/{_CiElF6r4.js → _BhRT35mT.js} +20 -20
  25. package/dist/public/assets/_BhRT35mT.js.br +0 -0
  26. package/dist/public/assets/{_Dbf-xJ6k.js → _BmDB0rQV.js} +1 -1
  27. package/dist/public/assets/_BmDB0rQV.js.br +0 -0
  28. package/dist/public/assets/{_BFfBgn79.js → _Bpr7lRdd.js} +1 -1
  29. package/dist/public/assets/_Bpr7lRdd.js.br +0 -0
  30. package/dist/public/assets/{_CGVLhh2k.js → _Bud2gpcs.js} +1 -1
  31. package/dist/public/assets/_Bud2gpcs.js.br +0 -0
  32. package/dist/public/assets/{_Lot9I7Im.js → _Bx-jImeN.js} +1 -1
  33. package/dist/public/assets/_Bx-jImeN.js.br +0 -0
  34. package/dist/public/assets/{_USmNZPRb.js → _ByMM8N1r.js} +1 -1
  35. package/dist/public/assets/_ByMM8N1r.js.br +0 -0
  36. package/dist/public/assets/{_CgwQS6LN2.js → _C-JDWYNo2.js} +1 -1
  37. package/dist/public/assets/_C-JDWYNo2.js.br +0 -0
  38. package/dist/public/assets/{_dAXKSDYL.js → _C-ifLHsW.js} +1 -1
  39. package/dist/public/assets/_C-ifLHsW.js.br +0 -0
  40. package/dist/public/assets/{_BPmmCSLY.js → _C0xjFWIM.js} +1 -1
  41. package/dist/public/assets/_C0xjFWIM.js.br +0 -0
  42. package/dist/public/assets/{_HO-Qb8pn.js → _C1RzE6Mp.js} +1 -1
  43. package/dist/public/assets/_C1RzE6Mp.js.br +0 -0
  44. package/dist/public/assets/{_Ek1T1FMw.js → _C6Eavzmt.js} +1 -1
  45. package/dist/public/assets/_C6Eavzmt.js.br +0 -0
  46. package/dist/public/assets/{_CWVKprFe2.js → _C6iBocvM2.js} +1 -1
  47. package/dist/public/assets/_C6iBocvM2.js.br +0 -0
  48. package/dist/public/assets/{_DAun3Lt7.js → _C7CzRI13.js} +1 -1
  49. package/dist/public/assets/_C7CzRI13.js.br +0 -0
  50. package/dist/public/assets/{_uyFxI_FF2.js → _C9CdATEd2.js} +1 -1
  51. package/dist/public/assets/_C9CdATEd2.js.br +0 -0
  52. package/dist/public/assets/{_BqrygBOe.js → _CE-w6G87.js} +1 -1
  53. package/dist/public/assets/{_CzxBqeDO.js → _CHhO4fFL.js} +1 -1
  54. package/dist/public/assets/_CHhO4fFL.js.br +0 -0
  55. package/dist/public/assets/{_Bn6Hn06S.js → _CIkNdjAJ.js} +1 -1
  56. package/dist/public/assets/_CIkNdjAJ.js.br +0 -0
  57. package/dist/public/assets/{_Bd-WyHvg.js → _CJDpwABS.js} +1 -1
  58. package/dist/public/assets/_CJDpwABS.js.br +0 -0
  59. package/dist/public/assets/{_B3VIvUTs2.js → _CKSRE8zv2.js} +1 -1
  60. package/dist/public/assets/_CKSRE8zv2.js.br +0 -0
  61. package/dist/public/assets/{_CTdFL4wj.js → _CMkaOgq5.js} +1 -1
  62. package/dist/public/assets/_CMkaOgq5.js.br +0 -0
  63. package/dist/public/assets/{_DWdZCyBL2.js → _CQ_0JcVs2.js} +1 -1
  64. package/dist/public/assets/_CQ_0JcVs2.js.br +0 -0
  65. package/dist/public/assets/{_Dcav7tzL.js → _CQeNDnCp.js} +6 -6
  66. package/dist/public/assets/_CQeNDnCp.js.br +0 -0
  67. package/dist/public/assets/{_CdHoxy6P.js → _CSfPA_mo.js} +1 -1
  68. package/dist/public/assets/_CSfPA_mo.js.br +0 -0
  69. package/dist/public/assets/{_BztBrnhM.js → _CYjQ_rQU.js} +1 -1
  70. package/dist/public/assets/_CYjQ_rQU.js.br +0 -0
  71. package/dist/public/assets/{_BPH6VN8T2.js → _CdB7VHwX2.js} +1 -1
  72. package/dist/public/assets/_CdB7VHwX2.js.br +0 -0
  73. package/dist/public/assets/{_C6jdreqj.js → _CdWuqeZK.js} +1 -1
  74. package/dist/public/assets/_CdWuqeZK.js.br +0 -0
  75. package/dist/public/assets/{_CgENI0zF2.js → _Ce-R03cZ2.js} +1 -1
  76. package/dist/public/assets/_Ce-R03cZ2.js.br +0 -0
  77. package/dist/public/assets/{_BltuSqY6.js → _Ce2B5H6R.js} +1 -1
  78. package/dist/public/assets/_Ce2B5H6R.js.br +0 -0
  79. package/dist/public/assets/{_BKRausc72.js → _ChkPwLnS2.js} +1 -1
  80. package/dist/public/assets/_ChkPwLnS2.js.br +0 -0
  81. package/dist/public/assets/{_BqfMkwYX.js → _CiYb_Bp1.js} +1 -1
  82. package/dist/public/assets/_CiYb_Bp1.js.br +0 -0
  83. package/dist/public/assets/{_CLGWdoAJ.js → _CkABEOAv.js} +1 -1
  84. package/dist/public/assets/_CkABEOAv.js.br +0 -0
  85. package/dist/public/assets/{_BPW0wOMI2.js → _CkNCn2942.js} +1 -1
  86. package/dist/public/assets/_CkNCn2942.js.br +0 -0
  87. package/dist/public/assets/{_DwNswmCf.js → _CnaMcooO.js} +1 -1
  88. package/dist/public/assets/_CnaMcooO.js.br +0 -0
  89. package/dist/public/assets/{_C_9OeUA2.js → _CpByMJ40.js} +1 -1
  90. package/dist/public/assets/_CpByMJ40.js.br +0 -0
  91. package/dist/public/assets/{_DTSUTR0_2.js → _CtowbQCb2.js} +1 -1
  92. package/dist/public/assets/_CtowbQCb2.js.br +0 -0
  93. package/dist/public/assets/{_DBiZo1op2.js → _D-P8DqvK2.js} +1 -1
  94. package/dist/public/assets/{_DbEPPsY1.js → _D6MZcQKP.js} +1 -1
  95. package/dist/public/assets/_D6MZcQKP.js.br +0 -0
  96. package/dist/public/assets/{_9aJgLz6G2.js → _D7mRLhwX2.js} +1 -1
  97. package/dist/public/assets/_D7mRLhwX2.js.br +0 -0
  98. package/dist/public/assets/{_DNdrj0-M2.js → _D99GO9JW2.js} +1 -1
  99. package/dist/public/assets/_D99GO9JW2.js.br +0 -0
  100. package/dist/public/assets/{_DqBuHT5A.js → _DC8LVwVY.js} +1 -1
  101. package/dist/public/assets/_DC8LVwVY.js.br +0 -0
  102. package/dist/public/assets/{_BUeHx4zC2.js → _DESY84xu2.js} +1 -1
  103. package/dist/public/assets/_DESY84xu2.js.br +0 -0
  104. package/dist/public/assets/{_CvMvIBy42.js → _DJARroah2.js} +1 -1
  105. package/dist/public/assets/_DJARroah2.js.br +0 -0
  106. package/dist/public/assets/{_CpnXaqgd2.js → _DK6p9z1j2.js} +1 -1
  107. package/dist/public/assets/_DK6p9z1j2.js.br +0 -0
  108. package/dist/public/assets/{_CeVU1yJL.js → _DKHAhfGs.js} +1 -1
  109. package/dist/public/assets/_DKHAhfGs.js.br +0 -0
  110. package/dist/public/assets/{_CbgTB_-a.js → _DQSUDhad.js} +1 -1
  111. package/dist/public/assets/_DQSUDhad.js.br +0 -0
  112. package/dist/public/assets/{_C-LtCarQ2.js → _DSWOPuxC2.js} +1 -1
  113. package/dist/public/assets/{_BR_6IGfk.js → _DSiaWqg3.js} +1 -1
  114. package/dist/public/assets/_DSiaWqg3.js.br +0 -0
  115. package/dist/public/assets/{_DXCHOWYL.js → _DcXafbQI.js} +1 -1
  116. package/dist/public/assets/_DcXafbQI.js.br +0 -0
  117. package/dist/public/assets/{_QQHXmR7d.js → _DcfF8nxm.js} +1 -1
  118. package/dist/public/assets/_DcfF8nxm.js.br +0 -0
  119. package/dist/public/assets/{_Du4JDj5_.js → _DgqFUsuu.js} +1 -1
  120. package/dist/public/assets/_DgqFUsuu.js.br +0 -0
  121. package/dist/public/assets/{_B0h_gNbx.js → _Dh1jAyYX.js} +1 -1
  122. package/dist/public/assets/_Dh1jAyYX.js.br +0 -0
  123. package/dist/public/assets/{_UgQ3KVU7.js → _DngVnDg5.js} +1 -1
  124. package/dist/public/assets/_DngVnDg5.js.br +0 -0
  125. package/dist/public/assets/{_DeMAtQzd.js → _Dnrrwurs.js} +1 -1
  126. package/dist/public/assets/_Dnrrwurs.js.br +0 -0
  127. package/dist/public/assets/{_DPDIk03W2.js → _DoN89b6G2.js} +1 -1
  128. package/dist/public/assets/_DoN89b6G2.js.br +0 -0
  129. package/dist/public/assets/{_B_OHURbh2.js → _DswD_yru2.js} +1 -1
  130. package/dist/public/assets/_DswD_yru2.js.br +0 -0
  131. package/dist/public/assets/{_COmAhQWL.js → _DynCQhpp.js} +1 -1
  132. package/dist/public/assets/_DynCQhpp.js.br +0 -0
  133. package/dist/public/assets/{_DtE0g-o1.js → _EA4z6Ocg.js} +1 -1
  134. package/dist/public/assets/_EA4z6Ocg.js.br +0 -0
  135. package/dist/public/assets/{_BYrRgI_G.js → _Mggy21Fi.js} +1 -1
  136. package/dist/public/assets/_Mggy21Fi.js.br +0 -0
  137. package/dist/public/assets/{_B5mDTFiX.js → _QfF14R_b.js} +1 -1
  138. package/dist/public/assets/_QfF14R_b.js.br +0 -0
  139. package/dist/public/assets/{__DTZmGl8.js → _T__665hy.js} +1 -1
  140. package/dist/public/assets/_T__665hy.js.br +0 -0
  141. package/dist/public/assets/{_DToVjT46.js → _UJESRnqQ.js} +1 -1
  142. package/dist/public/assets/_UJESRnqQ.js.br +0 -0
  143. package/dist/public/assets/{_CS1j3Hb2.js → _YuhWYT9L.js} +1 -1
  144. package/dist/public/assets/_YuhWYT9L.js.br +0 -0
  145. package/dist/public/assets/{_BZK8bxUc.js → _YxDFo3_J.js} +1 -1
  146. package/dist/public/assets/_YxDFo3_J.js.br +0 -0
  147. package/dist/public/assets/{_BEEgRpqj.js → _bYuFEVvN.js} +1 -1
  148. package/dist/public/assets/_bYuFEVvN.js.br +0 -0
  149. package/dist/public/assets/{_D2vmNrtA.js → _mn9C4e-7.js} +1 -1
  150. package/dist/public/assets/_mn9C4e-7.js.br +0 -0
  151. package/dist/public/assets/{_BUteNftu.js → _srUTg489.js} +1 -1
  152. package/dist/public/assets/_srUTg489.js.br +0 -0
  153. package/dist/public/assets/{_CXSLFN1Q2.js → _ynuKZgua2.js} +1 -1
  154. package/dist/public/assets/_ynuKZgua2.js.br +0 -0
  155. package/dist/public/assets/{app-page-Bv2S_Tip.css → app-page-B0jusuKZ.css} +1 -1
  156. package/dist/public/assets/app-page-B0jusuKZ.css.br +0 -0
  157. package/dist/public/assets/diff-view-CXzNOw49.css +1 -0
  158. package/dist/public/assets/diff-view-CXzNOw49.css.br +0 -0
  159. package/dist/public/assets/new-DEf08lXy.js +1 -0
  160. package/dist/public/assets/settings-DEf08lXy.js +1 -0
  161. package/dist/public/assets/w-DEf08lXy.js +1 -0
  162. package/dist/public/assets/w._-C3AKQvSa.js +1 -0
  163. package/dist/public/assets/w._-DEf08lXy.js +1 -0
  164. package/lib/setup/agents.json +66 -0
  165. package/lib/setup/catalog.d.mts +2 -0
  166. package/lib/setup/catalog.mjs +9 -10
  167. package/package.json +3 -3
  168. package/dist/_xZfpJdQE.js +0 -2
  169. package/dist/public/assets/_9aJgLz6G2.js.br +0 -0
  170. package/dist/public/assets/_AeL166wR2.js.br +0 -0
  171. package/dist/public/assets/_B0h_gNbx.js.br +0 -0
  172. package/dist/public/assets/_B3VIvUTs2.js.br +0 -0
  173. package/dist/public/assets/_B3wjms9s2.js.br +0 -0
  174. package/dist/public/assets/_B5mDTFiX.js.br +0 -0
  175. package/dist/public/assets/_BEEgRpqj.js.br +0 -0
  176. package/dist/public/assets/_BFfBgn79.js.br +0 -0
  177. package/dist/public/assets/_BKRausc72.js.br +0 -0
  178. package/dist/public/assets/_BPH6VN8T2.js.br +0 -0
  179. package/dist/public/assets/_BPW0wOMI2.js.br +0 -0
  180. package/dist/public/assets/_BPmmCSLY.js.br +0 -0
  181. package/dist/public/assets/_BR_6IGfk.js.br +0 -0
  182. package/dist/public/assets/_BUeHx4zC2.js.br +0 -0
  183. package/dist/public/assets/_BUteNftu.js.br +0 -0
  184. package/dist/public/assets/_BYrRgI_G.js.br +0 -0
  185. package/dist/public/assets/_BZK8bxUc.js.br +0 -0
  186. package/dist/public/assets/_BZNMfrgb.js.br +0 -0
  187. package/dist/public/assets/_B_OHURbh2.js.br +0 -0
  188. package/dist/public/assets/_Bd-WyHvg.js.br +0 -0
  189. package/dist/public/assets/_BejV602Y.js.br +0 -0
  190. package/dist/public/assets/_BltuSqY6.js.br +0 -0
  191. package/dist/public/assets/_Bn6Hn06S.js.br +0 -0
  192. package/dist/public/assets/_BqfMkwYX.js.br +0 -0
  193. package/dist/public/assets/_BztBrnhM.js.br +0 -0
  194. package/dist/public/assets/_C-wce-RA.js.br +0 -0
  195. package/dist/public/assets/_C6jdreqj.js.br +0 -0
  196. package/dist/public/assets/_CGVLhh2k.js.br +0 -0
  197. package/dist/public/assets/_CLGWdoAJ.js.br +0 -0
  198. package/dist/public/assets/_COmAhQWL.js.br +0 -0
  199. package/dist/public/assets/_CS1j3Hb2.js.br +0 -0
  200. package/dist/public/assets/_CTdFL4wj.js.br +0 -0
  201. package/dist/public/assets/_CWVKprFe2.js.br +0 -0
  202. package/dist/public/assets/_CXSLFN1Q2.js.br +0 -0
  203. package/dist/public/assets/_C_9OeUA2.js.br +0 -0
  204. package/dist/public/assets/_CbgTB_-a.js.br +0 -0
  205. package/dist/public/assets/_CdHoxy6P.js.br +0 -0
  206. package/dist/public/assets/_CeVU1yJL.js.br +0 -0
  207. package/dist/public/assets/_CgENI0zF2.js.br +0 -0
  208. package/dist/public/assets/_CgwQS6LN2.js.br +0 -0
  209. package/dist/public/assets/_CiElF6r4.js.br +0 -0
  210. package/dist/public/assets/_Cn0DEemU.js.br +0 -0
  211. package/dist/public/assets/_CpnXaqgd2.js.br +0 -0
  212. package/dist/public/assets/_CvMvIBy42.js.br +0 -0
  213. package/dist/public/assets/_CzxBqeDO.js.br +0 -0
  214. package/dist/public/assets/_D2vmNrtA.js.br +0 -0
  215. package/dist/public/assets/_DAun3Lt7.js.br +0 -0
  216. package/dist/public/assets/_DNdrj0-M2.js.br +0 -0
  217. package/dist/public/assets/_DPDIk03W2.js.br +0 -0
  218. package/dist/public/assets/_DSg_vc6H2.js.br +0 -0
  219. package/dist/public/assets/_DTSUTR0_2.js.br +0 -0
  220. package/dist/public/assets/_DToVjT46.js.br +0 -0
  221. package/dist/public/assets/_DWdZCyBL2.js.br +0 -0
  222. package/dist/public/assets/_DXCHOWYL.js.br +0 -0
  223. package/dist/public/assets/_DZss8Wq02.js.br +0 -0
  224. package/dist/public/assets/_DbEPPsY1.js.br +0 -0
  225. package/dist/public/assets/_Dbf-xJ6k.js.br +0 -0
  226. package/dist/public/assets/_Dcav7tzL.js.br +0 -0
  227. package/dist/public/assets/_DeMAtQzd.js.br +0 -0
  228. package/dist/public/assets/_Dp1TBNWN.js.br +0 -0
  229. package/dist/public/assets/_DqBuHT5A.js.br +0 -0
  230. package/dist/public/assets/_DtE0g-o1.js.br +0 -0
  231. package/dist/public/assets/_Du4JDj5_.js.br +0 -0
  232. package/dist/public/assets/_DwNswmCf.js.br +0 -0
  233. package/dist/public/assets/_Ek1T1FMw.js.br +0 -0
  234. package/dist/public/assets/_HO-Qb8pn.js.br +0 -0
  235. package/dist/public/assets/_Lot9I7Im.js.br +0 -0
  236. package/dist/public/assets/_QQHXmR7d.js.br +0 -0
  237. package/dist/public/assets/_USmNZPRb.js.br +0 -0
  238. package/dist/public/assets/_UgQ3KVU7.js.br +0 -0
  239. package/dist/public/assets/__DTZmGl8.js.br +0 -0
  240. package/dist/public/assets/_dAXKSDYL.js.br +0 -0
  241. package/dist/public/assets/_uyFxI_FF2.js.br +0 -0
  242. package/dist/public/assets/app-page-Bv2S_Tip.css.br +0 -0
  243. package/dist/public/assets/diff-view-rtQ04a8n.css +0 -1
  244. package/dist/public/assets/diff-view-rtQ04a8n.css.br +0 -0
  245. package/dist/public/assets/new-ECSvnCXB.js +0 -1
  246. package/dist/public/assets/settings-ECSvnCXB.js +0 -1
  247. package/dist/public/assets/w-ECSvnCXB.js +0 -1
  248. package/dist/public/assets/w._-CEJj3Icr.js +0 -1
  249. package/dist/public/assets/w._-ECSvnCXB.js +0 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./_BMI-E3GI.js";
2
- import { $ as get, A as subscribe, B as setPref, C as setScrapedPhase, D as pushPublicKey, E as deleteSubscription, F as disabledAgents, G as setupPath, H as doctor, I as enabledAgents, J as TOOLS, K as which, L as getSetting, M as subscriberJoins, N as agentChoices, O as saveSubscription, P as allPrefs, Q as db, R as preferredAgent, S as setAgentPhase, T as summaryFromHookPayload, U as ghKnownHosts, V as setSetting, W as miseVersions, X as toolById, Y as agentById, Z as all, _ as tmuxName, a as ensureTmuxServer, at as tmux, b as clearAgentPhase, c as killWorkspaceSessions, d as newSessionArgs, et as workspacePath, g as sessionStates, h as sendToSession, i as disposeSessions, it as run, j as subscriberCount, k as publish, l as listSessions, m as renameSession, n as clearTmuxStarted, nt as gh, o as getSession, ot as config, p as panePids, q as DEFAULT_GITHUB_HOST, r as createSession, rt as git, s as killSession, t as cleanEnv, tt as TMUX_SOCKET, u as markTmuxStarted, v as tmuxWasStarted, w as setSessionViewers, x as reasonFromHookPayload, y as reportsWorking, z as setDisabledAgents } from "./_DgDsZuoQ.js";
3
- import { $ as _flush_head, A as metaTrunc, B as _attr_select_value, C as setPrimaryHost, Ct as _try, D as iconBtnRow, Dt as writeScope, Et as withPageAssets, F as _attr_class, G as _content, H as _attrs, K as _content_resume, L as _attr_input_value, M as tone, N as $global, O as iconBtnXs, P as _attr, Q as _existing_scope, R as _attr_option_value, S as repoWebUrl$1, St as _trailers, T as btnSm, Tt as attrTag, U as _attrs_partial, V as _attr_style, W as _await, X as _el_resume, Y as _el_read_error, Z as _escape, _ as sectionCount$1, _t as _show_end, at as _if, b as icon_base_default, bt as _template, c as sideNavOpen, ct as _resume_branch, d as rankRepos, dt as _scope_with_id, et as _for_of, f as icon_search_default, ft as _script, g as row, gt as _set_serialize_reason, h as iconBtn$2, ht as _serialize_if, it as _id, j as phase, k as inputLg, l as workspaceTab, lt as _scope_id, m as icon_refresh_default, mt as _serialize_guard, n as findInput, nt as _hoist_read_error, ot as _peek_scope_id, p as icon_back_default, pt as _sep, q as _dynamic_tag, r as icon_sidebar_default, rt as _html, s as setWorkspaceTab, st as _resume, t as findIconBtn, tt as _hoist, ut as _scope_reason, v as toast_default, vt as _show_start, w as btnLg, wt as _var, x as repoLabel, xt as _to_text, y as icon_xmark_default, yt as _subscribe, z as _attr_or } from "./_D3qriis-.js";
2
+ import { $ as DEFAULT_GITHUB_HOST, A as setScrapedPhase, B as allPrefs, C as agentBadge, D as agentMeta, E as agentLabel, F as publish, G as setDisabledAgents, H as enabledAgents, I as subscribe, J as doctor, K as setPref, L as subscriberCount, M as deleteSubscription, N as pushPublicKey, O as clearAgentPhase, P as saveSubscription, Q as which, R as subscriberJoins, S as blankRow, T as agentFromCommand, U as getSetting, V as disabledAgents, W as preferredAgent, X as miseVersions, Y as ghKnownHosts, Z as setupPath, _ as tmuxName, a as ensureTmuxServer, at as get, b as readHookPayload, c as killWorkspaceSessions, ct as gh, d as newSessionArgs, dt as tmux, et as TOOLS, ft as config, g as sessionStates, h as sendToSession, i as disposeSessions, it as db, j as setSessionViewers, k as setAgentPhase, l as listSessions, lt as git, m as renameSession, n as clearTmuxStarted, nt as toolById, o as getSession, ot as workspacePath, p as panePids, q as setSetting, r as createSession, rt as all, s as killSession, st as TMUX_SOCKET, t as cleanEnv, tt as agentById, u as markTmuxStarted, ut as run, v as tmuxWasStarted, w as agentFamily, x as reportsWorking, y as AGENTS, z as agentChoices } from "./_BDyG-m5v.js";
3
+ import { $ as _flush_head, A as metaTrunc, B as _attr_select_value, C as setPrimaryHost, Ct as _try, D as iconBtnRow, Dt as writeScope, Et as withPageAssets, F as _attr_class, G as _content, H as _attrs, K as _content_resume, L as _attr_input_value, M as tone, N as $global, O as iconBtnXs, P as _attr, Q as _existing_scope, R as _attr_option_value, S as repoWebUrl$1, St as _trailers, T as btnSm, Tt as attrTag, U as _attrs_partial, V as _attr_style, W as _await, X as _el_resume, Y as _el_read_error, Z as _escape, _ as sectionCount$1, _t as _show_end, at as _if, b as icon_base_default, bt as _template, c as sideNavOpen, ct as _resume_branch, d as rankRepos, dt as _scope_with_id, et as _for_of, f as icon_search_default, ft as _script, g as row, gt as _set_serialize_reason, h as iconBtn$2, ht as _serialize_if, it as _id, j as phase, k as inputLg, l as workspaceTab, lt as _scope_id, m as icon_refresh_default, mt as _serialize_guard, n as findInput, nt as _hoist_read_error, ot as _peek_scope_id, p as icon_back_default, pt as _sep, q as _dynamic_tag, r as icon_sidebar_default, rt as _html, s as setWorkspaceTab, st as _resume, t as findIconBtn, tt as _hoist, ut as _scope_reason, v as toast_default, vt as _show_start, w as btnLg, wt as _var, x as repoLabel, xt as _to_text, y as icon_xmark_default, yt as _subscribe, z as _attr_or } from "./_hclnI8dX.js";
4
4
  import fs from "node:fs";
5
5
  import { createServer } from "node:http";
6
6
  import path from "node:path";
@@ -10,7 +10,6 @@ import { Readable } from "node:stream";
10
10
  import { AsyncLocalStorage } from "node:async_hooks";
11
11
  import os from "node:os";
12
12
  import { spawn } from "node:child_process";
13
- import { DatabaseSync } from "node:sqlite";
14
13
  import crypto, { createHash } from "node:crypto";
15
14
  import fsp from "node:fs/promises";
16
15
  import pty from "node-pty";
@@ -3133,67 +3132,10 @@ function coalesce(fn) {
3133
3132
  };
3134
3133
  }
3135
3134
  //#endregion
3136
- //#region src/client/agents.ts
3137
- /** Agent instance ids are `<family><n?>` (`claude`, `claude2`) — see
3138
- * lib/setup/catalog.mjs `parseAgentId`. This is the browser-side mirror for
3139
- * icons, labels, and reading a shell's running command; the family table is
3140
- * static so the client bundle needs no server round-trip. */
3141
- var FAMILIES = {
3142
- claude: {
3143
- label: "Claude",
3144
- bin: "claude"
3145
- },
3146
- codex: {
3147
- label: "Codex",
3148
- bin: "codex"
3149
- },
3150
- grok: {
3151
- label: "Grok",
3152
- bin: "grok"
3153
- },
3154
- copilot: {
3155
- label: "Copilot",
3156
- bin: "copilot"
3157
- },
3158
- cursor: {
3159
- label: "Cursor",
3160
- bin: "cursor-agent"
3161
- }
3162
- };
3163
- function parseAgent(id) {
3164
- const m = /^([a-z]+?)(\d*)$/.exec(id || "");
3165
- return m && FAMILIES[m[1]] ? {
3166
- family: m[1],
3167
- suffix: m[2]
3168
- } : null;
3169
- }
3170
- /** Icon family for an id — `shell` (or unknown) falls back to the prompt glyph. */
3171
- function agentFamily(id) {
3172
- return parseAgent(id)?.family ?? id;
3173
- }
3174
- /** Numeric suffix to badge on the icon; empty for the primary instance. */
3175
- function agentBadge(id) {
3176
- return parseAgent(id)?.suffix ?? "";
3177
- }
3178
- /** "Claude 2" / "Shell". */
3179
- function agentLabel(id) {
3180
- const p = parseAgent(id);
3181
- if (!p) return id === "shell" ? "Shell" : id;
3182
- return `${FAMILIES[p.family].label}${p.suffix ? ` ${p.suffix}` : ""}`;
3183
- }
3184
- /** Instance id for a running command (`cursor-agent2` → `cursor2`), or null. */
3185
- function agentFromCommand(command) {
3186
- for (const [family, { bin }] of Object.entries(FAMILIES)) {
3187
- if (command === bin) return family;
3188
- if (command.startsWith(bin) && /^\d+$/.test(command.slice(bin.length))) return `${family}${command.slice(bin.length)}`;
3189
- }
3190
- return null;
3191
- }
3192
- //#endregion
3193
3135
  //#region src/tags/settings-page.css.ts
3194
- var content$2 = "_bV _bh _bi";
3195
- var agentGrid = "_bZ _bs";
3196
- var toolGrid = "_b9 _bs";
3136
+ var content$2 = "_b3 _bh _bi";
3137
+ var agentGrid = "_b7 _bs";
3138
+ var toolGrid = "_cg _bs";
3197
3139
  //#endregion
3198
3140
  //#region src/tags/page-head.marko
3199
3141
  var page_head_default = _template("o", (input) => {
@@ -3203,14 +3145,14 @@ var page_head_default = _template("o", (input) => {
3203
3145
  _if(() => {
3204
3146
  if (input.backHref) {
3205
3147
  const $scope1_id = _scope_id();
3206
- _html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "_cr"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
3148
+ _html(`<a${_attr("href", input.backHref)}${_attr_class([iconBtnRow, "_cp"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
3207
3149
  icon_back_default({ size: 16 });
3208
3150
  _html(`</a>${_el_resume($scope1_id, "a", _serialize_guard($scope0_reason, 0))}`);
3209
3151
  _serialize_if($scope0_reason, 2) && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 0) && _scope_with_id($scope0_id) });
3210
3152
  return 0;
3211
3153
  } else if (input.onBack) {
3212
3154
  const $scope2_id = _scope_id();
3213
- _html(`<button${_attr_class([iconBtnRow, "_cr"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
3155
+ _html(`<button${_attr_class([iconBtnRow, "_cp"])}${_attr_or("title", input.backTitle, " title=\"Back (Esc)\"")}${_attr_or("aria-label", input.backTitle, " aria-label=Back")}>`);
3214
3156
  icon_back_default({ size: 16 });
3215
3157
  _html(`</button>${_el_resume($scope2_id, "a")}`);
3216
3158
  _script($scope2_id, "o0");
@@ -3251,19 +3193,12 @@ var page_head_default = _template("o", (input) => {
3251
3193
  });
3252
3194
  //#endregion
3253
3195
  //#region src/tags/icons/icon-agent.marko
3254
- var PATHS = {
3255
- claude: "M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z",
3256
- codex: "M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z",
3257
- grok: "M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815",
3258
- copilot: "M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z",
3259
- cursor: "M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"
3260
- };
3261
3196
  var icon_agent_default = _template("C", (input) => {
3262
3197
  const $scope0_reason = _scope_reason(), $sg__input_agent = _serialize_guard($scope0_reason, 2), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0), $si__input_size__OR__input_class = _serialize_if($scope0_reason, 0), $si__input_size__OR__input_agent__OR__input_class = _serialize_if($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 2);
3263
3198
  const $scope0_id = _scope_id();
3264
3199
  const $badge__closures = /* @__PURE__ */ new Set();
3265
3200
  const size = input.size ?? 15;
3266
- const d = PATHS[agentFamily(input.agent)];
3201
+ const d = agentMeta(agentFamily(input.agent))?.icon;
3267
3202
  const badge = agentBadge(input.agent);
3268
3203
  _if(() => {
3269
3204
  if (d) {
@@ -3308,7 +3243,7 @@ var icon_agent_default = _template("C", (input) => {
3308
3243
  n: $badge__closures
3309
3244
  });
3310
3245
  });
3311
- var usageNote = "_cy _P";
3246
+ var usageNote = "_ep _P";
3312
3247
  //#endregion
3313
3248
  //#region src/tags/usage-meters.marko
3314
3249
  function duration(ms) {
@@ -3332,11 +3267,11 @@ var usage_meters_default = _template("z", (input) => {
3332
3267
  const $scope0_reason = _scope_reason(), $sg__input_agent__OR__input_hideName = _serialize_guard($scope0_reason, 0), $sg__input_agent = _serialize_guard($scope0_reason, 1), $si__input_agent = _serialize_if($scope0_reason, 1), $sg__input_hideName = _serialize_guard($scope0_reason, 2), $si__input_agent__OR__input_hideName = _serialize_if($scope0_reason, 0);
3333
3268
  const $scope0_id = _scope_id();
3334
3269
  const agent = input.agent;
3335
- _html(`<div${_attr_class(["_cs", { ["_ct"]: input.hideName }])}><div${_attr_class("_cu")}>`);
3270
+ _html(`<div${_attr_class(["_ej", { ["_ek"]: input.hideName }])}><div${_attr_class("_el")}>`);
3336
3271
  _if(() => {
3337
3272
  if (!input.hideName) {
3338
3273
  const $scope1_id = _scope_id();
3339
- _html(`<strong${_attr_class("_cN")}>${_escape(agent.agent)}${_el_resume($scope1_id, "b", $sg__input_agent)}</strong>`);
3274
+ _html(`<strong${_attr_class("_eE")}>${_escape(agent.agent)}${_el_resume($scope1_id, "b", $sg__input_agent)}</strong>`);
3340
3275
  $si__input_agent__OR__input_hideName && writeScope($scope1_id, { _: $si__input_agent && _scope_with_id($scope0_id) });
3341
3276
  return 0;
3342
3277
  }
@@ -3344,7 +3279,7 @@ var usage_meters_default = _template("z", (input) => {
3344
3279
  _if(() => {
3345
3280
  if (agent.plan && agent.plan.toLowerCase() !== agent.agent.toLowerCase()) {
3346
3281
  const $scope2_id = _scope_id();
3347
- _html(`<span${_attr_class("_cv")}>${_escape(agent.plan.replace(/^default_/, "").replaceAll("_", " "))}${_el_resume($scope2_id, "b", $sg__input_agent)}</span>`);
3282
+ _html(`<span${_attr_class("_em")}>${_escape(agent.plan.replace(/^default_/, "").replaceAll("_", " "))}${_el_resume($scope2_id, "b", $sg__input_agent)}</span>`);
3348
3283
  $si__input_agent && writeScope($scope2_id, { _: _scope_with_id($scope0_id) });
3349
3284
  return 0;
3350
3285
  }
@@ -3352,19 +3287,19 @@ var usage_meters_default = _template("z", (input) => {
3352
3287
  _if(() => {
3353
3288
  if (agent.stale_seconds != null) {
3354
3289
  const $scope3_id = _scope_id();
3355
- _html(`<span${_attr_class("_cw")}${_attr("title", `${agent.note || "provider unreachable"}. Last cached numbers, ${duration(agent.stale_seconds * 1e3)} old`)}>⚠ ${_sep($sg__input_agent)}${_escape(duration(agent.stale_seconds * 1e3))}${_el_resume($scope3_id, "b", $sg__input_agent)} old</span>${_el_resume($scope3_id, "a", $sg__input_agent)}`);
3290
+ _html(`<span${_attr_class("_en")}${_attr("title", `${agent.note || "provider unreachable"}. Last cached numbers, ${duration(agent.stale_seconds * 1e3)} old`)}>⚠ ${_sep($sg__input_agent)}${_escape(duration(agent.stale_seconds * 1e3))}${_el_resume($scope3_id, "b", $sg__input_agent)} old</span>${_el_resume($scope3_id, "a", $sg__input_agent)}`);
3356
3291
  $si__input_agent && writeScope($scope3_id, { _: _scope_with_id($scope0_id) });
3357
3292
  return 0;
3358
3293
  }
3359
3294
  }, $scope0_id, "e", $sg__input_agent, $sg__input_agent, $sg__input_agent__OR__input_hideName, 0, 1);
3360
- _html(`</div><div${_attr_class(["_cx", { ["_cO"]: agent.stale_seconds != null }])}>`);
3295
+ _html(`</div><div${_attr_class(["_eo", { ["_eF"]: agent.stale_seconds != null }])}>`);
3361
3296
  _for_of(agent.windows || [], (win) => {
3362
3297
  const $scope4_id = _scope_id();
3363
3298
  const pct = pctText$1(win.used_percent);
3364
3299
  const label = resetLabel(win.resets_at, agent.stale_seconds != null);
3365
- const fillClass = win.used_percent >= 90 ? "_cG" : win.used_percent >= 70 ? "_cF" : win.used_percent >= 40 ? "_cE" : "_cD";
3366
- const pctClass = win.used_percent >= 90 ? "_cL" : win.used_percent >= 70 ? "_cK" : win.used_percent >= 40 ? "_cJ" : "_cI";
3367
- _html(`<div${_attr_class("_cz")}${_attr("title", `${win.window}: ${pct} used${win.resets_at ? `, resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_cA")}>${_escape(win.window)}${_el_resume($scope4_id, "c", $sg__input_agent)}</span><span${_attr_class("_cB")}><span${_attr_class(["_cC", fillClass])}${_attr_style(`width:${Math.min(100, Math.max(2, win.used_percent))}%`)}></span>${_el_resume($scope4_id, "e", $sg__input_agent)}</span><span${_attr_class(["_cH", pctClass])}>${_escape(pct)}${_el_resume($scope4_id, "g", $sg__input_agent)}</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_cM")}>${label ? `↻ ${_escape(`${_to_text(label)}`)}` : ""}${_el_resume($scope4_id, "i", $sg__input_agent)}</span></div>${_el_resume($scope4_id, "a", $sg__input_agent)}`);
3300
+ const fillClass = win.used_percent >= 90 ? "_ex" : win.used_percent >= 70 ? "_ew" : win.used_percent >= 40 ? "_ev" : "_eu";
3301
+ const pctClass = win.used_percent >= 90 ? "_eC" : win.used_percent >= 70 ? "_eB" : win.used_percent >= 40 ? "_eA" : "_ez";
3302
+ _html(`<div${_attr_class("_eq")}${_attr("title", `${win.window}: ${pct} used${win.resets_at ? `, resets ${new Date(win.resets_at).toLocaleString()}` : ""}`)}><span${_attr_class("_er")}>${_escape(win.window)}${_el_resume($scope4_id, "c", $sg__input_agent)}</span><span${_attr_class("_es")}><span${_attr_class(["_et", fillClass])}${_attr_style(`width:${Math.min(100, Math.max(2, win.used_percent))}%`)}></span>${_el_resume($scope4_id, "e", $sg__input_agent)}</span><span${_attr_class(["_ey", pctClass])}>${_escape(pct)}${_el_resume($scope4_id, "g", $sg__input_agent)}</span>${_el_resume($scope4_id, "f", $sg__input_agent)}<span${_attr_class("_eD")}>${label ? `↻ ${_escape(`${_to_text(label)}`)}` : ""}${_el_resume($scope4_id, "i", $sg__input_agent)}</span></div>${_el_resume($scope4_id, "a", $sg__input_agent)}`);
3368
3303
  $si__input_agent && writeScope($scope4_id, { _: _scope_with_id($scope0_id) });
3369
3304
  }, "window", $scope0_id, "g", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
3370
3305
  _if(() => {
@@ -3423,7 +3358,7 @@ var modal_view_default = _template("m", (input) => {
3423
3358
  const { label, class: inputClass, open: _open, openChange: _openChange, dismissable: _dismissable, content, footer, closedby: _closedby, onCancel: _onCancel, onClose: _onClose, "aria-label": inputAriaLabel, "aria-labelledby": inputLabelledBy, ...htmlInput } = input;
3424
3359
  const dismissable = input.dismissable !== false;
3425
3360
  let open = input.open;
3426
- _html(`<dialog${_attr_class(["_c2", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
3361
+ _html(`<dialog${_attr_class(["_gF", inputClass])}${_attr("aria-labelledby", inputLabelledBy)}${inputLabelledBy ? _attr("aria-label", inputAriaLabel) : _attr("aria-label", inputAriaLabel || label)} closedby=${dismissable ? "any" : "none"}${_attrs_partial({
3427
3362
  ...htmlInput,
3428
3363
  open: null
3429
3364
  }, {
@@ -3433,20 +3368,20 @@ var modal_view_default = _template("m", (input) => {
3433
3368
  closedby: 1,
3434
3369
  "on-cancel": 1,
3435
3370
  "on-close": 1
3436
- }, "a", $scope0_id, "dialog")}><div${_attr_class("_c3")}>`);
3371
+ }, "a", $scope0_id, "dialog")}><div${_attr_class("_gG")}>`);
3437
3372
  _dynamic_tag($scope0_id, "c", content, {}, 0, 0, _serialize_guard($scope0_reason, 6));
3438
3373
  _html("</div>");
3439
3374
  _if(() => {
3440
3375
  if (footer) {
3441
3376
  const $scope1_id = _scope_id();
3442
- _html(`<form method=dialog${_attr_class("_c4")}>`);
3377
+ _html(`<form method=dialog${_attr_class("_gH")}>`);
3443
3378
  _dynamic_tag($scope1_id, "b", footer.content, {}, 0, 0, _serialize_guard($scope0_reason, 7));
3444
3379
  _html("</form>");
3445
3380
  $si__input_openChange__OR__input_footer && writeScope($scope1_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope0_id) });
3446
3381
  return 0;
3447
3382
  } else if (input.openChange) {
3448
3383
  const $scope2_id = _scope_id();
3449
- _html(`<form method=dialog${_attr_class("_c4")}>`);
3384
+ _html(`<form method=dialog${_attr_class("_gH")}>`);
3450
3385
  dialog_close_default({
3451
3386
  class: ["_l", "_m"],
3452
3387
  content: _content("m0", () => {
@@ -3505,7 +3440,7 @@ var prompt_dialog_default = _template("p", (input) => {
3505
3440
  const $childScope = _peek_scope_id();
3506
3441
  modal_view_default({
3507
3442
  label: input.label,
3508
- class: "_cp",
3443
+ class: "_ed",
3509
3444
  open: input.open,
3510
3445
  openChange: input.openChange,
3511
3446
  "aria-labelledby": titleId,
@@ -3528,7 +3463,7 @@ var prompt_dialog_default = _template("p", (input) => {
3528
3463
  content: _content("p6", () => {
3529
3464
  _scope_reason();
3530
3465
  const $scope2_id = _scope_id();
3531
- _html(`<h2${_attr_class("_cq")}${_attr("id", titleId)}>${_escape(input.label)}${_el_resume($scope2_id, "b", $sg__input_label)}</h2><input${_attr_input_value($scope2_id, "c", value, _resume((_new_value) => {
3466
+ _html(`<h2${_attr_class("_ee")}${_attr("id", titleId)}>${_escape(input.label)}${_el_resume($scope2_id, "b", $sg__input_label)}</h2><input${_attr_input_value($scope2_id, "c", value, _resume((_new_value) => {
3532
3467
  value = _new_value;
3533
3468
  }, "p0", $scope2_id))}${_attr("placeholder", input.placeholder)}>${_el_resume($scope2_id, "c")}`);
3534
3469
  _script($scope2_id, "p4");
@@ -3791,12 +3726,12 @@ var settings_page_default = _template("s", (input) => {
3791
3726
  return 0;
3792
3727
  } else if (setup.ready) {
3793
3728
  const $scope43_id = _scope_id();
3794
- _html(`<span${_attr_class("_bX")}>Ready</span>. Tools, GitHub, and an agent are all in place.`);
3729
+ _html(`<span${_attr_class("_b5")}>Ready</span>. Tools, GitHub, and an agent are all in place.`);
3795
3730
  writeScope($scope43_id, {});
3796
3731
  return 1;
3797
3732
  } else {
3798
3733
  const $scope5_id = _scope_id();
3799
- _html(`<span${_attr_class("_bY")}>Not ready</span>. Missing <!>${_escape(setup.missing.map((m) => MISSING_LABEL[m] || m).join(", "))}${_el_resume($scope5_id, "b")}.`);
3734
+ _html(`<span${_attr_class("_b6")}>Not ready</span>. Missing <!>${_escape(setup.missing.map((m) => MISSING_LABEL[m] || m).join(", "))}${_el_resume($scope5_id, "b")}.`);
3800
3735
  _subscribe($setup_missing__closures, writeScope($scope5_id, {}));
3801
3736
  return 2;
3802
3737
  }
@@ -3843,11 +3778,11 @@ var settings_page_default = _template("s", (input) => {
3843
3778
  return 0;
3844
3779
  }
3845
3780
  }, $scope0_id, "e", 1, 1, 1, 0, 1);
3846
- _html(`<section${_attr_class("_bp")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bq")}><h2${_attr("id", agentsId)}${_attr_class("_bE")}>Agents</h2><div${_attr_class("_v")}></div><label${_attr_class("_b1")}><span${_attr_class("_P")}>Default</span><span${_attr_class("_j")}>`);
3781
+ _html(`<section${_attr_class("_bp")}${_attr("aria-labelledby", agentsId)}><div${_attr_class("_bq")}><h2${_attr("id", agentsId)}${_attr_class("_bE")}>Agents</h2><div${_attr_class("_v")}></div><label${_attr_class("_b9")}><span${_attr_class("_P")}>Default</span><span${_attr_class("_j")}>`);
3847
3782
  _attr_select_value($scope0_id, "m", input.preferred, _resume(function(v) {
3848
3783
  setPreferred(v);
3849
3784
  }, "s1", $scope0_id), () => {
3850
- _html(`<select${_attr_class(["_k", "_b2"])} aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet">`);
3785
+ _html(`<select${_attr_class(["_k", "_b_"])} aria-label="Default agent (starts when a workspace has no session yet)" title="Starts when a workspace has no session yet">`);
3851
3786
  _for_of(input.agents.filter((a) => a !== "shell"), (id) => {
3852
3787
  const $scope44_id = _scope_id();
3853
3788
  _html(`<option${_attr_option_value(id)}>${_escape(agentLabel(id))}${_el_resume($scope44_id, "b", $sg__input_agents)}</option>${_el_resume($scope44_id, "a", $sg__input_agents)}`);
@@ -3868,7 +3803,7 @@ var settings_page_default = _template("s", (input) => {
3868
3803
  const rows = lone ? [] : a.instances;
3869
3804
  const loneAccounts = lone && lone.enabled ? accountsFor(lone.id) : [];
3870
3805
  const extraAccounts = a.installed ? strayAccountsFor(a) : [];
3871
- _html(`<li${_attr_class(["_bu", "_b0"])}><div${_attr_class(["_b3", { ["_b6"]: lone && !lone.enabled }])}>`);
3806
+ _html(`<li${_attr_class(["_bu", "_b8"])}><div${_attr_class(["_ca", { ["_cd"]: lone && !lone.enabled }])}>`);
3872
3807
  _set_serialize_reason(12);
3873
3808
  const $childScope4 = _peek_scope_id();
3874
3809
  icon_agent_default({
@@ -3888,7 +3823,7 @@ var settings_page_default = _template("s", (input) => {
3888
3823
  _if(() => {
3889
3824
  if (active.has(a.id)) {
3890
3825
  const $scope10_id = _scope_id();
3891
- _html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope10_id, "c")}</span>`);
3826
+ _html(`<span${_attr_class("_b4")}><span${_attr_class("_C")}></span><!>${_escape(active.get(a.id) || "Starting…")}${_el_resume($scope10_id, "c")}</span>`);
3892
3827
  _subscribe($active__closures, writeScope($scope10_id, {}));
3893
3828
  return 0;
3894
3829
  } else if (!a.installed) {
@@ -3925,18 +3860,18 @@ var settings_page_default = _template("s", (input) => {
3925
3860
  _if(() => {
3926
3861
  if (rows.length || loneAccounts.length || extraAccounts.length) {
3927
3862
  const $scope2_id = _scope_id();
3928
- _html(`<ul${_attr_class("_b8")}>`);
3863
+ _html(`<ul${_attr_class("_cf")}>`);
3929
3864
  _for_of(rows, (inst) => {
3930
3865
  const $scope3_id = _scope_id();
3931
3866
  const accounts = inst.enabled ? accountsFor(inst.id) : [];
3932
- _html(`<li${_attr_class("_b4")}><div${_attr_class(["_b5", { ["_b6"]: !inst.enabled }])}>`);
3867
+ _html(`<li${_attr_class("_cb")}><div${_attr_class(["_cc", { ["_cd"]: !inst.enabled }])}>`);
3933
3868
  _set_serialize_reason(12);
3934
3869
  const $childScope5 = _peek_scope_id();
3935
3870
  icon_agent_default({
3936
3871
  agent: inst.id,
3937
3872
  size: 15
3938
3873
  });
3939
- _html(`<span${_attr_class(["_b7", "_u"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
3874
+ _html(`<span${_attr_class(["_ce", "_u"])}>${_escape(inst.command)}${_el_resume($scope3_id, "e")}</span>`);
3940
3875
  _if(() => {
3941
3876
  if (input.preferred === inst.id) {
3942
3877
  const $scope47_id = _scope_id();
@@ -4011,7 +3946,7 @@ var settings_page_default = _template("s", (input) => {
4011
3946
  }, "id", $scope0_id, "q", 1, 1, 1, 0, 1);
4012
3947
  _for_of(otherUsage, (u) => {
4013
3948
  const $scope51_id = _scope_id();
4014
- _html(`<li${_attr_class(["_bu", "_b0"])}>`);
3949
+ _html(`<li${_attr_class(["_bu", "_b8"])}>`);
4015
3950
  _set_serialize_reason(6);
4016
3951
  const $childScope9 = _peek_scope_id();
4017
3952
  usage_meters_default({ agent: u });
@@ -4049,12 +3984,12 @@ var settings_page_default = _template("s", (input) => {
4049
3984
  _if(() => {
4050
3985
  if (active.has(h.host) && authCodes.has(h.host)) {
4051
3986
  const $scope22_id = _scope_id();
4052
- _html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span> Enter code <strong${_attr_class("_cf")}>${_escape(authCodes.get(h.host))}${_el_resume($scope22_id, "d")}</strong> at <a${_attr("href", `https://${h.host}/login/device`)} target=_blank rel=noopener${_attr_class("_cg")}>${_escape(h.host)}${_el_resume($scope22_id, "f")}/login/device</a>${_el_resume($scope22_id, "e")}</span>`);
3987
+ _html(`<span${_attr_class("_b4")}><span${_attr_class("_C")}></span> Enter code <strong${_attr_class("_cn")}>${_escape(authCodes.get(h.host))}${_el_resume($scope22_id, "d")}</strong> at <a${_attr("href", `https://${h.host}/login/device`)} target=_blank rel=noopener${_attr_class("_co")}>${_escape(h.host)}${_el_resume($scope22_id, "f")}/login/device</a>${_el_resume($scope22_id, "e")}</span>`);
4053
3988
  _subscribe($authCodes__closures, writeScope($scope22_id, {}));
4054
3989
  return 0;
4055
3990
  } else if (active.has(h.host)) {
4056
3991
  const $scope12_id = _scope_id();
4057
- _html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope12_id, "c")}</span>`);
3992
+ _html(`<span${_attr_class("_b4")}><span${_attr_class("_C")}></span><!>${_escape(active.get(h.host) || "Starting…")}${_el_resume($scope12_id, "c")}</span>`);
4058
3993
  _subscribe($active__closures, writeScope($scope12_id, { Cck: 1 }));
4059
3994
  return 1;
4060
3995
  } else if (h.authed) {
@@ -4146,7 +4081,7 @@ var settings_page_default = _template("s", (input) => {
4146
4081
  _if(() => {
4147
4082
  if (setup) {
4148
4083
  const $scope33_id = _scope_id();
4149
- _html(`<form${_attr_class("_ce")}><label${_attr_class("_T")}>`);
4084
+ _html(`<form${_attr_class("_cm")}><label${_attr_class("_T")}>`);
4150
4085
  icon_plus_default({
4151
4086
  size: 14,
4152
4087
  class: "_U"
@@ -4213,11 +4148,11 @@ var settings_page_default = _template("s", (input) => {
4213
4148
  const $for_content4__t_path__closures = /* @__PURE__ */ new Set();
4214
4149
  const $for_content4__t_latest__closures = /* @__PURE__ */ new Set();
4215
4150
  const $for_content4__t_id__closures = /* @__PURE__ */ new Set();
4216
- _html(`<li${_attr_class([row, { ["_b_"]: !t.installed }])}><span${_attr_class(["_ca", "_u"])}>${_escape(t.label)}${_el_resume($scope16_id, "c")}</span>`);
4151
+ _html(`<li${_attr_class([row, { ["_ch"]: !t.installed }])}><span${_attr_class(["_ci", "_u"])}>${_escape(t.label)}${_el_resume($scope16_id, "c")}</span>`);
4217
4152
  _if(() => {
4218
4153
  if (active.has(t.id)) {
4219
4154
  const $scope17_id = _scope_id();
4220
- _html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope17_id, "c")}</span>`);
4155
+ _html(`<span${_attr_class("_b4")}><span${_attr_class("_C")}></span><!>${_escape(active.get(t.id) || "Starting…")}${_el_resume($scope17_id, "c")}</span>`);
4221
4156
  _subscribe($active__closures, writeScope($scope17_id, { Cck: 2 }));
4222
4157
  return 0;
4223
4158
  } else if (t.installed) {
@@ -4225,7 +4160,7 @@ var settings_page_default = _template("s", (input) => {
4225
4160
  _if(() => {
4226
4161
  if (t.version) {
4227
4162
  const $scope30_id = _scope_id();
4228
- _html(`<button${_attr_class(["_cb", "_u"])}${_attr("title", `${t.path || t.label}. Pin a version`)}>v<!>${_escape(t.version)}${_el_resume($scope30_id, "b")}</button>${_el_resume($scope30_id, "a")}`);
4163
+ _html(`<button${_attr_class(["_cj", "_u"])}${_attr("title", `${t.path || t.label}. Pin a version`)}>v<!>${_escape(t.version)}${_el_resume($scope30_id, "b")}</button>${_el_resume($scope30_id, "a")}`);
4229
4164
  _script($scope30_id, "s36");
4230
4165
  _subscribe($for_content4__t_path__closures, _subscribe($for_content4__t_version__closures, _subscribe($for_content4__t_label__closures, writeScope($scope30_id, { Cu: 1 }))));
4231
4166
  return 0;
@@ -4239,7 +4174,7 @@ var settings_page_default = _template("s", (input) => {
4239
4174
  _if(() => {
4240
4175
  if (outdated(t)) {
4241
4176
  const $scope37_id = _scope_id();
4242
- _html(`<button${_attr_class([btnSm, "_cc"])}${_attr("title", `Update to v${t.latest}`)}>↑ <!>${_escape(t.latest)}${_el_resume($scope37_id, "b")}</button>${_el_resume($scope37_id, "a")}`);
4177
+ _html(`<button${_attr_class([btnSm, "_ck"])}${_attr("title", `Update to v${t.latest}`)}>↑ <!>${_escape(t.latest)}${_el_resume($scope37_id, "b")}</button>${_el_resume($scope37_id, "a")}`);
4243
4178
  _script($scope37_id, "s37");
4244
4179
  _subscribe($for_content4__t_latest__closures, writeScope($scope37_id, {}));
4245
4180
  return 0;
@@ -4338,14 +4273,14 @@ var settings_page_default = _template("s", (input) => {
4338
4273
  _if(() => {
4339
4274
  if (hits && hits.length) {
4340
4275
  const $scope19_id = _scope_id();
4341
- _html(`<ul${_attr_class([toolGrid, "_cd"])}>`);
4276
+ _html(`<ul${_attr_class([toolGrid, "_cl"])}>`);
4342
4277
  _for_of(hits, (h) => {
4343
4278
  const $scope20_id = _scope_id();
4344
- _html(`<li${_attr_class(row)}><div${_attr_class("_bv")}><span${_attr_class(["_ca", "_u"])}>${_escape(h.name)}${_el_resume($scope20_id, "d")}</span>`);
4279
+ _html(`<li${_attr_class(row)}><div${_attr_class("_bv")}><span${_attr_class(["_ci", "_u"])}>${_escape(h.name)}${_el_resume($scope20_id, "d")}</span>`);
4345
4280
  _if(() => {
4346
4281
  if (active.has(h.name)) {
4347
4282
  const $scope21_id = _scope_id();
4348
- _html(`<span${_attr_class("_bW")}><span${_attr_class("_C")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope21_id, "c")}</span>`);
4283
+ _html(`<span${_attr_class("_b4")}><span${_attr_class("_C")}></span><!>${_escape(active.get(h.name) || "Starting…")}${_el_resume($scope21_id, "c")}</span>`);
4349
4284
  _subscribe($active__closures, writeScope($scope21_id, { Cck: 4 }));
4350
4285
  return 0;
4351
4286
  } else if (h.description) {
@@ -4501,8 +4436,8 @@ var curBase = "_bN _Q _P";
4501
4436
  var archived = "_bR _bp";
4502
4437
  var archivedHint = "_bS _P";
4503
4438
  var archivedCard = "_bT _bu";
4504
- var resultBranch = "_cV _W _g";
4505
- var branchInput = "_c0 _S _R";
4439
+ var resultBranch = "_cw _W _g";
4440
+ var branchInput = "_cB _S _R";
4506
4441
  //#endregion
4507
4442
  //#region src/tags/repo-picker.marko
4508
4443
  var api$5;
@@ -4552,7 +4487,7 @@ var repo_picker_default = _template("q", (input) => {
4552
4487
  input.onError?.(String(err.message || err));
4553
4488
  }
4554
4489
  }, "q5", $scope0_id);
4555
- _html(`<div${_attr_class("_cP")}><label${_attr_class("_T")}>`);
4490
+ _html(`<div${_attr_class("_cq")}><label${_attr_class("_T")}>`);
4556
4491
  icon_search_default({
4557
4492
  size: 14,
4558
4493
  class: "_U"
@@ -4572,19 +4507,19 @@ var repo_picker_default = _template("q", (input) => {
4572
4507
  _if(() => {
4573
4508
  if (results.length) {
4574
4509
  const $scope2_id = _scope_id();
4575
- _html(`<ul${_attr_class("_cQ")}>`);
4510
+ _html(`<ul${_attr_class("_cr")}>`);
4576
4511
  _for_of(results, (repo, i) => {
4577
4512
  const $scope3_id = _scope_id();
4578
- _html(`<li><div${_attr_class(["_cS", { ["_cR"]: i === highlight }])}><button${_attr_class("_cT")}>`);
4513
+ _html(`<li><div${_attr_class(["_ct", { ["_cs"]: i === highlight }])}><button${_attr_class("_cu")}>`);
4579
4514
  icon_plus_default({
4580
4515
  size: 12,
4581
- class: "_cY"
4516
+ class: "_cz"
4582
4517
  });
4583
- _html(`<span${_attr_class("_cZ")}>${_escape(repoLabel(repo.nameWithOwner))}${_el_resume($scope3_id, "e")}</span></button>${_el_resume($scope3_id, "b")}<button${_attr_class([resultBranch, { ["_cU"]: branchesFor === repo.nameWithOwner }])}${_attr("title", `Pick a base branch for ${repo.nameWithOwner}`)}${_attr("aria-label", `Pick a base branch for ${repo.nameWithOwner}`)}>⎇</button>${_el_resume($scope3_id, "f")}</div>${_el_resume($scope3_id, "a")}`);
4518
+ _html(`<span${_attr_class("_cA")}>${_escape(repoLabel(repo.nameWithOwner))}${_el_resume($scope3_id, "e")}</span></button>${_el_resume($scope3_id, "b")}<button${_attr_class([resultBranch, { ["_cv"]: branchesFor === repo.nameWithOwner }])}${_attr("title", `Pick a base branch for ${repo.nameWithOwner}`)}${_attr("aria-label", `Pick a base branch for ${repo.nameWithOwner}`)}>⎇</button>${_el_resume($scope3_id, "f")}</div>${_el_resume($scope3_id, "a")}`);
4584
4519
  _if(() => {
4585
4520
  if (branchesFor === repo.nameWithOwner) {
4586
4521
  const $scope4_id = _scope_id();
4587
- _html(`<div${_attr_class("_cW")}>`);
4522
+ _html(`<div${_attr_class("_cx")}>`);
4588
4523
  _if(() => {
4589
4524
  if (!branches) {
4590
4525
  const $scope9_id = _scope_id();
@@ -4605,10 +4540,10 @@ var repo_picker_default = _template("q", (input) => {
4605
4540
  }
4606
4541
  }, $scope5_id, "a", 1, 1, 1, 0, 1);
4607
4542
  const shown = (branchFilter ? branches.filter((b) => b.toLowerCase().includes(branchFilter.toLowerCase())) : branches).slice(0, 12);
4608
- _html(`<ul${_attr_class("_cX")}>`);
4543
+ _html(`<ul${_attr_class("_cy")}>`);
4609
4544
  _for_of(shown, (branch) => {
4610
4545
  const $scope7_id = _scope_id();
4611
- _html(`<li><button${_attr_class(["_cT", "_c1"])}><span${_attr_class(["_cZ", "_u"])}>${_escape(branch)}${_el_resume($scope7_id, "c")}</span></button>${_el_resume($scope7_id, "a")}</li>`);
4546
+ _html(`<li><button${_attr_class(["_cu", "_cC"])}><span${_attr_class(["_cA", "_u"])}>${_escape(branch)}${_el_resume($scope7_id, "c")}</span></button>${_el_resume($scope7_id, "a")}</li>`);
4612
4547
  _script($scope7_id, "q7");
4613
4548
  writeScope($scope7_id, { e: branch });
4614
4549
  }, (b) => b, $scope5_id, "c", 1, 1, 1, 0, 1);
@@ -5041,8 +4976,8 @@ function activeAgent(session) {
5041
4976
  const command = session.state?.command?.trim();
5042
4977
  return command && agentFromCommand(command) || session.agent;
5043
4978
  }
5044
- var iconBtn$1 = "_dg _g";
5045
- var navToggle = "_dl _g";
4979
+ var iconBtn$1 = "_cP _g";
4980
+ var navToggle = "_cU _g";
5046
4981
  _template("F", (input) => {
5047
4982
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
5048
4983
  const $scope0_id = _scope_id();
@@ -5085,12 +5020,12 @@ var ARM_MS = 3500;
5085
5020
  function disarmLater(fn) {
5086
5021
  return setTimeout(fn, ARM_MS);
5087
5022
  }
5088
- var railBtn = "_fx _g";
5089
- var rowIcon = "_fG _W _g";
5090
- var close = "_fH _W _g _Z";
5023
+ var railBtn = "_fZ _g";
5024
+ var rowIcon = "_f8 _W _g";
5025
+ var close = "_f9 _W _g _Z";
5091
5026
  //#endregion
5092
5027
  //#region src/styles/session-pop.css.ts
5093
- var sessionPop = "_ft _1";
5028
+ var sessionPop = "_fV _1";
5094
5029
  //#endregion
5095
5030
  //#region src/client/usage.ts
5096
5031
  /** The plan row an agent instance draws on: its own account (`claude2`)
@@ -5151,21 +5086,21 @@ var usage_pcts_default = _template("A", (input) => {
5151
5086
  if (windows.length) {
5152
5087
  const $scope1_id = _scope_id();
5153
5088
  _html(`<span${_attr_class([
5154
- "_eU",
5089
+ "_eG",
5155
5090
  input.class,
5156
- { ["_eV"]: agent.stale_seconds != null }
5091
+ { ["_eH"]: agent.stale_seconds != null }
5157
5092
  ])}${agent.stale_seconds != null ? _attr("title", `${agent.note || "provider unreachable"}; last cached numbers`) : " title=\"Plan usage\""}>`);
5158
5093
  _for_of(windows, (win$1, i) => {
5159
5094
  const $scope2_id = _scope_id();
5160
5095
  _if(() => {
5161
5096
  if (i) {
5162
5097
  const $scope3_id = _scope_id();
5163
- _html(`<span${_attr_class("_eZ")} aria-hidden=true>·</span>`);
5098
+ _html(`<span${_attr_class("_eL")} aria-hidden=true>·</span>`);
5164
5099
  $si__input_agent && writeScope($scope3_id, {});
5165
5100
  return 0;
5166
5101
  }
5167
5102
  }, $scope2_id, "a", $sg__input_agent, $sg__input_agent, $sg__input_agent, 0, 1);
5168
- _html(`<span${_attr_class("_eW")}><span${_attr_class("_eX")}>${_escape(win$1.window)}${_el_resume($scope2_id, "d", $sg__input_agent)}</span><span${_attr_class(["_eY", win$1.used_percent >= 90 ? "_cL" : win$1.used_percent >= 70 ? "_cK" : win$1.used_percent >= 40 ? "_cJ" : "_cI"])}>${_escape(pctText(win$1.used_percent))}${_el_resume($scope2_id, "f", $sg__input_agent)}</span>${_el_resume($scope2_id, "e", $sg__input_agent)}</span>`);
5103
+ _html(`<span${_attr_class("_eI")}><span${_attr_class("_eJ")}>${_escape(win$1.window)}${_el_resume($scope2_id, "d", $sg__input_agent)}</span><span${_attr_class(["_eK", win$1.used_percent >= 90 ? "_eC" : win$1.used_percent >= 70 ? "_eB" : win$1.used_percent >= 40 ? "_eA" : "_ez"])}>${_escape(pctText(win$1.used_percent))}${_el_resume($scope2_id, "f", $sg__input_agent)}</span>${_el_resume($scope2_id, "e", $sg__input_agent)}</span>`);
5169
5104
  $si__input_agent && writeScope($scope2_id, {});
5170
5105
  }, "window", $scope1_id, "a", $sg__input_agent, $sg__input_agent__OR__input_class, $sg__input_agent, "</span>");
5171
5106
  $si__input_agent__OR__input_class && writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
@@ -5196,12 +5131,12 @@ var icon_edit_default = _template("K", (input) => {
5196
5131
  });
5197
5132
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
5198
5133
  });
5199
- var prChip = "_gy _p _gx";
5200
- var portChip = "_gz _p _gx";
5134
+ var prChip = "_gv _p _gu";
5135
+ var portChip = "_gw _p _gu";
5201
5136
  var prState = {
5202
- open: "_gD",
5203
- merged: "_gE",
5204
- closed: "_gF"
5137
+ open: "_gA",
5138
+ merged: "_gB",
5139
+ closed: "_gC"
5205
5140
  };
5206
5141
  //#endregion
5207
5142
  //#region src/tags/side-nav-chips.marko
@@ -5249,7 +5184,7 @@ var side_nav_chips_default = _template("t", (input) => {
5249
5184
  const name = repo.full_name.split("/").at(-1);
5250
5185
  return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/").at(-1) === name) ? repoLabel(repo.full_name) : name;
5251
5186
  }, "t2", $scope1_id);
5252
- _html(`<div${_attr_class("_gw")}>`);
5187
+ _html(`<div${_attr_class("_gt")}>`);
5253
5188
  _for_of(repos, (repo) => {
5254
5189
  const $scope2_id = _scope_id();
5255
5190
  const $for_content__repo_worktree__closures = /* @__PURE__ */ new Set();
@@ -5265,11 +5200,11 @@ var side_nav_chips_default = _template("t", (input) => {
5265
5200
  [prState.merged]: pr.state === "MERGED",
5266
5201
  [prState.closed]: pr.state === "CLOSED"
5267
5202
  }
5268
- ])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_gA", { ["_gH"]: !open }])}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel$1(repo))}${_el_resume($scope3_id, "c", $sg__input_status_repos)}#${_sep($sg__input_status_repos)}${_escape(pr.number)}${_el_resume($scope3_id, "d", $sg__input_status_repos)}</a>${_el_resume($scope3_id, "b", $sg__input_status_repos)}`);
5203
+ ])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(["_gx", { ["_gE"]: !open }])}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel$1(repo))}${_el_resume($scope3_id, "c", $sg__input_status_repos)}#${_sep($sg__input_status_repos)}${_escape(pr.number)}${_el_resume($scope3_id, "d", $sg__input_status_repos)}</a>${_el_resume($scope3_id, "b", $sg__input_status_repos)}`);
5269
5204
  _if(() => {
5270
5205
  if (open) {
5271
5206
  const $scope4_id = _scope_id();
5272
- _html(`<a${_attr_class(["_gA", "_gB"])}${_attr("href", `/w/${input.workspaceId}/review?pr=${encodeURIComponent(`${repo.worktree}/${pr.number}`)}`)}${_attr("title", `Review #${pr.number} changes`)}>`);
5207
+ _html(`<a${_attr_class(["_gx", "_gy"])}${_attr("href", `/w/${input.workspaceId}/review?pr=${encodeURIComponent(`${repo.worktree}/${pr.number}`)}`)}${_attr("title", `Review #${pr.number} changes`)}>`);
5273
5208
  icon_diff_default({ size: 12 });
5274
5209
  _html(`</a>${_el_resume($scope4_id, "a", _serialize_guard($scope0_reason, 0))}`);
5275
5210
  _serialize_if($scope0_reason, 2) && _subscribe($si__input_status_repos && $for_content__repo_worktree__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope4_id, { _: _scope_with_id($scope3_id) })));
@@ -5277,9 +5212,9 @@ var side_nav_chips_default = _template("t", (input) => {
5277
5212
  } else {
5278
5213
  const $scope6_id = _scope_id();
5279
5214
  _html(`<button type=button${_attr_class([
5280
- "_gA",
5281
- "_gB",
5282
- "_gC"
5215
+ "_gx",
5216
+ "_gy",
5217
+ "_gz"
5283
5218
  ])}${_attr("title", `Dismiss #${pr.number}`)}>`);
5284
5219
  icon_xmark_default({ size: 12 });
5285
5220
  _html(`</button>${_el_resume($scope6_id, "a")}`);
@@ -5304,10 +5239,10 @@ var side_nav_chips_default = _template("t", (input) => {
5304
5239
  }, "full_name", $scope1_id, "b", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos__OR__input_status_ports);
5305
5240
  _for_of(ports, (p) => {
5306
5241
  const $scope5_id = _scope_id();
5307
- _html(`<span${_attr_class(["_p", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_gA", "_gG"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:${_sep($sg__input_status_ports)}${_escape(p.port)}${_el_resume($scope5_id, "c", $sg__input_status_ports)}</button>${_el_resume($scope5_id, "b")}<button type=button${_attr_class([
5308
- "_gA",
5309
- "_gB",
5310
- "_gC",
5242
+ _html(`<span${_attr_class(["_p", portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(["_gx", "_gD"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:${_sep($sg__input_status_ports)}${_escape(p.port)}${_el_resume($scope5_id, "c", $sg__input_status_ports)}</button>${_el_resume($scope5_id, "b")}<button type=button${_attr_class([
5243
+ "_gx",
5244
+ "_gy",
5245
+ "_gz",
5311
5246
  { ["_n"]: armedPid === p.pid }
5312
5247
  ])}${armedPid === p.pid ? " title=Kill?" : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
5313
5248
  icon_xmark_default({ size: 12 });
@@ -5399,10 +5334,10 @@ var side_nav_item_default = _template("u", (input) => {
5399
5334
  _if(() => {
5400
5335
  if (input.rail) {
5401
5336
  const $scope2_id = _scope_id();
5402
- _html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_fv"]: input.current }])}${_attr("title", ws$1.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 27))}<span${_attr_class([
5337
+ _html(`<a${_attr("href", `/w/${ws$1.id}`)}${_attr_class([railBtn, { ["_fX"]: input.current }])}${_attr("title", ws$1.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 27))}<span${_attr_class([
5403
5338
  "_w",
5404
5339
  phase[dot],
5405
- "_fy"
5340
+ "_f0"
5406
5341
  ])}></span>${_el_resume($scope2_id, "c", $sg__input_workspaceId__OR__input_status)}</a>${_el_resume($scope2_id, "a", _serialize_guard($scope0_reason, 3))}`);
5407
5342
  _serialize_if($scope0_reason, 18) && _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($si__input_index && $input_index__closures, _subscribe($si__input_current && $input_current__closures, writeScope($scope2_id, { _: _scope_with_id($scope1_id) })))));
5408
5343
  return 0;
@@ -5410,15 +5345,15 @@ var side_nav_item_default = _template("u", (input) => {
5410
5345
  const $scope3_id = _scope_id();
5411
5346
  const sessions$1 = input.sessions || [];
5412
5347
  const phaseLabel = dot === "working" ? "Working" : dot === "waiting" ? "Needs input" : dot === "idle" ? "Idle" : "Not running";
5413
- _html(`<section${_attr_class(["_fA", {
5414
- ["_fv"]: input.current,
5348
+ _html(`<section${_attr_class(["_f2", {
5349
+ ["_fX"]: input.current,
5415
5350
  ["_2"]: input.current,
5416
- ["_fB"]: input.railPop,
5417
- ["_fz"]: input.page
5418
- }])}><div${_attr_class("_fC")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class("_fD")}><span${_attr_class([
5351
+ ["_f3"]: input.railPop,
5352
+ ["_f1"]: input.page
5353
+ }])}><div${_attr_class("_f4")}><a${_attr("href", `/w/${ws$1.id}`)}${_attr_class("_f5")}><span${_attr_class([
5419
5354
  "_w",
5420
5355
  phase[dot],
5421
- "_fR"
5356
+ "_gi"
5422
5357
  ])}${_attr("title", phaseLabel)}></span>${_el_resume($scope3_id, "d", $sg__input_workspaceId__OR__input_status)}`);
5423
5358
  _if(() => {
5424
5359
  if (sessions$1.length === 1) {
@@ -5431,7 +5366,7 @@ var side_nav_item_default = _template("u", (input) => {
5431
5366
  icon_agent_default({
5432
5367
  agent: activeAgent(sessions$1[0]),
5433
5368
  size: 12,
5434
- class: "_fI"
5369
+ class: "_f_"
5435
5370
  });
5436
5371
  $si__input_sessions && writeScope($scope14_id, {
5437
5372
  _: _scope_with_id($scope3_id),
@@ -5441,16 +5376,16 @@ var side_nav_item_default = _template("u", (input) => {
5441
5376
  }
5442
5377
  }, $scope3_id, "e", $sg__input_sessions, $sg__input_sessions);
5443
5378
  const metaText = sessions$1.length === 0 ? phaseLabel : sessions$1.length === 1 ? sessions$1[0].title || "" : `${sessions$1.length} sessions`;
5444
- _html(`<span${_attr_class("_fJ")}><span${_attr_class("_fK")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
5379
+ _html(`<span${_attr_class("_ga")}><span${_attr_class("_gb")}>${_escape(ws$1.name)}${_el_resume($scope3_id, "h", $sg__input_workspaces__OR__input_workspaceId)}</span>`);
5445
5380
  _if(() => {
5446
5381
  if (input.page && metaText) {
5447
5382
  const $scope16_id = _scope_id();
5448
- _html(`<span${_attr_class("_fP")}>${_escape(metaText)}${_el_resume($scope16_id, "b", _serialize_guard($scope0_reason, 7))}</span>`);
5383
+ _html(`<span${_attr_class("_gg")}>${_escape(metaText)}${_el_resume($scope16_id, "b", _serialize_guard($scope0_reason, 7))}</span>`);
5449
5384
  $si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope16_id, { _: _serialize_if($scope0_reason, 7) && _scope_with_id($scope3_id) });
5450
5385
  return 0;
5451
5386
  } else if (sessions$1.length === 1 && sessions$1[0].title) {
5452
5387
  const $scope15_id = _scope_id();
5453
- _html(`<span${_attr_class("_fL")}>${_escape(sessions$1[0].title)}${_el_resume($scope15_id, "b", $sg__input_sessions)}</span>`);
5388
+ _html(`<span${_attr_class("_gc")}>${_escape(sessions$1[0].title)}${_el_resume($scope15_id, "b", $sg__input_sessions)}</span>`);
5454
5389
  $si__input_page__OR__input_sessions__OR__input_workspaceId__OR__input_status && writeScope($scope15_id, { _: $si__input_sessions && _scope_with_id($scope3_id) });
5455
5390
  return 1;
5456
5391
  }
@@ -5463,7 +5398,7 @@ var side_nav_item_default = _template("u", (input) => {
5463
5398
  "_F",
5464
5399
  "_O",
5465
5400
  "_H",
5466
- "_fQ"
5401
+ "_gh"
5467
5402
  ])}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 21))}</span>`);
5468
5403
  $si__input_current__OR__input_page__OR__input_rail__OR__input_workspaces__OR__input_workspaceId && _subscribe($si__input_current && $input_current__closures, writeScope($scope4_id, {
5469
5404
  _: _scope_with_id($scope3_id),
@@ -5476,7 +5411,7 @@ var side_nav_item_default = _template("u", (input) => {
5476
5411
  _if(() => {
5477
5412
  if (!input.page) {
5478
5413
  const $scope5_id = _scope_id();
5479
- _html(`<div${_attr_class("_fE")}>`);
5414
+ _html(`<div${_attr_class("_f6")}>`);
5480
5415
  _if(() => {
5481
5416
  if (input.onNewSession) {
5482
5417
  const $scope6_id = _scope_id();
@@ -5490,7 +5425,7 @@ var side_nav_item_default = _template("u", (input) => {
5490
5425
  _html(`</button>${_el_resume($scope6_id, "a")}<div${_attr("id", newPopId)} popover=auto${_attr_class(sessionPop)}>`);
5491
5426
  _for_of([], (agent) => {
5492
5427
  const $scope7_id = _scope_id();
5493
- _html(`<button${_attr_class("_fu")}>`);
5428
+ _html(`<button${_attr_class("_fW")}>`);
5494
5429
  _set_serialize_reason(12);
5495
5430
  const $childScope2 = _peek_scope_id();
5496
5431
  icon_agent_default({
@@ -5525,7 +5460,7 @@ var side_nav_item_default = _template("u", (input) => {
5525
5460
  return 0;
5526
5461
  }
5527
5462
  }, $scope5_id, "c", $sg__input_onReview, $sg__input_onReview, $sg__input_onNewSession__OR__input_onReview, 0, 1);
5528
- _html(`<a${_attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_fw"]: input.managing }])} title="Manage workspace"${input.managing ? " aria-current=page" : ""}>`);
5463
+ _html(`<a${_attr("href", `/w/${ws$1.id}/manage`)}${_attr_class([rowIcon, { ["_fY"]: input.managing }])} title="Manage workspace"${input.managing ? " aria-current=page" : ""}>`);
5529
5464
  icon_manage_default({ size: 12 });
5530
5465
  _html(`</a>${_el_resume($scope5_id, "d", _serialize_guard($scope0_reason, 8))}</div>`);
5531
5466
  _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_id__closures, _subscribe($si__input_managing && $input_managing__closures, _subscribe($si__input_onReview && $input_onReview__closures, _subscribe($si__input_onNewSession && $input_onNewSession__closures, writeScope($scope5_id, {
@@ -5535,7 +5470,7 @@ var side_nav_item_default = _template("u", (input) => {
5535
5470
  return 0;
5536
5471
  }
5537
5472
  }, $scope3_id, "k", $sg__input_page, $sg__input_page, 1, 0, 1);
5538
- _html(`</div><div${_attr_class("_fW")}>`);
5473
+ _html(`</div><div${_attr_class("_gn")}>`);
5539
5474
  _if(() => {
5540
5475
  if (sessions$1.length === 1 && openPlan) {
5541
5476
  const $scope11_id = _scope_id();
@@ -5543,7 +5478,7 @@ var side_nav_item_default = _template("u", (input) => {
5543
5478
  const $childScope3 = _peek_scope_id();
5544
5479
  usage_pcts_default({
5545
5480
  agent: openPlan,
5546
- class: "_fM"
5481
+ class: "_gd"
5547
5482
  });
5548
5483
  _subscribe($openPlan__closures, writeScope($scope11_id, {
5549
5484
  a: _existing_scope($childScope3),
@@ -5554,14 +5489,14 @@ var side_nav_item_default = _template("u", (input) => {
5554
5489
  }, $scope3_id, "m");
5555
5490
  _for_of(sessions$1.length > 1 ? sessions$1 : [], (s) => {
5556
5491
  const $scope8_id = _scope_id();
5557
- _html(`<div${_attr_class(["_fF", { ["_fv"]: s.id === input.currentTab }])}>`);
5492
+ _html(`<div${_attr_class(["_f7", { ["_fX"]: s.id === input.currentTab }])}>`);
5558
5493
  _if(() => {
5559
5494
  if (renamingId === s.id) {
5560
5495
  const $scope10_id = _scope_id();
5561
5496
  _html(`<span${_attr_class([
5562
5497
  "_w",
5563
5498
  phase[sessionPhase(s.state)],
5564
- "_fU"
5499
+ "_gl"
5565
5500
  ])}></span>${_el_resume($scope10_id, "a", $sg__input_sessions)}`);
5566
5501
  _set_serialize_reason({
5567
5502
  1: $sg__input_sessions,
@@ -5571,17 +5506,17 @@ var side_nav_item_default = _template("u", (input) => {
5571
5506
  icon_agent_default({
5572
5507
  agent: activeAgent(s),
5573
5508
  size: 13,
5574
- class: "_fY"
5509
+ class: "_gp"
5575
5510
  });
5576
5511
  _html(`<input${_attr_input_value($scope10_id, "c", renameValue, _resume((_new_renameValue) => {
5577
5512
  renameValue = _new_renameValue;
5578
- }, "u0", $scope10_id))}${_attr_class(["_R", "_fV"])} aria-label="Session name">${_el_resume($scope10_id, "c")}`);
5513
+ }, "u0", $scope10_id))}${_attr_class(["_R", "_gm"])} aria-label="Session name">${_el_resume($scope10_id, "c")}`);
5579
5514
  _script($scope10_id, "u5");
5580
5515
  _subscribe($renameValue__closures, writeScope($scope10_id, { b: $si__input_sessions && _existing_scope($childScope4) }));
5581
5516
  return 0;
5582
5517
  } else {
5583
5518
  const $scope9_id = _scope_id();
5584
- _html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("_fX")}><span${_attr_class(["_w", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope9_id, "b", $sg__input_sessions)}`);
5519
+ _html(`<a${_attr("href", `/w/${ws$1.id}?s=${s.id}`)}${_attr_class("_go")}><span${_attr_class(["_w", phase[sessionPhase(s.state)]])}></span>${_el_resume($scope9_id, "b", $sg__input_sessions)}`);
5585
5520
  _set_serialize_reason({
5586
5521
  1: $sg__input_sessions,
5587
5522
  2: $sg__input_sessions
@@ -5590,9 +5525,9 @@ var side_nav_item_default = _template("u", (input) => {
5590
5525
  icon_agent_default({
5591
5526
  agent: activeAgent(s),
5592
5527
  size: 13,
5593
- class: "_fY"
5528
+ class: "_gp"
5594
5529
  });
5595
- _html(`<span${_attr_class("_fN")}><span${_attr_class("_fS")}>${_escape(s.title || activeAgent(s))}${_el_resume($scope9_id, "f", $sg__input_sessions)}</span>`);
5530
+ _html(`<span${_attr_class("_ge")}><span${_attr_class("_gj")}>${_escape(s.title || activeAgent(s))}${_el_resume($scope9_id, "f", $sg__input_sessions)}</span>`);
5596
5531
  _if(() => {
5597
5532
  if (openPlan && s.id === openSess?.id) {
5598
5533
  const $scope12_id = _scope_id();
@@ -5600,7 +5535,7 @@ var side_nav_item_default = _template("u", (input) => {
5600
5535
  const $childScope6 = _peek_scope_id();
5601
5536
  usage_pcts_default({
5602
5537
  agent: openPlan,
5603
- class: "_fO"
5538
+ class: "_gf"
5604
5539
  });
5605
5540
  _subscribe($openPlan__closures, writeScope($scope12_id, {
5606
5541
  a: _existing_scope($childScope6),
@@ -5609,7 +5544,7 @@ var side_nav_item_default = _template("u", (input) => {
5609
5544
  return 0;
5610
5545
  }
5611
5546
  }, $scope9_id, "g");
5612
- _html(`</span></a>${_el_resume($scope9_id, "a", _serialize_guard($scope0_reason, 6))}<div${_attr_class("_fT")}><button${_attr_class(rowIcon)} title="Rename session">`);
5547
+ _html(`</span></a>${_el_resume($scope9_id, "a", _serialize_guard($scope0_reason, 6))}<div${_attr_class("_gk")}><button${_attr_class(rowIcon)} title="Rename session">`);
5613
5548
  icon_edit_default({ size: 12 });
5614
5549
  _html(`</button>${_el_resume($scope9_id, "i")}<button${_attr_class([close, { ["_n"]: armedKill === s.id }])} title=${armedKill === s.id ? "Close?" : "\"Close session\""}>`);
5615
5550
  icon_xmark_default({ size: 12 });
@@ -5804,25 +5739,25 @@ var side_nav_default = _template("v", (input) => {
5804
5739
  const isPage = view === "nav";
5805
5740
  const otherIds = itemIds.filter((id) => id !== ws.id);
5806
5741
  const listIds = isPage ? [ws.id, ...otherIds] : itemIds;
5807
- _html(`<aside${_attr_class(["_dk", {
5808
- ["_di"]: !navOpen,
5809
- ["_dj"]: isPage
5742
+ _html(`<aside${_attr_class(["_cT", {
5743
+ ["_cR"]: !navOpen,
5744
+ ["_cS"]: isPage
5810
5745
  }])}${_attr("hidden", view === "diff")}>`);
5811
5746
  _if(() => {
5812
5747
  if (isPage) {
5813
5748
  const $scope1_id = _scope_id();
5814
- _html(`<header${_attr_class("_dn")}><h1${_attr_class("_do")}>Workspaces</h1><div${_attr_class("_dp")}>`);
5749
+ _html(`<header${_attr_class("_cW")}><h1${_attr_class("_cX")}>Workspaces</h1><div${_attr_class("_cY")}>`);
5815
5750
  _if(() => {}, $scope1_id, "d", 1, 1, 1, 0, 1);
5816
5751
  _html(`<a href=/settings${_attr_class([
5817
5752
  iconBtn$1,
5818
- "_dq",
5819
- { ["_df"]: view === "settings" }
5753
+ "_cZ",
5754
+ { ["_cO"]: view === "settings" }
5820
5755
  ])} title=Settings${view === "settings" ? " aria-current=page" : ""}>`);
5821
5756
  icon_settings_default({ size: 16 });
5822
5757
  _if(() => {
5823
5758
  if (input.setupReady === false) {
5824
5759
  const $scope10_id = _scope_id();
5825
- _html(`<span${_attr_class(["_w", "_dh"])} title="Machine setup incomplete"></span>`);
5760
+ _html(`<span${_attr_class(["_w", "_cQ"])} title="Machine setup incomplete"></span>`);
5826
5761
  $si__input_setupReady && writeScope($scope10_id, {});
5827
5762
  return 0;
5828
5763
  }
@@ -5832,13 +5767,13 @@ var side_nav_default = _template("v", (input) => {
5832
5767
  return 0;
5833
5768
  }
5834
5769
  }, $scope0_id, "b", 1, 1, 1, 0, 1);
5835
- _html(`<div${_attr_class("_dt")}>`);
5770
+ _html(`<div${_attr_class("_c2")}>`);
5836
5771
  _for_of(listIds, (wsId) => {
5837
5772
  const $scope2_id = _scope_id();
5838
5773
  _if(() => {
5839
5774
  if (isPage && wsId === ws.id) {
5840
5775
  const $scope11_id = _scope_id();
5841
- _html(`<h2${_attr_class(["_bE", "_dr"])}>Current</h2>`);
5776
+ _html(`<h2${_attr_class(["_bE", "_c0"])}>Current</h2>`);
5842
5777
  writeScope($scope11_id, {});
5843
5778
  return 0;
5844
5779
  }
@@ -5846,7 +5781,7 @@ var side_nav_default = _template("v", (input) => {
5846
5781
  _if(() => {
5847
5782
  if (isPage && wsId !== ws.id && wsId === otherIds[0]) {
5848
5783
  const $scope12_id = _scope_id();
5849
- _html(`<h2${_attr_class(["_bE", "_dr"])}>Other workspaces</h2>`);
5784
+ _html(`<h2${_attr_class(["_bE", "_c0"])}>Other workspaces</h2>`);
5850
5785
  writeScope($scope12_id, {});
5851
5786
  return 0;
5852
5787
  }
@@ -5933,7 +5868,7 @@ var side_nav_default = _template("v", (input) => {
5933
5868
  railHover = null;
5934
5869
  }, 150);
5935
5870
  }, "v6", $scope3_id);
5936
- _html(`<div${_attr_class("_du")}>`);
5871
+ _html(`<div${_attr_class("_c3")}>`);
5937
5872
  _for_of(itemIds, (wsId, i) => {
5938
5873
  const $scope4_id = _scope_id();
5939
5874
  _html("<span>");
@@ -5987,7 +5922,7 @@ var side_nav_default = _template("v", (input) => {
5987
5922
  if (railHover) {
5988
5923
  const $scope5_id = _scope_id();
5989
5924
  const hoverId = railHover.id;
5990
- _html(`<div${_attr_class(["_1", "_dx"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
5925
+ _html(`<div${_attr_class(["_1", "_c6"])}${_attr_style(`top:${railHover.top}px;left:${railHover.left}px`)}>`);
5991
5926
  _set_serialize_reason({
5992
5927
  0: 1,
5993
5928
  1: 1,
@@ -6075,7 +6010,7 @@ var side_nav_default = _template("v", (input) => {
6075
6010
  return 0;
6076
6011
  }
6077
6012
  }, $scope0_id, "d");
6078
- _html(`<div${_attr_class("_dv")}>`);
6013
+ _html(`<div${_attr_class("_c4")}>`);
6079
6014
  _if(() => {
6080
6015
  if (isPage) {
6081
6016
  const $scope7_id = _scope_id();
@@ -6083,7 +6018,7 @@ var side_nav_default = _template("v", (input) => {
6083
6018
  "_l",
6084
6019
  "_m",
6085
6020
  btnLg,
6086
- "_ds"
6021
+ "_c1"
6087
6022
  ])} title="New workspace"${view === "new" ? " aria-current=page" : ""}>`);
6088
6023
  icon_folder_plus_default({ size: 16 });
6089
6024
  _html(` New workspace</a>${_el_resume($scope7_id, "a")}`);
@@ -6105,19 +6040,19 @@ var side_nav_default = _template("v", (input) => {
6105
6040
  return 1;
6106
6041
  }
6107
6042
  }, $scope6_id, "a", 1, 1, 1, "</button>", 1);
6108
- _html(`<div${_attr_class(["_v", "_dw"])}></div>`);
6043
+ _html(`<div${_attr_class(["_v", "_c5"])}></div>`);
6109
6044
  _if(() => {}, $scope6_id, "c", 1, 1, 1, 0, 1);
6110
- _html(`<a href=/settings${_attr_class([iconBtn$1, { ["_df"]: view === "settings" }])} title=Settings${view === "settings" ? " aria-current=page" : ""}>`);
6045
+ _html(`<a href=/settings${_attr_class([iconBtn$1, { ["_cO"]: view === "settings" }])} title=Settings${view === "settings" ? " aria-current=page" : ""}>`);
6111
6046
  icon_settings_default({ size: 15 });
6112
6047
  _if(() => {
6113
6048
  if (input.setupReady === false) {
6114
6049
  const $scope15_id = _scope_id();
6115
- _html(`<span${_attr_class(["_w", "_dh"])} title="Machine setup incomplete"></span>`);
6050
+ _html(`<span${_attr_class(["_w", "_cQ"])} title="Machine setup incomplete"></span>`);
6116
6051
  $si__input_setupReady && writeScope($scope15_id, {});
6117
6052
  return 0;
6118
6053
  }
6119
6054
  }, $scope6_id, "f", $sg__input_setupReady, $sg__input_setupReady, 1, 0, 1);
6120
- _html(`</a>${_el_resume($scope6_id, "d")}<a href=/new${_attr_class([iconBtn$1, { ["_df"]: view === "new" }])} title="New workspace"${view === "new" ? " aria-current=page" : ""}>`);
6055
+ _html(`</a>${_el_resume($scope6_id, "d")}<a href=/new${_attr_class([iconBtn$1, { ["_cO"]: view === "new" }])} title="New workspace"${view === "new" ? " aria-current=page" : ""}>`);
6121
6056
  icon_folder_plus_default({ size: 16 });
6122
6057
  _html(`</a>${_el_resume($scope6_id, "g")}`);
6123
6058
  _script($scope6_id, "v15");
@@ -6179,10 +6114,10 @@ var side_nav_default = _template("v", (input) => {
6179
6114
  });
6180
6115
  var iconBtn = "_X _g";
6181
6116
  var sectionCount = "_br _F _G";
6182
- var content = "_c5 _bh";
6183
- var pageMeta = "_c6 _bm";
6184
- var pathMeta = "_c9 _u";
6185
- var dangerHint = "_de _P";
6117
+ var content = "_cD _bh";
6118
+ var pageMeta = "_cE _bm";
6119
+ var pathMeta = "_cH _u";
6120
+ var dangerHint = "_cN _P";
6186
6121
  //#endregion
6187
6122
  //#region src/tags/manage-workspace.marko
6188
6123
  var api$2;
@@ -6293,7 +6228,7 @@ var manage_workspace_default = _template("l", (input) => {
6293
6228
  meta: attrTag({ content: _content_resume("l11", () => {
6294
6229
  _scope_reason();
6295
6230
  const $scope8_id = _scope_id();
6296
- _html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_c7")}>${_escape(ws.name)}${_el_resume($scope8_id, "c")}</span>`);
6231
+ _html(`<span${_attr_class(pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class("_cF")}>${_escape(ws.name)}${_el_resume($scope8_id, "c")}</span>`);
6297
6232
  _if(() => {
6298
6233
  if (ws.status !== "active") {
6299
6234
  const $scope11_id = _scope_id();
@@ -6302,7 +6237,7 @@ var manage_workspace_default = _template("l", (input) => {
6302
6237
  return 0;
6303
6238
  }
6304
6239
  }, $scope8_id, "d", 1, 1, 1, 0, 1);
6305
- _html(`<span${_attr_class("_c8")} aria-hidden=true>·</span><span${_attr_class(pathMeta)}>${_escape(ws.display_path || ws.path)}${_el_resume($scope8_id, "g")}</span></span>${_el_resume($scope8_id, "a")}`);
6240
+ _html(`<span${_attr_class("_cG")} aria-hidden=true>·</span><span${_attr_class(pathMeta)}>${_escape(ws.display_path || ws.path)}${_el_resume($scope8_id, "g")}</span></span>${_el_resume($scope8_id, "a")}`);
6306
6241
  _subscribe($ws_status__closures, _subscribe($ws_name__closures, _subscribe($ws_path__closures, _subscribe($ws_display_path__closures, writeScope($scope8_id, { _: _scope_with_id($scope0_id) })))));
6307
6242
  _resume_branch($scope8_id);
6308
6243
  }, $scope0_id) })
@@ -6345,7 +6280,7 @@ var manage_workspace_default = _template("l", (input) => {
6345
6280
  _html(`</button>${_el_resume($scope0_id, "m")}</div><ul${_attr_class("_bs")}>`);
6346
6281
  _for_of(ws.repos, (row) => {
6347
6282
  const $scope1_id = _scope_id();
6348
- _html(`<li${_attr_class("_bu")}><div${_attr_class("_bv")}><span${_attr_class(["_bw", "_u"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_bx")}><a${_attr_class(["_by", "_da"])}${_attr("href", repoWebUrl$1(row.full_name))} target=_blank rel=noopener${_attr("title", `Open ${row.full_name} on GitHub`)}>${_escape(repoLabel(row.full_name))}${_el_resume($scope1_id, "g")}</a>${_el_resume($scope1_id, "f")}`);
6283
+ _html(`<li${_attr_class("_bu")}><div${_attr_class("_bv")}><span${_attr_class(["_bw", "_u"])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class("_bx")}><a${_attr_class(["_by", "_cJ"])}${_attr("href", repoWebUrl$1(row.full_name))} target=_blank rel=noopener${_attr("title", `Open ${row.full_name} on GitHub`)}>${_escape(repoLabel(row.full_name))}${_el_resume($scope1_id, "g")}</a>${_el_resume($scope1_id, "f")}`);
6349
6284
  _if(() => {
6350
6285
  if (row.base_branch !== row.default_branch) {
6351
6286
  const $scope12_id = _scope_id();
@@ -6409,7 +6344,7 @@ var manage_workspace_default = _template("l", (input) => {
6409
6344
  return 0;
6410
6345
  }
6411
6346
  }, $scope0_id, "r", 1, 1, 1, 0, 1);
6412
- _html(`<div${_attr_class("_c_")}>`);
6347
+ _html(`<div${_attr_class("_cI")}>`);
6413
6348
  const $childScope3 = _peek_scope_id();
6414
6349
  let refreshCatalog = repo_picker_default({
6415
6350
  exclude: inWorkspace,
@@ -6439,7 +6374,7 @@ var manage_workspace_default = _template("l", (input) => {
6439
6374
  _html(`<span${_attr_class("_bx")}>`);
6440
6375
  _for_of(p.ports, (port) => {
6441
6376
  const $scope19_id = _scope_id();
6442
- _html(`<button${_attr_class(["_p", "_db"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope19_id, "b")}</button>${_el_resume($scope19_id, "a")}`);
6377
+ _html(`<button${_attr_class(["_p", "_cK"])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope19_id, "b")}</button>${_el_resume($scope19_id, "a")}`);
6443
6378
  _script($scope19_id, "l15");
6444
6379
  writeScope($scope19_id, { d: port });
6445
6380
  }, (x) => String(x), $scope18_id, "a", 1, 1, 1, "</span>", 1);
@@ -6461,7 +6396,7 @@ var manage_workspace_default = _template("l", (input) => {
6461
6396
  return 0;
6462
6397
  }
6463
6398
  }, $scope0_id, "v", 1, 1, 1, 0, 1);
6464
- _html(`<section${_attr_class(["_bp", "_dc"])}><div${_attr_class("_bq")}><h2${_attr_class("_bE")}>Workspace</h2></div><div${_attr_class("_dd")}>`);
6399
+ _html(`<section${_attr_class(["_bp", "_cL"])}><div${_attr_class("_bq")}><h2${_attr_class("_bE")}>Workspace</h2></div><div${_attr_class("_cM")}>`);
6465
6400
  _if(() => {
6466
6401
  if (ws.status === "active") {
6467
6402
  const $scope4_id = _scope_id();
@@ -6562,15 +6497,15 @@ var term_find_default = _template("w", (input) => {
6562
6497
  const canStep = hasQuery && open;
6563
6498
  const keybar = input.placement === "keybar";
6564
6499
  _html(`<div${_attr_class([
6565
- "_fm",
6566
- keybar ? "_fo" : "_fn",
6567
- !open && "_fq"
6568
- ])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_fh", keybar ? "_fp" : "_fj"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
6500
+ "_eS",
6501
+ keybar ? "_eU" : "_eT",
6502
+ !open && "_eW"
6503
+ ])} aria-hidden=${open ? "false" : "true"}><div${_attr_class(["_eN", keybar ? "_eV" : "_eP"])}><input${_attr_input_value($scope0_id, "c", query, _resume(function(v) {
6569
6504
  if (!open) return;
6570
6505
  query = v;
6571
6506
  live.query = v;
6572
6507
  run(0);
6573
- }, "w0", $scope0_id))}${_attr_class([findInput, keybar && "_fr"])} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in terminal" aria-label="Find in terminal">${_el_resume($scope0_id, "c")}<button type=button${_attr_class([findIconBtn, keybar && "_fs"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_fs"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class([findIconBtn, keybar && "_fs"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
6508
+ }, "w0", $scope0_id))}${_attr_class([findInput, keybar && "_eX"])} type=search enterkeyhint=search autocomplete=off tabindex=${open ? "0" : "-1"} placeholder="Find in terminal" aria-label="Find in terminal">${_el_resume($scope0_id, "c")}<button type=button${_attr_class([findIconBtn, keybar && "_eY"])} title="Previous match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↑</button>${_el_resume($scope0_id, "d")}<button type=button${_attr_class([findIconBtn, keybar && "_eY"])} title="Next match"${_attr("disabled", !canStep)} tabindex=${open ? "0" : "-1"}>↓</button>${_el_resume($scope0_id, "e")}<button type=button${_attr_class([findIconBtn, keybar && "_eY"])} title="Close find" tabindex=${open ? "0" : "-1"}>`);
6574
6509
  icon_xmark_default({ size: 14 });
6575
6510
  _html(`</button>${_el_resume($scope0_id, "f")}</div>${_el_resume($scope0_id, "b", _serialize_guard($scope0_reason, 2))}</div>${_el_resume($scope0_id, "a")}`);
6576
6511
  _script($scope0_id, "w4");
@@ -6844,7 +6779,7 @@ var term_default = _template("x", (input) => {
6844
6779
  trapOpen = true;
6845
6780
  }
6846
6781
  }, "x14", $scope0_id);
6847
- _html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_d1")}><div${_attr_class("_d2")}></div>${_el_resume($scope0_id, "b")}`);
6782
+ _html(`<div${_attr("hidden", !onTermPage)}${_attr_class("_dz")}><div${_attr_class("_dA")}></div>${_el_resume($scope0_id, "b")}`);
6848
6783
  _if(() => {
6849
6784
  if (findOpen) {
6850
6785
  const $scope12_id = _scope_id();
@@ -6871,7 +6806,7 @@ var term_default = _template("x", (input) => {
6871
6806
  _if(() => {
6872
6807
  if (uploading) {
6873
6808
  const $scope19_id = _scope_id();
6874
- _html(`<div${_attr_class("_d8")}>uploading…</div>`);
6809
+ _html(`<div${_attr_class("_dG")}>uploading…</div>`);
6875
6810
  writeScope($scope19_id, {});
6876
6811
  return 0;
6877
6812
  }
@@ -6879,7 +6814,7 @@ var term_default = _template("x", (input) => {
6879
6814
  _if(() => {
6880
6815
  if (copiedFlash) {
6881
6816
  const $scope20_id = _scope_id();
6882
- _html(`<div${_attr_class("_d7")}>Copied</div>`);
6817
+ _html(`<div${_attr_class("_dF")}>Copied</div>`);
6883
6818
  writeScope($scope20_id, {});
6884
6819
  return 0;
6885
6820
  }
@@ -6888,7 +6823,7 @@ var term_default = _template("x", (input) => {
6888
6823
  _if(() => {
6889
6824
  if (trapOpen) {
6890
6825
  const $scope11_id = _scope_id();
6891
- _html(`<div${_attr_class("_d9")}><div${_attr_class("_d_")}><p${_attr_class("_eE")}>Long-press the field below and choose Paste</p><input placeholder="Paste here…">${_el_resume($scope11_id, "d")}<button${_attr_class("_l")}>Cancel</button>${_el_resume($scope11_id, "e")}</div>${_el_resume($scope11_id, "b")}</div>${_el_resume($scope11_id, "a")}`);
6826
+ _html(`<div${_attr_class("_dH")}><div${_attr_class("_dI")}><p${_attr_class("_ec")}>Long-press the field below and choose Paste</p><input placeholder="Paste here…">${_el_resume($scope11_id, "d")}<button${_attr_class("_l")}>Cancel</button>${_el_resume($scope11_id, "e")}</div>${_el_resume($scope11_id, "b")}</div>${_el_resume($scope11_id, "a")}`);
6892
6827
  _script($scope11_id, "x25");
6893
6828
  _script($scope11_id, "x26");
6894
6829
  writeScope($scope11_id, {});
@@ -6991,7 +6926,7 @@ var work_view_default = _template("B", (input) => {
6991
6926
  let DiffView = null;
6992
6927
  const loadDiffView = _resume(() => {
6993
6928
  if (DiffView) return;
6994
- import("./_8t6K8Jk8.js").then((m) => {
6929
+ import("./_a4E7JVTq.js").then((m) => {
6995
6930
  DiffView = m.default;
6996
6931
  });
6997
6932
  }, "B6", $scope0_id);
@@ -7177,7 +7112,7 @@ var work_view_default = _template("B", (input) => {
7177
7112
  toggleDiff();
7178
7113
  }
7179
7114
  }, "B21", $scope0_id);
7180
- _html(`<div${_attr_class(["_ci", { ["_ch"]: view === "nav" }])}><div${_attr_class("_cj")}>`);
7115
+ _html(`<div${_attr_class(["_bW", { ["_bV"]: view === "nav" }])}><div${_attr_class("_bX")}>`);
7181
7116
  _set_serialize_reason({
7182
7117
  0: _serialize_guard($scope0_reason, 0),
7183
7118
  1: _serialize_guard($scope0_reason, 1),
@@ -7233,7 +7168,7 @@ var work_view_default = _template("B", (input) => {
7233
7168
  openDiff(pr);
7234
7169
  }, "B29", $scope0_id)
7235
7170
  });
7236
- _html(`</div><div${_attr_class("_ck")}>`);
7171
+ _html(`</div><div${_attr_class("_bY")}>`);
7237
7172
  _if(() => {
7238
7173
  if (error) {
7239
7174
  const $scope8_id = _scope_id();
@@ -7384,13 +7319,13 @@ var work_view_default = _template("B", (input) => {
7384
7319
  return 0;
7385
7320
  }
7386
7321
  }, $scope0_id, "i");
7387
- _html(`<div${_attr_class(["_cm", { ["_cl"]: view !== "term" }])}>`);
7322
+ _html(`<div${_attr_class(["_b0", { ["_bZ"]: view !== "term" }])}>`);
7388
7323
  _if(() => {
7389
7324
  if (shownSessions) {
7390
7325
  const $scope5_id = _scope_id();
7391
7326
  _for_of(shownSessions, (s) => {
7392
7327
  const $scope6_id = _scope_id();
7393
- _html(`<div${_attr_class(["_cn", { ["_co"]: s.id === curTab }])}>`);
7328
+ _html(`<div${_attr_class(["_b1", { ["_b2"]: s.id === curTab }])}>`);
7394
7329
  _set_serialize_reason({
7395
7330
  0: 1,
7396
7331
  1: 1,
@@ -8949,7 +8884,10 @@ var postHandler$13 = normalizeHandler(Run.POST({ search: (value) => parse(Query$
8949
8884
  if (q.session && q.state) {
8950
8885
  const payload = await ctx.request.json().catch(() => void 0);
8951
8886
  if (q.state === "idle") clearAgentPhase(q.session);
8952
- else setAgentPhase(q.session, q.state, reasonFromHookPayload(payload, q.reason), summaryFromHookPayload(payload));
8887
+ else {
8888
+ const read = readHookPayload(getSession(q.session)?.agent, payload, q.reason);
8889
+ if (!read.ignore) setAgentPhase(q.session, q.state, read.reason, read.summary);
8890
+ }
8953
8891
  return Response.json({ ok: true });
8954
8892
  }
8955
8893
  const body = parse(AgentState, await ctx.request.json());
@@ -9499,697 +9437,6 @@ function head24(context) {
9499
9437
  return stripResponseBody(get24(context));
9500
9438
  }
9501
9439
  //#endregion
9502
- //#region src/server/usage/shared.ts
9503
- var HOME = os.homedir();
9504
- var obj = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : {};
9505
- var arr = (value) => Array.isArray(value) ? value : [];
9506
- var str = (value) => typeof value === "string" ? value : "";
9507
- /** Numeric coercion that refuses NaN/Infinity — a provider sending "n/a"
9508
- * must read as "no number", not as a percentage that renders a bar. */
9509
- function num(value) {
9510
- if (value == null || value === "") return null;
9511
- const n = typeof value === "number" ? value : Number(value);
9512
- return Number.isFinite(n) ? n : null;
9513
- }
9514
- function readJson(file) {
9515
- try {
9516
- return obj(JSON.parse(fs.readFileSync(file, "utf8")));
9517
- } catch {
9518
- return null;
9519
- }
9520
- }
9521
- /** True if an epoch (seconds or ms) or ISO-8601 expiry is in the past. */
9522
- function expired(value) {
9523
- if (value == null) return false;
9524
- if (typeof value === "string") {
9525
- const t = Date.parse(value.replace(/\.\d+/, ""));
9526
- return Number.isFinite(t) && t < Date.now();
9527
- }
9528
- const n = num(value);
9529
- if (n == null) return false;
9530
- return (n > 1e11 ? n : n * 1e3) < Date.now();
9531
- }
9532
- function isoFromEpoch(value) {
9533
- const n = num(value);
9534
- if (n == null || n <= 0) return null;
9535
- const ms = n > 1e11 ? n : n * 1e3;
9536
- return new Date(ms).toISOString();
9537
- }
9538
- /** `p•••@g•••.com` — enough to tell two accounts apart, and the page is
9539
- * screenshotted into PRs and chat, so the address itself doesn't belong. */
9540
- function maskEmail(email) {
9541
- if (!email || !email.includes("@")) return email || "—";
9542
- const [local, domain] = email.split("@");
9543
- if (!local || !domain) return email;
9544
- const tld = domain.split(".").pop() || "";
9545
- return `${local[0]}•••@${domain[0]}•••.${tld}`;
9546
- }
9547
- /** A fetch that failed, carrying a reason fit to show on the row.
9548
- *
9549
- * A stale number with no explanation is what makes a usage table untrustworthy
9550
- * — "why is claude2 from yesterday?" deserves an answer next to the number. */
9551
- var FetchFailed = class extends Error {
9552
- reason;
9553
- constructor(reason) {
9554
- super(reason);
9555
- this.reason = reason;
9556
- }
9557
- };
9558
- function httpReason(status) {
9559
- if (status === 401 || status === 403) return "auth expired";
9560
- if (status === 429) return "rate limited or auth expired";
9561
- if (status >= 500) return `provider error (HTTP ${status})`;
9562
- return `HTTP ${status}`;
9563
- }
9564
- var TIMEOUT_MS = 15e3;
9565
- /** JSON over HTTPS, with every failure mode collapsed into a FetchFailed
9566
- * whose reason is worth showing to a human. */
9567
- async function fetchJson(url, init = {}) {
9568
- let res;
9569
- try {
9570
- res = await fetch(url, {
9571
- ...init,
9572
- signal: AbortSignal.timeout(TIMEOUT_MS)
9573
- });
9574
- } catch (err) {
9575
- const name = err?.name;
9576
- throw new FetchFailed(name === "TimeoutError" || name === "AbortError" ? "timed out" : "network unreachable");
9577
- }
9578
- if (!res.ok) throw new FetchFailed(httpReason(res.status));
9579
- try {
9580
- return await res.json();
9581
- } catch {
9582
- throw new FetchFailed("unreadable response");
9583
- }
9584
- }
9585
- var cacheDir = path.join(config.dataDir, "usage");
9586
- function readCache(key) {
9587
- const blob = readJson(path.join(cacheDir, `${key}.json`));
9588
- if (!blob) return null;
9589
- const payload = blob.payload;
9590
- const at = num(blob.fetched_at);
9591
- if (!payload || typeof payload !== "object" || at == null) return null;
9592
- return {
9593
- payload: obj(payload),
9594
- ageMs: Math.max(0, Date.now() - at)
9595
- };
9596
- }
9597
- function writeCache(key, payload) {
9598
- try {
9599
- fs.mkdirSync(cacheDir, { recursive: true });
9600
- fs.writeFileSync(path.join(cacheDir, `${key}.json`), JSON.stringify({
9601
- fetched_at: Date.now(),
9602
- payload
9603
- }));
9604
- } catch {}
9605
- }
9606
- /** Live fetch, falling back to the last good payload on disk.
9607
- *
9608
- * There is no "cache is fresh enough, skip the fetch" branch: the page's own
9609
- * 60s stale-while-revalidate (server/usage/index.ts) already decides how often
9610
- * this runs, and a second TTL underneath it only makes the numbers older than
9611
- * the page claims. */
9612
- async function loadPayload(key, live) {
9613
- let reason;
9614
- try {
9615
- const data = await live();
9616
- if (data) {
9617
- writeCache(key, data);
9618
- return {
9619
- payload: data,
9620
- source: "live"
9621
- };
9622
- }
9623
- } catch (err) {
9624
- reason = err instanceof FetchFailed ? err.reason : "fetch failed";
9625
- }
9626
- const disk = readCache(key);
9627
- if (disk) return {
9628
- payload: disk.payload,
9629
- source: `stale-cache ${Math.round(disk.ageMs / 1e3)}s`,
9630
- reason
9631
- };
9632
- return {
9633
- payload: null,
9634
- source: "missing",
9635
- reason
9636
- };
9637
- }
9638
- /** How to get a fresh token back, per provider. */
9639
- var REAUTH = {
9640
- codex: "codex login",
9641
- cursor: "cursor-agent login",
9642
- grok: "grok",
9643
- copilot: "gh auth login"
9644
- };
9645
- /** Never signed in (or the CLI's credentials went missing) — not an outage.
9646
- * Distinct from a failed request: nothing was ever sent, so blaming the
9647
- * network would send you debugging the wrong thing. */
9648
- function noAuthReason(key) {
9649
- const hint = REAUTH[key];
9650
- return hint ? `not signed in (run \`${hint}\`)` : "no credentials on disk";
9651
- }
9652
- function blankRow(agent, source = "missing") {
9653
- return {
9654
- agent,
9655
- plan: agent,
9656
- account: "—",
9657
- five_h: null,
9658
- five_h_resets: null,
9659
- seven_d: null,
9660
- seven_d_resets: null,
9661
- fable: null,
9662
- fable_resets: null,
9663
- source
9664
- };
9665
- }
9666
- /** Say *why* a row is showing last-known numbers, on the row itself.
9667
- *
9668
- * `tokenExpired` is the local credential check: true/false where an expiry is
9669
- * readable off disk, undefined where it isn't. It beats guessing from the
9670
- * status code — a dead token comes back 429 or 403 as readily as 401 — and
9671
- * knowing the token is *good* is what lets a 429 be reported as plain
9672
- * throttling instead of sending you to re-authenticate for nothing. */
9673
- function markStale(row, key, tokenExpired, reason) {
9674
- if (!/^(stale|claude\.json|missing)/.test(row.source)) return row;
9675
- let why = reason ?? (tokenExpired ? "auth expired" : void 0);
9676
- if (!why) why = "couldn't reach provider";
9677
- if (why.startsWith("rate limited") && tokenExpired === false) why = "rate limited — retry shortly";
9678
- else if (/^(auth expired|rate limited)/.test(why)) {
9679
- const hint = REAUTH[key];
9680
- why += hint ? ` (run \`${hint}\`)` : " (sign in again)";
9681
- }
9682
- return {
9683
- ...row,
9684
- stale_reason: why
9685
- };
9686
- }
9687
- //#endregion
9688
- //#region src/server/usage/claude.ts
9689
- /** Every Claude account this machine can read.
9690
- *
9691
- * Numbered dirs (~/.claude-1, -2, …) keep metadata at <dir>/.claude.json; the
9692
- * stock single-account install keeps it at ~/.claude.json with only
9693
- * credentials under ~/.claude/. The numbered ones are discovered rather than
9694
- * assumed — hardcoding a count is a guess about one machine's setup. */
9695
- function claudeAccounts() {
9696
- const candidates = [...numberedDirs().map((n) => ({
9697
- suffix: n,
9698
- dir: path.join(HOME, `.claude-${n}`),
9699
- meta: path.join(HOME, `.claude-${n}`, ".claude.json"),
9700
- label: `claude${n}`
9701
- })), {
9702
- suffix: "",
9703
- dir: path.join(HOME, ".claude"),
9704
- meta: path.join(HOME, ".claude.json"),
9705
- label: "claude"
9706
- }];
9707
- const out = [];
9708
- for (const candidate of candidates) {
9709
- const meta = readJson(candidate.meta);
9710
- if (!meta) continue;
9711
- const oauth = obj(meta.oauthAccount);
9712
- out.push({
9713
- ...candidate,
9714
- email: str(oauth.emailAddress).trim(),
9715
- plan: str(oauth.organizationRateLimitTier || oauth.organizationType)
9716
- });
9717
- }
9718
- return out;
9719
- }
9720
- /** `.claude-<n>` directories in $HOME, in numeric order. */
9721
- function numberedDirs() {
9722
- try {
9723
- return fs.readdirSync(HOME).map((entry) => /^\.claude-(\d+)$/.exec(entry)?.[1]).filter((n) => !!n).sort((a, b) => Number(a) - Number(b));
9724
- } catch {
9725
- return [];
9726
- }
9727
- }
9728
- var credentials = (account) => readJson(path.join(account.dir, ".credentials.json"));
9729
- /** Why an account has no live data — an expired token is the common case
9730
- * and only that account's own CLI can refresh it. */
9731
- function credentialNote(account) {
9732
- const cred = credentials(account);
9733
- if (!cred) return "no credentials — run: claude";
9734
- if (expired(obj(cred.claudeAiOauth).expiresAt)) return "token expired — use this Claude account to refresh";
9735
- return "usage unavailable";
9736
- }
9737
- function tokenExpired(account) {
9738
- const cred = credentials(account);
9739
- return cred ? expired(obj(cred.claudeAiOauth).expiresAt) : false;
9740
- }
9741
- async function fetchUsage$3(account) {
9742
- const token = str(obj(credentials(account)?.claudeAiOauth).accessToken);
9743
- if (!token) return null;
9744
- return obj(await fetchJson("https://api.anthropic.com/api/oauth/usage", { headers: {
9745
- Authorization: `Bearer ${token}`,
9746
- "anthropic-beta": "oauth-2025-04-20",
9747
- "User-Agent": "claude-cli",
9748
- Accept: "application/json"
9749
- } }));
9750
- }
9751
- /** The CLI's own last-seen utilization, written into .claude.json. Older and
9752
- * coarser than the API, but it survives an expired token. */
9753
- function claudeJsonFallback(account) {
9754
- const cached = readJson(account.meta)?.cachedUsageUtilization;
9755
- return cached && typeof cached === "object" ? obj(cached) : null;
9756
- }
9757
- /** The payload nests windows under `utilization` on some plans and inlines
9758
- * them on others. */
9759
- function utilRoot(data) {
9760
- const util = obj(data.utilization);
9761
- return "five_hour" in util || "limits" in util ? util : data;
9762
- }
9763
- function window$2(data, key) {
9764
- const win = obj(utilRoot(data)[key]);
9765
- const used = num(win.utilization);
9766
- return [used == null ? null : Math.trunc(used), str(win.resets_at) || null];
9767
- }
9768
- /** Fable gets its own weekly cap, listed as a model-scoped limit rather than
9769
- * a top-level window. */
9770
- function fableWindow(data) {
9771
- for (const entry of arr(utilRoot(data).limits)) {
9772
- const limit = obj(entry);
9773
- if (limit.kind !== "weekly_scoped") continue;
9774
- const model = obj(obj(limit.scope).model);
9775
- if (!str(model.display_name || model.id).toLowerCase().includes("fable")) continue;
9776
- const pct = num(limit.percent);
9777
- return [pct == null ? null : Math.trunc(pct), str(limit.resets_at) || null];
9778
- }
9779
- return [null, null];
9780
- }
9781
- function parseRow$4(account, data, source) {
9782
- const [five, fiveResets] = data ? window$2(data, "five_hour") : [null, null];
9783
- const [seven, sevenResets] = data ? window$2(data, "seven_day") : [null, null];
9784
- const [fable, fableResets] = data ? fableWindow(data) : [null, null];
9785
- const row = {
9786
- agent: account.label,
9787
- plan: account.plan || "claude",
9788
- account: maskEmail(account.email),
9789
- five_h: five,
9790
- five_h_resets: fiveResets,
9791
- seven_d: seven,
9792
- seven_d_resets: sevenResets,
9793
- fable,
9794
- fable_resets: fableResets,
9795
- source
9796
- };
9797
- if (five == null && seven == null && fable == null) row.note = credentialNote(account);
9798
- return row;
9799
- }
9800
- async function claudeRow(account) {
9801
- const loaded = await loadPayload(`claude${account.suffix}`, () => fetchUsage$3(account));
9802
- const fallback = loaded.payload ? null : claudeJsonFallback(account);
9803
- return markStale(parseRow$4(account, loaded.payload ?? fallback, fallback ? "claude.json" : loaded.source), account.label, tokenExpired(account), loaded.reason);
9804
- }
9805
- //#endregion
9806
- //#region src/server/usage/codex.ts
9807
- var AUTH$2 = path.join(HOME, ".codex", "auth.json");
9808
- /** Live rate-limit windows from the endpoint the Codex CLI itself uses. */
9809
- async function fetchUsage$2() {
9810
- const tokens = obj(readJson(AUTH$2)?.tokens);
9811
- const token = str(tokens.access_token);
9812
- if (!token) return null;
9813
- return obj(await fetchJson("https://chatgpt.com/backend-api/wham/usage", { headers: {
9814
- Authorization: `Bearer ${token}`,
9815
- "chatgpt-account-id": str(tokens.account_id),
9816
- "User-Agent": "codex-cli",
9817
- Accept: "application/json"
9818
- } }));
9819
- }
9820
- /** (used percent, reset) for whichever window is `seconds` long — the two
9821
- * windows arrive as primary/secondary rather than named 5h / 7d. */
9822
- function window$1(rateLimit, seconds) {
9823
- for (const key of ["primary_window", "secondary_window"]) {
9824
- const win = obj(rateLimit[key]);
9825
- if (num(win.limit_window_seconds) !== seconds) continue;
9826
- const used = num(win.used_percent);
9827
- return [used == null ? null : Math.trunc(used), isoFromEpoch(win.reset_at)];
9828
- }
9829
- return [null, null];
9830
- }
9831
- function parseRow$3(payload, source) {
9832
- const rateLimit = obj(payload.rate_limit);
9833
- const [five, fiveResets] = window$1(rateLimit, 18e3);
9834
- const [seven, sevenResets] = window$1(rateLimit, 604800);
9835
- return {
9836
- agent: "codex",
9837
- plan: str(payload.plan_type) || "codex",
9838
- account: maskEmail(str(payload.email)),
9839
- five_h: five,
9840
- five_h_resets: fiveResets,
9841
- seven_d: seven,
9842
- seven_d_resets: sevenResets,
9843
- fable: null,
9844
- fable_resets: null,
9845
- source
9846
- };
9847
- }
9848
- async function codexRow() {
9849
- const { payload, source, reason } = await loadPayload("codex", fetchUsage$2);
9850
- const missingAuth = fs.existsSync(AUTH$2) ? void 0 : noAuthReason("codex");
9851
- return markStale(payload ? parseRow$3(payload, source) : {
9852
- ...blankRow("codex", source),
9853
- note: missingAuth ?? "usage unavailable"
9854
- }, "codex", void 0, missingAuth ?? reason);
9855
- }
9856
- //#endregion
9857
- //#region src/server/usage/copilot.ts
9858
- var USER_API = "https://api.github.com/copilot_internal/user";
9859
- var HOSTS = path.join(process.env.XDG_CONFIG_HOME || path.join(HOME, ".config"), "gh", "hosts.yml");
9860
- var SESSION_DB = path.join(HOME, ".copilot", "session-store.db");
9861
- /** github.com's `oauth_token` straight out of gh's own hosts.yml.
9862
- *
9863
- * Deliberately not a YAML parse (no dependency): track the current top-level
9864
- * host key by indentation and take the first token beneath github.com. */
9865
- function hostsToken() {
9866
- let text;
9867
- try {
9868
- text = fs.readFileSync(HOSTS, "utf8");
9869
- } catch {
9870
- return null;
9871
- }
9872
- let host = "";
9873
- for (const line of text.split("\n")) {
9874
- if (line[0]?.trim() && line.trimEnd().endsWith(":")) {
9875
- host = line.trim().replace(/:$/, "");
9876
- continue;
9877
- }
9878
- if (host !== "github.com") continue;
9879
- const match = /^\s+oauth_token:\s*(\S+)/.exec(line);
9880
- if (match) return match[1] ?? null;
9881
- }
9882
- return null;
9883
- }
9884
- /** The Copilot CLI keeps its own auth in the OS keyring, so reuse the token
9885
- * gh manages. Copilot entitlement is account-scoped, so any valid token for
9886
- * the entitled user reads the quota. */
9887
- async function token() {
9888
- for (const key of ["GH_TOKEN", "GITHUB_TOKEN"]) {
9889
- const value = process.env[key]?.trim();
9890
- if (value) return value;
9891
- }
9892
- const fromHosts = hostsToken();
9893
- if (fromHosts) return fromHosts;
9894
- try {
9895
- return await run("gh", ["auth", "token"]) || null;
9896
- } catch {
9897
- return null;
9898
- }
9899
- }
9900
- async function fetchUsage$1(auth) {
9901
- if (!auth) return null;
9902
- const data = obj(await fetchJson(USER_API, { headers: {
9903
- Authorization: `token ${auth}`,
9904
- "User-Agent": "GitHubCopilotCLI",
9905
- Accept: "application/json"
9906
- } }));
9907
- return data.quota_snapshots == null ? null : data;
9908
- }
9909
- /** Billing period start = one month before the quota reset date. */
9910
- function periodStart(resetIso) {
9911
- const reset = new Date(resetIso);
9912
- if (Number.isNaN(reset.getTime())) return null;
9913
- const year = reset.getUTCMonth() === 0 ? reset.getUTCFullYear() - 1 : reset.getUTCFullYear();
9914
- const month = reset.getUTCMonth() === 0 ? 12 : reset.getUTCMonth();
9915
- const day = Math.min(reset.getUTCDate(), 28);
9916
- return `${String(year).padStart(4, "0")}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
9917
- }
9918
- /** Credits this machine's Copilot CLI has spent in the current period.
9919
- *
9920
- * GitHub's own quota snapshot is batched — it can still read `credits_used: 0`
9921
- * minutes after a session that plainly spent credits — so the CLI's local
9922
- * ledger is the only number that moves in real time. It sees this machine
9923
- * only, which is why the caller floors it with upstream rather than trusting
9924
- * it alone. */
9925
- function localCredits(start) {
9926
- if (!start || !fs.existsSync(SESSION_DB)) return null;
9927
- try {
9928
- const db = new DatabaseSync(SESSION_DB, { readOnly: true });
9929
- try {
9930
- const nano = num(db.prepare("select sum(total_nano_aiu) as nano from assistant_usage_events where created_at >= ?").get(start)?.nano);
9931
- return nano == null ? 0 : nano / 1e9;
9932
- } finally {
9933
- db.close();
9934
- }
9935
- } catch {
9936
- return null;
9937
- }
9938
- }
9939
- function parseRow$2(payload, source) {
9940
- const premium = obj(obj(payload.quota_snapshots).premium_interactions);
9941
- const reset = str(payload.quota_reset_date_utc || payload.quota_reset_date) || null;
9942
- let pct = null;
9943
- let note;
9944
- if (!Object.keys(premium).length || !premium.has_quota) note = "no premium quota";
9945
- else if (premium.unlimited) note = "unlimited premium requests";
9946
- else {
9947
- const remaining = num(premium.percent_remaining);
9948
- if (remaining != null) pct = 100 - remaining;
9949
- const entitlement = num(premium.entitlement) ?? 0;
9950
- const used = reset ? localCredits(periodStart(reset)) : null;
9951
- if (entitlement > 0 && used != null) {
9952
- const localPct = 100 * used / entitlement;
9953
- if (pct == null || localPct > pct) {
9954
- pct = localPct;
9955
- source = `${source}+local`;
9956
- }
9957
- }
9958
- }
9959
- if (pct != null) pct = Math.round(pct * 1e3) / 1e3;
9960
- const row = {
9961
- agent: "copilot",
9962
- plan: str(payload.copilot_plan) || "copilot",
9963
- account: str(payload.login) || "—",
9964
- five_h: null,
9965
- five_h_resets: null,
9966
- seven_d: pct,
9967
- seven_d_resets: pct == null ? null : reset,
9968
- seven_d_label: "month",
9969
- fable: null,
9970
- fable_resets: null,
9971
- source
9972
- };
9973
- if (note) row.note = note;
9974
- return row;
9975
- }
9976
- async function copilotRow() {
9977
- const auth = await token();
9978
- const { payload, source, reason } = await loadPayload("copilot", () => fetchUsage$1(auth));
9979
- const missingAuth = auth ? void 0 : noAuthReason("copilot");
9980
- return markStale(payload ? parseRow$2(payload, source) : {
9981
- ...blankRow("copilot", source),
9982
- note: missingAuth ?? "usage unavailable"
9983
- }, "copilot", void 0, missingAuth ?? reason);
9984
- }
9985
- //#endregion
9986
- //#region src/server/usage/cursor.ts
9987
- var AUTH$1 = path.join(HOME, ".config", "cursor", "auth.json");
9988
- var CLI_CONFIG = path.join(HOME, ".cursor", "cli-config.json");
9989
- var API = "https://api2.cursor.sh";
9990
- var WWW = "https://cursor.com";
9991
- function cursorAuth() {
9992
- const auth = readJson(AUTH$1);
9993
- if (!auth) return null;
9994
- const token = str(auth.accessToken || auth.access_token);
9995
- if (!token) return null;
9996
- let sub = "";
9997
- try {
9998
- sub = str(obj(JSON.parse(Buffer.from(str(token.split(".")[1]), "base64url").toString())).sub);
9999
- } catch {}
10000
- return {
10001
- token,
10002
- sub,
10003
- email: str(obj(readJson(CLI_CONFIG)?.authInfo).email).trim()
10004
- };
10005
- }
10006
- var dashboardPost = async (token, method) => obj(await fetchJson(`${API}/aiserver.v1.DashboardService/${method}`, {
10007
- method: "POST",
10008
- body: "{}",
10009
- headers: {
10010
- Authorization: `Bearer ${token}`,
10011
- "Content-Type": "application/json",
10012
- Accept: "application/json",
10013
- "Connect-Protocol-Version": "1",
10014
- "User-Agent": "cursor-agent"
10015
- }
10016
- }));
10017
- /** Enterprise/team monthly pool, which the dashboard service leaves empty —
10018
- * it is only readable with the web session cookie. */
10019
- async function usageSummary(auth) {
10020
- if (!auth.sub) return null;
10021
- const cookie = `WorkosCursorSessionToken=${encodeURIComponent(`${auth.sub}::${auth.token}`)}`;
10022
- return obj(await fetchJson(`${WWW}/api/usage-summary`, { headers: {
10023
- Cookie: cookie,
10024
- Accept: "application/json",
10025
- "User-Agent": "Mozilla/5.0"
10026
- } }));
10027
- }
10028
- /** Prefer the dashboard's planUsage (Pro/Ultra); fall back to the web
10029
- * summary for Enterprise/team accounts, where planUsage comes back empty.
10030
- * Each call is optional on its own, so one failing endpoint must not hide a
10031
- * number another would have produced — but if nothing lands, the first
10032
- * failure is rethrown so the row can say why. */
10033
- async function fetchUsage(auth) {
10034
- let failure;
10035
- const soft = async (load) => {
10036
- try {
10037
- return await load();
10038
- } catch (err) {
10039
- failure ??= err;
10040
- return null;
10041
- }
10042
- };
10043
- const [period, planInfo] = await Promise.all([soft(() => dashboardPost(auth.token, "GetCurrentPeriodUsage")), soft(() => dashboardPost(auth.token, "GetPlanInfo"))]);
10044
- const planUsage = obj(obj(period).planUsage);
10045
- const summary = num(planUsage.limit) ? null : await soft(() => usageSummary(auth));
10046
- if (!Object.keys(planUsage).length && !summary) {
10047
- if (failure) throw failure;
10048
- return null;
10049
- }
10050
- return {
10051
- period: obj(period),
10052
- plan_info: obj(obj(planInfo).planInfo),
10053
- summary
10054
- };
10055
- }
10056
- function parseRow$1(payload, auth, source) {
10057
- const period = obj(payload.period);
10058
- const planInfo = obj(payload.plan_info);
10059
- const summary = obj(payload.summary);
10060
- let pct = num(obj(period.planUsage).totalPercentUsed);
10061
- let resets = isoFromEpoch(period.billingCycleEnd);
10062
- if (pct == null) {
10063
- const overall = obj(obj(summary.individualUsage).overall);
10064
- const used = num(overall.used);
10065
- const limit = num(overall.limit);
10066
- if (used != null && limit) pct = Math.round(100 * used / limit);
10067
- resets = str(summary.billingCycleEnd) || resets;
10068
- }
10069
- return {
10070
- agent: "cursor",
10071
- plan: str(planInfo.planName || summary.membershipType) || "cursor",
10072
- account: auth?.email ? maskEmail(auth.email) : "—",
10073
- five_h: null,
10074
- five_h_resets: null,
10075
- seven_d: pct == null ? null : Math.trunc(pct),
10076
- seven_d_resets: resets,
10077
- seven_d_label: "month",
10078
- fable: null,
10079
- fable_resets: null,
10080
- source
10081
- };
10082
- }
10083
- async function cursorRow() {
10084
- const auth = cursorAuth();
10085
- const { payload, source, reason } = await loadPayload("cursor", () => auth ? fetchUsage(auth) : Promise.resolve(null));
10086
- const missingAuth = auth ? void 0 : noAuthReason("cursor");
10087
- return markStale(payload ? parseRow$1(payload, auth, source) : {
10088
- ...blankRow("cursor", source),
10089
- note: missingAuth ?? "usage unavailable"
10090
- }, "cursor", void 0, missingAuth ?? reason);
10091
- }
10092
- //#endregion
10093
- //#region src/server/usage/grok.ts
10094
- var AUTH = path.join(HOME, ".grok", "auth.json");
10095
- var LOG = path.join(HOME, ".grok", "logs", "unified.jsonl");
10096
- /** The newest usable entry in ~/.grok/auth.json, which is keyed by scope
10097
- * rather than being a single credential. */
10098
- function grokAuth() {
10099
- const auth = readJson(AUTH);
10100
- if (!auth) return null;
10101
- const entry = Object.values(auth).map(obj).filter((entry) => str(entry.key) || str(entry.access_token)).sort((a, b) => str(b.create_time || b.expires_at).localeCompare(str(a.create_time || a.expires_at)))[0];
10102
- if (!entry) return null;
10103
- return {
10104
- token: str(entry.key) || str(entry.access_token),
10105
- email: str(entry.email),
10106
- expiresAt: entry.expires_at
10107
- };
10108
- }
10109
- /** Weekly credit pool from the Grok Build CLI's own proxy. */
10110
- async function fetchBilling(token) {
10111
- const data = obj(await fetchJson("https://cli-chat-proxy.grok.com/v1/billing?format=credits", { headers: {
10112
- Authorization: `Bearer ${token}`,
10113
- Accept: "application/json",
10114
- "User-Agent": "grok-cli",
10115
- "x-grok-client-mode": "cli"
10116
- } }));
10117
- return data.config ? data : null;
10118
- }
10119
- /** Fallback: the last credits config the CLI logged, normalized to the live
10120
- * API's shape. Reads only the tail — this log grows without bound. */
10121
- function billingFromLogs() {
10122
- let chunk;
10123
- try {
10124
- const { size } = fs.statSync(LOG);
10125
- const start = Math.max(0, size - 512e3);
10126
- const fd = fs.openSync(LOG, "r");
10127
- try {
10128
- const buf = Buffer.alloc(size - start);
10129
- fs.readSync(fd, buf, 0, buf.length, start);
10130
- chunk = buf.toString("utf8");
10131
- } finally {
10132
- fs.closeSync(fd);
10133
- }
10134
- } catch {
10135
- return null;
10136
- }
10137
- let latest = null;
10138
- for (const line of chunk.split("\n")) {
10139
- if (!line.includes("billing: fetched credits config")) continue;
10140
- try {
10141
- const entry = obj(JSON.parse(line));
10142
- if (entry.msg === "billing: fetched credits config") latest = entry;
10143
- } catch {}
10144
- }
10145
- if (!latest) return null;
10146
- const ctx = obj(latest.ctx);
10147
- const cfg = obj(ctx.config);
10148
- if (!Object.keys(cfg).length) return null;
10149
- return {
10150
- config: cfg,
10151
- subscriptionTier: ctx.subscriptionTier
10152
- };
10153
- }
10154
- function parseRow(payload, auth, source) {
10155
- const cfg = payload.config ? obj(payload.config) : payload;
10156
- const pct = num(cfg.creditUsagePercent);
10157
- let productPct = null;
10158
- for (const entry of arr(cfg.productUsage)) {
10159
- const usage = obj(entry);
10160
- if (!str(usage.product).toLowerCase().includes("grok")) continue;
10161
- productPct = num(usage.usagePercent);
10162
- break;
10163
- }
10164
- const used = pct ?? productPct;
10165
- const period = obj(cfg.currentPeriod);
10166
- return {
10167
- agent: "grok",
10168
- plan: str(payload.subscriptionTier || cfg.subscriptionTier) || "Grok Build",
10169
- account: auth?.email ? maskEmail(auth.email) : "—",
10170
- five_h: null,
10171
- five_h_resets: null,
10172
- seven_d: used == null ? null : Math.trunc(used),
10173
- seven_d_resets: str(period.end || cfg.billingPeriodEnd) || null,
10174
- seven_d_label: /MONTH/i.test(str(period.type)) ? "month" : "7d",
10175
- fable: null,
10176
- fable_resets: null,
10177
- source
10178
- };
10179
- }
10180
- async function grokRow() {
10181
- const auth = grokAuth();
10182
- const loaded = await loadPayload("grok", () => auth?.token ? fetchBilling(auth.token) : Promise.resolve(null));
10183
- const fromLog = loaded.payload ? null : billingFromLogs();
10184
- const payload = loaded.payload ?? fromLog;
10185
- const source = fromLog ? "unified.jsonl" : loaded.source;
10186
- const missingAuth = auth?.token ? void 0 : noAuthReason("grok");
10187
- return markStale(payload ? parseRow(payload, auth, source) : {
10188
- ...blankRow("grok", source),
10189
- note: missingAuth ?? "usage unavailable"
10190
- }, "grok", expired(auth?.expiresAt), missingAuth ?? loaded.reason);
10191
- }
10192
- //#endregion
10193
9440
  //#region src/server/usage/index.ts
10194
9441
  var TTL_MS = 6e4;
10195
9442
  /** Plan/quota usage across every agent account this machine is signed into.
@@ -10198,17 +9445,10 @@ var TTL_MS = 6e4;
10198
9445
  * own CLI uses; they touch disjoint credentials and cache files, so they run
10199
9446
  * concurrently and the wait is the slowest single provider, not their sum. */
10200
9447
  async function collect() {
10201
- const providers = [
10202
- ...claudeAccounts().map((account) => [account.label, () => claudeRow(account)]),
10203
- ["codex", codexRow],
10204
- ["cursor", cursorRow],
10205
- ["grok", grokRow],
10206
- ["copilot", copilotRow]
10207
- ];
10208
- return Promise.all(providers.map(([key, load]) => load().catch(() => ({
10209
- ...blankRow(key, "error"),
9448
+ return (await Promise.all(AGENTS.map((agent) => (agent.usage?.() ?? Promise.resolve([])).catch(() => [{
9449
+ ...blankRow(agent.meta.id, "error"),
10210
9450
  note: "fetch failed"
10211
- }))));
9451
+ }])))).flat();
10212
9452
  }
10213
9453
  /** Age of a row served from a failed refresh, in seconds — undefined when the
10214
9454
  * numbers are current. Percentages from a stale row describe a window that has
@@ -15807,4 +15047,4 @@ server.listen(port, () => {
15807
15047
  //#endregion
15808
15048
  export {};
15809
15049
 
15810
- ;var __MARKO_MANIFEST__={"T$MNY0k":{"block":[2,"stylesheet#/assets/app-page-Bv2S_Tip.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-Bv2S_Tip.css\"",">"],"defer":[2,"/assets/w._-ECSvnCXB.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-ECSvnCXB.js\"","></script>",2,"modulepreload#/assets/_CiElF6r4.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_CiElF6r4.js\"",">"]},"AA0T2xt":{"block":[2,"stylesheet#/assets/app-page-Bv2S_Tip.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-Bv2S_Tip.css\"",">"],"defer":[2,"/assets/settings-ECSvnCXB.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-ECSvnCXB.js\"","></script>",2,"modulepreload#/assets/_CiElF6r4.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_CiElF6r4.js\"",">"]},"ZLT8joi":{"block":[2,"stylesheet#/assets/app-page-Bv2S_Tip.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-Bv2S_Tip.css\"",">"],"defer":[2,"/assets/new-ECSvnCXB.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-ECSvnCXB.js\"","></script>",2,"modulepreload#/assets/_CiElF6r4.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_CiElF6r4.js\"",">"]},"LH2lXAg":{"block":[2,"stylesheet#/assets/app-page-Bv2S_Tip.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-Bv2S_Tip.css\"",">"],"defer":[2,"/assets/w-ECSvnCXB.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-ECSvnCXB.js\"","></script>",2,"modulepreload#/assets/_CiElF6r4.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_CiElF6r4.js\"",">"]},"ibphXY4":{"block":[2,"stylesheet#/assets/app-page-Bv2S_Tip.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-Bv2S_Tip.css\"",">"],"defer":[2,"/assets/w._-CEJj3Icr.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-CEJj3Icr.js\"","></script>",2,"modulepreload#/assets/_CiElF6r4.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_CiElF6r4.js\"",">"]}};
15050
+ ;var __MARKO_MANIFEST__={"ibphXY4":{"block":[2,"stylesheet#/assets/app-page-B0jusuKZ.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-B0jusuKZ.css\"",">"],"defer":[2,"/assets/w._-DEf08lXy.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-DEf08lXy.js\"","></script>",2,"modulepreload#/assets/_BhRT35mT.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BhRT35mT.js\"",">"]},"LH2lXAg":{"block":[2,"stylesheet#/assets/app-page-B0jusuKZ.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-B0jusuKZ.css\"",">"],"defer":[2,"/assets/w-DEf08lXy.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w-DEf08lXy.js\"","></script>",2,"modulepreload#/assets/_BhRT35mT.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BhRT35mT.js\"",">"]},"AA0T2xt":{"block":[2,"stylesheet#/assets/app-page-B0jusuKZ.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-B0jusuKZ.css\"",">"],"defer":[2,"/assets/settings-DEf08lXy.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/settings-DEf08lXy.js\"","></script>",2,"modulepreload#/assets/_BhRT35mT.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BhRT35mT.js\"",">"]},"ZLT8joi":{"block":[2,"stylesheet#/assets/app-page-B0jusuKZ.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-B0jusuKZ.css\"",">"],"defer":[2,"/assets/new-DEf08lXy.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/new-DEf08lXy.js\"","></script>",2,"modulepreload#/assets/_BhRT35mT.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BhRT35mT.js\"",">"]},"T$MNY0k":{"block":[2,"stylesheet#/assets/app-page-B0jusuKZ.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/app-page-B0jusuKZ.css\"",">"],"defer":[2,"/assets/w._-C3AKQvSa.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/w._-C3AKQvSa.js\"","></script>",2,"modulepreload#/assets/_BhRT35mT.js",6,"<link",0," rel=\"modulepreload\" crossorigin href=\"",1,"assets/_BhRT35mT.js\"",">"]}};