Skip to content

Add the Cursor runtime (cursor-agent ACP) - #33

Merged
xxchan merged 5 commits into
mainfrom
runtime-cursor
Sep 29, 2026
Merged

xxchan merged 5 commits into
mainfrom
runtime-cursor

Conversation

@xxchan

@xxchan xxchan commented Sep 29, 2026

Copy link
Copy Markdown
Member

Adds cursor as an OAR runtime over cursor-agent --force acp.

What it does

  • Installation: OAR_CURSOR_BIN, PATH cursor-agent, or the installer's ~/.local/bin/cursor-agent; readiness probe acp --help.
  • Models: cursor/list_available_models on a temporary ACP process, with per model effort levels.
  • Session: the shared ACP kernel with a Cursor profile. It opts into the parameterized model picker (so effort is a thought_level option) and subagent updates, switches the model through session/set_config_option (the set_model answer is empty), and rejects system prompt options, which Cursor's ACP cannot take.
  • Vendor requests (cursor/ask_question, create_plan, update_todos, task, generate_image) are recorded, then refused with -32601.
  • Children: ACP SDK 1.4.0 drops unknown session/update kinds, so a small stream transform carries subagent_spawned / subagent_state_update past the parser in wire order. The child session gets a tool_call edge (tier nested).
  • Shared change: when a model has both a thinking switch and an effort menu, effort goes to the menu.

Evidence

  • experiments/live-contract.ts cursor on a real login (cursor-agent 2026.09.28, linux x64, gpt-5.4-nano): 13/13. subagent re-run after the opt-in: nested, one edge.
  • pnpm check: typecheck, lint, 379 tests, sea-trial mock 17/17.
  • Details and open gaps in docs/runtimes/cursor.md. The main caveat: Cursor persists model changes to the global ~/.cursor/cli-config.json.

Cursor is not added to the real-runtime CI matrix.

🤖 Generated with Claude Code

exe.dev user and others added 5 commits September 29, 2026 08:51
cursor-agent 2026.09.28 serves standard ACP through `agent acp`. Two
profile hooks cover what it does differently: `clientCapabilitiesMeta`
declares `parameterizedModelPicker`, without which it folds effort into
the model id and advertises no thought_level option, and
`modelViaConfigOption` switches models through the `model` config option
because its set_model answers `{}` and pushes nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… method

cursor-agent asks its client cursor/ask_question, cursor/create_plan and
friends first and falls back when the client answers -32601. The profile
lists those methods so each one is recorded as a toApp request before the
same refusal, and the payload is kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ptions

cursor-agent 2026.09.28 lists both a thinking switch (false/true) and an
effort menu under thought_level for most Claude models. The first match
picked the switch, so effort could only be true or false.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ssion

SDK 1.4.0 parses every session/update against a closed union and drops
unknown kinds, so cursor-agent's subagent_spawned and subagent_state_update
never reached oar. A profile can now list vendor kinds; the incoming stream
carries them as session_info_update with the original in _meta, and the
recorder restores it in wire order. The cursor profile opts into subagents
and declares the nested attribution tier. Live run: one edge, parent to child.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds docs/runtimes/cursor.md from the 2026-09-29 live contract run
(cursor-agent 2026.09.28, 13/13) and lists Cursor in the runtime index,
the attribution matrix, the package README, and the experiments table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit f1b0b3b into main Sep 29, 2026
12 checks passed
@xxchan
xxchan deleted the runtime-cursor branch September 29, 2026 09:33
stamp-build Bot added a commit that referenced this pull request Nov 18, 2026
<!-- stamp:review:v1 -->
<sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_b4ddcaf85cca9a05833377dffa094ff3"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup>

---
<!-- /stamp:review:v1 -->

Lets one harbor run hold two installs of the same runtime and bounds an unattended run, for the OpenCode 1.x/2.x soak on Raft's AX42-1 (#oar-raft:#33).

- `--agent-env name:KEY=VALUE` (repeatable) sets environment for one agent: its installation probe and its sessions get it, nothing else does. Example: `OAR_OPENCODE_BIN` pointing two agents at `~/oar-harbor/opencode-1` and `opencode-2`, and separate `XDG_*` directories so their data stays inside the run. Agents without it still get no session `env` (cursor's in-process mode refuses one).
- `--for HOURS` stops the run at its deadline; `--max-disk-gb N` stops it when the run directory passes N GiB (checked every 5 minutes). Both are journaled as `limit` before the normal `down`.

Validation: typecheck and lint clean; harbor store tests 4/4 (new `--agent-env` parsing case). Local smoke: an agent with `--agent-env a:OAR_CLAUDE_BIN=...` opened with the env recorded in state.json, and `--for 0.006` journaled `limit: deadline` then `down` after 30 s.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Cindy <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 19, 2026
…lls (#993)

<!-- stamp:review:v1 -->
<sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg"
width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_139dd4b6ec5f150e2a5f53e0ba067695"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

Closes #976.

Requested by Cindy in `#inspection:#33`.

## Summary

- Define a single `workspaceBoundary(root)` `realpath` containment check
at the entry of `readAntigravityFileSkills`
(`packages/oar/src/runtimes/antigravity/skill-files.ts`) and pass that
`SkillBoundary` through workspace `scanSkills`, workspace `scanPlugins`,
and workspace `skillManifest`
(`packages/oar/src/runtimes/antigravity/skill-manifests.ts`), while
keeping global `~/.gemini/*` discovery unconstrained.
- Remove the duplicate manifest-only `realpath` / `relative` check from
`declaredPath`, so every workspace skill directory, `SKILL.md`, plugin
directory, `plugin.json`, manifest file, declared entry, and
`include_only` child goes through the same workspace containment gate
while preserving declared spelling on returned `SkillEntry.path` values.
- Update `docs/runtimes/antigravity.md` so the file-reader containment
description matches native `1.5.11` behavior.
- Add unit tests in
`tests/antigravity/antigravity-file-skills-boundary.test.ts` and extend
the native differential suite in
`sea-trial/vendor/support/antigravity-file-skills.ts` to cover all 6
workspace-escape paths (direct skill directory symlink, direct
`SKILL.md` symlink, plugin symlinks, manifest `include_only` relative
traversal, manifest child symlink, and non-git sibling symlink) plus
both positive controls (global `~/.gemini/skills` symlink and
intra-repository symlink).

## Validation

- `CI=1 pnpm run check` passed locally (`557` test files / `5,177`
tests, `19` mock behavior cases, `tsrs` typecheck, and `oxlint
--type-aware --deny-warnings`).
- `OAR_TEST=antigravity-file-skills OAR_ANTIGRAVITY_BIN=<agy-1.5.11> npx
vitest run sea-trial/vendor/antigravity-file-skills.vendor.test.ts`
passed against pinned `Antigravity 1.5.11` on Linux x64 in an isolated
`HOME` with synthetic local fixtures and zero credentials or model
calls.

Co-authored-by: Lookout <[email protected]>
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.

1 participant