test(packages): match single Codex PreToolUse hook and Skill agent tool
CI / CI configuration security checks (push) Successful in 2s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 34s
CI / QMD unit tests (push) Successful in 6s
CI / Build and inspect generated packages (push) Successful in 25s
CI / PowerShell tests on Ubuntu (push) Successful in 1m14s
CI / Installed client configuration smoke tests (push) Successful in 40s
CI / Bash integration and installation guards (push) Failing after 1m19s
CI / CI configuration security checks (push) Successful in 2s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 34s
CI / QMD unit tests (push) Successful in 6s
CI / Build and inspect generated packages (push) Successful in 25s
CI / PowerShell tests on Ubuntu (push) Successful in 1m14s
CI / Installed client configuration smoke tests (push) Successful in 40s
CI / Bash integration and installation guards (push) Failing after 1m19s
The search reminder now runs inside the command-safety hook, and agent capability profiles include Skill. Update the generated-package checks to expect both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bdf32bb6bd
commit
2917ad08ec
2 files changed
+6
-6
No files matched your search
@@ -45,10 +45,10 @@ foreach ($shell in @('powershell','bash')) {
|
||||
if ($client -eq 'claude') { $settings = $content | ConvertFrom-Json }
|
||||
if (@(Get-ChildItem "$package/agents" -File).Count -ne $sourceAgentCount) { throw "Missing agents in $package" }
|
||||
$expectedReviewerShellTool = if ($shell -eq 'powershell') { 'PowerShell' } else { 'Bash' }
|
||||
if ($client -eq 'claude' -and (Get-Content (Join-Path $package 'agents/reviewer.md') -Raw) -notmatch "(?m)^tools: Read,Grep,Glob,$expectedReviewerShellTool\r?`$") { throw "Reviewer capability profile is missing in $package" }
|
||||
if ($client -eq 'claude' -and (Get-Content (Join-Path $package 'agents/reviewer.md') -Raw) -notmatch "(?m)^tools: Read,Grep,Glob,$expectedReviewerShellTool,Skill\r?`$") { throw "Reviewer capability profile is missing in $package" }
|
||||
if ($client -eq 'claude') {
|
||||
foreach ($role in @('architect','researcher')) {
|
||||
if ((Get-Content (Join-Path $package "agents/$role.md") -Raw) -notmatch "(?m)^tools: Read,Grep,Glob,WebFetch,WebSearch,$expectedReviewerShellTool\r?`$") { throw "$role research shell capability is missing in $package" }
|
||||
if ((Get-Content (Join-Path $package "agents/$role.md") -Raw) -notmatch "(?m)^tools: Read,Grep,Glob,WebFetch,WebSearch,$expectedReviewerShellTool,Skill\r?`$") { throw "$role research shell capability is missing in $package" }
|
||||
}
|
||||
}
|
||||
$expectedSkillCount = if ($client -eq 'claude') { $sourceSkillCount + $ruleSkillCount } else { $sourceSkillCount }
|
||||
@@ -66,7 +66,7 @@ foreach ($shell in @('powershell','bash')) {
|
||||
if ($shell -eq 'powershell' -and $content -match 'WindowStyle\s+Hidden') { throw "PowerShell hook hides the terminal in $package" }
|
||||
if ($client -eq 'codex') {
|
||||
$events = @([regex]::Matches($content, '(?m)^\[\[hooks\.([^.\]]+)\]\]\s*$') | ForEach-Object { $_.Groups[1].Value })
|
||||
if ((($events | Sort-Object) -join ',') -ne 'PostToolUse,PreCompact,PreToolUse,PreToolUse,SessionStart,SessionStart,SessionStart,Stop,Stop,Stop,UserPromptSubmit' -or $content -match 'flashbang-if-input' -or $content -match '(?m)^async\s*=\s*true\s*$') { throw "Codex finish hook is incorrect in $package" }
|
||||
if ((($events | Sort-Object) -join ',') -ne 'PostToolUse,PreCompact,PreToolUse,SessionStart,SessionStart,SessionStart,Stop,Stop,Stop,UserPromptSubmit' -or $content -match 'flashbang-if-input' -or $content -match '(?m)^async\s*=\s*true\s*$') { throw "Codex finish hook is incorrect in $package" }
|
||||
if ($content -notmatch 'approvals_reviewer\s*=\s*"auto_review"') { throw "Codex auto review is missing in $package" }
|
||||
if ($content -notmatch '(?m)^sandbox_mode\s*=\s*"danger-full-access"\s*$') { throw "Codex full access is missing in $package" }
|
||||
if ($content -notmatch '(?m)^max_depth\s*=\s*1\s*$') { throw "Codex agent depth limit is missing in $package" }
|
||||
|
||||
@@ -52,10 +52,10 @@ for shell in powershell bash; do
|
||||
expected_reviewer_shell_tool=Bash
|
||||
[ "$shell" != powershell ] || expected_reviewer_shell_tool=PowerShell
|
||||
# Generated files may have CRLF endings when the PowerShell build produced them, so allow trailing whitespace.
|
||||
if [ "$client" = claude ]; then grep -q "^tools: Read,Grep,Glob,${expected_reviewer_shell_tool}[[:space:]]*\$" "$package/agents/reviewer.md"; fi
|
||||
if [ "$client" = claude ]; then grep -q "^tools: Read,Grep,Glob,${expected_reviewer_shell_tool},Skill[[:space:]]*\$" "$package/agents/reviewer.md"; fi
|
||||
if [ "$client" = claude ]; then
|
||||
for role in architect researcher; do
|
||||
grep -q "^tools: Read,Grep,Glob,WebFetch,WebSearch,${expected_reviewer_shell_tool}[[:space:]]*\$" "$package/agents/$role.md" || { printf '%s research shell capability is missing in %s\n' "$role" "$package"; exit 1; }
|
||||
grep -q "^tools: Read,Grep,Glob,WebFetch,WebSearch,${expected_reviewer_shell_tool},Skill[[:space:]]*\$" "$package/agents/$role.md" || { printf '%s research shell capability is missing in %s\n' "$role" "$package"; exit 1; }
|
||||
done
|
||||
fi
|
||||
expected_skill_count=$source_skill_count
|
||||
@@ -89,7 +89,7 @@ for shell in powershell bash; do
|
||||
grep -q 'bash .*flashbang.sh' "$package/$file"
|
||||
fi
|
||||
if [ "$client" = codex ]; then
|
||||
[ "$(sed -n 's/^\[\[hooks\.\([^].]*\)\]\][[:space:]]*$/\1/p' "$package/$file" | sort)" = $'PostToolUse\nPreCompact\nPreToolUse\nPreToolUse\nSessionStart\nSessionStart\nSessionStart\nStop\nStop\nStop\nUserPromptSubmit' ]
|
||||
[ "$(sed -n 's/^\[\[hooks\.\([^].]*\)\]\][[:space:]]*$/\1/p' "$package/$file" | sort)" = $'PostToolUse\nPreCompact\nPreToolUse\nSessionStart\nSessionStart\nSessionStart\nStop\nStop\nStop\nUserPromptSubmit' ]
|
||||
! grep -q 'flashbang-if-input' "$package/$file"
|
||||
! grep -Eq '^async[[:space:]]*=[[:space:]]*true[[:space:]]*$' "$package/$file"
|
||||
grep -q 'approvals_reviewer[[:space:]]*=[[:space:]]*"auto_review"' "$package/$file"
|
||||
|
||||
Reference in new issue
Block a user