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:
1 parent
4374c69caa
commit
0f387b7df2
1 file changed
+2
@@ -177,7 +177,9 @@ foreach ($shell in @('powershell','bash')) {
|
||||
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
|
||||
} else {
|
||||
$shellTool = if ($shell -eq 'powershell') { 'PowerShell' } else { 'Bash' }
|
||||
$tools = $agentTools[$name]
|
||||
if ($tools) { $tools = $tools.Replace('__SHELL__', $shellTool) }
|
||||
$frontmatter = "---`r`nname: $name`r`ndescription: $description`r`n"
|
||||
if ($tools) { $frontmatter += "tools: $tools`r`n" }
|
||||
Set-Content (Join-Path $agentsOutput "$name.md") ($frontmatter + "---`r`n`r`n$instructions") -Encoding UTF8
|
||||
|
||||
Reference in new issue
Block a user