Deduplicate plugin skills in unified mentions (#40501)

## Why

Unified `@` search could show a plugin alongside the skills it owns, creating duplicate entry points for the same capability.

## What changed

- Add a nullable `pluginId` to `SkillMetadata` returned by `skills/list` so clients can associate skills with their owning plugin without inspecting names or paths.
- Hide a plugin's owned skills from unified `@` results when that plugin is present, while retaining standalone skills and skills with unknown ownership.
- Keep `$` focused on individual skills and apps, and use it consistently as the skills-list shortcut. Preserve the legacy mention behavior when `mentions_v2` is disabled.

## Testing

- Cover plugin ownership in `skills/list` and the updated `@` and `$` composer results.

GitOrigin-RevId: e168cdff8d0c58f74ce4c228a683880a3167775b
This commit is contained in:
victor-openai authored and copyberry committed 2026-08-25 00:15:49 +00:00
1 parent 465eafacbc
commit 5918c743f3
18 files changed
+121 -25

No files matched your search

@@ -886,6 +886,7 @@ async fn submission_prefers_selected_duplicate_skill_path() {
path: repo_skill_path,
scope: crate::test_support::skill_scope_repo(),
enabled: true,
plugin_id: None,
},
SkillMetadata {
name: "figma".to_string(),
@@ -896,6 +897,7 @@ async fn submission_prefers_selected_duplicate_skill_path() {
path: user_skill_path.clone(),
scope: crate::test_support::skill_scope_user(),
enabled: true,
plugin_id: None,
},
]));