import fs from "node:fs/promises"; import path from "node:path"; import { resolveDefaultAgentDir } from "./agent-scope.js"; export async function readGeneratedModelsJson( agentDir = resolveDefaultAgentDir({}), ): Promise { const modelPath = path.join(agentDir, "models.json"); const raw = await fs.readFile(modelPath, "utf8"); return JSON.parse(raw) as T; }