feat(extensions): add Roast Room, bring Codex to parity, fix audit findings
Roast Room is installed as a managed Git clone under ~/.my-ai-configuration/roast-room, shared by Claude and Codex. A personal launcher skill runs it from any folder, starts its live room when needed, and only runs when invoked by name (/roast-room, $roast-room). Codex now gets what was Claude-only before: the Caveman skill with a SessionStart hook that keeps it on, PreCompact and session-pointer hooks, execpolicy deny rules mirroring Claude's permissions.deny, and Impeccable's custom agents registered in ~/.codex/agents. The command-safety hook checks both shell dialects for Codex on Windows, where PowerShell text arrives as Bash, in both the PowerShell and Bash packages. Audit fixes: - command-safety blocks git checkout -- / restore / push --force / stash clear and find -delete, and treats heredoc bodies as text - removing a clone clears read-only Git files, git errors no longer abort the extension sync, and a lock left by a dead process is replaced - with-credential passes child flags such as -k or -d through unchanged and resolves commands from PATH - uninstall strips only owned hooks from settings.json and config.toml and keeps the selection while another client is installed; update keeps CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY; Bash merges write the same bytes as PowerShell - qmd no longer trusts a stale daemon.json after a lost start race and prunes collections of deleted repositories - Bash scripts avoid GNU-only find -printf Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
63a36d90e0
commit
b35e2254b3
48 files changed
+1059
-98
No files matched your search
@@ -186,6 +186,8 @@ foreach ($shell in @('powershell','bash')) {
|
||||
Set-Content (Join-Path $output "claude-$shell/CLAUDE.md") $instructionsContent -Encoding UTF8
|
||||
|
||||
Copy-Item (Join-Path $root 'adapters/codex/config/config.toml') (Join-Path $output "codex-$shell/config.toml") -Force
|
||||
# Codex loads every *.rules file under ~/.codex/rules as execpolicy rules; the Markdown rules there are ignored.
|
||||
Copy-Item (Join-Path $root 'adapters/codex/rules/my-ai-configuration.rules') (Join-Path $output "codex-$shell/rules/my-ai-configuration.rules") -Force
|
||||
Copy-Item (Join-Path $root 'adapters/claude/config/settings.json') (Join-Path $output "claude-$shell/settings.json") -Force
|
||||
|
||||
foreach ($client in @('codex','claude')) {
|
||||
|
||||
@@ -183,7 +183,7 @@ while IFS= read -r rule_path; do
|
||||
if [ -n "$references_dir" ] && [ -d "$references_dir" ]; then
|
||||
copy_directory "$references_dir" "$skill_dir/references"
|
||||
fi
|
||||
done < <(find "$shared/rules" -mindepth 1 -type f -name '*.md' -printf '%P\n' | sort)
|
||||
done < <(cd "$shared/rules" && find . -mindepth 1 -type f -name '*.md' | sed 's|^\./||' | sort)
|
||||
|
||||
instructions_content=$(expand_shell_placeholders "$(<"$shared/global-instructions.md")" "$shell")
|
||||
general_content=$(<"$shared/rules/general.md")
|
||||
@@ -191,6 +191,8 @@ printf '%s\n\n---\n\n%s\n' "${instructions_content%$'\n'}" "$general_content" >
|
||||
printf '%s\n\n---\n\n%s\n' "${instructions_content%$'\n'}" "$general_content" > "$output/claude-$shell/CLAUDE.md"
|
||||
|
||||
cp "$root/adapters/codex/config/config.toml" "$output/codex-$shell/config.toml"
|
||||
# Codex loads every *.rules file under ~/.codex/rules as execpolicy rules; the Markdown rules there are ignored.
|
||||
cp "$root/adapters/codex/rules/my-ai-configuration.rules" "$output/codex-$shell/rules/my-ai-configuration.rules"
|
||||
cp "$root/adapters/claude/config/settings.json" "$output/claude-$shell/settings.json"
|
||||
|
||||
for client in codex claude; do
|
||||
|
||||
@@ -8,6 +8,6 @@ while IFS= read -r file; do key_input+="\n$file:$(sha256sum "$file" | awk '{prin
|
||||
key=$(printf '%s' "$key_input" | sha256sum | awk '{print $1}')
|
||||
if [ "$force" = false ] && [ -f "$cache_path" ] && grep -Fq "\"invalidationKey\": \"$key\"" "$cache_path"; then [ "$summary" = true ] && printf 'Repository context: unchanged\n'; exit 0; fi
|
||||
mapfile -t languages < <(find "$root" -type f ! -path '*/generated/*' ! -path '*/.git/*' ! -path '*/node_modules/*' ! -path '*/.ai-session/*' | awk -F. 'NF>1 {print $NF}' | sort -u | awk 'BEGIN{a["cs"]="csharp";a["ts"]="typescript";a["tsx"]="typescript";a["py"]="python";a["ps1"]="powershell";a["sh"]="bash"} a[$1]!=""{print a[$1]}' | sort -u)
|
||||
solutions=$(find "$root" -type f -name '*.sln' ! -path '*/generated/*' -printf '"%f",' | sed 's/,$//'); tests=$(find "$root" -type f ! -path '*/generated/*' ! -path '*/.git/*' -iname '*test*' -printf '"%f",' | sed 's/,$//'); manager=null; [ -f "$root/pnpm-lock.yaml" ] && manager='"pnpm"'; [ -f "$root/package-lock.json" ] && manager='"npm"'; [ -f "$root/yarn.lock" ] && manager='"yarn"'
|
||||
solutions=$(find "$root" -type f -name '*.sln' ! -path '*/generated/*' | sed 's|.*/||; s/.*/"&",/' | tr -d '\n' | sed 's/,$//'); tests=$(find "$root" -type f ! -path '*/generated/*' ! -path '*/.git/*' -iname '*test*' | sed 's|.*/||; s/.*/"&",/' | tr -d '\n' | sed 's/,$//'); manager=null; [ -f "$root/pnpm-lock.yaml" ] && manager='"pnpm"'; [ -f "$root/package-lock.json" ] && manager='"npm"'; [ -f "$root/yarn.lock" ] && manager='"yarn"'
|
||||
mkdir -p "$cache_dir"; printf '{\n "invalidationKey": "%s",\n "head": "%s",\n "languages": [%s],\n "frameworks": [],\n "solutions": [%s],\n "testProjects": [%s],\n "packageManager": %s,\n "buildCommands": {}\n}\n' "$key" "$head" "$(printf '"%s",' "${languages[@]}" | sed 's/,$//')" "$solutions" "$tests" "$manager" > "$cache_path"
|
||||
if [ "$summary" = true ]; then printf 'Repository context: refreshed | %s languages | %s solutions\n' "${#languages[@]}" "$(find "$root" -type f -name '*.sln' ! -path '*/generated/*' | wc -l)"; else printf '%s\n' "$cache_path"; fi
|
||||
@@ -60,7 +60,8 @@ Sync-ConfiguredPlugins -RepositoryRoot $root -HomePath $homePath -Client $Client
|
||||
Sync-Qmd -RepositoryRoot $root -HomePath $homePath -Client $Client -Enabled $false -DryRun:$DryRun -Summary:$Summary
|
||||
|
||||
if (-not $DryRun) {
|
||||
$remaining = @($targets | Where-Object { Test-Path -LiteralPath (Get-ManagedManifestPath $_.Destination) })
|
||||
# Keep the shared selection while the other client is still installed.
|
||||
$remaining = @(Get-InstallTargets -Generated $generated -HomePath $homePath -Shell 'bash' -Client 'Both' | Where-Object { Test-Path -LiteralPath (Get-ManagedManifestPath $_.Destination) })
|
||||
if ($remaining.Count -eq 0) {
|
||||
$configRoot = Join-Path $homePath '.my-ai-configuration'
|
||||
$selectionPath = Join-Path $configRoot 'selection.json'
|
||||
|
||||
@@ -79,9 +79,10 @@ sync_qmd "$root" "$client" "$home_path" false "$dry_run" false "$summary"
|
||||
|
||||
if [ "$dry_run" = false ]; then
|
||||
remaining=0
|
||||
for target_pair in "${targets[@]}"; do
|
||||
# Keep the shared selection while the other client is still installed.
|
||||
while IFS= read -r target_pair; do
|
||||
[ -f "$(manifest_path "${target_pair#*|}")" ] && remaining=$((remaining + 1))
|
||||
done
|
||||
done < <(get_install_targets "$generated" "$home_path" bash both)
|
||||
if [ "$remaining" -eq 0 ]; then
|
||||
config_root="$home_path/.my-ai-configuration"
|
||||
rm -f -- "$config_root/selection.json"
|
||||
|
||||
@@ -15,6 +15,9 @@ $root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
||||
. (Join-Path $root 'scripts/lib/install-options.ps1')
|
||||
. (Join-Path $root 'scripts/lib/qmd.ps1')
|
||||
|
||||
$claudeConcurrency = if ($env:CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY) { $env:CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY } else { '5' }
|
||||
if ($claudeConcurrency -notmatch '^[1-9][0-9]?$' -or [int]$claudeConcurrency -gt 10) { throw 'CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY must be an integer from 1 to 10.' }
|
||||
|
||||
$homePath = [Environment]::GetFolderPath('UserProfile')
|
||||
if ($Quick) {
|
||||
$saved = Read-UpdateSelection -HomePath $homePath -RepositoryRoot $root
|
||||
@@ -51,7 +54,7 @@ $plugins = if ($Quick) {
|
||||
|
||||
foreach ($item in (Get-InstallTargets -Generated $generated -HomePath $homePath -Shell $shell -Client $Client)) {
|
||||
Sync-ManagedDestination -Source $item.Source -Destination $item.Destination -Stamp $stamp `
|
||||
-AiConfigRoot $item.Destination.Replace('\','/') -ShellCommand $shellCommand -PowerShellCommand $powerShellCommand -FlashbangEnabled $options.flashbang -StatusLineEnabled $options.statusline -SemanticRetrievalEnabled $options.semantic_retrieval -DryRun:$DryRun -Summary:$Summary
|
||||
-AiConfigRoot $item.Destination.Replace('\','/') -ShellCommand $shellCommand -PowerShellCommand $powerShellCommand -ClaudeConcurrency $claudeConcurrency -FlashbangEnabled $options.flashbang -StatusLineEnabled $options.statusline -SemanticRetrievalEnabled $options.semantic_retrieval -DryRun:$DryRun -Summary:$Summary
|
||||
}
|
||||
|
||||
Sync-Qmd -RepositoryRoot $root -HomePath $homePath -Client $Client -Enabled $options.semantic_retrieval -DryRun:$DryRun -Update -Summary:$Summary
|
||||
|
||||
@@ -25,6 +25,9 @@ root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
|
||||
. "$root/scripts/lib/install-options.sh"
|
||||
. "$root/scripts/lib/qmd.sh"
|
||||
|
||||
claude_concurrency=${CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY:-5}
|
||||
[[ "$claude_concurrency" =~ ^[1-9][0-9]?$ ]] && [ "$claude_concurrency" -le 10 ] || { printf 'CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY must be an integer from 1 to 10.\n' >&2; exit 1; }
|
||||
|
||||
home_path=${HOME:?HOME is required}
|
||||
selected_plugins=()
|
||||
deselected_plugins=()
|
||||
@@ -64,7 +67,7 @@ fi
|
||||
while IFS='|' read -r source destination; do
|
||||
ai_config_root=$destination
|
||||
command -v cygpath >/dev/null && ai_config_root=$(cygpath -m "$destination")
|
||||
sync_managed_destination "$source" "$destination" "$stamp" "$ai_config_root" "$shell_command" "$powershell_command" "$dry_run" "$summary" "$flashbang" 5 "$statusline" "$semantic_retrieval"
|
||||
sync_managed_destination "$source" "$destination" "$stamp" "$ai_config_root" "$shell_command" "$powershell_command" "$dry_run" "$summary" "$flashbang" "$claude_concurrency" "$statusline" "$semantic_retrieval"
|
||||
done < <(get_install_targets "$generated" "$home_path" "$shell" "$client")
|
||||
|
||||
sync_qmd "$root" "$client" "$home_path" "$semantic_retrieval" "$dry_run" true "$summary"
|
||||
|
||||
Reference in new issue
Block a user