Skip to content

Wire AcpContext through AgentSpawner into agent tool chain #779

@bug-ops

Description

@bug-ops

Parent Epic

#777

Problem

In main.rs, _acp_ctx is discarded in the spawner closure. AcpFileExecutor, AcpShellExecutor, and AcpPermissionGate are constructed but never used.

Solution

  • Accept AcpContext in spawn_acp_agent() and build_acp_deps()
  • When AcpContext.file_executor is Some, use it instead of local file tools
  • When AcpContext.shell_executor is Some, use it instead of ShellExecutor
  • When AcpContext.permission_gate is Some, wrap tool execution with permission checks
  • Integrate via CompositeExecutor or a new AcpToolExecutor wrapper

Critical Path

No dependencies — can start immediately.
Blocks: #780 (cancellation), Epic 2 (#778)

Acceptance Criteria

  • AcpContext parameter used (not discarded) in spawner
  • IDE FS read/write proxied when capability advertised
  • IDE shell execution proxied when capability advertised
  • Permission gate wraps tool calls when capability advertised
  • Fallback to local tools when IDE capability not advertised
  • Tests with mock ACP client verifying tool delegation

Metadata

Metadata

Assignees

No one assigned

    Labels

    acpAgent Client Protocol integrationenhancementNew feature or requestsize/M

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions