Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Apr 22:45
· 258 commits to main since this release

Added

  • ai spend gemini: print Gemini usage summary combining local JSONL logs (OAuth/free-tier run counts, per-model stats) with GCP BigQuery billing export (actual billed amounts for paid runs). Graceful degradation when BigQuery is not configured or google-cloud-bigquery not installed. Config under [gemini_billing] in config.toml. (AI-CLI-41 T-03)
  • ai gemini -P/--confirm-paid: explicit per-run confirmation flag for Deep Research paid API usage. Required when paid_fallback_enabled = true in config; exits with actionable error if absent. (AI-CLI-41 T-02)
  • ai geminipaid_fallback_enabled config key under [gemini] in config.toml: when false (default), the ai_studio_paid tier is excluded from all fallback chains, preventing accidental paid API spend. Set true only after confirming billing credit status. (AI-CLI-41 T-02)
  • ai gemini — Deep Research daily run counter persisted to ~/.local/state/ai-cli/dr-daily.json. Paid run count printed to stderr after each successful run; warning printed when approaching soft daily limit (DEEP_RESEARCH_DAILY_WARNING = 18 out of DEEP_RESEARCH_DAILY_LIMIT = 20). (AI-CLI-41 T-02)

Changed

  • ai gemini — auth tier names are now Google-aligned: oauth (was gemini-cli (OAuth)), ai_studio_free (was API free-tier), ai_studio_paid (was API paid tier-1). Used in JSONL logs and fallback-chain messages. (AI-CLI-41 T-01)
  • ai gemini — token counts (input_tokens, output_tokens, total_tokens) in JSONL logs are now null (not 0) when usage metadata is absent from the API response. Null is distinguishable from a model that genuinely returned zero tokens. (AI-CLI-41 T-01)
  • ai geminiGeminiResult gains is_deep_research: bool field (logged to JSONL); token fields changed from int = 0 to int | None = None. (AI-CLI-41 T-01)

Fixed

  • ai sync: removed handoff queue sync and config file sync from push/pull pipeline. Scope is now explicitly CC session data only: ~/.claude/projects/ JSONL and memory files, ~/.claude/history.jsonl. Git-tracked files (config, hooks, statusline script) are no longer touched by ai sync.
  • ai update: now deploys src/ai_cli/data/statusline-command.sh to ~/.claude/statusline-command.sh as a plain file, replacing any existing symlink. The statusline script is now owned by this package, not by any other project repo.
  • ai signal-watch start: removed invalid autostart key from Circus add options — was silently failing watcher registration so signal-watch was never actually started via Circus when ai c launched. start=True top-level parameter already handles immediate start. (AI-CLI-16)
  • ai sync pull: removed replicate_history_to_worktrees from pull pipeline — it was injecting phantom history.jsonl entries (worktree-path copies of main-project entries) on every pull. These phantoms caused the conversation picker to show the wrong project's sessions inside worktree sessions, and made --continue fail to find the correct conversation. Added purge_phantom_history_entries() which runs on each pull to clean up any previously created phantoms. Existing phantom entries are purged on the next ai sync pull.
  • ai ps cron: VPN detection in cmd_ps — switches to vpn_host when Mullvad is active, preventing a 30s hang at session start when the Tailscale IP is unreachable. Added ConnectTimeout=5 to the remote SSH call. (AI-CLI-37)
  • ai internal handoff-drain / NATS tunnel: NATSClient._open_ssh_tunnel() now checks only AI_CLI_HOST (was silently skipping when the var was absent from non-login shells). Session start no longer hangs on NATS retry loop on Mac when NATS tunnel fails to open. (AI-CLI-37)
  • ai tunnel start: _cmd_tunnel_start now uses vpn_host when VPN is active so autossh reaches the server through the VPN-routed address rather than the Tailscale IP. (AI-CLI-37)
  • Remote sessions / tmux invocations: replaced all bash -l -c / bash -c with zsh -l -c / zsh -c so that ~/.zshenv (the canonical env var file) is sourced on remote connects and all tmux session spawns. (AI-CLI-37)

Changed

  • AI_CLI_HOST replaces HUMANWARE_HOST as the canonical env var for host machine identification (mac, hetzner, etc.). AI_CLI_HOST is the public/open-source name; HUMANWARE_HOST is no longer referenced in the codebase. Set AI_CLI_HOST in ~/.zshenv (sourced by all zsh sessions including non-interactive). (AI-CLI-37)