codex-multi-auth 2.16.0 → 2.17.2

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 (303) hide show
  1. package/.codex-plugin/plugin.json +9 -9
  2. package/LICENSE +21 -21
  3. package/README.md +487 -463
  4. package/assets/codex-multi-auth-icon.svg +39 -39
  5. package/assets/readme-hero.svg +31 -31
  6. package/config/README.md +31 -31
  7. package/config/codex-legacy.json +1221 -1221
  8. package/config/codex-modern.json +423 -423
  9. package/config/minimal-codex.json +15 -15
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +8 -3
  12. package/dist/lib/account-policy.d.ts +4 -0
  13. package/dist/lib/account-policy.d.ts.map +1 -1
  14. package/dist/lib/account-policy.js +8 -0
  15. package/dist/lib/accounts/rate-limits.d.ts.map +1 -1
  16. package/dist/lib/accounts/rate-limits.js +2 -0
  17. package/dist/lib/accounts.d.ts +15 -3
  18. package/dist/lib/accounts.d.ts.map +1 -1
  19. package/dist/lib/accounts.js +231 -30
  20. package/dist/lib/api-route-store.d.ts +24 -0
  21. package/dist/lib/api-route-store.d.ts.map +1 -0
  22. package/dist/lib/api-route-store.js +145 -0
  23. package/dist/lib/auth/account-access.d.ts +115 -0
  24. package/dist/lib/auth/account-access.d.ts.map +1 -0
  25. package/dist/lib/auth/account-access.js +214 -0
  26. package/dist/lib/auth/token-utils.d.ts +54 -1
  27. package/dist/lib/auth/token-utils.d.ts.map +1 -1
  28. package/dist/lib/auth/token-utils.js +92 -7
  29. package/dist/lib/cli.d.ts +1 -1
  30. package/dist/lib/cli.d.ts.map +1 -1
  31. package/dist/lib/cli.js +4 -0
  32. package/dist/lib/codex-cli/state.d.ts +7 -0
  33. package/dist/lib/codex-cli/state.d.ts.map +1 -1
  34. package/dist/lib/codex-cli/state.js +18 -0
  35. package/dist/lib/codex-cli/writer.d.ts.map +1 -1
  36. package/dist/lib/codex-cli/writer.js +60 -8
  37. package/dist/lib/codex-manager/account-manager-commands.d.ts.map +1 -1
  38. package/dist/lib/codex-manager/account-manager-commands.js +1 -0
  39. package/dist/lib/codex-manager/account-pool-write.d.ts +3 -1
  40. package/dist/lib/codex-manager/account-pool-write.d.ts.map +1 -1
  41. package/dist/lib/codex-manager/account-pool-write.js +4 -0
  42. package/dist/lib/codex-manager/api-login-menu.d.ts +14 -0
  43. package/dist/lib/codex-manager/api-login-menu.d.ts.map +1 -0
  44. package/dist/lib/codex-manager/api-login-menu.js +224 -0
  45. package/dist/lib/codex-manager/commands/account.d.ts.map +1 -1
  46. package/dist/lib/codex-manager/commands/account.js +27 -0
  47. package/dist/lib/codex-manager/commands/best.d.ts.map +1 -1
  48. package/dist/lib/codex-manager/commands/best.js +6 -2
  49. package/dist/lib/codex-manager/commands/check.d.ts +7 -1
  50. package/dist/lib/codex-manager/commands/check.d.ts.map +1 -1
  51. package/dist/lib/codex-manager/commands/check.js +24 -3
  52. package/dist/lib/codex-manager/commands/forecast.d.ts +1 -1
  53. package/dist/lib/codex-manager/commands/forecast.d.ts.map +1 -1
  54. package/dist/lib/codex-manager/commands/forecast.js +7 -3
  55. package/dist/lib/codex-manager/commands/report.d.ts.map +1 -1
  56. package/dist/lib/codex-manager/commands/report.js +5 -1
  57. package/dist/lib/codex-manager/commands/resets.d.ts +2 -0
  58. package/dist/lib/codex-manager/commands/resets.d.ts.map +1 -0
  59. package/dist/lib/codex-manager/commands/resets.js +67 -0
  60. package/dist/lib/codex-manager/commands/rotation.d.ts +2 -2
  61. package/dist/lib/codex-manager/commands/rotation.d.ts.map +1 -1
  62. package/dist/lib/codex-manager/commands/rotation.js +63 -12
  63. package/dist/lib/codex-manager/commands/status.d.ts +12 -1
  64. package/dist/lib/codex-manager/commands/status.d.ts.map +1 -1
  65. package/dist/lib/codex-manager/commands/status.js +166 -22
  66. package/dist/lib/codex-manager/commands/uninstall.js +1 -1
  67. package/dist/lib/codex-manager/formatters/quota-formatters.d.ts.map +1 -1
  68. package/dist/lib/codex-manager/formatters/quota-formatters.js +3 -2
  69. package/dist/lib/codex-manager/health-check.d.ts +3 -0
  70. package/dist/lib/codex-manager/health-check.d.ts.map +1 -1
  71. package/dist/lib/codex-manager/health-check.js +57 -7
  72. package/dist/lib/codex-manager/help.d.ts.map +1 -1
  73. package/dist/lib/codex-manager/help.js +4 -2
  74. package/dist/lib/codex-manager/login-flow.d.ts.map +1 -1
  75. package/dist/lib/codex-manager/login-flow.js +69 -7
  76. package/dist/lib/codex-manager/login-menu-data.d.ts.map +1 -1
  77. package/dist/lib/codex-manager/login-menu-data.js +21 -8
  78. package/dist/lib/codex-manager/login-oauth.d.ts +3 -0
  79. package/dist/lib/codex-manager/login-oauth.d.ts.map +1 -1
  80. package/dist/lib/codex-manager/login-oauth.js +6 -1
  81. package/dist/lib/codex-manager/login-workspace-choice.d.ts +11 -0
  82. package/dist/lib/codex-manager/login-workspace-choice.d.ts.map +1 -0
  83. package/dist/lib/codex-manager/login-workspace-choice.js +37 -0
  84. package/dist/lib/codex-manager/persist-selected-account.d.ts.map +1 -1
  85. package/dist/lib/codex-manager/persist-selected-account.js +2 -1
  86. package/dist/lib/codex-manager/quota-cache-helpers.d.ts +7 -1
  87. package/dist/lib/codex-manager/quota-cache-helpers.d.ts.map +1 -1
  88. package/dist/lib/codex-manager/quota-cache-helpers.js +34 -19
  89. package/dist/lib/codex-manager/repair-commands.d.ts +13 -0
  90. package/dist/lib/codex-manager/repair-commands.d.ts.map +1 -1
  91. package/dist/lib/codex-manager/repair-commands.js +144 -9
  92. package/dist/lib/codex-manager.d.ts.map +1 -1
  93. package/dist/lib/codex-manager.js +25 -6
  94. package/dist/lib/concurrency.d.ts +3 -0
  95. package/dist/lib/concurrency.d.ts.map +1 -0
  96. package/dist/lib/concurrency.js +31 -0
  97. package/dist/lib/context-budget-response.js +8 -8
  98. package/dist/lib/context-overflow.js +10 -10
  99. package/dist/lib/model-route-policy.d.ts +52 -0
  100. package/dist/lib/model-route-policy.d.ts.map +1 -0
  101. package/dist/lib/model-route-policy.js +159 -0
  102. package/dist/lib/oauth-success.html +125 -125
  103. package/dist/lib/policy/runtime-policy.d.ts +1 -0
  104. package/dist/lib/policy/runtime-policy.d.ts.map +1 -1
  105. package/dist/lib/policy/runtime-policy.js +3 -0
  106. package/dist/lib/preemptive-quota-scheduler.d.ts +2 -0
  107. package/dist/lib/preemptive-quota-scheduler.d.ts.map +1 -1
  108. package/dist/lib/preemptive-quota-scheduler.js +4 -0
  109. package/dist/lib/prompts/codex-host-bridge.js +138 -138
  110. package/dist/lib/prompts/codex.js +79 -79
  111. package/dist/lib/quota-cache.d.ts +7 -3
  112. package/dist/lib/quota-cache.d.ts.map +1 -1
  113. package/dist/lib/quota-cache.js +91 -59
  114. package/dist/lib/quota-probe.d.ts +5 -0
  115. package/dist/lib/quota-probe.d.ts.map +1 -1
  116. package/dist/lib/quota-probe.js +26 -2
  117. package/dist/lib/quota-readiness.d.ts +7 -2
  118. package/dist/lib/quota-readiness.d.ts.map +1 -1
  119. package/dist/lib/quota-readiness.js +25 -4
  120. package/dist/lib/request/client-cancellation.d.ts +5 -0
  121. package/dist/lib/request/client-cancellation.d.ts.map +1 -0
  122. package/dist/lib/request/client-cancellation.js +7 -0
  123. package/dist/lib/request/response-outcome.d.ts +25 -0
  124. package/dist/lib/request/response-outcome.d.ts.map +1 -0
  125. package/dist/lib/request/response-outcome.js +49 -0
  126. package/dist/lib/request/stream-failover-runtime.d.ts +2 -1
  127. package/dist/lib/request/stream-failover-runtime.d.ts.map +1 -1
  128. package/dist/lib/request/stream-failover-runtime.js +29 -10
  129. package/dist/lib/runtime/account-check.d.ts.map +1 -1
  130. package/dist/lib/runtime/account-check.js +2 -8
  131. package/dist/lib/runtime/account-model-catalog.d.ts +64 -0
  132. package/dist/lib/runtime/account-model-catalog.d.ts.map +1 -0
  133. package/dist/lib/runtime/account-model-catalog.js +154 -0
  134. package/dist/lib/runtime/account-pool.d.ts +3 -1
  135. package/dist/lib/runtime/account-pool.d.ts.map +1 -1
  136. package/dist/lib/runtime/account-pool.js +4 -0
  137. package/dist/lib/runtime/account-reset-credits.d.ts +42 -0
  138. package/dist/lib/runtime/account-reset-credits.d.ts.map +1 -0
  139. package/dist/lib/runtime/account-reset-credits.js +82 -0
  140. package/dist/lib/runtime/api-model-capabilities.d.ts +30 -0
  141. package/dist/lib/runtime/api-model-capabilities.d.ts.map +1 -0
  142. package/dist/lib/runtime/api-model-capabilities.js +434 -0
  143. package/dist/lib/runtime/api-model-runtime.d.ts +42 -0
  144. package/dist/lib/runtime/api-model-runtime.d.ts.map +1 -0
  145. package/dist/lib/runtime/api-model-runtime.js +358 -0
  146. package/dist/lib/runtime/app-bind.d.ts +19 -1
  147. package/dist/lib/runtime/app-bind.d.ts.map +1 -1
  148. package/dist/lib/runtime/app-bind.js +89 -11
  149. package/dist/lib/runtime/automatic-account-checks.d.ts +35 -0
  150. package/dist/lib/runtime/automatic-account-checks.d.ts.map +1 -0
  151. package/dist/lib/runtime/automatic-account-checks.js +140 -0
  152. package/dist/lib/runtime/automatic-subscription-checks.d.ts +7 -0
  153. package/dist/lib/runtime/automatic-subscription-checks.d.ts.map +1 -0
  154. package/dist/lib/runtime/automatic-subscription-checks.js +54 -0
  155. package/dist/lib/runtime/catalog-capabilities.d.ts +8 -0
  156. package/dist/lib/runtime/catalog-capabilities.d.ts.map +1 -0
  157. package/dist/lib/runtime/catalog-capabilities.js +61 -0
  158. package/dist/lib/runtime/inference-activity.d.ts +15 -0
  159. package/dist/lib/runtime/inference-activity.d.ts.map +1 -0
  160. package/dist/lib/runtime/inference-activity.js +95 -0
  161. package/dist/lib/runtime/model-discovery-status.d.ts +100 -0
  162. package/dist/lib/runtime/model-discovery-status.d.ts.map +1 -0
  163. package/dist/lib/runtime/model-discovery-status.js +387 -0
  164. package/dist/lib/runtime/native-account-storage.d.ts +11 -0
  165. package/dist/lib/runtime/native-account-storage.d.ts.map +1 -0
  166. package/dist/lib/runtime/native-account-storage.js +50 -0
  167. package/dist/lib/runtime/native-account-sync.d.ts +19 -0
  168. package/dist/lib/runtime/native-account-sync.d.ts.map +1 -0
  169. package/dist/lib/runtime/native-account-sync.js +62 -0
  170. package/dist/lib/runtime/native-binding-lock.d.ts +3 -0
  171. package/dist/lib/runtime/native-binding-lock.d.ts.map +1 -0
  172. package/dist/lib/runtime/native-binding-lock.js +5 -0
  173. package/dist/lib/runtime/native-client-auth.d.ts +3 -0
  174. package/dist/lib/runtime/native-client-auth.d.ts.map +1 -0
  175. package/dist/lib/runtime/native-client-auth.js +42 -0
  176. package/dist/lib/runtime/native-provider-config.d.ts +4 -0
  177. package/dist/lib/runtime/native-provider-config.d.ts.map +1 -0
  178. package/dist/lib/runtime/native-provider-config.js +52 -0
  179. package/dist/lib/runtime/native-rate-limits.d.ts +18 -0
  180. package/dist/lib/runtime/native-rate-limits.d.ts.map +1 -0
  181. package/dist/lib/runtime/native-rate-limits.js +135 -0
  182. package/dist/lib/runtime/reset-credit-routing.d.ts +41 -0
  183. package/dist/lib/runtime/reset-credit-routing.d.ts.map +1 -0
  184. package/dist/lib/runtime/reset-credit-routing.js +66 -0
  185. package/dist/lib/runtime/reset-credits.d.ts +101 -0
  186. package/dist/lib/runtime/reset-credits.d.ts.map +1 -0
  187. package/dist/lib/runtime/reset-credits.js +162 -0
  188. package/dist/lib/runtime/response-output-history.d.ts +17 -0
  189. package/dist/lib/runtime/response-output-history.d.ts.map +1 -0
  190. package/dist/lib/runtime/response-output-history.js +85 -0
  191. package/dist/lib/runtime/responses-websocket.d.ts +31 -0
  192. package/dist/lib/runtime/responses-websocket.d.ts.map +1 -0
  193. package/dist/lib/runtime/responses-websocket.js +636 -0
  194. package/dist/lib/runtime/resume-picker.d.ts +41 -0
  195. package/dist/lib/runtime/resume-picker.d.ts.map +1 -0
  196. package/dist/lib/runtime/resume-picker.js +169 -0
  197. package/dist/lib/runtime/rotation-account-selection.d.ts +6 -0
  198. package/dist/lib/runtime/rotation-account-selection.d.ts.map +1 -1
  199. package/dist/lib/runtime/rotation-account-selection.js +63 -0
  200. package/dist/lib/runtime/rotation-proxy-state.d.ts +33 -0
  201. package/dist/lib/runtime/rotation-proxy-state.d.ts.map +1 -1
  202. package/dist/lib/runtime/rotation-server-types.d.ts +18 -0
  203. package/dist/lib/runtime/rotation-server-types.d.ts.map +1 -1
  204. package/dist/lib/runtime/runtime-capability-failures.d.ts +14 -0
  205. package/dist/lib/runtime/runtime-capability-failures.d.ts.map +1 -0
  206. package/dist/lib/runtime/runtime-capability-failures.js +76 -0
  207. package/dist/lib/runtime/runtime-observability.d.ts +7 -0
  208. package/dist/lib/runtime/runtime-observability.d.ts.map +1 -1
  209. package/dist/lib/runtime/runtime-observability.js +42 -2
  210. package/dist/lib/runtime/subscription-first-use.d.ts +10 -0
  211. package/dist/lib/runtime/subscription-first-use.d.ts.map +1 -0
  212. package/dist/lib/runtime/subscription-first-use.js +64 -0
  213. package/dist/lib/runtime/subscription-quota-event.d.ts +6 -0
  214. package/dist/lib/runtime/subscription-quota-event.d.ts.map +1 -0
  215. package/dist/lib/runtime/subscription-quota-event.js +31 -0
  216. package/dist/lib/runtime/subscription-quota-order.d.ts +17 -0
  217. package/dist/lib/runtime/subscription-quota-order.d.ts.map +1 -0
  218. package/dist/lib/runtime/subscription-quota-order.js +31 -0
  219. package/dist/lib/runtime/workspace-model-scopes.d.ts +15 -0
  220. package/dist/lib/runtime/workspace-model-scopes.d.ts.map +1 -0
  221. package/dist/lib/runtime/workspace-model-scopes.js +34 -0
  222. package/dist/lib/runtime-constants.d.ts +3 -0
  223. package/dist/lib/runtime-constants.d.ts.map +1 -1
  224. package/dist/lib/runtime-constants.js +5 -0
  225. package/dist/lib/runtime-paths.d.ts.map +1 -1
  226. package/dist/lib/runtime-paths.js +4 -1
  227. package/dist/lib/runtime-rotation-proxy.d.ts.map +1 -1
  228. package/dist/lib/runtime-rotation-proxy.js +852 -42
  229. package/dist/lib/schemas.d.ts +20 -0
  230. package/dist/lib/schemas.d.ts.map +1 -1
  231. package/dist/lib/schemas.js +3 -0
  232. package/dist/lib/storage/credential-sidecars.d.ts +13 -0
  233. package/dist/lib/storage/credential-sidecars.d.ts.map +1 -0
  234. package/dist/lib/storage/credential-sidecars.js +52 -0
  235. package/dist/lib/storage/file-lock.d.ts +9 -0
  236. package/dist/lib/storage/file-lock.d.ts.map +1 -0
  237. package/dist/lib/storage/file-lock.js +186 -0
  238. package/dist/lib/storage/flagged-storage.d.ts.map +1 -1
  239. package/dist/lib/storage/flagged-storage.js +12 -0
  240. package/dist/lib/storage/path-state.d.ts +2 -0
  241. package/dist/lib/storage/path-state.d.ts.map +1 -1
  242. package/dist/lib/storage/path-state.js +9 -0
  243. package/dist/lib/storage/paths.js +4 -4
  244. package/dist/lib/storage/pending-auth.d.ts +18 -0
  245. package/dist/lib/storage/pending-auth.d.ts.map +1 -0
  246. package/dist/lib/storage/pending-auth.js +155 -0
  247. package/dist/lib/storage/public-types.d.ts +13 -0
  248. package/dist/lib/storage/public-types.d.ts.map +1 -1
  249. package/dist/lib/storage/record-identity.d.ts +16 -0
  250. package/dist/lib/storage/record-identity.d.ts.map +1 -0
  251. package/dist/lib/storage/record-identity.js +16 -0
  252. package/dist/lib/storage/snapshot-merge.d.ts +16 -0
  253. package/dist/lib/storage/snapshot-merge.d.ts.map +1 -0
  254. package/dist/lib/storage/snapshot-merge.js +206 -0
  255. package/dist/lib/storage/transactions.d.ts.map +1 -1
  256. package/dist/lib/storage/transactions.js +5 -4
  257. package/dist/lib/storage.d.ts +6 -0
  258. package/dist/lib/storage.d.ts.map +1 -1
  259. package/dist/lib/storage.js +77 -7
  260. package/dist/lib/ui/auth-menu-builder.d.ts +2 -0
  261. package/dist/lib/ui/auth-menu-builder.d.ts.map +1 -1
  262. package/dist/lib/ui/auth-menu-builder.js +1 -0
  263. package/dist/lib/ui/auth-menu.d.ts.map +1 -1
  264. package/dist/lib/ui/auth-menu.js +1 -0
  265. package/dist/lib/ui/check-progress.d.ts +8 -0
  266. package/dist/lib/ui/check-progress.d.ts.map +1 -0
  267. package/dist/lib/ui/check-progress.js +30 -0
  268. package/dist/lib/ui/format.d.ts +3 -1
  269. package/dist/lib/ui/format.d.ts.map +1 -1
  270. package/dist/lib/ui/format.js +8 -0
  271. package/dist/lib/ui/ui-copy.d.ts +2 -2
  272. package/dist/lib/ui/ui-copy.js +2 -2
  273. package/dist/lib/usage/pricing.js +2 -2
  274. package/dist/lib/usage/usage-extraction.d.ts +3 -1
  275. package/dist/lib/usage/usage-extraction.d.ts.map +1 -1
  276. package/dist/lib/usage/usage-extraction.js +46 -9
  277. package/node_modules/@codex-ai/plugin/dist/index.d.ts +2 -2
  278. package/node_modules/@codex-ai/plugin/dist/index.js +2 -2
  279. package/node_modules/@codex-ai/plugin/dist/tool.d.ts +42 -42
  280. package/node_modules/@codex-ai/plugin/dist/tool.js +29 -29
  281. package/node_modules/@codex-ai/plugin/package.json +9 -9
  282. package/node_modules/@codex-ai/sdk/dist/index.d.ts +4 -4
  283. package/node_modules/@codex-ai/sdk/dist/index.js +2 -2
  284. package/node_modules/@codex-ai/sdk/package.json +8 -8
  285. package/package.json +200 -197
  286. package/scripts/codex-app-launcher.js +653 -653
  287. package/scripts/codex-app-router.js +373 -366
  288. package/scripts/codex-bin-resolver.js +313 -281
  289. package/scripts/codex-multi-auth.js +59 -59
  290. package/scripts/codex-routing.js +62 -61
  291. package/scripts/codex.js +6642 -6564
  292. package/scripts/install-codex-auth-utils.js +213 -213
  293. package/scripts/mcodex.js +367 -367
  294. package/scripts/postinstall.js +114 -114
  295. package/scripts/preuninstall.js +265 -265
  296. package/vendor/codex-ai-plugin/dist/index.d.ts +2 -2
  297. package/vendor/codex-ai-plugin/dist/index.js +2 -2
  298. package/vendor/codex-ai-plugin/dist/tool.d.ts +42 -42
  299. package/vendor/codex-ai-plugin/dist/tool.js +29 -29
  300. package/vendor/codex-ai-plugin/package.json +9 -9
  301. package/vendor/codex-ai-sdk/dist/index.d.ts +4 -4
  302. package/vendor/codex-ai-sdk/dist/index.js +2 -2
  303. package/vendor/codex-ai-sdk/package.json +8 -8
