export interface ContextLoadResult {
    sessionKey: string;
    loaded: boolean;
    contextItems: ContextItem[];
    memoryHints: string[];
    suggestions: string[];
}
export interface ContextItem {
    type: 'decision' | 'pattern' | 'recent_work' | 'preference';
    content: string;
    sourceSession: string;
    timestamp: number;
    relevance: number;
}
export interface ContextLoaderConfig {
    /** Maximum context items to load */
    maxItems: number;
    /** Maximum age of context (ms) - older items won't be loaded */
    maxAgeMs: number;
    /** Workspace root */
    workspaceRoot: string;
    /** Memory file path */
    memoryPath: string;
}
export declare class ContextLoader {
    private config;
    constructor(config?: Partial<ContextLoaderConfig>);
    /**
     * Load relevant context for a new session
     *
     * @param currentSessionKey - The session that's starting
     * @param currentMessage - The message that triggered this session (optional)
     * @returns Context items that should be injected into the session
     */
    loadContext(currentSessionKey: string, currentMessage?: string): Promise<ContextLoadResult>;
    private loadDreamMemory;
    private loadWorkspaceMemory;
    private loadRecentDecisions;
    private findRelatedSessions;
    private extractKeywords;
    private countPatterns;
    /**
     * Load and parse the "🔄 自进化学习" section from MEMORY.md
     * This extracts insights generated by DreamModule and makes them available
     * as historical context for new sessions.
     */
    loadSelfEvolutionLearnings(): ContextItem[];
}
/**
 * Create a session_start hook that loads context
 */
export declare function createSessionStartHook(contextLoader: ContextLoader): {
    id: string;
    name: string;
    description: string;
    handle: (event: any) => Promise<any>;
};
export declare function getContextLoader(config?: Partial<ContextLoaderConfig>): ContextLoader;
//# sourceMappingURL=context-loader.d.ts.map