'none' (the default) ignores stored scopes entirely; 'enforced' intersects them per caller.
OptionalscopeThe backend function that resolves a caller into the access scopes they hold, as
'ServiceName:functionName'. It runs once per search, receives a ResolveKbScopesContext and
returns the scopes as an array of strings. Required under 'enforced'.
An 'enforced' knowledge base whose function is not deployed fails every search rather than
falling back to an unfiltered one.
Restricts what a search returns to the content its caller is entitled to.
Under
'enforced', every chunk carries the access scopes of the context it came from, the caller is resolved to the scopes they hold, and the two are intersected inside the vector query — so a caller never retrieves a chunk they hold no scope for. A chunk stamped as public is visible to everyone; a chunk with no scopes at all (ingested before access control was enabled) is visible to no one.Enforcement covers retrieval channels that can apply the scope predicate. The raw-text scan (
grep) and knowledge-graph (queryGraph,searchMode: 'graph') channels read stores that carry no scopes, so an enforced knowledge base refuses them rather than answering unfiltered.Mutable, but enabling it on a populated knowledge base hides everything already ingested until those contexts are re-ingested with scopes.