read user-scope Claude config files via a read allow-list (D-80)

The reader opened repo-local .claude markdown but rejected user-scope
files under ~/.claude with "path outside workspace" — that dir is
global, outside the repo, and files.read was repo-confined (T-102).

Per D-76 the Claude config surface is clide-managed, so files.read now
resolves a path under an allow-list: the workspace root plus trusted
extra read roots (FilesService.extraReadRoots), wired in main.dart to
~/.claude when present. Reads widen; writes stay repo-confined, and the
symlink re-check still refuses a config-root symlink that escapes. Off-
root paths and `..` traversal are rejected as before.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 09:08:32 +02:00
co-authored by Claude Opus 4.8
parent ade8a88b75
commit 0bb89a2e58
10 changed files with 143 additions and 3 deletions
+5
View File
@@ -46,6 +46,11 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
### Fixed
- The markdown reader can now open user-scope Claude config files (skills /
agents / commands under `~/.claude`), not just repo-local ones. `files.read`
gained a read allow-list covering the workspace plus the trusted Claude config
roots; writes stay repo-confined and off-root paths are still rejected. (T-195,
D-80)
- The markdown reader opens files given an absolute path again (e.g. a skill's
`SKILL.md` from the Claude Config tab). `resolveUnderRoot` no longer doubles an
absolute path onto the workspace root; absolute-under-root resolves, while