diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a22b4dde..abd7cf152 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,48 @@ All notable changes to CC Switch will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.0.18] - 2026-10-21 + +This release adds Antigravity CLI (`agy`) as the eleventh managed app. Official-login and third-party API-key cards each open a terminal running agy with that provider; a provider only applies to agy started from its card's Open Terminal, never to a plain `agy` in another terminal. MCP servers, Skills and prompts sync to agy's shared customization folder, sessions can be browsed and resumed, usage is imported from session logs, and the Apps page installs, updates and uninstalls the CLI. On macOS the Auth Center manages several Antigravity accounts: switch agy's sign-in, see each account's quota and bind official cards to an account. Windows in-app updates no longer reboot the machine when a file is in use, the MSI installer makes the desktop shortcut optional, and the header shows the actual connection as a compact mode-colored badge. Fixes cover the router exhausting file descriptors under bursts on macOS, "Restart Codex daemon" failing with `env: node` when launched from Finder, Claude Code sessions staying under their old project after `/cd`, Windows Open Terminal spinning until the console is closed, countdowns on unused Codex quota windows, and unpriced DeepSeek V4.1 Flash requests. + +**Stats**: 38 commits | 206 files changed | +10711 insertions | -1253 deletions + +### Added + +- **Antigravity CLI Support** (#8268, with follow-ups ported from #8608): `agy` is a new managed app with its own provider list, MCP and Skills flags, prompt file, sessions and usage, separate from Gemini CLI. + - Providers: the official login card starts `agy --model=`, applying the model to that session only; API-key cards start `agy --gemini_dir=~/.cc-switch/agy/`, a private profile whose settings carry `modelProvider: "gemini"` and the model and whose `config` links back to `~/.gemini/config`. The key and endpoint reach that one process through the environment only (a 0600 file read and deleted right away on macOS/Linux, a `setlocal` block on Windows); they are never written to agy's files, shell rc files or a wrapper. Every card's action is "Open Terminal with This Provider" and there is no "in use" state; agy's own `~/.gemini/antigravity-cli/settings.json` is never written, apart from removing the `modelProvider` and wrapper/PATH blocks left by #8268 preview builds on startup. Custom cards need an API key; an empty endpoint uses Google's default API. Model lists come from agy's offline catalog (display names), and only a settings file with a model is imported as the official card. + - MCP (`~/.gemini/config/mcp_config.json`, stdio and Streamable HTTP, `disabled: true` for off; a zero-byte file is treated as empty), Skills (`~/.gemini/config/skills`) and the prompt (`~/.gemini/config/AGENTS.md`, shared by key profiles). Database schema 20 → 21 adds `enabled_agy` to `mcp_servers` and `skills`. + - Sessions from the CLI and Antigravity IDE `brain` folders and from key profiles, showing only the text inside ``; key-profile sessions resume with the matching `--gemini_dir` and key. Usage is imported from `transcript_full.jsonl`, attributed to the model from the `Model Selection` step, and priced at Gemini API prices; session-log rows show as "Session log". + - Official quota (Gemini and Claude/GPT, each with a 5-hour and a weekly window) from agy's `/usage`; the card shows the tightest window per group and a dropdown lists all four with their reset times. + - The Apps page installs agy with the official script (`install.ps1` on Windows), updates it with `agy update` (Homebrew cask included) and uninstalls script and cask installs. Antigravity has its own icon. Deep links accept `agy` for providers, MCP and prompts. +- **Antigravity Accounts in the Auth Center** (macOS): Sign in with Google in the browser using agy's own OAuth client (PKCE, loopback callback). CC Switch keeps a copy of each account and switches agy by writing it into the `gemini`/`antigravity` keychain entry through `/usr/bin/security` (`-U`, read back and checked); the current login is absorbed first and an unreadable one is stashed to `agy-login-stash.json`. Removing an account never signs agy out. After a switch CC Switch warns when agy is running. Each row shows its quota through Google's `retrieveUserQuotaSummary` with the account's own token (User-Agent `cc-switch/ (antigravity)`, read-only); refreshed tokens are saved only to CC Switch's copy. A 403 from an ineligible account shows Google's reason from `loadCodeAssist`. Official cards can bind an account (`authBinding`, `agy_oauth`): Open Terminal switches agy's sign-in first and refuses when the account is missing on this computer, and the card shows the bound account's quota. Unbound official cards read the signed-in account from the keychain instead of starting agy for `/usage`. + +### Changed + +- **Header Connection Badge** (#8634): The actual connection now sits beside the app title as a compact outlined badge in the direct/route/aggregation color, stays visible while browsing other mode tabs, truncates long names and shows details on hover and focus. +- **Trimmed Helper Copy** (#8633): Helper text that repeated nearby labels, headings or defaults is removed from provider forms, OpenClaw, daily memory, sync and rectifier settings, with supplementary guidance moved into the existing help cards. +- **Usage App Filter Follows the Apps Page**: The usage dashboard only lists apps shown on the Apps page (Claude Code stays while Claude Desktop is shown; the selected app is kept even when hidden). +- **Presets**: Add DIT.ai and hao.ai sponsor presets; EveryAPI becomes a full sponsor (presets unchanged); ZetaAPI presets are removed (the icon stays for existing cards). + +### Fixed + +- **Windows In-App Updates Could Reboot the Machine** (#8628, fixes #8534): The updater runs the MSI with `/passive`, and with no restart option Windows Installer rebooted as soon as a file was in use. The MSI now carries `REBOOT=ReallySuppress` (covering updates driven by older updaters), the updater passes it too, a leftover instance is closed on the updater path only, and the release workflow fails if the MSI lacks the property. +- **Windows Desktop Shortcut Not Optional** (#8601, fixes #5667): The MSI install-directory page has a "Create a desktop shortcut" checkbox and `CREATEDESKTOPSHORTCUT=0` skips it in silent installs. Upgrades keep the current shortcut state, and a Desktop that cannot be written no longer blocks the install. +- **Router Ran Out of File Descriptors on macOS** (refs #8668): GUI apps inherit launchd's soft `RLIMIT_NOFILE` of 256, so bursts of parallel requests failed with EMFILE in accept, upstream connects, `live-state.json` reads and SQLite. The soft limit is raised to the hard limit (capped at 10240) at startup on Unix. +- **"Restart Codex Daemon" Failed with `env: node` When Launched from Finder** (refs #8653): Runtime CLI commands (also `opencode models`) ran with launchd's narrow PATH plus the tool's own directory, so an npm CLI could not find node in another directory. The login-shell PATH is now merged in front, honoring the caller's deadline. +- **Claude Code Sessions Stayed Under Their Old Project After `/cd`** (#8643, fixes #6862): The last `relocated` record in the final 64 KiB of the transcript now decides the project, as in Claude Code, so grouping and the resume command follow `/cd` and worktree moves; ordinary drifting `cwd` values are ignored. +- **Windows Open Terminal Kept Spinning Until the Console Closed** (refs #6712): `cmd /C start` inherited the wrapper's stdout pipe, which only reached EOF when the console closed. Stdio now goes to NUL and only the exit status is awaited (the approach of #6716). +- **Countdowns on Unused Codex Quota Windows** (#8631): A window with `used_percent` exactly 0 returns a placeholder reset time of now plus the window length, so the countdown restarted on every refresh. Such windows no longer show a reset time. +- **DeepSeek V4.1 Flash Unpriced**: `deepseek-v4.1-flash` (OpenCode Go, OpenRouter, Hermes presets) was shown as unpriced and counted at $0; it now gets a pricing row at the `deepseek-flash` peak price; requests already logged are not repriced. +- **Aggregation Exhausted-Quota Workaround** (docs, refs #7962): The guide and manual 4.6 now describe the method that still works since #8431 (switch to Direct, keep "Keep official login for direct switches" off, use a third-party card and fully restart Codex) and mark the old one as no longer working. + +### Upgrade notes + +- **Database schema 20 → 21** (adds `enabled_agy` to `mcp_servers` and `skills`); the database is backed up before upgrading. Older versions refuse a version-21 database. +- Antigravity providers only apply to agy started from the card's "Open Terminal with This Provider"; running `agy` in any other terminal keeps agy's own Google sign-in and settings. +- Antigravity is shown on the Apps page by default and can be hidden there. +- Antigravity account management in the Auth Center is macOS only; other platforms show no account picker, official cards follow agy's own sign-in, and bindings synced from a Mac are ignored. + ## [4.0.17] - 2026-10-20 This release fixes two regressions from 4.0.16 and polishes the tray panel. Lightweight mode frees the tray panel's WebView again, so WebView2 processes exit on Windows, and Codex no longer gets stuck on the sign-in page after a long-expired stashed ChatGPT login was given back on entering routing. The tray panel keeps its rows in place while hovering between apps, fits high-DPI and small Windows displays, lines up quota bars with a time-until-reset, and shows remaining balances in green; on Windows a left click opens the main window again. The Hermes form now warns when a provider key is one of Hermes' built-in provider ids. Other fixes cover the proxy port staying taken after quitting on Windows, Codex remote compaction usage recorded as zero, MCP servers lost when several are toggled at once, URL-only MCP servers synced to Hermes and OpenCode as empty entries, smart quotes inside valid TOML strings being rewritten, WebDAV sync on Data Capsule, API keys capitalized by macOS, and MSI installs over a portable folder still treated as portable. diff --git a/package.json b/package.json index 1d67ca721..1c540c995 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cc-switch", - "version": "4.0.17", + "version": "4.0.18", "description": "All-in-One Assistant for Claude Code, Codex & Gemini CLI", "type": "module", "scripts": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a57bfcb3d..94ac0f321 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -758,7 +758,7 @@ dependencies = [ [[package]] name = "cc-switch" -version = "4.0.17" +version = "4.0.18" dependencies = [ "anyhow", "arboard", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index b4399f124..891d518dc 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cc-switch" -version = "4.0.17" +version = "4.0.18" description = "All-in-One Assistant for Claude Code, Codex & Gemini CLI" authors = ["Jason Young"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index a5477bc30..5a3b39ce4 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "CC Switch", - "version": "4.0.17", + "version": "4.0.18", "identifier": "com.ccswitch.desktop", "build": { "frontendDist": "../dist",