@cortexkit/opencode-antigravity-auth 3.0.12 → 3.0.14

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 (328) hide show
  1. package/dist/cli.js +9839 -6706
  2. package/dist/cli.js.map +4 -4
  3. package/dist/cli.meta.json +722 -175
  4. package/dist/index.js +4902 -1443
  5. package/dist/index.js.map +4 -4
  6. package/dist/index.meta.json +756 -190
  7. package/dist/server.js +8671 -4993
  8. package/dist/server.js.map +4 -4
  9. package/dist/server.meta.json +1 -1
  10. package/dist/src/__fixtures__/runtime-layout-process.d.ts +2 -0
  11. package/dist/src/__fixtures__/runtime-layout-process.d.ts.map +1 -0
  12. package/dist/src/__fixtures__/runtime-layout-process.js +88 -0
  13. package/dist/src/__fixtures__/runtime-layout-process.js.map +1 -0
  14. package/dist/src/cli.d.ts +26 -0
  15. package/dist/src/cli.d.ts.map +1 -1
  16. package/dist/src/cli.js +44 -1
  17. package/dist/src/cli.js.map +1 -1
  18. package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +77 -2
  19. package/dist/src/common-auth-embedded/claustrum/consumer.js +320 -35
  20. package/dist/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
  21. package/dist/src/common-auth-embedded/claustrum/custody.js +95 -11
  22. package/dist/src/common-auth-embedded/claustrum/enrollment.d.ts +9 -0
  23. package/dist/src/common-auth-embedded/claustrum/enrollment.js +52 -20
  24. package/dist/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
  25. package/dist/src/common-auth-embedded/claustrum/hub.js +1032 -0
  26. package/dist/src/common-auth-embedded/claustrum/index.d.ts +13 -3
  27. package/dist/src/common-auth-embedded/claustrum/index.js +37 -4
  28. package/dist/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
  29. package/dist/src/common-auth-embedded/claustrum/quota-writer.js +34 -12
  30. package/dist/src/common-auth-embedded/claustrum/roster.d.ts +49 -1
  31. package/dist/src/common-auth-embedded/claustrum/roster.js +187 -12
  32. package/dist/src/common-auth-embedded/claustrum/shutdown.js +42 -0
  33. package/dist/src/common-auth-embedded/fs/file-read-cache.js +57 -0
  34. package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
  35. package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +36 -14
  36. package/dist/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
  37. package/dist/src/common-auth-embedded/opencode2/index.d.ts +2 -2
  38. package/dist/src/common-auth-embedded/opencode2/index.js +1 -1
  39. package/dist/src/common-auth-embedded/opencode2/install.d.ts +7 -5
  40. package/dist/src/common-auth-embedded/opencode2/install.js +139 -13
  41. package/dist/src/common-auth-embedded/opencode2/types.d.ts +42 -10
  42. package/dist/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
  43. package/dist/src/common-auth-embedded/quota/commit-interval.js +18 -0
  44. package/dist/src/common-auth-embedded/rpc/rpc-server.js +29 -19
  45. package/dist/src/common-auth-embedded/setup/command.js +40 -47
  46. package/dist/src/common-auth-embedded/setup/flags.d.ts +50 -0
  47. package/dist/src/common-auth-embedded/setup/flags.js +123 -0
  48. package/dist/src/common-auth-embedded/setup/index.d.ts +1 -0
  49. package/dist/src/common-auth-embedded/setup/index.js +1 -0
  50. package/dist/src/common-auth-embedded/setup/register.d.ts +2 -0
  51. package/dist/src/common-auth-embedded/setup/register.js +90 -11
  52. package/dist/src/common-auth-embedded/setup/types.d.ts +7 -1
  53. package/dist/src/common-auth-embedded/source-output.json +173 -109
  54. package/dist/src/common-auth-embedded/store/mutate.d.ts +2 -0
  55. package/dist/src/common-auth-embedded/store/mutate.js +4 -0
  56. package/dist/src/common-auth-embedded/store/pool.d.ts +6 -1
  57. package/dist/src/common-auth-embedded/store/pool.js +1 -1
  58. package/dist/src/common-auth-embedded/store/quota-writer.js +27 -13
  59. package/dist/src/common-auth-embedded/store/settings.d.ts +1 -1
  60. package/dist/src/common-auth-embedded/store/settings.js +16 -6
  61. package/dist/src/ga/rpc/protocol.d.ts +2 -0
  62. package/dist/src/ga/rpc/protocol.d.ts.map +1 -1
  63. package/dist/src/ga/rpc/protocol.js +2 -2
  64. package/dist/src/ga/rpc/protocol.js.map +1 -1
  65. package/dist/src/ga/server/auth.d.ts.map +1 -1
  66. package/dist/src/ga/server/auth.js +7 -2
  67. package/dist/src/ga/server/auth.js.map +1 -1
  68. package/dist/src/ga/server/index.d.ts.map +1 -1
  69. package/dist/src/ga/server/index.js +25 -0
  70. package/dist/src/ga/server/index.js.map +1 -1
  71. package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
  72. package/dist/src/ga/tui/host-ga.js +2 -1
  73. package/dist/src/ga/tui/host-ga.js.map +1 -1
  74. package/dist/src/plugin/__fixtures__/controlled-timeouts.d.ts +7 -0
  75. package/dist/src/plugin/__fixtures__/controlled-timeouts.d.ts.map +1 -0
  76. package/dist/src/plugin/__fixtures__/controlled-timeouts.js +41 -0
  77. package/dist/src/plugin/__fixtures__/controlled-timeouts.js.map +1 -0
  78. package/dist/src/plugin/__fixtures__/release-model-ids.d.ts +2 -0
  79. package/dist/src/plugin/__fixtures__/release-model-ids.d.ts.map +1 -0
  80. package/dist/src/plugin/__fixtures__/release-model-ids.js +11 -0
  81. package/dist/src/plugin/__fixtures__/release-model-ids.js.map +1 -0
  82. package/dist/src/plugin/__fixtures__/verified-store.d.ts +3 -0
  83. package/dist/src/plugin/__fixtures__/verified-store.d.ts.map +1 -0
  84. package/dist/src/plugin/__fixtures__/verified-store.js +50 -0
  85. package/dist/src/plugin/__fixtures__/verified-store.js.map +1 -0
  86. package/dist/src/plugin/auth-loader.d.ts +7 -1
  87. package/dist/src/plugin/auth-loader.d.ts.map +1 -1
  88. package/dist/src/plugin/auth-loader.js +4 -4
  89. package/dist/src/plugin/auth-loader.js.map +1 -1
  90. package/dist/src/plugin/background-vault-quota-refresh.d.ts +10 -0
  91. package/dist/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
  92. package/dist/src/plugin/background-vault-quota-refresh.js +33 -5
  93. package/dist/src/plugin/background-vault-quota-refresh.js.map +1 -1
  94. package/dist/src/plugin/cache/signature-cache.d.ts +7 -1
  95. package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
  96. package/dist/src/plugin/cache/signature-cache.js +10 -13
  97. package/dist/src/plugin/cache/signature-cache.js.map +1 -1
  98. package/dist/src/plugin/command-data.d.ts +2 -2
  99. package/dist/src/plugin/command-data.d.ts.map +1 -1
  100. package/dist/src/plugin/command-data.js +2 -0
  101. package/dist/src/plugin/command-data.js.map +1 -1
  102. package/dist/src/plugin/config/loader.d.ts +2 -1
  103. package/dist/src/plugin/config/loader.d.ts.map +1 -1
  104. package/dist/src/plugin/config/loader.js +4 -2
  105. package/dist/src/plugin/config/loader.js.map +1 -1
  106. package/dist/src/plugin/config/operator-settings-schema.d.ts +1 -1
  107. package/dist/src/plugin/config/schema.d.ts +1 -1
  108. package/dist/src/plugin/config/schema.js +1 -1
  109. package/dist/src/plugin/debug.d.ts.map +1 -1
  110. package/dist/src/plugin/debug.js +18 -19
  111. package/dist/src/plugin/debug.js.map +1 -1
  112. package/dist/src/plugin/errors.js +1 -1
  113. package/dist/src/plugin/errors.js.map +1 -1
  114. package/dist/src/plugin/ga-location-services.d.ts +28 -2
  115. package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
  116. package/dist/src/plugin/ga-location-services.js +118 -31
  117. package/dist/src/plugin/ga-location-services.js.map +1 -1
  118. package/dist/src/plugin/ga-shared-vault-custody.d.ts +78 -0
  119. package/dist/src/plugin/ga-shared-vault-custody.d.ts.map +1 -0
  120. package/dist/src/plugin/ga-shared-vault-custody.js +177 -0
  121. package/dist/src/plugin/ga-shared-vault-custody.js.map +1 -0
  122. package/dist/src/plugin/index.d.ts.map +1 -1
  123. package/dist/src/plugin/index.js +38 -6
  124. package/dist/src/plugin/index.js.map +1 -1
  125. package/dist/src/plugin/killswitch.d.ts.map +1 -1
  126. package/dist/src/plugin/killswitch.js +13 -7
  127. package/dist/src/plugin/killswitch.js.map +1 -1
  128. package/dist/src/plugin/oauth-methods.d.ts.map +1 -1
  129. package/dist/src/plugin/oauth-methods.js +3 -0
  130. package/dist/src/plugin/oauth-methods.js.map +1 -1
  131. package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
  132. package/dist/src/plugin/shared/request-services.js +2 -3
  133. package/dist/src/plugin/shared/request-services.js.map +1 -1
  134. package/dist/src/plugin/shared/source-sidebar.d.ts +6 -0
  135. package/dist/src/plugin/shared/source-sidebar.d.ts.map +1 -1
  136. package/dist/src/plugin/shared/source-sidebar.js +1 -1
  137. package/dist/src/plugin/shared/source-sidebar.js.map +1 -1
  138. package/dist/src/plugin/shared/vault-request-credentials.d.ts +8 -1
  139. package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
  140. package/dist/src/plugin/shared/vault-request-credentials.js +38 -5
  141. package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
  142. package/dist/src/plugin/storage.d.ts +5 -2
  143. package/dist/src/plugin/storage.d.ts.map +1 -1
  144. package/dist/src/plugin/storage.js +5 -4
  145. package/dist/src/plugin/storage.js.map +1 -1
  146. package/dist/src/plugin/ui/auth-menu.d.ts.map +1 -1
  147. package/dist/src/plugin/ui/auth-menu.js +3 -0
  148. package/dist/src/plugin/ui/auth-menu.js.map +1 -1
  149. package/dist/src/plugin/ui/quota-status.d.ts.map +1 -1
  150. package/dist/src/plugin/ui/quota-status.js +4 -2
  151. package/dist/src/plugin/ui/quota-status.js.map +1 -1
  152. package/dist/src/plugin/vault-custody.d.ts +57 -15
  153. package/dist/src/plugin/vault-custody.d.ts.map +1 -1
  154. package/dist/src/plugin/vault-custody.js +259 -45
  155. package/dist/src/plugin/vault-custody.js.map +1 -1
  156. package/dist/src/plugin/vault-insula-quota.d.ts.map +1 -1
  157. package/dist/src/plugin/vault-insula-quota.js +4 -0
  158. package/dist/src/plugin/vault-insula-quota.js.map +1 -1
  159. package/dist/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
  160. package/dist/src/process-heartbeat.d.ts +96 -0
  161. package/dist/src/process-heartbeat.d.ts.map +1 -0
  162. package/dist/src/process-heartbeat.js +285 -0
  163. package/dist/src/process-heartbeat.js.map +1 -0
  164. package/dist/src/rpc/rpc-server.d.ts +8 -0
  165. package/dist/src/rpc/rpc-server.d.ts.map +1 -1
  166. package/dist/src/rpc/rpc-server.js +26 -1
  167. package/dist/src/rpc/rpc-server.js.map +1 -1
  168. package/dist/src/runtime-layout.d.ts +100 -0
  169. package/dist/src/runtime-layout.d.ts.map +1 -0
  170. package/dist/src/runtime-layout.js +1242 -0
  171. package/dist/src/runtime-layout.js.map +1 -0
  172. package/dist/src/runtime-paths.d.ts +132 -0
  173. package/dist/src/runtime-paths.d.ts.map +1 -0
  174. package/dist/src/runtime-paths.js +214 -0
  175. package/dist/src/runtime-paths.js.map +1 -0
  176. package/dist/src/setup.d.ts.map +1 -1
  177. package/dist/src/setup.js +31 -5
  178. package/dist/src/setup.js.map +1 -1
  179. package/dist/src/sidebar-projection.d.ts +3 -1
  180. package/dist/src/sidebar-projection.d.ts.map +1 -1
  181. package/dist/src/sidebar-projection.js +10 -1
  182. package/dist/src/sidebar-projection.js.map +1 -1
  183. package/dist/src/sidebar-state.d.ts +10 -1
  184. package/dist/src/sidebar-state.d.ts.map +1 -1
  185. package/dist/src/sidebar-state.js +12 -2
  186. package/dist/src/sidebar-state.js.map +1 -1
  187. package/dist/src/tui/quota-layout.d.ts +3 -1
  188. package/dist/src/tui/quota-layout.d.ts.map +1 -1
  189. package/dist/src/tui/quota-layout.js +6 -1
  190. package/dist/src/tui/quota-layout.js.map +1 -1
  191. package/dist/src/vault-folder.d.ts +38 -0
  192. package/dist/src/vault-folder.d.ts.map +1 -0
  193. package/dist/src/vault-folder.js +91 -0
  194. package/dist/src/vault-folder.js.map +1 -0
  195. package/dist/src/version-fence.d.ts +54 -0
  196. package/dist/src/version-fence.d.ts.map +1 -0
  197. package/dist/src/version-fence.js +254 -0
  198. package/dist/src/version-fence.js.map +1 -0
  199. package/dist/tui-build-map.json +9 -9
  200. package/dist/tui-ga-build-map.json +13 -13
  201. package/dist/types/src/cli.d.ts +26 -0
  202. package/dist/types/src/cli.d.ts.map +1 -1
  203. package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +77 -2
  204. package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
  205. package/dist/types/src/common-auth-embedded/claustrum/enrollment.d.ts +9 -0
  206. package/dist/types/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
  207. package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +13 -3
  208. package/dist/types/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
  209. package/dist/types/src/common-auth-embedded/claustrum/roster.d.ts +49 -1
  210. package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
  211. package/dist/types/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
  212. package/dist/types/src/common-auth-embedded/opencode2/index.d.ts +2 -2
  213. package/dist/types/src/common-auth-embedded/opencode2/install.d.ts +7 -5
  214. package/dist/types/src/common-auth-embedded/opencode2/types.d.ts +42 -10
  215. package/dist/types/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
  216. package/dist/types/src/common-auth-embedded/setup/flags.d.ts +50 -0
  217. package/dist/types/src/common-auth-embedded/setup/index.d.ts +1 -0
  218. package/dist/types/src/common-auth-embedded/setup/register.d.ts +2 -0
  219. package/dist/types/src/common-auth-embedded/setup/types.d.ts +7 -1
  220. package/dist/types/src/common-auth-embedded/store/mutate.d.ts +2 -0
  221. package/dist/types/src/common-auth-embedded/store/pool.d.ts +6 -1
  222. package/dist/types/src/common-auth-embedded/store/settings.d.ts +1 -1
  223. package/dist/types/src/ga/rpc/protocol.d.ts +2 -0
  224. package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -1
  225. package/dist/types/src/ga/server/auth.d.ts.map +1 -1
  226. package/dist/types/src/ga/server/index.d.ts.map +1 -1
  227. package/dist/types/src/plugin/auth-loader.d.ts +7 -1
  228. package/dist/types/src/plugin/auth-loader.d.ts.map +1 -1
  229. package/dist/types/src/plugin/background-vault-quota-refresh.d.ts +10 -0
  230. package/dist/types/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
  231. package/dist/types/src/plugin/cache/signature-cache.d.ts +7 -1
  232. package/dist/types/src/plugin/cache/signature-cache.d.ts.map +1 -1
  233. package/dist/types/src/plugin/command-data.d.ts +2 -2
  234. package/dist/types/src/plugin/command-data.d.ts.map +1 -1
  235. package/dist/types/src/plugin/config/loader.d.ts +2 -1
  236. package/dist/types/src/plugin/config/loader.d.ts.map +1 -1
  237. package/dist/types/src/plugin/debug.d.ts.map +1 -1
  238. package/dist/types/src/plugin/ga-location-services.d.ts +28 -2
  239. package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
  240. package/dist/types/src/plugin/ga-shared-vault-custody.d.ts +78 -0
  241. package/dist/types/src/plugin/ga-shared-vault-custody.d.ts.map +1 -0
  242. package/dist/types/src/plugin/index.d.ts.map +1 -1
  243. package/dist/types/src/plugin/killswitch.d.ts.map +1 -1
  244. package/dist/types/src/plugin/oauth-methods.d.ts.map +1 -1
  245. package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
  246. package/dist/types/src/plugin/shared/source-sidebar.d.ts +6 -0
  247. package/dist/types/src/plugin/shared/source-sidebar.d.ts.map +1 -1
  248. package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +8 -1
  249. package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
  250. package/dist/types/src/plugin/storage.d.ts +5 -2
  251. package/dist/types/src/plugin/storage.d.ts.map +1 -1
  252. package/dist/types/src/plugin/ui/auth-menu.d.ts.map +1 -1
  253. package/dist/types/src/plugin/ui/quota-status.d.ts.map +1 -1
  254. package/dist/types/src/plugin/vault-custody.d.ts +57 -15
  255. package/dist/types/src/plugin/vault-custody.d.ts.map +1 -1
  256. package/dist/types/src/plugin/vault-insula-quota.d.ts.map +1 -1
  257. package/dist/types/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
  258. package/dist/types/src/process-heartbeat.d.ts +96 -0
  259. package/dist/types/src/process-heartbeat.d.ts.map +1 -0
  260. package/dist/types/src/rpc/rpc-server.d.ts +8 -0
  261. package/dist/types/src/rpc/rpc-server.d.ts.map +1 -1
  262. package/dist/types/src/runtime-layout.d.ts +100 -0
  263. package/dist/types/src/runtime-layout.d.ts.map +1 -0
  264. package/dist/types/src/runtime-paths.d.ts +132 -0
  265. package/dist/types/src/runtime-paths.d.ts.map +1 -0
  266. package/dist/types/src/setup.d.ts.map +1 -1
  267. package/dist/types/src/sidebar-state.d.ts +10 -1
  268. package/dist/types/src/sidebar-state.d.ts.map +1 -1
  269. package/dist/types/src/vault-folder.d.ts +38 -0
  270. package/dist/types/src/vault-folder.d.ts.map +1 -0
  271. package/dist/types/src/version-fence.d.ts +54 -0
  272. package/dist/types/src/version-fence.d.ts.map +1 -0
  273. package/package.json +2 -2
  274. package/src/common-auth-embedded/claustrum/consumer.d.ts +77 -2
  275. package/src/common-auth-embedded/claustrum/consumer.js +320 -35
  276. package/src/common-auth-embedded/claustrum/custody.d.ts +36 -1
  277. package/src/common-auth-embedded/claustrum/custody.js +95 -11
  278. package/src/common-auth-embedded/claustrum/enrollment.d.ts +9 -0
  279. package/src/common-auth-embedded/claustrum/enrollment.js +52 -20
  280. package/src/common-auth-embedded/claustrum/hub.d.ts +195 -0
  281. package/src/common-auth-embedded/claustrum/hub.js +1032 -0
  282. package/src/common-auth-embedded/claustrum/index.d.ts +13 -3
  283. package/src/common-auth-embedded/claustrum/index.js +37 -4
  284. package/src/common-auth-embedded/claustrum/quota-writer.d.ts +8 -1
  285. package/src/common-auth-embedded/claustrum/quota-writer.js +34 -12
  286. package/src/common-auth-embedded/claustrum/roster.d.ts +49 -1
  287. package/src/common-auth-embedded/claustrum/roster.js +187 -12
  288. package/src/common-auth-embedded/claustrum/shutdown.js +42 -0
  289. package/src/common-auth-embedded/fs/file-read-cache.js +57 -0
  290. package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +1 -1
  291. package/src/common-auth-embedded/fs/refresh-file-lock.js +36 -14
  292. package/src/common-auth-embedded/opencode2/errors.d.ts +4 -1
  293. package/src/common-auth-embedded/opencode2/index.d.ts +2 -2
  294. package/src/common-auth-embedded/opencode2/index.js +1 -1
  295. package/src/common-auth-embedded/opencode2/install.d.ts +7 -5
  296. package/src/common-auth-embedded/opencode2/install.js +139 -13
  297. package/src/common-auth-embedded/opencode2/types.d.ts +42 -10
  298. package/src/common-auth-embedded/quota/commit-interval.d.ts +9 -0
  299. package/src/common-auth-embedded/quota/commit-interval.js +18 -0
  300. package/src/common-auth-embedded/rpc/rpc-server.js +29 -19
  301. package/src/common-auth-embedded/setup/command.js +40 -47
  302. package/src/common-auth-embedded/setup/flags.d.ts +50 -0
  303. package/src/common-auth-embedded/setup/flags.js +123 -0
  304. package/src/common-auth-embedded/setup/index.d.ts +1 -0
  305. package/src/common-auth-embedded/setup/index.js +1 -0
  306. package/src/common-auth-embedded/setup/register.d.ts +2 -0
  307. package/src/common-auth-embedded/setup/register.js +90 -11
  308. package/src/common-auth-embedded/setup/types.d.ts +7 -1
  309. package/src/common-auth-embedded/source-output.json +173 -109
  310. package/src/common-auth-embedded/store/mutate.d.ts +2 -0
  311. package/src/common-auth-embedded/store/mutate.js +4 -0
  312. package/src/common-auth-embedded/store/pool.d.ts +6 -1
  313. package/src/common-auth-embedded/store/pool.js +1 -1
  314. package/src/common-auth-embedded/store/quota-writer.js +27 -13
  315. package/src/common-auth-embedded/store/settings.d.ts +1 -1
  316. package/src/common-auth-embedded/store/settings.js +16 -6
  317. package/src/plugin/command-data.ts +4 -2
  318. package/src/sidebar-state.ts +23 -3
  319. package/src/tui-compiled/sidebar-state.js +4 -3
  320. package/src/tui-compiled/tui/quota-layout.js +3 -2
  321. package/src/tui-ga-compiled/host-ga.js +2 -1
  322. package/src/tui-ga-compiled/shared/8ae1927e5910ea81-sidebar-projection.js +9 -2
  323. package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +3 -2
  324. package/src/tui-ga-raw/host-ga.tsx +12 -1
  325. package/src/tui-ga-raw/shared/8ae1927e5910ea81-sidebar-projection.js +9 -2
  326. package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +9 -2
  327. package/src/tui-raw/sidebar-state.js +4 -3
  328. package/src/tui-raw/tui/quota-layout.tsx +9 -2
