Member Junction
    Preparing search index...

    Central service for retrieving and formatting notes/examples for injection into agent context. Implements multi-dimensional scoping (Agent, User, Company) with 8 priority levels.

    Index

    Constructors

    Methods

    • Format notes for injection into agent prompt. Includes memory policy explaining scope precedence for conflict resolution.

      Provisional notes (written in-flight by an agent, awaiting Memory Manager hardening) render in their own block FIRST and carry higher precedence under recency-wins semantics: a freshly stated preference must beat a months-old vetted one. The trust tradeoff is deliberate (PR #2761) and contained upstream by the write-path guards (descriptive types only, scope clamp, per-run cap, TTL).

      The notes come from the AI engine's cache, which holds every field whoever the run is for. Pass the run's user as contextUser and the text carries only the fields that user may read: a note whose body they may not read is left out, and an unreadable scope field reads as unset. Without a user the notes render in full, which is right only for server-internal callers.

      Parameters

      • notes: MJAIAgentNoteEntity[]

        Array of notes to format

      • includeMemoryPolicy: boolean = true

        Whether to include the memory policy preamble (default: true)

      • OptionalcontextUser: UserInfo

        The user the run is for; the text is limited to the fields they may read

      Returns string