axexec 1.1.2 → 1.1.3
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.
|
@@ -19,6 +19,8 @@ function getCredentialEnvironment(credentials) {
|
|
|
19
19
|
// axauth uses "accessToken", but also check legacy "oauthToken" and "token" keys
|
|
20
20
|
const oauthToken = resolveStringField(credentials.data, "accessToken", "oauthToken") ??
|
|
21
21
|
resolveStringField(credentials.data, "token", "token");
|
|
22
|
+
// Extract Google OAuth access_token (snake_case, used by Gemini)
|
|
23
|
+
const googleAccessToken = resolveStringField(credentials.data, "access_token", "accessToken");
|
|
22
24
|
switch (credentials.agent) {
|
|
23
25
|
case "claude": {
|
|
24
26
|
if (credentials.type === "api-key" && apiKey) {
|
|
@@ -39,6 +41,13 @@ function getCredentialEnvironment(credentials) {
|
|
|
39
41
|
if (credentials.type === "api-key" && apiKey) {
|
|
40
42
|
environment["GEMINI_API_KEY"] = apiKey;
|
|
41
43
|
}
|
|
44
|
+
else if (credentials.type === "oauth-credentials" &&
|
|
45
|
+
googleAccessToken) {
|
|
46
|
+
// For non-interactive mode, Gemini needs pre-obtained access token
|
|
47
|
+
// via GOOGLE_GENAI_USE_GCA + GOOGLE_CLOUD_ACCESS_TOKEN
|
|
48
|
+
environment["GOOGLE_GENAI_USE_GCA"] = "true";
|
|
49
|
+
environment["GOOGLE_CLOUD_ACCESS_TOKEN"] = googleAccessToken;
|
|
50
|
+
}
|
|
42
51
|
break;
|
|
43
52
|
}
|
|
44
53
|
case "opencode": {
|
package/package.json
CHANGED