import { AgentChat, StreamChunk, AgentMessage, AgentArtifact, SendMessagePayloadWithContent, AgentProcessSummary, MessagesPage, Activity, ActivitySummary, ActivitySummaryParams } from '../types';
import { GetMessagesOptions, AgentTransport, UpsertAgentPreferencesRequest, UpsertAgentPreferencesResponse, UpsertAgentPreferencesBatchRequest, UpsertAgentPreferencesBatchResponse } from './AgentTransport';
import { DataWithCursor, AgentConfiguration, ModelOption } from '@multiplayer-app/ai-agent-types';
import { ToolRegistry } from '../ToolRegistry';
import { DirectTransportConfig } from '../../config/types';

export declare class DirectTransport implements AgentTransport {
    private config;
    private chats;
    private chatState;
    private toolRegistry?;
    private streamControllers;
    private contextKeys?;
    private initialized;
    private models?;
    private untitledChatText;
    constructor(config: DirectTransportConfig);
    updateConfig(next: DirectTransportConfig): void;
    /**
     * Optional context key metadata used for tool filtering.
     * For the legacy direct transport implementation, we simply
     * store this so the runtime type-checks correctly. Tool
     * selection logic can be wired to this.contextKeys in future
     * without changing the public API.
     */
    setContextKeys(contextKeys: Array<{
        key: string;
        tools: string[];
    }>): void;
    private initializeStorage;
    private generateLocalTitle;
    setToolRegistry(registry: ToolRegistry): void;
    setModels(models: ModelOption[]): void;
    setUntitledChatText(text: string): void;
    private toolsToFunctions;
    private toolToFunction;
    private normalizeSchema;
    private normalizePropertySchema;
    private extractDescription;
    private endpoint;
    private buildHeaders;
    private clearErrorMessages;
    private appendErrorMessage;
    private attachChatToError;
    private ensureChat;
    private persistChat;
    private toOpenAIMessage;
    private callModel;
    private generateLlmTitle;
    generateTitle(input: {
        content: string;
        contextKey: string;
        userId?: string;
        strategy?: 'local' | 'llm';
    }): Promise<string>;
    sendMessage(payload: SendMessagePayloadWithContent): Promise<AgentChat>;
    streamMessage(payload: SendMessagePayloadWithContent, onChunk: (chunk: StreamChunk) => void, options?: {
        streamKey?: string;
    }): Promise<{
        id: string;
        messages: AgentMessage[];
    } | void>;
    listChats(params?: {
        contextKey?: string;
        skip?: number;
        limit?: number;
        userId?: string;
        multiUser?: boolean;
        sortField?: string;
        sortOrder?: 'asc' | 'desc';
    }): Promise<DataWithCursor<AgentChat>>;
    getChat(chatId: string): Promise<AgentChat>;
    getMessages(chatId: string, options?: GetMessagesOptions): Promise<MessagesPage>;
    deleteChat(chatId: string): Promise<void>;
    listAgents(): Promise<AgentProcessSummary[]>;
    controlAgent(): Promise<AgentProcessSummary>;
    listArtifacts(): Promise<AgentArtifact[]>;
    listActivities(): Promise<DataWithCursor<Activity>>;
    listActivitySourceTypes(): Promise<string[]>;
    getActivity(): Promise<Activity | null>;
    getActivitySummary(_params?: ActivitySummaryParams): Promise<ActivitySummary[]>;
    cancelStream(streamKey?: string): void;
    listModels(): Promise<ModelOption[]>;
    listAgentConfigurations(): Promise<AgentConfiguration[]>;
    upsertAgentPreferences(_agentName: string, _input: UpsertAgentPreferencesRequest): Promise<UpsertAgentPreferencesResponse>;
    upsertAgentPreferencesBatch(_input: UpsertAgentPreferencesBatchRequest): Promise<UpsertAgentPreferencesBatchResponse>;
}
//# sourceMappingURL=DirectTransport.d.ts.map