Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/server/scripts/cursor-acp-model-mismatch-probe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const promptText = NodeProcess.argv[4] ?? "helo";
const targetReasoning = NodeProcess.env.CURSOR_REASONING ?? "";
const targetContext = NodeProcess.env.CURSOR_CONTEXT ?? "";
const targetFast = NodeProcess.env.CURSOR_FAST ?? "";
const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "agent";
const agentBin = NodeProcess.env.CURSOR_AGENT_BIN ?? "cursor-agent";
const promptWaitMs = Number(NodeProcess.env.CURSOR_PROMPT_WAIT_MS ?? "4000");
const requestTimeoutMs = Number(NodeProcess.env.CURSOR_REQUEST_TIMEOUT_MS ?? "20000");

Expand Down
23 changes: 12 additions & 11 deletions apps/server/src/provider/Drivers/CursorDriver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* CursorDriver — `ProviderDriver` for the Cursor Agent (`agent`) runtime.
* CursorDriver — `ProviderDriver` for the Cursor Agent (`cursor-agent`) runtime.
*
* Cursor exposes an ACP-based CLI. Model catalog and capability refreshes
* happen during the managed provider status check via Cursor's
Expand Down Expand Up @@ -42,7 +42,7 @@ import type { ServerProviderDraft } from "../providerSnapshot.ts";
import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts";
import {
makeProviderMaintenanceCapabilities,
makeStaticProviderMaintenanceResolver,
type ProviderMaintenanceCapabilitiesResolver,
resolveProviderMaintenanceCapabilitiesEffect,
} from "../providerMaintenance.ts";
import {
Expand All @@ -54,15 +54,16 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings);

const DRIVER_KIND = ProviderDriverKind.make("cursor");
const SNAPSHOT_REFRESH_INTERVAL = Duration.minutes(5);
const UPDATE = makeStaticProviderMaintenanceResolver(
makeProviderMaintenanceCapabilities({
provider: DRIVER_KIND,
packageName: null,
updateExecutable: "agent",
updateArgs: ["update"],
updateLockKey: "cursor-agent",
}),
);
const UPDATE: ProviderMaintenanceCapabilitiesResolver = {
resolve: (options) =>
makeProviderMaintenanceCapabilities({
provider: DRIVER_KIND,
packageName: null,
updateExecutable: options?.binaryPath?.trim() || "cursor-agent",
updateArgs: ["update"],
updateLockKey: "cursor-agent",
}),
};

export type CursorDriverEnv =
| ChildProcessSpawner.ChildProcessSpawner
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/Layers/CursorProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ const parameterizedClaudeModelOptionConfigOptions = [

const baseCursorSettings: CursorSettings = {
enabled: true,
binaryPath: "agent",
binaryPath: "cursor-agent",
apiEndpoint: "",
customModels: [],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const makeClaudeConfig = (overrides: Partial<ClaudeSettings>): ClaudeSettings =>

const makeCursorConfig = (overrides: Partial<CursorSettings>): CursorSettings => ({
enabled: false,
binaryPath: "agent",
binaryPath: "cursor-agent",
apiEndpoint: "",
customModels: [],
...overrides,
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/Layers/ProviderRegistry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
Layer.provideMerge(OpenCodeRuntime.OpenCodeRuntimeLive),
Layer.provideMerge(
mockCommandSpawnerLayer((command, args) => {
if (command === "agent") {
if (command === "cursor-agent") {
cursorSpawned = true;
}
const joined = args.join(" ");
Expand Down
10 changes: 5 additions & 5 deletions apps/server/src/provider/acp/CursorAcpCliProbe.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Optional integration check against a real `agent acp` install.
* Optional integration check against a real `cursor-agent acp` install.
* Enable with: T3_CURSOR_ACP_PROBE=1 bun run test --filter CursorAcpCliProbe
*/
import * as NodeServices from "@effect/platform-node/NodeServices";
Expand All @@ -12,7 +12,7 @@ import type * as EffectAcpSchema from "effect-acp/schema";
import * as AcpSessionRuntime from "./AcpSessionRuntime.ts";

describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", () => {
it.effect("initialize and authenticate against real agent acp", () =>
it.effect("initialize and authenticate against real cursor-agent acp", () =>
Effect.gen(function* () {
const runtime = yield* AcpSessionRuntime.AcpSessionRuntime;
const started = yield* runtime.start();
Expand All @@ -21,7 +21,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
Effect.provide(
AcpSessionRuntime.layer({
spawn: {
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: process.cwd(),
},
Expand Down Expand Up @@ -77,7 +77,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
AcpSessionRuntime.layer({
authMethodId: "cursor_login",
spawn: {
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: process.cwd(),
},
Expand Down Expand Up @@ -133,7 +133,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe",
AcpSessionRuntime.layer({
authMethodId: "cursor_login",
spawn: {
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: process.cwd(),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/acp/CursorAcpSupport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const parameterizedGpt54ConfigOptions: ReadonlyArray<EffectAcpSchema.SessionConf
describe("buildCursorAcpSpawnInput", () => {
it("builds the default Cursor ACP command", () => {
expect(buildCursorAcpSpawnInput(undefined, "/tmp/project")).toEqual({
command: "agent",
command: "cursor-agent",
args: ["acp"],
cwd: "/tmp/project",
});
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/provider/acp/CursorAcpSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function buildCursorAcpSpawnInput(
environment?: NodeJS.ProcessEnv,
): AcpSessionRuntime.AcpSpawnInput {
return {
command: cursorSettings?.binaryPath || "agent",
command: cursorSettings?.binaryPath || "cursor-agent",
args: [
...(cursorSettings?.apiEndpoint ? (["-e", cursorSettings.apiEndpoint] as const) : []),
"acp",
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/provider/providerMaintenanceRunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function lifecycleFor(provider: ProviderDriverKind): ProviderMaintenanceCapabili
return makeProviderMaintenanceCapabilities({
provider,
packageName: null,
updateExecutable: "agent",
updateExecutable: "cursor-agent",
updateArgs: ["update"],
updateLockKey: "cursor-agent",
});
Expand Down Expand Up @@ -226,7 +226,7 @@ describe("providerMaintenanceRunner", () => {
const result = yield* updater.updateProvider(CURSOR_DRIVER);
assert.deepStrictEqual(calls, [
{
command: "agent",
command: "cursor-agent",
args: ["update"],
},
]);
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ export const CursorSettings = makeProviderSettingsSchema(
Schema.withDecodingDefault(Effect.succeed(false)),
Schema.annotateKey({ providerSettingsForm: { hidden: true } }),
),
binaryPath: makeBinaryPathSetting("agent").pipe(
binaryPath: makeBinaryPathSetting("cursor-agent").pipe(
Schema.annotateKey({
title: "Binary path",
description: "Path to the Cursor agent binary.",
providerSettingsForm: { placeholder: "agent", clearWhenEmpty: "omit" },
providerSettingsForm: { placeholder: "cursor-agent", clearWhenEmpty: "omit" },
}),
),
apiEndpoint: TrimmedString.pipe(
Expand Down
Loading