Member Junction
    Preparing search index...

    Runtime multi-tenant context that flows through every provider so a single SearchScope definition can serve many tenants without per-tenant scope clones.

    Fields are injected into each scope's Nunjucks-rendered values as:

    • {{ context.PrimaryScopeRecordID }}
    • {{ context.SecondaryScopes.<dimensionName> }}

    Type-aligned with the agent memory system's SecondaryScopeConfig / SecondaryScopeValue in @memberjunction/ai-core-plus — the same ExecuteAgentParams.primaryScopeRecordId + secondaryScopes flow through notes, pre-execution RAG, and scoped search without any translation.

    interface SearchContext {
        PrimaryScopeEntityID?: string;
        PrimaryScopeRecordID?: string;
        SecondaryScopes?: Record<string, SecondaryScopeValue>;
    }
    Index

    Properties

    PrimaryScopeEntityID?: string

    Entity type that represents the tenant (e.g., Organization, Company). Optional — descriptive only.

    PrimaryScopeRecordID?: string

    Specific tenant record ID. NULL = no tenant filtering.

    SecondaryScopes?: Record<string, SecondaryScopeValue>

    Additional dimensional scoping (e.g., { DepartmentID: 'support', ContactID: '...' }).