AS AgentScopeAPI 手册 / API Reference

PermissionMode

public enum PermissionMode
源码Source 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")
staticfinal

执行默认相关操作。

Performs the DEFAULT operation.

源码Source io/agentscope/core/permission/PermissionMode.java:34

ACCEPT_EDITS

ACCEPT_EDITS("accept_edits")
staticfinal

接受EDITS。

Performs the ACCEPT EDITS operation.

源码Source io/agentscope/core/permission/PermissionMode.java:35

EXPLORE

EXPLORE("explore")
staticfinal

执行 EXPLORE 方法。

Performs the EXPLORE operation.

源码Source io/agentscope/core/permission/PermissionMode.java:36

BYPASS

BYPASS("bypass")
staticfinal

执行 BYPASS 方法。

Performs the BYPASS operation.

源码Source io/agentscope/core/permission/PermissionMode.java:37

DONT_ASK

DONT_ASK("dont_ask")
staticfinal

执行NT ASK操作。

Performs the DONT ASK operation.

源码Source io/agentscope/core/permission/PermissionMode.java:38

方法详情Method Detail

getValue

public String getValue()

获取值。

Returns the value.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/permission/PermissionMode.java:46–49

fromString

public static PermissionMode fromString(String value)
static

设置该参数。

Resolves a string (case-insensitive) to a PermissionMode.

参数Parameters
名称Name类型Type说明Description
valueString值(类型 `String`)。JSON / config string representation
返回Returns PermissionMode
返回PermissionMode。matching mode
抛出Throws
  • IllegalArgumentException 可能抛出 `IllegalArgumentException`。if no enum value matches
源码Source io/agentscope/core/permission/PermissionMode.java:58–70
基于官方固定版本源码静态生成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.