Skip to content

fix(agent-core-v2): resolve plugin-qualified skill names - #2309

Open
Zavianx wants to merge 2 commits into
MoonshotAI:mainfrom
Zavianx:fix/2224-plugin-qualified-skills
Open

fix(agent-core-v2): resolve plugin-qualified skill names#2309
Zavianx wants to merge 2 commits into
MoonshotAI:mainfrom
Zavianx:fix/2224-plugin-qualified-skills

Conversation

@Zavianx

@Zavianx Zavianx commented Jul 28, 2026

Copy link
Copy Markdown

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-name could not be invoked, while duplicate bare names silently depended on registration order.

What changed

  • Add one catalog resolver for qualified plugin IDs, unambiguous bare aliases, not-found results, and ambiguous bare names.
  • Preserve existing merged-source priority for bare non-plugin Skills while exposing every plugin Skill under its canonical qualified ID in model, session, and workspace listings.
  • Use the canonical ID in model listings, activation prompts, activation records, and tool results so listed names round-trip through the Skill tool.
  • Return an actionable ambiguity error containing the sorted qualified candidates.
  • Add catalog, model-tool, REST round-trip, TUI command, and user-activation regression coverage, regenerate the state manifest, and add a patch changeset.

Verification:

  • pnpm --filter @moonshot-ai/agent-core-v2 lint:domain
  • pnpm --filter @moonshot-ai/agent-core-v2 typecheck
  • pnpm --filter @moonshot-ai/kap-server typecheck
  • pnpm --filter @moonshot-ai/kimi-code typecheck
  • pnpm --filter @moonshot-ai/agent-core-v2 build
  • pnpm --filter @moonshot-ai/agent-core-v2 test (270 files, 4199 tests)
  • pnpm --filter @moonshot-ai/kap-server test (57 files, 822 tests)
  • pnpm --filter @moonshot-ai/kimi-code test (183 passed / 2 skipped files, 2404 passed / 5 skipped tests)
  • pnpm changeset status

Documentation note: I ran the gen-docs workflow, but it stopped at its prerequisite check because docs/scripts/sync-changelog.mjs is not present on main; no documentation files were changed.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eca34a6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread packages/agent-core-v2/src/app/skillCatalog/registry.ts
@Zavianx

Zavianx commented Jul 28, 2026

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

Plugin-qualified skill names are not resolved by the native Skill tool

1 participant