Member Junction
    Preparing search index...

    Function accumulateAllowedAgents

    • UNION-accumulates realtime.allowedAgents across cascade layers (base first) plus optional dynamic additions. Deduped by agentId (case/whitespace-insensitive); later sources win per field (a later layer that only sets disclosure keeps an earlier layer's label).

      This is the deliberate exception to the array-replace merge rule — the lead co-agent should accumulate colleagues as layers add them, not have the top layer clobber the set.

      Parameters

      • layers: JSONObjectLike[]

        Parsed config layers (each a {realtime:{allowedAgents:[…]}} blob or null), base first.

      • Optionaldynamic: RealtimeAllowedAgent[]

        Optional runtime/channel-registered targets, accumulated last (highest precedence).

      Returns RealtimeAllowedAgent[]

      The deduped, accumulated allowed-agent list (empty when none configured).