import type { AgentMessage, ThinkingLevel } from "@earendil-works/pi-agent-core";
import type { Api, ImageContent, Model } from "@earendil-works/pi-ai/compat";
import type { SessionStats } from "../../core/agent-session.ts";
import type { BashResult } from "../../core/bash-executor.ts";
import type { VerbatimCompactionResult } from "../../core/compaction/index.ts";
import type { SessionEntry, SessionTreeNode } from "../../core/session-manager.ts";
import type { RpcCommand, RpcContextWindowInfo, RpcResponse, RpcSessionState, RpcSlashCommand } from "./rpc-types.ts";
type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never;
export type RpcCommandBody = DistributiveOmit<RpcCommand, "id">;
export interface ModelInfo {
    provider: string;
    id: string;
    contextWindow: number;
    reasoning: boolean;
}
export declare abstract class RpcClientApi {
    protected abstract request(command: RpcCommandBody): Promise<RpcResponse>;
    protected abstract data<T>(response: RpcResponse): T;
    prompt(message: string, images?: ImageContent[], streamingBehavior?: "steer" | "followUp"): Promise<void>;
    steer(message: string, images?: ImageContent[]): Promise<void>;
    followUp(message: string, images?: ImageContent[]): Promise<void>;
    abort(): Promise<void>;
    newSession(parentSession?: string): Promise<{
        cancelled: boolean;
    }>;
    getState(): Promise<RpcSessionState>;
    setModel(provider: string, modelId: string): Promise<{
        provider: string;
        id: string;
    }>;
    cycleModel(direction?: "forward" | "backward"): Promise<{
        model: Model<Api>;
        thinkingLevel: ThinkingLevel;
        isScoped: boolean;
    } | null>;
    getAvailableModels(): Promise<ModelInfo[]>;
    setThinkingLevel(level: ThinkingLevel): Promise<void>;
    cycleThinkingLevel(): Promise<{
        level: ThinkingLevel;
    } | null>;
    setContextWindow(contextWindow: number | string): Promise<void>;
    getAvailableContextWindows(): Promise<RpcContextWindowInfo>;
    setSteeringMode(mode: "all" | "one-at-a-time"): Promise<void>;
    setFollowUpMode(mode: "all" | "one-at-a-time"): Promise<void>;
    compact(): Promise<VerbatimCompactionResult>;
    setAutoCompaction(enabled: boolean): Promise<void>;
    setAutoRetry(enabled: boolean): Promise<void>;
    abortRetry(): Promise<void>;
    bash(command: string): Promise<BashResult>;
    abortBash(): Promise<void>;
    getSessionStats(): Promise<SessionStats>;
    exportHtml(outputPath?: string): Promise<{
        path: string;
    }>;
    switchSession(sessionPath: string): Promise<{
        cancelled: boolean;
    }>;
    fork(entryId: string): Promise<{
        text: string;
        cancelled: boolean;
    }>;
    clone(): Promise<{
        cancelled: boolean;
    }>;
    getForkMessages(): Promise<Array<{
        entryId: string;
        text: string;
    }>>;
    getEntries(since?: string): Promise<{
        entries: SessionEntry[];
        leafId: string | null;
    }>;
    getTree(): Promise<{
        tree: SessionTreeNode[];
        leafId: string | null;
    }>;
    getLastAssistantText(): Promise<string | null>;
    setSessionName(name: string): Promise<void>;
    getMessages(): Promise<AgentMessage[]>;
    getCommands(): Promise<RpcSlashCommand[]>;
}
export {};
//# sourceMappingURL=rpc-client-api.d.ts.map