import type { AgentExecutionRefs } from "./transport.js";
export declare const MEMORY_OBSERVATION_HOOK_VALUES: readonly ["prefetch", "sync_turn", "on_pre_compress", "on_session_end", "on_delegation", "on_memory_write"];
export type MemoryObservationHook = (typeof MEMORY_OBSERVATION_HOOK_VALUES)[number];
export declare const MEMORY_OBSERVATION_SOURCE_VALUES: readonly ["turn", "sidechain", "compress", "session-end", "agent-remember", "auto-extract", "implicit-extract", "profile-extraction", "dream"];
export type MemoryObservationSource = (typeof MEMORY_OBSERVATION_SOURCE_VALUES)[number];
export declare const MEMORY_WRITE_ACCESS_VALUES: readonly ["observe-only", "parent-write", "deny"];
export type MemoryWriteAccess = (typeof MEMORY_WRITE_ACCESS_VALUES)[number];
export interface MemoryContextBlock {
    blockId?: string;
    providerId: string;
    kind: "informational-background";
    title?: string;
    text: string;
    citations?: string[];
}
export interface MemoryObservationEnvelope extends AgentExecutionRefs {
    sessionId: string;
    turnId?: string;
    hook: MemoryObservationHook;
    source: MemoryObservationSource;
    writeAccess: MemoryWriteAccess;
    summary?: string;
    metadata?: Record<string, unknown>;
}
export interface MemoryObservedPayload extends MemoryObservationEnvelope {
    providerId: string;
    observedAtMs: number;
    status: "observed" | "failed";
    blocks?: MemoryContextBlock[];
    error?: string;
}
export interface MemoryObservedMsg {
    type: "memory.observed";
    id: string;
    payload: MemoryObservedPayload;
}
export interface MemoryObserveRequestMsg {
    type: "memory.observe";
    id: string;
    payload: MemoryObservationEnvelope;
}
export interface MemoryLlmConfig {
    provider: string;
    baseUrl: string;
    apiKey: string;
    model: string;
}
export interface MemorySearchResult {
    blockId: string;
    text: string;
    score: number;
    source?: string;
    metadata?: Record<string, unknown>;
}
export interface MemorySearchOptions {
    limit?: number;
    minScore?: number;
    llmConfig?: MemoryLlmConfig;
    /** Categories to boost during reranking (e.g. ["lesson", "preference"]). */
    preferredCategories?: string[];
}
export interface MemoryIngestOptions {
    llmConfig?: MemoryLlmConfig;
    source?: string;
    sessionId?: string;
}
export interface MemoryProvider {
    readonly providerId: string;
    search(query: string, userId: string, options?: MemorySearchOptions): Promise<MemorySearchResult[]>;
    ingest(messages: MemoryIngestMessage[], userId: string, options?: MemoryIngestOptions): Promise<void>;
    /** Store a plain text memory entry (no LLM extraction — agent decides content). */
    addText?(text: string, userId: string, options?: MemoryIngestOptions): Promise<{
        memoriesAdded: number;
    }>;
    /** Remove a memory entry by ID. */
    remove?(memoryId: string): Promise<boolean>;
}
export interface MemoryIngestMessage {
    role: string;
    content: string;
    timestamp?: number;
}
