import { AgentTool, GlobalBrainConfig, GlobalBrainStats, GlobalEntry, BrainTimelineEvent, ScoredGlobalEntry } from '../types.js'; /** * Singleton Global Brain — the source of truth for all projects + agents. * * Storage: JSON file at ~/.shadow-brain/global.json (zero new deps). * In-memory Map keyed by entry.id for O(1) ID lookups. */ export declare class GlobalBrain { private static instance; private config; private entries; private projects; private agents; private writeQueue; private syncTimer; private stats; private startedAt; private initialized; private dirty; private constructor(); static getInstance(config?: Partial): GlobalBrain; init(): Promise; /** Generate a stable project ID from absolute path */ static projectIdFor(rootDir: string): string; registerProject(rootDir: string, name?: string): string; registerAgent(agent: AgentTool): void; /** Queue a write — resolves true on success */ write(entry: Omit): Promise; /** Direct synchronous write — bypasses queue */ writeSync(entry: Omit): string; /** Broadcast a memory-write to the realtime activity bus (best-effort). */ private publishWrite; /** Recall entries — cross-project + cross-agent */ recall(opts?: { projectId?: string; agentTool?: AgentTool; category?: string; keywords?: string[]; limit?: number; minImportance?: number; }): GlobalEntry[]; /** * Recall entries with a per-entry confidence score (v6.3.0). * * Same matching as recall(), but each result carries a RecallConfidence so * the consuming agent can weight memories by recency, author importance, * cross-agent corroboration, prior usage, and keyword relevance rather than * trusting every hit equally. Ordering switches from raw keyword score to * blended confidence so the most trustworthy memories surface first. */ recallScored(opts?: { projectId?: string; agentTool?: AgentTool; category?: string; keywords?: string[]; limit?: number; minImportance?: number; minConfidence?: number; }): ScoredGlobalEntry[]; /** Blend recall signals into a single confidence score in [0,1]. */ private computeConfidence; /** Bump access count for an entry */ touch(id: string): void; recallByIds(ids: string[]): GlobalEntry[]; /** Chronological proof stream for dashboards, handoffs, and launch demos. */ timeline(opts?: { projectId?: string; agentTool?: AgentTool; category?: string; limit?: number; }): BrainTimelineEvent[]; getStats(): GlobalBrainStats; /** Absolute path to the on-disk brain store — used by the dashboard file watcher. */ get dbPath(): string; /** Force a sync of pending writes to disk */ sync(): Promise; private maybeAutoMaintenance; /** Auto-prune: drop low-importance, rarely-accessed entries when over threshold */ private prune; private persist; private startSyncLoop; private refreshStats; private estimateSizeMB; shutdown(): Promise; } export declare function getGlobalBrain(config?: Partial): GlobalBrain; //# sourceMappingURL=global-brain.d.ts.map