pub struct VerifiedResponse {Show 14 fields
pub request_id: String,
pub tool_name: String,
pub args_json: String,
pub modified_args_json: String,
pub approved: bool,
pub approved_for_session: bool,
pub covered_capabilities: Vec<String>,
pub caller: String,
pub sandbox_mode: String,
pub reason: String,
pub injected_context: String,
pub conversation_id: String,
pub nonce: String,
pub signer_public_key: Vec<u8>,
}Expand description
A decoded approval_response payload after signature verification.
Fields§
§request_id: StringThe tool-call id this response answers.
tool_name: StringThe bound tool name — the approval applies only to this exact call.
args_json: StringThe bound args_json — the model’s PROPOSED args, the identity the
approval is bound to. Self::authorizes_call matches this byte-for-byte,
so a re-emitted call with different args cannot inherit the approval. This
is the args the approver saw, NOT necessarily the args that execute.
modified_args_json: StringThe approver’s EDIT to the proposed args — the args to actually execute,
or empty when the approver did not edit (execute args_json unchanged).
Signed, so the edit is unforgeable and auditable; the delta from
args_json is the recorded mutation. Resolve the effective execution args
with the pure polyc_agent::resolve_approved_call.
approved: boolWhether the request was approved.
approved_for_session: boolWhether the approval is remembered for the rest of the session (“don’t
ask again”); false for a one-shot approval.
covered_capabilities: Vec<String>The capability shortfall this approval covered (#595): the stable
kebab-case capability names the gate reported missing when it paused
the call. Covered by the signature, so the effective session-grant key
is (caller, tool, covered capabilities) — a grant recorded against one
covered set never satisfies the same tool after its required set grows.
Empty for an approval of an ordinary policy/sandbox gate.
caller: StringThe caller identity the (session) approval is scoped to. Set by the trusted control plane and covered by the signature, so a session grant cannot be re-scoped to a different user.
sandbox_mode: StringThe sandbox/permission mode the paused turn ran under, covered by the signature so a grant cannot be replayed under a different mode.
reason: StringFree-form human-supplied reason.
injected_context: StringContext the approver attached to inject before the tool runs — prepended
as an internal_only message ahead of execution, or empty when none.
Signed, so an injected instruction is unforgeable and recorded.
conversation_id: StringThe conversation the approval was granted in, covered by the signature so
a token signed for one conversation cannot be replayed into another
(#370, closes #77 bug 3B).
nonce: StringPer-approval unique value, covered by the signature. A consumer records it
on use so the token cannot be re-presented once spent (single-use, #370).
signer_public_key: Vec<u8>The verified signer’s public key (encoded).
Implementations§
Source§impl VerifiedResponse
impl VerifiedResponse
Whether this verified, approved token authorizes the EXACT call
(request_id, tool_name, args_json) — the args-binding (#370 item 3).
The signed args_json is matched byte-for-byte, so a re-emitted same-id
call with different arguments (or a different tool) is NOT authorized: a
captured approval can never be reused to run a different action. A denial
(approved == false) authorizes nothing.
Trait Implementations§
Source§impl Clone for VerifiedResponse
impl Clone for VerifiedResponse
Source§fn clone(&self) -> VerifiedResponse
fn clone(&self) -> VerifiedResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VerifiedResponse
impl RefUnwindSafe for VerifiedResponse
impl Send for VerifiedResponse
impl Sync for VerifiedResponse
impl Unpin for VerifiedResponse
impl UnsafeUnpin for VerifiedResponse
impl UnwindSafe for VerifiedResponse
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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