Support session-scoped external folder refs / 支持会话级外部文件夹引用#5453
Merged
SivanCola merged 5 commits intoJun 28, 2026
Merged
Conversation
# Conflicts: # internal/boot/boot.go # internal/tool/builtin/glob.go # internal/tool/builtin/grep.go # internal/tool/builtin/ls.go # internal/tool/builtin/readfile.go # internal/tool/builtin/workspace.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@<external-folder-token>/sub/fileresolves to file content, nested directories can be listed, and file search/autocomplete can return registered external-folder children without exposing raw local paths as submit text.read_file,ls,grep,glob) resolve registered external-folder token paths so the agent can inspect/search authorized external children on demand without adding those folders as writable workspace roots.References
Refs #5370, #5447
Contribution Credits
Cache Impact
Cache-impact: low - touches cache-sensitive boot/tool files, but only to wire runtime path resolution for session-authorized external folder refs; no stable prompt text, model-visible tool schema, or provider request serialization changes.
Cache-guard:
go test ./internal/tool/...includes schema-stability coverage for workspace tools with an external read resolver;go test ./internal/bootcovers boot wiring.System-prompt-review: reviewed in this PR; the boot change passes a runtime read-path resolver into the controller/tools and does not alter system prompt composition.
Verification
go test ./internal/tool/...go test ./internal/controlgo test ./internal/bootgo test . -run 'TestFileRefs|TestAttachDropped|TestWorkspaceRelativeIn|TestIsImageExt'in the desktop modulepnpm --dir desktop/frontend typecheckpnpm --dir desktop/frontend exec tsx src/__tests__/at-matches.test.tspnpm --dir desktop/frontend exec tsx src/__tests__/composer-goal-toggle.test.tsxgit diff --check