codex-multi-auth 0.1.4 → 0.1.5
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 +1 -1
- package/README.md +6 -6
- package/assets/readme-hero.svg +31 -31
- package/dist/lib/context-overflow.js +10 -10
- package/dist/lib/prompts/codex.js +2 -2
- package/node_modules/@codex-ai/plugin/dist/index.d.ts +1 -1
- package/node_modules/@codex-ai/plugin/dist/tool.d.ts +41 -41
- package/node_modules/@codex-ai/plugin/dist/tool.js +28 -28
- package/package.json +1 -1
- package/scripts/bench-format/hashline-v2.mjs +642 -642
- package/scripts/bench-format/render.mjs +496 -496
- package/scripts/bench-format/stats.mjs +54 -54
- package/scripts/bench-format/tasks.mjs +151 -151
- package/scripts/benchmark-render-dashboard.mjs +49 -49
- package/scripts/codex-multi-auth.js +1 -1
- package/scripts/codex.js +33 -29
- package/scripts/install-codex-auth.js +9 -9
- package/scripts/test-all-models.sh +7 -7
- package/scripts/test-model-matrix.js +108 -80
- package/scripts/validate-model-map.sh +7 -7
- package/vendor/codex-ai-plugin/dist/index.d.ts +1 -1
- package/vendor/codex-ai-plugin/dist/tool.d.ts +41 -41
- package/vendor/codex-ai-plugin/dist/tool.js +28 -28
- package/vendor/codex-ai-sdk/dist/index.d.ts +3 -3
package/LICENSE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/README.md
CHANGED
|
@@ -263,12 +263,12 @@ codex auth doctor --json
|
|
|
263
263
|
|
|
264
264
|
---
|
|
265
265
|
|
|
266
|
-
## Release Notes
|
|
267
|
-
|
|
268
|
-
- Current stable: [docs/releases/v0.1.
|
|
269
|
-
- Previous stable: [docs/releases/v0.1.
|
|
270
|
-
- Earlier stable: [docs/releases/v0.1.
|
|
271
|
-
- Archived prerelease: [docs/releases/v0.1.0-beta.0.md](docs/releases/v0.1.0-beta.0.md)
|
|
266
|
+
## Release Notes
|
|
267
|
+
|
|
268
|
+
- Current stable: [docs/releases/v0.1.5.md](docs/releases/v0.1.5.md)
|
|
269
|
+
- Previous stable: [docs/releases/v0.1.4.md](docs/releases/v0.1.4.md)
|
|
270
|
+
- Earlier stable: [docs/releases/v0.1.3.md](docs/releases/v0.1.3.md)
|
|
271
|
+
- Archived prerelease: [docs/releases/v0.1.0-beta.0.md](docs/releases/v0.1.0-beta.0.md)
|
|
272
272
|
|
|
273
273
|
## License
|
|
274
274
|
|
package/assets/readme-hero.svg
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="Codex Multi-Auth OAuth">
|
|
2
|
-
<defs>
|
|
3
|
-
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
-
<stop offset="0%" stop-color="#0f172a" />
|
|
5
|
-
<stop offset="100%" stop-color="#1f2937" />
|
|
6
|
-
</linearGradient>
|
|
7
|
-
<linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
|
|
8
|
-
<stop offset="0%" stop-color="#38bdf8" />
|
|
9
|
-
<stop offset="100%" stop-color="#22d3ee" />
|
|
10
|
-
</linearGradient>
|
|
11
|
-
</defs>
|
|
12
|
-
<rect width="1200" height="300" rx="28" fill="url(#bg)" />
|
|
13
|
-
<g opacity="0.12">
|
|
14
|
-
<circle cx="1020" cy="70" r="120" fill="#38bdf8" />
|
|
15
|
-
<circle cx="150" cy="260" r="140" fill="#22d3ee" />
|
|
16
|
-
</g>
|
|
17
|
-
<g fill="none" stroke="url(#accent)" stroke-width="8" stroke-linecap="round" stroke-linejoin="round">
|
|
18
|
-
<path d="M160 95 L100 150 L160 205" />
|
|
19
|
-
<path d="M280 95 L340 150 L280 205" />
|
|
20
|
-
<path d="M205 80 L235 220" />
|
|
21
|
-
</g>
|
|
22
|
-
<text x="420" y="120" fill="#e2e8f0" font-size="42" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif" font-weight="600">
|
|
23
|
-
Codex Multi-Auth OAuth
|
|
24
|
-
</text>
|
|
25
|
-
<text x="420" y="170" fill="#cbd5f5" font-size="24" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
|
|
26
|
-
ChatGPT Plus/Pro auth for GPT-5.2 and Codex models
|
|
27
|
-
</text>
|
|
28
|
-
<text x="420" y="220" fill="#7dd3fc" font-size="18" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
|
|
29
|
-
One-command install, modern variants, full tool support
|
|
30
|
-
</text>
|
|
31
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="Codex Multi-Auth OAuth">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0%" stop-color="#0f172a" />
|
|
5
|
+
<stop offset="100%" stop-color="#1f2937" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
|
|
8
|
+
<stop offset="0%" stop-color="#38bdf8" />
|
|
9
|
+
<stop offset="100%" stop-color="#22d3ee" />
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect width="1200" height="300" rx="28" fill="url(#bg)" />
|
|
13
|
+
<g opacity="0.12">
|
|
14
|
+
<circle cx="1020" cy="70" r="120" fill="#38bdf8" />
|
|
15
|
+
<circle cx="150" cy="260" r="140" fill="#22d3ee" />
|
|
16
|
+
</g>
|
|
17
|
+
<g fill="none" stroke="url(#accent)" stroke-width="8" stroke-linecap="round" stroke-linejoin="round">
|
|
18
|
+
<path d="M160 95 L100 150 L160 205" />
|
|
19
|
+
<path d="M280 95 L340 150 L280 205" />
|
|
20
|
+
<path d="M205 80 L235 220" />
|
|
21
|
+
</g>
|
|
22
|
+
<text x="420" y="120" fill="#e2e8f0" font-size="42" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif" font-weight="600">
|
|
23
|
+
Codex Multi-Auth OAuth
|
|
24
|
+
</text>
|
|
25
|
+
<text x="420" y="170" fill="#cbd5f5" font-size="24" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
|
|
26
|
+
ChatGPT Plus/Pro auth for GPT-5.2 and Codex models
|
|
27
|
+
</text>
|
|
28
|
+
<text x="420" y="220" fill="#7dd3fc" font-size="18" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
|
|
29
|
+
One-command install, modern variants, full tool support
|
|
30
|
+
</text>
|
|
31
|
+
</svg>
|
|
@@ -32,16 +32,16 @@ export function isContextOverflowError(status, bodyText) {
|
|
|
32
32
|
/**
|
|
33
33
|
* The message shown to users when context overflow occurs
|
|
34
34
|
*/
|
|
35
|
-
const CONTEXT_OVERFLOW_MESSAGE = `[Plugin Notice] Context is too long for this model.
|
|
36
|
-
|
|
37
|
-
Please use one of these commands to reduce context size:
|
|
38
|
-
|
|
39
|
-
• **/compact** - Compress conversation history (recommended)
|
|
40
|
-
• **/clear** - Start fresh with empty context
|
|
41
|
-
• **/undo** - Remove recent messages
|
|
42
|
-
|
|
43
|
-
Then retry your request.
|
|
44
|
-
|
|
35
|
+
const CONTEXT_OVERFLOW_MESSAGE = `[Plugin Notice] Context is too long for this model.
|
|
36
|
+
|
|
37
|
+
Please use one of these commands to reduce context size:
|
|
38
|
+
|
|
39
|
+
• **/compact** - Compress conversation history (recommended)
|
|
40
|
+
• **/clear** - Start fresh with empty context
|
|
41
|
+
• **/undo** - Remove recent messages
|
|
42
|
+
|
|
43
|
+
Then retry your request.
|
|
44
|
+
|
|
45
45
|
Alternatively, you can switch to a model with a larger context window.`;
|
|
46
46
|
/**
|
|
47
47
|
* Creates a synthetic SSE response for context overflow errors.
|
|
@@ -307,7 +307,7 @@ YOU ARE IN A DIFFERENT ENVIRONMENT. These instructions override ALL previous too
|
|
|
307
307
|
|
|
308
308
|
<tool_replacements priority="0">
|
|
309
309
|
<critical_rule priority="0">
|
|
310
|
-
apply_patch/applyPatch are Codex names, but host tool names vary by version.
|
|
310
|
+
apply_patch/applyPatch are Codex names, but host tool names vary by version.
|
|
311
311
|
- Inspect the actual tool list before editing.
|
|
312
312
|
- If edit exists: use edit for precise in-place string replacements and hashline edits.
|
|
313
313
|
- If edit is absent and apply_patch exists: use apply_patch for those precise/hashline edits in this plugin.
|
|
@@ -329,7 +329,7 @@ File Operations:
|
|
|
329
329
|
- write - Create new files (if available)
|
|
330
330
|
- edit - Modify existing files with string replacement (version-dependent)
|
|
331
331
|
- oldString must be literal text from the current file; never pass unresolved placeholders like \${TARGET_SNIPPET}
|
|
332
|
-
- apply_patch - May be the edit/patch tool name in newer host builds (version-dependent)
|
|
332
|
+
- apply_patch - May be the edit/patch tool name in newer host builds (version-dependent)
|
|
333
333
|
- hashline_read - Read lines with hashline refs (L<line>#<hash>) for deterministic edits
|
|
334
334
|
- patch - Apply diff patches (version-dependent)
|
|
335
335
|
- read - Read file contents
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type PluginInput = any;
|
|
1
|
+
export type PluginInput = any;
|
|
2
2
|
export type Plugin = any;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export interface ToolContext {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
directory: string;
|
|
4
|
-
worktree: string;
|
|
5
|
-
ask: (request: any) => Promise<any> | any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ToolDefinition<TArgs = any, TResult = any> {
|
|
9
|
-
description?: string;
|
|
10
|
-
args?: Record<string, any>;
|
|
11
|
-
parameters?: unknown;
|
|
12
|
-
execute: (args: TArgs, context: ToolContext) => Promise<TResult> | TResult;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface SchemaNode {
|
|
17
|
-
optional: () => SchemaNode;
|
|
18
|
-
describe: (_text: string) => SchemaNode;
|
|
19
|
-
min: (_value: number) => SchemaNode;
|
|
20
|
-
max: (_value: number) => SchemaNode;
|
|
21
|
-
default: (_value: unknown) => SchemaNode;
|
|
22
|
-
int: () => SchemaNode;
|
|
23
|
-
array: (_node?: unknown) => SchemaNode;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface ToolFactory {
|
|
28
|
-
<TArgs = any, TResult = any>(definition: ToolDefinition<TArgs, TResult>): ToolDefinition<TArgs, TResult>;
|
|
29
|
-
schema: {
|
|
30
|
-
string: () => SchemaNode;
|
|
31
|
-
number: () => SchemaNode;
|
|
32
|
-
boolean: () => SchemaNode;
|
|
33
|
-
object: (shape: Record<string, unknown>) => SchemaNode;
|
|
34
|
-
enum: (values: readonly unknown[]) => SchemaNode;
|
|
35
|
-
literal: (value: unknown) => SchemaNode;
|
|
36
|
-
array: (node: unknown) => SchemaNode;
|
|
37
|
-
any: () => SchemaNode;
|
|
38
|
-
unknown: () => SchemaNode;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
1
|
+
export interface ToolContext {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
directory: string;
|
|
4
|
+
worktree: string;
|
|
5
|
+
ask: (request: any) => Promise<any> | any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ToolDefinition<TArgs = any, TResult = any> {
|
|
9
|
+
description?: string;
|
|
10
|
+
args?: Record<string, any>;
|
|
11
|
+
parameters?: unknown;
|
|
12
|
+
execute: (args: TArgs, context: ToolContext) => Promise<TResult> | TResult;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SchemaNode {
|
|
17
|
+
optional: () => SchemaNode;
|
|
18
|
+
describe: (_text: string) => SchemaNode;
|
|
19
|
+
min: (_value: number) => SchemaNode;
|
|
20
|
+
max: (_value: number) => SchemaNode;
|
|
21
|
+
default: (_value: unknown) => SchemaNode;
|
|
22
|
+
int: () => SchemaNode;
|
|
23
|
+
array: (_node?: unknown) => SchemaNode;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ToolFactory {
|
|
28
|
+
<TArgs = any, TResult = any>(definition: ToolDefinition<TArgs, TResult>): ToolDefinition<TArgs, TResult>;
|
|
29
|
+
schema: {
|
|
30
|
+
string: () => SchemaNode;
|
|
31
|
+
number: () => SchemaNode;
|
|
32
|
+
boolean: () => SchemaNode;
|
|
33
|
+
object: (shape: Record<string, unknown>) => SchemaNode;
|
|
34
|
+
enum: (values: readonly unknown[]) => SchemaNode;
|
|
35
|
+
literal: (value: unknown) => SchemaNode;
|
|
36
|
+
array: (node: unknown) => SchemaNode;
|
|
37
|
+
any: () => SchemaNode;
|
|
38
|
+
unknown: () => SchemaNode;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
42
|
export declare const tool: ToolFactory;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
const chain = {
|
|
2
|
-
optional() { return this; },
|
|
3
|
-
describe() { return this; },
|
|
4
|
-
min() { return this; },
|
|
5
|
-
max() { return this; },
|
|
6
|
-
default() { return this; },
|
|
7
|
-
int() { return this; },
|
|
8
|
-
array() { return this; },
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
function node() {
|
|
12
|
-
return Object.create(chain);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function tool(definition) {
|
|
16
|
-
return definition;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
tool.schema = {
|
|
20
|
-
string: () => node(),
|
|
21
|
-
number: () => node(),
|
|
22
|
-
boolean: () => node(),
|
|
23
|
-
object: () => node(),
|
|
24
|
-
enum: () => node(),
|
|
25
|
-
literal: () => node(),
|
|
26
|
-
array: () => node(),
|
|
27
|
-
any: () => node(),
|
|
28
|
-
unknown: () => node(),
|
|
1
|
+
const chain = {
|
|
2
|
+
optional() { return this; },
|
|
3
|
+
describe() { return this; },
|
|
4
|
+
min() { return this; },
|
|
5
|
+
max() { return this; },
|
|
6
|
+
default() { return this; },
|
|
7
|
+
int() { return this; },
|
|
8
|
+
array() { return this; },
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
function node() {
|
|
12
|
+
return Object.create(chain);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function tool(definition) {
|
|
16
|
+
return definition;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
tool.schema = {
|
|
20
|
+
string: () => node(),
|
|
21
|
+
number: () => node(),
|
|
22
|
+
boolean: () => node(),
|
|
23
|
+
object: () => node(),
|
|
24
|
+
enum: () => node(),
|
|
25
|
+
literal: () => node(),
|
|
26
|
+
array: () => node(),
|
|
27
|
+
any: () => node(),
|
|
28
|
+
unknown: () => node(),
|
|
29
29
|
};
|
package/package.json
CHANGED