Files
Julian LechnerandClaude Opus 5.5 b35e2254b3 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>
2026-11-19 09:02:47 +01:00

77 lines
4.0 KiB
PowerShell

[CmdletBinding()]
param(
[switch]$DryRun,
[ValidateSet('Codex','Claude','Both')][string]$Client,
[switch]$Force,
[switch]$Summary
)
$ErrorActionPreference = 'Stop'
$root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
. (Join-Path $root 'scripts/lib/plugins.ps1')
. (Join-Path $root 'scripts/lib/manifest.ps1')
. (Join-Path $root 'scripts/lib/install-targets.ps1')
. (Join-Path $root 'scripts/lib/qmd.ps1')
$Client = Read-InstallClient -Client $Client
$homePath = [Environment]::GetFolderPath('UserProfile')
$generated = Join-Path $root 'generated'
$targets = @(Get-InstallTargets -Generated $generated -HomePath $homePath -Shell 'bash' -Client $Client)
$installedTargets = @($targets | Where-Object { Test-Path -LiteralPath (Get-ManagedManifestPath $_.Destination) })
if (-not $DryRun -and $installedTargets.Count -eq 0 -and -not (Test-Path -LiteralPath (Join-Path $homePath '.my-ai-configuration/extensions.json'))) { throw 'Not installed, nothing to uninstall.' }
if (-not $DryRun -and -not $Force) {
if ([Console]::IsInputRedirected -or $env:CI -eq 'true' -or $env:AI_CONFIG_NO_INTERACTIVE -eq '1') {
throw 'Refusing to uninstall without confirmation in a non-interactive session. Pass -Force to proceed.'
}
Write-Host "This removes the managed configuration, extensions, and QMD local search setup for $Client under $homePath."
Write-Host 'Backups already on disk are kept; anything this setup never installed is left untouched.'
$confirm = Read-Host -Prompt 'Continue? [y/N]'
if ($null -eq $confirm) { $confirm = '' }
if ($confirm.Trim().ToLowerInvariant() -notin @('y', 'yes')) {
Write-Output 'Cancelled, nothing was removed.'
exit 1
}
}
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
$emptySource = Join-Path ([System.IO.Path]::GetTempPath()) "ai-config-uninstall-$stamp"
New-Item $emptySource -ItemType Directory -Force | Out-Null
try {
foreach ($item in $targets) {
if (-not (Test-Path -LiteralPath (Get-ManagedManifestPath $item.Destination))) {
if (-not $Summary) { Write-Output "SKIP $($item.Destination) (not installed)" }
continue
}
Sync-ManagedDestination -Source $emptySource -Destination $item.Destination -Stamp $stamp `
-AiConfigRoot $item.Destination.Replace('\','/') -ShellCommand '' -PowerShellCommand '' -DryRun:$DryRun -Summary:$Summary
if (-not $DryRun) {
Remove-Item -LiteralPath (Get-ManagedManifestPath $item.Destination) -Force -ErrorAction SilentlyContinue
if (@(Get-ChildItem -LiteralPath $item.Destination -Force -ErrorAction SilentlyContinue).Count -eq 0) {
Remove-Item -LiteralPath $item.Destination -Force -ErrorAction SilentlyContinue
}
}
}
} finally {
Remove-Item -LiteralPath $emptySource -Recurse -Force -ErrorAction SilentlyContinue
}
Sync-ConfiguredPlugins -RepositoryRoot $root -HomePath $homePath -Client $Client -DryRun:$DryRun -Summary:$Summary -Entries @()
Sync-Qmd -RepositoryRoot $root -HomePath $homePath -Client $Client -Enabled $false -DryRun:$DryRun -Summary:$Summary
if (-not $DryRun) {
# 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'
if (Test-Path -LiteralPath $selectionPath) { Remove-Item -LiteralPath $selectionPath -Force }
if ((Test-Path -LiteralPath $configRoot) -and @(Get-ChildItem -LiteralPath $configRoot -Force -ErrorAction SilentlyContinue).Count -eq 0) {
Remove-Item -LiteralPath $configRoot -Force -ErrorAction SilentlyContinue
}
}
}
if ($Summary) { Write-Output "Uninstall: PASS | $Client$(if ($DryRun) { ', dry-run' })" } else { Write-Output ($(if ($DryRun) { 'PASS uninstall dry-run' } else { 'PASS uninstall' })) }
exit 0