import type { MemoryEntry, RemembersOverride, RemembersSpec, UserMemory } from './types.js'; /** * In-process, Map-backed {@link UserMemory}. Ships in the runtime-agnostic * main entry — same pattern as {@link MemoryConversationStore}. Suitable * for tests and dev; production apps configure an ORM- or * embedding-backed store via `AiConfig.memory`. * * `recall()` uses case-insensitive **token-overlap** matching against * `fact + tags`: the query is tokenized on non-alphanumeric boundaries * and any fact sharing at least one token (≥3 chars) is returned. This * lets natural-language queries like "what is my project?" pull facts * containing "project" without forcing the caller to extract keywords. * Matches return in insertion order with no scoring (binary yes/no). * Tag filters apply before the token check — they intersect with the * entry's own tags. */ export declare class MemoryUserMemory implements UserMemory { private readonly entries; remember(userId: string, fact: string, opts?: { tags?: string[]; score?: number; }): Promise; recall(userId: string, query: string, opts?: { limit?: number; tags?: string[]; }): Promise; forget(userId: string, factId: string): Promise; list(userId: string, opts?: { tags?: string[]; limit?: number; }): Promise; forgetAll(userId: string): Promise; private allForUser; } /** * Resolves the effective {@link RemembersSpec} for a single * `prompt()` / `stream()` call. Returns `null` when memory should be * skipped for this call. * * Precedence (high → low): * 1. Per-call `options.memory` — `false` opts out, a spec replaces the * agent's declaration. * 2. Agent's `remembers()` — supports sync OR async returns. * * Mirrors {@link resolveAutoPersistSpec} so Phase 2's auto-inject * middleware can drop in alongside the conversation-persistence flow. */ export declare function resolveRemembersSpec(agentDecl: () => false | RemembersSpec | Promise, perCall: RemembersOverride | undefined): Promise; /** * Lookup signature used by Phase 2/3 middleware to find the registered * {@link UserMemory} without taking a hard dep on `agent.ts`. Wired to * `setUserMemory()` / `AiProvider`'s `ai.memory` DI binding. */ export type UserMemoryLookup = () => UserMemory | null | undefined; //# sourceMappingURL=memory.d.ts.map