/** * Memory kinds a reflection pass may distill (P5.1 `negotiator_memories.kind`). * Plain text at the DB level (55P04 lesson) — adding kinds is code-only. * * IND-550: moved here from negotiation.reflect.ts so the domain layer owns the * vocabulary and the application-layer reflector can import it without a cycle. */ export declare const NEGOTIATOR_MEMORY_KINDS: readonly ["playbook", "disclosure_rule", "counterparty_dossier", "threshold"]; export type DistilledMemoryKind = (typeof NEGOTIATOR_MEMORY_KINDS)[number]; /** * A single memory entry as injected into prompts. A projection of the * `negotiator_memories` row: content + kind + confidence only — ids, * embeddings, and provenance never enter the prompt. */ export interface NegotiatorMemoryEntry { kind: DistilledMemoryKind; content: string; /** Anti-poisoning weight (0..1); rendered so the model can weigh hints. */ confidence?: number; } /** Where a retrieval is happening — lets the read service tune top-k/scope. */ export type NegotiatorMemoryScope = "screen" | "turn"; /** Query the graph hands to the injected retrieval function. */ export interface NegotiatorMemoryQuery { /** The user whose negotiator's own memory is being retrieved. */ userId: string; /** The other side of this negotiation (dossier subject). */ counterpartyUserId: string; /** Free-text similarity query (seed reasoning + counterparty context). */ queryText: string; scope: NegotiatorMemoryScope; } /** * Injected retrieval seam (services/api implements it over the * `negotiator_memories` store). MUST resolve to `[]` on any failure or when * `NEGOTIATOR_MEMORY_INJECT` is off — memory must never break a negotiation. */ export type NegotiatorMemoryRetrieveFn = (query: NegotiatorMemoryQuery) => Promise; export interface RenderNegotiatorMemoryOptions { /** * When true (screen node), instructs the model to reflect memory influence * into `evidence.memoryHints` — without copying sensitive text verbatim. */ memoryHintsInstruction?: boolean; } /** * Renders the private negotiator-memory section for counterparty-facing * prompts (the negotiation turn agent and the screen gate). * * Disclosure rules are HARD constraints — never soft hints; everything else * is advisory, weighted by confidence. The section leads with the leak * guard: memory text must never reach counterparty-visible fields. * * @returns Empty string when there are no entries (byte-identical prompts). */ export declare function renderNegotiatorMemorySection(entries: NegotiatorMemoryEntry[], opts?: RenderNegotiatorMemoryOptions): string; /** * Renders the memory section for the negotiator CHAT persona — the audience * is the client themself, so disclosure rules are their own standing * instructions (context, not secrets), and the client's live word always * outranks a stored note. * * @returns Empty string when there are no entries (byte-identical prompts). */ export declare function renderNegotiatorChatMemorySection(entries: NegotiatorMemoryEntry[]): string;