import type { ExtractedProjectMemory, MemoryBlockDrop, MemoryWriteSkip, ProjectMemoryBackupResult, ProjectMemoryBackupSummary, ProjectMemoryExtractResult, ProjectMemoryExtractSummary, SessionScanFailure } from '../types.js'; export declare const START_MARKER = ""; export declare const END_MARKER = ""; export declare function summarizeMemoryBody(body: string): string; /** Extracted memories plus the blocks that were found and rejected. */ export type ExtractedMemoryBlocks = { memories: ExtractedProjectMemory[]; dropped: MemoryBlockDrop[]; }; /** * Same scan as `extractStableProjectMemories`, but also reports the blocks * that were found between the markers and rejected by the parser. * * `extractStableProjectMemories` is the `.memories` projection of this, so the * extracted set is identical by construction — the diagnostics cannot change * which blocks are accepted. */ export declare function extractStableProjectMemoriesWithDiagnostics(content: string, sourceArtifact: string): ExtractedMemoryBlocks; export declare function extractStableProjectMemories(content: string, sourceArtifact: string): ExtractedProjectMemory[]; /** * Render one warning line per rejected block, for the CLI envelope's * `warnings` channel. `unknown-kind` additionally names the accepted * vocabulary, because that is the failure whose remedy is a value change. */ export declare function describeMemoryBlockDrops(dropped: ReadonlyArray): string[]; /** * Render one warning line per session artifact that could not be read. The * sibling of `describeMemoryBlockDrops`, for the failure one level coarser: a * whole file that never yielded blocks at all. */ export declare function describeSessionScanFailures(failures: ReadonlyArray): string[]; /** * How many skipped writes are NAMED before the list closes with a count. * * The COUNT must never be lost — the failure reported here is a reader who could * not tell how many writes were skipped — so it is always `skips.length`, never * the number of lines above it. The LIST is what is capped: it grows with the * capsule while the envelope does not, and 200 skipped blocks measured 201 lines * and a 95 KB envelope with no ceiling on `warnings` anywhere in the code. */ export declare const MAX_NAMED_MEMORY_WRITE_SKIPS = 20; /** * Render one warning line per planned write the store already held, plus a * closing line with both counts. * * The counts are passed in rather than derived from `skips.length`: the caller * observed the run, and `planned - skipped` is a claim about writes this * function did not see. The closing line exists because the failure being * reported is exactly a reader having no way to notice that the two counts * differed — the named lines say which blocks were lost, the count says how * many, and only the second one stays exact past the cap. */ export declare function describeMemoryWriteSkips(skips: ReadonlyArray, plannedCount: number, writtenCount: number): string[]; export declare function summarizeExtractResult(result: ProjectMemoryExtractResult): ProjectMemoryExtractSummary; export declare function summarizeBackupResult(result: ProjectMemoryBackupResult): ProjectMemoryBackupSummary;