import { z } from "zod";
import type * as smoltalk from "smoltalk";
import { MemoryGraph } from "./graph.js";
export declare const ExtractionResultSchema: z.ZodObject<{
    entities: z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        type: z.ZodString;
        observations: z.ZodArray<z.ZodString>;
    }, z.core.$strip>>;
    relations: z.ZodArray<z.ZodObject<{
        from: z.ZodString;
        to: z.ZodString;
        type: z.ZodString;
    }, z.core.$strip>>;
    expirations: z.ZodArray<z.ZodObject<{
        entityName: z.ZodString;
        observationContent: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type ExtractionResult = z.infer<typeof ExtractionResultSchema>;
/**
 * Validate that an LLM extraction response has the shape we expect.
 * Returns null on JSON-parse failure or schema mismatch so the caller
 * can safely skip rather than throw.
 */
export declare function parseExtractionResult(text: string): ExtractionResult | null;
export declare function buildExtractionPrompt(messages: smoltalk.Message[], graph: MemoryGraph): string;
/**
 * One newly-added observation. `entityId` is captured at add-time
 * (the entity is in scope where `addObservation` is called) so
 * downstream consumers — the obs→entity reverse index in
 * `MemoryCacheEntry` — can register the pair in O(1) instead of
 * scanning the whole graph to find which entity owns each obs id.
 */
export type NewObservation = {
    id: string;
    entityId: string;
};
export type ApplyExtractionOutcome = {
    newObservations: NewObservation[];
    expiredObservationIds: string[];
};
export declare function applyExtractionResult(graph: MemoryGraph, result: ExtractionResult, source: string): ApplyExtractionOutcome;
