codex-multi-auth 2.3.0-beta.2 → 2.3.0
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/.codex-plugin/plugin.json +2 -1
- package/README.md +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/lib/account-policy.d.ts.map +1 -1
- package/dist/lib/account-policy.js +2 -1
- package/dist/lib/accounts/rate-limits.d.ts +8 -0
- package/dist/lib/accounts/rate-limits.d.ts.map +1 -1
- package/dist/lib/accounts/rate-limits.js +13 -0
- package/dist/lib/accounts.d.ts +19 -1
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/accounts.js +31 -2
- package/dist/lib/audit.d.ts +0 -9
- package/dist/lib/audit.d.ts.map +1 -1
- package/dist/lib/auth/device-auth.d.ts +1 -6
- package/dist/lib/auth/device-auth.d.ts.map +1 -1
- package/dist/lib/auth/device-auth.js +5 -5
- package/dist/lib/budget-guard.d.ts.map +1 -1
- package/dist/lib/budget-guard.js +2 -1
- package/dist/lib/codex-cli/writer.d.ts.map +1 -1
- package/dist/lib/codex-cli/writer.js +2 -1
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts +0 -1
- package/dist/lib/codex-manager/backend-settings-helpers.d.ts.map +1 -1
- package/dist/lib/codex-manager/backend-settings-helpers.js +1 -1
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts +0 -19
- package/dist/lib/codex-manager/behavior-settings-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/report.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/report.js +2 -1
- package/dist/lib/codex-manager/commands/uninstall.d.ts +2 -2
- package/dist/lib/codex-manager/commands/uninstall.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/uninstall.js +1 -1
- package/dist/lib/codex-manager/commands/usage.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/usage.js +2 -1
- package/dist/lib/codex-manager/commands/verify.d.ts +2 -2
- package/dist/lib/codex-manager/commands/verify.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/why-selected.d.ts +1 -22
- package/dist/lib/codex-manager/commands/why-selected.d.ts.map +1 -1
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts +0 -14
- package/dist/lib/codex-manager/dashboard-display-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts +2 -1
- package/dist/lib/codex-manager/experimental-settings-prompt.d.ts.map +1 -1
- package/dist/lib/codex-manager/forecast-report-shared.d.ts +2 -2
- package/dist/lib/codex-manager/forecast-report-shared.d.ts.map +1 -1
- package/dist/lib/codex-manager/forecast-report-shared.js +2 -2
- package/dist/lib/codex-manager/formatters/quota-formatters.d.ts +0 -2
- package/dist/lib/codex-manager/formatters/quota-formatters.d.ts.map +1 -1
- package/dist/lib/codex-manager/formatters/quota-formatters.js +2 -2
- package/dist/lib/codex-manager/help.d.ts +2 -1
- package/dist/lib/codex-manager/help.d.ts.map +1 -1
- package/dist/lib/codex-manager/repair-commands.d.ts +0 -15
- package/dist/lib/codex-manager/repair-commands.d.ts.map +1 -1
- package/dist/lib/codex-manager/repair-commands.js +5 -5
- package/dist/lib/codex-manager/settings-hub/backend.d.ts +0 -5
- package/dist/lib/codex-manager/settings-hub/backend.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-hub/backend.js +1 -1
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts +1 -14
- package/dist/lib/codex-manager/settings-hub/dashboard.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-hub/dashboard.js +8 -8
- package/dist/lib/codex-manager/settings-write-queue.d.ts +0 -10
- package/dist/lib/codex-manager/settings-write-queue.d.ts.map +1 -1
- package/dist/lib/codex-manager/settings-write-queue.js +10 -10
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts +2 -17
- package/dist/lib/codex-manager/statusline-settings-panel.d.ts.map +1 -1
- package/dist/lib/codex-manager/theme-settings-panel.d.ts +0 -13
- package/dist/lib/codex-manager/theme-settings-panel.d.ts.map +1 -1
- package/dist/lib/config.d.ts +0 -13
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +22 -19
- package/dist/lib/dashboard-settings.d.ts +3 -3
- package/dist/lib/dashboard-settings.d.ts.map +1 -1
- package/dist/lib/dashboard-settings.js +0 -1
- package/dist/lib/errors.d.ts +0 -1
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/forecast.d.ts +4 -3
- package/dist/lib/forecast.d.ts.map +1 -1
- package/dist/lib/fs-retry.d.ts +0 -3
- package/dist/lib/fs-retry.d.ts.map +1 -1
- package/dist/lib/fs-retry.js +3 -3
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/local-client-tokens.d.ts.map +1 -1
- package/dist/lib/local-client-tokens.js +2 -1
- package/dist/lib/oc-chatgpt-import-adapter.d.ts +1 -1
- package/dist/lib/oc-chatgpt-import-adapter.d.ts.map +1 -1
- package/dist/lib/oc-chatgpt-orchestrator.d.ts.map +1 -1
- package/dist/lib/oc-chatgpt-orchestrator.js +2 -1
- package/dist/lib/oc-chatgpt-target-detection.d.ts +1 -1
- package/dist/lib/oc-chatgpt-target-detection.d.ts.map +1 -1
- package/dist/lib/prompts/codex-host-bridge.d.ts +0 -8
- package/dist/lib/prompts/codex-host-bridge.d.ts.map +1 -1
- package/dist/lib/prompts/codex-host-bridge.js +0 -20
- package/dist/lib/prompts/codex.d.ts.map +1 -1
- package/dist/lib/prompts/codex.js +2 -1
- package/dist/lib/prompts/fetch-utils.d.ts +0 -2
- package/dist/lib/prompts/fetch-utils.d.ts.map +1 -1
- package/dist/lib/prompts/fetch-utils.js +2 -2
- package/dist/lib/prompts/host-codex-prompt.d.ts.map +1 -1
- package/dist/lib/prompts/host-codex-prompt.js +2 -1
- package/dist/lib/quota-cache.d.ts.map +1 -1
- package/dist/lib/quota-cache.js +2 -1
- package/dist/lib/recovery/storage.d.ts.map +1 -1
- package/dist/lib/recovery/storage.js +5 -3
- package/dist/lib/recovery/types.d.ts +4 -12
- package/dist/lib/recovery/types.d.ts.map +1 -1
- package/dist/lib/recovery.d.ts +2 -2
- package/dist/lib/recovery.d.ts.map +1 -1
- package/dist/lib/request/response-compaction.d.ts +2 -1
- package/dist/lib/request/response-compaction.d.ts.map +1 -1
- package/dist/lib/request/stream-failover-runtime.d.ts.map +1 -1
- package/dist/lib/request/stream-failover-runtime.js +30 -1
- package/dist/lib/rotation.d.ts +1 -3
- package/dist/lib/rotation.d.ts.map +1 -1
- package/dist/lib/rotation.js +1 -2
- package/dist/lib/routing-profiles.d.ts.map +1 -1
- package/dist/lib/routing-profiles.js +2 -1
- package/dist/lib/runtime/config-toml.d.ts +0 -6
- package/dist/lib/runtime/config-toml.d.ts.map +1 -1
- package/dist/lib/runtime/config-toml.js +6 -6
- package/dist/lib/runtime/event-handler.d.ts +0 -31
- package/dist/lib/runtime/event-handler.d.ts.map +1 -1
- package/dist/lib/runtime/event-handler.js +0 -22
- package/dist/lib/runtime/first-run.d.ts +3 -5
- package/dist/lib/runtime/first-run.d.ts.map +1 -1
- package/dist/lib/runtime/first-run.js +2 -2
- package/dist/lib/runtime/quota-headers.d.ts +1 -6
- package/dist/lib/runtime/quota-headers.d.ts.map +1 -1
- package/dist/lib/runtime/quota-headers.js +5 -5
- package/dist/lib/runtime/rotation-proxy-state.d.ts.map +1 -1
- package/dist/lib/runtime/rotation-proxy-state.js +24 -0
- package/dist/lib/runtime/runtime-current-account.d.ts +3 -3
- package/dist/lib/runtime/runtime-current-account.d.ts.map +1 -1
- package/dist/lib/runtime/runtime-current-account.js +1 -1
- package/dist/lib/runtime/runtime-observability.d.ts +2 -2
- package/dist/lib/runtime/runtime-observability.d.ts.map +1 -1
- package/dist/lib/runtime/runtime-observability.js +0 -4
- package/dist/lib/runtime-rotation-proxy.d.ts.map +1 -1
- package/dist/lib/runtime-rotation-proxy.js +20 -6
- package/dist/lib/schemas.d.ts +3 -91
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/schemas.js +8 -8
- package/dist/lib/storage/file-paths.d.ts +2 -2
- package/dist/lib/storage/file-paths.d.ts.map +1 -1
- package/dist/lib/storage/file-paths.js +2 -2
- package/dist/lib/storage/flagged-storage-io.d.ts.map +1 -1
- package/dist/lib/storage/flagged-storage-io.js +2 -2
- package/dist/lib/storage/import-export.d.ts.map +1 -1
- package/dist/lib/storage/import-export.js +2 -2
- package/dist/lib/storage/migrations.d.ts +2 -1
- package/dist/lib/storage/migrations.d.ts.map +1 -1
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +30 -23
- package/dist/lib/temp-path.d.ts +26 -0
- package/dist/lib/temp-path.d.ts.map +1 -0
- package/dist/lib/temp-path.js +30 -0
- package/dist/lib/ui/theme.d.ts +3 -2
- package/dist/lib/ui/theme.d.ts.map +1 -1
- package/dist/lib/unified-settings.d.ts.map +1 -1
- package/dist/lib/unified-settings.js +2 -1
- package/dist/lib/update-notice.d.ts.map +1 -1
- package/dist/lib/update-notice.js +2 -1
- package/package.json +1 -2
package/dist/lib/ui/theme.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ export type UiColorProfile = "ansi16" | "ansi256" | "truecolor";
|
|
|
5
5
|
export type UiGlyphMode = "ascii" | "unicode" | "auto";
|
|
6
6
|
export type UiPalette = "green" | "blue";
|
|
7
7
|
export type UiAccent = "green" | "cyan" | "blue" | "yellow";
|
|
8
|
-
|
|
8
|
+
interface UiGlyphSet {
|
|
9
9
|
selected: string;
|
|
10
10
|
unselected: string;
|
|
11
11
|
bullet: string;
|
|
12
12
|
check: string;
|
|
13
13
|
cross: string;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface UiThemeColors {
|
|
16
16
|
reset: string;
|
|
17
17
|
dim: string;
|
|
18
18
|
muted: string;
|
|
@@ -66,4 +66,5 @@ export declare function createUiTheme(options?: {
|
|
|
66
66
|
accent?: UiAccent;
|
|
67
67
|
disableColor?: boolean;
|
|
68
68
|
}): UiTheme;
|
|
69
|
+
export {};
|
|
69
70
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../lib/ui/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5D,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../lib/ui/theme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAChE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE5D,UAAU,UAAU;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;CACtB;AAiKD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,KAAK,GAAE,OAAwC,GAC7C,OAAO,CAMT;AAWD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE;IACvC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,OAAO,CAgBV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-settings.d.ts","sourceRoot":"","sources":["../../lib/unified-settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unified-settings.d.ts","sourceRoot":"","sources":["../../lib/unified-settings.ts"],"names":[],"mappings":"AAeA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AA2bnD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,IAAI,UAAU,GAAG,IAAI,CAQ/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI,CAO1E;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAAC,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBrF;AAED;;;;;;;;GAQG;AACH,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAQ/E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,4BAA4B,CACjD,wBAAwB,EAAE,UAAU,GAClC,OAAO,CAAC,IAAI,CAAC,CAsBf"}
|
|
@@ -2,6 +2,7 @@ import { copyFileSync, existsSync, mkdirSync, renameSync, readFileSync, unlinkSy
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { getCodexMultiAuthDir } from "./runtime-paths.js";
|
|
4
4
|
import { sleep } from "./utils.js";
|
|
5
|
+
import { tempPathFor } from "./temp-path.js";
|
|
5
6
|
export const UNIFIED_SETTINGS_VERSION = 1;
|
|
6
7
|
const UNIFIED_SETTINGS_PATH = join(getCodexMultiAuthDir(), "settings.json");
|
|
7
8
|
const UNIFIED_SETTINGS_BACKUP_PATH = `${UNIFIED_SETTINGS_PATH}.bak`;
|
|
@@ -341,7 +342,7 @@ async function writeSettingsRecordAsync(record, options) {
|
|
|
341
342
|
await fs.mkdir(getCodexMultiAuthDir(), { recursive: true });
|
|
342
343
|
const payload = normalizeForWrite(record);
|
|
343
344
|
const data = `${JSON.stringify(payload, null, 2)}\n`;
|
|
344
|
-
const tempPath =
|
|
345
|
+
const tempPath = tempPathFor(UNIFIED_SETTINGS_PATH);
|
|
345
346
|
await trySnapshotUnifiedSettingsBackupAsync({
|
|
346
347
|
skipBecauseBackupRead: options?.skipBackupSnapshot,
|
|
347
348
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-notice.d.ts","sourceRoot":"","sources":["../../lib/update-notice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-notice.d.ts","sourceRoot":"","sources":["../../lib/update-notice.ts"],"names":[],"mappings":"AA2CA,MAAM,WAAW,iBAAiB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACtB;AA+DD,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAmBzE;AA0JD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAM1E;AAED,wBAAsB,eAAe,CACpC,KAAK,UAAQ,EACb,cAAc,SAA0B,GACtC,OAAO,CAAC,iBAAiB,CAAC,CAwC5B;AAED,wBAAsB,cAAc,CACnC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,GACzE,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,wBAAgB,gBAAgB,IAAI,IAAI,CAUvC"}
|
|
@@ -3,6 +3,7 @@ import { dirname, join } from "node:path";
|
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { createLogger } from "./logger.js";
|
|
5
5
|
import { getCodexCacheDir } from "./runtime-paths.js";
|
|
6
|
+
import { tempPathFor } from "./temp-path.js";
|
|
6
7
|
const log = createLogger("update-notice");
|
|
7
8
|
const PACKAGE_NAME = "codex-multi-auth";
|
|
8
9
|
const NPM_REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}/latest`;
|
|
@@ -34,7 +35,7 @@ async function writeCacheContents(serialized) {
|
|
|
34
35
|
if (!existsSync(CACHE_DIR)) {
|
|
35
36
|
mkdirSync(CACHE_DIR, { recursive: true });
|
|
36
37
|
}
|
|
37
|
-
tempPath =
|
|
38
|
+
tempPath = tempPathFor(CACHE_FILE);
|
|
38
39
|
let lastError = null;
|
|
39
40
|
for (let attempt = 0; attempt < 4; attempt++) {
|
|
40
41
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.3.0
|
|
3
|
+
"version": "2.3.0",
|
|
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",
|
|
@@ -156,7 +156,6 @@
|
|
|
156
156
|
"node": ">=18.17.0"
|
|
157
157
|
},
|
|
158
158
|
"devDependencies": {
|
|
159
|
-
"@fast-check/vitest": "^0.2.4",
|
|
160
159
|
"@types/node": "^20.19.42",
|
|
161
160
|
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
162
161
|
"@typescript-eslint/parser": "^8.56.0",
|