Skip to content

feat(agents): add cursor as the 9th agent - #560

Merged
lroolle merged 3 commits into
mainfrom
feat/cursor-agent-557
Aug 14, 2026
Merged

feat(agents): add cursor as the 9th agent#560
lroolle merged 3 commits into
mainfrom
feat/cursor-agent-557

Conversation

@lroolle

@lroolle lroolle commented Aug 14, 2026

Copy link
Copy Markdown
Member

Wraps Cursor CLI (cursor-agent) as deva.sh cursor. Stacked on #559; will retarget to main once dsh merges.

Close #557

Contract, verified empirically (binary probed in-container) rather than from docs alone:

  • Pin story: cursor.com/install has no version hook, but the tarball URL is deterministic (downloads.cursor.com/lab//linux//agent-cli-package.tar.gz, version format YYYY.MM.DD-hash). The image fetches it directly, lays it out installer-style under ~/.local/share/cursor-agent/versions/, links only cursor-agent (the official installer also squats agent -- too generic for a container with nine CLIs), then strips the write bit from the tree: the CLI schedules a silent background self-update on startup, and a read-only versions dir starves it. Reproducible: same pin, same binary, twice in a row.
  • make versions-up / versions-pin resolve latest via a new cursor-installer registry type (parse the installer script; the version's date is its own YYYY.MM.DD prefix).
  • Auth oauth (default): state lives in the per-agent config home only. Deliberately NO host ~/.cursor autolink or fallback mount -- that dir is the Cursor IDE's state (worktrees, per-project chats), and macOS keeps CLI auth in the keychain, so there is nothing portable to carry in. First login is in-container: cursor-agent login with NO_OPEN_BROWSER=1 prints the URL. Linux quirk pinned in comments: auth.json lives under .config/cursor even when cli-config lands in .cursor, so both are canonical entries.
  • Auth api-key: CURSOR_API_KEY env-only, no mount, blank overlay on .config/cursor/auth.json.
  • YOLO: --force (Cursor's own --yolo is an alias). Headless -p exists for CI smoke.
  • --trace rejected until cctrace grows a cursor profile.

Test plan (from #557):

  • scripts/test-cursor-auth.sh: 16 hermetic dry-run asserts (oauth no-IDE-mount, hybrid double mount, api-key env travel + redaction + no-mount + overlay, env scrub, --trace reject + passthrough, missing-key error) -- 16/16 local
  • existing agent auth tests stay green (full local suite: 13 scripts OK)
  • CI smoke deva.sh cursor -Q -- --version wired
  • pin story: tooling test fakes the tarball and asserts the write-bit strip; resolver live-tested against cursor.com/install (returns 2026.08.11-e8db854)

🤖 Generated with Claude Code

@lroolle
lroolle force-pushed the feat/cursor-agent-557 branch from a6adb06 to 5d31ac3 Compare August 14, 2026 05:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6adb063d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/release-utils.sh
"opencode|npm|opencode-ai|org.opencontainers.image.opencode_version|https://www.npmjs.com/package/opencode-ai|github:anomalyco/opencode|agent|main"
"pi|npm|@earendil-works/pi-coding-agent|org.opencontainers.image.pi_coding_agent_version|https://www.npmjs.com/package/@earendil-works/pi-coding-agent|github:earendil-works/pi|agent|main"
"dsh|npm|@deepseek-ai/dsh|org.opencontainers.image.dsh_version|https://www.npmjs.com/package/@deepseek-ai/dsh|github:deepseek-ai/deepseek-harness|agent|main"
"cursor|cursor-installer|cursor.com/install|org.opencontainers.image.cursor_cli_version|https://cursor.com/docs/cli||agent|main"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update registry expectations for Cursor

Adding Cursor to the agent/main registry changes the output of get_tools_by_group, get_tools_by_image, and the default filter_tools, but tests/test_release_utils.sh still omits Cursor from all three expected sets. The Basic Tests job in .github/workflows/ci.yml runs this test, and it now reports Cursor as an unexpected value; update the expected tool lists and counts with the registry change.

Useful? React with 👍 / 👎.

opencode_ver="${_CLI_OPENCODE:-$(get_latest "opencode")}"
pi_ver="${_CLI_PI:-$(get_latest "pi")}"
dsh_ver="${_CLI_DSH:-$(get_latest "dsh")}"
cursor_ver="${_CLI_CURSOR:-$(get_latest "cursor")}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add Cursor to the version-upgrade fixtures

When the Basic Tests job runs tests/version-upgrade.sh, this lookup uses the test's fake curl, which has no cursor.com/install response, while its fake image also lacks the Cursor version label. Consequently the hermetic test emits Error: Cannot determine version for cursor and exits before its assertions; extend every resolver/outage fixture and expected build/pin data for Cursor.

Useful? React with 👍 / 👎.

@lroolle
lroolle force-pushed the feat/cursor-agent-557 branch from 5d31ac3 to a912137 Compare August 14, 2026 05:33
Base automatically changed from feat/dsh-agent-556 to main August 14, 2026 05:42
lroolle and others added 3 commits August 13, 2026 22:42
- agents/cursor.sh: oauth keeps state in the per-agent config home
  only; api-key passes CURSOR_API_KEY as env, mounts nothing, and
  blank-overlays .config/cursor/auth.json; YOLO via --force
- no host ~/.cursor autolink or legacy fallback mount, ever: that dir
  is the Cursor IDE's state (worktrees, per-project chats), not a
  CLI-only home, and macOS keeps CLI auth in the keychain -- nothing
  portable to carry in. First login runs in-container
  (NO_OPEN_BROWSER=1 makes cursor-agent login print the URL)
- two canonical entries on Linux: .cursor (cli-config, projects) and
  .config/cursor (auth.json -- the file store keeps auth there even
  when config lands in .cursor)
- pin without the installer: cursor.com/install has no version hook,
  but the tarball URL is deterministic; install_cursor_agent fetches
  downloads.cursor.com/lab/<CURSOR_CLI_VERSION>/linux/<arch> directly,
  lays it out installer-style, links only cursor-agent (installer also
  squats 'agent' -- too generic here), then strips the write bit from
  the versions tree to starve the silent startup self-updater
- new cursor-installer registry type: latest = parse the installer
  script; version date = its own YYYY.MM.DD prefix
- CURSOR_CLI_VERSION=2026.08.11-e8db854 through versions.env,
  Dockerfiles, Makefile, pin scripts, CI, nightly, release
- scripts/test-cursor-auth.sh: 16 hermetic dry-run asserts, wired into
  CI; tooling test fakes the cursor tarball via the curl stub

Close #557

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Registry list pins in tests/test_release_utils.sh; 70/70 again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The cursor-installer resolver parses cursor.com/install; the fake curl
now serves a stub installer line in both blocks, plus an image-label
current for the outage fallback and the pin in the written-pins assert.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lroolle
lroolle force-pushed the feat/cursor-agent-557 branch from a912137 to d00d722 Compare August 14, 2026 05:42
@lroolle
lroolle merged commit 07dcfbd into main Aug 14, 2026
5 checks passed
@lroolle
lroolle deleted the feat/cursor-agent-557 branch August 14, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add Cursor CLI (cursor-agent) as an agent

1 participant