/** * Persistent key/value store for facts an agent should remember across * sessions — borrower preferences, prior outcomes, learned task history. * * Distinct from `SessionEntry` (which is the audit log): memory is for * *recall*, entries are for *audit*. Memory writes do NOT land in the * session log, so they don't pollute prompt context unless the agent * explicitly reads them. * * Tenancy: every operation accepts an optional `tenantId`. Two tenants * with the same `key` get isolated values. `tenantId` defaults to the * empty string for non-tenant deployments. */ export interface SessionMemoryEntry { key: string; value: TValue; tenantId?: string; updatedAt: string; metadata?: Record; /** ISO timestamp when this entry expires; undefined = no expiry. */ expiresAt?: string; } export interface SessionMemorySetInput { key: string; value: TValue; tenantId?: string; metadata?: Record; /** Time-to-live in seconds. When set, expiresAt is computed automatically. */ ttlSeconds?: number; } export interface SessionMemoryFilter { tenantId?: string; /** Glob-style key prefix filter (e.g. `borrower:*`). */ keyPrefix?: string; /** Newer-than cutoff (ISO timestamp). */ since?: string; /** Cap on returned rows. */ limit?: number; } export interface SessionMemoryGetOptions { tenantId?: string; } export interface SessionMemory { get(key: string, opts?: SessionMemoryGetOptions): Promise | undefined>; set(input: SessionMemorySetInput): Promise; delete(key: string, opts?: SessionMemoryGetOptions): Promise; list(filter?: SessionMemoryFilter): Promise; } /** * Process-local in-memory implementation. Default when `init({ memory })` * is not configured — pair with Postgres for durability across restarts. */ export declare function inMemorySessionMemory(): SessionMemory; //# sourceMappingURL=session-memory.d.ts.map