Skip to main content

OperatorResolver

Trait OperatorResolver 

Source
pub trait OperatorResolver: Send + Sync {
    // Required method
    fn active_operator(&self, realm: &str, identity: &str) -> Option<String>;
}
Expand description

§7.2 / §16 Q1 — PROVISIONAL operator keying seam.

OperatorId keying is an explicitly open question (§16 Q1); the provisional answer is “the console auth principal”, resolved through this trait so the keying decision stays swappable. Deployments activate the scope with agent_memory.operator_scope = "provisional"; without a resolver installed the scope stays inert (composition is unchanged), so activation is always config AND resolver, never config alone. The console-auth-principal implementation is one line of wiring where the console principal is known; this module only defines the seam.

Required Methods§

Source

fn active_operator(&self, realm: &str, identity: &str) -> Option<String>

The active operator for identity’s turns in realm, or None when no operator is resolvable right now. Implementations must key within the given realm only — cross-realm operator profiles are explicitly future work (§7.2).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§