From b0ce40804d0665b8bea64a906b772af07b7c3141 Mon Sep 17 00:00:00 2001 From: PM Date: Thu, 27 Aug 2026 05:10:25 -0300 Subject: [PATCH] fix(acp): enable terminal client capability by default (#3910) * fix(acp): enable terminal client capability by default (#3812) * test(acp): remove non-asserting Kimi coverage --------- Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> --- docs/custom-providers.md | 26 ++++++++++--------- .../server/agent/providers/acp-agent.test.ts | 8 +++--- .../src/server/agent/providers/acp-agent.ts | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/custom-providers.md b/docs/custom-providers.md index 924d1bc066..6874b7e6e2 100644 --- a/docs/custom-providers.md +++ b/docs/custom-providers.md @@ -501,25 +501,25 @@ Paseo tools such as subagent creation come from the shared internal tool catalog } ``` -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: +ACP agents execute filesystem operations in their own environment by default, +while terminal operations run through Paseo on the host. To customize which +operations Paseo handles, configure client capabilities in provider params: ```json { "agents": { "providers": { - "local-agent": { + "container-agent": { "extends": "acp", - "label": "Local Agent", - "command": ["local-agent", "acp"], + "label": "Container Agent", + "command": ["container-agent", "acp"], "params": { "clientCapabilities": { "fs": { - "readTextFile": true, - "writeTextFile": true + "readTextFile": false, + "writeTextFile": false }, - "terminal": true + "terminal": false } } } @@ -528,9 +528,11 @@ enable the corresponding client capabilities: } ``` -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. +When an agent runs in a container or remote environment that manages its own +terminal, set `terminal: false` to keep command execution inside the agent +container. When delegating filesystem operations to Paseo (`fs.readTextFile: true` +or `fs.writeTextFile: true`), ensure the agent and Paseo share equivalent +absolute workspace paths. ### 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 74cd504c28..20a0d1e075 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("keeps filesystem and terminal execution with the agent by default", () => { + test("enables terminal execution on the host while keeping filesystem operations with the agent by default", () => { expect(buildACPClientCapabilities()).toEqual({ fs: { readTextFile: false, writeTextFile: false, }, - terminal: false, + terminal: true, }); }); @@ -70,7 +70,7 @@ describe("buildACPClientCapabilities", () => { fs: { readTextFile: true, }, - terminal: true, + terminal: false, }, ), ).toEqual({ @@ -78,7 +78,7 @@ describe("buildACPClientCapabilities", () => { readTextFile: true, writeTextFile: false, }, - terminal: true, + terminal: false, _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 1a43ed5538..fcf97723a7 100644 --- a/packages/server/src/server/agent/providers/acp-agent.ts +++ b/packages/server/src/server/agent/providers/acp-agent.ts @@ -248,7 +248,7 @@ const BASE_ACP_CLIENT_CAPABILITIES: ACPClientCapabilities = { readTextFile: false, writeTextFile: false, }, - terminal: false, + terminal: true, }; export type ACPClientCapabilityMeta = Record;