Repository navigation
feat(acp): support additional directories - #543
Conversation
📝 WalkthroughWalkthroughThis PR implements end-to-end support for "additional workspace roots" in Coding Agent: users can specify extra directories via ACP ChangesAdditional Workspace Roots Support
Sequence DiagramsequenceDiagram
participant Client
participant ACP Server
participant SessionManager
participant Runtime
participant FileTools
participant SandboxTools
Client->>ACP Server: session/new (additionalDirectories=["/extra"])
ACP Server->>ACP Server: _parse_additional_directories
ACP Server->>SessionManager: create_session(additional_directories)
SessionManager->>SessionManager: normalize & persist session
Client->>ACP Server: run command in /extra
ACP Server->>Runtime: create runtime with additional_workspace_roots_override
Runtime->>FileTools: configure with additional roots
Runtime->>SandboxTools: mount additional roots
Client->>FileTools: file_read(/extra/file.txt)
FileTools->>FileTools: validate path in [workspace, /extra]
FileTools-->>Client: file contents
Client->>SandboxTools: bash in /extra
SandboxTools->>SandboxTools: validate cwd against allowed roots
SandboxTools-->>Client: command result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
293c4ac to
c71a6d6
Compare
delete-cloud
left a comment
There was a problem hiding this comment.
Manual fallback review while CodeRabbit remains pending.
Scope reviewed: ACP additionalDirectories parsing/persistence, runtime propagation, local file/file_patch/bash_run access checks, native/docker/podman sandbox mount/profile changes, and focused regression tests.
Findings: no P1/P2 blockers found after fixing the file_patch absolute-path safe-edit edge in c71a6d6.
Verification checked locally:
- uv run pytest tests/acp -k "additional or compat" -v
- uv run pytest tests/ui/test_session_persistence.py -k "additional_directories or session_record" -v
- uv run pytest tests/coding_agent/test_runtime_preparation.py tests/coding_agent/test_bootstrap.py -k "additional_workspace_roots or runtime_preparation_service" -v
- uv run pytest tests/coding_agent/tools/test_file_ops.py tests/tools/test_shell.py -k "additional or workspace" -v
- uv run pytest tests/coding_agent/tools/test_file_patch_tool.py -v
- uv run pytest tests/cli/test_entrypoint_contract.py -k acp -v
- uv run ruff check touched files
- uv run ruff format --check touched files
- git diff --check
Summary
Verification