#Requires -Version 5.1
<#  SilverMetal Enhanced - Windows | SilverLABS Application Stack
    The Stack is the spine (design-principle #7). Install native Windows builds
    and set SilverBrowser default + SilverVPN always-on kill-switch.
    Spec: ../hardening-spec.md (#4)  |   SCAFFOLD (M4): some components are
    Linux-MVP today (windows/README.md) - their Windows builds may lag.
#>
[CmdletBinding()] param([string]$StackDir = "$PSScriptRoot\..\stack-installer")
Set-StrictMode -Version Latest; $ErrorActionPreference = 'Stop'
Write-Host '[Stack] SilverLABS Application Stack'

# Component -> hardening-spec mapping:
#   SilverBrowser (A,H) default browser   | SilverVPN (F) always-on kill-switch
#   SilverSync (A) replaces OneDrive      | SilverChat (F) E2EE over VPN
#   SilverDuress (G) duress/panic-wipe    | SilverKeys (C,A) pwd/2FA + offline BL recovery key
$components = 'SilverBrowser','SilverVPN','SilverSync','SilverChat','SilverDuress','SilverKeys'

foreach ($c in $components) {
  # TODO-M4: install $StackDir\$c\*.msi/.exe silently; verify signature against the
  #          SilverLABS signing key (trust-model.md) before install.
  Write-Warning "   $c install pending native Windows build (M4)."
}

# TODO-M4: set SilverBrowser as default http/https handler; enable SilverVPN kill-switch
#          (no plaintext fallback); register SilverDuress.

Write-Host '   [Stack] mapping staged; installs land at M4.'
