import { type IPitcherClient, type protocol } from "@codesandbox/pitcher-client";
import { Disposable } from "../../utils/disposable";
export type TaskDefinition = {
    name: string;
    command: string;
    runAtStart?: boolean;
};
export declare class Tasks {
    private pitcherClient;
    private disposable;
    private tasks;
    constructor(sessionDisposable: Disposable, pitcherClient: IPitcherClient);
    /**
     * Gets all tasks that are available in the current sandbox.
     */
    getTasks(): Task[];
    /**
     * Gets a task by its ID.
     */
    getTask(taskId: string): Task | undefined;
}
export declare class Task {
    private pitcherClient;
    private data;
    private disposable;
    private get shell();
    private openedShell?;
    private onOutputEmitter;
    readonly onOutput: import("@codesandbox/pitcher-common").Event<string>;
    private onStatusChangeEmitter;
    readonly onStatusChange: import("@codesandbox/pitcher-common").Event<"IDLE" | protocol.shell.ShellProcessStatus>;
    get id(): string;
    get name(): string;
    get command(): string;
    get runAtStart(): boolean | undefined;
    get ports(): protocol.port.Port[];
    get status(): "IDLE" | protocol.shell.ShellProcessStatus;
    constructor(pitcherClient: IPitcherClient, data: protocol.task.TaskDTO);
    open(dimensions?: import("./terminals").ShellSize): Promise<string>;
    waitForPort(timeout?: number): Promise<protocol.port.Port | [protocol.port.Port, protocol.port.Port]>;
    run(): Promise<void>;
    restart(): Promise<void>;
    stop(): Promise<void>;
}
