import { AdkError } from '@botpress/analytics';
import type { Agent0OpenCodeProcessOptions } from './process.js';
import type { Agent0AbortSessionResult, Agent0CommandListResult, Agent0CreateSessionInput, Agent0Message, Agent0QuestionListResult, Agent0RejectQuestionResult, Agent0ReplyQuestionInput, Agent0ReplyQuestionResult, Agent0RunCommandInput, Agent0RuntimeEvent, Agent0RuntimeEventStreamOptions, Agent0SendMessageInput, Agent0Session, Agent0SessionMessageListResult, Agent0SessionListResult } from '../types.js';
export type Agent0RuntimeState = 'running';
export type Agent0RuntimeClientErrorCode = 'ENGINE_UNAVAILABLE' | 'ENGINE_HTTP_ERROR' | 'ENGINE_INVALID_RESPONSE';
export type Agent0RuntimeFetch = (input: URL, init?: RequestInit) => Promise<Response>;
export interface Agent0RuntimeStatus {
    state: Agent0RuntimeState;
    projectPath: string;
    worktreePath: string;
    renderedOpenCodeConfigHash?: string;
}
export interface Agent0RuntimeClient {
    getStatus(): Promise<Agent0RuntimeStatus>;
    listSessions(): Promise<Agent0SessionListResult>;
    createSession(input?: Agent0CreateSessionInput): Promise<Agent0Session>;
    listMessages(sessionId: string): Promise<Agent0SessionMessageListResult>;
    sendMessage(sessionId: string, input: Agent0SendMessageInput): Promise<Agent0Message>;
    abortSession(sessionId: string): Promise<Agent0AbortSessionResult>;
    listQuestions(sessionId?: string): Promise<Agent0QuestionListResult>;
    replyQuestion(sessionId: string, questionId: string, input: Agent0ReplyQuestionInput): Promise<Agent0ReplyQuestionResult>;
    rejectQuestion(sessionId: string, questionId: string): Promise<Agent0RejectQuestionResult>;
    listCommands(): Promise<Agent0CommandListResult>;
    runCommand(sessionId: string, input: Agent0RunCommandInput): Promise<Agent0Message>;
    streamEvents?(options?: Agent0RuntimeEventStreamOptions): AsyncIterable<Agent0RuntimeEvent>;
    stop(): Promise<void>;
}
export interface Agent0RuntimeClientOptions extends Agent0OpenCodeProcessOptions {
    fetch?: Agent0RuntimeFetch;
}
export interface Agent0RuntimeClientEngine {
    baseURL: string;
    authHeaders: Record<string, string>;
    renderedOpenCodeConfigHash?: string;
    stop: () => Promise<void>;
}
export interface Agent0RuntimeClientCreateOptions {
    engine: Agent0RuntimeClientEngine;
    projectPath: string;
    fetch?: Agent0RuntimeFetch;
}
export declare class Agent0RuntimeClientError extends AdkError<Agent0RuntimeClientErrorCode> {
    readonly status?: number;
    constructor(code: Agent0RuntimeClientErrorCode, message: string, options?: {
        cause?: unknown;
        status?: number;
    });
}
export declare function startAgent0RuntimeClient(options: Agent0RuntimeClientOptions): Promise<Agent0RuntimeClient>;
export declare function createAgent0RuntimeClient(options: Agent0RuntimeClientCreateOptions): Agent0RuntimeClient;
//# sourceMappingURL=client.d.ts.map