pub struct PermissionRequest {Show 16 fields
pub request_version: PermissionRequest_RequestVersion,
pub id: String,
pub agent: ActorId,
pub instance: Option<InstanceId>,
pub human: Option<ActorId>,
pub model: Option<String>,
pub tool: Option<String>,
pub action: ActionName,
pub target: Option<String>,
pub risk: Option<RiskClass>,
pub danger_tags: Option<Vec<DangerTag>>,
pub duration_seconds: Option<i64>,
pub reason: String,
pub proof_level_offered: Option<ProofLevel>,
pub requested_at: Timestamp,
pub context: Option<Value>,
}Expand description
An AI agent’s typed request to acquire authority for a specific action, target, and duration. The daemon validates the request, runs the policy engine, optionally collects approvals, and replies with a PermissionGrant or a denial. See TF-0006 “dynamic permission negotiation”.
Fields§
§request_version: PermissionRequest_RequestVersionVersion of the permission-request schema itself.
id: StringStable identifier for this request; copied into the matching PermissionGrant.
agent: ActorIdAgent actor making the request.
instance: Option<InstanceId>Specific running instance of the agent.
human: Option<ActorId>Human principal the agent is acting on behalf of.
model: Option<String>Provider-prefixed model identifier (e.g. anthropic:claude-opus-4-7).
tool: Option<String>Tool the agent intends to invoke once the permission is granted.
action: ActionNameDotted action name being requested.
target: Option<String>Target the action will operate on (file path, record id, URL, …).
risk: Option<RiskClass>Agent’s self-declared risk class for the action.
Danger tags the agent already knows apply.
duration_seconds: Option<i64>Maximum lifetime the agent is asking for; the daemon may cap it.
reason: StringHuman-readable rationale visible to approvers.
proof_level_offered: Option<ProofLevel>Highest proof level the agent can produce if challenged.
requested_at: TimestampWhen the request was created.
context: Option<Value>Free-form context the daemon and approvers can use.
Trait Implementations§
Source§impl Clone for PermissionRequest
impl Clone for PermissionRequest
Source§fn clone(&self) -> PermissionRequest
fn clone(&self) -> PermissionRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PermissionRequest
impl Debug for PermissionRequest
Source§impl<'de> Deserialize<'de> for PermissionRequest
impl<'de> Deserialize<'de> for PermissionRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PermissionRequest
Source§impl PartialEq for PermissionRequest
impl PartialEq for PermissionRequest
Source§fn eq(&self, other: &PermissionRequest) -> bool
fn eq(&self, other: &PermissionRequest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PermissionRequest
impl Serialize for PermissionRequest
impl StructuralPartialEq for PermissionRequest
Auto Trait Implementations§
impl Freeze for PermissionRequest
impl RefUnwindSafe for PermissionRequest
impl Send for PermissionRequest
impl Sync for PermissionRequest
impl Unpin for PermissionRequest
impl UnsafeUnpin for PermissionRequest
impl UnwindSafe for PermissionRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more