/**
 * SharedStateBus provides a centralized bus for inter-runtime communication.
 * Allows Bash, Python, and JavaScript runtimes to publish and subscribe to state changes.
 */
export type BusEvent = {
    type: string;
    source: string;
    payload: unknown;
    timestamp: number;
};
export type BusCallback = (event: BusEvent) => void;
export type BusErrorHandler = (type: string, error: unknown) => void;
export declare class SharedStateBus {
    private listeners;
    private state;
    private onError;
    setErrorHandler(handler: BusErrorHandler): void;
    publish(type: string, source: string, payload: unknown): void;
    publishTyped<T>(type: string, source: string, payload: T): void;
    subscribe(type: string, callback: BusCallback): () => void;
    setState(key: string, value: unknown, source?: string): void;
    getState(key: string): unknown;
    getStateAs<T>(key: string): T | undefined;
    reset(): void;
    destroy(): void;
    subscriberCount(): number;
}
