pub struct NhiClaims {
pub sub: String,
pub iss: String,
pub aud: Audience,
pub iat: u64,
pub nbf: Option<u64>,
pub exp: u64,
pub jti: String,
pub instance_uid: String,
pub charter: String,
pub version: String,
pub scopes: Vec<String>,
pub parent_token: Option<String>,
}Expand description
Claims carried by an AgentVisor AI NHI token.
Standard claims (sub, iss, aud, iat, nbf, exp, jti) plus the
agent identity block and scopes. parent_token embeds the parent’s full
JWT for delegation-chain verification.
Fields§
§sub: StringSubject: the agent principal (e.g. agent:billing-support).
iss: StringIssuer (corporate IdP or the harness’s own token service).
aud: AudienceAudience (the harness deployment id). RFC 7519 §4.1.3 allows either a single string or an array of strings; both are accepted here so mainstream IdPs (Okta, Auth0, Azure AD, Cognito) that emit multi-audience tokens are compatible.
iat: u64Issued-at, epoch seconds.
nbf: Option<u64>Not-before, epoch seconds.
exp: u64Expiry, epoch seconds. exp - iat must be ≤ MAX_TTL_SECS.
jti: StringUnique token id (revocation hook).
instance_uid: StringAgent instance uid bound into every emitted event.
charter: StringAgent charter.
version: StringAgent version.
scopes: Vec<String>Granted scopes, e.g. tool:db_write, payout.
parent_token: Option<String>Parent agent’s full JWT (delegation). None for root tokens.