@velum-labs/routekit-tool-codex 0.18.0 → 0.18.2
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/dist/install.d.ts +9 -0
- package/dist/install.js +11 -2
- package/dist/test/install.test.js +23 -0
- package/package.json +6 -6
package/dist/install.d.ts
CHANGED
|
@@ -29,6 +29,15 @@ export type CodexInstallInput = {
|
|
|
29
29
|
defaultModel?: string;
|
|
30
30
|
/** Safe selector for the one persistent RouteKit profile. */
|
|
31
31
|
profileId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Pull-based bearer-token helper used by current Codex releases. When
|
|
34
|
+
* omitted, the provider retains the environment-variable contract for
|
|
35
|
+
* callers that manage credentials themselves.
|
|
36
|
+
*/
|
|
37
|
+
auth?: {
|
|
38
|
+
command: string;
|
|
39
|
+
args?: readonly string[];
|
|
40
|
+
};
|
|
32
41
|
owner: CodexInstallOwner;
|
|
33
42
|
codexHome?: string;
|
|
34
43
|
};
|
package/dist/install.js
CHANGED
|
@@ -68,8 +68,17 @@ export function codexIntegrationBlock(input) {
|
|
|
68
68
|
name: `${input.owner.displayName} gateway`,
|
|
69
69
|
base_url: `${base}/v1`,
|
|
70
70
|
wire_api: "responses",
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
...(input.auth !== undefined
|
|
72
|
+
? {
|
|
73
|
+
auth: {
|
|
74
|
+
command: input.auth.command,
|
|
75
|
+
...(input.auth.args !== undefined ? { args: [...input.auth.args] } : {})
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
: {
|
|
79
|
+
requires_openai_auth: false,
|
|
80
|
+
env_key: "ROUTEKIT_GATEWAY_TOKEN"
|
|
81
|
+
})
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
});
|
|
@@ -58,6 +58,29 @@ test("Codex managed install adds one picker-backed profile and removes only owne
|
|
|
58
58
|
rmSync(home, { recursive: true, force: true });
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
+
test("Codex managed install can use a command-backed bearer token", () => {
|
|
62
|
+
const home = mkdtempSync(join(tmpdir(), "routekit-codex-auth-helper-"));
|
|
63
|
+
try {
|
|
64
|
+
installCodexIntegration({
|
|
65
|
+
gatewayUrl: "http://127.0.0.1:9999",
|
|
66
|
+
owner: OWNER,
|
|
67
|
+
profiles: [{ modelId: "opaque-primary" }],
|
|
68
|
+
auth: {
|
|
69
|
+
command: "/opt/routekit/node",
|
|
70
|
+
args: ["/opt/routekit/index.js", "credential", "get", "--tool", "codex"]
|
|
71
|
+
},
|
|
72
|
+
codexHome: home
|
|
73
|
+
});
|
|
74
|
+
const config = readFileSync(join(home, "config.toml"), "utf8");
|
|
75
|
+
assert.match(config, /\[model_providers\.example_route\.auth\]/);
|
|
76
|
+
assert.match(config, /command = "\/opt\/routekit\/node"/);
|
|
77
|
+
assert.match(config, /"credential", "get", "--tool", "codex"/);
|
|
78
|
+
assert.doesNotMatch(config, /env_key|requires_openai_auth/);
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
rmSync(home, { recursive: true, force: true });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
61
84
|
test("Codex's single persistent profile can use a safe custom selector", () => {
|
|
62
85
|
const home = mkdtempSync(join(tmpdir(), "routekit-codex-opaque-"));
|
|
63
86
|
try {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velum-labs/routekit-tool-codex",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/velum-labs/routekit.git",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"@openai/codex-sdk": "0.145.0",
|
|
30
30
|
"smol-toml": "1.7.0",
|
|
31
31
|
"zod": "4.4.3",
|
|
32
|
-
"@velum-labs/routekit-contracts": "0.18.
|
|
33
|
-
"@velum-labs/routekit-harness-core": "0.18.
|
|
34
|
-
"@velum-labs/routekit-registry": "0.18.
|
|
35
|
-
"@velum-labs/routekit-runtime": "0.18.
|
|
36
|
-
"@velum-labs/routekit-tools": "0.18.
|
|
32
|
+
"@velum-labs/routekit-contracts": "0.18.2",
|
|
33
|
+
"@velum-labs/routekit-harness-core": "0.18.2",
|
|
34
|
+
"@velum-labs/routekit-registry": "0.18.2",
|
|
35
|
+
"@velum-labs/routekit-runtime": "0.18.2",
|
|
36
|
+
"@velum-labs/routekit-tools": "0.18.2"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"llm",
|