# Synopsis: Clears locked processes and temporary states.
# Description: Silently terminates active browsers and purges mailbox queues.

$BaseDir = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
$MailboxDir = Join-Path $BaseDir "Mailbox"
Get-ChildItem -Path $MailboxDir -File | Remove-Item -Force
$StatePath = Join-Path $BaseDir "Config\active_state.json"
if (Test-Path $StatePath) { Remove-Item $StatePath -Force }
Stop-Process -Name "msedge" -Force -ErrorAction SilentlyContinue

