Identity & digests
SessionId
SessionId=NewType("SessionId", str)
EventUuid
EventUuid=NewType("EventUuid", str)
ToolUseId
ToolUseId=NewType("ToolUseId", str)
ToolDigest
ToolDigest=NewType("ToolDigest", str)
EventRef
A resolvable reference to a transcript event.
Usage
EventRef(
session_id,
event_uuid,
tool_use_id=None,
)The universal handle for pointing back at full content: every anchor parameter across the platform takes an EventRef. Paths are never part of a reference — transcripts are located by session UUID.
Attributes
canonical_json()
Serialize value per RFC 8785 (JSON Canonicalization Scheme).
Usage
canonical_json(value)Object keys sort by UTF-16 code units, numbers serialize per ECMAScript Number::toString, and strings escape exactly as JSON.stringify. Raises ValueError for NaN, infinities, and integers beyond IEEE-754 double precision — inputs that cannot canonicalize identically across languages.
tool_digest()
Digest a tool call’s content into the cross-language join key.
Usage
tool_digest(tool_name, tool_input)Computed over the raw input mapping only — never the tool-use id, which hook stdin does not carry — so a hook, the parser, and cc-review’s Go port produce identical digests for the same call.