Skip to main content

mint_exec_id

Function mint_exec_id 

Source
pub fn mint_exec_id() -> String
Expand description

A fresh exec id: x- plus 16 hex characters, the Python client’s shape.

Here rather than in each binding, because both bindings carried a byte-identical copy of this function — and the id’s shape is part of the session story (“the exec id is caller-minted”), so the crate that tells that story is the crate that mints.

The id needs to be distinct rather than unguessable — it is an idempotency key, not a credential, and the daemon rejects an unknown one — so the nanosecond clock mixed with a counter is enough. (uuid v7 would also be enough and is on the dependency-sweep list; the shape below is the Python client’s, kept for wire familiarity until that sweep decides.)