import { Message, MessageChunk } from "@axiom-lattice/protocols";
import { AgentState, ChatResponse, ChatSendOptions, ChatStreamOptions, ClientConfig, CreateThreadOptions, GetMessagesOptions, ListThreadsOptions, RegisterToolOptions, ResumeStreamOptions, RunOptions, Thread } from "./types";
/**
 * Abstract client class for interacting with the Axiom Lattice Agent Service API
 * Provides common functionality for different client implementations
 */
export declare abstract class AbstractClient {
    protected config: ClientConfig;
    protected assistantId: string;
    protected tenantId: string;
    protected registeredTools: Map<string, RegisterToolOptions>;
    /**
     * Creates a new AbstractClient instance
     * @param config - Configuration options for the client
     */
    constructor(config: ClientConfig);
    /**
     * Set tenant ID for multi-tenant environments
     * @param tenantId - Tenant identifier
     */
    abstract setTenantId(tenantId: string): void;
    /**
     * Abstract method for making API requests
     * To be implemented by concrete client classes
     */
    protected abstract makeRequest<T>(url: string, options?: {
        method?: string;
        body?: any;
        headers?: Record<string, string>;
    }): Promise<T>;
    /**
     * Abstract method for streaming API requests
     * To be implemented by concrete client classes
     */
    /**
     * Helper method to build stream request parameters
     * @param options - Options for running the agent
     * @returns The formatted request parameters
     */
    protected buildStreamRequestParams(options: RunOptions): {
        url: string;
        method: string;
        body: any;
    };
    protected abstract streamRequest(options: RunOptions, onEvent: (event: MessageChunk) => void, onComplete?: (state?: AgentState) => void, onError?: (error: Error) => void): () => void;
    /**
     * Creates a new thread
     * @param options - Options for creating a thread
     * @returns A promise that resolves to the thread ID
     */
    createThread(options: CreateThreadOptions): Promise<string>;
    /**
     * Retrieves thread information
     * @param threadId - Thread identifier
     * @returns A promise that resolves to the thread information
     */
    getThread(threadId: string): Promise<Thread>;
    /**
     * Lists all threads
     * @param options - Options for listing threads
     * @returns A promise that resolves to an array of threads
     */
    listThreads(options?: ListThreadsOptions): Promise<Thread[]>;
    /**
     * Deletes a thread
     * @param threadId - Thread identifier
     * @returns A promise that resolves when the thread is deleted
     */
    deleteThread(threadId: string): Promise<void>;
    /**
     * Retrieves messages from a thread
     * @param options - Options for retrieving messages
     * @returns A promise that resolves to an array of messages
     */
    getMessages(options: GetMessagesOptions): Promise<Message[]>;
    /**
     * Retrieves agent state
     * @param threadId - Thread identifier
     * @returns A promise that resolves to the agent state
     */
    getAgentState(threadId: string): Promise<AgentState>;
    /**
     * Gets agent graph visualization
     * @returns A promise that resolves to the graph visualization data
     */
    getAgentGraph(): Promise<string>;
    /**
     * Run agent with options
     * @param options - Options for running the agent
     * @returns A promise that resolves to the run result
     */
    run(options: RunOptions): Promise<ChatResponse>;
    /**
     * Chat namespace for sending messages and streaming responses
     */
    chat: {
        /**
         * Sends a message to a thread and receives a response
         * @param options - Options for sending a message
         * @returns A promise that resolves to the chat response
         */
        send: (options: ChatSendOptions) => Promise<ChatResponse>;
        /**
         * Sends a message to a thread and streams the response
         * @param options - Options for streaming a message
         * @param onEvent - Callback function that receives stream events
         * @param onComplete - Optional callback function called when streaming completes
         * @param onError - Optional callback function called when an error occurs
         * @returns A function that can be called to stop the stream
         */
        stream: (options: ChatStreamOptions, onEvent: (event: MessageChunk) => void, onComplete?: (state?: AgentState) => void, onError?: (error: Error) => void) => (() => void);
    };
    /**
     * Resume streaming from a known position
     * @param options - Options for resuming the stream
     * @param onEvent - Callback function that receives stream events
     * @param onComplete - Optional callback function called when streaming completes
     * @param onError - Optional callback function called when an error occurs
     * @returns A function that can be called to stop the stream
     */
    abstract resumeStream(options: ResumeStreamOptions, onEvent: (event: MessageChunk) => void, onComplete?: () => void, onError?: (error: Error) => void): () => void;
    /**
     * Tools namespace for registering and unregistering client-side tools
     */
    tools: {
        /**
         * Registers a client-side tool
         * @param options - Options for registering a tool
         */
        register: (options: RegisterToolOptions) => void;
        /**
         * Unregisters a client-side tool
         * @param name - Tool name
         */
        unregister: (name: string) => void;
    };
}
//# sourceMappingURL=abstract-client.d.ts.map