Interface IToolClaimsSource

Assembly: redb.Route.Llm.Abstractions.dll

Resolves the claims held by the principal of an agent run. The engine consults it before
dispatching a tool whose is not empty.

Returning null means "this run has no verifiable principal"; returning an empty set means
"a principal exists and holds nothing". Both deny a claimed tool — the distinction is diagnostic
only. AddRedbRouteLlm() registers the default implementation,
ExchangePrincipalClaimsSource, which reads the caller from the exchange; a host with its
own vocabulary registers its own source instead (it wins). Removing the default leaves
claim-declaring tools unbuildable: that is the fail-closed default, not an oversight.


Claim names are scope-like strings, matching the vocabulary the ecosystem already issues for
authorization scopes: redb.Identity hands out values such as identity:scopes:read /
identity:scopes:write (IdentityScopes) and puts them in the token's scope
claim. Which source feeds this interface — and therefore which exact names a tool may require —
is a deployment decision, not something this contract fixes; the engine only compares strings.

public interface IToolClaimsSource

Methods

GetClaims(IExchange)

Returns the claims held by the principal owning exchange, or null

IReadOnlyCollection<string>? GetClaims(IExchange exchange)