feat: add Google Antigravity authentication support

- Add 'antigravity' as new auth choice in onboard and configure wizards
- Implement Google Antigravity OAuth flow using loginAntigravity from pi-ai
- Update writeOAuthCredentials to accept any OAuthProvider (not just 'anthropic')
- Add schema sanitization for Google Cloud Code Assist API to fix tool call errors
- Default model set to google-antigravity/claude-opus-4-5 after successful auth

The schema sanitization removes unsupported JSON Schema keywords (patternProperties,
const, anyOf, etc.) that Google's Cloud Code Assist API doesn't understand.
This commit is contained in:
mukhtharcm
2026-01-02 10:28:45 +05:30
committed by Peter Steinberger
parent 5eff541da8
commit 05bd345828
6 changed files with 191 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import fs from "node:fs/promises";
import path from "node:path";
import type { OAuthCredentials } from "@mariozechner/pi-ai";
import type { OAuthCredentials, OAuthProvider } from "@mariozechner/pi-ai";
import { discoverAuthStorage } from "@mariozechner/pi-coding-agent";
import { resolveClawdisAgentDir } from "../agents/agent-paths.js";
@@ -9,7 +9,7 @@ import type { ClawdisConfig } from "../config/config.js";
import { CONFIG_DIR } from "../utils.js";
export async function writeOAuthCredentials(
provider: "anthropic",
provider: OAuthProvider,
creds: OAuthCredentials,
): Promise<void> {
const dir = path.join(CONFIG_DIR, "credentials");