Repository navigation
Add cursor-agent CLI backend across core, Rust, Python, and Go - #31
Merged
Merged
Conversation
Co-authored-by: Yasyf Mohamedali <yasyf@users.noreply.github.com>
Co-authored-by: Yasyf Mohamedali <yasyf@users.noreply.github.com>
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.
Summary
Adds a
cursor-agentCLI backend (cursor-agent --print --output-format json) to the shared Rust core (spawnllm-core) and wires it across Rust, Python, and Go hosts, keeping 100% compatibility with all existing backends (claude-sdk,claude,codex,antigravity,gemini, MLX, Apple, Jev/OpenAI Decisions).Changes
rust/spawnllm-core):plan/cursor_agent.rs: planscursor-agent --print --output-format json --trustwith--model <model>(when non-empty),--mode askby default (--forcewhenagent=true), prompt on stdin (with JSON schema instruction appended whenschemais set), andenv_unset: ["CURSOR_API_KEY"]unlessapi_auth=true.resolve.rs: parsescursor-agent's JSON result envelope (result,is_error,subtype, optionaltotal_cost_usd/usage), extracts JSON forwants_value=true, and surfaces envelope errors on both zero and nonzero exits.auth.rs,route.rs,probe.rs: registers provider"cursor-agent"(binarycursor-agent, install hintcurl https://cursor.com/install -fsS | bash, auth probecursor-agent status, tierssmall: composer-2.5-fast,medium: composer-2.5,large: claude-opus-5-5-high, priority afterantigravity).rust/conformance-gen,conformance/):cursor-agentvectors acrossplan,resolve, andauth_probes, plus updatedcapabilities.json(217/217 verified).rust/spawnllm):Backend::CursorAgent, selection wiring, and integration tests coveringcheck_status,call,extract, andCURSOR_API_KEYstripping/preservation.spawnllm,tests/):CursorAgentCliBackend, exported it fromspawnllmandspawnllm.backends, added"cursor-agent"toProviderNameandBACKENDS_BY_NAME(automatically exposing--backend cursor-agent,spawnllm backends, andspawnllm status), and added unit/CLI/status tests.go/):ProviderCursorAgentandCursorAgentBackend(), wiredbackendForProvider, added fakego/testdata/bin/cursor-agent, and added unit/integration tests.README.md,go/README.md,rust/spawnllm/README.md, and.claude/fragments/great-docs.yml/great-docs-local.fragment.yml.Verification
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo test --workspace --all-features,cargo test -p spawnllm --no-default-features, andcargo run -p conformance-gen -- --check(217/217 matched) — all pass.go vet ./...,go test -race -count=1 ./...,CGO_ENABLED=0 go build ./...— all 3 packages pass.uv run pytest(553 passed, 2 platform-skipped),uv run ruff check&uv run ruff format --checkon changed files,uv run ty checkon changed files,uv build— all pass.