Skip to content

feat: add the Cursor CLI ACP start and send driver - #11699

Open
lsm wants to merge 7 commits into
devfrom
feat/cursor-cli-start-send
Open

lsm wants to merge 7 commits into
devfrom
feat/cursor-cli-start-send

Conversation

@lsm

@lsm lsm commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Closes #11696

What

Build rung: the driver and its tests, exported but not yet called. A follow-up Wire PR registers it on the cursor-cli adapter in cursor-discovery.ts and drivers.ts (about 20 lines) after this merges.

createCursorStart provides start, send, status and stop for cursor-cli over cursor-agent acp (ACP v1). Before, Cursor CLI and Cursor Desktop only had find, so HyperNeo could not start a Cursor worker or message it.

  • New packages/daemon/src/lib/drivers/cursor-start.ts, modeled on antigravity-start.ts: session/new → session/prompt; send resumes owned sessions with session/load (reply collection starts after load, so replayed history is ignored); stop sends session/cancel.
  • send only accepts sessions HyperNeo started (work_started_sessions via startedFolders), same as Antigravity.
  • Tool permission requests go through the shared replyCommandPermission from fix: let Antigravity workers run the hyperneo send reply command #11698: only a hyperneo send … command is allowed once. Cursor's permission request carries no command, so the driver records rawInput.command from the preceding tool_call update by toolCallId. Everything else is cancelled.
  • Auth failures tell the user to run cursor-agent login.

Size

cursor-start.ts is about 440 production lines, over the ~300 guide. It is one ACP session lifecycle: start, send (load), status and stop share the same transport, turn map and finish path, so a smaller slice would ship a session that cannot be resumed or stopped. The sibling antigravity-start.ts is 563 lines.

Verified facts (cursor-agent 2026.11.22)

Real-machine evidence

Run with the wiring from the follow-up PR applied:
Isolated daemon (own DB and HYPERNEO_DATA_DIR, HYPERNEO_SESSION_DOOR pointing at it, real HOME), this branch merged locally with feat/hyperneo-send-reply-line @ cfeab11:

  • work.adapters → cursor-cli: ['find', 'start', 'status', 'send', 'stop']
  • work.start cursor-cli → ok, ref cursor-cli:88ec9b47-…, running
  • work.send asked the worker to run three commands: hyperneo send <caller> --from cursor-cli:88ec9b47-… --kind done FROM-PONG-…, hyperneo send <caller> --kind done ENV-PONG-… (sender from CURSOR_CONVERSATION_ID), and touch denied.txt.
  • Both replies reached the caller session from cursor-cli:88ec9b47-… within ~40 s; denied.txt was not created.

Tests

packages/daemon/tests/unit/1-core/drivers/cursor-start.test.ts (start + reply, load ignores replay, refuses unowned, sign-in detail, stop cancels; permission: reads the Cursor request shape — allows hyperneo send, cancels other commands, non-shell tool calls, unannounced tool calls and requests without allow-once. Injection cases live in reply-command-permission.test.ts). bun run check passes.

{"version":1,"head":"21b8526df26def575f7ebe90f2169eb14d936777","base":"af40561564d27af9010b1bce02decca287ad2c09","read":["impact"]}

🤖 Generated with Claude Code

Closes #11696

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hyperneo-ai-test

hyperneo-ai-test Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Review status

# engine commit started (UTC) dur P0/P1/P2 verdict
1 claude-code (glm-5.3) 9090135 11-25 05:15 1m9s —/—/— superseded
2 claude-code (glm-5.3) 5032896 11-25 05:16 5m24s —/—/— superseded
3 claude-code (glm-5.3) 9a71b05 11-25 05:21 3m42s —/—/— superseded
4 claude-code (glm-5.3) 5bffdce 11-25 05:25 20m51s 0/1/0 changes
5 claude-code (glm-5.3) 21b8526 11-25 06:47 8m26s —/—/— failed
SUM 39m32s 0/1/0 failed

lsm and others added 2 commits November 25, 2026 00:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lsm lsm changed the title feat: start and send Cursor CLI work over ACP feat: add the Cursor CLI ACP start and send driver Nov 25, 2026

@hyperneo-ai-test hyperneo-ai-test 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.

Requires changes.

Engine claude-code (glm-5.3) · Reviewed commit 5bffdce · Trigger: open+push
Prompt arm: fable-1

⚠️ Pre-existing — not introduced by this PR
Anchored outside the PR's changes — usually pre-existing; blocking severities here still gate, and defect provenance is the reviewer's judgment, not a verified claim.

  • packages/cli/src/session-cli.ts:32 — P2 — Pre-existing CLI lacks sender support the allow-rule assumes

: reject('not_delivered', 'Cursor CLI did not confirm the session.', true);
}

export function createCursorStart(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 · Cursor start/send never wired into production (confidence 0.95)

The PR body states drivers.ts "builds the Cursor adapter with the owned-folder reader and registers its close", but the diff (2 files, +661) contains no drivers.ts change, and a repo-wide search finds createCursorStart imported only by the new test — no production consumer. At head, family-operations/drivers.ts:726 still builds cursor-cli from createCursorDiscovery with capabilities ['find'], and no cursor counterpart of antigravity-adapter.ts composes a WorkAdapter. work.start/send/status/stop stay unavailable, so #11696 would close unfixed; the real-machine evidence came from a local merge with feat/hyperneo-send-reply-line. Add the drivers.ts registration and adapter composition to this PR. By inspection, unexecuted.

@hyperneo-ai-test

Copy link
Copy Markdown

⚠️ hyperneo-review could not complete this review: other. (run 19222)

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: start and send Cursor CLI work over ACP

1 participant