接口的使用
io.agentscope.core.tool.coding.CommandValidator
使用CommandValidator的程序包
-
io.agentscope.core.tool.coding中CommandValidator的使用
修饰符和类型类说明classCommand validator for Unix-like systems (Linux, macOS).classCommand validator for Windows systems.限定符构造器说明ShellCommandTool(String baseDir, Set<String> allowedCommands, Function<String, Boolean> approvalCallback, CommandValidator commandValidator) Constructor with base directory, command whitelist, approval callback, and custom validator.ShellCommandTool(String baseDir, Set<String> allowedCommands, Function<String, Boolean> approvalCallback, CommandValidator commandValidator, Charset charset) Full constructor with all configuration options including charset.ShellCommandTool(Set<String> allowedCommands, Function<String, Boolean> approvalCallback, CommandValidator commandValidator) Constructor with command whitelist, approval callback, and custom validator.