DeepSeek Harness Plugin

qyjqio/dsh-cursor-toolkit#cursor-cli

Stars ★ 0 Category Tools & Capabilities Added 2026-10-22

Run the local Cursor CLI agent on a coding task in a workspace and continue the run by chat id.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:qyjqio/dsh-cursor-toolkit#path:/packages/dsh-cursor-cli

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

DSH host plugin that adds the cursor_agent tool: run the Cursor CLI (cursor-agent) headlessly on a task in a workspace, straight from any DSH agent session.

Cursor runs its own agent loop (reads/edits files, calls tools) and the tool returns its final message plus the Cursor chat id, so a run can be continued later with resume.

Install

# from a DSH session with the plugin manager available — git source, pinned by the market index
plugin_manager install_bundle target="git+https://github.com/qyjqio/dsh-cursor-toolkit.git#<commit>&path:/packages/dsh-cursor-cli"
# or plain pnpm, inside a DSH profile directory
pnpm add "git+https://github.com/qyjqio/dsh-cursor-toolkit.git#<commit>&path:/packages/dsh-cursor-cli"

Then enable the bundle (include:cursor-cli) in Settings → Plugins, or add @qyjqio/dsh-cursor-cli to the profile's dsh.profile.bundles.

Requirements

  • Cursor CLI installed and logged in: cursor-agent --version, cursor-agent login.
  • The executable is resolved from, in order: PATH, ~/.local/bin, /usr/local/bin, /usr/bin (override with the executable config field).
  • Headless runs need the workspace trusted, so the tool always passes --trust.

Parameters

name type meaning
prompt string (required) Task for Cursor; be explicit about goal and done criteria
cwd string Workspace dir; defaults to the session working directory, accepts ~
mode agent | plan | ask agent edits/runs tools; plan/ask are read-only
model string Cursor model id (e.g. auto, composer-2.5); default = CLI default
force boolean Pass --force (auto-approve tool calls). Default true; ignored for read-only modes
resume string Cursor chat id returned by a previous run
continueSession boolean Continue the most recent chat in the workspace
timeoutSeconds integer 1..3600 Run budget; default 900

Result

{ ok, result, cwd, mode, truncated, timedOut, aborted,
  sessionId?, model?, durationMs?, exitCode?, stderr? }

ok is false when the process exits non-zero, Cursor reports is_error, or the run times out / is aborted. The rendered card shows the final message plus a footer with session id, model, mode, duration and cwd.

Config

Optional bundle config (all values are defaults in code when omitted):

key default meaning
executable auto-detected Path to cursor-agent
allowForce true Whether force may be passed at all
model CLI default Default model when the call omits one
maxOutputChars 60000 Result truncation limit
timeoutMs 900000 Default timeout

Examples

  • cursor_agent({ prompt: "Fix the failing test in tests/auth.spec.ts" })
  • cursor_agent({ prompt: "Review src/api for error handling gaps", mode: "plan" })
  • cursor_agent({ prompt: "Now apply the plan", resume: "<sessionId>" })

Notes

  • Tools run with the host process environment, so CURSOR_API_KEY is honored.
  • Timeout: the tool kills the CLI with SIGTERM, then SIGKILL after 3 s.
  • cwd is validated before spawning; a missing directory fails fast instead of letting Cursor create one.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.