"use client"; import { useState, useEffect } from "react"; import { motion } from "framer-motion"; import { Download, Monitor, ChevronDown } from "lucide-react"; const DOWNLOAD_BASE = "https://releases.rivet.dev/foundry/0.1.0"; type Platform = { label: string; arch: string; filename: string; }; const PLATFORMS: Platform[] = [ { label: "macOS (Apple Silicon)", arch: "arm64", filename: "Foundry_0.1.0_aarch64.dmg", }, { label: "macOS (Intel)", arch: "x64", filename: "Foundry_0.1.0_x64.dmg", }, ]; function detectPlatform(): Platform | null { if (typeof navigator === "undefined") return null; const ua = navigator.userAgent.toLowerCase(); if (!ua.includes("mac")) return null; // Apple Silicon detection: check for arm in platform or userAgentData const isArm = navigator.platform === "MacIntel" && (navigator as any).userAgentData?.architecture === "arm"; // Fallback: newer Safari/Chrome on Apple Silicon const couldBeArm = navigator.platform === "MacIntel" && !ua.includes("intel"); if (isArm || couldBeArm) { return PLATFORMS[0]; // Apple Silicon } return PLATFORMS[1]; // Intel } export function DownloadFoundry() { const [detected, setDetected] = useState(null); const [showDropdown, setShowDropdown] = useState(false); useEffect(() => { setDetected(detectPlatform()); }, []); const primary = detected ?? PLATFORMS[0]; const secondary = PLATFORMS.filter((p) => p !== primary); return (
Download Foundry Run Foundry as a native desktop app. Manage workspaces, handoffs, and coding agents locally.
{/* Primary download button */} Download for {primary.label} {/* Other platforms */}
{showDropdown && (
{secondary.map((p) => ( {p.label} ))}
)}
{/* Unsigned app note */}

macOS only. On first launch, right-click the app and select "Open" to bypass Gatekeeper.

); }