Skip to main content

Module hash_utils

Module hash_utils 

Source
Expand description

Hash utilities for tool catalog and system prompt caching.

Provides hashing functions for tool definitions, system prompts, and low-signal attempt deduplication keys.

All hashes are stable across processes (FNV-1a) so cache keys remain comparable after restarts and in persisted harness artifacts.

Structs§

PromptCapabilityIdentity
Resolved wire capabilities that define a cache-stable request segment. Runtime counters and environment observations deliberately do not belong here.
StableHasher
Stable FNV-1a 64-bit hasher with fixed offset basis.

Functions§

hash_json_value
Hash a serializable value as JSON with a stable cross-process hash.
hash_tool_definitions
Hash tool definitions for cache key computation.
hash_value
Hash a value with a stable cross-process hash.
low_signal_attempt_key
Generate a deduplication key for low-signal tool attempts.
stable_system_prefix_hash
Compute the stable instruction digest from explicitly classified sections.