Builder
public static final class Builder
io/agentscope/harness/coding/CodingBootstrap.java:352–780构建器,用于构建并配置目标实例。位于 io.agentscope.harness.coding 包。核心成员包括 cwd、configPath、skipConfigFile、model、abstractFilesystem、mainAgent。
A class in io.agentscope.harness.coding that deploys, schedules and serves agents. Declared in io.agentscope.harness.coding.
方法摘要Method Summary
方法详情Method Detail
cwd
public Builder cwd(Path cwd)
设置该配置项。
Performs the cwd operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
cwd | Path | cwd(类型 `Path`)。The cwd. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:367–370configPath
public Builder configPath(Path configPath)
设置配置路径。
Performs the config path operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
configPath | Path | 配置路径(类型 `Path`)。The config path. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:372–375skipConfigFile
public Builder skipConfigFile(boolean skip)
设置该配置项。
Performs the skip config file operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skip | boolean | skip(类型 `boolean`)。The skip. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:377–380model
public Builder model(Model model)
设置模型。
Performs the model operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | Model | 模型实例(类型 `Model`)。The model. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:382–385abstractFilesystem
public Builder abstractFilesystem(AbstractFilesystem filesystem)
设置抽象文件系统。
Performs the abstract filesystem operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
filesystem | AbstractFilesystem | 文件系统(类型 `AbstractFilesystem`)。The filesystem. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:387–390mainAgent
public Builder mainAgent(String agentId)
设置主智能体。
Performs the main agent operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent id. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:392–395agent
public Builder agent(String agentId, HarnessAgent agent)
设置智能体。
Performs the agent operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent id. |
agent | HarnessAgent | 智能体(类型 `HarnessAgent`)。The agent. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:397–402configureAgent
public Builder configureAgent(String agentId, Consumer<HarnessAgent.Builder> customizer)
设置该配置项。
Performs the configure agent operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。The agent id. |
customizer | Consumer<HarnessAgent.Builder> | customizer(类型 `Consumer`)。The customizer. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:404–409channel
public Builder channel(Channel... channels)
设置渠道。
Performs the channel operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channels varargs | Channel... | 渠道(类型 `Channel...`)。The channels. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:411–419withDualCodingAgents
public Builder withDualCodingAgents(io.agentscope.core.tool.Toolkit codingToolkit, io.agentscope.core.tool.Toolkit reviewerToolkit)
设置该配置项。
Convenience method: registers the coding and reviewer agents using their respective factories (CodingAgentFactory / ReviewerAgentFactory).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
codingToolkit | io.agentscope.core.tool.Toolkit | coding 工具包(类型 `io.agentscope.core.tool.Toolkit`)。toolkit for the coding agent (may be null for empty) |
reviewerToolkit | io.agentscope.core.tool.Toolkit | reviewer 工具包(类型 `io.agentscope.core.tool.Toolkit`)。toolkit for the reviewer agent (may be null for empty) |
Builderio/agentscope/harness/coding/CodingBootstrap.java:431–435withDualCodingAgents
public Builder withDualCodingAgents(io.agentscope.core.tool.Toolkit codingToolkit, io.agentscope.core.tool.Toolkit reviewerToolkit, BaseStore store)
设置该配置项。
Same as #withDualCodingAgents(io.agentscope.core.tool.Toolkit, io.agentscope.core.tool.Toolkit) but additionally registers the open-swe-style middleware stack (MessageQueueMiddleware, ThreadBudgetMiddleware, ModelCallLimitMiddleware) on both agents when store is non-nu…
| 名称Name | 类型Type | 说明Description |
|---|---|---|
codingToolkit | io.agentscope.core.tool.Toolkit | coding 工具包(类型 `io.agentscope.core.tool.Toolkit`)。The coding toolkit. |
reviewerToolkit | io.agentscope.core.tool.Toolkit | reviewer 工具包(类型 `io.agentscope.core.tool.Toolkit`)。The reviewer toolkit. |
store | BaseStore | 存储实例(类型 `BaseStore`)。The store. |
Builderio/agentscope/harness/coding/CodingBootstrap.java:445–497build
public CodingBootstrap build() throws IOException
构建并返回最终实例。
Assembles all agents and channels, wires the internal gateway, and returns a fully initialized CodingBootstrap.
CodingBootstrapIOException可能抛出 `IOException`。Thrown when the operation cannot be completed.
io/agentscope/harness/coding/CodingBootstrap.java:575–722