/** * Serializes model and tool payloads into span content attributes for the * local trace viewer: prompt messages, the system prompt, responses, and * tool arguments/results. Everything is capped so a giant payload cannot * bloat a span segment past the reader's per-file limit, and message * payloads stay valid JSON through every truncation path. */ /** Content attributes are capped so a giant payload cannot bloat a span segment. */ export declare const CONTENT_ATTRIBUTE_LIMIT: number; /** * Serializes one payload value. `strip` removes {@link CONTENT_NOISE_KEYS}; * pass `false` for tool data, where those keys may be legitimate domain * fields the user authored or the tool returned. */ export declare function contentAttribute(value: unknown, strip?: boolean): string | undefined; /** * Serializes the prompt messages, keeping the result parseable: oldest * messages drop first behind an omission marker, and a single message over * the cap is truncated at the text level rather than the JSON level. */ export declare function messagesContentAttribute(messages: unknown): string | undefined; /** * Serializes provider-executed tool results, keeping the attribute valid * JSON under the cap: when the full payload is too big, each entry's input * and output collapse to capped text at progressively smaller budgets * instead of cutting the JSON mid-string. */ export declare function toolResultsContentAttribute(results: readonly Record[]): string | undefined; /** Normalizes the AI SDK's `instructions` prompt to plain text for `ai.prompt.system`. */ export declare function systemPromptAttribute(instructions: unknown): string | undefined; /** Caps plain text, marking the cut. */ export declare function textContentAttribute(text: string): string | undefined;