import { type CandidatesFilter } from "../lib/filter-token.js"; /** * memory-find-candidates — deterministic bulk-delete selector. * * Closes the 2026-04-22 failure class where the admin agent authored a * selection cypher against a schema it had not loaded (`[:HAS_MESSAGE]` * instead of `[:PART_OF]`), producing a vacuously-true filter that trashed * 175 Conversation nodes (69 with real user content). The fix removes the * LLM from the selection predicate: the agent chooses a filter name from a * fixed set, and the server runs the canonical cypher. * * Two filters ship in v1: * - `empty` — zero `(m:Message)-[:PART_OF]->(c:Conversation)` Messages * - `single-assistant` — exactly one `:PART_OF` Message, with `role='assistant'` * * A third filter `no-real-user-input` is deferred — its content-match * predicate has a distinct false-positive risk profile. * * The returned `filterToken` is a signed opaque bundle that `memory-delete` * re-verifies at trash time. There is no path by which the agent can feed a * hand-rolled list to `memory-delete` with a token — the token only exists * when `memory-find-candidates` minted it, and the server re-runs the same * predicate on each elementId before trashing. */ export interface MemoryFindCandidatesParams { accountId: string; filter: CandidatesFilter; agentType?: "admin" | "public"; limit?: number; dryRun?: boolean; } export interface MemoryFindCandidatesItem { elementId: string; sessionId: string | null; assistantMsgCount: number; realUserMsgCount: number; firstUserMsgPreview: string | null; trashedAt: string | null; } export interface MemoryFindCandidatesResult { filter: CandidatesFilter; agentType?: "admin" | "public"; matched: number; sampled: number; items: MemoryFindCandidatesItem[]; filterToken: string; dryRun: boolean; } /** Server-side re-check for `memory-delete` token verification. */ export declare function reverifyCandidate(params: { session: import("neo4j-driver").Session; accountId: string; filter: CandidatesFilter; agentType?: "admin" | "public"; elementId: string; }): Promise; export declare function memoryFindCandidates(params: MemoryFindCandidatesParams): Promise; //# sourceMappingURL=memory-find-candidates.d.ts.map