import { EditContextType } from "../client/editContext";
import { PageViewContext } from "../page-viewer/pageViewContext";
export interface PageContext {
    abstract: string;
    pageTitle: string;
    pageType: string;
    lastGenerated: Date;
}
/**
 * Generates a concise page abstract for use in completion prompts
 * @param editContext - The current edit context
 * @param pageViewContext - The page view context
 * @returns Promise<PageContext> - The generated page context
 */
export declare function generatePageContext(editContext: EditContextType, pageViewContext: PageViewContext): Promise<PageContext | null>;
/**
 * Generates AI image-search terms from the current item's context.
 * The server pulls the item content and produces a few search keywords.
 * @param itemId - The current item id
 * @param language - The item language (defaults to "en")
 * @returns Promise<string> - The suggested search terms ("" if none)
 */
export declare function getImageSearchTerms(itemId: string, language?: string, pageId?: string, signal?: AbortSignal): Promise<string>;
/**
 * Clears the context cache for a specific item or all items
 * @param itemKey - Optional specific item key to clear, if not provided clears all
 */
export declare function clearContextCache(itemKey?: string): void;
/**
 * Gets a cached context without regenerating it
 * @param editContext - The current edit context
 * @returns PageContext | null - The cached context if available
 */
export declare function getCachedContext(editContext: EditContextType): PageContext | null;
