zeroclaw/src
Allen Huang 0d667752f7 fix(gemini): fix OAuth provider for cloudcode-pa internal API
Three issues prevented the Gemini OAuth path from working end-to-end:

1. Missing `project` field — the internal API returns 500 without it.
   Added project field to InternalGenerateContentRequest and
   resolve_oauth_project() to fetch it via loadCodeAssist endpoint.

2. No token refresh — stale access_token was read at construction time
   and never refreshed. Google OAuth tokens expire after ~1 hour,
   breaking long-lived daemon processes. Added runtime token refresh
   with OAuthTokenState (Arc<Mutex>) that checks expiry before each
   request and refreshes proactively (60s buffer).

3. Wrong response format — internal API nests candidates under a
   `response` field. Added InternalGenerateContentResponse wrapper
   and conditional deserialization in send_generate_content().

Also fixes OAuth warmup to call resolve_oauth_project() instead of
listing models on the public endpoint (which rejects OAuth tokens).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 18:29:23 +09:00
..
agent fix(memory): add minimum-length filter for auto-save messages 2026-02-20 10:26:31 +08:00
approval refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
auth chore: Remove blocking read strings 2026-02-19 14:52:29 +08:00
channels fix(channel): align runtime defaults with current model id and test context 2026-02-20 11:05:41 +08:00
config Merge pull request #1017 from zeroclaw-labs/test/peripherals-unit-tests 2026-02-19 16:17:07 -08:00
cost refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
cron feat(cron): add cron update CLI subcommand for in-place job updates 2026-02-19 15:11:37 +08:00
daemon fix(channels): interrupt in-flight telegram requests on newer sender messages 2026-02-20 01:54:07 +08:00
doctor feat(memory): add embedding hint routes and upgrade guidance 2026-02-19 20:49:53 +08:00
gateway test(gateway): add edge-case idempotency store tests 2026-02-19 13:28:24 -08:00
hardware fix: gate nusb/hardware discovery to Linux/macOS/Windows only 2026-02-20 00:02:01 +08:00
health refactor(sync): migrate remaining std mutex usage to parking_lot 2026-02-18 00:45:26 +08:00
heartbeat test: deepen and complete project-wide test coverage (#297) 2026-02-16 05:58:24 -05:00
integrations fix(channels): interrupt in-flight telegram requests on newer sender messages 2026-02-20 01:54:07 +08:00
memory fix(security): address CodeQL code-scanning alerts 2026-02-19 16:31:03 -08:00
observability docs(code): expand doc comments on security, observability, runtime, and peripheral traits 2026-02-19 13:19:46 -08:00
onboard fix(onboard): remove fragile numeric channel dispatch 2026-02-20 01:56:41 +08:00
peripherals Merge pull request #1017 from zeroclaw-labs/test/peripherals-unit-tests 2026-02-19 16:17:07 -08:00
providers fix(gemini): fix OAuth provider for cloudcode-pa internal API 2026-02-20 18:29:23 +09:00
rag chore(lint): extend low-risk clippy cleanup batch 2026-02-17 16:40:58 +08:00
runtime docs(code): expand doc comments on security, observability, runtime, and peripheral traits 2026-02-19 13:19:46 -08:00
security Merge pull request #1013 from zeroclaw-labs/fix/docs-inline-code-comments 2026-02-19 16:01:19 -08:00
service fix(channel): hot-apply runtime config updates for running channel service 2026-02-20 11:05:41 +08:00
skillforge chore: Remove blocking read strings 2026-02-19 14:52:29 +08:00
skills Fix skill instruction/tool injection in system prompts 2026-02-20 02:16:41 +08:00
tools Merge pull request #1016 from zeroclaw-labs/test/improve-test-assertions 2026-02-19 16:16:42 -08:00
tunnel feat(proxy): add scoped proxy configuration and docs runbooks 2026-02-18 22:10:42 +08:00
identity.rs test: cover deterministic HashMap ordering paths 2026-02-18 21:55:40 +08:00
lib.rs fix(channel): hot-apply runtime config updates for running channel service 2026-02-20 11:05:41 +08:00
main.rs fix(channel): hot-apply runtime config updates for running channel service 2026-02-20 11:05:41 +08:00
migration.rs readd tests, remove markdown files 2026-02-18 14:42:39 +08:00
multimodal.rs feat: add multimodal image marker support with Ollama vision 2026-02-19 21:25:21 +08:00
util.rs chore: Remove more blocking io calls 2026-02-19 18:04:55 +08:00