@squidcloud/backend
    Preparing search index...

    Interface ResolveKbScopesContext

    Provides context to a knowledge base's accessControl.scopeResolver function, which turns the caller into the set of access scopes they hold for one knowledge base search.

    The caller is taken from the authenticated request, never from anything the client can shape, so a client cannot ask for another user's scopes. auth is undefined for an unauthenticated caller and for one authenticating with an API key rather than a user token — in both cases the search sees only content stamped public, so returning an empty array is the correct answer for a caller you cannot identify.

    interface ResolveKbScopesContext {
        auth: AuthWithBearer | undefined;
        knowledgeBaseId: string;
    }
    Index
    auth: AuthWithBearer | undefined

    The authenticated caller, carrying their userId and JWT attributes. The same object this.squid.getUserAuth() returns inside the function.

    knowledgeBaseId: string

    The knowledge base being searched.