Repository navigation
feat(run,launch): add Cursor through cursor-agent, built-in fable@cursor - #74
Draft
runewright[bot] wants to merge 1 commit into
Draft
runewright[bot] wants to merge 1 commit into
runewright[bot] wants to merge 1 commit into
Conversation
Add Surface::Cursor and src/cli/surface/cursor.rs. rune run cursor starts cursor-agent -p --output-format json --workspace <repo> --trust, sends the prompt on stdin with the system prompt in front, and reads the one result object: result is the text, usage.outputTokens the completion tokens, is_error fails with the message or the subtype. Read-only adds --mode ask, workspace-write adds --force --sandbox enabled. A profile keeps only -e and --endpoint. cursor-agent accepts options its help does not list (--data-dir, --allowed-tools) and reads a positional as a subcommand or the prompt, so every other argument is dropped with a warning that names the flag and never the value. --api-key is dropped too; the key belongs in the profile env as CURSOR_API_KEY. A read-only run refuses when the cli-config.json the tool reads (CURSOR_CONFIG_DIR, $XDG_CONFIG_HOME/cursor, ~/.cursor) sets approvalMode unrestricted, as defense in depth behind ask mode. --clean needs a nonempty CURSOR_API_KEY in the child's environment, profile env included, because the browser login lives in the Keychain; HOME and CURSOR_CONFIG_DIR move into the clean root. A failure that shows the Keychain signature of a sandboxed process gets a hint to run rune outside the harness sandbox. rune launch cursor starts cursor-agent unless tools.cursor.binary says otherwise, because cursor on a Mac opens the editor. A Cursor launch passes the profile route as --model, and rune run strips that generated pair. BUILT_IN_PROFILES gives fable@cursor without config through the built-in route fable-cursor (claude-fable-5-1-high); the built-in routes move into one BUILT_IN_ROUTES table. A configured profile or route of the same name replaces the built-in one. Change cursor-agent-surface: proposal, design, ADR, two ADDED deltas, tasks, pull-request. Proof under docs/proofs/cursor-agent-surface with one scene per scenario. 34 new tests. Reviewed by Fable, astra, and grok; each finding fixed or rejected in tasks.md. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
|
review/correctness stood down on |
|
review/correctness stood down on |
|
review/correctness stood down on |
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.
rune runandrune launchget Cursor through its officialcursor-agentCLI, andfable@cursorworks without config.Plan
Change
cursor-agent-surface: proposal, design, two ADDED deltas (harness-run-command,harness-launch-command), tasks, andadr.mdunderdocs/changes/cursor-agent-surface/. Proof underdocs/proofs/cursor-agent-surface/. Reviewed by Fable, astra, and grok before the push. Their fixes are in, one rejected intasks.md.Changes
Surface::Cursorinsrc/cli/surface/cursor.rs. A surface is one coding tool thatrune runcan start. The run iscursor-agent -p --output-format json --workspace <repo> --trust, prompt on stdin with the system prompt in front. Read-only adds--mode ask, workspace-write--force --sandbox enabled.resultis the text,usage.outputTokensthe completion tokens,is_errorfails the run.-eand--endpointfrom a Cursor profile.cursor-agentaccepts flags its help does not list and reads a positional as a subcommand or the prompt, so everything else is dropped with a warning that never shows the value.CURSOR_API_KEYgoes in the profileenv.cli-config.jsonthe tool reads setsapprovalMode: unrestricted, as defense in depth behind ask mode.--cleanneedsCURSOR_API_KEY(the browser login lives in the Keychain) and movesHOMEandCURSOR_CONFIG_DIRinto the clean root. A sandboxed Keychain failure gets a hint to run rune outside the sandbox.rune launch cursorstartscursor-agentunlesstools.cursor.binarysays otherwise, and passes the profile route as--model.fable@cursorprofile andfable-cursorroute (claude-fable-5-1-high).BUILT_IN_ROUTESholds every built-in route. Config of the same name wins.Testing
cargo test, clippy, fmt,rune spec validate,rune docs checkclean. 34 new tests.docs/proofs/cursor-agent-surface/proof.{cast,gif,txt}, one scene per scenario against a fakecursor-agent.fable@cursorreturnedpong. A read-only run asked for a file wrote nothing, underauto-reviewand a copiedunrestrictedconfig. Workspace-write created it.Release Notes
rune run cursorandrune launch cursorstart Cursor'scursor-agent.fable@cursorselects Claude Fable 5.1 on Cursor without config. Cursor labels its Fable models "NO ZDR". Run rune outside the harness sandbox.