/**
 * StateManager -- Centralized governance state coordination.
 *
 * Provides a single source of truth for governance state across
 * all modules. Prevents duplicate initialization, manages module
 * lifecycle, and coordinates shared resources.
 *
 * T-024: Shared state manager to prevent fragmented governance state.
 *
 * @connexum/ai-governance
 */
export interface StateManagerConfig {
    /** Base directory for all governance state */
    stateDir: string;
    /** Unique agent identifier */
    agentId: string;
    /** Enable state file locking (default: true) */
    useLocking?: boolean;
    /** State save interval in ms (default: 30000) */
    saveIntervalMs?: number;
}
export interface ModuleState {
    name: string;
    initialized: boolean;
    lastActivity: string;
    data: Record<string, unknown>;
}
export interface GovernanceSnapshot {
    agentId: string;
    version: number;
    modules: Record<string, ModuleState>;
    createdAt: string;
    updatedAt: string;
    checksum: string;
}
export declare class StateManager {
    private config;
    private modules;
    private version;
    private stateFile;
    private lockFile;
    private saveTimer;
    private dirty;
    constructor(config: StateManagerConfig);
    /**
     * Register a governance module.
     */
    registerModule(name: string, initialData?: Record<string, unknown>): void;
    /**
     * Update module state data.
     */
    updateModule(name: string, data: Record<string, unknown>): void;
    /**
     * Get module state.
     */
    getModule(name: string): ModuleState | undefined;
    /**
     * Get data from a specific module.
     */
    getModuleData<T = unknown>(name: string, key: string): T | undefined;
    /**
     * Check if a module is registered and initialized.
     */
    isModuleReady(name: string): boolean;
    /**
     * Deregister a module (cleanup).
     */
    deregisterModule(name: string): boolean;
    /**
     * Get a full snapshot of governance state.
     */
    getSnapshot(): GovernanceSnapshot;
    /**
     * Verify snapshot integrity.
     */
    verifySnapshot(snapshot: GovernanceSnapshot): boolean;
    /**
     * List all registered modules.
     */
    listModules(): string[];
    /**
     * Get module count.
     */
    getModuleCount(): number;
    /**
     * Save state to disk.
     */
    save(): void;
    /**
     * Start periodic auto-save.
     */
    startAutoSave(): void;
    /**
     * Stop auto-save and do a final save.
     */
    stop(): void;
    private loadState;
    private computeChecksum;
    private acquireLock;
    private releaseLock;
}
//# sourceMappingURL=state-manager.d.ts.map