ToolDangerousPathConstants
public final class ToolDangerousPathConstants
io/agentscope/core/tool/ToolDangerousPathConstants.java:27–80工具 Dangerous 路径 Constants,让智能体以受控方式调用外部能力。位于 io.agentscope.core.tool 包。核心成员包括 DEFAULT_DANGEROUS_FILES、DEFAULT_DANGEROUS_DIRECTORIES、DANGEROUS_COMMANDS。
Defaults for the dangerous-path and dangerous-command lists consulted by tool self-checks.
These lists guard sensitive configuration files (shell rc files, SSH config, credentials)
and disruptive shell commands. Tools that override the fields on ToolBase replace the
defaults entirely rather than appending to them.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
DEFAULT_DANGEROUS_FILESstaticfinal | List<String> | 默认 DANGEROUS 文件字段。 Sensitive files that should never be auto-edited. |
DEFAULT_DANGEROUS_DIRECTORIESstaticfinal | List<String> | 默认 DANGEROUS DIRECTORIES字段。 Directory names whose presence anywhere in a path marks it sensitive. |
DANGEROUS_COMMANDSstaticfinal | List<String> | DANGEROUS COMMANDS字段。 Shell command fragments that always require explicit user approval. |
字段详情Field Detail
DEFAULT_DANGEROUS_FILES
public static final List<String> DEFAULT_DANGEROUS_FILES
默认 DANGEROUS 文件字段。声明为 public static final List DEFAULT_DANGEROUS_FILES。
Sensitive files that should never be auto-edited.
io/agentscope/core/tool/ToolDangerousPathConstants.java:37–60DEFAULT_DANGEROUS_DIRECTORIES
public static final List<String> DEFAULT_DANGEROUS_DIRECTORIES
默认 DANGEROUS DIRECTORIES字段。声明为 public static final List DEFAULT_DANGEROUS_DIRECTORIES。
Directory names whose presence anywhere in a path marks it sensitive.
io/agentscope/core/tool/ToolDangerousPathConstants.java:63–64DANGEROUS_COMMANDS
public static final List<String> DANGEROUS_COMMANDS
DANGEROUS COMMANDS字段。声明为 public static final List DANGEROUS_COMMANDS。
Shell command fragments that always require explicit user approval.
io/agentscope/core/tool/ToolDangerousPathConstants.java:67–79