/**
 * Smart Hook System
 *
 * Extends the hook system with prompt-based and agent-based hooks.
 * Supports three hook types:
 * - command: runs shell commands and parses output
 * - prompt: evaluates LLM prompts with template rendering
 * - agent: spawns sub-agent with restricted tool access
 *
 * Also supports async hook execution with result tracking.
 */
export type SmartHookType = 'command' | 'prompt' | 'agent';
export interface SmartHookConfig {
    /** Hook type */
    type: SmartHookType;
    /** Event name this hook responds to */
    event: string;
    /** For type: 'command' - shell command to run */
    command?: string;
    /** For type: 'prompt' - LLM prompt template with {{input}} placeholders */
    prompt?: string;
    /** For type: 'prompt' - model to use for evaluation */
    model?: string;
    /** For type: 'agent' - agent system prompt */
    agentPrompt?: string;
    /** For type: 'agent' - tools available to the agent */
    agentTools?: string[];
    /** For type: 'agent' - maximum agent turns (default: 5) */
    maxTurns?: number;
    /** Run in background */
    async?: boolean;
    /** Timeout in ms (default: 30000) */
    timeout?: number;
}
export interface SmartHookResult {
    /** Whether the hook succeeded */
    ok: boolean;
    /** Reason for failure */
    reason?: string;
    /** Hook output */
    output?: string;
    /** Execution duration in ms */
    duration?: number;
}
export declare class SmartHookRunner {
    private pendingResults;
    private pendingCount;
    constructor();
    /**
     * Run a hook synchronously and return result
     */
    runHook(hook: SmartHookConfig, input: Record<string, any>): Promise<SmartHookResult>;
    /**
     * Run a command-type hook
     */
    private runCommandHook;
    /**
     * Run a prompt-type hook (evaluates an LLM prompt template)
     */
    private runPromptHook;
    /**
     * Run an agent-type hook (spawns a sub-agent)
     */
    private runAgentHook;
    /**
     * Render a template string by replacing {{key}} placeholders with input values
     */
    renderTemplate(template: string, input: Record<string, any>): string;
    /**
     * Run a hook asynchronously in the background
     */
    runAsync(hook: SmartHookConfig, input: Record<string, any>): Promise<string>;
    /**
     * Get the result of an async hook by ID
     */
    getAsyncResult(hookId: string): SmartHookResult | null;
    /**
     * Check if there are any pending async hooks
     */
    hasPendingHooks(): boolean;
    /**
     * Get the number of pending async hooks
     */
    getPendingCount(): number;
}
