/** * Prompt cache boundary — splits the system prompt into a stable prefix (cacheable * by providers like Anthropic) and a dynamic suffix (changes per turn/session). * * xopc uses a system-prompt-cache-boundary pattern. */ export declare const PROMPT_CACHE_BOUNDARY = "\n\n"; /** * Strip the cache boundary marker from a prompt string. */ export declare function stripPromptCacheBoundary(text: string): string; /** * Split a system prompt at the cache boundary. * Returns undefined if no boundary is found. */ export declare function splitPromptCacheBoundary(text: string): { stablePrefix: string; dynamicSuffix: string; } | undefined; /** * Normalize a prompt section for cache stability. * Trims trailing whitespace per line, normalizes line endings, trims overall. */ export declare function normalizePromptSection(text: string): string; /** Add stable content immediately before the cache boundary. */ export declare function appendStablePromptSection(systemPrompt: string, section: string): string; /** Add per-turn context after the cache boundary so the stable prefix remains reusable. */ export declare function appendDynamicPromptSection(systemPrompt: string, section: string): string; /** * pi-coding-agent appends structured sections such as `` and `` after the * host preamble (which already ends with `PROMPT_CACHE_BOUNDARY + dynamicSuffix`). Relocate * those session-stable sections back before `PROMPT_CACHE_BOUNDARY` so they stay KV-cached. */ export declare function relocateStablePiSectionsBeforeCacheBoundary(systemPrompt: string): string;