@kaitranntt/ccs 8.4.0 → 8.5.0-dev.1

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 (749) hide show
  1. package/README.md +5 -2
  2. package/config/base-claude.settings.json +1 -1
  3. package/config/base-glm.settings.json +4 -4
  4. package/config/base-glmt.settings.json +4 -4
  5. package/config/base-km.settings.json +4 -4
  6. package/config/base-mm.settings.json +4 -4
  7. package/dist/api/services/cliproxy-profile-bridge.d.ts.map +1 -1
  8. package/dist/api/services/cliproxy-profile-bridge.js +20 -9
  9. package/dist/api/services/cliproxy-profile-bridge.js.map +1 -1
  10. package/dist/api/services/profile-lifecycle-validation.d.ts.map +1 -1
  11. package/dist/api/services/profile-lifecycle-validation.js +2 -0
  12. package/dist/api/services/profile-lifecycle-validation.js.map +1 -1
  13. package/dist/auth/commands/backup-command.d.ts.map +1 -1
  14. package/dist/auth/commands/backup-command.js +0 -1
  15. package/dist/auth/commands/backup-command.js.map +1 -1
  16. package/dist/auth/commands/create-command.d.ts.map +1 -1
  17. package/dist/auth/commands/create-command.js +4 -14
  18. package/dist/auth/commands/create-command.js.map +1 -1
  19. package/dist/auth/commands/default-command.d.ts.map +1 -1
  20. package/dist/auth/commands/default-command.js +0 -1
  21. package/dist/auth/commands/default-command.js.map +1 -1
  22. package/dist/auth/commands/index.d.ts +2 -1
  23. package/dist/auth/commands/index.d.ts.map +1 -1
  24. package/dist/auth/commands/index.js +0 -1
  25. package/dist/auth/commands/index.js.map +1 -1
  26. package/dist/auth/commands/remove-command.d.ts.map +1 -1
  27. package/dist/auth/commands/remove-command.js +0 -2
  28. package/dist/auth/commands/remove-command.js.map +1 -1
  29. package/dist/auth/commands/resources-command.d.ts.map +1 -1
  30. package/dist/auth/commands/resources-command.js +0 -1
  31. package/dist/auth/commands/resources-command.js.map +1 -1
  32. package/dist/auth/commands/show-command.d.ts.map +1 -1
  33. package/dist/auth/commands/show-command.js +0 -1
  34. package/dist/auth/commands/show-command.js.map +1 -1
  35. package/dist/auth/commands/types.d.ts.map +1 -1
  36. package/dist/auth/commands/types.js +0 -1
  37. package/dist/auth/commands/types.js.map +1 -1
  38. package/dist/auth/profile-registry.d.ts +3 -1
  39. package/dist/auth/profile-registry.d.ts.map +1 -1
  40. package/dist/auth/profile-registry.js +21 -15
  41. package/dist/auth/profile-registry.js.map +1 -1
  42. package/dist/ccs.js +27 -21
  43. package/dist/ccs.js.map +1 -1
  44. package/dist/cliproxy/accounts/account-safety.d.ts.map +1 -1
  45. package/dist/cliproxy/accounts/account-safety.js +56 -56
  46. package/dist/cliproxy/accounts/account-safety.js.map +1 -1
  47. package/dist/cliproxy/auth/antigravity-responsibility.d.ts.map +1 -1
  48. package/dist/cliproxy/auth/antigravity-responsibility.js +15 -15
  49. package/dist/cliproxy/auth/antigravity-responsibility.js.map +1 -1
  50. package/dist/cliproxy/auth/auth-token-manager.d.ts.map +1 -1
  51. package/dist/cliproxy/auth/auth-token-manager.js +2 -1
  52. package/dist/cliproxy/auth/auth-token-manager.js.map +1 -1
  53. package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
  54. package/dist/cliproxy/auth/auth-types.js +3 -2
  55. package/dist/cliproxy/auth/auth-types.js.map +1 -1
  56. package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
  57. package/dist/cliproxy/auth/oauth-handler.js +16 -5
  58. package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
  59. package/dist/cliproxy/auth/provider-refreshers/index.d.ts +2 -1
  60. package/dist/cliproxy/auth/provider-refreshers/index.d.ts.map +1 -1
  61. package/dist/cliproxy/auth/provider-refreshers/index.js +4 -2
  62. package/dist/cliproxy/auth/provider-refreshers/index.js.map +1 -1
  63. package/dist/cliproxy/auth/token-manager.d.ts +2 -1
  64. package/dist/cliproxy/auth/token-manager.d.ts.map +1 -1
  65. package/dist/cliproxy/auth/token-manager.js +2 -1
  66. package/dist/cliproxy/auth/token-manager.js.map +1 -1
  67. package/dist/cliproxy/binary/lifecycle.d.ts.map +1 -1
  68. package/dist/cliproxy/binary/lifecycle.js +3 -2
  69. package/dist/cliproxy/binary/lifecycle.js.map +1 -1
  70. package/dist/cliproxy/config/env-builder.d.ts +19 -2
  71. package/dist/cliproxy/config/env-builder.d.ts.map +1 -1
  72. package/dist/cliproxy/config/env-builder.js +58 -9
  73. package/dist/cliproxy/config/env-builder.js.map +1 -1
  74. package/dist/cliproxy/config/model-config.d.ts.map +1 -1
  75. package/dist/cliproxy/config/model-config.js +32 -32
  76. package/dist/cliproxy/config/model-config.js.map +1 -1
  77. package/dist/cliproxy/executor/arg-parser.d.ts.map +1 -1
  78. package/dist/cliproxy/executor/arg-parser.js +26 -26
  79. package/dist/cliproxy/executor/arg-parser.js.map +1 -1
  80. package/dist/cliproxy/executor/auth-coordinator.d.ts.map +1 -1
  81. package/dist/cliproxy/executor/auth-coordinator.js +15 -14
  82. package/dist/cliproxy/executor/auth-coordinator.js.map +1 -1
  83. package/dist/cliproxy/executor/browser-launch-setup.d.ts.map +1 -1
  84. package/dist/cliproxy/executor/browser-launch-setup.js +6 -2
  85. package/dist/cliproxy/executor/browser-launch-setup.js.map +1 -1
  86. package/dist/cliproxy/executor/index.d.ts.map +1 -1
  87. package/dist/cliproxy/executor/index.js +27 -17
  88. package/dist/cliproxy/executor/index.js.map +1 -1
  89. package/dist/cliproxy/executor/lifecycle-manager.d.ts.map +1 -1
  90. package/dist/cliproxy/executor/lifecycle-manager.js +18 -16
  91. package/dist/cliproxy/executor/lifecycle-manager.js.map +1 -1
  92. package/dist/cliproxy/executor/model-warnings.d.ts.map +1 -1
  93. package/dist/cliproxy/executor/model-warnings.js +24 -13
  94. package/dist/cliproxy/executor/model-warnings.js.map +1 -1
  95. package/dist/cliproxy/executor/retry-handler.d.ts.map +1 -1
  96. package/dist/cliproxy/executor/retry-handler.js +13 -11
  97. package/dist/cliproxy/executor/retry-handler.js.map +1 -1
  98. package/dist/cliproxy/executor/session-bridge.d.ts.map +1 -1
  99. package/dist/cliproxy/executor/session-bridge.js +18 -10
  100. package/dist/cliproxy/executor/session-bridge.js.map +1 -1
  101. package/dist/cliproxy/management/remote-token-uploader.d.ts.map +1 -1
  102. package/dist/cliproxy/management/remote-token-uploader.js +11 -11
  103. package/dist/cliproxy/management/remote-token-uploader.js.map +1 -1
  104. package/dist/cliproxy/provider-capabilities.d.ts +6 -0
  105. package/dist/cliproxy/provider-capabilities.d.ts.map +1 -1
  106. package/dist/cliproxy/provider-capabilities.js +28 -3
  107. package/dist/cliproxy/provider-capabilities.js.map +1 -1
  108. package/dist/cliproxy/proxy/https-tunnel-proxy.d.ts +5 -1
  109. package/dist/cliproxy/proxy/https-tunnel-proxy.d.ts.map +1 -1
  110. package/dist/cliproxy/proxy/https-tunnel-proxy.js +22 -10
  111. package/dist/cliproxy/proxy/https-tunnel-proxy.js.map +1 -1
  112. package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts +0 -12
  113. package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts.map +1 -1
  114. package/dist/cliproxy/proxy/tool-sanitization-proxy.js +42 -72
  115. package/dist/cliproxy/proxy/tool-sanitization-proxy.js.map +1 -1
  116. package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.d.ts +21 -0
  117. package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.d.ts.map +1 -0
  118. package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.js +154 -0
  119. package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.js.map +1 -0
  120. package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.d.ts +35 -0
  121. package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.d.ts.map +1 -0
  122. package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.js +98 -0
  123. package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.js.map +1 -0
  124. package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.d.ts +22 -0
  125. package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.d.ts.map +1 -0
  126. package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.js +111 -0
  127. package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.js.map +1 -0
  128. package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.d.ts +17 -0
  129. package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.d.ts.map +1 -0
  130. package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.js +85 -0
  131. package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.js.map +1 -0
  132. package/dist/cliproxy/quota/quota-fetcher/constants.d.ts +25 -0
  133. package/dist/cliproxy/quota/quota-fetcher/constants.d.ts.map +1 -0
  134. package/dist/cliproxy/quota/quota-fetcher/constants.js +31 -0
  135. package/dist/cliproxy/quota/quota-fetcher/constants.js.map +1 -0
  136. package/dist/cliproxy/quota/quota-fetcher/http-client.d.ts +29 -0
  137. package/dist/cliproxy/quota/quota-fetcher/http-client.d.ts.map +1 -0
  138. package/dist/cliproxy/quota/quota-fetcher/http-client.js +199 -0
  139. package/dist/cliproxy/quota/quota-fetcher/http-client.js.map +1 -0
  140. package/dist/cliproxy/quota/quota-fetcher/project-lookup.d.ts +16 -0
  141. package/dist/cliproxy/quota/quota-fetcher/project-lookup.d.ts.map +1 -0
  142. package/dist/cliproxy/quota/quota-fetcher/project-lookup.js +89 -0
  143. package/dist/cliproxy/quota/quota-fetcher/project-lookup.js.map +1 -0
  144. package/dist/cliproxy/quota/quota-fetcher/status-classifier.d.ts +29 -0
  145. package/dist/cliproxy/quota/quota-fetcher/status-classifier.d.ts.map +1 -0
  146. package/dist/cliproxy/quota/quota-fetcher/status-classifier.js +168 -0
  147. package/dist/cliproxy/quota/quota-fetcher/status-classifier.js.map +1 -0
  148. package/dist/cliproxy/quota/quota-fetcher/types.d.ts +165 -0
  149. package/dist/cliproxy/quota/quota-fetcher/types.d.ts.map +1 -0
  150. package/dist/cliproxy/quota/quota-fetcher/types.js +9 -0
  151. package/dist/cliproxy/quota/quota-fetcher/types.js.map +1 -0
  152. package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -1
  153. package/dist/cliproxy/quota/quota-fetcher-claude.js +14 -3
  154. package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -1
  155. package/dist/cliproxy/quota/quota-fetcher-codex.d.ts.map +1 -1
  156. package/dist/cliproxy/quota/quota-fetcher-codex.js +36 -9
  157. package/dist/cliproxy/quota/quota-fetcher-codex.js.map +1 -1
  158. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.d.ts +26 -0
  159. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.d.ts.map +1 -0
  160. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.js +132 -0
  161. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.js.map +1 -0
  162. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.d.ts +23 -0
  163. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.d.ts.map +1 -0
  164. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.js +54 -0
  165. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.js.map +1 -0
  166. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.d.ts +26 -0
  167. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.d.ts.map +1 -0
  168. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.js +29 -0
  169. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.js.map +1 -0
  170. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.d.ts +61 -0
  171. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.d.ts.map +1 -0
  172. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.js +259 -0
  173. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.js.map +1 -0
  174. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.d.ts +20 -0
  175. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.d.ts.map +1 -0
  176. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.js +38 -0
  177. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.js.map +1 -0
  178. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.d.ts +82 -0
  179. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.d.ts.map +1 -0
  180. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.js +263 -0
  181. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.js.map +1 -0
  182. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.d.ts +46 -0
  183. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.d.ts.map +1 -0
  184. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.js +188 -0
  185. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.js.map +1 -0
  186. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.d.ts +35 -0
  187. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.d.ts.map +1 -0
  188. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.js +65 -0
  189. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.js.map +1 -0
  190. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.d.ts +37 -0
  191. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.d.ts.map +1 -0
  192. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.js +117 -0
  193. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.js.map +1 -0
  194. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.d.ts +31 -0
  195. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.d.ts.map +1 -0
  196. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.js +77 -0
  197. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.js.map +1 -0
  198. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.d.ts +114 -0
  199. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.d.ts.map +1 -0
  200. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.js +10 -0
  201. package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.js.map +1 -0
  202. package/dist/cliproxy/quota/quota-fetcher-gemini-cli.d.ts +13 -58
  203. package/dist/cliproxy/quota/quota-fetcher-gemini-cli.d.ts.map +1 -1
  204. package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js +20 -819
  205. package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js.map +1 -1
  206. package/dist/cliproxy/quota/quota-fetcher-ghcp.d.ts.map +1 -1
  207. package/dist/cliproxy/quota/quota-fetcher-ghcp.js +19 -4
  208. package/dist/cliproxy/quota/quota-fetcher-ghcp.js.map +1 -1
  209. package/dist/cliproxy/quota/quota-fetcher.d.ts +12 -108
  210. package/dist/cliproxy/quota/quota-fetcher.d.ts.map +1 -1
  211. package/dist/cliproxy/quota/quota-fetcher.js +23 -766
  212. package/dist/cliproxy/quota/quota-fetcher.js.map +1 -1
  213. package/dist/cliproxy/quota/quota-manager.d.ts.map +1 -1
  214. package/dist/cliproxy/quota/quota-manager.js +7 -3
  215. package/dist/cliproxy/quota/quota-manager.js.map +1 -1
  216. package/dist/cliproxy/routing/routing-strategy.d.ts.map +1 -1
  217. package/dist/cliproxy/routing/routing-strategy.js +11 -3
  218. package/dist/cliproxy/routing/routing-strategy.js.map +1 -1
  219. package/dist/commands/api-command/create-command.d.ts.map +1 -1
  220. package/dist/commands/api-command/create-command.js +17 -8
  221. package/dist/commands/api-command/create-command.js.map +1 -1
  222. package/dist/commands/bar/bar-server-probe.d.ts +16 -3
  223. package/dist/commands/bar/bar-server-probe.d.ts.map +1 -1
  224. package/dist/commands/bar/bar-server-probe.js +83 -18
  225. package/dist/commands/bar/bar-server-probe.js.map +1 -1
  226. package/dist/commands/bar/help-subcommand.d.ts.map +1 -1
  227. package/dist/commands/bar/help-subcommand.js +3 -2
  228. package/dist/commands/bar/help-subcommand.js.map +1 -1
  229. package/dist/commands/bar/index.d.ts.map +1 -1
  230. package/dist/commands/bar/index.js +1 -0
  231. package/dist/commands/bar/index.js.map +1 -1
  232. package/dist/commands/bar/install-subcommand.d.ts +4 -10
  233. package/dist/commands/bar/install-subcommand.d.ts.map +1 -1
  234. package/dist/commands/bar/install-subcommand.js +44 -53
  235. package/dist/commands/bar/install-subcommand.js.map +1 -1
  236. package/dist/commands/bar/launch-subcommand.d.ts +11 -1
  237. package/dist/commands/bar/launch-subcommand.d.ts.map +1 -1
  238. package/dist/commands/bar/launch-subcommand.js +82 -15
  239. package/dist/commands/bar/launch-subcommand.js.map +1 -1
  240. package/dist/commands/cliproxy/help-subcommand.js +5 -5
  241. package/dist/commands/cliproxy/help-subcommand.js.map +1 -1
  242. package/dist/commands/cliproxy/index.d.ts.map +1 -1
  243. package/dist/commands/cliproxy/index.js +7 -2
  244. package/dist/commands/cliproxy/index.js.map +1 -1
  245. package/dist/commands/cliproxy/pool-subcommand.d.ts.map +1 -1
  246. package/dist/commands/cliproxy/pool-subcommand.js +4 -2
  247. package/dist/commands/cliproxy/pool-subcommand.js.map +1 -1
  248. package/dist/commands/cliproxy/proxy-lifecycle-subcommand.d.ts +1 -1
  249. package/dist/commands/cliproxy/proxy-lifecycle-subcommand.d.ts.map +1 -1
  250. package/dist/commands/cliproxy/proxy-lifecycle-subcommand.js +13 -1
  251. package/dist/commands/cliproxy/proxy-lifecycle-subcommand.js.map +1 -1
  252. package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.d.ts +26 -0
  253. package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.d.ts.map +1 -0
  254. package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.js +82 -0
  255. package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.js.map +1 -0
  256. package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.d.ts +41 -0
  257. package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.d.ts.map +1 -0
  258. package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.js +202 -0
  259. package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.js.map +1 -0
  260. package/dist/commands/cliproxy/quota-subcommand/format-helpers.d.ts +32 -0
  261. package/dist/commands/cliproxy/quota-subcommand/format-helpers.d.ts.map +1 -0
  262. package/dist/commands/cliproxy/quota-subcommand/format-helpers.js +90 -0
  263. package/dist/commands/cliproxy/quota-subcommand/format-helpers.js.map +1 -0
  264. package/dist/commands/cliproxy/quota-subcommand/handlers.d.ts +25 -0
  265. package/dist/commands/cliproxy/quota-subcommand/handlers.d.ts.map +1 -0
  266. package/dist/commands/cliproxy/quota-subcommand/handlers.js +245 -0
  267. package/dist/commands/cliproxy/quota-subcommand/handlers.js.map +1 -0
  268. package/dist/commands/cliproxy/quota-subcommand/profile-args.d.ts +10 -0
  269. package/dist/commands/cliproxy/quota-subcommand/profile-args.d.ts.map +1 -0
  270. package/dist/commands/cliproxy/quota-subcommand/profile-args.js +37 -0
  271. package/dist/commands/cliproxy/quota-subcommand/profile-args.js.map +1 -0
  272. package/dist/commands/cliproxy/quota-subcommand/provider-runtime.d.ts +12 -0
  273. package/dist/commands/cliproxy/quota-subcommand/provider-runtime.d.ts.map +1 -0
  274. package/dist/commands/cliproxy/quota-subcommand/provider-runtime.js +64 -0
  275. package/dist/commands/cliproxy/quota-subcommand/provider-runtime.js.map +1 -0
  276. package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.d.ts +27 -0
  277. package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.d.ts.map +1 -0
  278. package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.js +74 -0
  279. package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.js.map +1 -0
  280. package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.d.ts +10 -0
  281. package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.d.ts.map +1 -0
  282. package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.js +46 -0
  283. package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.js.map +1 -0
  284. package/dist/commands/cliproxy/quota-subcommand/sections/claude.d.ts +14 -0
  285. package/dist/commands/cliproxy/quota-subcommand/sections/claude.d.ts.map +1 -0
  286. package/dist/commands/cliproxy/quota-subcommand/sections/claude.js +68 -0
  287. package/dist/commands/cliproxy/quota-subcommand/sections/claude.js.map +1 -0
  288. package/dist/commands/cliproxy/quota-subcommand/sections/codex.d.ts +14 -0
  289. package/dist/commands/cliproxy/quota-subcommand/sections/codex.d.ts.map +1 -0
  290. package/dist/commands/cliproxy/quota-subcommand/sections/codex.js +82 -0
  291. package/dist/commands/cliproxy/quota-subcommand/sections/codex.js.map +1 -0
  292. package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.d.ts +14 -0
  293. package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.d.ts.map +1 -0
  294. package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.js +61 -0
  295. package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.js.map +1 -0
  296. package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.d.ts +13 -0
  297. package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.d.ts.map +1 -0
  298. package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.js +63 -0
  299. package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.js.map +1 -0
  300. package/dist/commands/cliproxy/quota-subcommand/test-exports.d.ts +19 -0
  301. package/dist/commands/cliproxy/quota-subcommand/test-exports.d.ts.map +1 -0
  302. package/dist/commands/cliproxy/quota-subcommand/test-exports.js +22 -0
  303. package/dist/commands/cliproxy/quota-subcommand/test-exports.js.map +1 -0
  304. package/dist/commands/cliproxy/quota-subcommand/types.d.ts +42 -0
  305. package/dist/commands/cliproxy/quota-subcommand/types.d.ts.map +1 -0
  306. package/dist/commands/cliproxy/quota-subcommand/types.js +9 -0
  307. package/dist/commands/cliproxy/quota-subcommand/types.js.map +1 -0
  308. package/dist/commands/cliproxy/quota-subcommand.d.ts +14 -36
  309. package/dist/commands/cliproxy/quota-subcommand.d.ts.map +1 -1
  310. package/dist/commands/cliproxy/quota-subcommand.js +21 -872
  311. package/dist/commands/cliproxy/quota-subcommand.js.map +1 -1
  312. package/dist/commands/command-catalog.js +1 -1
  313. package/dist/commands/command-catalog.js.map +1 -1
  314. package/dist/commands/config-channels-command.d.ts +1 -1
  315. package/dist/commands/config-channels-command.d.ts.map +1 -1
  316. package/dist/commands/config-channels-command.js +3 -3
  317. package/dist/commands/config-channels-command.js.map +1 -1
  318. package/dist/commands/config-command-options.d.ts.map +1 -1
  319. package/dist/commands/config-command-options.js +11 -2
  320. package/dist/commands/config-command-options.js.map +1 -1
  321. package/dist/commands/persist-command/arg-parsing.d.ts +14 -0
  322. package/dist/commands/persist-command/arg-parsing.d.ts.map +1 -0
  323. package/dist/commands/persist-command/arg-parsing.js +84 -0
  324. package/dist/commands/persist-command/arg-parsing.js.map +1 -0
  325. package/dist/commands/persist-command/backup-rotation.d.ts +23 -0
  326. package/dist/commands/persist-command/backup-rotation.d.ts.map +1 -0
  327. package/dist/commands/persist-command/backup-rotation.js +265 -0
  328. package/dist/commands/persist-command/backup-rotation.js.map +1 -0
  329. package/dist/commands/persist-command/handler.d.ts +10 -0
  330. package/dist/commands/persist-command/handler.d.ts.map +1 -0
  331. package/dist/commands/persist-command/handler.js +267 -0
  332. package/dist/commands/persist-command/handler.js.map +1 -0
  333. package/dist/commands/persist-command/help.d.ts +9 -0
  334. package/dist/commands/persist-command/help.d.ts.map +1 -0
  335. package/dist/commands/persist-command/help.js +86 -0
  336. package/dist/commands/persist-command/help.js.map +1 -0
  337. package/dist/commands/persist-command/receipt.d.ts +13 -0
  338. package/dist/commands/persist-command/receipt.d.ts.map +1 -0
  339. package/dist/commands/persist-command/receipt.js +102 -0
  340. package/dist/commands/persist-command/receipt.js.map +1 -0
  341. package/dist/commands/persist-command/secret-detection.d.ts +11 -0
  342. package/dist/commands/persist-command/secret-detection.d.ts.map +1 -0
  343. package/dist/commands/persist-command/secret-detection.js +54 -0
  344. package/dist/commands/persist-command/secret-detection.js.map +1 -0
  345. package/dist/commands/persist-command/secure-file.d.ts +21 -0
  346. package/dist/commands/persist-command/secure-file.d.ts.map +1 -0
  347. package/dist/commands/persist-command/secure-file.js +231 -0
  348. package/dist/commands/persist-command/secure-file.js.map +1 -0
  349. package/dist/commands/persist-command/types.d.ts +42 -0
  350. package/dist/commands/persist-command/types.d.ts.map +1 -0
  351. package/dist/commands/persist-command/types.js +34 -0
  352. package/dist/commands/persist-command/types.js.map +1 -0
  353. package/dist/commands/persist-command.d.ts +7 -2
  354. package/dist/commands/persist-command.d.ts.map +1 -1
  355. package/dist/commands/persist-command.js +17 -933
  356. package/dist/commands/persist-command.js.map +1 -1
  357. package/dist/commands/proxy-command.d.ts.map +1 -1
  358. package/dist/commands/proxy-command.js +7 -1
  359. package/dist/commands/proxy-command.js.map +1 -1
  360. package/dist/commands/setup-command.d.ts.map +1 -1
  361. package/dist/commands/setup-command.js +11 -1
  362. package/dist/commands/setup-command.js.map +1 -1
  363. package/dist/commands/tokens-command.d.ts.map +1 -1
  364. package/dist/commands/tokens-command.js +6 -0
  365. package/dist/commands/tokens-command.js.map +1 -1
  366. package/dist/config/config-loader-facade.d.ts +1 -1
  367. package/dist/config/config-loader-facade.d.ts.map +1 -1
  368. package/dist/config/config-loader-facade.js +3 -1
  369. package/dist/config/config-loader-facade.js.map +1 -1
  370. package/dist/config/loader/config-getters.d.ts +16 -0
  371. package/dist/config/loader/config-getters.d.ts.map +1 -1
  372. package/dist/config/loader/config-getters.js +33 -1
  373. package/dist/config/loader/config-getters.js.map +1 -1
  374. package/dist/config/loader/defaults-merger.d.ts.map +1 -1
  375. package/dist/config/loader/defaults-merger.js +4 -0
  376. package/dist/config/loader/defaults-merger.js.map +1 -1
  377. package/dist/config/loader/yaml-serializer.d.ts.map +1 -1
  378. package/dist/config/loader/yaml-serializer.js +13 -0
  379. package/dist/config/loader/yaml-serializer.js.map +1 -1
  380. package/dist/config/schemas/index.d.ts +2 -0
  381. package/dist/config/schemas/index.d.ts.map +1 -1
  382. package/dist/config/schemas/index.js +5 -1
  383. package/dist/config/schemas/index.js.map +1 -1
  384. package/dist/config/schemas/runtime.d.ts +57 -0
  385. package/dist/config/schemas/runtime.d.ts.map +1 -0
  386. package/dist/config/schemas/runtime.js +51 -0
  387. package/dist/config/schemas/runtime.js.map +1 -0
  388. package/dist/config/schemas/unified-config.d.ts +3 -0
  389. package/dist/config/schemas/unified-config.d.ts.map +1 -1
  390. package/dist/config/schemas/unified-config.js.map +1 -1
  391. package/dist/config/unified-config-loader.d.ts +1 -1
  392. package/dist/config/unified-config-loader.d.ts.map +1 -1
  393. package/dist/config/unified-config-loader.js +25 -13
  394. package/dist/config/unified-config-loader.js.map +1 -1
  395. package/dist/copilot/copilot-executor.js +25 -25
  396. package/dist/copilot/copilot-executor.js.map +1 -1
  397. package/dist/cursor/cursor-daemon-entry.d.ts.map +1 -1
  398. package/dist/cursor/cursor-daemon-entry.js +34 -9
  399. package/dist/cursor/cursor-daemon-entry.js.map +1 -1
  400. package/dist/cursor/cursor-daemon.d.ts.map +1 -1
  401. package/dist/cursor/cursor-daemon.js +1 -0
  402. package/dist/cursor/cursor-daemon.js.map +1 -1
  403. package/dist/cursor/cursor-profile-executor.d.ts.map +1 -1
  404. package/dist/cursor/cursor-profile-executor.js +18 -17
  405. package/dist/cursor/cursor-profile-executor.js.map +1 -1
  406. package/dist/delegation/delegation-handler.d.ts.map +1 -1
  407. package/dist/delegation/delegation-handler.js +29 -23
  408. package/dist/delegation/delegation-handler.js.map +1 -1
  409. package/dist/delegation/headless-executor.d.ts +1 -0
  410. package/dist/delegation/headless-executor.d.ts.map +1 -1
  411. package/dist/delegation/headless-executor.js +36 -15
  412. package/dist/delegation/headless-executor.js.map +1 -1
  413. package/dist/delegation/session-manager.d.ts.map +1 -1
  414. package/dist/delegation/session-manager.js +12 -4
  415. package/dist/delegation/session-manager.js.map +1 -1
  416. package/dist/dispatcher/cli-argument-parser.d.ts +1 -1
  417. package/dist/dispatcher/cli-argument-parser.d.ts.map +1 -1
  418. package/dist/dispatcher/cli-argument-parser.js +24 -23
  419. package/dist/dispatcher/cli-argument-parser.js.map +1 -1
  420. package/dist/dispatcher/flows/cliproxy-flow.d.ts.map +1 -1
  421. package/dist/dispatcher/flows/cliproxy-flow.js +12 -15
  422. package/dist/dispatcher/flows/cliproxy-flow.js.map +1 -1
  423. package/dist/dispatcher/flows/copilot-flow.js +1 -1
  424. package/dist/dispatcher/flows/copilot-flow.js.map +1 -1
  425. package/dist/dispatcher/flows/cursor-flow.js +1 -1
  426. package/dist/dispatcher/flows/cursor-flow.js.map +1 -1
  427. package/dist/dispatcher/flows/settings-flow.d.ts.map +1 -1
  428. package/dist/dispatcher/flows/settings-flow.js +32 -29
  429. package/dist/dispatcher/flows/settings-flow.js.map +1 -1
  430. package/dist/dispatcher/pre-dispatch.d.ts.map +1 -1
  431. package/dist/dispatcher/pre-dispatch.js +26 -10
  432. package/dist/dispatcher/pre-dispatch.js.map +1 -1
  433. package/dist/dispatcher/profile-resolver.d.ts +1 -1
  434. package/dist/dispatcher/profile-resolver.d.ts.map +1 -1
  435. package/dist/dispatcher/profile-resolver.js +36 -23
  436. package/dist/dispatcher/profile-resolver.js.map +1 -1
  437. package/dist/docker/supervisord-lifecycle.d.ts.map +1 -1
  438. package/dist/docker/supervisord-lifecycle.js +5 -1
  439. package/dist/docker/supervisord-lifecycle.js.map +1 -1
  440. package/dist/errors/error-types.d.ts +26 -22
  441. package/dist/errors/error-types.d.ts.map +1 -1
  442. package/dist/errors/error-types.js +15 -12
  443. package/dist/errors/error-types.js.map +1 -1
  444. package/dist/errors/exit-codes.d.ts +20 -13
  445. package/dist/errors/exit-codes.d.ts.map +1 -1
  446. package/dist/errors/exit-codes.js +32 -28
  447. package/dist/errors/exit-codes.js.map +1 -1
  448. package/dist/glmt/delta-accumulator.d.ts +1 -0
  449. package/dist/glmt/delta-accumulator.d.ts.map +1 -1
  450. package/dist/glmt/delta-accumulator.js +12 -4
  451. package/dist/glmt/delta-accumulator.js.map +1 -1
  452. package/dist/glmt/glmt-proxy.d.ts.map +1 -1
  453. package/dist/glmt/glmt-proxy.js +39 -10
  454. package/dist/glmt/glmt-proxy.js.map +1 -1
  455. package/dist/glmt/glmt-transformer.d.ts.map +1 -1
  456. package/dist/glmt/glmt-transformer.js +1 -4
  457. package/dist/glmt/glmt-transformer.js.map +1 -1
  458. package/dist/glmt/pipeline/request-transformer.d.ts.map +1 -1
  459. package/dist/glmt/pipeline/request-transformer.js +5 -1
  460. package/dist/glmt/pipeline/request-transformer.js.map +1 -1
  461. package/dist/glmt/pipeline/response-builder.d.ts.map +1 -1
  462. package/dist/glmt/pipeline/response-builder.js +7 -3
  463. package/dist/glmt/pipeline/response-builder.js.map +1 -1
  464. package/dist/glmt/pipeline/stream-parser.d.ts.map +1 -1
  465. package/dist/glmt/pipeline/stream-parser.js +11 -5
  466. package/dist/glmt/pipeline/stream-parser.js.map +1 -1
  467. package/dist/glmt/pipeline/tool-call-handler.d.ts.map +1 -1
  468. package/dist/glmt/pipeline/tool-call-handler.js +7 -1
  469. package/dist/glmt/pipeline/tool-call-handler.js.map +1 -1
  470. package/dist/glmt/sse-parser.d.ts +1 -0
  471. package/dist/glmt/sse-parser.d.ts.map +1 -1
  472. package/dist/glmt/sse-parser.js +7 -3
  473. package/dist/glmt/sse-parser.js.map +1 -1
  474. package/dist/management/checks/cliproxy-check.d.ts.map +1 -1
  475. package/dist/management/checks/cliproxy-check.js +15 -1
  476. package/dist/management/checks/cliproxy-check.js.map +1 -1
  477. package/dist/management/checks/config-check.d.ts.map +1 -1
  478. package/dist/management/checks/config-check.js +4 -1
  479. package/dist/management/checks/config-check.js.map +1 -1
  480. package/dist/management/checks/profile-check.d.ts.map +1 -1
  481. package/dist/management/checks/profile-check.js +10 -6
  482. package/dist/management/checks/profile-check.js.map +1 -1
  483. package/dist/management/doctor.d.ts +7 -0
  484. package/dist/management/doctor.d.ts.map +1 -1
  485. package/dist/management/doctor.js +31 -9
  486. package/dist/management/doctor.js.map +1 -1
  487. package/dist/management/shared-manager/fs-helpers.d.ts +69 -0
  488. package/dist/management/shared-manager/fs-helpers.d.ts.map +1 -0
  489. package/dist/management/shared-manager/fs-helpers.js +241 -0
  490. package/dist/management/shared-manager/fs-helpers.js.map +1 -0
  491. package/dist/management/shared-manager/migrations.d.ts +21 -0
  492. package/dist/management/shared-manager/migrations.d.ts.map +1 -0
  493. package/dist/management/shared-manager/migrations.js +187 -0
  494. package/dist/management/shared-manager/migrations.js.map +1 -0
  495. package/dist/management/shared-manager/orchestrator.d.ts +87 -0
  496. package/dist/management/shared-manager/orchestrator.d.ts.map +1 -0
  497. package/dist/management/shared-manager/orchestrator.js +161 -0
  498. package/dist/management/shared-manager/orchestrator.js.map +1 -0
  499. package/dist/management/shared-manager/plugin-layout-internals.d.ts +42 -0
  500. package/dist/management/shared-manager/plugin-layout-internals.d.ts.map +1 -0
  501. package/dist/management/shared-manager/plugin-layout-internals.js +192 -0
  502. package/dist/management/shared-manager/plugin-layout-internals.js.map +1 -0
  503. package/dist/management/shared-manager/plugin-metadata-normalizer.d.ts +53 -0
  504. package/dist/management/shared-manager/plugin-metadata-normalizer.d.ts.map +1 -0
  505. package/dist/management/shared-manager/plugin-metadata-normalizer.js +253 -0
  506. package/dist/management/shared-manager/plugin-metadata-normalizer.js.map +1 -0
  507. package/dist/management/shared-manager/project-context-sync.d.ts +36 -0
  508. package/dist/management/shared-manager/project-context-sync.d.ts.map +1 -0
  509. package/dist/management/shared-manager/project-context-sync.js +204 -0
  510. package/dist/management/shared-manager/project-context-sync.js.map +1 -0
  511. package/dist/management/shared-manager/project-memory-sync.d.ts +21 -0
  512. package/dist/management/shared-manager/project-memory-sync.d.ts.map +1 -0
  513. package/dist/management/shared-manager/project-memory-sync.js +113 -0
  514. package/dist/management/shared-manager/project-memory-sync.js.map +1 -0
  515. package/dist/management/shared-manager/shared-dir-linker.d.ts +41 -0
  516. package/dist/management/shared-manager/shared-dir-linker.d.ts.map +1 -0
  517. package/dist/management/shared-manager/shared-dir-linker.js +227 -0
  518. package/dist/management/shared-manager/shared-dir-linker.js.map +1 -0
  519. package/dist/management/shared-manager/symlink-helpers.d.ts +61 -0
  520. package/dist/management/shared-manager/symlink-helpers.d.ts.map +1 -0
  521. package/dist/management/shared-manager/symlink-helpers.js +243 -0
  522. package/dist/management/shared-manager/symlink-helpers.js.map +1 -0
  523. package/dist/management/shared-manager/types.d.ts +45 -0
  524. package/dist/management/shared-manager/types.d.ts.map +1 -0
  525. package/dist/management/shared-manager/types.js +57 -0
  526. package/dist/management/shared-manager/types.js.map +1 -0
  527. package/dist/management/shared-manager.d.ts +13 -160
  528. package/dist/management/shared-manager.d.ts.map +1 -1
  529. package/dist/management/shared-manager.js +18 -1294
  530. package/dist/management/shared-manager.js.map +1 -1
  531. package/dist/proxy/proxy-daemon-entry.js +1 -1
  532. package/dist/proxy/proxy-daemon-entry.js.map +1 -1
  533. package/dist/proxy/server/messages-route.d.ts +10 -0
  534. package/dist/proxy/server/messages-route.d.ts.map +1 -1
  535. package/dist/proxy/server/messages-route.js +34 -7
  536. package/dist/proxy/server/messages-route.js.map +1 -1
  537. package/dist/proxy/server/proxy-server.d.ts.map +1 -1
  538. package/dist/proxy/server/proxy-server.js +1 -1
  539. package/dist/proxy/server/proxy-server.js.map +1 -1
  540. package/dist/proxy/transformers/sse-stream-transformer.d.ts.map +1 -1
  541. package/dist/proxy/transformers/sse-stream-transformer.js +12 -17
  542. package/dist/proxy/transformers/sse-stream-transformer.js.map +1 -1
  543. package/dist/services/logging/index.d.ts +1 -1
  544. package/dist/services/logging/index.d.ts.map +1 -1
  545. package/dist/services/logging/index.js +6 -1
  546. package/dist/services/logging/index.js.map +1 -1
  547. package/dist/services/logging/log-context.d.ts +27 -2
  548. package/dist/services/logging/log-context.d.ts.map +1 -1
  549. package/dist/services/logging/log-context.js +43 -4
  550. package/dist/services/logging/log-context.js.map +1 -1
  551. package/dist/services/logging/log-redaction.d.ts +9 -0
  552. package/dist/services/logging/log-redaction.d.ts.map +1 -1
  553. package/dist/services/logging/log-redaction.js +31 -3
  554. package/dist/services/logging/log-redaction.js.map +1 -1
  555. package/dist/services/logging/logger.js +2 -2
  556. package/dist/services/logging/logger.js.map +1 -1
  557. package/dist/shared/provider-preset-catalog.d.ts +1 -1
  558. package/dist/shared/provider-preset-catalog.d.ts.map +1 -1
  559. package/dist/shared/provider-preset-catalog.js +21 -7
  560. package/dist/shared/provider-preset-catalog.js.map +1 -1
  561. package/dist/targets/claude-adapter.d.ts.map +1 -1
  562. package/dist/targets/claude-adapter.js +5 -0
  563. package/dist/targets/claude-adapter.js.map +1 -1
  564. package/dist/targets/codex-adapter.d.ts.map +1 -1
  565. package/dist/targets/codex-adapter.js +11 -10
  566. package/dist/targets/codex-adapter.js.map +1 -1
  567. package/dist/targets/codex-detector.d.ts.map +1 -1
  568. package/dist/targets/codex-detector.js +14 -0
  569. package/dist/targets/codex-detector.js.map +1 -1
  570. package/dist/targets/droid-adapter.d.ts.map +1 -1
  571. package/dist/targets/droid-adapter.js +12 -12
  572. package/dist/targets/droid-adapter.js.map +1 -1
  573. package/dist/ui/assets/{Trans-RG_sMDEu.js → Trans-GYzYLs2D.js} +1 -1
  574. package/dist/ui/assets/{accounts-yTXURc-q.js → accounts-DC1QuyI9.js} +1 -1
  575. package/dist/ui/assets/{alert-dialog-DjvPgzFs.js → alert-dialog-6SiedqmE.js} +1 -1
  576. package/dist/ui/assets/{api-Ck1dtNEM.js → api-3s21dbNJ.js} +1 -1
  577. package/dist/ui/assets/{auth-section-DBnY_LPz.js → auth-section-XBfNgVN4.js} +1 -1
  578. package/dist/ui/assets/{backups-section-Ci-uL4Of.js → backups-section-BidiiVlq.js} +1 -1
  579. package/dist/ui/assets/{channels-BeS9O5q0.js → channels-pfgPUDGt.js} +1 -1
  580. package/dist/ui/assets/{checkbox-DFeFDZBp.js → checkbox-CJw_-nvC.js} +1 -1
  581. package/dist/ui/assets/{claude-extension-DS5qN19Z.js → claude-extension-BIIUOvTJ.js} +1 -1
  582. package/dist/ui/assets/{cliproxy-D7HJH4mZ.js → cliproxy-Cq8OX0Pu.js} +1 -1
  583. package/dist/ui/assets/{cliproxy-ai-providers-oJQZXrtc.js → cliproxy-ai-providers-DI760ZF0.js} +1 -1
  584. package/dist/ui/assets/{cliproxy-control-panel-2mRPEcRj.js → cliproxy-control-panel-CBqvpOqj.js} +1 -1
  585. package/dist/ui/assets/{codex-D0AUQ6jA.js → codex-DL4OLBUu.js} +1 -1
  586. package/dist/ui/assets/{confirm-dialog-B37-CVuq.js → confirm-dialog-CC_Cc3EO.js} +1 -1
  587. package/dist/ui/assets/{copilot-KaaW-mko.js → copilot-D2kEhTXR.js} +1 -1
  588. package/dist/ui/assets/{cursor-BKiTgYi5.js → cursor-BashLrYk.js} +1 -1
  589. package/dist/ui/assets/{droid-DHdqGnFw.js → droid-DaKTINFL.js} +1 -1
  590. package/dist/ui/assets/{globalenv-section-SfZO97nU.js → globalenv-section-BQicL8L0.js} +1 -1
  591. package/dist/ui/assets/{health-CSRS9O0D.js → health-bRbE_ADg.js} +1 -1
  592. package/dist/ui/assets/{index-CGgavq2X.js → index-B2JEyN3d.js} +36 -36
  593. package/dist/ui/assets/{index-Cu_F55_O.js → index-BwZdl1HU.js} +1 -1
  594. package/dist/ui/assets/{index-DWUuSBUe.js → index-CgeAb1-K.js} +1 -1
  595. package/dist/ui/assets/{index-iQuEEGbH.js → index-DAQ0qIQ_.js} +1 -1
  596. package/dist/ui/assets/{index-ChTYEBCZ.js → index-O2x1grGh.js} +1 -1
  597. package/dist/ui/assets/{index-DycwEe96.js → index-WA7tK6np.js} +1 -1
  598. package/dist/ui/assets/{index-DJ66NrBH.js → index-mf2X1GwS.js} +1 -1
  599. package/dist/ui/assets/{logs-tiZ_51mo.js → logs-qrBHUJ0H.js} +1 -1
  600. package/dist/ui/assets/{masked-input-D9FVoeMA.js → masked-input-CXwQ4E-g.js} +1 -1
  601. package/dist/ui/assets/{proxy-status-widget-2k26d8pS.js → proxy-status-widget-DPz4nCzR.js} +1 -1
  602. package/dist/ui/assets/{raw-json-settings-editor-panel-CguBh93H.js → raw-json-settings-editor-panel-CcvsWVh1.js} +1 -1
  603. package/dist/ui/assets/{searchable-select-C4wShshD.js → searchable-select-EXSjNCRu.js} +1 -1
  604. package/dist/ui/assets/{separator-mvGlDdEW.js → separator-D2CTfWBQ.js} +1 -1
  605. package/dist/ui/assets/{shared-Ck0yAwbs.js → shared-DpgzhFqe.js} +1 -1
  606. package/dist/ui/assets/{table-DrUJOxKL.js → table-DwbiGRYk.js} +1 -1
  607. package/dist/ui/assets/{updates-BVHBFcq8.js → updates-D8jfIb2y.js} +1 -1
  608. package/dist/ui/assets/{use-accounts-DLtuaniS.js → use-accounts-Bwtpnx-x.js} +1 -1
  609. package/dist/ui/index.html +1 -1
  610. package/dist/utils/bar-auth-token.d.ts +4 -0
  611. package/dist/utils/bar-auth-token.d.ts.map +1 -0
  612. package/dist/utils/bar-auth-token.js +60 -0
  613. package/dist/utils/bar-auth-token.js.map +1 -0
  614. package/dist/utils/browser/browser-settings.d.ts +3 -1
  615. package/dist/utils/browser/browser-settings.d.ts.map +1 -1
  616. package/dist/utils/browser/browser-settings.js +2 -2
  617. package/dist/utils/browser/browser-settings.js.map +1 -1
  618. package/dist/utils/browser/browser-setup.d.ts.map +1 -1
  619. package/dist/utils/browser/browser-setup.js +3 -1
  620. package/dist/utils/browser/browser-setup.js.map +1 -1
  621. package/dist/utils/browser/browser-status.d.ts.map +1 -1
  622. package/dist/utils/browser/browser-status.js +4 -2
  623. package/dist/utils/browser/browser-status.js.map +1 -1
  624. package/dist/utils/fetch-proxy-setup.d.ts +3 -2
  625. package/dist/utils/fetch-proxy-setup.d.ts.map +1 -1
  626. package/dist/utils/fetch-proxy-setup.js +10 -6
  627. package/dist/utils/fetch-proxy-setup.js.map +1 -1
  628. package/dist/utils/image-analysis/mcp-installer.d.ts.map +1 -1
  629. package/dist/utils/image-analysis/mcp-installer.js +16 -13
  630. package/dist/utils/image-analysis/mcp-installer.js.map +1 -1
  631. package/dist/utils/websearch/index.d.ts +1 -1
  632. package/dist/utils/websearch/index.d.ts.map +1 -1
  633. package/dist/utils/websearch/index.js +2 -1
  634. package/dist/utils/websearch/index.js.map +1 -1
  635. package/dist/utils/websearch/mcp-installer.d.ts +8 -0
  636. package/dist/utils/websearch/mcp-installer.d.ts.map +1 -1
  637. package/dist/utils/websearch/mcp-installer.js +34 -13
  638. package/dist/utils/websearch/mcp-installer.js.map +1 -1
  639. package/dist/utils/websearch-manager.d.ts +1 -1
  640. package/dist/utils/websearch-manager.d.ts.map +1 -1
  641. package/dist/utils/websearch-manager.js +2 -1
  642. package/dist/utils/websearch-manager.js.map +1 -1
  643. package/dist/web-server/middleware/request-logging-middleware.d.ts.map +1 -1
  644. package/dist/web-server/middleware/request-logging-middleware.js +14 -9
  645. package/dist/web-server/middleware/request-logging-middleware.js.map +1 -1
  646. package/dist/web-server/model-pricing.d.ts.map +1 -1
  647. package/dist/web-server/model-pricing.js +22 -2
  648. package/dist/web-server/model-pricing.js.map +1 -1
  649. package/dist/web-server/routes/bar-routes.d.ts +12 -1
  650. package/dist/web-server/routes/bar-routes.d.ts.map +1 -1
  651. package/dist/web-server/routes/bar-routes.js +22 -6
  652. package/dist/web-server/routes/bar-routes.js.map +1 -1
  653. package/dist/web-server/routes/claude-extension-routes.d.ts.map +1 -1
  654. package/dist/web-server/routes/claude-extension-routes.js +3 -2
  655. package/dist/web-server/routes/claude-extension-routes.js.map +1 -1
  656. package/dist/web-server/routes/cliproxy-auth-routes.d.ts +1 -0
  657. package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
  658. package/dist/web-server/routes/cliproxy-auth-routes.js +20 -5
  659. package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
  660. package/dist/web-server/routes/cliproxy-stats-routes/config-routes.d.ts +16 -0
  661. package/dist/web-server/routes/cliproxy-stats-routes/config-routes.d.ts.map +1 -0
  662. package/dist/web-server/routes/cliproxy-stats-routes/config-routes.js +219 -0
  663. package/dist/web-server/routes/cliproxy-stats-routes/config-routes.js.map +1 -0
  664. package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.d.ts +12 -0
  665. package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.d.ts.map +1 -0
  666. package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.js +153 -0
  667. package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.js.map +1 -0
  668. package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.d.ts +19 -0
  669. package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.d.ts.map +1 -0
  670. package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.js +38 -0
  671. package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.js.map +1 -0
  672. package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.d.ts +13 -0
  673. package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.d.ts.map +1 -0
  674. package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.js +195 -0
  675. package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.js.map +1 -0
  676. package/dist/web-server/routes/cliproxy-stats-routes/restart-route.d.ts +17 -0
  677. package/dist/web-server/routes/cliproxy-stats-routes/restart-route.d.ts.map +1 -0
  678. package/dist/web-server/routes/cliproxy-stats-routes/restart-route.js +34 -0
  679. package/dist/web-server/routes/cliproxy-stats-routes/restart-route.js.map +1 -0
  680. package/dist/web-server/routes/cliproxy-stats-routes/router.d.ts +10 -0
  681. package/dist/web-server/routes/cliproxy-stats-routes/router.d.ts.map +1 -0
  682. package/dist/web-server/routes/cliproxy-stats-routes/router.js +245 -0
  683. package/dist/web-server/routes/cliproxy-stats-routes/router.js.map +1 -0
  684. package/dist/web-server/routes/cliproxy-stats-routes/shared.d.ts +35 -0
  685. package/dist/web-server/routes/cliproxy-stats-routes/shared.d.ts.map +1 -0
  686. package/dist/web-server/routes/cliproxy-stats-routes/shared.js +59 -0
  687. package/dist/web-server/routes/cliproxy-stats-routes/shared.js.map +1 -0
  688. package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.d.ts +44 -0
  689. package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.d.ts.map +1 -0
  690. package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.js +66 -0
  691. package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.js.map +1 -0
  692. package/dist/web-server/routes/cliproxy-stats-routes.d.ts +16 -57
  693. package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
  694. package/dist/web-server/routes/cliproxy-stats-routes.js +25 -926
  695. package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
  696. package/dist/web-server/routes/cliproxy-sync-routes.d.ts.map +1 -1
  697. package/dist/web-server/routes/cliproxy-sync-routes.js +9 -2
  698. package/dist/web-server/routes/cliproxy-sync-routes.js.map +1 -1
  699. package/dist/web-server/routes/copilot-settings-routes.d.ts.map +1 -1
  700. package/dist/web-server/routes/copilot-settings-routes.js +2 -1
  701. package/dist/web-server/routes/copilot-settings-routes.js.map +1 -1
  702. package/dist/web-server/routes/cursor-routes.d.ts.map +1 -1
  703. package/dist/web-server/routes/cursor-routes.js +3 -1
  704. package/dist/web-server/routes/cursor-routes.js.map +1 -1
  705. package/dist/web-server/routes/image-analysis-routes.d.ts.map +1 -1
  706. package/dist/web-server/routes/image-analysis-routes.js +2 -1
  707. package/dist/web-server/routes/image-analysis-routes.js.map +1 -1
  708. package/dist/web-server/routes/index.d.ts.map +1 -1
  709. package/dist/web-server/routes/index.js +6 -0
  710. package/dist/web-server/routes/index.js.map +1 -1
  711. package/dist/web-server/routes/persist-routes.d.ts.map +1 -1
  712. package/dist/web-server/routes/persist-routes.js +8 -1
  713. package/dist/web-server/routes/persist-routes.js.map +1 -1
  714. package/dist/web-server/routes/proxy-routes.d.ts.map +1 -1
  715. package/dist/web-server/routes/proxy-routes.js +33 -5
  716. package/dist/web-server/routes/proxy-routes.js.map +1 -1
  717. package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
  718. package/dist/web-server/routes/route-helpers.js +18 -6
  719. package/dist/web-server/routes/route-helpers.js.map +1 -1
  720. package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
  721. package/dist/web-server/routes/settings-routes.js +7 -6
  722. package/dist/web-server/routes/settings-routes.js.map +1 -1
  723. package/dist/web-server/usage/aggregator.d.ts.map +1 -1
  724. package/dist/web-server/usage/aggregator.js +8 -8
  725. package/dist/web-server/usage/aggregator.js.map +1 -1
  726. package/dist/web-server/usage/bar-analytics.d.ts +21 -0
  727. package/dist/web-server/usage/bar-analytics.d.ts.map +1 -1
  728. package/dist/web-server/usage/bar-analytics.js +78 -9
  729. package/dist/web-server/usage/bar-analytics.js.map +1 -1
  730. package/dist/web-server/usage/cliproxy-usage-transformer.d.ts.map +1 -1
  731. package/dist/web-server/usage/cliproxy-usage-transformer.js +9 -4
  732. package/dist/web-server/usage/cliproxy-usage-transformer.js.map +1 -1
  733. package/dist/web-server/usage/codex-local-quota-collector.d.ts +2 -2
  734. package/dist/web-server/usage/codex-local-quota-collector.d.ts.map +1 -1
  735. package/dist/web-server/usage/codex-local-quota-collector.js +39 -11
  736. package/dist/web-server/usage/codex-local-quota-collector.js.map +1 -1
  737. package/dist/web-server/usage/handlers.d.ts.map +1 -1
  738. package/dist/web-server/usage/handlers.js +1 -1
  739. package/dist/web-server/usage/handlers.js.map +1 -1
  740. package/dist/web-server/usage/native-quota-collector.d.ts +37 -9
  741. package/dist/web-server/usage/native-quota-collector.d.ts.map +1 -1
  742. package/dist/web-server/usage/native-quota-collector.js +226 -23
  743. package/dist/web-server/usage/native-quota-collector.js.map +1 -1
  744. package/package.json +1 -1
  745. package/scripts/ci-parity-gate.sh +31 -0
  746. package/scripts/generate-throw-error-baseline.js +103 -0
  747. package/scripts/github/stable-release-issue-cleanup-lib.mjs +51 -11
  748. package/scripts/hardening-inventory.js +62 -4
  749. package/scripts/maintainability-metrics.js +356 -0
