Repository navigation
fix(agent-core-v2): watch explicit skill directories - #4766
Conversation
Refresh loaded skill catalogs when explicitly configured directories change. Keep initial discovery independent of native watcher readiness.
🦋 Changeset detectedLatest commit: 0be7bf7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d6d639697
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
e32837b to
3ea536c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ea536cc8e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Requirement or Bug
通过
--skills-dir或 Core 启动选项指定技能目录后,运行中的会话需要自动发现新写入的技能。目录通过软链接或 Windows junction 指定时,入口改指向也需要刷新技能目录。Bug Reproduction Steps
kimi --skills-dir /path/to/skills启动会话。SKILL.md的目录,观察已加载的技能目录。Root Cause
显式技能源原先只读取文件,缺少触发重扫的事件。只监听启动时解析出的真实目录也会漏掉链接入口的变化,因为入口的替换发生在它的父目录。
Code Changes
显式技能源复用现有文件监听器。目标目录内的变更经过防抖后触发已有的目录重载流程。配置入口、指向其他位置的祖先路径和待创建的入口由各自的父目录监听。入口变化时重新解析路径,注册新目标的监听并释放旧目标的监听。
首次扫描与原生监听器的就绪分开。目标监听就绪后补扫一次,覆盖监听启动期间写入的文件。Program 负责释放该技能源持有的监听。
Behavior Changes and Affected Users
--skills-dir或 Core 启动选项指定本地技能目录的用户macOS 定向验证覆盖普通目录写入、原生监听就绪后的补扫、根链接和祖先链接改指向,以及启动后创建链接。四组相关测试 68 项通过、1 项跳过。Core v2 类型检查、生产文件 lint 和
git diff --check通过。Windows 11(10.0.26300,NTFS,Node v24.15.0)在独立工作树上复跑当前提交
0be7bf75a,实测通过 4 项,覆盖普通目录写入、根 junction 改指向、祖先 junction 改指向和启动后创建 junction。两项改指向测试保留了旧目标,并验证切换后在新目标中新增技能也会刷新。以同一测试对照初版0d6d63969时,两个改指向场景均未刷新。技能目录内部的外部链接,以及悬空链接的目标后来出现,仍可能需要手动刷新。
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.