import * as fs from "node:fs";
import * as path from "node:path";
const METADATA_DIR = ".tokagentos";
const METADATA_FILE = "template.json";
export function getMetadataPath(projectRoot) {
    return path.join(projectRoot, METADATA_DIR, METADATA_FILE);
}
export function readProjectMetadata(projectRoot) {
    const metadataPath = getMetadataPath(projectRoot);
    if (!fs.existsSync(metadataPath)) {
        return null;
    }
    return JSON.parse(fs.readFileSync(metadataPath, "utf-8"));
}
export function writeProjectMetadata(projectRoot, metadata) {
    const metadataPath = getMetadataPath(projectRoot);
    fs.mkdirSync(path.dirname(metadataPath), { recursive: true });
    fs.writeFileSync(metadataPath, `${JSON.stringify(metadata, null, 2)}\n`);
}
//# sourceMappingURL=project-metadata.js.map