import { IRPCProtocol } from '@opensumi/ide-connection';
import { Disposable, ILogger, ITaskDefinitionRegistry } from '@opensumi/ide-core-common';
import { ITaskService } from '@opensumi/ide-task/lib/common';
import { ConfiguringTask, ContributedTask, Task, TaskExecution } from '@opensumi/ide-task/lib/common/task';
import { IWorkspaceService } from '@opensumi/ide-workspace';
import { IExtHostTasks, IMainThreadTasks, TaskDTO, TaskExecutionDTO, TaskHandleDTO } from '../../../common/vscode/tasks';
declare namespace TaskHandleDTO {
    function is(value: any): value is TaskHandleDTO;
}
declare namespace TaskExecutionDTO {
    function from(value: TaskExecution): TaskExecutionDTO;
}
declare namespace TaskDTO {
    function from(task: Task | ConfiguringTask): TaskDTO | undefined;
    function to(task: TaskDTO | undefined, workspace: IWorkspaceService, executeOnly: boolean, context: any): ContributedTask | undefined;
}
export declare class MainThreadTasks extends Disposable implements IMainThreadTasks {
    private rpcProtocol;
    protected readonly proxy: IExtHostTasks;
    private providers;
    logger: ILogger;
    taskService: ITaskService;
    workspaceService: IWorkspaceService;
    taskDefinitionRegistry: ITaskDefinitionRegistry;
    private context;
    constructor(rpcProtocol: IRPCProtocol);
    dispose(): void;
    $registerTaskProvider(handler: number, type: string): Promise<void>;
    $unregisterTaskProvider(type: string): Promise<any>;
    $fetchTasks(filter: any): Promise<TaskDTO[]>;
    $executeTask(value: TaskHandleDTO | TaskDTO): Promise<TaskExecutionDTO>;
    $createTaskId(taskDTO: TaskDTO): Promise<string>;
    $terminateTask(executionId: string): Promise<void>;
}
export {};
//# sourceMappingURL=main.thread.tasks.d.ts.map