Skip to content

v0.9.1 — 父级专属递归限制 / parent-only recursion cap

Choose a tag to compare

@Dclef Dclef released this 14 Oct 11:48
· 21 commits to main since this release

Cursor CLI 作为 DSH 子智能体

把 Cursor CLI 接入 DSH:既是 cursor_code 工具,也是原生 subagents provider。

本版新增(0.9.1)

  • 父级专属递归限制:新增 maxChildDepth(默认 1)。只有深度为 0 的顶层智能体能启动 Cursor 子会话;深度为 1 的子智能体再调用会被在创建任何进程或子会话之前拒绝,cursor_code 返回 sessionKey: "depth-refused",原生 cursor_subagent 抛同类错误。因为 cursor provider 声明 depthLimit: false,宿主的 tool-subagent 无法用数值型 maxDepth 约束它,所以这道限制由插件自己执行。设为 0 可完全禁止,设为 2+ 允许更深嵌套;面板里查看历史镜像记录不受影响。

0.9.0 以来的能力

  • 原生子智能体接入:注册为 subagents provider,宿主 subagent 工具可直接派发,cursor_code 也走同一条原生路径
  • 按任务选模型:cursor_code 接受 model 参数;面板可选择「锁定模型」或「每次调用各自指定」
  • 会话续聊:continueSession 续接上一轮,DSH 重启后用 session/load 重新挂载同一个 Cursor 会话
  • 可见性:返回逐步工具时间线(类型/路径/状态)、推理过程和真实文件 diff;shell 造成、不经 ACP 流的变化由独立的文件系统指纹捕获
  • 额度面板:Cursor 没有配额命令,插件直接调 dashboard RPC,在 /plugins/dsh-cursor-dev/ 提供自包含 HTML 面板和 JSON

安装

# 从 Git 来源(跟进最新改动)
dsh plugin add git+https://github.com/Dclef/dsh-cursor-dev.git

# 或使用本 Release 附带的固定快照
dsh plugin add "D:/Downloads/dsh-cursor-dev-0.9.1.tgz"

要求:DSH >=0.2.0-rc.1,Node.js ^22.19.0 || >=24.0.0,已登录的 Cursor CLI。详见 安装指南。


English

The Cursor CLI as a DSH child coding agent — both a cursor_code tool and a native subagents provider.

New in 0.9.1

  • Parent-only recursion cap: new maxChildDepth config (default 1). Only a top-level agent at depth 0 may start a Cursor child session; a subagent at depth 1 is refused before any process, child session or reset is created — cursor_code returns sessionKey: "depth-refused" and the native cursor_subagent route raises the same error. The cursor provider declares depthLimit: false, so the host's tool-subagent cannot cap it with a numeric maxDepth; the plugin enforces the budget itself. Set 0 to forbid Cursor children entirely, 2+ to allow deeper nesting. Viewing mirrored history in the panel is unaffected.

Carried over from 0.9.0

  • Native dispatch: registered as a subagents provider, so the host's subagent tool dispatches directly; cursor_code uses the same native path
  • Per-job model choice: cursor_code takes a model argument; the panel chooses between a locked model and per-call selection
  • Continuity: continueSession continues the previous session, and sessions are re-attached with session/load after a DSH restart
  • Visibility: step timeline (tool calls with kind, path, status), reasoning, and real file diffs; shell-driven changes that never appear on the ACP stream are caught by an independent filesystem fingerprint
  • Usage panel: Cursor exposes no quota command, so the plugin calls the dashboard RPC and serves a self-contained HTML dashboard plus JSON at /plugins/dsh-cursor-dev/

Install

dsh plugin add git+https://github.com/Dclef/dsh-cursor-dev.git
dsh plugin add "D:/Downloads/dsh-cursor-dev-0.9.1.tgz"

Requires DSH >=0.2.0-rc.1, Node.js ^22.19.0 || >=24.0.0, and an authenticated Cursor CLI. See the install guide.

Verify: 185 offline tests pass on the released tree.