/**
 * Shared Context
 *
 * Thread-safe shared memory for inter-agent communication.
 * Supports versioning and conflict detection.
 */
import { EventEmitter } from 'events';
export interface ContextEntry {
    key: string;
    value: unknown;
    version: number;
    updatedBy: string;
    updatedAt: Date;
}
export declare class SharedContext extends EventEmitter {
    private store;
    private locks;
    /**
     * Get a value
     */
    get<T = unknown>(key: string): T | undefined;
    /**
     * Set a value with conflict detection
     */
    set(key: string, value: unknown, agentId: string, expectedVersion?: number): boolean;
    /**
     * Lock a key for exclusive access
     */
    lock(key: string, agentId: string): boolean;
    /**
     * Unlock a key
     */
    unlock(key: string, agentId: string): boolean;
    /**
     * Get version of a key
     */
    getVersion(key: string): number;
    /**
     * Get all keys
     */
    keys(): string[];
    /**
     * Get all entries
     */
    entries(): ContextEntry[];
    /**
     * Check if key exists
     */
    has(key: string): boolean;
    /**
     * Delete a key
     */
    delete(key: string): boolean;
    /**
     * Clear all
     */
    clear(): void;
    /**
     * Get snapshot for serialization
     */
    snapshot(): Record<string, unknown>;
}
