oc-codex-multi-auth 6.9.0 → 6.10.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/README.md +45 -14
- package/config/README.md +71 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +6 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +9 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/request/fetch-helpers.d.ts.map +1 -1
- package/dist/lib/request/fetch-helpers.js +12 -8
- package/dist/lib/request/fetch-helpers.js.map +1 -1
- package/dist/lib/request/helpers/client-identity.d.ts +32 -0
- package/dist/lib/request/helpers/client-identity.d.ts.map +1 -0
- package/dist/lib/request/helpers/client-identity.js +87 -0
- package/dist/lib/request/helpers/client-identity.js.map +1 -0
- package/dist/lib/request/helpers/user-agent.d.ts +7 -0
- package/dist/lib/request/helpers/user-agent.d.ts.map +1 -1
- package/dist/lib/request/helpers/user-agent.js +11 -1
- package/dist/lib/request/helpers/user-agent.js.map +1 -1
- package/dist/lib/schemas.d.ts +1 -0
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/schemas.js +1 -0
- package/dist/lib/schemas.js.map +1 -1
- package/package.json +155 -155
- package/scripts/install-oc-codex-multi-auth-core.js +6 -6
package/package.json
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "oc-codex-multi-auth",
|
|
3
|
-
"version": "6.
|
|
4
|
-
"description": "OpenCode plugin for ChatGPT Plus/Pro OAuth with Codex/GPT-5 routing, multi-account rotation, account switching, health checks, diagnostics, and recovery tools",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"./tui": {
|
|
13
|
-
"types": "./dist/tui.d.ts",
|
|
14
|
-
"import": "./dist/tui.js"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"type": "module",
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"author": "ndycode",
|
|
20
|
-
"repository": {
|
|
21
|
-
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/ndycode/oc-codex-multi-auth.git"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"opencode",
|
|
26
|
-
"opencode-plugin",
|
|
27
|
-
"opencode-auth",
|
|
28
|
-
"openai",
|
|
29
|
-
"chatgpt",
|
|
30
|
-
"chatgpt-plus",
|
|
31
|
-
"chatgpt-pro",
|
|
32
|
-
"oauth",
|
|
33
|
-
"oauth2",
|
|
34
|
-
"oauth-login",
|
|
35
|
-
"pkce",
|
|
36
|
-
"codex",
|
|
37
|
-
"codex-auth",
|
|
38
|
-
"codex-oauth",
|
|
39
|
-
"gpt-5",
|
|
40
|
-
"gpt-5-5",
|
|
41
|
-
"multi-account",
|
|
42
|
-
"account-rotation",
|
|
43
|
-
"account-switching",
|
|
44
|
-
"account-health",
|
|
45
|
-
"health-checks",
|
|
46
|
-
"quota-management",
|
|
47
|
-
"diagnostics",
|
|
48
|
-
"recovery-tools",
|
|
49
|
-
"terminal-ui",
|
|
50
|
-
"developer-tools",
|
|
51
|
-
"typescript",
|
|
52
|
-
"nodejs"
|
|
53
|
-
],
|
|
54
|
-
"homepage": "https://github.com/ndycode/oc-codex-multi-auth#readme",
|
|
55
|
-
"bugs": {
|
|
56
|
-
"url": "https://github.com/ndycode/oc-codex-multi-auth/issues"
|
|
57
|
-
},
|
|
58
|
-
"scripts": {
|
|
59
|
-
"build": "node scripts/clean-dist.js && tsc && node scripts/copy-oauth-success.js",
|
|
60
|
-
"typecheck": "tsc --noEmit",
|
|
61
|
-
"lint": "npm run lint:ts && npm run lint:scripts",
|
|
62
|
-
"lint:ts": "eslint . --ext .ts",
|
|
63
|
-
"lint:scripts": "eslint scripts --ext .js",
|
|
64
|
-
"lint:fix": "npm run lint:ts:fix && npm run lint:scripts:fix",
|
|
65
|
-
"lint:ts:fix": "eslint . --ext .ts --fix",
|
|
66
|
-
"lint:scripts:fix": "eslint scripts --ext .js --fix",
|
|
67
|
-
"test": "vitest run",
|
|
68
|
-
"test:watch": "vitest",
|
|
69
|
-
"test:ui": "vitest --ui",
|
|
70
|
-
"test:coverage": "vitest run --coverage",
|
|
71
|
-
"coverage": "vitest run --coverage",
|
|
72
|
-
"audit:prod": "npm audit --omit=dev --audit-level=high",
|
|
73
|
-
"audit:all": "npm audit --audit-level=high",
|
|
74
|
-
"audit:dev:allowlist": "node scripts/audit-dev-allowlist.js",
|
|
75
|
-
"audit:ci": "npm run audit:prod && npm run audit:dev:allowlist",
|
|
76
|
-
"prepublishOnly": "npm run build",
|
|
77
|
-
"prepare": "husky"
|
|
78
|
-
},
|
|
79
|
-
"bin": {
|
|
80
|
-
"oc-codex-multi-auth": "scripts/install-oc-codex-multi-auth.js"
|
|
81
|
-
},
|
|
82
|
-
"files": [
|
|
83
|
-
"dist/",
|
|
84
|
-
"assets/",
|
|
85
|
-
"config/",
|
|
86
|
-
"scripts/",
|
|
87
|
-
"README.md",
|
|
88
|
-
"LICENSE"
|
|
89
|
-
],
|
|
90
|
-
"lint-staged": {
|
|
91
|
-
"*.ts": [
|
|
92
|
-
"eslint --max-warnings=0 --fix --no-warn-ignored"
|
|
93
|
-
],
|
|
94
|
-
"scripts/**/*.js": [
|
|
95
|
-
"eslint --max-warnings=0 --fix --no-warn-ignored"
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
"engines": {
|
|
99
|
-
"node": ">=18.0.0"
|
|
100
|
-
},
|
|
101
|
-
"peerDependencies": {
|
|
102
|
-
"typescript": "^5"
|
|
103
|
-
},
|
|
104
|
-
"devDependencies": {
|
|
105
|
-
"@fast-check/vitest": "^0.2.4",
|
|
106
|
-
"@opencode-ai/sdk": "^1.2.10",
|
|
107
|
-
"@types/node": "^25.3.0",
|
|
108
|
-
"@types/proper-lockfile": "^4.1.4",
|
|
109
|
-
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
110
|
-
"@typescript-eslint/parser": "^8.56.0",
|
|
111
|
-
"@vitest/coverage-v8": "^4.0.18",
|
|
112
|
-
"@vitest/ui": "^4.0.18",
|
|
113
|
-
"eslint": "^10.0.0",
|
|
114
|
-
"fast-check": "^4.5.3",
|
|
115
|
-
"husky": "^9.1.7",
|
|
116
|
-
"lint-staged": "^16.2.7",
|
|
117
|
-
"typescript": "^5.9.3",
|
|
118
|
-
"typescript-language-server": "^5.1.3",
|
|
119
|
-
"vitest": "^4.0.18"
|
|
120
|
-
},
|
|
121
|
-
"dependencies": {
|
|
122
|
-
"@napi-rs/keyring": "~1.2.0",
|
|
123
|
-
"@openauthjs/openauth": "^0.4.3",
|
|
124
|
-
"@opencode-ai/plugin": "^1.14.22",
|
|
125
|
-
"@opentui/core": "0.2.6",
|
|
126
|
-
"@opentui/solid": "0.2.6",
|
|
127
|
-
"hono": "4.12.26",
|
|
128
|
-
"proper-lockfile": "^4.1.2",
|
|
129
|
-
"solid-js": "^1.9.11",
|
|
130
|
-
"web-tree-sitter": "^0.25.10",
|
|
131
|
-
"zod": "^4.3.6"
|
|
132
|
-
},
|
|
133
|
-
"overrides": {
|
|
134
|
-
"esbuild": "^0.28.1",
|
|
135
|
-
"flatted": "3.4.2",
|
|
136
|
-
"hono": "4.12.26",
|
|
137
|
-
"rollup": "4.60.0",
|
|
138
|
-
"vite": "^7.3.5",
|
|
139
|
-
"yaml": "^2.8.3",
|
|
140
|
-
"@babel/core": "^7.29.6",
|
|
141
|
-
"ajv@<6.14.0": "^6.14.0",
|
|
142
|
-
"brace-expansion@>=2.0.0 <=2.0.2": "^2.0.3",
|
|
143
|
-
"brace-expansion@>=5.0.0 <5.0.6": "^5.0.6",
|
|
144
|
-
"minimatch@<9.0.7": "^9.0.7",
|
|
145
|
-
"minimatch@>=10.0.0 <10.2.3": "^10.2.3",
|
|
146
|
-
"picomatch@<2.3.2": "^2.3.2",
|
|
147
|
-
"picomatch@>=4.0.0 <4.0.4": "^4.0.4",
|
|
148
|
-
"@typescript-eslint/typescript-estree": {
|
|
149
|
-
"minimatch": "^9.0.7"
|
|
150
|
-
},
|
|
151
|
-
"uuid": "13.0.1",
|
|
152
|
-
"diff": "8.0.3",
|
|
153
|
-
"file-type": "21.3.1"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "oc-codex-multi-auth",
|
|
3
|
+
"version": "6.10.0",
|
|
4
|
+
"description": "OpenCode plugin for ChatGPT Plus/Pro OAuth with Codex/GPT-5 routing, multi-account rotation, account switching, health checks, diagnostics, and recovery tools",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./tui": {
|
|
13
|
+
"types": "./dist/tui.d.ts",
|
|
14
|
+
"import": "./dist/tui.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "ndycode",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/ndycode/oc-codex-multi-auth.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"opencode",
|
|
26
|
+
"opencode-plugin",
|
|
27
|
+
"opencode-auth",
|
|
28
|
+
"openai",
|
|
29
|
+
"chatgpt",
|
|
30
|
+
"chatgpt-plus",
|
|
31
|
+
"chatgpt-pro",
|
|
32
|
+
"oauth",
|
|
33
|
+
"oauth2",
|
|
34
|
+
"oauth-login",
|
|
35
|
+
"pkce",
|
|
36
|
+
"codex",
|
|
37
|
+
"codex-auth",
|
|
38
|
+
"codex-oauth",
|
|
39
|
+
"gpt-5",
|
|
40
|
+
"gpt-5-5",
|
|
41
|
+
"multi-account",
|
|
42
|
+
"account-rotation",
|
|
43
|
+
"account-switching",
|
|
44
|
+
"account-health",
|
|
45
|
+
"health-checks",
|
|
46
|
+
"quota-management",
|
|
47
|
+
"diagnostics",
|
|
48
|
+
"recovery-tools",
|
|
49
|
+
"terminal-ui",
|
|
50
|
+
"developer-tools",
|
|
51
|
+
"typescript",
|
|
52
|
+
"nodejs"
|
|
53
|
+
],
|
|
54
|
+
"homepage": "https://github.com/ndycode/oc-codex-multi-auth#readme",
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/ndycode/oc-codex-multi-auth/issues"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "node scripts/clean-dist.js && tsc && node scripts/copy-oauth-success.js",
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"lint": "npm run lint:ts && npm run lint:scripts",
|
|
62
|
+
"lint:ts": "eslint . --ext .ts",
|
|
63
|
+
"lint:scripts": "eslint scripts --ext .js",
|
|
64
|
+
"lint:fix": "npm run lint:ts:fix && npm run lint:scripts:fix",
|
|
65
|
+
"lint:ts:fix": "eslint . --ext .ts --fix",
|
|
66
|
+
"lint:scripts:fix": "eslint scripts --ext .js --fix",
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"test:watch": "vitest",
|
|
69
|
+
"test:ui": "vitest --ui",
|
|
70
|
+
"test:coverage": "vitest run --coverage",
|
|
71
|
+
"coverage": "vitest run --coverage",
|
|
72
|
+
"audit:prod": "npm audit --omit=dev --audit-level=high",
|
|
73
|
+
"audit:all": "npm audit --audit-level=high",
|
|
74
|
+
"audit:dev:allowlist": "node scripts/audit-dev-allowlist.js",
|
|
75
|
+
"audit:ci": "npm run audit:prod && npm run audit:dev:allowlist",
|
|
76
|
+
"prepublishOnly": "npm run build",
|
|
77
|
+
"prepare": "husky"
|
|
78
|
+
},
|
|
79
|
+
"bin": {
|
|
80
|
+
"oc-codex-multi-auth": "scripts/install-oc-codex-multi-auth.js"
|
|
81
|
+
},
|
|
82
|
+
"files": [
|
|
83
|
+
"dist/",
|
|
84
|
+
"assets/",
|
|
85
|
+
"config/",
|
|
86
|
+
"scripts/",
|
|
87
|
+
"README.md",
|
|
88
|
+
"LICENSE"
|
|
89
|
+
],
|
|
90
|
+
"lint-staged": {
|
|
91
|
+
"*.ts": [
|
|
92
|
+
"eslint --max-warnings=0 --fix --no-warn-ignored"
|
|
93
|
+
],
|
|
94
|
+
"scripts/**/*.js": [
|
|
95
|
+
"eslint --max-warnings=0 --fix --no-warn-ignored"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"engines": {
|
|
99
|
+
"node": ">=18.0.0"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"typescript": "^5"
|
|
103
|
+
},
|
|
104
|
+
"devDependencies": {
|
|
105
|
+
"@fast-check/vitest": "^0.2.4",
|
|
106
|
+
"@opencode-ai/sdk": "^1.2.10",
|
|
107
|
+
"@types/node": "^25.3.0",
|
|
108
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
109
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
110
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
111
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
112
|
+
"@vitest/ui": "^4.0.18",
|
|
113
|
+
"eslint": "^10.0.0",
|
|
114
|
+
"fast-check": "^4.5.3",
|
|
115
|
+
"husky": "^9.1.7",
|
|
116
|
+
"lint-staged": "^16.2.7",
|
|
117
|
+
"typescript": "^5.9.3",
|
|
118
|
+
"typescript-language-server": "^5.1.3",
|
|
119
|
+
"vitest": "^4.0.18"
|
|
120
|
+
},
|
|
121
|
+
"dependencies": {
|
|
122
|
+
"@napi-rs/keyring": "~1.2.0",
|
|
123
|
+
"@openauthjs/openauth": "^0.4.3",
|
|
124
|
+
"@opencode-ai/plugin": "^1.14.22",
|
|
125
|
+
"@opentui/core": "0.2.6",
|
|
126
|
+
"@opentui/solid": "0.2.6",
|
|
127
|
+
"hono": "4.12.26",
|
|
128
|
+
"proper-lockfile": "^4.1.2",
|
|
129
|
+
"solid-js": "^1.9.11",
|
|
130
|
+
"web-tree-sitter": "^0.25.10",
|
|
131
|
+
"zod": "^4.3.6"
|
|
132
|
+
},
|
|
133
|
+
"overrides": {
|
|
134
|
+
"esbuild": "^0.28.1",
|
|
135
|
+
"flatted": "3.4.2",
|
|
136
|
+
"hono": "4.12.26",
|
|
137
|
+
"rollup": "4.60.0",
|
|
138
|
+
"vite": "^7.3.5",
|
|
139
|
+
"yaml": "^2.8.3",
|
|
140
|
+
"@babel/core": "^7.29.6",
|
|
141
|
+
"ajv@<6.14.0": "^6.14.0",
|
|
142
|
+
"brace-expansion@>=2.0.0 <=2.0.2": "^2.0.3",
|
|
143
|
+
"brace-expansion@>=5.0.0 <5.0.6": "^5.0.6",
|
|
144
|
+
"minimatch@<9.0.7": "^9.0.7",
|
|
145
|
+
"minimatch@>=10.0.0 <10.2.3": "^10.2.3",
|
|
146
|
+
"picomatch@<2.3.2": "^2.3.2",
|
|
147
|
+
"picomatch@>=4.0.0 <4.0.4": "^4.0.4",
|
|
148
|
+
"@typescript-eslint/typescript-estree": {
|
|
149
|
+
"minimatch": "^9.0.7"
|
|
150
|
+
},
|
|
151
|
+
"uuid": "13.0.1",
|
|
152
|
+
"diff": "8.0.3",
|
|
153
|
+
"file-type": "21.3.1"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -89,13 +89,13 @@ function printHelp() {
|
|
|
89
89
|
"Default behavior:\n" +
|
|
90
90
|
" - Installs/updates global config at ~/.config/opencode/opencode.json\n" +
|
|
91
91
|
" - Enables the prompt status bar TUI plugin at ~/.config/opencode/tui.json\n" +
|
|
92
|
-
" - Uses compact UI config by default (
|
|
92
|
+
" - Uses compact UI config by default (12 base OAuth models + variant picker presets)\n" +
|
|
93
93
|
" - Ensures plugin is unpinned (latest)\n" +
|
|
94
94
|
" - Clears OpenCode plugin cache\n\n" +
|
|
95
95
|
"Options:\n" +
|
|
96
|
-
" --modern Force compact modern config (
|
|
97
|
-
" --full Install compact base models plus
|
|
98
|
-
" --legacy Force explicit legacy config (
|
|
96
|
+
" --modern Force compact modern config (12 base OAuth models + --variant presets)\n" +
|
|
97
|
+
" --full Install compact base models plus 53 explicit selector entries\n" +
|
|
98
|
+
" --legacy Force explicit legacy config (53 preset model entries)\n" +
|
|
99
99
|
" --dry-run Show actions without writing\n" +
|
|
100
100
|
" --no-cache-clear Skip clearing OpenCode cache\n"
|
|
101
101
|
);
|
|
@@ -907,10 +907,10 @@ export async function runInstaller(argv = process.argv.slice(2), options = {}) {
|
|
|
907
907
|
log("\nDone. Restart OpenCode to (re)install the plugin.");
|
|
908
908
|
log("Example: opencode");
|
|
909
909
|
if (configMode === "modern") {
|
|
910
|
-
log("Note: Modern config intentionally shows
|
|
910
|
+
log("Note: Modern config intentionally shows 12 base OAuth model entries; use the variant picker for reasoning presets.");
|
|
911
911
|
}
|
|
912
912
|
if (configMode === "legacy") {
|
|
913
|
-
log("Note: Legacy config writes
|
|
913
|
+
log("Note: Legacy config writes 53 explicit preset entries and is also safe for older OpenCode versions.");
|
|
914
914
|
}
|
|
915
915
|
if (configMode === "full") {
|
|
916
916
|
log("Note: Full config installs both compact base models and explicit preset entries for direct selector IDs.");
|