8 Commits

  • Fixed: #499 #985
    feat(oauth): add support for customizable OAuth callback ports
    
    - Introduced `oauth-callback-port` flag to override default callback ports.
    - Updated SDK and login flows for `iflow`, `gemini`, `antigravity`, `codex`, `claude`, and `openai` to respect configurable callback ports.
    - Refactored internal OAuth servers to dynamically assign ports based on the provided options.
    - Revised tests and documentation to reflect the new flag and behavior.
  • feat (auth): CLI OAuth supports pasting callback URLs to complete login
    - Added callback URL resolution and terminal prompt logic
      - Codex/Claude/iFlow/Antigravity/Gemini login supports callback URL or local callback completion
      - Update Gemini login option signature and manager call
      - CLI default prompt function is compatible with null input to continue waiting
  • refactor(auth): replace TokenRecord with coreauth.Auth and migrate TokenStore to coreauth.Store
    - Replaced `TokenRecord` with `coreauth.Auth` for centralized and consistent authentication data structures.
    - Migrated `TokenStore` interface to `coreauth.Store` for alignment with core CLIProxy authentication.
    - Updated related login methods, token persistence logic, and file storage handling to use the new `coreauth.Auth` model.
  • feat(logging): introduce centralized logging with custom format and Gin integration
    - Implemented a global logger with structured formatting for consistent log output.
    - Added support for rotating log files using Lumberjack.
    - Integrated new logging functionality with Gin HTTP server for unified log handling.
    - Replaced direct `log.Info` calls with `fmt.Printf` in non-critical paths to simplify core functionality.
  • refactor(auth): remove unused Refresh methods from authenticators
    - Deleted `Refresh` implementations in Codex, Claude, Gemini, Qwen, and Gemini-web authenticators.
    - Updated the `Authenticator` interface to exclude `Refresh` for cleaner design.
    - Revised `Manager` and related components to handle refresh logic improvements.
    - Simplified token refresh behavior and eliminated redundant code paths.