pub struct CursorPayload {
pub tool_id: String,
pub caller_id: Option<String>,
pub args_fingerprint: [u8; 32],
pub page_index: u32,
pub issued_at_unix: u64,
pub server_session: [u8; 8],
pub opaque_state: Vec<u8>,
}Expand description
Decoded cursor payload. Server-internal; clients never see the individual fields, only the base64url-encoded signed blob.
Fields§
§tool_id: StringCanonical tool id the cursor is bound to. Mismatching tool_id on
RunToolContinue returns ERR_CURSOR_INVALID.
caller_id: Option<String>Connection caller identity at issuance time. None for anonymous
pre-Hello connections.
args_fingerprint: [u8; 32]SHA-256 of the canonical-JSON-serialized original RunTool.args.
Integrity check, not storage: tools that need to replay args put
a copy inside opaque_state (within the 256-byte budget).
page_index: u321-based page index. Useful for audit-trail correlation and abuse detection (a client requesting page=10000 is sus).
issued_at_unix: u64UNIX timestamp (seconds) at issuance. Server checks now - issued_at <= ttl_seconds.
server_session: [u8; 8]Per-process random nonce from CursorIssuer::session_nonce. Server
restart → new nonce → old cursors expire.
opaque_state: Vec<u8>Tool-defined per-cursor state. Capped at MAX_OPAQUE_STATE_BYTES.
Typical use: a database keyset cursor, an offset/limit pair, or
an encrypted continuation token from an upstream API.
Trait Implementations§
Source§impl Clone for CursorPayload
impl Clone for CursorPayload
Source§fn clone(&self) -> CursorPayload
fn clone(&self) -> CursorPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more