openclaw/extensions/google
hugh.li 9dd449045a
fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows (#40729)
* fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows

Two issues prevented Gemini CLI OAuth from working on Windows:

1. resolveGeminiCliDirs: the first candidate `dirname(dirname(resolvedPath))`
   can resolve to an unrelated ancestor directory (e.g. the nvm root
   `C:\Users\<user>\AppData\Local\nvm`) when gemini is installed via nvm.
   The subsequent `findFile` recursive search (depth 10) then picks up an
   `oauth2.js` from a completely different package (e.g.
   `discord-api-types/payloads/v10/oauth2.js`), which naturally does not
   contain Google OAuth credentials, causing silent extraction failure.

   Fix: validate candidate directories before including them — only keep
   candidates that contain a `package.json` or a `node_modules/@google/
   gemini-cli-core` subdirectory.

2. resolvePlatform: returns "WINDOWS" on win32, but Google's loadCodeAssist
   API rejects it as an invalid Platform enum value (400 INVALID_ARGUMENT),
   just like it rejects "LINUX".

   Fix: use "PLATFORM_UNSPECIFIED" for all non-macOS platforms.

* test(google-gemini-cli-auth): keep oauth regressions portable

* chore(changelog): add google gemini cli auth fix note

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-04 23:22:36 +09:00
..
src refactor: move provider model helpers into plugins 2026-03-27 20:20:31 +00:00
api.test.ts style(providers): normalize import and wrap formatting 2026-04-04 12:19:08 +01:00
api.ts refactor(providers): share google and xai provider helpers (#60722) 2026-04-04 16:14:15 +09:00
cli-backend.ts feat: pluginize cli inference backends 2026-03-26 15:11:15 +00:00
gemini-cli-provider.ts refactor(providers): add stream family hooks 2026-04-04 20:19:53 +09:00
google-shared.test-helpers.ts refactor(plugins): move remaining channel and provider ownership out of src 2026-03-22 19:13:25 -07:00
google-shared.test.ts test: collapse search helper suites 2026-03-25 00:42:09 +00:00
image-generation-provider.test.ts refactor: decouple bundled plugin sdk surfaces 2026-03-29 21:20:46 +01:00
image-generation-provider.ts style(providers): normalize import and wrap formatting 2026-04-04 12:19:08 +01:00
index.test.ts test(providers): cover stream family plugin hooks 2026-04-04 23:20:28 +09:00
index.ts refactor(providers): add stream family hooks 2026-04-04 20:19:53 +09:00
media-understanding-provider.ts refactor(providers): share google and xai provider helpers (#60722) 2026-04-04 16:14:15 +09:00
media-understanding-provider.video.test.ts fix(ci): align stale provider and channel tests 2026-04-04 09:35:14 +01:00
model-id.test.ts test: dedupe extension-owned coverage (#58554) 2026-03-31 15:18:29 -07:00
model-id.ts refactor: move provider seams behind plugin sdk surfaces 2026-03-27 23:26:26 +00:00
oauth-token-shared.test.ts refactor(providers): share google and xai provider helpers (#60722) 2026-04-04 16:14:15 +09:00
oauth-token-shared.ts refactor(providers): share google and xai provider helpers (#60722) 2026-04-04 16:14:15 +09:00
oauth.credentials.ts fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows (#40729) 2026-04-04 23:22:36 +09:00
oauth.flow.ts Separate Gemini OAuth state from PKCE verifier (#59116) 2026-04-02 09:51:11 -07:00
oauth.http.ts refactor: trim provider oauth runtime seams 2026-03-28 02:08:29 +00:00
oauth.project.ts fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows (#40729) 2026-04-04 23:22:36 +09:00
oauth.runtime.ts fix(auth): lazy-load provider oauth helpers 2026-03-18 13:40:28 -07:00
oauth.shared.ts
oauth.test.ts fix(google-gemini-cli-auth): fix Gemini CLI OAuth failures on Windows (#40729) 2026-04-04 23:22:36 +09:00
oauth.token.ts
oauth.ts Separate Gemini OAuth state from PKCE verifier (#59116) 2026-04-02 09:51:11 -07:00
openclaw.plugin.json refactor: move bundled plugin policy into manifests 2026-03-27 16:40:27 +00:00
package.json build: prepare 2026.4.1-beta.1 release 2026-04-01 15:09:19 +01:00
provider-models.test.ts style: normalize import order and formatting 2026-03-29 16:33:22 +09:00
provider-models.ts style: normalize import order and formatting 2026-03-29 16:33:22 +09:00
runtime-api.ts refactor(providers): share google and xai provider helpers (#60722) 2026-04-04 16:14:15 +09:00
test-api.ts refactor: move voice-call realtime providers into extensions 2026-04-04 12:07:23 +09:00
web-search-provider.test.ts fix(ci): route extension test helpers through public sdk seams 2026-04-04 00:03:48 +09:00
web-search-provider.ts refactor: shortcut bundled provider contract fixtures 2026-03-27 04:44:43 +00:00