Skip to main content

resolve_gates

Function resolve_gates 

Source
pub fn resolve_gates(
    names: &[String],
    defs: &[GateDef],
    registry: &ProviderRegistry,
    auth: &Auth,
) -> Vec<Box<dyn Gate>>
Expand description

Resolve a route’s gate ids into runnable gates. Built-in ids (non-empty, json-valid) map to inline gates; any other id is looked up among the config’s [[gate]] definitions and built as either a SubprocessGate (a cmd gate, SPEC §8.1) or a JudgeGate (a judge gate, §8.3). The judge needs a provider (from registry) and the caller’s credentials (auth, BYOK). An id that is neither built-in nor defined — or a judge whose provider isn’t registered — is skipped with a warning rather than failing the request.