@@ -0,0 +1,64 @@
1
+ import { createUsageStreamScanner } from "../usage/usage-extraction.js";
2
+ import { isRecord } from "../utils.js";
3
+ /** Only personal included subscriptions may receive an automatic first-use probe. */
4
+ export function needsSubscriptionFirstUse(snapshot, now) {
5
+ if (snapshot.status !== 200 || !["plus", "pro", "prolite"].includes(snapshot.planType?.toLowerCase() ?? ""))
6
+ return false;
7
+ const allWindows = [snapshot.primary, snapshot.secondary];
8
+ if (allWindows.some(window => typeof window.usedPercent === "number" && window.usedPercent !== 0))
9
+ return false;
10
+ const windows = allWindows.filter(window => window.windowMinutes !== 0);
11
+ if (!windows.length || windows.some(window => window.usedPercent !== 0))
12
+ return false;
13
+ // A full relative window can be a placeholder on an unused account. A
14
+ // countdown already shorter than its duration needs no extra consumption.
15
+ return windows.every(window => window.resetAtMs === undefined ||
16
+ (typeof window.windowMinutes === "number" && window.windowMinutes > 0 &&
17
+ window.resetAtMs - now >= window.windowMinutes * 60_000 - 2_000));
18
+ }
19
+ export class FirstUseProbeError extends Error {
20
+ reason;
21
+ constructor(reason = "stream ended early") {
22
+ super(`First-use probe did not complete (${reason}); reset timer is unconfirmed.`);
23
+ this.reason = reason;
24
+ }
25
+ }
26
+ /** Consume the already-open tiny response, never start a second request. */
27
+ export async function finishSubscriptionFirstUse(response, timeoutMs) {
28
+ if (!response.body)
29
+ throw new FirstUseProbeError();
30
+ const reader = response.body.getReader();
31
+ let completed = false, failed = false, bytes = 0;
32
+ const scanner = createUsageStreamScanner({ contentType: "text/event-stream", onEvent(event) {
33
+ if (!isRecord(event))
34
+ return;
35
+ if (event.type === "response.completed" || (event.type === "response.done" && isRecord(event.response) && event.response.status === "completed"))
36
+ completed = true;
37
+ if (["response.failed", "response.incomplete", "error"].includes(String(event.type)))
38
+ failed = true;
39
+ } });
40
+ let timer;
41
+ const expired = new Promise((_, reject) => { timer = setTimeout(() => reject(new FirstUseProbeError("timed out")), timeoutMs); });
42
+ try {
43
+ while (!completed && !failed) {
44
+ const chunk = await Promise.race([reader.read(), expired]);
45
+ if (chunk.done) {
46
+ scanner.result();
47
+ break;
48
+ }
49
+ bytes += chunk.value.byteLength;
50
+ if (bytes > 1024 * 1024)
51
+ throw new FirstUseProbeError("response too large");
52
+ scanner.push(chunk.value);
53
+ }
54
+ if (!completed || failed)
55
+ throw new FirstUseProbeError(failed ? "upstream failed" : "stream ended early");
56
+ }
57
+ catch (error) {
58
+ throw error instanceof FirstUseProbeError ? error : new FirstUseProbeError("network error");
59
+ }
60
+ finally {
61
+ clearTimeout(timer);
62
+ void reader.cancel().catch(() => undefined);
63
+ }
64
+ }
@@ -0,0 +1,6 @@
1
+ import type { QuotaSchedulerSnapshot } from "../preemptive-quota-scheduler.js";
2
+ /** Native codex.rate_limits frames carry quota on every reused WebSocket turn. */
3
+ export declare function readSubscriptionQuotaEvent(event: unknown, now: number): (QuotaSchedulerSnapshot & {
4
+ planType?: string;
5
+ }) | null;
6
+ //# sourceMappingURL=subscription-quota-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-quota-event.d.ts","sourceRoot":"","sources":["../../../lib/runtime/subscription-quota-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAwB,MAAM,kCAAkC,CAAC;AAerG,kFAAkF;AAClF,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,MAAM,GACT,CAAC,sBAAsB,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,CAYzD"}
@@ -0,0 +1,31 @@
1
+ import { isRecord } from "../utils.js";
2
+ function windowFromEvent(value) {
3
+ if (!isRecord(value))
4
+ return {};
5
+ const used = value.used_percent;
6
+ if (typeof used !== "number" || !Number.isFinite(used) || used < 0 || used > 100)
7
+ return {};
8
+ const reset = value.reset_at;
9
+ return {
10
+ usedPercent: used,
11
+ ...(typeof reset === "number" && Number.isSafeInteger(reset) && reset > 0 && Number.isSafeInteger(reset * 1000)
12
+ ? { resetAtMs: reset * 1000 } : {}),
13
+ };
14
+ }
15
+ /** Native codex.rate_limits frames carry quota on every reused WebSocket turn. */
16
+ export function readSubscriptionQuotaEvent(event, now) {
17
+ if (!isRecord(event) || event.type !== "codex.rate_limits" || !isRecord(event.rate_limits))
18
+ return null;
19
+ // Distinct metered pools must not overwrite the ordinary subscription balance.
20
+ const limit = event.metered_limit_name ?? event.limit_name;
21
+ if (limit !== undefined && limit !== null && (typeof limit !== "string" || limit.trim().toLowerCase() !== "codex"))
22
+ return null;
23
+ const primary = windowFromEvent(event.rate_limits.primary);
24
+ const secondary = windowFromEvent(event.rate_limits.secondary);
25
+ if (primary.usedPercent === undefined && secondary.usedPercent === undefined)
26
+ return null;
27
+ return {
28
+ status: 200, updatedAt: now, primary, secondary,
29
+ ...(typeof event.plan_type === "string" ? { planType: event.plan_type } : {}),
30
+ };
31
+ }
@@ -0,0 +1,17 @@
1
+ import type { QuotaCacheEntry } from "../quota-cache.js";
2
+ export interface SubscriptionQuotaPreference {
3
+ plan: "subscription" | "free" | "unknown";
4
+ remainingPercent: number | null;
5
+ resetAtMs: number | null;
6
+ urgency: number | null;
7
+ exhausted: boolean;
8
+ observedAt: number | null;
9
+ }
10
+ export declare const SUBSCRIPTION_RESERVE_PERCENT = 5;
11
+ export declare const SUBSCRIPTION_QUOTA_MAX_AGE_MS: number;
12
+ /** Scheduling hint only; percentages are not comparable dollar/token balances. */
13
+ export declare function subscriptionQuotaPreference(entry: QuotaCacheEntry | null | undefined, now: number): SubscriptionQuotaPreference;
14
+ export declare function usesSubscriptionReserve(preference: SubscriptionQuotaPreference | undefined): boolean;
15
+ /** Negative means a should be used first. Equal hints leave existing health/affinity scoring intact. */
16
+ export declare function compareSubscriptionQuota(a: SubscriptionQuotaPreference, b: SubscriptionQuotaPreference): number;
17
+ //# sourceMappingURL=subscription-quota-order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-quota-order.d.ts","sourceRoot":"","sources":["../../../lib/runtime/subscription-quota-order.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AACD,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,6BAA6B,QAAc,CAAC;AAEzD,kFAAkF;AAClF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,2BAA2B,CAiB/H;AACD,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,2BAA2B,GAAG,SAAS,GAAG,OAAO,CAEpG;AACD,wGAAwG;AACxG,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,2BAA2B,EAAE,CAAC,EAAE,2BAA2B,GAAG,MAAM,CAE/G"}
@@ -0,0 +1,31 @@
1
+ import { isQuotaCacheEntryExhausted } from "../quota-readiness.js";
2
+ export const SUBSCRIPTION_RESERVE_PERCENT = 5;
3
+ export const SUBSCRIPTION_QUOTA_MAX_AGE_MS = 15 * 60_000;
4
+ /** Scheduling hint only; percentages are not comparable dollar/token balances. */
5
+ export function subscriptionQuotaPreference(entry, now) {
6
+ const planType = entry?.planType?.trim().toLowerCase();
7
+ const plan = planType === "free" ? "free" : ["plus", "pro", "team", "business", "enterprise", "edu"].includes(planType ?? "") ? "subscription" : "unknown";
8
+ const result = { plan, remainingPercent: null, resetAtMs: null, urgency: null, exhausted: isQuotaCacheEntryExhausted(entry, now), observedAt: entry?.updatedAt ?? null };
9
+ if (!entry || !Number.isFinite(entry.updatedAt) || entry.updatedAt > now || now - entry.updatedAt > SUBSCRIPTION_QUOTA_MAX_AGE_MS || entry.status !== 200)
10
+ return result;
11
+ const windows = [entry.primary, entry.secondary].filter(w => typeof w.usedPercent === "number" && Number.isFinite(w.usedPercent) && w.usedPercent >= 0 && w.usedPercent <= 100 && !(typeof w.resetAtMs === "number" && w.resetAtMs <= now) && !(w.resetAtMs === undefined && typeof w.windowMinutes === "number" && w.windowMinutes > 0 && now >= entry.updatedAt + w.windowMinutes * 60_000));
12
+ // Unknown reset of a tighter window must not be replaced with an easier window.
13
+ windows.sort((a, b) => (b.usedPercent ?? 0) - (a.usedPercent ?? 0) || (a.resetAtMs ?? Infinity) - (b.resetAtMs ?? Infinity));
14
+ const window = windows[0];
15
+ if (!window)
16
+ return result;
17
+ result.remainingPercent = 100 - (window.usedPercent ?? 0);
18
+ result.exhausted = result.remainingPercent === 0;
19
+ if (typeof window.resetAtMs === "number" && Number.isFinite(window.resetAtMs) && window.resetAtMs > now) {
20
+ result.resetAtMs = window.resetAtMs;
21
+ result.urgency = result.remainingPercent / (Math.max(60_000, window.resetAtMs - now) / 3_600_000);
22
+ }
23
+ return result;
24
+ }
25
+ export function usesSubscriptionReserve(preference) {
26
+ return preference?.remainingPercent !== null && preference?.remainingPercent !== undefined && preference.remainingPercent <= SUBSCRIPTION_RESERVE_PERCENT;
27
+ }
28
+ /** Negative means a should be used first. Equal hints leave existing health/affinity scoring intact. */
29
+ export function compareSubscriptionQuota(a, b) {
30
+ return Number(a.exhausted) - Number(b.exhausted) || Number(usesSubscriptionReserve(a)) - Number(usesSubscriptionReserve(b)) || (a.resetAtMs ?? Infinity) - (b.resetAtMs ?? Infinity) || (b.remainingPercent ?? -1) - (a.remainingPercent ?? -1);
31
+ }
@@ -0,0 +1,15 @@
1
+ import { type ManagedAccount } from "../accounts.js";
2
+ export declare function modelScopeId(...parts: string[]): string;
3
+ /** Request scopes are immutable views. Discovery must never switch a saved account. */
4
+ export declare function workspaceModelScopes(account: ManagedAccount): {
5
+ id: string;
6
+ accountIndex: number;
7
+ routable: boolean;
8
+ bound: boolean;
9
+ selected: boolean;
10
+ label: string;
11
+ accountId: string;
12
+ workspaceIndex: number;
13
+ enabled: boolean;
14
+ }[];
15
+ //# sourceMappingURL=workspace-model-scopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace-model-scopes.d.ts","sourceRoot":"","sources":["../../../lib/runtime/workspace-model-scopes.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAG7E,wBAAgB,YAAY,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAEvD;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc;;;;;;;;;;IAuB3D"}
@@ -0,0 +1,34 @@
1
+ import { createHash } from "node:crypto";
2
+ import { resolveAccountRecordId } from "../accounts.js";
3
+ import { extractAccountId } from "../auth/token-utils.js";
4
+ export function modelScopeId(...parts) {
5
+ return createHash("sha256").update(JSON.stringify(parts)).digest("hex");
6
+ }
7
+ /** Request scopes are immutable views. Discovery must never switch a saved account. */
8
+ export function workspaceModelScopes(account) {
9
+ const boundId = account.accountId?.trim() || extractAccountId(account.access);
10
+ const candidates = (account.workspaces ?? []).map((workspace, index) => ({
11
+ accountId: workspace.id.trim(), workspaceIndex: index,
12
+ enabled: account.enabled !== false && workspace.enabled !== false,
13
+ }));
14
+ if (boundId && !candidates.some(scope => scope.accountId === boundId))
15
+ candidates.unshift({ accountId: boundId, workspaceIndex: -1, enabled: account.enabled !== false });
16
+ if (!candidates.length)
17
+ candidates.push({ accountId: "", workspaceIndex: -1, enabled: account.enabled !== false });
18
+ const seen = new Set();
19
+ return candidates.filter(scope => {
20
+ if (seen.has(scope.accountId))
21
+ return false;
22
+ seen.add(scope.accountId);
23
+ return true;
24
+ }).map(scope => ({
25
+ ...scope,
26
+ // Same record identity as reset-credit targets (resolveAccountRecordId), or their keys diverge.
27
+ id: modelScopeId("oauth", resolveAccountRecordId(account), scope.accountId),
28
+ accountIndex: account.index,
29
+ routable: scope.enabled && Boolean(scope.accountId),
30
+ bound: scope.accountId === boundId,
31
+ selected: scope.workspaceIndex >= 0 && scope.workspaceIndex === (account.currentWorkspaceIndex ?? 0),
32
+ label: `Account ${account.index + 1}${scope.workspaceIndex >= 0 ? ` / Workspace ${scope.workspaceIndex + 1}` : candidates.length > 1 ? " / Stored binding" : ""}`,
33
+ }));
34
+ }
@@ -32,4 +32,7 @@ export declare function listRuntimeHelperOwnerPaths(baseDir: string, entries: re
32
32
  path: string;
33
33
  pid: number;
34
34
  }[];
