//#region src/core/privacy.d.ts declare const REDACTED_IMAGE_PLACEHOLDER = "[base64 image redacted]"; declare const REDACTED_CONTENT_PLACEHOLDER = "[content redacted]"; declare const MAX_CHUNK_SIZE = 1024; declare const MAX_CHUNKS = 8; declare function isBase64DataUrl(text: string): boolean; declare function isValidUrl(text: string): boolean; declare function isRawBase64(text: string): boolean; declare function createContentHash(content: unknown): string; declare function redactBase64Content(value: unknown): unknown; declare function redactPiiPatterns(text: unknown): string; /** * Return the `$llm_message` payload for the given text. * * Content is stored as `{ text: content }` at full length — the Node SDK * does not truncate string properties, and Nova already whitelists * `$llm_message` server-side. * * Previous versions split long content into `c0`..`c7` chunks. That format * is still readable via {@link getTextFromLlmMessage} for backward * compatibility, but is no longer produced. */ declare function chunkContent(text: string): Record; declare function getTextFromLlmMessage(llmMessage: Record): string; declare function sanitizeAnyContent(content: unknown, privacyMode?: boolean, redactPii?: boolean): Record; declare function sanitizeStructuredContent(content: unknown, redactPii: boolean, pc?: PrivacyConfig | null): unknown; /** * Normalize tool definitions from various provider formats into a canonical shape: * `[{ name, description, parameters }]`. */ declare function normalizeToolDefinitions(toolDefinitions: Array>): Array>; type CustomRedactionPattern = string | { pattern: string; replacement: string; }; /** * Compile caller-supplied redaction patterns. Throws `ConfigurationError` * on an invalid entry so a typo is caught at configuration time instead of * silently disabling that rule. */ declare function compileCustomRedactionPatterns(patterns: readonly CustomRedactionPattern[]): Array<{ regex: RegExp; replacement: string; }>; interface PrivacyConfigOptions { privacyMode?: boolean; redactPii?: boolean; customRedactionPatterns?: Array; customRedactionFn?: (text: string) => string; contentMode?: string | null; validate?: boolean; debug?: boolean; captureStackTrace?: boolean; } declare class PrivacyConfig { readonly privacyMode: boolean; readonly redactPii: boolean; readonly validate: boolean; readonly debug: boolean; readonly captureStackTrace: boolean; readonly customPatterns: Array; private readonly _compiledCustomPatterns; private readonly _customRedactionFn; private readonly _contentMode; private _warnedCustomRedactionFailure; constructor(options?: PrivacyConfigOptions); get contentMode(): string | null; /** * Public entry point for applying the caller-configured custom redaction * (patterns + function) to an arbitrary string. Used by tool-payload * sanitization so custom rules reach every content channel, not just * `$llm_message`. */ applyCustomRedaction(text: string): string; private _applyCustomPatterns; private _applyCustomFn; private _warnCustomRedactionFailure; private _applyCustomPatternsToLlmMessage; sanitizeContent(content: unknown): Record; sanitizeSystemPrompt(systemPrompt: string | null): Record; sanitizeReasoningContent(reasoningContent: string | null, reasoningTokens?: number | null): Record; sanitizeToolDefinitions(toolDefinitions: Array> | null | undefined): Record; private _redactCappedText; } //#endregion export { CustomRedactionPattern, MAX_CHUNKS, MAX_CHUNK_SIZE, PrivacyConfig, PrivacyConfigOptions, REDACTED_CONTENT_PLACEHOLDER, REDACTED_IMAGE_PLACEHOLDER, chunkContent, compileCustomRedactionPatterns, createContentHash, getTextFromLlmMessage, isBase64DataUrl, isRawBase64, isValidUrl, normalizeToolDefinitions, redactBase64Content, redactPiiPatterns, sanitizeAnyContent, sanitizeStructuredContent }; //# sourceMappingURL=privacy.d.ts.map