@loongphy/codex-auth-linux-x64 0.2.2-alpha.3 → 0.2.2-alpha.4

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.
package/README.md CHANGED
@@ -42,18 +42,23 @@ npx @loongphy/codex-auth list
42
42
  npm packages currently support Linux x64, macOS x64, macOS arm64, and Windows x64.
43
43
 
44
44
  > [!NOTE]
45
+ > If you only installed `@loongphy/codex-auth` with npm, you do not need any legacy cleanup steps.
45
46
  > Older Bash/PowerShell GitHub-release installs could leave a standalone `codex-auth` binary outside npm's install path.
46
- > Those legacy installs can shadow the npm package or a local source build, so remove them during migration.
47
+ > If you previously used those legacy installers, remove the leftover binaries and profile changes during migration.
47
48
 
48
49
  ### Uninstall
49
50
 
51
+ #### npm
52
+
50
53
  Remove the npm package:
51
54
 
52
55
  ```shell
53
56
  npm uninstall -g @loongphy/codex-auth
54
57
  ```
55
58
 
56
- Remove old Bash-installer leftovers on Linux/macOS/WSL2:
59
+ #### Legacy Bash Installer
60
+
61
+ For non-npm installs on Linux/macOS/WSL2 only:
57
62
 
58
63
  ```shell
59
64
  rm -f ~/.local/bin/codex-auth
@@ -61,13 +66,15 @@ rm -f ~/.local/bin/codex-auth-auto
61
66
  sed -i '/# Added by codex-auth installer/,+1d' ~/.bashrc ~/.bash_profile ~/.profile ~/.zshrc ~/.zprofile 2>/dev/null || true
62
67
  ```
63
68
 
64
- If you used fish:
69
+ If you used fish, also remove the old profile entry:
65
70
 
66
71
  ```shell
67
72
  sed -i '/# Added by codex-auth installer/,+3d' ~/.config/fish/config.fish 2>/dev/null || true
68
73
  ```
69
74
 
70
- Remove old PowerShell-installer leftovers on Windows:
75
+ #### Legacy PowerShell Installer
76
+
77
+ For non-npm installs on Windows only:
71
78
 
72
79
  ```powershell
73
80
  Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth.exe" -Force -ErrorAction SilentlyContinue
@@ -79,13 +86,6 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
79
86
  )
80
87
  ```
81
88
 
82
- After cleanup, verify which binary is still active:
83
-
84
- ```shell
85
- which codex-auth
86
- codex-auth --version
87
- ```
88
-
89
89
  ## Commands
90
90
 
91
91
  ### Account Management
@@ -243,25 +243,12 @@ When auto-switching is enabled, a long-running background watcher refreshes the
243
243
  - 5h remaining drops below the configured 5h threshold (default `10%`), or
244
244
  - weekly remaining drops below the configured weekly threshold (default `5%`)
245
245
 
246
- Candidate selection follows the current watcher behavior:
247
-
248
- - when `config api enable` is on, the watcher keeps a daemon-local in-memory candidate index, does bounded top-candidate upkeep in the background, and revalidates only the best few stale candidates before a switch
249
- - in local-only mode, accounts without any usage snapshot are still treated as fresh candidates with full quota
250
- - when the 5h trigger comes from an actual 300-minute window or an unlabeled primary window, free accounts use a stronger real-time 5h guard and switch no later than `35%` remaining even if the configured 5h threshold is lower
251
- - free accounts that expose only a single `10080`-minute weekly window are still eligible auto-switch candidates; that weekly remaining percentage is used as their candidate score
252
-
253
246
  The managed background worker is long-running on all supported platforms:
254
247
 
255
248
  - Linux/WSL: persistent `systemd --user` service
256
249
  - macOS: `LaunchAgent`
257
250
  - Windows: scheduled task that launches the long-running helper at logon, restarts it after failures, has no 72-hour execution cap, and also starts it immediately on enable
258
251
 
259
- The watcher checks local rollout usage roughly once per second and prefers local rollout events over API polling. In watch mode it caches the newest rollout file between bounded full rescans so large `~/.codex/sessions` trees are not re-walked every second. When `config api enable` is on, the usage API remains a slower fallback, active-account API cooldown resets when the active account changes, and candidate revalidation is driven by a daemon-local in-memory candidate index instead of batch-refreshing every account on every loop.
260
-
261
- Successful foreground `codex-auth` commands also reconcile the managed auto-switch service, so a disabled config removes stale background units while an enabled background worker is refreshed onto the current binary after upgrades or service drift.
262
-
263
- Changing thresholds updates `registry.json`, and the running watcher picks them up on the next polling cycle without a service restart.
264
-
265
252
  #### Usage Refresh Source
266
253
 
267
254
  API-backed fallback:
@@ -345,8 +332,6 @@ Verify with:
345
332
  codex exec "say hello"
346
333
  ```
347
334
 
348
- > **Output format:** Each converted file contains `auth_mode`, `OPENAI_API_KEY`, `tokens` (with `id_token`, `access_token`, `refresh_token`, `account_id`), and `last_refresh`. The `refresh_token` field is required for token refresh to work.
349
-
350
335
  ## Disclaimer
351
336
 
352
337
  This project is provided as-is and use is at your own risk.
package/bin/codex-auth CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loongphy/codex-auth-linux-x64",
3
- "version": "0.2.2-alpha.3",
3
+ "version": "0.2.2-alpha.4",
4
4
  "description": "@loongphy/codex-auth binary for linux x64",
5
5
  "license": "MIT",
6
6
  "repository": {