From a340f528e49b195c45b964bec7be236fbfe7f58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Flor=C3=AAncio?= Date: Wed, 27 May 2026 23:33:27 +0100 Subject: [PATCH] fix(backend): use official cursor CLI install command in InstallScript() (#1099) --- apps/backend/internal/agent/agents/cursor_acp.go | 2 +- apps/backend/internal/agent/agents/new_acp_agents_test.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/backend/internal/agent/agents/cursor_acp.go b/apps/backend/internal/agent/agents/cursor_acp.go index 6bead8e9fe..7999cb0384 100644 --- a/apps/backend/internal/agent/agents/cursor_acp.go +++ b/apps/backend/internal/agent/agents/cursor_acp.go @@ -100,7 +100,7 @@ func (a *CursorACP) Runtime() *RuntimeConfig { func (a *CursorACP) RemoteAuth() *RemoteAuth { return nil } func (a *CursorACP) InstallScript() string { - return "Install Cursor CLI from https://cursor.com/cli" + return "curl https://cursor.com/install -fsS | bash" } func (a *CursorACP) PermissionSettings() map[string]PermissionSetting { diff --git a/apps/backend/internal/agent/agents/new_acp_agents_test.go b/apps/backend/internal/agent/agents/new_acp_agents_test.go index ffeca6eec8..a9541ad410 100644 --- a/apps/backend/internal/agent/agents/new_acp_agents_test.go +++ b/apps/backend/internal/agent/agents/new_acp_agents_test.go @@ -28,6 +28,7 @@ type acpAgentSpec struct { inferenceArgv []string // InferenceConfig.Command passthroughArgv []string // PassthroughCmd (zero-args allowed) installViaNpm bool // InstallScript starts with "npm install -g" + installScript string // expected InstallScript() value (empty = unchecked) } var newACPAgentSpecs = []struct { @@ -75,6 +76,7 @@ var newACPAgentSpecs = []struct { inferenceArgv: []string{"cursor-agent", "acp"}, passthroughArgv: []string{"cursor-agent"}, installViaNpm: false, + installScript: "curl https://cursor.com/install -fsS | bash", }}, {func() Agent { return NewKimiACP() }, acpAgentSpec{ id: "kimi-acp", displayName: "Kimi", detectBinaries: []string{"kimi"}, @@ -180,6 +182,9 @@ func TestNewACPAgents_InstallScript(t *testing.T) { if !tc.spec.installViaNpm && hasNpm { t.Errorf("InstallScript() should NOT use npm for native-binary agent: %q", got) } + if tc.spec.installScript != "" && got != tc.spec.installScript { + t.Errorf("InstallScript() = %q, want %q", got, tc.spec.installScript) + } // The primary detection binary must be referenced somewhere // actionable — either argv (native binaries) or InstallScript // (npm install -g ships the bin), so users with "Available