import type { MemoryReporter } from "../extensions/types.ts";
import type { ResidentStoreSize } from "../session-resident-store-size.ts";
/** `SENPI_MEMORY_REPORT=1` installs the on-demand report; nothing is installed or kept without it. */
export declare const MEMORY_REPORT_ENV = "SENPI_MEMORY_REPORT";
/** `SENPI_MEMORY_REPORT_SNAPSHOT=1` adds a heap snapshot to each report (itself a large allocation). */
export declare const MEMORY_REPORT_SNAPSHOT_ENV = "SENPI_MEMORY_REPORT_SNAPSHOT";
export declare function memoryReportEnabled(env?: NodeJS.ProcessEnv): boolean;
export declare function memoryReportSnapshotEnabled(env?: NodeJS.ProcessEnv): boolean;
/** Keys the report owns; an extension reporter cannot shadow them. */
export declare const RESERVED_MEMORY_REPORT_KEYS: ReadonlySet<string>;
export interface NamedMemoryReporter {
    readonly name: string;
    readonly reporter: MemoryReporter;
}
/** What a live session contributes to its report; read only when a report is requested. */
export interface MemoryReportSessionSource {
    sessionId(): string;
    sessionFile(): string | undefined;
    residentStore(): ResidentStoreSize;
    reporters(): readonly NamedMemoryReporter[];
}
export interface TuiRenderCacheTotals {
    readonly components: number;
    readonly cachedLines: number;
    readonly images: number;
    /** Cards that finished and keep a retained \`result\` (senpi#1960). */
    readonly finishedCards: number;
    /** Byte cost of every live card's cached rendered lines (2 per code unit + 8 per array slot). */
    readonly cachedLinesBytes: number;
    /** Serialized size of the retained \`result\` over every finished card, computed once at finalize. */
    readonly resultBytes: number;
}
/** Lists `owner`'s session for reports while the flag is on; the returned function removes it. */
export declare function registerMemoryReportSession(owner: object, source: MemoryReportSessionSource): () => void;
export declare function memoryReportSessionFor(owner: object): MemoryReportSessionSource | undefined;
export declare function memoryReportSessions(): MemoryReportSessionSource[];
/** Called by the terminal UI: only a process that renders tool cards reports their render cache. */
export declare function registerTuiRenderCacheSource(read: () => TuiRenderCacheTotals): void;
export declare function tuiRenderCacheTotals(): TuiRenderCacheTotals | undefined;
//# sourceMappingURL=memory-report-registry.d.ts.map