| author | |
| committer | |
| log | 7f1cb61031184030653c10d1cb357ba226db90e4 |
| tree | 31c07c542bbe114f18469b1be78811b54222544f |
| parent | c49d424e3aa2f5993e756a2b8f19b9b5da6f0cc5 |
| signature | Signed by PGP key B5690EEEBB952194 |
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"; |
| 62 | 62 | const targetReasoning = NodeProcess.env.CURSOR_REASONING ?? ""; |
| 63 | 63 | const targetContext = NodeProcess.env.CURSOR_CONTEXT ?? ""; |
| 64 | 64 | 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"; | |
| 66 | 66 | const promptWaitMs = Number(NodeProcess.env.CURSOR_PROMPT_WAIT_MS ?? "4000"); |
| 67 | 67 | const requestTimeoutMs = Number(NodeProcess.env.CURSOR_REQUEST_TIMEOUT_MS ?? "20000"); |
| 68 | 68 |
apps/server/src/provider/Drivers/CursorDriver.ts+12-11| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | /** |
| 2 | * CursorDriver — `ProviderDriver` for the Cursor Agent (`agent`) runtime. | |
| 2 | * CursorDriver — `ProviderDriver` for the Cursor Agent (`cursor-agent`) runtime. | |
| 3 | 3 | * |
| 4 | 4 | * Cursor exposes an ACP-based CLI. Model catalog and capability refreshes |
| 5 | 5 | * happen during the managed provider status check via Cursor's |
| ... | ... | @@ -42,7 +42,7 @@ import type { ServerProviderDraft } from "../providerSnapshot.ts"; |
| 42 | 42 | import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts"; |
| 43 | 43 | import { |
| 44 | 44 | makeProviderMaintenanceCapabilities, |
| 45 | makeStaticProviderMaintenanceResolver, | |
| 45 | type ProviderMaintenanceCapabilitiesResolver, | |
| 46 | 46 | resolveProviderMaintenanceCapabilitiesEffect, |
| 47 | 47 | } from "../providerMaintenance.ts"; |
| 48 | 48 | import { |
| ... | ... | @@ -54,15 +54,16 @@ const decodeCursorSettings = Schema.decodeSync(CursorSettings); |
| 54 | 54 | |
| 55 | 55 | const DRIVER_KIND = ProviderDriverKind.make("cursor"); |
| 56 | 56 | 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 | }; | |
| 66 | 67 | |
| 67 | 68 | export type CursorDriverEnv = |
| 68 | 69 | | ChildProcessSpawner.ChildProcessSpawner |
apps/server/src/provider/Layers/CursorProvider.test.ts+1-1| ... | ... | @@ -294,7 +294,7 @@ const parameterizedClaudeModelOptionConfigOptions = [ |
| 294 | 294 | |
| 295 | 295 | const baseCursorSettings: CursorSettings = { |
| 296 | 296 | enabled: true, |
| 297 | binaryPath: "agent", | |
| 297 | binaryPath: "cursor-agent", | |
| 298 | 298 | apiEndpoint: "", |
| 299 | 299 | customModels: [], |
| 300 | 300 | }; |
apps/server/src/provider/Layers/ProviderInstanceRegistryLive.test.ts+1-1| ... | ... | @@ -76,7 +76,7 @@ const makeClaudeConfig = (overrides: Partial<ClaudeSettings>): ClaudeSettings => |
| 76 | 76 | |
| 77 | 77 | const makeCursorConfig = (overrides: Partial<CursorSettings>): CursorSettings => ({ |
| 78 | 78 | enabled: false, |
| 79 | binaryPath: "agent", | |
| 79 | binaryPath: "cursor-agent", | |
| 80 | 80 | apiEndpoint: "", |
| 81 | 81 | customModels: [], |
| 82 | 82 | ...overrides, |
apps/server/src/provider/Layers/ProviderRegistry.test.ts+1-1| ... | ... | @@ -1396,7 +1396,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te |
| 1396 | 1396 | Layer.provideMerge(OpenCodeRuntime.OpenCodeRuntimeLive), |
| 1397 | 1397 | Layer.provideMerge( |
| 1398 | 1398 | mockCommandSpawnerLayer((command, args) => { |
| 1399 | if (command === "agent") { | |
| 1399 | if (command === "cursor-agent") { | |
| 1400 | 1400 | cursorSpawned = true; |
| 1401 | 1401 | } |
| 1402 | 1402 | const joined = args.join(" "); |
apps/server/src/provider/acp/CursorAcpCliProbe.test.ts+5-5| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | 1 | /** |
| 2 | * Optional integration check against a real `agent acp` install. | |
| 2 | * Optional integration check against a real `cursor-agent acp` install. | |
| 3 | 3 | * Enable with: T3_CURSOR_ACP_PROBE=1 bun run test --filter CursorAcpCliProbe |
| 4 | 4 | */ |
| 5 | 5 | import * as NodeServices from "@effect/platform-node/NodeServices"; |
| ... | ... | @@ -12,7 +12,7 @@ import type * as EffectAcpSchema from "effect-acp/schema"; |
| 12 | 12 | import * as AcpSessionRuntime from "./AcpSessionRuntime.ts"; |
| 13 | 13 | |
| 14 | 14 | 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", () => | |
| 16 | 16 | Effect.gen(function* () { |
| 17 | 17 | const runtime = yield* AcpSessionRuntime.AcpSessionRuntime; |
| 18 | 18 | const started = yield* runtime.start(); |
| ... | ... | @@ -21,7 +21,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", |
| 21 | 21 | Effect.provide( |
| 22 | 22 | AcpSessionRuntime.layer({ |
| 23 | 23 | spawn: { |
| 24 | command: "agent", | |
| 24 | command: "cursor-agent", | |
| 25 | 25 | args: ["acp"], |
| 26 | 26 | cwd: process.cwd(), |
| 27 | 27 | }, |
| ... | ... | @@ -77,7 +77,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", |
| 77 | 77 | AcpSessionRuntime.layer({ |
| 78 | 78 | authMethodId: "cursor_login", |
| 79 | 79 | spawn: { |
| 80 | command: "agent", | |
| 80 | command: "cursor-agent", | |
| 81 | 81 | args: ["acp"], |
| 82 | 82 | cwd: process.cwd(), |
| 83 | 83 | }, |
| ... | ... | @@ -133,7 +133,7 @@ describe.runIf(process.env.T3_CURSOR_ACP_PROBE === "1")("Cursor ACP CLI probe", |
| 133 | 133 | AcpSessionRuntime.layer({ |
| 134 | 134 | authMethodId: "cursor_login", |
| 135 | 135 | spawn: { |
| 136 | command: "agent", | |
| 136 | command: "cursor-agent", | |
| 137 | 137 | args: ["acp"], |
| 138 | 138 | cwd: process.cwd(), |
| 139 | 139 | }, |
apps/server/src/provider/acp/CursorAcpSupport.test.ts+1-1| ... | ... | @@ -53,7 +53,7 @@ const parameterizedGpt54ConfigOptions: ReadonlyArray<EffectAcpSchema.SessionConf |
| 53 | 53 | describe("buildCursorAcpSpawnInput", () => { |
| 54 | 54 | it("builds the default Cursor ACP command", () => { |
| 55 | 55 | expect(buildCursorAcpSpawnInput(undefined, "/tmp/project")).toEqual({ |
| 56 | command: "agent", | |
| 56 | command: "cursor-agent", | |
| 57 | 57 | args: ["acp"], |
| 58 | 58 | cwd: "/tmp/project", |
| 59 | 59 | }); |
apps/server/src/provider/acp/CursorAcpSupport.ts+1-1| ... | ... | @@ -35,7 +35,7 @@ export function buildCursorAcpSpawnInput( |
| 35 | 35 | environment?: NodeJS.ProcessEnv, |
| 36 | 36 | ): AcpSessionRuntime.AcpSpawnInput { |
| 37 | 37 | return { |
| 38 | command: cursorSettings?.binaryPath || "agent", | |
| 38 | command: cursorSettings?.binaryPath || "cursor-agent", | |
| 39 | 39 | args: [ |
| 40 | 40 | ...(cursorSettings?.apiEndpoint ? (["-e", cursorSettings.apiEndpoint] as const) : []), |
| 41 | 41 | "acp", |
apps/server/src/provider/providerMaintenanceRunner.test.ts+2-2| ... | ... | @@ -48,7 +48,7 @@ function lifecycleFor(provider: ProviderDriverKind): ProviderMaintenanceCapabili |
| 48 | 48 | return makeProviderMaintenanceCapabilities({ |
| 49 | 49 | provider, |
| 50 | 50 | packageName: null, |
| 51 | updateExecutable: "agent", | |
| 51 | updateExecutable: "cursor-agent", | |
| 52 | 52 | updateArgs: ["update"], |
| 53 | 53 | updateLockKey: "cursor-agent", |
| 54 | 54 | }); |
| ... | ... | @@ -226,7 +226,7 @@ describe("providerMaintenanceRunner", () => { |
| 226 | 226 | const result = yield* updater.updateProvider(CURSOR_DRIVER); |
| 227 | 227 | assert.deepStrictEqual(calls, [ |
| 228 | 228 | { |
| 229 | command: "agent", | |
| 229 | command: "cursor-agent", | |
| 230 | 230 | args: ["update"], |
| 231 | 231 | }, |
| 232 | 232 | ]); |
packages/contracts/src/settings.ts+2-2| ... | ... | @@ -252,11 +252,11 @@ export const CursorSettings = makeProviderSettingsSchema( |
| 252 | 252 | Schema.withDecodingDefault(Effect.succeed(false)), |
| 253 | 253 | Schema.annotateKey({ providerSettingsForm: { hidden: true } }), |
| 254 | 254 | ), |
| 255 | binaryPath: makeBinaryPathSetting("agent").pipe( | |
| 255 | binaryPath: makeBinaryPathSetting("cursor-agent").pipe( | |
| 256 | 256 | Schema.annotateKey({ |
| 257 | 257 | title: "Binary path", |
| 258 | 258 | description: "Path to the Cursor agent binary.", |
| 259 | providerSettingsForm: { placeholder: "agent", clearWhenEmpty: "omit" }, | |
| 259 | providerSettingsForm: { placeholder: "cursor-agent", clearWhenEmpty: "omit" }, | |
| 260 | 260 | }), |
| 261 | 261 | ), |
| 262 | 262 | apiEndpoint: TrimmedString.pipe( |