codex-multi-auth 2.8.2 → 2.8.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "Install and operate codex-multi-auth for the official @openai/codex CLI with multi-account OAuth rotation, switching, health checks, and recovery tools.",
|
|
5
5
|
"interface": {
|
|
6
6
|
"composerIcon": "./assets/codex-multi-auth-icon.svg"
|
package/README.md
CHANGED
|
@@ -392,7 +392,8 @@ codex-multi-auth doctor --json
|
|
|
392
392
|
|
|
393
393
|
## Release Notes
|
|
394
394
|
|
|
395
|
-
- Current stable: [docs/releases/v2.8.
|
|
395
|
+
- Current stable: [docs/releases/v2.8.3.md](docs/releases/v2.8.3.md) — install via `npm i -g codex-multi-auth`
|
|
396
|
+
- Previous stable: [docs/releases/v2.8.2.md](docs/releases/v2.8.2.md)
|
|
396
397
|
- Previous stable: [docs/releases/v2.7.1.md](docs/releases/v2.7.1.md)
|
|
397
398
|
- Previous stable: [docs/releases/v2.7.0.md](docs/releases/v2.7.0.md)
|
|
398
399
|
- Previous stable: [docs/releases/v2.6.0.md](docs/releases/v2.6.0.md)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-formatters.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/formatters/quota-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACN,KAAK,kBAAkB,EACvB,uBAAuB,EAGvB,MAAM,sBAAsB,CAAC;AAY9B,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmCzD;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC9C,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,EAC7D,QAAQ,EAAE,wBAAwB,EAClC,GAAG,SAAa,GACd,MAAM,
|
|
1
|
+
{"version":3,"file":"quota-formatters.d.ts","sourceRoot":"","sources":["../../../../lib/codex-manager/formatters/quota-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACN,KAAK,kBAAkB,EACvB,uBAAuB,EAGvB,MAAM,sBAAsB,CAAC;AAY9B,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmCzD;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC9C,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,EAC7D,QAAQ,EAAE,wBAAwB,EAClC,GAAG,SAAa,GACd,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,eAAe,GACpB,kBAAkB,CAgBpB;AA8BD;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAgCD,wBAAgB,0BAA0B,CACzC,QAAQ,EAAE,kBAAkB,EAC5B,GAAG,SAAa,EAChB,OAAO,GAAE,yBAA8B,GACrC,MAAM,CA6CR;AAED,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,eAAe,EACtB,GAAG,SAAa,EAChB,OAAO,GAAE,yBAA8B,GACrC,MAAM,CA6CR"}
|
|
@@ -43,7 +43,8 @@ export function styleQuotaSummary(summary) {
|
|
|
43
43
|
export function formatQuotaSnapshotForDashboard(snapshot, settings, now = Date.now()) {
|
|
44
44
|
if (!settings.showQuotaDetails)
|
|
45
45
|
return "live session OK";
|
|
46
|
-
|
|
46
|
+
const summary = formatCompactQuotaSnapshot(snapshot, now, { showReset: true });
|
|
47
|
+
return summary ? `live session OK (${summary})` : "live session OK";
|
|
47
48
|
}
|
|
48
49
|
export function quotaCacheEntryToSnapshot(entry) {
|
|
49
50
|
return {
|
|
@@ -72,17 +73,38 @@ function formatCompactQuotaWindowLabel(windowMinutes) {
|
|
|
72
73
|
return `${windowMinutes / 60}h`;
|
|
73
74
|
return `${windowMinutes}m`;
|
|
74
75
|
}
|
|
76
|
+
function isUninformativeFullQuotaWindow(windowMinutes, usedPercent, resetAtMs, now) {
|
|
77
|
+
if (formatCompactQuotaWindowLabel(windowMinutes) !== "quota")
|
|
78
|
+
return false;
|
|
79
|
+
if (typeof usedPercent !== "number" || !Number.isFinite(usedPercent)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
const left = quotaLeftPercentFromUsed(usedPercent);
|
|
83
|
+
return (!formatQuotaResetAt(resetAtMs, now) &&
|
|
84
|
+
(left === undefined || left >= 100));
|
|
85
|
+
}
|
|
75
86
|
function formatCompactQuotaPart(windowMinutes, usedPercent, resetAtMs, options, now) {
|
|
76
87
|
const label = formatCompactQuotaWindowLabel(windowMinutes);
|
|
77
88
|
if (typeof usedPercent !== "number" || !Number.isFinite(usedPercent)) {
|
|
78
89
|
return null;
|
|
79
90
|
}
|
|
80
91
|
const left = quotaLeftPercentFromUsed(usedPercent);
|
|
92
|
+
// The reset validity is computed regardless of showReset: it also feeds the
|
|
93
|
+
// uninformative-window check below, so hiding stays consistent across the
|
|
94
|
+
// compact (no-reset) and check (with-reset) surfaces.
|
|
95
|
+
const reset = formatQuotaResetAt(resetAtMs, now);
|
|
96
|
+
// An unlabeled window ("quota" — upstream reported no duration) that sits at
|
|
97
|
+
// 100% left with no reset timestamp carries no actionable signal; since the
|
|
98
|
+
// 2026-07/08 upstream limit changes it renders as a permanent "quota 100%"
|
|
99
|
+
// on every account. Hide exactly that shape: the segment reappears as soon
|
|
100
|
+
// as the window reports a duration, any depletion, or a reset time.
|
|
101
|
+
if (!reset && label === "quota" && (left === undefined || left >= 100)) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
81
104
|
const part = `${label} ${left}%`;
|
|
82
105
|
if (!options.showReset)
|
|
83
106
|
return part;
|
|
84
107
|
// A missing or malformed reset timestamp must never drop the percentage.
|
|
85
|
-
const reset = formatQuotaResetAt(resetAtMs, now);
|
|
86
108
|
return reset ? `${part}, resets ${reset}` : part;
|
|
87
109
|
}
|
|
88
110
|
export function formatCompactQuotaSnapshot(snapshot, now = Date.now(), options = {}) {
|
|
@@ -99,6 +121,10 @@ export function formatCompactQuotaSnapshot(snapshot, now = Date.now(), options =
|
|
|
99
121
|
if (parts.length > 0) {
|
|
100
122
|
return parts.join(" | ");
|
|
101
123
|
}
|
|
124
|
+
if (isUninformativeFullQuotaWindow(snapshot.primary.windowMinutes, snapshot.primary.usedPercent, snapshot.primary.resetAtMs, now) ||
|
|
125
|
+
isUninformativeFullQuotaWindow(snapshot.secondary.windowMinutes, snapshot.secondary.usedPercent, snapshot.secondary.resetAtMs, now)) {
|
|
126
|
+
return "";
|
|
127
|
+
}
|
|
102
128
|
return formatQuotaSnapshotLine(snapshot);
|
|
103
129
|
}
|
|
104
130
|
export function formatAccountQuotaSummary(entry, now = Date.now(), options = {}) {
|
|
@@ -115,5 +141,9 @@ export function formatAccountQuotaSummary(entry, now = Date.now(), options = {})
|
|
|
115
141
|
if (parts.length > 0) {
|
|
116
142
|
return parts.join(" | ");
|
|
117
143
|
}
|
|
144
|
+
if (isUninformativeFullQuotaWindow(entry.primary.windowMinutes, entry.primary.usedPercent, entry.primary.resetAtMs, now) ||
|
|
145
|
+
isUninformativeFullQuotaWindow(entry.secondary.windowMinutes, entry.secondary.usedPercent, entry.secondary.resetAtMs, now)) {
|
|
146
|
+
return "";
|
|
147
|
+
}
|
|
118
148
|
return formatQuotaSnapshotLine(quotaCacheEntryToSnapshot(entry));
|
|
119
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"description": "Codex CLI multi-account OAuth manager with account switching, health checks, runtime rotation, diagnostics, and recovery tools for @openai/codex",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|