ccguard
Version:
Automated enforcement of net-negative LOC, complexity constraints, and quality standards for Claude code
73 lines • 2.25 kB
TypeScript
import { Storage } from '../storage/Storage';
import { SessionStats, HotConfig, OperationRecord, GuardConfig } from '../contracts';
import { ConfigLoader } from '../config/ConfigLoader';
import { SnapshotManager } from '../snapshot/SnapshotManager';
export declare class GuardManager {
private storage;
private configLoader?;
private rootDir;
private snapshotManager?;
private hotConfigLoader?;
private historyManager;
constructor(storage: Storage, configLoader?: ConfigLoader | undefined, rootDir?: string);
isEnabled(): Promise<boolean>;
enable(): Promise<void>;
disable(): Promise<void>;
getSessionStats(): Promise<SessionStats | null>;
updateSessionStats(linesAdded: number, linesRemoved: number): Promise<SessionStats>;
resetStats(): Promise<void>;
takeSnapshot(sessionId?: string): Promise<{
totalLoc: number;
fileCount: number;
timestamp: string;
}>;
/**
* Check if the system is configured for snapshot mode
*/
isSnapshotMode(): boolean;
/**
* Get the snapshot manager instance
*/
getSnapshotManager(): SnapshotManager | undefined;
/**
* Get the current configuration (including hot config overrides)
*/
getConfig(): Promise<GuardConfig>;
/**
* Update hot configuration
*/
updateHotConfig(updates: Partial<HotConfig>): Promise<void>;
/**
* Get hot configuration
*/
getHotConfig(): Promise<HotConfig | null>;
/**
* Add operation to history
*/
addOperationToHistory(record: Omit<OperationRecord, 'timestamp'>): Promise<void>;
/**
* Get recent operations from history
*/
getRecentOperations(limit?: number): Promise<OperationRecord[]>;
/**
* Clear operation history
*/
clearHistory(): Promise<void>;
/**
* Lock a file from modifications
*/
lockFile(filePath: string): Promise<void>;
/**
* Unlock a file
*/
unlockFile(filePath: string): Promise<void>;
/**
* Check if a file is locked
*/
isFileLocked(filePath: string): Promise<boolean>;
/**
* Get all locked files
*/
getLockedFiles(): Promise<string[]>;
}
//# sourceMappingURL=GuardManager.d.ts.map