1jehuang / 1jehuang/jcode

feat: Add Cursor CLI ACP provider (cursor-acp)

Open
#575 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no enhancement from-pr priority: medium triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Summary

Implemented a separate native cursor-acp provider that uses Cursor's Agent Client Protocol over stdio, distinct from the existing direct HTTPS --provider cursor.

Branch & Commit

Key Changes

  • New crate jcode-provider-cursor-acp-runtime with controlled agent acp subprocess lifecycle
  • ACP event mapping: text, thinking, tool calls, permissions, usage, images
  • Model discovery only from ACP session/new + config updates (no static list)
  • Deterministic resolution: exact opaque IDs, unique bare variants, explicit errors for ambiguous/unsupported
  • Config via env: JCODE_CURSOR_ACP_PATH, JCODE_CURSOR_ACP_ARGS, JCODE_CURSOR_ACP_MODEL, JCODE_CURSOR_ACP_PERMISSION
  • CLI: --provider cursor-acp with parser/registration tests
  • Auth-test: skips tool smoke (Cursor owns tool execution)
  • 10 focused unit/integration tests including fake ACP subprocess
  • Docs: docs/CURSOR_ACP.md
  • Final selfdev TUI build passes

Deliberate Separations

  • Direct cursor provider unchanged (HTTPS-based)
  • No static model fallback
  • Fail-closed permission handling (default reject_once)

Testing

cargo test -p jcode-provider-cursor-acp-runtime      # 10 tests pass
cargo test -p jcode --lib external_provider_runtimes_register_and_instantiate
cargo test -p jcode --lib test_provider_choice_aliases_parse
cargo test -p jcode --lib skips_cursor_acp_tool_smoke
cargo fmt --check && cargo check -p jcode --bin jcode
selfdev build target=tui                              # builds successfully

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the feature/cursor-acp branch and the jcode-provider-cursor-acp-runtime crate, then run the listed cargo tests and formatting checks. Done means the cursor-acp provider is registered, its focused tests pass, the CLI parser and auth behavior are covered, and docs/CURSOR_ACP.md is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.