/**
 * UTF-16-aware slice helpers.
 *
 * `String.prototype.slice` operates on UTF-16 code units, not code points,
 * so cutting at an arbitrary index can split a surrogate pair (any non-BMP
 * character — most commonly emoji). The resulting lone surrogate survives
 * `JSON.stringify` as a literal `\uXXXX` escape, but is rejected by strict
 * JSON parsers — including the Anthropic API, which returns
 * "invalid high surrogate in string" and fails the request.
 *
 * These helpers shift the cut to a code-point boundary so each pair lands
 * wholly on one side of the slice. They do nothing extra when the boundary
 * is already clean, so it is safe to swap them in wherever `slice` is used
 * on user-controlled text that may travel through a JSON channel.
 */
/**
 * If `i` lands between the high and low half of a UTF-16 surrogate pair,
 * return `i - 1` so a `slice` at this boundary keeps the pair intact (it
 * ends up wholly on one side). Otherwise return `i` unchanged.
 */
export declare function alignCodePointBoundary(s: string, i: number): number;
/** Like `s.slice(0, n)` but never splits a surrogate pair. */
export declare function safeSliceHead(s: string, n: number): string;
/** Like `s.slice(s.length - n)` but never splits a surrogate pair. */
export declare function safeSliceTail(s: string, n: number): string;
