/** * Port of `forge_app::compact::Compactor` for opencode's plugin surface. * * The opencode plugin only exposes the `experimental.session.compacting` hook, * so we do not need the eviction/retention windowing logic — opencode already * decided which tail needs to be compacted and supplies it to us. We focus on: * * 1. Converting opencode messages into `ForgeMessage` shape * 2. Running the summary transformer pipeline * 3. Rendering the `summary-frame` template * * The result is written to `output.prompt`, fully replacing opencode's default * compaction prompt (strategy chosen in the plan: "overwrite with summary-frame"). */ import type { ForgeMessage } from './types'; export interface CompactOptions { workingDir: string; } export declare function renderSummaryFrame(messages: ForgeMessage[], opts: CompactOptions): Promise; /** * Best-effort conversion from an opencode message-part payload to a * `ForgeMessage`. Opencode's types are intentionally loose at this layer of the * plugin API, so we tolerate unknowns and only extract what the summary-frame * template actually consumes. */ export declare function toForgeMessage(raw: unknown): ForgeMessage | null; //# sourceMappingURL=compactor.d.ts.map