fix: harden exec sandbox fallback semantics (#23398) (thanks @bmendonca3)

This commit is contained in:
Peter Steinberger
2026-02-22 10:49:15 +01:00
parent c76a47cce2
commit 1b327da6e3
8 changed files with 49 additions and 7 deletions

View File

@@ -33,7 +33,12 @@ test("exec disposes PTY listeners after normal exit", async () => {
kill: vi.fn(),
}));
const tool = createExecTool({ allowBackground: false });
const tool = createExecTool({
allowBackground: false,
host: "gateway",
security: "full",
ask: "off",
});
const result = await tool.execute("toolcall", {
command: "echo ok",
pty: true,
@@ -64,7 +69,12 @@ test("exec tears down PTY resources on timeout", async () => {
kill,
}));
const tool = createExecTool({ allowBackground: false });
const tool = createExecTool({
allowBackground: false,
host: "gateway",
security: "full",
ask: "off",
});
await expect(
tool.execute("toolcall", {
command: "sleep 5",