import { join } from "path" export interface VmConfig { cpus?: number memory?: string image?: string mounts?: Record } export interface SandlotConfig { vm?: VmConfig } const DEFAULT_CONFIG: SandlotConfig = { vm: { image: "ubuntu:24.04" }, } export async function loadConfig(repoRoot: string): Promise { const path = join(repoRoot, "sandlot.json") const file = Bun.file(path) if (await file.exists()) { const userConfig = await file.json() return { vm: { ...DEFAULT_CONFIG.vm, ...userConfig.vm }, } } return DEFAULT_CONFIG }