/**
 * 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 { tools } from 'playwright-core/lib/coreBundle';
import { base, testRunner } from '../../runner';
import type { BrowserMCPRequest, BrowserMCPResponse } from './browserBackend';
export type SeedFile = {
    file: string;
    content: string;
};
export declare class GeneratorJournal {
    private _rootPath;
    private _plan;
    private _seed;
    private _steps;
    constructor(rootPath: string, plan: string, seed: SeedFile);
    logStep(title: string | undefined, code: string): void;
    journal(): string;
}
type TestRunnerAndScreen = {
    testRunner: testRunner.TestRunner;
    screen: base.TerminalScreen;
    claimStdio: () => void;
    releaseStdio: () => void;
    output: string[];
    waitForTestPaused: () => Promise<void>;
    sendMessageToPausedTest?: (params: {
        request: BrowserMCPRequest;
    }) => Promise<{
        response: BrowserMCPResponse;
        error?: any;
    }>;
};
export declare class TestContext {
    private _clientInfo;
    private _testRunnerAndScreen;
    readonly computedHeaded: boolean;
    private readonly _configLocation;
    readonly rootPath: string;
    generatorJournal: GeneratorJournal | undefined;
    constructor(clientInfo: tools.ClientInfo, configPath: string | undefined, options?: {
        muteConsole?: boolean;
        headless?: boolean;
    });
    existingTestRunner(): testRunner.TestRunner | undefined;
    private _cleanupTestRunner;
    createTestRunner(): Promise<TestRunnerAndScreen>;
    getOrCreateSeedFile(seedFile: string | undefined, projectName: string | undefined): Promise<{
        file: string;
        content: string;
        projectName: string;
    }>;
    runSeedTest(seedFile: string, projectName: string): Promise<{
        output: string;
        status: testRunner.FullResultStatus | 'paused';
    }>;
    runTestsWithGlobalSetupAndPossiblePause(params: testRunner.RunTestsParams): Promise<{
        output: string;
        status: testRunner.FullResultStatus | 'paused';
    }>;
    close(): Promise<void>;
    sendMessageToPausedTest(request: BrowserMCPRequest): Promise<BrowserMCPResponse>;
}
export declare function createScreen(): {
    screen: {
        isTTY: boolean;
        colors: any;
        stdout: NodeJS.WriteStream;
        stderr: NodeJS.WriteStream;
        resolveFiles: "cwd" | "rootDir";
        ttyWidth: number;
        ttyHeight: number;
    };
    claimStdio: () => void;
    releaseStdio: () => void;
    output: string[];
};
export {};
//# sourceMappingURL=testContext.d.ts.map