Class SessionIdUtils
java.lang.Object
io.agentscope.harness.agent.gateway.SessionIdUtils
Deterministic session-ID derivation. Produces a 12-character hex string from arbitrary input
parts using SHA-256, guaranteeing the same inputs always yield the same output regardless of
JVM instance or machine.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringdeterministicHash(String... parts) Returns a 12-character lowercase hex hash derived from the given parts joined by"/".
-
Method Details
-
deterministicHash
Returns a 12-character lowercase hex hash derived from the given parts joined by"/".The hash is deterministic: identical inputs produce identical output on any machine. The output is filename-safe (lowercase hex only). Collision probability is negligible for practical session counts (2^48 space).
- Parameters:
parts- one or more non-null seed values- Returns:
- 12-char hex string
-