8 Commits

  • Add Kimi (Moonshot AI) provider support
    - OAuth2 device authorization grant flow (RFC 8628) for authentication
    - Streaming and non-streaming chat completions via OpenAI-compatible API
    - Models: kimi-k2, kimi-k2-thinking, kimi-k2.5
    - CLI `--kimi-login` command for device flow auth
    - Token management with automatic refresh
    - Thinking/reasoning effort support for thinking-enabled models
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • **feat(auth, executor, cmd): add Antigravity provider integration**
    - Implemented OAuth login flow for the Antigravity provider in `auth/antigravity.go`.
    - Added `AntigravityExecutor` for handling requests and streaming via Antigravity APIs.
    - Created `antigravity_login.go` command for triggering Antigravity authentication.
    - Introduced OpenAI-to-Antigravity translation logic in `translator/antigravity/openai/chat-completions`.
    
    **refactor(translator, executor): update Gemini CLI response translation and add Antigravity payload customization**
    
    - Renamed Gemini CLI translation methods to align with response handling (`ConvertGeminiCliResponseToGemini` and `ConvertGeminiCliResponseToGeminiNonStream`).
    - Updated `init.go` to reflect these method changes.
    - Introduced `geminiToAntigravity` function to embed metadata (`model`, `userAgent`, `project`, etc.) into Antigravity payloads.
    - Added random project, request, and session ID generators for enhanced tracking.
    - Streamlined `buildRequest` to use `geminiToAntigravity` transformation before request execution.
  • feat(auth): centralize token store management and enhance persistence
    - Introduced `RegisterTokenStore` and `GetTokenStore` to centralize token store access.
    - Replaced direct file operations with a unified token persistence API.
    - Updated all components to use the shared token store for consistent behavior.
    - Improved logging for token save operations to include file paths.
  • chore(docs): add and refine package-level comments across modules
    - Added detailed package-level comments to improve documentation coverage.
    - Clarified parameter descriptions, return types, and functionality of exported methods across packages.
    - Enhanced overall code readability and API documentation consistency.