Package io.agentscope.harness.agent.gateway.channel
package io.agentscope.harness.agent.gateway.channel
-
ClassDescriptionChannel adapter — ingests inbound messages from one messaging platform (or a programmatic caller), routes them through
ChannelRouterto resolve the target agent and session, and delegates execution toGateway.One routing rule that maps a set of inbound-message conditions to a targetagentId.Per-channel routing configuration: default agent fallback, DM session scope, and ordered binding rules evaluated byChannelRouter.Constructs aChannelinstance from the resolved routing config and provider-specific properties.Resolves the targetagentIdand stableMsgContextfor anInboundMessageby evaluatingChannelBindingrules in deterministic priority order.Inputs available to aChannelRuntimeContextResolverwhen resolving caller context for a Gateway turn.Resolves a caller-providedRuntimeContextfor a Channel / Gateway turn.Controls how DM (PeerKind.DIRECT) session keys are scoped.Normalized inbound message produced by aChanneladapter before routing.Delivery target for outbound (proactive) messages.Identifies the conversation peer: who or what is being messaged (a user DM, a channel, a group, or a thread).Classification of the conversation peer, used for session key construction and DM-scope resolution.Output ofChannelRouter.resolveRoute(io.agentscope.harness.agent.gateway.channel.ChannelConfig, io.agentscope.harness.agent.gateway.channel.InboundMessage): the resolved agent id, theMsgContextto pass toGateway.run(io.agentscope.harness.agent.gateway.MsgContext, java.util.List<io.agentscope.core.message.Msg>), a diagnosticmatchedBylabel indicating which binding tier (or fallback) produced the result, and theOutboundAddressfor delivering replies back to the originating channel/peer.