/** * distiller-compaction.ts * * Fresh-context DISTILLER compaction strategy, an alternative to the in-place * structured summarization in `context-compaction.ts`. * * Where the structured strategy assembles a handoff from many targeted * extraction calls over the existing message history, the distiller makes ONE * fresh model call that distills the conversation into a structured * CONTINUATION BRIEF (task state, decisions made, open threads, key * file/symbol references) which then seeds a fresh context. The brief replaces * the conversation exactly like the structured handoff does. * * PARITY, NOT DUPLICATION. The standing instruction chain + active skill * frontmatter are re-injected at the boundary here through the SAME * `buildReinjectedInstructions` seam the structured strategy uses (never a * second copy), and prior re-injected blocks are stripped from the history * before it is handed to the distiller model call, identical to * `runCompaction`. * * The distiller does NOT decide whether its own output is good enough: the * caller (`compactConversation`) scores every distillation through the SAME * quality scorer as the structured strategy and falls back to structured when * the distillation scores below the floor. A model-call failure surfaces as a * thrown error so the caller can fall back honestly rather than committing an * empty brief. */ import type { ProviderRegistry } from '../providers/registry.js'; import type { CompactionContext, CompactionResult } from './compaction-types.js'; /** * Error thrown when the distiller's fresh model call cannot produce a usable * continuation brief (provider unavailable, empty response, call failure). The * caller catches this and falls back to the structured strategy. */ export declare class DistillerUnavailableError extends Error { constructor(message: string); } /** * distillConversation, fresh-context distiller strategy entry point. * * Makes one fresh model call to produce a structured continuation brief, * re-injects the standing instruction chain + active skill at the boundary, and * returns a `CompactionResult` in the same shape the structured strategy * returns (so the caller scores and commits it identically). * * @throws DistillerUnavailableError when the fresh model call cannot produce a * usable brief; the caller falls back to the structured strategy. */ export declare function distillConversation(ctx: CompactionContext, registry: ProviderRegistry): Promise; //# sourceMappingURL=distiller-compaction.d.ts.map