The exact bytes a request/tools row stores for a tool list.
Canonical JSON — keys sorted at every depth, array order preserved. Sorting
kills a whole class of reconstruction failure: the schema comes back from the
log through JSON.parse, and a plain re-stringify would then depend on
object key order, which is a property of how the value was built rather than
of what it means. Array order is NOT sorted because tool order is visible to
the model and is therefore part of the request.
Idempotent: canonicalToolSchemaBytes of a parsed canonical encoding is the
same encoding, which is what lets derivation verify the stored bytes are
canonical instead of assuming it.
The exact bytes a
request/toolsrow stores for a tool list.Canonical JSON — keys sorted at every depth, array order preserved. Sorting kills a whole class of reconstruction failure: the schema comes back from the log through
JSON.parse, and a plain re-stringifywould then depend on object key order, which is a property of how the value was built rather than of what it means. Array order is NOT sorted because tool order is visible to the model and is therefore part of the request.Idempotent:
canonicalToolSchemaBytesof a parsed canonical encoding is the same encoding, which is what lets derivation verify the stored bytes are canonical instead of assuming it.