Decides who may read subagent results and history, through the inspection
methods of Agent and LeadAgent or delegation_history(). Pass it as
delegation_disclosure. authorize is where your application checks
access; redact removes what the requester shouldn't see. By default every
request is denied. Authenticate the requester first: a delegation ID alone
never grants access.
Usage
DelegationDisclosure(
authorize = function(requester, scope) FALSE,
redact = function(view, requester) view,
max_bytes = 16 * 1024^2
)Arguments
A
function(requester, scope). Only an exactTRUEallows access; anything else, including an error, denies it.scopeholds the agent'sdelegation_scope,agent_idandsession_id, or thescopegiven todelegation_history().- redact
A
function(view, requester)that returnsview, as a list, without anything the requester shouldn't see. The default returns it unchanged.- max_bytes
Maximum size, in bytes, of one disclosed result; defaults to 16 MiB. Larger results are an error, so ask for fewer subagents or no transcripts. Separately, data frames in tool results are replaced by a placeholder above an estimated 16 MiB.