fix(agent-core-v2): resolve plugin-qualified skill names - #2309
Conversation
🦋 Changeset detectedLatest commit: eca34a6 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5c305a3a5
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eca34a689a
ℹ️ 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".
| function toProtocolSkill(skill: SkillElement): SkillDescriptor { | ||
| const base: SkillDescriptor = { | ||
| name: skill.name, | ||
| name: canonicalSkillName(skill), |
There was a problem hiding this comment.
Avoid shadowing plugin commands with qualified skill names
When this endpoint lists plugin skills as pluginId:skillName, the TUI builds a skill command skill:pluginId:skillName; its resolver checks skills before plugin commands and also treats /pluginId:skillName as a skill alias by looking up skill:${commandName} (apps/kimi-code/src/tui/commands/resolve.ts:84-102). For a plugin that exposes both a skill and a plugin command named review, the documented /alpha-plugin:review command is swallowed as a skill activation, making the plugin command unreachable. Please keep the qualified skill invocable only through /skill:... or check the plugin command map before applying that implicit skill alias.
Useful? React with 👍 / 👎.
Related Issue
Resolve #2224
Problem
Plugin Skills were indexed by plugin and Skill name, but model and user activation only performed bare global lookup. As a result, canonical IDs such as
plugin-id:skill-namecould not be invoked, while duplicate bare names silently depended on registration order.What changed
Verification:
pnpm --filter @moonshot-ai/agent-core-v2 lint:domainpnpm --filter @moonshot-ai/agent-core-v2 typecheckpnpm --filter @moonshot-ai/kap-server typecheckpnpm --filter @moonshot-ai/kimi-code typecheckpnpm --filter @moonshot-ai/agent-core-v2 buildpnpm --filter @moonshot-ai/agent-core-v2 test(270files,4199tests)pnpm --filter @moonshot-ai/kap-server test(57files,822tests)pnpm --filter @moonshot-ai/kimi-code test(183passed /2skipped files,2404passed /5skipped tests)pnpm changeset statusDocumentation note: I ran the
gen-docsworkflow, but it stopped at its prerequisite check becausedocs/scripts/sync-changelog.mjsis not present onmain; no documentation files were changed.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.