import type { CompactionResult, ExtensionAPI, SessionEntry } from "@earendil-works/pi-coding-agent"; import { type CompactionEnricher } from "./enrichers.js"; import { type CompactionInstructionDecodeError, type CompactionInstructionPolicy } from "./instructions.js"; import { type ProjectionOmittedCounts } from "./projections.js"; type CompactionEngine = "pi" | "fabric"; export type CutResult = { ok: true; summarized: SessionEntry[]; firstKeptEntryId: string; firstSummarizedEntryId: string; lastSummarizedEntryId: string; lastTimestamp: string; } | { ok: false; reason: "empty"; }; export declare const computeCut: (branchEntries: SessionEntry[]) => CutResult; interface EntryRange { first: string; last: string; } export interface FabricCompactionDetailsV2 { compactor: "fabric"; version: 2; sections: string[]; coverage: { cumulativeSourceRange: EntryRange; liveCutRange: EntryRange; }; counts: { branchEntries: number; cumulativeSourceEntries: number; sourceEvents: number; liveCutEntries: number; priorFabricV1: number; priorFabricV2: number; }; omittedCounts: ProjectionOmittedCounts & { preserve: number; }; instructionPolicy: CompactionInstructionPolicy; stableAddresses: { firstKeptEntryId: string; cumulativeSourceRange: EntryRange; recall: "session-entry-id-range"; }; timestamp: string; } export declare const fabricCompactionVersion: (details: unknown) => 1 | 2 | undefined; export declare const compileFabricSummary: (branchEntries: SessionEntry[], tokensBefore: number, enrichers?: readonly CompactionEnricher[], customInstructions?: string) => { compaction: CompactionResult; } | { cancel: true; reason: string; instructionError?: CompactionInstructionDecodeError; }; export interface CompactionHookOptions { getEngine: () => CompactionEngine; enrichers?: readonly CompactionEnricher[]; } export declare const registerCompactionHook: (pi: ExtensionAPI, options: CompactionHookOptions) => void; export {}; //# sourceMappingURL=hook.d.ts.map