From f1821bce8e04f7b1236e39d72c0eb7ab2dd7bf35 Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Fri, 22 May 2026 17:24:57 -0400 Subject: [PATCH] fix(desktop): fix broken install links, wrong adapter package, and hermit env leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace window.open() with for "View instructions" links — Tauri blocks window.open but handles anchor tags correctly. Fix Claude Code adapter install command: the package is @agentclientprotocol/claude-agent-acp (not @anthropic-ai/claude-agent-acp which doesn't exist on npm). Strip NPM_CONFIG_PREFIX, NPM_CONFIG_CACHE, and COREPACK_HOME from the install subprocess environment so npm uses the user's normal registry rather than inheriting hermit's project-local Artifactory proxy config. --- desktop/src-tauri/src/commands/agent_discovery.rs | 6 ++++++ desktop/src-tauri/src/managed_agents/discovery.rs | 4 ++-- desktop/src/features/settings/ui/DoctorSettingsPanel.tsx | 9 +++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/desktop/src-tauri/src/commands/agent_discovery.rs b/desktop/src-tauri/src/commands/agent_discovery.rs index 58ef9fcef2..c4762a5b4b 100644 --- a/desktop/src-tauri/src/commands/agent_discovery.rs +++ b/desktop/src-tauri/src/commands/agent_discovery.rs @@ -105,6 +105,12 @@ fn run_install_command(step: &str, command: &str) -> InstallStepResult { let mut cmd = std::process::Command::new(shell); cmd.args(["-l", "-c", command]); + // Strip hermit env vars so npm/node use the user's normal registry and + // global prefix rather than the project-local hermit-managed paths. + cmd.env_remove("NPM_CONFIG_PREFIX"); + cmd.env_remove("NPM_CONFIG_CACHE"); + cmd.env_remove("COREPACK_HOME"); + if let Some(ref path) = shell_path { cmd.env("PATH", path); } diff --git a/desktop/src-tauri/src/managed_agents/discovery.rs b/desktop/src-tauri/src/managed_agents/discovery.rs index 863bed22f9..6f50a2a840 100644 --- a/desktop/src-tauri/src/managed_agents/discovery.rs +++ b/desktop/src-tauri/src/managed_agents/discovery.rs @@ -82,8 +82,8 @@ const KNOWN_ACP_PROVIDERS: &[KnownAcpProvider] = &[ mcp_hooks: false, underlying_cli: Some("claude"), cli_install_commands: &["npm install -g @anthropic-ai/claude-code"], - adapter_install_commands: &["npm install -g @anthropic-ai/claude-agent-acp"], - install_instructions_url: "https://www.npmjs.com/package/@anthropic-ai/claude-agent-acp", + adapter_install_commands: &["npm install -g @agentclientprotocol/claude-agent-acp"], + install_instructions_url: "https://github.com/agentclientprotocol/claude-agent-acp", install_hint: "Install the Claude Code ACP adapter via npm.", }, KnownAcpProvider { diff --git a/desktop/src/features/settings/ui/DoctorSettingsPanel.tsx b/desktop/src/features/settings/ui/DoctorSettingsPanel.tsx index 08fdef911b..49c70bc888 100644 --- a/desktop/src/features/settings/ui/DoctorSettingsPanel.tsx +++ b/desktop/src/features/settings/ui/DoctorSettingsPanel.tsx @@ -60,14 +60,15 @@ function InstallActions({ {isInstalling ? "Installing..." : "Install"} ) : null} - + ); }