import type { OpencodeClient } from "@opencode-ai/sdk/v2/client";
import type { OpenCodeRuntime, OpenCodeServerAcquisition } from "../runtime.js";
interface OpenCodeResponse {
    data?: unknown;
    error?: unknown;
}
export declare class TestOpenCodeRuntime implements OpenCodeRuntime {
    readonly acquisitions: Array<{
        force: boolean;
        env?: Record<string, string>;
        releaseCount: number;
    }>;
    readonly clientCreations: Array<{
        baseUrl: string;
        directory: string;
    }>;
    private readonly clients;
    server: {
        port: number;
        url: string;
    };
    enqueueClient(client: TestOpenCodeClient): void;
    acquireServer(options: {
        force: boolean;
        env?: Record<string, string>;
    }): Promise<OpenCodeServerAcquisition>;
    ensureServerRunning(): Promise<{
        port: number;
        url: string;
    }>;
    createClient(options: {
        baseUrl: string;
        directory: string;
    }): OpencodeClient;
    shutdown(): Promise<void>;
}
export declare class TestOpenCodeClient {
    readonly calls: {
        appAgents: unknown[];
        commandList: unknown[];
        eventSubscribe: unknown[];
        experimentalSessionList: unknown[];
        globalEvent: unknown[];
        mcpAdd: unknown[];
        mcpConnect: unknown[];
        permissionReply: unknown[];
        providerList: unknown[];
        questionReject: unknown[];
        questionReply: unknown[];
        sessionAbort: unknown[];
        sessionCommand: unknown[];
        sessionCreate: unknown[];
        sessionDelete: unknown[];
        sessionMessages: unknown[];
        sessionPromptAsync: unknown[];
        sessionSummarize: unknown[];
        sessionUpdate: unknown[];
    };
    appAgentsResponse: OpenCodeResponse;
    commandListResponse: OpenCodeResponse;
    eventStream: AsyncIterable<unknown>;
    experimentalSessionListResponse: OpenCodeResponse;
    mcpAddResponse: OpenCodeResponse;
    mcpConnectResponse: OpenCodeResponse;
    permissionReplyResponse: OpenCodeResponse;
    providerListResponse: OpenCodeResponse;
    providerListImplementation: (() => Promise<OpenCodeResponse>) | null;
    questionRejectResponse: OpenCodeResponse;
    questionReplyResponse: OpenCodeResponse;
    sessionAbortResponse: OpenCodeResponse;
    sessionCommandError: unknown;
    sessionCommandEvents: unknown[];
    sessionCommandResponse: OpenCodeResponse;
    sessionCreateResponse: OpenCodeResponse;
    sessionDeleteResponse: OpenCodeResponse;
    sessionMessagesResponse: OpenCodeResponse;
    sessionPromptAsyncEvents: unknown[];
    sessionPromptAsyncResponse: OpenCodeResponse;
    sessionSummarizeResponse: OpenCodeResponse;
    sessionUpdateResponse: OpenCodeResponse;
    private readonly queuedEventStream;
    constructor();
    emitEvent(event: unknown): void;
    asSdkClient(): OpencodeClient;
}
export declare function createEventStream(events: unknown[]): AsyncGenerator<unknown>;
export declare function idleEvent(): unknown;
export {};
//# sourceMappingURL=test-opencode-runtime.d.ts.map