// storage/compliance-store.ts — Compliance config persistence (SPEC-319)
import { join } from 'node:path';
import { hashProjectPath, readJson, writeJson } from './base-store.js';
// ---------------------------------------------------------------------------
// Path helpers
// ---------------------------------------------------------------------------
function projectDir(projectPath) {
    const id = hashProjectPath(projectPath);
    return join('data', 'projects', id);
}
function configPath(projectPath) {
    return join(projectDir(projectPath), 'compliance-config.json');
}
// ---------------------------------------------------------------------------
// Store functions
// ---------------------------------------------------------------------------
/**
 * Read the compliance configuration for a project.
 * Returns null if no configuration has been saved.
 */
export async function getComplianceConfig(projectPath) {
    return readJson(configPath(projectPath), null);
}
/**
 * Persist the compliance configuration for a project.
 */
export async function saveComplianceConfig(projectPath, config) {
    await writeJson(configPath(projectPath), config);
}
//# sourceMappingURL=compliance-store.js.map