AS AgentScopeAPI 手册 / API Reference

LocalFsMode

public enum LocalFsMode
源码Source io/agentscope/harness/agent/workspace/LocalFsMode.java:37–41

定义本地 Fs 模式相关取值的枚举。位于 io.agentscope.harness.agent.workspace 包。核心成员包括 SANDBOXED、ROOTED、UNRESTRICTED。

Path-resolution policy mode for host-rooted filesystems (io.agentscope.harness.agent.filesystem.local.LocalFilesystem and friends).

Controls what happens when the agent supplies an absolute path:

  • #SANDBOXED — anchor every path to the filesystem root, reject .. and absolute paths leaving the root. Equivalent to the legacy virtualMode=true.

  • #ROOTED — absolute paths are accepted only when they fall under one of the roots in the configured PathPolicy (project + workspace + additional roots). Relative paths still resolve against the filesystem root. This is the default for Local-mode agents and matches the Claude-Code-style "project + additional dirs" allow-list.

  • #UNRESTRICTED — absolute paths pass through unchanged. Equivalent to the legacy virtualMode=false. Escape hatch for tools or tests that need to read arbitrary host paths.

枚举常量摘要Enum Constant Summary

常量Constant说明Description
SANDBOXED
执行沙箱化相关操作。
Performs the SANDBOXED operation.
ROOTED
执行 `ROOTED` 方法。
Performs the ROOTED operation.
UNRESTRICTED
执行 `UNRESTRICTED` 方法。
Performs the UNRESTRICTED operation.

枚举常量详情Enum Constant Detail

SANDBOXED

SANDBOXED
staticfinal

执行沙箱化相关操作。

Performs the SANDBOXED operation.

源码Source io/agentscope/harness/agent/workspace/LocalFsMode.java:38

ROOTED

ROOTED
staticfinal

执行 ROOTED 方法。

Performs the ROOTED operation.

源码Source io/agentscope/harness/agent/workspace/LocalFsMode.java:39

UNRESTRICTED

UNRESTRICTED
staticfinal

执行 UNRESTRICTED 方法。

Performs the UNRESTRICTED operation.

源码Source io/agentscope/harness/agent/workspace/LocalFsMode.java:40
基于官方固定版本源码静态生成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.