@@ -1,828 +1,29 @@
1
1
  "use strict";
2
2
  /**
3
- * Quota Fetcher for Gemini CLI Accounts
3
+ * Quota Fetcher for Gemini CLI Accounts (barrel)
4
4
  *
5
5
  * Fetches quota information from Google Cloud Code internal API.
6
6
  * Used for displaying bucket-based quotas grouped by model series.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.buildGeminiCliBuckets = exports.resolveGeminiCliProjectId = exports.__testExports = exports.fetchAllGeminiCliQuotas = exports.fetchGeminiCliQuota = void 0;
33
- const fs = __importStar(require("node:fs"));
34
- const path = __importStar(require("node:path"));
35
- const config_generator_1 = require("../config/config-generator");
36
- const account_manager_1 = require("../accounts/account-manager");
37
- const auth_utils_1 = require("../auth/auth-utils");
38
- const gemini_cli_quota_normalizer_1 = require("./gemini-cli-quota-normalizer");
39
- const provider_capabilities_1 = require("../provider-capabilities");
40
- const proxy_target_resolver_1 = require("../proxy/proxy-target-resolver");
41
- const provider_entitlement_evidence_1 = require("../auth/provider-entitlement-evidence");
42
- /** Google Cloud Code API endpoints */
43
- const GEMINI_CLI_API_BASE = 'https://cloudcode-pa.googleapis.com';
44
- const GEMINI_CLI_API_VERSION = 'v1internal';
45
- const GEMINI_CLI_QUOTA_URL = `${GEMINI_CLI_API_BASE}/${GEMINI_CLI_API_VERSION}:retrieveUserQuota`;
46
- const GEMINI_CLI_CODE_ASSIST_URL = `${GEMINI_CLI_API_BASE}/${GEMINI_CLI_API_VERSION}:loadCodeAssist`;
47
- const GEMINI_CLI_ERROR_DETAIL_MAX_LENGTH = 320;
48
- const GEMINI_CLI_ERROR_DETAIL_TRUNCATION_SUFFIX = '...[truncated]';
49
- const GEMINI_CLI_G1_CREDIT_TYPE = 'GOOGLE_ONE_AI';
50
- const MANAGEMENT_API_TIMEOUT_MS = 5000;
51
- const SECONDARY_REQUEST_TIMEOUT_MS = 2000;
52
- function getRemainingTimeoutMs(deadlineMs) {
53
- return Math.max(1, deadlineMs - Date.now());
54
- }
55
- /**
56
- * Extract project ID from account field
57
- * Input: "user@example.com (cloudaicompanion-abc-123)"
58
- * Output: "cloudaicompanion-abc-123"
59
- */
60
- function resolveGeminiCliProjectId(accountField) {
61
- const regex = /\(([^()]+)\)/g;
62
- let match;
63
- let lastMatch = null;
64
- while ((match = regex.exec(accountField)) !== null) {
65
- lastMatch = match[1];
66
- }
67
- return lastMatch;
68
- }
69
- exports.resolveGeminiCliProjectId = resolveGeminiCliProjectId;
70
- /**
71
- * Extract access token from Gemini auth file data
72
- * Handles both flat (access_token) and nested (token.access_token) structures
73
- */
74
- function extractAccessToken(data) {
75
- // Flat structure: { access_token: "..." }
76
- if (typeof data.access_token === 'string') {
77
- return data.access_token;
78
- }
79
- // Nested structure: { token: { access_token: "..." } }
80
- if (data.token && typeof data.token === 'object') {
81
- const token = data.token;
82
- if (typeof token.access_token === 'string') {
83
- return token.access_token;
84
- }
85
- }
86
- return null;
87
- }
88
- /**
89
- * Extract expiry from Gemini auth file data
90
- * Handles both flat (expired) and nested (token.expiry) structures
91
- */
92
- function extractExpiry(data) {
93
- // Flat structure: { expired: "..." }
94
- if (typeof data.expired === 'string') {
95
- return data.expired;
96
- }
97
- if (typeof data.expired === 'number') {
98
- return data.expired;
99
- }
100
- // Nested structure: { token: { expiry: "..." } }
101
- if (data.token && typeof data.token === 'object') {
102
- const token = data.token;
103
- if (typeof token.expiry === 'string') {
104
- return token.expiry;
105
- }
106
- if (typeof token.expiry === 'number') {
107
- return token.expiry;
108
- }
109
- }
110
- return null;
111
- }
112
- /**
113
- * Check if file matches Gemini CLI auth file patterns
114
- * Patterns: gemini-*.json OR *-gen-lang-client-*.json OR email@domain.com-*.json with type=gemini
115
- */
116
- function isGeminiAuthFile(filename) {
117
- if (!filename.endsWith('.json'))
118
- return false;
119
- // Legacy pattern: gemini-email.json
120
- if (filename.startsWith('gemini-'))
121
- return true;
122
- // New pattern: email-gen-lang-client-projectId.json
123
- if (filename.includes('-gen-lang-client-'))
124
- return true;
125
- // Check if contains @ (email pattern) - will verify type inside
126
- if (filename.includes('@'))
127
- return true;
128
- return false;
129
- }
130
- function safeParseJson(bodyText) {
131
- try {
132
- return JSON.parse(bodyText);
133
- }
134
- catch {
135
- return null;
136
- }
137
- }
138
- async function readManagedResponse(response, viaManagement) {
139
- const bodyText = await response.text();
140
- return {
141
- status: response.status,
142
- bodyText,
143
- json: safeParseJson(bodyText),
144
- viaManagement,
145
- };
146
- }
147
- function isGeminiAuthFileForAccount(file, accountId) {
148
- const rawProvider = normalizeStringValue(file.provider ?? file.type);
149
- if (!rawProvider || (0, provider_capabilities_1.mapExternalProviderName)(rawProvider) !== 'gemini') {
150
- return false;
151
- }
152
- const email = normalizeStringValue(file.email);
153
- const normalizedAccountId = accountId.trim().toLowerCase();
154
- if (email?.toLowerCase() === normalizedAccountId) {
155
- return true;
156
- }
157
- const normalizedName = normalizeStringValue(file.name);
158
- if (!normalizedName) {
159
- return false;
160
- }
161
- const normalizedFileName = normalizedName.toLowerCase();
162
- const sanitizedAccount = (0, auth_utils_1.sanitizeEmail)(accountId).toLowerCase();
163
- return (normalizedFileName === `gemini-${sanitizedAccount}.json` ||
164
- normalizedFileName.startsWith(`${normalizedAccountId}-gen-lang-client-`) ||
165
- normalizedFileName.includes(sanitizedAccount));
166
- }
167
- async function findManagedGeminiAuthIndex(accountId, timeoutMs) {
168
- const target = (0, proxy_target_resolver_1.getProxyTarget)();
169
- const controller = new AbortController();
170
- const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
171
- try {
172
- const response = await fetch((0, proxy_target_resolver_1.buildProxyUrl)(target, '/v0/management/auth-files'), {
173
- signal: controller.signal,
174
- headers: (0, proxy_target_resolver_1.buildManagementHeaders)(target),
175
- });
176
- clearTimeout(timeoutId);
177
- if (!response.ok) {
178
- return { authIndex: null, unavailable: true };
179
- }
180
- const data = (await response.json());
181
- const match = data.files?.find((file) => isGeminiAuthFileForAccount(file, accountId));
182
- return { authIndex: match?.auth_index ?? null, unavailable: false };
183
- }
184
- catch {
185
- clearTimeout(timeoutId);
186
- return { authIndex: null, unavailable: true };
187
- }
188
- }
189
- async function getManagedGeminiAuthIndex(accountId, timeoutMs, context) {
190
- if (!context) {
191
- return await findManagedGeminiAuthIndex(accountId, timeoutMs);
192
- }
193
- context.authIndexLookupPromise ?? (context.authIndexLookupPromise = findManagedGeminiAuthIndex(accountId, timeoutMs));
194
- return await context.authIndexLookupPromise;
195
- }
196
- class GeminiManagedAuthUnavailableError extends Error {
197
- constructor() {
198
- super('CLIProxy managed Gemini auth is temporarily unavailable');
199
- this.name = 'GeminiManagedAuthUnavailableError';
200
- }
201
- }
202
- async function performManagedGeminiRequest(accountId, url, body, timeoutMs, authContext) {
203
- const deadlineMs = Date.now() + timeoutMs;
204
- const lookupResult = await getManagedGeminiAuthIndex(accountId, getRemainingTimeoutMs(deadlineMs), authContext);
205
- if (lookupResult.unavailable) {
206
- return { response: null, unavailable: true };
207
- }
208
- const authIndex = lookupResult.authIndex;
209
- if (authIndex === null || authIndex === undefined) {
210
- return { response: null, unavailable: false };
211
- }
212
- const target = (0, proxy_target_resolver_1.getProxyTarget)();
213
- const controller = new AbortController();
214
- const timeoutId = setTimeout(() => controller.abort(), getRemainingTimeoutMs(deadlineMs));
215
- try {
216
- const response = await fetch((0, proxy_target_resolver_1.buildProxyUrl)(target, '/v0/management/api-call'), {
217
- method: 'POST',
218
- signal: controller.signal,
219
- headers: (0, proxy_target_resolver_1.buildManagementHeaders)(target, {
220
- 'Content-Type': 'application/json',
221
- }),
222
- body: JSON.stringify({
223
- auth_index: authIndex,
224
- method: 'POST',
225
- url,
226
- header: {
227
- Authorization: 'Bearer $TOKEN$',
228
- 'Content-Type': 'application/json',
229
- },
230
- data: body,
231
- }),
232
- });
233
- clearTimeout(timeoutId);
234
- if (!response.ok) {
235
- return { response: null, unavailable: true };
236
- }
237
- const apiResponse = (await response.json());
238
- const bodyText = typeof apiResponse.body === 'string' ? apiResponse.body : '';
239
- return {
240
- response: {
241
- status: typeof apiResponse.status_code === 'number' ? apiResponse.status_code : 500,
242
- bodyText,
243
- json: safeParseJson(bodyText),
244
- viaManagement: true,
245
- },
246
- unavailable: false,
247
- };
248
- }
249
- catch {
250
- clearTimeout(timeoutId);
251
- return { response: null, unavailable: true };
252
- }
253
- }
254
- async function performGeminiCliRequest(accountId, accessToken, url, body, preferManagement = false, authContext) {
255
- let managementAttempted = false;
256
- let managementUnavailable = false;
257
- if (preferManagement) {
258
- managementAttempted = true;
259
- const managedResult = await performManagedGeminiRequest(accountId, url, body, MANAGEMENT_API_TIMEOUT_MS, authContext);
260
- managementUnavailable = managedResult.unavailable;
261
- if (managedResult.response) {
262
- return managedResult.response;
263
- }
264
- }
265
- const controller = new AbortController();
266
- const timeoutId = setTimeout(() => controller.abort(), managementAttempted ? SECONDARY_REQUEST_TIMEOUT_MS : MANAGEMENT_API_TIMEOUT_MS);
267
- try {
268
- const response = await fetch(url, {
269
- method: 'POST',
270
- signal: controller.signal,
271
- headers: {
272
- Authorization: `Bearer ${accessToken}`,
273
- 'Content-Type': 'application/json',
274
- },
275
- body,
276
- });
277
- clearTimeout(timeoutId);
278
- const directResult = await readManagedResponse(response, false);
279
- if (directResult.status !== 401) {
280
- return directResult;
281
- }
282
- if (managementAttempted) {
283
- if (managementUnavailable) {
284
- throw new GeminiManagedAuthUnavailableError();
285
- }
286
- return directResult;
287
- }
288
- const managedResult = await performManagedGeminiRequest(accountId, url, body, SECONDARY_REQUEST_TIMEOUT_MS, authContext);
289
- if (managedResult.response) {
290
- return managedResult.response;
291
- }
292
- if (managedResult.unavailable) {
293
- throw new GeminiManagedAuthUnavailableError();
294
- }
295
- return directResult;
296
- }
297
- catch (error) {
298
- clearTimeout(timeoutId);
299
- throw error;
300
- }
301
- }
302
- /**
303
- * Read auth data from Gemini CLI auth file
304
- * Supports multiple file naming conventions and JSON structures
305
- */
306
- function readGeminiCliAuthData(accountId) {
307
- const authDirs = [(0, config_generator_1.getAuthDir)(), (0, account_manager_1.getPausedDir)()];
308
- const sanitizedId = (0, auth_utils_1.sanitizeEmail)(accountId);
309
- const expectedFiles = [
310
- `gemini-${sanitizedId}.json`, // Legacy format
311
- `${accountId}-gen-lang-client-`, // New format prefix (partial match)
312
- ];
313
- for (const authDir of authDirs) {
314
- if (!fs.existsSync(authDir))
315
- continue;
316
- // Try exact legacy match first
317
- const legacyPath = path.join(authDir, expectedFiles[0]);
318
- if (fs.existsSync(legacyPath)) {
319
- try {
320
- const content = fs.readFileSync(legacyPath, 'utf-8');
321
- const data = JSON.parse(content);
322
- const accessToken = extractAccessToken(data);
323
- if (accessToken) {
324
- const projectId = typeof data.project_id === 'string'
325
- ? data.project_id
326
- : resolveGeminiCliProjectId(String(data.account || ''));
327
- const expiry = extractExpiry(data);
328
- return {
329
- accessToken,
330
- projectId,
331
- isExpired: (0, auth_utils_1.isTokenExpired)(expiry ?? undefined),
332
- expiresAt: expiry,
333
- };
334
- }
335
- }
336
- catch {
337
- // Continue to fallback
338
- }
339
- }
340
- // Scan directory for matching files
341
- const files = fs.readdirSync(authDir);
342
- for (const file of files) {
343
- if (!isGeminiAuthFile(file))
344
- continue;
345
- const candidatePath = path.join(authDir, file);
346
- try {
347
- const content = fs.readFileSync(candidatePath, 'utf-8');
348
- const data = JSON.parse(content);
349
- // Check if this file matches our account
350
- const fileEmail = typeof data.email === 'string' ? data.email : null;
351
- const fileType = typeof data.type === 'string' ? data.type : null;
352
- const matchesEmail = fileEmail === accountId;
353
- const matchesFilename = file.startsWith(`${accountId}-`) || file.includes(sanitizedId);
354
- const isGeminiType = fileType === 'gemini' || fileType === 'gemini-cli';
355
- // Must match account AND be gemini type (or legacy gemini- prefix)
356
- if ((matchesEmail || matchesFilename) && (isGeminiType || file.startsWith('gemini-'))) {
357
- const accessToken = extractAccessToken(data);
358
- if (accessToken) {
359
- const projectId = typeof data.project_id === 'string'
360
- ? data.project_id
361
- : resolveGeminiCliProjectId(String(data.account || ''));
362
- const expiry = extractExpiry(data);
363
- return {
364
- accessToken,
365
- projectId,
366
- isExpired: (0, auth_utils_1.isTokenExpired)(expiry ?? undefined),
367
- expiresAt: expiry,
368
- };
369
- }
370
- }
371
- }
372
- catch {
373
- continue;
374
- }
375
- }
376
- }
377
- return null;
378
- }
379
- function normalizeStringValue(value) {
380
- return typeof value === 'string' && value.trim().length > 0 ? value.trim() : null;
381
- }
382
- function normalizeNumberValue(value) {
383
- if (typeof value === 'number' && Number.isFinite(value)) {
384
- return value;
385
- }
386
- if (typeof value === 'string' && value.trim().length > 0) {
387
- const parsed = Number(value);
388
- if (Number.isFinite(parsed)) {
389
- return parsed;
390
- }
391
- }
392
- return null;
393
- }
394
- function resolveGeminiCliTierId(payload) {
395
- if (!payload)
396
- return null;
397
- const currentTier = payload.currentTier ?? payload.current_tier;
398
- const paidTier = payload.paidTier ?? payload.paid_tier;
399
- const rawId = normalizeStringValue(paidTier?.id) ?? normalizeStringValue(currentTier?.id);
400
- return rawId ? rawId.toLowerCase() : null;
401
- }
402
- function resolveGeminiCliTierLabel(payload) {
403
- const tierId = resolveGeminiCliTierId(payload);
404
- return (0, provider_entitlement_evidence_1.getProviderTierLabel)(tierId);
405
- }
406
- function resolveGeminiCliCreditBalance(payload) {
407
- if (!payload)
408
- return null;
409
- const paidTier = payload.paidTier ?? payload.paid_tier;
410
- const currentTier = payload.currentTier ?? payload.current_tier;
411
- const tier = paidTier ?? currentTier;
412
- if (!tier)
413
- return null;
414
- const credits = tier.availableCredits ?? tier.available_credits ?? [];
415
- let total = 0;
416
- let found = false;
417
- for (const credit of credits) {
418
- const creditType = normalizeStringValue(credit.creditType ?? credit.credit_type);
419
- if (creditType !== GEMINI_CLI_G1_CREDIT_TYPE)
420
- continue;
421
- const amount = normalizeNumberValue(credit.creditAmount ?? credit.credit_amount);
422
- if (amount !== null) {
423
- total += amount;
424
- found = true;
425
- }
426
- }
427
- return found ? total : null;
428
- }
429
- async function fetchGeminiCliSupplementary(accountId, accessToken, projectId, verbose, authContext) {
430
- const requestBody = JSON.stringify({
431
- cloudaicompanionProject: projectId,
432
- metadata: {
433
- ideType: 'IDE_UNSPECIFIED',
434
- platform: 'PLATFORM_UNSPECIFIED',
435
- pluginType: 'GEMINI',
436
- duetProject: projectId,
437
- },
438
- });
439
- try {
440
- const response = await performGeminiCliRequest(accountId, accessToken, GEMINI_CLI_CODE_ASSIST_URL, requestBody, false, authContext);
441
- if (response.status !== 200) {
442
- if (verbose) {
443
- const source = response.viaManagement ? 'managed' : 'direct';
444
- console.error(`[i] Gemini CLI supplementary metadata unavailable via ${source}: HTTP ${response.status}`);
445
- }
446
- return { tierLabel: null, tierId: null, creditBalance: null, normalizedTier: 'unknown' };
447
- }
448
- const payload = response.json;
449
- return {
450
- tierLabel: resolveGeminiCliTierLabel(payload),
451
- tierId: resolveGeminiCliTierId(payload),
452
- creditBalance: resolveGeminiCliCreditBalance(payload),
453
- normalizedTier: (0, provider_entitlement_evidence_1.normalizeProviderTierId)(resolveGeminiCliTierId(payload)),
454
- };
455
- }
456
- catch (error) {
457
- if (verbose) {
458
- const message = error instanceof Error ? error.message : 'Unknown error';
459
- console.error(`[i] Gemini CLI supplementary metadata skipped: ${message}`);
460
- }
461
- return { tierLabel: null, tierId: null, creditBalance: null, normalizedTier: 'unknown' };
462
- }
463
- }
464
- function buildGeminiCliFailureResult(accountId, projectId, options) {
465
- return {
466
- success: false,
467
- buckets: [],
468
- projectId,
469
- tierLabel: null,
470
- tierId: null,
471
- creditBalance: null,
472
- lastUpdated: Date.now(),
473
- accountId,
474
- error: options.error,
475
- httpStatus: options.httpStatus,
476
- errorCode: options.errorCode,
477
- errorDetail: options.errorDetail,
478
- actionHint: options.actionHint,
479
- retryable: options.retryable,
480
- needsReauth: options.needsReauth,
481
- isForbidden: options.isForbidden,
482
- entitlement: options.entitlement,
483
- };
484
- }
485
- function sanitizeGeminiCliErrorDetail(bodyText) {
486
- const trimmed = bodyText.trim();
487
- if (!trimmed) {
488
- return undefined;
489
- }
490
- if (/^<!doctype html/i.test(trimmed) || /^<html/i.test(trimmed) || /^<[^>]+>/.test(trimmed)) {
491
- return '[HTML error response omitted]';
492
- }
493
- let sanitized = trimmed
494
- .replace(/"(access[_-]?token|refresh[_-]?token|authorization|cookie|set-cookie|api[_-]?key|session[_-]?token|token)"\s*:\s*"[^"]*"/gi, '"$1":"[redacted]"')
495
- .replace(/Bearer\s+[A-Za-z0-9._-]+/g, 'Bearer [redacted]')
496
- .replace(/\s+/g, ' ');
497
- if (sanitized.length > GEMINI_CLI_ERROR_DETAIL_MAX_LENGTH) {
498
- sanitized = `${sanitized.slice(0, GEMINI_CLI_ERROR_DETAIL_MAX_LENGTH - GEMINI_CLI_ERROR_DETAIL_TRUNCATION_SUFFIX.length)}${GEMINI_CLI_ERROR_DETAIL_TRUNCATION_SUFFIX}`;
499
- }
500
- return sanitized;
501
- }
502
- function extractGeminiCliNestedMessage(value) {
503
- if (Array.isArray(value)) {
504
- for (const entry of value) {
505
- const nested = extractGeminiCliNestedMessage(entry);
506
- if (nested)
507
- return nested;
508
- }
509
- return undefined;
510
- }
511
- if (!value || typeof value !== 'object') {
512
- return undefined;
513
- }
514
- const record = value;
515
- const directMessage = [
516
- record.message,
517
- record.localizedMessage,
518
- record.description,
519
- record.reason,
520
- record.error,
521
- ].find((candidate) => typeof candidate === 'string' && candidate.trim().length > 0);
522
- if (directMessage) {
523
- return directMessage;
524
- }
525
- return undefined;
526
- }
527
- function parseGeminiCliErrorBody(bodyText) {
528
- const trimmed = bodyText.trim();
529
- if (!trimmed) {
530
- return {};
531
- }
532
- const sanitizedDetail = sanitizeGeminiCliErrorDetail(trimmed);
533
- try {
534
- const parsed = JSON.parse(trimmed);
535
- const topLevelMessage = [parsed.message, parsed.error].find((candidate) => typeof candidate === 'string' && candidate.trim().length > 0);
536
- const topLevelCode = [parsed.code, parsed.status].find((candidate) => typeof candidate === 'string' && candidate.trim().length > 0);
537
- if (parsed.error && typeof parsed.error === 'object') {
538
- const error = parsed.error;
539
- return {
540
- errorCode: [error.status, error.code, topLevelCode].find((candidate) => typeof candidate === 'string' && candidate.trim().length > 0) || undefined,
541
- errorDetail: sanitizedDetail,
542
- message: [
543
- error.message,
544
- error.error,
545
- extractGeminiCliNestedMessage(error.details),
546
- topLevelMessage,
547
- ].find((candidate) => typeof candidate === 'string' && candidate.trim().length > 0) || undefined,
548
- };
549
- }
550
- return {
551
- errorCode: topLevelCode,
552
- errorDetail: sanitizedDetail,
553
- message: [topLevelMessage, extractGeminiCliNestedMessage(parsed.details)].find((candidate) => typeof candidate === 'string' && candidate.trim().length > 0) || undefined,
554
- };
555
- }
556
- catch {
557
- return {
558
- errorDetail: sanitizedDetail,
559
- message: sanitizedDetail === '[HTML error response omitted]' ? undefined : trimmed,
560
- };
561
- }
562
- }
563
- function buildGeminiCliForbiddenActionHint(parsed) {
564
- const combined = `${parsed.message || ''} ${parsed.errorDetail || ''}`.toLowerCase();
565
- if (combined.includes('verify') || combined.includes('verification')) {
566
- return 'Complete the Google account verification mentioned above, then retry quota refresh.';
567
- }
568
- if (combined.includes('project')) {
569
- return 'Confirm this Google project still has Gemini CLI quota access, then retry.';
570
- }
571
- return 'Check the Google account or workspace access shown above, then retry quota refresh.';
572
- }
573
- function buildGeminiCliHttpFailureResult(accountId, projectId, status, bodyText) {
574
- const parsed = parseGeminiCliErrorBody(bodyText);
575
- if (status === 401) {
576
- return buildGeminiCliFailureResult(accountId, projectId, {
577
- error: parsed.message || 'Token expired or invalid',
578
- httpStatus: 401,
579
- errorCode: parsed.errorCode || 'reauth_required',
580
- errorDetail: parsed.errorDetail,
581
- actionHint: 'Run ccs gemini --auth to reconnect this account.',
582
- needsReauth: true,
583
- retryable: false,
584
- });
585
- }
586
- if (status === 403) {
587
- return buildGeminiCliFailureResult(accountId, projectId, {
588
- error: parsed.message || 'Quota access forbidden for this account',
589
- httpStatus: 403,
590
- errorCode: parsed.errorCode || 'quota_api_forbidden',
591
- errorDetail: parsed.errorDetail,
592
- actionHint: buildGeminiCliForbiddenActionHint(parsed),
593
- isForbidden: true,
594
- retryable: false,
595
- entitlement: (0, provider_entitlement_evidence_1.buildProviderEntitlementEvidence)({
596
- normalizedTier: 'unknown',
597
- source: 'runtime_inference',
598
- confidence: 'medium',
599
- accessState: 'not_entitled',
600
- capacityState: 'unknown',
601
- }),
602
- });
603
- }
604
- if (status === 429) {
605
- if ((0, provider_entitlement_evidence_1.isModelCapacityExhausted)(parsed.message, parsed.errorDetail, parsed.errorCode)) {
606
- return buildGeminiCliFailureResult(accountId, projectId, {
607
- error: parsed.message || 'Model capacity exhausted for this account right now',
608
- httpStatus: 429,
609
- errorCode: 'capacity_exhausted',
610
- errorDetail: parsed.errorDetail,
611
- actionHint: 'Retry later or switch to another Gemini model. This indicates temporary model capacity, not an authentication failure.',
612
- retryable: true,
613
- entitlement: (0, provider_entitlement_evidence_1.buildProviderEntitlementEvidence)({
614
- normalizedTier: 'unknown',
615
- source: 'runtime_inference',
616
- confidence: 'medium',
617
- accessState: 'entitled',
618
- capacityState: 'capacity_exhausted',
619
- notes: 'Upstream returned MODEL_CAPACITY_EXHAUSTED for this model.',
620
- }),
621
- });
622
- }
623
- return buildGeminiCliFailureResult(accountId, projectId, {
624
- error: parsed.message || 'Rate limited - try again later',
625
- httpStatus: 429,
626
- errorCode: parsed.errorCode || 'rate_limited',
627
- errorDetail: parsed.errorDetail,
628
- actionHint: 'Retry after a short delay.',
629
- retryable: true,
630
- entitlement: (0, provider_entitlement_evidence_1.buildProviderEntitlementEvidence)({
631
- normalizedTier: 'unknown',
632
- source: 'runtime_inference',
633
- confidence: 'low',
634
- accessState: 'unknown',
635
- capacityState: 'rate_limited',
636
- }),
637
- });
638
- }
639
- if (status >= 500) {
640
- return buildGeminiCliFailureResult(accountId, projectId, {
641
- error: parsed.message || `Gemini quota service unavailable (HTTP ${status})`,
642
- httpStatus: status,
643
- errorCode: parsed.errorCode || 'provider_unavailable',
644
- errorDetail: parsed.errorDetail,
645
- actionHint: 'Retry later. This looks like a temporary Google upstream problem.',
646
- retryable: true,
647
- });
648
- }
649
- return buildGeminiCliFailureResult(accountId, projectId, {
650
- error: parsed.message || `Gemini quota request failed (HTTP ${status})`,
651
- httpStatus: status,
652
- errorCode: parsed.errorCode || 'quota_request_failed',
653
- errorDetail: parsed.errorDetail,
654
- actionHint: 'Inspect the upstream response details and retry if appropriate.',
655
- retryable: false,
656
- });
657
- }
658
- /**
659
- * Build GeminiCliBucket array from API response
660
- * Groups buckets by model series and token type
661
- */
662
- function buildGeminiCliBuckets(rawBuckets) {
663
- const parsedBuckets = rawBuckets
664
- .map((bucket) => {
665
- const modelId = normalizeStringValue(bucket.model_id ?? bucket.modelId);
666
- if (!modelId)
667
- return null;
668
- const tokenType = normalizeStringValue(bucket.token_type ?? bucket.tokenType);
669
- const remainingFractionRaw = normalizeNumberValue(bucket.remaining_fraction ?? bucket.remainingFraction);
670
- const remainingAmount = normalizeNumberValue(bucket.remaining_amount ?? bucket.remainingAmount);
671
- const resetTime = normalizeStringValue(bucket.reset_time ?? bucket.resetTime);
672
- let fallbackFraction = null;
673
- if (remainingAmount !== null) {
674
- fallbackFraction = remainingAmount <= 0 ? 0 : null;
675
- }
676
- else if (resetTime) {
677
- fallbackFraction = 0;
678
- }
679
- return {
680
- modelId,
681
- tokenType,
682
- remainingFraction: remainingFractionRaw ?? fallbackFraction ?? 1,
683
- remainingAmount,
684
- resetTime,
685
- };
686
- })
687
- .filter((bucket) => bucket !== null);
688
- return (0, gemini_cli_quota_normalizer_1.buildGeminiCliBucketsFromParsedBuckets)(parsedBuckets);
689
- }
690
- exports.buildGeminiCliBuckets = buildGeminiCliBuckets;
691
- /**
692
- * Internal helper: Fetch quota with validated auth data
693
- * Extracted to support auto-refresh retry logic
694
- */
695
- async function fetchWithAuthData(authData, accountId, verbose) {
696
- if (!authData.projectId) {
697
- const error = 'Cannot resolve project ID from auth file';
698
- if (verbose)
699
- console.error(`[!] Error: ${error}`);
700
- return buildGeminiCliFailureResult(accountId, null, {
701
- error,
702
- errorCode: 'missing_project_id',
703
- actionHint: 'Run ccs gemini --auth to reconnect this account and recover the project ID.',
704
- retryable: false,
705
- });
706
- }
707
- const authContext = {};
708
- const supplementaryPromise = fetchGeminiCliSupplementary(accountId, authData.accessToken, authData.projectId, verbose, authContext);
709
- const requestBody = JSON.stringify({ project: authData.projectId });
710
- try {
711
- const response = await performGeminiCliRequest(accountId, authData.accessToken, GEMINI_CLI_QUOTA_URL, requestBody, authData.isExpired, authContext);
712
- if (verbose) {
713
- const source = response.viaManagement ? 'managed' : 'direct';
714
- console.error(`[i] Gemini CLI API status via ${source}: ${response.status}`);
715
- }
716
- if (response.status !== 200) {
717
- return buildGeminiCliHttpFailureResult(accountId, authData.projectId, response.status, response.bodyText);
718
- }
719
- const data = response.json;
720
- const rawBuckets = data?.buckets || [];
721
- const buckets = buildGeminiCliBuckets(rawBuckets);
722
- const supplementary = await supplementaryPromise;
723
- if (verbose)
724
- console.error(`[i] Gemini CLI buckets found: ${buckets.length}`);
725
- if (supplementary.normalizedTier !== 'unknown') {
726
- (0, account_manager_1.setAccountTier)('gemini', accountId, supplementary.normalizedTier);
727
- }
728
- return {
729
- success: true,
730
- buckets,
731
- projectId: authData.projectId,
732
- tierLabel: supplementary.tierLabel,
733
- tierId: supplementary.tierId,
734
- creditBalance: supplementary.creditBalance,
735
- entitlement: (0, provider_entitlement_evidence_1.buildProviderEntitlementEvidence)({
736
- normalizedTier: supplementary.normalizedTier,
737
- rawTierId: supplementary.tierId,
738
- rawTierLabel: supplementary.tierLabel,
739
- source: supplementary.tierId ? 'runtime_api' : 'runtime_inference',
740
- confidence: supplementary.tierId ? 'high' : 'medium',
741
- accessState: 'entitled',
742
- capacityState: 'available',
743
- }),
744
- lastUpdated: Date.now(),
745
- accountId,
746
- };
747
- }
748
- catch (err) {
749
- if (err instanceof GeminiManagedAuthUnavailableError) {
750
- return buildGeminiCliFailureResult(accountId, authData.projectId, {
751
- error: 'Gemini delegated auth refresh is temporarily unavailable',
752
- errorCode: 'managed_auth_unavailable',
753
- errorDetail: err.message,
754
- actionHint: 'Retry later. CLIProxy management could not refresh this Gemini account.',
755
- retryable: true,
756
- });
757
- }
758
- const errorMsg = err instanceof Error && err.name === 'AbortError'
759
- ? 'Request timeout'
760
- : err instanceof Error
761
- ? err.message
762
- : 'Unknown error';
763
- if (verbose)
764
- console.error(`[!] Gemini CLI quota error: ${errorMsg}`);
765
- return buildGeminiCliFailureResult(accountId, authData.projectId, {
766
- error: errorMsg,
767
- errorCode: err instanceof Error && err.name === 'AbortError' ? 'network_timeout' : 'network_error',
768
- actionHint: 'Retry later. This looks temporary.',
769
- retryable: true,
770
- httpStatus: err instanceof Error && err.name === 'AbortError' ? 408 : undefined,
771
- });
772
- }
773
- }
774
- /**
775
- * Fetch quota for a single Gemini CLI account
776
7
  *
777
- * @param accountId - Account identifier (email)
778
- * @param verbose - Show detailed diagnostics
779
- * @returns Quota result with buckets and percentages
780
- */
781
- async function fetchGeminiCliQuota(accountId, verbose = false) {
782
- if (verbose)
783
- console.error(`[i] Fetching Gemini CLI quota for ${accountId}...`);
784
- const authData = readGeminiCliAuthData(accountId);
785
- if (!authData) {
786
- const error = 'Auth file not found for Gemini account';
787
- if (verbose)
788
- console.error(`[!] Error: ${error}`);
789
- return buildGeminiCliFailureResult(accountId, null, {
790
- error,
791
- errorCode: 'auth_file_missing',
792
- actionHint: 'Run ccs gemini --auth to reconnect this account.',
793
- retryable: false,
794
- });
795
- }
796
- if (authData.isExpired && verbose) {
797
- const expiresAt = (0, auth_utils_1.getTokenExpiryTimestamp)(authData.expiresAt);
798
- const expiryLabel = expiresAt ? new Date(expiresAt).toISOString() : 'unknown';
799
- console.error(`[i] Gemini access token is expired (${expiryLabel}); quota requests will defer to managed auth when available.`);
800
- }
801
- return await fetchWithAuthData(authData, accountId, verbose);
802
- }
803
- exports.fetchGeminiCliQuota = fetchGeminiCliQuota;
804
- /**
805
- * Fetch quota for all Gemini CLI accounts
8
+ * This file is a thin re-export barrel. The implementation has been split
9
+ * into focused submodules under `./quota-fetcher-gemini-cli/`:
10
+ * - token-parsing: access token / expiry / project-id extraction
11
+ * - auth-file-discovery: on-disk auth-file lookup and parsing
12
+ * - managed-request: managed (CLIProxy) + direct upstream HTTP paths
13
+ * - supplementary-metadata: tier / credit resolution (loadCodeAssist)
14
+ * - error-parsing: error-body sanitization and failure-result builders
15
+ * - bucket-building: raw bucket -> normalized GeminiCliBucket array
16
+ * - quota-fetcher: top-level fetchGeminiCliQuota orchestration
806
17
  *
807
- * @param verbose - Show detailed diagnostics
808
- * @returns Array of account quotas
18
+ * Public surface is preserved exactly: every previously-importable symbol
19
+ * keeps its name and signature. Token values are never logged.
809
20
  */
