ChannelConfig
public record ChannelConfig( String channelId, String defaultAgentId, DmScope dmScope, List<ChannelBinding> bindings)
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:38–98承载渠道配置数据的记录类型。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 channelId、defaultAgentId、dmScope、bindings、of、builder。
Per-channel routing configuration: default agent fallback, DM session scope, and ordered binding
rules evaluated by ChannelRouter.
Used by Channel implementations to parameterize routing without hard-coding agent ids
or session shapes in adapter code.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
channelId | String | 执行渠道标识相关操作。 the logical channel identifier this config applies to (must match `Channel#channelId()`) |
defaultAgentId | String | 执行默认智能体标识相关操作。 fallback agent id when no binding matches; if null the global default
agent (registered via `io.agentscope.harness.agent.gateway.Gateway#bindMainAgent`) is
used |
dmScope | DmScope | 执行dm 范围相关操作。 controls how DM (`PeerKind#DIRECT`) sessions are keyed; defaults to `DmScope#MAIN` |
bindings | List<ChannelBinding> | 执行 `bindings` 方法。 ordered list of binding rules; evaluated in list order within each priority tier |
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.harness.agent.gateway.channel that deploys, schedules and serves agents. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public ChannelConfig(String channelId, String defaultAgentId, DmScope dmScope, List<ChannelBinding> bindings) | 初始化 `ChannelConfig` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static ChannelConfig of(String channelId)static | 创建并返回实例。 Minimal config: channel id only, using global agent default and `DmScope#MAIN`. |
public static ChannelConfig of(String channelId, String defaultAgentId)static | 创建并返回实例。 Config with explicit default agent (no binding rules). |
public static Builder builder(String channelId)static | 返回构建器实例。 Returns a builder for constructing channel configs fluently. |
记录组件详情Record Component Detail
channelId
String channelId执行渠道标识相关操作。
the logical channel identifier this config applies to (must match Channel#channelId())
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:38–98defaultAgentId
String defaultAgentId执行默认智能体标识相关操作。
fallback agent id when no binding matches; if null the global default
agent (registered via io.agentscope.harness.agent.gateway.Gateway#bindMainAgent) is
used
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:38–98dmScope
DmScope dmScope执行dm 范围相关操作。
controls how DM (PeerKind#DIRECT) sessions are keyed; defaults to DmScope#MAIN
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:38–98bindings
List<ChannelBinding> bindings执行 bindings 方法。
ordered list of binding rules; evaluated in list order within each priority tier
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:38–98构造器详情Constructor Detail
ChannelConfig
public ChannelConfig(String channelId, String defaultAgentId, DmScope dmScope, List<ChannelBinding> bindings)
初始化 ChannelConfig 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
defaultAgentId | String | 默认智能体标识(类型 `String`)。The default agent id. |
dmScope | DmScope | dm 范围(类型 `DmScope`)。The dm scope. |
bindings | List<ChannelBinding> | bindings(类型 `List`)。The bindings. |
io/agentscope/harness/agent/gateway/channel/ChannelConfig.java:41–45方法详情Method Detail
of
public static ChannelConfig of(String channelId)
创建并返回实例。
Minimal config: channel id only, using global agent default and DmScope#MAIN.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
ChannelConfigio/agentscope/harness/agent/gateway/channel/ChannelConfig.java:48–50of
public static ChannelConfig of(String channelId, String defaultAgentId)
创建并返回实例。
Config with explicit default agent (no binding rules).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
defaultAgentId | String | 默认智能体标识(类型 `String`)。The default agent id. |
ChannelConfigio/agentscope/harness/agent/gateway/channel/ChannelConfig.java:53–55builder
public static Builder builder(String channelId)
返回构建器实例。
Returns a builder for constructing channel configs fluently.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
Builderio/agentscope/harness/agent/gateway/channel/ChannelConfig.java:58–60嵌套类详情Nested Class Detail
Builder
public static final class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 defaultAgentId、dmScope、binding、bindings、build。
A class in io.agentscope.harness.agent.gateway.channel that deploys, schedules and serves agents. Declared in io.agentscope.harness.agent.gateway.channel.