[CmdletBinding()] param() $ErrorActionPreference = "Continue" $Root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path $checks = @() function Add-Check($Name, $Ok, $Detail) { $script:checks += [ordered]@{ name=$Name; ok=[bool]$Ok; detail=$Detail } } Add-Check "root" (Test-Path $Root) $Root Add-Check "START-HERE.cmd" (Test-Path (Join-Path $Root "START-HERE.cmd")) "required client launcher" Add-Check "jackailocald.exe" (Test-Path (Join-Path $Root "bin\jackailocald.exe")) "compile Rust or copy binary" Add-Check "ollama.exe" (Test-Path (Join-Path $Root "backends\ollama\windows\ollama.exe")) "required for default backend" Add-Check "llama-server.exe" (Test-Path (Join-Path $Root "backends\llama.cpp\windows\llama-server.exe")) "optional fallback" Add-Check "models ollama" ((Test-Path (Join-Path $Root "models\ollama\manifests")) -or (Test-Path (Join-Path $Root "models\ollama\blobs"))) "models should be preloaded" Add-Check "webui" (Test-Path (Join-Path $Root "webui\index.html")) "UI files" Add-Check "model catalog" (Test-Path (Join-Path $Root "config\model-catalog.json")) "catalog" Add-Check "manifest" (Test-Path (Join-Path $Root "manifest\sha256-manifest.json")) "integrity manifest" $checks | ConvertTo-Json -Depth 4 $failed = $checks | Where-Object { -not $_.ok } if ($failed.Count -gt 0) { exit 1 } exit 0