SolidCraft-MCP 0.2.0: unklare Befehle in den Skill aufnehmen, damit der naechste Lauf Nut, Durchmesser, Drehrichtung und die Boolean-Warnung nicht erneut raten muss.
Uebersicht und Download-Links zeigen dieselbe Version.
This commit is contained in:
1 parent
f3e49b5d37
commit
d374ee7fff
10 files changed
+184
-59
No files matched your search
+49
-15
@@ -1,5 +1,5 @@
|
||||
# Erzeugt die Skill-Tabelle in README.md zwischen <!-- skills:start --> und <!-- skills:end -->
|
||||
# neu. Mit -Check wird nur geprueft, ob die Tabelle aktuell ist (Exit-Code 1, wenn nicht).
|
||||
# Erzeugt die Skill-Uebersicht in README.md zwischen <!-- skills:start --> und <!-- skills:end -->
|
||||
# neu. Mit -Check wird nur geprueft, ob sie aktuell ist (Exit-Code 1, wenn nicht).
|
||||
# Aufruf: scripts\update-index.ps1 [-Check]
|
||||
param([switch]$Check)
|
||||
. (Join-Path $PSScriptRoot 'lib.ps1')
|
||||
@@ -16,6 +16,19 @@ if ($start -lt 0 -or $end -lt $start) {
|
||||
exit 1
|
||||
}
|
||||
|
||||
function ConvertTo-MdText([string]$s) {
|
||||
if ([string]::IsNullOrEmpty($s)) { return '' }
|
||||
$map = [ordered]@{
|
||||
'\' = '\\'
|
||||
'*' = '\*'
|
||||
'_' = '\_'
|
||||
'`' = '\`'
|
||||
'[' = '\['
|
||||
}
|
||||
foreach ($k in @($map.Keys)) { $s = $s.Replace($k, $map[$k]) }
|
||||
return $s
|
||||
}
|
||||
|
||||
$ServerKeys = @{
|
||||
'wordcraft-mcp' = 'wordcraft'
|
||||
'gridcraft-mcp' = 'gridcraft'
|
||||
@@ -31,10 +44,9 @@ function Get-McpServerKey([string]$SkillName) {
|
||||
return $SkillName
|
||||
}
|
||||
|
||||
$table = @(
|
||||
'| Skill | Kurzbeschreibung | Version | Doku | Download | Erweiterung (.mcpb) | Cursor-Plugin | Cursor 1-Klick |',
|
||||
'|---|---|---|---|---|---|---|---|'
|
||||
)
|
||||
# Mittelpunkt als Zeichencode: Windows PowerShell 5.1 liest .ps1 ohne BOM als ANSI.
|
||||
$dot = [char]0x00B7
|
||||
$table = @()
|
||||
foreach ($n in (Get-SkillNames)) {
|
||||
$dir = Join-Path $SkillsDir $n
|
||||
$desc = ''
|
||||
@@ -46,17 +58,30 @@ foreach ($n in (Get-SkillNames)) {
|
||||
if ($d) { $desc = $d }
|
||||
}
|
||||
}
|
||||
$desc = $desc.Replace('|', '\|')
|
||||
$lead = $desc.Trim()
|
||||
$note = ''
|
||||
$cut = $lead.IndexOf(' Verwenden')
|
||||
if ($cut -gt 0) {
|
||||
$note = $lead.Substring($cut + 1).Trim()
|
||||
$lead = $lead.Substring(0, $cut).Trim()
|
||||
}
|
||||
if ($lead.Length -gt 0 -and [char]::IsLower($lead[0])) {
|
||||
$lead = $lead.Substring(0, 1).ToUpperInvariant() + $lead.Substring(1)
|
||||
}
|
||||
$ver = Get-SkillVersion $dir
|
||||
$tagEnc = [Uri]::EscapeDataString("$n/v$ver")
|
||||
$zipLink = "[{0}-v{1}.zip]({2}/releases/download/{3}/{0}-v{1}.zip)" -f $n, $ver, $RepoWeb, $tagEnc
|
||||
$mcpb = ''
|
||||
$cursorZip = ''
|
||||
$deeplink = ''
|
||||
$base = "$RepoWeb/releases/download/$tagEnc"
|
||||
$zipName = "$n-v$ver.zip"
|
||||
$links = @(
|
||||
"[Doku](skills/$n/README.md)",
|
||||
"[Skill-ZIP]($base/$zipName `"$zipName`")"
|
||||
)
|
||||
$extPath = Join-Path $dir 'extension\manifest.json'
|
||||
if (Test-Path $extPath) {
|
||||
$mcpb = "[{0}-v{1}.mcpb]({2}/releases/download/{3}/{0}-v{1}.mcpb)" -f $n, $ver, $RepoWeb, $tagEnc
|
||||
$cursorZip = "[{0}-cursor-v{1}.zip]({2}/releases/download/{3}/{0}-cursor-v{1}.zip)" -f $n, $ver, $RepoWeb, $tagEnc
|
||||
$mcpbName = "$n-v$ver.mcpb"
|
||||
$cursorName = "$n-cursor-v$ver.zip"
|
||||
$links += "[Erweiterung]($base/$mcpbName `"$mcpbName`")"
|
||||
$links += "[Cursor-Plugin]($base/$cursorName `"$cursorName`")"
|
||||
$man = (Read-Text $extPath) | ConvertFrom-Json
|
||||
$serverKey = Get-McpServerKey $n
|
||||
$cmd = [string]$man.server.mcp_config.command
|
||||
@@ -70,9 +95,18 @@ foreach ($n in (Get-SkillNames)) {
|
||||
}
|
||||
$transport = @{ command = $cmd; args = @($argsList) }
|
||||
$link = New-CursorDeeplink -ServerName $serverKey -Config $transport
|
||||
$deeplink = "[Add to Cursor]($link)"
|
||||
$links += "[Add to Cursor]($link)"
|
||||
}
|
||||
$table += ('| [{0}](skills/{0}/) | {1} | {2} | [README](skills/{0}/README.md) | {3} | {4} | {5} | {6} |' -f $n, $desc, $ver, $zipLink, $mcpb, $cursorZip, $deeplink)
|
||||
if ($table.Count -gt 0) { $table += ''; $table += '---'; $table += '' }
|
||||
$table += "### [$n](skills/$n/) $dot ``v$ver``"
|
||||
$table += ''
|
||||
$table += '> ' + (ConvertTo-MdText $lead)
|
||||
$table += ''
|
||||
if ($note) {
|
||||
$table += '*' + (ConvertTo-MdText $note) + '*'
|
||||
$table += ''
|
||||
}
|
||||
$table += ($links -join " $dot ")
|
||||
}
|
||||
|
||||
$newLines = @()
|
||||
|
||||
Reference in new issue
Block a user