Skip to main content

Module digest

Module digest 

Source
Expand description

Compiled prompt programs and their digests (PSP-10 system 23).

Digests use the length-prefixed canonical encoding under the perspt-prompt-v1 domain tag. Serde output is never treated as canonical. Identical inputs — dialect id and version, ordered resolved sections with ids, versions, and hashes, inclusion outcomes, canonical variable values (already baked into rendered bytes), token budget — yield identical rendered bytes, an identical dropped-section set, and identical digests.

Structs§

CompiledPromptInvocation
The two programs of one model call, hashed together in order.
CompiledPromptMessage
One transport-facing message compiled from sections.
CompiledPromptProgram
One compiled program: the platform envelope or the domain stage.

Functions§

tool_surface_hash
The content hash of the exact tool surface offered on one model call: name, description, and schema of every spec, in offered order. Enters the compiled program digest, so a discovery-activated tool visibly changes the program identity.