SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Assistant: discover Mistral Vibe and offer sign-in (#11692) (#11704)
PaddleStroked39fd6c397f0
diff --git a/crates/ui-egui/src/agent_chat/acp.rs b/crates/ui-egui/src/agent_chat/acp.rsindex efffaf3314..1584f7cf51 100644--- a/crates/ui-egui/src/agent_chat/acp.rs+++ b/crates/ui-egui/src/agent_chat/acp.rs@@ -387,8 +387,15 @@ pub fn auth_methods(init: &Value) -> Vec<AuthMethod> {let kind = match m.get("type").and_then(Value::as_str) {Some("terminal") => {let meta = m.get("_meta").and_then(|x| x.get("terminal-auth"));- let command = meta.and_then(|t| Some((t.get("command")?.as_str()?.to_string(), strings(t.get("args")))));- AuthKind::Terminal { args: strings(m.get("args")), command }+ let mut command = meta.and_then(|t| Some((t.get("command")?.as_str()?.to_string(), strings(t.get("args")))));+ let mut args = strings(m.get("args"));+ // Vibe's Python launcher can advertise its own path as an argument.+ // The configured ACP command already starts Vibe and accepts --setup.+ if id == "vibe-setup" && init.pointer("/agentInfo/name").and_then(Value::as_str) == Some("@mistralai/mistral-vibe") {+ args = vec!["--setup".into()];+ command = None;+ }+ AuthKind::Terminal { args, command }}Some("env_var") => AuthKind::EnvVar {vars: m@@ -832,6 +839,26 @@ mod tests {assert_eq!(p["mcpServers"][0]["args"], json!(["mcp", "--connect", "127.0.0.1:41234"]));}+ #[test]+ fn vibe_terminal_setup_uses_the_configured_acp_launcher() {+ let mut init = json!({+ "agentInfo": {"name": "@mistralai/mistral-vibe"},+ "authMethods": [{+ "id": "vibe-setup", "type": "terminal", "name": "Register your API Key",+ "args": [r"C:\Program Files\Vibe\vibe-acp", "--setup"],+ "_meta": {"terminal-auth": {"command": "python.exe", "args": [r"C:\Program Files\Vibe\vibe-acp", "--setup"]}}+ }]+ });+ let methods = auth_methods(&init);+ assert_eq!(methods[0].kind, AuthKind::Terminal { args: vec!["--setup".into()], command: None });++ init["agentInfo"]["name"] = json!("another-agent");+ let methods = auth_methods(&init);+ let AuthKind::Terminal { args, command } = &methods[0].kind else { panic!("terminal method expected") };+ assert_eq!(args, &[r"C:\Program Files\Vibe\vibe-acp", "--setup"]);+ assert!(command.is_some());+ }+#[test]fn auth_methods_of_both_adapters_are_read() {// As the Claude adapter offers them to a client with terminal login.diff --git a/crates/ui-egui/src/agent_chat/discover.rs b/crates/ui-egui/src/agent_chat/discover.rsindex cec01600eb..ab353e9bcd 100644--- a/crates/ui-egui/src/agent_chat/discover.rs+++ b/crates/ui-egui/src/agent_chat/discover.rs@@ -146,6 +146,19 @@ pub const KNOWN: &[Known] = &[retired: false,reports_version: true,},+ Known {+ id: "vibe",+ name: "Mistral Vibe",+ programs: &["vibe-acp"],+ args: &[],+ install: "uv tool install mistral-vibe",+ // Vibe may keep its sign-in in the OS keyring. Let it report whether it needs auth.+ credentials: None,+ config_dir_var: None,+ key_vars: &["MISTRAL_API_KEY"],+ retired: false,+ reports_version: true,+ },];#[derive(Clone, Copy, Debug, PartialEq, Eq)]@@ -801,6 +814,36 @@ mod tests {assert_eq!(KNOWN.first().map(|k| k.id), Some("claude"), "the Claude Code adapter is the default");}+ #[test]+ fn vibe_is_offered_for_install_and_discovered_as_an_acp_executable() {+ let root = std::env::temp_dir().join(format!("sc-agent-vibe-{}", std::process::id()));+ std::fs::create_dir_all(&root).unwrap();+ let detect = || detect_in(std::slice::from_ref(&root), None, PROBE_LIMIT);+ let uninstalled = detect();+ let missing = uninstalled.missing.iter().find(|agent| agent.id == "vibe").unwrap();+ assert_eq!(missing.install, "uv tool install mistral-vibe");++ let program = if cfg!(windows) { root.join("vibe-acp.cmd") } else { root.join("vibe-acp") };+ let script = if cfg!(windows) {+ "@echo off\r\nif \"%1\"==\"--version\" echo vibe-acp 3.0.4\r\n"+ } else {+ "#!/bin/sh\n[ \"$1\" = --version ] && echo vibe-acp 3.0.4\n"+ };+ std::fs::write(&program, script).unwrap();+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&program, std::fs::Permissions::from_mode(0o755)).unwrap();+ }+ let installed = detect();+ let found = installed.found.iter().find(|agent| agent.id == "vibe").unwrap();+ assert_eq!(found.argv, [program.to_string_lossy().into_owned()]);+ assert_eq!(found.version.as_deref(), Some("3.0.4"));+ assert_eq!(found.problem, None);+ assert!(!installed.missing.iter().any(|agent| agent.id == "vibe"));+ std::fs::remove_dir_all(root).unwrap();+ }+/// #9034: npm installed OpenCode without running its setup script, so the `opencode.exe` its/// `.cmd` shim starts is one Windows refuses. It is still found (its shim is there), with/// the system's reason and the command to install it again, while an agent that answersdiff --git a/docs/agent-chat.md b/docs/agent-chat.mdindex 8ad282cb08..7cab2d0966 100644--- a/docs/agent-chat.md+++ b/docs/agent-chat.md@@ -222,10 +222,15 @@ doesn't change the last known login state.| Codex | `npm install -g @agentclientprotocol/codex-acp` || Google Antigravity | Google's ACP server, a separate download from Google's `agy` command (which has no ACP mode): take the zip for your system from the [ACP registry](https://agentclientprotocol.com/registry), unzip it and put `agy_acp_server.par` (`agy_acp_server.exe` on Windows) on your `PATH`. The zip also holds `localharness_external`: leave the two together. It signs in itself (browser). || OpenCode | `npm install -g opencode-ai` (`opencode acp`) |+| Mistral Vibe | `uv tool install mistral-vibe` (`vibe-acp`) || XAI Grok | [Grok Build installer](https://docs.x.ai/build/overview), then `grok login` (`grok agent stdio` speaks ACP) || GitHub Copilot CLI, Qwen Code, goose | listed with their install command when missing |The panel lists agents that aren't installed with their install command and a **Copy** button.++For Mistral Vibe, put `vibe-acp` on your PATH and refresh the agent list. Follow Vibe's sign-in+prompt, run `vibe --setup` in a terminal, or set `MISTRAL_API_KEY` before launching SolidCraft.+See [Mistral's ACP setup guide](https://docs.mistral.ai/vibe/code/use-vibe-in-other-ides).**Refresh** looks again after you install one. An agent whose program is there but fails its`--version` check without printing a version (an install that didn't finish, such as an npminstall whose setup script didn't run, or a program built for another kind of computer) isdiff --git a/docs/design/in-app-agent-chat.md b/docs/design/in-app-agent-chat.mdindex 8085a5f7b6..3816542bcc 100644--- a/docs/design/in-app-agent-chat.md+++ b/docs/design/in-app-agent-chat.md@@ -61,6 +61,7 @@ with SolidCraft, the user installs the agent.| Google Antigravity | a separate server, `agy_acp_server.par` (`.exe` on Windows), from the ACP registry's zip (`agy-acp-server-1.4.0-…`, with `localharness_external` beside it, ~330 MB). The `agy` command (1.4.0) rejects `--acp`; its `--input-format stream-json` print mode is not ACP. Started without arguments (the registry's Linux entry passes an empty `--uid=`, not needed here). | proprietary (Google's terms) | none: `--version` prints a build date and takes about two seconds, so it is not asked | Agent methods `oauth-personal`, `oauth-business`, `gemini-api-key` (`GEMINI_API_KEY`), `agent-platform`; `session/new` answers "Authentication required" until one is chosen. Settings in `~/.gemini/antigravity-acp/settings.json`. || Gemini CLI (retired) | `gemini --acp` | `@google/gemini-cli` 0.64, Apache-2.0 | `--version` | Google ended it for consumer accounts on 2026-06-18 in favour of Antigravity. Still found when installed (enterprise licences may keep it working) but no longer offered for install. Its own login `~/.gemini/oauth_creds.json` or a key in the environment. || OpenCode | built in: `opencode acp` | `opencode-ai` 1.19, MIT | `--version` | Its own providers' logins (`~/.local/share/opencode/auth.json`) or keys in the environment. |+| Mistral Vibe | `uv tool install mistral-vibe`, then `vibe-acp` over stdio | Apache-2.0 | `vibe-acp --version` | Vibe's ACP sign-in or `vibe --setup`. Vibe keeps credentials in its keyring or `~/.vibe/.env` and accepts `MISTRAL_API_KEY`. || XAI Grok | built in: `grok agent stdio` | [Grok Build](https://github.com/xai-org/grok-build), Apache-2.0; installed separately | `grok --version` prints `grok 1.0.58 (…) [alpha]` (checked 2026-10-15; in-app connection also checked with 1.0.60) | Its own `~/.grok/auth.json` or `XAI_API_KEY`. `grok login` signs in in the browser; ACP advertises `cached_token` and `grok.com` authentication methods. || Others in the ACP registry | `copilot --acp`, `qwen --acp`, `opencode acp`, `goose acp`, `cline --acp`, `kimi acp`, … | mixed; several are proprietary, one is GPL and one AGPL (we only start them as programs, never link them) | `--version` | each its own |