import type { BlackboardEntry, TwiningConfig } from "../utils/types.js"; import type { Embedder } from "../embeddings/embedder.js"; import { type SearchEngine, type BlackboardSearchResult } from "../embeddings/search.js"; import type { Archiver } from "./archiver.js"; import type { GraphAutoPopulator } from "./graph-auto-populator.js"; import type { IAgentStore, IBlackboardStore, IIndexManager } from "../storage/interfaces.js"; export declare class BlackboardEngine { /** * IDs of entries posted through THIS engine instance โ€” i.e. by the calling * session, since the stdio server is one process per session. The exact * self-authorship signal for assemble's lane marking (field D12): a * timestamp heuristic mislabels concurrent sessions sharing the store, * and agent_id is a role label, not an identity. */ readonly sessionPostIds: Set; private readonly store; private readonly embedder; private readonly indexManager; private readonly searchEngine; private readonly projectRoot; private archiver; private archiveThreshold; private archiveRetain; private graphPopulator; private agentStore; constructor(store: IBlackboardStore, embedder?: Embedder | null, indexManager?: IIndexManager | null, searchEngine?: SearchEngine | null, projectRoot?: string | null); /** Inject archiver for threshold-based auto-archiving (spec ยง6.1.3). */ setArchiver(archiver: Archiver, config: TwiningConfig): void; /** Inject graph auto-populator for relation extraction from posts. */ setGraphPopulator(populator: GraphAutoPopulator): void; /** Inject agent store for registry auto-touch on writes (#32). */ setAgentStore(agentStore: IAgentStore): void; /** * Best-effort registry touch for a writing agent (#32). Fire-and-forget: * a registry failure must never fail the write. "unknown" is skipped โ€” * a shared record for identity-less callers would aggregate unrelated * agents into noise (same call as the subagent-stop hook's silence). */ touchAgent(agentId: string | undefined): void; /** Post a new blackboard entry with validation and defaults. */ post(input: { entry_type: string; summary: string; detail?: string; tags?: string[]; scope?: string; relates_to?: string[]; agent_id?: string; origin?: "narration" | "discovery"; _internal?: boolean; _skipAutoArchive?: boolean; }): Promise<{ id: string; timestamp: string; }>; /** Read blackboard entries with optional filters. */ read(filters?: { entry_types?: string[]; tags?: string[]; scope?: string; since?: string; limit?: number; }): Promise<{ entries: BlackboardEntry[]; total_count: number; }>; /** Semantic search across blackboard entries. Default limit: 10. */ query(query: string, options?: { entry_types?: string[]; limit?: number; }): Promise<{ results: BlackboardSearchResult[]; /** Pre-slice count of matches above the noise floor (field D9). */ total_matched: number; /** Which generation of count semantics this response carries (ask 2). */ count_semantics: string; fallback_mode: boolean; }>; /** Get the N most recent entries, optionally filtered by type. */ recent(n?: number, entry_types?: string[]): Promise<{ entries: BlackboardEntry[]; }>; /** Dismiss (remove) blackboard entries by ID. Cleans up embeddings if available. */ dismiss(ids: string[]): Promise<{ dismissed: string[]; not_found: string[]; }>; /** * Mark entries resolved (D2) โ€” the record-preserving exit from the open * lane. Embeddings are untouched: the entry's text is unchanged and * resolved entries remain searchable history. */ resolve(ids: string[], opts?: { agent_id?: string; note?: string; }): Promise<{ resolved: string[]; not_found: string[]; }>; } //# sourceMappingURL=blackboard.d.ts.map