Repository navigation
feat(cli): 新增 cursor-cli 适配器 - #16
Merged
Merged
Conversation
src/adapters/cli/cursor.ts 实现 CliAdapter,默认带 --force 跳过审批 (同 codex/claude-code 的"放手干"模式)。Resume 优先 --resume <id>, 没有 id 时降级 --continue 接续最近一次会话。writeInput v1 走 sendText + 200ms + Enter 的 aiden 风格,不做 transcript 校验 (cursor 的 JSONL 路径文档未公开,等本地实测后另一版补)。 skillsDir 指向 ~/.cursor/skills (cursor 用同款 SKILL.md + frontmatter 格式),让 botmux-send / history / quoted / bots / schedule 自动落地到 cursor。altScreen 先按 TUI 默认走 true, readyPattern 暂留空,跑通后再按现象微调。 按 CLAUDE.md 检查清单同步: - types.ts CliId 加 'cursor' - registry.ts import / switch / export - worker.ts CLI_DISPLAY_NAMES - card-builder.ts cliDisplayNames - cli.ts setup 菜单(cursor 排第 5) - dashboard/web/sessions.ts 下拉 - README.md / README.en.md CLI 列表 + cliId options + prerequisite binary 后续 v2 待办: 实测 cursor transcript 路径补 submit 验证; session-discovery CLI_COMM_MAP 加 cursor-agent 接入 adopt。 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
deepcoldy
approved these changes
May 18, 2026
deepcoldy
left a comment
Owner
There was a problem hiding this comment.
LGTM。已重点看 Cursor adapter 的 buildArgs/resume/writeInput、registry/type 接入、卡片显示和 setup/docs 同步,并在本地跑过 build 与相关单测。感谢 @chengcyber 补上 Cursor CLI 适配器和文档同步。
sensuossss
added a commit
that referenced
this pull request
Jun 24, 2026
按多 agent review 逐条修(合入 master 前): High - #1 runtime: revisit 后 D#001/D#002 同 node.id 并发,inFlight/nodeControllers/ nodeAbortCleanups 改按 dispatchKey(instance) 存取 + 守卫删除;cancel 按 instance abort。原先无守卫 inFlight.delete(node.id) 会删掉活着的新实例 → 整 run 误崩。 - #2 host: architect 手搓 BotSnapshot 漏 disableCliBypass → 受限 bot 在 architect 步骤悄悄提权。改用权威 botToSnapshot()。 - #3 architect: 复用 attempts/001 不清旧 manifest,watcher 见旧 manifest 直接 finish('ok') → revise-dag 后修订不生效。dispatch 前 rmSync(attemptDir)。 - #4 test: 加 runWorkflow 集成测试,断言 restricted override 真的写进 worker 的 req.botSnapshot.disableCliBypass(降权红线看门)。 Medium - #5/#12 daemon-run: driveV3Run 顶部记 wasAlreadyTerminal,已终态短路,避免 coalesce 重驱 / "/start" 重试重发 gate 卡与 done/failed 消息。 - #6 security: gate handler 的 waitId 未校验就 path-join → 加 isValidWaitId (含 # 给 A#001-gate 形态) 拦 ../ 逃逸。 - #7 dashboard: catalog 前缀路由用 startsWith 误吞 runId 以 catalog 开头的 v3 run 详情页 → 改带边界正则。(本就是合并时我引入的) - #8 daemon: 线程内 "/workflow new" grill fall-through 时 cmdContent 仍是字面量, 被待回答 ask 拦截器当答案吞掉 → ask 拦截加 !threadGrill。 - #9 test: 补 manifest 软链逃逸(symlink→外部)的拒绝用例,防 realpath 被简化成 resolve。 Nit - #16 v3-blocked handler: String(formValue) 把 object/array 强转成非空垃圾过校验 → 改 typeof==='string'。 - #17 v3.ts: 抽 isTerminalRunStatus(),统一 poll/loop 的终态停轮判定(消死代码)。 校验:pnpm build 通过;v3/daemon/dashboard 相关单测全绿(含新增 2 条)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan