/**
 * Copyright (c) Microsoft Corporation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import type { ChannelSession } from './channelSessions';
import type { BrowserDescriptor } from '../../serverRegistry';
export type ListedBrowser = {
    name: string;
    workspace: string;
    status: 'open' | 'closed';
    browserType: string | undefined;
    userDataDir: string | null;
    headed: boolean | undefined;
    persistent: boolean;
    attached: boolean;
    compatible: boolean;
    version: string;
};
export type ListData = {
    all: boolean;
    browsers: ListedBrowser[];
    servers?: BrowserDescriptor[];
    channelSessions?: ChannelSession[];
};
export interface Output {
    readonly json: boolean;
    version(v: string): void;
    help(text: string): void;
    errorUnknownCommand(name: string | undefined, globalHelp: string): never;
    errorUnknownOption(opts: string[], commandHelp: string): never;
    errorTooManyArguments(expected: number, received: number, commandHelp: string): never;
    errorAttachConflict(): never;
    errorDetachNotAttached(session: string): never;
    errorBrowserNotOpenForTool(session: string): never;
    errorAttachNoTarget(): never;
    list(data: ListData): void;
    closeAll(sessions: string[]): void;
    deleteData(session: string, result: {
        existed: boolean;
        deletedUserDataDir: boolean;
    }): void;
    killAll(pids: number[]): void;
    open(session: string, pid: number | undefined, toolResult: string): void;
    attach(session: string, pid: number | undefined, endpoint: string | undefined, toolResult: string): void;
    close(session: string, wasOpen: boolean): void;
    detach(session: string, wasAttached: boolean): void;
    installed(): void;
    show(session: string, pid: number | undefined): void;
    toolResult(text: string): void;
    installStdio(): 'inherit' | 'ignore';
}
export declare class TextOutput implements Output {
    readonly json = false;
    version(v: string): void;
    help(text: string): void;
    errorUnknownCommand(name: string | undefined, globalHelp: string): never;
    errorUnknownOption(opts: string[], commandHelp: string): never;
    errorTooManyArguments(expected: number, received: number, commandHelp: string): never;
    errorAttachConflict(): never;
    errorDetachNotAttached(session: string): never;
    errorBrowserNotOpenForTool(session: string): never;
    errorAttachNoTarget(): never;
    list({ all, browsers, servers, channelSessions }: ListData): void;
    closeAll(_sessions: string[]): void;
    deleteData(session: string, result: {
        existed: boolean;
        deletedUserDataDir: boolean;
    }): void;
    killAll(pids: number[]): void;
    open(session: string, pid: number | undefined, toolResult: string): void;
    attach(session: string, pid: number | undefined, endpoint: string | undefined, toolResult: string): void;
    close(session: string, wasOpen: boolean): void;
    detach(session: string, wasAttached: boolean): void;
    installed(): void;
    show(_session: string, pid: number | undefined): void;
    toolResult(text: string): void;
    installStdio(): 'inherit' | 'ignore';
}
export declare class JsonOutput implements Output {
    readonly json = true;
    version(v: string): void;
    help(text: string): void;
    errorUnknownCommand(name: string | undefined, _globalHelp: string): never;
    errorUnknownOption(opts: string[], _commandHelp: string): never;
    errorTooManyArguments(expected: number, received: number, _commandHelp: string): never;
    errorAttachConflict(): never;
    errorDetachNotAttached(session: string): never;
    errorBrowserNotOpenForTool(session: string): never;
    errorAttachNoTarget(): never;
    list({ all, browsers, servers, channelSessions }: ListData): void;
    closeAll(sessions: string[]): void;
    deleteData(session: string, result: {
        existed: boolean;
        deletedUserDataDir: boolean;
    }): void;
    killAll(pids: number[]): void;
    open(session: string, pid: number | undefined, toolResult: string): void;
    attach(session: string, pid: number | undefined, endpoint: string | undefined, toolResult: string): void;
    close(session: string, wasOpen: boolean): void;
    detach(session: string, wasAttached: boolean): void;
    installed(): void;
    show(session: string, pid: number | undefined): void;
    toolResult(text: string): void;
    installStdio(): 'inherit' | 'ignore';
    private _emit;
}
//# sourceMappingURL=output.d.ts.map