Enhance ShellTool with &&, ||, |, etc

This commit is contained in:
Alex Gleason committed 2025-09-11 20:54:11 -05:00
1 parent 943a4e592b
commit 4039e1e355
29 files changed
+539 -151

No files matched your search

+8 -7
View File
@@ -4,20 +4,21 @@
export interface ShellCommand {
/** The name of the command (e.g., 'cat', 'ls', 'cd') */
name: string;
/** Brief description of what the command does */
description: string;
/** Usage syntax for the command */
usage: string;
/**
* Execute the command with the given arguments
* @param args Array of command arguments (excluding the command name itself)
* @param cwd Current working directory
* @param input Optional input for pipe operations
* @returns Promise resolving to the command output or error message
*/
execute(args: string[], cwd: string): Promise<ShellCommandResult>;
execute(args: string[], cwd: string, input?: string): Promise<ShellCommandResult>;
}
/**
@@ -26,13 +27,13 @@ export interface ShellCommand {
export interface ShellCommandResult {
/** Exit code (0 for success, non-zero for error) */
exitCode: number;
/** Standard output content */
stdout: string;
/** Standard error content */
stderr: string;
/** New working directory (for commands like 'cd' that change directory) */
newCwd?: string;
}