authorgravatar for 146652788+BunnyGamezsc@users.noreply.github.comBunnyGamezsc <146652788+BunnyGamezsc@users.noreply.github.com> 2026-07-17 11:01:02-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-07-17 18:01:02+00:00
log7f1cb61031184030653c10d1cb357ba226db90e4
tree31c07c542bbe114f18469b1be78811b54222544f
parentc49d424e3aa2f5993e756a2b8f19b9b5da6f0cc5
signature Signed by PGP key B5690EEEBB952194

fix(cursor): default binary path to cursor-agent (avoid path conflict w/ grok) (#4094)


10 files changed, 27 insertions(+), 26 deletions(-)

apps/server/scripts/cursor-acp-model-mismatch-probe.ts+1-1
......@@ -62,7 +62,7 @@ const promptText = NodeProcess.argv[4] ?? "helo";
6262const targetReasoning = NodeProcess.env.CURSOR_REASONING ?? "";
6363const targetContext = NodeProcess.env.CURSOR_CONTEXT ?? "";
6464const targetFast = NodeProcess.env.CURSOR_FAST ?? "";
65const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "agent";
65const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "cursor-agent";
6666const promptWaitMs = Number(NodeProcess.env.CURSOR_PROMPT_WAIT_MS ?? "4000");
6767const requestTimeoutMs = Number(NodeProcess.env.CURSOR_REQUEST_TIMEOUT_MS ?? "20000");
6868
apps/server/src/provider/Drivers/CursorDriver.ts+12-11
......@@ -1,5 +1,5 @@
11/**
2 * CursorDriver — `ProviderDriver` for the Cursor Agent (`agent`) runtime.
2 * CursorDriver — `ProviderDriver` for the Cursor Agent (`cursor-agent`) runtime.
33 *
44 * Cursor exposes an ACP-based CLI. Model catalog and capability refreshes
55 * happen during the managed provider status check via Cursor's
......@@ -42,7 +42,7 @@ import type { ServerProviderDraft } from "../providerSnapshot.ts";
4242import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts";
4343import {
4444 makeProviderMaintenanceCapabilities,
45 makeStaticProviderMaintenanceResolver,
45 type ProviderMaintenanceCapabilitiesResolver,
4646 resolveProviderMaintenanceCapabilitiesEffect,
4747} from "../providerMaintenance.ts";
4848import {
......@@ -54,15 +54,16 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings);
5454
5555const DRIVER_KIND = ProviderDriverKind.make("cursor");
5656const SNAPSHOT_REFRESH_INTERVAL = Duration.minutes(5);
57const UPDATE = makeStaticProviderMaintenanceResolver(
58 makeProviderMaintenanceCapabilities({
59 provider: DRIVER_KIND,
60 packageName: null,
61 updateExecutable: "agent",
62 updateArgs: ["update"],
63 updateLockKey: "cursor-agent",
64 }),
65);
57const UPDATE: ProviderMaintenanceCapabilitiesResolver = {
58 resolve: (options) =>
59 makeProviderMaintenanceCapabilities({
60 provider: DRIVER_KIND,
61 packageName: null,
62 updateExecutable: options?.binaryPath?.trim() || "cursor-agent",
63 updateArgs: ["update"],
64 updateLockKey: "cursor-agent",
65 }),
66};
6667
6768export type CursorDriverEnv =
6869 | ChildProcessSpawner.ChildProcessSpawner
apps/server/src/provider/Layers/CursorProvider.test.ts+1-1
......@@ -294,7 +294,7 @@ const parameterizedClaudeModelOptionConfigOptions = [
294294
295295const baseCursorSettings: CursorSettings = {
296296 enabled: true,
297 binaryPath: "agent",
297 binaryPath: "cursor-agent",
298298 apiEndpoint: "",
299299 customModels: [],
300300};
apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts+1-1
......@@ -76,7 +76,7 @@ const makeClaudeConfig = (overrides: Partial<ClaudeSettings>): ClaudeSettings =>
7676
7777const makeCursorConfig = (overrides: Partial<CursorSettings>): CursorSettings => ({
7878 enabled: false,
79 binaryPath: "agent",
79 binaryPath: "cursor-agent",
8080 apiEndpoint: "",
8181 customModels: [],
8282 ...overrides,
apps/server/src/provider/Layers/ProviderRegistry.test.ts+1-1
......@@ -1396,7 +1396,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
13961396 Layer.provideMerge(OpenCodeRuntime.OpenCodeRuntimeLive),
13971397 Layer.provideMerge(
13981398 mockCommandSpawnerLayer((command, args) => {
1399 if (command === "agent") {
1399 if (command === "cursor-agent") {
14001400 cursorSpawned = true;
14011401 }
14021402 const joined = args.join(" ");
apps/server/src/provider/acp/CursorAcpCliProbe.test.ts+5-5
......@@ -1,5 +1,5 @@
11/**
2 * Optional integration check against a real `agent acp` install.
2 * Optional integration check against a real `cursor-agent acp` install.
33 * Enable with: T3_CURSOR_ACP_PROBE=1 bun run test --filter CursorAcpCliProbe
44 */
55import * as NodeServices from "@effect/platform-node/NodeServices";
......@@ -12,7 +12,7 @@ import type * as EffectAcpSchema from "effect-acp/schema";
1212import * as AcpSessionRuntime from "./AcpSessionRuntime.ts";
1313
1414describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", () => {
15 it.effect("initialize and authenticate against real agent acp", () =>
15 it.effect("initialize and authenticate against real cursor-agent acp", () =>
1616 Effect.gen(function* () {
1717 const runtime = yield* AcpSessionRuntime.AcpSessionRuntime;
1818 const started = yield* runtime.start();
......@@ -21,7 +21,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
2121 Effect.provide(
2222 AcpSessionRuntime.layer({
2323 spawn: {
24 command: "agent",
24 command: "cursor-agent",
2525 args: ["acp"],
2626 cwd: process.cwd(),
2727 },
......@@ -77,7 +77,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
7777 AcpSessionRuntime.layer({
7878 authMethodId: "cursor_login",
7979 spawn: {
80 command: "agent",
80 command: "cursor-agent",
8181 args: ["acp"],
8282 cwd: process.cwd(),
8383 },
......@@ -133,7 +133,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
133133 AcpSessionRuntime.layer({
134134 authMethodId: "cursor_login",
135135 spawn: {
136 command: "agent",
136 command: "cursor-agent",
137137 args: ["acp"],
138138 cwd: process.cwd(),
139139 },
apps/server/src/provider/acp/CursorAcpSupport.test.ts+1-1
......@@ -53,7 +53,7 @@ const parameterizedGpt54ConfigOptions: ReadonlyArray<EffectAcpSchema.SessionConf
5353describe("buildCursorAcpSpawnInput", () => {
5454 it("builds the default Cursor ACP command", () => {
5555 expect(buildCursorAcpSpawnInput(undefined, "/tmp/project")).toEqual({
56 command: "agent",
56 command: "cursor-agent",
5757 args: ["acp"],
5858 cwd: "/tmp/project",
5959 });
apps/server/src/provider/acp/CursorAcpSupport.ts+1-1
......@@ -35,7 +35,7 @@ export function buildCursorAcpSpawnInput(
3535 environment?: NodeJS.ProcessEnv,
3636): AcpSessionRuntime.AcpSpawnInput {
3737 return {
38 command: cursorSettings?.binaryPath || "agent",
38 command: cursorSettings?.binaryPath || "cursor-agent",
3939 args: [
4040 ...(cursorSettings?.apiEndpoint ? (["-e", cursorSettings.apiEndpoint] as const) : []),
4141 "acp",
apps/server/src/provider/providerMaintenanceRunner.test.ts+2-2
......@@ -48,7 +48,7 @@ function lifecycleFor(provider: ProviderDriverKind): ProviderMaintenanceCapabili
4848 return makeProviderMaintenanceCapabilities({
4949 provider,
5050 packageName: null,
51 updateExecutable: "agent",
51 updateExecutable: "cursor-agent",
5252 updateArgs: ["update"],
5353 updateLockKey: "cursor-agent",
5454 });
......@@ -226,7 +226,7 @@ describe("providerMaintenanceRunner", () => {
226226 const result = yield* updater.updateProvider(CURSOR_DRIVER);
227227 assert.deepStrictEqual(calls, [
228228 {
229 command: "agent",
229 command: "cursor-agent",
230230 args: ["update"],
231231 },
232232 ]);
packages/contracts/src/settings.ts+2-2
......@@ -252,11 +252,11 @@ export const CursorSettings = makeProviderSettingsSchema(
252252 Schema.withDecodingDefault(Effect.succeed(false)),
253253 Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
254254 ),
255 binaryPath: makeBinaryPathSetting("agent").pipe(
255 binaryPath: makeBinaryPathSetting("cursor-agent").pipe(
256256 Schema.annotateKey({
257257 title: "Binary path",
258258 description: "Path to the Cursor agent binary.",
259 providerSettingsForm: { placeholder: "agent", clearWhenEmpty: "omit" },
259 providerSettingsForm: { placeholder: "cursor-agent", clearWhenEmpty: "omit" },
260260 }),
261261 ),
262262 apiEndpoint: TrimmedString.pipe(