Resolve Scopes • AI Agent SDK

resolve_scopes: Resolve the operator scopes granted to “token“.

resolve_scopes

Method

</div>

This is a method of the GatewayConfig class in the config module.

Resolve the operator scopes granted to `token`.

Backward-compatible contract: No scope policy configured -&gt; all scopes (today’s behaviour). Policy configured + token listed -&gt; that token’s scopes. * Policy configured + token absent/None -&gt; no scopes (deny).

Scope names are returned as plain strings so callers in the wrapper can compare against `OperatorScope values without importing them. Unknown scope names (e.g. typos in gateway.yaml`) are dropped and a warning is logged so misconfiguration surfaces early instead of silently denying all access.

Signature

python
def resolve_scopes(token: Optional[str]) -> List[str]

Parameters

ParamField Optional[str]

No description available.

Returns

ResponseField List[str]

The result of the operation.

Uses

  • warning
  • logging.getLogger

Source

View on GitHub

praisonaiagents/gateway/config.py at line 1309