Expand description
Rust interoperability helpers for Token Terminator.
The production Token Terminator runtime remains the Python/Hermes implementation. This crate intentionally exposes only stable cross-language primitives that Rust agent adapters can use without embedding Python: content-addressed artifact identities, digest verification, and the strict character-reduction invariant.
It is not a PyO3 accelerator and does not implement the SQLite vault, request compiler, tokenizer adapters, or Hermes lifecycle hooks.
Structs§
- Artifact
Identity - A content identity compatible with Token Terminator’s Python artifact vault.
- Invalid
Sha256 - Error returned when a caller supplies something that is not a SHA-256 hex digest.
Constants§
- SHORT_
ARTIFACT_ HEX_ LEN - Number of hexadecimal SHA-256 characters used by Token Terminator’s normal short artifact identifier.
Functions§
- artifact_
id_ from_ sha256 - Build Token Terminator’s normal short artifact ID from a full SHA-256 digest.
- artifact_
id_ matches - Return whether an artifact ID is compatible with the supplied UTF-8 text.
- artifact_
identity - Compute the normal Token Terminator identity for UTF-8 text.
- full_
artifact_ id_ from_ sha256 - Build Token Terminator’s full collision-fallback artifact ID from a digest.
- sha256_
hex - Return the lowercase SHA-256 digest of arbitrary bytes.
- strictly_
smaller_ chars - Mirror Token Terminator’s character-based strict-reduction invariant.
- verify_
sha256 - Verify that UTF-8 text has the expected SHA-256 digest.