CollaborationClient
public final class CollaborationClient
io/agentscope/extensions/aistio/transport/CollaborationClient.java:34–546Collaboration 客户端,封装与远端服务的连接和调用。位于 io.agentscope.extensions.aistio.transport 包。核心成员包括 issue、comments、addComment、team、requestApproval、awaitRuntimeToolApproval。
Issue/Comment/AgentTask client shared by Java external-agent runtimes.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
RuntimeApprovalDecision | 记录record | 承载运行时 Approval 决策数据的记录类型。 A record in io.agentscope.extensions.aistio.transport that carries data used when components deploys, schedules and serves agents. |
CollaborationHttpException | 类class | Collaboration HTTP 异常,表示执行过程中的错误。 Non-2xx response from the collaboration API. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public CollaborationClient(ControlPlaneHttpClient http) | 初始化 `CollaborationClient` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
CollaborationClient
public CollaborationClient(ControlPlaneHttpClient http)
初始化 CollaborationClient 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
http | ControlPlaneHttpClient | HTTP(类型 `ControlPlaneHttpClient`)。The http. |
io/agentscope/extensions/aistio/transport/CollaborationClient.java:39–41方法详情Method Detail
issue
public JsonNode issue(String issueId, String token)
执行 issue 方法。
Performs the issue operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
issueId | String | issue 标识(类型 `String`)。The issue id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:43–50comments
public JsonNode comments(String issueId, String token)
执行 comments 方法。
Performs the comments operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
issueId | String | issue 标识(类型 `String`)。The issue id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:52–59addComment
public JsonNode addComment(String issueId, String token, String content, List<Map<String, String>> mentions, String parentId)
添加 addComment。
Adds the comment.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
issueId | String | issue 标识(类型 `String`)。The issue id. |
token | String | 令牌(类型 `String`)。The token. |
content | String | 内容(类型 `String`)。The content. |
mentions | List<Map<String, String>> | mentions(类型 `List >`)。The mentions. |
parentId | String | 父级标识(类型 `String`)。The parent id. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:61–76team
public JsonNode team(String teamId, String token)
执行团队相关操作。
Performs the team operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
teamId | String | 团队标识(类型 `String`)。The team id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:78–85requestApproval
public JsonNode requestApproval(String token, Object request)
执行 requestApproval 方法。
Performs the request approval operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
token | String | 令牌(类型 `String`)。The token. |
request | Object | 请求(类型 `Object`)。The request. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:87–94awaitRuntimeToolApproval
public RuntimeApprovalDecision awaitRuntimeToolApproval(String taskId, String token, String toolUseId, String toolName, Object inputPreview)
执行 awaitRuntimeToolApproval 方法。
Requests a fenced runtime tool decision and blocks without holding control-plane threads.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
toolUseId | String | 工具使用标识(类型 `String`)。The tool use id. |
toolName | String | 工具名称(类型 `String`)。The tool name. |
inputPreview | Object | 输入预览(类型 `Object`)。The input preview. |
RuntimeApprovalDecisionio/agentscope/extensions/aistio/transport/CollaborationClient.java:97–147workspaceApplied
public JsonNode workspaceApplied(String taskId, String token, String digest)
执行 workspaceApplied 方法。
Performs the workspace applied operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
digest | String | digest(类型 `String`)。The digest. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:152–160taskContext
public JsonNode taskContext(String taskId, String token)
执行任务上下文相关操作。
Performs the task context operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:162–164tools
public JsonNode tools(String taskId, String token)
执行工具相关操作。
Returns the canonical task-scoped collaboration tools advertised by the control plane.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:167–169callTool
public JsonNode callTool(String taskId, String token, String toolName, Map<String, Object> arguments)
调用工具。
Invokes one canonical task-scoped collaboration tool through the control-plane MCP.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
toolName | String | 工具名称(类型 `String`)。The tool name. |
arguments | Map<String, Object> | 参数(类型 `Map`)。The arguments. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:172–175callTool
public JsonNode callTool(String taskId, String token, String toolName, Map<String, Object> arguments, String toolCallId)
调用工具。
Invokes a tool while preserving the framework call identity for diagnostics.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
toolName | String | 工具名称(类型 `String`)。The tool name. |
arguments | Map<String, Object> | 参数(类型 `Map`)。The arguments. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:178–191createChild
public JsonNode createChild(String taskId, String token, Object request)
创建子级。
Creates the child.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
request | Object | 请求(类型 `Object`)。The request. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:193–195acknowledge
public JsonNode acknowledge(String taskId, String token, List<String> inputIds)
执行 acknowledge 方法。
Performs the acknowledge operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
inputIds | List<String> | 输入 Ids(类型 `List`)。The input ids. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:197–199start
public JsonNode start(String taskId, String token, long expectedVersion)
执行启动相关操作。
Performs the start operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
expectedVersion | long | expected 版本(类型 `long`)。The expected version. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:201–209progress
public JsonNode progress(String taskId, String token, String content)
执行 progress 方法。
Performs the progress operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
content | String | 内容(类型 `String`)。The content. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:211–214respond
public JsonNode respond(String taskId, String token, String content)
执行 respond 方法。
Performs the respond operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
content | String | 内容(类型 `String`)。The content. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:216–224complete
public JsonNode complete(String taskId, String token, long expectedVersion, String summary, Object result, List<String> processedInputIds, List<String> deferredInputIds)
执行 complete 方法。
Performs the complete operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
expectedVersion | long | expected 版本(类型 `long`)。The expected version. |
summary | String | 摘要(类型 `String`)。The summary. |
result | Object | 结果(类型 `Object`)。The result. |
processedInputIds | List<String> | processed 输入 Ids(类型 `List`)。The processed input ids. |
deferredInputIds | List<String> | deferred 输入 Ids(类型 `List`)。The deferred input ids. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:226–248finish
public JsonNode finish(String taskId, String token, long expectedVersion, String outcome, String reason, Object result, List<String> processedInputIds, List<String> deferredInputIds)
执行 finish 方法。
Submit an explicit business outcome; the server preserves partial results on failure.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
expectedVersion | long | expected 版本(类型 `long`)。The expected version. |
outcome | String | outcome(类型 `String`)。The outcome. |
reason | String | 原因(类型 `String`)。The reason. |
result | Object | 结果(类型 `Object`)。The result. |
processedInputIds | List<String> | processed 输入 Ids(类型 `List`)。The processed input ids. |
deferredInputIds | List<String> | deferred 输入 Ids(类型 `List`)。The deferred input ids. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:251–279fail
public JsonNode fail(String taskId, String token, long expectedVersion, String code, String message)
执行 fail 方法。
Performs the fail operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
expectedVersion | long | expected 版本(类型 `long`)。The expected version. |
code | String | code(类型 `String`)。The code. |
message | String | 消息(类型 `String`)。The message. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:281–293run
public JsonNode run(String taskId, String token)
执行运行相关操作。
Performs the run operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:295–297runGraph
public JsonNode runGraph(String taskId, String token)
运行图。
Runs the graph.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:299–301completeRunNode
public JsonNode completeRunNode(String taskId, String token, Object output)
执行 completeRunNode 方法。
Performs the complete run node operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
output | Object | 输出(类型 `Object`)。The output. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:303–311failRunNode
public JsonNode failRunNode(String taskId, String token, String code, String message)
执行 failRunNode 方法。
Performs the fail run node operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
code | String | code(类型 `String`)。The code. |
message | String | 消息(类型 `String`)。The message. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:313–321replanRun
public JsonNode replanRun(String taskId, String token, Object node)
执行 replanRun 方法。
Performs the replan run operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
node | Object | 节点(类型 `Object`)。The node. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:323–325signalRun
public JsonNode signalRun(String taskId, String token, String name, String idempotencyKey, Object payload)
执行 signalRun 方法。
Performs the signal run operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
name | String | 名称(类型 `String`)。The name. |
idempotencyKey | String | idempotency 键(类型 `String`)。The idempotency key. |
payload | Object | 负载(类型 `Object`)。The payload. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:327–340runArtifacts
public JsonNode runArtifacts(String taskId, String token)
运行 runArtifacts。
Runs the artifacts.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:342–344uploadArtifact
public JsonNode uploadArtifact(String taskId, String token, String filename, String contentType, byte[] content, String targetType, String targetRef)
执行 uploadArtifact 方法。
Uploads shared bytes; local runtime paths never cross the collaboration boundary.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
filename | String | filename(类型 `String`)。The filename. |
contentType | String | 内容类型(类型 `String`)。The content type. |
content | byte[] | 内容(类型 `byte[]`)。The content. |
targetType | String | 目标类型(类型 `String`)。The target type. |
targetRef | String | 目标引用(类型 `String`)。The target ref. |
JsonNodeio/agentscope/extensions/aistio/transport/CollaborationClient.java:347–395downloadArtifact
public byte[] downloadArtifact(String artifactId, String taskId, String token)
执行 downloadArtifact 方法。
Performs the download artifact operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
artifactId | String | artifact 标识(类型 `String`)。The artifact id. |
taskId | String | 任务标识(类型 `String`)。The task id. |
token | String | 令牌(类型 `String`)。The token. |
byte[]io/agentscope/extensions/aistio/transport/CollaborationClient.java:397–422嵌套类详情Nested Class Detail
RuntimeApprovalDecision
public record RuntimeApprovalDecision( String approvalId, long decisionVersion, boolean allow, String denyMessage)承载运行时 Approval 决策数据的记录类型。位于 io.agentscope.extensions.aistio.transport 包。核心成员包括 approvalId、decisionVersion、allow、denyMessage。
A record in io.agentscope.extensions.aistio.transport that carries data used when components deploys, schedules and serves agents. Declared in io.agentscope.extensions.aistio.transport.
CollaborationHttpException
public static final class CollaborationHttpException extends RuntimeExceptionCollaboration HTTP 异常,表示执行过程中的错误。位于 io.agentscope.extensions.aistio.transport 包,继承自 RuntimeException。核心成员包括 status、responseBody、CollaborationHttpException。
Non-2xx response from the collaboration API.