import { type Fact, type Memory, type Scopes, type StructuredStore, type VectorStore, type EmbeddingProvider, type LLMProvider, type Logger } from '@kybernesis/arcana-contracts'; export interface StoreMemoryInput { content: string; title?: string; summary?: string; tags?: string[]; source: Memory['source']; scopes?: Scopes; } export interface IngestDocumentInput { format: 'markdown' | 'pdf' | 'docx' | 'csv' | 'html' | 'plain'; content: string | Uint8Array; filename?: string; scopes?: Scopes; } export interface IngestDeps { structured: StructuredStore; vector: VectorStore; embed: EmbeddingProvider; llm: LLMProvider; logger: Logger; } export interface IngestApi { /** Persist a memory and return its assigned id. */ storeMemory(input: StoreMemoryInput): Promise; /** Convert + chunk + ingest a document. Returns the new memory id. */ ingestDocument(input: IngestDocumentInput): Promise; /** * Extract facts from a stored memory via LLM. Ports KyberBot's real-time * extractor (`fact-extractor.ts:38-163`). Stores each validated fact with * `sourceMemoryId` backlink + `sourcePath` / `sourceConversationId` * threaded from memory metadata. Returns the persisted Fact[]. Never * throws — LLM/parse errors yield an empty array. */ extractFacts(memoryId: string): Promise; } /** * v0.x implementation of `storeMemory`. Scope-locked to the canonical row * write: build a complete Memory with defaults, validate, persist via the * StructuredStore, return the id. * * Deliberately NOT included at this milestone (will land when retrieval * actually needs them): * - chunking + embedding (depends on EmbeddingProvider + VectorStore) * - fact extraction (depends on LLMProvider) * - contradiction detection * - eager edge creation * * Those land when KyberBot's retrieval/fact code paths demand them. * For dual-write today (timeline.ts mirror), the canonical row write is * sufficient. */ export declare function createIngest(deps: IngestDeps): IngestApi; //# sourceMappingURL=index.d.ts.map