import { Message, MessageChunk } from "@axiom-lattice/protocols";
import { AgentState, Assistant, ChatResponse, ChatSendOptions, ChatStreamOptions, ClientConfig, CreateAssistantOptions, CreateThreadOptions, GetMessagesOptions, GetScheduledTasksOptions, ListThreadsOptions, RegisterToolOptions, ResumeStreamOptions, RunOptions, ScheduledTask, Thread, UpdateAssistantOptions, UpdateThreadOptions } from "./types";
import type { Skill, CreateSkillRequest } from "@axiom-lattice/protocols";
/**
 * 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;
    assistantId: string;
    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;
    /**
     * Set assistant ID for the client
     * @param assistantId - Assistant identifier
     */
    setAssistantId(assistantId: string): void;
    /**
     * Creates a new instance of the client with the given configuration
     * @param config - Configuration options for the client
     * @returns A new instance of the client
     */
    protected abstract createInstance(config: ClientConfig): AbstractClient;
    /**
     * Creates a clone of the current client instance
     * @param overrides - Optional configuration overrides for the cloned client
     * @returns A new client instance with the same configuration and state
     */
    clone(overrides?: Partial<ClientConfig>): AbstractClient;
    /**
     * 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
     * @deprecated Use threads.create() instead
     * @param options - Options for creating a thread
     * @returns A promise that resolves to the thread ID
     */
    createThread(options: CreateThreadOptions): Promise<string>;
    /**
     * Retrieves thread information
     * @deprecated Use threads.get() instead
     * @param threadId - Thread identifier
     * @returns A promise that resolves to the thread information
     */
    getThread(threadId: string): Promise<Thread>;
    /**
     * Lists all threads
     * @deprecated Use threads.list() instead
     * @param options - Options for listing threads
     * @returns A promise that resolves to an array of threads
     */
    listThreads(options?: ListThreadsOptions): Promise<Thread[]>;
    /**
     * Deletes a thread
     * @deprecated Use threads.delete() instead
     * @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;
    };
    /**
     * Assistants namespace for managing assistants
     */
    assistants: {
        /**
         * Lists all available assistants
         * Returns both code-configured and stored assistants
         * @returns A promise that resolves to the list of assistants
         */
        list: () => Promise<Assistant[]>;
        /**
         * Retrieves a single assistant by ID
         * Checks both code-configured and stored assistants
         * @param id - Assistant identifier
         * @returns A promise that resolves to the assistant information
         */
        get: (id: string) => Promise<Assistant>;
        /**
         * Creates a new assistant
         * Only creates stored assistants (code-configured assistants cannot be created via API)
         * @param options - Options for creating an assistant
         * @returns A promise that resolves to the created assistant
         */
        create: (options: CreateAssistantOptions) => Promise<Assistant>;
        /**
         * Updates an existing assistant by ID
         * Only works on stored assistants (code-configured assistants cannot be updated)
         * @param id - Assistant identifier
         * @param options - Options for updating an assistant
         * @returns A promise that resolves to the updated assistant
         */
        update: (id: string, options: UpdateAssistantOptions) => Promise<Assistant>;
        /**
         * Deletes an assistant by ID
         * Only works on stored assistants (code-configured assistants cannot be deleted)
         * @param id - Assistant identifier
         * @returns A promise that resolves when the assistant is deleted
         */
        delete: (id: string) => Promise<void>;
    };
    /**
     * Skills namespace for managing skills
     */
    skills: {
        /**
         * Lists all available skills
         * @returns A promise that resolves to the list of skills
         */
        list: () => Promise<Skill[]>;
        /**
         * Retrieves a single skill by ID
         * @param id - Skill identifier
         * @returns A promise that resolves to the skill information
         */
        get: (id: string) => Promise<Skill>;
        /**
         * Creates a new skill
         * @param options - Options for creating a skill
         * @returns A promise that resolves to the created skill
         */
        create: (options: CreateSkillRequest) => Promise<Skill>;
        /**
         * Updates an existing skill by ID
         * @param id - Skill identifier
         * @param options - Options for updating a skill
         * @returns A promise that resolves to the updated skill
         */
        update: (id: string, options: Partial<CreateSkillRequest>) => Promise<Skill>;
        /**
         * Deletes a skill by ID
         * @param id - Skill identifier
         * @returns A promise that resolves when the skill is deleted
         */
        delete: (id: string) => Promise<void>;
    };
    /**
     * Threads namespace for managing threads for the current assistant
     */
    threads: {
        /**
         * Lists all threads for the current assistant
         * @returns A promise that resolves to the list of threads
         */
        list: () => Promise<Thread[]>;
        /**
         * Retrieves a single thread by ID for the current assistant
         * @param threadId - Thread identifier
         * @returns A promise that resolves to the thread information
         */
        get: (threadId: string) => Promise<Thread>;
        /**
         * Creates a new thread for the current assistant
         * @param options - Options for creating a thread
         * @returns A promise that resolves to the created thread
         */
        create: (options: CreateThreadOptions) => Promise<Thread>;
        /**
         * Updates an existing thread by ID for the current assistant
         * @param threadId - Thread identifier
         * @param options - Options for updating a thread
         * @returns A promise that resolves to the updated thread
         */
        update: (threadId: string, options: UpdateThreadOptions) => Promise<Thread>;
        /**
         * Deletes a thread by ID for the current assistant
         * @param threadId - Thread identifier
         * @returns A promise that resolves when the thread is deleted
         */
        delete: (threadId: string) => Promise<void>;
    };
    /**
     * Schedules namespace for managing scheduled tasks
     */
    schedules: {
        /**
         * Gets scheduled tasks for a specific thread
         * @param options - Options for getting scheduled tasks
         * @returns A promise that resolves to the list of scheduled tasks
         */
        getByThread: (options: GetScheduledTasksOptions) => Promise<ScheduledTask[]>;
        /**
         * Gets a single scheduled task by ID
         * @param taskId - Task identifier
         * @returns A promise that resolves to the scheduled task or null
         */
        get: (taskId: string) => Promise<ScheduledTask | null>;
        /**
         * Cancels a scheduled task
         * @param taskId - Task identifier
         * @returns A promise that resolves when the task is cancelled
         */
        cancel: (taskId: string) => Promise<boolean>;
        /**
         * Pauses a scheduled cron task
         * @param taskId - Task identifier
         * @returns A promise that resolves when the task is paused
         */
        pause: (taskId: string) => Promise<boolean>;
        /**
         * Resumes a paused cron task
         * @param taskId - Task identifier
         * @returns A promise that resolves when the task is resumed
         */
        resume: (taskId: string) => Promise<boolean>;
    };
}
//# sourceMappingURL=abstract-client.d.ts.map