Repository navigation
fix: update the V2 adapter for Cursor SDK 1.4.1 - #36
Open
CasualDeveloper wants to merge 1 commit into
Open
CasualDeveloper wants to merge 1 commit into
CasualDeveloper wants to merge 1 commit into
Conversation
CasualDeveloper
force-pushed
the
fix/cursor-sdk-1.0.37-compat
branch
from
October 15, 2026 20:48
e5e386d to
f32d68c
Compare
CasualDeveloper
force-pushed
the
fix/cursor-sdk-1.0.37-compat
branch
from
November 18, 2026 09:04
f32d68c to
d916d20
Compare
Keep server notices out of assistant history, ignore known presentation and usage updates after turnEnded, and decline hosted requests and native writes whose restrictions the host cannot enforce. Deduplicate model families that refer to the same wire IDs. Use the November CLI header for Run and catalog requests and advertise gzip for streams. Report truncated frames without accepting early EOF. Validate browser login token pairs and include the last poll outcome on timeout. Refs otto-assistant#31
CasualDeveloper
force-pushed
the
fix/cursor-sdk-1.0.37-compat
branch
from
November 18, 2026 10:27
d916d20 to
7853940
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I updated the V2 adapter from #35 against the Cursor SDK 1.4.1 wire schema. This includes the earlier 1.0.37 compatibility changes. Both workers and the capability probes now send
cli-2026.11.17-f532c45.Issue for this PR
Refs #31.
Type of change
What does this PR do?
TextDeltaUpdate.is_server_noticedistinguishes a server notice (such as a model fallback) from assistant text. The adapter reports it inproviderMetadata.cursor.serverNoticeand as adoGeneratewarning without replaying it. OpenCode doesn't currently display the warning for streamed responses.turnEnded. The adapter recognizes the known fields, including thinking notes, voice utterances, per-model-call usage, and time-to-first-token telemetry. Per-call counts aren't added to the turn totals. Unknown terminal updates and incomplete streams still fail.GetUsableModelsfamily points entirely to wire IDs already listed byAvailableModels, the picker keeps the authoritative family. This addresses the duplicate Claude Opus 4.6 1M entry with conflicting context windows.turnEndedand a final checkpoint arrived. Browser login rejects incomplete token pairs and reports the last poll outcome on timeout without logging response bodies.How did you verify your code works?
npm test: 108 passed.npm run test:cursor-capability: 11 passed.npm run typecheck: passed.Still open: These checks cover fresh login, not renewal of an expired browser credential. They also don't resolve the long-conversation EOF: earlier Runs closed partway through a roughly 36 KB frame before
turnEnded; the new diagnostics don't treat that as success. The fallback-notice regression uses a synthetic flagged message. I haven't repeated the fullnpm run verifyon this revision because rebuildingdistreloads the active plugin.Checklist