#[non_exhaustive]pub struct CallOrigin {
pub carrier: Principal,
pub call_key: String,
}Expand description
Who really asked for a call that another module relays.
When a module forwards a tool call on behalf of a different caller, the
provider sees the forwarding module as the route’s principal and the
forwarder’s own call_key. This records the caller behind it, so the
provider can attribute the call in its logs and ledgers.
It is a claim made by the forwarding module, not something the daemon checks: a provider may record it but must never grant or refuse anything because of it. Authority stays with the route’s own principal.
#[non_exhaustive] so a later member is an additive change; build it with
CallOrigin::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.carrier: PrincipalThe original caller, in the same form the daemon stamps on a route.
call_key: StringThe original caller’s key for the call, with the same bounds as
ToolCallRequest::call_key; check it with validate_call_origin.