import type { RuntimeClineReasoningEffort, RuntimeTaskImage, RuntimeTaskSessionMode } from "../core/api-contract.js";
import { type ClineMcpRuntimeService } from "./cline-mcp-runtime-service.js";
import { type ClineSdkPersistedMessage, type ClineSdkSessionHost, type ClineSdkSessionRecord, type ClineSdkUserInstructionWatcher } from "./sdk-runtime-boundary.js";
export interface StartClineSessionRuntimeRequest {
    taskId: string;
    cwd: string;
    prompt: string;
    initialMessages?: ClineSdkPersistedMessage[];
    images?: RuntimeTaskImage[];
    providerId: string;
    modelId: string;
    mode?: RuntimeTaskSessionMode;
    apiKey?: string | null;
    baseUrl?: string | null;
    reasoningEffort?: RuntimeClineReasoningEffort | null;
    systemPrompt: string;
    userInstructionWatcher?: ClineSdkUserInstructionWatcher;
    requestToolApproval?: (request: unknown) => Promise<unknown>;
}
export interface StartClineSessionRuntimeResult {
    sessionId: string;
    result: unknown;
    warnings?: string[];
}
export interface ClinePersistedTaskSessionSnapshot {
    record: ClineSdkSessionRecord;
    messages: ClineSdkPersistedMessage[];
}
export interface ClineSessionRuntime {
    startTaskSession(request: StartClineSessionRuntimeRequest): Promise<StartClineSessionRuntimeResult>;
    restartTaskSession(input: {
        taskId: string;
        prompt: string;
        initialMessages?: ClineSdkPersistedMessage[];
        images?: RuntimeTaskImage[];
        mode?: RuntimeTaskSessionMode;
    }): Promise<StartClineSessionRuntimeResult>;
    sendTaskSessionInput(taskId: string, prompt: string, mode?: RuntimeTaskSessionMode, images?: RuntimeTaskImage[], delivery?: "queue" | "steer"): Promise<unknown>;
    resumeTaskSession(taskId: string): Promise<ClinePersistedTaskSessionSnapshot | null>;
    stopTaskSession(taskId: string): Promise<void>;
    abortTaskSession(taskId: string): Promise<void>;
    getTaskSessionId(taskId: string): string | null;
    readPersistedTaskSession(taskId: string): Promise<ClinePersistedTaskSessionSnapshot | null>;
    dispose(): Promise<void>;
}
export interface CreateInMemoryClineSessionRuntimeOptions {
    onTaskEvent?: (taskId: string, event: unknown) => void;
    createSessionHost?: () => Promise<ClineSdkSessionHost>;
    createMcpRuntimeService?: () => ClineMcpRuntimeService;
}
export declare class InMemoryClineSessionRuntime implements ClineSessionRuntime {
    private readonly onTaskEvent;
    private readonly createSessionHost;
    private readonly clineMcpRuntimeService;
    private readonly sessionIdByTaskId;
    private readonly taskIdBySessionId;
    private readonly lastStartRequestByTaskId;
    private readonly mcpToolBundleByTaskId;
    private sessionHostPromise;
    constructor(options?: CreateInMemoryClineSessionRuntimeOptions);
    startTaskSession(request: StartClineSessionRuntimeRequest): Promise<StartClineSessionRuntimeResult>;
    restartTaskSession(input: {
        taskId: string;
        prompt: string;
        initialMessages?: ClineSdkPersistedMessage[];
        images?: RuntimeTaskImage[];
        mode?: RuntimeTaskSessionMode;
    }): Promise<StartClineSessionRuntimeResult>;
    sendTaskSessionInput(taskId: string, prompt: string, mode?: RuntimeTaskSessionMode, images?: RuntimeTaskImage[], delivery?: "queue" | "steer"): Promise<unknown>;
    resumeTaskSession(taskId: string): Promise<ClinePersistedTaskSessionSnapshot | null>;
    stopTaskSession(taskId: string): Promise<void>;
    abortTaskSession(taskId: string): Promise<void>;
    getTaskSessionId(taskId: string): string | null;
    readPersistedTaskSession(taskId: string): Promise<ClinePersistedTaskSessionSnapshot | null>;
    dispose(): Promise<void>;
    private replaceTaskMcpToolBundle;
    private releaseTaskMcpToolBundle;
    private bindTaskSession;
    private clearTaskSessionBinding;
    private findPersistedTaskSessionRecord;
    private ensureSessionHost;
    private updateActiveSessionMode;
    private updateLastStartRequestMode;
    private handleSessionEvent;
}
export declare function createInMemoryClineSessionRuntime(options?: CreateInMemoryClineSessionRuntimeOptions): ClineSessionRuntime;
//# sourceMappingURL=cline-session-runtime.d.ts.map