AS AgentScopeAPI 手册 / API Reference

OutboundAddress

public record OutboundAddress(String channelId, String accountId, String to, String threadId)
源码Source 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
channelIdString
执行渠道标识相关操作。
the channel adapter to deliver through (e.g. `"chatui"`, `"slack"`)
accountIdString
执行 `accountId` 方法。
optional multi-account identifier (nullable for single-account channels)
toString
执行到相关操作。
delivery address in `"channelId:peerKind:peerId"` format (e.g. `"dingtalk:GROUP:cidXXX"`)
threadIdString
执行会话线程标识相关操作。
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")

源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79

accountId

String accountId

执行 accountId 方法。

optional multi-account identifier (nullable for single-account channels)

源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79

to

String to

执行到相关操作。

delivery address in "channelId:peerKind:peerId" format (e.g. "dingtalk:GROUP:cidXXX")

源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:32–79

threadId

String threadId

执行会话线程标识相关操作。

optional thread context for threaded replies (nullable)

源码Source 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.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
accountIdStringaccount 标识(类型 `String`)。The account id.
toString到(类型 `String`)。The to.
threadIdString会话线程标识(类型 `String`)。The thread id.
源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:34–37

方法详情Method Detail

direct

public static OutboundAddress direct(String channelId, String to)
static

执行 direct 方法。

Creates an address for a direct (non-threaded) message.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
toString到(类型 `String`)。The to.
返回Returns OutboundAddress
返回OutboundAddress。Returns outbound address.
源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:40–42

withAccount

public static OutboundAddress withAccount(String channelId, String accountId, String to)
static

执行 withAccount 方法。

Creates an address with account context.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
accountIdStringaccount 标识(类型 `String`)。The account id.
toString到(类型 `String`)。The to.
返回Returns OutboundAddress
返回OutboundAddress。Returns outbound address.
源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:45–47

toMap

public Map<String, Object> toMap()

返回到映射。

Serializes this address to a flat map for BaseStore persistence.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:50–61

fromMap

public static OutboundAddress fromMap(Map<String, Object> m)
static

设置来自映射。

Reconstructs an address from a persisted map, tolerating missing optional fields.

参数Parameters
名称Name类型Type说明Description
mMap<String, Object>m(类型 `Map`)。The m.
返回Returns OutboundAddress
返回OutboundAddress。Returns outbound address.
源码Source io/agentscope/harness/agent/gateway/channel/OutboundAddress.java:64–78
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.