Skip to main content

hash_tool_specs

Function hash_tool_specs 

Source
pub fn hash_tool_specs(specs: &[ToolSpec]) -> String
Expand description

Compute a BLAKE3 hash of the tool registry specs.

The hash is computed over a deterministic JSON representation of the specs, sorted by tool name. This ensures that the same set of tools always produces the same hash, regardless of registration order.

Used by both SessionFile (legacy .json resume) and the JSONL session meta’s tool_registry_hash field (g151) so that recursive resume can refuse to load a session whose tool inventory has drifted.