/** * JSON serialization for command output. 64-bit values (node IDs, Matter * microsecond timestamps) are bigints internally and render as decimal * strings, never as lossy JavaScript numbers. */ export function toJsonString(value: unknown): string { return JSON.stringify(value, (_key, inner) => (typeof inner === "bigint" ? inner.toString() : inner), 2); }