/**
 * OpenCode CLI Provider — wraps the OpenCode CLI as a Jait provider.
 *
 * Spawns `opencode run <message> --format json` for structured NDJSON output.
 *
 * OpenCode JSON events:
 *   { type: "step_start", sessionID, part: { ... } }
 *   { type: "text", sessionID, part: { text, ... } }
 *   { type: "tool_start", sessionID, part: { tool, args, ... } }
 *   { type: "tool_result", sessionID, part: { tool, output, ... } }
 *   { type: "step_finish", sessionID, part: { reason, cost, tokens, ... } }
 */
import type { CliProviderAdapter, ProviderInfo, ProviderModelInfo, ProviderSession, ProviderEvent, StartSessionOptions } from "./contracts.js";
export declare class OpenCodeProvider implements CliProviderAdapter {
    readonly id: "opencode";
    readonly info: ProviderInfo;
    private sessions;
    private emitter;
    private opencodePath;
    checkAvailability(): Promise<boolean>;
    listModels(): Promise<ProviderModelInfo[]>;
    startSession(options: StartSessionOptions): Promise<ProviderSession>;
    sendTurn(sessionId: string, message: string, _attachments?: string[]): Promise<void>;
    interruptTurn(sessionId: string): Promise<void>;
    respondToApproval(_sessionId: string, _requestId: string, _approved: boolean): Promise<void>;
    stopSession(sessionId: string): Promise<void>;
    onEvent(handler: (event: ProviderEvent) => void): () => void;
    private emit;
    private getState;
    private processBuffer;
    private handleEvent;
    /** Dynamically fetch models by running `opencode models` */
    private fetchModels;
    private testCommand;
    /** Inject MCP servers into project-level opencode.json */
    private injectMcpConfig;
    /** Remove injected MCP servers from opencode.json */
    private cleanupMcpConfig;
}
//# sourceMappingURL=opencode-provider.d.ts.map