/**
 * Auto-synthesis — automatically synthesize skills from complex sessions.
 * Triggered when a session ends with sufficient complexity.
 *
 * This is a built-in behavior, not a plugin. It runs inline when
 * session persistence detects a session with tool calls above threshold.
 */
import type { Session } from '../history/sessions.js';
import type { SkillDocument } from './schema.js';
export interface AutoSynthResult {
    /** Whether synthesis was attempted */
    attempted: boolean;
    /** Whether a new skill was saved */
    saved: boolean;
    /** The skill (if synthesized) */
    skill?: SkillDocument;
    /** Reason if not attempted */
    reason?: string;
}
export interface AutoSynthConfig {
    /** Enable/disable auto-synthesis */
    enabled: boolean;
    /** Minimum tool calls to trigger */
    minToolCalls: number;
    /** Minimum complexity score to trigger */
    minComplexity: number;
    /** Minimum messages in session */
    minMessages: number;
    /** Skip if skill with same ID already exists */
    skipDuplicates: boolean;
}
/**
 * Configure auto-synthesis behavior.
 */
export declare function configureAutoSynth(overrides: Partial<AutoSynthConfig>): void;
/**
 * Get current auto-synthesis configuration.
 */
export declare function getAutoSynthConfig(): Readonly<AutoSynthConfig>;
/**
 * Reset configuration to defaults.
 */
export declare function resetAutoSynthConfig(): void;
/**
 * Check if a skill is semantically similar to any existing skill.
 * Returns the similar skill if found, null otherwise.
 */
export declare function findSimilarSkill(candidate: SkillDocument): Promise<SkillDocument | null>;
/**
 * Evaluate a session for auto-synthesis. Called when a session ends.
 * This is designed to be fast and non-blocking — template mode only.
 */
export declare function evaluateSession(session: Session): Promise<AutoSynthResult>;
/**
 * Add onSessionEnd hook to the plugin system.
 * This extends the existing plugin types with a session end event.
 */
export interface SessionEndHookContext {
    sessionId: string;
    messageCount: number;
    model: string;
    durationSec: number;
}
/**
 * Run auto-synthesis as a fire-and-forget operation.
 * Logs results but never throws.
 */
export declare function onSessionEnd(session: Session): Promise<AutoSynthResult>;
