codex-multi-auth 2.1.12 → 2.1.13-beta.1
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/LICENSE +21 -21
- package/README.md +412 -411
- package/assets/codex-multi-auth-icon.svg +39 -39
- package/assets/readme-hero.svg +31 -31
- package/config/README.md +29 -29
- package/config/codex-legacy.json +571 -571
- package/config/codex-modern.json +258 -258
- package/config/minimal-codex.json +15 -15
- package/config/schema/config.schema.json +20 -20
- package/dist/lib/accounts.d.ts +13 -0
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/accounts.js +58 -14
- package/dist/lib/accounts.js.map +1 -1
- package/dist/lib/codex-manager/commands/status.d.ts.map +1 -1
- package/dist/lib/codex-manager/commands/status.js +9 -1
- package/dist/lib/codex-manager/commands/status.js.map +1 -1
- package/dist/lib/codex-manager/commands/workspace.d.ts +19 -0
- package/dist/lib/codex-manager/commands/workspace.d.ts.map +1 -0
- package/dist/lib/codex-manager/commands/workspace.js +85 -0
- package/dist/lib/codex-manager/commands/workspace.js.map +1 -0
- package/dist/lib/codex-manager/help.d.ts +1 -0
- package/dist/lib/codex-manager/help.d.ts.map +1 -1
- package/dist/lib/codex-manager/help.js +27 -2
- package/dist/lib/codex-manager/help.js.map +1 -1
- package/dist/lib/codex-manager.d.ts.map +1 -1
- package/dist/lib/codex-manager.js +35 -1
- package/dist/lib/codex-manager.js.map +1 -1
- package/dist/lib/context-overflow.js +10 -10
- package/dist/lib/oauth-success.html +125 -125
- package/dist/lib/prompts/codex-host-bridge.js +138 -138
- package/dist/lib/prompts/codex.js +79 -79
- package/dist/lib/runtime-rotation-proxy.d.ts +15 -0
- package/dist/lib/runtime-rotation-proxy.d.ts.map +1 -1
- package/dist/lib/runtime-rotation-proxy.js +28 -7
- package/dist/lib/runtime-rotation-proxy.js.map +1 -1
- package/dist/lib/schemas.d.ts +54 -0
- package/dist/lib/schemas.d.ts.map +1 -1
- package/dist/lib/schemas.js +18 -0
- package/dist/lib/schemas.js.map +1 -1
- package/node_modules/@codex-ai/plugin/dist/index.d.ts +2 -2
- package/node_modules/@codex-ai/plugin/dist/index.js +2 -2
- package/node_modules/@codex-ai/plugin/dist/tool.d.ts +42 -42
- package/node_modules/@codex-ai/plugin/dist/tool.js +29 -29
- package/node_modules/@codex-ai/plugin/package.json +9 -9
- package/package.json +193 -193
- package/scripts/codex-app-launcher.js +653 -653
- package/scripts/codex-app-router.js +322 -322
- package/scripts/codex-bin-resolver.js +254 -254
- package/scripts/codex-multi-auth.js +59 -59
- package/scripts/codex-routing.js +56 -56
- package/scripts/codex.js +4275 -4275
- package/scripts/install-codex-auth-utils.js +206 -206
- package/scripts/postinstall.js +343 -343
- package/scripts/preuninstall.js +254 -254
- package/vendor/codex-ai-plugin/dist/index.d.ts +2 -2
- package/vendor/codex-ai-plugin/dist/index.js +2 -2
- package/vendor/codex-ai-plugin/dist/tool.d.ts +42 -42
- package/vendor/codex-ai-plugin/dist/tool.js +29 -29
- package/vendor/codex-ai-plugin/package.json +9 -9
- package/vendor/codex-ai-sdk/dist/index.d.ts +4 -4
- package/vendor/codex-ai-sdk/dist/index.js +2 -2
- package/vendor/codex-ai-sdk/package.json +8 -8
package/scripts/codex-routing.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
const AUTH_SUBCOMMANDS = new Set([
|
|
2
|
-
"login",
|
|
3
|
-
"list",
|
|
4
|
-
"status",
|
|
5
|
-
"switch",
|
|
6
|
-
"best",
|
|
7
|
-
"check",
|
|
8
|
-
"features",
|
|
9
|
-
"usage",
|
|
10
|
-
"verify-flagged",
|
|
11
|
-
"verify",
|
|
12
|
-
"forecast",
|
|
13
|
-
"report",
|
|
14
|
-
"fix",
|
|
15
|
-
"doctor",
|
|
16
|
-
"account",
|
|
17
|
-
"budget",
|
|
18
|
-
"bridge",
|
|
19
|
-
"integrations",
|
|
20
|
-
"models",
|
|
21
|
-
"monitor",
|
|
22
|
-
"rotation",
|
|
23
|
-
"why-selected",
|
|
24
|
-
"config",
|
|
25
|
-
"init-config",
|
|
26
|
-
"debug",
|
|
27
|
-
]);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {string[]} args
|
|
31
|
-
* @returns {string[]}
|
|
32
|
-
*/
|
|
33
|
-
export function normalizeAuthAlias(args) {
|
|
34
|
-
if (args.length >= 2 && args[0] === "multi" && args[1] === "auth") {
|
|
35
|
-
return ["auth", ...args.slice(2)];
|
|
36
|
-
}
|
|
37
|
-
if (args.length >= 1 && (args[0] === "multi-auth" || args[0] === "multiauth")) {
|
|
38
|
-
return ["auth", ...args.slice(1)];
|
|
39
|
-
}
|
|
40
|
-
return args;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @param {string[]} args
|
|
45
|
-
* @returns {boolean}
|
|
46
|
-
*/
|
|
47
|
-
export function shouldHandleMultiAuthAuth(args) {
|
|
48
|
-
if (args[0] !== "auth") return false;
|
|
49
|
-
if (args.length === 1) return true;
|
|
50
|
-
const subcommand = args[1];
|
|
51
|
-
if (typeof subcommand !== "string") return false;
|
|
52
|
-
if (subcommand.startsWith("-")) return true;
|
|
53
|
-
return AUTH_SUBCOMMANDS.has(subcommand);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { AUTH_SUBCOMMANDS };
|
|
1
|
+
const AUTH_SUBCOMMANDS = new Set([
|
|
2
|
+
"login",
|
|
3
|
+
"list",
|
|
4
|
+
"status",
|
|
5
|
+
"switch",
|
|
6
|
+
"best",
|
|
7
|
+
"check",
|
|
8
|
+
"features",
|
|
9
|
+
"usage",
|
|
10
|
+
"verify-flagged",
|
|
11
|
+
"verify",
|
|
12
|
+
"forecast",
|
|
13
|
+
"report",
|
|
14
|
+
"fix",
|
|
15
|
+
"doctor",
|
|
16
|
+
"account",
|
|
17
|
+
"budget",
|
|
18
|
+
"bridge",
|
|
19
|
+
"integrations",
|
|
20
|
+
"models",
|
|
21
|
+
"monitor",
|
|
22
|
+
"rotation",
|
|
23
|
+
"why-selected",
|
|
24
|
+
"config",
|
|
25
|
+
"init-config",
|
|
26
|
+
"debug",
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param {string[]} args
|
|
31
|
+
* @returns {string[]}
|
|
32
|
+
*/
|
|
33
|
+
export function normalizeAuthAlias(args) {
|
|
34
|
+
if (args.length >= 2 && args[0] === "multi" && args[1] === "auth") {
|
|
35
|
+
return ["auth", ...args.slice(2)];
|
|
36
|
+
}
|
|
37
|
+
if (args.length >= 1 && (args[0] === "multi-auth" || args[0] === "multiauth")) {
|
|
38
|
+
return ["auth", ...args.slice(1)];
|
|
39
|
+
}
|
|
40
|
+
return args;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @param {string[]} args
|
|
45
|
+
* @returns {boolean}
|
|
46
|
+
*/
|
|
47
|
+
export function shouldHandleMultiAuthAuth(args) {
|
|
48
|
+
if (args[0] !== "auth") return false;
|
|
49
|
+
if (args.length === 1) return true;
|
|
50
|
+
const subcommand = args[1];
|
|
51
|
+
if (typeof subcommand !== "string") return false;
|
|
52
|
+
if (subcommand.startsWith("-")) return true;
|
|
53
|
+
return AUTH_SUBCOMMANDS.has(subcommand);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { AUTH_SUBCOMMANDS };
|