FsFileSearcher
public class FsFileSearcher extends BaseSandboxAwareTool<SearchFilesTool, FsFileSearcher.SearchFilesToolRequest, FsFileSearcher.SearchFilesToolResponse>
io/agentscope/runtime/engine/agents/saa/tools/fs/FsFileSearcher.java:48–125Fs 文件 Searcher,让智能体以受控方式调用外部能力。位于 io.agentscope.runtime.engine.agents.saa.tools.fs 包,继承自 BaseSandboxAwareTool<SearchFilesTool, FsFileSearcher.SearchFilesToolRequest, FsFileSearcher.SearchFilesToolResponse>。核心成员包括 apply、buildTool、FsFileSearcher。
A class in io.agentscope.runtime.engine.agents.saa.tools.fs that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.fs. Extends BaseSandboxAwareTool
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
SearchFilesToolRequest | 记录record | 承载搜索文件工具请求数据的记录类型。 A record in io.agentscope.runtime.engine.agents.saa.tools.fs that carries data used when components lets agents invoke external capabilities under control. |
SearchFilesToolResponse | 记录record | 承载搜索文件工具响应数据的记录类型。 A record in io.agentscope.runtime.engine.agents.saa.tools.fs 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.fs that carries data used when components lets agents invoke external capabilities under control. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public FsFileSearcher() | 初始化 `FsFileSearcher` 实例。 Creates a new instance. |
方法摘要Method Summary
构造器详情Constructor Detail
FsFileSearcher
public FsFileSearcher()
初始化 FsFileSearcher 实例。
Creates a new instance.
io/agentscope/runtime/engine/agents/saa/tools/fs/FsFileSearcher.java:51–53方法详情Method Detail
apply
public SearchFilesToolResponse apply(SearchFilesToolRequest request, ToolContext toolContext)
执行 apply 方法。
Performs the apply operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
request | SearchFilesToolRequest | 请求(类型 `SearchFilesToolRequest`)。The request. |
toolContext | ToolContext | 工具上下文(类型 `ToolContext`)。The tool context. |
SearchFilesToolResponseio/agentscope/runtime/engine/agents/saa/tools/fs/FsFileSearcher.java:55–59buildTool
public RuntimeFunctionToolCallback buildTool()
构建工具。
Builds the tool.
RuntimeFunctionToolCallbackio/agentscope/runtime/engine/agents/saa/tools/fs/FsFileSearcher.java:105–124嵌套类详情Nested Class Detail
SearchFilesToolRequest
public record SearchFilesToolRequest( @JsonProperty(required = true, value = "path") @JsonPropertyDescription("Starting path for the search") String path, @JsonProperty(required = true, value = "pattern") @JsonPropertyDescription("Pattern to match files/directories") String pattern, @JsonProperty(value = "excludePatterns") @JsonPropertyDescription("Patterns to exclude from search") String[] excludePatterns )承载搜索文件工具请求数据的记录类型。位于 io.agentscope.runtime.engine.agents.saa.tools.fs 包。核心成员包括 path、pattern、excludePatterns、SearchFilesToolRequest。
A record in io.agentscope.runtime.engine.agents.saa.tools.fs that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.fs.
SearchFilesToolResponse
public record SearchFilesToolResponse(@JsonProperty("Response") Response output)承载搜索文件工具响应数据的记录类型。位于 io.agentscope.runtime.engine.agents.saa.tools.fs 包。核心成员包括 output、SearchFilesToolResponse。
A record in io.agentscope.runtime.engine.agents.saa.tools.fs that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.fs.
Response
@JsonClassDescription("The result contains filesystem tool output and execution message") public record Response(String result, String message)承载响应数据的记录类型。位于 io.agentscope.runtime.engine.agents.saa.tools.fs 包。核心成员包括 result、message、Response。
A record in io.agentscope.runtime.engine.agents.saa.tools.fs that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.engine.agents.saa.tools.fs.