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.
This commit is contained in:
Mohamed Boudra
2026-07-12 20:43:40 +02:00
committed by GitHub
parent 18de06c2a4
commit 88397655f7
4 changed files with 33 additions and 34 deletions
+12 -13
View File
@@ -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 ACP agents execute filesystem and terminal operations in their own environment
the client capabilities advertised during initialization. For a compliant agent by default. To let a compliant agent delegate those operations to Paseo instead,
running in a container or remote environment, disable those capabilities so it enable the corresponding client capabilities:
keeps file and command execution in the agent environment:
```json ```json
{ {
"agents": { "agents": {
"providers": { "providers": {
"container-agent": { "local-agent": {
"extends": "acp", "extends": "acp",
"label": "Container Agent", "label": "Local Agent",
"command": ["container-agent", "acp"], "command": ["local-agent", "acp"],
"params": { "params": {
"clientCapabilities": { "clientCapabilities": {
"fs": { "fs": {
"readTextFile": false, "readTextFile": true,
"writeTextFile": false "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 Only enable capabilities Paseo should execute. When the agent and Paseo run in
both environments with equivalent absolute workspace paths before enabling different environments, configure equivalent absolute workspace paths before
client filesystem or terminal delegation across a process boundary. delegating filesystem or terminal operations to Paseo.
### Generic ACP diagnostics ### Generic ACP diagnostics
@@ -52,13 +52,13 @@ import { asInternals } from "../../test-utils/class-mocks.js";
import * as spawnUtils from "../../../utils/spawn.js"; import * as spawnUtils from "../../../utils/spawn.js";
describe("buildACPClientCapabilities", () => { 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({ expect(buildACPClientCapabilities()).toEqual({
fs: { fs: {
readTextFile: true, readTextFile: false,
writeTextFile: true, writeTextFile: false,
}, },
terminal: true, terminal: false,
}); });
}); });
@@ -68,17 +68,17 @@ describe("buildACPClientCapabilities", () => {
{ source: "provider" }, { source: "provider" },
{ {
fs: { fs: {
readTextFile: false, readTextFile: true,
}, },
terminal: false, terminal: true,
}, },
), ),
).toEqual({ ).toEqual({
fs: { fs: {
readTextFile: false, readTextFile: true,
writeTextFile: true, writeTextFile: false,
}, },
terminal: false, terminal: true,
_meta: { source: "provider" }, _meta: { source: "provider" },
}); });
}); });
@@ -231,10 +231,10 @@ export const DEFAULT_ACP_CAPABILITIES: AgentCapabilityFlags = {
const BASE_ACP_CLIENT_CAPABILITIES: ACPClientCapabilities = { const BASE_ACP_CLIENT_CAPABILITIES: ACPClientCapabilities = {
fs: { fs: {
readTextFile: true, readTextFile: false,
writeTextFile: true, writeTextFile: false,
}, },
terminal: true, terminal: false,
}; };
export type ACPClientCapabilityMeta = Record<string, unknown>; export type ACPClientCapabilityMeta = Record<string, unknown>;
@@ -108,10 +108,10 @@ describe("GenericACPAgentClient diagnostics", () => {
providerParams: { providerParams: {
clientCapabilities: { clientCapabilities: {
fs: { fs: {
readTextFile: false, readTextFile: true,
writeTextFile: false, writeTextFile: true,
}, },
terminal: false, terminal: true,
}, },
}, },
}); });
@@ -127,19 +127,19 @@ describe("GenericACPAgentClient diagnostics", () => {
{ {
clientCapabilities: { clientCapabilities: {
fs: { fs: {
readTextFile: false, readTextFile: true,
writeTextFile: false, writeTextFile: true,
}, },
terminal: false, terminal: true,
}, },
}, },
{ {
clientCapabilities: { clientCapabilities: {
fs: { fs: {
readTextFile: false, readTextFile: true,
writeTextFile: false, writeTextFile: true,
}, },
terminal: false, terminal: true,
}, },
}, },
]); ]);