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>
86 lines
3.2 KiB
Bash
86 lines
3.2 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
dry_run=false
|
|
quick=false
|
|
client=""
|
|
shell=""
|
|
summary=false
|
|
while [ $# -gt 0 ]; do
|
|
case "$1" in
|
|
--dry-run) dry_run=true; shift ;;
|
|
--quick) quick=true; shift ;;
|
|
--summary) summary=true; shift ;;
|
|
--client) client=${2:?--client requires a value}; shift 2 ;;
|
|
--shell) shell=${2:?--shell requires a value}; shift 2 ;;
|
|
*) printf 'Unknown argument: %s\n' "$1" >&2; exit 1 ;;
|
|
esac
|
|
done
|
|
|
|
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
|
|
. "$root/scripts/lib/plugins.sh"
|
|
. "$root/scripts/lib/manifest.sh"
|
|
. "$root/scripts/lib/install-targets.sh"
|
|
. "$root/scripts/lib/selection-state.sh"
|
|
. "$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=()
|
|
if [ "$quick" = true ]; then read_update_selection; fi
|
|
|
|
shell=$(read_install_shell "$shell")
|
|
client=$(read_install_client "$client")
|
|
|
|
if [ "$dry_run" = false ]; then
|
|
mapfile -t destinations < <(get_install_destinations "$home_path" "$client")
|
|
if ! all_manifests_present "${destinations[@]}"; then
|
|
printf 'Not installed, use the install script.\n' >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [ "$quick" = false ]; then read_install_options; fi
|
|
|
|
build_args=()
|
|
[ "$summary" = false ] || build_args+=(--summary)
|
|
[ "$client" != claude ] || build_args+=(--skip-codex-schema)
|
|
bash "$root/scripts/commands/build.sh" "${build_args[@]}"
|
|
generated="$root/generated"
|
|
[ -d "$generated" ] || { printf 'Generated output is missing after a successful build.\n' >&2; exit 1; }
|
|
|
|
stamp=$(date +%Y%m%d-%H%M%S)
|
|
powershell_command='pwsh -NoProfile -ExecutionPolicy Bypass -File'
|
|
if command -v powershell >/dev/null; then powershell_command='powershell -NoProfile -ExecutionPolicy Bypass -File'; fi
|
|
shell_command=bash
|
|
[ "$shell" != powershell ] || shell_command=$powershell_command
|
|
|
|
if [ "$quick" = false ]; then
|
|
select_configured_plugins "$root" "$client" Update "$dry_run" selected_plugins deselected_plugins
|
|
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" "$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"
|
|
if [ "$quick" = true ]; then
|
|
CI=true sync_configured_plugins "$root" "$client" "$home_path" "$dry_run" true selected_plugins "$summary" </dev/null
|
|
else
|
|
sync_configured_plugins "$root" "$client" "$home_path" "$dry_run" true selected_plugins "$summary"
|
|
fi
|
|
if [ "$dry_run" = false ]; then save_update_selection; fi
|
|
|
|
if [ "$summary" = true ]; then
|
|
suffix=
|
|
[ "$dry_run" = false ] || suffix=', dry-run'
|
|
printf 'Update: PASS | %s, %s%s\n' "$client" "$shell" "$suffix"
|
|
elif "$dry_run"; then printf 'PASS update dry-run\n'; else printf 'PASS update\n'; fi
|