From 88397655f740fd9f4908f037bebfb0f78a3c5ae8 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sun, 12 Jul 2026 20:43:40 +0200 Subject: [PATCH] fix(acp): keep tool execution with agents by default (#2024) Paseo should only advertise filesystem and terminal execution when a provider explicitly opts into delegating those operations to the host. --- docs/custom-providers.md | 25 +++++++++---------- .../server/agent/providers/acp-agent.test.ts | 18 ++++++------- .../src/server/agent/providers/acp-agent.ts | 6 ++--- .../generic-acp-agent.diagnostic.test.ts | 18 ++++++------- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/docs/custom-providers.md b/docs/custom-providers.md index 2d11ab171..b1b3ce2da 100644 --- a/docs/custom-providers.md +++ b/docs/custom-providers.md @@ -457,26 +457,25 @@ Paseo tools such as subagent creation come from the shared internal tool catalog } ``` -ACP agents normally receive access to Paseo's filesystem and terminal through -the client capabilities advertised during initialization. For a compliant agent -running in a container or remote environment, disable those capabilities so it -keeps file and command execution in the agent environment: +ACP agents execute filesystem and terminal operations in their own environment +by default. To let a compliant agent delegate those operations to Paseo instead, +enable the corresponding client capabilities: ```json { "agents": { "providers": { - "container-agent": { + "local-agent": { "extends": "acp", - "label": "Container Agent", - "command": ["container-agent", "acp"], + "label": "Local Agent", + "command": ["local-agent", "acp"], "params": { "clientCapabilities": { "fs": { - "readTextFile": false, - "writeTextFile": false + "readTextFile": true, + "writeTextFile": true }, - "terminal": false + "terminal": true } } } @@ -485,9 +484,9 @@ keeps file and command execution in the agent environment: } ``` -The defaults remain enabled for compatibility with local ACP agents. Configure -both environments with equivalent absolute workspace paths before enabling -client filesystem or terminal delegation across a process boundary. +Only enable capabilities Paseo should execute. When the agent and Paseo run in +different environments, configure equivalent absolute workspace paths before +delegating filesystem or terminal operations to Paseo. ### Generic ACP diagnostics diff --git a/packages/server/src/server/agent/providers/acp-agent.test.ts b/packages/server/src/server/agent/providers/acp-agent.test.ts index 21152ac4b..641a19ccd 100644 --- a/packages/server/src/server/agent/providers/acp-agent.test.ts +++ b/packages/server/src/server/agent/providers/acp-agent.test.ts @@ -52,13 +52,13 @@ import { asInternals } from "../../test-utils/class-mocks.js"; import * as spawnUtils from "../../../utils/spawn.js"; describe("buildACPClientCapabilities", () => { - test("preserves the default client filesystem and terminal capabilities", () => { + test("keeps filesystem and terminal execution with the agent by default", () => { expect(buildACPClientCapabilities()).toEqual({ fs: { - readTextFile: true, - writeTextFile: true, + readTextFile: false, + writeTextFile: false, }, - terminal: true, + terminal: false, }); }); @@ -68,17 +68,17 @@ describe("buildACPClientCapabilities", () => { { source: "provider" }, { fs: { - readTextFile: false, + readTextFile: true, }, - terminal: false, + terminal: true, }, ), ).toEqual({ fs: { - readTextFile: false, - writeTextFile: true, + readTextFile: true, + writeTextFile: false, }, - terminal: false, + terminal: true, _meta: { source: "provider" }, }); }); diff --git a/packages/server/src/server/agent/providers/acp-agent.ts b/packages/server/src/server/agent/providers/acp-agent.ts index 23ce328b1..f166dc372 100644 --- a/packages/server/src/server/agent/providers/acp-agent.ts +++ b/packages/server/src/server/agent/providers/acp-agent.ts @@ -231,10 +231,10 @@ export const DEFAULT_ACP_CAPABILITIES: AgentCapabilityFlags = { const BASE_ACP_CLIENT_CAPABILITIES: ACPClientCapabilities = { fs: { - readTextFile: true, - writeTextFile: true, + readTextFile: false, + writeTextFile: false, }, - terminal: true, + terminal: false, }; export type ACPClientCapabilityMeta = Record; diff --git a/packages/server/src/server/agent/providers/generic-acp-agent.diagnostic.test.ts b/packages/server/src/server/agent/providers/generic-acp-agent.diagnostic.test.ts index 4b9749030..785838bb6 100644 --- a/packages/server/src/server/agent/providers/generic-acp-agent.diagnostic.test.ts +++ b/packages/server/src/server/agent/providers/generic-acp-agent.diagnostic.test.ts @@ -108,10 +108,10 @@ describe("GenericACPAgentClient diagnostics", () => { providerParams: { clientCapabilities: { fs: { - readTextFile: false, - writeTextFile: false, + readTextFile: true, + writeTextFile: true, }, - terminal: false, + terminal: true, }, }, }); @@ -127,19 +127,19 @@ describe("GenericACPAgentClient diagnostics", () => { { clientCapabilities: { fs: { - readTextFile: false, - writeTextFile: false, + readTextFile: true, + writeTextFile: true, }, - terminal: false, + terminal: true, }, }, { clientCapabilities: { fs: { - readTextFile: false, - writeTextFile: false, + readTextFile: true, + writeTextFile: true, }, - terminal: false, + terminal: true, }, }, ]);