import { M as MemoryBundle, F as FormatContextOptions, G as GraphNeighborhood, a as MemoryDump, b as FormattedMemoryDump, O as OntologyManifest, R as ReadOptions, S as SQLiteAdapter, W as WikiOptions, c as WikiMemory } from './testing-Bk8J6QLX.mjs'; export { E as EntityStatus, d as ExtractedFact, e as ExtractedFactEdge, f as ExtractedFactWithOntology, g as ExtractedTask, h as GraphTraversalOptions, H as HOOK_TIMEOUT_MARKER, L as LLMProvider, i as ONTOLOGY_BACKFILL_BATCH_SIZE, j as ONTOLOGY_BACKFILL_MAX_PROMPT_CHARS, k as ONTOLOGY_BACKFILL_RECHECK_MS, l as OntologyBackfillResult, m as OntologyConfig, n as OntologyEdgeType, o as OntologyMode, p as OntologyNodeType, q as OntologyPromptContext, r as OntologyUpdates, P as PromptOverrides, s as PromptService, t as PrunePartialFailureError, V as VectorRanker, u as VectorRankerFallback, v as VectorRankerRankArgs, w as VectorRankerSemanticResult, x as WikiBusyError, y as WikiBusyOperation, z as WikiCheckpoint, A as WikiConfig, B as WikiEdge, C as WikiEvent, D as WikiFact, I as WikiMemoryTestAccess, J as WikiOutboxEvent, K as WikiTask, N as WikiTransactionError } from './testing-Bk8J6QLX.mjs'; import { OkfFile } from '@equationalapplications/core-okf'; import 'minisearch'; declare function formatContext(bundle: MemoryBundle, options?: FormatContextOptions): string; /** * Pure presenter — dense text serialization of a GraphNeighborhood for LLM prompt * injection. Deterministic: same input always produces byte-identical output * (matters for prompt caching). */ declare function formatGraphContext(neighborhood: GraphNeighborhood): string; declare function formatMemoryDump(dump: MemoryDump): FormattedMemoryDump; declare function formatOkfBundle(dump: MemoryDump): { files: OkfFile[]; }; interface OkfImportOptions { typeMapping?: Record; defaultSchema?: 'fact' | 'task' | 'ignore'; } declare function parseOkfBundle(entityId: string, files: OkfFile[], options?: OkfImportOptions): MemoryDump; declare function parseEmbedding(blob: Uint8Array | null | undefined, text: string | null | undefined): Float32Array | null; declare function validateManifest(manifest: OntologyManifest): void; type GetRandomValues = (bytes: Uint8Array) => void; /** * Inject a platform-specific `getRandomValues` implementation. * Call this once at module load time from the platform adapter * (e.g. expo-crypto's getRandomValues) when the global `crypto` API is * absent — Hermes / React Native being the primary case. * Pass `null` to clear a previously injected source. */ declare function configureRandomSource(fn: GetRandomValues | null): void; interface LibrarianOptions { /** If provided, replaces the default Librarian system instructions. */ systemPrompt?: string; /** entity_id -> score multiplier, forwarded to WikiMemory.read() as tierWeights. */ entityWeights?: Record; /** Forwarded to WikiMemory.read() for zero-weight filler context. */ includeZeroWeightEntities?: boolean; temperature?: number; } interface LibrarianPromptVariables { context: string; tasks: string; query: string; } declare const DEFAULT_LIBRARIAN_SYNTHESIS_PROMPT = "You are a careful memory synthesis assistant.\nUse only the retrieved context when answering the request.\nPreserve source provenance when facts come from different entity namespaces.\n\nRequest:\n{{query}}\n\nRetrieved context:\n{{context}}\n\nOpen tasks:\n{{tasks}}"; declare function hydrateLibrarianPrompt(template: string, variables: LibrarianPromptVariables): string; declare function validateLibrarianPromptTemplate(template: string, options: { custom: boolean; taskCount: number; }): string[]; declare function mapLibrarianOptionsToReadOptions(options: LibrarianOptions): Pick; declare const ONTOLOGY_BACKFILL_SYSTEM_PROMPT = "You are a knowledge classification agent. You will receive existing memory facts that currently have no ontology type. For each input fact { \"id\", \"title\", \"body\", \"tags\" }, assign the best matching okf_type from the ontology manifest and optionally propose edges to related facts by title.\nReturn ONLY a valid JSON object matching this schema:\n{\n \"classifications\": [\n { \"id\": \"string (input fact id, copied verbatim)\", \"okf_type\": \"string (manifest node type slug)\", \"edges\": [{ \"edge_type\": \"string\", \"target_title\": \"string\" }] }\n ]\n}\nIf no manifest type fits a fact, omit that fact from \"classifications\" entirely \u2014 do not guess.\nDo not return markdown, just raw JSON."; declare function createWiki(db: SQLiteAdapter, options: WikiOptions): WikiMemory; export { DEFAULT_LIBRARIAN_SYNTHESIS_PROMPT, FormatContextOptions, FormattedMemoryDump, GraphNeighborhood, type LibrarianOptions, type LibrarianPromptVariables, MemoryBundle, MemoryDump, ONTOLOGY_BACKFILL_SYSTEM_PROMPT, type OkfImportOptions, OntologyManifest, ReadOptions, SQLiteAdapter, WikiMemory, WikiOptions, configureRandomSource, createWiki, formatContext, formatGraphContext, formatMemoryDump, formatOkfBundle, hydrateLibrarianPrompt, mapLibrarianOptionsToReadOptions, parseEmbedding, parseOkfBundle, validateLibrarianPromptTemplate, validateManifest };