codex-multi-auth 0.1.5 → 0.1.8

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 (75) hide show
  1. package/LICENSE +21 -1
  2. package/README.md +19 -6
  3. package/assets/readme-hero.svg +31 -31
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +2 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/codex-cli/state.js +4 -4
  9. package/dist/lib/codex-cli/state.js.map +1 -1
  10. package/dist/lib/codex-cli/sync.d.ts +9 -16
  11. package/dist/lib/codex-cli/sync.d.ts.map +1 -1
  12. package/dist/lib/codex-cli/sync.js +51 -284
  13. package/dist/lib/codex-cli/sync.js.map +1 -1
  14. package/dist/lib/codex-cli/writer.d.ts.map +1 -1
  15. package/dist/lib/codex-cli/writer.js +62 -5
  16. package/dist/lib/codex-cli/writer.js.map +1 -1
  17. package/dist/lib/codex-manager/settings-hub.d.ts +44 -2
  18. package/dist/lib/codex-manager/settings-hub.d.ts.map +1 -1
  19. package/dist/lib/codex-manager/settings-hub.js +746 -117
  20. package/dist/lib/codex-manager/settings-hub.js.map +1 -1
  21. package/dist/lib/codex-manager.d.ts.map +1 -1
  22. package/dist/lib/codex-manager.js +3 -8
  23. package/dist/lib/codex-manager.js.map +1 -1
  24. package/dist/lib/context-overflow.js +10 -10
  25. package/dist/lib/named-backup-export.d.ts +69 -0
  26. package/dist/lib/named-backup-export.d.ts.map +1 -0
  27. package/dist/lib/named-backup-export.js +207 -0
  28. package/dist/lib/named-backup-export.js.map +1 -0
  29. package/dist/lib/oauth-success.html +66 -210
  30. package/dist/lib/oc-chatgpt-import-adapter.d.ts +64 -0
  31. package/dist/lib/oc-chatgpt-import-adapter.d.ts.map +1 -0
  32. package/dist/lib/oc-chatgpt-import-adapter.js +506 -0
  33. package/dist/lib/oc-chatgpt-import-adapter.js.map +1 -0
  34. package/dist/lib/oc-chatgpt-orchestrator.d.ts +80 -0
  35. package/dist/lib/oc-chatgpt-orchestrator.d.ts.map +1 -0
  36. package/dist/lib/oc-chatgpt-orchestrator.js +130 -0
  37. package/dist/lib/oc-chatgpt-orchestrator.js.map +1 -0
  38. package/dist/lib/oc-chatgpt-target-detection.d.ts +59 -0
  39. package/dist/lib/oc-chatgpt-target-detection.d.ts.map +1 -0
  40. package/dist/lib/oc-chatgpt-target-detection.js +327 -0
  41. package/dist/lib/oc-chatgpt-target-detection.js.map +1 -0
  42. package/dist/lib/prompts/codex.js +2 -2
  43. package/dist/lib/runtime-paths.d.ts.map +1 -1
  44. package/dist/lib/runtime-paths.js +44 -2
  45. package/dist/lib/runtime-paths.js.map +1 -1
  46. package/dist/lib/storage.d.ts +42 -3
  47. package/dist/lib/storage.d.ts.map +1 -1
  48. package/dist/lib/storage.js +634 -49
  49. package/dist/lib/storage.js.map +1 -1
  50. package/dist/lib/ui/auth-menu.d.ts.map +1 -1
  51. package/dist/lib/ui/auth-menu.js +13 -1
  52. package/dist/lib/ui/auth-menu.js.map +1 -1
  53. package/dist/lib/ui/copy.d.ts +15 -1
  54. package/dist/lib/ui/copy.d.ts.map +1 -1
  55. package/dist/lib/ui/copy.js +15 -1
  56. package/dist/lib/ui/copy.js.map +1 -1
  57. package/node_modules/@codex-ai/plugin/dist/index.d.ts +1 -1
  58. package/node_modules/@codex-ai/plugin/dist/tool.d.ts +41 -41
  59. package/node_modules/@codex-ai/plugin/dist/tool.js +28 -28
  60. package/package.json +132 -133
  61. package/scripts/bench-format/hashline-v2.mjs +642 -642
  62. package/scripts/bench-format/render.mjs +496 -496
  63. package/scripts/bench-format/stats.mjs +54 -54
  64. package/scripts/bench-format/tasks.mjs +151 -151
  65. package/scripts/benchmark-render-dashboard.mjs +49 -49
  66. package/scripts/codex-multi-auth.js +12 -0
  67. package/scripts/codex.js +315 -2
  68. package/scripts/install-codex-auth.js +9 -9
  69. package/scripts/test-all-models.sh +7 -7
  70. package/scripts/test-model-matrix.js +247 -148
  71. package/scripts/validate-model-map.sh +7 -7
  72. package/vendor/codex-ai-plugin/dist/index.d.ts +1 -1
  73. package/vendor/codex-ai-plugin/dist/tool.d.ts +41 -41
  74. package/vendor/codex-ai-plugin/dist/tool.js +28 -28
  75. package/vendor/codex-ai-sdk/dist/index.d.ts +3 -3
