Skip to content

fix(skills): preserve project and global root scopes#679

Merged
XingYu-Zhong merged 1 commit into
KunAgent:developfrom
luoye520ww:codex/fix-skill-root-scope
Jul 1, 2026
Merged

fix(skills): preserve project and global root scopes#679
XingYu-Zhong merged 1 commit into
KunAgent:developfrom
luoye520ww:codex/fix-skill-root-scope

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the project/global scope assigned by the GUI skill root discovery service.
  • Keep manually configured project and global roots in their matching Kun capability fields.

Root cause

guiSkillRootsForRuntime already labels each root as project or global, but syncGuiManagedKunConfig discarded that label and appended every GUI root to capabilities.skills.roots. The runtime consequently diagnosed and prioritized global skills as project skills.

Changes

  • Split GUI-managed roots into roots and globalRoots by their existing scope.
  • Filter stale GUI-managed entries from both persisted root lists before rebuilding them.
  • Enable the capability when either scoped root list is populated.
  • Extend the existing config sync test to assert both fields.

Tests

  • npm.cmd test -- src/main/kun-process.test.ts (38 tests)
  • npm.cmd run typecheck
  • git diff --check

@luoye520ww luoye520ww marked this pull request as ready for review July 1, 2026 13:43

@XingYu-Zhong XingYu-Zhong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and approved for merge.

@XingYu-Zhong XingYu-Zhong merged commit 331b77a into KunAgent:develop Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants