/** * Descriptor-only JSON projection shared by connector-account storage adapters. * Writes fail typed before persistence; audit metadata replaces hostile or * over-budget branches with a visible sentinel so diagnostics are not lost. */ import { ElizaError } from "../errors.js"; import type { ConnectorAccountJsonObject } from "../types/database.js"; import type { JsonValue } from "../types/primitives.js"; export declare const CONNECTOR_JSON_UNBOUNDED = "CONNECTOR_JSON_UNBOUNDED"; export declare const CONNECTOR_JSON_BOUNDED = "[BOUNDED]"; export declare const MAX_CONNECTOR_JSON_DEPTH = 16; export declare const MAX_CONNECTOR_JSON_NODES = 2048; export declare const MAX_CONNECTOR_JSON_STRING_BYTES: number; type OverflowReason = "accessor" | "cycle" | "depth" | "leaf" | "nodes" | "reflection"; export declare class ConnectorJsonUnboundedError extends ElizaError { readonly name = "ConnectorJsonUnboundedError"; constructor(reason: OverflowReason, context?: Record, cause?: unknown); } /** Clone a connector JSON object and fail typed before any persistence. */ export declare function cloneConnectorJsonObject(value: ConnectorAccountJsonObject | undefined): ConnectorAccountJsonObject; /** Redact and bound audit metadata without dropping the diagnostic event. */ export declare function redactConnectorJsonAudit(value: Record | undefined, redactKey: (key: string) => boolean): ConnectorAccountJsonObject; /** Clone a JSON value for adapter read isolation. */ export declare function cloneConnectorJsonValue(value: unknown): JsonValue; export {};