/** * Wrap a {@link import("./index.js").LiteCtx} as a host `Store` (`{ store, search, get, delete }`). * @param {import("./index.js").LiteCtx} lc an indexed LiteCtx instance (its own dbPath = isolation) * @param {{ kind?: string }} [opts] default write/search kind (default `"fact"`) * @returns {{ * store(content: string, metadata?: Record): Promise, * search(query: string, options?: Record): Promise, score: number }>>, * get(id: string): { id: string, content: string|null, metadata: Record } | null, * delete(id: string): void, * }} * @category memory * @when Plug litectx in as a host's memory Store — adapts a LiteCtx to the `{ store, search, get, delete }` shape (e.g. bareagent's socket). * @fails Does not throw itself; the returned methods surface litectx's own errors (e.g. `strictScope`). * @signature liteCtxAsStore(lc: LiteCtx, opts?: { kind? }) => { store, search, get, delete } * @example * import { LiteCtx, liteCtxAsStore } from 'litectx' * const store = liteCtxAsStore(new LiteCtx({ root: process.cwd() })) * const id = await store.store('a durable fact', { tag: 'pref' }) */ export function liteCtxAsStore(lc: import("./index.js").LiteCtx, opts?: { kind?: string; }): { store(content: string, metadata?: Record): Promise; search(query: string, options?: Record): Promise; score: number; }>>; get(id: string): { id: string; content: string | null; metadata: Record; } | null; delete(id: string): void; };