@@ -1,4 +1,5 @@
1
1
  import { createLogger } from '../logger/index.js';
2
+ import { QUOTA_COMMIT_INTERVAL_MS, quotaCommitTimer, } from '../quota/commit-interval.js';
2
3
  import { assertQuotaEpoch, assertQuotaRow, mergedQuota, } from './attribution.js';
3
4
  import { PoolOperationError } from './errors.js';
4
5
  import { toFailure, withTransaction } from './mutate.js';
@@ -24,19 +25,22 @@ export const POOL_QUOTA_QUEUE_LIMIT = 128;
24
25
  export class PoolQuotaWriter {
25
26
  rt;
26
27
  timeoutMs;
28
+ clock;
27
29
  pending = new Map();
28
30
  warned = new Set();
29
31
  wake = new Set();
30
32
  logger;
31
33
  timer;
34
+ committedAt;
32
35
  running;
33
36
  closing;
34
37
  closed = false;
35
38
  stopped = false;
36
39
  failures = 0;
37
- constructor(rt, timeoutMs = 1_000) {
40
+ constructor(rt, timeoutMs = 1_000, clock = quotaCommitTimer) {
38
41
  this.rt = rt;
39
42
  this.timeoutMs = timeoutMs;
43
+ this.clock = clock;
40
44
  this.logger = rt.ctx.logger ?? createLogger('store');
41
45
  }
42
46
  async record(id, attribution, observation) {
@@ -126,25 +130,33 @@ export class PoolQuotaWriter {
126
130
  schedule(delay) {
127
131
  if (this.running || this.timer || !this.pending.size || this.stopped)
128
132
  return;
129
- this.timer = setTimeout(() => {
133
+ const remaining = this.closed
134
+ ? 0
135
+ : (this.committedAt ?? -Infinity) +
136
+ QUOTA_COMMIT_INTERVAL_MS -
137
+ this.clock.now();
138
+ this.timer = this.clock.schedule(Math.max(delay, remaining), () => {
130
139
  this.timer = undefined;
131
- this.flush();
132
- }, delay);
140
+ return this.flush();
141
+ });
133
142
  if (!this.closed)
134
143
  this.timer.unref?.();
135
144
  }
136
- // Starts a flush now rather than at the coalescing timer or retry backoff;
137
- // a flush already running is left to finish.
145
+ cancelTimer() {
146
+ this.timer?.cancel();
147
+ this.timer = undefined;
148
+ }
149
+ // A full queue overrides the interval: response handling must not wait for
150
+ // a quota commit slot. A flush already running is left to finish.
138
151
  flushNow() {
139
152
  if (this.running)
140
153
  return;
141
- clearTimeout(this.timer);
142
- this.timer = undefined;
154
+ this.cancelTimer();
143
155
  this.flush();
144
156
  }
145
157
  flush() {
146
158
  if (this.running || this.stopped || !this.pending.size)
147
- return;
159
+ return this.running ?? Promise.resolve();
148
160
  // Every queued reading, each row's in arrival order.
149
161
  const batch = [...this.pending.values()].flat();
150
162
  // Short lock attempts allow retries to pick up freshly queued readings and
@@ -208,8 +220,10 @@ export class PoolQuotaWriter {
208
220
  tx.setEntry(id, { ...entry, quota, needsFirstReading: false });
209
221
  changed = true;
210
222
  }
211
- if (changed && !this.stopped)
223
+ if (changed && !this.stopped) {
212
224
  await tx.commitConfig();
225
+ this.committedAt = this.clock.now();
226
+ }
213
227
  }, { completeTorn: false });
214
228
  const flushed = new Set(batch);
215
229
  for (const [id, queue] of this.pending) {
@@ -240,6 +254,7 @@ export class PoolQuotaWriter {
240
254
  this.schedule(delay);
241
255
  }
242
256
  })();
257
+ return this.running;
243
258
  }
244
259
  warn(message, data) {
245
260
  try {
@@ -257,8 +272,7 @@ export class PoolQuotaWriter {
257
272
  return this.closing;
258
273
  }
259
274
  async drain() {
260
- clearTimeout(this.timer);
261
- this.timer = undefined;
275
+ this.cancelTimer();
262
276
  let deadline;
263
277
  let wake;
264
278
  const drained = new Promise((done) => {
@@ -281,7 +295,7 @@ export class PoolQuotaWriter {
281
295
  finally {
282
296
  this.stopped = true;
283
297
  clearTimeout(deadline);
284
- clearTimeout(this.timer);
298
+ this.cancelTimer();
285
299
  this.wake.delete(wake);
286
300
  if (this.pending.size)
287
301
  this.warn('pool quota drain timed out; pending readings left', {
@@ -50,7 +50,7 @@ export type UpdateSettingsResult = {
50
50
  /** `unchanged` when the mutator left the settings as they were; nothing was written. */
51
51
  outcome: 'updated' | 'unchanged';
52
52
  };
53
- /** Reads the settings without taking a lock or writing anything. */
53
+ /** Reads only the config's settings, without taking a lock or writing anything. */
54
54
  export declare function readPoolSettings(rt: StoreRuntime): Promise<SettingsRead>;
55
55
  /**
56
56
  * One locked read-modify-write of the plugin's settings in the config file
@@ -1,8 +1,10 @@
1
1
  import { isDeepStrictEqual } from 'node:util';
2
2
  import { writeJsonAtomic } from '../fs/atomic-write.js';
3
+ import { FileReadCache } from '../fs/file-read-cache.js';
4
+ import { windowsPrivateFiles } from '../fs/private-files.js';
3
5
  import { PoolOperationError } from './errors.js';
4
6
  import { assertNotInsideHook, runInsideHook } from './hooks.js';
5
- import { notReadyError, readPool, runOperation } from './mutate.js';
7
+ import { notReadyError, readPool, readPoolConfig, runOperation, } from './mutate.js';
6
8
  import { isRecord, POOL_KEY } from './schema.js';
7
9
  /**
8
10
  * Top-level config keys the pool owns: the legacy `version`, the legacy
@@ -58,12 +60,20 @@ function settingsRefusal(message) {
58
60
  message,
59
61
  });
60
62
  }
61
- /** Reads the settings without taking a lock or writing anything. */
63
+ const settingsCache = new FileReadCache();
64
+ /** Reads only the config's settings, without taking a lock or writing anything. */
62
65
  export async function readPoolSettings(rt) {
63
- const result = await readPool(rt.ctx);
64
- if (result.status === 'error')
65
- return result;
66
- return { status: result.status, settings: settingsOf(result.config) };
66
+ const read = async ([configPath = rt.ctx.configPath,] = []) => {
67
+ const result = await readPoolConfig(configPath);
68
+ if (result.status === 'error')
69
+ return { status: 'error', file: 'config', reason: result.reason };
70
+ return { status: result.status, settings: settingsOf(result.config) };
71
+ };
72
+ // Native Windows security checks cannot be replaced by a stat fingerprint.
73
+ const result = windowsPrivateFiles
74
+ ? await read()
75
+ : await settingsCache.read([rt.ctx.configPath], read);
76
+ return structuredClone(result);
67
77
  }
68
78
  /**
69
79
  * One locked read-modify-write of the plugin's settings in the config file
@@ -22,7 +22,7 @@ type CommandDataAccountMetadata = {
22
22
  accountIneligible?: boolean
23
23
  }
24
24
 
25
- type CommandDataQuotaGroup = 'gemini' | 'non-gemini'
25
+ type CommandDataQuotaGroup = 'gemini' | 'non-gemini' | 'gemini-argon'
26
26
 
27
27
  type CommandDataQuotaGroupSummary = {
28
28
  remainingFraction?: number
@@ -73,7 +73,7 @@ export interface CommandAccountRow {
73
73
  healthScore?: number
74
74
  cachedQuotaUpdatedAt?: number
75
75
  quota: Array<{
76
- key: 'gemini' | 'non-gemini'
76
+ key: 'gemini' | 'non-gemini' | 'gemini-argon'
77
77
  label: string
78
78
  remainingPercent: number | null
79
79
  resetAt?: number
@@ -97,11 +97,13 @@ const QUOTA_GROUP_LABELS: Record<
97
97
  > = {
98
98
  gemini: 'Gemini',
99
99
  'non-gemini': 'Non-Gemini',
100
+ 'gemini-argon': 'Argon',
100
101
  }
101
102
 
102
103
  const SUPPORTED_QUOTA_KEYS = [
103
104
  'gemini',
104
105
  'non-gemini',
106
+ 'gemini-argon',
105
107
  ] as const satisfies readonly CommandAccountRow['quota'][number]['key'][]
106
108
 
107
109
  interface LiveAccountSnapshot {
@@ -54,7 +54,7 @@ import { xdgState } from 'xdg-basedir'
54
54
 
55
55
  export const SIDEBAR_STATE_VERSION = 2 as const
56
56
 
57
- export type SidebarQuotaKey = 'gemini' | 'non-gemini'
57
+ export type SidebarQuotaKey = 'gemini' | 'non-gemini' | 'gemini-argon'
58
58
 
59
59
  export interface SidebarQuotaWindowEntry {
60
60
  window: 'weekly' | '5h'
@@ -328,7 +328,10 @@ function normalizeAccount(input: unknown): SidebarAccountState | null {
328
328
  const quotaRaw = record.quota
329
329
  const quota: SidebarAccountState['quota'] = {}
330
330
  if (isObject(quotaRaw)) {
331
- for (const key of ['gemini', 'non-gemini'] as const) {
331
+ // The Argon pool exists only on accounts that report it: readers carry
332
+ // any stored Argon reading, and accounts without one read exactly the
333
+ // two canonical pools, as before.
334
+ for (const key of ['gemini', 'non-gemini', 'gemini-argon'] as const) {
332
335
  const entry = (quotaRaw as Record<string, unknown>)[key]
333
336
  const normalized = normalizeQuota(entry)
334
337
  if (normalized) quota[key] = normalized
@@ -545,6 +548,16 @@ export interface SidebarAccountRedactionInput {
545
548
  resetTime: string
546
549
  }>
547
550
  }
551
+ // Reported only by paid Pro accounts with the Argon weekly allowance.
552
+ 'gemini-argon'?: {
553
+ remainingFraction?: number
554
+ resetTime?: string
555
+ windows?: Array<{
556
+ window: 'weekly' | '5h'
557
+ remainingFraction: number
558
+ resetTime: string
559
+ }>
560
+ }
548
561
  // Legacy per-pool keys written by older versions of the plugin.
549
562
  // Accepted here so the normalizer can map them to the current pool
550
563
  // keys at read time without requiring a disk migration.
@@ -685,6 +698,11 @@ export function normalizeLegacyCachedQuota(
685
698
  return {
686
699
  ...(gemini !== undefined ? { gemini } : {}),
687
700
  ...(nonGemini !== undefined ? { 'non-gemini': nonGemini } : {}),
701
+ // The Argon pool postdates the legacy pool keys, so a snapshot that
702
+ // carries both keeps its Argon pool untouched by the migration.
703
+ ...(raw['gemini-argon'] !== undefined
704
+ ? { 'gemini-argon': raw['gemini-argon'] }
705
+ : {}),
688
706
  }
689
707
  }
690
708
 
@@ -811,7 +829,9 @@ export function redactAccountForSidebar(
811
829
  ? undefined
812
830
  : normalizeLegacyCachedQuota(source.cachedQuota)
813
831
  if (cached) {
814
- for (const key of ['gemini', 'non-gemini'] as const) {
832
+ // The Argon pool is projected only when the account reports it, so an
833
+ // account without it serializes byte-identical to before.
834
+ for (const key of ['gemini', 'non-gemini', 'gemini-argon'] as const) {
815
835
  const entry = cached[key]
816
836
  if (!entry) continue
817
837
  const projected = projectQuotaPoolForSidebar(
@@ -98,7 +98,7 @@ function normalizeAccount(input) {
98
98
  return null;
99
99
  const enabled = record.enabled !== !1, health = clampNumber(toFiniteNumber(record.health), 0, 100), current = record.current === !0, cooldownUntil = toFiniteNumber(record.cooldownUntil) ?? void 0, quotaRaw = record.quota, quota = {};
100
100
  if (isObject(quotaRaw))
101
- for (const key of ["gemini", "non-gemini"]) {
101
+ for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
102
102
  const entry = quotaRaw[key], normalized = normalizeQuota(entry);
103
103
  if (normalized)
104
104
  quota[key] = normalized;
@@ -246,7 +246,8 @@ export function normalizeLegacyCachedQuota(raw) {
246
246
  }, gemini = minFraction(raw.gemini, minFraction(raw["gemini-pro"], raw["gemini-flash"])) ?? raw.gemini, nonGemini = minFraction(raw["non-gemini"], minFraction(raw.claude, raw["gpt-oss"])) ?? raw["non-gemini"];
247
247
  return {
248
248
  ...gemini !== void 0 ? { gemini } : {},
249
- ...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {}
249
+ ...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {},
250
+ ...raw["gemini-argon"] !== void 0 ? { "gemini-argon": raw["gemini-argon"] } : {}
250
251
  };
251
252
  }
252
253
  export function projectQuotaPoolForSidebar(source, checkedAt) {
@@ -284,7 +285,7 @@ export function isAccountCurrent(index, activeIndexByFamily) {
284
285
  export function redactAccountForSidebar(source) {
285
286
  const id = `acct-${source.index}`, label = `Account ${source.index + 1}`, enabled = source.enabled !== !1, current = source.current === !0, cooldownUntil = typeof source.coolingDownUntil === "number" && Number.isFinite(source.coolingDownUntil) ? source.coolingDownUntil : void 0, health = clampNumber(typeof source.healthScore === "number" ? source.healthScore : 100, 0, 100), quota = {}, cached = typeof source.cachedQuotaAccountId === "string" && typeof source.currentQuotaAccountId === "string" && source.cachedQuotaAccountId !== source.currentQuotaAccountId ? void 0 : normalizeLegacyCachedQuota(source.cachedQuota);
286
287
  if (cached)
287
- for (const key of ["gemini", "non-gemini"]) {
288
+ for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
288
289
  const entry = cached[key];
289
290
  if (!entry)
290
291
  continue;
@@ -48,9 +48,10 @@ export const DEFAULT_QUOTA_APPEARANCE = {
48
48
  // Group headers name each quota pool in plain words.
49
49
  export const GROUP_NAMES = {
50
50
  gemini: 'Gemini',
51
- 'non-gemini': 'Other models'
51
+ 'non-gemini': 'Other models',
52
+ 'gemini-argon': 'Argon'
52
53
  };
53
- export const QUOTA_ORDER = ['gemini', 'non-gemini'];
54
+ export const QUOTA_ORDER = ['gemini', 'non-gemini', 'gemini-argon'];
54
55
 
55
56
  // Shown instead of a stored figure once the window has reset since it was
56
57
  // read: the stored figure describes the window before the reset.
@@ -209,9 +209,10 @@ function checkAccount(value, path, issues) {
209
209
  if (!isRecord(value.quota)) {
210
210
  issues.push(`${path}.quota: expected quota readings`);
211
211
  } else {
212
- keys(value.quota, [], ['gemini', 'non-gemini'], `${path}.quota`, issues);
212
+ keys(value.quota, [], ['gemini', 'non-gemini', 'gemini-argon'], `${path}.quota`, issues);
213
213
  checkQuotaEntry(value.quota.gemini, `${path}.quota.gemini`, issues);
214
214
  checkQuotaEntry(value.quota['non-gemini'], `${path}.quota.non-gemini`, issues);
215
+ checkQuotaEntry(value.quota['gemini-argon'], `${path}.quota.gemini-argon`, issues);
215
216
  }
216
217
  if (value.tier !== undefined) {
217
218
  const tier = value.tier;
@@ -1,9 +1,14 @@
1
1
  import { quotaReadingParts } from "./98cc0c186c46c42d-quota-presentation.js";
2
2
  export const QUOTA_POOL_LABELS = {
3
3
  gemini: "Gemini",
4
- "non-gemini": "Other models"
4
+ "non-gemini": "Other models",
5
+ "gemini-argon": "Argon"
5
6
  };
6
- const POOL_ORDER = ["gemini", "non-gemini"];
7
+ const POOL_ORDER = [
8
+ "gemini",
9
+ "non-gemini",
10
+ "gemini-argon"
11
+ ];
7
12
  function clamp(value) {
8
13
  if (!Number.isFinite(value))
9
14
  return 0;
@@ -47,6 +52,8 @@ function quotaRows(account, now) {
47
52
  for (const key of POOL_ORDER) {
48
53
  const entry = account.quota[key], label = QUOTA_POOL_LABELS[key];
49
54
  if (!entry) {
55
+ if (key === "gemini-argon")
56
+ continue;
50
57
  rows.push({
51
58
  label,
52
59
  remaining: null,
@@ -48,9 +48,10 @@ export const DEFAULT_QUOTA_APPEARANCE = {
48
48
  // Group headers name each quota pool in plain words.
49
49
  export const GROUP_NAMES = {
50
50
  gemini: 'Gemini',
51
- 'non-gemini': 'Other models'
51
+ 'non-gemini': 'Other models',
52
+ 'gemini-argon': 'Argon'
52
53
  };
53
- export const QUOTA_ORDER = ['gemini', 'non-gemini'];
54
+ export const QUOTA_ORDER = ['gemini', 'non-gemini', 'gemini-argon'];
54
55
 
55
56
  // Shown instead of a stored figure once the window has reset since it was
56
57
  // read: the stored figure describes the window before the reset.
@@ -472,13 +472,24 @@ function checkAccount(value: unknown, path: string, issues: Issues) {
472
472
  if (!isRecord(value.quota)) {
473
473
  issues.push(`${path}.quota: expected quota readings`)
474
474
  } else {
475
- keys(value.quota, [], ['gemini', 'non-gemini'], `${path}.quota`, issues)
475
+ keys(
476
+ value.quota,
477
+ [],
478
+ ['gemini', 'non-gemini', 'gemini-argon'],
479
+ `${path}.quota`,
480
+ issues,
481
+ )
476
482
  checkQuotaEntry(value.quota.gemini, `${path}.quota.gemini`, issues)
477
483
  checkQuotaEntry(
478
484
  value.quota['non-gemini'],
479
485
  `${path}.quota.non-gemini`,
480
486
  issues,
481
487
  )
488
+ checkQuotaEntry(
489
+ value.quota['gemini-argon'],
490
+ `${path}.quota.gemini-argon`,
491
+ issues,
492
+ )
482
493
  }
483
494
  if (value.tier !== undefined) {
484
495
  const tier = value.tier
@@ -1,9 +1,14 @@
1
1
  import { quotaReadingParts } from "./98cc0c186c46c42d-quota-presentation.js";
2
2
  export const QUOTA_POOL_LABELS = {
3
3
  gemini: "Gemini",
4
- "non-gemini": "Other models"
4
+ "non-gemini": "Other models",
5
+ "gemini-argon": "Argon"
5
6
  };
6
- const POOL_ORDER = ["gemini", "non-gemini"];
7
+ const POOL_ORDER = [
8
+ "gemini",
9
+ "non-gemini",
10
+ "gemini-argon"
11
+ ];
7
12
  function clamp(value) {
8
13
  if (!Number.isFinite(value))
9
14
  return 0;
@@ -47,6 +52,8 @@ function quotaRows(account, now) {
47
52
  for (const key of POOL_ORDER) {
48
53
  const entry = account.quota[key], label = QUOTA_POOL_LABELS[key];
49
54
  if (!entry) {
55
+ if (key === "gemini-argon")
56
+ continue;
50
57
  rows.push({
51
58
  label,
52
59
  remaining: null,
@@ -58,7 +58,7 @@ export const DEFAULT_QUOTA_APPEARANCE: QuotaAppearance = {
58
58
  errorThreshold: 80,
59
59
  }
60
60
 
61
- export type QuotaGroupKey = 'gemini' | 'non-gemini'
61
+ export type QuotaGroupKey = 'gemini' | 'non-gemini' | 'gemini-argon'
62
62
 
63
63
  export interface QuotaLayoutWindow {
64
64
  readonly window: 'weekly' | '5h'
@@ -80,6 +80,8 @@ export interface QuotaLayoutAccount {
80
80
  readonly quota: {
81
81
  readonly gemini?: QuotaLayoutEntry
82
82
  readonly 'non-gemini'?: QuotaLayoutEntry
83
+ /** Present only on accounts whose reading reports the Argon pool. */
84
+ readonly 'gemini-argon'?: QuotaLayoutEntry
83
85
  }
84
86
  }
85
87
 
@@ -87,9 +89,14 @@ export interface QuotaLayoutAccount {
87
89
  export const GROUP_NAMES: Record<QuotaGroupKey, string> = {
88
90
  gemini: 'Gemini',
89
91
  'non-gemini': 'Other models',
92
+ 'gemini-argon': 'Argon',
90
93
  }
91
94
 
92
- export const QUOTA_ORDER: readonly QuotaGroupKey[] = ['gemini', 'non-gemini']
95
+ export const QUOTA_ORDER: readonly QuotaGroupKey[] = [
96
+ 'gemini',
97
+ 'non-gemini',
98
+ 'gemini-argon',
99
+ ]
93
100
 
94
101
  // Shown instead of a stored figure once the window has reset since it was
95
102
  // read: the stored figure describes the window before the reset.
@@ -98,7 +98,7 @@ function normalizeAccount(input) {
98
98
  return null;
99
99
  const enabled = record.enabled !== !1, health = clampNumber(toFiniteNumber(record.health), 0, 100), current = record.current === !0, cooldownUntil = toFiniteNumber(record.cooldownUntil) ?? void 0, quotaRaw = record.quota, quota = {};
100
100
  if (isObject(quotaRaw))
101
- for (const key of ["gemini", "non-gemini"]) {
101
+ for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
102
102
  const entry = quotaRaw[key], normalized = normalizeQuota(entry);
103
103
  if (normalized)
104
104
  quota[key] = normalized;
@@ -246,7 +246,8 @@ export function normalizeLegacyCachedQuota(raw) {
246
246
  }, gemini = minFraction(raw.gemini, minFraction(raw["gemini-pro"], raw["gemini-flash"])) ?? raw.gemini, nonGemini = minFraction(raw["non-gemini"], minFraction(raw.claude, raw["gpt-oss"])) ?? raw["non-gemini"];
247
247
  return {
248
248
  ...gemini !== void 0 ? { gemini } : {},
249
- ...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {}
249
+ ...nonGemini !== void 0 ? { "non-gemini": nonGemini } : {},
250
+ ...raw["gemini-argon"] !== void 0 ? { "gemini-argon": raw["gemini-argon"] } : {}
250
251
  };
251
252
  }
252
253
  export function projectQuotaPoolForSidebar(source, checkedAt) {
@@ -284,7 +285,7 @@ export function isAccountCurrent(index, activeIndexByFamily) {
284
285
  export function redactAccountForSidebar(source) {
285
286
  const id = `acct-${source.index}`, label = `Account ${source.index + 1}`, enabled = source.enabled !== !1, current = source.current === !0, cooldownUntil = typeof source.coolingDownUntil === "number" && Number.isFinite(source.coolingDownUntil) ? source.coolingDownUntil : void 0, health = clampNumber(typeof source.healthScore === "number" ? source.healthScore : 100, 0, 100), quota = {}, cached = typeof source.cachedQuotaAccountId === "string" && typeof source.currentQuotaAccountId === "string" && source.cachedQuotaAccountId !== source.currentQuotaAccountId ? void 0 : normalizeLegacyCachedQuota(source.cachedQuota);
286
287
  if (cached)
287
- for (const key of ["gemini", "non-gemini"]) {
288
+ for (const key of ["gemini", "non-gemini", "gemini-argon"]) {
288
289
  const entry = cached[key];
289
290
  if (!entry)
290
291
  continue;
@@ -58,7 +58,7 @@ export const DEFAULT_QUOTA_APPEARANCE: QuotaAppearance = {
58
58
  errorThreshold: 80,
59
59
  }
60
60
 
61
- export type QuotaGroupKey = 'gemini' | 'non-gemini'
61
+ export type QuotaGroupKey = 'gemini' | 'non-gemini' | 'gemini-argon'
62
62
 
63
63
  export interface QuotaLayoutWindow {
64
64
  readonly window: 'weekly' | '5h'
@@ -80,6 +80,8 @@ export interface QuotaLayoutAccount {
80
80
  readonly quota: {
81
81
  readonly gemini?: QuotaLayoutEntry
82
82
  readonly 'non-gemini'?: QuotaLayoutEntry
83
+ /** Present only on accounts whose reading reports the Argon pool. */
84
+ readonly 'gemini-argon'?: QuotaLayoutEntry
83
85
  }
84
86
  }
85
87
 
@@ -87,9 +89,14 @@ export interface QuotaLayoutAccount {
87
89
  export const GROUP_NAMES: Record<QuotaGroupKey, string> = {
88
90
  gemini: 'Gemini',
89
91
  'non-gemini': 'Other models',
92
+ 'gemini-argon': 'Argon',
90
93
  }
91
94
 
92
- export const QUOTA_ORDER: readonly QuotaGroupKey[] = ['gemini', 'non-gemini']
95
+ export const QUOTA_ORDER: readonly QuotaGroupKey[] = [
96
+ 'gemini',
97
+ 'non-gemini',
98
+ 'gemini-argon',
99
+ ]
93
100
 
94
101
  // Shown instead of a stored figure once the window has reset since it was
95
102
  // read: the stored figure describes the window before the reset.