/**
 * Context Flush Service (#153)
 *
 * Automatically extracts and persists critical context before autonomous
 * context compaction. Prevents loss of important details like task progress,
 * decisions, API ports, and user preferences that haven't been explicitly
 * remembered.
 *
 * Integration point: Called before context compaction in agent sessions.
 *
 * @see https://github.com/stevehuang0115/crewly/issues/153
 * @module services/memory/context-flush.service
 */
/** Extracted context item from conversation text */
export interface ExtractedContextItem {
    /** Category of the extracted context */
    category: 'task_progress' | 'decision' | 'technical_detail' | 'preference' | 'blocker';
    /** Extracted content */
    content: string;
    /** Confidence score (0-1) */
    confidence: number;
}
/** Result of a context flush operation */
export interface ContextFlushResult {
    /** Number of items extracted */
    extractedCount: number;
    /** Number of items saved to memory */
    savedCount: number;
    /** Items that were extracted */
    items: ExtractedContextItem[];
}
/**
 * ContextFlushService extracts critical context from conversation text
 * and persists it to the memory system before compaction.
 */
export declare class ContextFlushService {
    private static instance;
    private readonly logger;
    private constructor();
    static getInstance(): ContextFlushService;
    static resetInstance(): void;
    /**
     * Extract critical context items from conversation text.
     *
     * Uses pattern matching to identify task progress, decisions,
     * technical details, and preferences worth preserving.
     *
     * @param text - Conversation text to extract from
     * @param minConfidence - Minimum confidence threshold (default: 0.7)
     * @returns Array of extracted context items
     */
    extract(text: string, minConfidence?: number): ExtractedContextItem[];
    /**
     * Flush critical context to the memory system.
     *
     * Extracts context items from conversation text and calls the
     * remember API for each item that meets the confidence threshold.
     *
     * @param text - Conversation text to flush
     * @param agentId - Agent ID for memory storage
     * @param projectPath - Project path for project-scoped storage
     * @param rememberFn - Function to persist a memory item
     * @returns Flush result with counts
     */
    flush(text: string, agentId: string, projectPath: string, rememberFn: (params: {
        agentId: string;
        content: string;
        category: string;
        scope: string;
        projectPath: string;
    }) => Promise<void>): Promise<ContextFlushResult>;
}
//# sourceMappingURL=context-flush.service.d.ts.map