import { type IPitcherClient } from "@codesandbox/pitcher-client";
import { FileSystem } from "./filesystem";
import { Ports } from "./ports";
import { Setup } from "./setup";
import { Tasks } from "./tasks";
import { Interpreters } from "./interpreters";
import { Terminals } from "./terminals";
import { Commands } from "./commands";
import { Git } from "./git";
import { HostToken } from "../../Hosts";
import { Hosts } from "./hosts";
export * from "./filesystem";
export * from "./ports";
export * from "./setup";
export * from "./tasks";
export * from "./terminals";
export * from "./commands";
export * from "./git";
export * from "./interpreters";
export * from "./hosts";
export declare class WebSocketSession {
    protected pitcherClient: IPitcherClient;
    private disposable;
    /**
     * Namespace for all filesystem operations on this Sandbox
     */
    readonly fs: FileSystem;
    /**
     * Namespace for hosts
     */
    readonly hosts: Hosts;
    /**
     * Namespace for creating and managing terminals this Sandbox
     */
    readonly terminals: Terminals;
    /**
     * Namespace for running commands in the Sandbox
     */
    readonly commands: Commands;
    /**
     * Namespace for running code interpreters in the Sandbox
     */
    readonly interpreters: Interpreters;
    /**
     * Namespace for Git operations in the Sandbox
     */
    readonly git: Git;
    /**
     * Namespace for managing ports on this Sandbox
     */
    readonly ports: Ports;
    /**
     * Namespace for the setup that runs when the Sandbox starts from scratch.
     */
    readonly setup: Setup;
    /**
     * Namespace for tasks that are defined in the Sandbox.
     */
    readonly tasks: Tasks;
    constructor(pitcherClient: IPitcherClient, { env, hostToken }: {
        env?: Record<string, string>;
        hostToken?: HostToken;
    });
    /**
     * The current state of the Sandbox
     */
    get state(): typeof this.pitcherClient.state;
    /**
     * An event that is emitted when the state of the Sandbox changes.
     */
    get onStateChange(): {
        <T extends "DISCONNECTED" | "CONNECTED" | "CONNECTING" | "RECONNECTING" | "HIBERNATED">(state: T, listener: (state: ({
            state: "CONNECTED";
            lastActivity: number;
            lastFocus: number;
            connectedAt: number;
        } extends infer T_1 ? T_1 extends {
            state: "CONNECTED";
            lastActivity: number;
            lastFocus: number;
            connectedAt: number;
        } ? T_1 extends {
            state: T;
        } ? {
            state: T;
        } & import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState : never : never : never) | ({
            state: "CONNECTING";
        } extends infer T_2 ? T_2 extends {
            state: "CONNECTING";
        } ? T_2 extends {
            state: T;
        } ? {
            state: T;
        } & import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState : never : never : never) | ({
            state: "RECONNECTING";
            attempt: number;
            wasFocused: boolean;
            lastActivity: number;
            disconnectReason: string;
            disconnectedAt: number;
        } extends infer T_3 ? T_3 extends {
            state: "RECONNECTING";
            attempt: number;
            wasFocused: boolean;
            lastActivity: number;
            disconnectReason: string;
            disconnectedAt: number;
        } ? T_3 extends {
            state: T;
        } ? {
            state: T;
        } & import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState : never : never : never) | ({
            state: "HIBERNATED";
            wasFocused: boolean;
            disconnectedAt: number;
        } extends infer T_4 ? T_4 extends {
            state: "HIBERNATED";
            wasFocused: boolean;
            disconnectedAt: number;
        } ? T_4 extends {
            state: T;
        } ? {
            state: T;
        } & import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState : never : never : never) | ({
            state: "DISCONNECTED";
            reason: string;
            code: number;
            wasClean: boolean;
            wasFocused: boolean;
            disconnectedAt: number;
        } extends infer T_5 ? T_5 extends {
            state: "DISCONNECTED";
            reason: string;
            code: number;
            wasClean: boolean;
            wasFocused: boolean;
            disconnectedAt: number;
        } ? T_5 extends {
            state: T;
        } ? {
            state: T;
        } & import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState : never : never : never), prevState: import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState) => void): () => void;
        (listener: (state: import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState, prevState: import("@codesandbox/pitcher-client/dist/esm/interface/IPitcherClient").PitcherClientState) => void): () => void;
    };
    /**
     * Check if the Sandbox Agent process is up to date. To update a restart is required
     */
    get isUpToDate(): boolean;
    /**
     * The ID of the sandbox.
     */
    get id(): string;
    /**
     * Get the URL to the editor for this sandbox. Keep in mind that this URL is not
     * available if the sandbox is private, and the user opening this sandbox does not
     * have access to the sandbox.
     */
    get editorUrl(): string;
    /**
     * Disconnect from the sandbox, this does not hibernate the sandbox (it will
     * automatically hibernate after hibernation timeout). Call "reconnect" to
     * reconnect to the sandbox.
     */
    disconnect(): void;
    /**
     * Explicitly reconnect to the sandbox.
     */
    reconnect(): Promise<void>;
    private keepAliveInterval;
    /**
     * If enabled, we will keep the sandbox from hibernating as long as the SDK is connected to it.
     */
    keepActiveWhileConnected(enabled: boolean): void;
    /**
     * Dispose the session, this will disconnect from the sandbox and dispose all resources. If you want to do a clean disconnect, await "disconnect" method first.
     */
    dispose(): void;
}
