fix(cli): plugin update skips Cursor silently and leaves renamed hook scripts behind
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 53/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start with plugin-update-use-case.ts, plugin-add-use-case.ts, and install-ai-tool-use-case.ts; trace how updates select installed tools and how replace handles previously tracked files. Add tests for a renamed hook through plugin update, replacement, and Cursor setup, checking that edited files are preserved. Done means updates report or reach Cursor, obsolete unchanged files are removed on replacement, and the tests pass.
由索引模型根据 Issue 内容生成。
描述
Description
After the plugin renames a hook script (here hooks/aidd-context/update_memory.js → memory.cjs), updating does not reach every installed tool, and nothing says so.
- Cursor is skipped by
aidd plugin update. Cursor plugins are recorded with scopeuser;PluginUpdateUseCase.updatePluginsForToolfilters them out when no plugin name is given. The command prints "Updated" for the other tools only. The project's.cursor/hooks.jsonkeeps calling the old script untilaidd setupruns again. Naming the plugin fails:Tool 'cursor' does not support scope 'project'. - opencode and Kilo keep orphan files on a reinstall.
aidd setup/ a reinstall goes throughreplace: true(install-ai-tool-use-case.ts:128);dropExistingPlugin(plugin-add-use-case.ts) drops the manifest record but never deletes the previously tracked files the new version no longer ships. They are inert (the bridge spawns only current hooks) but stay on disk, untracked, socleanmisses them.plugin updateitself removes them throughdeleteOldFiles. - No test covers a renamed hook script through
plugin update, throughreplace, or through Cursorsetupagain.
Affected file(s)
cli/src/contexts/framework/application/plugin/plugin-update-use-case.ts, cli/src/contexts/framework/application/plugin/plugin-add-use-case.ts, cli/src/contexts/framework/application/install/install-ai-tool-use-case.ts
Expected behaviour
- An update reaches every installed tool, or names the tool it skipped and the command that updates it.
- A replaced install removes the files the new version no longer ships, hash-checked like
removeObsoleteScripts, so a user-edited file is kept.
Observed behaviour
Measured with the CLI built from a scratch copy: install from origin/next, bump aidd-context, marketplace refresh then plugin update, and separately setup again.
- Cursor: stays on the old version;
.cursor/hooks.jsonstill runsupdate_memory.json everysessionStart. - opencode / Kilo after
setupagain:.opencode/hooks/aidd-context/update_memory.jsand the.kilocopy remain besidememory.cjs. - No case of two memory writers running at once was found.
AI tool
Cursor, OpenCode, Kilo
Additional context
Smallest fixes:
- Cursor: warn after
plugin updatethat Cursor needsplugin update --scope userthenaidd setup, or drive that sequence from the default update. - opencode / Kilo: capture the previous record's
plugin.filesinprepareForInstall(next toprevHooksMap) and delete those absent from the new set onreplace, with the same hash check asremoveObsoleteScripts. - Tests: a rename (
update_memory.js→memory.cjs) throughplugin update, throughreplace, and through Cursorsetupagain.
Unverified: Codex and Copilot host loading (host registration failed in the sandbox); Cursor projects installed before hook provenance records.
- 主要语言
- TypeScript
- 星标
- 481
- 派生
- 45
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 91
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ai-driven-dev/framework 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
ai-driven-dev/framework#1311 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
ai-driven-dev/framework#1244 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ai-driven-dev/framework#1197 ·
维护者通常 1 天内回复
-
refactor(aidd-context): apply the new skill template to learn可能已有人在做 @blafourcade 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
ai-driven-dev/framework#1186 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
ai-driven-dev/framework#1163 · 1 条评论 ·
维护者通常 1 天内回复
查看 ai-driven-dev/framework 的全部 Issue
相似的 Issue
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keys可能已有人在做 @pcbeingused333 今天认领。 未关闭Bug db: d1-sqlite Payload OSS
难度 2/5 1-3 小时 新手友好度 76/100
payloadcms/payload#19766 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
device-management-toolkit/sample-web-ui#3711 ·
维护者通常 1 天内回复
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
难度 2/5 1-3 小时 新手友好度 72/100
elastic/kibana#306401 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
agentes-chat/agentes-chat#927 ·
维护者通常 1 天内回复
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tab可能已有人在做 @seenimohamed 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
ardia-browser/ardia#2769 ·
维护者通常 1 天内回复