@koreanhole/opencodex 3.2.18 → 3.2.20
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koreanhole/opencodex",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.20",
|
|
4
4
|
"description": "Full opencodex runtime with Cline 2.2.0+ JSON and Gemini CLI headless provider adapters",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./bin/package-main.mjs",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"test:e2e:cline-live": "bun test ./tests/e2e/cline-live.live.ts",
|
|
34
34
|
"test:e2e:gemini": "bun test ./tests/e2e/gemini-codex.live.ts -t \"full-stack:\"",
|
|
35
35
|
"test:e2e:gemini-oauth-only": "bun test ./tests/e2e/gemini-oauth-only.test.ts",
|
|
36
|
+
"test:e2e:gemini-oauth-codeassist": "bun test ./tests/e2e/gemini-oauth-codeassist.live.ts",
|
|
36
37
|
"test:e2e:gemini-auth-selection": "bun test ./tests/e2e/gemini-oauth-only.test.ts -t \"honors vendor-selected API-key\"",
|
|
37
38
|
"test:e2e:gemini-oauth-keychain": "bun test ./tests/e2e/gemini-oauth-only.test.ts -t \"passes keyring access\"",
|
|
38
39
|
"test:e2e:gemini-slow": "bun test ./tests/e2e/gemini-codex.live.ts -t \"full-stack: a slow Gemini start\"",
|
|
@@ -48,6 +48,7 @@ const FORWARDED_ENV_KEYS = [
|
|
|
48
48
|
"GOOGLE_CLOUD_LOCATION",
|
|
49
49
|
"GOOGLE_APPLICATION_CREDENTIALS",
|
|
50
50
|
"GOOGLE_GEMINI_BASE_URL",
|
|
51
|
+
"CODE_ASSIST_ENDPOINT",
|
|
51
52
|
"DBUS_SESSION_BUS_ADDRESS",
|
|
52
53
|
"XDG_RUNTIME_DIR",
|
|
53
54
|
"GEMINI_FORCE_ENCRYPTED_FILE_STORAGE",
|
|
@@ -93,6 +94,15 @@ function enabled(value: unknown): boolean {
|
|
|
93
94
|
return nonEmpty(value)?.toLowerCase() === "true";
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
function isHttpEndpoint(value: string): boolean {
|
|
98
|
+
try {
|
|
99
|
+
const url = new URL(value);
|
|
100
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
101
|
+
} catch {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
function asRecord(value: unknown): Record<string, unknown> | undefined {
|
|
97
107
|
return value && typeof value === "object" && !Array.isArray(value)
|
|
98
108
|
? value as Record<string, unknown>
|
|
@@ -177,17 +187,15 @@ export function buildGeminiHeadlessEnv(
|
|
|
177
187
|
env.USERPROFILE = realHome;
|
|
178
188
|
for (const key of FORWARDED_ENV_KEYS) {
|
|
179
189
|
const value = nonEmpty(sourceEnv[key]);
|
|
180
|
-
if (value)
|
|
190
|
+
if (!value) continue;
|
|
191
|
+
if (key === "CODE_ASSIST_ENDPOINT" && !isHttpEndpoint(value)) continue;
|
|
192
|
+
env[key] = value;
|
|
181
193
|
}
|
|
182
194
|
if (geminiHeadlessAuth(sourceEnv) === "oauth") {
|
|
183
195
|
env.GOOGLE_GENAI_USE_GCA = "true";
|
|
184
196
|
if (env.GEMINI_FORCE_ENCRYPTED_FILE_STORAGE === undefined) {
|
|
185
197
|
env.GEMINI_FORCE_ENCRYPTED_FILE_STORAGE = "true";
|
|
186
198
|
}
|
|
187
|
-
const oauthPath = join(geminiVendorHome(sourceEnv), ".gemini", "oauth_creds.json");
|
|
188
|
-
if (!env.GOOGLE_APPLICATION_CREDENTIALS && existsSync(oauthPath)) {
|
|
189
|
-
env.GOOGLE_APPLICATION_CREDENTIALS = resolve(oauthPath);
|
|
190
|
-
}
|
|
191
199
|
}
|
|
192
200
|
Object.assign(env, {
|
|
193
201
|
GEMINI_CLI_TRUST_WORKSPACE: "true",
|