/** * Persistence for Observational Memory entries. * * Owner-scoped throughout: every read and write takes an `ownerEmail` and the * SQL always filters by it, so the ownable table is never read or written * cross-owner (per the `security` skill). Uses `getDbExec()` and * parameterized SQL, never string interpolation of user data. * of user data. * * `ensureTable()` lazily creates the table on first use (the same belt-and- * suspenders pattern as `chat-threads/store.ts`), so OM works in tests and at * runtime even before the migration plugin is registered. */ import type { ObservationalMemoryEntry, ObservationalMemoryOwner, ObservationalMemoryTier } from "./types.js"; export declare const observationalMemoryStore: import("../../db/store-registry.js").Store; export declare function ensureTable(): Promise; export declare function __resetObservationalMemoryTableCache(): void; export interface InsertObservationalMemoryInput extends ObservationalMemoryOwner { threadId: string; tier: ObservationalMemoryTier; text: string; tokenEstimate: number; sourceStartIndex?: number | null; sourceEndIndex?: number | null; sourceMessageCount?: number; visibility?: "private" | "org" | "public"; } export declare function insertObservationalMemory(input: InsertObservationalMemoryInput): Promise; export interface ListObservationalMemoryOptions extends ObservationalMemoryOwner { threadId: string; tier?: ObservationalMemoryTier; } export declare function listObservationalMemory(options: ListObservationalMemoryOptions): Promise; export declare function getObservedThroughIndex(options: ObservationalMemoryOwner & { threadId: string; }): Promise; export declare function getObservationLogTokens(options: ObservationalMemoryOwner & { threadId: string; }): Promise;