/** * Episode get / list / update / delete over agentdb 3.3's ReflexionMemory (ADR-520). * * Episodes are what session ends and `memory distill` record, and what * `agentdb_episode-recall` searches. agentdb 3.3 keeps the id on update and moves the row, * embedding, vector entry and keyword index together; this module only validates, bounds * what goes back over MCP, and feature-detects older agentdb builds. * * @module v3/cli/memory/episode-crud */ export declare const EPISODE_CRUD_UNAVAILABLE = "Episode get/list/update/delete needs agentdb >= 3.3.0 with ReflexionMemory available."; export interface EpisodeView { id: number; sessionId: string; task: string; input?: string; output?: string; critique?: string; reward: number; success: boolean; latencyMs?: number; tokensUsed?: number; tags?: string[]; metadata?: Record; ts?: number; } export interface EpisodePatch { task?: string; input?: string | null; output?: string | null; critique?: string | null; reward?: number; success?: boolean; tags?: string[] | null; metadata?: Record | null; } export type CrudResult = { success: true; } & T | { success: false; error: string; }; /** Strict positive integer id. "12-notes" must never reach a delete as 12. */ export declare function parseEpisodeId(value: unknown): number | null; export declare function bridgeGetEpisode(id: number, dbPath?: string): Promise | null>; export declare function bridgeListEpisodes(options: { sessionId?: string; success?: boolean; limit?: number; offset?: number; order?: 'newest' | 'oldest'; }, dbPath?: string): Promise | null>; export declare function bridgeUpdateEpisode(id: number, patch: EpisodePatch, options?: { replaceMetadata?: boolean; }, dbPath?: string): Promise | null>; export declare function bridgeDeleteEpisode(id: number, dbPath?: string): Promise | null>; //# sourceMappingURL=episode-crud.d.ts.map