/**
 * Reasoning-trace memory structural types (issue #564).
 *
 * Captures stored solution chains / chain-of-thought the user walked through
 * to solve a problem. Traces have an ordered list of steps, a final answer,
 * and an optional observed outcome.
 */
interface ReasoningTraceStep {
    /** 1-based ordinal within the trace. */
    order: number;
    /** Human-readable description of what happened at this step. */
    description: string;
}
interface ReasoningTraceStructuredData {
    steps: ReasoningTraceStep[];
    finalAnswer: string;
    /** Optional confirmation of how the answer played out in practice. */
    observedOutcome?: string;
}
/** Normalize loose extraction JSON into ReasoningTraceStep records. */
declare function normalizeReasoningTraceSteps(raw: unknown): ReasoningTraceStep[];
/**
 * Normalize a loose reasoningTrace object (e.g. coming back from the LLM) to
 * a strict ReasoningTraceStructuredData shape. Returns null when the data is
 * clearly incomplete (no steps or no final answer).
 */
declare function normalizeReasoningTrace(raw: unknown): ReasoningTraceStructuredData | null;
/**
 * Serialize a normalized reasoning trace into a human-readable markdown body.
 * Output shape mirrors the procedure body format: ## Step N sections followed
 * by final answer and optional observed outcome.
 */
declare function buildReasoningTraceMarkdownBody(trace: ReasoningTraceStructuredData): string;
/**
 * Combine a short title with the structured trace body. The title becomes the
 * one-line content of the stored memory, and the full body is appended below.
 */
declare function buildReasoningTracePersistBody(title: string, trace: ReasoningTraceStructuredData): string;
/**
 * Best-effort parse of a reasoning-trace markdown body back into structured
 * data. Returns null when the document does not look like a reasoning trace.
 */
declare function parseReasoningTraceFromBody(content: string): ReasoningTraceStructuredData | null;
/**
 * Heuristic detector for whether a user message contains a chain-of-thought /
 * solution trace that should be extracted. This is intentionally conservative:
 * we require at least two explicitly-ordered steps and some form of final
 * answer / resolution. Used by the extraction pipeline to decide whether to
 * even consider emitting a reasoning_trace fact, so false positives are more
 * costly than false negatives.
 */
declare function looksLikeReasoningTrace(message: string): boolean;

export { type ReasoningTraceStep, type ReasoningTraceStructuredData, buildReasoningTraceMarkdownBody, buildReasoningTracePersistBody, looksLikeReasoningTrace, normalizeReasoningTrace, normalizeReasoningTraceSteps, parseReasoningTraceFromBody };
