Sync third-party and MCP marketplace plugins

Constraint: Public skills are published only by explicit administrator action unless they are tracked third-party market sources.
Confidence: high
Scope-risk: narrow
Directive: Keep private/internal skills out of the public marketplace and preserve normal incremental market Git history.
Tested: Marketplace validation passed.
This commit is contained in:
KeyInfo Bot
2026-08-13 16:40:27 +08:00
parent 7a846d93c6
commit 5e6f30c141
48 changed files with 1282 additions and 130 deletions
+21
View File
@@ -871,6 +871,27 @@ function Sync-SkillCollection {
$skillDirs = @(Get-ChildItem -LiteralPath $sourceSkillsRoot -Directory | Where-Object {
Test-Path -LiteralPath (Join-Path $_.FullName "SKILL.md")
} | Sort-Object Name)
$includeSkills = @()
if ($Source.PSObject.Properties.Name -contains "includeSkills" -and $Source.includeSkills) {
$includeSkills = @($Source.includeSkills | ForEach-Object { ([string]$_).Trim() } | Where-Object { $_ })
}
if ($includeSkills.Count -gt 0) {
$skillDirsByName = @{}
foreach ($skillDir in $skillDirs) {
$skillDirsByName[$skillDir.Name] = $skillDir
}
$selectedSkillDirs = @()
foreach ($skillName in $includeSkills) {
if ($skillName -notmatch '^[a-z0-9]+(?:-[a-z0-9]+)*$') {
throw "skill-collection includeSkills contains invalid name: $skillName"
}
if (-not $skillDirsByName.ContainsKey($skillName)) {
throw "skill-collection includeSkills skill not found: $skillName"
}
$selectedSkillDirs += $skillDirsByName[$skillName]
}
$skillDirs = $selectedSkillDirs
}
if ($skillDirs.Count -eq 0) {
throw "skill-collection adapter found no child SKILL.md files: $sourceSkillsRoot"
}