35
+ /** Marker shared by config binding and desktop-auth sync protection. */
36
+ export declare const NATIVE_PROVIDER_BEGIN = "# codex-multi-auth native provider begin";
37
+ export declare function hasNativeProviderConfig(content: string): boolean;
35
38
  //# sourceMappingURL=runtime-constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-constants.d.ts","sourceRoot":"","sources":["../../lib/runtime-constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kCAAkC,EAC9C,gCAAyC,CAAC;AAE3C,eAAO,MAAM,8BAA8B,EAC1C,kCAA2C,CAAC;AAE7C,qFAAqF;AACrF,eAAO,MAAM,6BAA6B,EACzC,wCAAiD,CAAC;AAEnD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,EAAE,CAUV;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,MAAM,EAAE,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAcjC"}
1
+ {"version":3,"file":"runtime-constants.d.ts","sourceRoot":"","sources":["../../lib/runtime-constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kCAAkC,EAC9C,gCAAyC,CAAC;AAE3C,eAAO,MAAM,8BAA8B,EAC1C,kCAA2C,CAAC;AAE7C,qFAAqF;AACrF,eAAO,MAAM,6BAA6B,EACzC,wCAAiD,CAAC;AAEnD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,EAAE,CAUV;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,SAAS,MAAM,EAAE,GACxB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,CAcjC;AAED,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,6CAA6C,CAAC;AAChF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE"}
@@ -55,3 +55,8 @@ export function listRuntimeHelperOwnerPaths(baseDir, entries) {
55
55
  }
56
56
  return owners;
57
57
  }
