diff --git a/Cargo.toml b/Cargo.toml index a9e03f4..6ef6f4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "secret-agent" version = "0.1.0" edition = "2024" -description = "Rust TUI/CLI wrapper for Claude, Gemini, Codex, and Copilot with SQLite history" +description = "Rust TUI/CLI wrapper for Claude, Antigravity, Codex, and Copilot with SQLite history" [dependencies] anyhow = "1.0" diff --git a/scripts/package_deb.py b/scripts/package_deb.py index 7e72635..65c63e9 100755 --- a/scripts/package_deb.py +++ b/scripts/package_deb.py @@ -19,7 +19,7 @@ except ModuleNotFoundError as exc: # pragma: no cover - hard failure on old Pyt REPO_ROOT = Path(__file__).resolve().parents[1] DEFAULT_OUTPUT_DIR = REPO_ROOT / "target" / "debian" DEFAULT_DESCRIPTION = ( - "Rust TUI/CLI wrapper for Claude, Gemini, Codex, and Copilot with SQLite history" + "Rust TUI/CLI wrapper for Claude, Antigravity, Codex, and Copilot with SQLite history" ) DEFAULT_MAINTAINER = "Secret Agent Maintainers " diff --git a/src/adapters.rs b/src/adapters.rs index 85b7434..6397aa1 100644 --- a/src/adapters.rs +++ b/src/adapters.rs @@ -20,7 +20,7 @@ pub struct CommandSpec { #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum OutputMode { PlainText, - GeminiJson, + AgyJson, CodexJson, } @@ -63,7 +63,7 @@ pub fn build_command(request: &AgentRequest) -> Result { args.push(composed_prompt); tool_conversation_id_hint = Some(tool_conversation_id); } - ToolKind::Gemini => { + ToolKind::Agy => { args.push("-p".to_string()); args.push(composed_prompt); args.push("--output-format".to_string()); @@ -73,7 +73,7 @@ pub fn build_command(request: &AgentRequest) -> Result { args.push(model.to_string()); } args.extend(collect_extra_args(role, &request.extra_args)?); - output_mode = OutputMode::GeminiJson; + output_mode = OutputMode::AgyJson; } ToolKind::Codex => { args.push("exec".to_string()); @@ -129,7 +129,7 @@ pub fn tool_notes(tool: ToolKind) -> &'static str { ToolKind::Claude => { "supports model and effort directly; role markdown can be injected as a system prompt" } - ToolKind::Gemini => { + ToolKind::Agy => { "supports model directly; role markdown is prepended to the task prompt" } ToolKind::Codex => "supports model directly; role markdown is prepended to the task prompt", diff --git a/src/main.rs b/src/main.rs index 67b1323..e070091 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,7 @@ use uuid::Uuid; #[derive(Debug, Parser)] #[command(name = "secret-agent")] #[command( - about = "Rust TUI/CLI wrapper for Claude, Gemini, Codex, and Copilot with SQLite history" + about = "Rust TUI/CLI wrapper for Claude, Antigravity, Codex, and Copilot with SQLite history" )] struct Cli { #[arg(long, global = true)] diff --git a/src/models.rs b/src/models.rs index 72dec63..fc322b8 100644 --- a/src/models.rs +++ b/src/models.rs @@ -15,7 +15,7 @@ const CLAUDE_MODELS: &[&str] = &[ "claude-haiku-4-5", ]; -const GEMINI_MODELS: &[&str] = &[ +const AGY_MODELS: &[&str] = &[ "auto", "gemini-2.5-pro", "gemini-2.5-flash", @@ -90,7 +90,7 @@ fn is_model_available(tool: ToolKind, model: &str) -> bool { ToolKind::Claude => { CLAUDE_MODELS.contains(&normalized.as_str()) || matches_claude_model_name(&normalized) } - ToolKind::Gemini => GEMINI_MODELS.contains(&normalized.as_str()), + ToolKind::Agy => AGY_MODELS.contains(&normalized.as_str()), ToolKind::Codex => CODEX_MODELS.contains(&normalized.as_str()), ToolKind::Copilot => COPILOT_MODELS.contains(&normalized.as_str()), } diff --git a/src/runner.rs b/src/runner.rs index 02a9495..f5a60a5 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -92,7 +92,7 @@ async fn run( internal_tx.clone(), )); } - OutputMode::GeminiJson | OutputMode::CodexJson => { + OutputMode::AgyJson | OutputMode::CodexJson => { tokio::spawn(read_structured_stream( stdout, command_spec.output_mode, @@ -279,7 +279,7 @@ fn parse_structured_line(output_mode: OutputMode, line: &str) -> Result extract_gemini_display_text(&value), + OutputMode::AgyJson => extract_agy_display_text(&value), OutputMode::CodexJson => extract_codex_display_text(&value), OutputMode::PlainText => None, }; @@ -290,7 +290,7 @@ fn parse_structured_line(output_mode: OutputMode, line: &str) -> Result Option { +fn extract_agy_display_text(value: &Value) -> Option { let event_type = value .get("type") .and_then(Value::as_str) @@ -358,7 +358,7 @@ fn extract_codex_display_text(value: &Value) -> Option { fn find_tool_conversation_id(output_mode: OutputMode, value: &Value) -> Option { let keys = match output_mode { - OutputMode::GeminiJson => &["session_id", "sessionId"][..], + OutputMode::AgyJson => &["session_id", "sessionId"][..], OutputMode::CodexJson => &["thread_id", "threadId", "session_id", "sessionId"][..], OutputMode::PlainText => return None, }; @@ -469,15 +469,15 @@ mod tests { } #[test] - fn parses_gemini_session_id() { + fn parses_agy_session_id() { let parsed = parse_structured_line( - OutputMode::GeminiJson, - r#"{"type":"init","session_id":"gemini-session-1"}"#, + OutputMode::AgyJson, + r#"{"type":"init","session_id":"agy-session-1"}"#, ) .expect("structured line should parse"); assert_eq!( parsed.tool_conversation_id.as_deref(), - Some("gemini-session-1") + Some("agy-session-1") ); } diff --git a/src/storage.rs b/src/storage.rs index 5d70ca7..648fcfd 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -435,7 +435,7 @@ impl ConversationDraft { fn parse_tool(tool: String) -> rusqlite::Result { match tool.as_str() { "claude" => Ok(ToolKind::Claude), - "gemini" => Ok(ToolKind::Gemini), + "agy" => Ok(ToolKind::Agy), "codex" => Ok(ToolKind::Codex), "copilot" => Ok(ToolKind::Copilot), _ => Err(rusqlite::Error::FromSqlConversionFailure( diff --git a/src/types.rs b/src/types.rs index 1ea2233..0e92ca2 100644 --- a/src/types.rs +++ b/src/types.rs @@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize}; #[serde(rename_all = "snake_case")] pub enum ToolKind { Claude, - Gemini, + Agy, Codex, Copilot, } @@ -17,7 +17,7 @@ pub enum ToolKind { impl ToolKind { pub const ALL: [ToolKind; 4] = [ ToolKind::Claude, - ToolKind::Gemini, + ToolKind::Agy, ToolKind::Codex, ToolKind::Copilot, ]; @@ -25,7 +25,7 @@ impl ToolKind { pub fn command_name(self) -> &'static str { match self { ToolKind::Claude => "claude", - ToolKind::Gemini => "gemini", + ToolKind::Agy => "agy", ToolKind::Codex => "codex", ToolKind::Copilot => "copilot", } @@ -40,7 +40,7 @@ impl fmt::Display for ToolKind { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let label = match self { ToolKind::Claude => "Claude", - ToolKind::Gemini => "Gemini", + ToolKind::Agy => "Antigravity", ToolKind::Codex => "Codex", ToolKind::Copilot => "Copilot", };