@loongphy/codex-auth 0.2.7 → 0.2.8-alpha.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 (2) hide show
  1. package/README.md +11 -4
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -113,6 +113,7 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
113
113
  | Command | Description |
114
114
  |---------|-------------|
115
115
  | `codex-auth config auto enable\|disable` | Enable or disable experimental background auto-switching |
116
+ | `codex-auth config auto [--5h <%>] [--weekly <%>]` | Set experimental auto-switch thresholds |
116
117
  | `codex-auth config api enable\|disable` | Enable or disable both usage refresh and team name refresh API calls |
117
118
 
118
119
  ---
@@ -235,12 +236,18 @@ codex-auth config auto disable
235
236
 
236
237
  `config auto enable` prints the current usage mode after installing the watcher, so you can immediately see whether auto-switch is running with default API-backed usage or local-only fallback semantics.
237
238
 
238
- When auto-switching is enabled, a long-running background watcher refreshes the active account's usage and silently switches accounts when:
239
+ Adjust thresholds:
239
240
 
240
- - 5h remaining reaches `0`, or
241
- - weekly remaining reaches `0`
241
+ ```shell
242
+ codex-auth config auto --5h 12
243
+ codex-auth config auto --5h 12 --weekly 8
244
+ codex-auth config auto --weekly 8
245
+ ```
246
+
247
+ When auto-switching is enabled, a long-running background watcher refreshes the active account's usage and silently switches accounts when:
242
248
 
243
- When choosing the next account, `codex-auth` prefers a usable account whose remaining quota resets sooner, so a reset at `05:11` wins over `05:30`.
249
+ - 5h remaining drops below the configured 5h threshold (default `10%`), or
250
+ - weekly remaining drops below the configured weekly threshold (default `5%`)
244
251
 
245
252
  The managed background worker is long-running on all supported platforms:
246
253
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loongphy/codex-auth",
3
- "version": "0.2.7",
3
+ "version": "0.2.8-alpha.1",
4
4
  "type": "module",
5
5
  "description": "CLI for switching Codex accounts",
6
6
  "license": "MIT",
@@ -21,12 +21,12 @@
21
21
  "README.md"
22
22
  ],
23
23
  "optionalDependencies": {
24
- "@loongphy/codex-auth-linux-x64": "0.2.7",
25
- "@loongphy/codex-auth-linux-arm64": "0.2.7",
26
- "@loongphy/codex-auth-darwin-x64": "0.2.7",
27
- "@loongphy/codex-auth-darwin-arm64": "0.2.7",
28
- "@loongphy/codex-auth-win32-x64": "0.2.7",
29
- "@loongphy/codex-auth-win32-arm64": "0.2.7"
24
+ "@loongphy/codex-auth-linux-x64": "0.2.8-alpha.1",
25
+ "@loongphy/codex-auth-linux-arm64": "0.2.8-alpha.1",
26
+ "@loongphy/codex-auth-darwin-x64": "0.2.8-alpha.1",
27
+ "@loongphy/codex-auth-darwin-arm64": "0.2.8-alpha.1",
28
+ "@loongphy/codex-auth-win32-x64": "0.2.8-alpha.1",
29
+ "@loongphy/codex-auth-win32-arm64": "0.2.8-alpha.1"
30
30
  },
31
31
  "scripts": {
32
32
  "check:versions": "node scripts/npm/check-versions.mjs",