58
+ /** Marker shared by config binding and desktop-auth sync protection. */
59
+ export const NATIVE_PROVIDER_BEGIN = "# codex-multi-auth native provider begin";
60
+ export function hasNativeProviderConfig(content) {
61
+ return content.split(/\r?\n/).some(line => line.trim() === NATIVE_PROVIDER_BEGIN);
62
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-paths.d.ts","sourceRoot":"","sources":["../../lib/runtime-paths.ts"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AAEH,wBAAgB,eAAe,IAAI,MAAM,CAGxC;AA2HD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CA0C7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
1
+ {"version":3,"file":"runtime-paths.d.ts","sourceRoot":"","sources":["../../lib/runtime-paths.ts"],"names":[],"mappings":"AAsCA;;;;;;GAMG;AAEH,wBAAgB,eAAe,IAAI,MAAM,CAGxC;AA2HD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CA0C7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
@@ -1,6 +1,9 @@
1
1
  import { homedir } from "node:os";
2
- import { join, normalize, win32 } from "node:path";
2
+ import { join as nativeJoin, normalize, win32 } from "node:path";
3
3
  import { existsSync, readdirSync } from "node:fs";
4
+ function join(...parts) {
5
+ return (process.platform === "win32" ? win32.join : nativeJoin)(...parts);
6
+ }
4
7
  function firstNonEmpty(values) {
5
8
  for (const value of values) {
6
9
  const trimmed = (value ?? "").trim();
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-rotation-proxy.d.ts","sourceRoot":"","sources":["../../lib/runtime-rotation-proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAIN,KAAK,cAAc,EACnB,MAAM,eAAe,CAAC;AAkCvB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAqDtE,OAAO,KAAK,EAKX,2BAA2B,EAC3B,0BAA0B,EAE1B,MAAM,oCAAoC,CAAC;AAe5C,YAAY,EACX,2BAA2B,EAC3B,0BAA0B,EAC1B,0B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