import { AgentConversationHistoryConfig, Artifact, ConversationHistoryConfig, ConversationScopeOptions, ResolvedRef } from "@inkeep/agents-core";

//#region src/domains/run/data/conversations.d.ts
declare const compressionLocks: Map<string, Promise<any>>;
/**
 * Creates default conversation history configuration
 * @param mode - The conversation history mode ('full' | 'scoped' | 'none')
 * @returns Default AgentConversationHistoryConfig
 */
declare function createDefaultConversationHistoryConfig(mode?: 'full' | 'scoped' | 'none'): AgentConversationHistoryConfig;
/**
 * Saves the result of an A2A client sendMessage call as a conversation message
 * @param response - The response from a2aClient.sendMessage()
 * @param params - Parameters for saving the message
 * @returns The saved message or null if no text content was found
 */
declare function saveA2AMessageResponse(response: any,
// SendMessageResponse type
params: {
  tenantId: string;
  projectId: string;
  conversationId: string;
  messageType: 'a2a-response' | 'a2a-request';
  visibility: 'internal' | 'external' | 'user-facing';
  fromSubAgentId?: string;
  toSubAgentId?: string;
  fromExternalAgentId?: string;
  toExternalAgentId?: string;
  a2aTaskId?: string;
  a2aSessionId?: string;
  metadata?: Record<string, unknown>;
}): Promise<any | null>;
/**
 * Applies filtering based on agent, task, or both criteria
 * Returns the filtered messages array
 */
declare function getScopedHistory({
  tenantId,
  projectId,
  conversationId,
  filters,
  options
}: {
  tenantId: string;
  projectId: string;
  conversationId: string;
  filters?: ConversationScopeOptions;
  options?: ConversationHistoryConfig;
}): Promise<any[]>;
/**
 * Get user-facing conversation history (for client display)
 */
declare function getUserFacingHistory(tenantId: string, projectId: string, conversationId: string, limit?: 50): Promise<any[]>;
/**
 * Get full conversation context (for agent processing)
 */
declare function getFullConversationContext(tenantId: string, projectId: string, conversationId: string, maxTokens?: number): Promise<any[]>;
/**
 * Get formatted conversation history for a2a
 */
declare function getFormattedConversationHistory({
  tenantId,
  projectId,
  conversationId,
  currentMessage,
  options,
  filters,
  sessionId,
  summarizerModel
}: {
  tenantId: string;
  projectId: string;
  conversationId: string;
  currentMessage?: string;
  options?: ConversationHistoryConfig;
  filters?: ConversationScopeOptions;
  sessionId?: string;
  summarizerModel?: any;
}): Promise<string>;
/**
 * Modern conversation history retrieval with compression support
 * Replaces getFormattedConversationHistory with built-in compression when needed
 */
declare function getConversationHistoryWithCompression({
  tenantId,
  projectId,
  conversationId,
  currentMessage,
  options,
  filters,
  summarizerModel,
  streamRequestId,
  fullContextSize
}: {
  tenantId: string;
  projectId: string;
  conversationId: string;
  currentMessage?: string;
  options?: ConversationHistoryConfig;
  filters?: ConversationScopeOptions;
  summarizerModel?: any;
  streamRequestId?: string;
  fullContextSize?: number;
}): Promise<string>;
/**
 * Apply conversation compression using the BaseCompressor infrastructure
 */
declare function compressConversationIfNeeded(messages: any[], params: {
  conversationId: string;
  tenantId: string;
  projectId: string;
  summarizerModel: any;
  streamRequestId?: string;
  fullContextSize?: number;
}): Promise<any[]>;
/**
 * Get artifacts that are within the scope of the conversation history
 * Only returns artifacts from messages that are actually visible to the LLM
 * Uses the same scoping logic as getFormattedConversationHistory
 */
declare function getConversationScopedArtifacts(params: {
  tenantId: string;
  projectId: string;
  conversationId: string;
  historyConfig: AgentConversationHistoryConfig;
  ref: ResolvedRef;
}): Promise<Artifact[]>;
//#endregion
export { compressConversationIfNeeded, compressionLocks, createDefaultConversationHistoryConfig, getConversationHistoryWithCompression, getConversationScopedArtifacts, getFormattedConversationHistory, getFullConversationContext, getScopedHistory, getUserFacingHistory, saveA2AMessageResponse };