import { type AuditRedactor } from './text.mts'; export type AuditRender = { redact?: AuditRedactor | undefined; budgetBytes?: number; /** Field indexes that may be cut, least important first; other fields are never cut. */ shrinkOrder?: readonly number[]; }; export declare function byteLength(value: string): number; /** * Renders fields whole while they fit in `budgetBytes` (minus the fixed `overheadBytes`). When they * do not, only the `shrinkOrder` fields are cut, in that order, each down to at most a cut marker, * and only at token boundaries. The result can still exceed the budget if the fields cannot shrink * enough; callers check the size. */ export declare function fitFields(fields: string[][], overheadBytes: number, budgetBytes: number, shrinkOrder: readonly number[]): string[]; /** * Renders every item whole when together they fit `totalBytes`. Otherwise renders the largest * leading run of items that each fit an equal share of what remains after `reserveBytes` (for the * omission note), and reports how many were left out. Never renders more than the total allows. * A share below `minShareBytes` would leave only stubs, so fewer items are kept instead. */ export declare function selectWithin(items: T[], totalBytes: number, reserveBytes: number, separatorBytes: number, minShareBytes: number, render: (item: T, shareBytes: number) => string): { rendered: string[]; omitted: number; };