YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
feat: connect Gemini CLI to screenpipe
Louis Beaumont8ed6f973fa92
diff --git a/apps/screenpipe-app-tauri/components/settings/__tests__/ai-tools-card.test.tsx b/apps/screenpipe-app-tauri/components/settings/__tests__/ai-tools-card.test.tsxindex ee604709f..7d82bcea3 100644--- a/apps/screenpipe-app-tauri/components/settings/__tests__/ai-tools-card.test.tsx+++ b/apps/screenpipe-app-tauri/components/settings/__tests__/ai-tools-card.test.tsx@@ -16,6 +16,7 @@ const libMocks = vi.hoisted(() => ({disconnectAiTool: vi.fn(),isOpenclawMcpInstalled: vi.fn(async () => false),isHermesMcpInstalled: vi.fn(async () => false),+ isGeminiMcpInstalled: vi.fn(async () => false),isRunnerMcpInstalled: vi.fn(async () => false),isWindsurfMcpInstalled: vi.fn(async () => false),}));@@ -40,12 +41,13 @@ vi.mock("@/lib/ai-tools-mcp", () => ({claude: "Claude",codex: "Codex",cursor: "Cursor",+ gemini: "Gemini CLI",openclaw: "OpenClaw",hermes: "Hermes",runner: "Runner",windsurf: "Windsurf (Devin Desktop)",},- SKILLS_TARGET: { claude: "claude", codex: "codex" },+ SKILLS_TARGET: { claude: "claude", codex: "codex", gemini: "gemini" },}));vi.mock("@/lib/hooks/use-hardcoded-tiles", () => hookMocks);@@ -114,4 +116,15 @@ describe("AiToolsCard", () => {expect(await screen.findByText(/enable Settings > Workspace > Local MCP Servers/i)).toBeTruthy();});++ it("shows detected Gemini CLI with MCP and skills", async () => {+ libMocks.detectAiTools.mockResolvedValue(["gemini"]);++ render(<AiToolsCard />);+ fireEvent.click(await screen.findByRole("button", { name: /connect all/i }));++ expect(await screen.findByText("Gemini CLI")).toBeTruthy();+ expect(screen.getByText("MCP + skills")).toBeTruthy();+ await waitFor(() => expect(libMocks.connectAiTool).toHaveBeenCalledWith("gemini"));+ });});diff --git a/apps/screenpipe-app-tauri/components/settings/ai-tools-card.tsx b/apps/screenpipe-app-tauri/components/settings/ai-tools-card.tsxindex 1c2086a95..cf45959e9 100644--- a/apps/screenpipe-app-tauri/components/settings/ai-tools-card.tsx+++ b/apps/screenpipe-app-tauri/components/settings/ai-tools-card.tsx@@ -29,6 +29,7 @@ import {type FriendlyToolError,isOpenclawMcpInstalled,isHermesMcpInstalled,+ isGeminiMcpInstalled,isRunnerMcpInstalled,isWindsurfMcpInstalled,} from "@/lib/ai-tools-mcp";@@ -53,6 +54,8 @@ async function isToolConnected(id: ConnectAllToolId): Promise<boolean> {return (await isCodexMcpInstalled()) && (await areExternalAgentSkillsInstalled("codex"));case "cursor":return (await isCursorMcpInstalled()) && (await areExternalAgentSkillsInstalled("cursor"));+ case "gemini":+ return (await isGeminiMcpInstalled()) && (await areExternalAgentSkillsInstalled("gemini"));case "openclaw":return (await isOpenclawMcpInstalled()) && (await areExternalAgentSkillsInstalled("openclaw"));case "hermes":@@ -76,6 +79,8 @@ function ToolIcon({ id }: { id: ConnectAllToolId }) {return <img src="/images/codex.svg" alt="" className={`${img} rounded dark:invert`} />;case "cursor":return <CursorLogo className={img} />;+ case "gemini":+ return <img src="/images/gemini.svg" alt="" className={img} />;case "openclaw":return <img src="/images/openclaw.png" alt="" className={`${img} rounded`} />;case "hermes":diff --git a/apps/screenpipe-app-tauri/e2e/helpers/app-launcher.ts b/apps/screenpipe-app-tauri/e2e/helpers/app-launcher.tsindex f181c20b8..8a121da61 100644--- a/apps/screenpipe-app-tauri/e2e/helpers/app-launcher.ts+++ b/apps/screenpipe-app-tauri/e2e/helpers/app-launcher.ts@@ -298,8 +298,8 @@ export async function startApp(port = WEBDRIVER_PORT): Promise<ReturnType<typeofif (backgroundAiToolsEnabled) {// Cross-platform fake agent homes. The app's e2e-only home override keeps- // the native background writer away from real ~/.codex, ~/.cursor, and- // ~/.runner.+ // the native background writer away from real ~/.codex, ~/.cursor,+ // ~/.gemini, and ~/.runner.mkdirSync(resolve(E2E_AI_TOOLS_HOME, '.codex'), { recursive: true });writeFileSync(resolve(E2E_AI_TOOLS_HOME, '.codex', 'config.toml'),@@ -313,6 +313,14 @@ export async function startApp(port = WEBDRIVER_PORT): Promise<ReturnType<typeoftheme: 'dark',}),);+ mkdirSync(resolve(E2E_AI_TOOLS_HOME, '.gemini'), { recursive: true });+ writeFileSync(+ resolve(E2E_AI_TOOLS_HOME, '.gemini', 'settings.json'),+ JSON.stringify({+ mcpServers: { existing: { command: 'gemini-existing' } },+ ui: { theme: 'GitHub' },+ }),+ );mkdirSync(resolve(E2E_AI_TOOLS_HOME, '.runner'), { recursive: true });writeFileSync(resolve(E2E_AI_TOOLS_HOME, '.runner', 'mcp.json'),diff --git a/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.tsindex f0607fedc..8dd84968c 100644--- a/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.ts+++ b/apps/screenpipe-app-tauri/e2e/specs/onboarding-background-ai-tools.spec.ts@@ -150,9 +150,10 @@ async function callActivitySummaryThroughMcp(await waitForAppReady();});- it("connects detected Codex, Cursor, and Runner configs in the Rust background task", async () => {+ it("connects detected Codex, Cursor, Gemini, and Runner configs in the Rust background task", async () => {const codexConfig = resolve(E2E_AI_TOOLS_HOME, ".codex", "config.toml");const cursorConfig = resolve(E2E_AI_TOOLS_HOME, ".cursor", "mcp.json");+ const geminiConfig = resolve(E2E_AI_TOOLS_HOME, ".gemini", "settings.json");const runnerConfig = resolve(E2E_AI_TOOLS_HOME, ".runner", "mcp.json");const requiredSkills = [resolve(@@ -183,6 +184,20 @@ async function callActivitySummaryThroughMcp("screenpipe-cli","SKILL.md",),+ resolve(+ E2E_AI_TOOLS_HOME,+ ".gemini",+ "skills",+ "screenpipe-api",+ "SKILL.md",+ ),+ resolve(+ E2E_AI_TOOLS_HOME,+ ".gemini",+ "skills",+ "screenpipe-cli",+ "SKILL.md",+ ),];await browser.waitUntil(@@ -191,6 +206,10 @@ async function callActivitySummaryThroughMcp(readFileSync(codexConfig, "utf8").includes("[mcp_servers.screenpipe]",) &&+ Boolean(+ JSON.parse(readFileSync(geminiConfig, "utf8")).mcpServers+ ?.screenpipe,+ ) &&JSON.parse(readFileSync(runnerConfig, "utf8")).mcpServers?.screenpipe?.type === "stdio",{@@ -223,6 +242,15 @@ async function callActivitySummaryThroughMcp(SCREENPIPE_MCP_CLIENT: "cursor",});+ const gemini = JSON.parse(readFileSync(geminiConfig, "utf8"));+ expect(gemini.ui.theme).toBe("GitHub");+ expect(gemini.mcpServers.existing.command).toBe("gemini-existing");+ expect(gemini.mcpServers.screenpipe.env).toEqual({+ SCREENPIPE_API_URL: `http://localhost:${api.port}`,+ SCREENPIPE_LOCAL_API_KEY: api.key,+ SCREENPIPE_MCP_CLIENT: "gemini",+ });+const runner = JSON.parse(readFileSync(runnerConfig, "utf8"));expect(runner.workspace).toBe("kept");expect(runner.mcpServers.existing.url).toBe("https://example.com/mcp");@@ -236,6 +264,7 @@ async function callActivitySummaryThroughMcp(if (process.platform !== "win32") {expect(statSync(codexConfig).mode & 0o777).toBe(0o600);expect(statSync(cursorConfig).mode & 0o777).toBe(0o600);+ expect(statSync(geminiConfig).mode & 0o777).toBe(0o600);expect(statSync(runnerConfig).mode & 0o777).toBe(0o600);}diff --git a/apps/screenpipe-app-tauri/lib/__tests__/ai-tools-mcp.test.ts b/apps/screenpipe-app-tauri/lib/__tests__/ai-tools-mcp.test.tsindex d77b07f46..f43dad66a 100644--- a/apps/screenpipe-app-tauri/lib/__tests__/ai-tools-mcp.test.ts+++ b/apps/screenpipe-app-tauri/lib/__tests__/ai-tools-mcp.test.ts@@ -83,6 +83,8 @@ import {uninstallHermesMcp,installRunnerMcp,uninstallRunnerMcp,+ installGeminiMcp,+ uninstallGeminiMcp,detectAiTools,connectAiTool,disconnectAiTool,@@ -92,6 +94,7 @@ import {const CURSOR = "/Users/test/.cursor/mcp.json";const HERMES = "/Users/test/.hermes/config.yaml";const RUNNER = "/Users/test/.runner/mcp.json";+const GEMINI = "/Users/test/.gemini/settings.json";const backupsOf = (path: string) =>Array.from(fsMock.files.keys()).filter((p) => p.startsWith(`${path}.screenpipe-backup-`));@@ -229,6 +232,36 @@ describe("runner desktop MCP", () => {});});+describe("gemini CLI MCP", () => {+ it("detects Gemini CLI from its user config directory", async () => {+ fsMock.files.set("/Users/test/.gemini", "directory marker");++ await expect(detectAiTools()).resolves.toContain("gemini");+ });++ it("preserves Gemini settings and unrelated servers across install and remove", async () => {+ const seeded = JSON.stringify({+ mcpServers: { other: { command: "other-server" } },+ ui: { theme: "GitHub" },+ });+ fsMock.files.set(GEMINI, seeded);++ await installGeminiMcp();++ const config = JSON.parse(fsMock.files.get(GEMINI)!);+ expect(config.ui.theme).toBe("GitHub");+ expect(config.mcpServers.other.command).toBe("other-server");+ expect(config.mcpServers.screenpipe.command).toBe("/app/bun");+ expect(config.mcpServers.screenpipe.env.SCREENPIPE_MCP_CLIENT).toBe("gemini");+ expect(backupsOf(GEMINI)).toHaveLength(1);++ await uninstallGeminiMcp();+ const removed = JSON.parse(fsMock.files.get(GEMINI)!);+ expect(removed.mcpServers.screenpipe).toBeUndefined();+ expect(removed.mcpServers.other.command).toBe("other-server");+ });+});+describe("friendlyToolError", () => {it("keeps the absolute path for the open-file action but displays it tildified", () => {const err = friendlyToolError(@@ -273,6 +306,15 @@ describe("transactional connect / disconnect", () => {expect(JSON.parse(fsMock.files.get(CURSOR)!).mcpServers.screenpipe).toBeTruthy();});+ it("installs and removes Gemini's user-scoped skills with its MCP entry", async () => {+ await connectAiTool("gemini");+ expect(skillsMock.installExternalAgentSkills).toHaveBeenCalledWith("gemini");+ expect(JSON.parse(fsMock.files.get(GEMINI)!).mcpServers.screenpipe).toBeTruthy();++ await disconnectAiTool("gemini");+ expect(skillsMock.removeExternalAgentSkills).toHaveBeenCalledWith("gemini");+ });+it("disconnect removes skills even when the MCP step fails, then rethrows", async () => {fsMock.files.set(CURSOR, "broken{");diff --git a/apps/screenpipe-app-tauri/lib/ai-tools-mcp.ts b/apps/screenpipe-app-tauri/lib/ai-tools-mcp.tsindex d54d41161..9e0bfa71f 100644--- a/apps/screenpipe-app-tauri/lib/ai-tools-mcp.ts+++ b/apps/screenpipe-app-tauri/lib/ai-tools-mcp.ts@@ -37,6 +37,7 @@ const CONNECT_ALL_TOOL_IDS = ["claude","codex","cursor",+ "gemini","openclaw","hermes","runner",@@ -48,6 +49,7 @@ export const CONNECT_ALL_TOOL_NAMES: Record<ConnectAllToolId, string> = {claude: "Claude",codex: "Codex",cursor: "Cursor",+ gemini: "Gemini CLI",openclaw: "OpenClaw",hermes: "Hermes",runner: "Runner",@@ -58,9 +60,10 @@ export const CONNECT_ALL_TOOL_NAMES: Record<ConnectAllToolId, string> = {};// Skills support per tool lives in the disconnect-all component's-// SKILLS_TARGET map: claude/codex/openclaw/hermes read SKILL.md skills,-// cursor, runner, and windsurf are MCP-only. Grok is intentionally not in this matrix:-// it isn't part of connect-all and its settings panel has its own disconnect.+// SKILLS_TARGET map: claude/codex/cursor/gemini/openclaw/hermes read+// SKILL.md skills; runner and windsurf are MCP-only. Grok is intentionally+// not in this matrix: it isn't part of connect-all and its settings panel has+// its own disconnect.export async function detectAiTools(): Promise<ConnectAllToolId[]> {const home = await homeDir();@@ -75,6 +78,7 @@ export async function detectAiTools(): Promise<ConnectAllToolId[]> {],["codex", async () => exists(await join(home, ".codex"))],["cursor", async () => exists(await join(home, ".cursor"))],+ ["gemini", async () => exists(await join(home, ".gemini"))],// Locally installed remote-capable agents. Remote setups keep using the// settings remote agent card.["openclaw", async () => exists(await join(home, ".openclaw"))],@@ -542,6 +546,36 @@ export async function uninstallRunnerMcp(): Promise<void> {await removeScreenpipeFromJsonConfig(await getRunnerMcpConfigPath());}+// ─── Gemini CLI ────────────────────────────────────────────────────────+// Gemini CLI reads global MCP servers from ~/.gemini/settings.json and+// user-scoped Agent Skills from ~/.gemini/skills.++export async function getGeminiMcpConfigPath(): Promise<string> {+ const home = await homeDir();+ return join(home, ".gemini", "settings.json");+}++export async function isGeminiMcpInstalled(): Promise<boolean> {+ try {+ const content = await readTextFile(await getGeminiMcpConfigPath());+ return !!JSON.parse(content)?.mcpServers?.screenpipe;+ } catch { return false; }+}++export async function installGeminiMcp(): Promise<McpCommand> {+ const configPath = await getGeminiMcpConfigPath();+ const config = await readJsonConfigStrict(configPath);+ const mcp = await buildMcpConfig({ client: "gemini" });+ if (!config.mcpServers || typeof config.mcpServers !== "object") config.mcpServers = {};+ (config.mcpServers as Record<string, unknown>).screenpipe = mcp;+ await writeJsonConfig(configPath, config);+ return mcp;+}++export async function uninstallGeminiMcp(): Promise<void> {+ await removeScreenpipeFromJsonConfig(await getGeminiMcpConfigPath());+}+// ─── Transactional Settings connect / disconnect orchestrators (#5291) ──────// Tools whose agent reads global SKILL.md skills. Runner has no global skills@@ -553,6 +587,7 @@ export const SKILLS_TARGET: Partial<Record<ConnectAllToolId, ExternalAgentWithSkclaude: "claude",codex: "codex",cursor: "cursor",+ gemini: "gemini",openclaw: "openclaw",hermes: "hermes",};@@ -561,6 +596,7 @@ const INSTALL_MCP: Record<ConnectAllToolId, () => Promise<McpCommand>> = {claude: installClaudeMcp,codex: installCodexMcp,cursor: installCursorMcp,+ gemini: installGeminiMcp,openclaw: installOpenclawMcp,hermes: installHermesMcp,runner: installRunnerMcp,@@ -571,6 +607,7 @@ const UNINSTALL_MCP: Record<ConnectAllToolId, () => Promise<void>> = {claude: uninstallClaudeMcp,codex: uninstallCodexMcp,cursor: uninstallCursorMcp,+ gemini: uninstallGeminiMcp,openclaw: uninstallOpenclawMcp,hermes: uninstallHermesMcp,runner: uninstallRunnerMcp,@@ -694,6 +731,9 @@ export async function isToolConfigHealthy(id: ConnectAllToolId): Promise<booleancase "cursor":await readJsonConfigStrict(await getCursorMcpConfigPath());return true;+ case "gemini":+ await readJsonConfigStrict(await getGeminiMcpConfigPath());+ return true;case "openclaw":await readJsonConfigStrict(await getOpenclawMcpConfigPath());return true;diff --git a/apps/screenpipe-app-tauri/lib/external-agent-skills.ts b/apps/screenpipe-app-tauri/lib/external-agent-skills.tsindex b70cadb5e..96cf7b1df 100644--- a/apps/screenpipe-app-tauri/lib/external-agent-skills.ts+++ b/apps/screenpipe-app-tauri/lib/external-agent-skills.ts@@ -6,7 +6,13 @@ import { homeDir, join } from "@tauri-apps/api/path";import { readTextFile } from "@tauri-apps/plugin-fs";import { commands } from "@/lib/utils/tauri";-export type ExternalAgentWithSkills = "claude" | "codex" | "cursor" | "openclaw" | "hermes";+export type ExternalAgentWithSkills =+ | "claude"+ | "codex"+ | "cursor"+ | "gemini"+ | "openclaw"+ | "hermes";// Paths mirror the CLI's layout() in crates/screenpipe-engine/src/cli/agent.rs.function skillsDirectoryName(target: ExternalAgentWithSkills): string {@@ -14,6 +20,7 @@ function skillsDirectoryName(target: ExternalAgentWithSkills): string {case "claude": return ".claude";case "codex": return ".codex";case "cursor": return ".cursor";+ case "gemini": return ".gemini";case "openclaw": return ".openclaw";case "hermes": return ".hermes";}diff --git a/apps/screenpipe-app-tauri/src-tauri/src/skills.rs b/apps/screenpipe-app-tauri/src-tauri/src/skills.rsindex bb3a59746..77397415f 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/skills.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/skills.rs@@ -190,6 +190,7 @@ pub fn install_external_agent_skills(target: String) -> Result<Vec<String>, Stri"claude" => "claude-code","codex" => "codex","cursor" => "cursor",+ "gemini" => "gemini","openclaw" => "openclaw","hermes" => "hermes",_ => return Err(format!("unsupported external agent: {target}")),@@ -215,6 +216,7 @@ pub fn remove_external_agent_skills(target: String) -> Result<Vec<String>, Strin"claude" => "claude-code","codex" => "codex","cursor" => "cursor",+ "gemini" => "gemini","openclaw" => "openclaw","hermes" => "hermes",_ => return Err(format!("unsupported external agent: {target}")),diff --git a/crates/screenpipe-engine/src/cli/agent.rs b/crates/screenpipe-engine/src/cli/agent.rsindex 4f803224a..dd1826130 100644--- a/crates/screenpipe-engine/src/cli/agent.rs+++ b/crates/screenpipe-engine/src/cli/agent.rs@@ -34,7 +34,7 @@ pub enum AgentCommand {Setup {/// Which agent to wire up. Omit when using --all.#[arg(- value_parser = ["openclaw", "hermes", "claude-code", "claude-desktop", "codex", "cursor", "runner", "windsurf"],+ value_parser = ["openclaw", "hermes", "claude-code", "claude-desktop", "codex", "cursor", "gemini", "runner", "windsurf"],required_unless_present = "all",conflicts_with = "all")]@@ -54,7 +54,7 @@ pub enum AgentCommand {/// agent's own config or other skills.Remove {/// Which agent to unwire.- #[arg(value_parser = ["openclaw", "hermes", "claude-code", "claude-desktop", "codex", "cursor", "runner", "windsurf"])]+ #[arg(value_parser = ["openclaw", "hermes", "claude-code", "claude-desktop", "codex", "cursor", "gemini", "runner", "windsurf"])]target: String,},}@@ -219,6 +219,7 @@ fn detected_agents_in(home: &Path) -> Vec<DetectedAgent> {for (target, name, relative_dir) in [("codex", "Codex", ".codex"),("cursor", "Cursor", ".cursor"),+ ("gemini", "Gemini CLI", ".gemini"),("openclaw", "OpenClaw", ".openclaw"),("hermes", "Hermes", ".hermes"),("runner", "Runner", ".runner"),@@ -376,6 +377,7 @@ fn detected_desktop_agents_in(home: &Path) -> Vec<DesktopDetectedAgent> {for (id, name, target, relative_dir, has_skills) in [("codex", "Codex", "codex", ".codex", true),("cursor", "Cursor", "cursor", ".cursor", true),+ ("gemini", "Gemini CLI", "gemini", ".gemini", true),("openclaw", "OpenClaw", "openclaw", ".openclaw", true),("hermes", "Hermes", "hermes", ".hermes", true),("runner", "Runner", "runner", ".runner", false),@@ -633,6 +635,14 @@ fn layout_in(target: &str, h: &Path) -> Result<AgentLayout> {mcp_path: h.join(".codex/config.toml"),mcp_format: McpFormat::Toml,},+ // https://github.com/google-gemini/gemini-cli/blob/main/docs/reference/configuration.md+ // https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/skills.md+ "gemini" => AgentLayout {+ name: "Gemini CLI",+ skills_dir: Some(h.join(".gemini/skills")),+ mcp_path: h.join(".gemini/settings.json"),+ mcp_format: McpFormat::Json,+ },// Cursor loads global skills from ~/.cursor/skills (also ~/.agents/skills// and, for compat, ~/.claude/skills + ~/.codex/skills) — see// https://cursor.com/docs/skills@@ -658,7 +668,7 @@ fn layout_in(target: &str, h: &Path) -> Result<AgentLayout> {mcp_format: McpFormat::Json,},other => anyhow::bail!(- "unknown agent target '{other}' (use: openclaw, hermes, claude-code, claude-desktop, codex, cursor, runner, windsurf)"+ "unknown agent target '{other}' (use: openclaw, hermes, claude-code, claude-desktop, codex, cursor, gemini, runner, windsurf)"),})}@@ -1368,7 +1378,7 @@ mod tests {}#[test]- fn test_codex_and_claude_code_have_skill_directories() {+ fn test_codex_claude_code_and_gemini_have_skill_directories() {let codex = layout("codex").unwrap();assert!(codex.skills_dir@@ -1380,6 +1390,13 @@ mod tests {.skills_dir.as_deref().is_some_and(|path| path.ends_with(".claude/skills")));++ let gemini = layout("gemini").unwrap();+ assert!(gemini+ .skills_dir+ .as_deref()+ .is_some_and(|path| path.ends_with(".gemini/skills")));+ assert!(gemini.mcp_path.ends_with(".gemini/settings.json"));}#[test]@@ -1741,6 +1758,7 @@ mod tests {for relative in [".codex",".cursor",+ ".gemini",".openclaw",".hermes",".runner",@@ -1764,6 +1782,7 @@ mod tests {"claude-code","codex","cursor",+ "gemini","openclaw","hermes","runner",@@ -1777,6 +1796,7 @@ mod tests {"claude-code","codex","cursor",+ "gemini","openclaw","hermes","runner",@@ -1864,6 +1884,17 @@ mod tests {).unwrap();+ std::fs::create_dir_all(home.join(".gemini")).unwrap();+ std::fs::write(+ home.join(".gemini/settings.json"),+ serde_json::json!({+ "mcpServers": {"existing": {"command": "gemini-existing"}},+ "ui": {"theme": "GitHub"}+ })+ .to_string(),+ )+ .unwrap();+std::fs::create_dir_all(home.join(".openclaw")).unwrap();std::fs::write(home.join(".openclaw/openclaw.json"),@@ -1898,8 +1929,8 @@ mod tests {assert_eq!(report,DesktopAgentSetupReport {- detected: 6,- connected: 6,+ detected: 7,+ connected: 7,already_connected: 0,failures: Vec::new(),}@@ -1934,6 +1965,26 @@ mod tests {"sp-test-key");+ let gemini: serde_json::Value = serde_json::from_str(+ &std::fs::read_to_string(home.join(".gemini/settings.json")).unwrap(),+ )+ .unwrap();+ assert_eq!(gemini["ui"]["theme"], "GitHub");+ assert_eq!(+ gemini["mcpServers"]["existing"]["command"],+ "gemini-existing"+ );+ assert_eq!(+ gemini["mcpServers"]["screenpipe"]["env"]["SCREENPIPE_MCP_CLIENT"],+ "gemini"+ );+ assert!(home+ .join(".gemini/skills/screenpipe-api/SKILL.md")+ .is_file());+ assert!(home+ .join(".gemini/skills/screenpipe-cli/SKILL.md")+ .is_file());+let openclaw: serde_json::Value = serde_json::from_str(&std::fs::read_to_string(home.join(".openclaw/openclaw.json")).unwrap(),)@@ -1967,9 +2018,9 @@ mod tests {Some("sp-test-key"),"http://localhost:31337",);- assert_eq!(second.detected, 6);+ assert_eq!(second.detected, 7);assert_eq!(second.connected, 0);- assert_eq!(second.already_connected, 6);+ assert_eq!(second.already_connected, 7);assert!(second.failures.is_empty());assert_eq!(std::fs::read_to_string(home.join(".codex/config.toml")).unwrap(),