[CmdletBinding()] param([switch]$Summary) $ErrorActionPreference = 'Stop' $root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent . (Join-Path $root 'shared/hooks/scripts/Resolve-Python.ps1') $budgetScript = Join-Path $root 'scripts/lib/prompt-budget.py' $budgetArgs = @() if ($Summary) { $budgetArgs += '--summary' } Invoke-Python $budgetScript @budgetArgs $budgetExit = $LASTEXITCODE Invoke-Python (Join-Path $root 'scripts/lib/prompt-inventory.py') --home ([Environment]::GetFolderPath('UserProfile')) if ($LASTEXITCODE -ne 0) { throw 'Prompt inventory failed.' } exit $budgetExit