Skip to content

Commit 0bc0de5

Browse files
authored
Merge branch 'main' into fix/docs-task-runner-commands
2 parents bfc0b0d + 7f1cb61 commit 0bc0de5

10 files changed

Lines changed: 27 additions & 26 deletions

‎apps/server/scripts/cursor-acp-model-mismatch-probe.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const promptText = NodeProcess.argv[4] ?? "helo";
6262
const targetReasoning = NodeProcess.env.CURSOR_REASONING ?? "";
6363
const targetContext = NodeProcess.env.CURSOR_CONTEXT ?? "";
6464
const targetFast = NodeProcess.env.CURSOR_FAST ?? "";
65-
const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "agent";
65+
const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "cursor-agent";
6666
const promptWaitMs = Number(NodeProcess.env.CURSOR_PROMPT_WAIT_MS ?? "4000");
6767
const requestTimeoutMs = Number(NodeProcess.env.CURSOR_REQUEST_TIMEOUT_MS ?? "20000");
6868

‎apps/server/src/provider/Drivers/CursorDriver.ts‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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";
4242
import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts";
4343
import {
4444
makeProviderMaintenanceCapabilities,
45-
makeStaticProviderMaintenanceResolver,
45+
type ProviderMaintenanceCapabilitiesResolver,
4646
resolveProviderMaintenanceCapabilitiesEffect,
4747
} from "../providerMaintenance.ts";
4848
import {
@@ -54,15 +54,16 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings);
5454

5555
const DRIVER_KIND = ProviderDriverKind.make("cursor");
5656
const SNAPSHOT_REFRESH_INTERVAL = Duration.minutes(5);
57-
const UPDATE = makeStaticProviderMaintenanceResolver(
58-
makeProviderMaintenanceCapabilities({
59-
provider: DRIVER_KIND,
60-
packageName: null,
61-
updateExecutable: "agent",
62-
updateArgs: ["update"],
63-
updateLockKey: "cursor-agent",
64-
}),
65-
);
57+
const 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

6768
export type CursorDriverEnv =
6869
| ChildProcessSpawner.ChildProcessSpawner

‎apps/server/src/provider/Layers/CursorProvider.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ const parameterizedClaudeModelOptionConfigOptions = [
294294

295295
const 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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const makeClaudeConfig = (overrides: Partial<ClaudeSettings>): ClaudeSettings =>
7676

7777
const 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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
*/
55
import * as NodeServices from "@effect/platform-node/NodeServices";
@@ -12,7 +12,7 @@ import type * as EffectAcpSchema from "effect-acp/schema";
1212
import * as AcpSessionRuntime from "./AcpSessionRuntime.ts";
1313

1414
describe.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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const parameterizedGpt54ConfigOptions: ReadonlyArray<EffectAcpSchema.SessionConf
5353
describe("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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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(

0 commit comments

Comments
 (0)