Repository navigation
Releases: Dclef/dsh-cursor-dev
Release list
dsh-cursor-dev 0.12.4
0.12.4
子代理深度
maxChildDepth默认值从1改为2。Cursor 是叶节点——CLI 里没有 DSH 工具,它不可能再往下派,所以2就是实际上限,更大的值和2完全等价。旧的默认值1只是把「子智能体派 Cursor」这件事拒掉了。- 这个上限改为每次调用现读,不再在插件加载时缓存。否则会出现工具放行、镜像却拒绝记录的不一致。
- 面板新增「子代理深度」选择器:
0 · 禁止/1 · 仅顶层代理可用/2 · 顶层与子代理都可用(默认)。面板的选择优先于配置,改完下一次调用生效,不需要重载插件。 - 越界的值(例如手改成
9)不会被截断成2,而是当作「没设」回落到配置——面板不该宣称一个没人选过的上限。
Cursor 署名
- Cursor 会给子智能体做的 commit 追加
Co-authored-by: Cursor,并在它开的 PR 上署名。这些提交进的是别人的仓库。 - 这个开关没有 CLI 参数,也没有环境变量,只存在于 Cursor 自己的
cli-config.json的attribution块,所以插件替你写那个文件:- 只改
attributeCommitsToAgent/attributePRsToAgent两项,其余键原样保留; - 写入走临时文件 + 改名;
- 解析不了的文件绝不覆盖——那是 Cursor 该报的错,不该由插件掩盖。
- 只改
- 文件位置按 Cursor 自己的顺序解析:
CURSOR_CONFIG_DIR→XDG_CONFIG_HOME/cursor→~/.cursor。 - 面板三选:不加署名(默认) / 保留署名 / 跟随 Cursor 自己的配置(插件不写文件)。第三项是给「我自己在 Cursor 里管」的人留的退出口。
- 保存后立即写入,并在每次启动 CLI 前再确认一次——因为 CLI 只在进程启动时读一次配置,已经在跑的会话要等新会话才生效。
- 选择器下面那行「Cursor 当前:…」显示的是配置文件的实际状态,不是你的选择:用了「跟随」或写入失败时,两者会不一样。
- 团队管理员在服务端禁用署名(
attributionControls)时,本地怎么写都不会恢复署名。
面板
- 模型选择器和保存按钮挪到卡片最上面:先给选择,再解释。
- 代理输入框挪到它所解释的那条状态行下方——代理错是模型列表变短的最常见原因。
- 删掉「来源与出口」折叠,并入「模型目录、搜索与来源」。两件事其实是同一个问题:「我眼前这个列表是真的吗」。
升级
dsh plugin remove dsh-cursor-dev
dsh plugin add dsh-cursor-dev后台代码有更新,安装后需要重启 DSH 再刷新页面。
兼容性
- DSH
0.2.0-rc.1、0.2.0-rc.2、0.2.1-rc.1、0.2.1-rc.2或>=0.2.1 <0.3.0的稳定版本(已在0.2.1-rc.2上验证) - Node.js
^22.19.0 || >=24.0.0 - 需要已登录的 Cursor CLI
测试
- 离线套件:256 项,249 通过,0 失败,7 跳过(macOS Keychain 等环境相关用例在 Windows 上跳过)。
- 新增
test/attribution.test.mjs:覆盖配置查找顺序、两 key 写入、未知键保留、已一致时 no-op、损坏文件不动。测试把CURSOR_CONFIG_DIR指向临时目录——因为启动插件真的会写配置,测试不能动本机的 Cursor 配置。
dsh-cursor-dev 0.12.2
0.12.2
额度与用量
- 新增额度耗尽保护:在
cursor_code或原生子智能体(cursor_subagent)真正开始之前先读取 Cursor 用量,总、Auto、API 三个额度都到上限时直接拒绝调用并说明原因,不会再把任务派出去、跑到一半才失败。 - 只有三个额度同时到上限才算耗尽。官方说明文字(例如 “You've hit your usage limit”)在仍有剩余额度时也会出现,因此不再作为耗尽判据;
本期消费 / 额度的比值同样不可用,因为消费里包含赠送额度。 - 用量接口取不到(未登录、网络失败、返回非 JSON)时一律放行,不会因为读不到用量而挡住正常调用。
- 面板新增额度告警条;
/api/usage与面板 bootstrap 都带出防护状态。
子会话与面板
cursor_subagent现在也会生成一条可点击的对话子会话:面板里点运行中或已完成的行都能查看过程,不再提示「没有可恢复的会话」。/api/restore对还在运行或尚未落盘的一次生成返回409(conversation_running/conversation_pending),前端改为打开实时轨迹。- 面板顺序调整为额度四张卡片置顶,代理输入框移到模型选择上方,模型目录、代理与来源说明折叠收起;窄到 220px 也不会横向溢出。
升级
dsh plugin remove dsh-cursor-dev
dsh plugin add dsh-cursor-dev后台代码有更新,安装后需要重启 DSH 再刷新页面。
兼容性
- DSH
>=0.2.1-rc.2 <0.3.0-0(已在0.2.1-rc.2上验证) - Node.js
^22.19.0 || >=24.0.0 - 需要已登录的 Cursor CLI;macOS Keychain 路径仍未在真机验证
测试
- 离线套件:246 项,239 通过,0 失败,7 跳过(macOS Keychain 用例在 Windows 上跳过)。
- 三个会真实消耗 Cursor 额度的集成用例(真实编辑、非法模型、真实账号用量)未在本轮执行,避免消耗额度。
v0.12.1 - macOS Keychain and proxy fixes
中文
- 新增 macOS Keychain 登录凭据读取(PR #1),支持 CURSOR_AUTH_TOKEN 覆盖及文件存储回退。
- 修复 CLI 子进程代理默认值:未配置时为 none(直连),主动留空时使用系统代理,填写 URL 时使用显式代理。
- 修复直连仍继承 HTTP_PROXY、HTTPS_PROXY、ALL_PROXY 及小写变量的问题。
- 已保存的空值仍保持系统代理语义;面板仍使用原来的输入框,本次没有 UI 改版。
升级与验证
- 升级后台代码后重启 DSH,再刷新面板;需要系统代理时主动清空代理输入框并保存。
- Node 24.22.0 发布检查:217 项通过、7 项因 Windows 环境跳过、0 项失败;另排除三个真实 CLI/账号测试,没有派发真实编码任务。
- macOS Keychain 尚未在真实 Mac 上验证,不能将 Windows 上跳过的用例视为验证通过。
- npm 公共源已发布 dsh-cursor-dev@0.12.1,latest 已同步;npm 包与 GitHub 安装包的校验值一致。
English
Adds macOS Keychain credential lookup and fixes child CLI proxy handling. The default is none (direct); an explicitly empty value uses the system proxy; a URL selects an explicit proxy. Direct connections no longer inherit proxy address variables. Existing empty settings keep their meaning; there is no UI redesign.
Restart DSH after upgrading. Verification on Windows: 217 passed, 7 skipped, 0 failed; three live CLI/account tests were excluded. The Keychain path has not been verified on a real Mac. dsh-cursor-dev@0.12.1 is published on the public npm registry and the latest tag points to 0.12.1. Its tarball checksum matches the attached GitHub asset.
v0.12.0 — 历史会话可折叠可删除 / Foldable, deletable history
中文
0.12.0 重做面板的历史会话卡:长列表不再撑长页面,每一行都可以单独删掉。
- 限高滚动 + 折叠:历史会话一条一次运行、只增不减,所以列表收进最高 300px 的滚动框,表头
sticky固定;标题变成折叠开关(▾/▸),折叠状态记在浏览器localStorage,刷新和切换语言都保持。标题旁新增行数徽标。 - 每行可删除:新增「操作」列,里面是红色删除。因为不可逆,做成两段式——第一次点击只把该行变成「确认删除」并在表下提示后果,再点一次才执行;中间轮询刷新不会冲掉挂起的确认。
- 新路由
POST /plugins/dsh-cursor-dev/api/forget?key=:按resetSession的同一条链路清理,先pool.dropConversation停掉活着的代际,再清 journal(新增journal.clearConversation按parent::label#N前缀扫,原来的clear只能精确命中一个键),然后删索引里的持久行,最后关掉镜像子会话。少撤任何一步,这一行都会在下一次轮询里复活。对已经删掉的行再点一次返回ok+existed: false,不会变成 404。 - 安装源:npm 公共源上当前仍是
0.11.1(0.12.0未发布),要用折叠/删除请装 Git 来源git+https://github.com/Dclef/dsh-cursor-dev.git。 - 验证:
npm test216 项全绿(离线 213 项,三个真实账号测试自带 skip);新增测试覆盖折叠结构、限高、删除列、两段式交互,以及/api/forget的 405/400/200 与幂等语义。
English
0.12.0 reworks the panel's history card: a long list no longer stretches the page, and each row can be deleted on its own.
- Capped scroll box + fold: the history table keeps one row per run forever, so it now scrolls inside a 300px box with a sticky header, and its heading is the fold control (▾/▸). The fold choice is stored in browser
localStorageand survives reloads and language switches. A row-count pill sits next to the heading. - Per-row delete: a new actions column carries a red Delete. It is irreversible, so it takes two clicks — the first only arms the row (label becomes "Confirm delete" and a note under the table states the consequences), the second fires; a poll repaint in between does not lose the pending confirmation.
- New route
POST /plugins/dsh-cursor-dev/api/forget?key=: it clears the run along the same chain asresetSession— evict the pool's live generations first, then the journal (newjournal.clearConversationsweeps theparent::label#Nprefix, which the exact-keyclearcannot), then the durable index row, then the mirrored child. Leaving any one of those behind brings the row back on the next poll. Clicking delete on an already-gone row answersokwithexisted: falserather than a 404. - Install source: the public npm registry still serves
0.11.1(0.12.0is not published), so use the Git sourcegit+https://github.com/Dclef/dsh-cursor-dev.gitfor this work. - Verification:
npm testis 216 passing (213 offline; the three real-account tests skip themselves). New tests cover the fold/height markup, the delete column, the two-click interaction, and the 405/400/200 and idempotent semantics of/api/forget.
v0.11.1 — 收紧 DSH 版本范围 / Narrow the DSH range
中文
0.11.1 收紧 DSH 版本声明,并修正文档里对两种运行形态的描述。
engines.dsh:^0.2.0-rc.1→>=0.2.1-rc.2 <0.3.0-0。0.11 采用的外部子智能体契约(startActivation、子会话 id 必须未被宿主占用、External 行由宿主写入)只在 DSH 0.2.1 中存在,声明现在只覆盖实际实现并验证过的范围。- 为什么上界是
<0.3.0-0:DSH 以includePrerelease: true判定兼容性,普通的<0.3.0仍会匹配0.3.0-rc.1;-0让0.3.0的所有预发布一起被排除。 - 安装源:npm 公共源上的
dsh-cursor-dev@0.11.1,或 Git 来源git+https://github.com/Dclef/dsh-cursor-dev.git。 - 文档:README / INSTALL 与包描述现在明确区分
cursor_code(创建可点开的镜像子会话)与cursor_subagent(显示为宿主写入的 External 记录)。 - 市场卡片:dshmarket 从 npm manifest 读取版本与
engines.dsh;awesome 目录下一次 nightly 探测后,卡片会显示0.11.1与DSH >=0.2.1-rc.2 <0.3.0-0。
English
0.11.1 narrows the declared DSH range and fixes the docs describing the two run shapes.
engines.dsh:^0.2.0-rc.1→>=0.2.1-rc.2 <0.3.0-0. The external-subagent contract used by 0.11 (startActivation, a child id the host has not registered yet, theExternalrow written by the host) only exists in DSH 0.2.1, so the declaration now covers exactly the range this code implements and tests.- Why the upper bound is
<0.3.0-0: DSH evaluates compatibility withincludePrerelease: true, so a plain<0.3.0still matches0.3.0-rc.1;-0excludes every0.3.0prerelease as well. - Install sources:
dsh-cursor-dev@0.11.1from the public npm registry, or the Git sourcegit+https://github.com/Dclef/dsh-cursor-dev.git. - Docs: README / INSTALL and the package description now spell out
cursor_code(creates the clickable mirrored child) versuscursor_subagent(appears as the host-writtenExternalrow). - Market card: dshmarket reads the version and
engines.dshfrom the npm manifest; after the awesome catalog's next nightly probe the card shows0.11.1andDSH >=0.2.1-rc.2 <0.3.0-0.
v0.11.0 — 适配 DSH 0.2.1 / DSH 0.2.1 compatibility
适配 DSH 0.2.1 的外部子智能体契约
DSH 0.2.1 把原生子智能体的创建收拢到 subagents 服务的 startActivation,并且只把外部 provider 的子代理建模成非交互的 External 行。旧版直接用 runtime.start,在 0.2.1 上会直接失效。
本版变化(0.11.0)
- 跟随新契约:provider 由宿主服务启动,返回一个宿主尚未注册的子会话 id;External 目录行由宿主写入,运行结果、取消和后台机制不变
- 镜像留在
cursor_code:可点击的镜像子会话由cursor_code直接启动 provider 创建,cursor_subagent不再重复写一行目录,避免宿主报DUPLICATE_CHILD - 递归上限仍在插件里:宿主现在把深度预算完全交给 provider(
maxDepth: provider-managed),maxChildDepth于是在创建任何进程、子会话之前由插件执行 - 尊重宿主传入的 cwd:
startActivation解析好的工作区优先于插件自己的推断 - 版本声明:包顶层
engines.dsh: ^0.2.0-rc.1(已在0.2.1-rc.2上验证),并删除 DSH 0.2.1 已移除的工具配置项(backgroundMode、enableRunInBackground) - 插件市场:目录条目已于 2026-10-17 合并,可以直接在 dshmarket 里搜索安装
- npm 公共源:
0.11.0已发布为dsh-cursor-dev,按包名安装不再返回 404;目录下一次探测后,市场卡片会显示版本与DSH ^0.2.0-rc.1宿主要求
安装
# 插件市场(条目解析为 github:Dclef/dsh-cursor-dev)
# 或按包名从 npm 公共源安装(0.11.0 起)
dsh plugin add dsh-cursor-dev
# 或从 Git 来源跟进最新改动
dsh plugin add git+https://github.com/Dclef/dsh-cursor-dev.git
# 或使用本 Release 附带的固定快照
dsh plugin add "D:/Downloads/dsh-cursor-dev-0.11.0.tgz"安装或升级后完整重启一次 DSH 再刷新页面。要求 DSH ^0.2.0-rc.1(建议 0.2.1-rc.2)、Node.js ^22.19.0 || >=24.0.0、已登录的 Cursor CLI。详见 安装指南。
DSH 0.2.1 external subagent compatibility
DSH 0.2.1 moved native child creation into the subagents service's startActivation and models external providers as a non-interactive External row. The old runtime.start call no longer exists, so the previous release would fail outright.
New in 0.11.0
- Follows the new contract: the host service starts the provider and receives a child id it has not registered yet; the host writes the
Externalcatalog row, while results, cancellation and background runs behave as before - The mirror belongs to
cursor_code: the clickable mirrored child is created bycursor_code, which starts the provider directly;cursor_subagentno longer writes a second row, which the host rejects withDUPLICATE_CHILD - The recursion cap stays in the plugin: the host now hands the whole depth budget to the provider (
maxDepth: provider-managed), somaxChildDepthis enforced before any process or child session exists - Honours the request cwd: the workspace resolved by
startActivationwins over the plugin's own guess - Declarations: top-level
engines.dsh: ^0.2.0-rc.1(verified against0.2.1-rc.2), and the tool-config keys removed in DSH 0.2.1 (backgroundMode,enableRunInBackground) are gone - Market: the dshmarket catalog entry was merged on 2026-10-17, so the plugin can be installed from the market
- npm:
0.11.0is published to the public npm registry asdsh-cursor-dev, so bare-name installs work and the market card shows the version and theDSH ^0.2.0-rc.1host requirement after the catalog's next probe
Install
dsh plugin add dsh-cursor-dev
dsh plugin add git+https://github.com/Dclef/dsh-cursor-dev.git
dsh plugin add "D:/Downloads/dsh-cursor-dev-0.11.0.tgz"Restart DSH completely after installing or upgrading, then refresh the page. Requires DSH ^0.2.0-rc.1 (0.2.1-rc.2 recommended), Node.js ^22.19.0 || >=24.0.0, and an authenticated Cursor CLI. See the install guide.
Verify: 210 offline tests pass on the released tree (213 with the three live CLI/account tests).
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.