/**
 * Async Hook Manager
 *
 * Manages asynchronous hook execution with concurrency control,
 * job tracking, and result collection. Completed hook results
 * can be injected as system messages into the next conversation turn.
 */
import type { SmartHookConfig, SmartHookResult } from './smart-hooks.js';
export type AsyncHookStatus = 'running' | 'completed' | 'failed' | 'timeout' | 'cancelled';
export interface AsyncHookJob {
    /** Unique job ID */
    id: string;
    /** Hook configuration */
    hookConfig: SmartHookConfig;
    /** Input data */
    input: Record<string, any>;
    /** Start timestamp */
    startTime: number;
    /** Current status */
    status: AsyncHookStatus;
    /** Result (when completed) */
    result?: SmartHookResult;
    /** Error message (when failed) */
    error?: string;
}
export declare class AsyncHookManager {
    private jobs;
    private maxConcurrent;
    private runner;
    private completedSinceLastCheck;
    private cancelTokens;
    constructor(maxConcurrent?: number);
    /**
     * Submit an async hook for execution
     */
    submit(hook: SmartHookConfig, input: Record<string, any>): string;
    /**
     * Execute a job asynchronously
     */
    private executeJob;
    /**
     * Get a job by ID
     */
    getJob(jobId: string): AsyncHookJob | null;
    /**
     * Get all jobs completed since the last call to this method
     */
    getCompletedJobs(): AsyncHookJob[];
    /**
     * Get results formatted as system messages for the next conversation turn
     */
    getSystemMessages(): string[];
    /**
     * Clear all completed/failed jobs
     */
    clearCompleted(): void;
    /**
     * Cancel a running job
     */
    cancel(jobId: string): boolean;
    /**
     * Get the number of currently running jobs
     */
    getRunningCount(): number;
    /**
     * Get the total number of tracked jobs
     */
    getTotalCount(): number;
    /**
     * Dispose of all jobs and clean up
     */
    dispose(): void;
}
