import type { Workspace } from '../../workspace/workspace.js';
import type { ProcessInputStepArgs, Processor } from '../index.js';
/**
 * Configuration options for SkillSearchProcessor
 */
export interface SkillSearchProcessorOptions {
    /**
     * Workspace instance containing skills.
     * Skills are accessed via workspace.skills.
     */
    workspace: Workspace;
    /**
     * Configuration for the search behavior
     */
    search?: {
        /**
         * Maximum number of skills to return in search results
         * @default 5
         */
        topK?: number;
        /**
         * Minimum relevance score for including a skill in search results
         * @default 0
         */
        minScore?: number;
    };
    /**
     * Time-to-live for thread state in milliseconds.
     * After this duration of inactivity, thread state will be eligible for cleanup.
     * Set to 0 to disable TTL cleanup.
     * @default 3600000 (1 hour)
     */
    ttl?: number;
}
/**
 * Processor that enables on-demand skill discovery and loading.
 *
 * Instead of injecting all skill metadata upfront, this processor:
 * 1. Gives the agent two meta-tools: search_skills and load_skill
 * 2. Agent searches for relevant skills using keywords
 * 3. Agent loads specific skills into the conversation on demand
 * 4. Loaded skill instructions appear as system messages
 *
 * This pattern reduces context usage when workspaces have many skills.
 */
export declare class SkillSearchProcessor implements Processor<'skill-search'> {
    readonly id = "skill-search";
    readonly name = "Skill Search Processor";
    readonly description = "Enables on-demand skill discovery and loading via search";
    readonly providesSkillDiscovery: Processor['providesSkillDiscovery'];
    private readonly workspace;
    private readonly searchConfig;
    private readonly ttl;
    private cleanupIntervalId?;
    /**
     * Thread-scoped state management for loaded skills with TTL support.
     * Maps threadId -> ThreadState (skills + timestamp)
     */
    private threadLoadedSkills;
    constructor(options: SkillSearchProcessorOptions);
    /**
     * Dispose of this processor, clearing the cleanup interval and all thread state.
     * Call this when the processor is no longer needed to prevent timer leaks.
     */
    dispose(): void;
    /**
     * Get the workspace skills interface
     */
    private get skills();
    /**
     * Get the thread ID from the request context, or use 'default' as fallback.
     */
    private getThreadId;
    /**
     * Get or create thread state for the given thread.
     * Updates the lastAccessed timestamp for TTL management.
     */
    private getThreadState;
    /**
     * Clear loaded skills for a specific thread.
     */
    clearState(threadId?: string): void;
    /**
     * Clear all thread state for this processor instance.
     */
    clearAllState(): void;
    /**
     * Clean up stale thread state based on TTL.
     * @returns Number of threads cleaned up
     */
    private cleanupStaleState;
    /**
     * Schedule periodic cleanup of stale thread state.
     */
    private scheduleCleanup;
    /**
     * Get statistics about current thread state.
     */
    getStateStats(): {
        threadCount: number;
        oldestAccessTime: number | null;
    };
    /**
     * Manually trigger cleanup of stale state.
     * @returns Number of threads cleaned up
     */
    cleanupNow(): number;
    processInputStep(args: ProcessInputStepArgs): Promise<{
        tools: Record<string, unknown> | undefined;
    }>;
}
//# sourceMappingURL=skill-search.d.ts.map