pub fn resolve_scope(
user_ctx: &UserContext,
explicit_scope: Option<MemoryScope>,
) -> MemoryScopeExpand description
Resolve the effective scope for a new memory given the caller’s identity and an optional explicit scope hint.
Rules:
- Anonymous callers may only write
GlobalorAgentscoped memories. - Authenticated callers may write any scope.
- If no explicit scope is provided, authenticated callers default to
User, anonymous callers default toGlobal.