import { type AgentSpec } from '@contractspec/lib.contracts-spec/agent';
import type { ExternalAgentContext, ExternalAgentProvider, ExternalExecuteParams, ExternalExecuteResult, ExternalStreamChunk, OpenCodeSDKConfig } from '../types';
/**
 * OpenCode SDK Provider implementation.
 */
export declare class OpenCodeSDKProvider implements ExternalAgentProvider {
    readonly name = "opencode-sdk";
    readonly version = "1.0.0";
    private config;
    private sdkAvailable;
    constructor(config?: OpenCodeSDKConfig);
    /**
     * Check if OpenCode SDK is available.
     */
    isAvailable(): boolean;
    /**
     * Create an execution context from an AgentSpec.
     */
    createContext(spec: AgentSpec): Promise<ExternalAgentContext>;
    /**
     * Execute a prompt using OpenCode SDK.
     */
    execute(context: ExternalAgentContext, params: ExternalExecuteParams): Promise<ExternalExecuteResult>;
    /**
     * Stream execution with real-time updates.
     */
    stream(context: ExternalAgentContext, params: ExternalExecuteParams): AsyncIterable<ExternalStreamChunk>;
    /**
     * Load the OpenCode SDK dynamically.
     */
    private loadSDK;
    /**
     * Get hostname from server URL.
     */
    private getHostname;
    /**
     * Extract tool calls from response.
     */
    private extractToolCalls;
    /**
     * Extract text content from response.
     */
    private extractTextContent;
    /**
     * Map OpenCode finish reason to ContractSpec finish reason.
     */
    private mapFinishReason;
}
