BaseShellRunner
public class BaseShellRunner extends BaseSandboxAwareTool<RunShellCommandTool, BaseShellRunner.RunShellCommandToolRequest, BaseShellRunner.RunShellCommandToolResponse>
io/agentscope/runtime/engine/agents/saa/tools/base/BaseShellRunner.java:48–117基类 Shell 运行器,让智能体以受控方式调用外部能力。位于 io.agentscope.runtime.engine.agents.saa.tools.base 包,继承自 BaseSandboxAwareTool<RunShellCommandTool, BaseShellRunner.RunShellCommandToolRequest, BaseShellRunner.RunShellCommandToolResponse>。核心成员包括 apply、buildTool、BaseShellRunner。
A class in io.agentscope.runtime.engine.agents.saa.tools.base that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.base. Extends BaseSandboxAwareTool
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
RunShellCommandToolRequest | 记录record | 承载运行 Shell 命令工具请求数据的记录类型。 A record in io.agentscope.runtime.engine.agents.saa.tools.base that carries data used when components lets agents invoke external capabilities under control. |
RunShellCommandToolResponse | 记录record | 承载运行 Shell 命令工具响应数据的记录类型。 A record in io.agentscope.runtime.engine.agents.saa.tools.base that carries data used when components lets agents invoke external capabilities under control. |
Response | 记录record | 承载响应数据的记录类型。 A record in io.agentscope.runtime.engine.agents.saa.tools.base that carries data used when components lets agents invoke external capabilities under control. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public BaseShellRunner() | 初始化 `BaseShellRunner` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
BaseShellRunner
public BaseShellRunner()
初始化 BaseShellRunner 实例。
Creates a new instance.
io/agentscope/runtime/engine/agents/saa/tools/base/BaseShellRunner.java:51–53方法详情Method Detail
apply
public RunShellCommandToolResponse apply(RunShellCommandToolRequest request, ToolContext toolContext)
执行 apply 方法。
Performs the apply operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
request | RunShellCommandToolRequest | 请求(类型 `RunShellCommandToolRequest`)。The request. |
toolContext | ToolContext | 工具上下文(类型 `ToolContext`)。The tool context. |
RunShellCommandToolResponseio/agentscope/runtime/engine/agents/saa/tools/base/BaseShellRunner.java:55–59buildTool
public RuntimeFunctionToolCallback buildTool()
构建工具。
Builds the tool.
RuntimeFunctionToolCallbackio/agentscope/runtime/engine/agents/saa/tools/base/BaseShellRunner.java:97–116嵌套类详情Nested Class Detail
RunShellCommandToolRequest
public record RunShellCommandToolRequest( @JsonProperty(required = true, value = "command") @JsonPropertyDescription("Shell command to be executed") String command )承载运行 Shell 命令工具请求数据的记录类型。位于 io.agentscope.runtime.engine.agents.saa.tools.base 包。核心成员包括 command、RunShellCommandToolRequest。
A record in io.agentscope.runtime.engine.agents.saa.tools.base that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.base.
RunShellCommandToolResponse
public record RunShellCommandToolResponse(@JsonProperty("Response") Response output)承载运行 Shell 命令工具响应数据的记录类型。位于 io.agentscope.runtime.engine.agents.saa.tools.base 包。核心成员包括 output、RunShellCommandToolResponse。
A record in io.agentscope.runtime.engine.agents.saa.tools.base that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.base.
Response
@JsonClassDescription("The result contains the shell output and the execute result") public record Response(String result, String message)承载响应数据的记录类型。位于 io.agentscope.runtime.engine.agents.saa.tools.base 包。核心成员包括 result、message、Response。
A record in io.agentscope.runtime.engine.agents.saa.tools.base that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.base.