Merge metadata into a session, creating the entry if it does not exist.
Automatically triggers cleanup
when the metadata map exceeds 1000 entries.
Two call signatures are supported for Python SDK compatibility:
setSessionMetadata(sessionId, metadata) — merges
every key in the metadata object into the session, returning void.setSessionMetadata(sessionId, key, value)
— sets a single key, returning true for parity with Python.Both forms merge into any existing metadata; they do not replace.
The session identifier.
A metadata record to merge into the session (bulk-merge form), or a single
string key (three-argument form).
The value to set when metadataOrKey is a string key. Only used by the
three-argument form.
void for the bulk-merge form; boolean (true) for the three-argument,
Python-compatible form.