Expand description
Flow-local, typed identities used by pairwise protocol transforms.
This module deliberately contains no wire types. A converter gives it a source dialect, a role and a logical position, and gets back an immutable target identifier. The same flow can then attach source identifiers that arrive in a later stream event without changing the identifier already emitted to a client.
Structs§
- Call
Result Link - IdNamespace
- A caller-owned 128-bit namespace. Supplying it explicitly makes generated ids deterministic in tests and lets an adapter define invocation scope.
- Identity
Flow - Flow-local identity map. It must be created for each invocation; it does not contain process-global state or random number generation.
- Identity
Handle - An immutable identity allocated within one invocation/stream flow.
- Identity
State Record - The only identity facts allowed to cross a request boundary.
- Identity
State Snapshot - Identity
State Store - Adapter-neutral persistence helper over the protocol’s scoped CAS store.
- Identity
Target - Target semantics are persisted with an identity record. A record from a different model or target dialect cannot be restored into a new flow.
- Late
Identity Facts - Fields that may be learned after the first stream event. Existing values are immutable; a contradictory late fact is rejected.
- Opaque
Signature - A declared opaque signature can be restored only for its original origin, model and field. It is intentionally just a small token, never a wire DTO.
- Source
Identity - A source identity.
logical_indexis mandatory even when an upstream id exists: it makes same-name or missing-id repetitions explicit. - Target
IdPolicy - Target validation used before preserving an upstream id or emitting a generated id. Wire adapters can tighten this for a particular target.
Enums§
- IdSyntax
- A target-specific syntax restriction, used only when supported by the target contract. No vendor-wide character restriction is assumed by default.
- Identity
Error - Errors from flow identity allocation and scoped identity persistence.
- Identity
Role - Identity
Role Name - String form of a role keeps errors independent of future role additions.
- Known
IdPrefix - Prefix conventions used when generating ids, not universal input validators.
Sources: samples/codex/codex-rs/protocol/src/models.rs
id_prefix(); upstream_docs OpenAI Responses examples and Claude tool_use examples. Existing legal ids are not rejected just for lacking these prefixes. Exact prefixes used by known wire ids. Matching is boundary-aware:call_foois recognized whilecallbackis not. - Opaque
Field - The exact declared upstream field that owns an opaque value. A matching origin/model does not permit moving bytes between these fields.
- Output
Item Kind
Type Aliases§
- Dialect
Id - Identity is bound to the protocol’s stable, serializable dialect enum.