Enum Class DmScope

java.lang.Object
java.lang.Enum<DmScope>
io.agentscope.harness.agent.gateway.channel.DmScope
All Implemented Interfaces:
Serializable, Comparable<DmScope>, Constable

public enum DmScope extends Enum<DmScope>
Controls how DM (PeerKind.DIRECT) session keys are scoped.
  • MAIN — all DMs for a given agent share a single session. Suitable for single-user or shared assistant scenarios.
  • PER_PEER — one session per peer id. Most common for multi-user deployments.
  • PER_CHANNEL_PEER — like PER_PEER but the channel name is included in the key, disambiguating the same peer across channels.
  • PER_ACCOUNT_CHANNEL_PEER — extends PER_CHANNEL_PEER with the account id, useful for multi-account (multi-bot) deployments on the same channel platform.
  • Enum Constant Details

    • MAIN

      public static final DmScope MAIN
    • PER_PEER

      public static final DmScope PER_PEER
    • PER_CHANNEL_PEER

      public static final DmScope PER_CHANNEL_PEER
    • PER_ACCOUNT_CHANNEL_PEER

      public static final DmScope PER_ACCOUNT_CHANNEL_PEER
  • Method Details

    • values

      public static DmScope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DmScope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • defaultScope

      public static DmScope defaultScope()
      Default scope used when none is configured.