/**
 * gRPC Task Executor
 *
 * Replaces HTTP/SSE task execution with gRPC-based execution
 * Handles task requests from master to workers via gRPC
 */
import type { AgentTask } from '../types/agent.js';
import type { GrpcServer } from './grpc/grpc-server.js';
export interface GrpcTaskExecutorOptions {
    grpcServer: GrpcServer;
    workspace: string;
    allowedTools: string[];
}
export declare class GrpcTaskExecutor {
    private options;
    private tasks;
    private pendingWorkerTasks;
    constructor(options: GrpcTaskExecutorOptions);
    /**
     * Execute a task on a worker via gRPC
     */
    executeTaskOnWorker(taskId: string, tool: string, params: any, context: any, workerId: string): Promise<void>;
    /**
     * Handle task progress from worker
     */
    handleTaskProgress(workerId: string, taskId: string, progress: number, message: string): void;
    /**
     * Handle tool output from worker
     */
    handleToolOutput(workerId: string, taskId: string, type: 'stdout' | 'stderr', data: string): void;
    /**
     * Handle task completion from worker
     */
    handleTaskCompleted(workerId: string, taskId: string, result: any): void;
    /**
     * Handle task failure from worker
     */
    handleTaskFailed(workerId: string, taskId: string, error: string): void;
    /**
     * Get task status
     */
    getTaskStatus(taskId: string): AgentTask | undefined;
    /**
     * Cancel a task
     */
    cancelTask(taskId: string): boolean;
    /**
     * Get all tasks for a worker
     */
    getWorkerTasks(workerId: string): AgentTask[];
    /**
     * Clean up old tasks
     */
    cleanupOldTasks(maxAgeMs?: number): void;
}
//# sourceMappingURL=grpc-task-executor.d.ts.map