/** * Integration utility functions. */ /** * Produces a safe, human-readable description of a value's type * without exposing potentially sensitive data. * * @param value - The value to describe * @returns A type description string (e.g. "null", "object with keys [id, name]", "string") */ export function describeType(value: unknown): string { if (value === null) return "null"; if (value === undefined) return "undefined"; if (Array.isArray(value)) return `array (length ${value.length})`; const t = typeof value; if (t === "object") { const keys = Object.keys(value as Record); if (keys.length === 0) return "empty object"; return `object with keys [${keys.slice(0, 5).join(", ")}${keys.length > 5 ? ", ..." : ""}]`; } return t; }