import { EventEmitter } from 'events'; /** A single realtime activity event broadcast across the brain. */ export interface BrainActivityEvent { /** Stable, composite id used for dedup. Convention: `${type}:${nativeId}`. */ id: string; /** Epoch milliseconds. Kept as a number for clean JSON over the wire. */ ts: number; /** Event kind, e.g. 'memory-write' | 'dream' | 'seed-draft' | 'collision'. */ type: string; /** Where it came from — an agent tool name, engine name, etc. */ source: string; /** Short human-readable description (already truncated by the caller). */ detail: string; /** Optional structured payload for richer UI rendering. */ meta?: Record; } export declare class BrainBus extends EventEmitter { private static instance; private ring; private seen; private seenOrder; private constructor(); static getInstance(): BrainBus; /** * Publish an activity event. Returns true if it was broadcast, false if it * was suppressed as a duplicate (same id already seen recently). */ publish(ev: Partial & Pick): boolean; /** Most recent events, newest first (matches the activity-log API ordering). */ recent(limit?: number): BrainActivityEvent[]; /** * Subscribe to live activity. Returns an unsubscribe function so callers * (e.g. the dashboard server) can detach cleanly on shutdown. */ subscribe(fn: (ev: BrainActivityEvent) => void): () => void; /** Test/maintenance helper — clears buffers and dedup state. */ reset(): void; } export declare function getBrainBus(): BrainBus; //# sourceMappingURL=brain-bus.d.ts.map