/**
 * @description Serializes a value for a span attribute: strings pass through, everything else is JSON, with a `String()` fallback for circular structures and `[unserializable]` when even that throws.
 * @param value {T} - Value to serialize.
 * @returns {string} The serialized value; never throws.
 */
export declare function stringify<T>(value: T): string;
/**
 * @description Cuts every string inside a structure down to a per-string character budget, in place, leaving a truncation note on each cut string. Only call it on a copy the caller owns.
 * @param node {T} - String or structure to shorten.
 * @param budget {number} - Maximum characters kept per string, note included.
 * @returns {T | string} The shortened string, or the same structure after its strings were cut.
 */
export declare function capStrings<T>(node: T, budget: number): T | string;
