Internal command code: the managed backend announces its served capabilities
(an OpVersions) to the streaming server over their private socket on connect. The
streaming server caches it and answers the client AGDX_HELLO with it, so the binary
feature bits and the HTTP capability flags cannot drift from what the backend
actually serves (the backend is the single source of its own truth). Not a
client-facing code, a client never sends it.
Managed command code: the mixed-operation batch. The request body is a CBOR
BatchRequest carrying up to
MAX_BATCH_OPS managed requests, each with
its own code and payload. The reply a BatchReply
with each op’s own reply bytes in order. One round trip amortized over
several ops, per-op results, explicitly NOT atomic. A nested batch is
rejected. An old backend answers the unknown code with CommandError,
decoded client-side as the typed unsupported, so no capability bit is
needed.
Fork-native command code: list every connection with its advertised metadata.
The discovery read, answered by the streaming server from its connection table.
A LaserData-owned reply (crate::clients::ClientMetadataList), never the
upstream Apache Iggy get_clients shape, so an Apache Iggy SDK against LaserData
Cloud and the metadata read stay byte-independent.
Managed command code: compare-and-swap a key (optimistic concurrency).
Additive over KV_OP_VERSION 1: a backend or server that does not serve it
rejects the code, which the client surfaces as an unsupported error. Whether
it is served is advertised by the kv_cas capability flag.
Managed command code: fenced compare-and-swap. Applies the CAS in one
backend transaction that also requires a live lease at the request’s
coordination namespace and key plus a fence sequence equal to the presented
token (the at-most-one effective-writer gate). Rides
KV_LEASE_OP_VERSION; served only under the KV_FENCED_LEASES feature
bit, which subsumes the older fence-only kv_cas_fenced flag.
Managed command code: copy the value at one key to another key (possibly in
another namespace) in a single backend transaction. Reuses the kv outcomes:
Committed on success, NotFound when the source is absent.
Managed command code: acquire a revocable lease on a key (the formal LEASE
primitive). Carries the stable holder identity and an optional delegated
subject at KV_LEASE_OP_VERSION. Served only by a deployment advertising
the KV_FENCED_LEASES feature bit; a backend that cannot serve it returns a
clean unsupported error.
Managed command code: extend a held lease without changing its token (the
formal RENEW primitive). Requires the same holder and subject, a live
lease, and the current fence token; never bumps the fence. Rides
KV_LEASE_OP_VERSION under the KV_FENCED_LEASES feature bit.
Managed command code: release a held lease early (the formal RELEASE
primitive). Requires the same holder and the current fence token, validated
against the fence sequence, never the resetting lease-row version.
Fork-native command code: set this connection’s advertised metadata (the
transport-level discovery primitive). Handled by the streaming server itself,
not forwarded to the plane, because it touches per-connection session state the
plane never sees. Connection-scoped and cleared on disconnect.
Wire version of the agent envelope (the Agent Data Exchange Protocol). Carried
out-of-band as the typed agdx.av header, never inside the body: a durable
log record must select its decoder before any body byte is read.
Wire version of the agent and workflow control-band envelopes. Distinct from
AGENT_OP_VERSION (the on-the-log envelope), this versions the request and
reply types of the control band.
Wire version of the mixed-operation batch request and reply
(crate::batch). The items inside version themselves: each rides its own
op’s request frame with that op’s own v.
Wire version of the fenced-lease op family: KvLease, KvLeaseRenew,
KvRelease, and KvCasFenced. Bumped past KV_OP_VERSION by the
holder-identity reshape so a v1 payload and a v2 payload can never be
mistaken for each other: the reshaped fields are required with no serde
defaults (an old payload fails decode) and crate::validate::Validate
rejects any other v (a typed error, fail-closed). The rest of the KV
surface stays at KV_OP_VERSION.
Wire version of the agent presence body (crate::agent::AgentPresence) an
agent advertises in its connection metadata. Carried in the body’s own v
field, not out-of-band, because presence rides the opaque connection-metadata
bytes with no envelope header to select a decoder.