import { type CompilerAdapterRequest, type PromptPacket } from "../compiler.js"; import { type ContextAdapter } from "../context-compiler.js"; import type { RunStore } from "./store.js"; export interface CompileResult { packet: PromptPacket; } /** * Compile a deterministic PromptPacket from the request state and, when a * store is provided, persist it as compiled-context.json in the attempt * artifact directory. * * R3.7: Context compiler produces deterministic compiled-context.json. * R3.8: Any attempt prompt can be reconstructed from disk artifacts alone. * * A-CTX-0: After compiling, emit a shadow manifest via compileContextShadow * and append a context.shadow_compiled ledger event. Shadow failure must not * break the governed run — original packet is returned unchanged in all cases. */ export declare function compileAndPersistContext(request: CompilerAdapterRequest, options: { attemptIndex: number; store?: RunStore; now?: string; nowMs?: number; contextShadowBudgetTokens?: number; contextAdapter?: ContextAdapter; }): Promise;