AS AgentScopeAPI 手册 / API Reference

ToolDangerousPathConstants

public final class ToolDangerousPathConstants
源码Source 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_FILES
staticfinal
List<String>
默认 DANGEROUS 文件字段。
Sensitive files that should never be auto-edited.
DEFAULT_DANGEROUS_DIRECTORIES
staticfinal
List<String>
默认 DANGEROUS DIRECTORIES字段。
Directory names whose presence anywhere in a path marks it sensitive.
DANGEROUS_COMMANDS
staticfinal
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
staticfinal

默认 DANGEROUS 文件字段。声明为 public static final List DEFAULT_DANGEROUS_FILES。

Sensitive files that should never be auto-edited.

源码Source io/agentscope/core/tool/ToolDangerousPathConstants.java:37–60

DEFAULT_DANGEROUS_DIRECTORIES

public static final List<String> DEFAULT_DANGEROUS_DIRECTORIES
staticfinal

默认 DANGEROUS DIRECTORIES字段。声明为 public static final List DEFAULT_DANGEROUS_DIRECTORIES。

Directory names whose presence anywhere in a path marks it sensitive.

源码Source io/agentscope/core/tool/ToolDangerousPathConstants.java:63–64

DANGEROUS_COMMANDS

public static final List<String> DANGEROUS_COMMANDS
staticfinal

DANGEROUS COMMANDS字段。声明为 public static final List DANGEROUS_COMMANDS。

Shell command fragments that always require explicit user approval.

源码Source io/agentscope/core/tool/ToolDangerousPathConstants.java:67–79
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.