import { ProjectScopeConfig } from "../../db/manage/scope-definitions.js";
import "../../types/utility.js";
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
import { ContextCacheInsert, ContextCacheSelect } from "../../types/entities.js";

//#region src/data-access/runtime/contextCache.d.ts
/**
 * Get cached context data for a conversation with optional request hash validation
 */
declare const getCacheEntry: (db: AgentsRunDatabaseClient) => (params: {
  conversationId: string;
  contextConfigId: string;
  contextVariableKey: string;
  requestHash?: string;
  scopes: ProjectScopeConfig;
}) => Promise<ContextCacheSelect | null>;
/**
 * Set cached context data for a conversation
 */
declare const setCacheEntry: (db: AgentsRunDatabaseClient) => (entry: ContextCacheInsert) => Promise<ContextCacheSelect | null>;
/**
 * Clear cache entries for a specific conversation
 */
declare const clearConversationCache: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  conversationId: string;
}) => Promise<number>;
/**
 * Clear all cache entries for a specific context configuration
 */
declare const clearContextConfigCache: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  contextConfigId: string;
}) => Promise<number>;
/**
 * Clean up all cache entries for a tenant
 */
declare const cleanupTenantCache: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<number>;
/**
 * Invalidate the headers cache for a conversation
 */
declare const invalidateHeadersCache: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  conversationId: string;
  contextConfigId: string;
}) => Promise<number>;
/**
 * Invalidate specific cache entries for invocation-trigger definitions
 */
declare const invalidateInvocationDefinitionsCache: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  conversationId: string;
  contextConfigId: string;
  invocationDefinitionIds: string[];
}) => Promise<number>;
/**
 * Get all cache entries for a conversation
 */
declare const getConversationCacheEntries: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  conversationId: string;
}) => Promise<ContextCacheSelect[]>;
/**
 * Get all cache entries for a context configuration
 */
declare const getContextConfigCacheEntries: (db: AgentsRunDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  contextConfigId: string;
}) => Promise<ContextCacheSelect[]>;
//#endregion
export { cleanupTenantCache, clearContextConfigCache, clearConversationCache, getCacheEntry, getContextConfigCacheEntries, getConversationCacheEntries, invalidateHeadersCache, invalidateInvocationDefinitionsCache, setCacheEntry };