DmScope
public enum DmScope
io/agentscope/harness/agent/gateway/channel/DmScope.java:31–41定义Dm 范围相关取值的枚举。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 defaultScope、MAIN、PER_PEER、PER_CHANNEL_PEER、PER_ACCOUNT_CHANNEL_PEER。
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— likePER_PEERbut the channel name is included in the key, disambiguating the same peer across channels. -
#PER_ACCOUNT_CHANNEL_PEER— extendsPER_CHANNEL_PEERwith the account id, useful for multi-account (multi-bot) deployments on the same channel platform.
枚举常量摘要Enum Constant Summary
| 常量Constant | 说明Description |
|---|---|
MAIN | 执行主相关操作。 Performs the MAIN operation. |
PER_PEER | 执行每个对端相关操作。 Performs the PER PEER operation. |
PER_CHANNEL_PEER | 执行每个渠道对端相关操作。 Performs the PER CHANNEL PEER operation. |
PER_ACCOUNT_CHANNEL_PEER | 执行每个 ACCOUNT 渠道对端相关操作。 Performs the PER ACCOUNT CHANNEL PEER operation. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static DmScope defaultScope()static | 返回默认范围。 Default scope used when none is configured. |
枚举常量详情Enum Constant Detail
MAIN
MAIN
执行主相关操作。
Performs the MAIN operation.
io/agentscope/harness/agent/gateway/channel/DmScope.java:32PER_PEER
PER_PEER
执行每个对端相关操作。
Performs the PER PEER operation.
io/agentscope/harness/agent/gateway/channel/DmScope.java:33PER_CHANNEL_PEER
PER_CHANNEL_PEER
执行每个渠道对端相关操作。
Performs the PER CHANNEL PEER operation.
io/agentscope/harness/agent/gateway/channel/DmScope.java:34PER_ACCOUNT_CHANNEL_PEER
PER_ACCOUNT_CHANNEL_PEER
执行每个 ACCOUNT 渠道对端相关操作。
Performs the PER ACCOUNT CHANNEL PEER operation.
io/agentscope/harness/agent/gateway/channel/DmScope.java:35方法详情Method Detail
defaultScope
public static DmScope defaultScope()
返回默认范围。
Default scope used when none is configured.
DmScopeio/agentscope/harness/agent/gateway/channel/DmScope.java:38–40