/** * Memory capture pipeline: * - zero-LLM session summaries at session end (metadata only, free) * - /flush — LLM capture of the session's durable learnings * - trading capture — journal + thesis entries on trade execution */ import type { Dialogue } from '../agent/types.js'; import type { ModelClient } from '../agent/llm.js'; /** * Metadata-only session summary — no LLM call, no latency, no cost. * Trivial sessions (fewer than 3 substantive prompts) are skipped. */ export declare function writeSessionMetadataSummary(opts: { workDir: string; sessionId: string; history: Dialogue[]; costUsd?: number; }): boolean; /** /flush — LLM capture of the session's durable content into a session log. */ export declare function flushSessionMemory(opts: { client: ModelClient; model: string; workDir: string; sessionId: string; history: Dialogue[]; signal?: AbortSignal; }): Promise; export interface TradeMemoryEvent { kind: 'open' | 'close' | 'bet'; chain: string; address: string; asset: string; amountUsd?: number; thesis?: string; pnlUsd?: number; /** Reference into trades.jsonl / tx hash for the audit trail. */ ref?: string; } /** Append a curated journal entry (and thesis file on opens with a thesis). */ export declare function captureTradeEvent(event: TradeMemoryEvent): void;