Skip to content

feat(acp): IDE-proxied file system, terminal, permissions, MCP passthrough#775

Merged
bug-ops merged 3 commits intomainfrom
feat/acp-phase2
Feb 23, 2026
Merged

feat(acp): IDE-proxied file system, terminal, permissions, MCP passthrough#775
bug-ops merged 3 commits intomainfrom
feat/acp-phase2

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 23, 2026

Summary

Phase 2 of ACP integration — IDE-proxied capabilities for zeph-acp crate:

  • acp: IDE-proxied file system operations #767 fs.rsAcpFileExecutor implementing ToolExecutor for read_file/write_file proxied through IDE via ACP Client trait, with absolute path validation and traversal rejection
  • acp: IDE-proxied terminal execution #768 terminal.rsAcpShellExecutor implementing ToolExecutor for bash commands proxied through IDE terminal lifecycle (create/wait/output/release), with permission gate integration
  • acp: permission request flow for tool execution #769 permission.rsAcpPermissionGate with session-scoped tool_name cache for AllowAlways/RejectAlways decisions, mpsc+oneshot bridge pattern for !Send conn access
  • acp: MCP server passthrough from IDE client #770 mcp_bridge.rs — convert IDE-provided MCP server configs (stdio transport) to zeph-mcp ServerEntry format
  • agent.rsAcpContext struct, updated AgentSpawner signature to accept Option<AcpContext>
  • error.rsClientError, CapabilityUnavailable, ChannelClosed variants

Architecture

All adapters use channel bridge pattern (mpsc sender in Send context, LocalSet receiver calls AgentSideConnection methods, oneshot reply):

Agent thread (Send)          LocalSet (!Send)
       |                          |
  AcpFileExecutor  --[mpsc]--> fs_handler(conn)
  AcpShellExecutor --[mpsc]--> terminal_handler(conn)
  AcpPermissionGate--[mpsc]--> permission_handler(conn)
       |                          |
  <--[oneshot]-- reply            |

Known limitation

transport.rs conn-sharing wiring (spawning LocalSet handlers with Rc<AgentSideConnection>) is deferred — adapters are implemented and tested but not yet connected to the real connection. This will be completed in Phase 3 alongside integration tests (#773).

Closes #767, #768, #769, #770

Test plan

  • 40 unit tests pass (cargo nextest run -p zeph-acp)
  • 2554 workspace tests pass
  • Security audit: path traversal validation, permission gate on shell, session-scoped cache
  • Performance review: no blockers, channel overhead acceptable
  • cargo clippy --workspace -- -D warnings clean
  • cargo +nightly fmt --check clean

…rough

Add Phase 2 IDE capabilities to zeph-acp:

- fs.rs: AcpFileExecutor implementing ToolExecutor for read_file/write_file
  proxied through IDE via ACP Client trait, with path traversal validation
- terminal.rs: AcpShellExecutor implementing ToolExecutor for bash commands
  proxied through IDE terminal lifecycle (create/wait/output/release),
  with permission gate integration
- permission.rs: AcpPermissionGate with session-scoped tool_name cache
  for AllowAlways/RejectAlways decisions, mpsc+oneshot bridge pattern
- mcp_bridge.rs: convert IDE-provided MCP server configs (stdio) to
  zeph-mcp ServerEntry format
- agent.rs: AcpContext struct, updated AgentSpawner signature to accept
  Option<AcpContext> for IDE adapter injection
- error.rs: ClientError, CapabilityUnavailable, ChannelClosed variants

Closes #767, #768, #769, #770
@github-actions github-actions bot added the enhancement New feature or request label Feb 23, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 23, 2026 21:52
Use platform-conditional test paths (C:\tmp\ on Windows, /tmp/ on Unix)
to fix validate_absolute_path rejection on Windows where Unix paths
are not recognized as absolute.
@bug-ops bug-ops merged commit b7106c9 into main Feb 23, 2026
20 checks passed
@bug-ops bug-ops deleted the feat/acp-phase2 branch February 23, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant