Skip to content

Commit f6ff774

Browse files
committed
fix(harness): align namespace boundaries with current filesystem APIs
1 parent b1ddfeb commit f6ff774

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎agentscope-harness/src/main/java/io/agentscope/harness/agent/filesystem/local/LocalFilesystem.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ private boolean isHiddenEntry(Path entry, boolean isLink) {
771771
}
772772

773773
/** Hidden: lexically inside a hidden root, or resolving into one through a link. */
774-
private boolean isHiddenFromCaller(Path path) {
774+
protected boolean isHiddenFromCaller(Path path) {
775775
if (path == null) {
776776
return false;
777777
}

‎docs/dev/en/docs/harness/filesystem.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ Local mode actually produces an `OverlayFilesystem`:
346346
- **Upper** (read-write): `LocalFilesystemWithShell`, rooted at `workspace`, provides shell;
347347
- **Lower** (read-only): `LocalFilesystem`, rooted at `project`.
348348

349-
Reads check workspace first, then fall back to project (copy-on-write semantics). Shell `pwd` is the project directory, so `ls` shows project files.
349+
Reads check workspace first, then fall back to project (copy-on-write semantics). With namespaces enabled and the workspace nested inside the project, the project layer cannot see the workspace subtree: `ls`, `grep` and `glob` skip it, and spelling its physical path reads nothing. Shell `pwd` is the project directory, so `ls` shows project files; the shell is not bound by this boundary.
350350

351351
#### Project-writable mode (`projectWritable`)
352352

‎docs/dev/zh/docs/harness/filesystem.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ HarnessAgent agent = HarnessAgent.builder()
345345
- **上层**(读写):`LocalFilesystemWithShell`,根在 `workspace`,提供 shell;
346346
- **下层**(只读):`LocalFilesystem`,根在 `project`。
347347

348-
读取时先看 workspace,没有再退到 project(copy-on-write 语义)。shell 的 `pwd` 是 project 目录,所以 agent 执行 `ls` 看到的是项目文件。
348+
读取时先看 workspace,没有再退到 project(copy-on-write 语义)。多用户且 workspace 是 project 的子目录时,project 层看不到 workspace 子树:`ls`/`grep`/`glob` 不列出它,直接拼物理路径也读不到。shell 的 `pwd` 是 project 目录,所以 agent 执行 `ls` 看到的是项目文件;shell 不受这层边界约束。
349349

350350
#### 项目可写模式(`projectWritable`)
351351

‎docs/v2/en/docs/harness/filesystem.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ Local mode actually produces an `OverlayFilesystem`:
385385
- **Upper** (read-write): `LocalFilesystemWithShell`, rooted at `workspace`, provides shell;
386386
- **Lower** (read-only): `LocalFilesystem`, rooted at `project`.
387387

388-
Reads check workspace first, then fall back to project (copy-on-write semantics). With namespaces enabled and the workspace nested inside the project, the project layer cannot see the workspace subtree: `ls`, `grep` and `glob` skip it, and spelling its physical path reads nothing. Shell `pwd` is the project directory, so `ls` shows project files; the shell is not bound by this boundary.
388+
Reads check workspace first, then fall back to project (copy-on-write semantics). Shell `pwd` is the project directory, so `ls` shows project files.
389389

390390
#### Project-writable mode (`projectWritable`)
391391

‎docs/v2/zh/docs/harness/filesystem.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ HarnessAgent agent = HarnessAgent.builder()
379379
- **上层**(读写):`LocalFilesystemWithShell`,根在 `workspace`,提供 shell;
380380
- **下层**(只读):`LocalFilesystem`,根在 `project`。
381381

382-
读取时先看 workspace,没有再退到 project(copy-on-write 语义)。多用户且 workspace 是 project 的子目录时,project 层看不到 workspace 子树:`ls`/`grep`/`glob` 不列出它,直接拼物理路径也读不到。shell 的 `pwd` 是 project 目录,所以 agent 执行 `ls` 看到的是项目文件;shell 不受这层边界约束。
382+
读取时先看 workspace,没有再退到 project(copy-on-write 语义)。shell 的 `pwd` 是 project 目录,所以 agent 执行 `ls` 看到的是项目文件。
383383

384384
#### 项目可写模式(`projectWritable`)
385385

0 commit comments

Comments
 (0)