import { readGlobalConfig, saveGlobalConfig } from "../../utils/config.js";
export class ConfigService {
    runtime;
    constructor(runtime) {
        this.runtime = runtime;
    }
    read() {
        return readGlobalConfig(this.runtime.dataDir);
    }
    update(update) {
        const next = { ...this.read(), ...update };
        saveGlobalConfig(this.runtime.dataDir, next);
        return next;
    }
}
