/** * Defensive JSON normalization for provider-bound chat values. * * Tool implementations are extension boundaries and can return runtime values * that JSON does not represent directly. These helpers preserve useful data * without invoking getters or custom `toJSON` hooks, and keep malformed, * cyclic, or excessively large values from crashing message preparation. */ /** JSON-compatible value emitted by chat boundary normalization. */ export type ChatJsonValue = null | boolean | number | string | ChatJsonValue[] | { [key: string]: ChatJsonValue; }; /** Resource limits for chat JSON normalization. */ export interface ChatJsonValueOptions { maxDepth?: number; maxNodes?: number; maxStringChars?: number; maxContainerEntries?: number; } /** * Convert an unknown runtime value into a bounded JSON-compatible snapshot. * * BigInts become decimal strings, non-finite numbers become `null`, cycles * receive an explicit marker, and accessors/custom `toJSON` hooks are not run. */ export declare function toChatJsonValue(value: unknown, options?: ChatJsonValueOptions): ChatJsonValue; /** Serialize an unknown runtime value through {@link toChatJsonValue}. */ export declare function stringifyChatJson(value: unknown, options?: ChatJsonValueOptions): string; //# sourceMappingURL=json-value.d.ts.map