TeamContext
@JsonIgnoreProperties(ignoreUnknown = true) public record TeamContext( String teamName, String namespace, String objective, String myRole, boolean isLead, List<MemberSnapshot> members, List<String> availableActions, RecoveryContext recoveryContext)
io/agentscope/harness/agent/team/TeamContext.java:22–69承载团队上下文数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 teamName、namespace、objective、myRole、isLead、members。
Runtime context injected into a teammate session (mirrors Go TeamContext).
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
teamName | String | 执行团队名称相关操作。 Performs the team name operation. |
namespace | String | 执行命名空间相关操作。 Performs the namespace operation. |
objective | String | 执行 `objective` 方法。 Performs the objective operation. |
myRole | String | 执行my 角色相关操作。 Performs the my role operation. |
isLead | boolean | 判断是否 `isLead`。 Returns whether the lead. |
members | List<MemberSnapshot> | 执行成员相关操作。 Performs the members operation. |
availableActions | List<String> | 执行 `availableActions` 方法。 Performs the available actions operation. |
recoveryContext | RecoveryContext | 执行 `recoveryContext` 方法。 Performs the recovery context operation. |
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
MemberSnapshot | 记录record | 承载成员快照数据的记录类型。 Roster snapshot embedded in TeamContext (not the full store member row). |
RecoveryContext | 记录record | 承载 Recovery 上下文数据的记录类型。 Injected when a member session is recovering after a crash/reschedule. |
CompletedTask | 记录record | 承载已完成任务数据的记录类型。 A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. |
InterruptedTask | 记录record | 承载 Interrupted 任务数据的记录类型。 A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. |
RecentMessage | 记录record | 承载 Recent 消息数据的记录类型。 A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. |
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String resolvedNamespace() | 返回已解析命名空间。 Returns the resolved namespace. |
记录组件详情Record Component Detail
teamName
String teamName执行团队名称相关操作。
Performs the team name operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69namespace
String namespace执行命名空间相关操作。
Performs the namespace operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69objective
String objective执行 objective 方法。
Performs the objective operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69myRole
String myRole执行my 角色相关操作。
Performs the my role operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69isLead
boolean isLead判断是否 isLead。
Returns whether the lead.
io/agentscope/harness/agent/team/TeamContext.java:22–69members
List<MemberSnapshot> members执行成员相关操作。
Performs the members operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69availableActions
List<String> availableActions执行 availableActions 方法。
Performs the available actions operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69recoveryContext
RecoveryContext recoveryContext执行 recoveryContext 方法。
Performs the recovery context operation.
io/agentscope/harness/agent/team/TeamContext.java:22–69构造器详情Constructor Detail
TeamContext
public TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<MemberSnapshot> members, List<String> availableActions)
初始化 TeamContext 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
teamName | String | 团队名称(类型 `String`)。The team name. |
namespace | String | 命名空间(类型 `String`)。The namespace. |
objective | String | objective(类型 `String`)。The objective. |
myRole | String | my 角色(类型 `String`)。The my role. |
isLead | boolean | 是 Lead(类型 `boolean`)。The is lead. |
members | List<MemberSnapshot> | 成员(类型 `List`)。The members. |
availableActions | List<String> | 可用 Actions(类型 `List`)。The available actions. |
io/agentscope/harness/agent/team/TeamContext.java:33–42方法详情Method Detail
resolvedNamespace
public String resolvedNamespace()
返回已解析命名空间。
Returns the resolved namespace.
Stringio/agentscope/harness/agent/team/TeamContext.java:66–68嵌套类详情Nested Class Detail
MemberSnapshot
@JsonIgnoreProperties(ignoreUnknown = true) public record MemberSnapshot(String name, String agentRef, String status)承载成员快照数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 name、agentRef、status。
Roster snapshot embedded in TeamContext (not the full store member row).
RecoveryContext
@JsonIgnoreProperties(ignoreUnknown = true) public record RecoveryContext( String previousSessionId, int restartCount, List<CompletedTask> completedTasks, InterruptedTask interruptedTask, List<RecentMessage> recentMessages)承载 Recovery 上下文数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 previousSessionId、restartCount、completedTasks、interruptedTask、recentMessages。
Injected when a member session is recovering after a crash/reschedule.
CompletedTask
@JsonIgnoreProperties(ignoreUnknown = true) public record CompletedTask(String id, String subject, String result)承载已完成任务数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 id、subject、result。
A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.team.
InterruptedTask
@JsonIgnoreProperties(ignoreUnknown = true) public record InterruptedTask(String id, String subject, String note)承载 Interrupted 任务数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 id、subject、note。
A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.team.
RecentMessage
@JsonIgnoreProperties(ignoreUnknown = true) public record RecentMessage(String from, String content, String timestamp)承载 Recent 消息数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 from、content、timestamp。
A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.team.