ReviewerAgentFactory
public final class ReviewerAgentFactory
源码Source
io/agentscope/harness/coding/agent/ReviewerAgentFactory.java:35–85Reviewer 智能体工厂,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.agent 包。核心成员包括 create。
Factory for the reviewer agent.
-
Uses the reviewer system prompt with PR context
-
Only receives reviewer-specific tools (add_finding, update_finding, list_findings, publish_review, github_api_request, fetch_url, execute — no write/commit tools)
-
Runs in its own workspace, separate from the coding agent
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit)static | 创建并返回实例。 Builds a reviewer agent for the given workspace with default settings. |
public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit, String repoOwner, String repoName, int prNumber)static | 创建并返回实例。 Builds a reviewer agent with PR context baked into the system prompt. |
方法详情Method Detail
create
public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit)
static
创建并返回实例。
Builds a reviewer agent for the given workspace with default settings.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspace | Path | 工作区(类型 `Path`)。The workspace. |
reviewerToolkit | Toolkit | reviewer 工具包(类型 `Toolkit`)。The reviewer toolkit. |
HarnessAgent返回HarnessAgent。Returns harness agent.
源码Source
io/agentscope/harness/coding/agent/ReviewerAgentFactory.java:40–42create
public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit, String repoOwner, String repoName, int prNumber)
static
创建并返回实例。
Builds a reviewer agent with PR context baked into the system prompt.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspace | Path | 工作区(类型 `Path`)。reviewer agent workspace directory |
reviewerToolkit | Toolkit | reviewer 工具包(类型 `Toolkit`)。reviewer-specific tools only |
repoOwner | String | 仓库所有者(类型 `String`)。GitHub repo owner |
repoName | String | 仓库名称(类型 `String`)。GitHub repo name |
prNumber | int | pr 数量(类型 `int`)。PR number |
HarnessAgent返回HarnessAgent。Returns harness agent.
源码Source
io/agentscope/harness/coding/agent/ReviewerAgentFactory.java:53–72