diff --git a/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts b/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts index 183e2fab6692..adb7ba7a84f9 100644 --- a/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts +++ b/apps/server/src/orchestration-v2/Adapters/CursorAdapterV2.testkit.ts @@ -477,6 +477,7 @@ export function makeCursorAgentSdkReplayRunner( }, catch: (cause) => replayRunnerError(transcript, cause, "replay.session.send"), }), + rollback: () => Effect.die("Cursor replay rollback is not recorded"), listMessages: Effect.try({ try: () => { assertOutbound({ diff --git a/apps/server/src/orchestration-v2/CommandPolicy.test.ts b/apps/server/src/orchestration-v2/CommandPolicy.test.ts index 14a803b1d1d6..f86a7f2e1552 100644 --- a/apps/server/src/orchestration-v2/CommandPolicy.test.ts +++ b/apps/server/src/orchestration-v2/CommandPolicy.test.ts @@ -283,6 +283,18 @@ layer("CommandPolicyV2", (it) => { }), ); + it.effect("allows Cursor conversation rollback", () => + Effect.gen(function* () { + const policy = yield* CommandPolicy.CommandPolicyV2; + yield* policy.ensureRollback({ + commandId, + threadId, + providerInstanceId: ProviderInstanceId.make("cursor"), + capabilities: CursorProviderCapabilitiesV2, + }); + }), + ); + it.effect("falls back to portable context when Cursor cannot fork natively", () => Effect.gen(function* () { const policy = yield* CommandPolicy.CommandPolicyV2; diff --git a/docs/user/cursor.md b/docs/user/cursor.md index a71080de9308..bb9af1e2616f 100644 --- a/docs/user/cursor.md +++ b/docs/user/cursor.md @@ -50,12 +50,13 @@ The adapter supports: - thread-scoped T3 Code MCP tools alongside ambient Cursor MCP/plugins from disk; - image attachments; - interruption, queued app messages, and in-turn steering; +- editing sent messages and reverting conversations through persisted SDK checkpoints; - provider conversation snapshots through `Agent.messages.list()`; - Cursor `task` subagents, projected as read-only child app threads with their tool activity and final result. -The public SDK does not currently expose native agent fork, conversation rollback, or interactive -approval callbacks. A text-only steer reaches the current run without restarting it. +The public SDK does not currently expose native agent fork or interactive approval +callbacks. A text-only steer reaches the current run without restarting it. When Cursor cannot deliver the steer, the same message is queued for the next turn after this run finishes. If you press Stop, that follow-up stays held until you resume the queue. Steers with attachments and provider or runtime changes that must apply immediately interrupt and restart @@ -64,6 +65,9 @@ Same-provider Cursor forks use the orchestrator's portable full-thread context h Cursor agent. The SDK has in-process custom callback tools, but the V2 adapter intentionally uses the authenticated, thread-scoped MCP server instead. +Editing a sent message rewinds the conversation to before that message. Rollback requires the +local Cursor checkpoint data to still be available on the environment running the thread. + Portable handoffs summarize eligible timeline items and can omit the end of long messages. Read [Context in portable handoffs](./portable-handoffs.md) before using a fork for work whose exact instructions must carry forward. diff --git a/packages/provider-cursor/src/server/CursorAgentSdk.test.ts b/packages/provider-cursor/src/server/CursorAgentSdk.test.ts index 4a62c946f67e..632753ee3895 100644 --- a/packages/provider-cursor/src/server/CursorAgentSdk.test.ts +++ b/packages/provider-cursor/src/server/CursorAgentSdk.test.ts @@ -4,6 +4,7 @@ import { assert, describe, it } from "@effect/vitest"; import { ProviderSessionId, ThreadId } from "@t3tools/contracts"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; +import { JsonlLocalAgentStore } from "@cursor/sdk"; import * as Layer from "effect/Layer"; import * as Exit from "effect/Exit"; import * as Cause from "effect/Cause"; @@ -186,6 +187,74 @@ describe("CursorAgentSdkRunner", () => { }).pipe(Effect.provide(NodeServices.layer)), ); + it.effect("restores persisted run boundaries and rejects unavailable or active targets", () => + Effect.gen(function* () { + const fs = yield* FileSystem.FileSystem; + const root = yield* fs.makeTempDirectoryScoped({ prefix: "cursor-rollback-" }); + const store = new JsonlLocalAgentStore(root); + const agentId = "agent-cursor-agent-sdk-test"; + const checkpoint = { schemaVersion: 1 as const, rootBlobId: "retained" }; + const document = { + agentId, + cwd: root, + status: "idle" as const, + activeRunId: null, + createdAt: 0, + updatedAt: 0, + latestCheckpoint: { ...checkpoint, rootBlobId: "discarded" }, + sdkMetadata: { preserved: true }, + }; + yield* Effect.promise(async () => { + await store.agents.create({ agent: document }); + await store.checkpoints.create({ + agentId, + blobId: checkpoint.rootBlobId, + data: new Uint8Array([1]), + }); + await store.runs.create({ + run: { + agentId, + runId: "retained-run", + turnNumber: 1, + status: "finished", + createdAt: 0, + updatedAt: 0, + latestCheckpointRef: checkpoint, + }, + }); + }); + cursorSdkMock.setAgentCloseFailure(undefined); + const runner = yield* CursorAgentSdk.CursorAgentSdkRunner; + const session = yield* runner.open({ + operation: "resume", + agentId, + threadId: ThreadId.make("rollback"), + providerSessionId: ProviderSessionId.make("rollback"), + options: { local: { cwd: root, store } }, + }); + yield* session.rollback("retained-run"); + const reopened = new JsonlLocalAgentStore(root); + const restored = yield* Effect.promise(() => reopened.agents.get({ agentId })); + assert.deepStrictEqual(restored?.latestCheckpoint, checkpoint); + assert.deepStrictEqual(restored?.sdkMetadata, document.sdkMetadata); + const missing = yield* session.rollback("missing").pipe(Effect.exit); + assert(Exit.isFailure(missing)); + yield* Effect.promise(() => + store.agents.update({ agent: { ...document, status: "running" } }), + ); + assert(Exit.isFailure(yield* session.rollback(null).pipe(Effect.exit))); + yield* Effect.promise(() => store.agents.update({ agent: document })); + yield* Effect.promise(() => + store.checkpoints.delete({ + filter: { agentIds: [agentId], blobIds: [checkpoint.rootBlobId] }, + }), + ); + assert(Exit.isFailure(yield* session.rollback("retained-run").pipe(Effect.exit))); + yield* session.rollback(null); + assert.isNull((yield* Effect.promise(() => store.agents.get({ agentId })))?.latestCheckpoint); + }).pipe(Effect.provide(Layer.merge(layerTest, NodeServices.layer))), + ); + it.effect("constructs without loading and reports first-use load failures as runner errors", () => Effect.gen(function* () { const failure = new Error("missing SDK chunk"); diff --git a/packages/provider-cursor/src/server/CursorAgentSdk.ts b/packages/provider-cursor/src/server/CursorAgentSdk.ts index 3162e32a5fd8..0ec7994231c0 100644 --- a/packages/provider-cursor/src/server/CursorAgentSdk.ts +++ b/packages/provider-cursor/src/server/CursorAgentSdk.ts @@ -123,6 +123,7 @@ export interface CursorAgentSdkSession { readonly send: ( input: CursorAgentSdkSendInput, ) => Effect.Effect; + readonly rollback: (runId: string | null) => Effect.Effect; readonly listMessages: Effect.Effect, CursorAgentSdkRunnerError>; /** Context fill at the latest checkpoint, if Cursor saved one. Absent on test doubles. */ readonly readContextUsage?: Effect.Effect< @@ -731,6 +732,50 @@ export const makeCursorAgentSdkRunner = Effect.fn("makeCursorAgentSdkRunner")(fu ), } satisfies CursorAgentSdkRun; }), + rollback: Effect.fn("CursorAgentSdkSession.rollback")(function* (runId) { + yield* Effect.tryPromise({ + try: async () => { + const ownedStore = + input.options.local?.store === undefined + ? await sdk.loadSqlite().SqliteLocalAgentStore.open({ + workspaceRef: storeCwd ?? cwd ?? process.cwd(), + }) + : undefined; + const store = input.options.local?.store ?? ownedStore!; + try { + const document = await store.agents.get({ agentId: agent.agentId }); + if (document === null) throw new Error("Cursor agent is unavailable for rollback."); + if (document.status === "running" || document.activeRunId != null) + throw new Error("Cannot roll back an active Cursor agent."); + const run = + runId === null ? null : await store.runs.get({ agentId: agent.agentId, runId }); + if ( + runId !== null && + (run === null || + run.agentId !== agent.agentId || + run.status === "running" || + run.status === "queued" || + run.latestCheckpointRef == null) + ) + throw new Error("Cursor turn checkpoint is unavailable for rollback."); + const checkpoint = run?.latestCheckpointRef ?? null; + if ( + checkpoint !== null && + (await store.checkpoints.get({ + agentId: agent.agentId, + blobId: checkpoint.rootBlobId, + })) === null + ) + throw new Error("Cursor checkpoint blob is unavailable for rollback."); + agent.close(); + await store.agents.update({ agent: { ...document, latestCheckpoint: checkpoint } }); + } finally { + await ownedStore?.dispose(); + } + }, + catch: (cause) => runnerError(cause, "agent.rollback"), + }); + }), listMessages: log({ direction: "outgoing", stage: "decoded", diff --git a/packages/provider-cursor/src/server/adapter.test.ts b/packages/provider-cursor/src/server/adapter.test.ts index 38c4119ad94a..cd4e256a8aa4 100644 --- a/packages/provider-cursor/src/server/adapter.test.ts +++ b/packages/provider-cursor/src/server/adapter.test.ts @@ -6,6 +6,8 @@ import { assert, describe, it } from "@effect/vitest"; import type { InteractionUpdate } from "@cursor/sdk"; import { toolOutputImages } from "@t3tools/shared/toolOutput"; import { + type OrchestrationV2ProviderTurn, + CheckpointId, EnvironmentId, MessageId, NodeId, @@ -105,6 +107,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-lifecycle", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => @@ -493,6 +496,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-failure", + rollback: () => Effect.void, listMessages: Effect.succeed([]), readContextUsage: Effect.succeed(contextFill), close: Effect.void, @@ -623,6 +627,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-error", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => @@ -783,6 +788,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-device", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => @@ -808,17 +814,18 @@ describe("CursorAdapterV2", () => { }), Effect.provide(TestProviderHost.layer({ cwd: workspace })), ); - const runtime = yield* adapter.openSession({ + let runtime = yield* adapter.openSession({ threadId, providerSessionId: ProviderSessionId.make("cursor-device-session"), modelSelection, runtimePolicy, }); - const providerThread = yield* runtime.ensureThread({ + let providerThread = yield* runtime.ensureThread({ threadId, modelSelection, runtimePolicy, }); + providerThread = { ...providerThread, lastRunOrdinal: 4 }; const now = yield* DateTime.now; const appThread = { id: threadId, @@ -843,8 +850,9 @@ describe("CursorAdapterV2", () => { lastVisitedAt: null, deletedAt: null, }; - // Starts at run 5: a conversation from before device instructions existed, now resumed. + // Resuming a conversation does not prove it ever received T3 instructions. let runOrdinal = 4; + let latestTurn: OrchestrationV2ProviderTurn | undefined; const send = Effect.fnUntraced(function* (compact = false) { runOrdinal += 1; const turnInput = { @@ -867,10 +875,13 @@ describe("CursorAdapterV2", () => { }, }; yield* compact ? runtime.compactThread!(turnInput) : runtime.startTurn(turnInput); - yield* runtime.events.pipe( - Stream.filter((event) => event.type === "turn.terminal"), - Stream.runHead, + const events = yield* runtime.events.pipe( + Stream.takeUntil((event) => event.type === "turn.terminal"), + Stream.runCollect, ); + latestTurn = events.findLast( + (event) => event.type === "provider_turn.updated", + )?.providerTurn; const sent = sentMessages.at(-1)!; return { orchestration: sent.includes("## T3 Code orchestration"), @@ -880,7 +891,7 @@ describe("CursorAdapterV2", () => { const told = (orchestration: boolean, devices: boolean) => ({ orchestration, devices }); yield* setDeviceAccess(true); - assert.deepEqual(yield* send(), told(false, true)); + assert.deepEqual(yield* send(), told(true, true)); assert.deepEqual(yield* send(), told(false, false)); yield* send(true); assert.deepEqual( @@ -893,6 +904,93 @@ describe("CursorAdapterV2", () => { yield* setDeviceAccess(true); assert.deepEqual(yield* send(), told(false, true), "device access turned on later"); assert.deepEqual(yield* send(), told(false, false)); + yield* runtime.rollbackThread({ + providerThread, + providerThreadTurns: [], + target: { + type: "thread_start", + checkpointId: CheckpointId.make("cursor-start"), + appRunOrdinal: 0, + }, + }); + assert.deepEqual( + yield* send(), + told(true, true), + "thread-start rollback drops all instructions despite the increasing run ordinal", + ); + assert.deepEqual( + yield* send(), + told(false, false), + "instructions are sent only once after rollback", + ); + const restored = yield* runtime.rollbackThread({ + providerThread, + providerThreadTurns: [], + target: { + type: "thread_start", + checkpointId: CheckpointId.make("cursor-start-again"), + appRunOrdinal: 0, + }, + }); + // CheckpointRollbackService persists null at the thread-start boundary. + providerThread = { ...restored.providerThread, lastRunOrdinal: null }; + runtime = yield* adapter.openSession({ + threadId, + providerSessionId: ProviderSessionId.make("cursor-device-restarted"), + modelSelection, + runtimePolicy, + }); + providerThread = yield* runtime.resumeThread({ providerThread }); + assert.deepEqual( + yield* send(), + told(true, true), + "a restarted session restores instructions after rollback", + ); + assert.deepEqual( + yield* send(), + told(false, false), + "restarted sessions deliver instructions only once", + ); + yield* mcpSessions.clear(threadId); + yield* send(true); + assert.deepEqual(yield* send(), told(false, false)); + const withoutInstructions = latestTurn; + if (withoutInstructions === undefined) throw new Error("Missing retained provider turn"); + const retainedOrdinal = runOrdinal; + yield* setDeviceAccess(true); + assert.deepEqual(yield* send(), told(true, true)); + for (const restart of [false, true]) { + const rolledBack = yield* runtime.rollbackThread({ + providerThread, + providerThreadTurns: [withoutInstructions], + target: { + type: "provider_turn", + checkpointId: CheckpointId.make("cursor-before-mcp"), + appRunOrdinal: retainedOrdinal, + providerTurn: withoutInstructions, + }, + }); + providerThread = { ...rolledBack.providerThread, lastRunOrdinal: retainedOrdinal }; + if (restart) { + runtime = yield* adapter.openSession({ + threadId, + providerSessionId: ProviderSessionId.make("cursor-retained-restarted"), + modelSelection, + runtimePolicy, + }); + providerThread = yield* runtime.resumeThread({ providerThread }); + } + assert.deepEqual( + yield* send(), + told(true, true), + "retained turns without MCP need instructions after rollback", + ); + assert.deepEqual( + yield* send(), + told(false, false), + "retained-turn rollback delivers instructions only once", + ); + } }).pipe( Effect.scoped, Effect.provide( @@ -901,7 +999,7 @@ describe("CursorAdapterV2", () => { ), ); - it.effect("carries an interrupted prompt into the steer that restarts the turn", () => + it.effect.each([false, true])("handles interrupted prompts when rollback is %s", (rollback) => Effect.gen(function* () { const fileSystem = yield* FileSystem.FileSystem; const workspace = yield* fileSystem.makeTempDirectoryScoped({ prefix: "cursor-v2-steer-" }); @@ -924,6 +1022,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-steer", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => @@ -1020,16 +1119,25 @@ describe("CursorAdapterV2", () => { ); assert(started.type === "provider_turn.updated"); yield* runtime.interruptTurn({ providerThread, providerTurnId: started.providerTurn.id }); + if (rollback) { + yield* runtime.rollbackThread({ + providerThread, + providerThreadTurns: [], + target: { + type: "thread_start", + checkpointId: CheckpointId.make("steer-reset"), + appRunOrdinal: 0, + }, + }); + } yield* runtime.startTurn(turnInput(2, steerText)); assert.lengthOf(sentMessages, 2); const steered = sentMessages[1]!; assert.include(steered, steerText); - assert.include( - steered, - firstPrompt, - "the interrupted prompt is missing from the run that replaces it", - ); + if (rollback) + assert.notInclude(steered, firstPrompt, "rollback must discard the interrupted prompt"); + else assert.include(steered, firstPrompt, "steering preserves the interrupted prompt"); yield* Deferred.succeed(runEnds[1]!, "finished"); yield* runtime.events.pipe( @@ -1312,6 +1420,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-search", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => @@ -1598,6 +1707,7 @@ describe("CursorAdapterV2", () => { open: () => Effect.succeed({ agentId: "native-cursor-task-ls", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => @@ -1774,6 +1884,7 @@ describe("CursorAdapterV2", () => { agentId: "native-cursor-shell", listMessages: Effect.succeed([]), close: Effect.void, + rollback: () => Effect.void, send: (input) => Effect.gen(function* () { yield* input.onDelta!({ @@ -1933,6 +2044,7 @@ describe("CursorAdapterV2", () => { checkModel(`agent.${input.operation}`, input.options.model).pipe( Effect.as({ agentId: "native-cursor-custom-model", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (sendInput) => @@ -2367,6 +2479,7 @@ describe("CursorAdapterV2", () => { agentId: "native-cursor-mcp", listMessages: Effect.succeed([]), close: Effect.void, + rollback: () => Effect.void, send: (sendInput) => { sentWith.push(sendInput.options?.mcpServers); return Effect.die("sent"); @@ -2549,6 +2662,7 @@ describe("CursorAdapterV2", () => { agentId: "native-cursor-steer", listMessages: Effect.succeed([]), close: Effect.void, + rollback: () => Effect.void, send: () => Effect.succeed({ agentId: "native-cursor-steer", diff --git a/packages/provider-cursor/src/server/adapter.ts b/packages/provider-cursor/src/server/adapter.ts index 496a2bd5460e..4ef09d960290 100644 --- a/packages/provider-cursor/src/server/adapter.ts +++ b/packages/provider-cursor/src/server/adapter.ts @@ -90,7 +90,7 @@ export const CursorProviderCapabilitiesV2 = { threads: { canCreateEmptyThread: true, canReadThreadSnapshot: true, - canRollbackThread: false, + canRollbackThread: true, canForkThread: false, canForkFromTurn: false, canForkFromSubagentThread: false, @@ -162,8 +162,8 @@ export const CursorProviderCapabilitiesV2 = { checkpointing: { appCanCheckpointFilesystem: true, supportsNestedCheckpointScopes: true, - providerCanRollbackConversation: false, - providerRollbackReturnsSnapshot: false, + providerCanRollbackConversation: true, + providerRollbackReturnsSnapshot: true, providerCanReadConversationSnapshot: true, }, identity: { @@ -2536,11 +2536,14 @@ export const makeCursorAdapterV2 = Effect.fn("makeCursorAdapterV2")(function* ( const hasDeviceTools = mcpServers !== undefined && mcpSession?.capabilities?.has("device") === true; const known = yield* Ref.get(told); - // A conversation this process has not sent to was told on its first run. + // Unknown delivery is retried once: retained turns may predate T3 MCP access. const delivered = known?.agent === agent.nativeThreadId ? known - : { orchestration: turnInput.runOrdinal > 1, device: false }; + : { + orchestration: false, + device: false, + }; const interrupted = yield* Ref.get(interruptedPrompt); const { message, prompt } = yield* resolveUserMessage( turnInput, @@ -3032,15 +3035,66 @@ export const makeCursorAdapterV2 = Effect.fn("makeCursorAdapterV2")(function* ( ), ), ), - rollbackThread: (rollbackInput) => - Effect.fail( - new ProviderAdapter.ProviderAdapterRollbackThreadError({ - driver: CursorAgentSdk.CURSOR_PROVIDER, - providerThreadId: rollbackInput.providerThread.id, - checkpointId: rollbackInput.target.checkpointId, - cause: "Cursor Agent SDK does not expose conversation rollback.", - }), - ), + rollbackThread: Effect.fn("CursorAdapterV2.rollbackThread")( + function* (rollbackInput) { + if ((yield* Ref.get(activeTurn)) !== null) { + return yield* new ProviderAdapter.ProviderAdapterProtocolError({ + driver: CursorAgentSdk.CURSOR_PROVIDER, + detail: "Cannot roll back while a Cursor turn is active.", + }); + } + const target = rollbackInput.target; + const runId = + target.type === "thread_start" ? null : target.providerTurn.nativeTurnRef?.nativeId; + if ( + (target.type === "provider_turn" && runId == null) || + (target.type === "provider_turn" && + target.providerTurn.providerThreadId !== rollbackInput.providerThread.id) + ) { + return yield* new ProviderAdapter.ProviderAdapterProtocolError({ + driver: CursorAgentSdk.CURSOR_PROVIDER, + detail: "Cursor rollback target has no matching native turn.", + }); + } + const agent = yield* openAgent({ + operation: "resume", + agentId: nativeThreadId(rollbackInput.providerThread), + threadId: rollbackInput.providerThread.appThreadId ?? input.threadId, + modelSelection: input.modelSelection, + runtimePolicy: input.runtimePolicy, + }); + yield* agent.session.rollback(runId ?? null).pipe( + Effect.onError(() => agent.session.close.pipe(Effect.ignore)), + Effect.ensuring(Ref.set(liveAgent, null)), + ); + yield* Ref.set(told, null); + yield* Ref.set(interruptedPrompt, null); + return { + providerThread: { + ...rollbackInput.providerThread, + nativeConversationHeadRef: + target.type === "thread_start" ? null : target.providerTurn.nativeTurnRef, + status: "idle" as const, + updatedAt: yield* DateTime.now, + }, + providerTurns: [], + messages: [], + runtimeRequests: [], + }; + }, + (effect, rollbackInput) => + effect.pipe( + Effect.mapError( + (cause) => + new ProviderAdapter.ProviderAdapterRollbackThreadError({ + driver: CursorAgentSdk.CURSOR_PROVIDER, + providerThreadId: rollbackInput.providerThread.id, + checkpointId: rollbackInput.target.checkpointId, + cause, + }), + ), + ), + ), forkThread: (forkInput) => Effect.fail( new ProviderAdapter.ProviderAdapterForkThreadError({ diff --git a/packages/provider-cursor/src/server/driver.test.ts b/packages/provider-cursor/src/server/driver.test.ts index 213d413b6dee..4370659b9bd9 100644 --- a/packages/provider-cursor/src/server/driver.test.ts +++ b/packages/provider-cursor/src/server/driver.test.ts @@ -123,6 +123,7 @@ it.layer(layerTest)("CursorDriver", (it) => { openedKeys.push(request.options.apiKey); return { agentId: "browser-auth-agent", + rollback: () => Effect.void, listMessages: Effect.succeed([]), send: () => Effect.die("This test only opens a session"), close: Effect.sync(() => { @@ -228,6 +229,7 @@ it.layer(layerTest)("CursorDriver", (it) => { openedModels.push(request.options.model); return { agentId: "native-cursor-window", + rollback: () => Effect.void, listMessages: Effect.succeed([]), close: Effect.void, send: (input) => diff --git a/packages/provider-cursor/src/server/status.test.ts b/packages/provider-cursor/src/server/status.test.ts index 82651cc25432..f8152c8d483d 100644 --- a/packages/provider-cursor/src/server/status.test.ts +++ b/packages/provider-cursor/src/server/status.test.ts @@ -113,7 +113,7 @@ describe("buildCursorProviderSnapshot", () => { status: "warning", message: "Cursor SDK model discovery returned no built-in models.", models: [], - supportsConversationRollback: false, + supportsConversationRollback: true, }); }); }); diff --git a/packages/provider-cursor/src/server/status.ts b/packages/provider-cursor/src/server/status.ts index 7c0167579f20..bd692dcefc40 100644 --- a/packages/provider-cursor/src/server/status.ts +++ b/packages/provider-cursor/src/server/status.ts @@ -26,7 +26,7 @@ import * as CursorSdkCatalog from "./CursorSdkCatalog.ts"; const CURSOR_PRESENTATION = { displayName: "Cursor", - supportsConversationRollback: false, + supportsConversationRollback: true, showInteractionModeToggle: true, } as const; const EMPTY_CAPABILITIES: ModelCapabilities = createModelCapabilities({