ccguard
Version:
Automated enforcement of net-negative LOC, complexity constraints, and quality standards for Claude code
60 lines • 1.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryStorage = void 0;
class MemoryStorage {
sessionStats = null;
guardState = null;
hotConfig = null;
operationHistory = null;
lockedFiles = null;
data = new Map();
async getSessionStats() {
return this.sessionStats;
}
async saveSessionStats(stats) {
this.sessionStats = stats;
}
async getGuardState() {
return this.guardState;
}
async saveGuardState(state) {
this.guardState = state;
}
async getHotConfig() {
return this.hotConfig;
}
async saveHotConfig(config) {
this.hotConfig = config;
}
async getOperationHistory() {
return this.operationHistory;
}
async saveOperationHistory(history) {
this.operationHistory = history;
}
async getLockedFiles() {
return this.lockedFiles;
}
async saveLockedFiles(lockedFiles) {
this.lockedFiles = lockedFiles;
}
async clearAll() {
this.sessionStats = null;
this.guardState = null;
this.hotConfig = null;
this.operationHistory = null;
this.lockedFiles = null;
this.data.clear();
}
async get(key) {
return this.data.get(key) || null;
}
async set(key, value) {
this.data.set(key, value);
}
async delete(key) {
this.data.delete(key);
}
}
exports.MemoryStorage = MemoryStorage;
//# sourceMappingURL=MemoryStorage.js.map