OutboundAddress
public record OutboundAddress(String channelId, String accountId, String to, String threadId)
io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79承载出站 Address数据的记录类型。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 channelId、accountId、to、threadId、direct、withAccount。
Delivery target for outbound (proactive) messages. Constructed by ChannelRouter during
inbound routing and stored by the gateway as the session's "last route" so that proactive replies
(e.g. subagent completion announces) can be delivered back to the correct channel and peer.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
channelId | String | 执行渠道标识相关操作。 the channel adapter to deliver through (e.g. `"chatui"`, `"slack"`) |
accountId | String | 执行 `accountId` 方法。 optional multi-account identifier (nullable for single-account channels) |
to | String | 执行到相关操作。 delivery address in `"channelId:peerKind:peerId"` format (e.g. `"dingtalk:GROUP:cidXXX"`) |
threadId | String | 执行会话线程标识相关操作。 optional thread context for threaded replies (nullable) |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OutboundAddress(String channelId, String accountId, String to, String threadId) | 初始化 `OutboundAddress` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static OutboundAddress direct(String channelId, String to)static | 执行 `direct` 方法。 Creates an address for a direct (non-threaded) message. |
public static OutboundAddress withAccount(String channelId, String accountId, String to)static | 执行 `withAccount` 方法。 Creates an address with account context. |
public Map<String, Object> toMap() | 返回到映射。 Serializes this address to a flat map for `BaseStore` persistence. |
public static OutboundAddress fromMap(Map<String, Object> m)static | 设置来自映射。 Reconstructs an address from a persisted map, tolerating missing optional fields. |
记录组件详情Record Component Detail
channelId
String channelId执行渠道标识相关操作。
the channel adapter to deliver through (e.g. "chatui", "slack")
io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79accountId
String accountId执行 accountId 方法。
optional multi-account identifier (nullable for single-account channels)
io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79to
String to执行到相关操作。
delivery address in "channelId:peerKind:peerId" format (e.g. "dingtalk:GROUP:cidXXX")
io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79threadId
String threadId执行会话线程标识相关操作。
optional thread context for threaded replies (nullable)
io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79构造器详情Constructor Detail
OutboundAddress
public OutboundAddress(String channelId, String accountId, String to, String threadId)
初始化 OutboundAddress 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
accountId | String | account 标识(类型 `String`)。The account id. |
to | String | 到(类型 `String`)。The to. |
threadId | String | 会话线程标识(类型 `String`)。The thread id. |
io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:34–37方法详情Method Detail
direct
public static OutboundAddress direct(String channelId, String to)
执行 direct 方法。
Creates an address for a direct (non-threaded) message.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
to | String | 到(类型 `String`)。The to. |
OutboundAddressio/agentscope/harness/agent/gateway/channel/OutboundAddress.java:40–42withAccount
public static OutboundAddress withAccount(String channelId, String accountId, String to)
执行 withAccount 方法。
Creates an address with account context.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
accountId | String | account 标识(类型 `String`)。The account id. |
to | String | 到(类型 `String`)。The to. |
OutboundAddressio/agentscope/harness/agent/gateway/channel/OutboundAddress.java:45–47toMap
public Map<String, Object> toMap()
返回到映射。
Serializes this address to a flat map for BaseStore persistence.
Map<String, Object>io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:50–61fromMap
public static OutboundAddress fromMap(Map<String, Object> m)
设置来自映射。
Reconstructs an address from a persisted map, tolerating missing optional fields.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
m | Map<String, Object> | m(类型 `Map`)。The m. |
OutboundAddressio/agentscope/harness/agent/gateway/channel/OutboundAddress.java:64–78