PermissionMode
public enum PermissionMode
io/agentscope/core/permission/PermissionMode.java:33–71定义权限模式相关取值的枚举。位于 io.agentscope.core.permission 包。核心成员包括 getValue、fromString、DEFAULT、ACCEPT_EDITS、EXPLORE、BYPASS。
Permission mode controlling how the engine evaluates tool execution requests.
-
#DEFAULT: all operations require explicit allow rules. -
#ACCEPT_EDITS: file edits inside working directories are auto-allowed. -
#EXPLORE: read-only mode; modification tools are denied. -
#BYPASS: all operations allowed without rule evaluation. -
#DONT_ASK: ASK decisions are demoted to DENY (for unattended runs).
枚举常量摘要Enum Constant Summary
| 常量Constant | 说明Description |
|---|---|
DEFAULT | 执行默认相关操作。 Performs the DEFAULT operation. |
ACCEPT_EDITS | 接受EDITS。 Performs the ACCEPT EDITS operation. |
EXPLORE | 执行 `EXPLORE` 方法。 Performs the EXPLORE operation. |
BYPASS | 执行 `BYPASS` 方法。 Performs the BYPASS operation. |
DONT_ASK | 执行NT ASK操作。 Performs the DONT ASK operation. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getValue() | 获取值。 Returns the value. |
public static PermissionMode fromString(String value)static | 设置该参数。 Resolves a string (case-insensitive) to a `PermissionMode`. |
枚举常量详情Enum Constant Detail
DEFAULT
DEFAULT("default")
执行默认相关操作。
Performs the DEFAULT operation.
io/agentscope/core/permission/PermissionMode.java:34ACCEPT_EDITS
ACCEPT_EDITS("accept_edits")
接受EDITS。
Performs the ACCEPT EDITS operation.
io/agentscope/core/permission/PermissionMode.java:35EXPLORE
EXPLORE("explore")
执行 EXPLORE 方法。
Performs the EXPLORE operation.
io/agentscope/core/permission/PermissionMode.java:36BYPASS
BYPASS("bypass")
执行 BYPASS 方法。
Performs the BYPASS operation.
io/agentscope/core/permission/PermissionMode.java:37DONT_ASK
DONT_ASK("dont_ask")
执行NT ASK操作。
Performs the DONT ASK operation.
io/agentscope/core/permission/PermissionMode.java:38方法详情Method Detail
getValue
public String getValue()
获取值。
Returns the value.
Stringio/agentscope/core/permission/PermissionMode.java:46–49fromString
public static PermissionMode fromString(String value)
设置该参数。
Resolves a string (case-insensitive) to a PermissionMode.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
value | String | 值(类型 `String`)。JSON / config string representation |
PermissionModeIllegalArgumentException可能抛出 `IllegalArgumentException`。if no enum value matches
io/agentscope/core/permission/PermissionMode.java:58–70