import type { Logger } from "pino";
import { ModelRegistry, type AgentSession as PiAgentSession } from "@mariozechner/pi-coding-agent";
import type { AgentCapabilityFlags, AgentClient, AgentLaunchContext, AgentMode, AgentModelDefinition, AgentPermissionRequest, AgentPermissionResponse, AgentPersistenceHandle, AgentPromptInput, AgentRunOptions, AgentRunResult, AgentRuntimeInfo, AgentSession, AgentSessionConfig, AgentSlashCommand, AgentStreamEvent, ListModesOptions, ListModelsOptions } from "../agent-sdk-types.js";
import type { ProviderRuntimeSettings } from "../provider-launch-config.js";
interface PiDirectAgentClientOptions {
    logger: Logger;
    runtimeSettings?: ProviderRuntimeSettings;
}
interface StartTurnResult {
    turnId: string;
}
export type PiDirectSessionAdapter = Pick<PiAgentSession, "abort" | "agent" | "dispose" | "extensionRunner" | "getSessionStats" | "messages" | "model" | "prompt" | "promptTemplates" | "resourceLoader" | "sessionId" | "sessionManager" | "setModel" | "setThinkingLevel" | "subscribe" | "thinkingLevel">;
type PiDirectModelRegistry = Pick<ModelRegistry, "find" | "getAll">;
export declare function transformPiModels(models: AgentModelDefinition[]): AgentModelDefinition[];
export declare class PiDirectAgentSession implements AgentSession {
    private readonly session;
    private readonly modelRegistry;
    private readonly config;
    readonly provider = "pi";
    readonly capabilities: AgentCapabilityFlags;
    private readonly subscribers;
    private readonly activeToolCalls;
    private activeTurnId;
    private lastKnownThinkingOptionId;
    private latestUsage;
    constructor(session: PiDirectSessionAdapter, modelRegistry: PiDirectModelRegistry, config: AgentSessionConfig);
    get id(): string | null;
    private emit;
    private currentTurnIdForEvent;
    private emitToolCallEvent;
    private handleMessageUpdate;
    private handleSessionEvent;
    run(prompt: AgentPromptInput, options?: AgentRunOptions): Promise<AgentRunResult>;
    startTurn(prompt: AgentPromptInput, _options?: AgentRunOptions): Promise<StartTurnResult>;
    subscribe(callback: (event: AgentStreamEvent) => void): () => void;
    streamHistory(): AsyncGenerator<AgentStreamEvent>;
    getRuntimeInfo(): Promise<AgentRuntimeInfo>;
    getAvailableModes(): Promise<AgentMode[]>;
    getCurrentMode(): Promise<string | null>;
    setMode(modeId: string): Promise<void>;
    getPendingPermissions(): AgentPermissionRequest[];
    respondToPermission(requestId: string, response: AgentPermissionResponse): Promise<void>;
    describePersistence(): AgentPersistenceHandle | null;
    interrupt(): Promise<void>;
    close(): Promise<void>;
    listCommands(): Promise<AgentSlashCommand[]>;
    setModel(modelId: string | null): Promise<void>;
    setThinkingOption(thinkingOptionId: string | null): Promise<void>;
}
export declare class PiDirectAgentClient implements AgentClient {
    readonly provider = "pi";
    readonly capabilities: AgentCapabilityFlags;
    private readonly logger;
    private readonly runtimeSettings?;
    private modelRegistry;
    constructor(options: PiDirectAgentClientOptions);
    private getSessionServices;
    private resolveConfiguredModel;
    private createSdkSession;
    createSession(config: AgentSessionConfig, _launchContext?: AgentLaunchContext): Promise<AgentSession>;
    resumeSession(handle: AgentPersistenceHandle, overrides?: Partial<AgentSessionConfig>, _launchContext?: AgentLaunchContext): Promise<AgentSession>;
    listModels(options: ListModelsOptions): Promise<AgentModelDefinition[]>;
    listModes(_options: ListModesOptions): Promise<AgentMode[]>;
    isAvailable(): Promise<boolean>;
    getDiagnostic(): Promise<{
        diagnostic: string;
    }>;
}
export {};
//# sourceMappingURL=pi-direct-agent.d.ts.map