summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-05-06 23:38:36 -0700
committerGitHub <[email protected]>2025-05-06 23:38:36 -0700
commit53448533447604ebfd8604cfcfcbba3e128a0c6a (patch)
treeedfe42d875d6ae06e7246a9d3e4ce57910ea2dbf
parenta588d5cd10e71bbb99912fb4d7f43c162a2a68ba (diff)
drop restriction on whitespace in bash commands (#272)
-rw-r--r--packages/server/src/tools/shell.md3
-rw-r--r--packages/server/src/tools/shell.ts4
2 files changed, 1 insertions, 6 deletions
diff --git a/packages/server/src/tools/shell.md b/packages/server/src/tools/shell.md
index a9cae2de..069a76db 100644
--- a/packages/server/src/tools/shell.md
+++ b/packages/server/src/tools/shell.md
@@ -1,7 +1,6 @@
This tool executes a given shell command as `bash -c <command>`.
-Command can be any valid single-line Bash command.
Command can start background processes using `&`.
-Command is executed as a subprocess.
+Command itself is executed as a subprocess.
The following information is returned:
diff --git a/packages/server/src/tools/shell.ts b/packages/server/src/tools/shell.ts
index c7fd70ab..bf19b37c 100644
--- a/packages/server/src/tools/shell.ts
+++ b/packages/server/src/tools/shell.ts
@@ -49,7 +49,6 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
description += ` [in ${params.directory}]`;
}
// append optional (description), replacing any line breaks with spaces
- // tool description/schema should specify a single line w/o line breaks
if (params.description) {
description += ` (${params.description.replace(/\n/g, ' ')})`;
}
@@ -77,9 +76,6 @@ export class ShellTool extends BaseTool<ShellToolParams, ToolResult> {
if (!params.command.trim()) {
return 'Command cannot be empty.';
}
- if (params.command.match(/[^\S ]/)) {
- return 'Command cannot contain any whitespace other than plain spaces.';
- }
if (!this.getCommandRoot(params.command)) {
return 'Could not identify command root to obtain permission from user.';
}