export type Namespace = string[]; export type StoreKey = string; export interface StoreItem { namespace: Namespace; key: StoreKey; value: T; createdAt: number; updatedAt: number; /** TTL in ms — item expires after this many ms from updatedAt */ ttl?: number; } export interface SearchResult { item: StoreItem; score?: number; } export type EmbedFn = (text: string) => Promise; export declare abstract class BaseStore { abstract get(namespace: Namespace, key: StoreKey): Promise | null>; abstract put(namespace: Namespace, key: StoreKey, value: T, opts?: { ttl?: number; }): Promise; abstract delete(namespace: Namespace, key: StoreKey): Promise; abstract list(namespace: Namespace): Promise; abstract search(namespace: Namespace, query: string, opts?: { limit?: number; filter?: Record; }): Promise[]>; abstract listNamespaces(opts?: { prefix?: Namespace; maxDepth?: number; }): Promise; /** Namespaced helper — returns a scoped accessor */ namespace(ns: Namespace): NamespacedStore; } export declare class InMemoryStore extends BaseStore { private data; private readonly embedFn?; private vectors; private readonly maxItems; constructor(opts?: { embedFn?: EmbedFn; maxItems?: number; }); private key; private isExpired; get(namespace: Namespace, key: StoreKey): Promise | null>; put(namespace: Namespace, key: StoreKey, value: T, opts?: { ttl?: number; }): Promise; delete(namespace: Namespace, key: StoreKey): Promise; list(namespace: Namespace): Promise; search(namespace: Namespace, query: string, opts?: { limit?: number; filter?: Record; }): Promise[]>; listNamespaces(opts?: { prefix?: Namespace; maxDepth?: number; }): Promise; /** Alias for put() — common Map-like convention */ set(namespace: Namespace, key: StoreKey, value: T, opts?: { ttl?: number; }): Promise; /** Number of non-expired items — also purges expired entries from memory */ size(): number; clear(): void; private evictExpired; } export declare class NamespacedStore { private readonly store; private readonly ns; constructor(store: BaseStore, ns: Namespace); get(key: StoreKey): Promise | null>; put(key: StoreKey, value: T, opts?: { ttl?: number; }): Promise; delete(key: StoreKey): Promise; list(): Promise; search(query: string, opts?: { limit?: number; filter?: Record; }): Promise[]>; listNamespaces(opts?: { prefix?: Namespace; maxDepth?: number; }): Promise; /** Alias for put() — common Map-like convention */ set(key: StoreKey, value: T, opts?: { ttl?: number; }): Promise; /** Sub-namespace: users.namespace(["cj"]) → users/cj scope */ namespace(sub: Namespace): NamespacedStore; } export declare class AgentMemoryStore { private store; constructor(baseStore: BaseStore, agentId: string); remember(key: string, value: unknown, ttl?: number): Promise; recall(key: string): Promise; forget(key: string): Promise; recallAll(): Promise; search(query: string, limit?: number): Promise; } //# sourceMappingURL=index.d.ts.map