Repository navigation
v0.9.1 — 父级专属递归限制 / parent-only recursion cap
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抛同类错误。因为cursorprovider 声明depthLimit: false,宿主的tool-subagent无法用数值型maxDepth约束它,所以这道限制由插件自己执行。设为0可完全禁止,设为2+允许更深嵌套;面板里查看历史镜像记录不受影响。
0.9.0 以来的能力
- 原生子智能体接入:注册为
subagentsprovider,宿主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
maxChildDepthconfig (default1). Only a top-level agent at depth0may start a Cursor child session; a subagent at depth1is refused before any process, child session or reset is created —cursor_codereturnssessionKey: "depth-refused"and the nativecursor_subagentroute raises the same error. Thecursorprovider declaresdepthLimit: false, so the host'stool-subagentcannot cap it with a numericmaxDepth; the plugin enforces the budget itself. Set0to 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
subagentsprovider, so the host'ssubagenttool dispatches directly;cursor_codeuses the same native path - Per-job model choice:
cursor_codetakes amodelargument; the panel chooses between a locked model and per-call selection - Continuity:
continueSessioncontinues the previous session, and sessions are re-attached withsession/loadafter 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.