/**
 * Event Handler - Handles OpenCode session events
 */
import type { PluginInput } from "@opencode-ai/plugin";
import { TaskStore } from "../task-store.js";
import { ConcurrencyController } from "../concurrency.js";
import type { ParallelTask } from "../interfaces/index.js";
type OpencodeClient = PluginInput["client"];
export declare class EventHandler {
    private client;
    private store;
    private concurrency;
    private findBySession;
    private notifyParentIfAllComplete;
    private scheduleCleanup;
    private validateSessionHasOutput;
    private onTaskComplete?;
    constructor(client: OpencodeClient, store: TaskStore, concurrency: ConcurrencyController, findBySession: (sessionID: string) => ParallelTask | undefined, notifyParentIfAllComplete: (parentSessionID: string) => Promise<void>, scheduleCleanup: (taskId: string) => void, validateSessionHasOutput: (sessionID: string) => Promise<boolean>, onTaskComplete?: ((task: ParallelTask) => void | Promise<void>) | undefined);
    /**
     * Handle OpenCode session events for proper resource cleanup.
     * Call this from your plugin's event hook.
     */
    handle(event: {
        type: string;
        properties?: {
            sessionID?: string;
            info?: {
                id?: string;
            };
        };
    }): void;
    private handleSessionIdle;
    private handleSessionDeleted;
}
export {};