810
- async function fetchAllGeminiCliQuotas(verbose = false) {
811
- const accounts = (0, account_manager_1.getProviderAccounts)('gemini');
812
- if (accounts.length === 0) {
813
- return [];
814
- }
815
- const results = await Promise.all(accounts.map(async (account) => ({
816
- account: account.id,
817
- quota: await fetchGeminiCliQuota(account.id, verbose),
818
- })));
819
- return results;
820
- }
821
- exports.fetchAllGeminiCliQuotas = fetchAllGeminiCliQuotas;
822
- exports.__testExports = {
823
- sanitizeGeminiCliErrorDetail,
824
- extractGeminiCliNestedMessage,
825
- parseGeminiCliErrorBody,
826
- buildGeminiCliForbiddenActionHint,
827
- };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.__testExports = exports.buildGeminiCliBuckets = exports.resolveGeminiCliProjectId = exports.fetchAllGeminiCliQuotas = exports.fetchGeminiCliQuota = void 0;
23
+ var index_1 = require("./quota-fetcher-gemini-cli/index");
24
+ Object.defineProperty(exports, "fetchGeminiCliQuota", { enumerable: true, get: function () { return index_1.fetchGeminiCliQuota; } });
25
+ Object.defineProperty(exports, "fetchAllGeminiCliQuotas", { enumerable: true, get: function () { return index_1.fetchAllGeminiCliQuotas; } });
26
+ Object.defineProperty(exports, "resolveGeminiCliProjectId", { enumerable: true, get: function () { return index_1.resolveGeminiCliProjectId; } });
27
+ Object.defineProperty(exports, "buildGeminiCliBuckets", { enumerable: true, get: function () { return index_1.buildGeminiCliBuckets; } });
28
+ Object.defineProperty(exports, "__testExports", { enumerable: true, get: function () { return index_1.__testExports; } });
828
29
  //# sourceMappingURL=quota-fetcher-gemini-cli.js.map