/**
 * Task Poller - Handles polling and completion detection for running tasks
 */
import type { PluginInput } from "@opencode-ai/plugin";
import { TaskStore } from "../task-store.js";
import { ConcurrencyController } from "../concurrency.js";
import type { ParallelTask } from "../interfaces/parallel-task.interface.js";
type OpencodeClient = PluginInput["client"];
export declare class TaskPoller {
    private client;
    private store;
    private concurrency;
    private notifyParentIfAllComplete;
    private scheduleCleanup;
    private pruneExpiredTasks;
    private onTaskComplete?;
    private onTaskError?;
    private pollTimeout?;
    private messageCache;
    constructor(client: OpencodeClient, store: TaskStore, concurrency: ConcurrencyController, notifyParentIfAllComplete: (parentSessionID: string) => Promise<void>, scheduleCleanup: (taskId: string) => void, pruneExpiredTasks: () => void, onTaskComplete?: ((task: ParallelTask) => void | Promise<void>) | undefined, onTaskError?: ((taskId: string, error: unknown) => void) | undefined);
    start(): void;
    stop(): void;
    isRunning(): boolean;
    private scheduleNextPoll;
    poll(): Promise<void>;
    validateSessionHasOutput(sessionID: string, task?: ParallelTask): Promise<boolean>;
    completeTask(task: ParallelTask): Promise<void>;
    private updateTaskProgress;
}
export {};
