Gateway Method Descriptor • AI Agent SDK
GatewayMethodDescriptor: Declarative authorisation descriptor for one gateway method.
GatewayMethodDescriptor
Defined in the protocols module.
AI Agent
Declarative authorisation descriptor for one gateway method.
A descriptor states — once, next to the protocol it guards — what scope a caller must hold to invoke `name. The dispatcher resolves the required scope from the registry instead of scattering _require_scope / _client_has_scope` calls per endpoint, so a newly added method is
closed until explicitly classified rather than reachable by omission.
Attributes: name: The method / route / message-type identifier (e.g. `"agent.message", "channels.control"). required_scope: The baseline scope required to invoke the method. owner: Who declared the method ("core", a plugin name, ...). Purely informational; helps auditing a growing control surface. since: Optional version/date the method was classified. escalate_fields: Optional per-payload-field escalation. Maps a param field name to the stricter scope demanded when that field is present. Fields not listed here are treated as unknown/structural and escalate to :attr:escalate_unknown_scope (fail closed) when :attr:strict_fields is True. strict_fields: When True, any payload field not in escalate_fields (and not in safe_fields) escalates to :attr:escalate_unknown_scope. Defaults to False so today's behaviour (no field-level derivation) is preserved unless opted in. safe_fields: Field names that never escalate — read-only / benign params. Only consulted when strict_fields is True. escalate_unknown_scope: Scope demanded for unknown structural fields under strict_fields. Defaults to ADMIN` (fail closed).
Properties
strNo description available.
OperatorScopeNo description available.
strNo description available.
Optional[str]No description available.
Dict[str, OperatorScope]No description available.
boolNo description available.
Set[str]No description available.
OperatorScopeNo description available.
Methods
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 7667