feat(build): resolve shell-specific agent tool placeholder in PowerShell build

Replace __SHELL__ in each generated Claude agent's tools field with
PowerShell or Bash depending on the package being built, so a role that
needs shell execution only gets the one matching its target shell.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Sonnet 5 committed 2026-09-18 09:31:34 +02:00
1 parent 4374c69caa
commit 0f387b7df2
1 file changed
+2
+2
View File
@@ -177,7 +177,9 @@ foreach ($shell in @('powershell','bash')) {
if ($client -eq 'codex') { if ($client -eq 'codex') {
Set-Content (Join-Path $agentsOutput "$name.toml") "name = $(Quote-Toml $name)`r`ndescription = $(Quote-Toml $description)`r`ndeveloper_instructions = $(Quote-Toml $instructions)" -Encoding UTF8 Set-Content (Join-Path $agentsOutput "$name.toml") "name = $(Quote-Toml $name)`r`ndescription = $(Quote-Toml $description)`r`ndeveloper_instructions = $(Quote-Toml $instructions)" -Encoding UTF8
} else { } else {
$shellTool = if ($shell -eq 'powershell') { 'PowerShell' } else { 'Bash' }
$tools = $agentTools[$name] $tools = $agentTools[$name]
if ($tools) { $tools = $tools.Replace('__SHELL__', $shellTool) }
$frontmatter = "---`r`nname: $name`r`ndescription: $description`r`n" $frontmatter = "---`r`nname: $name`r`ndescription: $description`r`n"
if ($tools) { $frontmatter += "tools: $tools`r`n" } if ($tools) { $frontmatter += "tools: $tools`r`n" }
Set-Content (Join-Path $agentsOutput "$name.md") ($frontmatter + "---`r`n`r`n$instructions") -Encoding UTF8 Set-Content (Join-Path $agentsOutput "$name.md") ($frontmatter + "---`r`n`r`n$instructions") -Encoding UTF8