AS AgentScopeAPI 手册 / API Reference

LocalTeamClient

public final class LocalTeamClient implements TeamClient
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:34–650

本地团队客户端,封装与远端服务的连接和调用。位于 io.agentscope.harness.agent.team 包,实现 TeamClient。核心成员包括 listTasks、createTask、assignTask、claimTask、completeTask、failTask。

TeamClient backed by BaseStore CAS (Claude file-lock equivalent). Mailbox wakeups are delegated to TeamWakeups, which the hosting middleware registers.

构造器摘要Constructor Summary

构造器Constructor说明Description
public LocalTeamClient(BaseStore store)
初始化 `LocalTeamClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<List<TeamTask>> listTasks(String namespace, String teamName)
列出任务。
Lists the tasks.
public Mono<TeamTask> createTask(String namespace, String teamName, String subject, String description, List<String> blockedBy, String owner)
创建任务。
Creates the task.
public Mono<TeamTask> assignTask(String namespace, String teamName, String taskId, String owner, long expectedVersion)
执行 `assignTask` 方法。
Performs the assign task operation.
public Mono<TeamTask> claimTask(String namespace, String teamName, String taskId, String claimedBy, long expectedVersion)
执行 `claimTask` 方法。
Performs the claim task operation.
public Mono<TeamTask> completeTask(String namespace, String teamName, String taskId, String result)
执行 `completeTask` 方法。
Performs the complete task operation.
public Mono<TeamTask> failTask(String namespace, String teamName, String taskId, String reason)
执行 `failTask` 方法。
Performs the fail task operation.
public Mono<TeamTask> unclaimTask(String namespace, String teamName, String taskId, long expectedVersion)
执行 `unclaimTask` 方法。
Performs the unclaim task operation.
public Mono<List<TeamTask>> listClaimableTasks(String namespace, String teamName, String forMember)
列出 `listClaimableTasks`。
Lists the claimable tasks.
public Mono<TeamMessage> sendMessage(String namespace, String teamName, String from, String to, String content)
发送消息。
Sends the message.
public Mono<List<TeamMessage>> broadcastMessage(String namespace, String teamName, String from, String content)
执行 `broadcastMessage` 方法。
Performs the broadcast message operation.
public Mono<Void> spawnMember(String namespace, String teamName, String name, String agentRef, String prompt)
执行 `spawnMember` 方法。
Performs the spawn member operation.
public Mono<Void> shutdownMember(String namespace, String teamName, String memberName)
执行 `shutdownMember` 方法。
Performs the shutdown member operation.
public Mono<Void> submitPlan(String namespace, String teamName, String memberName, String planText)
执行提交计划相关操作。
Performs the submit plan operation.
public Mono<Void> approvePlan(String namespace, String teamName, String memberName)
批准计划。
Performs the approve plan operation.
public Mono<Void> rejectPlan(String namespace, String teamName, String memberName)
拒绝计划。
Performs the reject plan operation.
public Mono<List<TeamMessage>> listMessages(String namespace, String teamName, int limit)
列出消息。
Lists the messages.
public Mono<List<TeamMemberInfo>> listMembers(String namespace, String teamName)
列出成员。
Lists the members.
public Mono<TeamInfo> createTeam(TeamCreateSpec spec)
创建团队。
Creates the team.
public Mono<Void> completeTeam(String namespace, String teamName)
执行 `completeTeam` 方法。
Performs the complete team operation.

构造器详情Constructor Detail

LocalTeamClient

public LocalTeamClient(BaseStore store)

初始化 LocalTeamClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
storeBaseStore存储实例(类型 `BaseStore`)。The store.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:41–43

方法详情Method Detail

listTasks

public Mono<List<TeamTask>> listTasks(String namespace, String teamName)

列出任务。

Lists the tasks.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
返回Returns Mono<List<TeamTask>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:45–49

createTask

public Mono<TeamTask> createTask(String namespace, String teamName, String subject, String description, List<String> blockedBy, String owner)

创建任务。

Creates the task.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
subjectString主题(类型 `String`)。The subject.
descriptionString描述(类型 `String`)。The description.
blockedByList<String>blocked 通过(类型 `List`)。The blocked by.
ownerString所有者(类型 `String`)。The owner.
返回Returns Mono<TeamTask>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:51–90

assignTask

public Mono<TeamTask> assignTask(String namespace, String teamName, String taskId, String owner, long expectedVersion)

执行 assignTask 方法。

Performs the assign task operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
taskIdString任务标识(类型 `String`)。The task id.
ownerString所有者(类型 `String`)。The owner.
expectedVersionlongexpected 版本(类型 `long`)。The expected version.
返回Returns Mono<TeamTask>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:92–124

claimTask

public Mono<TeamTask> claimTask(String namespace, String teamName, String taskId, String claimedBy, long expectedVersion)

执行 claimTask 方法。

Performs the claim task operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
taskIdString任务标识(类型 `String`)。The task id.
claimedByStringclaimed 通过(类型 `String`)。The claimed by.
expectedVersionlongexpected 版本(类型 `long`)。The expected version.
返回Returns Mono<TeamTask>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:126–175

completeTask

public Mono<TeamTask> completeTask(String namespace, String teamName, String taskId, String result)

执行 completeTask 方法。

Performs the complete task operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
taskIdString任务标识(类型 `String`)。The task id.
resultString结果(类型 `String`)。The result.
返回Returns Mono<TeamTask>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:177–207

failTask

public Mono<TeamTask> failTask(String namespace, String teamName, String taskId, String reason)

执行 failTask 方法。

Performs the fail task operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
taskIdString任务标识(类型 `String`)。The task id.
reasonString原因(类型 `String`)。The reason.
返回Returns Mono<TeamTask>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:209–238

unclaimTask

public Mono<TeamTask> unclaimTask(String namespace, String teamName, String taskId, long expectedVersion)

执行 unclaimTask 方法。

Performs the unclaim task operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
taskIdString任务标识(类型 `String`)。The task id.
expectedVersionlongexpected 版本(类型 `long`)。The expected version.
返回Returns Mono<TeamTask>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:307–337

listClaimableTasks

public Mono<List<TeamTask>> listClaimableTasks(String namespace, String teamName, String forMember)

列出 listClaimableTasks。

Lists the claimable tasks.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
forMemberString用于成员(类型 `String`)。The for member.
返回Returns Mono<List<TeamTask>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:339–343

sendMessage

public Mono<TeamMessage> sendMessage(String namespace, String teamName, String from, String to, String content)

发送消息。

Sends the message.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
fromString来自(类型 `String`)。The from.
toString到(类型 `String`)。The to.
contentString内容(类型 `String`)。The content.
返回Returns Mono<TeamMessage>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:345–371

broadcastMessage

public Mono<List<TeamMessage>> broadcastMessage(String namespace, String teamName, String from, String content)

执行 broadcastMessage 方法。

Performs the broadcast message operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
fromString来自(类型 `String`)。The from.
contentString内容(类型 `String`)。The content.
返回Returns Mono<List<TeamMessage>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:373–405

spawnMember

public Mono<Void> spawnMember(String namespace, String teamName, String name, String agentRef, String prompt)

执行 spawnMember 方法。

Performs the spawn member operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
nameString名称(类型 `String`)。The name.
agentRefString智能体引用(类型 `String`)。The agent ref.
promptString提示词(类型 `String`)。The prompt.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:407–412

shutdownMember

public Mono<Void> shutdownMember(String namespace, String teamName, String memberName)

执行 shutdownMember 方法。

Performs the shutdown member operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
memberNameString成员名称(类型 `String`)。The member name.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:414–419

submitPlan

public Mono<Void> submitPlan(String namespace, String teamName, String memberName, String planText)

执行提交计划相关操作。

Performs the submit plan operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
memberNameString成员名称(类型 `String`)。The member name.
planTextString计划文本(类型 `String`)。The plan text.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:421–426

approvePlan

public Mono<Void> approvePlan(String namespace, String teamName, String memberName)

批准计划。

Performs the approve plan operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
memberNameString成员名称(类型 `String`)。The member name.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:428–432

rejectPlan

public Mono<Void> rejectPlan(String namespace, String teamName, String memberName)

拒绝计划。

Performs the reject plan operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
memberNameString成员名称(类型 `String`)。The member name.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:434–438

listMessages

public Mono<List<TeamMessage>> listMessages(String namespace, String teamName, int limit)

列出消息。

Lists the messages.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
limitint数量上限(类型 `int`)。The limit.
返回Returns Mono<List<TeamMessage>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:440–459

listMembers

public Mono<List<TeamMemberInfo>> listMembers(String namespace, String teamName)

列出成员。

Lists the members.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
返回Returns Mono<List<TeamMemberInfo>>
返回Mono>。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:461–476

createTeam

public Mono<TeamInfo> createTeam(TeamCreateSpec spec)

创建团队。

Creates the team.

参数Parameters
名称Name类型Type说明Description
specTeamCreateSpec规格(类型 `TeamCreateSpec`)。The spec.
返回Returns Mono<TeamInfo>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:478–533

completeTeam

public Mono<Void> completeTeam(String namespace, String teamName)

执行 completeTeam 方法。

Performs the complete team operation.

参数Parameters
名称Name类型Type说明Description
namespaceString命名空间(类型 `String`)。The namespace.
teamNameString团队名称(类型 `String`)。The team name.
返回Returns Mono<Void>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/team/LocalTeamClient.java:535–552

继承成员Inherited Members

继承自Methods inherited from TeamClient
基于官方固定版本源码静态生成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.