package/package.json CHANGED
@@ -1,133 +1,132 @@
1
- {
2
- "name": "codex-multi-auth",
3
- "version": "0.1.5",
4
- "description": "OpenAI Codex CLI multi-account OAuth manager with resilient routing and quota-aware diagnostics",
5
- "main": "./dist/index.js",
6
- "types": "./dist/index.d.ts",
7
- "type": "module",
8
- "license": "MIT",
9
- "author": "Numman Ali",
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/ndycode/codex-multi-auth.git"
13
- },
14
- "keywords": [
15
- "openai",
16
- "codex",
17
- "codex-cli",
18
- "chatgpt",
19
- "oauth2",
20
- "pkce",
21
- "multi-account",
22
- "account-rotation",
23
- "token-refresh",
24
- "session-recovery",
25
- "rate-limit-handling",
26
- "resilient-systems",
27
- "fault-tolerance",
28
- "terminal-ui",
29
- "cli-tool",
30
- "typescript",
31
- "nodejs",
32
- "developer-tools",
33
- "authentication",
34
- "productivity-tools"
35
- ],
36
- "homepage": "https://github.com/ndycode/codex-multi-auth#readme",
37
- "bugs": {
38
- "url": "https://github.com/ndycode/codex-multi-auth/issues"
39
- },
40
- "scripts": {
41
- "build": "tsc && node scripts/copy-oauth-success.js",
42
- "typecheck": "tsc --noEmit",
43
- "lint": "npm run lint:ts && npm run lint:scripts",
44
- "lint:ts": "eslint . --ext .ts",
45
- "lint:scripts": "eslint scripts --ext .js",
46
- "lint:fix": "npm run lint:ts:fix && npm run lint:scripts:fix",
47
- "lint:ts:fix": "eslint . --ext .ts --fix",
48
- "lint:scripts:fix": "eslint scripts --ext .js --fix",
49
- "test": "vitest run",
50
- "test:watch": "vitest",
51
- "test:ui": "vitest --ui",
52
- "test:model-matrix": "node scripts/test-model-matrix.js",
53
- "test:model-matrix:smoke": "node scripts/test-model-matrix.js --smoke",
54
- "test:model-matrix:report": "node scripts/test-model-matrix.js --smoke --report-json=.tmp/model-matrix-report.json",
55
- "clean:repo": "node scripts/repo-hygiene.js clean --mode aggressive",
56
- "clean:repo:check": "node scripts/repo-hygiene.js check",
57
- "bench:edit-formats": "node scripts/benchmark-edit-formats.mjs --preset=codex-core",
58
- "bench:edit-formats:smoke": "node scripts/benchmark-edit-formats.mjs --smoke --preset=codex-core",
59
- "bench:edit-formats:render": "node scripts/benchmark-render-dashboard.mjs",
60
- "bench:runtime-path": "npm run build && node scripts/benchmark-runtime-path.mjs",
61
- "bench:runtime-path:quick": "node scripts/benchmark-runtime-path.mjs",
62
- "test:coverage": "vitest run --coverage",
63
- "coverage": "npm run build && vitest run --coverage",
64
- "audit:prod": "npm audit --omit=dev --audit-level=high",
65
- "audit:all": "npm audit --audit-level=high",
66
- "audit:dev:allowlist": "node scripts/audit-dev-allowlist.js",
67
- "audit:ci": "npm run audit:prod && npm run audit:dev:allowlist",
68
- "prepublishOnly": "npm run build",
69
- "prepare": "husky"
70
- },
71
- "bin": {
72
- "codex": "scripts/codex.js",
73
- "codex-multi-auth": "scripts/codex-multi-auth.js"
74
- },
75
- "files": [
76
- "dist/",
77
- "assets/",
78
- "config/",
79
- "scripts/",
80
- "vendor/codex-ai-plugin/",
81
- "vendor/codex-ai-sdk/",
82
- "README.md",
83
- "LICENSE"
84
- ],
85
- "bundleDependencies": [
86
- "@codex-ai/plugin"
87
- ],
88
- "lint-staged": {
89
- "*.ts": [
90
- "eslint --max-warnings=0 --fix --no-warn-ignored"
91
- ],
92
- "scripts/**/*.js": [
93
- "eslint --max-warnings=0 --fix --no-warn-ignored"
94
- ]
95
- },
96
- "engines": {
97
- "node": ">=18.0.0"
98
- },
99
- "peerDependencies": {
100
- "typescript": "^5"
101
- },
102
- "devDependencies": {
103
- "@fast-check/vitest": "^0.2.4",
104
- "@codex-ai/sdk": "file:vendor/codex-ai-sdk",
105
- "@types/node": "^25.3.0",
106
- "@typescript-eslint/eslint-plugin": "^8.56.0",
107
- "@typescript-eslint/parser": "^8.56.0",
108
- "@vitest/coverage-v8": "^4.0.18",
109
- "@vitest/ui": "^4.0.18",
110
- "eslint": "^10.0.0",
111
- "fast-check": "^4.5.3",
112
- "husky": "^9.1.7",
113
- "lint-staged": "^16.2.7",
114
- "typescript": "^5.9.3",
115
- "typescript-language-server": "^5.1.3",
116
- "vitest": "^4.0.18"
117
- },
118
- "dependencies": {
119
- "@openauthjs/openauth": "^0.4.3",
120
- "@codex-ai/plugin": "file:vendor/codex-ai-plugin",
121
- "hono": "4.12.3",
122
- "zod": "^4.3.6"
123
- },
124
- "overrides": {
125
- "hono": "4.12.3",
126
- "minimatch": "10.2.4",
127
- "rollup": "4.59.0",
128
- "vite": "^7.3.1",
129
- "@typescript-eslint/typescript-estree": {
130
- "minimatch": "9.0.9"
131
- }
132
- }
133
- }
1
+ {
2
+ "name": "codex-multi-auth",
3
+ "version": "0.1.8",
4
+ "description": "Multi-account OAuth manager and codex auth wrapper for the official @openai/codex CLI, with switching, health checks, and recovery tools",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "type": "module",
8
+ "license": "MIT",
9
+ "author": "ndycode",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/ndycode/codex-multi-auth.git"
13
+ },
14
+ "keywords": [
15
+ "openai",
16
+ "codex",
17
+ "codex-cli",
18
+ "chatgpt",
19
+ "oauth2",
20
+ "pkce",
21
+ "multi-account",
22
+ "account-switching",
23
+ "oauth-manager",
24
+ "fault-tolerance",
25
+ "terminal-ui",
26
+ "cli-tool",
27
+ "typescript",
28
+ "nodejs",
29
+ "developer-tools",
30
+ "authentication",
31
+ "account-health",
32
+ "recovery-tools",
33
+ "project-scoped-storage"
34
+ ],
35
+ "homepage": "https://github.com/ndycode/codex-multi-auth#readme",
36
+ "bugs": {
37
+ "url": "https://github.com/ndycode/codex-multi-auth/issues"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc && node scripts/copy-oauth-success.js",
41
+ "typecheck": "tsc --noEmit",
42
+ "lint": "npm run lint:ts && npm run lint:scripts",
43
+ "lint:ts": "eslint . --ext .ts",
44
+ "lint:scripts": "eslint scripts --ext .js",
45
+ "lint:fix": "npm run lint:ts:fix && npm run lint:scripts:fix",
46
+ "lint:ts:fix": "eslint . --ext .ts --fix",
47
+ "lint:scripts:fix": "eslint scripts --ext .js --fix",
48
+ "test": "vitest run",
49
+ "test:watch": "vitest",
50
+ "test:ui": "vitest --ui",
51
+ "test:model-matrix": "node scripts/test-model-matrix.js",
52
+ "test:model-matrix:smoke": "node scripts/test-model-matrix.js --smoke",
53
+ "test:model-matrix:report": "node scripts/test-model-matrix.js --smoke --report-json=.tmp/model-matrix-report.json",
54
+ "clean:repo": "node scripts/repo-hygiene.js clean --mode aggressive",
55
+ "clean:repo:check": "node scripts/repo-hygiene.js check",
56
+ "bench:edit-formats": "node scripts/benchmark-edit-formats.mjs --preset=codex-core",
57
+ "bench:edit-formats:smoke": "node scripts/benchmark-edit-formats.mjs --smoke --preset=codex-core",
58
+ "bench:edit-formats:render": "node scripts/benchmark-render-dashboard.mjs",
59
+ "bench:runtime-path": "npm run build && node scripts/benchmark-runtime-path.mjs",
60
+ "bench:runtime-path:quick": "node scripts/benchmark-runtime-path.mjs",
61
+ "test:coverage": "vitest run --coverage",
62
+ "coverage": "npm run build && vitest run --coverage",
63
+ "audit:prod": "npm audit --omit=dev --audit-level=high",
64
+ "audit:all": "npm audit --audit-level=high",
65
+ "audit:dev:allowlist": "node scripts/audit-dev-allowlist.js",
66
+ "audit:ci": "npm run audit:prod && npm run audit:dev:allowlist",
67
+ "prepublishOnly": "npm run build",
68
+ "prepare": "husky"
69
+ },
70
+ "bin": {
71
+ "codex": "scripts/codex.js",
72
+ "codex-multi-auth": "scripts/codex-multi-auth.js"
73
+ },
74
+ "files": [
75
+ "dist/",
76
+ "assets/",
77
+ "config/",
78
+ "scripts/",
79
+ "vendor/codex-ai-plugin/",
80
+ "vendor/codex-ai-sdk/",
81
+ "README.md",
82
+ "LICENSE"
83
+ ],
84
+ "bundleDependencies": [
85
+ "@codex-ai/plugin"
86
+ ],
87
+ "lint-staged": {
88
+ "*.ts": [
89
+ "eslint --max-warnings=0 --fix --no-warn-ignored"
90
+ ],
91
+ "scripts/**/*.js": [
92
+ "eslint --max-warnings=0 --fix --no-warn-ignored"
93
+ ]
94
+ },
95
+ "engines": {
96
+ "node": ">=18.0.0"
97
+ },
98
+ "peerDependencies": {
99
+ "typescript": "^5"
100
+ },
101
+ "devDependencies": {
102
+ "@fast-check/vitest": "^0.2.4",
103
+ "@codex-ai/sdk": "file:vendor/codex-ai-sdk",
104
+ "@types/node": "^25.3.0",
105
+ "@typescript-eslint/eslint-plugin": "^8.56.0",
106
+ "@typescript-eslint/parser": "^8.56.0",
107
+ "@vitest/coverage-v8": "^4.0.18",
108
+ "@vitest/ui": "^4.0.18",
109
+ "eslint": "^10.0.0",
110
+ "fast-check": "^4.5.3",
111
+ "husky": "^9.1.7",
112
+ "lint-staged": "^16.2.7",
113
+ "typescript": "^5.9.3",
114
+ "typescript-language-server": "^5.1.3",
115
+ "vitest": "^4.0.18"
116
+ },
117
+ "dependencies": {
118
+ "@openauthjs/openauth": "^0.4.3",
119
+ "@codex-ai/plugin": "file:vendor/codex-ai-plugin",
120
+ "hono": "4.12.6",
121
+ "zod": "^4.3.6"
122
+ },
123
+ "overrides": {
124
+ "hono": "4.12.6",
125
+ "minimatch": "10.2.4",
126
+ "rollup": "4.59.0",
127
+ "vite": "^7.3.1",
128
+ "@typescript-eslint/typescript-estree": {
129
+ "minimatch": "9.0.9"
130
+ }
131
+ }
132
+ }